function initVideo(){if($(".videoWrapper").length>0){currentDeviceSize=$(window).outerWidth()<=640?"small":"medium";$(window).on("resize",function(){var n;if(n=$(window).outerWidth()<=640?"small":"medium",currentDeviceSize!==n)return location.reload(),!1;currentDeviceSize=n})}}!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((n=n||self).Vimeo=n.Vimeo||{},n.Vimeo.Player=t())}(this,function(){"use strict";function a(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function y(n,t){return 0===n.indexOf(t.toLowerCase())?n:"".concat(t.toLowerCase()).concat(n.substr(0,1).toUpperCase()).concat(n.substr(1))}function r(n){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(n)}function p(){var t,u=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=u.id,f=u.url,n=i||f;if(!n)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(t=n,!isNaN(parseFloat(t))&&isFinite(t)&&Math.floor(t)==t)return"https://vimeo.com/".concat(n);if(r(n))return n.replace("http:","https:");if(i)throw new TypeError("“".concat(i,"” is not a valid video id."));throw new TypeError("“".concat(n,"” is not a vimeo.com url."));}function u(t,i,r){var u=n.get(t.element)||{};i in u||(u[i]=[]);u[i].push(r);n.set(t.element,u)}function f(t,i){return(n.get(t.element)||{})[i]||[]}function h(t,i,r){var u=n.get(t.element)||{},f;return u[i]?r?(f=u[i].indexOf(r),-1!==f&&u[i].splice(f,1),n.set(t.element,u),u[i]&&0===u[i].length):(u[i]=[],n.set(t.element,u),!0):!0}function b(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return w.reduce(function(t,i){var r=n.getAttribute("data-vimeo-".concat(i));return(r||""===r)&&(t[i]=""===r?1:r),t},t)}function c(n,t){var r=n.html,i;if(!t)throw new TypeError("An element must be provided");return null!==t.getAttribute("data-vimeo-initialized")?t.querySelector("iframe"):(i=document.createElement("div"),i.innerHTML=r,t.appendChild(i.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe"))}function k(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length?arguments[2]:void 0;return new Promise(function(u,f){var s,o,e;if(!r(n))throw new TypeError("“".concat(n,"” is not a vimeo.com url."));s="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(n));for(o in t)t.hasOwnProperty(o)&&(s+="&".concat(o,"=").concat(encodeURIComponent(t[o])));e="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;e.open("GET",s,!0);e.onload=function(){if(404!==e.status)if(403!==e.status)try{var t=JSON.parse(e.responseText);if(403===t.domain_status_code)return c(t,i),void f(new Error("“".concat(n,"” is not embeddable.")));u(t)}catch(t){f(t)}else f(new Error("“".concat(n,"” is not embeddable.")));else f(new Error("“".concat(n,"” was not found.")))};e.onerror=function(){var n=e.status?" (".concat(e.status,")"):"";f(new Error("There was an error fetching the embed code from Vimeo".concat(n,".")))};e.send()})}function d(n){if("string"==typeof n)try{n=JSON.parse(n)}catch(n){return console.warn(n),{}}return n}function e(n,t,i){var r,u;n.element.contentWindow&&n.element.contentWindow.postMessage&&(r={method:t},void 0!==i&&(r.value=i),u=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1")),8<=u&&u<10&&(r=JSON.stringify(r)),n.element.contentWindow.postMessage(r,n.origin))}function tt(n,t){var i,r=[],u;(t=d(t)).event?("error"===t.event&&f(n,t.data.method).forEach(function(i){var r=new Error(t.data.message);r.name=t.data.name;i.reject(r);h(n,t.data.method,i)}),r=f(n,"event:".concat(t.event)),i=t.data):t.method&&(u=function(n,t){var r=f(n,t),i;return r.length<1?!1:(i=r.shift(),h(n,t,i),i)}(n,t.method),u&&(r.push(u),i=t.value));r.forEach(function(t){try{if("function"==typeof t)return void t.call(n,i);t.resolve(i)}catch(t){}})}var v="undefined"!=typeof global&&"[object global]"==={}.toString.call(global),g=void 0!==Array.prototype.indexOf,nt="undefined"!=typeof window&&void 0!==window.postMessage,o,s,t,n,w;if(!(v||g&&nt))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(n){function i(n){return Object(n)===n}if(!n.WeakMap){var r=Object.prototype.hasOwnProperty,t=function(n,t,i){Object.defineProperty?Object.defineProperty(n,t,{configurable:!0,writable:!0,value:i}):n[t]=i};n.WeakMap=function(){function n(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(t(this,"_id","_WeakMap_"+f()+"."+f()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported");}function u(n,t){if(!i(n)||!r.call(n,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof n);}function f(){return Math.random().toString().substring(2)}return t(n.prototype,"delete",function(n){if(u(this,"delete"),!i(n))return!1;var t=n[this._id];return!(!t||t[0]!==n)&&(delete n[this._id],!0)}),t(n.prototype,"get",function(n){if(u(this,"get"),i(n)){var t=n[this._id];return t&&t[0]===n?t[1]:void 0}}),t(n.prototype,"has",function(n){if(u(this,"has"),!i(n))return!1;var t=n[this._id];return!(!t||t[0]!==n)}),t(n.prototype,"set",function(n,r){if(u(this,"set"),!i(n))throw new TypeError("Invalid value used as weak map key");var f=n[this._id];return f&&f[0]===n?f[1]=r:t(n,this._id,[n,r]),this}),t(n,"_polyfill",!0),n}()}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:o);t=(function(n){var t,i,r;r=function(){function r(n,t){f.add(n,t);u||(u=a(f.drain))}function s(n){var t,i=typeof n;return null==n||"object"!=i&&"function"!=i||(t=n.then),"function"==typeof t&&t}function e(){for(var n=0;n<this.chain.length;n++)v(this,1===this.state?this.chain[n].success:this.chain[n].failure,this.chain[n]);this.chain.length=0}function v(n,t,i){var r,u;try{!1===t?i.reject(n.msg):(r=!0===t?n.msg:t.call(void 0,n.msg))===i.promise?i.reject(TypeError("Promise-chain cycle")):(u=s(r))?u.call(r,i.resolve,i.reject):i.resolve(r)}catch(n){i.reject(n)}}function i(n){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=n,t.state=2,0<t.chain.length&&r(e,t))}function h(n,t,i,r){for(var u=0;u<t.length;u++)!function(u){n.resolve(t[u]).then(function(n){i(u,n)},r)}(u)}function c(n){this.def=n;this.triggered=!1}function y(n){this.promise=n;this.state=0;this.triggered=!1;this.chain=[];this.msg=void 0}function t(n){if("function"!=typeof n)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new y(this);this.then=function(n,i){var u={success:"function"!=typeof n||n,failure:"function"==typeof i&&i};return u.promise=new this.constructor(function(n,t){if("function"!=typeof n||"function"!=typeof t)throw TypeError("Not a function");u.resolve=n;u.reject=t}),t.chain.push(u),0!==t.state&&r(e,t),u.promise};this.catch=function(n){return this.then(void 0,n)};try{n.call(void 0,function(n){(function n(t){var f,u=this;if(!u.triggered){u.triggered=!0;u.def&&(u=u.def);try{(f=s(t))?r(function(){var r=new c(u);try{f.call(t,function(){n.apply(r,arguments)},function(){i.apply(r,arguments)})}catch(n){i.call(r,n)}}):(u.msg=t,u.state=1,0<u.chain.length&&r(e,u))}catch(n){i.call(new c(u),n)}}}).call(t,n)},function(n){i.call(t,n)})}catch(n){i.call(t,n)}}var n,u,f,o=Object.prototype.toString,a="undefined"!=typeof setImmediate?function(n){return setImmediate(n)}:setTimeout,l;try{Object.defineProperty({},"x",{});n=function(n,t,i,r){return Object.defineProperty(n,t,{value:i,writable:!0,configurable:!1!==r})}}catch(o){n=function(n,t,i){return n[t]=i,n}}return f=function(){function r(n,t){this.fn=n;this.self=t;this.next=void 0}var i,t,n;return{add:function(u,f){n=new r(u,f);t?t.next=n:i=n;t=n;n=void 0},drain:function(){var n=i;for(i=t=u=void 0;n;)n.fn.call(n.self),n=n.next}}}(),l=n({},"constructor",t,!1),n(t.prototype=l,"__NPO__",0,!1),n(t,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(t,i){if("function"!=typeof t||"function"!=typeof i)throw TypeError("Not a function");t(n)})}),n(t,"reject",function(n){return new this(function(t,i){if("function"!=typeof t||"function"!=typeof i)throw TypeError("Not a function");i(n)})}),n(t,"all",function(n){var t=this;return"[object Array]"!=o.call(n)?t.reject(TypeError("Not an array")):0===n.length?t.resolve([]):new t(function(i,r){if("function"!=typeof i||"function"!=typeof r)throw TypeError("Not a function");var u=n.length,f=Array(u),e=0;h(t,n,function(n,t){f[n]=t;++e===u&&i(f)},r)})}),n(t,"race",function(n){var t=this;return"[object Array]"!=o.call(n)?t.reject(TypeError("Not an array")):new t(function(i,r){if("function"!=typeof i||"function"!=typeof r)throw TypeError("Not a function");h(t,n,function(n,t){i(t)},r)})}),t};(i=o)[t="Promise"]=i[t]||r();n.exports&&(n.exports=i[t])}(s={exports:{}},s.exports),s.exports);n=new WeakMap;w=["autopause","autoplay","background","byline","color","controls","dnt","height","id","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];var i=new WeakMap,l=new WeakMap,it=function(){function o(u){var s,f=this,y=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},h,a,v;if(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,o),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),s=u,!Boolean(s&&1===s.nodeType&&"nodeName"in s&&s.ownerDocument&&s.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");if(h=u.ownerDocument.defaultView,"IFRAME"!==u.nodeName&&(a=u.querySelector("iframe"),a&&(u=a)),"IFRAME"===u.nodeName&&!r(u.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");return i.has(u)?i.get(u):(this.element=u,this.origin="*",v=new t(function(t,e){var s=function(n){var i,u,o,s;if(r(n.origin)&&f.element.contentWindow===n.source){if("*"===f.origin&&(f.origin=n.origin),i=d(n.data),i&&"error"===i.event&&i.data&&"ready"===i.data.method)return u=new Error(i.data.message),u.name=i.data.name,void e(u);if(o=i&&"ready"===i.event,s=i&&"ping"===i.method,o||s)return f.element.setAttribute("data-ready","true"),void t();tt(f,i)}},o;(h.addEventListener?h.addEventListener("message",s,!1):h.attachEvent&&h.attachEvent("onmessage",s),"IFRAME"!==f.element.nodeName)&&(o=b(u,y),k(p(o),o,u).then(function(t){var r,e,o,s=c(t,u);return f.element=s,f._originalElement=u,r=u,e=s,o=n.get(r),n.set(e,o),n.delete(r),i.set(f.element,f),t}).catch(e))}),l.set(this,v),i.set(this.element,this),"IFRAME"===this.element.nodeName&&e(this,"ping"),this)}var s,v,w;return s=o,(v=[{key:"callMethod",value:function(n){var i=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new t(function(t,f){return i.ready().then(function(){u(i,n,{resolve:t,reject:f});e(i,n,r)}).catch(f)})}},{key:"get",value:function(n){var i=this;return new t(function(t,r){return n=y(n,"get"),i.ready().then(function(){u(i,n,{resolve:t,reject:r});e(i,n)}).catch(r)})}},{key:"set",value:function(n,i){var r=this;return new t(function(t,f){if(n=y(n,"set"),null==i)throw new TypeError("There must be a value to set.");return r.ready().then(function(){u(r,n,{resolve:t,reject:f});e(r,n,i)}).catch(f)})}},{key:"on",value:function(n,t){if(!n)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===f(this,"event:".concat(n)).length&&this.callMethod("addEventListener",n).catch(function(){});u(this,"event:".concat(n),t)}},{key:"off",value:function(n,t){if(!n)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");h(this,"event:".concat(n),t)&&this.callMethod("removeEventListener",n).catch(function(){})}},{key:"loadVideo",value:function(n){return this.callMethod("loadVideo",n)}},{key:"ready",value:function(){var n=l.get(this)||new t(function(n,t){t(new Error("Unknown player. Probably unloaded."))});return t.resolve(n)}},{key:"addCuePoint",value:function(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:n,data:t})}},{key:"removeCuePoint",value:function(n){return this.callMethod("removeCuePoint",n)}},{key:"enableTextTrack",value:function(n,t){if(!n)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:n,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var n=this;return new t(function(t){l.delete(n);i.delete(n.element);n._originalElement&&(i.delete(n._originalElement),n._originalElement.removeAttribute("data-vimeo-initialized"));n.element&&"IFRAME"===n.element.nodeName&&n.element.parentNode&&n.element.parentNode.removeChild(n.element);t()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(n){return this.set("autopause",n)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(n){return this.set("color",n)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(n){return this.set("currentTime",n)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(n){return this.set("loop",n)}},{key:"setMuted",value:function(n){return this.set("muted",n)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(n){return this.set("playbackRate",n)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(n){return this.set("volume",n)}}])&&a(s.prototype,v),w&&a(s,w),o}();return v||(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document,i=[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(n){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(n))};i.forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var i=b(t);k(p(i),i,t).then(function(n){return c(n,t)}).catch(n)}catch(i){n(i)}})}(),function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document,n;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,n=function(n){if(r(n.origin)&&n.data&&"spacechange"===n.data.event)for(var u=t.querySelectorAll("iframe"),i=0;i<u.length;i++)if(u[i].contentWindow===n.source){u[i].parentElement.style.paddingBottom="".concat(n.data.data[0].bottom,"px");break}},window.addEventListener?window.addEventListener("message",n,!1):window.attachEvent&&window.attachEvent("onmessage",n))}()),it});$(document).ready(function(){function n(){$("#home-video-play-img").hide()}function t(){$("#home-video-play-img").show()}initVideo();$("#home-video-play-img, .iframe-wrap").click(function(){console.log("iframe clicked");var r=$("iframe#video-mobile"),i=new Vimeo.Player(r);i.getPaused().then(function(r){r==!0?(i.play(),n()):(i.pause(),t())})});$('.video-bar input[type="checkbox"]').on("change",function(){var r=$("iframe#desktop-video"),t=new Vimeo.Player(r),i,n;$(window).width()>640&&($(".video-desktop .video-bar").hasClass("off")?(t.setVolume(.66),$(".video-desktop .video-bar").addClass("on"),$(".video-desktop .video-bar").removeClass("off"),$(".video-desktop #volumeOff").css("visibility","hidden"),$(".video-desktop #volumeOn").css("visibility","visible"),$(".video-desktop #volumeSwitch").checked=!0):$(".video-desktop .video-bar").hasClass("on")&&(t.setVolume(0),$(".video-desktop .video-bar").addClass("off"),$(".video-desktop .video-bar").removeClass("on"),$(".video-desktop #volumeOff").css("visibility","visible"),$(".video-desktop #volumeOn").css("visibility","hidden"),$(".video-desktop volumeSwitch").checked=!1));i=$("iframe#video-mobile");n=new Vimeo.Player(i);$(".video-mobile .video-bar").hasClass("off")?(n.setVolume(.66),$(".video-mobile .video-bar").addClass("on"),$(".video-mobile .video-bar").removeClass("off"),$(".video-mobile #volumeOffMobile").css("visibility","hidden"),$(".video-mobile #volumeOnMobile").css("visibility","visible"),$(".video-mobile #volumeSwitch").checked=!0):$(".video-mobile .video-bar").hasClass("on")&&(n.setVolume(0),$(".video-mobile .video-bar").addClass("off"),$(".video-mobile .video-bar").removeClass("on"),$(".video-mobile #volumeOffMobile").css("visibility","visible"),$(".video-mobile #volumeOnMobile").css("visibility","hidden"),$(".video-mobile #volumeSwitch").checked=!1)})});var currentDeviceSize=""