PageSourceSearch

https://indiogm.com/layouts/xe_kimtajo_layout/js/layout.js?20240630114727

js indiogm.com collected 2026-10-01 16:29:24 UTC 6,791 bytes, 204 lines download raw bytes

1(function($){
2    "use strict";
3    $(function(){
4        var $shrinkHeaderHeight = 300;
5        var $fixedHeader = $('.fixed_header .header_wrap');
6        var $gnb = $('.gnb');
7        var $hoverEl = $('.hover');
8        var $searchEl = $('.click > a');
9        var $searchForm = $('.search_area');
10
11        // Fixed header
12        if($fixedHeader.length)
13        {
14            var fixedHeaderHeight = $fixedHeader.height();
15            var hasClass = false;
16            var $logoImg = $fixedHeader.find('.header h1 img');
17            var logoDataSrc = $logoImg.data('logo');
18            var logo = $logoImg.attr('src');
19
20            $(window).scroll(function() {
21                var scroll = $(this).scrollTop();
22
23                if(scroll >= $shrinkHeaderHeight ) {
24                    if(!hasClass)
25                    {
26                        $fixedHeader.addClass('shrink');
27                        if(logoDataSrc) $logoImg.attr('src', logoDataSrc);
28                        hasClass = true;
29                    }
30                } else {
31                    if(hasClass)
32                    {
33                        $fixedHeader.removeClass('shrink');
34                        if(logoDataSrc) $logoImg.attr('src', logo);
35                        hasClass = false;
36                    }
37                }
38            });
39            $(window).triggerHandler('scroll');
40        }
41        // Gnb
42        if($(document).width() > 480){
43            $gnb.addClass('pc-gnb');
44        }
45
46        var $pc_gnb = $('.pc-gnb');
47        $pc_gnb.find('>ul>li>a')
48            .mouseover(function(){
49                $gnb.find('>ul>li>ul:visible').hide().parent('li').removeClass('on');
50                $(this).next('ul:hidden').stop().fadeIn(200).parent('li').addClass('on')
51            })
52            .focus(function(){
53                $(this).mouseover();
54            })
55            .end()
56            .mouseleave(function(){
57                $gnb.find('>ul>li>ul').hide().parent().removeClass('on')
58            });
59
60        $pc_gnb.find('>ul>li>ul>li>a')
61            .mouseover(function(){
62                $gnb.find('>ul>li>ul>li>ul:visible').hide().parent('li').removeClass('on');
63                $(this).next('ul:hidden').stop().fadeIn(200).parent('li').addClass('on')
64            })
65            .focus(function(){
66                $(this).mouseover();
67            })
68            .end()
69            .mouseleave(function(){
70                $gnb.find('>ul>li>ul>li>ul').hide().parent().removeClass('on')
71            });
72
73        $("#mobile_menu_btn").on('click', function(){
74            var isOpened = $(this);
75            if(isOpened.hasClass('opened')){
76                $("#gnb").find(">ul").slideUp(200);
77            }else{
78                $("#gnb").find(">ul:not(:animated)").slideDown(200);
79            }
80            isOpened.toggleClass('opened');
81        });
82        // login popup
83        $hoverEl.on('mouseenter mouseleave focusin focusout',function(e){
84            e.preventDefault();
85            if(e.type == 'mouseenter' || e.type == 'focusin'){
86                $(this).addClass('on');
87            } else {
88                $(this).removeClass('on');
89            }
90        });
91        // Search
92        $searchEl.click(function(){
93            if($searchForm.is(':hidden')){
94                $searchForm.fadeIn().find('input').focus();
95                if($('.magazine').length > 0){
96                    $('.custom_area').css('opacity',0);
97                    $('.side').css('opacity',0)
98                } else{
99                    $('.header').css('opacity',0)
100                }
101            }
102            return false;
103        });
104        $('.btn_close').click(function(){
105            var $this = $(this);
106            $this.parent().fadeOut().find('input').val('');
107            if($('.magazine').length > 0){
108                $('.custom_area').css('opacity',1);
109                $('.side').css('opacity',1)
110            } else{
111                $('.header').css('opacity',1)
112            }
113            $searchEl.focus();
114            return false;
115        });
116
117
118        // Login help, warning
119        $("#warning").on('touchend', function(e){
120            $(this).css('display', 'none');
121        });
122
123        // Scroll to top
124        var scrollToTop = function() {
125            var link = $('.btn_top');
126            var windowW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
127
128            $(window).scroll(function() {
129                if (($(this).scrollTop() > 150) && (windowW > 1000)) {
130                    link.fadeIn(100);
131                } else {
132                    link.fadeOut(100);
133                }
134            });
135
136            link.click(function() {
137                $('html, body').animate({scrollTop: 0}, 400);
138                return false;
139            });
140        };
141        scrollToTop();
142
143        // Sub Header Parallax
144        $('.sub_type3 .bg_img').parallax('50%',0.4);
145    })
146})(jQuery);
147(function($) {
148    "use strict";
149    var $window = $(window);
150    var windowHeight = $window.height();
151
152    $window.resize(function() {
153        windowHeight = $window.height()
154    });
155
156    $.fn.parallax = function(xpos, speedFactor, outerHeight) {
157        var $this = $(this);
158        var getHeight;
159        var firstTop;
160        $this.each(function() {
161            firstTop = $this.offset().top;
162        });
163
164        if (outerHeight) {
165            getHeight = function(object) {
166                return object.outerHeight(true)
167            }
168        } else {
169            getHeight = function(object) {
170                return object.height()
171            }
172        }
173        if (arguments.length < 1 || xpos === null)
174            xpos = "50%";
175        if (arguments.length < 2 || speedFactor === null)
176            speedFactor = 0.1;
177        if (arguments.length < 3 || outerHeight === null)
178            outerHeight = true;
179        function update() {
180            var pos = $window.scrollTop();
181            $this.each(function() {
182                var $element = $(this);
183                var top = $element.offset().top;
184                var height = getHeight($element);
185
186                if (top + height < pos || top > pos + windowHeight) {
187                    return
188                }
189                $this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px")
190            })
191        }
192        $window.bind('scroll', update).resize(update);
193        update()
194    }
195})(jQuery);
196
197
198(function($){
199    $(function(){
200        $('.bg-holder').parallaxScroll({
201            friction: 0.2
202        });
203    });
204})(jQuery);

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.