1$(document).ready(function(){ 2 layerPop(); 3 moveTop(); 4 gnb(); 5 6 7 $('#js-share-icon').on('click',function(e){ 8 $(this).next().toggle(); 9 }); 10 11 $('#footer .footer-site .btn-site-open').on('click',function(e){ 12 var btn = $(this); 13 var lst = btn.next(); 14 openDropDown(btn,lst); 15 }); 16 17 $('#footer .footer-site .btn-site-close').on('click',function(e){ 18 var btn = $(this); 19 var lst = btn.parent(); 20 var open_btn = lst.prev(); 21 closeDropDown(btn,lst,open_btn); 22 }); 23 24 //모ë°ì¼ gnb ê´ë ¨ 25 $(".mgnb_left > li").on("click",function(){ 26 $(".mgnb_left li,.mgnb_2depthtt").removeClass("on"); 27 $(this).addClass("on"); 28 var ml = $(".mgnb_left li").index(this); 29 $(".mgnb_1depth > li").hide(); 30 $(".mgnb_1depth > li:eq("+ml+")").show(); 31 }); 32 $(".mgnb_2depthtt").on("click",function(){ 33 $(".mgnb_2depthtt").not(this).removeClass("on"); 34 $(this).toggleClass("on"); 35 }); 36 $(".sc_mclose_btn").on("click",function(){ 37 $(".mgnb_search").removeClass("on"); 38 }); 39 $(".mgnb_sc_btn").on("click",function(){ 40 $(".mgnb_search").addClass("on"); 41 }); 42 $(".lang_mclose_btn").on("click",function(){ 43 $(".mgnb_lang").removeClass("on"); 44 }); 45 $(".mgnb_lang_btn").on("click",function(){ 46 $(".mgnb_lang").addClass("on"); 47 }); 48 49 $(".mgnb_close_btn").on("click",function(){ 50 $(".m_gnb").removeClass("on"); 51 $("html").removeClass("modal-open"); 52 }); 53 $(".mobile-menu-btn").on("click",function(){ 54 $(".m_gnb").addClass("on"); 55 $("html").addClass("modal-open"); 56 57 }); 58 59 // íµí©ê²ì_ê²°ê³¼ 60 $(".psw_tab > li").on("click",function(){ 61 $(this).siblings().removeClass("on"); 62 $(this).addClass("on"); 63 $(".psw_con > div").removeClass("show"); 64 var pswt = $(".psw_tab > li").index(this); 65 $(".psw_con > div:eq("+pswt+")").addClass("show"); 66 }); 67 68 $(".psw_num_tab > li").on("click",function(){ 69 $(this).siblings().removeClass("on"); 70 $(this).addClass("on"); 71 $(this).parent().parent().children(".psw_ul").children(".show").removeClass("show"); 72 var psw = $(".psw_num_tab > li").index(this); 73 $(".psw_ul > ul:eq("+psw+")").addClass("show"); 74 }); 75 76 $(".btn_ul .close").on("click",function(){ 77 $(this).parent().remove(); 78 }); 79 80 if($('.forest_map_area').length >= 1){ 81 var lastFocusedLink = null; 82 83 var windowWidth = $(window).outerWidth(); 84 $('.forest_imgmap').rwdImageMaps(); 85 86 $('.forest_map_area .btn_img').bind({ 87 'focusin mouseenter': function () { 88 var thisImg = $(this).data('img'); 89 $(thisImg).addClass('active'); 90 }, 91 'focusout mouseleave': function () { 92 var thisImg = $(this).data('img'); 93 $(thisImg).removeClass('active'); 94 }, 95 'click': function () { 96 var thisTitle = $(this).data('title'); 97 var thisDesc = $(this).data('desc'); 98 99 if($(this).hasClass('btn_img_pop')) { 100 lastFocusedLink = $(this); 101 $('.forest_map_popup .pop_title').html(thisTitle); 102 $('.forest_map_popup .pop_desc').html(thisDesc); 103 $('.forest_map_popup').addClass('active'); 104 $('.forest_map_popup .pop_inner').attr('tabindex', '-1').focus(); 105 } 106 } 107 }); 108 109 $('.forest_map_popup .pop_inner').on('keydown', function(e) { 110 if (e.key === 'Tab' && !e.shiftKey) { 111 e.preventDefault(); 112 $('.forest_map_popup .pop_close').focus(); 113 } 114 }); 115 116 $('.forest_map_popup .pop_close').on('click keydown', function(e) { 117 if (e.type === 'click' || (e.type === 'keydown' && e.key === 'Tab')) { 118 e.preventDefault(); 119 $('.forest_map_popup').removeClass('active'); 120 lastFocusedLink.focus(); 121 } 122 }); 123 } 124}); 125 126//ë ì´ì´ íì ê³µíµ 127function layerPop(type,id){ 128 var $html = $("html"); 129 130 if(type == "o"){ 131 $html.addClass("modal-open"); 132 var $modalOn = $(id).addClass("modal-on").on("click", function(e){ 133 if($(".pop-modal .pop-center").is(e.target)){ 134 $modalOn.removeClass("modal-on"); 135 $html.removeClass("modal-open"); 136 } 137 }); 138 $(".pop-modal").on("click",function(){ 139 $(".pop-wrap").on("click",function(){ 140 return; 141 }) 142 $("html").removeClass("modal-open"); 143 $("#pop_intrg").removeClass("modal-on"); 144 }) 145 } else if(type == "c"){ 146 $(".pop-modal.modal-on").removeClass("modal-on"); 147 $html.removeClass("modal-open"); 148 } 149} 150 151//íë²í¼ 152function moveTop(){ 153 $(window).scroll(function() { 154 if ($(this).scrollTop() > 200) { 155 $('#footer .btn-top').fadeIn(); 156 } else { 157 $('#footer .btn-top').fadeOut(); 158 } 159 }); 160 $('#footer .btn-top').click(function() { 161 $('body,html').animate({ 162 scrollTop: 0 163 }, 500); 164 }); 165} 166 167//DIV ëë¡ë¤ì´ 168function openDropDown(btn,lst){ 169 btn.attr('title', 'ì´ê¸°'); 170 171 if(!lst.is(':animated')) { 172 btn.attr('title', (lst.parent('div').hasClass('active')) ? 'ì´ê¸°' : 'ë«ê¸°'); 173 lst.slideToggle(250, 'easeInOutExpo').parent('div').toggleClass('active').siblings('div').removeClass('active').children('div').slideUp(250, 'easeInOutExpo').prev(btn).attr('title', 'ì´ê¸°'); 174 } 175} 176 177function closeDropDown(btn,lst,open_btn){ 178 if(!lst.is(':animated')) { 179 lst.slideUp(250, 'easeInOutExpo').parent('div').removeClass('active'); 180 lst.siblings(open_btn).attr('title', 'ì´ê¸°'); 181 } 182} 183 184function gnb(){ 185 $('#header-gnb .menu > ul > li > a').on('mouseenter focusin', function(e) { 186 $(this).parent('li').siblings('li').find('.sub').hide(); 187 $(this).next('.sub').show(); 188 }); 189 190 $('#header-gnb .sub').mouseleave(function(){ 191 $('#header-gnb .sub').hide(); 192 193 // ì§ê¸ ì´ì ì´ 1depth ë©ë´ì´ê³ , 194 // 2depth ë©ë´ ììì´ ì ë¶ display none(blockì´ íëë¼ë ìëê²½ì°)
195 // ì§ê¸ ì´ì ì íì depth ììì display block 196 if($('#header-gnb .menu > ul > li > a:focus').next('.sub').css("display") == 'none'){ 197 $('#header-gnb .menu > ul > li > a:focus').next('.sub').css("display", "block"); 198 } 199 200 }); 201 202 $('#header-gnb h1 > a, #header-gnb .util .btn-siteMap').focusin(function(){ 203 $('.sub').hide(); 204 }); 205 206 207 $('.btn-search').focusin(function(){ 208 $('#header-gnb .sub').hide(); 209 }); 210 211 $('.btn-login').focusin(function(){ 212 $('#header-gnb .sub').hide(); 213 }); 214 215 $('#header-gnb .btn-register').focusin(function(){ 216 $('#header-gnb .sub').hide(); 217 }); 218 219 $('.intrg-area > .menu-btn').focusin(function(){ 220 $('#header-gnb .sub').hide(); 221 }); 222 223 $(".main menu > ul > li").focusin(function(){ 224 $(this).hide(); 225 }); 226 227 228 229 230 231} 232 233//ê³µíµ ìì½ëì¸ 234function accordion(v){ 235 var idx = $(v).parent('li').index(); 236 var addclass = $(v).parent('.active').attr("class"); 237 var $li = $(v).parent('li'); 238 var isActive = $li.hasClass("active"); 239 240 $li.toggleClass("active"); 241 242 if(addclass){ 243 $(v).parents('.active').removeClass("active"); 244 } 245 246 if(isActive){ 247 // ë©ë´ê° ì´ë¯¸ íì±íëì´ ììë¤ë©´, ë¹íì±ííê³ "ë©ë´ í¼ì¹¨"ì¼ë¡ ë³ê²½ 248 $(v).attr("title", "ë©ë´ í¼ì¹¨"); 249 } else { 250 // ë©ë´ê° ë¹íì±íëì´ ììë¤ë©´, íì±ííê³ "ë©ë´ ë«ê¸°"ë¡ ë³ê²½ 251 $(v).attr("title", "ë©ë´ ë«ê¸°"); 252 } 253} 254 255//ê²ìì°½ ì´ê³ ë«ê¸° 256function searchToggle(btn){ 257 if($(".searchwindow").css("display") == "none"){ 258 $(btn).addClass('on'); 259 $('.searchwindow').show(); 260 $('.search-input').focus(); 261 } else { 262 $(btn).removeClass('on'); 263 $('.searchwindow').hide(); 264 } 265}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.