PageSourceSearch

https://www.kasa.go.kr/js/kor/2025/acego.main.js;jsessionid=g_wPRe…WsPNatjpxKyC2TB-k4Dr08bbPLFeAoZy.homepage20

js kasa.go.kr collected 2026-10-02 17:42:38 UTC 32,777 bytes, 922 lines download raw bytes

1// 기존 헤더 스타일 관련
2$("#top_layout .header-in").on("mouseover focusin", function(){
3    $(this).parent('#top_layout').addClass("on");
4});
5$("#top_layout .header-in").on("mouseleave focusout", function(){
6    $(this).parent('#top_layout').removeClass("on");
7});
8
9// 메인 비주얼 swiper
10(function () {
11    'use strict';
12
13    // mvisual 컨테이너가 실제로 있는지 먼저 확인
14    var $visualContainer = $('.visualSwiper.mvisual');
15
16    // 없으면(= 지금처럼 nodata만 있는 경우) 아무 것도 하지 않음
17    if (!$visualContainer.length) {
18        return;
19    }
20
21    // 이 아래는 .visualSwiper.mvisual 이 존재하는 경우에만 실행
22    var visualSwiper = new Swiper('.visualSwiper.mvisual', {
23        slidesPerView: 1,
24        spaceBetween: 10,
25        loop: true,
26        autoplay: {
27            delay: 3000
28        },
29        effect: 'slides',
30        speed: 1000,
31        observer: true,
32        observeParents: true,
33        watchSlidesProgress: true,
34        navigation: {
35            prevEl: '.visualSwiper.mvisual .swiper-btn.prev',
36            nextEl: '.visualSwiper.mvisual .swiper-btn.next'
37        },
38        pagination: {
39            el: '.swiper-pagination',
40            type: 'custom',
41            renderCustom: function (s, c, t) {
42                return '' +
43                    '<span class="current">' + c + '</span>' +
44                    '<span class="divide">/</span>' +
45                    '<span class="total">' + t + '</span>';
46            }
47        },
48        breakpoints: {
49            /* 500: {
50                slidesPerView: 1,
51                spaceBetween: 10,
52            }, */
53            768: {
54                slidesPerView: 2,
55                spaceBetween: 15,
56            },
57            1024: {
58                slidesPerView: 2,
59                spaceBetween: 20,
60            }
61        }
62    });
63
64    swiperCustom(visualSwiper, {
65        autoBtn: '.swiper-btn.auto',
66        slideFocus: true,
67        edgeClass: false
68    });
69})();
70
71// 메인 비주얼 swiper - 팝업 데이터가 없을 때 (nodata 전용)
72(function () {
73    'use strict';
74
75    var nodataSwiperEl = document.querySelector('.visualSwiper.nodata');
76    if (!nodataSwiperEl) {
77        return;
78    }
79
80    // 페이지네이션 1 / 1 고정 (혹시 마크업에서 다른 값 들어온 경우 대비)
81    var paginationCurrent = nodataSwiperEl.querySelector('.swiper-pagination .current');
82    var paginationTotal = nodataSwiperEl.querySelector('.swiper-pagination .total');
83    if (paginationCurrent) {
84        paginationCurrent.innerHTML = '1';
85    }
86    if (paginationTotal) {
87        paginationTotal.innerHTML = '1';
88    }
89
90    // 컨트롤 래퍼 전체를 스크린리더에서 숨김 (장식용 처리)
91    var ctrlWrap = nodataSwiperEl.querySelector('.swiper-control .wrap');
92    if (ctrlWrap) {
93        ctrlWrap.setAttribute('aria-hidden', 'true');
94    }
95
96    // 좌/우/자동 버튼 + 팝업 버튼 비활성화
97    var ctrl = nodataSwiperEl.querySelector('.swiper-control');
98    if (ctrl) {
99        var btns = ctrl.querySelectorAll(
100            '.swiper-btn.prev, .swiper-btn.next, .swiper-btn.auto, .popup-btn'
101        );
102        for (var i = 0; i < btns.length; i++) {
103            // 포커스 불가 + 동작 불가
104            btns[i].setAttribute('disabled', 'disabled');
105            btns[i].setAttribute('tabindex', '-1');
106            btns[i].setAttribute('aria-disabled', 'true');
107
108            // 시각적으로도 비활성 스타일 적용용 클래스
109            if (btns[i].className.indexOf('disabled') === -1) {
110                btns[i].className += ' disabled';
111            }
112        }
113    }
114})();
115
116// 메인 비주얼 swiper 컨트롤바 높이 조정
117(function () {
118    'use strict';
119
120    var resizeTimer = null;
121
122    // 기본 브레이크포인트
123    var BREAKPOINT_DEFAULT = 500;   // mvisual 등 일반 케이스: 499px까지 모바일
124    var BREAKPOINT_NODATA  = 768;   // nodata일 때: 767px까지 모바일
125
126    /**
127     * class 보유 여부 체크 (IE 대응)
128     */
129    function hasClass(el, className) {
130        if (!el || !className) {
131            return false;
132        }
133        if (el.classList) {
134            return el.classList.contains(className);
135        }
136        var cls = el.className || '';
137        return (' ' + cls + ' ').indexOf(' ' + className + ' ') > -1;
138    }
139
140    /**
141     * 현재 visualSwiper에 맞는 브레이크포인트 반환
142     * - .nodata 가 붙어 있으면 768
143     * - 그 외(mvisual 등)는 500
144     */
145    function getBreakpoint(swiperEl) {
146        if (!swiperEl) {
147            return BREAKPOINT_DEFAULT;
148        }
149        if (hasClass(swiperEl, 'nodata')) {
150            return BREAKPOINT_NODATA;
151        }
152        // default: mvisual 포함 일반 케이스
153        return BREAKPOINT_DEFAULT;
154    }
155
156    /**
157     * 현재 너비가 PC 구간인지 여부
158     * - swiper의 종류에 따라 브레이크포인트가 달라짐
159     */
160    function isPCWidth(swiperEl) {
161        var breakpoint = getBreakpoint(swiperEl);
162        // IE 호환: window.innerWidth 사용
163        return window.innerWidth >= breakpoint;
164    }
165
166    function updateVisualControlSize() {
167        var visualSwiper = document.querySelector('.visualSwiper');
168        if (!visualSwiper) {
169            return;
170        }
171
172        var control = visualSwiper.querySelector('.swiper-control');
173        var thumb = visualSwiper.querySelector('.link .thambnail');
174
175        if (!control || !thumb) {
176            return;
177        }
178
179        // ★ 반응형(모바일/태블릿) 구간에서는 JS 개입 X
180        if (!isPCWidth(visualSwiper)) {
181            // PC에서 설정했던 인라인 width 제거 → CSS 값만 사용
182            control.style.width = '';
183            return;
184        }
185
186        // 여기부터는 PC 구간에서만 실행
187        var thumbHeight = thumb.clientHeight;
188
189        if (!thumbHeight || thumbHeight <= 0) {
190            return;
191        }
192
193        // 회전 전 width = 회전 후 세로 길이
194        control.style.width = thumbHeight + 'px';
195    }
196
197    function onResize() {
198        if (resizeTimer) {
199            clearTimeout(resizeTimer);
200        }
201        resizeTimer = setTimeout(function () {
202            updateVisualControlSize();
203        }, 100);
204    }
205
206    // DOM 준비 후 한 번 실행
207    if (document.readyState === 'loading') {
208        document.addEventListener('DOMContentLoaded', function () {
209            updateVisualControlSize();
210        });
211    } else {
212        updateVisualControlSize();
213    }
214
215    // 리사이즈마다 다시 맞춰주기
216    if (window.addEventListener) {
217        window.addEventListener('resize', onResize, false);
218    } else if (window.attachEvent) {
219        // IE8~9 대응
220        window.attachEvent('onresize', onResize);
221    }
222})();
223
224// 누리소통망 > youtube swiper
225var snsSwiper1 = new Swiper(".snsSwiper.type1", {
226	slidesPerView: 1,
227    spaceBetween: 0,
228    loop: false,
229    effect: 'slide',
230    speed: 1000,
231    observer: true,
232    observeParents: true,
233    watchSlidesProgress: true,
234    navigation: {
235        prevEl: ".snsSwiper.type1 .swiper-btn.prev",
236        nextEl: ".snsSwiper.type1 .swiper-btn.next"
237    },
238    breakpoints: {
239        768: {
240            slidesPerView: 2,
241            spaceBetween: 15,
242        },
243        1024: {
244            slidesPerView: 3,
245            spaceBetween: 20,
246        },
247        1281: {
248            slidesPerView: 3,
249            spaceBetween: 24,
250        }
251    }
252});
253swiperCustom(snsSwiper1, {
254    autoBtn: false,
255    slideFocus: true,
256    edgeClass: false
257});
258
259// 누리소통망 > instagram, X swiper
260var snsSwiper2 = new Swiper(".snsSwiper.type2", {
261	slidesPerView: 1,
262    spaceBetween: 0,
263    loop: false,
264    effect: 'slide',
265    speed: 1000,
266    observer: true,
267    observeParents: true,
268    watchSlidesProgress: true,
269    navigation: {
270        prevEl: ".snsSwiper.type2 .swiper-btn.prev",
271        nextEl: ".snsSwiper.type2 .swiper-btn.next"
272    },
273    breakpoints: {
274        768: {
275            slidesPerView: 3,
276            spaceBetween: 15,
277        },
278        1024: {
279            slidesPerView: 4,
280            spaceBetween: 20,
281        },
282        1281: {
283            slidesPerView: 4,
284            spaceBetween: 24,
285        }
286    }
287});
288swiperCustom(snsSwiper2, {
289    autoBtn: false,
290    slideFocus: true,
291    edgeClass: false
292});
293
294// 누리소통망 탭 영역 높이
295(function () {
296    'use strict';
297
298    var BREAKPOINT = 1376;
299    var resizeTimer = null;
300
301    function isResponsiveWidth() {
302        // mq(1376)이 max-width: 1376px 라는 가정
303        return window.innerWidth <= BREAKPOINT;
304    }
305
306    function updateSnsBoardHeight() {
307        var snsBoxes = document.querySelectorAll('.sns-box .sns-board .board-item');
308        if (!snsBoxes || !snsBoxes.length) {
309            return;
310        }
311
312        var i;
313        for (i = 0; i < snsBoxes.length; i++) {
314            // 일단 인라인 height 초기화
315            snsBoxes[i].style.height = '';
316        }
317
318        // 반응형 구간이 아니면(=PC 넓은 구간) CSS height(311 / 444px)에 맡김
319        if (!isResponsiveWidth()) {
320            return;
321        }
322
323        // 반응형 구간(<=1376px)에서는 active 탭만 썸네일 높이에 맞춰 height 재설정
324        var activeItems = document.querySelectorAll('.sns-box .sns-board .board-item.active');
325        if (!activeItems || !activeItems.length) {
326            return;
327        }
328
329        for (i = 0; i < activeItems.length; i++) {
330            var item = activeItems[i];
331            var content = item.querySelector('.board-content');
332            var swiper = item.querySelector('.snsSwiper');
333            var thumb = swiper ? swiper.querySelector('.thambnail') : null;
334
335            if (!content || !thumb) {
336                continue;
337            }
338
339            // board-content의 top 위치 + 썸네일 높이 = 전체 높이
340            var topOffset = content.offsetTop;
340         // 지금 SCSS 기준 대략 73px
341            var thumbHeight = thumb.clientHeight;      // padding-top 비율로 계산된 실제 px 높이
342
343            // thumbHeight가 0인 경우(레이아웃 미완료) 대비
344            if (!thumbHeight || thumbHeight <= 0) {
345                // 그래도 최소한 swiper 전체 높이 기준으로 보정
346                var swiperHeight = swiper.offsetHeight;
347                if (swiperHeight && swiperHeight > 0) {
348                    thumbHeight = swiperHeight;
349                } else {
350                    continue;
351                }
352            }
353
354            var totalHeight = topOffset + thumbHeight;
355
356            // 여유를 조금 두고 싶다면 + 여백(px)을 더해도 됨
357            // totalHeight += 10;
358
359            item.style.height = totalHeight + 'px';
360        }
361    }
362
363    function onResize() {
364        if (resizeTimer) {
365            clearTimeout(resizeTimer);
366        }
367        resizeTimer = setTimeout(function () {
368            updateSnsBoardHeight();
369        }, 100);
370    }
371
372    // DOM 준비 시 1회 실행
373    if (document.readyState === 'loading') {
374        document.addEventListener('DOMContentLoaded', function () {
375            updateSnsBoardHeight();
376        });
377    } else {
378        updateSnsBoardHeight();
379    }
380
381    // 리사이즈 시마다 다시 계산
382    window.addEventListener('resize', onResize);
383
384    // 탭 전환 시에도 다시 계산 (기존 탭 구조 활용)
385    // data-type="tab" 내 board-title 클릭 후 active가 바뀌면 높이 재계산
386    $(document).on('click', '.sns-box [data-type=tab] .board-title', function () {
387        // 기존 탭 로직이 active 클래스를 바꾼 뒤에 호출되는 것이 가장 이상적이지만,
388        // click 이벤트 후 DOM 갱신 타이밍을 위해 setTimeout으로 한 틱 뒤에 실행
389        setTimeout(function () {
390            updateSnsBoardHeight();
391        }, 0);
392    });
393})();
394
395// swiper 커스텀 함수
396function swiperCustom(swiper, option) {
397    if (Array.isArray(swiper)) {
398        for (var i = 0; i < swiper.length; i++) {
399            setSwiperCustom(swiper[i]);
400        }
401    } else {
402        setSwiperCustom(swiper);
403    }
404
405    function setSwiperCustom(swiper) {
406        // 스와이퍼가 없을 경우 에러 방지
407        if (!swiper) {
408            console.warn("Swiper가 존재하지 않습니다.");
409            return;
410        }
411
412        // 기본 옵션 설정
413        var defaultOption = {
414            autoBtn: false,
415            slideFocus: true,
416            edgeClass: false,
417        };
418
419        // 옵션 병합 (IE11 안전한 방식)
420        var mergedOption = {};
421
422        // defaultOption에서 키 추출 (IE11 호환)
423        var defaultKeys = [];
424        for (var key in defaultOption) {
425            if (defaultOption.hasOwnProperty(key)) {
426                defaultKeys.push(key);
427            }
428        }
429
430        // 기본 옵션 복사
431        for (var i = 0; i < defaultKeys.length; i++) {
432            var key = defaultKeys[i];
433            mergedOption[key] = defaultOption[key];
434        }
435
436        // 사용자 옵션 병합
437        if (option) {
438            for (var i = 0; i < defaultKeys.length; i++) {
439                var key = defaultKeys[i];
440                if (option[key] !== undefined) {
441                    mergedOption[key] = option[key];
442                }
443            }
444        } else {
445            mergedOption = defaultOption;
446        }
447
448        // 기능 설정
449        var setupFunctions = {
450            autoBtn: function () {
451                autoBtn(swiper, mergedOption.autoBtn);
452            },
453            slideFocus: function () {
454                slideFocus(swiper);
455            },
456            edgeClass: function () {
457                edgeClass(swiper);
458            },
459        };
460        for (var i = 0; i < defaultKeys.length; i++) {
461            var key = defaultKeys[i];
462            if (mergedOption[key]) {
463                setupFunctions[key]();
464            }
465        }
466
467        // 자동 재생 버튼 기능 설정
468        function autoBtn(swiper, selector) {
469            if (!swiper.autoplay || !swiper.autoplay.running) {
470                console.warn(swiper.el,"Swiper의 autoplay가 활성화되어 있지 않습니다.");
471                return;
472            }
473            var autoBtn =
474                swiper.el.querySelector(selector) ||
475                swiper.el.parentElement.querySelector(selector) ||
476                document.querySelector(selector);
477
478            // pagination 요소 찾기
479            var pagerEl = null;
480            if (swiper.pagination && swiper.pagination.el) {
481                // 페이지네이션이 문자열일 경우 (선택자)
482                if (typeof swiper.params.pagination.el === "string") {
483                    pagerEl = document.querySelector(swiper.params.pagination.el);
484                }
485                // 페이지네이션이 DOM 요소일 경우
486                else if (swiper.params.pagination.el instanceof Element) {
487                    pagerEl = swiper.params.pagination.el;
488                }
489            }
490
491            if (!autoBtn) {
492                console.warn("자동재생 버튼 요소를 찾을 수 없습니다: " + selector);
493                return;
494            }
495
496            var delay = swiper.params.autoplay.delay || 3000;
497
498            if (pagerEl) {
499                pagerEl.style.animationDuration = delay - 100 + "ms";
500            }
501
502            var updateState = function () {
503                if (swiper.autoplay.running) {
504                    autoBtn.setAttribute("aria-label", "슬라이더 정지");
505                    autoBtn.classList.remove("paused");
506                } else {
507                    autoBtn.setAttribute("aria-label", "슬라이더 재생");
508                    autoBtn.classList.add("paused");
509                }
510            };
511
512            updateState();
513
514            function toggleAuto() {
515                if (swiper.autoplay.running) {
516                    swiper.autoplay.stop();
517                    if (pagerEl) pagerEl.classList.add("paused");
518                } else {
519                    swiper.autoplay.start();
520                    if (pagerEl) {
521                        pagerEl.classList.remove("paused");
522                        pagerEl.style.animationDuration = delay - 100 + "ms";
523                    }
524                }
525            }
526
527            autoBtn.addEventListener("click", toggleAuto);
528            autoBtn.addEventListener("click", updateState);
529
530            if (pagerEl) {
531                swiper.on("slideChangeTransitionStart", function () {
532                    pagerEl.style.animationDuration =
533                        delay + swiper.params.speed - 100 + "ms";
534                });
535            }
536
537            swiper.on("beforeDestroy", function () {
538                autoBtn.removeEventListener("click", toggleAuto);
539                autoBtn.removeEventListener("click", updateState);
540            });
541        }
542
543        // 슬라이드 포커스 설정 함수
544        function slideFocus(swiper) {
545            swiper.params.watchSlidesProgress = true;
546            swiper.params.watchSlidesVisibility = true;
547            swiper.update();
548            var updateSlideFocus = function () {
549                var slides = swiper.slides;
550                if (!slides || slides.length === 0) return;
551
552                for (var i = 0; i < slides.length; i++) {
553                    var slide = slides[i];
554                    var tags = slide.querySelectorAll(
555                        'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
556                    );
557                    var isFocusable =
558                        slide.tagName.toLowerCase() === "a" ||
559                        slide.tagName.toLowerCase() === "button";
560                    var isVisible = slide.classList.contains("swiper-slide-visible");
561
562                    if (isVisible) {
563                        for (var j = 0; j < tags.length; j++) {
564                            tags[j].setAttribute("tabindex", 0);
565                            tags[j].setAttribute("aria-hidden", "false");
566                        }
567                        slide.setAttribute("aria-hidden", "false");
568                        if (isFocusable) slide.setAttribute("tabindex", 0);
569                    } else {
570                        for (var j = 0; j < tags.length; j++) {
571                            tags[j].setAttribute("tabindex", -1);
572                            tags[j].setAttribute("aria-hidden", "true");
573                        }
574                        slide.setAttribute("aria-hidden", "true");
575                        if (isFocusable) slide.setAttribute("tabindex", -1);
576                    }
577                }
578            };
579
580            updateSlideFocus();
581            swiper.on("slideChangeTransitionStart", updateSlideFocus);
582            swiper.on("observerUpdate", updateSlideFocus);
583            swiper.on("resize", updateSlideFocus);
584        }
585
586        // 엣지 클래스 설정 함수
587        function edgeClass(swiper) {
588            function updateClass() {
589                if (swiper.progress === 0) {
590                    swiper.el.classList.add("begin");
591                } else {
592                    swiper.el.classList.remove("begin");
593                }
594                if (swiper.progress === 1) {
595                    swiper.el.classList.add("end");
596                } else {
597                    swiper.el.classList.remove("end");
598                }
599            }
600            updateClass();
601            swiper.on("progress", updateClass);
602        }
603    }
604}
605
606// 탭메뉴
607$('[data-type=tab]').each(function (key, item) {
608    var tabIdName = 'tab' + key;
609    this.id = tabIdName;
610    var tabId = '#' + tabIdName;
611    var n = 0;
612
613    var $tab = $(tabId).find('> .board-item');
614    var $title = $(tabId).find('> .board-item > .board-title');
615
616    $title.next('.board-content').hide();
617    $title.next('.board-more').hide();
618    $tab.eq(n).addClass('active');
619    $tab.eq(n).children('.board-title').next('.board-content').show();
620    $tab.eq(n).children('.board-title').next('.board-more').show();
621
622    $title.on("click", function () {
623        var url;
624        var tabIndex = $(this).parent().index()
625        console.log(tabIndex)
626        if ($(this).attr("href")) url = $(this).attr('href').attr('target', $(this).attr('target'));
627
628        $title.next('.board-content').hide();
629        $title.next('.board-more').hide();
630        $title.parent().removeClass('active');
631        $(this).next('.board-content').show();
632        $(this).next('.board-more').show();
633        $(this).parent().addClass('active');
634    });
vendor: 9,385 bytes, lines 635-866
635});
636
637// ajaxModal
638/*
639    A simple jQuery AJAX_modal (http://github.com/kylefox/jquery-AJAX_modal)
640    Version 0.9.2
641*/
642(function (factory) {
643    if(typeof module === "object" && typeof module.exports === "object") {
644        factory(require("jquery"), window, document);
645    }
646    else {
647        factory(jQuery, window, document);
648    }
649}(function($, window, document, undefined) {
650
651    var AJAX_modals = [],
652        getCurrent = function() {
653            return AJAX_modals.length ? AJAX_modals[AJAX_modals.length - 1] : null;
654        },
655        selectCurrent = function() {
656            var i,
657                selected = false;
658            for (i=AJAX_modals.length-1; i>=0; i--) {
659                if (AJAX_modals[i].$blocker) {
660                    AJAX_modals[i].$blocker.toggleClass('current',!selected).toggleClass('behind',selected);
661                    selected = true;
662                }
663            }
664        };
665
666    $.AJAX_modal = function(el, options) {
667        var remove, target;
668        this.$body = $('body');
669        this.options = $.extend({}, $.AJAX_modal.defaults, options);
670        this.options.doFade = !isNaN(parseInt(this.options.fadeDuration, 10));
671        this.$blocker = null;
672        this.result = null;
673        if (this.options.closeExisting)
674            while ($.AJAX_modal.isActive())
675                $.AJAX_modal.close(); // Close any open AJAX_modals.
676        AJAX_modals.push(this);
677        if (el.is('a')) {
678            target = el.attr('href');
679            this.anchor = el;
680            if (/^#/.test(target)) {
681                this.$elm = $(target);
682                if (this.$elm.length !== 1) return null;
683                this.$body.append(this.$elm);
684                this.open();
685                //AJAX
686            } else {
687                this.$elm = $('<div>');
688                this.$body.append(this.$elm);
689                remove = function(event, AJAX_modal) { AJAX_modal.elm.remove(); };
690                this.showSpinner();
691                el.trigger($.AJAX_modal.AJAX_SEND);
692                $.get(target).done(function(html) {
693                    if (!$.AJAX_modal.isActive()) return;
694                    el.trigger($.AJAX_modal.AJAX_SUCCESS);
695                    var current = getCurrent();
696                    current.$elm.empty().append(html).on($.AJAX_modal.CLOSE, remove);
697                    current.hideSpinner();
698                    current.open();
699                    el.trigger($.AJAX_modal.AJAX_COMPLETE);
700                }).fail(function() {
701                    el.trigger($.AJAX_modal.AJAX_FAIL);
702                    var current = getCurrent();
703                    current.hideSpinner();
704                    AJAX_modals.pop(); // remove expected AJAX_modal from the list
705                    el.trigger($.AJAX_modal.AJAX_COMPLETE);
706                });
707            }
708        } else {
709            this.$elm = el;
710            this.anchor = el;
711            this.$body.append(this.$elm);
712            this.open();
713        }
714    };
715
716    $.AJAX_modal.prototype = {
717        constructor: $.AJAX_modal,
718        open: function() {
719            var m = this;
720            this.block();
721            this.anchor.focus();
722            if(this.options.doFade) {
723                setTimeout(function() {
724                    m.show();
725                }, this.options.fadeDuration * this.options.fadeDelay);
726            } else {
727                this.show();
728            }
729            $(document).off('keydown.AJAX_modal').on('keydown.AJAX_modal', function(event) {
730                var current = getCurrent();
731                if (event.which === 27 && current.options.escapeClose) current.close();
732            });
733            if (this.options.clickClose)
734                this.$blocker.click(function(e) {
735                    if (e.target === this)
736                        $.AJAX_modal.close();
737                });
738        },
739        close: function(ret) {
740            this.result = ret;
741            AJAX_modals.pop();
742            this.unblock();
743            this.hide();
744            if (!$.AJAX_modal.isActive())
745                $(document).off('keydown.AJAX_modal');
746        },
747
748        block: function() {
749            this.$elm.trigger($.AJAX_modal.BEFORE_BLOCK, [this._ctx()]);
750            this.$body.css('overflow','hidden');
751            this.$blocker = $('<div class="' + this.options.blockerClass + ' current"></div>').appendTo(this.$body);
752            selectCurrent();
753            if(this.options.doFade) {
754                this.$blocker.css('opacity',0).animate({opacity: 1}, this.options.fadeDuration);
755            }
756            this.$elm.trigger($.AJAX_modal.BLOCK, [this._ctx()]);
757        },
758
759        unblock: function(now) {
760            if (!now && this.options.doFade)
761                this.$blocker.fadeOut(this.options.fadeDuration, this.unblock.bind(this,true));
762            else {
763                this.$blocker.children().appendTo(this.$body);
764                this.$blocker.remove();
765                this.$blocker = null;
766                selectCurrent();
767                if (!$.AJAX_modal.isActive())
768                    this.$body.css('overflow','');
769            }
770        },
771
772        show: function() {
773            this.$elm.trigger($.AJAX_modal.BEFORE_OPEN, [this._ctx()]);
774            if (this.options.showClose) {
775                this.closeButton = $('<a href="#close-modal" rel="AJAX_modal:close" class="close-modal ' + this.options.closeClass + '">' + this.options.closeText + '</a>');
776                this.$elm.prepend(this.closeButton);
777            }
778            this.$elm.addClass(this.options.AJAX_modalClass).prependTo(this.$blocker);
779            if(this.options.doFade) {
780                this.$elm.css({opacity: 0, display: 'inline-block'}).animate({opacity: 1}, this.options.fadeDuration);
781            } else {
782                this.$elm.css('display', 'inline-block');
783            }
784            this.$elm.trigger($.AJAX_modal.OPEN, [this._ctx()]);
785        },
786
787        hide: function() {
788            this.$elm.trigger($.AJAX_modal.BEFORE_CLOSE, [this._ctx()]);
789            if (this.closeButton) this.closeButton.remove();
790            var _this = this;
791            if(this.options.doFade) {
792                this.$elm.fadeOut(this.options.fadeDuration, function () {
793                    _this.$elm.trigger($.AJAX_modal.AFTER_CLOSE, [_this._ctx()]);
794                    _this.$elm.remove();
795                });
796            } else {
797                this.$elm.hide(0, function () {
798                    _this.$elm.trigger($.AJAX_modal.AFTER_CLOSE, [_this._ctx()]);
799                    _this.$elm.remove();
800                });
801            }
802            this.$elm.trigger($.AJAX_modal.CLOSE, [this._ctx()]);
803        },
804
805        showSpinner: function() {
806            if (!this.options.showSpinner) return;
807            this.spinner = this.spinner || $('<div class="' + this.options.AJAX_modalClass + '-spinner"></div>')
808                .append(this.options.spinnerHtml);
809            this.$body.append(this.spinner);
810            this.spinner.show();
811        },
812        hideSpinner: function() {
813            if (this.spinner) this.spinner.remove();
814        },
815        _ctx: function() {
816            return { elm: this.$elm, $elm: this.$elm, $blocker: this.$blocker, options: this.options, $anchor: this.anchor, result: this.result };
817        }
818    };
819    $.AJAX_modal.close = function(event) {
820        if (!$.AJAX_modal.isActive()) return;
821        if (event) event.preventDefault();
822        var current = getCurrent();
823        current.close();
824        return current.$elm;
825    };
826    $.AJAX_modal.isActive = function () {
827        return AJAX_modals.length > 0;
828    };
829    $.AJAX_modal.getCurrent = getCurrent;
830    $.AJAX_modal.defaults = {
831        closeExisting: true,
832        escapeClose: true,
833        clickClose: true,
834        closeText: 'Close',
835        closeClass: '',
836        AJAX_modalClass: "modal_popup",
837        blockerClass: "ui-modal__backdrop",
838        spinnerHtml: '<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',
839        showSpinner: true,
840        showClose: true,
841        fadeDuration: null,
842        fadeDelay: 1.0
843    };
844    // Event constants
845    $.AJAX_modal.BEFORE_BLOCK = 'AJAX_modal:before-block';
846    $.AJAX_modal.BLOCK = 'AJAX_modal:block';
847    $.AJAX_modal.BEFORE_OPEN = 'AJAX_modal:before-open';
848    $.AJAX_modal.OPEN = 'AJAX_modal:open';
849    $.AJAX_modal.BEFORE_CLOSE = 'AJAX_modal:before-close';
850    $.AJAX_modal.CLOSE = 'AJAX_modal:close';
851    $.AJAX_modal.AFTER_CLOSE = 'AJAX_modal:after-close';
852    $.AJAX_modal.AJAX_SEND = 'AJAX_modal:ajax:send';
853    $.AJAX_modal.AJAX_SUCCESS = 'AJAX_modal:ajax:success';
854    $.AJAX_modal.AJAX_FAIL = 'AJAX_modal:ajax:fail';
855    $.AJAX_modal.AJAX_COMPLETE = 'AJAX_modal:ajax:complete';
856    $.fn.AJAX_modal = function(options){
857        if (this.length === 1) {
858            new $.AJAX_modal(this, options);
859        }
860        return this;
861    };
862    $(document).on('click.AJAX_modal', 'a[rel~="AJAX_modal:close"]', $.AJAX_modal.close);
863    $(document).on('click.AJAX_modal', 'a[rel~="AJAX_modal:open"]', function(event) {
864        event.preventDefault();
865        $(this).AJAX_modal();
866    });
867}));
868// Ajax modal
869(function () {
870    $(document).on("click", "[data-button='ajaxModal']", function (e) {
871        if ($(this).data("url")) {
872            e.preventDefault();
873            $(this).each(function () {
874                var $this, url, target, prev, next;
875                $this = $(this);
876                url = $this.data('url');
877                target = $this.data('target');
878                prev = $this.data('focus-prev');
879                next = $this.data('focus-next');
880
881                $.get(url, function (data) {
882                    $("html,body").css({
883                        "height": "100%",
884                        "overflow": "hidden"
885                    });
886
887                    $("<div class='ui-modal__ajax " + target + "'>" + data + "</div>")
888                        .appendTo('body')
889                        .AJAX_modal();
890
891                    $(".ui-modal__ajax .close-modal")
892                        .focus()
893                        .attr('data-button', 'ajaxModalClose')
894                        .attr('data-focus-prev', prev)
895                        .attr('data-focus-next', next);
896
897                    $(document).on("click", "[data-button='ajaxModalClose']", function (e) {
898                        e.preventDefault();
899                        $(this).each(function () {
900                            var $this2, prev2, next2;
901                            $this2 = $(this);
902                            prev2 = $this2.data('focus-prev');
903                            next2 = $this2.data('focus-next');
904
905                            $("[data-focus-next='" + next2 + "']").focus();
906                            $("html,body").removeAttr('style');
907
908                            $("[class='ui-modal__ajax " + target + "']")
909                                .remove('')
910                                .AJAX_modal();
911                        });
912                    });
913                });
914            });
915        }
916    });
917    $(document).on($.AJAX_modal.AFTER_CLOSE, function (e, ctx) {
918        if (ctx && ctx.$elm && ctx.$elm.hasClass('ui-modal__ajax')) {
919            $("html,body").removeAttr('style');
920        }
921    });
922})();

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.