1function page () { 2 3 var activeNavDep1 = $('.header .gnb .nav > li.on > a').text(); 4 // var activeNavDep2 = $('.header .gnb .nav > li.on div li.on a').text(); 5 var activeNavDep2; 6 if($('.breadcrumbs .lst .select').length){ 7 activeNavDep2 = $('.breadcrumbs .lst .select li.active').last().text(); 8 }else{ 9 activeNavDep2 = $('.breadcrumbs .lst > li').last().text(); 10 } 11 var pageTitle = $('.view_title h1').text(); 12 if(pageTitle=='' || activeNavDep2==''){ 13 printNav = activeNavDep2; 14 }else if((pageTitle!='' && activeNavDep2!='')){ 15 printNav = '<span>' + activeNavDep2 + '</span>'; 16 } 17 18 $('body:not(.main) .header > .container').append('<h2 class="page_title">' + printNav + '<strong>' + pageTitle + '</strong>' + '</h2>'); 19 20 //ë·°íì´ì§ ìë¨ ì´ì íì´ì§ 21 if($('#main').hasClass('view')){ 22 $('.header').addClass('view'); 23 $('body:not(.main) .header > .container').prepend('<button type="button" class="view_prev">ì´ì íì´ì§</button>') 24 } 25 26 $(document).on('click', '.view_prev',function(){ 27 window.history.go(-1); 28 }); 29}; 30 31function scrollIndicator () { 32 33 $('body:not(.main) #header').append('<i class="scroll_indicator"><span></span></i>'); 34 35 $(window).on("scroll", function() { 36 if ($('body:not(.main) .scroll_indicator').length && $('.area_contents').height() > 780 ) { 37 var articleHeight = $('.footer').offset().top - $('main.sub').offset().top - window.innerHeight; 38 var articleStart = $(window).scrollTop() - $('main.sub').offset().top; 39 var percentage = (articleStart / articleHeight) * 100; 40 percentage = percentage > 100 ? 100 : percentage; 41 $('.scroll_indicator span').css('width', Math.floor(percentage) + '%'); 42 $('.scroll_indicator').removeClass('hide'); 43 } 44 }); 45 46}; 47 48 49function breadcrumbs () { 50 $('.breadcrumbs .select button').attr('title','ë©ë´ ì´ê¸°') 51 $('.breadcrumbs .select button').on('click', function() { 52 if($(this).parent().hasClass('is-open')){ 53 $(this).parent().removeClass('is-open'); 54 $(this).next('.blst').stop().slideUp(150); 55 $(this).attr('title','ë©ë´ ì´ê¸°') 56 }else{ 57 $(this).parent().addClass('is-open'); 58 $(this).next('.blst').stop().slideDown(300); 59 $(this).attr('title','ë©ë´ ë«ê¸°') 60 } 61 }); 62 63 //ë¸ëëí¬ë¼ íì í ê¸ ìì ì¸ ë«ê¸° 64 if($('.breadcrumbs .select').length > 0){ 65 window.addEventListener('click', (e) => { 66 if(!e.target.closest('.lst')){ 67 $('.breadcrumbs .select').removeClass('is-open').children('.blst').stop().slideUp(150); 68 $('.breadcrumbs .select button').attr('title','ë©ë´ ì´ê¸°'); 69 } 70 }); 71 /*$(document).on('click focusin', function(e) { 72 if(!$('.breadcrumbs .select').is(e.target) && $('.breadcrumbs .select').has(e.target).length === 0){ 73 $('.breadcrumbs .select').removeClass('is-open').children('.blst').stop().slideUp(150); 74 $('.breadcrumbs .select button').attr('title','ë©ë´ ì´ê¸°') 75 } 76 });*/ 77 } 78 79 /* 80 $('.blst').css({ width: $('.blst > ul').innerWidth() + 'px'}); 81 $('.breadcrumbs .select').each(function(i){ 82 $(this).find('.blst').css({ top: $('.blst > ul').innerWidth() + 'px'}); 83 }); 84 */ 85 86}; 87 88function aside_sns () { 89 90 $('.share .open').on('click', function() { 91 if($(this).find('span i').text() == 'ì´ê¸°' ){ 92 $(this).next('.share_lst').stop().fadeIn(300); 93 $(this).find('span i').text('ë«ê¸°'); 94 $(this).parent().addClass('is-open'); 95 }else{ 96 $(this).find('span i').text('ì´ê¸°'); 97 $(this).next('.share_lst').stop().fadeOut(300); 98 $(this).parent().removeClass('is-open'); 99 } 100 }); 101 102 $('.share_lst .close').on('click focusout', function() { 103 $(this).parent('.share_lst').stop().fadeOut(300); 104 $(this).parent().parent('li').removeClass('is-open'); 105 $(this).parent().prev().children().find('i').text('ì´ê¸°'); 106 $(this).parent().prev().focus(); 107 }); 108 109 if($('.share').length > 0){ 110 $(document).on('click', function(e) { 111 if(!$('.share').is(e.target) && $('.share').has(e.target).length === 0){ 112 $('.share').removeClass('is-open'); 113 $('.share .open span i').text('ì´ê¸°'); 114 $('.share_lst').stop().fadeOut(300); 115 } 116 }); 117 } 118 119 $('.as_sns .comment').on('click', function() { 120 $('.livere_comment').addClass('close').next('.livere_box').show(); 121 $('.livere_comment').find('span i').text('ë«ê¸°'); 122 $('html').animate({scrollTop:$('.livere_box').offset().top - 200},100); 123 $('.livere_comment button').focus(); 124 }); 125 126}; 127 128function aside_article () { 129 130 $('.policy_home .btn').on('click',function(){ 131 if($(this).find('span').text() == 'ì 체보기' ){ 132 $(this).find('span').text('ë«ê¸°'); 133 $(this).addClass('close').parent().addClass('active'); 134 }else{ 135 $(this).find('span').text('ì 체보기'); 136 $(this).removeClass('close').parent().removeClass('active'); 137 } 138 }); 139 $('.policy_home .list').append('<div class="control"><div class="dots"></div><button type="button" class="playing pause">ì ì§</button></div>'); 140 $('.policy_home .slider').on('init', function(event, slick) { 141 if($(this).hasClass('slick-dotted')){ 142 $('.policy_home .control').show(); 143 }else{ 144 $('.policy_home .control').hide(); 145 } 146 }).slick({ 147 autoplay: true, 148 autoplaySpeed: 5000,
149 arrows: false, 150 dots: true, 151 variableWidth:false, 152 adaptiveHeight: true, 153 cssEase: 'ease-in-out', 154 swipe:true, 155 appendDots: $('.policy_home .control .dots'), 156 }); 157 $('.policy_home .playing').click(function(){ 158 if($(this).hasClass('pause')){ 159 $(this).parent().parent().find('.slider').slick('slickPause'); 160 }else if ($(this).hasClass("play")) { 161 $(this).parent().parent().children('.slider').slick("slickPlay"); 162 } 163 }); 164 165 166 $('.as_tab li:first-child button').attr('title','ì íë¨'); 167 $('.as_tab li > button').on('click focus',function(){ 168 $(this).attr('title','ì íë¨').parent().addClass('active').siblings().removeClass('active').children('button').attr('title',''); 169 var idx = $(this).parent().index(); 170 $(this).next('.cont').eq(idx).fadeIn().siblings('.cont').fadeOut(); 171 $('.as_tab li.active .lst li .text span').trigger('update.dot'); 172 173 const t = $(this); 174 const hash = (t.text() === 'ìµì ë´ì¤') ? 'newest' : 'mostView'; 175 window.location.hash = hash; 176 }); 177 178 179 /* 180 $('.focus_menu .keywords').on('init', function(event, slick) { 181 $('.focus_menu .keywords .slick-arrow').insertBefore('.focus_menu .keywords .slick-list'); 182 $(this).append('<div class="slick-counter"><span class="current"></span> / <span class="total"></span></div>'); 183 $('.focus_menu .keywords .current').text(slick.currentSlide + 1); 184 $('.focus_menu .keywords .total').text(slick.slideCount); 185 }).slick({ 186 slidesToShow: 1, 187 slidesToScroll: 1, 188 infinite:false, 189 autoplay: false, 190 arrows: true, 191 adaptiveHeight: true, 192 }).on('beforeChange', function(event, slick, currentSlide, nextSlide) { 193 $('.focus_menu .keywords .current').text(nextSlide + 1); 194 }); 195 */ 196 197}; 198 199function conSlider () { 200 201 $('.slider_nav').flexslider({ 202 animation: 'slide', 203 controlNav: false, 204 animationLoop: false, 205 slideshow: false, 206 itemWidth: 120, 207 maxItems: 5, 208 minItems: 5, 209 itemMargin:0, 210 touch: false, 211 asNavFor: '.slider_for', 212 isFirefox: true, 213 }); 214 $('.slider_for').flexslider({ 215 animation: 'slide', 216 controlNav: false, 217 animationLoop: false, 218 slideshow: false, 219 slideshowSpeed: 500, 220 animationSpeed: 150, 221 sync: '.slider_nav', 222 isFirefox: true, 223 after: function(slider) { 224 $('.slider_wrap .current-slide').text(slider.currentSlide + 1); 225 if(slider.count === slider.currentSlide + 1){ 226 $('.slider_wrap .first').show(); 227 }else{ 228 $('.slider_wrap .first').hide(); 229 }; 230 $('#photoText ul li').each(function(i){ 231 if (i + 1 == slider.currentSlide + 1 ){ 232 $(this).show(); 233 } else { 234 $(this).hide(); 235 } 236 }); 237 $('.photoview_slider .down ul li').each(function(i){ 238 if (i + 1 == slider.currentSlide + 1 ){ 239 $(this).addClass('active'); 240 } else { 241 $(this).removeClass('active'); 242 } 243 }); 244 }, 245 start: function(slider) { 246 $('.slider_nav').resize(); 247 $('.slider_wrap .slider_for').append('<div class="current"><span class="current-slide"></span>/<span class="total-slides"></span></div>'); 248 $('.slider_wrap .current-slide').text(slider.currentSlide + 1); 249 $('.slider_wrap .total-slides').text(slider.count); 250 $('#photoText ul li').each(function(i){ 251 if (i + 1 == slider.currentSlide + 1 ){ 252 $(this).show(); 253 } else { 254 $(this).hide(); 255 } 256 }); 257 $('.photoview_slider .down ul li').each(function(i){ 258 if (i + 1 == slider.currentSlide + 1 ){ 259 $(this).addClass('active'); 260 } else { 261 $(this).removeClass('active'); 262 } 263 }); 264 265 } 266 267 }); 268 269 $('.slider_wrap .first button').on('click', function(){ 270 $('.slider_for').flexslider(0); 271 $('.slider_nav').flexslider(0); 272 }); 273 274 $('.slider_nav button').on('focusin', function(){ 275 var bt = this; 276 var cnt = 0; 277 $('.slider_nav button').each(function(i){ 278 if(this == bt){ 279 cnt = i 280 } 281 }) 282 $('.slider_for').flexslider(cnt) 283 }); 284 285 $('.slider_wrap .clickFalse').bind('contextmenu', function(e){ 286 alert('ì°í´ë¦ê¸ì§'); 287 return false; 288 }); 289 290 $('.slider_nav .slides').each(function(){ 291 if ($(this).find('li').length > 5){ 292 $(this).removeClass('center'); 293 } else { 294 $(this).addClass('center'); 295 } 296 }); 297 298 $('.column_list .slider').slick({ 299 slidesToShow: 5, 300 slidesToScroll: 1, 301 autoplay: false, 302 autoplaySpeed: 5000, 303 arrows: true, 304 accessibility: true, 305 }); 306 307}; 308 309function prevNext () { 310 311 if ($('main.sub').find('.area_audio_player').length > 0){ 312 $('footer').css('padding-bottom','130px'); 313 $('.go_top').css('bottom','130px'); 314 } else { 315 $('footer').removeAttr('style'); 316 $('.go_top').css('bottom','50px'); 317 } 318 319 $(window).on('scroll', function() { 320 if($(window).scrollTop()>430){ 321 $('.area_page').addClass('active'); 322 }else{ 323 $('.area_page').removeClass('active'); 324 } 325 }); 326 327}; 328 329function schPost () { 330 331 $('.sch_post:not(.expert) .tab_nav li > .btn').on('click',function(){ 332 $(this).attr('title','ì íë¨').parent().addClass('active').siblings().removeClass('active').children('a').attr('title',''); 333 var idx = $(this).parent().index(); 334 $(this).parent().parent().next('.tab_cont_wrap').children('.cont').eq(idx).show().siblings('.cont').hide(); 335 return false;
336 }); 337 338 /* 339 $('.sch_post:not(.expert) .tab_cont_wrap .cont').each(function(){ 340 if ($(this).children('div').length > 0){ 341 var idx = $(this).index(); 342 $(this).parent().parent().find('li').eq(idx).children('a').addClass('ico'); 343 } 344 }); 345 */ 346 347 $('.sch_post:not(.expert) .tab_cont_wrap button').on('click', function(){ 348 if($(this).hasClass('close')){ 349 $(this).removeClass('close').next().stop().hide(); 350 $(this).find('span i').text('ì´ê¸°'); 351 }else{ 352 $(this).addClass('close').next().stop().show(); 353 $(this).find('span i').text('ë«ê¸°'); 354 } 355 }); 356 357 $('.sort_wrap > li > button').on('click', function(){ 358 if($(this).hasClass('close')){ 359 $(this).removeClass('close'); 360 $(this).attr('title','ì´ê¸°'); 361 }else{ 362 $(this).addClass('close'); 363 $(this).attr('title','ë«ê¸°'); 364 } 365 }); 366 367 $('.sch_post .detail_sch').on('click',function(){ 368 if($(this).hasClass('active')){ 369 $('.sch_post .sch_tab').removeClass('active'); 370 $(this).add($(this).parent('.sch')).removeClass('active'); 371 $(this).find('span i').text('ì´ê¸°'); 372 $('#datepicker_box').hide(); 373 }else{ 374 $('.sch_post .sch_tab').addClass('active'); 375 $(this).add($(this).parent('.sch')).addClass('active'); 376 $(this).find('span i').text('ì 기'); 377 } 378 }); 379 380 $('.sch_brief .inquire #period').on('change',function(){ 381 if(this.value=='direct'){ 382 $('.sch_brief .period').stop().show(); 383 }else{ 384 $('.sch_brief .period').stop().hide(); 385 } 386 }); 387 388 $('.sch_post.expert .sort_tab li:first-child > a').attr('title','ì íë¨'); 389 $('.sch_post.expert .sort_tab li').click(function(){ 390 $(this).children('a').attr('title','ì íë¨').parent().addClass('active').siblings().removeClass('active').children('a').attr('title',''); 391 return false; 392 }); 393 394 $('.sites button').click(function() { 395 if($(this).find('i').text() == 'ì´ê¸°' ){ 396 $(this).find('i').text('ë«ê¸°'); 397 $(this).next('ul').addClass('active'); 398 }else{ 399 $(this).find('i').text('ì´ê¸°'); 400 $(this).next('ul').removeClass('active'); 401 } 402 }); 403 404 $('.sites ul').each(function(){ 405 if( $('.sites ul').innerHeight() >= 300 ){ 406 $('.sites ul').css({'overflow':'auto', 'height':'300px'}); 407 }else{ 408 $('.sites ul').removeAttr('style'); 409 } 410 }); 411 412 if($('.sites').length > 0){ 413 $(document).on('click focusin', function(e) { 414 if(!$('.sites').is(e.target) && $('.sites').has(e.target).length === 0){ 415 $('.sites button').find('i').text('ì´ê¸°'); 416 $('.sites').children('ul').removeClass('active'); 417 } 418 }); 419 } 420 421}; 422 423function ellipsis () { 424 425 $('.area_contents .as_side .as_tab .lst li .text span').dotdotdot({watch:'window', wrap:'letter'}); 426 $('.area_contents .as_side .as_tab .photo li .text span').dotdotdot({watch:'window', wrap:'letter'}); 427 $('.area_news_like .lst li a .text strong').dotdotdot({watch:'window', wrap:'letter'}); 428 $('.area_news_like .lst li a .text span').dotdotdot({watch:'window', wrap:'letter'}); 429 $('.article_top .text.multi strong').dotdotdot({watch:'window', wrap:'letter'}); 430 $('.list_type:not(.tbsty, .writer) .text strong').dotdotdot({watch:'window', wrap:'letter'}); 431 $('.list_type:not(.writer, .type2) .text .lead').dotdotdot({watch:'window', wrap:'letter'}); 432 $('.photo_list:not(.ebook) .text strong').dotdotdot({watch:'window', wrap:'letter'}); 433 $('.news_top50 ul li:nth-child(-n+10) .lead').dotdotdot({watch:'window', wrap:'letter'}); 434 $('.speech-info .text').dotdotdot({watch:'window', wrap:'letter'}); 435 $('.policy_home .list .slider ul li span.lead').dotdotdot({watch:'window', wrap:'letter'}); 436 $('.channel_box .sns_lst .lst a .text strong').dotdotdot({watch:'false', wrap:'letter'}); 437 $('.channel_box .sns_lst .lst a .text span').dotdotdot({watch:'false', wrap:'letter'}); 438 439 $('.custom_news_list .text strong').dotdotdot({watch:'false', wrap:'letter'}); 440 $('.custom_news_list .text span').dotdotdot({watch:'false', wrap:'letter'}); 441 442 $('.focus_sea_slide .col1 .text strong, .focus_sea_slide .col1 .text .lead, .focus_sea_slide .text.multi strong, .policy_focus_article .lst .text strong').dotdotdot({watch:'window', wrap:'letter'}); 443 444 $('.table_list.multiline .subject a').dotdotdot({watch:'false', wrap:'letter'}); 445 446}; 447 448// ìë¸íì´ì§ ì½í ì¸ 449function conContent () { 450 451 /* ë·°íì´ì§ ë°°ëì¬ë¼ì´ë slick */ 452 $('.area_banner.slider.slick .slide').on('init', function(event, slick) { 453 $('.area_banner.slider.slick .current').text(slick.currentSlide + 1); 454 $('.area_banner.slider.slick .total').text(slick.slideCount); 455 }).slick({ 456 slidesToShow: 1, 457 slidesToScroll: 1, 458 dots: false, 459 arrows: true, 460 focusOnSelect: false, 461 vertical: true, 462 verticalSwiping: true, 463 prevArrow: $('.area_banner.slider.slick .prev'), 464 nextArrow: $('.area_banner.slider.slick .next'), 465 infinite: true, 466 swipe : true, 467 accessibility: true, 468 autoplay : true, 469 autoplaySpeed: 5000, 470 }).on('beforeChange', function(event, slick, currentSlide, nextSlide) { 471 $('.area_banner.slider.slick .current').text(nextSlide + 1); 472 }); 473 474 $('.area_banner.slider.slick .slide').slickAuto({ 475 auto : $('.area_banner.slider.slick .control > div > button.playing'), 476 arrows : $('.area_banner.slider.slick .slide .slick-arrow'), 477 arrowClickAfterStop : true 478 }); 479 480 function playStop () { 481 if($('.area_banner.slider.slick .control button').hasClass('slick-hidden')){ 482 $('.area_banner.slider.slick .control').hide(); 483 }else{ 484 $('.area_banner.slider.slick .control').show(); 485 } 486 }; 487 playStop(); 488 489 /* ë·°íì´ì§ ì ìê¶ë² */ 490 $('.law_copy .text > div > a').on('click', function(){ 491 $(this).parent().addClass('active').siblings().removeClass('active'); 492 return false;
493 }); 494 $('.law_law_copy .text > div > a').on('click', function(){ 495 return false; 496 }); 497 $('.tooltip .close').on('click focusout', function(){ 498 $(this).parent().parent().removeClass('active'); 499 $(this).parent().parent().children('a').focus(); 500 }); 501 if($('.law_copy_wrap').length > 0){ 502 $(document).on('click', function(e) { 503 if(!$('.law_copy .text > div > a').is(e.target) && $('.law_copy .text > div > a').has(e.target).length === 0){ 504 $('.law_copy .text > div > a').parent().removeClass('active'); 505 } 506 }); 507 } 508 509 /* ë·°íì´ì§ ê´ë ¨ê¸°ì¬ í */ 510 $('.related .rkey button:first-child').attr('title','ì íë¨'); 511 $('.related').on('click', '.rkey button', function(){ 512 $(this).attr('title','ì íë¨').addClass('active').siblings().removeClass('active').attr('title',''); 513 }); 514 515 /* ëê¸ ì´ììì¹ */ 516 $('.livere_box .open').on('click', function(){ 517 $('.livere_info').stop().fadeIn(); 518 $(this).find('span').text('ë«ê¸°'); 519 }); 520 $('.livere_box .livere_info .close').on('click focusout', function(){ 521 $('.livere_info').stop().fadeOut(); 522 $('.livere_box .open').focus(); 523 $('.livere_box .open').find('span').text('ì´ê¸°'); 524 }); 525 if($('.livere_box').length > 0){ 526 $(document).on('click', function(e) { 527 if(!$('.livere_box .open').is(e.target) && $('.livere_box .open').has(e.target).length === 0){ 528 $('.livere_info').stop().fadeOut(); 529 $('.livere_box .open').find('span').text('ì´ê¸°'); 530 } 531 }); 532 } 533 534 /* ë¸ë¦¬í룸 í ì´ë¸ 리ì¤í¸ ìì´, ì¼ë° */ 535 $('.table_list .subject').each(function(){ 536 if ($(this).find('.vid').length > 0){ 537 $(this).css('direction','rtl'); 538 } else { 539 $(this).removeAttr('style'); 540 } 541 }); 542 543 /* ì ìì± ë¶ì²ê°í물 êµì ë°±ì ê¶ ë³´ê¸° */ 544 $('.book_btns button').on('click', function(){ 545 if($(this).hasClass('active')){ 546 $(this).removeClass('active').next().removeClass('active'); 547 $(this).find('i').text('ì´ê¸°'); 548 }else{ 549 $(this).addClass('active').next().addClass('active'); 550 $(this).find('i').text('ë«ê¸°'); 551 } 552 }); 553 $('.book_btns ul li:last-child a + a').on('focusout', function(){ 554 $(this).parent().parent('ul').removeClass('active'); 555 }); 556 if($('.book_btns').length > 0){ 557 $(document).on('click', function(e) { 558 if(!$('.book_btns button').is(e.target) && $('.book_btns button').has(e.target).length === 0){ 559 $('.book_btns button').removeClass('active').next().removeClass('active'); 560 } 561 }); 562 } 563 564 /* ì ë¶ìê° - êµê°ìì ë³´ì¥íì íì */ 565 $('.orgpop01').on('click', function(){ 566 $(".pop_org").fadeIn(); 567 $(".pop_org .close").focus(); 568 return false; 569 }); 570 $('.pop_org .close').on('click', function(){ 571 $(".pop_org").fadeOut(); 572 $(".orgpop01").focus(); 573 return false; 574 }); 575 if($('.orgpop01').length > 0){ 576 $(document).on('click', function(e) { 577 if(!$('.orgpop01').is(e.target) && $('.orgpop01').has(e.target).length === 0){ 578 $('.pop_org').fadeOut(); 579 } 580 }); 581 } 582 583 /* ì±ëìê° */ 584 $('.video_lst .slide > ul').addClass('swiper-wrapper'); 585 $('.video_lst .slide > ul > li').addClass('swiper-slide'); 586 var videoSlide = new Swiper($('.video_lst .slide'), { 587 slidesPerView: 2, 588 slidesPerGroup: 1, 589 spaceBetween: 10, 590 speed: 600, 591 observer: true, 592 loop: true, 593 loopAdditionalSlides: 1, 594 observer: true, 595 observeParents: true, 596 pagination: { 597 el: '.video_lst .swiper-pagination', 598 clickable:true, 599 renderBullet: function (index, className){ 600 return '<button class="' + className + '"><span>' + (index + 1) + '</span></button>'; 601 } 602 }, 603 on: { 604 init: function(){ 605 var idx = this.activeIndex 606 $('.video_lst .swiper-slide .video').on('focus', function(e){ 607 e.preventDefault(); 608 var idx = $(this).parent().index(); 609 videoSlide.slideTo(idx); 610 }); 611 if( this.activeIndex <= 2) { 612 $('.video_lst .swiper-wrapper').parent().addClass('disabled'); 613 $('.video_lst .control').hide(); 614 }else{ 615 $('.video_lst .swiper-wrapper').parent().removeClass('disabled'); 616 } 617 }, 618 slideChangeTransitionEnd : function() { 619 //$('.video_lst .swiper-slide').find('.video').attr('tabindex', '0'); ì ê·¼ì±ì¶ê° 20260806 620 //$('.video_lst .swiper-slide-duplicate .video').attr('tabIndex', '-1'); ì ê·¼ì±ì¶ê° 20260806 621 //$('.video_lst .swiper-slide-duplicate .video video').attr('tabIndex', '-1'); ì ê·¼ì±ì¶ê° 20260806 622 var videos = document.querySelectorAll('video'); 623 Array.prototype.forEach.call(videos, function(video){ 624 video.pause(); 625 }); 626 }, 627 }, 628 }); 629 630 /* ì±ëìê° - ëíë¯¼êµ ì ë¶ ë리ìíµë§ */ 631 $('.govsns_box > .tab > ul > li:first-child > button').attr('title','ì íë¨'); 632 function tabPlay() { 633 var tabs = $('.govsns_box > .tab > ul > li'); 634 timerId = setInterval(function() { 635 var onTab = tabs.filter('.active'); 636 var nextTab = onTab.index() < tabs.length-1 ? onTab.next() : tabs.first(); 637 nextTab.children('button').attr('title','ì íë¨').parent().addClass('active').siblings().removeClass('active').children('button').attr('title',''); 638 nextTab.parent().parent().css('height', $('.govsns_box .tab > ul > li >
638 button').innerHeight() + nextTab.children('.govsns_box .list').innerHeight()); 639 }, 3000); 640 }; 641 function tabStop() { 642 clearInterval(timerId); 643 }; 644 tabPlay(); 645 $('.govsns_box .tab .playing').on('click', function(){ 646 if($(this).hasClass('pause')){ 647 $(this).removeClass("pause").addClass("play").find('span').text('ì¬ì'); 648 tabStop(); 649 }else if ($(this).hasClass('play')) { 650 $(this).removeClass('play').addClass("pause").find('span').text('ì ì§'); 651 tabPlay(); 652 } 653 }); 654 $('.govsns_box .tab').css('height', $('.govsns_box .tab').innerHeight() + $('.govsns_box .list').innerHeight()); 655 $('.govsns_box .tab > ul > li > button').on('click focusin',function(){ 656 $(this).parent().addClass('active').children('button').attr('title','ì íë¨'); 657 $(this).parent().siblings().removeClass('active').children('button').attr('title',''); 658 $(this).parent().parent().parent().css('height', $(this).next('.list').innerHeight() + $(this).innerHeight()); 659 tabStop(); 660 $('.govsns_box .tab .playing').removeClass("pause").addClass("play").find('span').text('ì¬ì'); 661 }); 662 $('.govsns_box .intab > li > button').on('click focusin',function(){ 663 $(this).parent().addClass('active').children('button').attr('title','ì íë¨'); 664 $(this).parent().siblings().removeClass('active').children('button').attr('title',''); 665 tabStop(); 666 $('.govsns_box .tab .playing').removeClass("pause").addClass("play").find('span').text('ì¬ì'); 667 }); 668 669 /* ë´ì¤ë í° ê°ì¸ì ë³´ ë ì´ì´ */ 670 $(".newsletter_signin .open").click(function(){ 671 $(".newsletter_signin_cont").fadeIn(300); 672 return false; 673 }); 674 $('.newsletter_signin_cont .close').on('click focusout', function() { 675 $('.newsletter_signin_cont').fadeOut(300); 676 $('.newsletter_signin .open').focus(); 677 return false; 678 }); 679 if($('.newsletter_signin').length > 0){ 680 $(document).on('click', function(e) { 681 if(!$('.newsletter_signin .open').is(e.target) && $('.newsletter_signin .open').has(e.target).length === 0){ 682 $(".newsletter_signin_cont").fadeOut(300); 683 } 684 }); 685 } 686 687 /* ê³µíµ í */ 688 $('.tabs_common.run ul li > button').on('click',function(){ 689 $(this).parent().addClass('active').siblings().removeClass('active'); 690 var idx = $(this).parent().index(); 691 $(this).parent().parent().parent().next('.tabs_commom_cont').children('.cont').eq(idx).show().siblings('.cont').hide(); 692 }); 693 694 $('.tabs_common_focus ul > li:first-child > button').attr('title','ì íë¨'); 695 $('.tabs_common_focus:not(.dept_sns)').css('height', $('.tabs_common_focus').innerHeight() + $('.tabs_common_focus .list').innerHeight()); 696 697 $('.tabs_common_focus ul li > button').on('click focus',function(){ 698 $(this).parent().addClass('active').children('button').attr('title','ì íë¨').parent().siblings().removeClass('active').children('button').attr('title',''); 699 $(this).parent().parent().parent().css('height', $(this).next('.list').outerHeight() + $(this).outerHeight()); 700 }); 701 702 $('.livere_comment button').on('click', function(){ 703 if($(this).parent().hasClass('close')){ 704 $(this).parent().removeClass('close').next().stop().hide(); 705 $(this).find('span i').text('보기'); 706 }else{ 707 $(this).parent().addClass('close').next().stop().show(); 708 $(this).find('span i').text('ë«ê¸°'); 709 } 710 }); 711 712 $('.news_top50 ul li:nth-child(n+11)').each(function(){ 713 var title = $("strong", this); 714 var dateSpan = $(".date", this); 715 title.css("width", "calc(100% - " + (dateSpan.outerWidth() + 15 ) + "px)"); 716 }); 717 718 /* ë§ì¶¤ì ì± ë´ì¤ */ 719 $('.custom_news_select .select > button').on('click', function() { 720 if($(this).parent().hasClass('is-open')){ 721 $(this).parent().removeClass('is-open'); 722 $(this).next('ul').stop().fadeOut(150); 723 }else{ 724 $(this).parent().addClass('is-open'); 725 $(this).next('ul').stop().fadeIn(150); 726 } 727 }); 728 $('.custom_news_select .select ul li button').on('click',function(){ 729 var text = $(this).text(); 730 $(this).parent().parent().prev('button').html(text); 731 $(this).parent().parent('ul').stop().fadeOut(150); 732 $('.custom_news_select .select').removeClass('is-open'); 733 }); 734 735 if($('.custom_news_select .select').length > 0){ 736 $(document).on('click focusin', function(e) { 737 if(!$('.custom_news_select .select').is(e.target) && $('.custom_news_select .select').has(e.target).length === 0){ 738 $('.custom_news_select .select').removeClass('is-open').children('ul').stop().fadeOut(150); 739 } 740 }); 741 } 742 $('.custom_news_tab ul > li:first-child > button').attr('title','ì íë¨'); 743 $('.custom_news_tab ul > li button').on('click', function() { 744 $(this).parent().addClass('active').children('button').attr('title','ì íë¨').parent().siblings().removeClass('active').children('button').attr('title',''); 745 }); 746 $('.custom_news_list ul li:not(:has(.thumb))').each(function(){ 747 var cnTitle = $('.text strong', this); 748 var cnLead = $('.text span', this); 749 if (cnTitle.outerHeight() < 42){ 750 cnLead.addClass('ehg'); 751 } 752 }); 753 754 $('.focus_sea_slide .slide').slick({ 755 slidesToShow: 1, 756 slidesToScroll: 1, 757 dots: true, 758 arrows: true, 759 focusOnSelect: false, 760 infinite: true, 761 swipe : true, 762 accessibility: true, 763 appendArrows: $('.focus_sea_slide .control'), 764 appendDots: $('.focus_sea_slide .control'), 765 }); 766 767 /* ì주 묻ë ì§ë¬¸ */ 768 $('.faq_lst > ul > li > button').on('click', function() { 769 if($(this).find('span').text() == 'í¼ì¹ê¸°' ){ 770 $(this).find('span').text('ì 기'); 771 $(this).removeClass('close'); 772 }else{ 773 $(this).find('span').text('í¼ì¹ê¸°'); 774 $(this).addClass('close'); 775 } 776 }); 777 778 /* ê°ì¸ì ë³´ì²ë¦¬ë°©ì¹¨ */ 779 $('.privacy_togl').on('click', function() { 780 if($(this).text() == 'ë´ì©ë³´ê¸°' ){ 781 $(this).text('ë´ì©ë«ê¸°'); 782 $(this).addClass('open'); 783 $('.privacy_togl_box').show(); 784 }else{ 785 $(this).text('ë´ì©ë³´ê¸°'); 786 $(this).removeClass('open'); 787 $('.privacy_togl_box').hide(); 788 } 789 }); 790 791 $('.cnt_lst a, .cnt_index a, .terms_wrap .label a').on('click', function(e) { 792 e.preventDefault(); 793 $('html, body').animate({scrollTop : $(this.hash).offset().top - 100}, 0); 794 }); 795 796 /* ìë£ê°í */ 797 $('.medical_slide .slide').slick({ 798 slidesToShow: 1, 799 slidesToScroll: 1, 800 dots: true, 801 arrows: true, 802 prevArrow: $('.medical_slide .prev'), 803 nextArrow: $('.medical_slide .next'), 804 appendDots: $('.medical_slide .control > div'), 805 focusOnSelect: false, 806 infinite: true, 807 swipe : true, 808 accessibility: true, 809 autoplay : true, 810 autoplaySpeed: 3000, 811 //centerMode: true, 812 //centerPadding: '15%', 813 }); 814 $('.medical_slide .slide').slickAuto({ 815 auto : $('.medical_slide button.playing'), 816 arrows : $('.medical_slide .slick-arrow'), 817 arrowClickAfterStop : true 818 }); 819 820 /* ì²´ê³ ìì */ 821 $('.focus_slide.czech .slide').on('init', function(event, slick){ 822 //$('.focus_slide.czech .control .playing').before('<div class="counter"><span class="current"></span> / <span class="total"></span></div>'); 823 $('.focus_slide.czech .counter .current').text(slick.currentSlide + 1); 824 $('.focus_slide.czech .counter .total').text(slick.slideCount); 825 }).slick({ 826 slidesToShow: 1, 827 slidesToScroll: 1, 828 dots: true, 829 arrows: true, 830 prevArrow: $('.focus_slide.czech .prev'), 831 nextArrow: $('.focus_slide.czech .next'), 832 appendDots: $('.focus_slide.czech .control > div'), 833 focusOnSelect: false, 834 infinite: true, 835 swipe : true, 836 accessibility: true, 837 autoplay : true, 838 autoplaySpeed: 3000, 839 //centerMode: true, 840 //centerPadding: '15%', 841 }).on('beforeChange', function(event, slick, currentSlide, nextSlide) { 842 $('.focus_slide.czech .slick-counter .current').text(nextSlide + 1); 843 }); 844 $('.focus_slide.czech .slide').slickAuto({ 845 auto : $('.focus_slide.czech button.playing'), 846 arrows : $('.focus_slide.czech .slick-arrow'), 847 arrowClickAfterStop : true 848 }); 849 850 /* ìì°ì */ 851 $('.focus_slide.budget .slide').on('init', function(event, slick) { 852 $('.focus_slide.budget .control .current').text(slick.currentSlide + 1); 853 $('.focus_slide.budget .control .total').text(slick.slideCount); 854 }).slick({ 855 slidesToShow: 1, 856 slidesToScroll: 1, 857 arrows: true, 858 prevArrow: $('.focus_slide.budget .prev'), 859 nextArrow: $('.focus_slide.budget .next'), 860 focusOnSelect: false, 861 infinite: true, 862 swipe : true, 863 accessibility: true, 864 autoplay : true, 865 autoplaySpeed: 3000, 866 }).slickAuto({ 867 auto : $('.focus_slide.budget button.playing'), 868 arrows : $('.focus_slide.budget .slick-arrow'), 869 arrowClickAfterStop : true 870 }).on('beforeChange', function(event, slick, currentSlide, nextSlide) { 871 $('.focus_slide.budget .control .current').text(nextSlide + 1); 872 }); 873 874 /* 공공ë리 20260820 */ 875 $('.kogl .tuc_open').on('click', function(){ 876 $(this).closest('.type').find('.tuc').fadeIn('fast'); 877 }); 878 $('.kogl .tuc_close').on('click focusout', function(){ 879 $(this).closest('.type').find('.tuc').fadeOut('fast'); 880 }); 881 if($('.kogl .tuc_open').length > 0){ 882 $(document).on('click', function(e) { 883 if(!$(e.target).closest('.tuc_open').length){ 884 $('.kogl .tuc').stop().fadeOut('fast'); 885 } 886 }); 887 } 888 889}; 890 891 892function audioCnt () { 893/* 894 $('.audio_menu .keywords').on('init', function(event, slick) { 895 $('.audio_menu .keywords .slick-arrow').insertBefore('.audio_menu .keywords .slick-list'); 896 $(this).append('<div class="slick-counter"><span class="current"></span> / <span class="total"></span></div>'); 897 $('.audio_menu .keywords .current').text(slick.currentSlide + 1); 898 $('.audio_menu .keywords .total').text(slick.slideCount); 899 }).slick({ 900 slidesToShow: 1, 901 slidesToScroll: 1, 902 infinite:false, 903 autoplay: false, 904 arrows: true, 905 adaptiveHeight: true, 906 }).on('beforeChange', function(event, slick, currentSlide, nextSlide) { 907 $('.audio_menu .keywords .current').text(nextSlide + 1); 908 }); 909*/ 910 $('.audio_ch_lst .slide > ul').addClass('swiper-wrapper'); 911 $('.audio_ch_lst .slide > ul > li').addClass('swiper-slide'); 912 var audioChLst = new Swiper($('.audio_ch_lst .slide'), { 913 slidesPerView: 4, 914 spaceBetween: 12, 915 speed: 600,
916 loop: true, 917 loopAdditionalSlides: 1, 918 observer: true, 919 observeParents: true, 920 centeredslides:false, 921 navigation: { 922 nextEl: '.audio_ch_lst .next', 923 prevEl: '.audio_ch_lst .prev' 924 }, 925 pagination: { 926 el: '.audio_ch_lst .swiper-pagination', 927 clickable:true, 928 renderBullet: function (index, className){ 929 return '<button class="' + className + '"><span>' + (index + 1) + '</span></button>'; 930 } 931 }, 932 autoplay: { 933 delay: 5000, 934 disableOnInteraction: false, 935 }, 936 on: { 937 init: function(){ 938 var idx = this.activeIndex 939 if( this.activeIndex < 5) { 940 $('.audio_ch_lst .swiper-wrapper').addClass('disabled'); 941 $('.audio_ch_lst .control').hide(); 942 }else{ 943 $('.audio_ch_lst .swiper-wrapper').removeClass('disabled'); 944 } 945 $('.audio_ch_lst .swiper-slide a').on('focus', function(e){ 946 e.preventDefault(); 947 var idx = $(this).parent().index(); 948 audioChLst.slideTo(idx); 949 }); 950 $('.audio_ch_lst .swiper-button-play').on('click', function(){ 951 if($(this).is('.play')) { 952 $(this).removeClass('play'); 953 $(this).addClass('pause'); 954 $(this).find('span').text('ìëì¬ë¼ì´ë ë©ì¶¤'); 955 audioChLst.autoplay.start(); 956 }else if ($(this).is('.pause')) { 957 $(this).removeClass('pause'); 958 $(this).addClass('play'); 959 $(this).find('span').text('ìëì¬ë¼ì´ë ìì'); 960 audioChLst.autoplay.stop(); 961 } 962 }); 963 $('.audio_ch_lst .swiper-pagination, .audio_ch_lst .swiper-navigation').on('click', function(){ 964 $('.audio_ch_lst .swiper-button-play').removeClass('pause'); 965 $('.audio_ch_lst .swiper-button-play').addClass('play'); 966 $('.audio_ch_lst .swiper-button-play').find('span').text('ìëì¬ë¼ì´ë ìì'); 967 audioChLst.autoplay.stop(); 968 }); 969 }, 970 slideChangeTransitionEnd : function() { 971 $('.audio_ch_lst .swiper-slide').find('a').attr('tabindex', ''); 972 $('.audio_ch_lst .swiper-slide-duplicate a').attr('tabIndex', '-1'); 973 $('.audio_ch_lst .swiper-slide-duplicate button').attr('tabIndex', '-1'); 974 }, 975 }, 976 }); 977 978 $('.ch_share .open').on('click', function() { 979 if($(this).find('span').text() == 'ì´ê¸°' ){ 980 $(this).next('.lst').stop().fadeIn(300); 981 $(this).find('span').text('ë«ê¸°'); 982 $(this).parent().addClass('is-open'); 983 }else{ 984 $(this).find('span').text('ì´ê¸°'); 985 $(this).next('.lst').stop().fadeOut(300); 986 $(this).parent().removeClass('is-open'); 987 } 988 }); 989 990 $('.ch_share .lst .close').on('click focusin', function() { 991 $(this).parent('.ch_share .lst').stop().fadeOut(300); 992 $(this).parent().parent('li').removeClass('is-open'); 993 $('.ch_share .open span').text('ì´ê¸°'); 994 $('.ch_share .open').focus(); 995 }); 996 997 if($('.ch_share').length > 0){ 998 $(document).on('click', function(e) { 999 if(!$('.ch_share').is(e.target) && $('.ch_share').has(e.target).length === 0){ 1000 $('.ch_share').removeClass('is-open'); 1001 $('.ch_share .open span').text('ì´ê¸°'); 1002 $('.ch_share .lst').stop().fadeOut(300); 1003 } 1004 }); 1005 } 1006 1007 $('.controls_play').on('click', function() { 1008 if($(this).find('span').text() == 'ì¬ìí기' ){ 1009 $(this).find('span').text('ì¼ìì ì§'); 1010 $(this).addClass('pause'); 1011 }else{ 1012 $(this).find('span').text('ì¬ìí기'); 1013 $(this).removeClass('pause'); 1014 } 1015 }); 1016 1017 $('.controls_speed').on('click', function() { 1018 if($(this).find('span:last-child').text() == 'ì¬ì ìë ë°ê¾¸ê¸° ì´ê¸°' ){ 1019 $(this).next('.speed_wrap').stop().fadeIn(300); 1020 $(this).find('span:last-child').text('ì¬ì ìë ë°ê¾¸ê¸° ë«ê¸°'); 1021 $(this).addClass('is-open'); 1022 }else{ 1023 $(this).find('span:last-child').text('ì¬ì ìë ë°ê¾¸ê¸° ì´ê¸°'); 1024 $(this).next('.speed_wrap').stop().fadeOut(300); 1025 $(this).removeClass('is-open'); 1026 } 1027 }); 1028 $('.speed_wrap .close').on('click focusout', function() { 1029 $(this).parent('.speed_wrap').stop().fadeOut(300); 1030 $('.controls_speed').removeClass('is-open').find('span:last-child').text('ì¬ì ìë ë°ê¾¸ê¸° ì´ê¸°'); 1031 $('.controls_speed').focus(); 1032 }); 1033 1034 $('.speed_wrap .close').on('click focusout', function() { 1035 $(this).parent('.speed_wrap').stop().fadeOut(300); 1036 $('.controls_speed').removeClass('is-open').find('span:last-child').text('ì¬ì ìë
1036 ë°ê¾¸ê¸° ì´ê¸°'); 1037 $('.controls_speed').focus(); 1038 }); 1039 1040 $('.area_audio_player .buttons .volume').on('click', function() { 1041 if($(this).find('span').text() == 'ììê±° í´ì ' ){ 1042 $(this).find('span').text('ììê±°'); 1043 $(this).addClass('mute'); 1044 }else{ 1045 $(this).find('span').text('ììê±° í´ì '); 1046 $(this).removeClass('mute'); 1047 } 1048 }); 1049 1050 $('.area_audio_player .buttons .small').on('click', function() { 1051 if($(this).find('span').text() == 'ìííë ì´ì´ ì´ê¸°' ){ 1052 $(this).find('span').text('íì¥íë ì´ì´ ì´ê¸°'); 1053 $(this).addClass('is-open'); 1054 $('.area_audio_player').addClass('small'); 1055 $('.speed_wrap').hide(); 1056 $('.controls_speed').removeClass('is-open').find('span:last-child').text('ì¬ì ìë ë°ê¾¸ê¸° ì´ê¸°'); 1057 }else{ 1058 $(this).find('span').text('ìííë ì´ì´ ì´ê¸°'); 1059 $(this).removeClass('is-open'); 1060 $('.area_audio_player').removeClass('small'); 1061 } 1062 }); 1063 1064 $(window).resize(function() { 1065 var widthOut = $('.area_audio_player .controller .text strong').width(); 1066 var widthIn = $('.area_audio_player .controller .text strong span').width(); 1067 if( widthIn >= widthOut ){ 1068 $(".area_audio_player .controller .text strong").addClass("is_marquee"); 1069 }else{ 1070 $('.area_audio_player .controller .text strong').removeClass('is_marquee'); 1071 } 1072 }).trigger('resize'); 1073 1074}; 1075 1076$(function(){ 1077 let ac = 'active'; 1078 1079 //ê²ìê¸ ìë¨ ê²ì_ìì¸ê²ì 1080 $('.sch_brief .btn_detail').attr('title','í¼ì¹ê¸°'); 1081 $('.sch_brief .btn_detail').on('click',function(){ 1082 const t = $(this); 1083 if(!t.closest('.sch_brief').hasClass(ac)){ 1084 t.attr('title','ì 기').closest('.sch_brief').addClass(ac); 1085 }else{ 1086 t.attr('title','í¼ì¹ê¸°').closest('.sch_brief').removeClass(ac); 1087 } 1088 }); 1089 1090 //ê²ìê¸ ìë¨ ìì¸ê²ì_íìê²ìì¡°ê±´ ì´ê¸° 1091 $('.chk_lst .custom_chk input').on('click', function(){ 1092 const data = $(this).data('target'); 1093 if ($(this).attr('name').indexOf('srchOutSite') > -1) { 1094 $('#srchArea3').closest('.sch_detail').find('.select_opt').removeClass('active'); 1095 $('#srchArea3').closest('.row_item').find('.row_detail').removeClass('active'); 1096 } else { 1097 $(this).closest('.row_item').find('.row_detail').removeClass(ac); 1098 } 1099 $('.' + data).addClass(ac); 1100 }); 1101 1102 //ê²ìê¸ ìë¨ ìì¸ê²ì ì ì²´ì²´í¬ 1103 $('.ul_wrap .chk_all').on('click',function(){ 1104 const t = $(this); 1105 const chk_target = t.closest('li').find('> ul input[type=checkbox]'); 1106 if(t.is(':checked')){ 1107 chk_target.prop('checked',true); 1108 }else{ 1109 chk_target.prop('checked',false); 1110 } 1111 }); 1112 1113 $('.ul_wrap ul input[type=checkbox]').on('click',function(){ 1114 const t = $(this); 1115 const total = t.closest('ul').find('input[type=checkbox]').length; 1116 const checked = t.closest('ul').find('input[type=checkbox]:checked').length; 1117 const target = t.closest('ul').siblings('.chk_tit').find('input'); 1118 1119 if(total != checked){ 1120 target.prop('checked',false); 1121 }else{ 1122 target.prop('checked',true); 1123 } 1124 }); 1125 1126 //ì°ì¤ë¬¸ > ì°ì¤ì ìì´ì½ 1127 $('.speechmaker').each(function(){ 1128 const t = $(this); 1129 if(t.text() == 'ëíµë ¹'){ 1130 t.addClass('t1'); 1131 }else if(t.text() == 'êµë¬´ì´ë¦¬'){ 1132 t.addClass('t2'); 1133 } 1134 }); 1135 1136 //ê²ìë²í¼ ì´í í¬ì»¤ì¤ ì´ë 1137 $('.sch_detail .btn_bx button:last-child').on('focusout', function() { 1138 $('.sch_brief .btn_detail').focus().attr('title','í¼ì¹ê¸°'); 1139 $('.sch_brief').removeClass('active'); 1140 }); 1141 1142 $('.media_tab li.active > a').attr('title','ì íë¨'); 1143 $('.kwd_tab li.active > a').attr('title','ì íë¨'); 1144 1145 //ì ê·¼ì±ì¶ê° 20260806 1146 $('.policy_home .clock > i').append('<span class="sr-only">ìì±ì¼</span>'); 1147 $('.paging .num .on').each(function(){ 1148 if ($(this).hasClass('on')){ 1149 $(this).attr('tabindex', '-1'); 1150 } else { 1151 $(this).removeAttr('tabindex'); 1152 } 1153 }); 1154 1155}); 1156 1157$(function(){ 1158 conContent(); 1159 aside_sns(); 1160 aside_article(); 1161 conSlider(); 1162 schPost(); 1163 breadcrumbs(); 1164 audioCnt (); 1165 //outSiteChk(); 1166 outSiteChk(); 1167 $('.area_contents .article_head h2 br').wrap('<span />'); 1168}); 1169 1170 1171$(window).on('load', function() { 1172 1173 prevNext(); 1174 scrollIndicator(); 1175 ellipsis(); 1176 page(); 1177 1178 const hash = window.location.hash; 1179 switch(hash){ 1180 case '#newest': 1181 $('.as_tab li > button:contains("ìµì ë´ì¤")').click(); 1182 break; 1183 }; 1184});
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.