Current File : /home/whitekig/public_html/wp-content/themes/woodmart/js/libs/sticky-kit.min.js
!function(){var M=window.jQuery,T=M(window);M.fn.stick_in_parent=function(t){var y,i,o,s,n,_=(t=null==t?{}:t).sticky_class,b=t.inner_scrolling,w=t.recalc_every,C=t.parent,I=t.offset_top,x=t.spacer,z=t.bottoming;for(null==I&&(I=0),null==C&&(C=void 0),null==b&&(b=!0),null==_&&(_="is_stuck"),y=M(document),null==z&&(z=!0),o=function(e,t,c,r,l,a,i,p){var u,o,f,d,h,k,g,m,s,v,n;if(!e.data("sticky_kit")){if(e.data("sticky_kit",!0),h=y.height(),g=e.parent(),!(g=null!=C?g.closest(C):g).length)throw"failed to find stick parent";if(u=f=!1,null!=x?x&&e.closest(x):M("<div />"),(m=function(){var t,i,o;if(!p)return h=y.height(),t=parseInt(g.css("border-top-width"),10),i=parseInt(g.css("padding-top"),10),parseInt(g.css("padding-bottom"),10),c=g.offset().top+t+i,r=g.height(),f&&(u=f=!1,e.css({position:"",top:"",width:"",bottom:""}).removeClass(_),o=!0),l=e.offset().top-(parseInt(e.css("margin-top"),10)||0)-I,a=e.outerHeight(!0),e.css("float"),o?n():void 0})(),a!==r)return d=void 0,k=I,v=w,n=function(){var t,i,o,s,n;p||(o=!1,null!=v&&--v<=0&&(v=w,m(),o=!0),o||y.height()===h||(m(),o=!0),o=T.scrollTop(),null!=d&&(i=o-d),d=o,f?(z&&(s=r+c<o+a+k,u)&&!s&&(u=!1,e.css({position:"sticky",bottom:"",top:k}).trigger("sticky_kit:unbottom")),o<l&&(f=!1,k=I,e.css(t={position:"",width:"",top:""}).removeClass(_).trigger("sticky_kit:unstick")),b&&(n=T.height())<a+I&&(u||(k-=i,k=Math.max(n-a,k),k=Math.min(I,k),f&&e.css({top:k+"px"})))):l<o&&(f=!0,t={position:"sticky",top:k},e.css(t).addClass(_),e.trigger("sticky_kit:stick")),f&&z&&(null==s&&(s=r+c<o+a+k),!u)&&s&&(u=!0,"static"===g.css("position"))&&g.css({position:"relative"}))},s=function(){return m(),n()},o=function(){if(p=!0,T.off("touchmove",n),T.off("scroll",n),T.off("resize",s),M(document.body).off("sticky_kit:recalc",s),e.off("sticky_kit:detach",o),e.removeData("sticky_kit"),e.css({position:"",bottom:"",top:"",width:""}),g.position("position",""),f)return e.removeClass(_)},T.on("touchmove",n),T.on("scroll",n),T.on("resize",s),M(document.body).on("sticky_kit:recalc",s),e.on("sticky_kit:detach",o),setTimeout(n,0)}},s=0,n=this.length;s<n;s++)i=this[s],o(M(i));return this}}.call(this);