(function(){var t,o;t=window.jQuery,o=t(window),t.fn.stick_in_parent=function(i){var e,s,r,n,l,a,c,p,d,u,f,g,h,k;for(null==i&&(i={}),h=i.sticky_class,a=i.inner_scrolling,g=i.recalc_every,f=i.parent,d=i.offset_top,p=i.spacer,r=i.bottoming,k=i.force_sticky,null==d&&(d=0),null==f&&(f=void 0),null==a&&(a=!0),null==h&&(h="is_stuck"),e=t(document),null==r&&(r=!0),null==k&&(k=!0),u=function(t){var o,i,e;return window.getComputedStyle?(o=t[0],i=window.getComputedStyle(t[0]),e=parseFloat(i.getPropertyValue("width"))+parseFloat(i.getPropertyValue("margin-left"))+parseFloat(i.getPropertyValue("margin-right")),"border-box"!==i.getPropertyValue("box-sizing")&&(e+=parseFloat(i.getPropertyValue("border-left-width"))+parseFloat(i.getPropertyValue("border-right-width"))+parseFloat(i.getPropertyValue("padding-left"))+parseFloat(i.getPropertyValue("padding-right"))),e):t.outerWidth(!0)},n=function(i,s,n,l,c,y,m,v,b){var w,_,x,P,V,F,C,z,I,T,A,M;if(!i.data("sticky_kit")){if(V=e.height(),C=i.parent(),null!=f&&(C=C.closest(f)),!C.length)throw"failed to find stick parent";if(x=!1,w=!1,A=null!=p?p&&i.closest(p):t("
"),A&&A.css("position",i.css("position")),z=function(){var t,o,r;if(!v)return V=e.height(),t=parseInt(C.css("border-top-width"),10),o=parseInt(C.css("padding-top"),10),s=parseInt(C.css("padding-bottom"),10),n=C.offset().top+t+o,l=C.height(),b=0!=A?A.parent()[0].offsetTop:i.parent()[0].offsetTop,x&&(x=!1,w=!1,null==p&&(i.insertAfter(A),A.detach()),i.css({position:"",top:"",width:"",bottom:""}).removeClass(h),r=!0),c=i.offset().top-(parseInt(i.css("margin-top"),10)||0)-d,y=i.outerHeight(!0),m=i.css("float"),A&&A.css({width:u(i),height:y,display:i.css("display"),"vertical-align":i.css("vertical-align"),"float":m}),r?M():void 0},z(),1==k||y!==l)return P=void 0,F=d,T=g,M=function(){var t,s,u,f,k,_;if(!v)return u=!1,null!=T&&(T-=1,0>=T&&(T=g,z(),u=!0)),u||e.height()===V||(z(),u=!0),f=o.scrollTop(),null!=P&&(s=f-P),P=f,x?(r&&(k=f+y+F>l+n,w&&!k&&(w=!1,i.css({position:"fixed",bottom:"",top:F}).trigger("sticky_kit:unbottom"))),c>f&&(x=!1,F=d,null==p&&(("left"===m||"right"===m)&&i.insertAfter(A),A.detach()),t={position:"",width:"",top:""},i.css(t).removeClass(h).trigger("sticky_kit:unstick")),a&&(_=o.height(),y+d>_&&(w||(F-=s,F=Math.max(_-y,F),F=Math.min(d,F),x&&i.css({top:F+"px"}))))):f>c&&(x=!0,t={position:"fixed",top:F},t.width="border-box"===i.css("box-sizing")?i.outerWidth()+"px":i.width()+"px",i.css(t).addClass(h),null==p&&(i.after(A),("left"===m||"right"===m)&&A.append(i)),i.trigger("sticky_kit:stick")),x&&r&&(null==k&&(k=f+y+F>l+n),!w&&k)?(w=!0,i.css({position:"absolute",top:l-y-b}).trigger("sticky_kit:bottom")):void 0},I=function(){return z(),M()},_=function(){return v=!0,o.off("touchmove",M),o.off("scroll",M),o.off("resize",I),t(document.body).off("sticky_kit:recalc",I),i.off("sticky_kit:detach",_),i.removeData("sticky_kit"),i.css({position:"",bottom:"",top:"",width:""}),C.position("position",""),x?(null==p&&(("left"===m||"right"===m)&&i.insertAfter(A),A.remove()),i.removeClass(h)):void 0},o.on("touchmove",M),o.on("scroll",M),o.on("resize",I),t(document.body).on("sticky_kit:recalc",I),i.on("sticky_kit:detach",_),i.data("sticky_kit",!0),setTimeout(M,0)}},l=0,c=this.length;c>l;l++)s=this[l],n(t(s));return this}}).call(this); //# sourceMappingURL=sticky-kit.5a0c90e6428107d0ebeb1959859217d1.js.map