// Generated by CoffeeScript 1.8.0 /** @license Sticky-kit v1.1.1 | WTFPL | Leaf Corcoran 2014 | http://leafo.net */(function(){var t,i;t=this.jQuery||window.jQuery,i=t(window),t.fn.stick_in_parent=function(o){var s,e,n,r,c,l,a,p,f,u,d;for(null==o&&(o={}),p=o.sticky_class,n=o.inner_scrolling,a=o.recalc_every,l=o.parent,c=o.offset_top,r=o.spacer,e=o.bottoming,null==c&&(c=0),null==l&&(l=void 0),null==n&&(n=!0),null==p&&(p="is_stuck"),null==e&&(e=!0),f=function(o,s,f,u,d,h,k,g){var v,m,y,_,b,w,x,C,I,z,A;if(!o.data("sticky_kit")){if(o.data("sticky_kit",!0),w=o.parent(),null!=l&&(w=w.closest(l)),!w.length)throw"failed to find stick parent";if(y=!1,v=!1,z=null!=r?r&&o.closest(r):t("
"),z&&z.css("position",o.css("position")),x=function(){var t,i,e;if(!g)return t=parseInt(w.css("border-top-width"),10),i=parseInt(w.css("padding-top"),10),s=parseInt(w.css("padding-bottom"),10),f=w.offset().top+t+i,u=w.height(),y&&(y=!1,v=!1,null==r&&(o.insertAfter(z),z.detach()),o.css({position:"",top:"",width:"",bottom:""}).removeClass(p),e=!0),d=o.offset().top-(parseInt(o.css("margin-top"),10)||0)-c,h=o.outerHeight(!0),k=o.css("float"),z&&z.css({width:o.outerWidth(!0),height:h,display:o.css("display"),"vertical-align":o.css("vertical-align"),"float":k}),e?A():void 0},x(),h!==u)return _=void 0,b=c,I=a,A=function(){var t,l,m,C,A;if(!g)return null!=I&&(I-=1,0>=I&&(I=a,x())),m=i.scrollTop(),null!=_&&(l=m-_),_=m,y?(e&&(C=m+h+b>u+f,v&&!C&&(v=!1,o.css({position:"fixed",bottom:"",top:b}).trigger("sticky_kit:unbottom"))),d>m&&(y=!1,b=c,null==r&&(("left"===k||"right"===k)&&o.insertAfter(z),z.detach()),t={position:"",width:"",top:""},o.css(t).removeClass(p).trigger("sticky_kit:unstick")),n&&(A=i.height(),h+c>A&&(v||(b-=l,b=Math.max(A-h,b),b=Math.min(c,b),y&&o.css({top:b+"px"}))))):m>d&&(y=!0,t={position:"fixed",top:b},t.width="border-box"===o.css("box-sizing")?o.outerWidth()+"px":o.width()+"px",o.css(t).addClass(p),null==r&&(o.after(z),("left"===k||"right"===k)&&z.append(o)),o.trigger("sticky_kit:stick")),y&&e&&(null==C&&(C=m+h+b>u+f),!v&&C)?(v=!0,"static"===w.css("position")&&w.css({position:"relative"}),o.css({position:"absolute",bottom:s,top:"auto"}).trigger("sticky_kit:bottom")):void 0},C=function(){return x(),A()},m=function(){return g=!0,i.off("touchmove",A),i.off("scroll",A),i.off("resize",C),t(document.body).off("sticky_kit:recalc",C),o.off("sticky_kit:detach",m),o.removeData("sticky_kit"),o.css({position:"",bottom:"",top:"",width:""}),w.position("position",""),y?(null==r&&(("left"===k||"right"===k)&&o.insertAfter(z),z.remove()),o.removeClass(p)):void 0},i.on("touchmove",A),i.on("scroll",A),i.on("resize",C),t(document.body).on("sticky_kit:recalc",C),o.on("sticky_kit:detach",m),setTimeout(A,0)}},u=0,d=this.length;d>u;u++)s=this[u],f(t(s));return this}}).call(this);