1
/*
2
Sticky-kit v1.1.4 | MIT | Leaf Corcoran 2015 | http://leafo.net
3
*/
4
(function(){var d=window.jQuery;var k=d(window);var J=d(document);d.fn.stick_in_parent=function(b){var w;null==b&&(b={}
5
);var u=b.sticky_class;var E=b.inner_scrolling;var K=b.recalc_every;var x=b.parent;var n=b.offset_top;var q=b.spacer;var y=b.bottoming;var F=k.height();var G=J.height();null==n&&(n=0);null==x&&(x=void 0);null==E&&(E=!0);null==u&&(u="is_stuck");null==y&&(y=!0);var M=function(a){if(window.getComputedStyle){a=window.getComputedStyle(a[0]);var b=parseFloat(a.getPropertyValue("width"))+
6
parseFloat(a.getPropertyValue("margin-left"))+parseFloat(a.getPropertyValue("margin-right"));"border-box"!==a.getPropertyValue("box-sizing")&&(b+=parseFloat(a.getPropertyValue("border-left-width"))+parseFloat(a.getPropertyValue("border-right-width"))+parseFloat(a.getPropertyValue("padding-left"))+parseFloat(a.getPropertyValue("padding-right")));return b}
7
return a.outerWidth(!0)}
8
;var N=function(a,b,t,z,A,r,p,H){var l,e;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);var w=G;var g=a.parent();null!=
9
x&&(g=g.closest(x));if(!g.length)throw"failed to find stick parent";var c=0;var v=l=!1;(e=null!=q?q&&a.closest(q):d("<div />"))&&e.css("position",a.css("position"));var B=function(){if(!H){F=k.height();w=G=J.height();var d=parseInt(g.css("border-top-width"),10);var m=parseInt(g.css("padding-top"),10);b=parseInt(g.css("padding-bottom"),10);t=g.offset().top+d+m;z=g.height();if(l){v=l=!1;c=n;null==q&&(a.insertAfter(e),e.detach());a.css({position:"",top:"",width:"",bottom:""}
10
).removeClass(u);var h=!0}
11
A=
12
a.offset().top-(parseInt(a.css("margin-top"),10)||0)-n;r=a.outerHeight(!0);p=a.css("float");e&&e.css({width:M(a),height:r,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":p}
13
);if(h)return f()}
14
}
15
;B();var I=void 0;c=n;var C=K;var f=function(){var d;if(!H&&r!==z){var m=!1;null!=C&&(--C,0>=C&&(C=K,B(),m=!0));m||G===w||B();var h=k.scrollTop();null!=I&&(d=h-I);I=h;if(l){if(y){var f=h+r+c>z+t;v&&!f&&(v=!1,a.css({position:"fixed",bottom:"",top:c}
16
).trigger("sticky_kit:unbottom"))}
17
if(h<
18
A||0===h&&h===A)l=!1,c=n,null==q&&("left"!==p&&"right"!==p||a.insertAfter(e),e.detach()),m={position:"",width:"",top:""}
19
,a.css(m).removeClass(u).trigger("sticky_kit:unstick");E&&r+n>F&&!v&&(c-=d,c=Math.max(F-r,c),c=Math.min(n,c),l&&a.css({top:c+"px"}
20
))}
21
else h>A&&(l=!0,m={position:"fixed",top:c}
22
,m.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(m).addClass(u),null==q&&(a.after(e),"left"!==p&&"right"!==p||e.append(a)),a.trigger("sticky_kit:stick"));if(l&&y&&(null==
23
f&&(f=h+r+c>z+t),!v&&f))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}
24
),a.css({position:"absolute",bottom:b,top:"auto"}
25
).trigger("sticky_kit:bottom")}
26
}
27
;var D=function(){B();return f()}
28
;var L=function(){H=!0;k.off("touchmove",f);k.off("scroll",f);k.off("resize",D);d(document.body).off("sticky_kit:recalc",D);a.off("sticky_kit:detach",L);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""}
29
);g.position("position","");if(l)return null==q&&("left"!==p&&"right"!==
30
p||a.insertAfter(e),e.remove()),a.removeClass(u)}
31
;k.on("touchmove",f);k.on("scroll",f);k.on("resize",D);d(document.body).on("sticky_kit:recalc",D);a.on("sticky_kit:detach",L);return setTimeout(f,0)}
32
}
33
;var t=0;for(w=this.length;t<w;t++)b=this[t],N(d(b));return this}
34
}
35
).call(this);
36
37
(function defineMustache(global,factory){if(typeof exports==="object"&&exports&&typeof exports.nodeName!=="string"){factory(exports)}
38
else if(typeof define==="function"&&define.amd){define(["exports"],factory)}
39
else{global.Mustache={}
40
;factory(global.Mustache)}
...
</html>