(function(){var a,b;a=this.jquery||window.jquery,b=a(window),a.fn.stick_in_parent=function(c){var d,e,f,g,h,i,j,k,l,m,n,o;for(null==c&&(c={}),o=c.sticky_class,i=c.inner_scrolling,n=c.recalc_every,m=c.parent,l=c.offset_top,k=c.spacer,f=c.bottoming,null==l&&(l=0),null==m&&(m=void 0),null==i&&(i=!0),null==o&&(o="is_stuck"),d=a(document),null==f&&(f=!0),g=function(c,e,g,h,j,p,q,r){var s,t,u,v,w,x,y,z,a,b,c,d;if(!c.data("sticky_kit")){if(c.data("sticky_kit",!0),w=d.height(),y=c.parent(),null!=m&&(y=y.closest(m)),!y.length)throw"failed to find stick parent";if(u=!1,s=!1,c=null!=k?k&&c.closest(k):a("
"),c&&c.css("position",c.css("position")),z=function(){var a,b,f;if(!r)return w=d.height(),a=parseint(y.css("border-top-width"),10),b=parseint(y.css("padding-top"),10),e=parseint(y.css("padding-bottom"),10),g=y.offset().top+a+b,h=y.height(),u&&(u=!1,s=!1,null==k&&(c.insertafter(c),c.detach()),c.css({position:"",top:"",width:"",bottom:""}).removeclass(o),f=!0),j=c.offset().top-(parseint(c.css("margin-top"),10)||0)-l,p=c.outerheight(!0),q=c.css("float"),c&&c.css({width:c.outerwidth(!0),height:p,display:c.css("display"),"vertical-align":c.css("vertical-align"),float:q}),f?d():void 0},z(),p!==h)return v=void 0,x=l,b=n,d=function(){var a,m,t,a,d,e;if(!r)return t=!1,null!=b&&(b-=1)<=0&&(b=n,z(),t=!0),t||d.height()===w||(z(),t=!0),a=b.scrolltop(),null!=v&&(m=a-v),v=a,u?(f&&(d=a+p+x>h+g,s&&!d&&(s=!1,c.css({position:"fixed",bottom:"",top:x}).trigger("sticky_kit:unbottom"))),ae&&(s||(x-=m,x=math.max(e-p,x),x=math.min(l,x),u&&c.css({top:x+"px"}))))):a>j&&(u=!0,a={position:"fixed",top:x},a.width="border-box"===c.css("box-sizing")?c.outerwidth()+"px":c.width()+"px",c.css(a).addclass(o),null==k&&(c.after(c),"left"!==q&&"right"!==q||c.append(c)),c.trigger("sticky_kit:stick")),u&&f&&(null==d&&(d=a+p+x>h+g),!s&&d)?(s=!0,"static"===y.css("position")&&y.css({position:"relative"}),c.css({position:"absolute",bottom:e,top:"auto"}).trigger("sticky_kit:bottom")):void 0},a=function(){return z(),d()},t=function(){if(r=!0,b.off("touchmove",d),b.off("scroll",d),b.off("resize",a),a(document.body).off("sticky_kit:recalc",a),c.off("sticky_kit:detach",t),c.removedata("sticky_kit"),c.css({position:"",bottom:"",top:"",width:""}),y.position("position",""),u)return null==k&&("left"!==q&&"right"!==q||c.insertafter(c),c.remove()),c.removeclass(o)},b.on("touchmove",d),b.on("scroll",d),b.on("resize",a),a(document.body).on("sticky_kit:recalc",a),c.on("sticky_kit:detach",t),settimeout(d,0)}},h=0,j=this.length;h