­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ var wpcf7 = { "api": { "root": "https:\/\/motorcycle.hondasaudi.com\/wp-json\/", "namespace": "contact-form-7\/v1" } }; ( function( domain, translations ) { var localeData = translations.locale_data[ domain ] || translations.locale_data.messages; localeData[""].domain = domain; wp.i18n.setLocaleData( localeData, domain ); } )( "contact-form-7", {"translation-revision-date":"2023-04-05 09:50:06+0000","generator":"GlotPress\/4.0.1","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=6; plural=(n == 0) ? 0 : ((n == 1) ? 1 : ((n == 2) ? 2 : ((n % 100 >= 3 && n % 100 <= 10) ? 3 : ((n % 100 >= 11 && n % 100 <= 99) ? 4 : 5))));","lang":"ar"},"Error:":["\u062e\u0637\u0623:"]}},"comment":{"reference":"includes\/js\/index.js"}} );(()=>{"use strict";const e=window.wp.i18n,t=e=>Math.abs(parseInt(e,10)),a=(e,t,a)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:a});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=(e,t)=>{const n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["validating","validating"],["payment_required","payment-required"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const r=e.getAttribute("data-status");if(e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t){e.classList.remove(r);const t={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,prevStatus:r};a(e,"statuschanged",t)}return t},r=e=>{const{root:t,namespace:a="contact-form-7/v1"}=wpcf7.api;return c.reduceRight(((e,t)=>a=>t(a,e)),(e=>{let n,r,{url:c,path:o,endpoint:s,headers:i,body:l,data:p,...d}=e;"string"==typeof s&&(n=a.replace(/^\/|\/$/g,""),r=s.replace(/^\//,""),o=r?n+"/"+r:n),"string"==typeof o&&(-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),c=t+o),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const f={code:"fetch_error",message:"You are probably offline."},u={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(c||o||window.location.href,{...d,headers:i,body:l}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw u}));throw u}))),(()=>{throw f}))}))(e)},c=[];function o(e,t={}){const{target:a,scope:r=e,...c}=t;if(void 0===e.wpcf7?.schema)return;const o={...e.wpcf7.schema};if(void 0!==a){if(!e.contains(a))return;if(!a.closest(".wpcf7-form-control-wrap[data-name]"))return;if(a.closest(".novalidate"))return}const p=r.querySelectorAll(".wpcf7-form-control-wrap"),d=Array.from(p).reduce(((e,t)=>(t.closest(".novalidate")||t.querySelectorAll(":where( input, textarea, select ):enabled").forEach((t=>{if(t.name)switch(t.type){case"button":case"image":case"reset":case"submit":break;case"checkbox":case"radio":t.checked&&e.append(t.name,t.value);break;case"select-multiple":for(const a of t.selectedOptions)e.append(t.name,a.value);break;case"file":for(const a of t.files)e.append(t.name,a);break;default:e.append(t.name,t.value)}})),e)),new FormData),f=e.getAttribute("data-status");Promise.resolve(n(e,"validating")).then((n=>{if(void 0!==swv){const n=swv.validate(o,d,t);for(const t of p){if(void 0===t.dataset.name)continue;const c=t.dataset.name;if(n.has(c)){const{error:t,validInputs:a}=n.get(c);i(e,c),void 0!==t&&s(e,c,t,{scope:r}),l(e,c,null!=a?a:[])}if(t.contains(a))break}}})).finally((()=>{n(e,f)}))}r.use=e=>{c.unshift(e)};const s=(e,t,a,n)=>{const{scope:r=e,...c}=null!=n?n:{},o=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,""),s=e.querySelector(`.wpcf7-form-control-wrap[data-name="${t}"] .wpcf7-form-control`);(()=>{const t=document.createElement("li");t.setAttribute("id",o),s&&s.id?t.insertAdjacentHTML("beforeend",`${a}`):t.insertAdjacentText("beforeend",a),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(t)})(),r.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{const t=document.createElement("span");t.classList.add("wpcf7-not-valid-tip"),t.setAttribute("aria-hidden","true"),t.insertAdjacentText("beforeend",a),e.appendChild(t),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.classList.add("wpcf7-not-valid"),e.setAttribute("aria-describedby",o),"function"==typeof e.setCustomValidity&&e.setCustomValidity(a),e.closest(".use-floating-validation-tip")&&(e.addEventListener("focus",(e=>{t.setAttribute("style","display: none")})),t.addEventListener("click",(e=>{t.setAttribute("style","display: none")})))}))}))},i=(e,t)=>{const a=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,"");e.wpcf7.parent.querySelector(`.screen-reader-response ul li#${a}`)?.remove(),e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{e.querySelector(".wpcf7-not-valid-tip")?.remove(),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid"),"function"==typeof e.setCustomValidity&&e.setCustomValidity("")}))}))},l=(e,t,a)=>{e.querySelectorAll(`[data-reflection-of="${t}"]`).forEach((e=>{if("output"===e.tagName.toLowerCase()){const t=e;0===a.length&&a.push(t.dataset.default),a.slice(0,1).forEach((e=>{e instanceof File&&(e=e.name),t.textContent=e}))}else e.querySelectorAll("output").forEach((e=>{e.hasAttribute("data-default")?0===a.length?e.removeAttribute("hidden"):e.setAttribute("hidden","hidden"):e.remove()})),a.forEach((a=>{a instanceof File&&(a=a.name);const n=document.createElement("output");n.setAttribute("name",t),n.textContent=a,e.appendChild(n)}))}))};function p(e,t={}){if(wpcf7.blocked)return d(e),void n(e,"submitting");const c=new FormData(e);t.submitter&&t.submitter.name&&c.append(t.submitter.name,t.submitter.value);const o={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(c,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:c};r({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((t=>{const r=n(e,t.status);return o.status=t.status,o.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(r)?a(e,r,o):["sent","failed"].includes(r)&&a(e,`mail${r}`,o),a(e,"submit",o),t})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&t.invalid_fields.forEach((t=>{s(e,t.field,t.message)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:t,detail:r}=e.wpcf7;d(t),a(t,"beforesubmit",r),n(t,"submitting")}return t(e)}));const d=e=>{e.querySelectorAll(".wpcf7-form-control-wrap").forEach((t=>{t.dataset.name&&i(e,t.dataset.name)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function f(e){const t=new FormData(e),c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(t,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:t};r({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:c}}).then((t=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,n(e,"mail_sent")):n(e,"init"),c.apiResponse=t,a(e,"reset",c)})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:t,detail:a}=e.wpcf7;d(t),n(t,"resetting")}return t(e)}));const u=(e,t)=>{for(const a in t){const n=t[a];e.querySelectorAll(`input[name="${a}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${a.replaceAll(":","")}`).forEach((e=>{e.setAttribute("src",n)}));const r=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);r&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${a}"]`).forEach((e=>{e.value=r[1]}))}},m=(e,t)=>{for(const a in t){const n=t[a][0],r=t[a][1];e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${a}"]`).forEach((e=>{e.querySelector(`input[name="${a}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${a}"]`).value=r}))}};function w(e){const a=new FormData(e);e.wpcf7={id:t(a.get("_wpcf7")),status:e.getAttribute("data-status"),pluginVersion:a.get("_wpcf7_version"),locale:a.get("_wpcf7_locale"),unitTag:a.get("_wpcf7_unit_tag"),containerPost:t(a.get("_wpcf7_container_post")),parent:e.closest(".wpcf7"),get schema(){return wpcf7.schemas.get(this.id)}},wpcf7.schemas.set(e.wpcf7.id,void 0),e.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'')})),(e=>{e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((t=>{t.addEventListener("change",(t=>{const a=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${a}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(e),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const a=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');a.disabled=!n.checked,e.addEventListener("change",(e=>{a.disabled=!n.checked,e.target===n&&n.checked&&a.focus()}))}))})(e),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let a=e.value.trim();a&&!a.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==a.indexOf(".")&&(a=a.replace(/^\/+/,""),a="http://"+a),e.value=a}))}))})(e),(e=>{if(!e.querySelector(".wpcf7-acceptance")||e.classList.contains("wpcf7-acceptance-as-validation"))return;const t=()=>{let t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((e=>{if(!t||e.classList.contains("optional"))return;const a=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&a.checked||!e.classList.contains("invert")&&!a.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(e),(e=>{const a=(e,a)=>{const n=t(e.getAttribute("data-starting-value")),r=t(e.getAttribute("data-maximum-value")),c=t(e.getAttribute("data-minimum-value")),o=e.classList.contains("down")?n-a.value.trim().length:a.value.trim().length;e.setAttribute("data-current-value",o),e.innerText=o,r&&r{t={init:!1,...t},e.querySelectorAll(".wpcf7-character-count").forEach((n=>{const r=n.getAttribute("data-target-name"),c=e.querySelector(`[name="${r}"]`);c&&(c.value=c.defaultValue,a(n,c),t.init&&c.addEventListener("keyup",(e=>{a(n,c)})))}))};n({init:!0}),e.addEventListener("wpcf7reset",(e=>{n()}))})(e),window.addEventListener("load",(t=>{wpcf7.cached&&e.reset()})),e.addEventListener("reset",(t=>{wpcf7.reset(e)})),e.addEventListener("submit",(t=>{wpcf7.submit(e,{submitter:t.submitter}),t.preventDefault()})),e.addEventListener("wpcf7submit",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("wpcf7reset",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("change",(t=>{t.target.closest(".wpcf7-form-control")&&wpcf7.validate(e,{target:t.target})})),e.addEventListener("wpcf7statuschanged",(t=>{const a=t.detail.status;e.querySelectorAll(".active-on-any").forEach((e=>{e.removeAttribute("inert"),e.classList.remove("active-on-any")})),e.querySelectorAll(`.inert-on-${a}`).forEach((e=>{e.setAttribute("inert","inert"),e.classList.add("active-on-any")}))}))}document.addEventListener("DOMContentLoaded",(t=>{var a;if("undefined"!=typeof wpcf7)if(void 0!==wpcf7.api)if("function"==typeof window.fetch)if("function"==typeof window.FormData)if("function"==typeof NodeList.prototype.forEach)if("function"==typeof String.prototype.replaceAll){wpcf7={init:w,submit:p,reset:f,validate:o,schemas:new Map,...null!==(a=wpcf7)&&void 0!==a?a:{}},document.querySelectorAll("form .wpcf7[data-wpcf7-id]").forEach((t=>{const a=document.createElement("p");a.setAttribute("class","wpcf7-form-in-wrong-place");const n=document.createElement("strong");n.append((0,e.__)("Error:","contact-form-7"));const r=(0,e.__)("This contact form is placed in the wrong place.","contact-form-7");a.append(n," ",r),t.replaceWith(a)})),document.querySelectorAll(".wpcf7 > form").forEach((e=>{wpcf7.init(e),e.closest(".wpcf7").classList.replace("no-js","js")}));for(const e of wpcf7.schemas.keys())r({endpoint:`contact-forms/${e}/feedback/schema`,method:"GET"}).then((t=>{wpcf7.schemas.set(e,t)}))}else console.error("Your browser does not support String.replaceAll().");else console.error("Your browser does not support NodeList.forEach().");else console.error("Your browser does not support window.FormData().");else console.error("Your browser does not support window.fetch().");else console.error("wpcf7.api is not defined.");else console.error("wpcf7 is not defined.")}))})(); /*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0','"':'"',''':"'",'’':"’",'‘':"‘",'–':"–",'—':"—",'…':"…",'”':'”'};return string.replace(/\&[\w\d\#]{2,5}\;/g,function(m){return map[m]})};this.init()} wpcf7_redirect=new Wpcf7_redirect()})(jQuery); !function(a,b){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",b):"object"==typeof module&&module.exports?module.exports=b():a.EvEmitter=b()}("undefined"==typeof window?this:window,function(){function a(){}var b=a.prototype;return b.on=function(a,b){if(a&&b){var c=this._events=this._events||{},d=c[a]=c[a]||[];return-1==d.indexOf(b)&&d.push(b),this}},b.once=function(a,b){if(a&&b){this.on(a,b);var c=this._onceEvents=this._onceEvents||{},d=c[a]=c[a]||{};return d[b]=!0,this}},b.off=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=c.indexOf(b);return-1!=d&&c.splice(d,1),this}},b.emitEvent=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){c=c.slice(0),b=b||[];for(var d=this._onceEvents&&this._onceEvents[a],e=0;ea?pow(2,20*a-10)/2:(2-pow(2,-20*a+10))/2}});if(window.$us===undefined){window.$us={}} $us.mobileNavOpened=0;$us.header={isVertical:jQuery.noop,isHorizontal:jQuery.noop,isFixed:jQuery.noop,isTransparent:jQuery.noop,isHidden:jQuery.noop,isStickyEnabled:jQuery.noop,isStickyAutoHideEnabled:jQuery.noop,isSticky:jQuery.noop,isStickyAutoHidden:jQuery.noop,getScrollDirection:jQuery.noop,getAdminBarHeight:jQuery.noop,getHeight:jQuery.noop,getCurrentHeight:jQuery.noop,getScrollTop:jQuery.noop};jQuery.fn.usMod=function(mod,value){if(this.length==0)return this;if(value===undefined){var pcre=new RegExp('^.*?'+mod+'\_([a-zA-Z0-9\_\-]+).*?$');return(pcre.exec(this.get(0).className)||[])[1]||!1} this.each(function(_,item){item.className=item.className.replace(new RegExp('(^| )'+mod+'\_[a-zA-Z0-9\_\-]+( |$)'),'$2');if(value!==!1){item.className+=' '+mod+'_'+value}});return this};$us.toBool=function(value){if(typeof value=='string'){return(value=='true'||value=='True'||value=='TRUE'||value=='1')} if(typeof value=='boolean'){return value} return!!parseInt(value)};$us.getScript=function(url,callback){if(!$us.ajaxLoadJs){callback();return!1} if($us.loadedScripts===undefined){$us.loadedScripts={};$us.loadedScriptsFunct={}} if($us.loadedScripts[url]==='loaded'){callback();return}else if($us.loadedScripts[url]==='loading'){$us.loadedScriptsFunct[url].push(callback);return} $us.loadedScripts[url]='loading';$us.loadedScriptsFunct[url]=[];$us.loadedScriptsFunct[url].push(callback) var complete=function(){for(var i=0;i<$us.loadedScriptsFunct[url].length;i ++){if(typeof $us.loadedScriptsFunct[url][i]==='function'){$us.loadedScriptsFunct[url][i]()}} $us.loadedScripts[url]='loaded'};var options={dataType:"script",cache:!0,url:url,complete:complete};return jQuery.ajax(options)};$us.detectIE=function(){var ua=window.navigator.userAgent;var msie=ua.indexOf('MSIE ');if(msie>0){return parseInt(ua.substring(msie+5,ua.indexOf('.',msie)),10)} var trident=ua.indexOf('Trident/');if(trident>0){var rv=ua.indexOf('rv:');return parseInt(ua.substring(rv+3,ua.indexOf('.',rv)),10)} var edge=ua.indexOf('Edge/');if(edge>0){return parseInt(ua.substring(edge+5,ua.indexOf('.',edge)),10)} return!1};$us.getAnimationName=function(animationName,defaultAnimationName){if(jQuery.easing.hasOwnProperty(animationName)){return animationName} return defaultAnimationName?defaultAnimationName:jQuery.easing._default};$us.timeout=function(fn,delay){var start=new Date().getTime(),handle=new Object();function loop(){var current=new Date().getTime(),delta=current-start;delta>=delay?fn.call():handle.value=window.requestAnimationFrame(loop)};handle.value=window.requestAnimationFrame(loop);return handle};$us.clearTimeout=function(handle){if(handle){window.cancelAnimationFrame(handle.value)}};$us.debounce=function(fn,wait,immediate){var timeout,args,context,timestamp,result;if(null==wait)wait=100;function later(){var last=Date.now()-timestamp;if(last=0){timeout=setTimeout(later,wait-last)}else{timeout=null;if(!immediate){result=fn.apply(context,args);context=args=null}}} var debounced=function(){context=this;args=arguments;timestamp=Date.now();var callNow=immediate&&!timeout;if(!timeout)timeout=setTimeout(later,wait);if(callNow){result=fn.apply(context,args);context=args=null} return result};debounced.prototype={clear:function(){if(timeout){clearTimeout(timeout);timeout=null}},flush:function(){if(timeout){result=fn.apply(context,args);context=args=null;clearTimeout(timeout);timeout=null}}};return debounced};$us.mixins={};$us.mixins.Events={on:function(eventType,handler){if(this.$$events===undefined){this.$$events={}} if(this.$$events[eventType]===undefined){this.$$events[eventType]=[]} this.$$events[eventType].push(handler);return this},off:function(eventType,handler){if(this.$$events===undefined||this.$$events[eventType]===undefined){return this} if(handler!==undefined){var handlerPos=jQuery.inArray(handler,this.$$events[eventType]);if(handlerPos!=-1){this.$$events[eventType].splice(handlerPos,1)}}else{this.$$events[eventType]=[]} return this},trigger:function(eventType,extraParameters){if(this.$$events===undefined||this.$$events[eventType]===undefined||this.$$events[eventType].length==0){return this} var params=(arguments.length>2||!jQuery.isArray(extraParameters))?Array.prototype.slice.call(arguments,1):extraParameters;params.unshift(this);for(var index=0;index1);jQuery('html').toggleClass('ios-touch',!!jQuery.isMobile)} jQuery('html').toggleClass('no-touch',!jQuery.isMobile);jQuery('html').toggleClass('ie11',$us.detectIE()==11);!function($){$us.$window=$(window);$us.$document=$(document);$us.$html=$('html');$us.$body=$('.l-body:first');$us.$htmlBody=$us.$html.add($us.$body);$us.$canvas=$('.l-canvas:first')}(jQuery);!function($,undefined){"use strict";function USCanvas(options){var defaults={disableEffectsWidth:900,backToTopDisplay:100};this.options=$.extend({},defaults,options||{});this.$header=$('.l-header',$us.$canvas);this.$main=$('.l-main',$us.$canvas);this.$sections=$('> *:not(.l-header) .l-section',$us.$canvas);this.$firstSection=this.$sections.first();this.$firstStickySection=this.$sections.filter('.type_sticky:first:visible');this.$secondSection=this.$sections.eq(1);this.$fullscreenSections=this.$sections.filter('.full_height');this.$topLink=$('.w-toplink');this.type=$us.$canvas.usMod('type');this._headerPos=this.$header.usMod('pos');this.headerPos=this._headerPos;this.headerInitialPos=$us.$body.usMod('headerinpos');this.headerBg=this.$header.usMod('bg');this.rtl=$us.$body.hasClass('rtl');this.isScrolling=!1;this.isAndroid=/Android/i.test(navigator.userAgent);if(this.isStickySection()){if(!!window.IntersectionObserver){this.observer=(new IntersectionObserver(function(e){e[0].target.classList.toggle('is_sticky',e[0].intersectionRatio===1)}.bind(this),{threshold:[0,1]})).observe(this.$firstStickySection[0])}} if($us.$body.hasClass('us_iframe')){$('a:not([target])').each(function(){$(this).attr('target','_parent')});jQuery(function($){var $framePreloader=$('.l-popup-box-content .g-preloader',window.parent.document);$framePreloader.hide()})} $us.$window.on('scroll',this._events.scroll.bind(this)).on('resize load',this._events.resize.bind(this));$us.timeout(this._events.resize.bind(this),25);$us.timeout(this._events.resize.bind(this),75)} USCanvas.prototype={isStickySection:function(){return!!this.$firstStickySection.length},hasStickySection:function(){if(this.isStickySection()){return this.$firstStickySection.hasClass('is_sticky')} return!1},getHeightStickySection:function(){return this.isStickySection()?Math.ceil(this.$firstStickySection.outerHeight(!0)):0},getHeightFirstSection:function(){return this.$firstSection.length?parseInt(this.$firstSection.outerHeight(!0)):0},_events:{scroll:function(){var scrollTop=parseInt($us.$window.scrollTop());this.$topLink.toggleClass('active',(scrollTop>=this.winHeight*this.options.backToTopDisplay/100));if(this.isAndroid){if(this.pid){$us.clearTimeout(this.pid)} this.isScrolling=!0;this.pid=$us.timeout(function(){this.isScrolling=!1}.bind(this),100)}},resize:function(){this.winHeight=parseInt($us.$window.height());this.winWidth=parseInt($us.$window.width());$us.$body.toggleClass('disable_effects',(this.winWidth0&&!this.isScrolling)){this.$fullscreenSections.each(function(index,section){var $section=$(section),sectionHeight=this.winHeight,isFirstSection=(index==0&&$section.is(this.$firstSection));if(isFirstSection){sectionHeight-=$section.offset().top}else{sectionHeight-=$us.header.getCurrentHeight()} if($section.hasClass('valign_center')){var $sectionH=$section.find('.l-section-h'),sectionTopPadding=parseInt($section.css('padding-top')),contentHeight=$sectionH.outerHeight(),topMargin;$sectionH.css('margin-top','');var sectionOverlapped=(isFirstSection&&$us.header.isFixed()&&!$us.header.isTransparent()&&$us.header.isHorizontal());if(sectionOverlapped){topMargin=Math.max(0,(sectionHeight-sectionTopPadding-contentHeight)/2)}else{topMargin=Math.max(0,(sectionHeight-contentHeight)/2-sectionTopPadding)} $sectionH.css('margin-top',topMargin||'')}}.bind(this));$us.$canvas.trigger('contentChange')} if($us.$body.hasClass('us_iframe')){var $frameContent=$('.l-popup-box-content',window.parent.document),outerHeight=$us.$body.outerHeight(!0);if(outerHeight>0&&$(window.parent).height()>outerHeight){$frameContent.css('height',outerHeight)}else{$frameContent.css('height','')}} this._events.scroll.call(this)}}};$us.canvas=new USCanvas($us.canvasOptions||{})}(jQuery);!function(){jQuery.fn.resetInlineCSS=function(){for(var index=0;index=2){this.resetInlineCSS('transition');prevTimers.map(clearTimeout);this.removeData('animation-timers')} return this};jQuery.fn.performCSSTransition=function(css,duration,onFinish,easing,delay){duration=duration||250;delay=delay||25;easing=easing||'ease';var $this=this,transition=[];this.clearPreviousTransitions();for(var attr in css){if(!css.hasOwnProperty(attr)){continue} transition.push(attr+' '+(duration/1000)+'s '+easing)} transition=transition.join(', ');$this.css({transition:transition});var timer1=setTimeout(function(){$this.css(css)},delay);var timer2=setTimeout(function(){$this.resetInlineCSS('transition');if(typeof onFinish=='function'){onFinish()}},duration+delay);this.data('animation-timers',timer1+','+timer2)};jQuery.fn.slideDownCSS=function(duration,onFinish,easing,delay){if(this.length==0){return} var $this=this;this.clearPreviousTransitions();this.resetInlineCSS('padding-top','padding-bottom');var timer1=setTimeout(function(){var paddingTop=parseInt($this.css('padding-top')),paddingBottom=parseInt($this.css('padding-bottom'));$this.css({visibility:'hidden',position:'absolute',height:'auto','padding-top':0,'padding-bottom':0,display:'block'});var height=$this.height();$this.css({overflow:'hidden',height:'0px',opacity:0,visibility:'',position:''});$this.performCSSTransition({opacity:1,height:height+paddingTop+paddingBottom,'padding-top':paddingTop,'padding-bottom':paddingBottom},duration,function(){$this.resetInlineCSS('overflow').css('height','auto');if(typeof onFinish=='function'){onFinish()}},easing,delay)},25);this.data('animation-timers',timer1+',null')};jQuery.fn.slideUpCSS=function(duration,onFinish,easing,delay){if(this.length==0){return} this.clearPreviousTransitions();this.css({height:this.outerHeight(),overflow:'hidden','padding-top':this.css('padding-top'),'padding-bottom':this.css('padding-bottom')});var $this=this;this.performCSSTransition({height:0,opacity:0,'padding-top':0,'padding-bottom':0},duration,function(){$this.resetInlineCSS('overflow','padding-top','padding-bottom').css({display:'none'});if(typeof onFinish=='function'){onFinish()}},easing,delay)};jQuery.fn.fadeInCSS=function(duration,onFinish,easing,delay){if(this.length==0){return} this.clearPreviousTransitions();this.css({opacity:0,display:'block'});this.performCSSTransition({opacity:1},duration,onFinish,easing,delay)};jQuery.fn.fadeOutCSS=function(duration,onFinish,easing,delay){if(this.length==0){return} var $this=this;this.performCSSTransition({opacity:0},duration,function(){$this.css('display','none');if(typeof onFinish=='function'){onFinish()}},easing,delay)}}();jQuery(function($){"use strict";if(document.cookie.indexOf('us_cookie_notice_accepted=true')!==-1){$('.l-cookie').remove()}else{$(document).on('click','#us-set-cookie',function(e){e.preventDefault();e.stopPropagation();var d=new Date();d.setFullYear(d.getFullYear()+1);document.cookie='us_cookie_notice_accepted=true; expires='+d.toUTCString()+'; path=/;'+(location.protocol==='https:'?' secure;':'');$('.l-cookie').remove()})} var USPopupLink=function(context,options){var $links=$('a[ref=magnificPopup][class!=direct-link]:not(.inited)',context||document),defaultOptions={fixedContentPos:!0,mainClass:'mfp-fade',removalDelay:300,type:'image'};if($links.length){$us.getScript($us.templateDirectoryUri+'/common/js/vendor/magnific-popup.js',function(){$links.addClass('inited').magnificPopup($.extend({},defaultOptions,options||{}))})}};$.fn.wPopupLink=function(options){return this.each(function(){$(this).data('wPopupLink',new USPopupLink(this,options))})};$(document).wPopupLink();jQuery('.l-section-img:not(.loaded)').each(function(){var $this=$(this),img=new Image(),bgImg=$this.css('background-image')||'';if(bgImg.match(/url\(['"]*(.*?)['"]*\)/i)){img.onload=function(){if(!$this.hasClass('loaded')){$this.addClass('loaded')}};img.src=bgImg.replace(/url\(['"]*(.*?)['"]*\)/i,'$1')}else{$this.addClass('loaded')}});var USSectionVideo=function(container){this.$usSectionVideoContainer=$('.l-section-video',container);if(!this.$usSectionVideoContainer.length){return} $us.$window.on('resize load',function(){this.$usSectionVideoContainer.each(function(){var $videoContainer=$(this);if(!$videoContainer.data('video-disable-width')){return!1} if(window.innerWidthparseInt($us.canvasOptions.columnsStackingWidth)-1){$us.$canvas.css('margin-bottom',Math.round(footerHeight)-1)}else{$us.$canvas.css('margin-bottom','')}};usFooterReveal();$us.$window.on('resize load',function(){usFooterReveal()})}})();var $usYTVimeoVideoContainer=$('.with_youtube, .with_vimeo');if($usYTVimeoVideoContainer.length){$(window).on('resize load',function(){$usYTVimeoVideoContainer.each(function(){var $container=$(this),$frame=$container.find('iframe').first(),cHeight=$container.innerHeight(),cWidth=$container.innerWidth(),fWidth='',fHeight='';if(cWidth/cHeight<16/9){fWidth=cHeight*(16/9);fHeight=cHeight}else{fWidth=cWidth;fHeight=fWidth*(9/16)} $frame.css({'width':Math.round(fWidth),'height':Math.round(fHeight),})})})}});(function($,undefined){"use strict";function USWaypoints(){this.waypoints=[];$us.$canvas.on('contentChange',this._countAll.bind(this));$us.$window.on('resize load',this._events.resize.bind(this)).on('scroll scroll.waypoints',this._events.scroll.bind(this));$us.timeout(this._events.resize.bind(this),75);$us.timeout(this._events.scroll.bind(this),75)} USWaypoints.prototype={_events:{scroll:function(){var scrollTop=parseInt($us.$window.scrollTop());scrollTop=(scrollTop>=0)?scrollTop:0;for(var i=0;i *:first',this.$container);this.toggleHeight=this.$container.data('toggle-height')||200;this.$container.on('click','.toggle-show-more, .toggle-show-less',this._events.elmToggleShowMore.bind(this));if(!this.$container.closest('.owl-carousel').length){this.initHeightCheck.call(this)}},initHeightCheck:function(){var height=this.$firstElm.css('height',this.toggleHeight).height();this.$firstElm.css('height','');var elmHeight=this.$firstElm.height();if(elmHeight&&elmHeight<=height){$('.toggle-links',this.$container).hide();this.$firstElm.css('height','');this.$container.removeClass('with_show_more_toggle')}else{$('.toggle-links',this.$container).show();this.$firstElm.css('height',this.toggleHeight)}},_isVisible:function(){if(!this.$container.length){return!1} var w=window,d=document,rect=this.$container[0].getBoundingClientRect(),containerPosition={top:w.pageYOffset+rect.top,left:w.pageXOffset+rect.left,right:w.pageXOffset+rect.right,bottom:w.pageYOffset+rect.bottom},windowPosition={top:w.pageYOffset,left:w.pageXOffset,right:w.pageXOffset+d.documentElement.clientWidth,bottom:w.pageYOffset+d.documentElement.clientHeight};return(containerPosition.bottom>windowPosition.top&&containerPosition.topwindowPosition.left&&containerPosition.left-1)){return} if(hash!=''&&hash!='#'){if(this.blocks[hash]===undefined){var $target=$(hash),$type='';if($target.length==0){return} if($target.hasClass('g-cols')&&$target.parent().children().length==1){$target=$target.closest('.l-section')} if($target.hasClass('w-tabs-section')){var $newTarget=$target.closest('.w-tabs');if(!$newTarget.hasClass('accordion')){$target=$newTarget} $type='tab'}else if($target.hasClass('w-tabs')){$type='tabs'} this.blocks[hash]={target:$target,type:$type};this._countPosition(hash)} if($anchor.parent().length>0&&$anchor.parent().hasClass('menu-item')){var $menuIndicator=$anchor.closest('.menu-item');this.blocks[hash].menuItems=(this.blocks[hash].menuItems||$()).add($menuIndicator);var $menuAncestors=$menuIndicator.parents('.menu-item-has-children');if($menuAncestors.length>0){this.blocks[hash].menuAncestors=(this.blocks[hash].menuAncestors||$()).add($menuAncestors)}}else{this.blocks[hash].buttons=(this.blocks[hash].buttons||$()).add($anchor)}} $anchor.on('click',function(event){event.preventDefault();this.scrollTo(hash,!0);if(typeof this.blocks[hash]!=='undefined'){var block=this.blocks[hash];if($.inArray(block.type,['tab','tabs'])!==-1){var $linkedSection=block.target.find('.w-tabs-section[id="'+hash.substr(1)+'"]');if(block.type==='tabs'){$linkedSection=block.target.find('.w-tabs-section:first')}else if(block.target.hasClass('w-tabs-section')){$linkedSection=block.target} if($linkedSection.length){$linkedSection.find('.w-tabs-section-header').trigger('click')}}else if(block.menuItems!==undefined&&$.inArray($us.$body.usMod('state'),['mobiles','tablets'])!==-1&&$us.$body.hasClass('header-show')){$us.$body.removeClass('header-show')}}}.bind(this))}.bind(this))},getPlacePosition:function(place){var data={newY:0,type:''};if(place===''||place==='#'){data.newY=0;data.placeType='top'}else if(this.blocks[place]!==undefined){this._countPosition(place);data.newY=this.blocks[place].top;data.placeType='hash';place=this.blocks[place].target}else if(place instanceof $){if(place.hasClass('w-tabs-section')){var newPlace=place.closest('.w-tabs');if(!newPlace.hasClass('accordion')){place=newPlace}} data.newY=Math.floor(place.offset().top-this._canvasTopOffset);data.placeType='element'}else{data.newY=Math.floor(place-this._canvasTopOffset)} if($us.header.isHorizontal()&&$us.canvas.hasStickySection()){data.newY-=$us.canvas.getHeightStickySection()} return data},scrollTo:function(place,animate){var offset=this.getPlacePosition.call(this,place),indicateActive=function(){if(offset.type==='hash'){this._indicatePosition(place)}else{this.scroll()}}.bind(this);if(animate){if(navigator.userAgent.match(/iPad/i)!=null&&$('.us_iframe').length&&offset.type=='hash'){$(place)[0].scrollIntoView({behavior:"smooth",block:"start"})} var scrollTop=parseInt($us.$window.scrollTop()),scrollDirections=scrollTop=0)?scrollTop:0;if(!this.isScrolling){var activeHash;for(var hash in this.blocks){if(!this.blocks[hash]){continue} var top=this.blocks[hash].top,$target=this.blocks[hash].target;if(!$us.header.isHorizontal()){top-=$us.header.getAdminBarHeight()}else{if($us.header.isStickyEnabled()){top-=this.headerHeight} if($us.canvas.hasStickySection()){top-=$us.canvas.getHeightStickySection()}} if(scrollTop>=top&&scrollTop<=(top+$target.outerHeight(!1))){activeHash=hash}} $us.debounce(this._indicatePosition.bind(this,activeHash),1)()}},resize:function(){$us.timeout(function(){this._countAllPositions();this.scroll()}.bind(this),150);this._countAllPositions();this.scroll()}};$(function(){$us.scroll=new USScroll($us.scrollOptions||{})})}(jQuery);(function($){"use strict";var USAnimate=function(container){this.$container=$(container);this.$items=$('[class*="animate_"]',this.$container).not('.off_autostart');this.$items.each(function(_,item){var $item=$(item);if($item.data('_animate_inited')||$item.is('.off_autostart')){return} $item.data('_animate_inited',!0);$us.waypoints.add($item,'12%',function($elm){if(!$elm.hasClass('start')){$us.timeout(function(){$elm.addClass('start')},20)}})})};window.USAnimate=USAnimate;new USAnimate(document);$('.wpb_animate_when_almost_visible').each(function(){$us.waypoints.add($(this),'12%',function($elm){if(!$elm.hasClass('wpb_start_animation')){$us.timeout(function(){$elm.addClass('wpb_start_animation')},20)}})})})(jQuery);!function($){"use strict";$us.CommnentsForm=function(container,options){this.init(container,options)};$us.CommnentsForm.prototype={init:function(container,options){this.$container=$(container);this.$form=this.$container.find('form.comment-form');if(!this.$form.length){return} this.$jsonContainer=this.$container.find('.us-comments-json');if(!this.$jsonContainer.length){return} this.jsonData=this.$jsonContainer[0].onclick()||{};this.$jsonContainer.remove();this.$fields={content:{field:this.$form.find('textarea'),msg:this.jsonData.no_content_msg||'Please enter a Message'},name:{field:this.$form.find('.for_text input[type="text"]'),msg:this.jsonData.no_name_msg||'Please enter your Name'},email:{field:this.$form.find('.for_email input[type="email"]'),msg:this.jsonData.no_email_msg||'Please enter a valid email address.'}};this._events={formSubmit:this.formSubmit.bind(this)};this.$form.on('submit',this._events.formSubmit)},formSubmit:function(event){this.$form.find('.w-form-row.check_wrong').removeClass('check_wrong');this.$form.find('.w-form-state').html('');for(var i in this.$fields){if(this.$fields[i].field.length==0){continue} if(this.$fields[i].field.val()==''&&this.$fields[i].field.attr('data-required')){this.$fields[i].field.closest('.w-form-row').toggleClass('check_wrong');this.$fields[i].field.closest('.w-form-row').find('.w-form-row-state').html(this.$fields[i].msg);event.preventDefault()}}}};$.fn.CommnentsForm=function(options){return this.each(function(){$(this).data('CommnentsForm',new $us.CommnentsForm(this,options))})};$(function(){$('.w-post-elm.post_comments.layout_comments_template').CommnentsForm();$('.l-section.for_comments').CommnentsForm()})}(jQuery);!function($){var USCounterNumber=function(container){this.$container=$(container);this.initialString=this.$container.html()+'';this.finalString=this.$container.data('final')+'';this.format=this.getFormat(this.initialString,this.finalString);if(this.format.decMark){var pattern=new RegExp('[^0-9\/'+this.format.decMark+']+','g');this.initial=parseFloat(this.initialString.replace(pattern,'').replace(this.format.decMark,'.'));this.final=parseFloat(this.finalString.replace(pattern,'').replace(this.format.decMark,'.'))}else{this.initial=parseInt(this.initialString.replace(/[^0-9]+/g,''));this.final=parseInt(this.finalString.replace(/[^0-9]+/g,''))} if(this.format.accounting){if(this.initialString.length>0&&this.initialString[0]=='('){this.initial=-this.initial} if(this.finalString.length>0&&this.finalString[0]=='('){this.final=-this.final}}};USCounterNumber.prototype={step:function(now){var value=(1-now)*this.initial+this.final*now,intPart=Math[this.format.decMark?'floor':'round'](value).toString(),result='';if(this.format.zerofill){intPart='0'.repeat(this.format.intDigits-intPart.length)+intPart} if(this.format.groupMark){if(this.format.indian){result+=intPart.replace(/(\d)(?=(\d\d)+\d$)/g,'$1'+this.format.groupMark)}else{result+=intPart.replace(/\B(?=(\d{3})+(?!\d))/g,this.format.groupMark)}}else{result+=intPart} if(this.format.decMark){var decimalPart=(value%1).toFixed(this.format.decDigits).substring(2);result+=this.format.decMark+decimalPart} if(this.format.accounting&&result.length>0&&result[0]=='-'){result='('+result.substring(1)+')'} this.$container.html(result)},getFormat:function(initial,final){var iFormat=this._getFormat(initial),fFormat=this._getFormat(final),format=$.extend({},iFormat,fFormat);if(format.groupMark==format.decMark){delete format.groupMark} return format},_getFormat:function(str){var marks=str.replace(/[0-9\(\)\-]+/g,''),format={};if(str.charAt(0)=='('){format.accounting=!0} if(/^0[0-9]/.test(str)){format.zerofill=!0} str=str.replace(/[\(\)\-]/g,'');if(marks.length!=0){if(marks.length>1){format.groupMark=marks.charAt(0);if(marks.charAt(0)!=marks.charAt(marks.length-1)){format.decMark=marks.charAt(marks.length-1)} if(str.split(format.groupMark).length>2&&str.split(format.groupMark)[1].length==2){format.indian=!0}}else{format[(((str.length-1)-str.indexOf(marks))==3&&marks!=='.')?'groupMark':'decMark']=marks} if(format.decMark){format.decDigits=str.length-str.indexOf(format.decMark)-1}} if(format.zerofill){format.intDigits=str.replace(/[^\d]+/g,'').length-(format.decDigits||0)} return format}};var USCounterText=function(container){this.$container=$(container);this.initial=this.$container.text()+'';this.final=this.$container.data('final')+'';this.partsStates=this.getStates(this.initial,this.final);this.len=1/(this.partsStates.length-1);this.curState=0};USCounterText.prototype={step:function(now){var state=Math.round(Math.max(0,now/this.len));if(state==this.curState){return} this.$container.html(this.partsStates[state]);this.curState=state},getStates:function(initial,final){var dist=[],i,j;for(i=0;i<=initial.length;i ++){dist[i]=[i]} for(j=1;j<=final.length;j ++){dist[0][j]=j;for(i=1;i<=initial.length;i ++){dist[i][j]=(initial[i-1]===final[j-1])?dist[i-1][j-1]:(Math.min(dist[i-1][j],dist[i][j-1],dist[i-1][j-1])+1)}} var states=[final];for(i=initial.length,j=final.length;i>0||j>0;i --,j --){var min=dist[i][j];if(i>0){min=Math.min(min,dist[i-1][j],(j>0)?dist[i-1][j-1]:min)} if(j>0){min=Math.min(min,dist[i][j-1])} if(min>=dist[i][j]){continue} if(min==dist[i][j-1]){states.unshift(states[0].substring(0,j-1)+states[0].substring(j));i ++}else if(min==dist[i-1][j-1]){states.unshift(states[0].substring(0,j-1)+initial[i-1]+states[0].substring(j))}else if(min==dist[i-1][j]){states.unshift(states[0].substring(0,j)+initial[i-1]+states[0].substring(j));j ++}} return states}};var USCounter=function(container){this.$container=$(container);this.parts=[];this.duration=parseInt(this.$container.data('duration')||2000);this.$container.find('.w-counter-value-part').each(function(index,part){var $part=$(part);if($part.html()+''==$part.data('final')+''){return} var type=$part.usMod('type');if(type=='number'){this.parts.push(new USCounterNumber($part))}else{this.parts.push(new USCounterText($part))}}.bind(this));if(window.$us!==undefined&&window.$us.scroll!==undefined){$us.waypoints.add(this.$container,'15%',this.animate.bind(this))}else{this.animate()}};USCounter.prototype={animate:function(duration){this.$container.css('w-counter',0).animate({'w-counter':1},{duration:this.duration,step:this.step.bind(this)})},step:function(now){for(var i=0;i .pagination',this.$container);this.$preloader=$('.w-grid-preloader',this.$container);this.$style=$('> style:first',this.$container);this.loading=!1;this.changeUpdateState=!1;this.gridFilter=null;this.curFilterTaxonomy='';this.paginationType=this.$pagination.length?'regular':(this.$loadmore.length?'ajax':'none');this.filterTaxonomyName=this.$list.data('filter_taxonomy_name')?this.$list.data('filter_taxonomy_name'):'category';if(this.$container.data('gridInit')==1){return} this.$container.data('gridInit',1);var $jsonContainer=$('.w-grid-json',this.$container);if($jsonContainer.length&&$jsonContainer.is('[onclick]')){this.ajaxData=$jsonContainer[0].onclick()||{};this.ajaxUrl=this.ajaxData.ajax_url||'';$jsonContainer.remove()}else{this.ajaxData={};this.ajaxUrl=''} this.carouselSettings=this.ajaxData.carousel_settings;this.breakpoints=this.ajaxData.carousel_breakpoints||{};if($us.detectIE()==11){$us.getScript($us.templateDirectoryUri+'/common/js/vendor/objectFitPolyfill.js',function(){objectFitPolyfill()})} if(this.$list.hasClass('owl-carousel')){$us.getScript($us.templateDirectoryUri+'/common/js/vendor/owl.carousel.js',function(){this.carouselOptions={autoHeight:this.carouselSettings.autoHeight,autoplay:this.carouselSettings.autoplay,autoplayHoverPause:!0,autoplayTimeout:this.carouselSettings.timeout,center:this.carouselSettings.center,dots:this.carouselSettings.dots,items:parseInt(this.carouselSettings.items),loop:this.carouselSettings.loop,mouseDrag:!jQuery.isMobile,nav:this.carouselSettings.nav,navElement:'div',navText:['',''],responsive:{},rewind:!this.carouselSettings.loop,stagePadding:0,rtl:$('.l-body').hasClass('rtl'),slideBy:this.carouselSettings.slideby,slideTransition:this.carouselSettings.transition,smartSpeed:this.carouselSettings.speed};if(this.carouselSettings.smooth_play==1){this.carouselOptions.slideTransition='linear';this.carouselOptions.autoplaySpeed=this.carouselSettings.timeout;this.carouselOptions.slideBy=1} if(this.carouselSettings.carousel_fade){$.extend(this.carouselOptions,{animateOut:'fadeOut',animateIn:'fadeIn',})} $.each(this.breakpoints,function(breakpointWidth,breakpointArgs){if(breakpointArgs!==undefined&&breakpointArgs.items!==undefined){this.carouselOptions.responsive[breakpointWidth]=breakpointArgs;this.carouselOptions.responsive[breakpointWidth].items=parseInt(breakpointArgs.items)}}.bind(this));this.$list.on('initialized.owl.carousel',function(e){var $list=$(this);$('[data-toggle-height]',e.currentTarget).each(function(_,item){var usToggle=$(item).data('usToggleMoreContent');if(usToggle instanceof $us.ToggleMoreContent){usToggle.initHeightCheck();$us.timeout(function(){$list.trigger('refresh.owl.carousel')},1)}});if($.isMobile&&$list.closest('.w-tabs-section.active').length){$us.timeout(function(){$list.trigger('refresh.owl.carousel')},50)}}).on('mousedown.owl.core',function(){var $target=$(this);if($('[data-toggle-height]',$target).length&&!jQuery.isMobile){var owlCarousel=$target.data('owl.carousel');owlCarousel.$stage.off('mousedown.owl.core')}});this.$list.owlCarousel(this.carouselOptions)}.bind(this))} if(this.$container.hasClass('popup_page')){if(this.ajaxData==undefined){return} this.lightboxTimer=null;this.$lightboxOverlay=this.$container.find('.l-popup-overlay');this.$lightboxWrap=this.$container.find('.l-popup-wrap');this.$lightboxBox=this.$container.find('.l-popup-box');this.$lightboxContent=this.$container.find('.l-popup-box-content');this.$lightboxContentPreloader=this.$lightboxContent.find('.g-preloader');this.$lightboxContentFrame=this.$container.find('.l-popup-box-content-frame');this.$lightboxNextArrow=this.$container.find('.l-popup-arrow.to_next');this.$lightboxPrevArrow=this.$container.find('.l-popup-arrow.to_prev');this.$container.find('.l-popup-closer').click(function(){this.hideLightbox()}.bind(this));this.$container.find('.l-popup-box').click(function(){this.hideLightbox()}.bind(this));this.$container.find('.l-popup-box-content').click(function(e){e.stopPropagation()}.bind(this));this.originalURL=window.location.href;this.lightboxOpened=!1;if(this.$list.hasClass('owl-carousel')){$us.getScript($us.templateDirectoryUri+'/common/js/vendor/owl.carousel.js',function(){this.initLightboxAnchors()}.bind(this))}else{this.initLightboxAnchors()} $(window).on('resize',function(){if(this.lightboxOpened&&$us.$window.width()<$us.canvasOptions.disableEffectsWidth){this.hideLightbox()}}.bind(this))} if(this.$list.hasClass('owl-carousel')){return} if(this.paginationType!='none'||this.$filters.length){if(this.ajaxData==undefined){return} this.templateVars=this.ajaxData.template_vars||{};if(this.filterTaxonomyName){this.initialFilterTaxonomy=this.$list.data('filter_default_taxonomies')?this.$list.data('filter_default_taxonomies').toString().split(','):'';this.curFilterTaxonomy=this.initialFilterTaxonomy} this.curPage=this.ajaxData.current_page||1;this.perpage=this.ajaxData.perpage||this.$items.length;this.infiniteScroll=this.ajaxData.infinite_scroll||0} if(this.$container.hasClass('with_isotope')){$us.getScript($us.templateDirectoryUri+'/common/js/vendor/isotope.js',function(){this.$list.imagesLoaded(function(){var smallestItemSelector,isotopeOptions={itemSelector:'.w-grid-item',layoutMode:(this.$container.hasClass('isotope_fit_rows'))?'fitRows':'masonry',isOriginLeft:!$('.l-body').hasClass('rtl'),transitionDuration:0};if(this.$list.find('.size_1x1').length){smallestItemSelector='.size_1x1'}else if(this.$list.find('.size_1x2').length){smallestItemSelector='.size_1x2'}else if(this.$list.find('.size_2x1').length){smallestItemSelector='.size_2x1'}else if(this.$list.find('.size_2x2').length){smallestItemSelector='.size_2x2'} if(smallestItemSelector){smallestItemSelector=smallestItemSelector||'.w-grid-item';isotopeOptions.masonry={columnWidth:smallestItemSelector}} this.$list.on('layoutComplete',function(){if(window.USAnimate){$('.w-grid-item.off_autostart',this.$list).removeClass('off_autostart');new USAnimate(this.$list)} $us.$window.trigger('scroll.waypoints')}.bind(this));this.$list.isotope(isotopeOptions);if(this.paginationType=='ajax'){this.initAjaxPagination()} $us.$canvas.on('contentChange',function(){this.$list.imagesLoaded(function(){this.$list.isotope('layout')}.bind(this))}.bind(this))}.bind(this))}.bind(this))}else if(this.paginationType=='ajax'){this.initAjaxPagination()} this.$filters.each(function(index,filter){var $filter=$(filter),taxonomy=$filter.data('taxonomy');$filter.on('click',function(){if(taxonomy!=this.curFilterTaxonomy){if(this.loading){return} this.setState(1,taxonomy);this.$filters.removeClass('active');$filter.addClass('active')}}.bind(this))}.bind(this));if(this.$container.closest('.l-main').length){$us.$body.on('us_grid.updateState',this._events.updateState.bind(this)).on('us_grid.updateOrderBy',this._events.updateOrderBy.bind(this))} this.$list.on('click','[ref=magnificPopup]',this._events.initMagnificPopup.bind(this))},_events:{updateState:function(e,params,page,gridFilter){if(!this.$container.is('[data-filterable="true"]')||!this.$container.hasClass('used_by_grid_filter')){return} page=page||1;this.changeUpdateState=!0;this.gridFilter=gridFilter;if(this.ajaxData===undefined){this.ajaxData={}} if(!this.hasOwnProperty('templateVars')){this.templateVars=this.ajaxData.template_vars||{query_args:{}}} this.templateVars.us_grid_filter_params=params;if(this.templateVars.query_args!==!1){this.templateVars.query_args.paged=page} this.templateVars.filters_args=gridFilter.filtersArgs||{};this.setState(page);if(this.paginationType==='regular'&&/page(=|\/)/.test(location.href)){var url=location.href.replace(/(page(=|\/))(\d+)(\/?)/,'$1'+page+'$2');history.replaceState(document.title,document.title,url)}},updateOrderBy:function(e,orderby,page,gridOrder){if(!this.$container.is('[data-filterable="true"]')||!this.$container.hasClass('used_by_grid_order')){return} page=page||1;this.changeUpdateState=!0;if(!this.hasOwnProperty('templateVars')){this.templateVars=this.ajaxData.template_vars||{query_args:{}}} if(this.templateVars.query_args!==!1){this.templateVars.query_args.paged=page} this.templateVars.grid_orderby=orderby;this.setState(page)},initMagnificPopup:function(e){e.stopPropagation();e.preventDefault();var $target=$(e.currentTarget);if($target.data('magnificPopup')===undefined){$target.magnificPopup({type:'image',mainClass:'mfp-fade'});$target.trigger('click')}}},initLightboxAnchors:function(){this.$anchors=this.$list.find('.w-grid-item-anchor');this.$anchors.on('click',function(e){var $clicked=$(e.target),$item=$clicked.closest('.w-grid-item'),$anchor=$item.find('.w-grid-item-anchor'),itemUrl=$anchor.attr('href');if(!$item.hasClass('custom-link')){if($us.$window.width()>=$us.canvasOptions.disableEffectsWidth){e.stopPropagation();e.preventDefault();this.openLightboxItem(itemUrl,$item)}}}.bind(this))},initAjaxPagination:function(){this.$loadmore.on('click',function(){if(this.curPage .w-grid-none');if($none.length){$none.hide()} if(this.$filters.length&&!this.changeUpdateState){taxonomy=taxonomy||this.curFilterTaxonomy;if(taxonomy=='*'){taxonomy=this.initialFilterTaxonomy} if(taxonomy!=''){var newTaxArgs={'taxonomy':this.filterTaxonomyName,'field':'slug','terms':taxonomy},taxQueryFound=!1;if(this.templateVars.query_args.tax_query==undefined){this.templateVars.query_args.tax_query=[]}else{$.each(this.templateVars.query_args.tax_query,function(index,taxArgs){if(taxArgs!=null&&taxArgs.taxonomy==this.filterTaxonomyName){this.templateVars.query_args.tax_query[index]=newTaxArgs;taxQueryFound=!0;return!1}}.bind(this))} if(!taxQueryFound){this.templateVars.query_args.tax_query.push(newTaxArgs)}}else if(this.templateVars.query_args.tax_query!=undefined){$.each(this.templateVars.query_args.tax_query,function(index,taxArgs){if(taxArgs!=null&&taxArgs.taxonomy==this.filterTaxonomyName){this.templateVars.query_args.tax_query[index]=null;return!1}}.bind(this))}} this.templateVars.query_args.paged=page;if(this.paginationType=='ajax'){if(page==1){this.$loadmore.addClass('done')}else{this.$loadmore.addClass('loading')} if(!this.infiniteScroll){this.prevScrollTop=$us.$window.scrollTop()}} if(this.paginationType!='ajax'||page==1){this.$preloader.addClass('active');if(this.$list.data('isotope')){this.$list.isotope('remove',this.$container.find('.w-grid-item'));this.$list.isotope('layout')}else{this.$container.find('.w-grid-item').remove()}} this.ajaxData.template_vars=JSON.stringify(this.templateVars);var isotope=this.$list.data('isotope');if(isotope&&page==1){this.$list.html('');isotope.remove(isotope.items);isotope.reloadItems()} if(this.xhr!==undefined){this.xhr.abort()} this.xhr=$.ajax({type:'post',url:this.ajaxData.ajax_url,data:this.ajaxData,success:function(html){var $result=$(html),$container=$('.w-grid-list',$result),$pagination=$('.pagination > *',$result),$items=$container.children(),smallestItemSelector;$container.imagesLoaded(function(){this.beforeAppendItems($items);$items.appendTo(this.$list);$container.html('');var $sliders=$items.find('.w-slider');this.afterAppendItems($items);if(isotope){isotope.insert($items);isotope.reloadItems()} if($sliders.length){$us.getScript($us.templateDirectoryUri+'/common/js/vendor/royalslider.js',function(){$sliders.each(function(index,slider){$(slider).wSlider().find('.royalSlider').data('royalSlider').ev.on('rsAfterInit',function(){if(isotope){this.$list.isotope('layout')}})}.bind(this))}.bind(this))} if(isotope){if(this.$list.find('.size_1x1').length){smallestItemSelector='.size_1x1'}else if(this.$list.find('.size_1x2').length){smallestItemSelector='.size_1x2'}else if(this.$list.find('.size_2x1').length){smallestItemSelector='.size_2x1'}else if(this.$list.find('.size_2x2').length){smallestItemSelector='.size_2x2'} if(isotope.options.masonry){isotope.options.masonry.columnWidth=smallestItemSelector||'.w-grid-item'} this.$list.isotope('layout');this.$list.trigger('layoutComplete')} if(this.paginationType=='ajax'){if($items.find('.w-tabs').length>0){$('.w-tabs',$items).each(function(){$(this).wTabs()})} if(page==1){var $jsonContainer=$result.find('.w-grid-json');if($jsonContainer.length){var ajaxData=$jsonContainer[0].onclick()||{};this.ajaxData.max_num_pages=ajaxData.max_num_pages||this.ajaxData.max_num_pages}else{this.ajaxData.max_num_pages=1}} if(this.templateVars.query_args.paged>=this.ajaxData.max_num_pages||!$items.length){this.$loadmore.addClass('done')}else{this.$loadmore.removeClass('done');this.$loadmore.removeClass('loading')} if(this.infiniteScroll){$us.waypoints.add(this.$loadmore,'-70%',function(){if(!this.loading){this.$loadmore.click()}}.bind(this))}else if(Math.round(this.prevScrollTop)!=Math.round($us.$window.scrollTop())){$us.$window.scrollTop(this.prevScrollTop)} if($us.detectIE()==11){objectFitPolyfill()}}else if(this.paginationType==='regular'&&this.changeUpdateState){$('a[href]',$pagination).each(function(_,item){var $item=$(item),pathname=location.pathname.replace(/((\/page.*)?)\/$/,'');$item.attr('href',pathname+$item.attr('href'))});this.$pagination.html($pagination)} if(this.$container.hasClass('popup_page')){$.each($items,function(index,item){var $loadedItem=$(item),$anchor=$loadedItem.find('.w-grid-item-anchor'),itemUrl=$anchor.attr('href');if(!$loadedItem.hasClass('custom-link')){$anchor.click(function(e){if($us.$window.width()>=$us.canvasOptions.disableEffectsWidth){e.stopPropagation();e.preventDefault();this.openLightboxItem(itemUrl,$loadedItem)}}.bind(this))}}.bind(this))} if(this.changeUpdateState&&$result.find('.w-grid-none').length){if(!$none.length){this.$container.prepend($result.find('.w-grid-none'))}else{$none.show()} this.none=!0} if(this.changeUpdateState&&this.gridFilter){var $jsonData=$result.filter('.w-grid-filter-json-data:first');if($jsonData.length){this.gridFilter.trigger('us_grid_filter.update-items-amount',$jsonData[0].onclick()||{})} $jsonData.remove()} var customStyles=$('style#grid-post-content-css',$result).html()||'';if(customStyles){if(!this.$style.length){this.$style=$('');this.$container.append(this.$style)} this.$style.text(this.$style.text()+customStyles)} $us.$canvas.resize();this.$preloader.removeClass('active');if(window.USAnimate&&this.$container.is('.with_css_animation')){new USAnimate(this.$container)}}.bind(this));this.loading=!1}.bind(this),error:function(){this.$loadmore.removeClass('loading')}.bind(this)});this.curPage=page;this.curFilterTaxonomy=taxonomy},_hasScrollbar:function(){return document.documentElement.scrollHeight>document.documentElement.clientHeight},_getScrollbarSize:function(){if($us.scrollbarSize===undefined){var scrollDiv=document.createElement('div');scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';document.body.appendChild(scrollDiv);$us.scrollbarSize=scrollDiv.offsetWidth-scrollDiv.clientWidth;document.body.removeChild(scrollDiv)} return $us.scrollbarSize},openLightboxItem:function(itemUrl,$item){this.showLightbox();var $nextItem=$item.nextAll('article:visible:not(.custom-link)').first(),$prevItem=$item.prevAll('article:visible:not(.custom-link)').first();if($nextItem.length!=0){this.$lightboxNextArrow.show();this.$lightboxNextArrow.attr('title',$nextItem.find('.w-grid-item-title').text());this.$lightboxNextArrow.off('click').click(function(e){var $nextItemAnchor=$nextItem.find('.w-grid-item-anchor'),nextItemUrl=$nextItemAnchor.attr('href');e.stopPropagation();e.preventDefault();this.openLightboxItem(nextItemUrl,$nextItem)}.bind(this))}else{this.$lightboxNextArrow.attr('title','');this.$lightboxNextArrow.hide()} if($prevItem.length!=0){this.$lightboxPrevArrow.show();this.$lightboxPrevArrow.attr('title',$prevItem.find('.w-grid-item-title').text());this.$lightboxPrevArrow.off('click').on('click',function(e){var $prevItemAnchor=$prevItem.find('.w-grid-item-anchor'),prevItemUrl=$prevItemAnchor.attr('href');e.stopPropagation();e.preventDefault();this.openLightboxItem(prevItemUrl,$prevItem)}.bind(this))}else{this.$lightboxPrevArrow.attr('title','');this.$lightboxPrevArrow.hide()} if(itemUrl.indexOf('?')!==-1){this.$lightboxContentFrame.attr('src',itemUrl+'&us_iframe=1')}else{this.$lightboxContentFrame.attr('src',itemUrl+'?us_iframe=1')} if(history.replaceState){history.replaceState(null,null,itemUrl)} this.$lightboxContentFrame.off('load').on('load',function(){this.lightboxContentLoaded()}.bind(this))},lightboxContentLoaded:function(){this.$lightboxContentPreloader.css('display','none');this.$lightboxContentFrame.contents().find('body').off('keyup.usCloseLightbox').on('keyup.usCloseLightbox',function(e){if(e.key==="Escape"){this.hideLightbox()}}.bind(this))},showLightbox:function(){clearTimeout(this.lightboxTimer);this.$lightboxOverlay.appendTo($us.$body).show();this.$lightboxWrap.appendTo($us.$body).show();this.lightboxOpened=!0;this.$lightboxContentPreloader.css('display','block');$us.$html.addClass('usoverlay_fixed');if(!$.isMobile){this.windowHasScrollbar=this._hasScrollbar();if(this.windowHasScrollbar&&this._getScrollbarSize()){$us.$html.css('margin-right',this._getScrollbarSize())}} this.lightboxTimer=setTimeout(function(){this.afterShowLightbox()}.bind(this),25)},afterShowLightbox:function(){clearTimeout(this.lightboxTimer);this.$container.on('keyup',function(e){if(this.$container.hasClass('popup_page')){if(e.key==="Escape"){this.hideLightbox()}}}.bind(this));this.$lightboxOverlay.addClass('active');this.$lightboxBox.addClass('active');$us.$canvas.trigger('contentChange');$us.$window.trigger('resize')},hideLightbox:function(){clearTimeout(this.lightboxTimer);this.lightboxOpened=!1;this.$lightboxOverlay.removeClass('active');this.$lightboxBox.removeClass('active');if(history.replaceState){history.replaceState(null,null,this.originalURL)} this.lightboxTimer=setTimeout(function(){this.afterHideLightbox()}.bind(this),500)},afterHideLightbox:function(){this.$container.off('keyup');clearTimeout(this.lightboxTimer);this.$lightboxOverlay.appendTo(this.$container).hide();this.$lightboxWrap.appendTo(this.$container).hide();this.$lightboxContentFrame.attr('src','about:blank');$us.$html.removeClass('usoverlay_fixed');if(!$.isMobile){if(this.windowHasScrollbar){$us.$html.css('margin-right','')}}},beforeAppendItems:function($items){if($('[data-toggle-height]',$items).length){var handle=$us.timeout(function(){$('[data-toggle-height]',$items).usToggleMoreContent();$us.clearTimeout(handle)},1)}},afterAppendItems:function($items){}};$.fn.wGrid=function(options){return this.each(function(){$(this).data('wGrid',new $us.WGrid(this,options))})};$(function(){$('.w-grid').wGrid()});$('.w-grid-list').each(function(){var $list=$(this);if(!$list.find('[ref=magnificPopupGrid]').length){return} $us.getScript($us.templateDirectoryUri+'/common/js/vendor/magnific-popup.js',function(){var delegateStr='a[ref=magnificPopupGrid]:visible',popupOptions;if($list.hasClass('owl-carousel')){delegateStr='.owl-item:not(.cloned) a[ref=magnificPopupGrid]'} popupOptions={type:'image',delegate:delegateStr,gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1],tPrev:$us.langOptions.magnificPopup.tPrev,tNext:$us.langOptions.magnificPopup.tNext,tCounter:$us.langOptions.magnificPopup.tCounter},removalDelay:300,mainClass:'mfp-fade',fixedContentPos:!0,callbacks:{beforeOpen:function(){var owlCarousel=$list.data('owl.carousel');if(owlCarousel&&owlCarousel.settings.autoplay){$list.trigger('stop.owl.autoplay')}},beforeClose:function(){var owlCarousel=$list.data('owl.carousel');if(owlCarousel&&owlCarousel.settings.autoplay){$list.trigger('play.owl.autoplay')}}}};$list.magnificPopup(popupOptions);if($list.hasClass('owl-carousel')){$list.on('initialized.owl.carousel',function(initEvent){var $currentList=$(initEvent.currentTarget),items={};$('.owl-item:not(.cloned)',$currentList).each(function(_,item){var $item=$(item),id=$item.find('[data-id]').data('id');if(!items.hasOwnProperty(id)){items[id]=$item}});$currentList.on('click','.owl-item.cloned',function(e){e.preventDefault();e.stopPropagation();var $target=$(e.currentTarget),id=$target.find('[data-id]').data('id');if(items.hasOwnProperty(id)){$('a[ref=magnificPopupGrid]',items[id]).trigger('click')}})})}})})})(jQuery);(function($,undefined){"use strict";$us.WGridFilter=function(container,options){this.init(container,options)};$.extend($us.WGridFilter.prototype,$us.mixins.Events,{init:function(container,options){this.defaultOptions={filterPrefix:'filter',gridNotFoundMessage:!1,gridPaginationSelector:'.w-grid-pagination',gridSelector:'.w-grid[data-filterable="true"]:first',layout:'hor',mobileWidth:600};this.options=$.extend(this.defaultOptions,options);this.filtersArgs={};this.$container=$(container);this.$filtersItem=$('.w-filter-item',this.$container);this.$grid=$(this.options.gridSelector,$us.$canvas.find('.l-main'));if(this.$container.is('[onclick]')){$.extend(this.options,this.$container[0].onclick()||{});this.$container.removeAttr('onclick')} var $filtersArgs=this.$container.find('.w-filter-json-filters-args:first');if($filtersArgs.length){this.filtersArgs=$filtersArgs[0].onclick()||{};$filtersArgs.remove()} if(!this.$grid.length&&this.options.gridNotFoundMessage){this.$container.prepend('
'+this.options.gridNotFoundMessage+'
')} this.$grid.addClass('used_by_grid_filter');this.$container.on('click','.w-filter-opener',this._events.filterOpener.bind(this)).on('click','.w-filter-list-closer, .w-filter-list-panel > a',this._events.filterListCloser.bind(this));this.$filtersItem.on('change','input, select',this._events.changeFilter.bind(this)).on('click','.w-filter-item-reset',this._events.resetItem.bind(this));$(this.options.gridPaginationSelector,this.$grid).on('click','.page-numbers',this._events.loadPageNumber.bind(this));$us.$window.on('resize load',$us.debounce(this._events.resize.bind(this),100));this.on('changeItemValue',this._events.toggleItemValue.bind(this));if(this.$container.hasClass('show_on_click')){this.$filtersItem.on('click','.w-filter-item-title',this._events.showItem.bind(this));$(document).mouseup(this._events.hideItem.bind(this))} $('form.woocommerce-ordering',$us.$canvas).off('change','select.orderby').on('change','select.orderby',this._events.woocommerceOrdering.bind(this));this.checkItemValues.call(this);this.$container.toggleClass('active',this.$filtersItem.is('.has_value'));this.on('us_grid_filter.update-items-amount',this._events.updateItemsAmount.bind(this));this._events.resize.call(this)},isMobile:function(){return parseInt($us.$window.width())1){title+=': '+$selected.length}}} if(uiType==='dropdown'){var value=$('select:first',$item).val();hasValue=(value!=='*')?!!value:''} if(uiType==='range'){var value=$('input[type="hidden"]:first',$item).val();hasValue=!!value;if(this.options.layout=='hor'&&value){title+=': '+value}} $item.toggleClass('has_value',!!hasValue);$('> .w-filter-item-title:first > span',item).html(title)},resize:function(){this.$container.usMod('state',this.isMobile()?'mobile':'desktop');if(!this.isMobile()){$us.$body.removeClass('us_filter_open');this.$container.removeClass('open')}},filterOpener:function(){$us.$body.addClass('us_filter_open');this.$container.addClass('open')},filterListCloser:function(){$us.$body.removeClass('us_filter_open');this.$container.removeClass('open')},showItem:function(e){var $target=$(e.currentTarget),$item=$target.closest('.w-filter-item');$item.addClass('show')},hideItem:function(e){if(!this.$filtersItem.hasClass('show')){return} this.$filtersItem.filter('.show').each(function(_,item){var $item=$(item);if(!$item.is(e.target)&&$item.has(e.target).length===0){$item.removeClass('show')}})},woocommerceOrdering:function(e){e.stopPropagation();var $form=$(e.currentTarget).closest('form');$('input[name^="'+this.options.filterPrefix+'"]',$form).remove();$.each(this.getValue().split('&'),function(_,item){var value=item.split('=');if(value.length===2){$form.append('')}});$form.trigger('submit')},updateItemsAmount:function(_,data){this.$filtersItem.removeClass('disabled');$.each((data.taxonomies_query_args||{}),function(key,items){var $item=this.$filtersItem.filter('[data-source="'+key+'"]'),uiType=$item.data('ui_type'),showCount=0;$.each(items,function(value,amount){var disabled=!amount;if(!disabled){showCount++} if(uiType==='dropdown'){var $option=$('select:first option[value="'+value+'"]',$item),template=$option.data('template')||'';if(template){template=template.replace('%s',(amount?amount:'')).trim() $option.text(template)} $option.prop('disabled',disabled).toggleClass('disabled',disabled)}else{var $input=$('input[value="'+value+'"]',$item);$input.prop('disabled',disabled).nextAll('.w-filter-item-value-amount').text(amount);$input.closest('.w-filter-item-value').toggleClass('disabled',disabled);if(disabled&&$input.is(':checked')){$input.prop('checked',!1)}}}.bind(this));if(!showCount&&this.options.hideDisabledValues){$item.addClass('disabled')}}.bind(this));if(data.hasOwnProperty('wc_min_max_price')&&data.wc_min_max_price instanceof Object){var $price=this.$filtersItem.filter('[data-source$="|_price"]');$.each((data.wc_min_max_price||{}),function(name,value){var $input=$('input.type_'+name,$price);$input.attr('placeholder',value?value:$input.attr('aria-label'))})} if(!$.isEmptyObject(data)){if(this.handle){$us.clearTimeout(this.handle)} this.handle=$us.timeout(function(){$us.debounce(this.URLSearchParams.bind(this,this.getValue()),1)();this.checkItemValues.call(this)}.bind(this),100)}}},triggerGrid:function(eventType,extraParameters){$us.debounce(function(){$us.$body.trigger(eventType,extraParameters)},10)()},checkItemValues:function(){this.$filtersItem.each(function(_,item){this.trigger('changeItemValue',item)}.bind(this))},getValue:function(){var value='',filters={};$.each(this.$container.serializeArray(),function(_,filter){if(filter.value==='*'||!filter.value){return} if(!filters.hasOwnProperty(filter.name)){filters[filter.name]=[]} filters[filter.name].push(filter.value)});for(var k in filters){if(value){value+='&'} if($.isArray(filters[k])){value+=k+'='+filters[k].join(',')}} return encodeURI(value)},URLSearchParams:function(params){var url=location.origin+location.pathname+(location.pathname.slice(-1)!='/'?'/':''),search=location.search.replace(new RegExp(this.options.filterPrefix+"(.+?)(&|$)","g"),'');if(!search||search.substr(0,1)!=='?'){search+='?'}else if('?&'.indexOf(search.slice(-1))===-1){search+='&'} if(!params&&'?&'.indexOf(search.slice(-1))!==-1){search=search.slice(0,-1)} history.replaceState(document.title,document.title,url+search+params)}});$.fn.wGridFilter=function(options){return this.each(function(){$(this).data('wGridFilter',new $us.WGridFilter(this,options))})};$(function(){$('.w-filter',$us.$canvas).wGridFilter()})})(jQuery);(function($,undefined){"use strict";$us.WGridOrder=function(container){this.init(container)};$.extend($us.WGridOrder.prototype,$us.mixins.Events,{init:function(container){this.$container=$(container);this.$select=$('select',this.$container);this.$grid=$('.w-grid[data-filterable="true"]:first',$us.$canvas.find('.l-main'));this.name=this.$select.attr('name')||'order';this.$container.on('change','select',this._events.changeSelect.bind(this));this.$grid.addClass('used_by_grid_order')},_events:{changeSelect:function(){var value=this.$select.val()||'',matches=(location.href.match(/page(=|\/)(\d+)(\/?)/)||[]),page=parseInt(matches[2]||1);this.URLSearchValue(value);this.triggerGrid('us_grid.updateOrderBy',[value,page,this])}},triggerGrid:function(eventType,extraParameters){$us.debounce(function(){$us.$body.trigger(eventType,extraParameters)},10)()},URLSearchValue:function(value){var orderby_search='',url=location.origin+location.pathname+(location.pathname.slice(-1)!='/'?'/':''),search=location.search.replace(new RegExp('[?&]'+this.name+'=[^&#]*(#.*)?$'),'$1').replace(new RegExp('([?&])'+this.name+'=[^&]*&'),'$1');if(search&&search.substr(0,1)==='?'){search=search.slice(1)} if(value){orderby_search+=this.name+'='+value} if(orderby_search&&search){orderby_search+='&'} orderby_search+=search;history.replaceState(document.title,document.title,url+(orderby_search?'?'+orderby_search:''))}});$.fn.wGridOrder=function(options){return this.each(function(){$(this).data('wGridOrder',new $us.WGridOrder(this))})};$(function(){$('.w-order',$us.$canvas).wGridOrder()})})(jQuery);!function($,undefined){"use strict";function USHeader(settings){this.$container=$('.l-header',$us.$canvas);this.$showBtn=$('.w-header-show:first',$us.$body);this.settings=settings||{};this.state='default';this.$elms={};if(this.$container.length===0){return} this.$places={hidden:$('.l-subheader.for_hidden',this.$container)};this._states={sticky:!1,sticky_auto_hide:!1,scroll_direction:'down',vertical_scrollable:!1,init_height:this.getHeight()};this.pos=this.$container.usMod('pos');this.bg=this.$container.usMod('bg');this.shadow=this.$container.usMod('shadow');this.orientation=$us.$body.usMod('header');this.tabletsBreakpoint=parseInt(settings.tablets&&settings.tablets.options&&settings.tablets.options.breakpoint)||900;this.mobilesBreakpoint=parseInt(settings.mobiles&&settings.mobiles.options&&settings.mobiles.options.breakpoint)||600;$('.l-subheader-cell',this.$container).each(function(_,place){var $place=$(place),key=$place.parent().parent().usMod('at')+'_'+$place.usMod('at');this.$places[key]=$place}.bind(this));$('[class*=ush_]',this.$container).each(function(_,elm){var $elm=$(elm),matches=/(^| )ush_([a-z_]+)_([0-9]+)(\s|$)/.exec(elm.className);if(!matches){return} var id=matches[2]+':'+matches[3];this.$elms[id]=$elm;if($elm.is('.w-vwrapper, .w-hwrapper')){this.$places[id]=$elm}}.bind(this));$us.$window.on('scroll',$us.debounce(this._events.scroll.bind(this),10)).on('resize load',$us.debounce(this._events.resize.bind(this),10));this.$container.on('contentChange',this._events.contentChange.bind(this));this.$showBtn.on('click',this._events.showBtn.bind(this));this.on('changeSticky',this._events._changeSticky.bind(this)).on('swichVerticalScrollable',this._events._swichVerticalScrollable.bind(this));this._events.resize.call(this);if(this.isStickyAutoHideEnabled()){this.$container.addClass('sticky_auto_hide')} this.$container.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd',function(){$us.debounce(this.trigger.bind(this,'transitionEnd'),1)()}.bind(this))} $.extend(USHeader.prototype,$us.mixins.Events,{prevScrollTop:0,currentStateIs:function(state){return(state&&['default','tablets','mobiles'].indexOf(state)!==-1&&this.state===state)},isVertical:function(){return this.orientation==='ver'},isHorizontal:function(){return this.orientation==='hor'},isFixed:function(){return this.pos==='fixed'},isTransparent:function(){return this.bg==='transparent'},_isWithinScrollBoundaries:function(scrollTop){scrollTop=parseInt(scrollTop);return(scrollTop+window.innerHeight>=$us.$document.height())||scrollTop<=0},isHidden:function(){return!!$us.header.settings.is_hidden},isStickyEnabled:function(){return this.settings[this.state].options.sticky||!1},isStickyAutoHideEnabled:function(){return this.isStickyEnabled()&&(this.settings[this.state].options.sticky_auto_hide||!1)},isSticky:function(){return this._states.sticky||!1},isStickyAutoHidden:function(){return this._states.sticky_auto_hide||!1},getScrollDirection:function(){return this._states.scroll_direction||'down'},getAdminBarHeight:function(){var $wpAdminBar=$('#wpadminbar',$us.$body);return $wpAdminBar.length?parseInt($wpAdminBar.height()):0},getHeight:function(){var height=0,beforeContent=getComputedStyle(this.$container.get(0),':before').content;if(beforeContent&&['none','auto'].indexOf(beforeContent)===-1){height=beforeContent.replace(/[^+\d]/g,'')} if(!height){height=this.$container.outerHeight()} return!isNaN(height)?parseInt(height):0},getInitHeight:function(){return parseInt(this._states.init_height)||this.getHeight()},getCurrentHeight:function(){var height=0,adminBarHeight=this.getAdminBarHeight();if(this.isHorizontal()&&(!this.currentStateIs('mobiles')||(adminBarHeight&&adminBarHeight>=this.getScrollTop()))){height+=adminBarHeight} if(!this.isStickyAutoHidden()){height+=this.getHeight()} return height},getScrollTop:function(){return parseInt($us.$window.scrollTop())||this.prevScrollTop},getOffsetTop:function(){var top=parseInt(this.$container.css('top'));return!isNaN(top)?top:0},isScrollAtTopPosition:function(){return parseInt($us.$window.scrollTop())===0},setState:function(state){if(this.currentStateIs(state)){return} var options=this.settings[state].options||{},orientation=options.orientation||'hor',pos=($us.toBool(options.sticky)?'fixed':'static'),bg=($us.toBool(options.transparent)?'transparent':'solid'),shadow=options.shadow||'thin';if(orientation==='ver'){pos='fixed';bg='solid'} this._setOrientation(orientation);this._setPos(pos);this._setBg(bg);this._setShadow(shadow);this._setLayout(this.settings[state].layout||{});$us.$body.usMod('state',this.state=state);if(this.currentStateIs('default')){$us.$body.removeClass('header-show')} if($us.nav!==undefined){$us.nav.resize()} if(this.isStickyAutoHideEnabled()){this.$container.removeClass('down')}},_setPos:function(pos){if(pos===this.pos){return} this.$container.usMod('pos',this.pos=pos);if(this.pos==='static'){this.trigger('changeSticky',!1)}},_setBg:function(bg){if(bg!=this.bg){this.$container.usMod('bg',this.bg=bg)}},_setShadow:function(shadow){if(shadow!=this.shadow){this.$container.usMod('shadow',this.shadow=shadow)}},_setLayout:function(layout){for(var place in layout){if(!layout[place]||!this.$places[place]){continue} this._placeElements(layout[place],this.$places[place])}},_setOrientation:function(orientation){if(orientation!=this.orientation){$us.$body.usMod('header',this.orientation=orientation)}},_placeElements:function(elms,$place){for(var i=0;icanvasHeight){this.trigger('swichVerticalScrollable',!0)}else if(this._states.vertical_scrollable){this.trigger('swichVerticalScrollable',!1)} if(headerHeight>documentHeight){this.$container.css({position:'absolute',top:0})}}else if(this._states.vertical_scrollable){this.trigger('swichVerticalScrollable',!1)}},_events:{_swichVerticalScrollable:function(_,state){this.$container.toggleClass('scrollable',this._states.vertical_scrollable=!!state);if(!this._states.vertical_scrollable){this.$container.resetInlineCSS('position','top','bottom');delete this._headerScrollRange}},_changeSticky:function(_,state){this._states.sticky=!!state;var currentHeight=this.getCurrentHeight();$us.debounce(function(){this.$container.toggleClass('sticky',this._states.sticky).resetInlineCSS('position','top','bottom');if(currentHeight==this.getCurrentHeight()){this.trigger('transitionEnd')}}.bind(this),10)()},contentChange:function(){this._isVerticalScrollable.call(this)},showBtn:function(e){if($us.$body.hasClass('header-show')){return} e.stopPropagation();$us.$body.addClass('header-show').on(($.isMobile?'touchstart':'click'),this._events.hideMobileVerticalHeader.bind(this))},hideMobileVerticalHeader:function(e){if($.contains(this.$container[0],e.target)){return} $us.$body.off(($.isMobile?'touchstart':'click'),this._events.hideMobileVerticalHeader.bind(this));$us.timeout(function(){$us.$body.removeClass('header-show')},10)},scroll:function(){var scrollTop=this.getScrollTop(),headerAbovePosition=($us.canvas.headerInitialPos==='above');if(this.prevScrollTop!=scrollTop){this._states.scroll_direction=(this.prevScrollTop<=scrollTop)?'down':'up'} this.prevScrollTop=scrollTop;if(this.isScrollAtTopPosition()){this._states.scroll_direction='up'} if(this.isStickyAutoHideEnabled()&&this.isSticky()&&!this._isWithinScrollBoundaries(scrollTop)&&!headerAbovePosition){this._states.sticky_auto_hide=(this.getScrollDirection()==='down');this.$container.toggleClass('down',this._states.sticky_auto_hide)} if(!this.isFixed()){return} var headerAttachedFirstSection=['bottom','below'].indexOf($us.canvas.headerInitialPos)!==-1;if(this.isHorizontal()&&(headerAbovePosition||(headerAttachedFirstSection&&!this.currentStateIs('default'))||!headerAttachedFirstSection)){if(this.isStickyEnabled()){var scrollBreakpoint=parseInt(this.settings[this.state].options.scroll_breakpoint)||100,isSticky=scrollTop>=scrollBreakpoint;if(isSticky!=this.isSticky()){this.trigger('changeSticky',isSticky)}} if(this.isSticky()){$us.debounce(function(){if(!$us.$window.scrollTop()){this.trigger('changeSticky',!1)}}.bind(this),1)()}} if(this.isHorizontal()&&headerAttachedFirstSection&&!headerAbovePosition&&this.currentStateIs('default')){var top=($us.canvas.getHeightFirstSection()+this.getAdminBarHeight());if($us.canvas.headerInitialPos=='bottom'){top-=this.getInitHeight()} if(this.isStickyEnabled()){var isSticky=scrollTop>=top;if(isSticky!=this.isSticky()){$us.debounce(function(){this.trigger('changeSticky',isSticky)}.bind(this),1)()}} if(!this.isSticky()&&top!=this.getOffsetTop()){this.$container.css('top',top)}} var headerHeight=this.getHeight(),documentHeight=parseInt($us.$document.height());if(this.isVertical()&&!headerAttachedFirstSection&&!headerAbovePosition&&!jQuery.isMobile&&this._states.vertical_scrollable&&documentHeight>headerHeight){var canvasHeight=parseInt($us.canvas.winHeight),scrollRangeDiff=(headerHeight-canvasHeight),cssProps;if(this._headerScrollRange===undefined){this._headerScrollRange=[0,scrollRangeDiff]} if(scrollTop<=this._headerScrollRange[0]){this._headerScrollRange[0]=Math.max(0,scrollTop);this._headerScrollRange[1]=(this._headerScrollRange[0]+scrollRangeDiff);cssProps={position:'fixed',top:this.getAdminBarHeight()}}else if(this._headerScrollRange[0]Date.now()){return} var offset=that.container.offset(),coord=(e.pageX-offset.left)/that.containerWidth;if(that._hoverAnimation){that._hoverTo=coord;return} that.set(coord);that._lastFrame=Date.now()}).mouseleave(function(e){that.mouseInside=!1;that.cancel();that.start(that.options.basePoint)})} this.$window.resize(function(){that.handleResize()});this._orientationDriven=('ontouchstart' in window&&'DeviceOrientationEvent' in window);if(this._orientationDriven){this._checkIfVisible();window.addEventListener("deviceorientation",function(e){if(!that.visible||that._lastFrame+that._frameRate>Date.now()){return} that._deviceOrientationChange(e);that._lastFrame=Date.now()});this.$window.resize(function(){that._checkIfVisible()});this.$window.scroll(function(){that._checkIfVisible()})} this.set(this.options.basePoint);this._lastFrame=Date.now()};Horparallax.prototype={_deviceOrientationChange:function(e){var gamma=e.gamma,beta=e.beta,x,y;switch(window.orientation){case-90:beta=Math.max(-45,Math.min(45,beta));x=(beta+45)/90;break;case 90:beta=Math.max(-45,Math.min(45,beta));x=(45-beta)/90;break;case 180:gamma=Math.max(-45,Math.min(45,gamma));x=(gamma+45)/90;break;case 0:default:if(gamma<-90||gamma>90){gamma=Math.abs(e.gamma)/e.gamma*(180-Math.abs(e.gamma))} gamma=Math.max(-45,Math.min(45,gamma));x=(45-gamma)/90;break} this.set(x)},handleResize:function(){this.containerWidth=this.container.outerWidth();this.containerHeight=this.container.outerHeight();this.bgWidth=this.bg.outerWidth();this.windowHeight=this.$window.height();this.set(this.now)},_checkIfVisible:function(){var scrollTop=this.$window.scrollTop(),containerTop=this.container.offset().top;this.visible=(containerTop+this.containerHeight>scrollTop&&containerTop')} if(part.curDuration===Math.max.apply(null,this.animateDurations)){this.animateDurations=[];this.parts.map(function(_part){this._events.restartAnimate.call(this,_part)}.bind(this))}}},render:function(part){var nextValue=part.states[part.currentState],$curSpan=part.$node.wrapInner('').children('span'),$nextSpan=$('').html(nextValue.replace(' ',this.nbsp_char)).appendTo(part.$node),nextWidth=$nextSpan.width(),outType='fadeOut',startDelay=0;part.curDuration=this.duration;if(this.type==='typing'){var oldValue=$.trim($curSpan.text())+' ',removeDuration=Math.floor(part.curDuration/3);startDelay=Math.max.apply(null,[startDelay,(removeDuration*oldValue.length)]);for(var i=0;i')} for(var i=0;i'+$char+'');$char.css('transition-duration',part.curDuration+'ms').appendTo($nextSpan);$char.appendTo($nextSpan)} $us.timeout(function($char){if(this.type!=='typing'){$char.addClass('animated_'+this.type)}else{var $text=$('> span:first',$nextSpan);$text.html($text.html()+$char)}}.bind(this,$char),part.curDuration*i)} if(this.type==='typing'&&$.trim(nextValue)&&nextValue!==this.nbsp_char){$nextSpan.append('')} part.curDuration*=(nextValue.length+1)}else{$nextSpan.wrapInner('').children('span').css({'animation-duration':this.duration+'ms'}).addClass('animated_'+this.type)} this.animateDurations.push(part.curDuration);$us.timeout(this._events.clearAnimation.bind(this,part),part.curDuration+Math.floor(this.delay/3))}.bind(this),startDelay)}};$.fn.wItext=function(options){return this.each(function(){$(this).data('wItext',new $us.WItext(this,options))})};$(function(){$('.w-itext').wItext()})}(jQuery);!function($){"use strict";$us.WLogin=function(container,options){this.init(container,options)};$us.WLogin.prototype={init:function(container,options){this.$container=$(container);if(this.$container.data('loginInit')==1){return} this.$container.data('loginInit',1);this.$submitBtn=this.$container.find('.w-btn');this.$username=this.$container.find('.for_text input[type="text"]');this.$password=this.$container.find('.for_password input[type="password"]');this.$preloader=this.$container.siblings('.g-preloader');this.$nonceVal=this.$container.find('#us_login_nonce').val();this.$resultField=this.$container.find('.w-form-message');this.$jsonContainer=this.$container.find('.w-form-json');this.jsonData=this.$jsonContainer[0].onclick()||{};this.$jsonContainer.remove();this.ajaxUrl=this.jsonData.ajaxurl||'';this.loginRedirect=this.jsonData.login_redirect||'';this.logoutRedirect=this.jsonData.logout_redirect||window.location.href;this.use_ajax=!!this.jsonData.use_ajax;this._events={formSubmit:this.formSubmit.bind(this)};this.$container.on('submit',this._events.formSubmit);if(this.use_ajax){$.ajax({type:'post',url:this.ajaxUrl,data:{action:'us_ajax_user_info',logout_redirect:this.logoutRedirect},success:function(result){if(result.success){this.$container.closest('.w-login').html(result.data)}else{this.$container.removeClass('hidden')} this.$preloader.addClass('hidden')}.bind(this)})}},formSubmit:function(event){event.preventDefault();if(this.$submitBtn.hasClass('loading')){return} this.$resultField.usMod('type',!1).html('');this.$container.find('.w-form-row.check_wrong').removeClass('check_wrong');this.$container.find('.w-form-state').html('');if(this.$container.find('.for_text input[type="text"]').val()==''){this.$username.closest('.w-form-row').toggleClass('check_wrong');return} this.$submitBtn.addClass('loading');$.ajax({type:'post',url:this.ajaxUrl,dataType:'json',data:{action:'us_ajax_login',username:this.$username.val(),password:this.$password.val(),us_login_nonce:this.$nonceVal},success:function(result){if(result.success){document.location.href=this.loginRedirect}else{if(result.data.code=='invalid_username'){var $rowLog=this.$username.closest('.w-form-row');$rowLog.toggleClass('check_wrong');$rowLog.find('.w-form-row-state').html(result.data.message?result.data.message:'')}else if(result.data.code=='incorrect_password'||result.data.code=='empty_password'){var $rowPwd=this.$password.closest('.w-form-row');$rowPwd.toggleClass('check_wrong');$rowPwd.find('.w-form-row-state').html(result.data.message?result.data.message:'')}else{this.$resultField.usMod('type','error').html(result.data.message)} this.$submitBtn.removeClass('loading')}}.bind(this),})}};$.fn.wUsLogin=function(options){return this.each(function(){$(this).data('wUsLogin',new $us.WLogin(this,options))})};$(function(){$('.w-login > .w-form').wUsLogin()})}(jQuery);!function($){$us.Nav=function(container,options){this.init(container,options)};$us.mobileNavOpened=0;$us.Nav.prototype={init:function(container,options){this.$nav=$(container);if(this.$nav.length==0){return} this.$control=this.$nav.find('.w-nav-control');this.$close=this.$nav.find('.w-nav-close');this.$items=this.$nav.find('.menu-item');this.$list=this.$nav.find('.w-nav-list.level_1');this.$subItems=this.$list.find('.menu-item-has-children');this.$subAnchors=this.$list.find('.menu-item-has-children > .w-nav-anchor');this.$subLists=this.$list.find('.menu-item-has-children > .w-nav-list');this.$anchors=this.$nav.find('.w-nav-anchor');this.$arrows=$('.w-nav-arrow');this.options=this.$nav.find('.w-nav-options:first')[0].onclick()||{};if(this.$nav.length==0){return} this.type=this.$nav.usMod('type');this.layout=this.$nav.usMod('layout');this.mobileOpened=!1;if($.isMobile&&this.type=='desktop'){this.$list.on('click','.w-nav-anchor[class*="level_"]',function(e){var $target=$(e.currentTarget),$item=$target.closest('.menu-item');if($target.usMod('level')>1&&!$item.hasClass('menu-item-has-children')){$target.parents('.menu-item.opened').removeClass('opened')}})} this.$control.on('click',function(){this.mobileOpened=!this.mobileOpened;this.setTabIndex(!0);this.$anchors.each(function(){if($(this).attr('href')==undefined){$(this).attr('href','javascript:void(0)')}});if(this.layout!='dropdown'){this.$anchors.removeAttr('tabindex')} if(this.mobileOpened){$('.l-header .w-nav').not(container).each(function(){$(this).trigger('USNavClose')});this.$control.addClass('active');this.$items.filter('.opened').removeClass('opened');this.$subLists.resetInlineCSS('display','height');if(this.layout=='dropdown'){this.$list.slideDownCSS(250,this._events.contentChanged)} $us.mobileNavOpened ++}else{this.$control.removeClass('active');if(this.layout=='dropdown'){this.$list.slideUpCSS(250,this._events.contentChanged)} this.setTabIndex();if(this.layout!='dropdown'){this.$anchors.attr('tabindex',-1)} $us.mobileNavOpened --} $us.$canvas.trigger('contentChange')}.bind(this));this.$control.on('focusin',function(e){if(this.type!='mobile'||this.layout=='dropdown'){return} this.$anchors.attr('tabindex',-1)}.bind(this));this.$close.on('click',function(){this.mobileOpened=!1;this.$control.removeClass('active');$us.mobileNavOpened --;$us.$canvas.trigger('contentChange')}.bind(this));$us.$document.keyup(function(e){if(e.keyCode==27){if(this.mobileOpened){if(this.layout=='dropdown'){this.$list.slideUpCSS(250,this._events.contentChanged)} this.mobileOpened=!1;this.$control.removeClass('active');this.setTabIndex();if(this.layout!='dropdown'){this.$anchors.attr('tabindex',-1)} $us.mobileNavOpened --;$us.$canvas.trigger('contentChange')}}}.bind(this));this._events={menuToggler:function($item,show){if(this.type!='mobile'){return} var $sublist=$item.children('.w-nav-list');if(show){$item.addClass('opened');$sublist.slideDownCSS(250,this._events.contentChanged)}else{$item.removeClass('opened');$sublist.slideUpCSS(250,this._events.contentChanged)}}.bind(this),focusHandler:function(e){if(this.type=='mobile'){return} var $item=$(e.target).closest('.menu-item'),$target=$(e.target);$item.parents('.menu-item').addClass('opened');$item.on('mouseleave',function(){$target.blur()})}.bind(this),blurHandler:function(e){if(this.type=='mobile'){return} var $item=$(e.target).closest('.menu-item');$item.parents('.menu-item').removeClass('opened')}.bind(this),clickHandler:function(e){if(this.type!='mobile'){return} e.stopPropagation();e.preventDefault();var $item=$(e.currentTarget).closest('.menu-item'),isOpened=$item.hasClass('opened');this._events.menuToggler($item,!isOpened)}.bind(this),keyDownHandler:function(e){if(this.type!='mobile'){return} var keyCode=e.keyCode||e.which;if(keyCode==13){var $target=$(e.target),$item=$target.closest('.menu-item'),isOpened=$item.hasClass('opened');if(!$target.is(this.$arrows)){return} e.stopPropagation();e.preventDefault();this._events.menuToggler($item,!isOpened)} if(keyCode==9){var $target=$(e.target)?$(e.target):{},i=this.$anchors.index($target),isDropdownLayout=this.layout=='dropdown'?!0:!1,closeMenu=function(){if(this.mobileOpened){if(isDropdownLayout){this.$list.slideUpCSS(250,this._events.contentChanged)} this.mobileOpened=!1;this.$control.removeClass('active');$us.mobileNavOpened --;$us.$canvas.trigger('contentChange');this.setTabIndex();if(this.layout!='dropdown'){this.$anchors.attr('tabindex',-1)}}}.bind(this);if(e.shiftKey){if((i===this.$anchors.length-1)&&this.layout!='dropdown'){this.$anchors.attr('tabindex',-1)} if(i===0){closeMenu()}}else{if(i===this.$anchors.length-1){closeMenu()}}}}.bind(this),resize:this.resize.bind(this),contentChanged:function(){if(this.type=='mobile'&&$us.header.isHorizontal()&&$us.canvas.headerPos=='fixed'&&this.layout=='fixed'){this.setFixedMobileMaxHeight()} $us.header.$container.trigger('contentChange')}.bind(this),close:function(){if(this.$list!=undefined&&jQuery.fn.slideUpCSS!=undefined&&this.mobileOpened&&this.type=='mobile'){this.mobileOpened=!1;if(this.layout=='dropdown'&&this.headerOrientation=='hor'){this.$list.slideUpCSS(250)} $us.mobileNavOpened --;$us.$canvas.trigger('contentChange')}}.bind(this)};this.$subItems.each(function(index){var $item=$(this.$subItems[index]),$arrow=$item.find('.w-nav-arrow').first(),$subAnchor=$item.find('.w-nav-anchor').first(),dropByLabel=$item.hasClass('mobile-drop-by_label')||$item.parents('.menu-item').hasClass('mobile-drop-by_label'),dropByArrow=$item.hasClass('mobile-drop-by_arrow')||$item.parents('.menu-item').hasClass('mobile-drop-by_arrow');if(dropByLabel||(this.options.mobileBehavior&&!dropByArrow)){$subAnchor.on('click',this._events.clickHandler)}else if(dropByArrow||(!this.options.mobileBehavior&&!dropByLabel)){$arrow.on('click',this._events.clickHandler);$arrow.on('click',this._events.keyDownHandler)}}.bind(this));this.$subItems.each(function(){var $this=$(this),$parentItem=$this.parent().closest('.menu-item');if($parentItem.length==0||$parentItem.usMod('columns')===!1){$this.addClass('togglable')}});if(!$us.$html.hasClass('no-touch')){this.$list.find('.menu-item-has-children.togglable > .w-nav-anchor').on('click',function(e){if(this.type=='mobile'){return} e.preventDefault();var $this=$(e.currentTarget),$item=$this.parent();if($item.hasClass('opened')){return location.assign($this.attr('href'))} $item.addClass('opened');var outsideClickEvent=function(e){if($.contains($item[0],e.target)){return} $item.removeClass('opened');$us.$body.off('touchstart',outsideClickEvent)};$us.$body.on('touchstart',outsideClickEvent)}.bind(this))} $($us.$document).on('mouseup touchend',function(e){if(this.mobileOpened&&this.type=='mobile'){if(!this.$control.is(e.target)&&this.$control.has(e.target).length===0&&!this.$list.is(e.target)&&this.$list.has(e.target).length===0){this.mobileOpened=!1;this.$control.removeClass('active');this.$items.filter('.opened').removeClass('opened');this.$subLists.slideUpCSS(250);if(this.layout=='dropdown'&&this.headerOrientation=='hor'){this.$list.slideUpCSS(250)} $us.mobileNavOpened --;$us.$canvas.trigger('contentChange')}}}.bind(this));this.$anchors.on('focus.upsolution',this._events.focusHandler);this.$anchors.on('blur.upsolution',this._events.blurHandler);this.$nav.on('keydown.upsolution',this._events.keyDownHandler);this.$anchors.on('click',function(e){var $item=$(e.currentTarget).closest('.menu-item'),dropByLabel=$item.hasClass('mobile-drop-by_label')||$item.parents('.menu-item').hasClass('mobile-drop-by_label'),dropByArrow=$item.hasClass('mobile-drop-by_arrow')||$item.parents('.menu-item').hasClass('mobile-drop-by_arrow');if(this.type!='mobile'||$us.header.isVertical()){return} if(dropByLabel||(this.options.mobileBehavior&&$item.hasClass('menu-item-has-children')&&!dropByArrow)){return} this.mobileOpened=!1;this.$control.removeClass('active');if(this.layout=='dropdown'){this.$list.slideUpCSS(250)} $us.mobileNavOpened --;$us.$canvas.trigger('contentChange')}.bind(this));$us.$window.on('resize',$us.debounce(this._events.resize,5));$us.timeout(function(){this.resize();$us.header.$container.trigger('contentChange')}.bind(this),50);this.$nav.on('USNavClose',this._events.close)},setTabIndex:function(add){this.$subItems.each(function(index){var $item=$(this.$subItems[index]);if($item.hasClass('mobile-drop-by_arrow')||$item.parents('.menu-item').hasClass('mobile-drop-by_arrow')||(!$item.hasClass('mobile-drop-by_label')&&!this.options.mobileBehavior)){if(add){$item.find('.w-nav-arrow').attr('tabindex',0)}else{$item.find('.w-nav-arrow').removeAttr('tabindex')}}}.bind(this))},setFixedMobileMaxHeight:function(){this.$list.css('max-height',$us.canvas.winHeight-$us.header.getCurrentHeight()+'px')},resize:function(){if(this.$nav.length==0){return} var nextType=(window.innerWidth');var $wrapper=$this.parent();$wrapper.css({overflow:'hidden',height:$this.outerHeight(!0)});$wrapper.performCSSTransition({height:0},300,function(){$wrapper.remove();$us.$canvas.trigger('contentChange')},'cubic-bezier(.4,0,.2,1)')})})};$(function(){$('.w-message').usMessage()})})(jQuery);!function($){"use strict";$us.WLmaps=function(container,options){this.init(container,options)};$us.WLmaps.prototype={init:function(container,options){this.$container=$(container);this.mapId=this.$container.attr('id');var $jsonContainer=this.$container.find('.w-map-json'),jsonOptions=$jsonContainer[0].onclick()||{},defaults={};$jsonContainer.remove();this.options=$.extend({},defaults,jsonOptions,options);this._events={redraw:this.redraw.bind(this),};$us.$canvas.on('contentChange',this._events.redraw);this.beforeRender()},beforeRender:function(){var matches=this.options.address.match(/^(\d+.\d+)\s?,?\s?(\d+.\d+)$/);if(matches){this.center=[matches[1],matches[2]];this.renderMap()}else{this.geocoder(this.options.address)}},redraw:function(){if(!this.lmap||this.$container.is(':hidden')){return} this.lmap.invalidateSize(!0)},geocoder:function(request,markerOptions,popup){var endPoint="https://nominatim.openstreetmap.org/search?format=json&limit=1&q=",that=this;$.getJSON(endPoint+encodeURI(request),function(json){}).done(function(json){if(!json.length){return} var bBox=json[0].boundingbox;if(!markerOptions){that.center=[bBox[1],bBox[3]];that.renderMap()}else{that.marker=L.marker([bBox[1],bBox[3]],markerOptions).addTo(that.lmap);if(popup){that.marker.bindPopup(popup)}}})},renderMap:function(){var lmapsOptions={center:this.center,zoom:this.options.zoom,};if(this.options.hideControls){lmapsOptions.zoomControl=!1} if(this.options.disableZoom){lmapsOptions.scrollWheelZoom=!1} this.lmap=L.map(this.mapId,lmapsOptions);L.tileLayer(this.options.style,{attribution:'© OpenStreetMap contributors'}).addTo(this.lmap);this.renderMarkers();if(this.options.disableDragging&&(!$us.$html.hasClass('no-touch'))){this.lmap.dragging.disable()}},renderMarkers:function(){if(this.options.markers.length){var mainOptions={};for(var i=0;i0)||(navigator.maxTouchPoints));this.disableWidth=(this.$container.data('disablewidth')!==undefined)?this.$container.data('disablewidth'):768;this.hiddenClasses={'uvc_hidden-xs':[0,479],'uvc_hidden-xsl':[480,767],'uvc_hidden-sm':[768,991],'uvc_hidden-md':[992,1199],'uvc_hidden-ml':[1200,1823],'uvc_hidden-lg':[1824,99999],'vc_hidden-xs':[0,767],'vc_hidden-sm':[768,991],'vc_hidden-md':[992,1199],'vc_hidden-lg':[1200,99999]};if(this.$container.data('speed')!==undefined){this.options.animationDuration=this.$container.data('speed')} this._events={destroy:this._destroy.bind(this),mouseWheelHandler:this._mouseWheelHandler.bind(this),resize:this.resize.bind(this),scroll:this.scroll.bind(this)};this._attachEvents();this.$container.on('usb.removeHtmlElm',this._events.destroy) $us.$canvas.on('contentChange',$us.debounce(this._events.resize,5));$us.$window.on('resize',function(e,stop){if(stop!==undefined){$us.debounce(this._events.resize,5)}}.bind(this)).on('scroll',$us.debounce(this._events.scroll,5));$us.timeout(this._init.bind(this),100);this.headerHeight=0;$us.header.on('transitionEnd',function(header){this.headerHeight=header.getCurrentHeight()-header.getAdminBarHeight()}.bind(this))},is_popup:function(){return $us.$html.hasClass('usoverlay_fixed')},_init:function(){if($us.canvas.headerPos==='static'&&$us.header.isHorizontal()&&!$us.header.isTransparent()){$us.canvas.$header.each(function(){var $section=$us.canvas.$header,section={$section:$section,area:'header',};this._countPosition(section);this.sections.push(section);this.initialSections.push(section)}.bind(this))} $us.$canvas.find('> *:not(.l-header) .l-section').each(function(key,elm){if($('.l-section',elm).length){return} var $section=$(elm),section={$section:$section,hiddenBoundaries:[],area:'content',isSticky:$section.hasClass('type_sticky')},addedWidths=[];hidden:for(var i in this.hiddenClasses){if(this.hiddenClasses.hasOwnProperty(i)){var low=this.hiddenClasses[i][0],high=this.hiddenClasses[i][1];if($section.hasClass(i)){var addedWidthLength=addedWidths.length,j;addedWidths.push([low,high]);for(j=0;j .l-section').each(function(key,elm){var $section=$(elm),section={$section:$section,area:'footer',isSticky:$section.hasClass('type_sticky')};this._countPosition(section,key);this.sections.push(section);this.initialSections.push(section)}.bind(this));this.$dotsContainer=this.$container.find('.w-scroller-dots');if(this.$dotsContainer.length){this.usingDots=!0;this.$firstDot=this.$dotsContainer.find('.w-scroller-dot').first();this.redrawDots(!0);this.scroll()}},_destroy:function(){var that=this;$us.$document.off('mousewheel DOMMouseScroll MozMousePixelScroll');document.removeEventListener('mousewheel',that._events.mouseWheelHandler);document.removeEventListener('DOMMouseScroll',that._events.mouseWheelHandler);document.removeEventListener('MozMousePixelScroll',that._events.mouseWheelHandler);$us.$canvas.off('touchstart touchmove')},isSectionHidden:function(section){if(!this.initialSections[section].hiddenBoundaries||!this.initialSections[section].hiddenBoundaries.length){return!1} var currWidth=window.innerWidth,isHidden=!1;for(var i=0;i=low&&currWidth<=high){isHidden=!0;break}} return isHidden},redrawDots:function(inited){if(!this.usingDots||!this.$dotsContainer||!this.$dotsContainer.length){return!1} this.$dotsContainer.html('');for(var i=0;i$us.canvas.options.columnsStackingWidth)}.bind(this));if(!!inited){this.dots[this.activeSection].addClass('active')} this.$dotsContainer.addClass('show')},recountSections:function(){if(this.currHidden){for(var initialSection in this.initialSections){this.sections[initialSection]=this.initialSections[initialSection]}} for(var i=this.hiddenSections.length-1;i>=0;i --){var indexOfTheItem=this.currHidden.indexOf(this.hiddenSections[i]);if(this.isSectionHidden(this.hiddenSections[i])){if(indexOfTheItem===-1){this.currHidden.push(this.hiddenSections[i])} this.sections.splice(this.hiddenSections[i],1)}else{this.currHidden.splice(indexOfTheItem,1)}} this.redrawDots()},getScrollSpeed:function(number){var sum=0,lastElements=this.scrolls.slice(Math.max(this.scrolls.length-number,1));for(var i=0;i149){that.scrolls.shift()} that.scrolls.push(Math.abs(direction));if((currentTime-that.previousMouseWheelTime)>that.options.coolDown){that.scrolls=[]} that.previousMouseWheelTime=currentTime;speedEnd=that.getScrollSpeed(10);speedMiddle=that.getScrollSpeed(70);isAccelerating=speedEnd>=speedMiddle;if(isAccelerating){if(direction<0){target ++}else if(direction>0){target --} if(that.sections[target]===undefined){return} that.scrollTo(target);that.lastScroll=currentTime}},_attachEvents:function(){var that=this;that._destroy();if($us.$window.width()>this.disableWidth&&$us.mobileNavOpened<=0&&(!$us.$html.hasClass('cloverlay_fixed'))){document.addEventListener('mousewheel',that._events.mouseWheelHandler,{passive:!1});document.addEventListener('DOMMouseScroll',that._events.mouseWheelHandler,{passive:!1});document.addEventListener('MozMousePixelScroll',that._events.mouseWheelHandler,{passive:!1});if($.isMobile||this.isTouch){$us.$canvas.on('touchstart',function(event){var e=event.originalEvent;if(typeof e.pointerType==='undefined'||e.pointerType!=='mouse'){this.touchStartY=e.touches[0].pageY}}.bind(this));$us.$canvas.on('touchmove',function(event){event.preventDefault();var currentTime=new Date().getTime(),e=event.originalEvent,target=this.activeSection;this.touchEndY=e.touches[0].pageY;if(Math.abs(this.touchStartY-this.touchEndY)>($us.$window.height()/50)){if(this.touchStartY>this.touchEndY){target ++}else if(this.touchEndY>this.touchStartY){target --} if(this.sections[target]===undefined){return} this.scrollTo(target);this.lastScroll=currentTime}}.bind(this))}}},_countPosition:function(section,key){section.top=section.$section.offset().top-this._canvasTopOffset;if(this.footerReveal&§ion.area==='footer'&&key!==undefined){if(window.innerWidth>parseInt($us.canvasOptions.columnsStackingWidth)-1){if(this.sections[key-1]!==undefined&&this.sections[key-1].area==='footer'){section.top=this.sections[key-1].bottom}else{var rowIndex=(this.sections[this.lastContentSectionIndex+key]!==undefined)?this.lastContentSectionIndex+key:key-1;section.top=this.sections[rowIndex].bottom}}} section.bottom=section.top+section.$section.outerHeight(!1)},_countAllPositions:function(){var counter=0;for(var section in this.sections){if(this.sections[section].$section.length){this._countPosition(this.sections[section],counter)} counter ++}},scrollTo:function(target){var currentTime=new Date().getTime();if(this.previousScrollTime!==undefined&&(currentTime-this.previousScrollTime$us.canvas.options.columnsStackingWidth){if(target>this.activeSection){target+=1}else{target-=1}} if(this.usingDots){this.$dots.removeClass('active');if(this.dots[target]!==undefined){this.dots[target].addClass('active')}} var top=parseInt(this.sections[target].top||0);if(top===$us.header.getScrollTop()){return} var animateOptions={duration:this.options.animationDuration,easing:this.options.animationEasing,start:function(){this.isScrolling=!0}.bind(this),always:function(){this.isScrolling=!1;this.activeSection=target}.bind(this),step:function(now,fx){var newTop=top;if($us.header.isStickyEnabled()){newTop-=this.headerHeight} if(fx.end!==newTop){$us.$htmlBody.stop(!0,!1).animate({scrollTop:newTop},$.extend(animateOptions,{easing:this.options.endAnimationEasing}))}}.bind(this)};$us.$htmlBody.stop(!0,!1).animate({scrollTop:top},animateOptions)},resize:function(e){if(this.is_popup()){return!1} this._attachEvents();this.recountSections();$us.timeout(this._countAllPositions.bind(this),150)},scroll:function(){if(this.is_popup()){return!1} var currentTime=new Date().getTime();if((currentTime-this.lastScroll)<(this.options.coolDown+this.options.animationDuration)){return} $us.debounce(function(){var scrollTop=parseInt($us.$window.scrollTop()||0);if($us.header.isSticky()){scrollTop+=$us.header.getCurrentHeight()} for(var index in this.sections){var section=this.sections[index];if(scrollTop>=parseInt(section.top-1)&&scrollTop0)?'webkitTransitionEnd':'transitionend';this.isFixed=!jQuery.isMobile;this.$trigger=this.$container.find('.w-popup-trigger');this.triggerType=this.$trigger.usMod('type');if(this.triggerType=='load'){var delay=this.$trigger.data('delay')||2;$us.timeout(this.show.bind(this),delay*1000)}else if(this.triggerType=='selector'){var selector=this.$trigger.data('selector');if(selector){$us.$body.on('click',selector,this._events.show)}}else{this.$trigger.on('click',this._events.show)} this.$wrap=this.$container.find('.w-popup-wrap').usMod('pos',this.isFixed?'fixed':'absolute').on('click',this._events.hide);this.$box=this.$container.find('.w-popup-box');this.$overlay=this.$container.find('.w-popup-overlay').usMod('pos',this.isFixed?'fixed':'absolute').on('click',this._events.hide);this.$container.find('.w-popup-closer').on('click',this._events.hide);this.$box.on('click',this._events.preventHide);this.$media=$('video,audio',this.$box);this.timer=null};$us.WPopup.prototype={_hasScrollbar:function(){return document.documentElement.scrollHeight>document.documentElement.clientHeight},_getScrollbarSize:function(){if($us.scrollbarSize===undefined){var scrollDiv=document.createElement('div');scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';document.body.appendChild(scrollDiv);$us.scrollbarSize=scrollDiv.offsetWidth-scrollDiv.clientWidth;document.body.removeChild(scrollDiv)} return $us.scrollbarSize},show:function(){clearTimeout(this.timer);this.$overlay.appendTo($us.$body).show();this.$wrap.appendTo($us.$body).css('display','flex');if(this.isFixed){$us.$html.addClass('usoverlay_fixed');this.windowHasScrollbar=this._hasScrollbar();if(this.windowHasScrollbar&&this._getScrollbarSize()){$us.$html.css('margin-right',this._getScrollbarSize())}}else{this.$overlay.css({height:$us.$document.height()});this.$wrap.css('top',$us.$window.scrollTop())} $us.$body.on('keyup',this._events.keyup);this.$wrap.on('scroll',this._events.scroll);this.timer=setTimeout(this._events.afterShow,25)},afterShow:function(){clearTimeout(this.timer);this.$overlay.addClass('active');this.$box.addClass('active');if(window.$us!==undefined&&$us.$canvas!==undefined){$us.$canvas.trigger('contentChange')} $us.$window.trigger('resize').trigger('us.wpopup.afterShow',this)},hide:function(){clearTimeout(this.timer);$us.$body.off('keyup',this._events.keyup);this.$box.on(this.transitionEndEvent,this._events.afterHide);this.$overlay.removeClass('active');this.$box.removeClass('active');this.$wrap.off('scroll',this._events.scroll);this.timer=setTimeout(this._events.afterHide,1000)},afterHide:function(){clearTimeout(this.timer);this.$box.off(this.transitionEndEvent,this._events.afterHide);this.$overlay.appendTo(this.$container).hide();this.$wrap.appendTo(this.$container).hide();if(this.isFixed){$us.$html.removeClass('usoverlay_fixed');if(this.windowHasScrollbar){$us.$html.css('margin-right','')} $us.$window.trigger('resize',!0).trigger('us.wpopup.afterHide',this)} if(this.$media.length){this.$media.trigger('pause')}},};$.fn.wPopup=function(options){return this.each(function(){$(this).data('wPopup',new $us.WPopup(this,options))})};$(function(){$('.w-popup').wPopup()})}(jQuery);(function($,undefined){"use strict";$us.WProgbar=function(container,options){this.$container=$(container);this.$bar=$('.w-progbar-bar-h',this.$container);this.$count=$('.w-progbar-title-count, .w-progbar-bar-count',this.$container);this.$title=$('.w-progbar-title',this.$container);this.options={delay:100,duration:800,finalValue:100,offset:'10%',startValue:0,value:50};if(this.$container.is('[onclick]')){$.extend(this.options,this.$container[0].onclick()||{});this.$container.removeAttr('onclick')} $.extend(this.options,options||{});if(/bot|googlebot|crawler|spider|robot|crawling/i.test(navigator.userAgent)){this.$container.removeClass('initial')} this.$count.text('');$us.waypoints.add(this.$container,this.options.offset,this.init.bind(this))};$.extend($us.WProgbar.prototype,{init:function(){if(this.running){return} this.running=!0;if(this.$container.hasClass('initial')){this.$container.removeClass('initial')} var loops=Math.ceil(this.options.duration/this.options.delay),increment=parseFloat(this.options.value)/loops,loopCount=0,handle=null,startValue=0;var funLoop=function(){startValue+=increment;loopCount++;if(handle){$us.clearTimeout(handle)} if(loopCount>=loops){var result=this.options.template;if(this.options.hasOwnProperty('showFinalValue')){result+=' '+this.options.showFinalValue} this.$count.text(result);return} this.render.call(this,startValue);handle=$us.timeout(funLoop.bind(this),this.options.delay)};funLoop.call(this);var finalValue=parseFloat(this.options.finalValue),width=((parseFloat(parseFloat(this.options.value))/parseFloat(finalValue))*100).toFixed(0);this.$bar.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd',this._events.transitionEnd.bind(this)).css({width:width+'%',transitionDuration:parseInt(this.options.duration)+'ms'})},_events:{transitionEnd:function(){var result=this.options.template;if(this.options.hasOwnProperty('showFinalValue')){result+=' '+this.options.showFinalValue} this.$count.text(result);this.running=!1}},render:function(value){var index=0,result=(''+this.options.template).replace(/([\-\d\.])/g,function(match){value+='';if(index===0&&match==='0'){if(value.charAt(index+1)==='.'||match==='.'){index++} return match} return value.charAt(index++)||''}.bind(this));if(result.charAt(index-1)==='.'){result=result.substr(0,index-1)+result.substr(index)} if(this.options.hasOwnProperty('showFinalValue')){result+=' '+this.options.showFinalValue} this.$count.text(result)}});$.fn.wProgbar=function(options){this.each(function(){$(this).data('wProgbar',new $us.WProgbar(this,options))})};$(function(){jQuery('.w-progbar').wProgbar()})})(jQuery);!function($){"use strict";$.fn.wSearch=function(){return this.each(function(){var $container=$(this),$form=$container.find('.w-search-form'),$btnOpen=$container.find('.w-search-open'),$btnClose=$container.find('.w-search-close'),$input=$form.find('[name="s"]'),$overlay=$container.find('.w-search-background'),$window=$(window),searchOverlayInitRadius=25,isFullScreen=$container.hasClass('layout_fullscreen'),isWithRipple=$container.hasClass('with_ripple'),searchHide=function(e){e.preventDefault();e.stopPropagation();$container.removeClass('active');$input.blur();if(isWithRipple&&isFullScreen){$form.css({transition:'opacity 0.4s'});$us.timeout(function(){$overlay.removeClass('overlay-on').addClass('overlay-out').css({'transform':'scale(0.1)'});$form.css('opacity',0);$us.debounce(function(){$form.css('display','none');$overlay.css('display','none')},600)()},25)}},searchShow=function(){$container.addClass('active');if(isWithRipple&&isFullScreen){var searchPos=$btnOpen.offset(),searchWidth=$btnOpen.width(),searchHeight=$btnOpen.height();searchPos.top-=$window.scrollTop();searchPos.left-=$window.scrollLeft();var overlayX=searchPos.left+searchWidth/2,overlayY=searchPos.top+searchHeight/2,winWidth=$us.canvas.winWidth,winHeight=$us.canvas.winHeight,overlayRadius=Math.sqrt(Math.pow(Math.max(winWidth-overlayX,overlayX),2)+Math.pow(Math.max(winHeight-overlayY,overlayY),2)),overlayScale=(overlayRadius+15)/searchOverlayInitRadius;$overlay.css({width:searchOverlayInitRadius*2,height:searchOverlayInitRadius*2,left:overlayX,top:overlayY,"margin-left":-searchOverlayInitRadius,"margin-top":-searchOverlayInitRadius});$overlay.removeClass('overlay-out').show();$form.css({opacity:0,display:'block',transition:'opacity 0.4s 0.3s'});$us.timeout(function(){$overlay.addClass('overlay-on').css({"transform":"scale("+overlayScale+")"});$form.css('opacity',1)},25);$input.trigger('focus')}else{$input.trigger('focus')}};$btnOpen.on('click',searchShow);$btnClose.on('click touchstart',searchHide);$input.keyup(function(e){if(e.keyCode===27){searchHide(e)}})})};$(function(){jQuery('.l-header .w-search').wSearch()})}(jQuery);!function($){"use strict";$us.UsSharing=function(container,options){this.init(container,options)};$us.UsSharing.prototype={init:function(container,options){this.$container=$(container);if(!!this.$container.find('.w-sharing-list').data('content-image')){if($('.l-canvas img:first-child').length){this.sharingImage=$('.l-canvas img:first-child').attr('src')}else{this.sharingImage=''} this.setSharingImage()} if(!this.$container.hasClass('w-sharing-tooltip')){if(this.$container.find('.whatsapp').length&&$.isMobile){this.setWhatsAppUrl(this.$container.find('.whatsapp'))}}else{this.$copy2clipboard=this.$container.find('.w-sharing-item.copy2clipboard');this.selectedText='';this.activeArea='.l-main';if(this.$container.data('sharing-area')==='post_content'){this.activeArea='.w-post-elm.post_content'} this.$container.appendTo("body");$('body').not(this.activeArea).bind('mouseup',function(){var selection=this.getSelection();if(selection===''){this.$container.hide()}}.bind(this));$(this.activeArea).on('mouseup',function(e){var selection=this.getSelection();if(selection!==''){this.selectedText=selection;this.showTooltip(e)}else{this.selectedText='';this.hideTooltip()}}.bind(this));this.$copy2clipboard.on('click',function(){this.copyToClipboard()}.bind(this))}},showTooltip:function(e){this.$container.find('.w-sharing-item').each(function(index,elm){if($(elm).hasClass('copy2clipboard')){return} if($.isMobile&&$(elm).hasClass('whatsapp')){this.setWhatsAppUrl($(elm))} $(elm).attr('href',$(elm).data('url').replace('{{text}}',this.selectedText))}.bind(this));this.$container.css({"display":"inline-block","left":e.pageX,"top":e.pageY-50,})},setSharingImage:function(){this.$container.find('.w-sharing-item').each(function(index,elm){if($(elm).hasClass('copy2clipboard')){return} $(elm).attr('href',$(elm).attr('href').replace('{{image}}',this.sharingImage));if($(elm).attr('data-url')){$(elm).attr('data-url',$(elm).attr('data-url').replace('{{image}}',this.sharingImage))}}.bind(this))},setWhatsAppUrl:function($elm){$elm.attr('href',$elm.attr('href').replace('https://web','https://api'))},hideTooltip:function(){this.$container.hide()},copyToClipboard:function(){var url,el=document.createElement('textarea');if(this.$copy2clipboard.parent().data('sharing-url')!==undefined&&this.$copy2clipboard.parent().data('sharing-url')!==''){url=this.$copy2clipboard.parent().attr('data-sharing-url')}else{url=window.location} el.value=this.selectedText+' '+url;el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);this.hideTooltip()},getSelection:function(){var selection='';if(window.getSelection){selection=window.getSelection()}else if(document.selection){selection=document.selection.createRange()} return selection.toString().trim()},};$.fn.UsSharing=function(options){return this.each(function(){$(this).data('UsSharing',new $us.UsSharing(this,options))})};$(function(){$('.w-sharing-tooltip, .w-sharing').UsSharing()})}(jQuery);!function($){"use strict";$us.WTabs=function(container,options){this.init(container,options)};$us.WTabs.prototype={init:function(container,options){var defaults={duration:300,easing:'cubic-bezier(.78,.13,.15,.86)'};this.options=$.extend({},defaults,options);this.isRtl=$('.l-body').hasClass('rtl');this.$container=$(container);this.$tabsList=this.$container.find('> .w-tabs-list:first');this.$tabs=this.$tabsList.find('.w-tabs-item');this.$sectionsWrapper=this.$container.find('> .w-tabs-sections:first');this.$sectionsHelper=this.$sectionsWrapper.children();this.$sections=this.$sectionsHelper.find('> .w-tabs-section');this.$headers=this.$sections.children('.w-tabs-section-header');this.$contents=this.$sections.children('.w-tabs-section-content');this.$line_charts=this.$container.find(".vc_line-chart");this.$round_charts=this.$container.find(".vc_round-chart");if(this.$container.hasClass('accordion')){this.$tabs=this.$headers} this.width=0;this.tabWidths=[];this.tabHeights=[];this.tabTops=[];this.tabLefts=[];this.isScrolling=!1;this.hasScrolling=this.$container.hasClass('has_scrolling')||!1;this.isTogglable=(this.$container.usMod('type')==='togglable');this.isStretched=this.$tabsList.hasClass('stretch');this.minWidth=0;this.count=this.$tabs.length;if(this.count===0){return} this.basicLayout=this.$container.hasClass('accordion')?'accordion':(this.$container.usMod('layout')||'hor');this.curLayout=this.basicLayout;this.active=[];this.activeOnInit=[];this.definedActive=[];this.isTrendy=this.$container.hasClass('style_trendy');if(this.isTrendy){this.$tabsBar=$()} this.tabs=$.map(this.$tabs.toArray(),$);this.sections=$.map(this.$sections.toArray(),$);this.headers=$.map(this.$headers.toArray(),$);this.contents=$.map(this.$contents.toArray(),$);if(!this.sections.length){return} $.each(this.tabs,function(index){if(this.sections[index].hasClass('content-empty')){this.tabs[index].hide();this.sections[index].hide()} if(this.tabs[index].hasClass('active')){this.active.push(index);this.activeOnInit.push(index)} if(this.tabs[index].hasClass('defined-active')){this.definedActive.push(index)} this.tabs[index].add(this.headers[index]).on('click mouseover',function(e){var $link=this.tabs[index];if(!$link.is('a')){$link=$link.find('a')} if(!$link.length||($link.is('[href]')&&$link.attr('href').indexOf('http')===-1)){e.preventDefault()} if(e.type=='mouseover'&&(this.$container.hasClass('accordion')||!this.$container.hasClass('switch_hover'))){return} if(this.curLayout==='accordion'&&this.isTogglable){this.toggleSection(index)}else{if(index!=this.active[0]){this.headerClicked=!0;this.openSection(index)}else if(this.curLayout==='accordion'){this.contents[index].css('display','block').attr('aria-expanded','true').slideUp(this.options.duration,this._events.contentChanged);this.tabs[index].removeClass('active');this.sections[index].removeClass('active');this.active[0]=undefined}}}.bind(this))}.bind(this));this._events={resize:this.resize.bind(this),hashchange:this.hashchange.bind(this),contentChanged:function(){$.each(this.contents,function(_,item){var $content=$(item);$content.attr('aria-expanded',$content.is(':visible'))}) $us.$canvas.trigger('contentChange');this.$line_charts.length&&jQuery.fn.vcLineChart&&this.$line_charts.vcLineChart({reload:!1});this.$round_charts.length&&jQuery.fn.vcRoundChart&&this.$round_charts.vcRoundChart({reload:!1})}.bind(this),wheel:function(){if(this.isScrolling){$us.$htmlBody.stop(!0,!1)}}};this.switchLayout(this.curLayout);$us.$window.on('resize',$us.debounce(this._events.resize,5)).on('hashchange',this._events.hashchange).on('wheel',$us.debounce(this._events.wheel.bind(this),5)) $us.$document.ready(function(){this.resize();$us.timeout(this._events.resize,50);$us.timeout(function(){if(window.location.hash){var hash=window.location.hash.substr(1),$linkedSection=this.$sectionsWrapper.find('.w-tabs-section[id="'+hash+'"]');if($linkedSection.length&&(!$linkedSection.hasClass('active'))){$linkedSection.find('.w-tabs-section-header').trigger('click')}}}.bind(this),150)}.bind(this));$.each(this.tabs,function(index){if(this.headers.length&&this.headers[index].attr('href')!=undefined){var tabHref=this.headers[index].attr('href'),tabHeader=this.headers[index];$('a[href="'+tabHref+'"]',this.$container).on('click',function(e){e.preventDefault();if($(this).hasClass('w-tabs-section-header','w-tabs-item')){return} if(!$(tabHeader).parent('.w-tabs-section').hasClass('active')){tabHeader.trigger('click')}})}}.bind(this));this.$container.addClass('initialized');this.headerHeight=0;$us.header.on('transitionEnd',function(header){this.headerHeight=header.getCurrentHeight()}.bind(this))},hashchange:function(){if(window.location.hash){var hash=window.location.hash.substr(1),$linkedSection=this.$sectionsWrapper.find('.w-tabs-section[id="'+hash+'"]');if($linkedSection.length&&(!$linkedSection.hasClass('active'))){var $header=$linkedSection.find('.w-tabs-section-header');$header.click()}}},switchLayout:function(to){this.cleanUpLayout(this.curLayout);this.prepareLayout(to);this.curLayout=to},cleanUpLayout:function(from){if(from==='hor'){this.$sectionsWrapper.clearPreviousTransitions().resetInlineCSS('width','height');this.$sectionsHelper.clearPreviousTransitions().resetInlineCSS('position','width','left');this.$sections.resetInlineCSS('width','display');this.$container.removeClass('autoresize')}else if(from==='accordion'){this.$container.removeClass('accordion');this.$sections.resetInlineCSS('display');this.$contents.resetInlineCSS('height','padding-top','padding-bottom','display','opacity')}else if(from==='ver'){this.$contents.resetInlineCSS('height','padding-top','padding-bottom','display','opacity')} if(this.isTrendy&&(from==='hor'||from==='ver')){this.$tabsBar.remove()}},prepareLayout:function(to){if(to!=='accordion'&&this.active[0]===undefined){this.active[0]=this.activeOnInit[0];if(this.active[0]!==undefined){this.tabs[this.active[0]].addClass('active');this.sections[this.active[0]].addClass('active')}} if(to==='hor'){this.$container.addClass('autoresize');this.$sectionsHelper.css('position','absolute')}else if(to==='accordion'){this.$container.addClass('accordion');this.$contents.hide();if(this.curLayout!=='accordion'&&this.active[0]!==undefined&&this.active[0]!==this.definedActive[0]){this.headers[this.active[0]].removeClass('active');this.tabs[this.active[0]].removeClass('active');this.sections[this.active[0]].removeClass('active');this.active[0]=this.definedActive[0]} for(var i=0;i').appendTo(this.$tabsList)}},measure:function(){if(this.basicLayout==='ver'){this.$tabsList.css('width',0);var minTabWidth=this.$tabsList.outerWidth(!0);this.$tabsList.css('width','');this.$container.addClass('measure');var minContentWidth=this.$sectionsWrapper.outerWidth(!0);this.$container.removeClass('measure');var navWidth=this.$container.usMod('navwidth');if(navWidth!=='auto'){minTabWidth=Math.max(minTabWidth,minContentWidth*parseInt(navWidth)/(100-parseInt(navWidth)))} var width=(!window.ontouchstart&&this.$container.closest('.vc_col-sm-6').parent('.type_boxes').length)?480-(parseInt(this.$container.closest('.vc_col-sm-6').width())-this.$container.width()):480;this.minWidth=Math.max(width,minContentWidth+minTabWidth+1);if(this.isTrendy){this.tabHeights=[];this.tabTops=[];for(var index=0;index=0){speedFactor=Math.min(baseSpeedFactor,curImgHeight/windowHeight);offsetFactor=Math.min(0,.5*(windowHeight-curImgHeight-speedFactor*(windowHeight-containerHeight)))}else{speedFactor=Math.min(baseSpeedFactor,(windowHeight-containerHeight)/(windowHeight+containerHeight));offsetFactor=Math.max(0,speedFactor*containerHeight)}}else{speedFactor=baseSpeedFactor;offsetFactor=0} topOffset=$this.offset().top;update()},10)} getBackgroundSize(function(sz){curImgHeight=baseImgHeight=sz.height;baseImgWidth=sz.width;resize()});$window.bind({scroll:update,load:resize,resize:resize});resize()})};jQuery('.parallax_ver').parallax('50%')})(jQuery); "use strict";if(typeof wpcf7!=='undefined'){wpcf7.validate=(a,b)=>null} let cf7signature_resized=0;let wpcf7cf_timeout;let wpcf7cf_change_time_ms=100;if(window.wpcf7&&!wpcf7.setStatus){wpcf7.setStatus=(form,status)=>{form=form.length?form[0]:form;const defaultStatuses=new Map([['init','init'],['validation_failed','invalid'],['acceptance_missing','unaccepted'],['spam','spam'],['aborted','aborted'],['mail_sent','sent'],['mail_failed','failed'],['submitting','submitting'],['resetting','resetting'],]);if(defaultStatuses.has(status)){status=defaultStatuses.get(status)} if(!Array.from(defaultStatuses.values()).includes(status)){status=status.replace(/[^0-9a-z]+/i,' ').trim();status=status.replace(/\s+/,'-');status=`custom-${ status }`} const prevStatus=form.getAttribute('data-status');form.wpcf7.status=status;form.setAttribute('data-status',status);form.classList.add(status);if(prevStatus&&prevStatus!==status){form.classList.remove(prevStatus)} return status}} if(window.wpcf7cf_running_tests){jQuery('input[name="_wpcf7cf_options"]').each(function(e){const $input=jQuery(this);const opt=JSON.parse($input.val());opt.settings.animation_intime=0;opt.settings.animation_outtime=0;$input.val(JSON.stringify(opt))});wpcf7cf_change_time_ms=0} const wpcf7cf_show_animation={"height":"show","marginTop":"show","marginBottom":"show","paddingTop":"show","paddingBottom":"show"};const wpcf7cf_hide_animation={"height":"hide","marginTop":"hide","marginBottom":"hide","paddingTop":"hide","paddingBottom":"hide"};const wpcf7cf_show_step_animation={"opacity":"show"};const wpcf7cf_hide_step_animation={"opacity":"hide"};const wpcf7cf_change_events='input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf changedisabledprop.wpcf7cf';const wpcf7cf_forms=[];const Wpcf7cfForm=function($form){const options_element=$form.find('input[name="_wpcf7cf_options"]').eq(0);if(!options_element.length||!options_element.val()){return!1} const form=this;const form_options=JSON.parse(options_element.val());form.$form=$form;form.$input_hidden_group_fields=$form.find('[name="_wpcf7cf_hidden_group_fields"]');form.$input_hidden_groups=$form.find('[name="_wpcf7cf_hidden_groups"]');form.$input_visible_groups=$form.find('[name="_wpcf7cf_visible_groups"]');form.$input_repeaters=$form.find('[name="_wpcf7cf_repeaters"]');form.$input_steps=$form.find('[name="_wpcf7cf_steps"]');form.unit_tag=$form.closest('.wpcf7').attr('id');form.conditions=form_options.conditions;form.simpleDom=null;form.reloadSimpleDom=function(){form.simpleDom=wpcf7cf.get_simplified_dom_model(form.$form[0])} form.updateSimpleDom=function(){if(!form.simpleDom){form.reloadSimpleDom()} const inputs=Object.values(form.simpleDom).filter(item=>item.type==='input');const formdata=new FormData(form.$form[0]);let formdataEntries=[...formdata.entries()].map(entry=>[entry[0],entry[1].name??entry[1]]);const buttonEntries=[...jQuery('button',form.$form)].map(entry=>[entry.name,entry.value]);formdataEntries=formdataEntries.concat(buttonEntries);inputs.forEach(simpleDomItem=>{const newValue=form.getNewDomValueIfChanged(simpleDomItem,formdataEntries);if(newValue!==null){form.simpleDom[simpleDomItem.name].val=newValue}})} form.isDomMatch=function(simpleDomItem,formDataEntries){const simpleDomItemName=simpleDomItem.name;const simpleDomItemValues=simpleDomItem.val;const currentValues=formDataEntries.filter(entry=>entry[0]===simpleDomItemName).map(entry=>entry[1]);return currentValues.join('|')===simpleDomItemValues.join('|')} form.getNewDomValueIfChanged=function(simpleDomItem,formDataEntries){const simpleDomItemName=simpleDomItem.name;const simpleDomItemValues=simpleDomItem.val;const currentValues=formDataEntries.filter(entry=>entry[0]===simpleDomItemName).map(entry=>entry[1]);return currentValues.join('|')===simpleDomItemValues.join('|')?null:currentValues} form.get=function(selector){return jQuery(selector,form.$form)} form.getFieldByName=function(name){return form.simpleDom[name]||form.simpleDom[name+'[]']} for(let i=0;iitem.params.$repeater.id)));const $multistep=form.get('.wpcf7cf_multistep');if($multistep.length){form.multistep=new Wpcf7cfMultistep($multistep,form)}} Wpcf7cfForm.prototype.resetRepeaters=function(){const form=this;form.repeaters.forEach(repeater=>{repeater.updateSubs(repeater.params.$repeater.initial_subs)})} Wpcf7cfForm.prototype.displayFields=function(){const form=this;const wpcf7cf_conditions=this.conditions;const wpcf7cf_settings=this.settings;if(cf7signature_resized===0&&typeof signatures!=='undefined'&&signatures.constructor===Array&&signatures.length>0){for(let i=0;icanvas");const $sig_wrap=jQuery(".wpcf7-form-control-signature-wrap");$sig_canvas.eq(i).attr('width',$sig_wrap.width());$sig_canvas.eq(i).attr('height',$sig_wrap.height());cf7signature_resized=1}}} form.$groups.addClass('wpcf7cf-hidden');for(let i=0;ifile.name).join(', '))});jQuery.ajax({url:wpcf7cf_global_settings.ajaxurl+'?action=wpcf7cf_get_summary',type:'POST',data:fd,processData:!1,contentType:!1,dataType:'json',success:function(json){$summary.html(json.summaryHtml)}})};Wpcf7cfForm.prototype.updateHiddenFields=function(){const form=this;const hidden_fields=[];const hidden_groups=[];const visible_groups=[];form.$groups.each(function(){const $group=jQuery(this);if($group.hasClass('wpcf7cf-hidden')){hidden_groups.push($group.attr('data-id'));if($group.attr('data-disable_on_hide')!==undefined){$group.find('input,select,textarea').each(function(){const $this=jQuery(this);if(!$this.prop('disabled')){$this.prop('disabled',!0).trigger('changedisabledprop.wpcf7cf')} if(form.$form.find(`[data-class="wpcf7cf_group"]:not(.wpcf7cf-hidden) [name='${$this.attr('name')}']`).length===0){hidden_fields.push($this.attr('name'))}}) $group.find('.wpcf7-form-control-wrap').addClass('wpcf7cf-disabled')}else{$group.find('input,select,textarea').each(function(){hidden_fields.push(jQuery(this).attr('name'))})}}else{visible_groups.push($group.attr('data-id'))}});form.hidden_fields=hidden_fields;form.hidden_groups=hidden_groups;form.visible_groups=visible_groups;form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));form.$input_hidden_groups.val(JSON.stringify(hidden_groups));form.$input_visible_groups.val(JSON.stringify(visible_groups));return!0};Wpcf7cfForm.prototype.updateGroups=function(){const form=this;form.$groups=form.$form.find('[data-class="wpcf7cf_group"]');form.$groups.height('auto');form.conditions=window.wpcf7cf.get_nested_conditions(form)};Wpcf7cfForm.prototype.updateEventListeners=function(){const form=this;form.get('input, select, textarea, button').not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events,form,function(e){const form=e.data;clearTimeout(wpcf7cf_timeout);wpcf7cf_timeout=setTimeout(function(){window.wpcf7cf.updateMultistepState(form.multistep);form.updateSimpleDom();form.displayFields()},wpcf7cf_change_time_ms)});form.get('.wpcf7cf-togglebutton').off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf',function(){const $this=jQuery(this);if($this.text()===$this.attr('data-val-1')){$this.text($this.attr('data-val-2'));$this.val($this.attr('data-val-2'))}else{$this.text($this.attr('data-val-1'));$this.val($this.attr('data-val-1'))}})};function Wpcf7cfRepeater($repeater,form){const $=jQuery;let thisRepeater=this;const wpcf7cf_settings=form.settings;thisRepeater.form=form;$repeater.parentRepeaters=Array.from($repeater.parents('.wpcf7cf_repeater').map(function(){return this.getAttribute('data-id')})).reverse();$repeater.num_subs=0;$repeater.id=$repeater.attr('data-id');$repeater.orig_id=$repeater.attr('data-orig_data_id');$repeater.min=typeof($repeater.attr('data-min'))!=='undefined'?parseInt($repeater.attr('data-min')):1;$repeater.max=typeof($repeater.attr('data-max'))!=='undefined'?parseInt($repeater.attr('data-max')):200;$repeater.initial_subs=typeof($repeater.attr('data-initial'))!=='undefined'?parseInt($repeater.attr('data-initial')):$repeater.min;if($repeater.initial_subs>$repeater.max){$repeater.initial_subs=$repeater.max} const $repeater_sub=$repeater.children('.wpcf7cf_repeater_sub').eq(0);const $repeater_controls=$repeater.children('.wpcf7cf_repeater_controls').eq(0);const $repeater_sub_clone=$repeater_sub.clone();$repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function(){const $this=jQuery(this);const prev_suffix=$this.attr('data-repeater_sub_suffix');const new_suffix=prev_suffix+'__{{repeater_sub_suffix}}';$this.attr('data-repeater_sub_suffix',new_suffix)});$repeater_sub_clone.find('[name]').each(function(){const $this=jQuery(this);const prev_name=$this.attr('name');const new_name=thisRepeater.getNewName(prev_name);const orig_name=$this.attr('data-orig_name')!=null?$this.attr('data-orig_name'):prev_name;$this.attr('name',new_name);$this.attr('data-orig_name',orig_name);$this.closest('.wpcf7-form-control-wrap').attr('data-name',new_name.replace('[]',''))});$repeater_sub_clone.find('.wpcf7cf_repeater,[data-class="wpcf7cf_group"]').each(function(){const $this=jQuery(this);const prev_data_id=$this.attr('data-id');const orig_data_id=$this.attr('data-orig_data_id')!=null?$this.attr('data-orig_data_id'):prev_data_id;let new_data_id=thisRepeater.getNewName(prev_data_id);if(prev_data_id.endsWith('_count')){new_data_id=prev_data_id.replace('_count','__{{repeater_sub_suffix}}_count')} $this.attr('data-id',new_data_id);$this.attr('data-orig_data_id',orig_data_id)});$repeater_sub_clone.find('[id]').each(function(){const $this=jQuery(this);const prev_id=$this.attr('id');const orig_id=$this.attr('data-orig_id')!=null?$this.attr('data-orig_id'):prev_id;const new_id=thisRepeater.getNewName(prev_id);$this.attr('id',new_id);$this.attr('data-orig_id',orig_id)});$repeater_sub_clone.find('[for]').each(function(){const $this=jQuery(this);const prev_for=$this.attr('for');const orig_for=$this.attr('data-orig_for')!=null?$this.attr('data-orig_for'):prev_for;const new_for=thisRepeater.getNewName(prev_for);$this.attr('for',new_for);$this.attr('data-orig_for',orig_for)});const repeater_sub_html=$repeater_sub_clone[0].outerHTML;const $repeater_count_field=$repeater.find('[name='+$repeater.id+'_count]').eq(0);const $button_add=$repeater_controls.find('.wpcf7cf_add').eq(0);const $button_remove=$repeater_controls.find('.wpcf7cf_remove').eq(0);const params={$repeater:$repeater,$repeater_count_field:$repeater_count_field,repeater_sub_html:repeater_sub_html,$repeater_controls:$repeater_controls,$button_add:$button_add,$button_remove:$button_remove,wpcf7cf_settings:wpcf7cf_settings};thisRepeater.params=params;$button_add.on('click',null,thisRepeater,function(e){thisRepeater=e.data;thisRepeater.updateSubs(params.$repeater.num_subs+1)});$button_remove.on('click',null,thisRepeater,function(e){thisRepeater=e.data;thisRepeater.updateSubs(params.$repeater.num_subs-1)});jQuery('> .wpcf7cf_repeater_sub',params.$repeater).eq(0).remove();thisRepeater.updateSubs($repeater.initial_subs);thisRepeater.updateButtons()} Wpcf7cfRepeater.prototype.getNewName=function(previousName){const prev_parts=previousName.split('[');previousName=prev_parts[0];const prev_suff=prev_parts.length>1?'['+prev_parts.splice(1).join('['):'';let newName=previousName+'__{{repeater_sub_suffix}}'+prev_suff;if(previousName.endsWith('_count')){newName=previousName.replace('_count','__{{repeater_sub_suffix}}_count')} return newName} Wpcf7cfRepeater.prototype.updateButtons=function(){const repeater=this;const params=repeater.params;const num_subs=params.$repeater.num_subs;let showButtonRemove=!1;let showButtonAdd=!1;if(params.$repeater.num_subsparams.$repeater.min){showButtonRemove=!0} if(showButtonAdd){params.$button_add.show()}else{params.$button_add.hide()} if(showButtonRemove){params.$button_remove.show()}else{params.$button_remove.hide()} params.$repeater_count_field.val(num_subs)} Wpcf7cfRepeater.prototype.updateSubs=function(subs_to_show){const repeater=this;const params=repeater.params;subs_to_show=subs_to_showparams.$repeater.max?params.$repeater.max:subs_to_show const subs_to_add=subs_to_show-params.$repeater.num_subs;if(subs_to_add<0){repeater.removeSubs(-subs_to_add)}else if(subs_to_add>0){repeater.addSubs(subs_to_add)}};Wpcf7cfRepeater.prototype.addSubs=function(subs_to_add,index=null){const $=jQuery;const params=this.params;const repeater=this;const form=repeater.form;const $repeater=params.$repeater;const $repeater_controls=params.$repeater_controls;if(subs_to_add+$repeater.num_subs>$repeater.max){subs_to_add=$repeater.max-$repeater.num_subs} let html_str='';for(let i=1;i<=subs_to_add;i++){const sub_suffix=$repeater.num_subs+i;html_str+=params.repeater_sub_html.replace(/\{\{repeater_sub_suffix\}\}/g,sub_suffix).replace(new RegExp('\{\{'+$repeater.orig_id+'_index\}\}','g'),''+sub_suffix+'')} const $html=$(html_str);$('> .wpcf7cf_repeater_sub',$repeater).finish();if(index===null){$html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation,params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added')}else{$html.hide().insertBefore($('> .wpcf7cf_repeater_sub',$repeater).eq(index)).animate(wpcf7cf_show_animation,params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added')} $html.find('.wpcf7cf-disabled :input').prop('disabled',!1).trigger('changedisabledprop.wpcf7cf');$html.find('.wpcf7-form-control-wrap').removeClass('wpcf7cf-disabled');$('.wpcf7cf_repeater',$html).each(function(){form.repeaters.push(new Wpcf7cfRepeater($(this),form))});form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));$repeater.num_subs+=subs_to_add;if(index!==null){repeater.updateSuffixes()} window.wpcf7cf.updateMultistepState(form.multistep);form.updateGroups();form.updateEventListeners();form.displayFields();repeater.updateButtons();$html.on('click','.wpcf7-exclusive-checkbox input:checkbox',function(){const name=$(this).attr('name');$html.find('input:checkbox[name="'+name+'"]').not(this).prop('checked',!1)});if(typeof window.cf7mdInit==="function"){window.cf7mdInit()} return!1};Wpcf7cfRepeater.prototype.updateSuffixes=function(){const $repeater=this.params.$repeater;const num_subs=this.params.$repeater.num_subs;const form=this.form;const orig_id=$repeater.attr('data-orig_data_id');const repeater_id=$repeater.attr('data-id');const repeater_suffix=repeater_id.replace(orig_id,'');let simplifiedDomArray=Object.values(wpcf7cf.get_simplified_dom_model(form.$form[0]));for(let i=0;i .wpcf7cf_repeater_sub',$repeater).eq(i);const newIndex=i+1;const currentSuffix=$sub.attr('data-repeater_sub_suffix');const newSuffix=repeater_suffix+'__'+newIndex;$sub.attr('data-repeater_sub_suffix',newSuffix);$sub.find('.wpcf7cf__'+orig_id).html(newIndex);simplifiedDomArray.forEach(function(el){if(el.suffix!==currentSuffix)return;const newName=el.name.replace(currentSuffix,newSuffix);const pureElName=el.name.replace('[]','');const pureNewName=newName.replace('[]','');jQuery('[name="'+el.name+'"]',$sub).attr('name',newName);jQuery('[id="'+el.name+'"]',$sub).attr('id',newName);jQuery('label[for="'+el.name+'"]',$sub).attr('for',newName);const $nested_repeater=jQuery('[data-id="'+el.name+'"]',$sub);$nested_repeater.attr('data-id',newName);jQuery(`.wpcf7-form-control-wrap[data-name="${pureElName}"]`,$sub).attr('data-name',pureNewName);if(el.type==='repeater'){const nested_repeater=form.repeaters.find(function(repeater){return repeater.params.$repeater.get(0)===$nested_repeater.get(0)});if(!nested_repeater)return;nested_repeater.params.repeater_sub_html=wpcf7cf.updateRepeaterSubHTML(nested_repeater.params.repeater_sub_html,currentSuffix,newSuffix,nested_repeater.params.$repeater.parentRepeaters);nested_repeater.updateSuffixes()}})}};Wpcf7cfRepeater.prototype.getParentRepeaters=function(){const simplifiedDomArray=Object.values(wpcf7cf.get_simplified_dom_model(form.$form[0]));form.repeaters.map(repeater=>{})};Wpcf7cfRepeater.prototype.removeSubs=function(subs_to_remove,index=null){const $=jQuery;const repeater=this;const params=repeater.params;const form=repeater.form;const $repeater=params.$repeater;if($repeater.num_subs-subs_to_remove<$repeater.min){subs_to_remove=$repeater.num_subs-$repeater.min} if(index===null){index=$repeater.num_subs-subs_to_remove} $repeater.num_subs-=subs_to_remove;jQuery('> .wpcf7cf_repeater_sub',$repeater).finish();jQuery('> .wpcf7cf_repeater_sub',$repeater).slice(index,index+subs_to_remove).animate(wpcf7cf_hide_animation,{duration:params.wpcf7cf_settings.animation_intime,done:function(){const $this=jQuery(this);$this.remove();params.$repeater.trigger('wpcf7cf_repeater_removed');window.wpcf7cf.updateMultistepState(form.multistep);form.updateGroups();form.updateEventListeners();form.displayFields();repeater.updateButtons();if(index!==null){repeater.updateSuffixes()}}});return!1};function Wpcf7cfMultistep($multistep,form){const multistep=this;multistep.$multistep=$multistep;multistep.form=form;multistep.$steps=$multistep.find('.wpcf7cf_step');multistep.$btn_next=$multistep.find('.wpcf7cf_next');multistep.$btn_prev=$multistep.find('.wpcf7cf_prev');multistep.$dots=$multistep.find('.wpcf7cf_steps-dots');multistep.currentStep=0;multistep.numSteps=multistep.$steps.length;multistep.$dots.html('');for(let i=1;i<=multistep.numSteps;i++){multistep.$dots.append(`
${i}
${multistep.$steps.eq(i-1).attr('data-title')}
`)} multistep.$btn_next.on('click.wpcf7cf_step',async function(){multistep.$btn_next.addClass('disabled').attr('disabled',!0);multistep.form.$form.addClass('submitting');const result=await multistep.validateStep(multistep.currentStep);multistep.form.$form.removeClass('submitting');if(result==='success'){multistep.moveToStep(multistep.currentStep+1)}});multistep.form.$form.on('submit.wpcf7cf_step',function(e){if(multistep.form.$form.hasClass('submitting')){e.stopImmediatePropagation();return!1} if(multistep.currentStep!==multistep.numSteps){multistep.$btn_next.trigger('click.wpcf7cf_step');e.stopImmediatePropagation();return!1}});multistep.$btn_prev.on('click',function(){multistep.moveToStep(multistep.currentStep-1)});multistep.moveToStep(1)} Wpcf7cfMultistep.prototype.validateStep=function(step_index){const multistep=this;const $multistep=multistep.$multistep;const $form=multistep.form.$form;const form=multistep.form;$form.find('.wpcf7-response-output').addClass('wpcf7-display-none');return new Promise(resolve=>{const fd=new FormData();jQuery.each($form.find('[data-id="step-'+step_index+'"] input[type="file"]'),function(index,el){if(!el.files.length)return!0;const file=el.files[0];const fieldName=el.name;fd.append(fieldName,file)});const formdata=$form.serializeArray();jQuery.each(formdata,function(key,input){fd.append(input.name,input.value)});jQuery.ajax({url:wpcf7cf_global_settings.ajaxurl+'?action=wpcf7cf_validate_step',type:'POST',data:fd,processData:!1,contentType:!1,dataType:'json',}).done(function(json){$multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();$multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');$multistep.find('.wpcf7-response-output.wpcf7-validation-errors').removeClass('wpcf7-validation-errors');multistep.$btn_next.removeClass('disabled').attr('disabled',!1);if(!json.success){let checkError=0;jQuery.each(json.invalid_fields,function(index,el){if($multistep.find('input[name="'+index+'"]').length||$multistep.find('input[name="'+index+'[]"]').length||$multistep.find('select[name="'+index+'"]').length||$multistep.find('select[name="'+index+'[]"]').length||$multistep.find('textarea[name="'+index+'"]').length||$multistep.find('textarea[name="'+index+'[]"]').length){checkError=checkError+1;const controlWrap=form.get(`.wpcf7-form-control-wrap[data-name="${index}"]`);controlWrap.find('.wpcf7-form-control').addClass('wpcf7-not-valid');controlWrap.find('span.wpcf7-not-valid-tip').remove();controlWrap.append(''+el.reason+'')}});resolve('failed');$multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);wpcf7.setStatus($form,'invalid');multistep.$steps.trigger('wpcf7cf_step_invalid')}else if(json.success){wpcf7.setStatus($form,'init');resolve('success');return!1}}).fail(function(){resolve('error')}).always(function(){})})};Wpcf7cfMultistep.prototype.moveToStep=function(step_index,scrollToTop=!0){const multistep=this;const previousStep=multistep.currentStep;multistep.currentStep=step_index>multistep.numSteps?multistep.numSteps:step_index<1?1:step_index;multistep.$multistep.attr('data-current_step',multistep.currentStep);multistep.$steps.hide();multistep.$steps.eq(multistep.currentStep-1).show().trigger('wpcf7cf_change_step',[previousStep,multistep.currentStep]);if(scrollToTop){const formEl=multistep.form.$form[0];const topOffset=formEl.getBoundingClientRect().top;if(topOffset<0&&previousStep>0){formEl.scrollIntoView({behavior:"smooth"})}} multistep.form.updateSummaryFields();window.wpcf7cf.updateMultistepState(multistep)};Wpcf7cfMultistep.prototype.getFieldsInStep=function(step_index){this.form.reloadSimpleDom();let inStep=!1;return Object.values(this.form.simpleDom).filter(function(item,i){if(item.type=='step'){inStep=item.val==step_index+''} return inStep&&item.type=='input'}).map(function(item){return item.name})};window.wpcf7cf={hideGroup:function($group,animate){},showGroup:function($group,animate){},updateRepeaterSubHTML:function(html,oldSuffix,newSuffix,parentRepeaters){const oldIndexes=oldSuffix.split('__');oldIndexes.shift();const newIndexes=newSuffix.split('__');newIndexes.shift();let returnHtml=html;if(oldIndexes&&newIndexes&&oldIndexes.length===parentRepeaters.length&&newIndexes.length===parentRepeaters.length){const parentRepeatersInfo=parentRepeaters.map((repeaterId,i)=>{return{[repeaterId.split('__')[0]]:[oldIndexes[i],newIndexes[i]]}});const length=parentRepeatersInfo.length;let replacements=oldIndexes.map((oldIndex,i)=>{return['__'+oldIndexes.slice(0,length-i).join('__'),'__'+newIndexes.slice(0,length-i).join('__'),]});for(let i=0;i${find}<\\/span>`,`${repl}`])} replacements.forEach(([oldSuffix,newSuffix])=>{returnHtml=returnHtml.replace(new RegExp(oldSuffix,'g'),newSuffix)})} return returnHtml},initForm:function($forms){$forms.each(function(){const $form=jQuery(this);if($form.hasClass('wpcf7-form')&&!wpcf7cf_forms.some((form)=>{return form.$form.get(0)===$form.get(0)})){wpcf7cf_forms.push(new Wpcf7cfForm($form))}})},getWpcf7cfForm:function($form){const matched_forms=wpcf7cf_forms.filter((form)=>{return form.$form.get(0)===$form.get(0)});if(matched_forms.length){return matched_forms[0]} return!1},get_nested_conditions:function(form){const conditions=form.initial_conditions;form.reloadSimpleDom();const groups=Object.values(form.simpleDom).filter(function(item,i){return item.type==='group'});let sub_conditions=[];for(let i=0;io.selected).map(o=>o.value)}else{simplified_dom[name].val.push(currentNode.value)}}} const getter=Object.getOwnPropertyDescriptor(Element.prototype,"children").get;const children=getter.call(currentNode);Array.from(children).forEach(childNode=>{const dom=wpcf7cf.get_simplified_dom_model(childNode,simplified_dom,newParentGroups,newParentRepeaters);simplified_dom={...dom,...simplified_dom}});return simplified_dom},updateMultistepState:function(multistep){if(multistep==null)return;if(multistep.form.$form.hasClass('submitting'))return;const stepsData={currentStep:multistep.currentStep,numSteps:multistep.numSteps,fieldsInCurrentStep:multistep.getFieldsInStep(multistep.currentStep)};multistep.form.$input_steps.val(JSON.stringify(stepsData));multistep.$btn_prev.removeClass('disabled').attr('disabled',!1);multistep.$btn_next.removeClass('disabled').attr('disabled',!1);if(multistep.currentStep==multistep.numSteps){multistep.$btn_next.addClass('disabled').attr('disabled',!0)} if(multistep.currentStep==1){multistep.$btn_prev.addClass('disabled').attr('disabled',!0)} const $submit_button=multistep.form.$form.find('input[type="submit"]:last').eq(0);const $ajax_loader=multistep.form.$form.find('.wpcf7-spinner').eq(0);$submit_button.detach().prependTo(multistep.$btn_next.parent());$ajax_loader.detach().prependTo(multistep.$btn_next.parent());if(multistep.currentStep==multistep.numSteps){multistep.$btn_next.hide();$submit_button.show()}else{$submit_button.hide();multistep.$btn_next.show()} const $dots=multistep.$dots.find('.dot');$dots.removeClass('active').removeClass('completed');for(let step=1;step<=multistep.numSteps;step++){if(step'?'greater than':operator;operator=operator==='<'?'less than':operator;const $field=operator==='function'&&jQuery(`[name="${inputField.name}"]`).eq(0);condition_ok=this.isConditionTrue(inputField.val,operator,if_val,$field);show_group=show_group&&condition_ok} return show_group&&atLeastOneFieldFound},isConditionTrue(values,operator,testValue='',$field=jQuery()){if(!Array.isArray(values)){values=[values]} let condition_ok=!1;const valuesAreEmpty=values.length===0||values.every((v)=>!v&&v!==0);if(operator==='equals'&&testValue===''&&valuesAreEmpty){return!0} if(operator==='not equals'&&testValue===''&&valuesAreEmpty){return!1} if(valuesAreEmpty){if(operator==='is empty'){condition_ok=!0}}else{if(operator==='not empty'){condition_ok=!0}} const testValueNumber=isFinite(parseFloat(testValue))?parseFloat(testValue):NaN;if(operator==='not equals'||operator==='not equals (regex)'){condition_ok=!0} if(operator==='function'&&typeof window[testValue]=='function'&&window[testValue]($field)){condition_ok=!0} let regex_patt=/.*/i;let isValidRegex=!0;if(operator==='equals (regex)'||operator==='not equals (regex)'){try{regex_patt=new RegExp(testValue,'i')}catch(e){isValidRegex=!1}} for(let i=0;itestValueNumber||operator==='less than'&&valsAreNumbers&&valueNumber=testValueNumber||operator==='less than or equals'&&valsAreNumbers&&valueNumber<=testValueNumber){condition_ok=!0;break}else if(operator==='not equals'&&value===testValue||operator==='not equals (regex)'&®ex_patt.test(value)){condition_ok=!1;break}} return condition_ok},getFormObj($form){if(typeof $form==='string'){$form=jQuery($form).eq(0)} return wpcf7cf.getWpcf7cfForm($form)},getRepeaterObj($form,repeaterDataId){const form=wpcf7cf.getFormObj($form);const repeater=form.repeaters.find(repeater=>repeater.params.$repeater.attr('data-id')===repeaterDataId);return repeater},getMultiStepObj($form){const form=wpcf7cf.getFormObj($form);return form.multistep},repeaterAddSub($form,repeaterDataId){const repeater=wpcf7cf.getRepeaterObj($form,repeaterDataId);repeater.updateSubs(repeater.params.$repeater.num_subs+1)},repeaterAddSubAtIndex($form,repeaterDataId,index){const repeater=wpcf7cf.getRepeaterObj($form,repeaterDataId);repeater.addSubs(1,index)},repeaterRemoveSubAtIndex($form,repeaterDataId,index){const repeater=wpcf7cf.getRepeaterObj($form,repeaterDataId);repeater.removeSubs(1,index)},repeaterRemoveSub($form,repeaterDataId){const repeater=wpcf7cf.getRepeaterObj($form,repeaterDataId);repeater.updateSubs(repeater.params.$repeater.num_subs-1)},repeaterSetNumberOfSubs($form,repeaterDataId,numberOfSubs){const repeater=wpcf7cf.getRepeaterObj($form,repeaterDataId);repeater.updateSubs(numberOfSubs)},multistepMoveToStep($form,step){const multistep=wpcf7cf.getMultiStepObj($form);multistep.moveToStep(step)},async multistepMoveToStepWithValidation($form,step){const multistep=wpcf7cf.getMultiStepObj($form);const result=await multistep.validateStep(multistep.currentStep);if(result==='success'){multistep.moveToStep(step)}},};jQuery('.wpcf7-form').each(function(){wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)))});jQuery('document').ready(function(){wpcf7cf_forms.forEach(function(f){f.displayFields()})});const old_wpcf7ExclusiveCheckbox=jQuery.fn.wpcf7ExclusiveCheckbox;jQuery.fn.wpcf7ExclusiveCheckbox=function(){return this.find('input:checkbox').on('click',function(){const name=jQuery(this).attr('name');jQuery(this).closest('form').find('input:checkbox[name="'+name+'"]').not(this).prop('checked',!1).eq(0).change()})}; ;