(function(){function e(){}function t(e,t){for(var i=e.length;i--;)if(e[i].listener===t)return i;return-1}function i(e){return function(){return this[e].apply(this,arguments)}}var n=e.prototype,o=this,a=o.EventEmitter;n.getListeners=function(e){var t,i,n=this._getEvents();if("object"==typeof e){t={};for(i in n)n.hasOwnProperty(i)&&e.test(i)&&(t[i]=n[i])}else t=n[e]||(n[e]=[]);return t},n.flattenListeners=function(e){var t,i=[];for(t=0;e.length>t;t+=1)i.push(e[t].listener);return i},n.getListenersAsObject=function(e){var t,i=this.getListeners(e);return i instanceof Array&&(t={},t[e]=i),t||i},n.addListener=function(e,i){var n,o=this.getListenersAsObject(e),a="object"==typeof i;for(n in o)o.hasOwnProperty(n)&&-1===t(o[n],i)&&o[n].push(a?i:{listener:i,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(e){return this.getListeners(e),this},n.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},n.removeListener=function(e,i){var n,o,a=this.getListenersAsObject(e);for(o in a)a.hasOwnProperty(o)&&-1!==(n=t(a[o],i))&&a[o].splice(n,1);return this},n.off=i("removeListener"),n.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},n.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},n.manipulateListeners=function(e,t,i){var n,o,a=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(n=i.length;n--;)a.call(this,t,i[n]);else for(n in t)t.hasOwnProperty(n)&&(o=t[n])&&("function"==typeof o?a.call(this,n,o):s.call(this,n,o));return this},n.removeEvent=function(e){var t,i=typeof e,n=this._getEvents();if("string"===i)delete n[e];else if("object"===i)for(t in n)n.hasOwnProperty(t)&&e.test(t)&&delete n[t];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(e,t){var i,n,o,a=this.getListenersAsObject(e);for(o in a)if(a.hasOwnProperty(o))for(n=a[o].length;n--;)i=a[o][n],!0===i.once&&this.removeListener(e,i.listener),i.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},n.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return o.EventEmitter=a,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var i=e.event;return i.target=i.target||i.srcElement||t,i}var i=document.documentElement,n=function(){};i.addEventListener?n=function(e,t,i){e.addEventListener(t,i,!1)}:i.attachEvent&&(n=function(e,i,n){e[i+n]=n.handleEvent?function(){var i=t(e);n.handleEvent.call(n,i)}:function(){var i=t(e);n.call(e,i)},e.attachEvent("on"+i,e[i+n])});var o=function(){};i.removeEventListener?o=function(e,t,i){e.removeEventListener(t,i,!1)}:i.detachEvent&&(o=function(e,t,i){e.detachEvent("on"+t,e[t+i]);try{delete e[t+i]}catch(n){e[t+i]=void 0}});var a={bind:n,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",a):e.eventie=a}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(i,n){return t(e,i,n)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,i){function n(e,t){for(var i in t)e[i]=t[i];return e}function o(e){return"[object Array]"===h.call(e)}function a(e){var t=[];if(o(e))t=e;else if("number"==typeof e.length)for(var i=0,n=e.length;n>i;i++)t.push(e[i]);else t.push(e);return t}function s(e,t,i){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=a(e),this.options=n({},this.options),"function"==typeof t?i=t:n(this.options,t),i&&this.on("always",i),this.getImages(),c&&(this.jqDeferred=new c.Deferred);var o=this;setTimeout(function(){o.check()})}function r(e){this.img=e}function l(e){this.src=e,f[e]=this}var c=e.jQuery,d=e.console,u=void 0!==d,h=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var i=this.elements[e];"IMG"===i.nodeName&&this.addImage(i);var n=i.nodeType;if(n&&(1===n||9===n||11===n))for(var o=i.querySelectorAll("img"),a=0,s=o.length;s>a;a++){var r=o[a];this.addImage(r)}}},s.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},s.prototype.check=function(){function e(e,o){return t.options.debug&&u&&d.log("confirm",e,o),t.progress(e),i++,i===n&&t.complete(),!0}var t=this,i=0,n=this.images.length;if(this.hasAnyBroken=!1,!n)return void this.complete();for(var o=0;n>o;o++){var a=this.images[o];a.on("confirm",e),a.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var i=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[i](t)}})},c&&(c.fn.imagesLoaded=function(e,t){return new s(this,e,t).jqDeferred.promise(c(this))}),r.prototype=new t,r.prototype.check=function(){var e=f[this.img.src]||new l(this.img.src);if(e.isConfirmed)return void this.confirm(e.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var t=this;e.on("confirm",function(e,i){return t.confirm(e.isLoaded,i),!0}),e.check()},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var f={};return l.prototype=new t,l.prototype.check=function(){if(!this.isChecked){var e=new Image;i.bind(e,"load",this),i.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},l.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},l.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},l.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},l.prototype.unbindProxyEvents=function(e){i.unbind(e.target,"load",this),i.unbind(e.target,"error",this)},s}),function(e){e.easing.jswing=e.easing.swing,e.extend(e.easing,{def:"easeOutQuad",swing:function(t,i,n,o,a){return e.easing[e.easing.def](t,i,n,o,a)},easeInQuad:function(e,t,i,n,o){return n*(t/=o)*t+i},easeOutQuad:function(e,t,i,n,o){return-n*(t/=o)*(t-2)+i},easeInOutQuad:function(e,t,i,n,o){return 1>(t/=o/2)?n/2*t*t+i:-n/2*(--t*(t-2)-1)+i},easeInCubic:function(e,t,i,n,o){return n*(t/=o)*t*t+i},easeOutCubic:function(e,t,i,n,o){return n*((t=t/o-1)*t*t+1)+i},easeInOutCubic:function(e,t,i,n,o){return 1>(t/=o/2)?n/2*t*t*t+i:n/2*((t-=2)*t*t+2)+i},easeInQuart:function(e,t,i,n,o){return n*(t/=o)*t*t*t+i},easeOutQuart:function(e,t,i,n,o){return-n*((t=t/o-1)*t*t*t-1)+i},easeInOutQuart:function(e,t,i,n,o){return 1>(t/=o/2)?n/2*t*t*t*t+i:-n/2*((t-=2)*t*t*t-2)+i},easeInQuint:function(e,t,i,n,o){return n*(t/=o)*t*t*t*t+i},easeOutQuint:function(e,t,i,n,o){return n*((t=t/o-1)*t*t*t*t+1)+i},easeInOutQuint:function(e,t,i,n,o){return 1>(t/=o/2)?n/2*t*t*t*t*t+i:n/2*((t-=2)*t*t*t*t+2)+i},easeInSine:function(e,t,i,n,o){return-n*Math.cos(t/o*(Math.PI/2))+n+i},easeOutSine:function(e,t,i,n,o){return n*Math.sin(t/o*(Math.PI/2))+i},easeInOutSine:function(e,t,i,n,o){return-n/2*(Math.cos(Math.PI*t/o)-1)+i},easeInExpo:function(e,t,i,n,o){return 0==t?i:n*Math.pow(2,10*(t/o-1))+i},easeOutExpo:function(e,t,i,n,o){return t==o?i+n:n*(1-Math.pow(2,-10*t/o))+i},easeInOutExpo:function(e,t,i,n,o){return 0==t?i:t==o?i+n:1>(t/=o/2)?n/2*Math.pow(2,10*(t-1))+i:n/2*(2-Math.pow(2,-10*--t))+i},easeInCirc:function(e,t,i,n,o){return-n*(Math.sqrt(1-(t/=o)*t)-1)+i},easeOutCirc:function(e,t,i,n,o){return n*Math.sqrt(1-(t=t/o-1)*t)+i},easeInOutCirc:function(e,t,i,n,o){return 1>(t/=o/2)?-n/2*(Math.sqrt(1-t*t)-1)+i:n/2*(Math.sqrt(1-(t-=2)*t)+1)+i},easeInElastic:function(e,t,i,n,o){e=1.70158;var a=0,s=n;return 0==t?i:1==(t/=o)?i+n:(a||(a=.3*o),s<Math.abs(n)?(s=n,e=a/4):e=a/(2*Math.PI)*Math.asin(n/s),-s*Math.pow(2,10*--t)*Math.sin(2*(t*o-e)*Math.PI/a)+i)},easeOutElastic:function(e,t,i,n,o){e=1.70158;var a=0,s=n;return 0==t?i:1==(t/=o)?i+n:(a||(a=.3*o),s<Math.abs(n)?(s=n,e=a/4):e=a/(2*Math.PI)*Math.asin(n/s),s*Math.pow(2,-10*t)*Math.sin(2*(t*o-e)*Math.PI/a)+n+i)},easeInOutElastic:function(e,t,i,n,o){e=1.70158;var a=0,s=n;return 0==t?i:2==(t/=o/2)?i+n:(a||(a=.3*o*1.5),s<Math.abs(n)?(s=n,e=a/4):e=a/(2*Math.PI)*Math.asin(n/s),1>t?-.5*s*Math.pow(2,10*--t)*Math.sin(2*(t*o-e)*Math.PI/a)+i:s*Math.pow(2,-10*--t)*Math.sin(2*(t*o-e)*Math.PI/a)*.5+n+i)},easeInBack:function(e,t,i,n,o,a){return void 0==a&&(a=1.70158),n*(t/=o)*t*((a+1)*t-a)+i},easeOutBack:function(e,t,i,n,o,a){return void 0==a&&(a=1.70158),n*((t=t/o-1)*t*((a+1)*t+a)+1)+i},easeInOutBack:function(e,t,i,n,o,a){return void 0==a&&(a=1.70158),1>(t/=o/2)?n/2*t*t*((1+(a*=1.525))*t-a)+i:n/2*((t-=2)*t*((1+(a*=1.525))*t+a)+2)+i},easeInBounce:function(t,i,n,o,a){return o-e.easing.easeOutBounce(t,a-i,0,o,a)+n},easeOutBounce:function(e,t,i,n,o){return(t/=o)<1/2.75?7.5625*n*t*t+i:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+i:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+i:n*(7.5625*(t-=2.625/2.75)*t+.984375)+i},easeInOutBounce:function(t,i,n,o,a){return i<a/2?.5*e.easing.easeInBounce(t,2*i,0,o,a)+n:.5*e.easing.easeOutBounce(t,2*i-a,0,o,a)+.5*o+n}})}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,r=l.call(arguments,1),c=0,u=0,h=0,f=0,p=0,m=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(h=-1*s.detail),"wheelDelta"in s&&(h=s.wheelDelta),"wheelDeltaY"in s&&(h=s.wheelDeltaY),"wheelDeltaX"in s&&(u=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=-1*h,h=0),c=0===h?u:h,"deltaY"in s&&(h=-1*s.deltaY,c=h),"deltaX"in s&&(u=s.deltaX,0===h&&(c=-1*u)),0!==h||0!==u){if(1===s.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,h*=g,u*=g}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,h*=v,u*=v}if(f=Math.max(Math.abs(h),Math.abs(u)),(!a||a>f)&&(a=f,n(s,f)&&(a/=40)),n(s,f)&&(c/=40,u/=40,h/=40),c=Math[c>=1?"floor":"ceil"](c/a),u=Math[u>=1?"floor":"ceil"](u/a),h=Math[h>=1?"floor":"ceil"](h/a),d.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();p=t.clientX-y.left,m=t.clientY-y.top}return t.deltaX=u,t.deltaY=h,t.deltaFactor=a,t.offsetX=p,t.offsetY=m,t.deltaMode=0,r.unshift(t,c,u,h),o&&clearTimeout(o),o=setTimeout(i,200),(e.event.dispatch||e.event.handle).apply(this,r)}}function i(){a=null}function n(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var o,a,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var d=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=r.length;i;)this.addEventListener(r[--i],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",d.getLineHeight(this)),e.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=r.length;i;)this.removeEventListener(r[--i],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),n=i["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];if(null!=o)for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])}return i},writable:!0,configurable:!0}),"function"!=typeof Array.from&&(Array.from=function(e){return[].slice.call(e)});var buildElement=function(e){var t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)[0]},triggerEvent=function(e,t){var i=document.createEvent("HTMLEvents");i.initEvent(t,!0,!1),e.dispatchEvent(i)},PinchZoom=function(e,t){this.el=e,this.zoomFactor=1,this.lastScale=1,this.offset={x:0,y:0},this.options=Object.assign({},this.defaults,t),this.setupMarkup(),this.bindEvents(),this.update(),this.enable()},sum=function(e,t){return e+t},isCloseTo=function(e,t){return e>t-.01&&e<t+.01};PinchZoom.prototype={defaults:{tapZoomFactor:2,zoomOutFactor:1.3,animationDuration:300,maxZoom:4,minZoom:.5,lockDragAxis:!1,use2d:!0,zoomStartEventName:"pz_zoomstart",zoomEndEventName:"pz_zoomend",dragStartEventName:"pz_dragstart",dragEndEventName:"pz_dragend",doubleTapEventName:"pz_doubletap"},handleDragStart:function(e){triggerEvent(this.el,this.options.dragStartEventName),this.stopAnimation(),this.lastDragPosition=!1,this.hasInteraction=!0,this.handleDrag(e)},handleDrag:function(e){if(this.zoomFactor>1){var t=this.getTouches(e)[0];this.drag(t,this.lastDragPosition),this.offset=this.sanitizeOffset(this.offset),this.lastDragPosition=t}},handleDragEnd:function(){triggerEvent(this.el,this.options.dragEndEventName),this.end()},handleZoomStart:function(e){triggerEvent(this.el,this.options.zoomStartEventName),this.stopAnimation(),this.lastScale=1,this.nthZoom=0,this.lastZoomCenter=!1,this.hasInteraction=!0},handleZoom:function(e,t){var i=this.getTouchCenter(this.getTouches(e)),n=t/this.lastScale;this.lastScale=t,this.nthZoom+=1,this.nthZoom>3&&(this.scale(n,i),this.drag(i,this.lastZoomCenter)),this.lastZoomCenter=i},handleZoomEnd:function(){triggerEvent(this.el,this.options.zoomEndEventName),this.end()},handleDoubleTap:function(e){var t=this.getTouches(e)[0],i=this.zoomFactor>1?1:this.options.tapZoomFactor,n=this.zoomFactor,o=function(e){this.scaleTo(n+e*(i-n),t)}.bind(this);this.hasInteraction||(n>i&&(t=this.getCurrentZoomCenter()),this.animate(this.options.animationDuration,o,this.swing),triggerEvent(this.el,this.options.doubleTapEventName))},sanitizeOffset:function(e){var t=(this.zoomFactor-1)*this.getContainerX(),i=(this.zoomFactor-1)*this.getContainerY(),n=Math.max(t,0),o=Math.max(i,0),a=Math.min(t,0),s=Math.min(i,0);return{x:Math.min(Math.max(e.x,a),n),y:Math.min(Math.max(e.y,s),o)}},scaleTo:function(e,t){this.scale(e/this.zoomFactor,t)},scale:function(e,t){e=this.scaleZoomFactor(e),this.addOffset({x:(e-1)*(t.x+this.offset.x),y:(e-1)*(t.y+this.offset.y)})},scaleZoomFactor:function(e){var t=this.zoomFactor;return this.zoomFactor*=e,this.zoomFactor=Math.min(this.options.maxZoom,Math.max(this.zoomFactor,this.options.minZoom)),this.zoomFactor/t},drag:function(e,t){t&&(this.options.lockDragAxis?Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?this.addOffset({x:-(e.x-t.x),y:0}):this.addOffset({y:-(e.y-t.y),x:0}):this.addOffset({y:-(e.y-t.y),x:-(e.x-t.x)}))},getTouchCenter:function(e){return this.getVectorAvg(e)},getVectorAvg:function(e){return{x:e.map(function(e){return e.x}).reduce(sum)/e.length,y:e.map(function(e){return e.y}).reduce(sum)/e.length}},addOffset:function(e){this.offset={x:this.offset.x+e.x,y:this.offset.y+e.y}},sanitize:function(){this.zoomFactor<this.options.zoomOutFactor?this.zoomOutAnimation():this.isInsaneOffset(this.offset)&&this.sanitizeOffsetAnimation()},isInsaneOffset:function(e){var t=this.sanitizeOffset(e);return t.x!==e.x||t.y!==e.y},sanitizeOffsetAnimation:function(){var e=this.sanitizeOffset(this.offset),t=this.offset.x,i=this.offset.y,n=function(n){this.offset.x=t+n*(e.x-t),this.offset.y=i+n*(e.y-i),this.update()}.bind(this);this.animate(this.options.animationDuration,n,this.swing)},zoomOutAnimation:function(){var e=this.zoomFactor,t=this.getCurrentZoomCenter(),i=function(i){this.scaleTo(e+i*(1-e),t)}.bind(this);this.animate(this.options.animationDuration,i,this.swing)},updateAspectRatio:function(){this.setContainerY(this.getContainerX()/this.getAspectRatio())},getInitialZoomFactor:function(){return this.container.offsetWidth/this.el.offsetWidth},getAspectRatio:function(){return this.el.offsetWidth/this.el.offsetHeight},getCurrentZoomCenter:function(){var e=this.container.offsetWidth*this.zoomFactor,t=this.offset.x,i=e-t-this.container.offsetWidth,n=t/i,o=n*this.container.offsetWidth/(n+1),a=this.container.offsetHeight*this.zoomFactor,s=this.offset.y,r=a-s-this.container.offsetHeight,l=s/r,c=l*this.container.offsetHeight/(l+1);return 0===i&&(o=this.container.offsetWidth),0===r&&(c=this.container.offsetHeight),{x:o,y:c}},canDrag:function(){return!isCloseTo(this.zoomFactor,1)},getTouches:function(e){var t=this.container.getBoundingClientRect(),i=t.top+document.body.scrollTop,n=t.left+document.body.scrollLeft;return Array.prototype.slice.call(e.touches).map(function(e){return{x:e.pageX-n,y:e.pageY-i}})},animate:function(e,t,i,n){var o=(new Date).getTime(),a=function(){if(this.inAnimation){var s=(new Date).getTime()-o,r=s/e;s>=e?(t(1),n&&n(),this.update(),this.stopAnimation(),this.update()):(i&&(r=i(r)),t(r),this.update(),requestAnimationFrame(a))}}.bind(this);this.inAnimation=!0,requestAnimationFrame(a)},stopAnimation:function(){this.inAnimation=!1},swing:function(e){return-Math.cos(e*Math.PI)/2+.5},getContainerX:function(){return this.container.offsetWidth},getContainerY:function(){return this.container.offsetHeight},setContainerY:function(e){return this.container.style.height=e+"px"},setupMarkup:function(){this.container=buildElement('<div class="pinch-zoom-container"></div>'),this.el.parentNode.insertBefore(this.container,this.el),this.container.appendChild(this.el),this.container.style.overflow="hidden",this.container.style.position="relative",this.el.style.webkitTransformOrigin="0% 0%",this.el.style.mozTransformOrigin="0% 0%",this.el.style.msTransformOrigin="0% 0%",this.el.style.oTransformOrigin="0% 0%",this.el.style.transformOrigin="0% 0%",this.el.style.position="absolute"},end:function(){this.hasInteraction=!1,this.sanitize(),this.update()},bindEvents:function(){var e=this;detectGestures(this.container,this),window.addEventListener("resize",this.update.bind(this)),Array.from(this.el.querySelectorAll("img")).forEach(function(t){t.addEventListener("load",e.update.bind(e))}),"IMG"===this.el.nodeName&&this.el.addEventListener("load",this.update.bind(this))},update:function(){this.updatePlaned||(this.updatePlaned=!0,window.setTimeout(function(){this.updatePlaned=!1,this.updateAspectRatio();var e=this.getInitialZoomFactor()*this.zoomFactor,t=-this.offset.x/e,i=-this.offset.y/e,n="scale3d("+e+", "+e+",1) translate3d("+t+"px,"+i+"px,0px)",o="scale("+e+", "+e+") translate("+t+"px,"+i+"px)",a=function(){this.clone&&(this.clone.parentNode.removeChild(this.clone),delete this.clone)}.bind(this);!this.options.use2d||this.hasInteraction||this.inAnimation?(this.is3d=!0,a(),this.el.style.webkitTransform=n,this.el.style.mozTransform=o,this.el.style.msTransform=o,this.el.style.oTransform=o,this.el.style.transform=n):(this.is3d&&(this.clone=this.el.cloneNode(!0),this.clone.style.pointerEvents="none",this.container.appendChild(this.clone),window.setTimeout(a,200)),this.el.style.webkitTransform=o,this.el.style.mozTransform=o,this.el.style.msTransform=o,this.el.style.oTransform=o,this.el.style.transform=o,this.is3d=!1)}.bind(this),0))},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1}};var detectGestures=function(e,t){var i=null,n=0,o=null,a=null,s=function(e,n){if(i!==e){if(i&&!e)switch(i){case"zoom":t.handleZoomEnd(n);break;case"drag":t.handleDragEnd(n)}switch(e){case"zoom":t.handleZoomStart(n);break;case"drag":t.handleDragStart(n)}}i=e},r=function(e){2===n?s("zoom"):1===n&&t.canDrag()?s("drag",e):s(null,e)},l=function(e){return Array.from(e).map(function(e){return{x:e.pageX,y:e.pageY}})},c=function(e,t){var i,n;return i=e.x-t.x,n=e.y-t.y,Math.sqrt(i*i+n*n)},d=function(e){e.stopPropagation(),e.preventDefault()},u=!0;e.addEventListener("touchstart",function(e){t.enabled&&(u=!0,(n=e.touches.length)>1&&d(e),function(e){var a=(new Date).getTime();if(n>1&&(o=null),a-o<300)switch(setTimeout(function(){d(e)}),t.handleDoubleTap(e),i){case"zoom":t.handleZoomEnd(e);break;case"drag":t.handleDragEnd(e)}1===n&&(o=a)}(e))}),e.addEventListener("touchmove",function(e){if(t.enabled){if(u)r(e),i&&d(e),a=l(e.touches);else{switch(i){case"zoom":t.handleZoom(e,function(e,t){var i=c(e[0],e[1]);return c(t[0],t[1])/i}(a,l(e.touches)));break;case"drag":t.handleDrag(e)}i&&(d(e),t.update())}u=!1}}),e.addEventListener("touchend",function(e){t.enabled&&(n=e.touches.length,r(e))})};NodeList.prototype.forEach=Array.prototype.forEach,function(){var Masonry=function(gridElement,options){this.el=gridElement,this.el.masonry=this,this.options=options||{},this.childSelector=this.el.getAttribute("data-child-selector")||"",this.children=this.childSelector?this.el.querySelectorAll(this.childSelector):this.el.children,this.filterSelector="",this.filteredSelection=[],this.filterButtonsWrapper=this.el.getAttribute("data-filter")||"",this.originalTransition="transform .3s ease, opacity .3s ease",this.currentTransition=this.originalTransition,this.css3=!0,this.columns=parseInt(this.el.getAttribute("data-columns"))||3,this.gutter=parseInt(this.el.getAttribute("data-gutter"))||0,this.space=this.el.offsetWidth==document.body.clientWidth?"around":"between",this.cellRatio=eval(this.el.getAttribute("data-cell-ratio"))||5/4,this.mobileWidth=parseInt(this.el.getAttribute("data-mobile-width"))||768,this.colMinWidth=parseInt(this.el.getAttribute("data-col-min-width"))||350,this.init()};Masonry.prototype.init=function(){function e(){t.currentTransition="0s",cancelAnimationFrame(i),i=requestAnimationFrame(t.update.bind(t))}var t=this;this.el.style.position="relative",this.el.style.overflow="hidden",imagesLoaded(t.el,t.update.bind(t)),this.filterButtonsWrapper&&this.initFilterButtons();var i;window.addEventListener("resize",e);var n=document.createElement("iframe");n.id="resizeListener",n.style.cssText="position:absolute;pointerEvents:none;opacity:0;height:0;border:0;width:100%;",n.onload=function(){n.contentWindow.addEventListener("resize",e)},document.body.appendChild(n)},Masonry.prototype.update=function(){this.gw=this.el.offsetWidth;var e=window.innerWidth>this.mobileWidth?this.columns:1;if(!this.options.gridMode){var t=Math.floor(this.gw/this.colMinWidth)||1;e=Math.min(t,e)}for(this.arr=[];e>0;e--)this.arr.push(0);this.gutterSum=(this.arr.length+("around"==this.space?1:-1))*this.gutter,this.iw=(this.gw-this.gutterSum)/this.arr.length;for(var i=0;i<this.children.length;i++){var n=this.children[i],o=this.arr,a=1;if(n.style.position="absolute",n.style.transition=this.currentTransition,this.filteredSelection.length&&-1===[].indexOf.call(this.filteredSelection,n))n.style.opacity=0,n.style.pointerEvents="none",n.style.transform="translate3d(0, 0, 0)";else{if(this.options.gridMode){a=parseInt(n.getAttribute("data-w"))||1;var s=parseInt(n.getAttribute("data-h"))||1;if(n.classList.contains("wide")&&(a=2),n.classList.contains("tall")&&(s=2),a>this.arr.length&&(a=this.arr.length),a>1){o=[];for(var r=0;r<=this.arr.length-a;r++){for(var l=[],c=r;c<r+a;c++)l.push(this.arr[c]);o.push(Math.max.apply(null,l))}}}var d=Math.min.apply(null,o),u=o.indexOf(d),h=u*this.iw+(u+("around"==this.space?1:0))*this.gutter,f=d||"around"==this.space?d+this.gutter:d;for(n.style.width=a*this.iw+(a-1)*this.gutter+"px",this.options.gridMode&&(n.style.height=s*this.iw/this.cellRatio+(s-1)*this.gutter+"px"),n.style.opacity=1,n.style.pointerEvents="auto",this.css3?n.style.transform="translate3d("+h+"px, "+f+"px, 0)":(n.style.left=h+"px",n.style.top=f+"px"),r=u;r<u+a;r++)this.arr[r]=f+parseInt(n.getBoundingClientRect().height)}}this.el.style.height=Math.max.apply(null,this.arr)+("around"==this.space?this.gutter:0)+"px"},Masonry.prototype.filter=function(e){this.filterSelector=e,this.filteredSelection=e&&e.length>1?this.el.querySelectorAll(e):[],this.currentTransition=this.originalTransition,this.update()},Masonry.prototype.initFilterButtons=function(){var e=this,t=document.querySelector(e.filterButtonsWrapper);t&&t.querySelectorAll("[data-filter]").forEach(function(t){var i=t.getAttribute("data-filter");t.addEventListener("click",function(t){t.preventDefault(),e.filter(i)})})},document.querySelectorAll(".grid").forEach(function(e){new Masonry(e,{gridMode:!0})}),document.querySelectorAll(".masonry").forEach(function(e){new Masonry(e)})}(),function(e){var t=function(t,i){var n=this;this.data=[],this.galleries=document.querySelectorAll(t),this.defaults={thumbnails:!1,thumbnailsPinned:!1,idle:5e3,fullscreen:!0,zoom:!0,counter:!0,childSelector:".lightbox-link",singleSelector:".lightbox-link-single"},void 0!==i&&(n.defaults=e.extend({},n.defaults,i)),this.isTouch=window.innerWidth<1025;var o=document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled;this.galleries.forEach(function(t,i){var a=e.extend({},n.defaults,e(t).data());o||(a.fullscreen=!1);var s=[];t.querySelectorAll(a.childSelector).forEach(function(e,t){s.push({src:e.href,title:e.getAttribute("data-title")||e.getAttribute("title"),thumb:e.getAttribute("data-thumbnail")}),e.addEventListener("click",function(e){e.preventDefault(),n.init(i,t,a)})}),n.data.push(s)}),document.querySelectorAll(n.defaults.singleSelector).forEach(function(e){var t=n.data.length,i=n.defaults;i.thumbnails=!1,e.addEventListener("click",function(e){e.preventDefault(),n.init(t,0,i)}),n.data.push([{src:e.href,title:e.getAttribute("data-title")||e.getAttribute("title")}])})};t.prototype.init=function(t,i,n){var o=this,a=this.data[t],s=a.length;this.firstSlide=!0,this.agaWrapper=e('<div class="aga-wrapper animating">'),this.container=e('<div class="swiper-container">'),this.wrapper=e('<div class="swiper-wrapper">'),this.caption=e('<div class="aga-caption">'),this.bottomBar=e('<div class="aga-bottombar">'),this.topBar=e('<div class="aga-topbar">'),this.counter=e('<div class="aga-counter">'),this.zoomBtn=e('<div class="aga-zoom aga-btn">'),this.fullscreenBtn=e('<div class="aga-fullscreen aga-btn">'),this.closeBtn=e('<div class="aga-close aga-btn">'),a.forEach(function(t,n){var a='<img data-src="'+t.src+'" alt="" class="'+(n==i?"first":"")+'">';t.src.match(/\.(jpe?g|png|gif)$/)||(t.src.indexOf("youtube.com/")>-1?a='<iframe data-src="'+t.src.replace("watch?v=","embed/")+(n==i?"?autoplay=1":"")+'" frameborder="0" allowfullscreen></iframe>':t.src.indexOf("vimeo.com/")>-1?a='<iframe data-src="https://player.vimeo.com/video/'+t.src.split(".com/")[1]+"?title=0&byline=0&portrait=0&transparent=0"+(n==i?"&autoplay=1":"")+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>':t.src.match(/\.(mp4|webm)$/)&&(a='<video data-src="'+t.src+'" preload="false" controls '+(n==i?"autoplay":"")+"></video>")),o.wrapper.append(e('<div class="swiper-slide loading">').append(e('<div class="slide-media">').append(a)))}),n.customClass&&o.agaWrapper.addClass(n.customClass),e("body").addClass("aga-wrapper-active"),e("body").append(o.agaWrapper.append(o.topBar.append(n.counter&&s>1&&o.counter,o.closeBtn,n.fullscreen&&o.fullscreenBtn,n.zoom&&!o.isTouch&&o.zoomBtn),o.container.append(o.wrapper),o.bottomBar.append(o.caption))),setTimeout(function(){o.agaWrapper.removeClass("animating")},10),s>1&&o.container.append('<div class="aga-prev swiper-no-swiping"></div><div class="aga-next swiper-no-swiping"></div>');var r={initialSlide:i,spaceBetween:10,keyboard:!0,navigation:{nextEl:".aga-next",prevEl:".aga-prev"},on:{}};if(r.on.slideChangeTransitionStart=function(){if(o.counter.html("<span>"+(this.activeIndex+1)+"</span> / "+s),o.caption.html(a[this.activeIndex].title),n.thumbnails&&(l.find(".swiper-slide").removeClass("active").eq(this.activeIndex).addClass("active"),l[0].swiper.slideTo(this.activeIndex)),n.zoom)if(o.isTouch){var t=e(o.container[0].swiper.slides[o.container[0].swiper.previousIndex]).find(".slide-media");t.length&&o.resetMobileZoom(t)}else o.zoomOut();var i=e(".swiper-slide-active:not(.loaded)");if(i.length){var r=i.find("[data-src]");r.length&&(r.on("load",function(){i.removeClass("loading").addClass("loaded"),o.preload(),n.zoom&&!o.isTouch&&o.zoomableCheck()}),r.attr("src",r.attr("data-src")).removeAttr("data-src"),"VIDEO"==r[0].tagName&&r.trigger("load"))}else o.preload(),n.zoom&&!o.isTouch&&o.zoomableCheck()},r.on.init=r.on.slideChangeTransitionStart,n.thumbnails){o.agaWrapper.addClass("has-thumbnails");var l=e('<div class="aga-thumbnails swiper-container">'),c=e('<div class="aga-thumbnails-btn">Thumbnails <i></i></div>'),d=e('<div class="swiper-wrapper">');a.forEach(function(t){var i=t.thumb||"";d.append(e('<div class="swiper-slide">').append(e('<div class="aga-thumb" style="background-image: url('+i+')">')))}),o.bottomBar.append(c,l.append(d));var u=new Swiper(l[0],{initialSlide:i,slidesPerView:"auto",freeMode:!0,spaceBetween:1,slideToClickedSlide:!0,simulateTouch:!0,centeredSlides:!0,mousewheel:!0});l.on("click",".swiper-slide",function(){h.slideTo(e(this).index())}),c.on("click",function(){o.agaWrapper.toggleClass("has-thumbnails-pinned")}),n.thumbnailsPinned&&setTimeout(function(){o.agaWrapper.addClass("has-thumbnails-pinned")},500)}n.zoom&&(o.isTouch?o.wrapper.find("img").each(function(){var t=e(this).closest(".slide-media"),i=new PinchZoom(t[0],{});t[0].pz=i,e(window).on("resize.agaMobileZoom",function(){o.resetMobileZoom(t)})}):(o.zoomBtn.on("click",o.toggleZoom.bind(o)),o.wrapper.on("click","img",function(e){o.agaWrapper.hasClass("has-zoomable-img")&&o.toggleZoom.call(o,e)})));var h=new Swiper(o.container[0],r);n.thumbnails&&(h.params.control=u),o.wrapper.add(o.closeBtn).on("click",o.close.bind(o)),e(document).on("keyup.agalb",function(e){27==e.keyCode&&o.close.call(o)}),o.wrapper.on("click",".slide-media > *",function(e){e.stopPropagation()}),!o.isTouch&&n.idle&&o.idle(n.idle),o.isTouch&&o.wrapper.on("click","img",function(e){o.agaWrapper.toggleClass("aga-idle")}),n.fullscreen&&o.fullscreenBtn.on("click",o.toggleFullscreen.bind(o)),n.zoom&&!o.isTouch&&e(window).on("resize.agalb",o.zoomableCheck.bind(o))},t.prototype.preload=function(){e(".swiper-slide-next:not(.loaded) [data-src], .swiper-slide-prev:not(.loaded) [data-src]").each(function(){var t=e(this);t.on("load",function(){t.removeAttr("data-src").closest(".swiper-slide").removeClass("loading").addClass("loaded")}),t.attr("src",t.attr("data-src")),"VIDEO"==t[0].tagName&&t.trigger("load")}),this.firstSlide=!1},t.prototype.zoomableCheck=function(){var e=this.agaWrapper.find(".swiper-slide-active .slide-media img"),t=e.length&&(e[0].naturalWidth>this.container.width()||e[0].naturalHeight>this.container.height()),i=this.agaWrapper[0].classList;t?i.add("has-zoomable-img"):i.remove("has-zoomable-img")},t.prototype.zoomIn=function(t){var i=e(this.container[0].swiper.slides[this.container[0].swiper.activeIndex]),n=i.find(".slide-media"),o=i.find("img");e(window).on("resize.agaZoom",this.zoomOut.bind(this)),i.addClass("is-zoomed"),o.addClass("swiper-no-swiping zoomed"),this.agaWrapper.addClass("has-zoomed-img");var a=o[0].naturalWidth/o.width();o.css("transform","scale("+a+")");var s=this.container.width()/2+this.container.offset().left,r=this.container.height()/2+this.container.offset().top,l=(o[0].naturalWidth-this.container.width())/this.container.width();l<0&&(l=0);var c=(o[0].naturalHeight-this.container.height())/this.container.height();if(c<0&&(c=0),e(document).on("mousemove.agaZoom",function(e){var t=(s-e.pageX)*l,i=(r-e.pageY)*c;n.css({transform:"translate3d("+t+"px, "+i+"px, 0)"})}),t){var d=e.Event("mousemove");d.pageX=t.pageX,d.pageY=t.pageY,n.addClass("transition"),setTimeout(function(){n.removeClass("transition")},200),e(document).trigger(d)}},t.prototype.zoomOut=function(){var t=this.container.find(".swiper-slide.is-zoomed");if(t.length){var i=t.find(".slide-media"),n=t.find("img");i.addClass("transition"),setTimeout(function(){i.removeClass("transition")},200),i.removeAttr("style"),n.removeAttr("style").one("transitionend",function(){n.removeClass("swiper-no-swiping zoomed").off(".agaZoom")}),e(window).off(".agaZoom"),e(document).off(".agaZoom"),this.agaWrapper.removeClass("has-zoomed-img"),t.removeClass("is-zoomed")}},t.prototype.toggleZoom=function(t){e(".swiper-slide-active img").hasClass("zoomed")?this.zoomOut.call(this):this.zoomIn.call(this,t)},t.prototype.resetMobileZoom=function(e){var t=e[0].pz;t&&(t.zoomFactor=1,t.offset={x:0,y:0},t.update())},t.prototype.idle=function(t){function i(){clearTimeout(n.idleTimeout),n.agaWrapper.removeClass("aga-idle"),n.idleTimeout=setTimeout(function(){n.agaWrapper.addClass("aga-idle")},t)}var n=this;n.idleTimeout=null,e(document).on("mousemove.agalb keydown.agalb touchstart.agalb click.agalb wheel.agalb",i),i()},t.prototype.isFullscreen=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},t.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),this.agaWrapper.removeClass("fullscreen")},t.prototype.requestFullscreen=function(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen(),this.agaWrapper.addClass("fullscreen")},t.prototype.toggleFullscreen=function(){this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()},t.prototype.close=function(){var t=this;t.agaWrapper.addClass("animating").one("transitionend",function(){t.agaWrapper.remove(),t.isFullscreen()&&t.exitFullscreen()}),e("body").removeClass("aga-wrapper-active"),e(window).off(".agaMobileZoom .agalb .agaZoom"),e(document).off(".agalb .agaZoom"),clearTimeout(t.idleTimeout)},new t(".lightbox")}(jQuery),function($){function initMaps(){$(".google-map").each(function(){var e=$(this);e.addClass("ready");var t=e.data("latitude")||51.5255069,i=e.data("longitude")||-.0836207,n=e.data("zoom")||14,o=e.data("marker")||"img/map-marker.png",a=e.find(".map-pin"),s={center:new google.maps.LatLng(t,i),zoom:n,panControl:!1,zoomControl:!0,mapTypeControl:!1,streetViewControl:!1,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:!1,styles:[{featureType:"landscape",stylers:[{saturation:-100},{lightness:65},{visibility:"on"}]},{featureType:"poi",stylers:[{saturation:-100},{lightness:51},{visibility:"simplified"}]},{featureType:"road.highway",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"road.arterial",stylers:[{saturation:-100},{lightness:30},{visibility:"on"}]},{featureType:"road.local",stylers:[{saturation:-100},{lightness:40},{visibility:"on"}]},{featureType:"transit",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"administrative.province",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"on"},{lightness:-25},{saturation:-100}]},{featureType:"water",elementType:"geometry",stylers:[{hue:"#ffff00"},{lightness:-25},{saturation:-97}]}]},r=new google.maps.Map(e[0],s);"none"!=o&&new google.maps.Marker({position:new google.maps.LatLng(t,i),map:r,visible:!0,icon:o}),a.each(function(){var e=$(this),n=e.data("latitude")||t,o=e.data("longitude")||i,a=e.data("marker")||"img/map-marker.png";new google.maps.Marker({position:new google.maps.LatLng(n,o),map:r,visible:!0,icon:a})})})}$.fn.elData=function(e,t){var i=this.data(e);return void 0!=i&&""!=this.attr("data-"+e)?i:t},window.raf=function(e,t){var i;window.addEventListener(e,function(){cancelAnimationFrame(i),i=requestAnimationFrame(t)}),window.addEventListener("load",t)},window.ScrollListener=function(e,t){this.el=e,this.defaults={offsetTop:0,offsetBottom:0,once:!0},this.options=this.defaults;for(var i in t)this.options[i]=t[i];this.options.onDisappear&&(this.options.once=!1),this.isVisible=!1,this.scrollFn=this.listen.bind(this),this.raf=null,window.addEventListener("scroll",this.scrollFn),this.listen()},ScrollListener.prototype.listen=function(){var e=this;cancelAnimationFrame(this.raf),this.raf=requestAnimationFrame(function(){var t=e.el.getBoundingClientRect();t.top<window.innerHeight-e.options.offsetBottom&&t.bottom>e.options.offsetTop?(e.options.once&&window.removeEventListener("scroll",e.scrollFn),e.options.onAppear&&e.options.onAppear.call(e.el),e.isVisible=!0):e.options.onDisappear&&e.isVisible&&(e.options.onDisappear&&e.options.onDisappear.call(e.el),e.isVisible=!1)})},function(){if(document.body.classList.contains("sticky-header")){var e=window.pageYOffset;raf("scroll",function(){var t=e>150&&e+window.innerHeight<document.body.scrollHeight-150,i=window.pageYOffset>e;t?i?(document.body.classList.add("scrolling-down"),e=window.pageYOffset):e-window.pageYOffset>30&&(document.body.classList.remove("scrolling-down"),e=window.pageYOffset):(document.body.classList.remove("scrolling-down"),e=window.pageYOffset)})}}(),document.querySelectorAll("[data-background], [data-poster]").forEach(function(e){var t=e.getAttribute("data-background")||e.getAttribute("data-poster");t&&(t.match("^rgb")||t.match("^#")?e.style.backgroundColor=t:e.classList.contains("lazy-load")?new ScrollListener(e,{onAppear:function(){this.style.backgroundImage="url("+t+")"},offsetTop:-200,offsetBottom:-200}):e.style.backgroundImage="url("+t+")")}),document.querySelectorAll("[data-overlay]").forEach(function(e){var t=e.getAttribute("data-overlay"),i=t&&t.split(";")[0]||"#000",n=t&&t.split(";")[1]||.5,o=document.createElement("div");o.classList.add("content-overlay"),o.style.backgroundColor=i,o.style.opacity=n,e.insertBefore(o,e.firstChild)}),document.querySelectorAll(".background-parallax").forEach(function(e){new Parallax(e)}),window.Appear={init:function(){document.querySelectorAll("[data-animation]").forEach(function(e){$(e).closest(".swiper-slide").length||(e.style.animation=e.getAttribute("data-animation")+" both",isNaN(parseInt(e.style.animationDuration))&&(e.style.animationDuration="1s"),e.style.opacity=0,new ScrollListener(e,{onAppear:function(){this.removeAttribute("data-animation"),this.classList.add("animated")},offsetTop:100,offsetBottom:100}))})}},document.querySelectorAll(".reveal-sections-wrapper").forEach(function(e){e.querySelectorAll(".reveal-section").forEach(function(e,t){if(0!=t){var i=e.querySelector(".reveal-section-inner");raf("scroll",function(){var t=e.getBoundingClientRect().top;t<window.innerHeight&&t>0?(e.classList.add("is-fixed"),i.style.opacity=1-t/window.innerHeight):(e.classList.remove("is-fixed"),i.style.opacity=1)})}})}),$(".thumbnail-video").each(function(){var e,t,i=$(this),n=i.attr("data-src");n.indexOf("youtube.com/")>-1?(t=n.split("watch?v=")[1],e='<iframe src="https://www.youtube.com/embed/'+t+'?autoplay=1" frameborder="0" allowfullscreen></iframe>'):n.indexOf("vimeo.com/")>-1?(t=n.split(".com/")[1],e='<iframe src="https://player.vimeo.com/video/'+t+'?autoplay=1&title=0&byline=0&portrait=0&transparent=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'):e='<video src="'+n+'" autoplay controls></video>',i.one("click",function(){i.append(e),setTimeout(function(){i.addClass("has-started")},50)})}),$(".video-background").each(function(){var self=$(this);if(!(window.innerWidth<1025)){var volume=self.elData("volume",5);self.elData("muted",!1)&&(volume=0);var loop=self.elData("loop",!0)?1:0,autoplay=self.elData("autoplay",!1)&&!self.closest(".swiper-slide").length,controls=["play","progress","current-time","mute","volume","captions","fullscreen"];self.elData("controls",!1)||(controls=[]),self.elData("play-icon",!0)&&controls.push("play-large");var src=self.attr("data-src"),type="";src&&(src.indexOf("youtube.com/")>-1?type="youtube":src.indexOf("vimeo.com/")>-1&&(type="vimeo"),type?(self.attr("data-type",type),self.attr("data-video-id",src)):self[0].src=src);var player=plyr.setup(self[0],{controls:controls,loop:loop,hideControls:!0});self[0].videoPlayer=player[0],player[0]&&player[0].on("ready",function(){function makeVideoCover(){var e=wrapper.width()/wrapper.height(),t=vr>e?vr/e:e/vr;video.css({transform:"translate3d(-50%, -50%, 0) scale("+t+")"})}var wrapper=$(player[0].getContainer());wrapper.addClass("video-bg-wrapper"),wrapper.find(".plyr__controls").addClass("noswipe"),player[0].setVolume(volume),autoplay&&player[0].play(),loop&&player[0].on("ended",function(){player[0].play()});var poster=self.attr("data-poster");if(poster&&(wrapper.addClass("has-poster"),wrapper.css("background-image","url("+poster+")")),player[0].on("play",function(){wrapper.addClass("has-started")}).on("ended",function(){wrapper.removeClass("has-started")}),!self.hasClass("fit")){var video=$(player[0].getMedia()),vr=eval(self.elData("video-ratio",16/9));window.raf("resize",makeVideoCover),setTimeout(makeVideoCover,1500)}})}}),$(".swiper").each(function(){var e=$(this),t=e.elData("loop",!1)&&!e.find(".video-background").length;e.addClass("swiper-container"),e.wrapInner('<div class="swiper-wrapper">'),e.elData("nav",!1)&&e.append('<div class="swiper-prev noswipe"></div><div class="swiper-next noswipe"></div>'),e.elData("pagination",!1)&&e.append('<div class="swiper-pagination noswipe">'),e.elData("scrollbar",!1)&&e.append('<div class="swiper-scrollbar">');var i={speed:600,autoplay:!1,loop:t,loopedSlides:$(".swiper-slide",e).length,effect:"slide",direction:"horizontal",slidesPerView:1,spaceBetween:0,centeredSlides:!1,freeMode:!1,parallax:!1,slideToClickedSlide:!0,controlBy:"container",grabCursor:!0,keyboard:!1,mousewheel:!1,simulateTouch:!0,noSwipingClass:"noswipe",on:{}};$.extend(i,e.data()),i.navigation={nextEl:e.find(".swiper-next")[0],prevEl:e.find(".swiper-prev")[0]},i.pagination={el:e.find(".swiper-pagination")[0],clickable:!0},i.scrollbar={el:e.find(".swiper-scrollbar")[0],draggable:!0,hide:!1,snapOnRelease:!0},e.data("autoplay")&&(i.autoplay={delay:e.data("autoplay"),disableOnInteraction:!0,stopOnLast:!1});var n=void 0!=i.spaceTablet?i.spaceTablet:i.spaceBetween,o=void 0!=i.spaceMobile?i.spaceMobile:n;i.breakpoints={768:{slidesPerView:i.slidesMobile||i.slidesTablet||i.slidesPerView,spaceBetween:o},1024:{slidesPerView:i.slidesTablet||i.slidesPerView,spaceBetween:n}},e.find(".video-background").length&&(i.on.slideChangeTransitionStart=function(){var t=e.find(".plyr--playing");t.length&&t.find(".video-background")[0].videoPlayer.pause()},i.on.slideChangeTransitionEnd=function(){var t=e.find('.swiper-slide-active .plyr .video-background[data-autoplay="true"]');t.length&&t[0].videoPlayer.play()},i.on.init=i.on.slideChangeTransitionEnd),e.find(".lightbox-link:not(.overlay)").each(function(){this.classList.add("noswipe")}),$(window).on("load",function(){"auto"==i.slidesPerView&&navigator.userAgent.indexOf("Chrome")>-1&&e.hide().show(0),new Swiper(e[0],i)})}),$(window).on("load",function(){$(".swiper[data-sync]").each(function(){var e=$(this),t=e[0].swiper,i=e.data("sync"),n=$('.swiper[data-swiper-name="'+i+'"]');i&&n.length&&(t.controller.control=n[0].swiper)})}),$(".justified").each(function(){function e(){t.removeWhitespace().collagePlus({targetHeight:i,effect:"effect-2",allowPartialLastRow:!0})}var t=$(this),i=t.data("target-height")||400,n=t.data("gutter")||0;t.css({padding:n+"px "+n+"px 0",position:"relative",overflow:"hidden"}),t.imagesLoaded(e);var o=null;$(window).on("resize",function(){$(".justified a").css("opacity",0),o&&clearTimeout(o),o=setTimeout(e,200)})}),$("[data-scroll-to]").click(function(e){e.preventDefault();var t,i=$(this).attr("data-scroll-to"),n=parseInt($(this).attr("data-scroll-speed"))||1e3;if(isNaN(parseInt(i))){var o=parseInt(i.split(",")[1])||0;t=$(i).offset().top+o}else t=parseInt(i);$("html, body").animate({scrollTop:t},n,"easeInOutExpo")}),$(".mail-form").submit(function(e){e.preventDefault();var t=$(this);if(t[0].checkValidity()){var i={items:{}};t.data("mailto")&&(i.mailto=t.data("mailto")),t.data("subject")&&(i.subject=t.data("subject"));var n=[];t.find("[name]").each(function(){var e=$(this).attr("name");if(!(n.indexOf(e)>-1)){var t=$(this).val();null!==t&&void 0!==t&&""!==t&&("radio"==$(this).attr("type")&&(t=$("[name="+e+"]:checked").val()),"checkbox"==$(this).attr("type")&&(t=$(this).prop("checked")?"Yes":"No"),"object"==typeof t&&(t=t.join("; ")),i.items[e]=t,["name","email","subject"].indexOf(e)>-1&&(i[e]=t),n.push(e))}}),$.ajax({type:"POST",url:t.attr("action"),data:i,success:function(e){$(".mail-form-message").removeClass("d-none").html(e).slideDown(500),-1==e.indexOf("error")&&t.find("[name]:not([type=radio])").val("")},error:function(){$(".mail-form-message").removeClass("d-none").html('<p class="error">Something went wrong, try again!</p>').slideDown("slow")}})}else $(".mail-form-message").html('<p class="error">Please fill out required fields!</p>').slideDown("slow")});var gmaps_api_key=$(".google-map[data-api-key]:first").data("api-key");gmaps_api_key&&$("body").append('<script src="https://maps.googleapis.com/maps/api/js?key='+gmaps_api_key+'&callback=initMaps"><\/script>')}(jQuery);var fadeLink='a:not([target="_blank"]):not([href^="#"]):not([class*="no-redirect"]):not([class*="lightbox-link"])';window.onpageshow=function(e){e.persisted&&window.location.reload()},jQuery(window).on("load",function(e){var t=jQuery("body");t.addClass("page-loaded"),t.on("click",fadeLink,function(e){var i=this.href;jQuery("#preloader").one("transitionend webkitTransitionEnd oTransitionEnd",function(){window.location=i}),t.removeClass("page-loaded")})}),window.addEventListener("load",function(){Appear.init()}),jQuery(function(e){document.querySelectorAll(".parallax-folio-item figcaption").forEach(function(e){new ScrollListener(e,{onAppear:function(){this.classList.add("visible")},offsetBottom:200,offsetTop:200})}),e(".mob-menu").click(function(t){t.preventDefault(),e(".mob-menu").toggleClass("active"),e(".navigation").slideToggle()}),e("#header").on("click","a",function(t){if(!(window.innerWidth>1024)){var i=e(this).next("ul, .mega-menu");i.length&&(t.preventDefault(),i.slideToggle())}});var t=document.querySelector(".scroll-down");t&&(t.addEventListener("click",function(t){t.preventDefault();var i=window.innerHeight;e("html, body").animate({scrollTop:i},1e3,"easeInOutExpo")}),raf("scroll",function(){window.pageYOffset?t.classList.add("scrolled"):t.classList.remove("scrolled")})),document.querySelectorAll(".hover-list-links").forEach(function(e){document.body.classList.add("has-hover-list"),e.querySelectorAll(".item").forEach(function(e,t){e.addEventListener("mouseenter",function(){document.body.classList.add("hover-item-active","hover-links-active"),document.querySelector(".hover-list-media").swiper.slideTo(t)})}),e.addEventListener("mouseleave",function(){document.body.classList.remove("hover-links-active")})}),document.querySelector(".entrance")&&document.body.classList.add("has-entrance");var i=document.querySelector(".background-scroll-blur");if(i){var n=i.classList;window.raf("scroll",function(){window.pageYOffset>50?n.add("blurred"):n.remove("blurred")})}});