1;(function($, window, undefined) { 2 'use strict'; 3 4 if ('undefined' === typeof window.Dtr) { 5 var Dtr = window.Dtr = {}; 6 } 7 8 $(document).ready(function() { 9 //Util.CheckMobile(); 10 // Util.DeleteSelf(); 11 //Util.WindowFixed(); 12 //Util.MapApi(); 13 14 UI.TopBtn(); 15 UI.VisualSlider(); 16 UI.commonEffect(); 17 UI.popupDraggable(); 18 // UI.TabLink(); 19 20 }); 21 var Util = Dtr.Util = { 22 CheckMobile: function() { 23 if (!$.browser.desktop) { 24 document.getElementsByTagName('html')[0].className += 'mobile'; 25 } else { 26 document.getElementsByTagName('html')[0].className += 'pc'; 27 } 28 }, 29 30 WindowInfo: function(parameter) { 31 var w = window, 32 d = document, 33 e = d.documentElement, 34 g = d.getElementsByTagName('body')[0], 35 h = d.getElementsByTagName('header')[0], 36 x = w.innerWidth || e.clientWidth || g.clientWidth, 37 y = w.innerHeight || e.clientHeight || g.clientHeight, 38 t = w.scrollTop || e.scrollTop || g.scrollTop, 39 b = (w.scrollTop || e.scrollTop || g.scrollTop) + y, 40 r, 41 /* Jquery Selector */ 42 $w = $(w), 43 $b = $(g) 44 45 switch (parameter) { 46 case 'w': 47 r = w; 48 break; 49 case 'g': 50 r = g; 51 break; 52 case 'h': 53 r = h; 54 break; 55 case 'x': 56 r = x; 57 break; 58 case 'y': 59 r = y; 60 break; 61 case 't': 62 r = t; 63 break; 64 case 'b': 65 r = b; 66 break; 67 case '$w': 68 r = $w; 69 break; 70 case '$b': 71 r = $b; 72 break; 73 } 74 75 return r; 76 }, 77 78 Dtr: function(agency) { 79 if ($.browser.chrome) { 80 console.log(agency, 'font-family:NanumGothic; font-size:15px; font-weight:700; color:#ED174F; padding:1px 5px 2px; background:#fff;'); 81 } 82 }, 83 84 WindowViewAction: function(target, func) { 85 var $target = $(target); 86 var windowScrTop, windowScrBot, objTop, objBot, _this; 87 88 var Action = function() { 89 windowScrTop = Util.WindowInfo('t'); 90 windowScrBot = Util.WindowInfo('b'); 91 92 $target.each(function() { 93 objTop = $(this).offset().top; 94 _this = $(this); 95 if (windowScrTop < objTop && objTop < windowScrBot) { 96 func(_this); 97 } 98 }); 99 } 100 101 $(window).bind('load scroll', Action); 102 }, 103 104 WindowFixed: function() { 105 var header = Util.WindowInfo('h'), 106 $window = Util.WindowInfo('$w'); 107 $window.on('scroll resize', function() { 108 var winWidth = window.innerWidth; 109 var winScroll = ($window.scrollTop() || $("body").scrollTop()); 110 (winWidth >= 800 && winScroll > 50) ? header.classList.add('fixed'): header.classList.remove('fixed'); 111 }).resize().scroll(); 112 }, 113 114 DeleteSelf: function() { 115 $('a').each(function() { 116 if ($(this).attr('href') == '#self') { 117 if (this.addEventListener) { 118 this.addEventListener('click', function(e) { 119 e.preventDefault(); 120 }); 121 } else { 122 this.attachEvent('onclick', function(e) { 123 e.returnValue = false; 124 }); 125 } 126 } 127 }); 128 }, 129 130 GetParents: function(el, parentSelector) { 131 var parentSelector = $(parentSelector)[0]; 132 133 if (parentSelector === undefined) { 134 parentSelector = document; 135 } 136 137 var e = el; 138 var r = e === parentSelector ? true : false; 139 140 while (e !== parentSelector) { 141 if (e === document) { 142 break; 143 } else { 144 e = e.parentNode; 145 } 146 } 147 148 r = e === parentSelector ? true : false; 149 150 return r; 151 } 152 } 153 154 var UI = Dtr.UI = { 155 TopBtn: function() { 156 var $window = Util.WindowInfo('$w'); 157 $window.scroll(function() { 158 if ($window.scrollTop() > 300) { 159 if ($('#footer').find('.top-btn').length == 0) { 160 $('#footer').append($('<p class="top-btn">TOP</p>').hide().fadeIn(200, function(){ 161 $(this).addClass('on'); 162 163 $('.top-btn').on('click', function(e) { 164 e.stopPropagation(); 165 TweenMax.to($window, 0.5, { 166 scrollTo: 0 167 }); 168 }); 169 })); 170 } else { 171 var scrollBottom = $(window).scrollTop() + $(window).outerHeight() - 30; 172 var topBtn = $('#footer').offset().top + $('.top-btn').outerHeight()/2; 173 if (scrollBottom >= topBtn) { 174 $('.top-btn').addClass('fixed'); 175 } else { 176 $('.top-btn').removeClass('fixed'); 177 } 178 } 179 } else { 180 $('.top-btn').fadeOut(200, function(){$(this).remove();}); 181 } 182 }); 183 }, 184 scrollAni: function() { 185 var $window = Util.WindowInfo('$w'), 186 $animation_elements = $('[class*="slide"]'); 187 188 function check_if_in_view() { 189 var window_height = $window.height(); 190 var window_top_position = $window.scrollTop(); 191 var window_bottom_position = (window_top_position + window_height); 192 193 $.each($animation_elements, function() { 194 var $element = $(this); 195 var element_height = $element.outerHeight(); 196 var element_top_position = $element.offset().top + 100; 197 var element_bottom_position = (element_top_position + element_height); 198 199 //check to see if this current container is within viewport 200 if ((element_bottom_position >= window_top_position) && 201 (element_top_position <= window_bottom_position)) { 202 $element.addClass('in-view'); 203 } else { 204 $element.removeClass('in-view'); 205 } 206 }); 207 } 208 $window.on('scroll resize', check_if_in_view); 209 $window.trigger('scroll'); 210 }, 211 212 VisualSlider: function () { 213 if ($('.main_visual__slider').hasClass('custom')) {
214 // ì¬ë¼ì´ë í¨ê³¼ ì¬ì©ì ì ì - ëìì¸ì ë§ê² ìì 215 $('.main_visual__slider').off().on('init', function (event, slick) { 216 // let's do this after we init the banner slider 217 var el = $(slick.$slides[0]); 218 slick_txt(el); 219 }) 220 .on('beforeChange', function (event, slick, currentSlide, nextSlide) { 221 var el = $(slick.$slides[currentSlide]); 222 var eltxt = el.find(".slider_item__inner__txtbox").children(); 223 TweenLite.to(eltxt, 0.5, { 224 autoAlpha: 0, 225 bottom: -20 226 }); 227 }) 228 .on('afterChange', function (event, slick, currentSlide, nextSlide) { 229 // finally let's do this after changing slides 230 var el = $(slick.$slides[currentSlide]); 231 slick_txt(el); 232 }) 233 .slick({ 234 dots: true, 235 fade: true, 236 infinite: true, 237 arrows: true, 238 autoplay: true, 239 speed: 800, 240 slidesToShow: 1, 241 autoplaySpeed: 6000, 242 lazyLoad: 'ondemand', 243 pauseOnHover: false, 244 pauseOnFocus: false, 245 prevArrow: $('.main_visual .arrow-prev'), 246 nextArrow: $('.main_visual .arrow-next'), 247 }); 248 249 function slick_txt(el) { 250 var eltxt = el.find(".slider_item__inner__txtbox").children(); 251 $.each(eltxt, function (e) { 252 var _ = $(this); 253 var delay = 200; 254 setTimeout(function () { 255 TweenLite.fromTo(_, 0.5, { 256 autoAlpha: 0, 257 bottom: -20 258 }, { 259 autoAlpha: 1, 260 bottom: 0 261 }); 262 }, e * delay); 263 }) 264 } 265 } else { 266 // ì¬ë¼ì´ë í¨ê³¼ í í릿 267 var fadeFc; 268 var infiniteFc; 269 var speedFc; 270 if ($('.main_visual__slider').hasClass('fade')) { 271 fadeFc = true; 272 infiniteFc = true; 273 speedFc = 800; 274 } else if ($('.main_visual__slider').hasClass('bounce')) { 275 fadeFc = false; 276 infiniteFc = false; 277 speedFc = 400; 278 } else { 279 fadeFc = true; 280 infiniteFc = true; 281 speedFc = 800; 282 } 283 $('.main_visual__slider').off().on('init', function (event, slick) { 284 // let's do this after we init the banner slider 285 var el = $(slick.$slides[0]); 286 slick_txt(el); 287 }) 288 .on('beforeChange', function (event, slick, currentSlide, nextSlide, direction) { 289 if ($('.main_visual__slider').hasClass('bounce')) { 290 if (Math.abs(nextSlide - currentSlide) == 1) { 291 if (direction = (nextSlide - currentSlide > 0)) { 292 $('.main_visual__slider').addClass('backwrad'); 293 } else { 294 $('.main_visual__slider').addClass('forward'); 295 } 296 } else { 297 if (direction = (nextSlide - currentSlide > 0)) { 298 $('.main_visual__slider').addClass('backwrad'); 299 } else { 300 $('.main_visual__slider').addClass('forward'); 301 } 302 } 303 } 304 305 var el = $(slick.$slides[currentSlide]); 306 var eltxt = el.find(".slider_item__inner__txtbox").children(); 307 TweenLite.to(eltxt, 0.5, { 308 autoAlpha: 0, 309 bottom: -20 310 }); 311 var eltxt1 = el.find(".visual_text"); 312 TweenLite.to(eltxt1, 0.5, { 313 autoAlpha: 0 314 }); 315 }) 316 .on('afterChange', function (event, slick, currentSlide, nextSlide, direction) { 317 $('.main_visual__slider').removeClass('forward backwrad'); 318 319 // finally let's do this after changing slides 320 var el = $(slick.$slides[currentSlide]); 321 slick_txt(el); 322 }) 323 .slick({ 324 dots: true, 325 fade: fadeFc, 326 infinite: infiniteFc, 327 arrows: false, 328 autoplay: true, 329 speed: speedFc, 330 slidesToShow: 1, 331 autoplaySpeed: 6000, 332 lazyLoad: 'ondemand', 333 pauseOnHover: false, 334 pauseOnFocus: false 335 }); 336 337 function slick_txt(el) { 338 var eltxt = el.find(".slider_item__inner__txtbox").children(); 339 $.each(eltxt, function (e) { 340 var _ = $(this); 341 var delay = 200; 342 setTimeout(function () { 343 TweenLite.fromTo(_, 0.5, { 344 autoAlpha: 0, 345 bottom: -20 346 }, { 347 autoAlpha: 1, 348 bottom: 0 349 }); 350 }, e * delay); 351 }) 352 var eltxt1 = el.find(".visual_text"); 353 $.each(eltxt1, function (e) { 354 var _ = $(this); 355 var delay = 500; 356 setTimeout(function () { 357 TweenLite.fromTo(_, 1.5, { 358 autoAlpha: 0 359 }, {
360 autoAlpha: 1 361 }); 362 }, e * delay); 363 }) 364 } 365 } 366 }, 367 368 commonEffect: function(){ 369 var controller = new ScrollMagic.Controller(); 370 $('.common_effect').each(function(){ 371 var _ = $(this); 372 var tween1 = function(){ 373 var el = _.find('.ce_item'); 374 $.each(el, function(e){ 375 var _ = $(this); 376 setTimeout(function() { 377 TweenLite.fromTo(_, 0.5, {position: 'relative', autoAlpha:0, bottom: '-30px'}, { autoAlpha:1, bottom: 0} ) 378 }, e * 200); 379 }) 380 } 381 var scene1 = new ScrollMagic.Scene({ 382 triggerElement: this, 383 triggerHook: 'onEnter', 384 offset: 250, 385 reverse: false // once animating 386 }) 387 .setTween(tween1) 388 .addTo(controller); 389 }); 390 }, 391 392 popupDraggable: function(){ 393 $('.main_layer_pop_box').each(function(i){ 394 var _top; 395 var _left; 396 397 $(this).draggable({ 398 containment:'parent', 399 // cancel: 'a, label', 400 scroll:false, 401 start: function() { 402 var cookieObj = 'N'; 403 $.cookie('draggableCookie' + i, cookieObj); 404 }, 405 stop: function() { 406 _top = $(this).css('top'); 407 _left = $(this).css('left') 408 409 var cookieObj = 'Y' + '%' + _top + '%' + _left; 410 $.cookie('draggableCookie' + i, cookieObj, { 411 expires : 365 412 }); 413 } 414 }); 415 416 var cookie = $.cookie('draggableCookie' + i); 417 var mycookies; 418 if (cookie != undefined) { 419 mycookies = cookie.split('%'); 420 if (mycookies[0] == 'Y') { 421 $(this).css({ 422 'top': mycookies[1], 423 'left': mycookies[2] 424 }); 425 } 426 } 427 }); 428 }, 429 430 TabLink : function(){ 431 // Javascript to enable link to tab 432 var hash = document.location.hash; 433 var prefix = "tab_"; 434 if (hash) { 435 $('.nav-tabs a[href="'+hash.replace(prefix,"")+'"]').tab('show'); 436 } 437 // Change hash for page-reload 438 $('.nav-tabs a').on('shown', function (e) { 439 window.location.hash = e.target.hash.replace("#", "#" + prefix); 440 }); 441 } 442 } 443})(jQuery, window); 444 445$(function(){ 446 var inTarget = $('.gnb .depth2 > li'); 447 inTarget.each(function(){ 448 if ($(this).find('ul').length != 0) { 449 $(this).addClass('in'); 450 } 451 }); 452 453 var mbInTarget = $('.gnb > ul > li'); 454 mbInTarget.each(function(){ 455 if ($(this).find('li').length != 0) { 456 $(this).addClass('mb-in'); 457 } 458 }); 459}) 460 461$(function(){ 462 463 $(".location-wrap ul.location-ul>li:not(.location-home)>a").click(function(e){ 464 e.preventDefault(); 465 $(".location-wrap ul.location-ul>li>a").not(this).next(".location-depth2").slideUp(200); 466 $(this).next(".location-depth2").slideToggle(200); 467 }); 468 469 // youtube popup (grt-youtube) 470 $(".youtube-link").grtyoutube({ 471 autoPlay:true, 472 theme: "dark" 473 }); 474 475 if( $('.cateBox').length != 0 ) { 476 if( $('.category_list > li.on').length == 0 ) { 477 $('.category_list > li:first-child').addClass('on'); 478 } 479 } 480 481 // $('.tab_btn_box > ul li a').on('click', function (e) { 482 // e.preventDefault(); 483 // var i = $(this).parent('li').index(); 484 // $('.tab_btn_box > ul li a').not(this).removeClass('on'); 485 // $(this).addClass('on'); 486 // $('.tab_conts_box > ul > li').hide(); 487 // $('.tab_conts_box > ul > li').eq(i).fadeIn(200); 488 // }); 489 490 $('.tab_btn_box > ul li a').on('click', function (e) { 491 e.preventDefault(); 492 let tabEventWrap = $(this).parents('.tab_event_wrap'); 493 let i = $(this).parent('li').index(); 494 $(this).parent('li').addClass('on').siblings().removeClass('on'); 495 tabEventWrap.find('.tab_conts_box > ul > li').hide(); 496 tabEventWrap.find('.tab_conts_box > ul > li').eq(i).fadeIn(200); 497 498 if (tabEventWrap.find('.slick-slider').length != 0) { 499 tabEventWrap.find('.slick-slider').slick('refresh'); 500 } 501 502 if (tabEventWrap.find('.tab_conts_box > ul > li video').length != 0) { 503 tabEventWrap.find('.tab_conts_box > ul > li video').each(function () { 504 $(this).get(0).pause(); 505 }); 506 } 507 }); 508 509 510 // input file 511 if ($('.filebox').length != 0) { 512 fileUpload(); 513 } 514 515 function fileUpload(){ 516 var fileTarget = $('.filebox .upload-hidden'); 517 518 fileTarget.on('change', function () { 519 if (window.FileReader) { // modern browser 520 var filename = $(this)[0].files[0].name; 521 } else { // old IE 522 var filename = $(this).val().split('/').pop().split('\\').pop(); 523 } 524 525 // $(this).siblings('.upload-name').val(filename); 526 $(this).parents('.filebox').find('.upload-name').val(filename); 527 }); 528 } 529}); 530
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.