PageSourceSearch

http://www.samsungsds.com/resource/kr/js/extension2.js?queryString=20241206012111

js samsungsds.com collected 2026-10-01 10:14:53 UTC 117,978 bytes, 2,781 lines download raw bytes

1/*******************************************************************************
2 * 파 일 명 : extension2.js
3 * 작 성 자 : jkh
4 * 작 성 일 : 2016-10-12
5 ******************************************************************************/
6var SDS_COMMON = {
7    mobileWidth : 767,
8    tabletWidth : 1024,
9    currentWidth : function(){
10        return window.innerWidth >= $(document).width() ? window.innerWidth : $(document).width();
11    },
12    isMobile : function(){
13        return this.currentWidth() <= this.mobileWidth;
14    },
15    isWeb : function(){
16        return this.currentWidth() > this.tabletWidth;
17    }
18};
19
20/* lang quarter */
21/* 17.02.23 */
22/* 한글 중문 영문 분기처리함수입니다. */
23/* lang_quarter('한글값','중문값','영문값','라틴값') 방식으로 사용하시면 됩니다. */
24function lang_quarter(ko,zh,gl,pt) {
25    var result;
26    if($("html").attr("lang") == "ko") {
27        result = ko;
28    }else if($("html").attr("lang") == "zh") {
29        result = zh;
30    }else if($("html").attr("lang") == "pt") {
31        result = pt;
32    }else {
33        result = gl;
34    }
35    return result;
36}
37
38/* ready */
39$(function(){
40    /* 20220804 : 이벤트 리스트 페이지 리뉴얼 */
41    var $doc = $(window.document);
42
43    /** filter sticky */
44    if($doc.find('.filterDate_container').length){
45        var filterContainer = $('.filterDate_container');
46        var filterHeightTop = filterContainer.offset().top;
47    
48        $(window).scroll(function(){
49            if($(window).scrollTop() >= filterHeightTop){
50                filterContainer.addClass('stick');
51            }else{
52                filterContainer.removeClass('stick');
53            }
54        })
55    }
56
57    if($doc.find('.g_carousel').length){
58        var startIndex = 0;
59        var currentIndex = startIndex;
60        var $prevBtn = $doc.find(".arrow-prev");
61        var $nextBtn = $doc.find(".arrow-next");
62        var $carousel = $doc.find('.carousel');
63        var $carouselItem = $doc.find('.carousel .li');
64        var $pagn = $doc.find(".md_pagn");
65        var $nav = $doc.find(".arrow-nav");
66        var $control = {
67            wrap: $doc.find(".md_play"),
68            playBtn: $doc.find(".md_btn_play"),
69            stopBtn: $doc.find(".md_btn_stop")
70        };
71        var lang = $("html").attr("lang") || "en";
72        var visualArea = $carousel.find(".img .img_p, .img .img_m");
73        var $txtArea = $carousel.find(".txt_cont");
74
75        setVisualImg();
76        setTxtBreak();
77
78        if($carouselItem.length < 2){
79            $carouselItem.addClass('active');
80            $nav.remove();
81            $pagn.remove();
82            $control.wrap.remove();
83        }
84
85        $carouselItem.on({
86            focusin: function(e){
87                switch (deviceType) {
88                    case "PC":
89                        // 
90                        break;
91                    case "TABLET":
92                    case "MOBILE":
93                        var isPagnToSlide = $(e.relatedTarget).is($pagn);
94
95                        if(!isPagnToSlide){
96                            var currentIndex = $carouselItem.index(e.delegateTarget);
97                        }else{
98                            var currentIndex = 0;
99                            $carouselItem.eq(0).find("a, button").first().focus();
100                        }
101
102                        $carousel.trigger("slideTo", [currentIndex, 0, true] );
103                        break;
104                    // default:
105                    //     break;
106                }
107            },
108            focusout: function(e){
109                switch (deviceType) {
110                    case "PC":
111                        // 
112                        break;
113                    case "TABLET":
114                    case "MOBILE":
115                        var isSameSequence = $(e.delegateTarget).find(e.relatedTarget).length;
116                        var isLastSequence = $(e.delegateTarget).is($carouselItem.last());
117                        
118                        if(!isSameSequence && isLastSequence){
119                            $pagn.focus();
120                        }
121                        break;
122                    // default:
123                    //     break;
124                }
125            }
126        });
127
128        $control.stopBtn.on("click", function(e){
129            e.preventDefault();
130            sequenceControl($carousel, "STOP", true);
131            return false;
132        });
133
134        $control.playBtn.on("click", function(e){
135            e.preventDefault();
136            sequenceControl($carousel, "PLAY", true);
137            return false;
138        });
139
140        $carousel.carouFredSel({
141            responsive: true,
142            height: "variable",
143            auto: {
144                play: true,
145                timeoutDuration:5000
146            },
147            prev: {
148                button: $prevBtn
149            },
150            next: {
151                button: $nextBtn
152            },
153            items: {
154                start: currentIndex,
155                visible: 1,
156                height: "variable"
157            },
158            pagination:{
159                container: $pagn,
160            },
161            swipe: {
162                onMouse: true,
163                onTouch: true
164            },
165            scroll: {
166                // fx: "fade",
167                duration: 500,
168                items: 1,
169                onAfter: function(data){
170                    currentIndex = $carouselItem.index(data.items.visible);
171                    $carouselItem.removeClass("active").eq(currentIndex).addClass("active");
172                    // Update
173                    updateControl($carousel);
174                    updateCarouselAria($carousel);
175
176                    if($control.wrap.hasClass("on")){
177                        sequenceControl($carousel, "STOP", true);
178                    }
179
180                    // var currentItem = data.items.visible; //current slide
181                    chkBG();
182                }
183            },
184            onCreate: function(data){
185                $carouselItem.removeClass("active").eq(currentIndex).addClass("active");
186
187                $prevBtn.wrapInner('<em class=\"blind\">'+(langSet[lang]["slide"]["prevStr"]).toString()+'</em>');
188                $nextBtn.wrapInner('<em class=\"blind\">'+(langSet[lang]["slide"]["nextStr"]).toString()+'</em>');
189
190                var currentItem = data.items;
191                // console.log("currentItem", currentItem)
192                // console.log("data", data)
193                // console.log("find arrow", _plugin.$nav)
194                
195                chkBG();
196
197                // Update
198                updateCarouselAria($carousel);
199            }
200        });
201
202        /** 활성화 된 슬라이드에 .white 클래스가 있으면 .event_visualSlide_indi 와 .sns_box 에 class 부여 */
203        function chkBG(){
204            let currentItem = $(".g_carousel .caroufredsel_wrapper .li.active");
205            if(!currentItem.hasClass('white')) {
206                $(".g_carousel .arrow-nav").removeClass('indi_white');
207                $(".g_carousel .navigation").removeClass('indi_white');
208                $(".g_carousel .sns_box").addClass("black");
209            } else {
210                $(".g_carousel .arrow-nav").addClass('indi_white');
211                $(".g_carousel .navigation").addClass('indi_white');
212                $(".g_carousel .sns_box").removeClass("black");
213            }
214        }
215
216        function updateCarouselAria(plugin){
217            $carouselItem.attr("aria-hidden", true).find("a, button").attr("tabindex", -1);
218            $carouselItem.eq(currentIndex).removeAttr("aria-hidden").find("a, button").removeAttr("tabindex");
219        }
220
221            // Update Control
222        function updateControl(plugin){
223
224            if(!$control.wrap.hasClass("on")){
225          
226                sequenceControl(plugin, "PLAY", false);
227            } else {
228                sequenceControl(plugin, "STOP", false);
229            }
230        }
231    
232            // Sequence Control: play, stop
233        function sequenceControl(plugin, option, changeFocus){
234            switch (option) {
235                case "PLAY":
236                    plugin.trigger("isPaused", function(){
237                 
238                        $control.wrap.removeClass('on');
239                        plugin.trigger('play', true);
240                        // pluginItem.find("video").trigger('play');
241                        changeFocus && $control.stopBtn.focus();
242                    })
243                    break;
244                case "STOP":
245                    plugin.trigger("isScrolling", function(){
246                        $control.wrap.addClass('on');
247                        plugin.trigger('pause', true);
248                        // pluginItem.find("video").trigger('pause');
249                        changeFocus && $control.playBtn.focus();
250                    })
251                    break;
252                // default:
253                //     break;
254            }
255        }
256
257        function setVisualImg(){
258            // console.log(visualArea)
259        visualArea.imgLiquid({
260            fill:true,
261            horizontalAlign:"center",
262            verticalAlign:"center"
263        });
264        }
265    
266       function setTxtBreak(){
267   
268            var $title = $txtArea.find(".tit_b");
269            // console.log($title)
270            $title.lettering('lines');
271            $title.find("span").wrapInner('<i></i>');
272        }
273    
274        /**all 체크박스 */
275        $("#checkedAll").change(function(){
276            if(this.checked){
277              $(".eventCheck").each(function(){
278                    $("#checkedAll").attr('disabled', true);
279                    this.checked=false;
280              })              
281            } else {
282                $(".eventCheck").each(function(){
283                    this.checked=false;
284                })              
285            }
286        });
287        
288        $(".eventCheck").click(function () {
289            $("#checkedAll").prop("checked", false);
290            $("#checkedAll").attr('disabled', false);
291
292            if ($(this).is(":checked")){
293                var isAllChecked = 0;
294                $(".eventCheck").each(function(){
295                    if(!this.checked)
296                    isAllChecked = 1;
297                })              
298                if(isAllChecked == 0){ 
299                    // console.log("all")
300                    // $("#checkedAll").prop("checked", true); 
301                }
302            } else {
303                // $("#checkedAll").prop("checked", false);
304                if($(".eventCheck[type='checkbox']:checked").length == 0){
305                    $("#checkedAll").prop("checked", true);
306                    $("#checkedAll").attr('disabled', true);
307                }
308            }
309        });
310    }
311    /* //20220804 : 이벤트 리스트 페이지 리뉴얼 */
312
313    /* image resize */
314    $(".hero_vb .im_box, .box_img.b_scroll, .vs_box .im_bg, .bgcg, .bg_resize, .ben_slide, .vs_submit, .vs_txt, .b
314n_ul li, .box_img.type3 .inner, .keyVisual, .thumb_imgBox, .visualWrap, .navigationSlide_item, .offeringSlideImage, .abt_key_news, .awardCard").bgResize();
315    $("img.resize ,img.thumb_img, img.chart_description_img").imgResize();
316
317    /* ***** filter ***** */
318    if($(".filter").length) {
319        // tab
320        $(".fil_tab a, .fil_con a").click(function(e){
321            e.preventDefault();
322            var tabIndex = $(this).parent().index();
323            var conIndex = $(".fil_tab li.date").length > 0 && $(this).parents(".fil_tab").find("li").length > 0 ? $(this).parent().index()-1 : $(this).parent().index();
324
325            if($(this).parent().hasClass("on")) {
326                $(".fil_tab>li.on").removeClass("on");
327                $(".fil_con>li").eq(conIndex).removeClass("on");
328                $(this).attr({'aria-expanded':false})
329            }else{
330                var index = ($(e.target).is(".fil_con>li>a") || $(e.target).parents(".fil_con>li>a").length) && $(".fil_tab li.date").length ? tabIndex+1 : tabIndex;
331
332                $(".fil_tab>li.on, .fil_con>li.on").removeClass("on");
333                $(".fil_con>li a").attr('aria-expanded', 'false');
334                $(".fil_tab>li").eq(index).addClass("on");
335                $(".fil_con>li").eq(conIndex).addClass("on");
336                $(this).attr({'aria-expanded':true});
337            }
338        });
339        if(SDS_COMMON.currentWidth() < 1025) {
340            $('.fil_con a').attr({'role':'button','aria-expanded':false});
341            $('.fil_con a').click(function(e){
342                e.preventDefault();
343            })
344        }
345        //170224 달력 클릭시 다른 레이어 닫히게
346        $(".fil_tab .date input, .fil_tab .date .btn_date").click(function(e){
347            if($(this).parents('li:not(.on)')){
348                $(".fil_tab>li.on, .fil_con>li.on").removeClass("on");
349                $(".fil_tab>li.date").addClass("on");
350            }
351        })
352
353        // all check
354        $(".all_cont").allCheck();
355
356        // show
357        $(".filter .btn_filter").click(function(){
358            /* 210413 | 접근성 | 필터 팝업 초점밖으로 이동하는 오류 수정 */
359            var $this = $(this); /* 210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
360            var $filterPop = $('.filter');
361            var $popInner = $filterPop.find('.filter_wrap');
362            var ariahidden = $("header, footer, body > div:not(#wrap), body > ul, #container > div:not(.filter), #wrap > div:not(#container)");/* 210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
363            var $inFocuseElement = $popInner.find('a:not([style*="display: none"]), button:not([style*="display: none"]), input');
364                                            
365            $(".filter").addClass("on");
366            /* 210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
367            ariahidden.attr({
368                tabindex: "-1",
369                "aria-hidden": true
370            });
371            /* //210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
372
373            $popInner.on("keydown", function(e){
374                e.stopPropagation();
375                if($filterPop.hasClass('on')){
376                    /* 210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
377                    //esc key close
378                    if(e.keyCode === 27){
379                        closeFilterPop();
380                        $this.focus();
381                    }
382                    /* //210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
383                    if($popInner.is($(e.target))){
384                        if(e.keyCode == 9 && e.shiftKey) $inFocuseElement.last().focus();
385                    }
386
387                    if($inFocuseElement.first().is($(e.target))){
388                        if(e.keyCode == 9 && e.shiftKey) $inFocuseElement.last().focus();
389                    }
390
391                    if($inFocuseElement.last().is($(e.target))){
392                        if(e.keyCode == 9 && !e.shiftKey) $popInner.focus();
393                    }
394                }
395            });
396            $("html, body").css("overflow", "hidden");
397            /* 210527 | 접근성 | IOS Focus Issue settimeout추가 */
398            setTimeout(function(){
399                $popInner.find('.fil_tit span').attr('tabindex','0').focus();
400            },300);
401            /* //210527 | 접근성 | IOS Focus Issue settimeout추가 */
402            /* 210413 | 접근성 | 필터 팝업 초점밖으로 이동하는 ì˜
402¤ë¥˜ 수정 */
403        });
404
405        // close
406        $(".filter .btn_close").click(function(){
407            closeFilterPop();/* 210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
408        });
409
410        /* 2016.11.10 SDS 추가 영역 */
411        $(".filter .btn_apply").click(function (e) {
412            closeFilterPop();/* 210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
413        });
414        /* 2016.11.10 SDS 추가 영역 */
415        /* 210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
416        function closeFilterPop(){
417            var headHeight = $('.M00_A > .inner').height();//210413 | 접근성 | 필터 팝업 닫을때 헤더에 가려지는 오류 수정
418            var ariahidden = $("header, footer, body > div:not(#wrap), body > ul, #container > div:not(.filter), #wrap > div:not(#container)");
419            $(".filter").removeClass("on");
420            $("html, body").css("overflow", "");
421            $(window).scrollTop($(".filter .btn_filter").offset().top - headHeight);//210413 | 접근성 | 필터 팝업 닫을때 헤더에 가려지는 오류 수정
422            ariahidden.removeAttr("tabindex");
423            ariahidden.removeAttr("aria-hidden");
424            /* 210527 | 접근성 | IOS Focus Issue settimeout추가 */
425            setTimeout(function(){
426                $(".filter .btn_filter").attr("tabindex", "0").focus();
427            },300);
428            /* 210527 | 접근성 | IOS Focus Issue settimeout추가 */
429        }
430        /* //210507 | 접근성 | 팝업 밑에 텍스트 초점안가게 */
431
432        $(window).resize(function(){
433            if(SDS_COMMON.currentWidth() > SDS_COMMON.tabletWidth) {
434                $(".filter").removeClass("on");
435                $("body").css("overflow", "");
436            }
437        });
438
439        // count
440        $(".fil_con>li").each(function(i){
441            var isAll =  $(this).hasClass("all_cont");
442            counter();
443            $(this).find("input[type=checkbox]").on("change", function(e){
444                counter();
445            });
446            function counter(){
447                var size = $(".fil_con>li").eq(i).find("input[type=checkbox]:checked").length;
448                var total = isAll ? size-$(".ck_all:checked").length : size;
449                total = total==0 ? "" : "(" +total+ ")";
450                $(".fil_con>li").eq(i).find(".total").text(total);
451                if($(".fil_tab>li.date").length){
452                    $(".fil_tab>li").eq(i+1).find(".total").text(total);
453                }else{
454                    $(".fil_tab>li").eq(i).find(".total").text(total);
455                }
456
457            }
458        });
459
460        //clear
461        $(".filter .btn_clear").click(function(){
462            /* 210413 | date 필터해제 안되는 오류 수정 */
463            var lang = $("html").attr("lang") || "en";
464            var $dateBtn = $(".filter .fil_date .btn_date");
465            /* //210413 | date 필터해제 안되는 오류 수정 */
466
467            $(".filter input[type=checkbox]").prop("checked", false);
468            /* 2016.11.10 SDS 추가 영역 */
469            $(".filter input[type=radio]").prop('checked', false);
470            /* 2016.11.10 SDS 추가 영역 */
471
472            /** 20221004 필터해제 했을시 전체 체크박스는 활성화 유지 */
473            if($('.filter_wrap').hasClass('event_filter')){
474                $(".filter input#checkedAll[type=checkbox]").prop("checked", true);
475            }
476            
477            $(".filter .total").text("");
478            $(".filter .all_cont ul").not(".all").find("input[type=checkbox]").prop({"checked":true});
479            $(".filter .all_cont .all input[type=checkbox]").prop({"checked":true});
480            if($(".filter .all_cont").length>0){
481                var total = $(".filter .all_cont ul").not(".all").find("input[type=checkbox]").length;
482                $(".filter .fil_con li").eq(0).find(".total").text("("+total+")");
483                $(".filter .fil_tab li").eq(0).find(".total").text("("+total+")");
484            }
485
486            $(".filter .fil_date input").val("");
487            /* 210413 | date 필터해제 안되는 오류 수정 */
488            $dateBtn.each(function(){
489                var $this = $(this);
490
491                if($this.hasClass('start')){
492                    $this.text(langSet[lang]["calenderDate"]["dateStart"]);
493                }else if($this.hasClass('end')){
494                    $this.text(langSet[lang]["calenderDate"]["dateEnd"]);
495                }
496            });
497            /* //210413 | date 필터해제 안되는 오류 수정 */
498            startdate=null;
499            enddate=null;
500
501            // 삭제
502            // if($(".filter .date.on").length  && ($(".btn_date.end").hasClass("on") || $(".btn_date.start").hasClass("on"))) {
503            //     $("#datepicker").datepicker("destroy");
504            //     $(".filter .date.on").removeClass("on");
505            //     $(".btn_date.start, .btn_date.end").removeClass("on");
506            // }
507            $("#datepicker").datepicker("destroy"); // 추가
508            $('.fil_tab .date').removeClass('on'); // 추가
509
510            /* 2023-04 접근성 수정 시작 */
511            let startMsg = 'CALENDER ' + langSet[lang]['calenderDate']['dateStart'];
512            let endMsg = 'CALENDER ' + langSet[lang]['calenderDate']['dateEnd'];
513            let evtDateResetMsg = 'event period initialization completed';
514
515            if (lang === 'ko') {
516                startMsg = langSet[lang]['calenderDate']['dateStart'] + ' 달력 열기';
517                endMsg = langSet[lang]['calenderDate']['dateEnd'] + ' 달력 열기';
518                evtDateResetMsg = '이벤트 기간이 초기화되었습니다.';
519            }
520
521            $('.btn_date.start').attr('title', startMsg.toLowerCase());
522            $('.btn_date.end').attr('title', endMsg.toLowerCase());
523
524            if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
525                $('.fil_date > .lb').attr({ tabindex: 0 });
526            } else {
527                $('.fil_date > .emph_reset').remove();
528            }
529
530            setTimeout(function () {
531                $('.fil_date').prepend('<em class="emph_reset" role="alert" aria-atomic="true">' + evtDateResetMsg + '</em>'); // 2023-04 접근성 수정
532
533                if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
534                    $('.fil_date > .lb').focus();
535                } else {
536                    $('.btn_date.start').focus();
537                }
538            }, 1);
539
540            // alert("이벤트 기간이 초기화되었습니다.");
541            // $(".btn_date.start").focus();
542            /* // 2023-04 접근성 수정 끝 */
543        });
544
545        /* 2023-04 접근성 수정 시작 */
546        $('.fil_date > .lb').on('blur', function () {
547            $(this).removeAttr('tabindex');
548        });
549        /* // 2023-04 접근성 수정 끝 */
550
551        /* calendar */
552        var startdate = null, enddate = null, $target = null;
553        var prevText = null, nextText = null; //20210405 웹접근성추가
554        if($("html").attr("lang") == "ko") {
555            prevText = "이전 달 보기";
556            nextText = "다음 달 보기";
557        }else if($("html").attr("lang") == "en") {
558            prevText = "Prev month";
559            nextText = "Next month";
560        }else if($("html").attr("lang") == "zh") {
561            prevText = "前一个月";
562            nextText = "下个月";
563        }
564        else if($("html").attr("lang") == "pt") {
565            prevText = "mense priorem";
566            nextText = "deinde mensis";
567        }
568
569        if($(".filter .date").length) {
570            //var startdate = null, enddate = null, $target = null;
571            function getDate(date){
572                var dayName = getDay();
573                var monthNames = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
574                var date = new Date(date);
575                var day = date.getDate();
576                var monthIndex = date.getMonth();
577                var year = date.getFullYear();
578
579                var result = monthNames[monthIndex] + " " + day + "," + year;
580                if($("html").attr("lang") == "ko") {
581                    result = year+"-"+ getMM(date.getMonth()+1) + "-" + getMM(date.getDate());
582                }else if($("html").attr("lang") == "zh") {
583                    result = year+"-"+ getMM(date.getMonth()+1) + "-" + getMM(date.getDate());
584                }//170216 중문 추가
585                else if($("html").attr("lang") == "pt") {
586                    result = getMM(date.getDate()) +"/"+ getMM(date.getMonth()+1) + "/" + year;
587                }//170411 라틴 추가
588                return result;
589            }
590
591            //getDay
592            function getDay() {
593                var day = [ "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" ];
594                if($("html").attr("lang") == "ko") {
595                    day = [ "일", "월", "화", "수", "목", "금", "토" ];
596                }else if($("html").attr("lang") == "zh") {
597                    day = [ "周日", "周一", "周二", "周三", "周四", "周五", "周六" ];
598                }else if($("html").attr("lang") == "pt") {
599                    day = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"];
600                }
601                return day;
602            };
603            //getMonth
604            function getMonth() {
605                var month = ["JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER"] ;
606                if($("html").attr("lang") == "ko") {
607                    month = ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"];
608                }else if($("html").attr("lang") == "zh") {
609                    month = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"];
610                }else if($("html").attr("lang") == "pt") {
611                    month = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
612                }
613                return month;
614            }
615
616            //getMM
617            function getMM(m){
618                return m.toString().length < 2 ? "0"+m : m;
619            }
620
621            /*
622            $(".btn_date.start,.btn_date.end").keydown(function(e){
623                if(e.keyCode == 13){
624                    $target = $(e.target);
625
626                    if($("html").attr("lang") == "ko") {
627                        drawCalendar_kr(table_caption); return false;
628                    }
629
630                    drawCalendar(table_caption);
631                    $(".ui-datepicker-prev").focus();
632                }
633            });
634            $(".btn_date.start,.btn_date.end").click(function(e){
635                $target = $(e.target);
636
637                if($("html").attr("lang") == "ko") {
638                    $("#datepicker").datepicker("destroy");
639                    drawCalendar_kr(table_caption); return false;
640                }
641
642                drawCalendar(table_caption);
643            });
644            */
645
646            /* 2023-04 접근성 수정 시작 */
647            function moveDatepickerFocus({ wrapper, calendar, target }) {
648                if (typeof target !== 'undefined') {
649                    $(wrapper).siblings(calendar).find(target).attr('tabindex', 0).focus();
650                } else {
651                    $(wrapper).siblings(calendar).attr('tabindex', 0).focus();
652                }
653            }
654
655            $('.btn_clear, input[type="checkbox"][name="evt_type"]').on('focusin ', function () {
656                $('.fil_tab > li.date').removeClass('on');
657            });
658
659            $('.btn_date.start, .btn_date.end').on('click keydown', function (event) {
660                $target = $(event.target);
661                let keyCode = event.keyCode ? event.keyCode : event.which;
662                function _func() {
663                    /* 캘린더 국문 영문 분기 */
664                    if ($('html').attr('lang') == 'ko') {
665                        $('#datepicker').datepicker('destroy');
666
667                        drawCalendar_kr(table_caption);
668
669                        setTimeout(function () {
670                            // 국문 달력 초점이동을 실행합니다.
671                            moveDatepickerFocus({ wrapper: '.fil_date', calendar: '.cal_wrap', target: '.ui-datepicker-prev' });
672                        }, 1);
673
674                        return false;
675                    }
676
677                    drawCalendar(table_caption);
678
679                    setTimeout(function () {
680                        // 영문 달력 초점이동을 실행합니다.
681                        moveDatepickerFocus({ wrapper: '.fil_date', calendar: '.cal_wrap', target: '.ui-datepicker-prev' });
682                    }, 1);
683                }
684
685                if (keyCode === 9 && event.shiftKey && $(this).is('.start')) {
686                    $('.fil_tab > li.date').removeClass('on');
687                }
688
689                if (event.type === 'click') {
690                    _func();
691
692                    return;
693                }
694
695                // keydown
696                if (keyCode === 13) {
697                    _func();
698                }
699            });
700
701            $('.btn_date.start').on('blur', function () {
702                if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
703                    $('.fil_date > .lb').removeAttr('tabindex');
704                }
705
706                $('.fil_date > .emph_reset').remove();
707            });
708            /* // 2023-04 접근성 수정 끝 */
709
710            var table_caption = lang_quarter('달력표','Calendar table','Calendar table','Calendar table');
711            let _handlerValue = 'prev'; // 2023-04 접근성 수정
712
713
714            /** 글로벌 */
715            function drawCalendar(Calendar_table_caption) {
716                /* 2023-04 접근성 수정 시작 */
717                let date1 = null;
718                let date2 = null;
719
720                $('.btn_date').removeClass('on');
721                /* // 2023-04 접근성 수정 끝 */
722
723                $(".filter .date").addClass("on");
724                if(enddate != null && $target.is(".btn_date.end")) {
725                    $(".btn_date.end").addClass("on");
726                }else{
727                    $(".btn_date.start").addClass("on");
728                }
729                $("#datepicker").datepicker({
730                    defaultDate : startdate,
731                    inline : true,
732                    prevText: prevText,
733                    nextText: nextText,
734                    changeYear : true,
735                    //showButtonPanel : true,
736                    dayNamesMin: getDay(),
737                    monthNames : getMonth(),
738                    onChangeMonthYear: function(year, month, inst) {
739                        var activeEl = document.activeElement;
740                        (function () {
741                            setTimeout(function() {
742                                $("#datepicker").find('.'+activeEl.classList[0]).focus();
743                            }, 0 );
744                        })();
745
746                        setTimeout(function () {
747                            drawCalendarA11y(); // 2023-04 접근성 수정
748                        }, 1);
749                    },
750                    onSelect: function(dateText, inst) {
751                        /* 2023-04 접근성 수정 시작 */
752                        date1 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, dateText);
753                        date2 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, dateText);
754
755                        if (startdate == null && enddate == null) {
756                            // start
757                            $('#startDate').val(getDate(dateText));
758                            $('.btn_date.start').text(getDate(dateText));
759                            startdate = dateText;
760
761                            $('.btn_date').removeClass('on');
762                            $('.btn_date.start').addClass('on');
763
764                            $('#datepicker').datepicker('destroy');
765                            $('.filter .date').removeClass('on');
766
767                            /* why ? */
768                            // $('.ui-datepicker a').prop('href', '#');
769
770                            setTimeout(function () {
771                                $('.btn_date.start').attr('tabindex', '0').focus();
772                            }, 0);
773                        } else if (startdate != null && enddate == null) {
774                            // end
775                            $('#endDate').val(getDate(dateText)).change();
776                            $('.btn_date.end').text(getDate(dateText)).change();
777                            enddate = dateText;
778
779                            $('.btn_date').removeClass('on');
780                            $('.btn_date.end').addClass('on');
781                            $('#datepicker').datepicker('destroy');
782                            $('.filter .date').removeClass('on');
783
784                            /* why ? */
785                            // $('.ui-datepicker a').prop('href', '#');
786
787                            setTimeout(function () {
788                                $('.btn_date.end').attr('tabindex', '0').focus();
789                            }, 0);
790                        } else if (startdate != null && enddate != null && $target.is('.btn_date.start')) {
791                            // start
792                            if (new Date(dateText).getTime() > new Date(enddate).getTime()) {
793                                // start input 값이 존재하는 상태에서 날짜를 다시 선택했을 때 선택한 날짜의 시간 값이 end input의 날짜의 시간보다 높을 경우..
794                                $('#startDate').val(getDate(dateText));
795                                $('.btn_date.start').text(getDate(dateText));
796                                startdate = dateText;
797
798                                $('#endDate').val('');
799                                $('.btn_date.end').text('');
800                                enddate = null;
801
802                                $('.btn_date').removeClass('on');
803                                $('.btn_date.start').addClass('on');
804
805                                $('#datepicker').datepicker('destroy');
806                                $('.filter .date').removeClass('on');
807
808                                /* why ? */
809                                // $('.ui-datepicker a').prop('href', '#');
810
811                                setTimeout(function () {
812                                    $('.btn_date.start').attr('tabindex', '0').focus();
813                                }, 0);
814                            } else {
815                                $('#startDate').val(getDate(dateText)).change();
816                                $('.btn_date.start').text(getDate(dateText)).change();
817                                startdate = dateText;
818
819                                /* why ? */
820                                // $(".btn_date.end").removeClass("on");
821                                $('#datepicker').datepicker('destroy');
822                                $('.filter .date').removeClass('on');
823
824                                /* why ? */
825                                // $(".ui-datepicker a").prop("href","#")
826
827                                $target = $('.btn_date.end');
828
829                                setTimeout(function () {
830                                    $('.btn_date.end').attr('tabindex', '0').focus();
831                                }, 0);
832                            }
833                        } else if (startdate != null && enddate != null && $target.is('.btn_date.end')) {
834                            // end
835                            $('#endDate').val(getDate(dateText)).change();
836                            $('.btn_date.end').text(getDate(dateText)).change();
837                            enddate = dateText;
838
839                            /* why ? */
840                            // $('.btn_date.end').removeClass('on');
841                            $('#datepicker').datepicker('destroy');
842                            $('.filter .date').removeClass('on');
843
844                            // $('.ui-datepicker a').prop('href', '#');
845
846                            setTimeout(function () {
847                                $('.btn_date.end').attr('tabindex', '0').focus();
848                            }, 0);
849                        }
850                        /* // 2023-04 접근성 수정 끝 */
851                    },
852                    beforeShow: function(){
853                        $(".btn_date.start").addClass("on");
854                    },
855                    beforeShowDay: function(date){
856                        $(".ui-datepicker a").prop("href","#")
857                        var result = [true];
858                        if(startdate != null && enddate == null && date.getTime() < new Date(startdate).getTime()) {
859                            result = [false];
860                        }else if(startdate != null && enddate != null && date.getTime() < new Date(startdate).getTime() && $target.is(".btn_date.end")){
861                            result = [false];
862                        }else if(startdate != null && date.getTime() == new Date(startdate).getTime()){
863                            result.push("start");
864                        }else if(enddate != null && date.getTime() == new Date(enddate).getTime()){
865                            result.push("end");
866                        }
867
868                        /* 2023-04 접근성 수정 시작 */
869                        date1 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, startdate ? startdate : '');
870                        date2 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, enddate ? enddate : '');
871
872                        if (date1 <= date && date <= date2) {
873                            result.push('in-range');
874                        }
875                        /* // 2023-04 접근성 수정 끝 */
876
877                        return result;
878                    }
879                });
880                if( $(".ui-datepicker-calendar caption").length < 1 ){$("#datepicker").find(".ui-datepicker-calendar thead").before("<caption>
880" + Calendar_table_caption + "</caption>");}
881                $(".ui-datepicker a").prop("href","#");
882
883                /* 2023-04 접근성 수정 시작 */
884                setTimeout(function () {
885                    drawCalendarA11y();
886                }, 1);
887                /* // 2023-04 접근성 수정 끝 */
888            }
889
890            /** 국문 */
891            function drawCalendar_kr() {
892                $(".filter .date").addClass("on");
893                $("#datepicker").datepicker({
894                    // minDate: 0,
895                    // numberOfMonths: [3,1],
896                    defaultDate : startdate,
897                    prevText: prevText,
898                    nextText: nextText,
899                    changeMonth: false,
900                    changeYear : false,
901                    dayNamesMin: getDay(),
902                    monthNames : getMonth(),
903                    numberOfMonths: 2,
904                    showMonthAfterYear:true, //년도 먼저 나오고, 뒤에 월 표시
905                    yearSuffix: "<span>년</span>",
906                    inline : true,
907                    beforeShowDay: function(date) {
908                        var date1 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#startDate").val());
909                        var date2 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#endDate").val());
910                        var result = [true];
911                        if(startdate != null && $("#endDate").val() == 0 && date.getTime() < new Date(startdate).getTime()) {
912                            result = [false];
913                        }
914                        else 
915                        if(startdate != null && enddate != null && date.getTime() < new Date(startdate).getTime() ){
916                            result = [true];
917                        }
918                        if (date1 && date && (date1.getTime() == date.getTime())) {
919                            result.push("start-range");
920                        }
921
922                        if (date2 && date && (date2.getTime() == date.getTime())) {
923                            result.push("end-range");
924                        }
925
926                        if (date1<=date && date<=date2) {
927                            result.push("in-range");
928                            // result = [true, 'in-range', ''];
929                        }
930                        return result
931                    },
932                    onSelect: function(dateText, inst) {
933                        var date1 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#startDate").val());
934                        var date2 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#endDate").val());
935                        var selectedDate = $.datepicker.parseDate($.datepicker._defaults.dateFormat, dateText); // end day가 더 전날일 경우 조건 변수
936                        
937                        if (!date1 || date2) {
938                            /* 2023-04 접근성 수정 시작 */
939                            $('#startDate').val(dateText);
940                            $('.btn_date.start').html('<span class="blind">선택한 이벤트 시작 날짜</span> ' + getDate(dateText));
941                            startdate = dateText;
942
943                            $('#endDate').val('');
944                            $('.btn_date.end').text('');
945
946                            $('#datepicker').datepicker('destroy');
947                            $(this).datepicker();
948                            $('.filter .date').removeClass('on');
949
950                            setTimeout(function () {
951                                $('.btn_date.start').attr('tabindex', '0').focus();
952                            }, 1);
953                            /* // 2023-04 접근성 수정 끝 */
954                        } else {
955                            /* 2023-04 접근성 수정 시작 */
956                            $('#endDate').val(dateText).change();
957                            $('.btn_date.end').html('<span class="blind">선택한 이벤트 종료 날짜</span> ' + getDate(dateText));
958                            enddate = dateText;
959
960                            $('#datepicker').datepicker('destroy');
961                            $(this).datepicker();
962                            $('.filter .date').removeClass('on');
963
964                            setTimeout(function () {
965                                $('.btn_date.end').attr('tabindex', '0').focus();
966                            }, 1);
967                            /* // 2023-04 접근성 수정 끝 */
968                        }
969                    },
970                    onChangeMonthYear: function (year, month, inst) {
971                        setTimeout(function () {
972                            drawCalendarA11y(); // 2023-04 접근성 수정
973
974                            $('[data-handler="' + _handlerValue + '"]').focus(); // 2023-04 접근성 수정
975                        }, 1);
976                    }
977                });
978
979                /* 2023-04 접근성 수정 시작 */
980                setTimeout(function () {
981                    drawCalendarA11y();
982                }, 1);
983                /* // 2023-04 접근성 수정 끝 */
984            }
985
986            /* 2023-04 접근성 수정 시작 */
987            function drawCalendarA11y() {
988                let lang = $('html').attr('lang');
989                let $calendar = $('.ui-datepicker-calendar');
990
991                let currentLang = lang === 'ko';
992                let caption = currentLang ? '<caption>달력 테이블</caption>' : '';
993                let screenOut = currentLang ? '일' : '';
994                let selected = currentLang ? '일 선택됨' : 'selected';
995
996                $calendar.prepend(caption);
997                $calendar.find('.ui-state-default').parent('td').addClass('ui-datepicker-day');
998
999                $('.ui-datepicker-calendar')
1000                    .find('.ui-datepicker-day')
1001                    .each(function (index, element) {
1002                        $(element).attr('data-day', $(element).find('.ui-state-default').text());
1003                        let _attr = {
1004                            href: 'javascript:;',
1005                            // role: 'presentation none',
1006                            role: 'button',
1007                            'aria-label': `${$(element).attr('data-day')}${screenOut}`
1008                        };
1009
1010                        if ($(element).hasClass('ui-datepicker-today')) {
1011                            _attr['aria-label'] = `${$(element).attr('data-day')}${screenOut}`;
1012                        }
1013
1014                        $(element)
1015                            .find('.ui-state-default')
1016                            .removeAttr('aria-current tabindex')
1017                            .attr(_attr);
1018                    });
1019
1020                $('.ui-datepicker-calendar tbody').each(function (index, element) {
1021                    $(element)
1022                        .find('.ui-state-disabled').attr({ 'aria-hidden': true })
1023                        .find('.ui-state-default').removeAttr('href role');
1024
1025                    let _$el = $(element).find('.start, .in-range, .end, .ui-state-active');
1026                    if (currentLang) {
1027                        _$el = $(element).find('.start-range, .in-range, .end-range, .ui-state-active');
1028                    }
1029                    _$el.find('.ui-state-default').each(function (index, el) {
1030                        $(el).removeAttr('aria-current');
1031
1032                        $(el).attr({
1033                            'aria-selected': true,
1034                            'aria-label': `${$(el).closest('.ui-datepicker-day').attr('data-day')} ${selected}`
1035                        });
1036                    });
1037                });
1038                setTimeout(function () {
1039                    $('.ui-datepicker-header').find('.ui-datepicker-prev, .ui-datepicker-next').attr({
1040                        href: 'javascript:;',
1041                        // role: 'presentation none',
1042                        role: 'button'
1043                    });
1044
1045                    $('.ui-datepicker-header').find('.ui-datepicker-title').attr({
1046                        role: 'alert',
1047                        'aria-live': 'assertive',
1048                        'aria-atomic': 'true'
1049                    });
1050                }, 1);
1051            }
1052            /* // 2023-04 접근성 수정 끝 */
1053
1054            /* 2023-04 접근성 수정 시작 */
1055            $(document).on('click', '.ui-datepicker-prev, .ui-datepicker-next', function () {
1056                _handlerValue = $(this).attr('data-handler');
1057
1058                $('[data-handler="' + _handlerValue + '"]').attr('tabindex', 0);
1059            });
1060            /* // 2023-04 접근성 수정 끝 */
1061        }
1062    }
1063
1064    /* lang quarter */
1065    /* 17.02.27 */
1066    /* 팝업이나 새로고침 클릭해도 포커스 유지하는 스크립트입니다. */
1067    var reverse_focus = function (reverse_class) {
1068        $(reverse_class).click(function (){
1069            reverse_class.attr("tabindex","0");
1070        });
1071    };
1072    reverse_focus("btn_reload"); // 캡차 새로고침 포커스유지
1073    var date_search = function (focus_item) {
1074        $("#datepicker").on('keydown', focus_item, function (e) {
1075            if (e.which == 13) {
1076                $(this).trigger("click");
1077                $(focus_item).focus();
1078                if (focus_item == ".ui-state-default") {
1079                    (function () {
1080                        $("#datepicker").find(".ui-state-active").focus();
1081                    })();
1082                    setTimeout(function () {
1083                        /* 2023-04 접근성 수정 시작 */
1084                        if ($('.fil_date #startDate').val().length > 0 && $('.fil_date #endDate').val().length > 0) {
1085                            $('.filter .date').removeClass('on'); // why removeClass ?
1086                        }
1087                        /* // 2023-04 접근성 수정 끝 */
1088                    }, 0);
1089                }
1090            }
1091        });
1092    };
1093    date_search(".ui-datepicker-prev");
1094    date_search(".ui-datepicker-next");
1095    date_search(".ui-state-default");
1096
1097    $(window).load(function(){
1098        /* target_blank */
1099        /* 17.02.23 */
1100        /* target_blank에 각 나라별로 새창열기 타이틀 삽입 */
1101        $("a[target='_blank']").attr('title',lang_quarter('새창열림','new window','new window','Abrir uma nova'));
1102        /* onclick=window.open 에 새창열기 타이틀 삽입 */
1103        var idx_onclick = [];
1104        for (var i = 0; i < $("button[onclick]").length; i++) {
1105             if ($($("button[onclick]")[i]).attr('onclick').split("(")[0] == "window.open" && $($("button[onclick]")[i]).attr('target') == "window.open") { /* 210511 | 접근성 | 새창열림 예외 추가 */
1106                $($("button[onclick]")[i]).attr('title',lang_quarter('새창열림','new window','new window','Abrir uma nova'));
1107            }
1108        }
1109        /* 닫기버튼 언어별 분기처리 */
1110        $(".pop_close").wrapInner('<span class=\"blind\"></span>');
1111        $(".pop_close span").text(lang_quarter('닫기','关闭','close','close'));
1112        $(".pop_close").prepend('<i></i>');
1113    });
1114
1115    /* 2017.02.24 */
1116    /* .cnt_menu 동작시 포커스 이동 */
1117    $(".cnt_menu ul a").click(function(){
1118        cnt_menu_focus($(this).attr('href'),$(this).text());
1119        function cnt_menu_focus (input_item,menu_text) {
1120            $(input_item+" .h4").eq(0).html("<span>"+ menu_text +"</span>")
1121            $(input_item+" .h4 span").eq(0).attr("tabindex","0").focus();
1122        }
1123    });
1124
1125    /* .filter 동작시 포커스 이동 */
1126    var $fil_tab = $(".fil_tab a");
1127    var $fil_con = $(".fil_con > li");
1128
1129    /*
1130    var fn = [];
1131    for (var i = 0; i < $fil_tab.length; i++) {
1132        fn[i] = (function(idx) {
1133                return function() {
1134                    $fil_con.eq(idx).find("label:first").attr("tabindex","0").focus();
1135                }
1136        }(i));
1137        $fil_tab.eq(i).click(fn[i]);
1138    }
1139    */
1140
1141    $.each($fil_tab, function(idx, data) {
1142        var i = idx;
1143        $(data).click(function() {
1144            $fil_con.eq(idx).find("input:first").focus();
1145        });
1146        $fil_con.eq(idx).find("input").on("keydown", function(e){
1147            if(e.which == 13) {
1148                $(this).trigger("click");
1149                $(this).focus();
1150            }
1151        });
1152        $fil_con.eq(idx).find("input:last").on("keydown", function(e){
1153            if(e.which == 9 && e.shiftKey == false) {
1154                $(data).trigger("click");
1155                $(data).focus();
1156            }
1157        });
1158
1159    });
1160
1161    /* search on */
1162    var srearchCurScroll = 0;
1163    SDS_COMMON.search = {
1164        init : function() {
1165            // 네비 서치
1166            $(".search_box .sch_box .in input").on("click", function() {
1167                SDS_COMMON.search.close();
1168                SDS_COMMON.search.open2($(this));
1169                $(this).focus();
1170            });
1171            $(".search_box .sch_box .in input").on("keyup", function(){
1172                // SDS_COMMON.search.checkValue();
1173                SDS_COMMON.search.open2($(this));
1174            });
1175
1176            /**202304-01 웹접근 추가 : 키보드 접근 */
1177            //메인section2 서치 컨텐츠
1178            $(".mainSection2-search_container .main_sch_box .mainInPut .mainSection2_search").on("click", function(e) {
1179                SDS_COMMON.search.main_close();
1180                SDS_COMMON.search.open2_mainContents($(this));
1181                $(this).focus();
1182            });
1183            $(".mainSection2-search_container .main_sch_box .mainInPut .mainSection2_search").on("keyup", function(e) {
1184                SDS_COMMON.search.open2_mainContents($(this));
1185                $(this).focus();
1186            });
1187            //메인 검색 드랍다운 close 버튼 : focusout 이벤트
1188            $(".mainSection2-search_container .main_sch_box .src_closeBtn #service_close_title").on("focusout", function(e) {
1189                SDS_COMMON.search.main_close();
1190            });
1191            /** //202304-01 웹접근 추가 : 키보드 접근 */
1192                   
1193            /**추가 20221103 비디오 페이지(인사이트 서치도 관련있을수 있음) 서치 */
1194            $(".sch_box .sch_ip input").on("click", function() {
1195                SDS_COMMON.search.open($(this));
1196                $(this).focus();
1197            });
1198            $(".sch_box .sch_ip input").on("keyup", function(){
1199                SDS_COMMON.search.checkValue($(this));
1200            });
1201            
1202            $(".sch_box .sch_ip .btn_del").on("click", function(){
1203                SDS_COMMON.search.del($(this));
1204            });
1205            /** //추가 20221103 비디오 페이지(인사이트 서치도 관련있을수 있음) 서치 */
1206
1207            $(".sch_box .btn_close").on("click", function(){
1208                SDS_COMMON.search.close($(this));
1209            });
1210
1211            $(".sch_box .sch_ip .btn_sch").on("click", function(){
1212                if($(".sch_box").hasClass("on")) {
1213                    $(".sch_box").removeClass("on");
1214                    $(".keyVisualWrap, .navigationSlideGroup").removeClass("is_hide_m");
1215                }
1216                if(SDS_COMMON.isMobile()) {
1217                    $("html, body").css("overflow", "");
1218                }
1219            });
1220
1221            $(".sch_box .sch_ip .btn_sch_ip").on("click", function(){
1222                if($(".sch_box").hasClass("on")) {
1223                    $(".sch_box").removeClass("on");
1224                    $(".keyVisualWrap, .navigationSlideGroup").removeClass("is_hide_m");
1225                }
1226                if(SDS_COMMON.isMobile()) {
1227                    $("html, body").css("overflow", "");
1228                    $(window).scrollTop(srearchCurScroll);
1229                }
1230            });
1231
1232            $(".sch_quick .btn_close").on("focusout", function(){
1233                if($(".sch_box").hasClass("on")) {
1234                    // $(".sch_box").removeClass("on"); /* 202304-01 웹접근 : 삭제 */
1235                    $(".keyVisualWrap, .navigationSlideGroup").removeClass("is_hide_m");
1236                }
1237            });
1238
1239            //통합검색 수정 : 모바일 버튼
1240            $(".wrp_mo_categoryBtn").on('click', function(){
1241                $(this).closest('.wrp_category_cont').toggleClass('on');
1242            });
1243            $('.wrp_category_cont ul li a').on('click', function(e){
1244                e.preventDefault();
1245                $(this).closest('.wrp_category_cont').removeClass('on');
1246            });
1247            
1248            window.onpopstate = function(event) {
1249                if($(".sch_box").hasClass("on")) {
1250                    $(".sch_box").removeClass("on");
1251                    $(".keyVisualWrap, .navigationSlideGroup").removeClass("is_hide_m");
1252                    //SDS_COMMON.search.del();
1253                    if(SDS_COMMON.isMobile()) {
1254                        $("html, body").css("overflow", "");
1255                    }
1256                }
1257            }
1258        },
1259        /* 20221027 GNB서치,서브페이지 겹치는 오류 수정 */
1260        open : function(e){
1261            //20230419 공지사항, 알림판에서는 열리지 않게 처리
1262            var catid = $("#sch_box_id").attr("data-catid");
1263            if(catid && (catid =='kr5_26')){
1264                return;
1265            }
1266            if(!$(".sch_box").hasClass("on")) {
1267                $(".sch_box").addClass("on");
1268                //통합검색 수정 : dpn remove 걸리게
1269                // if($('.sch_quick').hasClass('dpn') === true){
1270                //     $('.sch_quick').removeClass('dpn');
1271                // }
1272                $(".search_box").find(".sch_box").removeClass("on");
1273                
1274                $(".keyVisualWrap, .navigationSlideGroup").addClass("is_hide_m");
1275                                        
1276                /**20221103 비디오 페이지(인사이트 서치도 관련있을수 있음) 서치 */
1277                if($(".sch_box .sch_ip input").val() != ""){
1278                    $(".sch_box .sch_ip .btn_sch_ip").show();
1279                    $(".sch_box .sch_ip .btn_del").show();
1280                }
1281
1282                if(SDS_COMMON.isMobile()) {
1283                    /** 20220913 검색 취소시 상단으로 이동하는 이슈 삭제 */
1284                    // $('html, body').animate({
1285                    //     scrollTop: $('body').offset().top
1286                    // }, 100);
1287                    $("html, body").css("overflow", "hidden");
1288                }
1289                // history.pushState(null, null, location.href);
1290            }
1291        },
1292
1293        main_search_open : function(e){
1294            if(!$(".main_sch_box").hasClass("on")) {
1295                $(".main_sch_box").addClass("on");
1296                $(".main-content2").addClass("dotZindex");
1297                $(".keyVisualWrap, .navigationSlideGroup").addClass("is_hide_m");
1298
1299                if(SDS_COMMON.isMobile()) {
1300                    /** 20220913 검색 취소시 상단으로 이동하는 이슈 삭제 */
1301                    // $('html, body').animate({
1302                    //     scrollTop: $('body').offset().top
1303                    // }, 100);
1304                    // $("html, body").css("overflow", "hidden"); //202304-01 웹접근 : 삭제
1305                }
1306                // history.pushState(null, null, location.href);
1307            }
1308        },
1309
1310        // 모바일 서치 클릭시 팝업
1311        open2 : function(e){
1312            if(!e.closest(".sch_box").hasClass("on")) {
1313                e.closest(".sch_box").addClass("on");
1314                $(".keyVisualWrap, .navigationSlideGroup").addClass("is_hide_m");
1315
1316                /** 20220913 검색 취소시 상단으로 이동하는 이슈 삭제 */
1317                // if(SDS_COMMON.isMobile()) {
1318                //     $('html, body').animate({
1319                //         scrollTop: $('body').offset().top
1320                //     }, 100);
1321                //     $("html, body").css("overflow", "hidden");
1322                // }
1323
1324                // history.pushState(null, null, location.href);
1325            }
1326        },
1327
1328        //202304-01 웹접근 수정 : sch_box 수정 main_sch_box
1329        open2_mainContents : function(e){
1330            if(!e.closest(".mainSection2-search_container .main_sch_box").hasClass("on")) {
1331                e.closest(".mainSection2-search_container .main_sch_box").addClass("on");
1332                $(".main-content2").addClass("dotZindex");
1333                $(".keyVisualWrap, .navigationSlideGroup").addClass("is_hide_m");
1334                if(SDS_COMMON.isMobile()) {
1335                    $("html, body").css("overflow", "visible");
1336                }
1337            }
1338        },
1339        del : function() {
1340            $(".sch_box .sch_ip .btn_del").hide();
1341            $(".sch_box .sch_ip input").val("").focus();
1342
1343            /**추가 20221103 비디오 페이지(인사이트 서치도 관련있을수 있음) 서치 */
1344            if($(".sch_box .sch_ip input").val() === ""){
1345                $(".sch_box .sch_ip .btn_sch_ip").show();
1346            }
1347        },
1348        close : function(){
1349            if($(".sch_box").hasClass("on")) {
1350                $(".sch_box").removeClass("on");
1351                $(".keyVisualWrap, .navigationSlideGroup").removeClass("is_hide_m");
1352                //SDS_COMMON.search.del();
1353                if(SDS_COMMON.isMobile()) {
1354                    $("html, body").css("overflow", "");
1355                    /** 20220913 검색 취소시 상단으로 이동하는 이슈 삭제 */
1356                    // $(window).scrollTop(srearchCurScroll);
1357                }
1358                // window.history.back();
1359            }
1360            /**추가 20221103 비디오 페이지(인사이트 서치도 관련있을수 있음) 서치 */
1361            if($(".sch_box .sch_ip input").val() != ""){
1362                $(".sch_box .sch_ip .btn_sch_ip").hide();
1363            }else {
1364                $(".sch_box .sch_ip .btn_sch_ip").show();
1365            }
1366        },
1367        main_close : function(){
1368            if($(".mainSection2-search_container .main_sch_box").hasClass("on")) {
1369                $(".main_sch_box").removeClass("on");
1370                $(".main-content2").removeClass("dotZindex");
1371                $(".keyVisualWrap, .navigationSlideGroup").removeClass("is_hide_m");
1372                //SDS_COMMON.search.del();
1373                if(SDS_COMMON.isMobile()) {
1374                    $("html, body").css("overflow", "");
1375                    /** 20220913 검색 취소시 상단으로 이동하는 이슈 삭제 */
1376                    // $(window).scrollTop(srearchCurScroll);
1377                }
1378                // window.history.back();
1379            }
1380        },
1381        checkValue : function() {
1382            var elInput = $(".sch_box .sch_ip input");
1383
1384            /** 통합검색 hide,show 순서 수정 */
1385            if(elInput.val() != ""){
1386                SDS_COMMON.search.open();
1387                $(".sch_box .sch_ip .btn_del").show();
1388            }else {
1389                $(".sch_box .sch_ip .btn_del").hide();
1390            }
1391            /** //통합검색 hide,show 순서 수정 */
1392        },
1393
1394        main_checkValue : function() {
1395            var elInput = $(".main_sch_box .sch_ip input");
1396
1397            if(elInput.val() != ""){
1398                SDS_COMMON.search.main_search_open();
1399                // $(".main_sch_box .sch_ip .btn_del").show(); //통합검색 hide,show 순서 수정
1400            }else {
1401                // $(".main_sch_box .sch_ip .btn_del").hide(); //통합검색 hide,show 순서 수정
1402            }
1403        }
1404    }
1405    SDS_COMMON.search.init();
1406
1407
1408    /* tab */
1409    $(".tab_wrap").each(function(i){
1410        var $this = $(this);
1411        if($this.find(">.tab>ul>li").length == 2) {
1412            $this.find(">.tab").addClass("half");
1413        }
1414
1415        $this.find(">.con").attr({'role':'tabpanel'});
1416        $this.find(">.tab ul > li > a").click(function(e){
1417            if(!$(this).hasClass('openLink')) {
1418                e.preventDefault();
1419                if($this.find(">.tab ul > li").length <= 1) return false;
1420                $this.find(">.tab li").removeClass("on");
1421                $this.find(">.tab .tab_sel").attr('aria-expanded','false');
1422                var index = $(this).parent().addClass("on").index();
1423                $this.find(">.tab .tab_sel .txt").text($(this).text());
1424
1425                if($this.find(">.con").length || $this.hasClass("type1")){
1426                    $this.find(">.con").hide().eq(index).show();
1427                    $this.find(">.tab").removeClass("on");
1428                }else{
1429                    window.open($(this).attr("href"), "_self");
1430                }
1431
1432                if($this.find(">.tab ul > li").hasClass('on')){
1433                    $this.find(">.tab ul > li a").attr({'aria-selected':false});
1434                    $this.find(">.tab ul > li.on a").attr({'aria-selected':true});
1435                }
1436            }
1437        });
1438    });
1439
1440    $(".tab_m").each(function(i){
1441        $(this).find("li").addClass("on").siblings().removeClass("on");
1442    });
1443
1444    $(window).resize(function(){
1445        if(!SDS_COMMON.isMobile()){
1446
1447            $(".office_ac").each(function(i){
1448                if(!$(this).find(">li.on").length){
1449                    $(this).find(">li").eq(0).addClass("on").find(">div").show();
1450                }
1451            });
1452        }
1453
1454    });
1455
1456    $(".tab_sel").attr({'id':'tab_sel_control','role':'button','aria-expanded':false, 'aria-controls':'tab_sel_list'});
1457    $(".tab_sel").siblings('ul').attr({'id':'tab_sel_list', 'role':'tablist', 'aria-labelledby':'tab_sel_control'});
1458    $('#tab_sel_list a').attr({'role':'tab','aria-selected':false});
1459    $('#tab_sel_list li.on a').attr({'role':'tab','aria-selected':true});
1460    if($("html").attr("lang") == "ko") {
1461        var txt = $(".tab_sel").text();
1462        $(".tab_sel, .cnt_menu .sel").attr({'title':'카테고리 선택 리스트 더 보기'});
1463        $(".tab_sel").text('');
1464        $(".tab_sel").append("<span class='txt'></span>");
1465        $(".tab_sel .txt").text(txt);
1466        $(".tab_sel, .cnt_menu .sel").append("<span class='is_blind'>카테고리 선택 리스트 더 보기</span>");
1467    }
1468    else {
1469        var txt = $(".tab_sel").text();
1470        $(".tab_sel, .cnt_menu .sel").attr({'title':'View more menu'});
1471        $(".tab_sel").text('');
1472        $(".tab_sel").append("<span class='txt'></span>");
1473        $(".tab_sel .txt").text(txt);
1474        $(".tab_sel, .cnt_menu .sel").append("<span class='is_blind'>View more menu</span>");
1475    }
1476    $(".tab_wrap .tab_sel").click(function(e){
1477        $(this).parent().toggleClass("on");
1478        if ($(this).parent().hasClass("on")){
1479            $(this).attr('aria-expanded','true');
1480        }else{
1481            $(this).attr('aria-expanded', 'false');
1482        }
1483    });
1484
1485    $(".tab_wrap").not(".type3").each(function(i){
1486        var $target = $(this);
1487        tabFixing($target);
1488        $target.find(".tab>ul>li>a").click(function(){
1489            var top = $target.offset().top;
1490            if($(window).scrollTop() > top) {
1491                $(window).scrollTop(top);
1492            }
1493        });
1494
1495        $(window).resize(function(e){
1496            tabFixing($target);
1497        });
1498
1499        $(window).scroll(function(e){
1500            tabFixing($target);
1501        });
1502
1503    });
1504
1505    function tabFixing($target){
1506        var $tab = $target.find(".tab");
1507        var top = $target.offset().top;
1508
1509        var fixed = $tab.css("position") == "fixed";
1510        if(SDS_COMMON.isMobile()){
1511            if(!fixed && $(window).scrollTop() > top){
1512                $tab.addClass("fixed");
1513                $tab.parent().addClass("fixed");
1514            }else if(fixed && $(window).scrollTop() > top){
1515
1516            }else{
1517                $tab.removeClass("fixed").css("top", "");
1518                $tab.parent().removeClass("fixed");
1519            }
1520        }else{
1521            $tab.removeClass("fixed");
1522        }
1523    }
1524
1525
1526    /* 210525 | A링크 클릭시 스크롤 이벤트 추가 */
1527    $(function() { 
1528        $('.indi_scl li a[href*=#]:not([href=#])').click(function() {           
1529            if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 
1530                var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']');        
1531                var replaceText = $(this).text();   
1532            
1533                if (target.length) {  
1534                    $('.indi_scl li a').attr('aria-selected','false');                          
1535                    $('.indi_scl li a').parent().removeClass('on');    
1536                    $(this).attr('aria-selected','true');                    
1537                    $(this).parent().addClass('on');
1538                    $('.indi').removeClass('on');
1539                    $('.indi_sel .txt').text(replaceText);                  
1540
1541                    if($(window).innerWidth() < 768){
1542                        $('.indi_wrap, .indi').addClass('fixed');
1543                        $('html,body').animate({ scrollTop: target.offset().top - 60 }, 1000); 
1544                    }else{
1545                        $('.indi_wrap, .indi').removeClass('fixed');
1546                        $('html,body').animate({ scrollTop: target.offset().top }, 1000); 
1547                    }                     
1548                    return false;                
1549                }                 
1550            }
1551        }); 
1552    }); 
1553
1554    $(window).on("scroll", function(){
1555        var currentScroll = $(document).scrollTop();
1556        if($(window).innerWidth() < 768 && currentScroll > 60){
1557            $('.indi_wrap, .indi').addClass('fixed');
1558  
1559        }else{
1560            $('.indi_wrap, .indi').removeClass('fixed');     
1561        }    
1562    })
1563
1564    $(".indi_sel").attr({'id':'indi_sel_control','role':'button','aria-expanded':false, 'aria-controls':'indi_sel_list'});
1565    $(".indi_sel").siblings('ul').attr({'id':'indi_sel_list', 'role':'tablist', 'aria-labelledby':'indi_sel_control'});
1566    $('#indi_sel_list a').attr({'role':'tab','aria-selected':false});
1567    $('#indi_sel_list li.on a').attr({'role':'tab','aria-selected':true});
1568    if($("html").attr("lang") == "ko") {
1569        var txt = $(".indi_sel").text();
1570        $(".indi_sel, .cnt_menu .sel").attr({'title':'카테고리 선택 리스트 더 보기'});
1571        $(".indi_sel").text('');
1572        $(".indi_sel").append("<span class='txt'></span>");
1573        $(".indi_sel .txt").text(txt);
1574        $(".indi_sel, .cnt_menu .sel").append("<span class='is_blind'>카테고리 선택 리스트 더 보기</span>");
1575    }
1576    else {
1577        var txt = $(".indi_sel").text();
1578        $(".indi_sel, .cnt_menu .sel").attr({'title':'View more menu'});
1579        $(".indi_sel").text('');
1580        $(".indi_sel").append("<span class='txt'></span>");
1581        $(".indi_sel .txt").text(txt);
1582        $(".indi_sel, .cnt_menu .sel").append("<span class='is_blind'>
1582View more menu</span>");
1583    }
1584
1585    $(".indi_wrap .indi_sel").click(function(e){
1586        $(this).parent().toggleClass("on");
1587        if ($(this).parent().hasClass("on")){
1588            $(this).attr('aria-expanded','true');
1589        }else{
1590            $(this).attr('aria-expanded', 'false');
1591        }
1592    });
1593    
1594    /* //210525 | A링크 클릭시 스크롤 이벤트 추가 */
1595
1596
1597    /* selectbox */
1598    $(".selectbox .sel").each(function(i){
1599        $(this).click(function(e){
1600            var $sel = $(".selectbox .sel").eq(i).parent();
1601            $(".selectbox dt.on").not($sel).removeClass("on");
1602            if($sel.hasClass("on")){
1603                $sel.removeClass("on");
1604                $("html, body").css("overflow", "");
1605            }else{
1606                $sel.addClass("on");
1607                if(SDS_COMMON.isMobile()) {
1608                    $("html, body").css("overflow", "hidden");
1609                }
1610            }
1611        });
1612    });
1613
1614    $(".selectbox").each(function(i){
1615        var $select = $(this);
1616        $(this).find("dd a").click(function(){
1617            $select.find("dd a.on").removeClass("on");
1618            $(this).addClass("on");
1619            if($(this).parents(".selectbox.type2").length) {
1620                $select.find("dt .sel").val($(this).text()).end().find("dt").toggleClass("on");
1621            }else{
1622                $select.find("dt .sel").html($(this).html()).end().find("dt").toggleClass("on");
1623            }
1624            $select.find(".sel").focus();
1625            $("html, body").css("overflow", "");
1626        });
1627    });
1628
1629    $(".selectbox .btn_close").click(function(){
1630        $(this).parents(".selectbox").find("dt").removeClass("on");
1631        $(this).parents(".selectbox").find(".sel").focus();
1632        $("html, body").css("overflow", "");
1633    });
1634    //
1635
1636    /* let's btn */
1637    if($("#lets .btn_btm button").length>1){
1638        $("#lets .btn_btm").addClass("type1");
1639    };
1640
1641    /** share 
1642    shareTip.init();
1643    $(document).on("click", ".btn_share, .cnt_menu .btn2, .hd_etc .btn2, .btn_share2, .thumb_share, .post_share, .evecom_nav_sns_share", function(e){
1644        e.preventDefault();
1645        shareTip.click($(this));
1646    });
1647*/
1648
1649    /* overseas */
1650    $(".office_ac").each(function(){
1651        var $this = $(this);
1652
1653        if(SDS_COMMON.isMobile()) {
1654            $this.find(">li.on").removeClass("on").find(">div").hide();
1655            if($("html").attr("lang") == "ko"){
1656                if($this.parents().is('#tab1')){
1657                    $this.find(">li").first().addClass("on").find(">div").show();
1658                }
1659
1660            }
1661        }
1662        $this.attr('role','tablist');
1663        $this.find('li>div').attr('role','tabpanel');
1664        $this.find('li>a').attr({'role':'tab', 'aria-selected':'false'});
1665        if($this.find('li').hasClass('on')){
1666            $this.find('li.on a').attr({'aria-selected':'true'});
1667        }
1668        $(this).find(">li>a").on("click", function(){
1669            if(SDS_COMMON.isMobile()) {
1670                if($(this).parent().hasClass("on")) {
1671                    $(this).next().slideUp();
1672                    $(this).parent().removeClass("on");
1673                    $(this).attr({'aria-selected':'false'});
1674                }else {
1675                    $this.find(">li.on>div").slideUp();
1676                    $this.find(">li.on").removeClass("on");
1677                    $this.find('li>a').attr({'aria-selected':'false'});
1678                    $(this).next().slideDown(500, function(){
1679                        var _pos = $(this).closest("li").offset(),
1680                            _top = _pos.top
1681                        $("html, body").stop().animate({ scrollTop: _top -50}, 300);
1682
1683                    });
1684                    $(this).attr({'aria-selected':'true'});
1685                    $(this).parent().addClass("on");
1686                }
1687            }else{
1688                if($(this).parent().hasClass("on")) {
1689                }else {
1690                    $this.find('li>a').attr({'aria-selected':'false'});
1691                    $(this).attr({'aria-selected':'true'});
1692                }
1693                $this.find(">li.on").removeClass("on").find(">div").hide();
1694                $(this).parent().addClass("on").end().next().show();
1695            }
1696        });
1697    });
1698
1699
1700
1701    /* select */
1702    $(".ip_select select").each(function(e){
1703        $(this).val(-1);
1704    });
1705    $(".ip_select select").change(function(e){
1706        $(this).next().is("input") ? $(this).next().val($(this).find(":selected").text()) : $(this).next().text($(this).find(":selected").text()).css("color", "black");
1707
1708        if ($(".select_group_1 :radio").length > 1) {
1709            var radios = $(".select_group_1 :radio");
1710            var index = radios.index(radios.filter(':checked'));
1711            if (index != this.selectedIndex) {
1712                radios[this.selectedIndex].checked = true;
1713            }
1714        }
1715    });
1716
1717    $(".select_group_1 :radio").change(function(e) {
1718        var index = $(".select_group_1 :radio").index(this);
1719        $(".select_group_1 select").prop('selectedIndex', index).change();
1720    });
1721
1722    // all check
1723    $(".check_msg.type1").allCheck();
1724    $(".check_msg.type1").allCheckSync();
1725    $(".term_box").allCheckSync();
1726
1727    // $(".check_msg li input[type='checkbox']").attr("tabindex","-1");
1728    // $(".check_msg li label span[class='icon']").attr({
1729    //  tabindex : 0,
1730    //  role : "checkbox"
1731    // }).keydown(function(e){
1732    //  if(e.keyCode == 13){
1733    //      $(this).closest("li").find("input[type='checkbox']").trigger("click");
1734    //  }
1735    // });
1736
1737    // financial
1738    if($("#fine_wrap").length) {
1739        $("#fine_wrap .tab a").not(".tab_sel").click(function(){
1740            if($(this).parent().is(".t_cr")) {
1741                $("#fine_wrap > .tab").css("visibility", "hidden");
1742            }else{
1743                $("#fine_wrap > .tab").css("visibility", "visible");
1744            }
1745
1746        });
1747
1748        $("#sel_qt_year").change(function(e){
1749            var val = $(this).val();
1750            $(this).find("option").each(function(i){
1751                val == $(this).val() ? $("."+$(this).val()).show() : $("."+$(this).val()).hide();
1752            });
1753
1754        });
1755        $("#sel_each_year").change(function(e){
1756            var val = $(this).val();
1757            $(this).find("option").each(function(i){
1758                val == $(this).val() ? $("."+$(this).val()).show() : $("."+$(this).val()).hide();
1759            });
1760
1761        });
1762
1763        $(".tb_fin_m").each(function(){
1764            var $this = $(this);
1765            hidecol(1);
1766
1767            function hidecol(index){
1768                $this.find("tr").each(function(i){
1769                    var size = $(this).children().length;
1770                    for(i=0;i<size;i++){
1771                        if(i != 0 && i != index) {
1772                            $(this).children().eq(i).hide();
1773                        }else{
1774                            $(this).children().eq(i).show();
1775                        }
1776                    }
1777                });
1778            }
1779
1780            //paging
1781            $this.find("button").click(function(e){
1782                var $items = $this.find(".pg_area>strong");
1783
1784                if($(this).parents(".pg_area").hasClass("year")){
1785                    if($(this).hasClass("btn_prev")){
1786                        var index = $this.find(".pg_area>strong.on").index();
1787                        var size = $items.length;
1788                        size > index ? $items.removeClass("on").eq(index).addClass("on") : $items.removeClass("on").eq(0).addClass("on");
1789                    }else{
1790                        var index = $this.find(".pg_area>strong.on").index();
1791                        var size = $items.length;
1792                        $items.removeClass("on").eq(index-2).addClass("on");
1793                    }
1794
1795                    hidecol($this.find(".pg_area>strong.on").index());
1796
1797                }else{
1798                    if($(this).hasClass("btn_next")){
1799                        var index = $this.find(".pg_area>strong.on").index();
1800                        var size = $items.length;
1801                        size > index ? $items.removeClass("on").eq(index).addClass("on") : $items.removeClass("on").eq(0).addClass("on");
1802                    }else{
1803                        var index = $this.find(".pg_area>strong.on").index();
1804                        var size = $items.length;
1805                        $items.removeClass("on").eq(index-2).addClass("on");
1806                    }
1807
1808                    hidecol($this.find(".pg_area>strong.on").index());
1809                }
1810
1811            });
1812        });
1813    }
1814
1815
1816
1817    //career
1818    if($(".abt_job_acc").length){
1819        var url = unescape(location.href);
1820        var pm  = url.split('?');
1821        var params   = pm[1].split('&');
1822        for( var i=0; i<params.length; i++ ){
1823            var param = params[i].split('=');
1824
1825            $(".abt_job_acc li").eq(param[1]).find("a").trigger("click");
1826        }
1827    }
1828
1829    //sns_icon
1830    if($(".sns_icon").length) {
1831
1832        $(".sns_icon a").hover(function(){
1833            if(!SDS_COMMON.isMobile()) {
1834                var src = $(this).find("img").attr("src").replace(".png","_hover.png");
1835                $(this).find("img").attr("src", src);
1836            }
1837        }, function(){
1838            if(!SDS_COMMON.isMobile()) {
1839                var src = $(this).find("img").attr("src").replace("_hover.png",".png");
1840                $(this).find("img").attr("src", src);
1841            }
1842        });
1843
1844    }
1845
1846     /** 20221123 matchHeight 적용 */
1847    if($(".ev_showcase").length) {
1848        var eventLine_mh = $('.ev_showcase'),
1849        eventLine_p = eventLine_mh.find('.show_list li dl dd p:first-child'),
1850        eventLine_dt = eventLine_mh.find('.show_list li dl dt');
1851        
1852        eventLine_p.matchHeight();             
1853        eventLine_dt.matchHeight();
1854    }
1855    /** //20221123 matchHeight 적용 */
1856                                       
1857                                       
1858
1859    //event layout
1860    $('.ev_layout .show_list:not(.custom)').each(function(){
1861        var num = $(this).children().length;
1862        if(num == 1){
1863            $(this).addClass('one');
1864        }else if(num == 2){
1865            $(this).addClass('two');
1866        }else if(num == 4){
1867            $(this).addClass('four')
1868        }else if(num == 5){
1869            $(this).addClass('five')
1870        }else if(num == 6){
1871            $(this).addClass('six')
1872        }
1873    })
1874    $('.ev_showcase .sel_tab a').click(function(e){
1875        var target = $(this).attr('href');
1876        $(this).parent().addClass('on').siblings().removeClass('on');
1877        $('.show_ind_con .con').removeClass('on').removeClass('swiper-slide-active');
1878        $(target).addClass('on').addClass('swiper-slide-active');
1879        return false;
1880    })
1881    $('.ev_speakers').each(function(){
1882        var thum_num = $(this).find('.thum_list').find('li').length;
1883        if(thum_num == 1){
1884            $(this).find('.thum_list').addClass('one')
1885        }else if(thum_num == 2){
1886            $(this).find('.thum_list').addClass('two')
1887        }
1888    })
1889
1890
1891    $('.ev_agenda').each(function(){
1892        $(this).find('.tab_con_wrap').attr({'role':'tablist'});
1893        $(this).find('.btn_expanded').attr({'role':'tab', 'aria-expanded':'false'});
1894        $(this).find('.scd_wrap').attr('role','tabpanel');
1895        $(this).find('.sort_area>ul').attr('role','tablist');
1896        $(this).find('.sort_area>ul li a').attr({'role':'tab', 'aria-selected':'false'});
1897        $(this).find('.sort_area>ul li.on a').attr('aria-selected', true);
1898
1899        $(this).find('.sort_area').find('a').click(function(e){
1900            var target = $(this).attr('href');
1901            $(this).parent().addClass('on').siblings().removeClass('on');
1902            $('.ev_agenda .sort_area li a').attr('aria-selected',false);
1903            $(this).attr('aria-selected',true);
1904            $('.ev_agenda .scd_list').removeClass('on');
1905            $(target).addClass('on');
1906            return false;
1907        })
1908        var num = $(this).find('.sort_area').find('li').length;
1909        if(num == 0){
1910            $(this).addClass('none');
1911        }else if(num == 1){
1912            $(this).addClass('one');
1913        }else if(num > 1){
1914            $(this).addClass('more')
1915        }
1916        $('.ev_agenda .btn_expanded').click(function(){
1917            var idx = $(this).parent().index();
1918            if($(this).parent('.scd_list').hasClass('on')){
1919                $('.scd_list').eq(idx).find('.scd_wrap').slideUp();
1920                $('.scd_list').eq(idx).removeClass('on');
1921                $(this).attr({'aria-selected':'false','aria-expanded':'false'});
1922            }else{
1923                $('.scd_list').eq(idx).find('.scd_wrap').slideDown();
1924                $('.scd_list').eq(idx).addClass('on');
1925                $(this).attr({'aria-selected':'true','aria-expanded':'true'});
1926            }
1927            $('.ev_agenda .sort_area li').eq(idx).addClass('on').siblings().removeClass('on');
1928        })
1929
1930        $('.ev_agenda .sort_area button').on('click', function(){
1931            if($(this).hasClass('on')){
1932                $('.scd_list').find('.scd_wrap').slideUp();
1933                $('.scd_list').removeClass('on');
1934                $(this).html(lang_quarter('전체 열기','全部打开','OPEN ALL','ABRIR TUDO'))
1935                $(this).removeClass('on')
1936            }else{
1937                $('.scd_list').find('.scd_wrap').slideDown();
1938                $('.scd_list').addClass('on');
1939                $(this).html(lang_quarter('전체 닫기','全部关闭','CLOSE ALL','FECHAR TUDO'))
1940                $(this).addClass('on')
1941            }
1942        })
1943        if($(this).hasClass('more')){
1944            if(SDS_COMMON.currentWidth() < 767){
1945                $('.scd_list').removeClass('on');
1946            }
1947        }
1948        var tabIdx = $(this).find('.sort_area').find('li').length;
1949        if(tabIdx == 0){
1950            $('.btn_expanded').hide();
1951        }
1952
1953    })
1954    $('.scd_list li br').each(function(){
1955        $(this).parents('li').addClass('t_row')
1956    })
1957    if($('.show_ind_con .con').length > 1){
1958        var mySwiper = undefined;
1959        function initSwiper() {
1960            var screenWidth = $(window).width();
1961            if(screenWidth < 767 && mySwiper == undefined) {
1962                var focusableEl = 'a, select, button, textarea, input, area';
1963                mySwiper = new Swiper('.show_ind_con', {
1964                    speed : 700,
1965                    resistance: false,
1966                    loop : true,
1967                    slidesPerView: 'auto',
1968                    loopAdditionalSlides : 0 ,
1969                    pagination: '.show_ind_con .swiper-pagination',
1970                    paginationElement :'a href',
1971                    paginationClickable: true,
1972                    followFinger : false,
1973                    onSlideChangeEnd: function(swiper) {
1974                        swiper.slides[swiper.realIndex+swiper.loopedSlides].focus();
1975                        $('.swiper-slide').attr({'tabindex':'-1','aria-hidden':'true'});
1976                        $('.swiper-slide').find(focusableEl).attr({'tabindex':'-1','aria-hidden':'true'});
1977                        $('.swiper-slide-active').attr({'tabindex':'0','aria-hidden':'false'});
1978                        $('.swiper-slide-active').find(focusableEl).attr({'tabindex':'0','aria-hidden':'false'});
1979                        $('.swiper-slide-duplicate').attr({'tabindex':'-1','aria-hidden':'true'});
1980                        $('.swiper-slide-duplicate').find(focusableEl).attr({'tabindex':'-1','aria-hidden':'true'});
1981                        $('.swiper-slide-duplicate-active').attr({'tabindex':'-1','aria-hidden':'true'});
1982                        $('.swiper-slide-duplicate-active').find(focusableEl).attr({'tabindex':'-1','aria-hidden':'true'});
1983                    },
1984                    paginationBulletRender : function(swiper, index){
1985                        return '<a href="#" class="swiper-pagination-bullet" title="go to slide">' + (index + 1) + 'slide</a>'
1986                    }
1987                });
1988                $('.swiper-slide').attr({'tabindex':'-1','aria-hidden':'true'});
1989                $('.swiper-slide').find(focusableEl).attr({'tabindex':'-1','aria-hidden':'true'});
1990                $('.swiper-slide-active').attr({'tabindex':'0','aria-hidden':'false'});
1991                $('.swiper-slide-active').find(focusableEl).attr({'tabindex':'0','aria-hidden':'false'});
1992                $('.swiper-slide-duplicate').attr({'tabindex':'-1','aria-hidden':'true'});
1993                $('.swiper-slide-duplicate').find(focusableEl).attr({'tabindex':'-1','aria-hidden':'true'});
1994                $('.swiper-slide-duplicate-active').attr({'tabindex':'-1','aria-hidden':'true'});
1995                $('.swiper-slide-duplicate-active').find(focusableEl).attr({'tabindex':'-1','aria-hidden':'true'});
1996            } else if (screenWidth > 767 && mySwiper != undefined) {
1997                mySwiper.destroy();
1998                mySwiper = undefined;
1999                jQuery('.swiper-wrapper').removeAttr('style');
2000                jQuery('.swiper-slide').removeAttr('style');
2001            }
2002        }
2003        initSwiper();
2004        $(window).on('resize', function(){
2005            initSwiper();
2006        });
2007    }
2008
2009    if($('.btn_go_top').length > 0){
2010        $('.btn_go_top a').click(function(e){
2011            e.preventDefault();
2012            var target = $(this).attr('href');
2013            var targetTop = $(target).offset().top - 50;
2014            $('html, body').animate({scrollTop : targetTop + 'px'},300)
2015        })
2016    }
2017    $('.m_survey_acc .acc_list  a').click(function(){
2018        if($(this).parent().hasClass('on')){
2019            $(this).parent().removeClass('on');
2020            $(this).siblings('.sub_con').slideUp();
2021        }else{
2022            $(this).parent().addClass('on').siblings().removeClass('on');
2023            $('.m_survey_acc .sub_con').slideUp();
2024            $(this).siblings('.sub_con').slideDown();
2025        }
2026    })
2027    var windowWidth = $(window).width();
2028    $(window).resize(function(){
2029        if($(window).width() != windowWidth){
2030            windowWidth = $(window).width();
2031            $('.ev_agenda').each(function(e){
2032                if(!SDS_COMMON.isMobile()){
2033                    if(!$(this).find(".scd_list.on").length || $(this).find(".scd_list.on").length > 1){
2034                        $(this).find('.sort_area li').first().addClass('on').siblings().removeClass('on');
2035                        $(this).find('.scd_list').first().addClass('on').siblings().removeClass('on');
2036                    }
2037                }else{
2038                    if($(this).hasClass('more')){
2039                        $('.scd_list').removeClass('on');
2040                        $('.scd_wrap').hide();
2041                    }
2042                }
2043                $(this).find('.btn_expanded').attr({'aria-expanded':'false'});
2044                $(this).find('.sort_area>ul li a').attr({'aria-selected':'false'});
2045                $(this).find('.sort_area>ul li.on a').attr('aria-selected', true);
2046            })
2047        }
2048    })
2049
2050    if($(".monial_tab").length > 0){
2051        var $monial_tab_item = $(".monial_tab_item");
2052        var $monial = $(".monial");
2053
2054        $monial_tab_item.click(function(e){
2055            var $this = $(this);
2056            var $this_monial = $("#"+$this.attr("data-id"));
2057
2058            $monial_tab_item.removeClass("active");
2059            $this.addClass("active");
2060
2061            $monial.hide();
2062            $this_monial.show();
2063
2064        });
2065
2066    }
2067
2068    if($(".cntTab").length > 0){
2069        $('.cntTab').each(function(index) {
2070            var $cntTab_item = $(this);
2071
2072            var $is_changBackground = $cntTab_item.find('.is_changBackground');
2073            var $cntTab_item_on = $cntTab_item.find('.on');
2074            var $cntTab_item_on_url = $cntTab_item_on.attr("data-url");
2075            var $cntTab_desc = $cntTab_item.find('.cntTab_desc');
2076            var $cntTab_item_btn = $cntTab_item.find('.cntTab_item');
2077
2078            $is_changBackground.css('background-image', $cntTab_item_on_url);
2079
2080            $cntTab_item_btn.click(function(){
2081                var $this = $(this);
2082                var $data_url = $this.attr("data-url");
2083                $cntTab_item_btn.removeClass('on');
2084                $cntTab_item.find('.cntTab_left .text').removeClass('current').attr('tabindex','');
2085                $this.addClass('on');
2086
2087                $is_changBackground.css('background-image',$data_url);
2088
2089                for (let i = 0; i < $cntTab_item_btn.length; i++) {
2090                    if ($cntTab_item_btn.eq(i).hasClass('on')) {
2091                        $cntTab_desc.eq(i).addClass('current').attr('tabindex',0).focus();
2092                    }
2093                }
2094            });
2095        });
2096    }
2097
2098    if($(".btn_chart").length > 0){
2099        var $btn_chart = $(".btn_chart");
2100        var $btn_chart_img = $(".btn_chart img");
2101        var $btn_chart_img_src = $btn_chart_img.attr("src");
2102        var $btn_chart_img_src_base = $btn_chart_img_src.substring(0, $btn_chart_img_src.length - 5);
2103        var $btn_chart_button = $(".btn_chart button");
2104
2105        if ($(".change").length > 0) {
2106            var $btn_change = $(".change");
2107        }
2108
2109        $btn_chart_button.click(function(e){
2110            var this_num = e.currentTarget.id.split("btn_chart")[1];
2111            $btn_chart_img.attr("src",$btn_chart_img_src_base + this_num + ".jpg");
2112            if ($btn_change.length > 0) {
2113                $btn_change.hide();
2114                $btn_change.eq(this_num-1).show();
2115            }
2116        });
2117    }
2118
2119    if($(".solu_dep_chart").length > 0){
2120        var $solu_dep_item = $("a.solu_dep_item");
2121        var $solu_dep_chart = $(".solu_dep_chart");
2122
2123        if ($(".change").length > 0) {
2124            var $btn_change = $(".change");
2125        }
2126
2127        $solu_dep_item.click(function(e){
2128            var $this = $(this);
2129            if (!$this.hasClass('active')) {
2130                $this.parents('.solu_dep_chart').find('.solu_dep_item.active').removeClass('active');
2131                $this.addClass('active');
2132                $this.parents('.ul_im.im_center').find('.solu_viewer .im.change').hide().filter($this.attr('href')).show();
2133            }
2134            return false;
2135        });
2136    };
2137
2138
2139    if($('.abt_bns_list .dot_txt').length > 0){
2140        $('.abt_bns_list').find('.text').addClass('fixed_h');
2141    }
2142
2143    /* is_siblingsClose */
2144    if($('.is_siblingsClose').length) {
2145        $('.is_siblingsClose').each(function() {
2146            $(this).on('click', function () {
2147                $(this).parents('.forum_radio').siblings().find('input').each(function() {
2148                    this.checked = false;
2149                });
2150            });
2151        });
2152    }
2153    /* //is_siblingsClose */
2154
2155    /* set tabindex = 0 */
2156    // var focusableElement = {
2157    //     target : $('.reporting_item'),
2158    //     setTabIndexToZero : function(){
2159    //         if(this.target.attr('tabindex')!== null){
2160    //             this.target.prop('tabindex','0');
2161    //         }
2162    //         else{
2163    //             this.target.attr('tabindex','0');
2164    //         }
2165    //     }
2166    // }
2167    // focusableElement.setTabIndexToZero();
2168
2169    /* file attachment */
2170    var ipFile = {
2171        fileBox : $('.att_file'),
2172        deleteBtnFocus : function(){
2173            this.fileBox.each(function(){
2174                var self = $(this);
2175                var attachmentBtn = self.find('#atta_file');
2176                $(document).on('click', '.att_file .ico_del', function() {
2177                    attachmentBtn.focus();
2178                });
2179            });
2180        },
2181    }
2182    ipFile.deleteBtnFocus();
2183});
2184function focusForm() {
2185    $('.ev_overview .ul_ip li').first().find('input').focus();
2186}
2187
2188/* share */
2189/**
2190var shareTip = {
2191    $cizion :    '<div id="lv-widget" data-id="samsung_sds" data-uid="MTIxNC8yNzg2NC80NDQy">' +
2192        '<script type="text/javascript">' +
2193        "window.livereWidgetOptions = {" +
2194        "list: ["+lang_quarter('"facebook"','"weibo_sina"','"facebook"','"facebook"')+", "+lang_quarter('"linkedIn"','"linkedIn"','"linkedIn"','"linkedIn"')+", "+lang_quarter('"twitter"','"renren"','"twitter"','"twitter"')+", "+lang_quarter('"kakaotalk"','""','""','""')+"]" +
2195        ",customCss: 'https://cdn-city.livere.com/consumers/sds/sds.css'" +
2196        ",kakaoAppKey: 'cbee93b45350bab6359a13c3ad1be5eb'" +
2197        ",lazy: true" +
2198        ",lang: '"+lang_quarter('ko','zh_cn','en','la')+"'" +
2199        ",height: '115px'" +
2200        "};" +
2201        "(function(d, s) {var j, e = d.getElementsByTagName(s)[0];if (typeof Toybox === 'function') { return; }j = d.createElement(s);j.src = 'https://cdn-city.livere.com/js/toybox.dist.js';j.async = true;e.parentNode.insertBefore(j, e);})(document, 'script');" +
2202        '</script>' +
2203        '<noscript>라이브리 댓글 작성을 위해 JavaScript를 활성화 해주세요.</noscript>' +
2204        '</div>',
2205
2206    el :   '<div class="share_wrap" id="popShare" style="display:none"><span class="arr"></span>' +
2207        '<div class="widget" data-id="samsung_sds" data-uid="MTIxNC8yNzg2NC80NDQy"></div>' +
2208        '<button class="btn_close" type="button">'+lang_quarter('닫기','关闭','close','close') +'</button></div>',
2209
2210    active : false,
2211    mobileStyle : "position:fixed;left:0;bottom:0",
2212    $share : null,
2213    $dim : null,
2214    currentTarget : null,
2215    preWidth : 0,
2216    init : function() {
2217        $(".btn_share, .cnt_menu .btn2, .hd_etc .btn2, .btn_share2, .thumb_share, .post_share, .evecom_nav_sns_share").attr("href", "#popShare").hide();
2218        this.preWidth = SDS_COMMON.currentWidth();
2219        // dim
2220        this.$dim = $("<div class='share_dim'></div>");
2221        this.$share =  $(".share_wrap").length > 0 ? $(".share_wrap") : $(this.el);
2222        $("body").append(this.$dim);
2223        $("body").append(this.$cizion);
2224        $("body").append(this.$share);
2225        this.$dim.click(function(e){
2226            e.preventDefault();
2227            shareTip.close();
2228        });
2229
2230        var $close = this.$share.find(".btn_close");
2231        $close.click(function(e){
2232            shareTip.close();
2233        });
2234
2235        //var clipboard = new Clipboard('#btn_copy_share');
2236
2237        // 20200319 공유하기 기능 오류로 인한 공유버튼 임시 숨김 처리
2238        var hideShareBtn = $(".btn_share, .cnt_menu .btn2, .hd_etc .btn2, .btn_share2, .thumb_share, .post_share");
2239        hideShareBtn.siblings().each(function(){
2240            var mark = $(this);
2241            mark.text()=='|' && mark.hide();
2242        });
2243    },
2244    click : function(target){
2245        this.currentTarget = target;
2246        if($(this.currentTarget).hasClass("on")) {
2247            this.close();
2248        }else {
2249            this.open();
2250        }
2251    },
2252    open : function() {
2253        this.active = true;
2254        $(".btn_share.on, .cnt_menu .btn2.on, .hd_etc .btn2.on, .btn_share2.on, .thumb_share.on, .post_share.on,  .evecom_nav_sns_share.on").removeClass("on");
2255        this.currentTarget.addClass("on");
2256
2257        $("body").bind('touchmove', function(e){e.preventDefault(); e.stopPropagation();});
2258
2259        var btn = this.currentTarget;
2260        var $share = this.$share;
2261        var pageWidth = $("header").width();
2262        if(btn.hasClass('btn_share')
2263            && btn.siblings('a').length == 1
2264            && btn.siblings('a').attr('href') != undefined
2265            && btn.siblings('a').attr('href') != ''){
2266            var url = btn.siblings('a').attr('href');
2267            if(url =='#' && btn.siblings('a').hasClass('btn_vod'))  //for youtube
2268            {
2269                url = btn.siblings('a').attr('data-src');
2270            }
2271            if(url.indexOf("https://") == -1){
2272                url = 'https://www.samsungsds.com' + url;
2273            }
2274            if(url.indexOf(".pdf") != -1)   //for pdf file
2275            {
2276                url = url.replace("https","http");
2277            }
2278            $share.find('.widget').attr('data-url', url);
2279            $share.find('.widget').attr('data-title',btn.parent().parent().find(':header:first').text());
2280            $share.find('.widget').attr('data-desc','');
2281
2282            var imgUrl = btn.parent().parent().parent().find('.thumb_imgBox').css('background-image')
2283            if(imgUrl){
2284                $share.find('.widget').attr('data-image', imgUrl.replace('url(','').replace(')','').replace(/\"/gi, ""));
2285            }else if(btn.closest("div").prev().find("img").attr("src") != undefined){
2286                $share.find('.widget').attr('data-image', btn.closest("div").prev().find("img").attr("src"));
2287            } else {
2288                var num = parseInt(Math.floor((Math.random()*5) + 1))
2289                $share.find('.widget').attr('data-image', 'https://image.samsungsds.com/global/en/images/comp_image_'+ num +'.jpg?queryString=20190325060631');
2290            }
2291        }else if(btn.hasClass('btn_share') || btn.hasClass('btn_share2')){//for mobile kakaotalk
2292            $share.find('.widget').attr('data-url',location.href);
2293            $share.find('.widget').attr('data-title',$('meta[name=title]').attr("content"));
2294            $share.find('.widget').attr('data-desc',$('meta[name=description]').attr("content"));
2295            $share.find('.widget').attr('data-image',$('meta[property="og:image"]').attr('content'));
2296        }
2297        else{
2298            $share.find('.widget').removeAttr('data-title');
2299            $share.find('.widget').removeAttr('data-image');
2300            $share.find('.widget').removeAttr('data-desc');
2301            $share.find('.widget').attr('data-url',location.href);
2302        }
2303        Toybox.reloadTo('.widget');
2304
2305        if(SDS_COMMON.isMobile()) {
2306            if(!$share.is(":animated")){
2307                this.$dim.show();
2308                var h = $share.height();
2309                $share.attr("style", this.mobileStyle).show().css({"bottom":"-"+h+"px"});
2310                $share.show().animate({ "bottom": "0" }, 500);
2311            }
2312        }else{
2313            var offset = this.getOffset();
2314            var winWidth = $(document).width();
2315            var top = 0;
2316            var left = 0;
2317
2318            if(btn.parents(".cnt_menu").length > 0) {    //fixed share
2319                var left = offset.left +btn.outerWidth() - $share.outerWidth();
2320                var top = offset.top + 86;
2321                var arrLeft = $share.width() - (btn.width()/2);
2322                $share.find(".arr").css("left", arrLeft+"px");
2323                $share.show().attr("style", "").css({"top":top+"px", "left"
2323:left+"px"});
2324            }else if(btn.parents(".hd_etc").length > 0){
2325                var left = btn.position().left +btn.outerWidth() -$share.outerWidth();
2326                var top = offset.top + 84;
2327                var arrLeft =  $share.width() - (btn.width()/2);
2328                $share.find(".arr").css("left", arrLeft+"px");
2329                $share.show().attr("style", "").css({"top":top+"px", "left":left+"px"});
2330            }else if(btn.parents(".btm_btns").length > 0){
2331                var left = offset.left +btn.outerWidth() -$share.outerWidth();
2332                var top = offset.top + 58;
2333                var arrLeft =  $share.width() - (btn.width()/2);
2334                $share.find(".arr").css("left", arrLeft+"px");
2335                $share.show().attr("style", "").css({"top":top+"px", "left":left+"px"});
2336            }else if(btn.parents(".post_btnBox").length > 0){
2337                var left = offset.left +btn.outerWidth() -$share.outerWidth() - (winWidth - pageWidth)/2;
2338                var top = offset.top + 55;
2339                var arrLeft =  $share.width() - (btn.width()/2);
2340                $share.find(".arr").css("left", arrLeft+"px");
2341                $share.show().attr("style", "").css({"top":top+"px", "left":left+"px"});
2342            }else{
2343                if(winWidth-offset.left < $share.outerWidth()) {
2344                    left = winWidth - $share.outerWidth();
2345                    top = offset.top +30;
2346                    var arrLeft =  offset.left - left + 10;
2347                    $share.find(".arr").css("left",arrLeft+"px");
2348                }else{
2349                    top = offset.top +30;
2350                    left =  offset.left - (winWidth-pageWidth)/2 - 20;
2351                    $share.find(".arr").css("left","");
2352                }
2353                $share.show().attr("style", "").css({"top":top+"px", "left":left+"px"});
2354            }
2355        }
2356
2357        // $share.find('.widget').attr('tabindex','0').show().focus();
2358        $share.find('.widget').on('keydown', function(e) {
2359            if ($share.find('.widget').is(':focus') && e.shiftKey) {
2360                e.preventDefault();
2361            }
2362        });
2363        $share.find('.btn_close').on('keydown', function(e) {
2364            var keyCode = e.keyCode || e.which;
2365
2366            if (!e.shiftKey && keyCode == 9) {
2367                e.preventDefault();
2368            }
2369        });
2370
2371        var list = this.$share.find("li");
2372        var idx = 0;
2373
2374        for (var i = 0; i < list.length; i++) {
2375            if ($(list[i]).css("display") != "none") {
2376                idx = i;
2377                break;
2378            }
2379        }
2380        this.$share.find("a").eq(idx).focus();
2381
2382    },
2383    close : function(){
2384        if(this.active && SDS_COMMON.isMobile()) {
2385            var share = this;
2386            setTimeout(function(){
2387                share.$share.hide();
2388                share.active = false;
2389                share.currentTarget.removeClass("on");
2390                share.currentTarget.focus();
2391                $("html, body").unbind('touchmove');
2392                share.$dim.hide();
2393            }, 300);
2394
2395        }else if(this.active){
2396            this.$share.hide();
2397            this.active = false;
2398            this.currentTarget.removeClass("on");
2399            this.currentTarget.focus();
2400            $("html, body").unbind('touchmove');
2401            this.$dim.hide();
2402        }
2403
2404    },
2405    scrollclose : function(){
2406        if(this.active && SDS_COMMON.isMobile()) {
2407            var share = this;
2408            setTimeout(function(){
2409                share.$share.hide();
2410                share.active = false;
2411                share.currentTarget.removeClass("on");
2412                $("html, body").unbind('touchmove');
2413                share.$dim.hide();
2414            }, 300);
2415
2416        }else if(this.active){
2417            this.$share.hide();
2418            this.active = false;
2419            this.currentTarget.removeClass("on");
2420            $("html, body").unbind('touchmove');
2421            this.$dim.hide();
2422        }
2423
2424    },
2425    getOffset : function() {
2426        var result = {
2427            top : this.currentTarget.offset().top,
2428            left : this.currentTarget.offset().left
2429        };
2430        return result;
2431    }
2432};
2433*/
2434
2435/** 
2436$(window).on("resize", function(e){
2437    if(shareTip.active && !SDS_COMMON.isMobile()) { // not mobile
2438        shareTip.preWidth = SDS_COMMON.currentWidth();
2439        shareTip.close();
2440    }
2441    if(SDS_COMMON.currentWidth() > 767){
2442        $('.sel_tab li').first().addClass('on').siblings().removeClass('on');
2443        $('.swiper-wrapper #ind1').addClass('on');
2444    }
2445});
2446
2447$(window).on("scroll", function(e){
2448    if(shareTip.active && shareTip.currentTarget.parents(".cnt_menu").length > 0) {
2449        var scrollTop = $(this).scrollTop();
2450        var menuTop = $(".cnt_menu").offset().top;
2451        var menuHeight =  $(".cnt_menu").height() + 16;
2452        if(scrollTop > menuTop) {
2453            shareTip.$share.css({"position":"fixed", "top": menuHeight+"px"});
2454        }else{
2455            shareTip.$share.css({"position":"absolute", "top": (menuTop+menuHeight)+"px"});
2456        }
2457    }
2458    if($(SDS_COMMON.currentWidth() < 767)){
2459        if($(".ev_overview").length > 0){
2460            var scrollTop = $(this).scrollTop();
2461            var target = $('.ev_overview')
2462            var top = target.offset().top;
2463            var targetH = target.height();
2464            var bottom = top + targetH
2465            if(scrollTop > bottom){
2466                $('.ev_layout .fixed_btn').css('position','fixed')
2467            }else{
2468                $('.ev_layout .fixed_btn').css('position','relative')
2469            }
2470        }
2471    }
2472});
2473*/
2474
2475$(window).on("click touchstart", function(e){
2476    var $target = $(e.target);
2477    // if(shareTip.active && !$target.hasClass("share_wrap") && !$target.is(".cnt_menu .btn2") && !$target.is(".hd_etc .btn2") && !$target.hasClass("btn_share") && !$target.hasClass("btn_share2") && !$target.hasClass("thumb_share")  && !$target.hasClass("evecom_nav_sns_share") && !$target.hasClass("post_share") && $target.parents(".share_wrap").length<=0){
2478    //     shareTip.scrollclose();
2479    // }
2480
2481    /* 네비,메인서치 구분 */
2482    /** 20230116 !$target.is('button') 추가 */
2483    if($(".search_box .sch_box").hasClass("on") && !$target.parents(".search_box .sch_box").length && !$target.is(".search_box .sch_box") && !$target.is("button")) {
2484        // console.log("navi search close")
2485        SDS_COMMON.search.close();
2486    }
2487    //202304-01 웹접근 추가 : 메인 검색 슬라이드 dots 클릭 조건 추가
2488    if( $(".mainSection2-search_container .main_sch_box").hasClass("on") && !$target.parents(".mainSection2-search_container .main_sch_box").length && !$target.is(".mainSection2-search_container .main_sch_box") && !$target.is(".main-content2 .custom_paging li a")) {
2489        // console.log("메인index section2 서치 밖앝 터치")
2490        SDS_COMMON.search.main_close();
2491    }
2492    /* //네비,메인서치 구분 */
2493
2494    /**통합검색 수정 : 서치 리마스터 MP_promotion_video 서치부분에도 영향이 있다 */
2495    /** 20230116 !$target.is('button') 추가 */
2496    if($(".sch_box").hasClass("on") && !$target.parents(".sch_box").length && !$target.is(".sch_box") && !$target.is('button') ) {
2497        // console.log("공통 서치 밖앝 터치")
2498        SDS_COMMON.search.close();
2499    }
2500
2501    //통합검색 수정 : 서치페이지 모바일 카테고리 드랍다운 
2502    if($(".wrp_category_cont").hasClass("on") && !$target.parents(".wrp_category").length && !$target.is(".wrp_category")) {
2503        $('.wrp_category_cont').removeClass('on');
2504    }
2505
2506    if($(".selectbox dt.on").length && !$target.parents(".selectbox").length) {
2507        $(".selectbox dt").removeClass("on");
2508    }
2509    
2510    if($(".fil_tab>li.on").length && !$target.parents(".filter_wrap, .ui-datepicker-header").length){
2511        $(".fil_tab>li.on").removeClass("on");
2512        $(".fil_con>li.on").removeClass("on");
2513    }
2514
2515    /** 20231103 gnb : 밖앝 클릭시 close */
2516    if($(".gnb .hd-cnt .menu > li").hasClass('on') && !$target.parents(".gnb .hd-cnt .menu > li").length){
2517        $(".gnb .hd-cnt .menu > li").removeClass("on");
2518        $('body').removeClass('hid_s')
2519    }
2520});
2521
2522$(window).on("resize", function(e){
2523    if(!SDS_COMMON.isMobile()){
2524        $("html, body").css("overflow", "");
2525    }
2526});
2527
2528/* checkSelect */
2529function checkSelect (input) {
2530    var term_checked = document.getElementById("checkbox1_"+input);
2531    document.getElementById("checkbox"+input).checked=true;
2532
2533    var term_checked_val = term_checked.getAttribute("checked");
2534}
2535
2536/* plugin */
2537(function($) {
2538    /* allcheck */
2539    $.fn.allCheck = function(opts) {
2540        var defaults = {
2541            all : ".ck_all",
2542            child : ".ck_child",
2543            disabledClass : "disabled"
2544        };
2545        var options = $.extend({}, defaults, opts);
2546        $(this).each(function(index) {
2547            var $this = $(this);
2548            var size = $(this).find($(options.child)).length;
2549            $(this).find($(options.all)).on("change", function(e){
2550
2551                if($(this).prop("checked")) {
2552                    $this.find($(options.child)).prop({"checked":true});
2553                }else{
2554                    $this.find($(options.child)).prop({"checked":false});
2555                }
2556            });
2557
2558            $this.find(options.child).on("change", function(e){
2559                setting();
2560            });
2561
2562            function setting() {
2563                var checkCount = $this.find($(options.child+":checked")).length;
2564                var $all = $this.find($(options.all));
2565                if(checkCount == 0){
2566                    $all.prop({"checked":false});
2567                }else if(checkCount >= size) {
2568                    $all.prop({"checked":true});
2569                    $this.find($(options.child)).prop({"checked":true});
2570                }else{
2571                    $all.prop({"checked":false});
2572                }
2573            }
2574        });
2575    }
2576
2577    /*20180202 무료체험동의양식 팝업 체크 기능 추가*/
2578    $.fn.allCheckSync = function(opts) {
2579        var defaults = {
2580            all : ".select_all .ck_all",
2581            child : ".select_child .ck_child",
2582            disabledClass : "disabled"
2583        };
2584        var options = $.extend({}, defaults, opts);
2585        $(this).each(function(index) {
2586            var $this = $(this);
2587            var size = $(this).find($(options.child)).length;
2588
2589            $(this).find($(options.all)).on("change", function(e){
2590                var all = $.find(options.all);
2591                if($(this).prop("checked")) {
2592                    $('.check_msg.type1.sync').find($(options.all)).prop({"checked":true});
2593                    $('.term_box').find($(options.all)).prop({"checked":true});
2594                    $('.check_msg.type1.sync').find($(options.child)).prop({"checked":true});
2595                    $('.term_box').find($(options.child)).prop({"checked":true});
2596                }else{
2597                    $('.check_msg.type1.sync').find($(options.all)).prop({"checked":false});
2598                    $('.term_box').find($(options.all)).prop({"checked":false});
2599                    $('.check_msg.type1.sync').find($(options.child)).prop({"checked":false});
2600                    $('.term_box').find($(options.child)).prop({"checked":false});
2601
2602                    $('.check_msg.type1.sync').find($("input:checkbox")).prop({"checked":false});
2603                    $('.term_box').find($("input:checkbox")).prop({"checked":false});
2604
2605
2606                }
2607                checkErrorMsg();
2608                //Tech Forum Error
2609            });
2610
2611            $this.find(options.child).on("change", function(e){
2612                var index = $(this).parent().index();
2613                setting(index-1, this.checked);
2614                checkErrorMsg();
2615                //Tech Forum Error
2616            });
2617
2618            function setting(index, value) {
2619                var checkCount = $this.find($(options.child+":checked")).length;
2620                var $term_box = $('.term_box').find($(options.all));
2621                var $check_msg = $('.check_msg.type1.sync').find($(options.all));
2622                $('.term_box').find($(options.child))[index].checked = value;
2623                $('.check_msg.type1.sync').find($(options.child))[index].checked = value;
2624                if(checkCount == 0){
2625                    $term_box.prop({"checked":false});
2626                    $check_msg.prop({"checked":false});
2627                }else if(checkCount >= size) {
2628                    $term_box.prop({"checked":true});
2629                    $check_msg.prop({"checked":true});
2630                    $('.term_box').find($(options.child)).prop({"checked":true});
2631                    $('.check_msg.type1.sync').find($(options.child)).prop({"checked":true});
2632                }else{
2633                    $term_box.prop({"checked":false});
2634                    $check_msg.prop({"checked":false});
2635                }
2636            }
2637
2638            // Tech Forum Error
2639            function checkErrorMsg() {
2640                var elMandChecked = $(".check_msg.type1 .ck_child.mand");
2641                var allChecked = true;
2642                if (elMandChecked.length) {
2643                    elMandChecked.each(function (index, item) {
2644                        if (!$(item).is(":checked")) {
2645                            allChecked = false;
2646                            return false;
2647                        }
2648                    });
2649                    if (!allChecked) {
2650                        $(".check_msg.type1 .error_msg").show();
2651                        $(".l_term.type2.select_popup .term_box").addClass("is_error")
2652                    } else {
2653                        $(".check_msg.type1 .error_msg").hide();
2654                        $(".l_term.type2.select_popup .term_box").removeClass("is_error")
2655                    }
2656                }
2657
2658                var elLayerMandChecked = $(".term_box .mand");
2659                var allLayerChecked = true;
2660                if (elLayerMandChecked.length) {
2661                    elLayerMandChecked.each(function (index, item) {
2662                        if (!$(item).is(":checked")) {
2663                            allLayerChecked = false;
2664                            return false;
2665                        }
2666                    });
2667
2668                    if (!allLayerChecked) {
2669                        $(".layer_wrap .error_msg").show();
2670                        $(".l_term.type2.select_popup .term_box").addClass("is_error")
2671                    } else {
2672                        $(".layer_wrap .error_msg").hide();
2673                        $(".l_term.type2.select_popup .term_box").removeClass("is_error")
2674                    }
2675                }
2676            }
2677        });
2678    }
2679
2680    /* image resize */
2681    $.fn.bgResize = function(opts) {
2682        var preViewType = SDS_COMMON.currentWidth() > SDS_COMMON.mobileWidth ? "web" : "mobile";
2683
2684        $(this).each(function(){
2685            preViewType == "web" ? '' : $(this).css("background-image", ($(this).css("background-image").replace("_w.","_m.") || $(this).css("background-image").replace("_w_","_m_")));
2686        });
2687
2688        var $this = $(this);
2689        $(window).on("resize", function(e){
2690            var curWidth = SDS_COMMON.currentWidth() > SDS_COMMON.mobileWidth ? "web" : "mobile";
2691            $this.each(function(i){
2692                var image = $(this).css("background-image");
2693                if(preViewType != curWidth){
2694                    curWidth=="web" ? $(this).css("background-image", $(this).css("background-image").replace("_m.","_w.")) : $(this).css("background-image", $(this).css("background-image").replace("_w.","_m."));
2695                    curWidth=="web" ? $(this).css("background-image", $(this).css("background-image").replace("_m_","_w_")) : $(this).css("background-image", $(this).css("background-image").replace("_w_","_m_"));
2696                }
2697            });
2698            preViewType = curWidth;
2699        });
2700    }
2701
2702    $.fn.imgResize = function(opts) {
2703        var preViewType = SDS_COMMON.currentWidth() > SDS_COMMON.mobileWidth ? "web" : "mobile";
2704
2705        $(this).each(function(){
2706            preViewType == "web" ? '' : $(this).attr("src", ($(this).attr("src").replace("_w.","_m.") || $(this).attr("src").replace("_w_","_m_")));
2707        });
2708
2709        var $this = $(this);
2710        $(window).on("resize", function(e){
2711            var curWidth = SDS_COMMON.currentWidth() > SDS_COMMON.mobileWidth ? "web" : "mobile";
2712            $this.each(function(i){
2713                var image = $(this).attr("src");
2714                if(preViewType != curWidth){
2715                    curWidth=="web" ? $(this).attr("src", $(this).attr("src").replace("_m.","_w.")) : $(this).attr("src", $(this).attr("src").replace("_w.","_m."));
2716                    curWidth=="web" ? $(this).attr("src", $(this).attr("src").replace("_m_","_w_")) : $(this).attr("src", $(this).attr("src").replace("_w_","_m_"));
2717                }
2718            });
2719            preViewType = curWidth;
2720        });
2721    }
2722
2723    $(function(){
2724        var imgs = $('.atc_detail .im img');
2725        imgs.each(function(){
2726            var img = $(this);
2727            var width = img.width();
2728            var height = img.height();
2729            if(width < height){
2730                img.addClass('portrait');
2731            }else{
2732                img.addClass('landscape');
2733            }
2734        })
2735    });
2736})(jQuery);
2737
2738
2739jQuery(document).ready(function($){
2740    /* aes 추가 */                           
2741    const script = document.createElement("script");
2742    script.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js";
2743    script.defer = true;
2744    document.body.appendChild(script);                               
2745                               
2746    var isiPhone = /iphone/i.test(navigator.userAgent.toLowerCase());
2747    if (isiPhone)
2748    {
2749        $(".video_wrap").remove();
2750    }
2751
2752    /* PDF Download open with New tab */
2753    $("a.pdf_download").attr('target','_blank');
2754
2755    /* Security File Attach Layer Keyboard Accessibility */
2756    $(".file_add").focus(function(){
2757        $(".file_wrap .label").addClass("on");
2758
2759    }).blur(function(){
2760        $(".file_wrap .label").removeClass("on");
2761    })
2762
2763    /* if mobile add anchor tag on the "strong.s_tit" for accessibiity*/
2764    if(SDS_COMMON.currentWidth()  < 1025){
2765        $("strong.s_tit").wrapInner("<a href='#'>");
2766    }else{
2767    }
2768});
2769
2770$(document).on('click', '#service_close_title', function() {
2771    SDS_COMMON.search.close();
2772    SDS_COMMON.search.main_close(); //202304-01 웹접근 추가
2773    
2774    /**20221103 비디오 페이지(인사이트 서치도 관련있을수 있음) 서치 */
2775    if($(".sch_box .sch_ip input").val() != ""){
2776        $(".sch_box .sch_ip .btn_sch_ip").hide();
2777    }else {
2778        $(".sch_box .sch_ip .btn_sch_ip").show();
2779    }
2780});
2781//document.write('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>');

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.