!function(window,document){"use strict";function Debouncer(callback){this.callback=callback,this.ticking=!1}function isDOMElement(obj){return obj&&"undefined"!=typeof window&&(obj===window||obj.nodeType)}function extend(object){if(arguments.length<=0)throw new Error("Missing arguments in extend function");var key,i,result=object||{};for(i=1;i=this.tolerance[direction]},shouldUnpin:function(currentScrollY,toleranceExceeded){var scrollingDown=currentScrollY>this.lastKnownScrollY,pastOffset=currentScrollY>=this.offset;return scrollingDown&&pastOffset&&toleranceExceeded},shouldPin:function(currentScrollY,toleranceExceeded){var scrollingUp=currentScrollYthis.lastKnownScrollY?"down":"up",toleranceExceeded=this.toleranceExceeded(currentScrollY,scrollDirection);currentScrollY<0||(this.shouldUnpin(currentScrollY,toleranceExceeded)?this.unpin():this.shouldPin(currentScrollY,toleranceExceeded)&&this.pin(),this.lastKnownScrollY=currentScrollY)}},Headroom.options={tolerance:{up:0,down:0},offset:0,scroller:window,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",initial:"headroom"}},window.Headroom=Headroom}(window,document);