jQuery.noConflict(); //±âº» À̺¥Æ®µé µî·Ï jQuery(document).ready( function(){ //--------------------------------------- // ¸Þ´º Ŭ¸¯½Ã ¸Þ´ºÈ­¸é ³ªÅ¸³ª°Ô jQuery("#menu-button").click(function(event) { event.preventDefault(); jQuery("#menu-button").hide(); jQuery("#menus").css("right","-100%"); jQuery("#menus").show(); jQuery("#menus").animate({"right":"0"}, 500); }); //--------------------------------------- //--------------------------------------- // ¸Þ´º´Ý±â Ŭ¸¯½Ã ¸Þ´ºÈ­¸é ¾ø¾îÁö°Ô jQuery("#menus .close").click(function(event) { event.preventDefault(); jQuery("#menus").css("right","0"); jQuery("#menus").animate({"right":"-100%"}, 500); jQuery("#menu-button").show(); }); //--------------------------------------- //--------------------------------------- // ¸Þ´ºÇ׸ñ Ŭ¸¯½Ã ¸Þ´ºÈ­¸é ¾ø¾îÁö°Ô jQuery("#menus li a").click(function(event) { jQuery("#menus .close").click(); }); //--------------------------------------- //¸ð¹ÙÀÏ ¸Þ´º ó¸® if (location.pathname.slice(location.pathname.lastIndexOf('/')+1).substr(0,2) == 'm_') { //ÇöÀç¸Þ´º on jQuery('#menus>li>a').each( function(i) { if (jQuery(this).attr('id') == current_gnb) { jQuery(this).css('color', '#365b9b'); } }); jQuery('.menu_sub a').each( function(i) { if (jQuery(this).attr('id') == current_sub) { jQuery(this).css('color', '#365b9b'); } }); //¾÷¹«ºÐ¾ß ¼±Åýà ¹è°æ»ö»ó º¯°æ µî·Ï jQuery('#field li').click( function () { jQuery('#field li').each( function(i) { jQuery('.btn_detail',this).css('background-color', '#6ebd45'); }); jQuery('.btn_detail',this).css('background-color', '#3a5f9e'); } ); } //PC¸Þ´ºÃ³¸® else { jQuery('#gnb1_sub').hide(); jQuery('#gnb3_sub').hide(); //ÇöÀç¸Þ´º on jQuery('#gnb img').each( function(i) { if (jQuery(this).attr('id') == current_gnb) { jQuery(this).parent().parent().css('background', 'url(/default/img/gnb_bg_on.gif) no-repeat top'); jQuery(this).attr('src', template + '/img/' + jQuery(this).attr('id') + '_on.gif'); jQuery('#' + current_gnb + '_sub').show(); } }); jQuery('.gnb_sub a').each( function(i) { if (jQuery(this).attr('id') == current_sub) { jQuery(this).css('color', '#365b9b'); } }); jQuery('#shortcuts img').each( function(i) { if (jQuery(this).attr('id') == current_gnb) { jQuery(this).attr('src', template + '/img/' + jQuery(this).attr('id') + '_on.gif'); } }); //¸Þ´º ¿À¹öÀ̺¥Æ®½Ã À̹ÌÁö º¯°æ µî·Ï jQuery('#gnb img').hover( function () { jQuery('#gnb li').css('background', 'url(/default/img/gnb_bg.gif) no-repeat top'); jQuery(this).parent().parent().css('background', 'url(/default/img/gnb_bg_on.gif) no-repeat top'); jQuery(this).attr('src', template + '/img/' + jQuery(this).attr('id') + '_on.gif'); jQuery('#' + jQuery(this).attr('id') + '_sub').show(); jQuery('#gnb1_sub').hide(); jQuery('#gnb3_sub').hide(); jQuery('#' + jQuery(this).attr('id') + '_sub').show(); }, function () { jQuery('#' + current_gnb + '_sub').show(); if (jQuery(this).attr('id') == current_gnb) { jQuery(this).parent().parent().css('background', 'url(/default/img/gnb_bg_on.gif) no-repeat top'); jQuery(this).attr('src', template + '/img/' + jQuery(this).attr('id') + '_on.gif'); jQuery('#' + jQuery(this).attr('id') + '_sub').show(); } else { jQuery('#' + current_gnb).parent().parent().css('background', 'url(/default/img/gnb_bg_on.gif) no-repeat top'); jQuery(this).parent().parent().css('background', 'url(/default/img/gnb_bg.gif) no-repeat top'); jQuery(this).attr('src', template + '/img/' + jQuery(this).attr('id') + '.gif'); jQuery('#' + jQuery(this).attr('id') + '_sub').hide(); } } ); jQuery('#gnb1_sub').hover( function () { jQuery('#gnb3_sub').hide(); jQuery(this).show(); }, function () { if (current_gnb == 'gnb1') { jQuery(this).show(); } else { jQuery(this).hide(); jQuery('#' + current_gnb + '_sub').show(); } } ); jQuery('#gnb3_sub').hover( function () { jQuery('#gnb1_sub').hide(); jQuery(this).show(); }, function () { if (current_gnb == 'gnb3') { jQuery(this).show(); } else { jQuery(this).hide(); jQuery('#' + current_gnb + '_sub').show(); } } ); jQuery('#shortcuts img').hover( function () { jQuery(this).attr('src', template + '/img/home/' + jQuery(this).attr('id') + '_on.gif'); }, function () { jQuery(this).attr('src', template + '/img/home/' + jQuery(this).attr('id') + '.gif'); } ); //¾÷¹«ºÐ¾ß ¿À¹öÀ̺¥Æ®½Ã ¹è°æ»ö»ó º¯°æ µî·Ï jQuery('#field li').hover( function () { jQuery('#field li').each( function(i) { jQuery('.btn_detail',this).css('background-color', '#6ebd45'); }); jQuery('.btn_detail',this).css('background-color', '#3a5f9e'); }, function () { jQuery('.btn_detail',this).css('background-color', '#6ebd45'); jQuery('#' + current_sub2 + ' .btn_detail').css('background-color', '#3a5f9e'); } ); } //¾÷¹«ºÐ¾ß Ŭ¸¯À̺¥Æ®½Ã »ó¼¼ÆäÀÌÁö Ç¥½Ã µî·Ï jQuery('#field li').click( function () { current_sub2 = jQuery(this).attr('id'); jQuery('.sub_detail').each( function(i) { jQuery(this).hide(); } ); jQuery('#' + current_sub2 + '_detail').show(); } ); //copyrights ÇÏ´ÜÀ§Ä¡ µî·Ï jQuery(window).scroll( function () { jQuery('#copyrights').css('bottom',0-(document.body.scrollTop || document.documentElement.scrollTop)); } ); jQuery('#copyrights').css('bottom',0-(document.body.scrollTop || document.documentElement.scrollTop)); } );