function topFunction(){window.scrollTo({top:0,behavior:"smooth"})}function gotoPosition(n){screen.width<800&&window.scrollTo(0,n)}function gotoId(n){const t=document.getElementById(n);t.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}function btnScrollTop(){var n=document.querySelector(".btnScrollToUp"),i=document.querySelector(".vehiculoIcon");let r,t=()=>{let t=window.window.scrollY;n.classList.remove("hidden");let u=document.documentElement.clientHeight-document.body.clientHeight,r=Math.round(Math.floor(t)*100/u)*-1;t>100?(n.style.display="flex",document.getElementById("hideOnScroll").style.top="-500px",document.getElementById("busquedaScroll").style.top="0",i.style.display="flex",document.getElementById("btnBusquedaVehiculo").style.display="none"):(n.style.display="none",document.getElementById("hideOnScroll").style.top="0",screen.width<=950?(document.getElementById("busquedaScroll").style.top="45px",i.style.display="none",document.getElementById("btnBusquedaVehiculo").style.display="flex"):document.getElementById("busquedaScroll").style.top="45px");n.style.background=`conic-gradient(red ${r}%, white ${r}%)`};const u=()=>{clearTimeout(r),r=setTimeout(()=>{n.classList.add("hidden")},2e3)};n.addEventListener("click",function(){window.scrollTo({top:0,behavior:"smooth"})});window.addEventListener("scroll",()=>{t(),n.classList.remove("hidden"),u()});window.onscroll=t;window.onload=t}function btnScrollTopFunction(){window.scrollTo({top:0,behavior:"smooth"})}function lupasEfect(){var n=document.querySelectorAll(".magnifying_area");n.forEach(n=>{var t=document.querySelector(".magnifying_img");n.addEventListener("mousemove",function(i){clientX=i.clientX-n.offsetLeft;clientY=i.clientY-n.offsetTop;var r=n.offsetWidth,u=n.offsetHeight;clientX=clientX/r*100-70;clientY=clientY/u*100-50;t.style.transform="translate(-"+clientX+"%, -"+clientY+"%) scale(2)"});n.addEventListener("mouseleave",function(){t.style.transform="translate(-50%,-50%) scale(1)"})})}