PageSourceSearch

https://williesgrillandicehouse.com/wp-content/themes/williesicehouse/assets/js/scripts.js?ver=6.6.1

js williesgrillandicehouse.com collected 2026-10-02 14:53:48 UTC 35,193 bytes, 1,131 lines download raw bytes

1$(document).ready(function () {
2    "use strict";
3
4    var screenWidth = window.outerWidth;
5    var windowWidth = $(window).width();
6    var scrollWidth = screenWidth - windowWidth;
7    
8    $(document).on('click', '.popup-modal-dismiss', function (e) {
9        e.preventDefault();
10        $.magnificPopup.close();
11    });
12	
13    $('.store-review-form-page .hide-on-mobile').scrollToFixed({
14        marginTop: $('.header-content').outerHeight(true),
15        limit: function () {
16            var limit = $('.site-footer').offset().top - $('.store-review-form-page .hide-on-mobile').outerHeight(true) - 55;
17            return limit;
18        },
19        zIndex: 1
20    });
21
22    $(".join-e-club, a[href='#e-club-popup'], a[href='#e-club-popup-sign-up']").magnificPopup({
23        items: {
24            src: '#e-club-popup-sign-up'
25        },
26        type: 'inline',
27        mainClass: 'mfp-zoom-in',
28        showCloseBtn: false,
29        fixedContentPos: false,
30        removalDelay: 500,
31        // callbacks: {
32        //     beforeOpen: function() {
33        //         $('#header .header-content').css('left', '-' + scrollWidth/2 + 'px');
34        //     },
35        //     close: function() {
36        //         $('#header .header-content').css('left', '0px');
37        //     }
38        //  }
39    });
40	
41    $("a[href='#e-club-popup-sign-in']").magnificPopup({
42        items: {
43            src: '#e-club-popup-sign-in'
44        },
45        type: 'inline',
46        mainClass: 'mfp-zoom-in',
47        showCloseBtn: false,
48        fixedContentPos: false,
49        removalDelay: 600,
50        // callbacks: {
51        //     beforeOpen: function() {
52        //         $('#header .header-content').css('left', '-' + scrollWidth/2 + 'px');
53        //     },
54        //     close: function() {
55        //         $('#header .header-content').css('left', '0px');
56        //     }
57        //  }
58    });
59
60    $(".landmark-modal").magnificPopup({
61        items: {
62            src: '#location-confirmation-popup'
63        },
64        type: 'inline',
65        mainClass: 'mfp-zoom-in',
66        showCloseBtn: false,
67        fixedContentPos: false,
68        removalDelay: 500,
69    });
70    
71    $(document).ready(function() {
72        $(document).on('click', '.wpsl-store-location .order-online, .wpsl-info-window .order-online', function(e) {
73            e.preventDefault(); // Prevent link redirection
74            
75            // Get the parent .location-item (store card)
76            var storeCard = $(this).closest('.location-item, .wpsl-info-window');
77            
78            // Extract store information
79            var storeName = storeCard.find('.title').text(); // Store name
80            var storeAddress = storeCard.find('.store-address').text(); // Store address
81            var landmark = storeCard.find('.landmark').text(); // Store landmark
82            var orderLink = $(this).attr('href'); // Order Now link
83    
84            // Insert the information into the modal
85            $('#localization-popup .location-name').text(storeName);
86            $('#localization-popup .address').text(storeAddress);
87            $('#localization-popup .landmark').text(landmark);
88            $('#localization-popup .procees-btn').attr('href', orderLink);
89    
90            // Open the modal using MagnificPopup
91            $.magnificPopup.open({
92                items: {
93                    src: '#localization-popup'
94                },
95                type: 'inline',
96                mainClass: 'mfp-zoom-in',
97                showCloseBtn: false,
98                fixedContentPos: false,
99                removalDelay: 600,
100            });
101        });
102    });
103    
104
105    if ($('.section-hero').hasClass('header-option')) {
106        $('body').addClass('transparent-header');
107    }
108    if ($('.section-hero-v2').hasClass('header-option')) {
109        $('body').addClass('transparent-header');
110    }
111    if ($('#wpsl-search-input').length) {
112        $('#wpsl-search-input').attr('placeholder', 'Address, Zip Code or City');
113    }
114
115    if ($('.section-hero').hasClass('hero-darker') && $('body').hasClass('transparent-header')) {
116        $('body').addClass('header-light');
117    }
118
119    if ($('.matchHeight').length) {
120        $('.matchHeight').matchHeight();
121    }
122
123    $(document).on('click', '.open-in-new-tab a', function (e) {
124        e.preventDefault();
125        var url = $(this).attr('href');
126        window.open(url, '_blank');
127    });
128
129    var options = {
130        offset: 300,
131        tolerance: 1,
132        // callback when pinned, `this` is headroom object
133        onPin: function () {
134            if ($('.menu-navigation').length) {
135                $('.menu-navigation').removeClass('menu-nav-scrolling');
136            }
137        },
138        // callback when unpinned, `this` is headroom object
139        onUnpin: function () {
140            if ($('.menu-navigation').length) {
141                $('.menu-navigation').addClass('menu-nav-scrolling');
142            }
143        }
144    };
145
146    $(".header-content").headroom(options);
147
148    if ($('.featured-items-slider').length > 0) {
149        var $slick_slider = $('.featured-items-slider');
150        var $mobile_slider = $('.items-slider');
151        var settings = {
152            infinte: false,
153            speed: 500,
154            slidesToShow: 3,
155            slidesToScroll: 1,
156            arrows: false,
157            dots: true,
158            centerMode: true,
159            centerPadding: "70px",
160            responsive: [{
161                    breakpoint: 992,
162                    settings: {
163                        slidesToShow: 2,
164                        slidesToScroll: 2,
165                        centerPadding: "50px",
166                    }
167                },
168                {
169                    breakpoint: 768,
170                    settings: {
171                        slidesToShow: 1,
172                        slidesToScroll: 1,
173                        centerPadding: "20px",
174                        variableWidth: true,
175                        centerMode: false
176                    }
177                }
178            ]
179        }
180
181        if ($(window).width() < 1024) {
182            //$slick_slider.slick(settings);
183            $mobile_slider.slick(settings);
184        }
185
186        $(window).on('resize', function () {
187            if ($(window).width() > 1023) {
188                if ($slick_slider.hasClass('slick-initialized')) {
189                    $slick_slider.slick('unslick');
190                }
191                return
192            }
193
194            if (!$slick_slider.hasClass('slick-initialized')) {
195                return $slick_slider.slick(settings);
196            }
197        });
198    }
199
200    if ($('.menu-cards-mobile-slider').length > 0) {
201        $('.menu-cards-mobile-slider').slick({
202            infinte: true,
203            speed: 500,
204            slidesToShow: 3,
205            slidesToScroll: 1,
206            arrows: true,
207            nextArrow: '<button class="arrows next"><img src="'+templateUrl+'/assets/images/arrow-right.svg"></button>',
208            prevArrow: '<button class="arrows prev"><img src="'+templateUrl+'/assets/images/arrow-left.svg"></button>',
209            dots: false,
210            responsive: [{
211                breakpoint: 991,
212                settings: {
213                    slidesToShow: 2
214                },
215                breakpoint: 767,
216                settings: {
217                    slidesToShow: 1
218                }
219                
220            }]
221        });
222    }
223
224    $('.wpcf7 select').select2({
225        minimumResultsForSearch: -1
226    });
227
228    $('#days').select2({
229        placeholder: "Day",
230        minimumResultsForSearch: -1
231    });
232    $('#months').select2({
233        placeholder: "Month",
234        minimumResultsForSearch: -1
235    });
236    $('#StoreCode').select2({
237        placeholder: "-----",
238        minimumResultsForSearch: -1
239    });
240
241    $('.location-field').select2({
242        placeholder: "Choose your location",
243        minimumResultsForSearch: -1
244    });
245
246    
247
248    $('.store-gallery-main-image').slick({
249        slidesToShow: 1,
250        slidesToScroll: 1,
251        infinte: false,
252        arrows: false,
253        fade: true,
254        asNavFor: '.store-gallery-thumbnails-slider .store-gallery-thumbnails-container',
255        adaptiveHeight: true
256    });
257
258    $('.store-gallery-thumbnails-slider .store-gallery-thumbnails-container').slick({
259        slidesToShow: 4,
260        slidesToScroll: 1,
261        asNavFor: '.store-gallery-main-image',
262        nextArrow: '<button class="arrows next"><i class="fas fa-angle-right"></i></button>',
263        prevArrow: '<button class="arrows prev"><i class="fas fa-angle-left"></i></button>',
264        focusOnSelect: true,
265        infinte: false,
266        draggable: false,
267        responsive: [{
268                breakpoint: 1200,
269                settings: {
270                    slidesToShow: 3
271                }
272            },
273            {
274                breakpoint: 992,
275                settings: {
276                    slidesToShow: 2
277                }
278            },
279            {
280                breakpoint: 768,
281                settings: {
282                    slidesToShow: 3
283                }
284            },
285            {
286                breakpoint: 480,
287                settings: {
288                    slidesToShow: 2
289                }
290            }
291        ]
292    });
293
294    if ($('.store-review-slider').length) {
295        var store_reviews_slider = $('.store-review-slider .store-review-slider-containre');
296        store_reviews_slider.slick({
297            infinte: true,
298            speed: 500,
299            slidesToShow: 2,
300            slidesToScroll: 1,
301            nextArrow: '<button class="arrows next"><i class="fas fa-angle-right"></i></button>',
302            prevArrow: '<button class="arrows prev"><i class="fas fa-angle-left"></i></button>',
303            dots: false,
304            adaptiveHeight: true,
305            responsive: [{
306                breakpoint: 768,
307                settings: {
308                    slidesToShow: 1,
309                    adaptiveHeight: true,
310                    dots: true,
311                    arrows: false
312                }
313            }]
314        });
315    }
316
317    $(".menu-navigation .navbar").on('scroll', function() {
318    	$val = $(this).scrollLeft();
319
320    	if($(this).scrollLeft() + $(this).innerWidth()>=$(this)[0].scrollWidth){
321          $(".next").hide();
322        } else {
323    		$(".next").show();
324    	}
325
326    	if($val == 0){
327    		$(".prev").hide();
328    	} else {
329    		$(".prev").show();
330    	}
331  	});
332	console.log( 'init-scroll: ' + $(".next").scrollLeft() );
333	$(".next").on("click", function(){
334		$(".menu-navigation .navbar").animate( { scrollLeft: '+=200' }, 500);
335		
336	});
337	$(".prev").on("click", function(){
338		$(".menu-navigation .navbar").animate( { scrollLeft: '-=200' }, 500);
339	});
340    /* 
341     * Gallery fancybox
342     */
343
344    var screenWidth = window.outerWidth;
345    var windowWidth = $(window).width();
346    var scrollWidth = screenWidth - windowWidth;
347    $('[data-fancybox]').fancybox({
348        loop: true,
349        animationEffect: "fade",
350        beforeLoad: function (instance, slide) {
351            $('.header-content').css('left', '-' + scrollWidth / 2 + 'px');
352        },
353        afterClose: function (instance, slide) {
354            $('.header-content').css('left', '0px');
355        }
356    });
357
358    $('.toggle-menu').on('click', function () {
359        //$(this).toggleClass("menu-open");
360        $('.main-menus').toggleClass("open");
361    });
362
363    $('#store-review-form').submit(function () {
364        $('.invalid-feedback').remove();
365
366        $.ajax({
367            url: williesgrill.ajaxurl,
368            method: 'POST',
369            data: {
370                action: 'add_store_review',
371                nonce: williesgrill.nonce,
372                data: $('#store-review-form').serialize()
373            },
374            datType: 'JSON',
375            success: function (response) {
376                if (Object.keys(response.errors) == 0) {
377                    alert('Your review has been added');
378                    location.href = response.url;
379                } else {
380                    for (var i in response.errors) {
381                        if (jQuery('input[name="' + i + '"]').length) {
382                            jQuery('input[name="' + i + '"]').parents('.form-group').append('<div class="invalid-feedback" style="display: block;">' + response.errors[i] + '</div>');
383                        } else {
384                            alert(response.errors[i]);
385                        }
386                    }
387                }
388            }
389        });
390
391        return false;
392    });
393
394    $('.datepicker').datetimepicker({
395        format: 'Y-m-d',
396        timepicker: false
397    });
398
399    $('.timepicker').datetimepicker({
400        datepicker: false,
401        format: 'H:i'
402    });
403
404    jQuery('.wpcf7 #contact-form-section').change(function () {
405        jQuery('.wpcf7 .hide').hide();
406        jQuery('.wpcf7 fieldset input, .wpcf7 fieldset select').val('');
407
408        switch (jQuery(this).val()) {
409            case 'Recent visit':
410                jQuery('.wpcf7 #recent-visit').show();
411                break;
412            case 'General Inquiry':
413                jQuery('.wpcf7 #general-inquiry').show();
414                break;
415            case 'E-Club':
416                jQuery('.wpcf7 #e-club').show();
417                break;
418            case 'Other':
419                jQuery('.wpcf7 #other').show();
420                break;
421        }
422    });
423
424    jQuery('.wpcf7 #general-inquiry > .form-group select').change(function () {
425        jQuery(this).parents('.wpcf7 #general-inquiry').find('.hide').hide();
426
427        switch (jQuery(this).val()) {
428            case 'Inquiry for specific store(donation/fundraiser)':
429                jQuery('.wpcf7 #inquiry-specific-location').show();
430                break;
431            case 'Gift Card':
432                jQuery('.wpcf7 #inquiry-gift-card').show();
433                break;
434            case 'Other':
435                jQuery('.wpcf7 #inquiry-other').show();
436                break;
437        }
438    });
439
440    jQuery('.wpcf7 #e-club > .form-group select').change(function () {
441        jQuery(this).parents('.wpcf7 #e-club').find('.hide').hide();
442
443        switch (jQuery(this).val()) {
444            case 'Update e-mail address?':
445                jQuery('.wpcf7 #update-my-email-address').show();
446                break;
447            case 'Update my favorite location':
448                jQuery('.wpcf7 #update-my-favorite-location').show();
449                break;
450        }
451    });
452
453    checkScroll();
454
455    $(document).on('click', '.menu-navigation .navbar-nav .nav-item:not(.more) .nav-link', function (e) {
456        e.preventDefault();
457        var header_height = $('.site-header .header-content').outerHeight();
458        var menu_height = $('.menu-navigation').outerHeight();
459        var target = $(this).attr('href');
460        $('body, html').animate({
461            scrollTop: $(target).offset().top - menu_height - 130
462        }, 1000);
463    });
464
465    $(document).on('click', '.hero-ctas .bt[href="#scroll-to-next-section"]', function (e) {
466        e.preventDefault();
467        var header_height = $('.site-header .header-content').outerHeight();
468        $('body, html').animate({
469            scrollTop: $(this).closest('.section-hero').next('[class*="section-"]').offset().top - header_height
470        }, 1000);
471    });
472
473    $(document).ready(function(){
474        $("#view-map").click(function(){
475          $("#wpsl-gmap").slideToggle(); // toggle collapse
476          $(this).text(function(i, v){
477            return v === 'show map' ? 'hide map' : 'show map'
478         })
479        });
480    });
481
482    /* 
483        Cookies - scroll anchor
484    */
485    if ($('body.page-template-menu').length) {
486
487        var url_hash = window.location.href;
488        var menu_height = $('.menu-navigation').outerHeight();
489
490        if (url_hash !== 'undefined') {
491
492            setTimeout(function () {
493                // var url      = window.location.href;
494                var url = url_hash;
495                var hashID = url.substring(url.indexOf("#") + 1);
496
497                if (hashID !== url_hash) {
498                    $('html,body').animate({
499                        scrollTop: $('#' + hashID).offset().top - menu_height - 130
500                    }, 1000);
501                }
502            }, 300);
503        }
504    }
505
506
507    if ($('#e-club-popup').length > 0) {
508        $('#e-club-popup .page-form .form-group.selects, #e-club-popup .page-form .form-group.zipCode').remove();
509    }
510
511    if ($('.e-club-bottom-bar').length > 0) {
512        jQuery(document).on('click', '.e-club-bottom-bar .close-e-ClubBar', function (e) {
513            e.preventDefault();
514            $('body').removeClass('showEClubBar');
515            createCookie('eClubBarInactive', 1, 30);
516        });
517    }
518
519    $("form.e-club-form").submit(function (event) {
520        $('body').removeClass('showEClubBar');
521        createCookie('eClubBarInactive', 1, 30);
522    });
523	
524    // Resize iFrames
525	
526    // iFrameResize({ log: true });
527
528    $(document).mouseup(function (e) {
529
530        // var search_container = $(".side-menu-wrapper");    
531        var side_menu = $("#side-menu");
532        // if (!search_container.is(e.target) && search_container.has(e.target).length === 0) {
533        //     $('body').removeClass('side-menu-is-open');
534        //     $('.side-menu-trigger').attr('aria-expanded', false);
535        // }
536        if (side_menu.is(e.target)) {
537            $('body').removeClass('side-menu-is-open');
538            $('.side-menu-trigger').attr('aria-expanded', false);  
539            $('.close-side-menu').attr('aria-expanded', false);  
540        }
541
542        var tooltip_container = $(".tooltip-wrapper");
543        if (!tooltip_container.is(e.target) && tooltip_container.has(e.target).length === 0) {
544            if( $('.tooltip-wrapper').hasClass('active') == true){
545                $('.tooltip-icon').attr('aria-expanded', false);
546            }
547            $('.tooltip-wrapper').removeClass('active');
548        }
549    });
550
551    $(document).keyup(function (e) {
552        if (e.key === "Escape") { // escape key maps to keycode `27`
553            $('body').removeClass('side-menu-is-open');
554            $('.side-menu-trigger').attr('aria-expanded', false);
555            $('.close-side-menu').attr('aria-expanded', false);  
556            if($('body').hasClass('side-menu-is-open') == true) {
557                $('.side-menu-trigger').focus();
558            }
559            $('.tooltip-wrapper').removeClass('active');
560        }
561    });
562
563    $(document).on('click', '.side-menu-trigger', function (e) {
564        e.preventDefault();
565        var aria_expanded_state = ($('body').hasClass('side-menu-is-open') === true ? 'false' : 'true');
566        $(this).attr('aria-expanded', aria_expanded_state);
567        $('body').toggleClass('side-menu-is-open');
568    });
569
570});
571
572$(window).on('load', function () {
573
574    var eClubBarStatus = readCookie("eClubBarInactive");
575    if (!eClubBarStatus == 1) {
576        setTimeout(function () {
577            $('body').addClass('showEClubBar');
578            $('.e-club-bottom-bar').css('height', $('.e-club-bottom-bar-wrapper').outerHeight() + 'px');
579        }, 3000);
580    } else {
581        $('body').removeClass('showEClubBar');
582    }
583
584    if (window.location.href.indexOf("e-club-thankyou-popup") > 0) {
585        setTimeout(function () {
586            jQuery.magnificPopup.open({
587                items: {
588                    src: '#e-club-thankyou-popup'
589                },
590                type: 'inline',
591                mainClass: 'mfp-zoom-in',
592                showCloseBtn: false,
593                fixedContentPos: true,
594                removalDelay: 500,
595                callbacks: {
596                    close: function () {
597                        window.history.pushState(null, null, ' ');
598                    }
599                }
600            });
601        }, 500);
602    }
603
604    products_height();
605    halves_height();
606    if (window['locations_map_height'] != undefined) {
607        locations_map_height();
608    }
609
610    if ($('#store-map').length) {
611        var lat = parseFloat($('#store-map').attr('data-lat'));
612        var lng = parseFloat($('#store-map').attr('data-lng'));
613        var icon = $('#store-map').attr('data-icon');
614        store_map_height();
615        google.maps.event.addDomListener(window, 'load', init_store_map('store-map', lat, lng, icon));
616    }
617
618    checkScroll();
619
620    reviews_height();
621    activeCategory();
622    featured_items_height();
623    hero_height();
624    hero_bg_change();
625
626    if ($('.mobile-bg').length) {
627        text_image_bg_change();
628    }
629});
630
631jQuery(window).resize(function () {
632    products_height();
633    halves_height();
634    hero_bg_change();
635    if ($('#store-map').length) {
636        store_map_height();
637    }
638
639    if ($('.mobile-bg').length) {
640        text_image_bg_change();
641    }
642
643    checkScroll();
644
645    delay(function () {
646        reviews_height();
647        featured_items_height();
648    }, 500);
649
650    delay(function () {
651        hero_height();
652    }, 150);
653
654
655    if ($('.e-club-bottom-bar').length > 0) {
656        if ($('body').hasClass('showEClubBar')) {
657            $('.e-club-bottom-bar').css('height', $('.e-club-bottom-bar-wrapper').outerHeight() + 'px');
658        }
659    }
660});
661
662$(window).scroll(function () {
663    checkScroll();
664    activeCategory();
665
666    if (jQuery(window).scrollTop() > 100) {
667        jQuery('body').addClass('scrolled-100');
668    } else {
669        jQuery('body').removeClass('scrolled-100');
670    }
671});
672
673if ($('.menu-navigation .navbar .navbar-nav').length) {
674    (function () {
675        var containerWidth = 0;
676        var tablinks = document.getElementsByClassName("nav-item");
677        for (i = 0; i < tablinks.length; i++) {
678            containerWidth += tablinks[i].offsetWidth;
679        }
680        var container = document.querySelector('.menu-navigation .navbar .navbar-nav');
681        container.style.width = containerWidth + 'px';
682
683        function menuOnScroll() {
684            $(document).scroll(function () {
685                var element = document.querySelector(".menu-navigation .navbar li.active"),
686                    elementWidth = element.offsetWidth,
687                    elementPosition = element.offsetLeft,
688                    outerContent = document.querySelector(".menu-navigation .navbar"),
689                    containerHalf = outerContent.offsetWidth / 2;
690
691                // element.scrollIntoView({ behavior: "smooth", inline: "center" });
692                if (elementPosition > (containerHalf - (elementWidth / 2))) {
693                    outerContent.scrollLeft = parseInt(elementPosition - (containerHalf - (elementWidth / 2)));
694                } else if (elementPosition == 0) {
695                    outerContent.scrollLeft = 0
696                }
697            });
698        }
699        menuOnScroll();
700        window.addEventListener('resize', menuOnScroll);
701
702    })();
703}
704
705
706var delay = (function () {
707    var timer = 0;
708    return function (callback, ms) {
709        clearTimeout(timer);
710        timer = setTimeout(callback, ms);
711    };
712})();
713
714var touchsupport = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)
715if (!touchsupport) { // browser doesn't support touch
716    document.documentElement.className += " non-touch"
717} else {
718    document.documentElement.className += " touch"
719}
720
721function activeCategory() {
722    var getHeaderHeight = $('.site-header .header-content').outerHeight();
723    var menu_height = $('.menu-navigation').outerHeight();
724    var sections = $('.category-group'),
725        nav = $('.menu-navigation .navbar'),
726        nav_height = getHeaderHeight + menu_height + 130;
727    var cur_pos = $(this).scrollTop();
728
729    sections.each(function () {
730        var top = $(this).offset().top;
731
732        var height = $(this).outerHeight();
733        var bottom = (top + height);
734        top -= nav_height;
735
736        var elementID = $(this).attr('id');
737        if (cur_pos >= top && cur_pos <= bottom) {
738            nav.find('a').parent().removeClass('active');
739            sections.removeClass('active');
740
741            $(this).addClass('active');
742
743            nav.find('a[href="#' + elementID + '"]').parent().addClass('active');
744        }
745
746    });
747}
748
749function show_message(container, message) {
750    container.append(message);
751
752    setTimeout(function () {
753        container.find('.alert').alert('close');
754    }, 2000)
755}
756
757
758function createCookie(name, value, days) {
759    var expires = "";
760    if (days) {
761        var date = new Date();
762        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
763        expires = "; expires=" + date.toUTCString();
764    }
765    document.cookie = name + "=" + value + expires + "; path=/";
766    document.cookie = name + "=" + value + expires + "; path=/;domain=" + getSiteMainDomain();
767}
768
769function readCookie(name) {
770    var nameEQ = name + "=";
771    var ca = document.cookie.split(';');
772    for (var i = 0; i < ca.length; i++) {
773        var c = ca[i];
774        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
775        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
776    }
777    return null;
778}
779
780function eraseCookie(name) {
781    createCookie(name, "", -1);
782}
783
784function products_height() {
785    jQuery('.featured-items-slider .card-info').css('height', 'initial');
786    jQuery('.featured-items-slider').each(function () {
787        var height = 0;
788        jQuery(this).find('.card-info').each(function () {
789            if (jQuery(this).outerHeight() >= height) {
790                height = jQuery(this).outerHeight(true);
791            }
792        });
793        jQuery(this).find('.card-info').css('height', height + 'px');
794    });
795}
796
797function halves_height() {
798    jQuery('.half-row .half-txt').css('height', 'initial');
799    jQuery('.half-row').each(function () {
800        var height = 0;
801        jQuery(this).find('.half-txt').each(function () {
802            if (jQuery(this).height() >= height) {
803                height = jQuery(this).outerHeight(true);
804            }
805        });
806        jQuery(this).find('.half-img').css('height', height + 'px');
807    });
808}
809
810function getParameterByName(name) {
811    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
812    var regexS = "[\\?&]" + name + "=([^&#]*)";
813    var regex = new RegExp(regexS);
814    var results = regex.exec(window.location.href);
815    if (results == null)
816        return "";
817    else
818        return decodeURIComponent(results[1].replace(/\+/g, " "));
819}
820
821function createCookie(name, value, days) {
822	var expires = "";
823	if (days) {
824		var date = new Date();
825		date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
826		expires = "; expires=" + date.toUTCString();
827	}
828
829    if(typeof(value) == "object") {
830        value = JSON.stringify(value);
831    }
832  
833	document.cookie = name + "=" + value + expires + "; path=/";
834}
835
836function readCookie(name) { 
837	var nameEQ = name + "=";
838	var ca = document.cookie.split(';');
839    var cookieValue = '';
840  
841	for (var i = 0; i < ca.length; i++) {
842		var c = ca[i];
843		while (c.charAt(0) == ' ')
844			c = c.substring(1, c.length);
845		if (c.indexOf(nameEQ) == 0) {
846			var cookieValue = c.substring(nameEQ.length, c.length);
847
848            try {
849                return JSON.parse(cookieValue);
850            } catch (e) {
851                return cookieValue;
852            }
853        }
854	}
855	return null;
856} 
857
858function eraseCookie(name) {
859	createCookie(name, "", -1);
860}
861
862function init_store_map(mapId, lat, lng, icon) {
863    var mapOptions;
864    var center = {
865        lat: lat,
866        lng: lng
867    };
868
869    var mapOptions = {
870        // How zoomed in you want the map to start at (always required)
871        zoom: 14,
872
873        // The latitude and longitude to center the map (always required)
874        center: new google.maps.LatLng(lat, lng),
875        disableDefaultUI: true,
876        zoomControl: true,
877        mapTypeControl: false,
878        scaleControl: false,
879        streetViewControl: false,
880        rotateControl: false,
881        fullscreenControl: false,
882
883        // How you would like to style the map. 
884        // This is where you would paste any style found on Snazzy Maps.
885        styles: [{
886            "elementType": "geometry",
887            "stylers": [{
888                "color": "#f5f5f5"
889            }]
890        }, {
891            "elementType": "labels.icon",
892            "stylers": [{
893                "visibility": "off"
894            }]
895        }, {
896            "elementType": "labels.text.fill",
897            "stylers": [{
898                "color": "#616161"
899            }]
900        }, {
901            "elementType": "labels.text.stroke",
902            "stylers": [{
903                "color": "#f5f5f5"
904            }]
905        }, {
906            "featureType": "administrative.land_parcel",
907            "elementType": "labels.text.fill",
908            "stylers": [{
909                "color": "#bdbdbd"
910            }]
911        }, {
912            "featureType": "poi",
913            "elementType": "geometry",
914            "stylers": [{
915                "color": "#eeeeee"
916            }]
917        }, {
918            "featureType": "poi",
919            "elementType": "labels.text.fill",
920            "stylers": [{
921                "color": "#757575"
922            }]
923        }, {
924            "featureType": "poi.park",
925            "elementType": "geometry",
926            "stylers": [{
927                "color": "#e5e5e5"
928            }]
929        }, {
930            "featureType": "poi.park",
931            "elementType": "labels.text.fill",
932            "stylers": [{
933                "color": "#9e9e9e"
934            }]
935        }, {
936            "featureType": "road",
937            "elementType": "geometry",
938            "stylers": [{
939                "color": "#ffffff"
940            }]
941        }, {
942            "featureType": "road.arterial",
943            "elementType": "labels.text.fill",
944            "stylers": [{
945                "color": "#757575"
946            }]
947        }, {
948            "featureType": "road.highway",
949            "elementType": "geometry",
950            "stylers": [{
951                "color": "#dadada"
952            }]
953        }, {
954            "featureType": "road.highway",
955            "elementType": "labels.text.fill",
956            "stylers": [{
957                "color": "#616161"
958            }]
959        }, {
960            "featureType": "road.local",
961            "elementType": "labels.text.fill",
962            "stylers": [{
963                "color": "#9e9e9e"
964            }]
965        }, {
966            "featureType": "transit.line",
967            "elementType": "geometry",
968            "stylers": [{
969                "color": "#e5e5e5"
970            }]
971        }, {
972            "featureType": "transit.station",
973            "elementType": "geometry",
974            "stylers": [{
975                "color": "#eeeeee"
976            }]
977        }, {
978            "featureType": "water",
979            "elementType": "geometry",
980            "stylers": [{
981                "color": "#c9c9c9"
982            }]
983        }, {
984            "featureType": "water",
985            "elementType": "labels.text.fill",
986            "stylers": [{
987                "color": "#9e9e9e"
988            }]
989        }]
990
991    };
992
993    map = new google.maps.Map(document.getElementById(mapId), mapOptions);
994
995    var marker = new google.maps.Marker({
996        position: new google.maps.LatLng(lat, lng),
997        map: map,
998        icon: icon
999    });
1000
1001}
1002
1003
1004function hero_height() {
1005
1006    var getHeaderHeight = $('.site-header .header-content').outerHeight();
1007    var windowHeight = $(window).height();
1008    $('.section-hero.hero-full').css('min-height', windowHeight + 'px').css('padding-top', getHeaderHeight + 'px');
1009}
1010
1011function checkScroll() {
1012    var getHeaderHeight = $('.site-header').outerHeight();
1013    var getHeroHeight = $('.section-hero').outerHeight();
1014
1015    if (jQuery(window).scrollTop() > 0) {
1016        jQuery('body').addClass('scrolled');
1017    } else {
1018        jQuery('body').removeClass('scrolled');
1019    }
1020}
1021
1022function store_map_height() {
1023    var store_info_height = $('.store-top-section .store-details').outerHeight();
1024    if (store_info_height < 400) {
1025        store_info_height = 400;
1026    }
1027    $('#store-map').css('height', store_info_height + 'px');
1028}
1029
1030
1031function reviews_height() {
1032    jQuery('.store-review-slider .review-item').css('height', 'initial');
1033    jQuery('.store-review-slider').each(function () {
1034        var height = 0;
1035        jQuery(this).find('.review-item').each(function () {
1036            if (jQuery(this).outerHeight() >= height) {
1037                height = jQuery(this).outerHeight();
1038            }
1039        });
1040        jQuery(this).find('.review-item').css('height', height + 'px');
1041    });
1042}
1043
1044function featured_items_height() {
1045    jQuery('.featured-items-slider .menu-item').css('height', 'initial');
1046    jQuery('.featured-items-slider').each(function () {
1047        var height = 0;
1048        jQuery(this).find('.menu-item').each(function () {
1049            if (jQuery(this).outerHeight() >= height) {
1050                height = jQuery(this).outerHeight();
1051            }
1052        });
1053        jQuery(this).find('.menu-item').css('height', height + 'px');
1054    });
1055}
1056
1057function hero_bg_change() {
1058    var desktop_bg = jQuery('.section-hero').data('desktop-url');
1059    var mobile_bg = jQuery('.section-hero').data('mobile-url');
1060    var screen_width = window.innerWidth;
1061
1062    if (screen_width < 768 && mobile_bg) {
1063        jQuery('.section-hero').css('background-image', "url(" + mobile_bg + ")");
1064    } else {
1065        jQuery('.section-hero').css('background-image', "url(" + desktop_bg + ")");
1066    }
1067}
1068
1069function text_image_bg_change() {
1070    var desktop_bg = jQuery('.mobile-bg').data('desktop-url');
1071    var mobile_bg = jQuery('.mobile-bg').data('mobile-url');
1072    var screen_width = window.innerWidth;
1073
1074    if (screen_width < 768 && mobile_bg) {
1075        jQuery('.mobile-bg').css('background-image', "url(" + mobile_bg + ")");
1076    } else {
1077        jQuery('.mobile-bg').css('background-image', "url(" + desktop_bg + ")");
1078    }
1079}
1080
1081jQuery(function () {
1082    AOS.init();
1083
1084    if (document.readyState == 'complete') {
1085        AOS.refresh();
1086    }
1087});
1088
1089
1090
1091document.addEventListener('DOMContentLoaded', function () {
1092    // Add click handler to prevent multiple submissions
1093    document.addEventListener('click', function (e) {
1094      if (e.target.matches('.wpcf7-submit, #submitBtn, input[type="submit"]')) {
1095        const submitBtn = e.target;
1096        const form = submitBtn.closest('form');
1097        
1098        if (form && form.classList.contains('wpcf7-form')) {
1099          // If button already has submitting class, prevent the click
1100          if (submitBtn.classList.contains('submitting')) {
1101            e.preventDefault();
1102            e.stopImmediatePropagation();
1103            return false;
1104          }
1105          
1106          // Add submitting class immediately
1107          submitBtn.classList.add('submitting');
1108        }
1109      }
1110    }, true);
1111  
1112    // Remove submitting class when form processing is done (for any outcome)
1113    const cf7Events = [
1114      'wpcf7submit', 
1115      'wpcf7invalid', 
1116      'wpcf7spam', 
1117      'wpcf7mailsent', 
1118      'wpcf7mailfailed'
1119    ];
1120  
1121    cf7Events.forEach(eventType => {
1122      document.addEventListener(eventType, function (event) {
1123        const form = event.target;
1124        const submitBtn = form.querySelector('.wpcf7-submit, #submitBtn, input[type="submit"]');
1125        if (submitBtn) {
1126          submitBtn.classList.remove('submitting');
1127        }
1128      });
1129    });
1130  });
1131  

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.