function redirectTo(n){window.parent.frames.length>0?window.parent.location.href=n:window.location.href=n}window.onload=function(){document.getElementById("pageLoader")&&(document.getElementById("pageLoader").style.display="none")};$(document).ready(function(){function r(n){n.preventDefault();var t=this.href;window.open(t,"livechatwin","width=380,height=600,toolbars=no,status=no,location=no")}function e(){const n={closePop:!0};$.ajax({type:"GET",url:"/AjaxCall/GetWebsiteURL/",data:{id:f},dataType:"json",success:function(t){t!=""&&t!=undefined?window.parent.postMessage(n,t):console.log("Something went wrong getting website...")},failure:function(n){console.log("Failure: could not get website, please try again.",n.responseText)},error:function(n){console.log("Error: could not get website, please try again. ",n.responseText)}})}window.parent.frames.length>0&&(document.querySelector("#bodyLight")||(document.documentElement.style.backgroundColor="transparent",document.body.style.background="transparent"));const t=document.getElementsByClassName("live-chat__link");for(let n=0;n<t.length;n++)t[n].addEventListener("click",r);document.getElementById("addAnotherFeature")&&$("#addAnotherFeature").click(function(n){n.preventDefault();$("#brandFeatures").append('<div class="col-md-3">').append('@Html.EditorFor(model => model.BrandFeatures[i], new { htmlAttributes = new { @class = "form-control"} })').append('@Html.ValidationMessageFor(model => model.BrandFeatures[i], "", new { @class = "text-danger" })').append("<\/div>")});const u=window.location.href,n="mm-active";$(".app-sidebar__inner ul li a").each(function(){u.endsWith($(this).attr("href"))?($(this).addClass(n),$(this).parent("li").addClass(n)):($(this).removeClass(n),$(this).parent("li").removeClass(n))});const i=document.querySelector("#closeIframe"),f=document.querySelector("#brandName").value;i&&i.addEventListener("click",e)})