// »ó´Ü¸Þ´º ¸¶¿ì½º À̺¥Æ® $(function() { var wSize; $("#gnb > li").mouseenter(function() { wSize = $(window).width(); if(wSize > 1099) { if($(this).find('.submnu').length > 0) { $(this).find('.submnu').css({top:'48px'}); $(this).addClass('on'); $(this).find('.submnu').css('display','block'); $(this).find('.submnu').stop(true,false).animate({top:'48px', opacity:'1'}, 400); } } }).mouseleave(function() { wSize = $(window).width(); if(wSize > 1099) { $(this).find('.submnu').stop(true,false).animate({opacity:'0'}, 400); $(this).find('.submnu').css('display','none'); $(this).removeClass('on'); } }); }); // ÅÂºí¸´ ÀÌÇÏ ¸Þ´º ó¸® $(function() { // ÅÂºí¸´&¸ð¹ÙÀÏ ¸Þ´º ¿­±â function mMenuOpen() { var wSize = $(window).width(); $("#btnNav").addClass('active'); $("#gnb_wrap button").addClass('active'); if(wSize > 640 && wSize < 1024) { $("#btnNav").stop(true,false).delay(400).animate({right:'300px'}, 500, function() { $("#btnNav").addClass('open'); }); } else { $("#btnNav").stop(true,false).delay(400).animate({right:'260px'}, 500, function() { $("#btnNav").addClass('open'); }); } $("#gnb_mask").stop(true,false).delay(400).fadeIn(300); $("#gnb_wrap").stop(true,false).delay(400).animate({right:0}, 500); } // ÅÂºí¸´&¸ð¹ÙÀÏ ¸Þ´º ´Ý±â function mMenuClose() { var wSize = $(window).width(); $("#btnNav").removeClass('active'); $("#gnb_wrap button").removeClass('active'); $("#gnb_mask").stop(true,false).delay(400).fadeOut(300); if(wSize > 640 && wSize < 1025) { $("#gnb_wrap").stop(true,false).delay(400).animate({right:'-300px'}, 500); $("#btnNav").stop(true,false).delay(400).animate({right:'50px'}, 500, function() { $("#btnNav").removeClass('open'); }); } else { $("#gnb_wrap").stop(true,false).delay(400).animate({right:'-260px'}, 500); $("#btnNav").stop(true,false).delay(400).animate({right:'30px'}, 500, function() { $("#btnNav").removeClass('open'); }); } } // ¸Þ´º È£Ãâ¹öÆ° Ŭ¸¯ $("#btnNav").click(function() { if(!$(this).hasClass('active')) { mMenuOpen(); } else { mMenuClose(); } }); // °¢°¢ ¸Þ´º Ŭ¸¯½Ã Æîħ/Á¢À½ $("#gnb > li > a").click(function(e) { var wSize = $(window).width(); if(wSize < 1025) { if($(this).parent('li').hasClass('dropdown')) { e.preventDefault(); if(!$(this).parent('li').hasClass('open')) { $("#gnb > li.dropdown").removeClass('open'); $("#gnb .submnu").css('display','none'); $(this).parent('li').addClass('open'); $(this).next('.submnu').stop(true,false).slideDown(400); } else { $(this).parent('li').removeClass('open'); $(this).next('.submnu').stop(true,false).slideUp(400); } } } }); // ¸¶½ºÅ© ¹× ´Ý±â ¹öÆ° Ŭ¸¯½Ã ¸Þ´º ´Ý±â $("#gnb_mask, #gnbClose").click(function() { mMenuClose(); }); }); // »ó´ÜÀ¸·Î ½ºÅ©·Ñ ¹öÆ° À̺¥Æ® $(function() { // ¹öÆ° Ŭ¸¯½Ã È­¸é »ó´ÜÀ¸·Î ½ºÅ©·Ñ $("#scrollTop a").click(function(e) { e.preventDefault(); $("html, body").stop(true,false).animate({scrollTop:0}, 400, 'easeOutCubic'); }); // ¸¶¿ì½º À̺¥Æ® ó¸® $("#scrollTop a").mouseenter(function() { if(!$(this).hasClass('on')) { $(this).addClass('on'); } }).mouseleave(function() { $(this).removeClass('on'); }); }); // ½ºÅ©·Ñ Çì´õ °íÁ¤ ó¸® $(window).scroll(function() { var wTop = $(this).scrollTop(); // ½ºÅ©·Ñ È°¼ºÈ­ ó¸® ÇÔ¼ö function scrollActive() { if(!$("#header").hasClass('scroll')) { $("#header").addClass('scroll'); $("#header").stop(true,false).animate({top:'-80px'}, 0); $("#header").stop(true,false).animate({top:'0'}, 300); $("#scrollTop").stop(true,false).fadeIn(300); } } // ½ºÅ©·Ñ ºñÈ°¼ºÈ­ ó¸® ÇÔ¼ö function scrollInactive() { $("#header").removeClass('scroll'); $("#scrollTop").stop(true,false).fadeOut(300); } if(wTop >= 80) { scrollActive(); } else { scrollInactive(); } }); // ¼­ºêÆäÀÌÁö °øÅë ÇÔ¼ö $(function() { // ¼­ºê ºñÁÖ¾ó À̹ÌÁö ÆäÀÌµå º¯¼ö Á¤ÀÇ var sIndex = 0; var sTimer; var sInterval = 3000; // ¼­ºê ºñÁÖ¾ó À̹ÌÁö Ãʱâ¼ÂÆà function subImgInit() { $("#sub_visual ul li:last").after($("#sub_visual ul li[data-idx=" + sIndex + "]")); } // ¼­ºê ºñÁÖ¾ó À̹ÌÁö ÆäÀ̵å ÇÔ¼ö function subFade() { var count = $("#sub_visual ul li").length; sIndex++; if(sIndex>=count) { sIndex = 0 } $("#sub_visual ul li").removeClass('active'); $("#sub_visual ul li:last").after($("#sub_visual ul li[data-idx=" + sIndex + "]")); $("#sub_visual ul li[data-idx=" + sIndex + "]").addClass('active'); $("#sub_visual ul li[data-idx=" + sIndex + "]").stop(true,false).animate({opacity:0}, 0); $("#sub_visual ul li[data-idx=" + sIndex + "]").stop(true,false).animate({opacity:1}, 500); } // ¼­ºê ºñÁÖ¾ó À̹ÌÁö ÀÚµ¿ ÆäÀ̵å sTimer = setInterval(function() { subFade(); }, sInterval); // 1Â÷ µå·Ó´Ù¿î ¸Þ´º È°¼ºÈ­ function majorActive() { var currIndex = $("#container").data('menu') - 1; var currMenu = $("#nav .depth1 ul.mnuList li").eq(currIndex).text(); $("#nav .depth1 > a > span").text(currMenu); } // 2Â÷ µå·Ó´Ù¿î ¸Þ´º È°¼ºÈ­ function minorActive() { var currIndex = $("#container").data('sub') - 1; var currMenu = $("#nav .depth2 ul.mnuList li").eq(currIndex).text(); $("#nav .depth2 > a > span").text(currMenu); } // µå·Ó¹Ú½º ¸Þ´º Ŭ¸¯ ó¸® $("#nav .dropdown > a").click(function() { if(!$(this).parent('.dropdown').hasClass('open')) { $("#nav .dropdown").removeClass('open'); $("#nav .dropdown > ul.mnuList").stop(true,false).fadeOut(200); $(this).parent('.dropdown').addClass('open'); $(this).siblings('ul.mnuList').stop(true,false).fadeIn(200); } else { $(this).parent('.dropdown').removeClass('open'); $(this).siblings('ul.mnuList').stop(true,false).fadeOut(200); } }); // ¸ð¹ÙÀÏ µå·Ó¹Ú½º ¸Þ´º Ŭ¸¯ ó¸® $("#leftBar a.dropdown").click(function(e) { e.preventDefault(); if(!$(this).hasClass('open')) { $(this).addClass('open'); $("#lnb").stop(true,false).slideDown(300); } else { $(this).removeClass('open'); $("#lnb").stop(true,false).slideUp(300); } }); // »ó´Ü¸Þ´º (ÅÂºí¸´ ÀÌÇÏ ÁÂÃø¸Þ´º) ¼û±è function gnbHide() { $("#gnb > li > ul.submnu").css('display','none'); $("#gnb > li").removeClass('open'); } // »ó´Ü¸Þ´º (ÅÂºí¸´ ÀÌÇÏ ÁÂÃø¸Þ´º) Ç¥½Ã function gnbShow() { $("#gnb > li > ul.submnu").css('display','block'); $("#gnb > li").removeClass('open'); } // ¼­ºê ÆäÀÌµå ºñÁÖ¾ó ¹× µå·Ó¹Ú½º ¸Þ´º µ¿±âÈ­ $(window).load(function() { subImgInit(); majorActive(); minorActive(); }); // À©µµ¿ì ¸®»çÀÌÁî½Ã »çÀÌÁ·Î ¸Þ´º ¼û±è/º¸ÀÓ Ã³¸® $(window).resize(function() { var wSize = $(this).width(); // if(wSize > 1024) { // gnbShow(); // } else { // gnbHide(); // } }); }); // Popup Windows C // function popWinC(url,name,WinWidth,WinHeight,option) { var x = screen.width / 2 - WinWidth / 2; var y = screen.height / 2 - WinHeight / 2; option = option + ',width=' + WinWidth + ',height=' + WinHeight + ',left=' + x + ',top=' + y; newwindow = window.open(url,name,option); newwindow.focus(); } function popWinC2(url,name,WinWidth,WinHeight,option,template) { var x = screen.width / 2 - WinWidth / 2; var y = screen.height / 2 - WinHeight / 2; option = option + ',width=' + WinWidth + ',height=' + WinHeight + ',left=' + x + ',top=' + y; window.close(); opener.location.href="/" + template + "/etc/login.php"; //newwindow.focus(); } function resize_win(url,name,WinWidth,WinHeight,option) { var intwidth; var intheight; //intwidth=prompt('¸®»çÀÌÁîÇÒ ³Êºñ¸¦ ÀÔ·ÂÇϼ¼¿ä','400'); //intheight=prompt('¸®»çÀÌÁîÇÒ ³ôÀ̸¦ÀÔ·ÂÇϼ¼¿ä.','300'); intwidth=WinWidth; intheight=WinHeight; intwidth=parseInt(intwidth); intheight=parseInt(intheight); if(intwidth>0&&intheight>0) { window.resizeTo(intwidth,intheight); window.location.href=url; } } var rurl = location.href; var purl = getUrl(rurl); function getUrl(url_str) { var real_url; if (url_str.indexOf('/') > 0) { real_url = url_str.split('/'); real_url = real_url[0]+'//'+real_url[2]+'/'+real_url[3]+'/'; } return real_url; } function goLocate(go_url) { document.location = purl + go_url; }