function resizeFont(){let e=document.documentElement.clientWidth>750?750:document.documentElement.clientWidth;document.documentElement.style.fontSize=e/750*100+"px"}function isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)}window.addEventListener("load",(()=>resizeFont())),window.addEventListener("resize",(()=>resizeFont())),$("body").on("click",(function(e){$(e.target).closest(".home-header .menu-item>p,.home-header .menu-item .menu-content,.features-icon").length>0||($(".menu-content").hide(),$(".menu-item p").removeClass("active-menu"),$(".features-menu").hide())})),$(".home-header").on("click",".menu-item",(function(e){"none"==$(this).children(".menu-content").css("display")?($(this).children("p").addClass("active-menu"),$(this).children(".menu-content").show()):($(this).children("p").removeClass("active-menu"),$(this).children(".menu-content").hide())})).on("click",".header-open",(function(){$(this).hide(),$(".header-close").show(),$(".menu-main").slideDown(150),$(".home-header").css("height","100vh").addClass("menu-open"),$(".footer-window").hide(),$(".header-credits-box").removeClass("active")})).on("click",".header-close",(function(){$(this).hide(),$(".header-open").show(),$(".menu-main").slideUp(150),$(".home-header").css("height","1.3rem").removeClass("menu-open")})),$(".home-header .menu-item").bind({mouseenter:function(e){$(this).children(".menu-content").slideToggle(150),$(this).children("p").addClass("active-menu")}}).bind({mouseleave:function(e){$(this).children(".menu-content").hide(),$(this).children("p").removeClass("active-menu")}}),$(".page-footer").on("click",".language-select .select-handle",(function(){$(this).toggleClass("selected"),$(".language-select .options").toggle()})).on("click",".language-select  .options .option-item",(function(){$(".language-select .options").hide()})),$(".footer-window").hide(),$(window).scroll((function(){document.documentElement.scrollTop+document.body.scrollTop>window.innerHeight?$("#backTop").show():$("#backTop").hide(),isMobile()&&isMobile()&&($(document).scrollTop()<=0?$(".footer-window").slideUp(150):$(".footer-window").slideDown(150))}));let urlHost="es.vidnoz.com"==location.host?"https://es.vidnoz.com":"https://yinchuanbo.vidnoz.com:8686/preview";"es-test.vidnoz.com"==location.host&&(urlHost="https://es-test.vidnoz.com");for(let e of $(".footer-window  .window-item"))$(e).attr("href",`${urlHost}${$(e).attr("href")}`);function handleScrollAnimation(){$(".scroll-animation").each((function(e,n){n.getBoundingClientRect().top<.66*window.innerHeight&&$(n).addClass("on")}))}$((function(){const e=location.pathname;for(let n of $(".footer-window .window-item"))if($(n).attr("href").includes(e)&&"/"!=e&&"/index.html"!=e)return $(".footer-window .window-item .icon").removeClass("active"),void $(n).children(".icon-wapper").children(".icon").addClass("active");$(".footer-window .window-item .icon").addClass("active")})),$("#backTop").click((function(){$("html,body").animate({scrollTop:"0px"},100)})),window.addEventListener("scroll",(function(){handleScrollAnimation()})),$(".features-icon").on("click",(function(){$(".features-menu").toggle()})),$("#footerLogin").on("click",(function(e){e.stopPropagation(),e.preventDefault(),gtag("event",$(this).attr("data-gtag")),isLogin()?location.href="https://m-es.vidnoz.com?name=ai":showLoginWindow({fn:()=>{location.href="https://m-es.vidnoz.com?name=ai"}})}));