(function(window,document){'use strict';var features={bind:!!(function(){}.bind),classList:'classList' in document.documentElement,rAF:!!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)};window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;function Debouncer(callback){this.callback=callback;this.ticking=!1} Debouncer.prototype={constructor:Debouncer,update:function(){this.callback&&this.callback();this.ticking=!1},requestTick:function(){if(!this.ticking){requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this)));this.ticking=!0}},handleEvent:function(){this.requestTick()}};function isDOMElement(obj){return obj&&typeof window!=='undefined'&&(obj===window||obj.nodeType)} function extend(object){if(arguments.length<=0){throw new Error('Missing arguments in extend function')} var result=object||{},key,i;for(i=1;ithis.getScrollerHeight();return pastTop||pastBottom},toleranceExceeded:function(currentScrollY,direction){return Math.abs(currentScrollY-this.lastKnownScrollY)>=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);if(this.isOutOfBounds(currentScrollY)){return} if(currentScrollY<=this.offset){this.top()}else{this.notTop()} if(this.shouldUnpin(currentScrollY,toleranceExceeded)){this.unpin()} else if(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',top:'headroom--top',notTop:'headroom--not-top',initial:'headroom'}};Headroom.cutsTheMustard=typeof features!=='undefined'&&features.rAF&&features.bind&&features.classList;window.Headroom=Headroom}(window,document))