PageSourceSearch

https://www.onesiam.com/assets/js/functions.js

js onesiam.com collected 2026-09-24 09:29:21 UTC 6,805 bytes, 265 lines download raw bytes

1$(document).ready(function(){
2
3	$(window).on('resize', function(){
4		smartResize();
5		// initSwipe();
6        //initMenu();
7    });
8    
9    $(".chkFashion").on('change', function(){
10        var val = $(this).val();
11        top.location = baseurl +"/" + baseLocale + "/fashion/" +val; 
12    });
13
14    
15
16
17});
18
19
20function smartResize() {
21	setTimeout(function(){
22
23	},50);
24}
25
26function closePopup() {
27    $.magnificPopup.close();
28    return false;
29}
30
31var lastScrollTop = 0;
32function initLoaded() {
33    $(".wrapper").css({opacity : 1});
34    $("#main-mobile-nav").css({opacity : 1});
35    smartResize();
36
37    $('#hero-banner').owlCarousel({
38        loop: true,
39        margin: 0,
40        responsiveClass: true,
41        loop: true,
42        autoplay: true,
43        autoplayTimeout: 8000,
44        autoplayHoverPause: true,
45        smartSpeed: 2000,
46        responsive: {
47            0: {
48                items: 1,
49                nav: false,
50                dots: true
51            }
52        }
53    });
54
55    AOS.init({
56        duration: 1500,
57        once: true,
58        offset : -180
59    });
60
61    if (jQuery().matchHeight) {
62
63        $('.section .content-box').matchHeight({
64            property: 'min-height'
65        });
66
67        $('.privilege-item').matchHeight({
68            property: 'min-height'
69        });
70
71    }
72
73    $('#imageGallery').lightSlider({
74        gallery: true,
75        item: 1,
76        loop: true,
77        thumbItem: 9,
78        slideMargin: 0,
79        enableDrag: true,
80        currentPagerPosition: 'left',
81        onSliderLoad: function (el) {
82            console.log(el);
83            /*el.lightGallery({
84                selector: '#imageGallery .lslide'
85            });*/
86        }
87    });  
88
89    
90    $(window).scroll(function (event) {
91        var st = $(this).scrollTop();
92        var direction = "up";
93        if (st > lastScrollTop) {
94            direction = "down";
95        } 
96
97        lastScrollTop = st;
98
99        if(st < 470 ) {
100            $("body").removeClass("s-scroll");
101            $("body").removeClass("s-down");
102        } else {
103            if (!$("body").hasClass('s-scroll')) {
104                $("body").addClass("s-scroll");
105            }
106
107            if( direction == "down" && ! $("body").hasClass('s-down') ) {
108                $("body").addClass("s-down");
109            } else if ( direction == "up" && $("body").hasClass('s-down')) {
110                $("body").removeClass("s-down");
111            }
112        }
113
114    });
115
116    var $containerMasonries = $('.masonry');
117
118    $containerMasonries.each(function (i, el) {
119        var $this = $(el)
120
121        if ($this.attr("id") != undefined || $this.attr('id') != null) {
122
123            $this.imagesLoaded(function () {
124
125                $this.isotope({
126                    // main isotope options
127                    // isInitLayout: false,
128                    itemSelector: '.masonry-item',
129                    // set layoutMode
130                    layoutMode: 'masonry',
131                    masonry: {
132                        columnWidth: '.grid-sizer',
133                        // fitWidth: true,
134                        gutter: '.gutter-sizer'
135                        // gutter: 20
136                    },
137                    //layoutMode: 'fitRows',
138                    // percentPosition: true,
139                    // options for masonry layout mode
140                    /*fitRows: {
141                        columnWidth: '.grid-sizer',
142                        fitWidth: true,
143                        gutter: '.gutter-sizer'
144                        // gutter: 20
145                    }*/
146                });
147
148
149
150            });
151
152            $this.infinitescroll({
153                navSelector: '#page-nav',    // selector for the paged navigation 
154                nextSelector: '#page-nav a',  // selector for the NEXT link (to page 2)
155                itemSelector: '.masonry-item',     // selector for all items you'll retrieve
156                loading: {
157                    finishedMsg: '',
158                    img: baseurl + "/assets/images/loading.gif",
159                    msgText: ''
160                }
161            },
162                // trigger Masonry as a callback
163                function (newElements) {
164
165                    // hide new items while they are loading
166                    var $newElems = $(newElements).css({ opacity: 0 });
167                    // ensure that images load before adding to masonry layout
168                    $newElems.imagesLoaded(function () {
169                        // show elems now they're ready
170                        $newElems.animate({ opacity: 1 });
171                        // $this.masonry( 'appended', $newElems, true ); 
172                        $this.isotope('appended', $newElems, true);
173
174                    });
175                }
176            );
177
178        }
179
180    });
181
182    
183
184    /*var $containerTrends = $('#trends');
185
186    if ($containerTrends.attr("id") != undefined || $containerTrends.attr('id') != null) {
187
188        $containerTrends.imagesLoaded(function () {
189
190            $containerTrends.isotope({
191                // main isotope options
192                itemSelector: '.trend-item',
193                // set layoutMode
194                // layoutMode: 'masonry',
195                // percentPosition: true,
196                // options for masonry layout mode
197
198                masonry: {
199                    columnWidth: '.grid-sizer',
200                    // isFitWidth: true,
201                    // gutter: '.gutter-sizer'
202                }
203            });
204
205
206
207        });
208
209    }*/
210
211}
212
213
214function openNav() {
215    $(".wrapper").addClass('open');
216    $("body").addClass('navOpen');
217    // document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
218    return false;
219}
220
221function closeNav() {
222    $(".wrapper").removeClass('open');
223    $("body").removeClass('navOpen');
224    // document.body.style.backgroundColor = "white";
225    return false;
226}
227
228function openHomePopup() {
229
230    $.magnificPopup.open({
231        items: {
232            src: 'https://www.youtube.com/watch?v=tfV-Ge12r9g'
233        },
234        type: 'iframe',
235        iframe: {
236            markup: '<div class="mfp-iframe-scaler">' +
237                '<div class="mfp-close"></div>' +
238                '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +
239                '</div>', // HTML markup of popup, `mfp-close` will be replaced by the close button
240
241            patterns: {
242                youtube: {
243                    index: 'youtube.com/',
244                    id: 'v=',
245                    src: '//www.youtube.com/embed/%id%?autoplay=1&amp;rel=0'
246                }
247            },
248            srcAction: 'iframe_src',
249        }
250    });
251
252    return false;
253}
254
255function openHomePopup2(img) {
256
257    $.magnificPopup.open({
258        items: {
259            src: img
260        },
261        type: 'image'
262    });
263
264    return false;
265}

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.