// ¸Þ´º °ü·Ã ½ºÅ©¸³Æ® $(function() { // ¸Þ´º È£Ãâ¹öÆ° Ŭ¸¯½Ã $("#gnbOpen").bind('click touchstart', function() { if(!$("#gnbMask").is(':visible')) { openNav(); } }); // ¸Þ´º ´Ý±â¹öÆ° Ŭ¸¯½Ã $("#gnbClose").bind('click touchstart', function() { closeNav(); }); // ¸Þ´º Ŭ¸¯½Ã $("#gnb > ul > li > a").bind('click touchstart', function(e) { var $submnu = $(this).siblings('ul'); if($submnu.length > 0) { e.preventDefault(); $("#gnb > ul > li > ul.submnu").css('display','none'); $submnu.css({display:'block', left:'100%'}); $submnu.stop(true,false).animate({left:'-20px'}, 500, 'easeOutCubic', function() { setMnuHeight('animate'); $submnu.stop(true,false).animate({left:'20px'}, 100, function() { $submnu.stop(true,false).animate({left:0}, 100); }); }); } }); // Àüü¸Þ´º ¿­±â function openNav() { $("#gnbOpen").addClass('open'); $("#gnbOpen").stop(true,false).delay(300).animate({opacity:'0'}, 300); $("body").css('overflow-x','hidden'); $("#gnb ul").css({left:'100%'}); $("#navigation").stop(true,false).fadeIn(300, function() { $("#gnb > ul").stop(true,false).animate({left:'-20px'}, 500, 'easeOutCubic', function() { $("#gnb > ul").stop(true,false).animate({left:'20px'}, 100, function() { $("#gnb > ul").stop(true,false).animate({left:'0'}, 100, function() { $("body").removeAttr('style'); }); }); }); }); $("#gnbClose").stop(true,false).delay(400).fadeIn(300); setMnuHeight(); } // Àüü¸Þ´º ´Ý±â function closeNav() { $("#gnbOpen").removeClass('open'); $("#navigation").stop(true,false).fadeOut(300, function() { $("#gnbClose").css('display','none'); $("#gnbOpen").stop(true,false).animate({opacity:'1'}, 300); subMnuClose(); }); } // Àüü¸Þ´º ÇÏÀ§¸Þ´º ¼û±â±â function subMnuClose() { $("#gnb > ul > li > ul.submnu").css('display','none'); } // Àüü¸Þ´º ¼¼·Î À§Ä¡°ª Á¶Àý function setMnuHeight(option) { var wHeight = $(window).height(); var mnuHeight = $("#nav_wrap").height(); if(option==='animate') { $("#nav_wrap").stop(true,false).animate({top:(wHeight - mnuHeight + 60) / 2 + 'px'}, 300); } else { $("#nav_wrap").css('top',(wHeight - mnuHeight + 60) / 2 + 'px'); } } }); // »ó´ÜÀ¸·Î ½ºÅ©·Ñ ¹öÆ° À̺¥Æ® $(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'); }); }); // ½ºÅ©·Ñ À̺¥Æ® $(function() { var scrollH = $(document).height() - $(window).height(); var subMaxOpacity = 80 / scrollH; $(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").stop(true,false).animate({top:'-80px'}, 300, function() { $("#header").removeClass('scroll'); $("#header").removeAttr('style'); }); $("#scrollTop").stop(true,false).fadeOut(300); } if(wTop >= 80) { scrollActive(); } else { scrollInactive(); } // ¼­ºê ºñÁÖ¾ó ½ºÅ©·Ñ½Ã ¸¶½ºÅ© ¹è°æ Åõ¸íµµ ó¸® var subOpacity = (subMaxOpacity*wTop)*0.03; $("#sub_visual > .scrollbg").css('opacity',subOpacity); }); }); // ¼­ºêÆäÀÌÁö °øÅë ÇÔ¼ö $(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); } // ¼­ºê ºñÁÖ¾ó ŸÀÌƲ È°¼ºÈ­ function initTitle() { var majorTitle = $("#nav .depth1 > a > span").text(); var minorTitle = $("#nav .depth2 > a > span").text(); $("#sub_visual > .title > h2").text(majorTitle); $("#sub_visual > .title > h3").text(minorTitle); } // ¼­ºê ºñÁÖ¾ó À̹ÌÁö ÀÚµ¿ ÆäÀ̵å 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); } }); // ¼­ºê ÆäÀÌµå ºñÁÖ¾ó ¹× µå·Ó¹Ú½º ¸Þ´º µ¿±âÈ­ $(window).load(function() { subImgInit(); majorActive(); minorActive(); initTitle(); }); }); // Æ÷Åä°¶·¯¸® ¸¶¿ì½º¿À¹ö È¿°ú $(function() { var subject = new Array(); // °¶·¯¸® ½æ³×ÀÏ Á¦¸ñ ¹è¿­º¯¼ö ¼±¾ð var content = new Array(); // °¶·¯¸® ½æ³×ÀÏ ³»¿ë ¹è¿­º¯¼ö ¼±¾ð var url = new Array(); // °¢ ½æ³×ÀϺ° ¸µÅ© ÀúÀå¿ë º¯¼ö var thumbCount = $(".brd_photo_list .bbsnewf5").length; // ½æ³×ÀÏ °³¼ö (ÃßÃâ°³¼ö) if($(".bbsnewf5").length > 0) { for(i=0; i

' + subject[i] + '

' + $.trim(content[i]) + '

'); } // ±âÁ¸¿¡ º¸¿©Áö´Â º°µµ td ÀÇ Á¦¸ñ, ³»¿ëÀº ¼û±è $(".gallery_subject").css('display','none'); } });