PageSourceSearch

https://mygalf.com/theme/js/store.js

js mygalf.com collected 2026-10-03 20:27:42 UTC 12,732 bytes, 361 lines download raw bytes

1function swap(image) {
2    "use strict";
3    var widthwindow1 = $(window).width();
4    document.getElementById("image").src = image.href;
5    if (widthwindow1 >= 1024) {
6        $('#image').elevateZoom({
7            zoomType: "inner",
8            cursor: "crosshair",
9            zoomWindowFadeIn: 375,
10            zoomWindowFadeOut: 375
11        });
12    }
13}
14function swap1(image) {
15    document.getElementById("images-select").src = image.href;
16}
17;
18function slider_owl(slider_id, visible1, visible2, visible3, visible4, margin, slidby) {
19    $(slider_id).owlCarousel({
20        navigation: true,
21        slideSpeed: 500,
22        singleItem: true,
23        pagination: true,
24        autoplay: false,
25        margin: margin,
26        slideBy:slidby,
27        autoplayTimeout: 2000,
28        autoplayHoverPause: true,
29        loop: true,
30        responsiveClass: true,
31        responsive: {
32            0: {
33                items: visible1
34            },
35
36            // 410: {
37            // 480: {
38             359: {
39                items: visible2
40
41            },
42
43            767: {
44                items: visible3
45            },
46
47            1025: {
48                items: visible4
49            }
50        }
51    });
52}
53$(document).ready(function () {
54
55    if ($(".tp-banner").length) {
56        $('.ver1 .tp-banner').revolution({
57            delay: 9000,
58            startwidth: 1765,
59            startheight: 840,
60            hideThumbs: 10,
61            fullWidth: "on",
62            forceFullWidth: "on"
63        });
64        $('.ver2 .tp-banner').revolution({
65            delay: 9000,
66            startwidth: 1315,
67            startheight: 860,
68            hideThumbs: 10,
69            fullWidth: "on",
70            forceFullWidth: "on"
71        });
72        $('.ver3 .tp-banner').revolution({
73            delay: 9000,
74            startwidth: 1765,
75            startheight: 400,
76            hideThumbs: 10,
77            fullWidth: "on",
78            forceFullWidth: "on",
79            bullets: {
80                enable: false
81            }
82        });
83        $('.ver4 .tp-banner').revolution({
84            delay: 9000,
85            startwidth: 1765,
86            startheight: 910,
87            hideThumbs: 10,
88            fullWidth: "on",
89            forceFullWidth: "on"
90        });
91        $(".tp-leftarrow").html("");
92        $(".tp-rightarrow").html("");
93    }
94    if ($(".product-img-box #image-view").length) {
95        var widthwindow1 = $(window).width();
96        if (widthwindow1 >= 1024) {
97            $('#image').elevateZoom({
98                zoomType: "inner",
99                cursor: "crosshair",
100                zoomWindowFadeIn: 375,
101                zoomWindowFadeOut: 375
102            });
103        }
104    }
105    // Tabs
106    $(".tab-content").hide();
107    $("ul.tabs").each(function () {
108        $(this).children().first().addClass("active");
109        $(this).next().children().first().show().addClass("active");
110    });
111    $("ul.tabs li").each(function () {
112        $(this).on("click", function () {
113            var tab_content = $(this).parent().next().children();
114            $(this).parent().children().removeClass("active");
115            $(this).addClass("active");
116            tab_content.hide().removeClass("active");
117            var activeTab = $(this).attr("rel");
118            $("#" + activeTab).fadeIn(400).addClass("active");
119        });
120    });
121    // End tabs
122    $(".products.grid_full .product").each(function () {
123        $(this).find(".product-images").wrap('<div class="wrap-product-images"></div>');
124        $(this).find(".wrap-product-images").append($(this).find(".add-to-cart")).append($(this).find(".action"));
125    });
126    // Slider products
127    var owl = $(".product-tab-content");
128    var owl2 = $(".product-tab-content1");
129    var owl3 = $("#secondary .sidebar-slider");
130    var mason = $(".tab-product-all-mason .col-md-7 .slider-one-item");
131    var menu_top_header3 = $(".header-v3 .menu-top");
132    var menu_level1 = $("ul.menu-level-1");
133    var mega_menu = $(".mega-menu");
134    var sub_menu = $(".mega-menu .sub-menu");
135    var header3_menu2 = $(".header-v3 .menu-top li.level-1 .menu-level2");
136    $(window).on("orientationchange load resize", function () {
137        $('#preloader').delay(1000).fadeOut('400', function () {
138            $(this).fadeOut()
139        });
140        owl.css({
141            "width": $(".container").width() + "px"
142        });
143        owl2.css({
144            "width": $("#primary").width() + "px"
145        });
146        owl3.css({
147            "width": $("#secondary").width() + "px"
148        });
149        mason.css({
150            "width": $(".container").width() + "px"
151        });
152        var widthwindow = $(window).width();
153        if (widthwindow > 1024) {
154            menu_top_header3.insertAfter($(".header-v3 .search.dropdown"));
155            sub_menu.addClass("dropdown-menu");
156            header3_menu2.addClass("dropdown-menu");
157            menu_level1.addClass("dropdown-menu");
158            mega_menu.insertAfter($(".header-top .logo"));
159        } else {
160            header3_menu2.removeClass("dropdown-menu");
161            sub_menu.removeClass("dropdown-menu");
162            menu_top_header3.insertAfter($(".header-v3 .header-top"));
163            menu_level1.removeClass("dropdown-menu");
164            mega_menu.insertAfter($("#header"));
165        }
166        $("#googleMap").css({
167            "height": $(".contact-form").innerHeight() + "px"
168        });
169        $(".mockup-text").css({
170            "height": $(".mockup-images").innerHeight() + "px"
171        });
172    });
173    owl.css({
174        "width": $(".container").width() + "px"
175    });
176    owl2.css({
177        "width": $("#primary").width() + "px"
178    });
179    owl3.css({
180        "width": $("#secondary").width() + "px"
181    });
182    mason.css({
183        "width": $(".container").width() + "px"
184    });
185
186    // Slider
187    slider_owl(".product-tab-content", 2, 3, 3, 8, 5, 5);
188    // slider_owl(".seasons-favourite-product", 2, 2, 3, 5, 20, 5);
189    slider_owl(".seasons-favourite-product", 2, 3, 6, 6, 20, 5);
190    slider_owl(".product-tab-content2", 2, 3, 3, 6, 20, 4);
191    slider_owl(".feature-product-bar .product-tab-content1", 1, 2, 2, 3, 20, 3);
192    slider_owl(".slider-product-3-item .products", 1, 2, 2, 3);
193    slider_owl(".slider-product-2-item .blog-post-inner", 1, 2, 2, 2);
194    slider_owl(".new-product-bar .product-tab-content1", 1, 2, 2, 3, 20);
195    slider_owl(".blog-post-inner", 1, 2, 2, 3, 20);
196    slider_owl(".blog-post-inner", 1, 2, 2, 3, 20);
197    slider_owl(".brand-content", 2, 3, 4, 6, 0);
198
199    slider_owl(".slider-one-item", 1, 1, 1, 1, 0);
200    slider_owl(".slider-two-item", 1, 2, 2, 2, 0);
201    slider_owl(".upsell-product", 2, 2, 3, 5, 20);
202
203    // click to zoom
204    var img_box_thum = $(".product-img-box .thumb-content li");
205    img_box_thum.first().addClass("active");
206    img_box_thum.on("click", function () {
207        img_box_thum.removeClass("active");
208        $(this).addClass("active");
209    });
210
211
212    $('.owl-controls .owl-prev').html('<i class="fa fa-angle-left"></i>');
213    $('.owl-controls .owl-next').html('<i class="fa fa-angle-right"></i>');
214    $('.brand-container .owl-controls .owl-prev').html('<i class="fa fa-angle-left"></i>');
215    $('.brand-container .owl-controls .owl-next').html('<i class="fa fa-angle-right"></i>');
216    $('.bottom-home1 .owl-controls .owl-prev').html('<i class="fa fa-angle-left"></i>');
217    $('.bottom-home1 .owl-controls .owl-next').html('<i class="fa fa-angle-right"></i>');
218    // Click to Hover
219    $('.dropdown').hover(function () {
220        $(this).find('.dropdown-menu').stop(true, true).fadeIn(200).toggleClass("hover");
221        $(this).toggleClass("active");
222    }, function () {
223        $(this).find('.dropdown-menu').stop(true, true).fadeOut(200).toggleClass("hover");
224        $(this).toggleClass("active");
225    });
226
227    // Click Icon Menu Mobile
228    $(".icon-menu-mobile").on("click", function () {
229        $(".navbar-nav").slideToggle();
230        $(this).toggleClass("active");
231    });
232    $(".header-v3 .icon-menu-mobile").on("click", function () {
233        menu_top_header3.slideToggle();
234    });
235    $('li:has(ul)').addClass('hassub');
236    $('li:has(".sub-menu")').addClass('images');
237    $(".sub-menu img").parent().addClass("images");
238    $(".mega-menu ul li a").after('<i class="fa fa-plus"></i>');
239    $(".nav-home6 li a").after('<i class="fa fa-plus"></i>');
240
241    $(".ordering .list").on("click", function () {
242        $(this).toggleClass("active");
243        $(".products").addClass("list-item");
244        $(".ordering .col").removeClass("active");
245        $(".products.grid_full .product").each(function () {
246            $(this).append($(this).find(".add-to-cart"));
247            $(this).append($(this).find(".action"));
248        });
249    });
250    $(".ordering .col").on("click", function () {
251        $(this).toggleClass("active");
252        $(".products").removeClass("list-item");
253        $(".ordering .list").removeClass("active");
254        $(".products.grid_full .product").each(function () {
255            $(this).find(".wrap-product-images").append($(this).find(".add-to-cart")).append($(this).find(".action"));
256        });
257    });
258
259    $(".close-popup").on("click", function () {
260        $(".popup-content").hide();
261    });
262    $(".closeqv").on("click", function () {
263        $(".quickview-wrapper").hide();
264    });
265
266    $("ul.product-categories li.hassub a").after('<i class="fa fa-caret-right"></i>');
267    $("ul li.hassub i").on("click", function () {
268        $(this).toggleClass("active").next().slideToggle();
269        $(this).parent().toggleClass("active");
270    });
271	$("ul li.hassub > a").on("click", function (e) {		
272		e.preventDefault();
273        $(this).siblings('i').toggleClass("active").next().slideToggle();
274        $(this).parent().toggleClass("active");
275    });
276    var megamenu_v2 = $(".megamenu-v2");
277    $("#header .fa-bars").on("click", function () {
278        megamenu_v2.addClass("show-ef");
279    });
280
281    $(".megamenu-v2 .fa-times").on("click", function () {
282        megamenu_v2.removeClass("show-ef");
283    });
284    $(".form-check").on("click", function () {
285        $(this).toggleClass("active");
286    });
287    /* event more-views click see big image. */
288    var back_to_top = $('#back-to-top');
289    if (back_to_top.length) {
290        var scrollTrigger = 100, // px
291                backToTop = function () {
292                    var scrollTop = $(window).scrollTop();
293                    if (scrollTop > scrollTrigger) {
294                        back_to_top.addClass('show');
295                    } else {
296                        back_to_top.removeClass('show');
297                    }
298                };
299        $(window).on('scroll', function () {
300            backToTop();
301        });
302        back_to_top.on('click', function (e) {
303            e.preventDefault();
304            $('html,body').animate({
305                scrollTop: 0
306            }, 700);
307        });
308    }
309
310    $(".calculate").on('click', function () {
311        $(this).next().slideToggle();
312        $(this).toggleClass("active");
313    });
314    var lightgallery = $('#lightgallery');
315    if (lightgallery.length > 0) {
316        lightgallery.lightGallery();
317    }
318    if ($('.wow').length > 0) {
319        wow = new WOW({
320            animateClass: 'animated',
321            offset: 200,
322            callback: function (box) {
323                console.log("WOW: animating <" + box.tagName.toLowerCase() + ">")
324            }
325        });
326        wow.init();
327    }
328    var slider_lookbook2 = $('.slider-loobook2');
329    if (slider_lookbook2.length > 0) {
330        slider_lookbook2.slick({
331            infinite: true,
332            centerMode: true,
333            slidesToShow: 1,
334            slidesToScroll: 1
335        });
336    }
337    var slider_slick_home8 = $(".slider-slick-home8")
338    if (slider_slick_home8.length > 0) {
339        slider_slick_home8.slick({
340            dots: true,
341            infinite: true,
342            centerMode: true,
343            slidesToShow: 3,
344            slidesToScroll: 3,
345            responsive: [{
346                    breakpoint: 480,
347                    settings: {
348                        slidesToShow: 1,
349                        slidesToScroll: 1
350                    }
351                }]
352        });
353    }
354    if ($('.blog-masonry').length > 0) {
355        $('.grid').masonry({
356            itemSelector: '.grid-item',
357            columnWidth: '.grid-sizer',
358            percentPosition: true
359        });
360    }
361});

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.