text: !function(window,factory){var lazySizes=factory(window,window.document);window.lazySizes=lazySizes,"object"==typeof module&&module.exports&&(module.exports=lazySizes)}(window,function(window,document){"use strict";if(document.getElementsByClassName){var lazySizesConfig,docElem=document.documentElement,Date=window.Date,supportPicture=window.HTMLPictureElement,_addEventListener="addEventListener",_getAttribute="getAttribute",addEventListener=window[_addEventListener],setTimeout=window.setTimeout,requestAnimationFrame=window.requestAnimationFrame||setTimeout,requestIdleCallback=window.requestIdleCallback,regPicture=/^picture$/i,loadEvents=["load","error","lazyincluded","_lazyloaded"],regClassCache={},forEach=Array.prototype.forEach,hasClass=function(ele,cls){return regClassCache[cls]||(regClassCache[cls]=new RegExp("(\\s|^)"+cls+"(\\s|$)")),regClassCache[cls].test(ele[_getAttribute]("class")||"")&&regClassCache[cls]},addClass=function(ele,cls){hasClass(ele,cls)||ele.setAttribute("class",(ele[_getAttribute]("class")||"").trim()+" "+cls)},removeClass=function(ele,cls){var reg;(reg=hasClass(ele,cls))&&ele.setAttribute("class",(ele[_getAttribute]("class")||"").replace(reg," "))},addRemoveLoadEvents=function(dom,fn,add){var action=add?_addEventListener:"removeEventListener";add&&addRemoveLoadEvents(dom,fn),loadEvents.forEach(function(evt){dom[action](evt,fn)})},triggerEvent=function(elem,name,detail,noBubbles,noCancelable){var event=document.createEvent("CustomEvent");return event.initCustomEvent(name,!noBubbles,!noCancelable,detail||{}),elem.dispatchEvent(event),event},updatePolyfill=function(el,full){var polyfill;!supportPicture&&(polyfill=window.picturefill||lazySizesConfig.pf)?polyfill({reevaluate:!0,elements:[el]}):full&&full.src&&(el.src=full.src)},getCSS=function(elem,style){return(getComputedStyle(elem,null)||{})[style]},getWidth=function(elem,parent,width){for(width=width||elem.offsetWidth;width<lazySizesConfig.minSize&&parent&&!elem._lazysizesWidth;)width=parent.offsetWidth,parent=parent.parentNode;return width},rAF=function(){var running,waiting,fns=[],run=function(){var fn;for(running=!0,waiting=!1;fns.length;)fn=fns.shift(),fn[0].apply(fn[1],fn[2]);running=!1},rafBatch=function(fn){running?fn.apply(this,arguments):(fns.push([fn,this,arguments]),waiting||(waiting=!0,(document.hidden?setTimeout:requestAnimationFrame)(run)))};return rafBatch._lsFlush=run,rafBatch}(),rAFIt=function(fn,simple){return simple?function(){rAF(fn)}:function(){var that=this,args=arguments;rAF(function(){fn.apply(that,args)})}},throttle=function(fn){var running,lastTime=0,gDelay=125,RIC_DEFAULT_TIMEOUT=666,rICTimeout=RIC_DEFAULT_TIMEOUT,run=function(){running=!1,lastTime=Date.now(),fn()},idleCallback=requestIdleCallback?function(){requestIdleCallback(run,{timeout:rICTimeout}),rICTimeout!==RIC_DEFAULT_TIMEOUT&&(rICTimeout=RIC_DEFAULT_TIMEOUT)}:rAFIt(function(){setTimeout(run)},!0);return function(isPriority){var delay;(isPriority=isPriority===!0)&&(rICTimeout=44),running||(running=!0,delay=gDelay-(Date.now()-lastTime),delay<0&&(delay=0),isPriority||delay<9&&requestIdleCallback?idleCallback():setTimeout(idleCallback,delay))}},debounce=function(func){var timeout,timestamp,wait=99,run=function(){timeout=null,func()},later=function(){var last=Date.now()-timestamp;last<wait?setTimeout(later,wait-last):(requestIdleCallback||run)(run)};return function(){timestamp=Date.now(),timeout||(timeout=setTimeout(later,wait))}},loader=function(){var lazyloadElems,preloadElems,isCompleted,resetPreloadingTimer,loadMode,started,eLvW,elvH,eLtop,eLleft,eLright,eLbottom,defaultExpand,preloadExpand,hFac,regImg=/^img$/i,regIframe=/^iframe$/i,supportScroll="onscroll"in window&&!/glebot/.test(navigator.userAgent),shrinkExpand=0,currentExpand=0,isLoading=0,lowRuns=-1,resetPreloading=function(e){isLoading--,e&&e.target&&addRemoveLoadEvents(e.target,resetPreloading),(!e||isLoading<0||!e.target)&&(isLoading=0)},isNestedVisible=function(elem,elemExpand){var outerRect,parent=elem,visible="hidden"==getCSS(document.body,"visibility")||"hidden"!=getCSS(elem,"visibility");for(eLtop-=elemExpand,eLbottom+=elemExpand,eLleft-=elemExpand,eLright+=elemExpand;visible&&(parent=parent.offsetParent)&&parent!=document.body&&parent!=docElem;)visible=(getCSS(parent,"opacity")||1)>0,visible&&"visible"!=getCSS(parent,"overflow")&&(outerRect=parent.getBoundingClientRect(),visible=eLright>outerRect.left&&eLleft<outerRect.right&&eLbottom>outerRect.top-1&&eLtop<outerRect.bottom+1);return visible},checkElements=function(){var eLlen,i,rect,autoLoadElem,loadedSomething,elemExpand,elemNegativeExpand,elemExpandVal,beforeExpandVal;if((loadMode=lazySizesConfig.loadMode)&&isLoading<8&&(eLlen=lazyloadElems.length)){i=0,lowRuns++,null==preloadExpand&&("expand"in lazySizesConfig||(lazySizesConfig.expand=docElem.clientHeight>500&&docElem.clientWidth>500?500:370),defaultExpand=lazySizesConfig.expand,preloadExpand=defaultExpand*lazySizesConfig.expFactor),currentExpand<preloadExpand&&isLoading<1&&lowRuns>2&&loadMode>2&&!document.hidden?(currentExpand=preloadExpand,lowRuns=0):currentExpand=loadMode>1&&lowRuns>1&&isLoading<6?defaultExpand:shrinkExpand;for(;i<eLlen;i++)if(lazyloadElems[i]&&!lazyloadElems[i]._lazyRace)if(supportScroll)if((elemExpandVal=lazyloadElems[i][_getAttribute]("data-expand"))&&(elemExpand=1*elemExpandVal)||(elemExpand=currentExpand),beforeExpandVal!==elemExpand&&(eLvW=innerWidth+elemExpand*hFac,elvH=innerHeight+elemExpand,elemNegativeExpand=elemExpand*-1,beforeExpandVal=elemExpand),rect=lazyloadElems[i].getBoundingClientRect(),(eLbottom=rect.bottom)>=elemNegativeExpand&&(eLtop=rect.top)<=elvH&&(eLright=rect.right)>=elemNegativeExpand*hFac&&(eLleft=rect.left)<=eLvW&&(eLbottom||eLright||eLleft||eLtop)&&(isCompleted&&isLoading<3&&!elemExpandVal&&(loadMode<3||lowRuns<4)||isNestedVisible(lazyloadElems[i],elemExpand))){if(unveilElement(lazyloadElems[i]),loadedSomething=!0,isLoading>9)break}else!loadedSomething&&isCompleted&&!autoLoadElem&&isLoading<4&&lowRuns<4&&loadMode>2&&(preloadElems[0]||lazySizesConfig.preloadAfterLoad)&&(preloadElems[0]||!elemExpandVal&&(eLbottom||eLright||eLleft||eLtop||"auto"!=lazyloadElems[i][_getAttribute](lazySizesConfig.sizesAttr)))&&(autoLoadElem=preloadElems[0]||lazyloadElems[i]);else unveilElement(lazyloadElems[i]);autoLoadElem&&!loadedSomething&&unveilElement(autoLoadElem)}},throttledCheckElements=throttle(checkElements),switchLoadingClass=function(e){addClass(e.target,lazySizesConfig.loadedClass),removeClass(e.target,lazySizesConfig.loadingClass),addRemoveLoadEvents(e.target,rafSwitchLoadingClass)},rafedSwitchLoadingClass=rAFIt(switchLoadingClass),rafSwitchLoadingClass=function(e){rafedSwitchLoadingClass({target:e.target})},changeIframeSrc=function(elem,src){try{elem.contentWindow.location.replace(src)}catch(e){elem.src=src}},handleSources=function(source){var customMedia,parent,sourceSrcset=source[_getAttribute](lazySizesConfig.srcsetAttr);(customMedia=lazySizesConfig.customMedia[source[_getAttribute]("data-media")||source[_getAttribute]("media")])&&source.setAttribute("media",customMedia),sourceSrcset&&source.setAttribute("srcset",sourceSrcset),customMedia&&(parent=source.parentNode,parent.insertBefore(source.cloneNode(),source),parent.removeChild(source))},lazyUnveil=rAFIt(function(elem,detail,isAuto,sizes,isImg){var src,srcset,parent,isPicture,event,firesLoad;(event=triggerEvent(elem,"lazybeforeunveil",detail)).defaultPrevented||(sizes&&(isAuto?addClass(elem,lazySizesConfig.autosizesClass):elem.setAttribute("sizes",sizes)),srcset=elem[_getAttribute](lazySizesConfig.srcsetAttr),src=elem[_getAttribute](lazySizesConfig.srcAttr),isImg&&(parent=elem.parentNode,isPicture=parent&&regPicture.test(parent.nodeName||"")),firesLoad=detail.firesLoad||"src"in elem&&(srcset||src||isPicture),event={target:elem},firesLoad&&(addRemoveLoadEvents(elem,resetPreloading,!0),clearTimeout(resetPreloadingTimer),resetPreloadingTimer=setTimeout(resetPreloading,2500),addClass(elem,lazySizesConfig.loadingClass),addRemoveLoadEvents(elem,rafSwitchLoadingClass,!0)),isPicture&&forEach.call(parent.getElementsByTagName("source"),handleSources),srcset?elem.setAttribute("srcset",srcset):src&&!isPicture&&(regIframe.test(elem.nodeName)?changeIframeSrc(elem,src):elem.src=src),(srcset||isPicture)&&updatePolyfill(elem,{src:src})),rAF(function(){elem._lazyRace&&delete elem._lazyRace,removeClass(elem,lazySizesConfig.lazyClass),firesLoad&&!elem.complete||(firesLoad?resetPreloading(event):isLoading--,switchLoadingClass(event))})}),unveilElement=function(elem){var detail,isImg=regImg.test(elem.nodeName),sizes=isImg&&(elem[_getAttribute](lazySizesConfig.sizesAttr)||elem[_getAttribute]("sizes")),isAuto="auto"==sizes;(!isAuto&&isCompleted||!isImg||!elem.src&&!elem.srcset||elem.complete||hasClass(elem,lazySizesConfig.errorClass))&&(detail=triggerEvent(elem,"lazyunveilread").detail,isAuto&&autoSizer.updateElem(elem,!0,elem.offsetWidth),elem._lazyRace=!0,isLoading++,lazyUnveil(elem,detail,isAuto,sizes,isImg))},onload=function(){if(!isCompleted){if(Date.now()-started<999)return void setTimeout(onload,999);var afterScroll=debounce(function(){lazySizesConfig.loadMode=3,throttledCheckElements()});isCompleted=!0,lazySizesConfig.loadMode=3,throttledCheckElements(),addEventListener("scroll",function(){3==lazySizesConfig.loadMode&&(lazySizesConfig.loadMode=2),afterScroll()},!0)}};return{_:function(){started=Date.now(),lazyloadElems=document.getElementsByClassName(lazySizesConfig.lazyClass),preloadElems=document.getElementsByClassName(lazySizesConfig.lazyClass+" "+lazySizesConfig.preloadClass),hFac=lazySizesConfig.hFac,addEventListener("scroll",throttledCheckElements,!0),addEventListener("resize",throttledCheckElements,!0),window.MutationObserver?new MutationObserver(throttledCheckElements).observe(docElem,{childList:!0,subtree:!0,attributes:!0}):(docElem[_addEventListener]("DOMNodeInserted",throttledCheckElements,!0),docElem[_addEventListener]("DOMAttrModified",throttledCheckElements,!0),setInterval(throttledCheckElements,999)),addEventListener("hashchange",throttledCheckElements,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(name){document[_addEventListener](name,throttledCheckElements,!0)}),/d$|^c/.test(document.readyState)?onload():(addEventListener("load",onload),document[_addEventListener]("DOMContentLoaded",throttledCheckElements),setTimeout(onload,2e4)),lazyloadElems.length?checkElements():throttledCheckElements()},checkElems:throttledCheckElements,unveil:unveilElement}}(),autoSizer=function(){var autosizesElems,sizeElement=rAFIt(function(elem,parent,event,width){var sources,i,len;if(elem._lazysizesWidth=width,width+="px",elem.setAttribute("sizes",width),regPicture.test(parent.nodeName||""))for(sources=parent.getElementsByTagName("source"),i=0,len=sources.length;i<len;i++)sources[i].setAttribute("sizes",width);event.detail.dataAttr||updatePolyfill(elem,event.detail)}),getSizeElement=function(elem,dataAttr,width){var event,parent=elem.parentNode;parent&&(width=getWidth(elem,parent,width),event=triggerEvent(elem,"lazybeforesizes",{width:width,dataAttr:!!dataAttr}),event.defaultPrevented||(width=event.detail.width,width&&width!==elem._lazysizesWidth&&sizeElement(elem,parent,event,width)))},updateElementsSizes=function(){var i,len=autosizesElems.length;if(len)for(i=0;i<len;i++)getSizeElement(autosizesElems[i])},debouncedUpdateElementsSizes=debounce(updateElementsSizes);return{_:function(){autosizesElems=document.getElementsByClassName(lazySizesConfig.autosizesClass),addEventListener("resize",debouncedUpdateElementsSizes)},checkElems:debouncedUpdateElementsSizes,updateElem:getSizeElement}}(),init=function(){init.i||(init.i=!0,autoSizer._(),loader._())};return function(){var prop,lazySizesDefaults={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2};lazySizesConfig=window.lazySizesConfig||window.lazysizesConfig||{};for(prop in lazySizesDefaults)prop in lazySizesConfig||(lazySizesConfig[prop]=lazySizesDefaults[prop]);window.lazySizesConfig=lazySizesConfig,setTimeout(function(){lazySizesConfig.init&&init()})}(),{cfg:lazySizesConfig,autoSizer:autoSizer,loader:loader,init:init,uP:updatePolyfill,aC:addClass,rC:removeClass,hC:hasClass,fire:triggerEvent,gW:getWidth,rAF:rAF}}}),function(root,factory){"use strict";"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?module.exports=factory():root.Headroom=factory()}(this,function(){"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<arguments.length;i++){var replacement=arguments[i]||{};for(key in replacement)"object"!=typeof result[key]||isDOMElement(result[key])?result[key]=result[key]||replacement[key]:result[key]=extend(result[key],replacement[key])}return result}function normalizeTolerance(t){return t===Object(t)?t:{down:t,up:t}}function Headroom(elem,options){options=extend(options,Headroom.options),this.lastKnownScrollY=0,this.elem=elem,this.tolerance=normalizeTolerance(options.tolerance),this.classes=options.classes,this.offset=options.offset,this.scroller=options.scroller,this.initialised=!1,this.onPin=options.onPin,this.onUnpin=options.onUnpin,this.onTop=options.onTop,this.onNotTop=options.onNotTop,this.onBottom=options.onBottom,this.onNotBottom=options.onNotBottom}var features={bind:!!function(){}.bind,classList:"classList"in document.documentElement,rAF:!!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)};return window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,Debouncer.prototype={constructor:Debouncer,update:function(){this.callback&&this.callback(),this.ticking=!1},requestTick:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)},handleEvent:function(){this.requestTick()}},Headroom.prototype={constructor:Headroom,init:function(){if(Headroom.cutsTheMustard)return this.debouncer=new Debouncer(this.update.bind(this)),this.elem.classList.add(this.classes.initial),setTimeout(this.attachEvent.bind(this),100),this},destroy:function(){var classes=this.classes;this.initialised=!1,this.elem.classList.remove(classes.unpinned,classes.pinned,classes.top,classes.notTop,classes.initial),this.scroller.removeEventListener("scroll",this.debouncer,!1)},attachEvent:function(){this.initialised||(this.lastKnownScrollY=this.getScrollY(),this.initialised=!0,this.scroller.addEventListener("scroll",this.debouncer,!1),this.debouncer.handleEvent())},unpin:function(){var classList=this.elem.classList,classes=this.classes;!classList.contains(classes.pinned)&&classList.contains(classes.unpinned)||(classList.add(classes.unpinned),classList.remove(classes.pinned),this.onUnpin&&this.onUnpin.call(this))},pin:function(){var classList=this.elem.classList,classes=this.classes;classList.contains(classes.unpinned)&&(classList.remove(classes.unpinned),classList.add(classes.pinned),this.onPin&&this.onPin.call(this))},top:function(){var classList=this.elem.classList,classes=this.classes;classList.contains(classes.top)||(classList.add(classes.top),classList.remove(classes.notTop),this.onTop&&this.onTop.call(this))},notTop:function(){var classList=this.elem.classList,classes=this.classes;classList.contains(classes.notTop)||(classList.add(classes.notTop),classList.remove(classes.top),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){var classList=this.elem.classList,classes=this.classes;classList.contains(classes.bottom)||(classList.add(classes.bottom),classList.remove(classes.notBottom),this.onBottom&&this.onBottom.call(this))},notBottom:function(){var classList=this.elem.classList,classes=this.classes;classList.contains(classes.notBottom)||(classList.add(classes.notBottom),classList.remove(classes.bottom),this.onNotBottom&&this.onNotBottom.call(this))},getScrollY:function(){return void 0!==this.scroller.pageYOffset?this.scroller.pageYOffset:void 0!==this.scroller.scrollTop?this.scroller.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop},getViewportHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},getElementPhysicalHeight:function(elm){return Math.max(elm.offsetHeight,elm.clientHeight)},getScrollerPhysicalHeight:function(){return this.scroller===window||this.scroller===document.body?this.getViewportHeight():this.getElementPhysicalHeight(this.scroller)},getDocumentHeight:function(){var body=document.body,documentElement=document.documentElement;return Math.max(body.scrollHeight,documentElement.scrollHeight,body.offsetHeight,documentElement.offsetHeight,body.clientHeight,documentElement.clientHeight)},getElementHeight:function(elm){return Math.max(elm.scrollHeight,elm.offsetHeight,elm.clientHeight)},getScrollerHeight:function(){return this.scroller===window||this.scroller===document.body?this.getDocumentHeight():this.getElementHeight(this.scroller)},isOutOfBounds:function(currentScrollY){var pastTop=currentScrollY<0,pastBottom=currentScrollY+this.getScrollerPhysicalHeight()>this.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=currentScrollY<this.lastKnownScrollY,pastOffset=currentScrollY<=this.offset;return scrollingUp&&toleranceExceeded||pastOffset},update:function(){var currentScrollY=this.getScrollY(),scrollDirection=currentScrollY>this.lastKnownScrollY?"down":"up",toleranceExceeded=this.toleranceExceeded(currentScrollY,scrollDirection);this.isOutOfBounds(currentScrollY)||(currentScrollY<=this.offset?this.top():this.notTop(),currentScrollY+this.getViewportHeight()>=this.getScrollerHeight()?this.bottom():this.notBottom(),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",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},Headroom.cutsTheMustard="undefined"!=typeof features&&features.rAF&&features.bind&&features.classList,Headroom}),!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;e<arguments.length;e++){var g=arguments[e]||{};for(d in g)"object"!=typeof f[d]||b(f[d])?f[d]=f[d]||g[d]:f[d]=c(f[d],g[d])}return f}function d(a){return a===Object(a)?a:{down:a,up:a}}function e(a,b){b=c(b,e.options),this.lastKnownScrollY=0,this.elem=a,this.tolerance=d(b.tolerance),this.classes=b.classes,this.offset=b.offset,this.scroller=b.scroller,this.initialised=!1,this.onPin=b.onPin,this.onUnpin=b.onUnpin,this.onTop=b.onTop,this.onNotTop=b.onNotTop,this.onBottom=b.onBottom,this.onNotBottom=b.onNotBottom}var f={bind:!!function(){}.bind,classList:"classList"in document.documentElement,rAF:!!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)};return window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,a.prototype={constructor:a,update:function(){this.callback&&this.callback(),this.ticking=!1},requestTick:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)},handleEvent:function(){this.requestTick()}},e.prototype={constructor:e,init:function(){return e.cutsTheMustard?(this.debouncer=new a(this.update.bind(this)),this.elem.classList.add(this.classes.initial),setTimeout(this.attachEvent.bind(this),100),this):void 0},destroy:function(){var a=this.classes;this.initialised=!1,this.elem.classList.remove(a.unpinned,a.pinned,a.top,a.notTop,a.initial),this.scroller.removeEventListener("scroll",this.debouncer,!1)},attachEvent:function(){this.initialised||(this.lastKnownScrollY=this.getScrollY(),this.initialised=!0,this.scroller.addEventListener("scroll",this.debouncer,!1),this.debouncer.handleEvent())},unpin:function(){var a=this.elem.classList,b=this.classes;!a.contains(b.pinned)&&a.contains(b.unpinned)||(a.add(b.unpinned),a.remove(b.pinned),this.onUnpin&&this.onUnpin.call(this))},pin:function(){var a=this.elem.classList,b=this.classes;a.contains(b.unpinned)&&(a.remove(b.unpinned),a.add(b.pinned),this.onPin&&this.onPin.call(this))},top:function(){var a=this.elem.classList,b=this.classes;a.contains(b.top)||(a.add(b.top),a.remove(b.notTop),this.onTop&&this.onTop.call(this))},notTop:function(){var a=this.elem.classList,b=this.classes;a.contains(b.notTop)||(a.add(b.notTop),a.remove(b.top),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){var a=this.elem.classList,b=this.classes;a.contains(b.bottom)||(a.add(b.bottom),a.remove(b.notBottom),this.onBottom&&this.onBottom.call(this))},notBottom:function(){var a=this.elem.classList,b=this.classes;a.contains(b.notBottom)||(a.add(b.notBottom),a.remove(b.bottom),this.onNotBottom&&this.onNotBottom.call(this))},getScrollY:function(){return void 0!==this.scroller.pageYOffset?this.scroller.pageYOffset:void 0!==this.scroller.scrollTop?this.scroller.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop},getViewportHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},getElementPhysicalHeight:function(a){return Math.max(a.offsetHeight,a.clientHeight)},getScrollerPhysicalHeight:function(){return this.scroller===window||this.scroller===document.body?this.getViewportHeight():this.getElementPhysicalHeight(this.scroller)},getDocumentHeight:function(){var a=document.body,b=document.documentElement;return Math.max(a.scrollHeight,b.scrollHeight,a.offsetHeight,b.offsetHeight,a.clientHeight,b.clientHeight)},getElementHeight:function(a){return Math.max(a.scrollHeight,a.offsetHeight,a.clientHeight)},getScrollerHeight:function(){return this.scroller===window||this.scroller===document.body?this.getDocumentHeight():this.getElementHeight(this.scroller)},isOutOfBounds:function(a){var b=0>a,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=a<this.lastKnownScrollY,d=a<=this.offset;return c&&b||d},update:function(){var a=this.getScrollY(),b=a>this.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}),function($){$&&($.fn.headroom=function(option){return this.each(function(){var $this=$(this),data=$this.data("headroom"),options="object"==typeof option&&option;options=$.extend(!0,{},Headroom.options,options),data||(data=new Headroom(this,options),data.init(),$this.data("headroom",data)),"string"==typeof option&&(data[option](),"destroy"===option&&$this.removeData("headroom"))})},$("[data-headroom]").each(function(){var $this=$(this);$this.headroom($this.data())}))}(window.Zepto||window.jQuery),!function(a){a&&(a.fn.headroom=function(b){return this.each(function(){var c=a(this),d=c.data("headroom"),e="object"==typeof b&&b;e=a.extend(!0,{},Headroom.options,e),d||(d=new Headroom(this,e),d.init(),c.data("headroom",d)),"string"==typeof b&&(d[b](),"destroy"===b&&c.removeData("headroom"))})},a("[data-headroom]").each(function(){var b=a(this);b.headroom(b.data())}))}(window.Zepto||window.jQuery),function(angular,Headroom){function headroom(HeadroomService){return{scope:{tolerance:"=",offset:"=",classes:"=",scroller:"@"},link:function($scope,$element){var options={},opts=HeadroomService.options;for(var prop in opts)options[prop]=$scope[prop]||opts[prop];$scope.scroller&&(options.scroller=document.querySelector($scope.scroller));var headroom=new HeadroomService($element[0],options).init();$scope.$on("$destroy",function(){headroom.destroy()})}}}function HeadroomService(){return Headroom}angular&&(headroom.$inject=["HeadroomService"],angular.module("headroom",[]).directive("headroom",headroom).factory("HeadroomService",HeadroomService))}(window.angular,window.Headroom),!function(a,b){function c(a){return{scope:{tolerance:"=",offset:"=",classes:"=",scroller:"@"},link:function(b,c){var d={},e=a.options;for(var f in e)d[f]=b[f]||e[f];b.scroller&&(d.scroller=document.querySelector(b.scroller));var g=new a(c[0],d).init();b.$on("$destroy",function(){g.destroy()})}}}function d(){return b}a&&(c.$inject=["HeadroomService"],a.module("headroom",[]).directive("headroom",c).factory("HeadroomService",d))}(window.angular,window.Headroom);
  //# sourceMappingURL=library.min.js.map
  