/*! * headroom.js v0.9.3 - give your page some headroom. hide your header until you need it * copyright (c) 2016 nick williams - http://wicky.nillia.ms/headroom.js * license: mit */ !function(a,b){"use strict";"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.headroom=b()}(this,function(){"use strict";function a(a){this.callback=a,this.ticking=!1}function b(a){return a&&"undefined"!=typeof window&&(a===window||a.nodetype)}function c(a){if(arguments.length<=0)throw new error("missing arguments in extend function");var d,e,f=a||{};for(e=1;ea,c=a+this.getscrollerphysicalheight()>this.getscrollerheight();return b||c},toleranceexceeded:function(a,b){return math.abs(a-this.lastknownscrolly)>=this.tolerance[b]},shouldunpin:function(a,b){var c=a>this.lastknownscrolly,d=a>=this.offset;return c&&d&&b},shouldpin:function(a,b){var c=athis.lastknownscrolly?"down":"up",c=this.toleranceexceeded(a,b);this.isoutofbounds(a)||(a<=this.offset?this.top():this.nottop(),a+this.getviewportheight()>=this.getscrollerheight()?this.bottom():this.notbottom(),this.shouldunpin(a,c)?this.unpin():this.shouldpin(a,c)&&this.pin(),this.lastknownscrolly=a)}},e.options={tolerance:{up:0,down:0},offset:0,scroller:window,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",nottop:"headroom--not-top",bottom:"headroom--bottom",notbottom:"headroom--not-bottom",initial:"headroom"}},e.cutsthemustard="undefined"!=typeof f&&f.raf&&f.bind&&f.classlist,e});