function serialize(n){if(n&&n.nodeName==="FORM"){for(var r,i=[],t=n.elements.length-1;t>=0;t=t-1)if(n.elements[t].name!=="")switch(n.elements[t].nodeName){case"INPUT":switch(n.elements[t].type){case"text":case"hidden":case"password":case"button":case"reset":case"submit":i.push(n.elements[t].name+"="+encodeURIComponent(n.elements[t].value));break;case"checkbox":case"radio":n.elements[t].checked&&i.push(n.elements[t].name+"="+encodeURIComponent(n.elements[t].value))}break;case"TEXTAREA":i.push(n.elements[t].name+"="+encodeURIComponent(n.elements[t].value));break;case"SELECT":switch(n.elements[t].type){case"select-one":i.push(n.elements[t].name+"="+encodeURIComponent(n.elements[t].value));break;case"select-multiple":for(r=n.elements[t].options.length-1;r>=0;r=r-1)n.elements[t].options[r].selected&&i.push(n.elements[t].name+"="+encodeURIComponent(n.elements[t].options[r].value))}break;case"BUTTON":switch(n.elements[t].type){case"reset":case"submit":case"button":i.push(n.elements[t].name+"="+encodeURIComponent(n.elements[t].value))}}return i.join("&")}}function isValidEmail(n){return/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(n)}function getXhttpObject(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}function sendRequest(n,t,i,r,u,f,e){var o=getXhttpObject();o.open(t,n,r);o.onreadystatechange=function(){o.readyState==4&&(o.status==200?u(o.responseText):f(o.responseText),e(o.responseText))};t=="POST"&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded");o.send(i)}function ajax(n){var t=n.url;if(t){var r=n.method?n.method:"GET",i=n.data,u=n.success,f=n.error,e=n.complete;r=="GET"&&(t=i!=null?t+"?"+i:t);sendRequest(t,r,i,!0,u,f,e)}}function formSubmitHandlerInitGIT(n,t){$formGIT=document.getElementById(n);t!=null&&typeof t!=undefined&&(formMessagesGIT=[t.SendingMessage,t.SuccessMessage,t.ErrorMessage])}function toggleClassGIT(n,t){n.classList.contains(t)?n.classList.remove(t):n.classList.add(t)}function addClassGIT(n,t){n.classList.contains(t)||n.classList.add(t)}function removeClassGIT(n,t){n.classList.contains(t)&&n.classList.remove(t)}function addErrorClassGIT(n,t){n.nodeName=="SELECT"?addClassGIT(findAncestorGIT(n,"select-custom-style"),t):addClassGIT(n.parentElement,t)}function removeErrorClassGIT(n,t){n.nodeName=="SELECT"?removeClassGIT(n.parentElement.parentElement,t):removeClassGIT(n.parentElement,t)}function findAncestorGIT(n,t){while((n=n.parentElement)&&!n.classList.contains(t));return n}function resetSelectGIT(){var t=document.querySelectorAll("span.cs-placeholder"),n,i;if(t.length)for(n=0;n<t.length;++n)i=t[n].parentElement.getElementsByTagName("Select"),i.length&&(t[n].innerHTML=i[0].firstElementChild.innerHTML)}function resetFormGIT(){clearTimeout(intIdGIT);$message.innerHTML="";$submitGIT.disabled=!1}function sendCompleteGIT(){toggleClassGIT($formGIT,"form-sending");toggleClassGIT($formGIT,"form-complete");clearTimeout(intIdGIT);intIdGIT=setTimeout(resetFormGIT,2e3);$formGIT.reset();document.getElementById("form-overlay-get-touch").style.display="block"}function sendCompleteGITWithErrorGIT(){toggleClassGIT($formGIT,"form-sending");toggleClassGIT($formGIT,"form-complete");clearTimeout(intIdGIT);intIdGIT=setTimeout(resetFormGIT,2e3)}function submitFormGIT(n){n.preventDefault();validateFormGIT($formGIT)&&(toggleClassGIT($formGIT,"form-sending"),$submitGIT.disabled=!0,document.getElementById("form-overlay-loading").style.display="block",document.getElementById("form-overlay-error").style.display="none",ajax({url:$formGIT.action,data:serialize($formGIT),method:"POST",success:function(n){var t=JSON.parse(n),i;t.Status==="Error"?document.getElementById("form-overlay-error").style.display="block":(i=t.Name,document.getElementById("form-overlay-get-touch").getElementsByClassName("wrapper")[0].innerHTML=document.getElementById("form-overlay-get-touch").getElementsByClassName("wrapper")[0].innerHTML.replace("[NAME]",i),document.getElementById("form-overlay-get-touch").style.display="block",document.getElementById("form-overlay-loading").style.display="none",document.getElementById("form-overlay-error").style.display="none",$formGIT.reset(),$submitGIT.disabled=!1)},error:function(){intIdGIT=setTimeout(sendCompleteGITWithErrorGIT,1e3)},complete:function(){resetSelectGIT();$submitGIT.disabled=!1}}))}function validateFormGIT(n){var f=n.elements,e=!0;for(i=0;i<f.length;i++){var t=f[i],r=t.value.trim(),u=!0;t.getAttribute("data-email")=="1"?isValidEmail(r)||(u=!1):t.getAttribute("data-required")=="1"&&(r==null||r=="")&&(u=!1);u?removeErrorClassGIT(t,"error"):(e=!1,addErrorClassGIT(t,"error"))}return e}function AddValueToArrayGIT(n){var u=[],i=document.getElementById("hidden-services"),r=i.value,f,e,t,o;n.checked?r===""?(u.push(n.value),f=JSON.stringify(u),i.value=f):(t=JSON.parse(r),t.indexOf(n.value)===-1?t.push(n.value):t.pop(n.value),e=JSON.stringify(t),i.value=e):(t=JSON.parse(r),t.pop(n.value),o=JSON.stringify(t),i.value=o)}var nav,closeClick,jsonp,Subscribe,subscribe,$formGIT,successMessageGIT,sendingMessageGIT,errorMessageGIT,formMessagesGIT;Modernizr||console.warn("Modernizr is required"),function(){var n,t;Nav=function(){this._window=window;this._document=document;this._body=document.body;this._nav=document.getElementById("nav");this._btnToggle=document.getElementById("nav-toggle");this._btnClose=document.getElementById("nav-close");this._scrollY=0;this._isShowing=!1;this._className="show-nav";this._proxyToggleHandler;this._proxyCloseHandler;this._proxywindowScrollLock;this._init()};Nav.prototype={_init:function(){this._proxyToggleHandler=this._toggleHandler.bind(this);this._proxyCloseHandler=this._closeHandler.bind(this);this._proxywindowScrollLock=this._scrollHandler.bind(this);this._btnToggle.addEventListener("click",this._proxyToggleHandler);this._btnClose.addEventListener("click",this._proxyCloseHandler);this.contactUsButton()},_toggleHandler:function(n){n.preventDefault();this._isShowing?this.hide():this.show()},_closeHandler:function(n){n.preventDefault();this.hide()},show:function(){if(!this._isShowing){this._isShowing=!0;var n=document.getElementById("toggleClick");n&&(document.getElementById("toggleClick").classList.add("hovered"),document.getElementById("fixed-toggle-form").classList.remove("opened"),document.body.classList.remove("contact-form-opened"));this._body.classList.contains(this._className)||this._body.classList.add(this._className);this._scrollY=this._getScrollTop()}},hide:function(){if(this._isShowing){this._isShowing=!1;var n=document.getElementById("toggleClick");n&&document.getElementById("toggleClick").classList.remove("hovered");this._body.classList.contains(this._className)&&this._body.classList.remove(this._className);this._scrollY=this._getScrollTop()}},_scrollHandler:function(n){n.preventDefault();this._document.documentElement.scrollTop=this._body.scrollTop=this._scrollY},_getScrollTop:function(){return this._document.documentElement.scrollTop?this._document.documentElement.scrollTop:this._body.scrollTop},destroy:function(){this._btnToggle.removeEventListener("click",this._proxyToggleHandler,!1);this._btnClose.removeEventListener("click",this._proxyCloseHandler,!1);for(item in this)this[item]=null},contactUsButton:function(){function t(){document.body.classList.remove("contact-form-opened");document.getElementById("fixed-toggle-form").classList.remove("opened");document.getElementById("form-overlay-loading").style.display="none";document.getElementById("form-overlay-get-touch").style.display="none";document.getElementById("form-overlay-error").style.display="none";document.getElementById("getInTouchForm").classList.remove("form-sending");"fixed-contact-form"&&(n._scrollY=n._getScrollTop())}var n=this,u=document.getElementById("toggleClick"),i,r;u&&u.addEventListener("click",function(){document.body.classList.contains("contact-form-opened")?t():(document.body.classList.add("contact-form-opened"),this.classList.remove("hovered"),document.getElementById("fixed-toggle-form").classList.add("opened"),n._scrollY=n._getScrollTop(),n.hide())});i=document.getElementById("fixed-close-btn");r=document.getElementById("form-close");i&&i.addEventListener("click",function(){t()});r&&r.addEventListener("click",function(){t()})}};n=function(){this._window=window;this._body=document.body;this._nav=document.getElementById("subnav");this._btnToggle;this._btnClose;this._navMenu;this._navMenuInner;this._navMenuHeight=0;this._isShowing=!1;this._className="show-subnav";this._marginBottom=80;this._desktopWidth=1024;this._innerWidth=0;this._intId=0;this._proxyToggleHandler;this._proxyCloseHandler;this._proxyResizeHandler;this._proxyOrientationHandler;this._proxyLoadHandler;this._init()};n.prototype={_init:function(){this._nav&&(this._btnToggle=this._nav.querySelector("#subnav-toggle"),this._btnClose=this._nav.querySelector(".btn-close-nav"),this._navMenu=this._nav.querySelector(".nav-menu"),this._navMenuInner=this._navMenu.querySelector("ul"),this._navHeight=this._navMenuInner.offsetHeight,this._navMenu.style.height=0,this._navMenu.style.display="block",this._proxyToggleHandler=this._toggleHandler.bind(this),this._proxyCloseHandler=this._closeHandler.bind(this),this._proxyResizeHandler=this._resizeHandler.bind(this),this._proxyOrientationHandler=this._resizeHandler.bind(this),this._proxyResizeUpdateHandler=this._resizeUpdateHandler.bind(this),this._proxyLoadHandler=this._loadHandler.bind(this),this._btnToggle.addEventListener("click",this._proxyToggleHandler),this._btnClose.addEventListener("click",this._proxyCloseHandler),this._window.addEventListener("resize",this._proxyResizeHandler),this._window.addEventListener("orientationchange",this._orientationHandler),this._window.addEventListener("load",this._proxyLoadHandler))},_getInnerWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},_getInnerHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_loadHandler:function(){this.resize()},_toggleHandler:function(n){n.preventDefault();this._isShowing?this.hide():this.show()},_closeHandler:function(n){n.preventDefault();this.hide()},_resizeHandler:function(){this._innerWidth!==this._getInnerWidth()&&(this.hide(),this._navMenu.style.visibility="hidden",this._navMenu.style.height=this._navMenu.style.maxHeight=0);clearTimeout(this._intId);this._intId=setTimeout(this._proxyResizeUpdateHandler,250)},_orientationHandler:function(){this.hide();this._navMenu.style.visibility="hidden";this._navMenu.style.height=this._navMenu.style.maxHeight=0;clearTimeout(this._intId);this._intId=setTimeout(this._proxyResizeUpdateHandler,250)},_resizeUpdateHandler:function(){clearTimeout(this._intId);this.resize()},resize:function(){this._innerWidth=this._getInnerWidth();this._navHeight=this._navMenuInner.offsetHeight;this._navMenu.style.height=this._isShowing&&this._innerWidth<this._desktopWidth?this._navMenu.style.maxHeight=this._navHeight+this._marginBottom+"px":this._navMenu.style.maxHeight=0;this._innerWidth>=this._desktopWidth?(this._navMenu.style.height="auto",this._navMenu.style.maxHeight="none",this._navMenuInner.getBoundingClientRect().top+this._navMenuInner.offsetHeight-this._getInnerHeight()>0&&(this._nav.classList.contains("wide")||this._nav.classList.add("wide")),this._navMenu.style.height=this._getInnerHeight()+"px"):this._nav.classList.contains("wide")&&this._nav.classList.remove("wide");this._navMenu.style.visibility="visible"},show:function(){this._isShowing||(this._isShowing=!0,this._innerWidth<this._desktopWidth&&(this._navMenu.style.height=this._navMenu.style.maxHeight=this._navHeight+this._marginBottom+"px"),this._body.classList.contains(this._className)||this._body.classList.add(this._className))},hide:function(){this._isShowing&&(this._isShowing=!1,this._innerWidth<this._desktopWidth&&(this._navMenu.style.height=this._navMenu.style.maxHeight=0),this._body.classList.contains(this._className)&&this._body.classList.remove(this._className))},destroy:function(){this._btnToggle.removeEventListener("click",this._proxyToggleHandler,!1);this._btnClose.removeEventListener("click",this._proxyCloseHandler,!1);for(item in this)this[item]=null}};t=function(){this._body=document.body;this._className="scrolled";this._proxyOnScroll;this._isRunning=!1;this._init()};t.prototype={_init:function(){this._proxyOnScroll=this._onScroll.bind(this);this.start()},_onScroll:function(){var n=document.documentElement.scrollTop?document.documentElement.scrollTop:this._body.scrollTop;n>0?this._body.classList.contains(this._className)||this._body.classList.add(this._className):this._body.classList.contains(this._className)&&this._body.classList.remove(this._className)},start:function(){this._isRunning||(this._isRunning=!0,window.addEventListener("scroll",this._proxyOnScroll,!1),this._onScroll())},cancel:function(){this._isRunning&&(this._isRunning=!1,window.removeEventListener("scroll",this._proxyOnScroll,!1),this._onScroll())},destroy:function(){this.cancel();window.removeEventListener("resize",this._proxyOnResize,!1);for(item in this)this[item]=null}};nav=new Nav;new n;new t}(),function(){if(typeof SelectFx!="undefined"){var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);n>=768&&!t&&[].slice.call(document.querySelectorAll("select.cs-select")).forEach(function(n){new SelectFx(n)})}}();closeClick=document.getElementById("fixed-toggle-form");window.onclick=function(n){n.target==closeClick};window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(n){window.setTimeout(n,1e3/60)}}();window.cancelAnimFrame=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(n){window.clearTimeout(n)},function(){var n=function(){this._window=window;this._body=document.body;this._proxyClickHandler;this._proxyRender;this._proxyTouchHandler;this._aniId;this._hasScrollBehavior=!1;this.PI_D2=Math.PI/2;this._easingEquations={easeOutExpo:function(n){return n===1?1:-Math.pow(2,-10*n)+1}};this._easing="easeOutExpo";this._speed=2e3;this._time=.6;this._currentTime=0;this._scrollY=0;this._scrollTargetY=0;this._init()};n.prototype={_init:function(){var t=this,n,i,r=document.querySelectorAll('.article a[href*="#"]:not([href="#"])');this._hasScrollBehavior="scrollBehavior"in document.documentElement.style;this._hasScrollBehavior&&(document.documentElement.style.scrollBehavior="smooth");this._proxyClickHandler=this._clickHandler.bind(this);this._proxyRender=this._render.bind(this);this._proxyTouchHandler=this._touchHandler.bind(this);[].slice.call(r).forEach(function(r){i=r.hash.substring(1);n=document.getElementById(i);n&&(n.classList.contains("anchor")||n.href||(n.classList.add("anchor"),t._hasScrollBehavior||r.addEventListener("click",t._proxyClickHandler)))})},_getClosest:function(n,t){for(var i=t.charAt(0);n&&n!==document;n=n.parentNode)if(i==="."&&n.classList.contains(t.substr(1))||i==="#"&&n.id===t.substr(1)||i==="["&&n.hasAttribute(t.substr(1,t.length-2))||n.tagName.toLowerCase()===t)return n;return!1},_clickHandler:function(n){n.preventDefault();var t,i,r;n.target.hash?t=n.target.hash.substring(1):(i=this._getClosest(n.target,"a"),t=i?i.hash.substring(1):null);t&&(r=document.getElementById(t),r&&(this._currentTime=0,this._scrollY=window.pageYOffset,this._scrollTargetY=r.getBoundingClientRect().top,this._time=.6,this._render(),window.addEventListener("touchstart",this._proxyTouchHandler)))},_touchHandler:function(){this._cancelRender()},_cancelRender:function(){this._aniId&&(window.cancelAnimFrame(this._aniId),this._aniId=null,window.removeEventListener("touchstart",this._proxyTouchHandler))},_render:function(){this._currentTime+=1/60;var n=this._currentTime/this._time,t=this._easingEquations[this._easing](n);n<1?(this._aniId=requestAnimFrame(this._proxyRender),window.scrollTo(0,this._scrollY+(this._scrollTargetY-this._scrollY)*t)):(window.scrollTo(0,this._scrollTargetY),this._cancelRender())}};window.addEventListener("load",function(){new n})}();jsonp=function(){var n={};return n.send=function(n,t){var t=t||{},r=t.callbackName||"callback",u=t.onSuccess||function(){},f=t.onTimeout||function(){},e=t.timeout||10,o=window.setTimeout(function(){window[r]=function(){};f()},e*1e3),i;window[r]=function(n){window.clearTimeout(o);u(n)};i=document.createElement("script");i.type="text/javascript";i.async=!0;i.src=n;document.getElementsByTagName("head")[0].appendChild(i)},n}();Subscribe=function(){this._el;this._form;this._toggleButton;this._inputName;this._inputEmail;this._message;this._completeTimeout=4e3;this._successMessage="You are now signed up, thank you";this._errorMessage="Server error, try again later";this._url="";this._isShowing=!1;this._id="subscribe";this._activeClass="active";this._int=0;this._toggleProxy;this._submitProxy;this._successProxy;this._errorProxy;this._completeProxy;this._focusProxy;this._init()};Subscribe.prototype={_init:function(){window.addEventListener("load",this._config.bind(this),!1)},_config:function(){this._el=document.getElementById(this._id);this._el&&(this._form=document.getElementById("subscribe-form"),this._form&&(this._url=this._form.getAttribute("action"),this._method=this._form.getAttribute("method"),this._toggleButton=this._el.querySelector("#toggle"),this._submitButton=this._el.querySelector('button[type="submit"]'),this._inputName=this._el.querySelector("input#cm-name"),this._inputEmail=this._el.querySelector("input#cm-email"),this._message=this._el.querySelector("ul > li.message"),this._toggleProxy=this._toggle.bind(this),this._submitProxy=this._submit.bind(this),this._successProxy=this._success.bind(this),this._errorProxy=this._error.bind(this),this._completeProxy=this._complete.bind(this),this._focusProxy=this._focus.bind(this),this._toggleButton.addEventListener("click",this._toggleProxy,!1),this._submitButton.addEventListener("click",this._submitProxy,!1),this._inputName.addEventListener("focus",this._focusProxy,!1),this._inputEmail.addEventListener("focus",this._focusProxy,!1)))},show:function(){this._isShowing||(this._isShowing=!0,this._clearFields(),this._reset(),this._el.classList.contains(this._activeClass)||this._el.classList.add(this._activeClass))},hide:function(){this._isShowing&&(this._isShowing=!1,this._el.classList.contains(this._activeClass)&&this._el.classList.remove(this._activeClass))},toggleClass:function(n,t,i){n.classList.contains(t)||i?n.classList.remove(t):n.classList.add(t)},fieldError:function(n,t){var i="error";t?n.classList.contains(i)||n.classList.add(i):n.classList.contains(i)&&n.classList.remove(i)},isValidEmail:function(n){return/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(n)},_focus:function(n){this.fieldError(n.target,!1)},_toggle:function(n){n.preventDefault();this._isShowing?this.hide():this.show()},_close:function(n){n.preventDefault();this.hide()},_submit:function(n){if(n.preventDefault(),this._validation()){this._submitButton.disabled=!0;this._send();return}},_validation:function(){var n=!0;return(this._inputName.value.length<2||this._inputName.value.length>50)&&(n=!1,this.fieldError(this._inputName,!0)),this.isValidEmail(this._inputEmail.value)||(n=!1,this.fieldError(this._inputEmail,!0)),n},_send:function(){jsonp.send(this._url+"?callback=cb&"+serialize(this._form),{callbackName:"cb",onSuccess:this._successProxy,onTimeout:this._errorProxy,timeout:5})},_success:function(){this._clearFields();this.toggleClass(this._el,"show-message");this._message.innerHTML=this._successMessage;clearTimeout(this._int);this._int=setTimeout(this._completeProxy,this._completeTimeout)},_error:function(){this.toggleClass(this._el,"show-message");this._message.innerHTML=this._errorMessage},_complete:function(){clearTimeout(this._int);this.toggleClass(this._el,"show-message",!0);this.hide();clearTimeout(this._int);this._int=setTimeout(this._completeProxy,1e3)},_clearFields:function(){this._inputName.value="";this._inputEmail.value=""},_reset:function(){this._message.innerHTML="";this._submitButton.disabled=!1}};subscribe=new Subscribe;formMessagesGIT=[];var $submitGIT=document.getElementById("get-in-touch-submit"),$formGIT=document.getElementById("getInTouchForm"),$formGITOverlay=document.getElementById("form-overlay-get-touch"),intIdGIT=0;$submitGIT&&($submitGIT.disabled=!1);$submitGIT&&$submitGIT.addEventListener("click",submitFormGIT)