1/* ì´ê´: 구 ì¬ì´í¸ _include/js/front.js + js/common.js + js/sns.js ì ë¼ì´ë¸ ëì íµí© 2 ë³ê²½ì : â TOP ë²í¼ í´ë¦ í¸ë¤ë¬ë¥¼ scroll í¸ë¤ë¬ ë°ì¼ë¡ ë¶ë¦¬(ì본 ì¤ë³µ ë°ì¸ë© ë²ê·¸ ìì ) 3 â¡ ì¬ì¥ ì½ë(.top_nav/.allmenu/ë ì´ì´íì TypeError ë¸ë¡) 미ì´ì */ 4 5$(function() { 6 lnbPC(); 7 lnbMobile(); 8 scrollAnimate(); 9 10 // í¤ë ê²ì ì´ê¸°/ë«ê¸° (구 js/common.js) 11 $(".sch_btn").on('click', function() { 12 $(".bx_search").show(); 13 }); 14 $(".btn_sclose").on('click', function() { 15 $(".bx_search").hide(); 16 $(".sch_btn").focus(); 17 }); 18}); 19 20/** 21 * ì¢ì¸¡ë©ë´ hoverì 1ì°¨&2ì°¨ ë©ë´ animate í¨ê³¼ (ì ì²´ í¼ì¹¨ ë©ê°ë©ë´) 22 */ 23function lnbPC() { 24 var $lnbBtnPC = $('.lnb-pc .lnb-navi > li'); 25 var $header = $('#header'); 26 var speed = 200; 27 $lnbBtnPC.hover( 28 function() { 29 var $this = $(this); 30 var $secondDeps = $('.lnb-dep2'); 31 $secondDeps.stop().css('display', 'block'); 32 $header.addClass('menu-toggle'); 33 $header.stop().animate({ 'height': '380px' }, speed); 34 $this.addClass('on'); 35 $this.find('.lnb-dep2').addClass('on'); 36 }, 37 function() { 38 var $this = $(this); 39 var $secondDeps = $('.lnb-dep2'); 40 $secondDeps.stop().css('display', 'none'); 41 $header.removeClass('menu-toggle'); 42 $header.stop().animate({ 'height': '100px' }, speed); 43 $this.removeClass('on'); 44 $this.find('.lnb-dep2').removeClass('on'); 45 } 46 ); 47} 48 49/** 50 * lnb mobile ë²í¼ í´ë¦ì í¨ê³¼ (íë²ê±° + 1ëì¤ ìì½ëì¸) 51 */ 52function lnbMobile() { 53 var $lnbBtnMobile = $('.lnb-m .btn-menu'); 54 var $lnbCloseMobile = $('.lnb-m .btn-close'); 55 var $lnbBgMobile = $('.lnb-m .bg-body'); 56 var $lnbBoxMobile = $('.lnb-m .lnb-box'); 57 var $firstDepsMobile = $('.lnb-m .lnb-navi > li'); 58 var speed = 300; 59 $lnbBtnMobile.on('click', function() { 60 $lnbBgMobile.stop().fadeIn(speed); 61 $lnbBoxMobile.stop().css('display', 'block').animate({ 'right': '0' }, speed); 62 }); 63 $lnbCloseMobile.on('click', function() { 64 $lnbBgMobile.stop().fadeOut(speed); 65 $lnbBoxMobile.stop().css('display', 'none').animate({ 'right': '-50%' }, speed); 66 }); 67 $firstDepsMobile.on('click', function() { 68 var $this = $(this); 69 var $secondDeps = $this.find('.lnb-dep2'); 70 $this.addClass('on'); 71 $firstDepsMobile.not($this).find('.lnb-dep2').slideUp(); 72 $firstDepsMobile.not($this).removeClass('on'); 73 $secondDeps.stop().slideToggle(); 74 }); 75} 76 77/** 78 * ë§ì°ì¤ ì¤í¬ë¡¤ í¨ê³¼ + TOP ë²í¼ 79 */ 80function scrollAnimate() { 81 var $window = $(window); 82 var $document = $('html, body'); 83 var $btnTop = $('.btn-top'); 84 85 // TOP ë²í¼ â ì¤í¬ë¡¤ í¸ë¤ë¬ ë°ìì 1íë§ ë°ì¸ë© (ì본 ë²ê·¸ ìì ) 86 $btnTop.on('click', function() { 87 $document.stop().animate({ scrollTop: 0 }); 88 }); 89 90 $window.on('scroll touchmove mousewheel', function() { 91 $('.hideme').each(function() { 92 var $this = $(this); 93 var $bottomObject = $this.offset().top + $this.outerHeight(); 94 var $bottomWindow = $window.scrollTop() + $window.height(); 95 if($bottomWindow > $bottomObject - 100) { 96 $this.addClass('in-view'); 97 } 98 }); 99 }); 100} 101 102/** 103 * ê³µíµ í ë²í¼ (구 ì¬ì´í¸ìì 5ê° íì´ì§ê° ë³µë¶íë ì¸ë¼ì¸ í ì í íµí©) 104 */ 105function tabButton() { 106 var $tabBtn = $('.tab-nav > li'); 107 var $tabCon = $('.tab-con > li'); 108 $tabBtn.on('click', function(e) { 109 e.preventDefault(); 110 var $idx = $(this).index(); 111 $tabBtn.removeClass('on'); 112 $tabBtn.eq($idx).addClass('on'); 113 $tabCon.removeClass('on'); 114 $tabCon.eq($idx).addClass('on'); 115 }); 116} 117 118/** 119 * ì í¬ë¸ ì ì´ í¨ì (postMessage â API í¤ ë¶íì) 120 */ 121function playYoutube(obj) { 122 var iframe = obj[0].contentWindow; 123 iframe.postMessage('{"event":"command","func":"playVideo","args":""}', '*'); 124 iframe.postMessage('{"method":"setVolume", "value":1}', '*'); 125} 126function pauseYoutube(obj) { 127 var iframe = obj[0].contentWindow; 128 iframe.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*'); 129 iframe.postMessage('{"method":"setVolume", "value":0}', '*'); 130} 131function stopYoutube(obj) { 132 var iframe = obj[0].contentWindow; 133 iframe.postMessage('{"event":"command","func":"stopVideo","args":""}', '*'); 134 iframe.postMessage('{"method":"setVolume", "value":0}', '*'); 135} 136function stopAllYoutube() { 137 $('iframe[src*="youtube.com"]').each(function() { 138 var iframe = $(this)[0].contentWindow; 139 iframe.postMessage('{"event":"command","func":"stopVideo","args":""}', '*'); 140 iframe.postMessage('{"method":"setVolume", "value":0}', '*'); 141 }); 142} 143 144/** 145 * SNS ê³µì (구 js/sns.js) â ë¼ì´ë¸ ì¬ì©ì facebook ê³µì ·ì¸ìë¿ 146 */ 147$(document).on("click", ".btn-share-sns", function() { 148 var media = $(this).attr("data-media"); 149 var message = $(this).attr("data-messages"); 150 var locurl = $(this).attr("data-locurl"); 151 shareSNS(media, message, locurl); 152}); 153 154var fnPrint = function() { 155 window.print(); 156}; 157 158function shareSNS(media, message, locUrl) { 159 var sendUrl; 160 if(locUrl == undefined) { 161 locUrl = window.location.href; 162 } 163 switch(media) { 164 case "twitter": 165 sendUrl = "http://twitter.com/home?status=" + encodeURIComponent(message) + "+" + encodeURIComponent(locUrl); 166 snsPop(sendUrl, 600, 500, 'yes'); 167 break; 168 case "facebook": 169 sendUrl = "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(locUrl) + "&t=" + encodeURIComponent(message); 170 snsPop(sendUrl, 600, 500, 'yes'); 171 break; 172 case "naverblog": 173 sendUrl = "http://blog.naver.com/openapi/share?url=" + encodeURIComponent(locUrl) + "&title=" + encodeURIComponent(message); 174 snsPop(sendUrl, 600, 500, 'yes'); 175 break; 176 case "kakaostory": 177 sendUrl = "https://story.kakao.com/share?url=" + encodeURIComponent(locUrl); 178 snsPop(sendUrl, 600, 500, 'yes'); 179 break; 180 case "band": 181 sendUrl = "http://www.band.us/plugin/share?body=" + encodeURIComponent(message) + "&route=" + encodeURIComponent(locUrl); 182 snsPop(sendUrl, 600, 500, 'yes'); 183 break; 184 case "line": 185 sendUrl = "http://line.me/R/msg/text/?" + encodeURIComponent(message) + "%0D%0A" + encodeURIComponent(locUrl); 186 snsPop(sendUrl, 600, 500, 'yes'); 187 break; 188 } 189} 190 191function snsPop(url, w, h, s) { 192 w = (s) ? w + 17 : w; 193 s = (s) ? 'yes' : 'no';
194 var sw = screen.availWidth; 195 var sh = screen.availHeight; 196 var left = (sw / 2) - (w / 2); 197 var top = (sh / 2) - (h / 2); 198 var winname = url.substr(url.lastIndexOf('/') + 1).split(/\.html|\.php/)[0]; 199 window.open(url, winname, 'left=' + left + ',top=' + top + ',width=' + w + ',height=' + h + ',scrollbars=' + s + ',resizeable=no,menubar=no,status=yes,location=no,toolbar=no'); 200} 201 202/** 203 * 주ìíë(5ê° í ê³µíµ) í목 í ê¸ â í목 íì´í(h5)ë§ ë ¸ì¶íê³ í´ë¦ ì 본문 í¼ì¹¨ 204 * í í릿·ë°ì´í° ë³ê²½ ìë ë§í¬ì íì²ë¦¬ë¼ íì´ì§ ì½í ì¸ ë ë·ë°ì í´ë°± 모ë ëì. 205 * 본문 ìë íì´íì í ê¸ ëììì ì ì¸íë¤. 206 */ 207$(function() { 208 $('.active .tbl-active tbody td').each(function() { 209 const $td = $(this); 210 const $tit = $td.children('h5').first(); 211 if ($tit.length === 0) return; 212 const $body = $tit.nextAll(); 213 if ($body.length === 0) return; 214 $body.wrapAll('<div class="act-toggle-body" style="display:none;"></div>'); 215 $td.addClass('act-toggle-cell'); 216 $tit.addClass('act-toggle-tit').attr({ role: 'button', tabindex: 0, 'aria-expanded': 'false' }); 217 }); 218 219 $(document).on('click keydown', '.act-toggle-tit', function(e) { 220 if (e.type === 'keydown' && e.key !== 'Enter' && e.key !== ' ') return; 221 e.preventDefault(); 222 const $tit = $(this); 223 const isOpen = !$tit.hasClass('open'); 224 $tit.toggleClass('open', isOpen).attr('aria-expanded', isOpen ? 'true' : 'false'); 225 $tit.siblings('.act-toggle-body').stop(true, true).slideToggle(200); 226 }); 227});
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.