function superEffect(){var n=$(".super-btns>div.active").index()+1;$(".super-imgs>img:nth-child("+n+")").addClass("active").siblings().removeClass("active");btTl.restart()}function superLRbtns(){paraIndex>=SUPERbtns.length-SUPERcolumn+1?paraIndex=SUPERbtns.length-SUPERcolumn:paraIndex<0?paraIndex=0:$(".super-btn").css("transform","translateX("+paraIndex*-100+"%)")}function UtilityEffect(){var n=$(".utility-btns>div.active").index()+1;$(".utility-imgs>img:nth-child("+n+")").addClass("active").siblings().removeClass("active");btTl.restart()}var wheelPicker;gsap.registerPlugin(ScrollTrigger);var turbVal={val:0},turb=document.querySelectorAll("#noise feTurbulence")[0],btTl=new TimelineLite({paused:!0,onUpdate:function(){turb.setAttribute("baseFrequency","0 "+turbVal.val)}});btTl.from(turbVal,.3,{val:.4}).to(turbVal,.3,{val:1e-6});$(".rgb-btns div:nth-child(1)").addClass("active").siblings().removeClass("active");$(".rgb-bgs>*:nth-child(1)").addClass("active").siblings().removeClass("active");$(".rgb-btns div").click(function(){$(this).addClass("active").siblings().removeClass("active");var n=$(this).index()+1;$(".rgb-bgs>*:nth-child("+n+")").addClass("active").siblings().removeClass("active")});wheelPicker=new iro.ColorPicker("#wheelPicker",{width:$(window).width()>900?100:300,color:"rgb(255, 100, 0)",borderWidth:0,borderColor:"#fff0",layout:[{component:$(window).width()>900?iro.ui.Wheel:iro.ui.Slider,options:{sliderType:"hue",sliderSize:"20"}},]});wheelPicker.on(["color:init","color:change"],function(n){$(".base-color").css("filter","hue-rotate("+n.hue+"deg) saturate("+n.saturation/100+") brightness("+(200-n.saturation)/100+")")});let InitWidth=$(window).width(),CurrentWidth=$(window).width(),QueryWidth=900;$(window).resize(function(){CurrentWidth=$(window).width();InitWidth<QueryWidth&&CurrentWidth>QueryWidth?location.reload():InitWidth>QueryWidth&&CurrentWidth<QueryWidth&&location.reload()});let SUPERbtns=document.querySelectorAll(".super-btns>div");$(".super-btns>div").click(function(){$(this).addClass("active").siblings().removeClass("active");superEffect()});let SUPERcolumn=3;setInterval(()=>{SUPERcolumn=$(document).width()>1200?3:2,$(".super-btn").css("width","calc(100% / "+SUPERcolumn+")")},100);let paraIndex=0;$(".super-btns-left").click(function(){paraIndex=paraIndex-1;superLRbtns()});$(".super-btns-right").click(function(){paraIndex=paraIndex+1;superLRbtns()});setInterval(()=>{paraIndex==0?$(".super-btns-left").addClass("transparent"):paraIndex==SUPERbtns.length-SUPERcolumn?$(".super-btns-right").addClass("transparent"):($(".super-btns-left").removeClass("transparent"),$(".super-btns-right").removeClass("transparent"))},100);let Utilitybtns=document.querySelectorAll(".utility-btns>div"),UtilitybtnsAuto=setInterval(()=>{$(".utility-btns>div.active").index()==Utilitybtns.length-1?$(".utility-btns>div:first-child").addClass("active").siblings().removeClass("active"):$(".utility-btns>div.active").removeClass("active").next().addClass("active"),UtilityEffect()},5e3);$(".utility-btns>div").click(function(){$(this).addClass("active").siblings().removeClass("active");clearInterval(UtilitybtnsAuto);UtilityEffect()});$("#support-link").attr("href",window.location.pathname+"/support");setInterval(()=>{$(window).scrollTop()==0?$(".wheel-scroll").css("paddingTop",0):$(window).width()>1200?$(".wheel-scroll").css("paddingTop",$("#model-header").outerHeight()):!1});let dots=document.querySelectorAll(".dots a");dots.forEach(n=>{ScrollTrigger.create({trigger:n.getAttribute("href"),start:"top center",end:"+="+$(n.getAttribute("href")).outerHeight(),onUpdate:()=>{$(n).find("div").addClass("active").parent().siblings().find("div").removeClass("active"),currentSlide=$(n).index()},onToggle:({isActive:t})=>{t?$(n.getAttribute("href")).removeClass("no-ani"):$(n.getAttribute("href")).addClass("no-ani")}}),$(window).resize(function(){currentSlide=$(n).index()})});ScrollTrigger.create({trigger:$("#designconcept .sec-container"),start:"top top",end:"bottom",pin:$(window).width()>1200?!0:!1});setInterval(()=>{$(".dots").css("transform","translateY(calc(-50% + "+$("#model-header").outerHeight()/2+"px))")})