var slugCode="/"+countryCode.toLowerCase();if(countryCode===""||countryCode==="us"){slugCode=""}$("span.edition").html(localeEdition);addSlugCode();const brandLogo=document.querySelector("a.masthead");const footerBrandLogo=document.querySelector("footer .brand a");if(brandLogo.getAttribute("href").indexOf("/")==0){if(slugCode!=""){brandLogo.setAttribute("href",slugCode+brandLogo.getAttribute("href"))}}if(footerBrandLogo.getAttribute("href").indexOf("/")==0){if(slugCode!=""){footerBrandLogo.setAttribute("href",slugCode+footerBrandLogo.getAttribute("href"))}}if(slugCode!=""){if(location.pathname=="/"){window.location.replace(slugCode+"/")}}var newsletterFormAction=$("#nl-form-action").attr("action");if(newsletterFormAction!==undefined&&countryCode!==""&&countryCode!=="United States"){newsletterFormAction="/"+countryCode+newsletterFormAction;document.getElementById("nl-form-action").action=newsletterFormAction}function addSlugCode(){const linkUrlClasses=document.querySelectorAll("a.edition-link-url");linkUrlClasses.forEach(function(element){if(element.getAttribute("href").indexOf("/resources")==0||element.getAttribute("href").indexOf("/category/")==0||element.getAttribute("href").indexOf("/awards")==0||element.getAttribute("href").indexOf("/events/")==0||element.getAttribute("href").indexOf("/tag/")==0||element.getAttribute("href").indexOf("/news")==0||element.getAttribute("href").indexOf("/feature")==0||element.getAttribute("href").indexOf("/opinion")==0||element.getAttribute("href").indexOf("/news-analysis")==0||element.getAttribute("href").indexOf("/blogs")==0||element.getAttribute("href").indexOf("/podcast")==0||element.getAttribute("href").indexOf("/blog/")==0||element.getAttribute("href").indexOf("/slideshows")==0||element.getAttribute("href").indexOf("/insider")==0||element.getAttribute("href").indexOf("/tips")==0||element.getAttribute("href").indexOf("/howto")==0||element.getAttribute("href").indexOf("/how-to")==0||element.getAttribute("href").indexOf("/reviews")==0||element.getAttribute("href").indexOf("/analysis")==0||element.getAttribute("href").indexOf("/dealpost")==0||element.getAttribute("href").indexOf("/deals")==0||element.getAttribute("href")=="/"||element.getAttribute("href").indexOf("/sponsor/")===0||element.getAttribute("href")==="/sponsors"){element.setAttribute("href",slugCode+element.getAttribute("href"))}})};