const loadScript=e=>new Promise((t,s)=>{const a=document.createElement("script");a.type="text/javascript",a.onload=t,a.onerror=s,a.src=e,document.head.append(a)});document.addEventListener("DOMContentLoaded",function(){navScript&&(console.log("Loading NavScript"),loadScript("//cdn2.hubspot.net/hub/7958737/hub_generated/template_assets/36510939254/1604692497833/Encora_Website_v1/Coded_Files/nav.min.js").catch(()=>console.error("e: nav"))),lityScript&&(console.log("Loading Lity"),loadScript("https://www.encora.com/hubfs/Website_Assets/javascript/lity.min.js").catch(()=>console.error("e: lity"))),slickScript&&(console.log("Loading Slick"),loadScript("https://www.encora.com/hubfs/Website_Assets/javascript/slick.min.js").then(()=>loadScript("https://www.encora.com/hubfs/Website_Assets/javascript/slick-calls.min.js")).catch(()=>console.error("e: slick")))});const lazyBGs=document.querySelectorAll(".lazy-bg"),lazyBGsInline=document.querySelectorAll("[data-lazy-bg]");if(lazyBGs.forEach(e=>{e.classList.remove("lazy-bg")}),lazyBGsInline.forEach(e=>{e.style.backgroundImage="url("+e.getAttribute("data-lazy-bg")+")"}),$(".map")&&($(".map-pin").mouseenter(function(){$(".map-city.hover").removeClass("hover"),$(this).parent().addClass("hover")}),$(".map-city").mouseleave(function(){$(this).removeClass("hover")})),$("#success-all"))function showAllStories(e){e.preventDefault();var t=document.getElementsByClassName("success-card");document.getElementById("success-all").classList.add("desktop-hide");for(var s=0;s0)for($(".tabstrip-whatwedo .tabstrip-tab").eq(2).addClass("active"),$(".tabstrip-panel").eq(2).addClass("active"),$(".tabstrip-tab").click(function(){$(".tabstrip-tab.active").removeClass("active"),$(this).addClass("active"),$(".tabstrip-panel.active").removeClass("active"),$(".tabstrip-panel").eq($(this).index()).addClass("active")}),i=0;i<$(".tabstrip-tab").length;i++)$(".tabstrip-whatwedo .tabstrip-tab").eq(i).clone().attr("class","tabstrip-tab-copy").prependTo($(".tabstrip-whatwedo .tabstrip-panel").eq(i));switch(requestPath){case"/about":case"/es/nosotros":document.addEventListener("DOMContentLoaded",function(){var e=document.querySelector("#leadership-tab"),t=document.querySelector("#board-tab"),s=document.querySelector("#senior-tab"),a=document.querySelector(".team-leadership"),i=document.querySelector(".team-senior"),c=document.querySelector(".team-board");c.classList.add("no-visible"),e.addEventListener("click",function(r){r.preventDefault(),e.classList.add("selected"),t.classList.remove("selected"),s.classList.remove("selected"),a.classList.remove("not-visible"),c.classList.add("not-visible"),i.classList.add("not-visible")}),s.addEventListener("click",function(r){r.preventDefault(),e.classList.remove("selected"),t.classList.remove("selected"),s.classList.add("selected"),a.classList.add("not-visible"),c.classList.add("not-visible"),i.classList.remove("not-visible")}),t.addEventListener("click",function(r){r.preventDefault(),e.classList.remove("selected"),t.classList.add("selected"),s.classList.remove("selected"),a.classList.add("not-visible"),c.classList.remove("not-visible"),i.classList.add("not-visible")})});break;case"/careers":case"/es/empleos":for($(".tabstrip-tab").eq(0).addClass("active"),$(".tabstrip-panel").eq(0).addClass("active"),$(".tabstrip-tab").click(function(){$(".tabstrip-tab.active").removeClass("active"),$(this).addClass("active"),$(".tabstrip-panel.active").removeClass("active"),$(".tabstrip-panel").eq($(this).index()).addClass("active")}),i=0;i<$(".tabstrip-tab").length;i++)$(".tabstrip-tab").eq(i).clone().attr("class","tabstrip-tab-copy").prependTo($(".tabstrip-panel").eq(i));break;case"/contact":case"/es/contacto":for($(".tabstrip-tab").click(function(){$(".tabstrip-tab.active").removeClass("active"),$(this).addClass("active"),$(".tabstrip-panel.active").removeClass("active"),$(".tabstrip-panel").eq($(this).index()).addClass("active")}),i=0;i<$(".tabstrip-tab").length;i++)$(".tabstrip-locations .tabstrip-tab").eq(i).clone().attr("class","tabstrip-tab-copy").prependTo($(".tabstrip-locations .tabstrip-panel").eq(i));break;default:if(requestPath.indexOf("/insights/")>-1||requestPath.indexOf("/blog/")>-1){var titles=$(".post-body-container h3");$.each(titles,function(e,t){var s=$(this).text().toLowerCase().split(" ").join("-"),a='";$(this).attr("id",s),$("#contents").append(a)}),0==titles.length&&$("#contents").parents(".contents-list").remove()}if(requestPath.indexOf("/services/")>-1||requestPath.indexOf("/servicios/")>-1){function markCurrentServiceCard(){var e=$(".select-current-service").find(".card");$.each(e,function(e,t){$(this).attr("href").indexOf(window.location.pathname)>=0&&$(this).addClass("current-service").removeAttr("href")})}$(document).ready(function(){var e=$(".subservice").eq(0).closest("section").hasClass("bg-grey-100");e&&$("section.hero").parents("div").addClass("bg-grey-100"),markCurrentServiceCard()})}}