1$(document).ready(function(){ 2 var googleLang = false; 3 (function(){ 4 //lang change toggle 5 var $langChange = $('.gnb-item--type-changeleng'), 6 $btnLangOpen = $langChange.find('.gnb-anchor'), 7 $btnLangClose = $langChange.find('.lang-closebtn'); 8 langOpenBool = false; 9 $btnLangOpen.on('click', function(e){ 10 if($('.lang-item').length == 0 && googleLang == false) { 11 var oScript = document.createElement('script'); 12 oScript.type ='text/javascript'; 13 oScript.charset ='utf-8'; 14 oScript.src = 'https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit'; 15 document.getElementsByTagName('head')[0].appendChild(oScript); 16 googleLang = true; 17 setTimeout(function (e) { 18 $(".goog-te-combo").attr('title', '구ê¸ë²ì ì¸ì´ì í'); 19 }, 200); 20 } 21 var _this = $(this); 22 e.stopPropagation(); 23 if( !_this.closest('.gnb-item').hasClass('js--langchange')){ 24 _this.closest('.gnb-item').addClass('js--langchange'); 25 _this.closest('.gnb-item').find('.gnb-anchor').attr('title','ì¸ì´ì í ë©ë´ ì 기'); 26 langOpenBool = true; 27 $(document).on('click', function(e){ 28 if(langOpenBool){ 29 $langChange.removeClass('js--langchange'); 30 $langChange.find('.gnb-anchor').attr('title','ì¸ì´ì í ë©ë´ í¼ì¹ê¸°'); 31 $langChange.find(".lang-list").removeClass("active"); 32 langOpenBool = false; 33 } 34 }); 35 $langChange.on('click',function(e){ 36 if( langOpenBool ){ 37 e.stopPropagation(); 38 } 39 }); 40 }else{ 41 _this.closest('.gnb-item').removeClass('js--langchange'); 42 _this.closest('.gnb-item').find('.gnb-anchor').attr('title','ì¸ì´ì í ë©ë´ í¼ì¹ê¸°'); 43 langOpenBool = false; 44 } 45 }); 46 $btnLangClose.on('click', function(e){ 47 var _this = $(this); 48 _this.closest('.gnb-item').removeClass('js--langchange'); 49 _this.closest('.gnb-item').find('.gnb-anchor').attr('title','ì¸ì´ì í ë©ë´ í¼ì¹ê¸°'); 50 langOpenBool = false; 51 }); 52 })(); 53 (function(){ 54 //menu focus; 55 var $snb = $('.snb-item'); 56 $snbSub = $snb.find('.snb-list__sub-wrap a'); 57 58 $snbSub.on({ 59 'focusin' : function(e){ 60 var _this = $(this); 61 _this.closest('.snb-item').addClass('snb-item--js-focus') 62 }, 63 'focusout' : function(e){ 64 var _this = $(this); 65 _this.closest('.snb-item').removeClass('snb-item--js-focus'); 66 } 67 }); 68 })(); 69 70 71 72 73 ResizeEvents.addListener(adjustWidth, true); 74 ResizeEvents.addListener(resizeLocationMenu, true); 75 $("section.swiper-slide.active").siblings().addClass("vhidden"); 76 $("#topsearch").val(""); 77 $("#main_bsch_txt").val(""); 78 $(window).on("resize", function(){ 79 ResizeEvents.onResize(); 80 }); 81 82 // GNB hide event 83 $("section.global, section#container, section#kopo_container").on("click", function() { 84 gnbMenuOut(); 85 locMenuOut(); 86 if (!$(this).hasClass("global")) { 87 toggleLanguageWindow(false); 88 } 89 }); 90 91 // ë©ë´ ëì´ ì¤ì 92 $("nav ul.sl_box").each(function(){ 93 if ($(this).children("li").length < 5) { 94 $(this).addClass("wide" + $(this).children("li").length); 95 } 96 var h = $(this).height()+ 30 + 80; // 30 = sl_box padding bottom, 80 = gnb menu height 97 $(this).parent().attr("data-height", h); 98 }).promise().done(function(){ 99 $("nav div.sub_level").hide(); 100 }); 101 102 $(window).scroll(function(event){ 103 locationScrolled(); 104 }); 105 106 // Topë²í¼ ëì 107 if ($("button#footer_top").hasClass("top_bt")) { 108 $("button#footer_top.top_bt").css("display","none"); 109 var headerOffset = 57; 110 $(document).scroll(function() { 111 if(!$("#kopo_wrap").hasClass('active')){ 112 var scrY = window.scrollY != undefined ? window.scrollY : document.documentElement.scrollTop; 113 if (headerOffset <= scrY) { 114 $('button#footer_top').fadeIn(400); 115 } else { 116 $('button#footer_top').fadeOut(400); 117 } 118 } 119 }); 120 } 121 122 setTimeout(function(){ 123 $('.goog-logo-link').find('img').attr("alt", "구ê¸ì´ë¯¸ì§" ); 124 }, 2000); 125 126 // IE8 checkbox & radio issue 127 var ieVer = getInternetExplorerVersion(); 128 if (ieVer != "N/A" && ieVer < 9) { 129 $("input[type='checkbox'], input[type='radio'], input[type='file']").on("change", function(){ 130 $(this).blur().focus(); 131 }); 132 } 133 //íìë©ë´ì íì´ íì¸ê²½ì° ë©ë´ìë marginê° ì¤ì 134 //$('.tab_box').parent().find('.tit_box').css('margin-bottom', '20px'); 135 136 $('.privacy_txt a').on('click', function() { 137 $('html, body').animate({scrollTop: $(this.hash).offset().top - 70}, 100); 138 return false; 139 }); 140}); 141 142function googleTranslateElementInit() { 143 try { 144 new google.translate.TranslateElement({pageLanguage: 'ko', autoDisplay: false}, 'google_translate_element'); 145 } catch(ex) { 146 //this supresses JS errors in Google code being shown to users, the translate utility will simply not be shown 147 } 148} 149/** 150 * TOPë²í¼ ì´ë²¤í¸ 151 */ 152function letsGoTowardsTheTop() { 153 if($("#pg-div").hasClass("pg-container") === true && pageable != null) { 154 pageable.scrollToPage(1); 155 //pageable.scrollToAnchor("#sec1"); 156 } else if($('html').hasClass('fp-enabled') === true) { 157 $('.fullpage').fullpage.moveTo(1,0); 158 }else { 159 $('html, body').animate({scrollTop: 0}, 400); 160 } 161} 162 163/** 164 * íë©´ 리ì¬ì´ì¦ ì´ë²¤í¸ 리ì¤ë 165 */ 166var ResizeEvents = (function(events) { 167 this.listener = new Array(); 168 169 /** 170 * 리ì¤ëì Function ë±ë¡ 171 * @param func Function 172 * @param withRun (Boolean) ë±ë¡ê³¼ ëìì ì¤íì¬ë¶ 173 */ 174 events.addListener = function (func, withRun) { 175 if (typeof(func) == "function") { 176 listener.push(func); 177 if (withRun == true) { 178 func(); 179 } 180 } else { 181// console.log("Function Only!!"); 182 } 183 } 184 185 /** 186 * 리ì¤ëì ë±ë¡ë Function ì¤í 187 */ 188 events.onResize = function() { 189 for (var i in listener) { 190 //console.log("onresize :" + typeof(listener[i])); 191 if (typeof(listener[i]) == "function") { 192 listener[i](); 193 } 194 } 195 } 196 197 return events; 198})(window.ResizeEvents || {}); 199 200/*ë¡ì¼ì´ì ë©ë´ 모ë°ì¼ì¬ì´ì¦ ì ì©*/ 201function resizeLocationMenu(){ 202 var screenWidth = document.documentElement.clientWidth || document.body.clientWidth; 203 var children = $(".location_box >ul").children();
204 var fchildren = children.first().outerWidth(true); 205 if(screenWidth<=900){ 206 $(".menu02, .menu03, .menu04, .menu05").css('min-width', 0); 207 var showMenu = children.length; 208 if(screenWidth<=720){ 209// if(children.length>4){ 210// children.last().hide(); 211 children.first().hide(); 212 showMenu--; 213// } 214 } else { 215// if(children.length>4){ 216 children.first().show(); 217// } 218 } 219 children.each(function(i, element) { 220 //첫ë²ì§¸ íë©ë´ ë¹¼ê³ 221 if(i!=0){ 222 // $(this).width((screenWidth) / (showMenu)); 223 $(".loc_down").width(((screenWidth) / (showMenu))-1); 224 } 225 }); 226 $(".location_box >ul").data("adjust", "N"); 227 }else { 228 if ($(".location_box >ul").data("adjust") == "Y") { 229 //console.log("adjusted"); 230 return; 231 } 232 233 $(".menu02, .menu03, .menu04, .menu05").css('width','auto'); 234 $(".menu02, .menu03, .menu04, .menu05").css('min-width',160); 235 236 var wrapWidth = $(".location_box >ul").outerWidth(false); 237 var childWidth = new Array(); 238 var totalWidth = 0; 239 children.each(function(i, element) { 240 var w = $(this).outerWidth(true); 241 childWidth.push(w-10); 242 totalWidth += w; 243 }).promise().done(function(){ 244// console.log(totalWidth + " " + wrapWidth); 245// console.log(totalWidth > wrapWidth); 246 if (totalWidth > wrapWidth) { 247 for(var i=1; i < childWidth.length; i++) { 248 var widthPer = childWidth[i] / (totalWidth) * 100; 249 $(".menu0" + (i+1)).css("width", widthPer+"%"); 250 } 251 $(".location_box >ul").data("adjust", "Y"); 252 } 253 }); 254 } 255} 256 257/** 258 * ë©ë´ë° ì¤í°ì»¤ í¤ë ì²ë¦¬ 259 */ 260function locationScrolled() { 261 var screenHeight = document.documentElement.clientHeight || document.body.clientHeight; 262 var scrollTop = document.documentElement.scrollTop|| document.body.scrollTop; 263 var sticker= $('.gnb-wrap').innerHeight()+ $('.snb-wrap').innerHeight(); 264 //2017.07.11 ì¤ë§í¸í° ë¸ë¼ì°ì ì¤ì ì¼ë¡ ì¤ì¸.ìì ê°ì ì¤ì í íëì ë ì´ìì ì¤ë¥ìì 265 var currentZoom = screenHeight / window.innerHeight; 266 if (currentZoom > 1){ 267 $("section.location >div").css("position","relative"); 268 } else { 269 if (scrollTop>=sticker) { 270 $("section.location >div").css("position","fixed"); 271 }else{ 272 $("section.location >div").css("position","relative"); 273 } 274 } 275} 276 277/** 278 * íì´ì§ ëì´ ì¡°ì 279 */ 280function adjustWidth() { 281 var screenWidth = document.documentElement.clientWidth || document.body.clientWidth; 282 var wrapW = $(".swiper-slide").length * screenWidth; 283 $(".swiper-slide").width(screenWidth); 284 $(".swiper-wrapper").width(wrapW); 285} 286 287/** 288 * íì´ì§ ì¬ë¼ì´ë ì´ë 289 * @param page íì´ì§ë²í¸(1ë¶í° ìì), íì´ì§ID 290 */ 291function slideMove(page,goEvent) { 292// if(window.console) console.log(page+""+goEvent); 293 294 if ($(".main_all_campus").hasClass("show")) { 295 $(".main_all_campus").removeClass("show"); 296 } 297 298 if($('.mobile_menu').css('display') == 'block') { 299 $(".mobile_menu").css('display', 'none'); 300 } 301 302 if ($("#search_wrap.active").length > 0 && page == 'search_wrap') { 303 doIndexSearch('major'); 304 return; 305 } 306 307 var slide; 308 309 if (page == "prev") { 310 page = $(".swiper-slide.active").index(); 311 } else if (page == "next") { 312 page = $(".swiper-slide.active").index() + 2; 313 } 314 315 if (typeof(page) == "number") { 316 page = page < 1 ? 1 : page; 317 page = $(".swiper-slide").length < page ? $(".swiper-slide").length : page; 318 slide = $(".swiper-slide").eq(page-1); 319// if(window.console) console.log(page); 320 if(page==1){ 321 $(".kopo_wrap.active .top_bt").hide(); 322 } 323 } else { 324 slide = $(".swiper-slide").filter("#"+page); 325 } 326 327 if (slide.hasClass("active")) { 328 if (goEvent != undefined) { 329 location.href = goEvent; 330 } 331 return; 332 } 333 334 var slideIdx = slide.index(); 335 slide.removeClass("vhidden").addClass("active").siblings().removeClass("active"); 336 setTimeout(function(){ 337 slide.siblings().addClass("vhidden"); 338 }, 500); 339 340 setTimeout(function(){ 341 if (goEvent != undefined) { 342 location.href = goEvent; 343 } 344 }, 600); 345 346 $(".swiper-wrapper").css({ 347 "margin-left" : (-100 * slideIdx) + "%" 348 }); 349 350 if(page == 'search_wrap') { 351// if(window.console) console.log("focus"); 352 setTimeout(function(){ 353 $('#keyword_box #query').focus(); 354 }, 500); 355 } 356} 357 358/** 359 * GNB Show 360 * @param obj ë©ë´ 361 */ 362function gnbMenuOver(obj) { 363 if ($(obj).hasClass("on")) { 364 gnbMenuOut(); 365 return; 366 } 367 var h = $(obj).next(".sub_level").attr("data-height"); 368 $("a.menu_fst.on").removeClass("on"); 369 if ($(".gnb_menu").is("#kopo_gnb")) {
370 $(".sub_level.on").removeClass("on").slideUp(200); 371 } else { 372 $(".sub_level.on").removeClass("on").fadeOut(200); 373 } 374 $(".gnb_menu").not("#kopo_gnb").css("height", h + "px"); 375 $(obj).addClass("on").next(".sub_level").addClass("on").slideDown(500); 376} 377 378/** 379 * GNB Show All in one menu (for Campus) 380 * @param obj ë©ë´ 381 * @param idx 1ëì¤ ë©ë´ ì¸ë±ì¤ 382 */ 383function gnbAllMenuOver(obj, idx) { 384 if ($(obj).hasClass("on")) { 385 gnbMenuOut(); 386 return; 387 } 388 var alltype = $(".sub_level.alltype"); 389 alltype.find(".menu_scd.on").removeClass("on"); 390 alltype.find(".menu_scd").eq(idx).addClass("on"); 391 $("a.menu_fst.on").removeClass("on"); 392 $(obj).addClass("on"); 393 if (!alltype.hasClass("on")) { 394 var h = alltype.attr("data-height"); 395 $(".gnb_menu").not("#kopo_gnb").css("height", h + "px"); 396 alltype.addClass("on").slideDown(500); 397 } 398} 399 400function mobileMenuOver(obj){ 401 $(obj).parent().addClass("active").siblings().removeClass("active"); 402} 403 404function mobileMenuSlide(obj){ 405 406 if($(obj).next().is(":visible")){ 407 $(obj).parent().removeClass("active"); 408 $(obj).next().slideUp(); 409 }else{ 410 $(obj).parent().addClass("active"); 411 $(obj).next().slideDown(); 412 } 413} 414 415/** 416 * ì¬ì´ì¦ë¡ 모ë°ì¼ ì¹ ì²´í¬ 417 * @param obj 418 */ 419function mobileMenutoggle(isCampus,kmenu,link){ 420 /*$(obj).parent().parent().toggle();*/ 421 var screenWidth = document.documentElement.clientWidth || document.body.clientWidth; 422 if($('.mobile_menu').is(":visible")){ 423 $('.mobile_menu').hide(); 424 $('.menuSearch').val(""); 425 }else{ 426 if (screenWidth <= 720) { 427 //모ë°ì¼ ììë ë©ë´ë ¸ì¶ 428 $('.mobile_menu').toggle(); 429 }else{ 430 //ì¹ììë íì´ì§ ì´ë 431 if(isCampus&&$('#kopo_wrap').hasClass('active')){ 432 //ìº í¼ì¤ì¸ë° ë²ì¸íì´ì§ ì´ëí´ì ì ì²´ë©ë´ 433 var newWindow = window.open("about:blank"); 434 var res=link.split("/") 435 newWindow.location.href = "/content.do?menu="+kmenu; 436 }else{ 437 //ìº í¼ì¤ íì´ì§, ë²ì¸ íì´ì§ 438 location.href = link; 439 } 440 441 } 442 } 443} 444 445/** 446 * GNB Hide 447 */ 448function gnbMenuOut() { 449 $("a.menu_fst.on").removeClass("on"); 450 $(".sub_level.on").removeClass("on").slideUp(500); 451 $(".gnb_menu").not("#kopo_gnb").removeAttr("style"); 452} 453 454/** 455 * Toggle Language window 456 */ 457function toggleLanguageWindow(off) { 458 if (off != undefined) { 459 $("a.btn_en").removeClass("on"); 460 $("ul.util_select_lang").removeClass("on"); 461 return; 462 } 463 $("a.btn_en").toggleClass("on"); 464 $("ul.util_select_lang").toggleClass("on"); 465} 466 467/** 468 * 구ê¸ë²ì í ê¸ 469 */ 470function toggleLanguageGoogle(){ 471 $("#google_translate_element").toggle(); 472} 473/** 474 * Location menu Show 475 */ 476function locMenuOver(obj, event) { 477 if (event.stopPropagation) { 478 event.stopPropagation(); 479 } else { 480 // ie8 481 event.cancelBubble = true; 482 } 483 484 if ($(obj).next(".loc_down").hasClass("on")) { 485 locMenuOut(); 486 return; 487 } 488 locMenuOut(); 489 $(obj).next(".loc_down").addClass("on");//.show(); 490 $(obj).attr("title","ëì¼ ë 벨ì ë©ë´ ì í íì íì¥ë¨"); 491} 492 493/** 494 * Location menu Hide 495 */ 496function locMenuOut() { 497 $(".locPop").attr("title","ëì¼ ë 벨ì ë¤ë¥¸ ë©ë´ ì í íì ì¶ìë¨"); 498 $(".loc_down.on").removeClass("on");//.hide(); 499} 500 501/** 502 * íê³¼ë©ë´ ë°ë¡ê°ê¸° 503 * @param courseNo íê³¼ë²í¸ 504 */ 505function goCourse(courseNo) { 506 if (courseNo != undefined) { 507 $("a[data-course='"+courseNo+"']").trigger("click"); 508 } 509} 510 511/** 512 * ë§í¬ì ë³´ ìë ë©ë´ì¼ ë 첫ë²ì§¸ íìë©ë´ ì í 513 */ 514function goMenu(menuNo, isKopo) { 515 var child = $("#chd"+menuNo); 516 517 if (child.is("a")) { 518 if (child.is("[onclick]")) { 519 child.trigger("click"); 520 } else { 521 var url = child.attr("href"); 522 var target = child.attr("target"); 523 if (target != undefined && (target == "_blank" || _blank != "_new")) { 524 if (url != undefined && url != "#" && url != "") { 525 window.open(url,'_blank'); 526 } 527 } else if (url != undefined && url != "#" && url != "") { 528 location.href = url; 529 } 530 } 531 } else if (child.is("li")) { 532 var realMenu = child.nextAll(":not(li[class]):eq(0)"); 533 if (realMenu.is("li")) { 534 realMenu.find("a").trigger("click"); 535 } else { 536 goMenu(realMenu.attr("id").replace("chd", ""), isKopo); 537 } 538 } else if (child.is("input")) { 539 var type = child.val(); 540 var prefix = isKopo ? kopoBaseUrl : baseUrl; 541 542 switch(type) { 543 case 'MENUTY0000': 544 goMenu(child.data("child"), isKopo); 545 break; 546 case 'MENUTY0001': 547 case 'MENUTY0002': 548 case 'MENUTY0006': 549 case 'MENUTY0007': 550 case 'MENUTY0008': 551 location.href = prefix + "/content.do?menu=" + menuNo; 552 break; 553 case 'MENUTY0003': 554 case 'MENUTY0004': 555 case 'MENUTY0009': 556 case 'MENUTY0010': 557 location.href = prefix + "/board.do?menu=" + menuNo; 558 break; 559 } 560 } 561} 562 563function searchText(obj){ 564 565 if ($("#topsearch").val().trim()=="") { 566 $(obj).parent().prev().toggle(); 567 $("#topsearch").focus(); 568 }else{ 569 if($("#topsearch").val().trim() == ""){ 570 alert("ê²ìì´ë¥¼ ì ë ¥íì¸ì."); 571 return false; 572 }else{ 573 doSearch(); 574 } 575 } 576 577} 578 579/** 580 * ê²ì ìì¸ì¡°ê±´ í ê¸ 581 */ 582function showDetailCond() { 583 $("div#search_detail").toggleClass("show"); 584 585 if($('#search_detail').hasClass('show')){ 586 $('#search_detail input').first().focus(); 587 } else { 588 $('.sch_detail').focus(); 589 document.getElementById("rb1_c1").focus(); 590 } 591} 592 593function showAllCampus() { 594 $(".main_all_campus").toggleClass("show"); 595 //ë²ì¸ì¸ ê²½ì° WA focus ìì¸ì²ë¦¬ 596 if($('a.gnb_all_campus').length == 0 && $('a#chd10282').attr('href') == "javascript:showAllCampus()") { 597 $('a#chd10282').addClass('gnb_all_campus'); 598 } 599 if($('.main_all_campus').hasClass('show')){ 600 // ë ì´ì´ íì focus 601 var lpObj = $('.main_all_campus'); 602 var lpObjTabbable = lpObj.find("button, select, iframe, textarea, a"); 603 var lpObjTabbableFirst = lpObjTabbable && lpObjTabbable.first(); 604 var lpObjTabbableLast = lpObjTabbable && lpObjTabbable.last(); 605 var tabDisable; 606 607 lpObjTabbable.length > 0 ? lpObjTabbableFirst.focus().on("keydown", function(event) { 608 // ë ì´ì´ ì´ë¦¬ìë§ì ì´ì ë°ì ì ìë 첫ë²ì§¸ ììë¡ ì´ì ì´ë 609 if (event.shiftKey && (event.keyCode || event.which) === 9) { 610 // Shift + Tabí¤ : ì´ì ë°ì ì ìë 첫ë²ì§¸ ìììì ë§ì§ë§ ììë¡ ì´ì ì´ë 611 event.preventDefault(); 612 lpObjTabbableLast.focus(); 613 614 } 615 }) : lpObj.attr("tabindex", "0").focus().on("keydown", function(event){ 616 tabDisable = true; 617 if ((event.keyCode || event.which) === 9) event.preventDefault(); 618 // Tabí¤ / Shift + Tabí¤ : ì´ì ë°ì ì ìë ììê° ìì ê²½ì° ë ì´ì´ ë°ì¼ë¡ ì´ì ì´ë ìëê² 619 }); 620
621 lpObjTabbableLast.on("keydown", function(event) { 622 if (!event.shiftKey && (event.keyCode || event.which) === 9) { 623 // Tabí¤ : ì´ì ë°ì ì ìë ë§ì§ë§ ìììì 첫ë²ì§¸ ììì¼ë¡ ì´ì ì´ë 624 event.preventDefault(); 625 lpObjTabbableFirst.focus(); 626 } 627 }); 628 // Escí¤ : ë ì´ì´ ë«ê¸° 629 $(document).on("keydown", function(event) { 630 var keyType = event.keyCode || event.which; 631 if (keyType === 27) { 632 $('.main_all_campus').removeClass('show'); 633 $('a.gnb_all_campus').focus(); 634 } 635 }); 636 } else { 637 $('a.gnb_all_campus').focus(); 638 } 639 640 $(window).scrollTop(0); 641 642} 643function goCampus(obj) { 644 $(".main_all_campus").toggleClass("show"); 645 $(window).scrollTop(0); 646 var newWindow = window.open(obj.href,obj.target); 647} 648 649 650/** 651 * Formatted String 652 */ 653String.format = function() { 654 var theString = arguments[0]; 655 for (var i = 1; i < arguments.length; i++) { 656 theString = theString.replace("%s", arguments[i]); 657 } 658 return theString; 659}; 660 661/** 662 * To camel string 663 * @returns 664 */ 665String.prototype.toCamelCase = function() { 666 return this.toLowerCase().replace(/(\_[a-z])/g, function(arg){ 667 return arg.toUpperCase().replace('_',''); 668 }); 669} 670 671function openLinkWithTarget(url,target){ 672 if(target == "N"){ 673 window.open(url,"about:blank"); 674 return; 675 } 676 window.location.href = url; 677} 678 679 680function disclosurePop(){ 681 window.open(contextPath+"/api/disclosurePop.do",'disclosurePop','scrollbars=yes,width=510,height=680'); 682} 683 684var Urlexpression = /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi; 685var UrlRegex = new RegExp(Urlexpression); 686 687/** 688 * Get InternetExplorer Version 689 * @returns {Number} 690 */ 691function getInternetExplorerVersion() { 692 var word; 693 var version = "N/A"; 694 695 var agent = navigator.userAgent.toLowerCase(); 696 var name = navigator.appName; 697 698 // IE old version ( IE 10 or Lower ) 699 if (name == "Microsoft Internet Explorer") { 700 word = "msie "; 701 } else { 702 // IE 11 703 if (agent.search("compatible") > -1) { 704 word = "msie "; 705 } else if (agent.search("trident") > -1) { 706 word = "trident/.*rv:"; 707 } else if (agent.search("edge/") > -1) { 708 // IE 12 ( Microsoft Edge ) 709 word = "edge/"; 710 } 711 } 712 713 var reg = new RegExp(word + "([0-9]{1,})(\\.{0,}[0-9]{0,1})"); 714 if (reg.exec(agent) != null) { 715 version = parseFloat(RegExp.$1 + RegExp.$2); 716 } 717 718 return version; 719} 720 721/** 722 * Trim string function support for IE8 or more 723 */ 724if (typeof String.prototype.trim !== 'function') { 725 String.prototype.trim = function() { 726 return this.replace(/^\s+|\s+$/g, ''); 727 }; 728} 729 730function openAtch(idx) { 731 var i = document.getElementById("hhi"+idx).value; 732 var s = document.getElementById("hhs"+idx).value; 733 var rUrl = "/cmm/fms/Download.do?atchFileId="+i+"&fileSn="+s+"&dn=Y"; 734 rUrl = rUrl.replace(";",""); 735 location.href=rUrl; 736 /* 737 var ifrm = document.createElement("iframe"); ifrm.name="tempi"; 738 var frm = document.createElement("form"); 739 frm.name = "tempf"; frm.method = "post"; frm.target = "tempi"; 740 frm.action = contextPath + "/html/atch.jsp"; 741 frm.appendChild(makeP("atchFileId", i)); 742 frm.appendChild(makeP("fileSn", s)); 743 function makeP(k,v) { 744 var p = document.createElement("input"); 745 p.type="hidden"; p.name=k; p.value=v; 746 return p; 747 } 748 document.body.appendChild(ifrm); 749 document.body.appendChild(frm); 750 frm.submit(); 751 setTimeout(function(){ ifrm.remove(); frm.remove(); },200); 752 */ 753} 754 755function kopoGetCookie(cname) { 756 // var name = cname + "="; 757 // var ca = document.cookie.split(';'); 758 759 // for(var i=0; i<ca.length; i++) { 760 // var c = ca[i]; 761 // while (c.charAt(0)==' ') c = c.substring(1); 762 // if (c.indexOf(name) != -1) return c.substring(name.length,c.length); 763 // } 764 var x, y; 765 var val = document.cookie.split(';'); 766 767 for (var i = 0; i < val.length; i++) { 768 x = val[i].substr(0, val[i].indexOf('=')); 769 y = val[i].substr(val[i].indexOf('=') + 1); 770 x = x.replace(/^\s+|\s+$/g, ''); // ìê³¼ ë¤ì 공백 ì ê±°í기 771 if (x == cname) { 772 return unescape(y); // unescapeë¡ ëì½ë© í ê° ë¦¬í´ 773 } 774 } 775 return ""; 776} 777function kopoSetCookie(name, value, expirehours){ 778 var todayDate = new Date(); 779 todayDate.setHours(todayDate.getHours() + expirehours); //ìê° 780 document.cookie = name + "=" + escape(value)+";path=/;expires="+todayDate.toGMTString()+";"; 781} 782 783var breakpoint = 1024; 784var windowWidth = $(window).width(); 785 786function gnb() { 787 if (windowWidth > breakpoint) { 788 $('.gnb .depth-1 > li').on('mouseover focusin', function () { 789 $(this).addClass('active').siblings().removeClass('active'); 790 }); 791 $('header').on('mouseover focusin', function () { 792 $('.gnb .depth-1 > li').removeClass('active'); 793 }); 794 $('.float-btn-group').on('focusin', function () { 795 $('.gnb .depth-1 > li').removeClass('active'); 796 }); 797 $('.gnb .depth-2 .container').on('mouseleave', function (e) { 798 var target = this; 799 setTimeout(function (e) { 800 $(target).parents('li').removeClass('active'); 801 }, 200); 802 }); 803 $(document).on('scroll', function () { 804 if ($(document).scrollTop() > 0) { 805 $('.gnb .depth-1 > li').removeClass('active'); 806 } 807 }); 808 } else { 809 $('.gnb-toggle.for-mobile').on('click', function (e) { 810 e.preventDefault(); 811 $('.gnb-list').addClass('active'); 812 $('header').css('z-index', ''); 813 $('header').find('.active').removeClass('active'); 814 $('html').addClass('hold'); 815 }); 816 $('.btn-close-menu').on('click', function (e) { 817 e.preventDefault(); 818 $('.gnb-list').removeClass('active'); 819 $('html').removeClass('hold'); 820 }); 821 } 822 } // 모ë°ì¼ gnb 823 824 825 function gnbMobile() { 826 if (windowWidth <= breakpoint) { 827 $('.gnb-list .depth-1 > li > a').on('click', function (e) { 828 var nav_list_cnt = $(this).parent().find('.depth-2 .nav-list').length; 829 //console.log("nav_list_cnt:"+nav_list_cnt); 830 if(nav_list_cnt > 0) { 831 var href = $(this).attr("href"); 832 if(href.indexOf("javascript") < 0) { 833 e.preventDefault(); 834 $(this).siblings('.depth-2').slideToggle(); 835 } 836 } 837 }); 838 } 839 } 840 841 //ì¸ì´ì í selectbox 842 function selectLang() { 843 $('.select-language > a , .link-select-language > a').on('click', function (e) { 844 e.preventDefault(); 845 $(this).siblings(".lang-list").toggleClass("active"); 846 if($(this).siblings(".lang-list").hasClass('active') === true){ 847 $(this).attr('title','ì¸ì´ì í ë©ë´ ì 기') 848 }else{ 849 $(this).attr('title','ì¸ì´ì í ë©ë´ í¼ì¹ê¸°') 850 } 851 }); 852 $('.select-language .gnb-anchor').on('click', function (e) { 853 e.preventDefault(); 854 if($(".gnb-item--type-changeleng").hasClass('js--langchange') === true){ 855 $(this).siblings(".lang-list").addClass("active"); 856 $(this).attr('title','ì¸ì´ì í ë©ë´ ì 기') 857 }else { 858 $(this).siblings(".lang-list").removeClass("active"); 859 $(this).attr('title','ì¸ì´ì í ë©ë´ í¼ì¹ê¸°') 860 } 861 }); 862 $(document).mouseup(function(e){
863 var langbox = $(".select-language"); 864 if(langbox.has(e.target).length === 0){ 865 langbox.find('.lang-list').removeClass("active"); 866 $('.select-language > a , .link-select-language > a').attr('title','ì¸ì´ì í ë©ë´ í¼ì¹ê¸°') 867 } 868 }); 869 870 } 871 872 873// ë¤ì gnb 874function gnbDrawer() { 875 var breakpoint = 1024; 876 var windowWidth = $(window).width(); 877 if (windowWidth > breakpoint) { 878 $('.gnb .depth-1 > li > a').on('mouseover focus', function () { 879 $(this).parent("li").addClass('active').siblings().removeClass('active'); 880 $('.gnb').addClass('active'); 881 }); 882 $('.header,.logo,.btn-menu-hamburger').on('mouseover focus', function () { 883 $('.gnb .depth-1 > li').removeClass('active'); 884 $('.gnb').removeClass('active'); 885 }); 886 $('.gnb .depth-2').on('mouseleave', function (e) { 887 var target = this; 888 setTimeout(function (e) { 889 $(target).parents('li').removeClass('active'); 890 $('.gnb').removeClass('active'); 891 }, 200); 892 }); 893 $(document).on('scroll', function () { 894 if ($(document).scrollTop() > 0) { 895 $('.gnb .depth-1 > li').removeClass('active'); 896 $('.gnb').removeClass('active'); 897 } 898 }); 899 } else { 900 $('.gnb .btn-menu-hamburger.for-mobile').on('click', function (e) { 901 e.preventDefault(); 902 $('.gnb .gnb-wrap').addClass('open'); 903 $('html').addClass('hold'); 904 }); 905 $('.gnb-wrap .btn-close-menu').on('click', function (e) { 906 e.preventDefault(); 907 $('.gnb .gnb-wrap').removeClass('open'); 908 $('html').removeClass('hold'); 909 }); 910 $('.gnb .depth-1 > li > a').on('click', function (e) { 911 e.preventDefault(); 912 $(this).parent('li').addClass('active').siblings().removeClass('active'); 913 }); 914 } 915} 916 917 918// íì 919function popupOpen(pop) { 920 $(pop).removeClass('is-visible'); 921} 922 923function popupClose(pop) { 924$(pop).addClass('is-visible'); 925} 926
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.