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