!function(a,b,c,d){"use strict";function e(b,c){function d(){e.options.originalVideoW=e.options.$video[0].videoWidth,e.options.originalVideoH=e.options.$video[0].videoHeight,e.initialised||e.init()}var e=this;this.element=b,this.options=a.extend({},g,c),this._defaults=g,this._name=f,this.options.$video=a(b),this.detectBrowser(),this.shimRequestAnimationFrame(),this.options.has3d=this.detect3d(),this.options.$videoWrap.css({position:"relative",overflow:"hidden","z-index":"10"}),this.options.$video.css({position:"absolute","z-index":"1"}),this.options.$video.on("canplay canplaythrough",d),this.options.$video[0].readyState>3&&d()}var f="backgroundVideo",g={$videoWrap:a(".video-wrapper-inner"),$outerWrap:a(b),$window:a(b),minimumVideoWidth:400,preventContextMenu:!1,parallax:!0,parallaxOptions:{effect:1.5},pauseVideoOnViewLoss:!1};e.prototype={init:function(){var a=this;this.initialised=!0,this.lastPosition=-1,this.ticking=!1,this.options.$window.resize(function(){a.positionObject()}),this.options.parallax&&this.options.$window.on("scroll",function(){a.update()}),this.options.pauseVideoOnViewLoss&&this.playPauseVideo(),this.options.preventContextMenu&&this.options.$video.on("contextmenu",function(){return!1}),this.options.$window.trigger("resize")},requestTick:function(){var a=this;this.ticking||(b.requestAnimationFrame(a.positionObject.bind(a)),this.ticking=!0)},update:function(){this.lastPosition=b.pageYOffset,this.requestTick()},detect3d:function(){var a,e,f=c.createElement("p"),g={WebkitTransform:"-webkit-transform",OTransform:"-o-transform",MSTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};c.body.insertBefore(f,c.body.lastChild);for(a in g)f.style[a]!==d&&(f.style[a]="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)",e=b.getComputedStyle(f).getPropertyValue(g[a]));return f.parentNode.removeChild(f),e!==d&&"none"!==e},detectBrowser:function(){var a=navigator.userAgent.toLowerCase();a.indexOf("chrome")>-1||a.indexOf("safari")>-1?(this.options.browser="webkit",this.options.browserPrexix="-webkit-"):a.indexOf("firefox")>-1?(this.options.browser="firefox",this.options.browserPrexix="-moz-"):-1!==a.indexOf("MSIE")||a.indexOf("Trident/")>0?(this.options.browser="ie",this.options.browserPrexix="-ms-"):a.indexOf("Opera")>-1&&(this.options.browser="opera",this.options.browserPrexix="-o-")},scaleObject:function(){var a,b,c;return this.options.$videoWrap.width(this.options.$outerWrap.width()),this.options.$videoWrap.height(this.options.$outerWrap.height()),a=this.options.$window.width()/this.options.originalVideoW,b=this.options.$window.height()/this.options.originalVideoH,c=a>b?a:b,c*this.options.originalVideoW=0?this.calculateYPos(f,c):this.calculateYPos(f,0):-f,a.options.has3d?(this.options.$video.css(a.options.browserPrexix+"transform3d","translate3d(-"+e+"px, "+f+"px, 0)"),this.options.$video.css("transform","translate3d("+e+"px, "+f+"px, 0)")):(this.options.$video.css(a.options.browserPrexix+"transform","translate(-"+e+"px, "+f+"px)"),this.options.$video.css("transform","translate("+e+"px, "+f+"px)")),this.ticking=!1},calculateYPos:function(a,b){var c,d;return c=parseInt(this.options.$videoWrap.offset().top),d=c-b,a=-(d/this.options.parallaxOptions.effect+a)},disableParallax:function(){this.options.$window.unbind(".backgroundVideoParallax")},playPauseVideo:function(){var a=this;this.options.$window.on("scroll.backgroundVideoPlayPause",function(){a.options.$window.scrollTop()1&&void 0!==arguments[1]?arguments[1]:{},n=e.action,i=void 0===n?"start":n,u=e.duration,l=void 0===u?1e3:u,a=e.delay,c=void 0===a?16:a,d=e.lang,f=void 0===d?void 0:d;if("stop"!==i){if(r(t),/[0-9]/.test(t.innerHTML)){var s=o(t.innerHTML,{duration:l||t.getAttribute("data-duration"),lang:f||document.querySelector("html").getAttribute("lang")||void 0,delay:c||t.getAttribute("data-delay")});t._countUpOrigInnerHTML=t.innerHTML,t.innerHTML=s[0],t.style.visibility="visible",t.countUpTimeout=setTimeout(function e(){t.innerHTML=s.shift(),s.length?(clearTimeout(t.countUpTimeout),t.countUpTimeout=setTimeout(e,c)):t._countUpOrigInnerHTML=void 0},c)}}else r(t)};var r=function(t){clearTimeout(t.countUpTimeout),t._countUpOrigInnerHTML&&(t.innerHTML=t._countUpOrigInnerHTML,t._countUpOrigInnerHTML=void 0),t.style.visibility=""},o=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.duration,r=void 0===n?1e3:n,o=e.delay,i=void 0===o?16:o,u=e.lang,l=void 0===u?void 0:u,a=r/i,c=t.toString().split(/(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/),d=[],f=0;f]+>/.test(c[s])){var p=c[s],v=/[0-9]+,[0-9]+/.test(p);p=p.replace(/,/g,"");for(var g=/^[0-9]+\.[0-9]+$/.test(p),y=g?(p.split(".")[1]||[]).length:0,b=d.length-1,m=a;m>=1;m--){var T=parseInt(p/a*m,10);g&&(T=parseFloat(p/a*m).toFixed(y),T=parseFloat(T).toLocaleString(l)),v&&(T=T.toLocaleString(l)),d[b--]+=T}}else for(var M=0;M * Url: http://markgoodyear.com/labs/headhesive * License: MIT */ !function(t,e){"function"==typeof define&&define.amd?define([],function(){return e()}):"object"==typeof exports?module.exports=e():t.Headhesive=e()}(this,function(){"use strict";var t=function(e,s){for(var o in s)s.hasOwnProperty(o)&&(e[o]="object"==typeof s[o]?t(e[o],s[o]):s[o]);return e},e=function(t,e){var s,o,i,n=Date.now||function(){return(new Date).getTime()},l=null,c=0,r=function(){c=n(),l=null,i=t.apply(s,o),s=o=null};return function(){var f=n(),h=e-(f-c);return s=this,o=arguments,0>=h?(clearTimeout(l),l=null,c=f,i=t.apply(s,o),s=o=null):l||(l=setTimeout(r,h)),i}},s=function(){return void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop},o=function(t,e){for(var s=0,o=t.offsetHeight;t;)s+=t.offsetTop,t=t.offsetParent;return"bottom"===e&&(s+=o),s},i=function(e,s){"querySelector"in document&&"addEventListener"in window&&(this.visible=!1,this.options={offset:300,offsetSide:"top",classes:{clone:"headhesive",stick:"headhesive--stick",unstick:"headhesive--unstick"},throttle:250,onInit:function(){},onStick:function(){},onUnstick:function(){},onDestroy:function(){}},this.elem="string"==typeof e?document.querySelector(e):e,this.options=t(this.options,s),this.init())};return i.prototype={constructor:i,init:function(){if(this.clonedElem=this.elem.cloneNode(!0),this.clonedElem.className+=" "+this.options.classes.clone,document.body.insertBefore(this.clonedElem,document.body.firstChild),"number"==typeof this.options.offset)this.scrollOffset=this.options.offset;else{if("string"!=typeof this.options.offset)throw new Error("Invalid offset: "+this.options.offset);this._setScrollOffset()}this._throttleUpdate=e(this.update.bind(this),this.options.throttle),this._throttleScrollOffset=e(this._setScrollOffset.bind(this),this.options.throttle),window.addEventListener("scroll",this._throttleUpdate,!1),window.addEventListener("resize",this._throttleScrollOffset,!1),this.options.onInit.call(this)},_setScrollOffset:function(){"string"==typeof this.options.offset&&(this.scrollOffset=o(document.querySelector(this.options.offset),this.options.offsetSide))},destroy:function(){document.body.removeChild(this.clonedElem),window.removeEventListener("scroll",this._throttleUpdate),window.removeEventListener("resize",this._throttleScrollOffset),this.options.onDestroy.call(this)},stick:function(){this.visible||(this.clonedElem.className=this.clonedElem.className.replace(new RegExp("(^|\\s)*"+this.options.classes.unstick+"(\\s|$)*","g"),""),this.clonedElem.className+=" "+this.options.classes.stick,this.visible=!0,this.options.onStick.call(this))},unstick:function(){this.visible&&(this.clonedElem.className=this.clonedElem.className.replace(new RegExp("(^|\\s)*"+this.options.classes.stick+"(\\s|$)*","g"),""),this.clonedElem.className+=" "+this.options.classes.unstick,this.visible=!1,this.options.onUnstick.call(this))},update:function(){s()>this.scrollOffset?this.stick():this.unstick()}},i}); /*! * imagesLoaded PACKAGED v4.1.4 * JavaScript is all like "You images are done yet or what?" * MIT License */ !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o