1/* ******************************************************* 2 * filename : sub.js 3 * description : ìë¸ì»¨í ì¸ ìë§ ì¬ì©ëë JS 4 * date : 2020-11-25 5******************************************************** */ 6$(window).load(function () { 7 if(!isMobile()){ 8 if (!($.exists('.ie-browser'))) { 9 // ìµì¤ ìëë 10 $('html').niceScroll({ 11 nativeparentscrolling: true , 12 smoothscroll:true, 13 autohidemode:false, 14 cursorwidth: "10px", 15 cursorborder: "0", 16 cursorborderradius: "0", 17 cursorcolor:"#4b6437", 18 scrollspeed : 80 , 19 zindex: 9999 20 }); 21 } 22 } 23 24}) 25$(document).ready(function () { 26 /* ************************ 27 * Func : ìë¸ Visual Active í´ëì¤ ë¶ì´ê¸° 28 * addClassName () íì 29 ************************ */ 30 setTimeout(function () { 31 addClassName($("#visual"), "active"); 32 },200); 33 34 /* ************************ 35 * Func : 모ë¬íì íë¬ê·¸ì¸ ì¬ì© 36 * MagnificPopup.js íì 37 ************************ */ 38 if ($.exists(".popup-gallery")) { 39 magnificPopup($(".popup-gallery")); 40 } 41 42 /* ************************ 43 * Func : ì¼ì ê°ë¡ì¬ì´ì¦ ìëë¶í° scroll ì¬ì©í기 44 * mCustomScrollbar.js, customScrollX() íì 45 ************************ */ 46 /* ìë¸ Scrollbar object */ 47 $(".custom-scrollbar-wrapper").each(function () { 48 if ( $("html").attr("lang") == "ko" ) { 49 var dragTxt = "ì¢ì°ë¡ ëëê·¸ í´ì£¼ì¸ì."; 50 }else { 51 var dragTxt = "Drag left and right."; 52 } 53 $(this).append("<div class='custom-scrollbar-cover'><div class='scroll-cover-txt'><i class='xi-touch'></i><p>"+dragTxt+"</p></div></div>"); 54 var $scrollObject = $(this).find(".scroll-object-box"); 55 if ($.exists($scrollObject)) { 56 customScrollX($scrollObject); 57 } 58 $(this).on("touchmove click",function () { 59 $(this).find(".custom-scrollbar-cover").fadeOut(200); 60 }); 61 }); 62 63 /* ************************ 64 * Func : ìë¸ ìë¨ ë©ë´ FIXED 65 * getWindowWidth(), checkOffset(), toFit() íì 66 ************************ */ 67 if ($.exists(".fixed-sub-menu")) { 68 var $fixedSubMenu = $(".fixed-sub-menu"); 69 var topMenuStart = checkOffset($fixedSubMenu); 70 $(window).resize(function () { 71 if ( getWindowWidth() > tabletWidth ) { 72 topMenuStart = checkOffset($fixedSubMenu); 73 }else { 74 $fixedSubMenu.removeClass("top-fixed"); 75 } 76 }); 77 window.addEventListener('scroll', toFit(function () { 78 if ( getWindowWidth() > tabletWidth ) { 79 objectFixed($fixedSubMenu, topMenuStart, "top-fixed"); 80 }else { 81 $fixedSubMenu.removeClass("top-fixed"); 82 } 83 },{ 84 }),{ passive: true }) 85 } 86 87 /* ************************ 88 * Func : 컨í ì¸ ë©ë´ FIXED ë° í´ë¦ì í´ë¹ìì ì´ë 89 * getScrollTop(), getWindowWidth(), checkOffset(), toFit(), checkFixedHeight(), moveScrollTop() íì 90 ************************ */ 91 if ($.exists(".cm-fixed-tab-container-JS")) { 92 var $fixedMoveTab = $(".cm-fixed-tab-list-JS"); // fixedëë ë©ë´ í´ëì¤ 93 var $moveTabItem = $fixedMoveTab.find("li"); 94 var menuCount= $moveTabItem.size(); 95 var $fixedCon = $fixedMoveTab.find(".sub-tab-con"); 96 var nav = []; 97 98 $(window).on('load', function () { 99 checkStartOffset(); 100 nav = checkTopOffset(); 101 }); 102 $(window).on('resize', function () { 103 checkStartOffset(); 104 nav = checkTopOffset(); 105 }); 106 107 // íì´ ë¶ê¸° ììíë ì§ì ì²´í¬ 108 function checkStartOffset () { 109 var fixedStartPoint = $(".cm-fixed-tab-container-JS").offset().top - checkFixedHeight(); 110 return fixedStartPoint; 111 } 112 113 // íì´ ë¶ê¸° ììíë ì§ì ì²´í¬ - tp365 114 function checkStartOffset_tp () { 115 var fixedStartPoint = $(".cm-fixed-tab-container-JS").offset().top; 116 return fixedStartPoint; 117 } 118 119 function checkStartOffset_about () { 120 var fixedStartPoint = $(".cm-fixed-tab-list-JS").offset().top; 121 return fixedStartPoint; 122 } 123 124 // í´ë¹ëë ê°ê°ì ìì ìë¨ê° 측ì 125 function checkTopOffset () { 126 var arr = []; 127 for(var i=0;i < menuCount;i++){ 128 if ($.exists(".partner-page")) { 129 arr[i]=$($moveTabItem.eq(i).children("a").attr("href")).offset().top - $fixedMoveTab.height(); 130 }else { 131 arr[i]=$($moveTabItem.eq(i).children("a").attr("href")).offset().top - $(".cm-fixed-tab-container-JS").find(".sub-tab-con").eq(i).css('padding-top').replace(/[^-\d\.]/g, ''); 132 } 133 } 134 return arr; 135 } 136 137 // ì¤í¬ë¡¤ 0ì¼ë ìë¨fixedëë ëì´ê° ì²´í¬ 138 function checkFixedObjectHeight () { 139 var fixedObjectTotalHeight = 0; 140 for (var i=0; i<$(".top-fixed-object").length; i++) { 141 var fixedObjectTotalHeight = fixedObjectTotalHeight + $(".top-fixed-object").eq(i).outerHeight(); 142 } 143 return fixedObjectTotalHeight; 144 } 145 146 // ì¤í¬ë¡¤ event 147 window.addEventListener('scroll', toFit(function () { 148 // ë©ë´fixed 149 // objectFixed($fixedMoveTab, checkStartOffset(), "top-fixed"); 150 var $scroll = $(window).scroll(); 151 var w_width = $(window).outerWidth(true); 152 153 if ($.exists(".fixed-new-page")) { 154 if ( getScrollTop() > checkStartOffset_about()) { 155 $fixedMoveTab.addClass("top-fixed"); 156 }else if (getScrollTop() < (checkStartOffset_about() + $fixedMoveTab.height())){ 157 $fixedMoveTab.removeClass("top-fixed"); 158 } 159 }else{ 160 if ( getScrollTop() > checkStartOffset_tp()) { 161 $fixedMoveTab.addClass("top-fixed"); 162 }else if (getScrollTop() < (checkStartOffset_tp() + $fixedMoveTab.height())){ 163 $fixedMoveTab.removeClass("top-fixed"); 164 } 165 } 166 167 $moveTabItem.each(function (idx) {
168 var eachOffset = nav[idx] - checkFixedHeight(); 169 if( getScrollTop() >= eachOffset ){ 170 $moveTabItem.removeClass('selected'); 171 $moveTabItem.eq(idx).addClass('selected'); 172 // 모ë°ì¼ ëë¡ë©ë´ì¼ë 173 if ($.exists($moveTabItem.parents(".cm-drop-menu-box-JS"))) { 174 $fixedMoveTab.find(".cm-drop-open-btn-JS > span").text($moveTabItem.eq(idx).find("em").text()); 175 } 176 }; 177 }); 178 }, { 179 }),{ passive: true }) 180 181 // í´ë¦ event 182 $moveTabItem.find("a").click(function () { 183 var goDivOffset = $($(this).attr("href")).offset().top - checkFixedHeight() +1; // ì´ëí´ì¼í ì§ì 184 if ( getScrollTop() < checkStartOffset()) { 185 if ( getScrollTop() == 0 ) { 186 var goDiv = goDivOffset - $fixedMoveTab.height(); 187 }else { 188 var goDiv = goDivOffset - $fixedMoveTab.height(); 189 } 190 }else { 191 var goDiv = goDivOffset; 192 } 193 setTimeout(function () { 194 moveScrollTop(goDiv); 195 }); 196 197 // 모ë°ì¼ ëë¡ë©ë´ì¼ë 198 if ($.exists($(this).parents(".cm-drop-menu-box-JS")) ) { 199 if ( getWindowWidth () < $fixedMoveTab.data("drop-width")+1 ) { 200 $fixedMoveTab.find("ul").slideUp(); 201 } 202 } 203 204 return false; 205 }); 206 } 207 208 /* ************************ 209 * Func : ìëí°ê´ë ¨ 210 ************************ */ 211 if ($.exists(".editor")) { 212 /* í ì´ë¸ ì¤í¬ë¡¤ë£ê¸° */ 213 $(".editor table").each(function () { 214 $(this).wrap("<div class='editor-table-box'></div>"); 215 }); 216 217 /* iframe íê·¸ ê°ì¸ê¸° */ 218 $(".editor iframe").each(function () { 219 var iframeSrc = $(this).attr("src"); 220 var findStr = "https://www.youtube.com/embed"; 221 222 if (iframeSrc.indexOf(findStr) != -1) { 223 $(this).wrap("<div class='editor-iframe-box'></div>"); 224 } 225 }); 226 } 227 228 /* ************************ 229 * Func : cm-top-visual 230 ************************ */ 231 if ($.exists(".cm-top-visual")) { 232 $(".cm-top-visual").each(function () { 233 var $cmTopBgSlide = $(this).find('.cm-top-bg-slide'); 234 var $cmTopTxtSlide = $(this).find('.cm-top-visual-tit-slide'); 235 var $cmTopControl = $(this).find('.control-box'); 236 237 $cmTopBgSlide.on('init', function(event, slick, currentSlide,nextSlide) { 238 $cmTopControl.find(".total-num").text('0'+slick.slideCount); 239 240 }); 241 $cmTopBgSlide.on('beforeChange', function(event, slick, currentSlide, nextSlide) { 242 $cmTopControl.find(".cur-num").text('0'+(nextSlide+1)); 243 }); 244 245 $cmTopBgSlide.slick({ 246 slidesToShow: 1, 247 slidesToScroll: 1, 248 arrows: true, 249 fade: true, 250 dots:false, 251 autoplay: true, 252 speed:2000, 253 infinite:true, 254 autoplaySpeed: 5000, 255 easing: 'easeInOutQuint', 256 appendArrows: $cmTopControl.find('.arrow-box'), 257 pauseOnHover:false, 258 prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Prev" tabindex="0" role="button"><i class="xi-angle-left-min"></i></button>', 259 nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button"><i class="xi-angle-right-min"></i></button>', 260 asNavFor: $cmTopTxtSlide 261 }); 262 $cmTopTxtSlide.slick({ 263 slidesToShow: 1, 264 slidesToScroll: 1, 265 arrows: false, 266 fade: true, 267 dots:false, 268 autoplay: true, 269 speed:2000, 270 infinite:true, 271 autoplaySpeed: 5000, 272 easing: 'easeInOutQuint', 273 pauseOnHover:false, 274 asNavFor:$cmTopBgSlide 275 }); 276 277 }) 278 } 279 280 /* ************************ 281 * Func : ì°í 282 ************************ */ 283 if ($.exists(".company-history-wrap")) { 284 var $fixedHistroyTab = $(".company-history"); 285 var $histroyTabItem = $fixedHistroyTab.find(".company-history-wrapper"); 286 var menuHistroyCount= $histroyTabItem.size(); 287 var histroyNav = []; 288 289 /*$(".cm-top-tab li a").click(function () { 290 nav = checkTopOffset(); 291 });*/ 292 $(window).on('load', function () { 293 histroyNav = checkHistoryTopOffset(); 294 }); 295 $(window).on('resize', function () { 296 histroyNav = checkHistoryTopOffset(); 297 }); 298 299 // í´ë¹ëë ê°ê°ì ìì ìë¨ê° 측ì 300 function checkHistoryTopOffset () { 301 var arr = []; 302 for(var i=0;i < menuCount;i++){ 303 arr[i]=$($histroyTabItem.eq(i)).offset().top; 304 } 305 return arr; 306 } 307 308 // ì¤í¬ë¡¤ event 309 window.addEventListener('scroll', toFit(function () { 310 $histroyTabItem.each(function (idx) { 311 var eachOffset = histroyNav[idx] / 1.2; 312 var scrollTopVal = getScrollTop(); 313 if( scrollTopVal >= eachOffset ){ 314 $histroyTabItem.removeClass('on'); 315 $histroyTabItem.eq(idx).addClass('on'); 316 }; 317 }); 318 }, { 319 }),{ passive: true }) 320 } 321 322 /* ************************ 323 * Func : ì í ë·°íì´ì§ 324 ìë¨ ì´ë¯¸ì§ ì¬ë¼ì´ë 325 ************************ */ 326 if ($.exists(".product-view-top")) { 327 var $prdTopThumbSlide = $('.prd-top-thumb-slide'); 328 var $prdTopImgSlide = $('.prd-top-img-slide'); 329 330 $prdTopThumbSlide.slick({ 331 slidesToShow: 5, 332 slidesToScroll: 1,
333 arrows: false, 334 fade: false, 335 dots:false, 336 autoplay: false, 337 speed:800, 338 infinite:true, 339 easing: 'easeInOutQuint', 340 focusOnSelect: true, 341 vertical: true, 342 pauseOnHover:false, 343 asNavFor: '.prd-top-img-slide', 344 responsive: [ 345 { 346 breakpoint: 1561, 347 settings: { 348 vertical: false, 349 } 350 }, 351 ] 352 }); 353 $prdTopImgSlide.slick({ 354 slidesToShow: 1, 355 slidesToScroll: 1, 356 arrows: true, 357 fade: true, 358 dots:false, 359 autoplay: false, 360 speed:800, 361 infinite:true, 362 focusOnSelect: true, 363 easing: 'easeInOutQuint', 364 pauseOnHover:false, 365 prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Prev" tabindex="0" role="button"><i class="xi-angle-left-min"></i></button>', 366 nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button"><i class="xi-angle-right-min"></i></button>', 367 asNavFor:'.prd-top-thumb-slide' 368 }); 369 } 370 /* ************************ 371 * Func : ì í ë·°íì´ì§ :: ì íê°ì 372 ************************ */ 373 if ($.exists(".prd-view-summary")) { 374 /* Section02 active ë¡¤ë§ */ 375 rollingActive(".prd-summary-con02 .con-list"); 376 /* Section03 ì´ë¯¸ì§ ì¬ë¼ì´ë */ 377 $(".prd-summary-con03 .img-slide").slick({ 378 slidesToShow: 1, 379 slidesToScroll: 1, 380 arrows: false, 381 fade: true, 382 dots:true, 383 autoplay: true, 384 speed:800, 385 infinite:true, 386 autoplaySpeed: 3000, 387 easing: 'easeInOutQuint', 388 pauseOnHover:false, 389 }); 390 391 /* íë¨ ë¬¸ìë²í¼ */ 392 var $btnBox = $(".prd-view-container"); 393 var $fixedBtnBox = $(".prd-view-inquiry"); 394 395 $(window).on('load', function () { 396 checkTop(); 397 }); 398 $(window).on('resize', function () { 399 checkTop(); 400 }); 401 $(".prd-view-container .cm-tab-list-JS > ul > li a").click(function () { 402 checkTop(); 403 }); 404 function checkTop () { 405 eventTopMenuStart = checkOffset($btnBox); 406 footerTop = $(document).height() - $(window).height() - $("#footer").height(); 407 } 408 window.addEventListener('scroll', toFit(function () { 409 if (parseInt ( $(window).scrollTop()) <= footerTop) { 410 objectFixed($fixedBtnBox, eventTopMenuStart, "bottom-fixed"); 411 $fixedBtnBox.removeClass("bottom"); 412 }else { 413 $fixedBtnBox.removeClass("bottom-fixed"); 414 $fixedBtnBox.addClass("bottom"); 415 } 416 }, { 417 }),{ passive: true }) 418 } 419 420 421 $(".prd-accessory-list .img-slide").slick({ 422 slidesToShow: 1, 423 slidesToScroll: 1, 424 arrows: false, 425 fade: false, 426 dots:true, 427 autoplay: true, 428 speed:800, 429 infinite:true, 430 autoplaySpeed: 3000, 431 easing: 'easeInOutQuint', 432 pauseOnHover:false, 433 }); 434 $(".product-view-page .cm-tab-list-JS ul li a").click(function () { 435 $('.prd-accessory-list .img-slide').slick("setPosition"); 436 $(".prd-summary-con03 .img-slide").slick("setPosition"); 437 }) 438 439 /* ************************ 440 * Func : ë¶ì í í´ë¦ ì¬ë¼ì´ë 441 ************************ */ 442 $(".department-item").each(function () { 443 var $departmentItem = $(this).children(".tit-box"); 444 $departmentItem.click(function () { 445 var $departmentCon = $(this).parents(".department-item").children('.department-inner-con'); 446 if ($departmentCon.css("display") == "block") { 447 $departmentCon.slideUp(); 448 $(".department-item").removeClass("open"); 449 }else { 450 $(".department-item .department-inner-con:visible").slideUp(); 451 $(".department-item").removeClass("open"); 452 $(this).parents(".department-item").addClass("open"); 453 $departmentCon.slideDown(); 454 } 455 setTimeout(function () { 456 $("html").getNiceScroll().resize(); 457 },401); 458 }); 459 }); 460 if ($.exists(".recruit-con")) { 461 var recruitSwiper = new Swiper( '.swiper-container.two', { 462 pagination: '.swiper-pagination', 463 paginationClickable: true, 464 effect: 'coverflow', 465 loop: true, 466 touchRatio: 0, 467 centeredSlides: true, 468 slidesPerView: 'auto', 469 autoplay: false, 470 /*navigation: { 471 nextEl: ".swiper-button-next", 472 prevEl: ".swiper-button-prev", 473 },*/ 474 coverflow: { 475 rotate: 0, 476 stretch: 10, 477 depth: 500, 478 modifier: 1, 479 slideShadows : false, 480 }, 481 } ); 482 483 $(".swiper-button-next").click(function () { 484 recruitSwiper.slideNext(); 485 }); 486 $(".swiper-button-prev").click(function () { 487 recruitSwiper.slidePrev(); 488 }); 489 } 490 491 /* ************************ 492 * Func : ìëí°ê´ë ¨ 493 ************************ */ 494 if ($.exists(".goods-fixed-tab-container-JS")) { 495 var $goodsMoveTab = $(".goods-fixed-tab-list-JS"); // fixedëë ë©ë´ í´ëì¤ 496 var $goodsTabItem = $goodsMoveTab.find("li"); 497 var nav = []; 498 499 $(window).on('load', function () { 500 checkStartOffset(); 501 nav = checkTopOffset(); 502 }); 503 $(window).on('resize', function () { 504 checkStartOffset(); 505 nav = checkTopOffset(); 506 }); 507 508 // íì´ ë¶ê¸° ììíë ì§ì ì²´í¬ - tp365 509 function checkStartOffset_goods () { 510 var fixedStartPoint = $(".goods-fixed-tab-container-JS").offset().top; 511 return fixedStartPoint; 512 } 513 514 window.addEventListener('scroll', toFit(function () { 515 // ë©ë´fixed 516 // objectFixed($fixedMoveTab, checkStartOffset(), "top-fixed"); 517 var $scroll = $(window).scroll(); 518 var w_width = $(window).outerWidth(true); 519 520 if ( getScrollTop() > checkStartOffset_goods()) { 521 $goodsMoveTab.addClass("top-fixed"); 522 }else if (getScrollTop() < (checkStartOffset_goods() + $goodsMoveTab.height())){ 523 $goodsMoveTab.removeClass("top-fixed"); 524 } 525 526 }, { 527 }),{ passive: true }) 528 } 529 530}); 531 532 $(window).load(function () { 533 var viewValue = getParameter("con"); 534 var itemIndex = getParameter("index"); 535 var $swTab = $(".sofware-container .cm-tab-list-JS li"); 536 if (viewValue == 1) { 537 $swTab.removeClass("selected"); 538 $swTab.eq(0).addClass("selected"); 539 }else if (viewValue == 2) { 540 $swTab.removeClass("selected"); 541 $swTab.eq(1).addClass("selected"); 542 }else if (viewValue == 3) { 543 $swTab.removeClass("selected"); 544 $swTab.eq(2).addClass("selected"); 545 } 546 547 if (itemIndex) { 548 $(".sw-function-list li").eq(itemIndex-1).addClass("on"); 549 } 550 551 552 553 })
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.