/*! * headroom.js v0.6.0 - give your page some headroom. hide your header until you need it * copyright (c) 2014 nick williams - http://wicky.nillia.ms/headroom.js * license: mit */ !function(a,b){"use strict";function c(a){this.callback=a,this.ticking=!1}function d(a){if(arguments.length<=0)throw new error("missing arguments in extend function");var b,c,e=a||{};for(c=1;ca,c=a+this.getviewportheight()>this.getdocumentheight();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(),this.shouldunpin(a,c)?this.unpin():this.shouldpin(a,c)&&this.pin(),this.lastknownscrolly=a)}},f.options={tolerance:{up:0,down:0},offset:0,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",nottop:"headroom--not-top",initial:"headroom"}},f.cutsthemustard="undefined"!=typeof g&&g.raf&&g.bind&&g.classlist,a.headroom=f}(window,document);