1// JavaScript Document 2$(document).ready(function() { 3 $('.animsition').animsition(); 4}); 5 6var lnb_type='type1'; 7 8$(function () { 9 /* 10 // ì¤í¬ë¡¤ì header ê³ ì 11 var menupos = $('#header').offset().top; 12 $(window).scroll(function(){ 13 if($(window).scrollTop() > 100) { 14 $('#header').addClass('fixed'); 15 } else { 16 $('#header').removeClass('fixed'); 17 } 18 }); 19 */ 20 21 // footer top btn 22 $(window).scroll(function(e) { 23 var footers = $("#footer").offset().top; 24 var $footer = $("#footer"); 25 if ($(window).scrollTop() < $(document).height() - $(window).height() - $footer.outerHeight()) { 26 $('.btnTop').addClass('fixed'); 27 $('.quickmenu').addClass('fixed'); 28 } else { 29 $('.btnTop').removeClass('fixed'); 30 $('.quickmenu').removeClass('fixed'); 31 } 32 }); 33 34 $("#header").addClass(lnb_type); 35 36 // Hide Header on on scroll down 37 var menupos = $('#header').offset().top; 38 $(window).scroll(function(){ 39 if($(window).scrollTop() > 40) { 40 //$('#header').removeClass('nav-top'); 41 } else { 42 //$('#header').addClass('nav-top'); 43 } 44 }); 45 var didScroll; 46 var lastScrollTop = 0; 47 var delta = 5; 48 var navbarHeight = $('#header').outerHeight(); 49 $(window).scroll(function(event){ 50 didScroll = true; 51 }); 52 setInterval(function() { 53 if (didScroll) { 54 hasScrolled(); 55 didScroll = false; 56 } 57 }, 250); 58 function hasScrolled() { 59 var st = $(this).scrollTop(); 60 61 // Make sure they scroll more than delta 62 if(Math.abs(lastScrollTop - st) <= delta) 63 return; 64 65 // If they scrolled down and are past the navbar, add class .nav-up. 66 // This is necessary so you never see what is "behind" the navbar. 67 if (st > lastScrollTop && st > navbarHeight){ 68 // Scroll Down 69 //$('#header').removeClass('nav-down').addClass('nav-up'); 70 } else { 71 // Scroll Up 72 if(st + $(window).height() < $(document).height()) { 73 //$('#header').removeClass('nav-up').addClass('nav-down'); 74 } 75 } 76 lastScrollTop = st; 77 } 78 79 80 81 // header gnb ìë¸ë©ë´ 82 $(document).on('mouseenter', '#header__lnb .lnb-menu > li', function() { 83 if ($(window).width() > 1025) { 84 if ($(this).hasClass('search')||$(this).hasClass('lang')) { 85 return; 86 } 87 if(lnb_type=='type1') { 88 var gnbmenu = $(this).find('.lnb_sub_menu'); 89 } else if (lnb_type=='type2') { 90 var gnbmenu = $(this).parent().find('.lnb_sub_menu'); 91 } 92 gnbmenu.slideDown(); 93 $('.lnb_sub_menu').not(gnbmenu).slideUp(); 94 $(this).addClass('ov'); 95 $('#header').addClass('open_menu'); 96 $('.lnb_sub_menu').addClass('open'); 97 } else { 98 return true; 99 } 100 }); 101 $('#header__lnb .lnb-menu > li').on('mouseleave', function(){ 102 if ($(window).width() > 1025) { 103 if(lnb_type=='type1') { 104 $('.lnb_sub_menu').stop().finish().hide(); 105 $(this).removeClass('ov'); 106 $('#header').removeClass('open_menu'); 107 $('.lnb_sub_menu').removeClass('open'); 108 } else if(lnb_type=='type2') { 109 $(this).removeClass('ov'); 110 } 111 } 112 }); 113 $(document).on('mouseleave', '#header', function() { 114 if(lnb_type=='type2') { 115 $('.lnb_sub_menu').stop().finish().slideUp(200); 116 $('#header').removeClass('open_menu'); 117 $('.lnb_sub_menu').removeClass('open'); 118 } 119 }); 120 $(document).on('click', '#header__lnb .lnb-menu > li', function() { 121 if ($(window).width() < 1025) { 122 var gnbmenu = $(this).find('.lnb_sub_menu'); 123 if(gnbmenu.css('display') == 'none') { 124 gnbmenu.slideDown(); 125 $("#header__lnb .lnb-menu > li").removeClass('ov'); 126 $(this).addClass('ov'); 127 $('.lnb_sub_menu').not(gnbmenu).slideUp(); 128 return false; 129 } 130 else { 131 gnbmenu.slideUp(); 132 } 133 } else { 134 return true; 135 } 136 }); 137 138 $(document).on('mouseenter', '#header__lnb .lnb-menu .lnb_sub_menu', function() { 139 if ($(window).width() > 1025) { 140 $(this).parent().addClass('active'); 141 } else { 142 return true; 143 } 144 }); 145 $(document).on('mouseleave', '#header__lnb .lnb-menu .lnb_sub_menu', function() { 146 if ($(window).width() > 1025) { 147 $(this).parent().removeClass('active'); 148 } else { 149 return true; 150 } 151 }); 152 153 154 // mobile 155 $(document).on('click', '#header__mobile', function() { 156 if ($(window).width() < 1025) { 157 mobileMenu(); 158 } else { 159 return true; 160 } 161 }); 162 function mobileMenu() { 163 // $('.header-inner #header__lnb').fadeToggle(); 164 $('.header-inner #header__lnb').toggleClass('active'); 165 $('.header__gnb').toggleClass('none'); 166 $('#header__mobile').toggleClass('active'); 167 $('body').toggleClass('hidden'); 168 $('.header__dim').fadeToggle(); 169 } 170 $(window).resize(function(){ 171 var wWidth = $(window).width(); 172 if(wWidth >= 1025) 173 { 174 $("#header .header-inner #header__lnb").fadeIn(); 175 $('.lnb_sub_menu').slideUp(); 176 } 177 }); 178 179 180 181 $(document).on('click', '.lnb-search .search_btn', function() { 182 $('.header__search_popup').fadeIn(); 183 $('body').toggleClass('hidden'); 184 }); 185 $(document).on('click', '.header__search_popup .popup__close', function() { 186 $('.header__search_popup').fadeOut(); 187 $('body').toggleClass('hidden'); 188 }); 189 190 $(document).ready(function (){ 191 $('.sub-menu ul').each(function (){ 192 var _width = $(this).width(), 193 _length = $(this).length, 194 _index = $(this).find('.on').index(); 195 _location = (_width/_length) * _index; 196 197 if (_location > 2040) { 198 $('.sub-menu').scrollLeft(_location); 199 } 200 }); 201 }); 202 203 204 // ê°ì¢ ë§í¬ ê³µíµ ì¬ì©; 205 $(document).on('click', '.fn_link', function(e) { 206 e.preventDefault(); 207 var mode = $(this).data('mode'); 208 if(mode=='apt') { 209 } else if (mode=='officetel') { 210 } 211 }); 212 213 214 subTop(); // topë²í¼ì ëë©ì´ì 215}); 216 217 218var $footer = $("#footer"); 219 220var subTop = function() { 221 //subTopProgress(); 222 //subTopProgressAni(0,0); 223 224 //$(window).on('scroll', subTopProgress); 225 226 $('.btnTop, .q_top').on('click', function () { 227 $('html,body').stop().animate({ 228 scrollTop: 0 229 }, 600); 230 }); 231}; 232 233var subTopProgress = function() { 234 var windowScrollTop = $(window).scrollTop(); 235 var docHeight = $(document).height(); 236 var windowHeight = $(window).height(); 237 var progress = (windowScrollTop / (docHeight - windowHeight - $footer.height())) * 100; 238 239 if ($(window).scrollTop() > $(window).height() * 0.005) { 240 subTopProgressAni(Math.round(progress) / 100, 1); 241 } else { 242 subTopProgressAni(Math.round(progress) / 100, 0); 243 } 244 245 if($(window).scrollTop() > 100) { 246 $('.btnTop').fadeIn('slow').addClass('active'); 247 } else { 248 $('.btnTop').fadeOut("slow").removeClass('active'); 249 } 250 251 if ($(document).height() - $(window).height() - $footer.outerHeight() < 0) { 252 $('.btnTop').hide(); 253 return; 254 } 255}; 256 257var subTopProgressAni = function(_val, _opacity) { 258 var obj = $('.btnTop .back'); 259 var val = _val * 100; 260 obj.css({'bottom': '-'+(100 - val) + '%'}); 261 262 if(val>55) { 263 $('.btnTop .material-icons').addClass('active'); ; 264 } else { 265 $('.btnTop .material-icons').removeClass('active'); ; 266 } 267};
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.