$(function(){let e;e=document.getElementById("isIndex"),document.getElementById("tplCode").value,window.isMain=!!e&&"Y"==e.value,isMain?(document.getElementById("sjs").remove(),document.getElementById("scss").remove()):(document.getElementById("mjs").remove(),document.getElementById("mcss").remove()),$("#family-sites").on("change",function(e){window.open(e.target.value,"_blank")});let a=$("#header"),n=$("#header .gnb-nav li"),s=$("#header .gnb-nav");n.on("mouseenter",function(){a.addClass("active"),gsap.to("#header .nav-sub-bg",{autoAlpha:1,height:235,duration:.3}),$("#header .nav-sub").stop().fadeIn(400)}),s.on("mouseleave",function(){a.removeClass("active"),$("#header .nav-sub").stop().fadeOut(100),gsap.to("#header .nav-sub-bg",{autoAlpha:0,height:0,duration:.3})}),$(window).on("scroll",function(){$(window).scrollTop()>=100?(a.addClass("sticky"),$("#quick-btns").addClass("show")):(a.removeClass("sticky"),$("#quick-btns").removeClass("show"))});let t=$("#header-mb"),o=$("#header-mb .nav-sub .sub-menu"),l=$("#header-mb .gnb-nav a");$("#header-mb .gnb-nav a").on("click",function(e){var a=$(e.target).closest("p").index();o.removeClass("on"),o.eq(a).addClass("on"),l.removeClass("on"),l.eq(a).addClass("on")}),$(".gnb-hamburger").on("click",e=>{let a=$(e.currentTarget);t.stop().fadeToggle(400),a.toggleClass("close")})});