/** * Sticky-kit v1.1.3 | MIT | Leaf Corcoran 2015 | http://leafo.net * * @cc_on * */ !function(){var T=window.jQuery,z=T(window);T.fn.stick_in_parent=function(a){var k,t,i,o,C,y=(a=null==a?{}:a).sticky_class,x=a.inner_scrolling,j=a.recalc_every,D=a.parent,P=a.offset_top,V=a.spacer,F=a.bottoming;for(null==P&&(P=0),null==D&&(D=void 0),null==x&&(x=!0),null==y&&(y="is_stuck"),k=T(document),null==F&&(F=!0),C=function(a){var t;return window.getComputedStyle?(a=window.getComputedStyle(a[0]),t=parseFloat(a.getPropertyValue("width"))+parseFloat(a.getPropertyValue("margin-left"))+parseFloat(a.getPropertyValue("margin-right")),"border-box"!==a.getPropertyValue("box-sizing")&&(t+=parseFloat(a.getPropertyValue("border-left-width"))+parseFloat(a.getPropertyValue("border-right-width"))+parseFloat(a.getPropertyValue("padding-left"))+parseFloat(a.getPropertyValue("padding-right"))),t):a.outerWidth(!0)},t=function(s,e,n,d,r,l,c,b){var h,a,g,u,p,f,v,w,t,m,_,o;if(!s.data("sticky_kit")){if(s.data("sticky_kit",!0),p=k.height(),v=s.parent(),!(v=null!=D?v.closest(D):v).length)throw"failed to find stick parent";if(h=g=!1,(_=null!=V?V&&s.closest(V):T("
"))&&_.css("position",s.css("position")),(w=function(){var a,t,i;if(!b&&(p=k.height(),a=parseInt(v.css("border-top-width"),10),t=parseInt(v.css("padding-top"),10),e=parseInt(v.css("padding-bottom"),10),n=v.offset().top+a+t,d=v.height(),g&&(h=g=!1,null==V&&(s.insertAfter(_),_.detach()),s.css({position:"",top:"",width:"",bottom:""}).removeClass(y),i=!0),r=s.offset().top-(parseInt(s.css("margin-top"),10)||0)-P,l=s.outerHeight(!0),c=s.css("float"),_&&_.css({width:C(s),height:l,display:s.css("display"),"vertical-align":s.css("vertical-align"),float:c}),i))return o()})(),l!==d)return u=void 0,f=P,m=j,o=function(){var a,t,i,o;if(!b&&(i=!1,null!=m&&(--m<=0&&(m=j,w(),i=!0)),i||k.height()===p||w(),i=z.scrollTop(),null!=u&&(t=i-u),u=i,g?(F&&(o=d+n .botiga-dashboard-tab-content").removeClass("active"),o.find('> .botiga-dashboard-tab-content[data-tab-content-id="'+i+'"]').addClass("active"),"home"===i&&r(document.body).trigger("sticky_kit:recalc")})});t=r(".botiga-license-button");t.length&&t.on("click",function(a){var t=r(this);"activate"===t.data("type")?t.html(''+window.botiga_dashboard.i18n.activating):t.html(''+window.botiga_dashboard.i18n.deactivating)});t=r(".botiga-dashboard-plugin-ajax-button");t.length&&t.on("click",function(a){a.preventDefault();var o=r(this),t=o.attr("href"),i=o.data("slug"),s=o.data("type"),a=o.data("path"),e=o.html();o.addClass("botiga-ajax-progress"),o.parent().siblings(".botiga-dashboard-hero-warning").remove(),"install"===s?o.html(''+window.botiga_dashboard.i18n.installing):"activate"===s?o.html(''+window.botiga_dashboard.i18n.activating):"deactivate"===s&&o.html(''+window.botiga_dashboard.i18n.deactivating),r.post(window.botiga_dashboard.ajax_url,{action:"botiga_plugin",nonce:window.botiga_dashboard.nonce,slug:i,type:s,path:a},function(a){if(a.success){if(o.hasClass("botiga-ajax-success-redirect"))return setTimeout(function(){o.html(window.botiga_dashboard.i18n.redirecting),setTimeout(function(){window.location=t},1e3)},500),!1;"install"===s?o.html(window.botiga_dashboard.i18n.deactivate).removeClass("botiga-dashboard-link-info").addClass("botiga-dashboard-link-danger").removeClass("loading").data("type","deactivate"):"deactivate"===s?o.html(window.botiga_dashboard.i18n.activate).removeClass("botiga-dashboard-link-danger").addClass("botiga-dashboard-link-success").removeClass("loading").data("type","activate"):o.html(window.botiga_dashboard.i18n.deactivate).removeClass("botiga-dashboard-link-success").addClass("botiga-dashboard-link-danger").removeClass("loading").data("type","deactivate"),o.removeClass("botiga-ajax-progress")}else a.data?(o.html(e),o.parent().after('