/*! * headroom.js v0.7.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(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=false;} Debouncer.prototype={constructor:Debouncer,update:function(){this.callback&&this.callback();this.ticking=false;},requestTick:function(){if(!this.ticking){requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this)));this.ticking=true;}},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));$(document).ready(function(){var $ralewayHeader=$("#header-raleway");if(!$ralewayHeader.length||$ralewayHeader.data('headroom')==='disabled'){return;};var $ralewayHeaderDropDown=$ralewayHeader.find('.dropdown');Site.ralewayHeaderHeadroom=new Headroom($ralewayHeader.get(0),{tolerance:{down:10,up:20},offset:$ralewayHeader.innerHeight(),classes:{initial:"p-slide",pinned:"p-slide-reset",unpinned:"p-slide-up",top:"p-slide-top",notTop:"p-slide-not-top"},onUnpin:function(){$ralewayHeaderDropDown.removeClass('open');}}).init();});;