PageSourceSearch

https://americanchristianministries.org/wp-content/themes/beatswave/beatswave/assets/js/custom.js?ver=6.6.2

js americanchristianministries.org collected 2026-10-05 19:05:04 UTC 32,677 bytes, 893 lines download raw bytes

1/**
2 Custom JS
3
4 1. OPEN AND CLOSE MENU
5 2. OPEN AND CLOSE SEARCH BAR
6 3. HEADER BACKGROUND AFTER PAGE LOAD
7 4. HEADER BACKGROUND AFTER PAGE SCROLL
8 5. HEADER FULL HEIGHT
9 6. BACKGROUND IMAGE PARALLAX EFFECT
10 7. WOW ANIMATION
11 8. TESTIMONIALS CAROUSEL
12 9. PLAYER
13 10. POPUP SLIDER
14 11. MUSIC DISCOGRAPHY BANNERS EQUAL WIDTH AND HEIGHT
15 12. BLOG MANSORY
16 13. CART NUMBER PICKER
17 14. SHOP SORTING DROPDOWN SELECT
18 15. SINGLE PRODUCT IMAGE ZOOM
19 16. PAYMENT RADIO BUTTON
20 17 .userAgent for browser
21 18 .PDISPLAY MAP AFTER CLICK
22 19. BLOG MASONRY HOVER FUNCTION
23 20 .PRE LOADER
24
25 **/
26
27"use strict";
28//Variable for caching
29var windowElement = jQuery(window);
30var body = jQuery("body");
31
32//Variable for player
33var current_track = 1;
34
35//Variable for slider
36var current_slide = 0;
37var slides_length = 0;
38var prev_slide = 0;
39var slideWidth = jQuery("#popup-container").width() * 0.8;
40var appendBody;
41var popup_images_arr = [];
42if(typeof wc_add_to_cart_params != 'undefined'){
43    jQuery('.menu-item').each(function(){
44        if(jQuery(this).find('a').text().indexOf("Shop") >= 0){
45            jQuery(this).css('display', 'inline-block');
46        }
47    });
48    jQuery('.nav.flex-column.section .menu-item a:contains("shop")').css('display', 'inline-block');
49} else {
50    jQuery('.menu-item').each(function(){
51        if(jQuery(this).find('a').text().indexOf("Shop") >= 0){
52            jQuery(this).css('display', 'none');
53        }
54    });
55}
56
57
58function msieversion() {
59    var ua = window.navigator.userAgent;
60    var net = ua.indexOf("NET ");
61
62    if (net > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
63        if ( ! Modernizr.objectfit ) {
64            jQuery('.img_link').each(function () {
65                var $container = jQuery(this),
66                    imgUrl = $container.find('img').prop('src');
67                if (imgUrl) {
68                    $container
69                        .css('backgroundImage', 'url(' + imgUrl + ')')
70                        .addClass('compat-object-fit');
71                }
72            });
73    }
74    }
75    return false;
76} // End
77
78
79
80
81// Get track duration by source
82
83function getDuration(src) {
84    return new Promise(function(resolve, reject) {
85        var audio = new Audio();
86        jQuery(audio).on("loadedmetadata", function(){
87            resolve(audio.duration);
88        });
89        audio.src = src;
90
91    });
92}
93// Function for player
94function playerItemEnd() {
95    jQuery('.play-mp3').show();
96    jQuery('.pause-mp3').hide();
97}
98// Function For Gallery Popup Slider
99function changeSlide() {
100
101    if (current_slide == prev_slide) {
102        return false;
103    }
104
105    for (let i = 0; i<slides_length; i++) {
106        if  (i === prev_slide) {
107            jQuery("a.popup-image").eq(i).css({"z-index": "1"}).stop().animate({
108                opacity: 0
109            }, 500, function () {
110                jQuery( this ).css("visibility", "hidden");
111            })
112        }
113        if (i === current_slide) {
114            jQuery("a.popup-image").eq(i).css({"visibility":"visible", "z-index": "2"}).stop().animate({
115                opacity: 1
116            }, 500)
117        }
118    }
119
120    jQuery("#popup-container li").filter(function (index) {
121        return index != current_slide
122    }).removeClass("active");
123
124    jQuery("#popup-container li").filter(function (index) {
125        return index == current_slide
126    }).addClass("active");
127
128}
129
130// Key Event Change Slider
131jQuery(document).keydown(function(e) {
132    if(jQuery('#popup-container').length > 0 && jQuery('#popup-container').css('display')== "block"){
133        switch(e.which) {
134            case 37:
135                jQuery('.popup_left').trigger('click');
136                break;
137            case 39:
138                jQuery('.popup_right').trigger('click');
139                break;
140            case 27:
141                jQuery('#popup-container').trigger('click');
142                break;
143            default: return; // exit this handler for other keys
144        }
145    }        // Key Event Menu
146    else if(jQuery('div.nav-menu').hasClass('active')){
147        switch(e.which) {
148            case 27:
149                jQuery('.menu_icon').trigger('click');
150                break;
151
152            default: return; // exit this handler for other keys
153        }
154    }
155    // Key Event Search
156    else if(jQuery('div.search-bar').hasClass('active')){
157        switch(e.which) {
158            case 27:
159                jQuery('.search_icon').trigger('click');
160                break;
161
162            default: return; // exit this handler for other keys
163        }
164        e.preventDefault(); // prevent the default action (scroll / move caret)
165    }
166});
167
168//Function for Music Discography banners equal width and height
169    function setTeamMemberHeight() {
170        if(jQuery('body').hasClass('rocks')){
171            jQuery('.music-banner').height(jQuery('.music-banner').width());
172            jQuery('.music-banner-image').height(jQuery('.music-banner-image').width());
173            jQuery('.news_bg_image').height(jQuery('.news_bg_image').width());
174            jQuery('.disc-image').height(jQuery('.music-banner-image').width() - 30);
175            jQuery('.disc-image').width(jQuery('.disc-image').height());
176            jQuery('.s-item-image').height(jQuery('.s-item-image').width());
177        } else if(jQuery('body').hasClass('white')){
178           jQuery('.music-banner').height(jQuery('.music-banner').width());
179           jQuery('.music-banner-image').height(jQuery('.music-banner-image').width());
180           jQuery('.news_bg_image').height(jQuery('.news_bg_image').width());
181           jQuery('.s-item-image').height(jQuery('.s-item-image').width());
182        } else {
183            jQuery('.music-banner').height(jQuery('.music-banner').width());
184            jQuery('.music-banner-1').height(jQuery('.music-banner-1').width());
185            jQuery('.music-banner-2').height(jQuery('.music-banner-2').width());
186            jQuery('.music-banner-3').height(jQuery('.music-banner-3').width());
187            jQuery('.s-item-image').height(jQuery('.s-item-image').width());
188        }
189
190    }
191//Function for Music Discography banners equal width and height after window resize
192windowElement.resize(function () {
193    setTeamMemberHeight();
194});
195
196//Function for internet explorer
197function msieversion() {
198    var ua = window.navigator.userAgent;
199    var net = ua.indexOf("NET ");
200
201    if (net > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
202        if ( ! Modernizr.objectfit ) {
203            console.log(net)
204            jQuery('.img_link').each(function () {
205                var $container = jQuery(this),
206                    imgUrl = $container.find('img').prop('src');
207                if (imgUrl) {
208                    $container
209                        .css('backgroundImage', 'url(' + imgUrl + ')')
210                        .addClass('compat-object-fit');
211                }
212            });
213        }
214    }
215    return false;
216} // End
217
218
219jQuery(function ($) {
220    "use strict";
221    /* ----------------------------------------------------------- */
222    /*  1. OPEN AND CLOSE MENU
223    /* ----------------------------------------------------------- */
224    $('.menu_icon').on('click', function () {
225        $(this).toggleClass('active');
226        $('.search_icon').removeClass('active');
227        $('#header .nav-menu').toggleClass('active');
228        $('#header .search-bar').removeClass('active');
229    });
230
231
232    /* ----------------------------------------------------------- */
233    /*  2. OPEN AND CLOSE SEARCH BAR
234    /* ----------------------------------------------------------- */
235    $('.search_icon').on('click', function () {
236        $(this).toggleClass('active');
237        $('.menu_icon').removeClass('active');
238        $('#header .search-bar').toggleClass('active');
239        $('#header .nav-menu').removeClass('active');
240    });
241
242
243    /* ----------------------------------------------------------- */
244    /*  3. HEADER BACKGROUND AFTER PAGE LOAD
245    /* ----------------------------------------------------------- */
246    if ( windowElement.scrollTop() > 20) {
247        $('.header-continer.lc_sticky_menu').addClass('active');
248		$('.lc_content_full').addClass('customactive');
249    } else {
250        $('.header-continer.lc_sticky_menu').removeClass('active');
251		$('.lc_content_full').removeClass('customactive');
252    }
253
254
255    /* ----------------------------------------------------------- */
256    /*  4. HEADER BACKGROUND AFTER PAGE SCROLL
257    /* ----------------------------------------------------------- */
258    windowElement.on('scroll',function () {
259        if ($(this).scrollTop() > 20) {
260            $('.header-continer.lc_sticky_menu').addClass('active');
261			$('.lc_content_full').addClass('customactive');
262        } else {
263            $('.header-continer.lc_sticky_menu').removeClass('active');
264			$('.lc_content_full').removeClass('customactive');
265        }
266    });
267
268
269    /* ----------------------------------------------------------- */
270    /*  5. HEADER FULL HEIGHT
271    /* ----------------------------------------------------------- */
272    $.fn.fullHeight = function(){
273        var self = this;
274        var windowHeight = window.innerHeight;
275        var fullHeightFunction = function(){
276            return self.css({
277                'height': windowHeight
278            });
279        }
280        windowElement.on('resize', function(){
281            windowHeight = window.innerHeight;
282            fullHeightFunction();
283        });
284        fullHeightFunction();
285        return self;
286    }
287    // $('#header').fullHeight();
288
289
290    /* ----------------------------------------------------------- */
291    /*  6. BACKGROUND IMAGE PARALLAX EFFECT
292    /* ----------------------------------------------------------- */
293    windowElement.on('scroll', function () {
294
295        /* Header Section Background Image */
296        var st1 = $(this).scrollTop();
297        $("#header .bg_image").css({
298            "background-position-y": (st1/3)
299        });
300
301        /* Tours Section Background Image */
302        var st2 = $(this).scrollTop();
303        if($('body').hasClass('rocks')){
304            $("#on-tour .section_bg_image").css({
305                "background-position-y": (-st2/20 - 100)
306            });
307        } else{
308            $("#on-tour .section_bg_image").css({
309                "background-position-y": (-st2/20 + 100)
310            });
311        }
312
313    });
314
315
316    /* ----------------------------------------------------------- */
317    /*  7. WOW ANIMATION
318    /* ----------------------------------------------------------- */
319    var wow = new WOW(
320        {
321            animateClass: 'animated',
322            offset: 100
323        }
324    );
325    wow.init();
326
327
328    /* ----------------------------------------------------------- */
329    /*  8. TESTIMONIALS CAROUSEL
330    /* ----------------------------------------------------------- */
331
332    $('.cd-testimonials-wrapper').flexslider({
333        selector: ".cd-testimonials > li",
334        animation: "slide",
335        controlNav: true,
336        animationSpeed: 400,
337        smoothHeight: true,
338        start: function() {
339            $('.cd-testimonials').children('li').css({
340                'opacity': 1,
341                'position': 'relative'
342            });
343        }
344    });
345
346    /* ----------------------------------------------------------- */
347    /*  9. PLAYER
348    /* ----------------------------------------------------------- */
349$(window).load(function () {
350    plyr.setup({
351        controls: [
352            'play',
353            'progress',
354            'current-time',
355            'duration',
356            'mute',
357            'volume'
358        ]
359    });
360})
361
362    // Home New Album
363    $(body).on('click', '#album-release button[data-plyr="play"]', function () {
364        $('#album-release .plyr--playing button[data-plyr="pause"]').trigger('click')
365    });
366
367    $('.pause-mp3').hide();
368    $('.play-mp3').on('click',function () {
369        $('.play-mp3').show();
370        $('.pause-mp3').hide();
371        $(this).closest('.play-pause').find('svg').toggle();
372        if ($(this).closest('.music_line').index() != current_track) {
373            $("#mp3_1").html("");
374            $("#mp3_1").html('<audio controls class="audio1" onended="playerItemEnd()"><source src="' + $(this).closest('.play-pause').data('src') + '" type="audio/mpeg"></audio>');
375            plyr.setup({
376                controls: [
377                    'play',
378                    'progress',
379                    'current-time',
380                    'duration',
381                    'mute',
382                    'volume'
383                ]
384            });
385        }
386
387        current_track = $(this).closest('.music_line').index();
388
389        $("#mp3_1").find("button").eq(0).trigger("click");
390
391    });
392
393    $('.pause-mp3').on('click',function () {
394        $('.pause-mp3').hide();
395        $('.play-mp3').show();
396        $("#mp3_1").find("button").eq(1).trigger("click");
397    });
398
399    $("body").on("click", "#mp3_1 .plyr__controls button", function () {
400        if ($(this).data("plyr") == "play") {
401            $("#playlist").find(".music_line").eq(current_track-1).find(".play-pause .play-mp3").hide();
402            $("#playlist").find(".music_line").eq(current_track-1).find(".play-pause .pause-mp3").show();
403        } else {
404            $('.pause-mp3').hide();
405            $('.play-mp3').show();
406        }
407    });
408
409    $(document).on('ready',function () {
410        var tracks_arr = [];
411        $(".play-pause").each(function () {
412            var that = $(this);
413            getDuration($(this).data("src"))
414                .then(function(length) {
415                    let duration = parseInt(length);
416                    let minutes = Math.floor(duration/60);
417                    let seconds = duration - minutes*60;
418                    if (seconds < 10) {
419                        seconds = "0" + seconds;
420                    }
421                    that.closest(".music_line").find(".plyr__time--duration").html(minutes + ":" + seconds);
422                });
423        });
424        $('.stars span a').each(function (key, value) {
425            $(this).html('<span style="display:none;">'+(key+1)+'</span><i class="fa fa-star" aria-hidden="true"></i>');
426        })
427        $('.stars span a').click(function () {
428            $('.stars span a').each(function () {
429                $(this).find('i').removeClass('star-rate');
430            })
431            $(this).find('i').addClass('star-rate');
432            $(this).prevAll().find('i').addClass('star-rate');
433        })
434        if($('nav.menu').find('ul').attr('class') === undefined || $('nav.menu').find('ul').attr('class') == false){
435            $('nav.menu').find('ul').addClass('nav flex-column section');
436        }
437        if($("#woo_pp_ec_button img").length > 0){
438            $("#woo_pp_ec_button img").attr("src", "https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-small.png");
439        }
440        $('.tp-bgimg.defaultimg').css('background-position-y', '0px !important')
441        if(jQuery('body').hasClass('white')){
442            $('.home #contact-us').append('<div class="overly"></div>')
443        }
444        if($('.grid').length > 0){
445            window.msnry = new Masonry( '.grid', {
446                columnWidth: '.grid-sizer',
447                percentPosition: true
448            });
449        }
450    });
451
452
453    /* ----------------------------------------------------------- */
454    /*  10. POPUP SLIDER
455    /* ----------------------------------------------------------- */
456
457    $(".anim_border").on("click", function (event) {
458        popup_images_arr = [];
459        slides_length = $(".img_link").length;
460
461        $("#slides-container").html("");
462        $("#popup-container ul").html("");
463        $.each($(".img_link"), function (index, value) {
464            popup_images_arr.push($(".img_link img")[index].src);
465        });
466
467        appendBody = '';
468
469        for (var i = 0; i < popup_images_arr.length; i++) {
470            if (event.currentTarget == $(".anim_border")[i]) {
471                current_slide = i;
472                appendBody += '<a href="javascript:void(0)" class="popup-image" style="position: absolute; opacity: 1; visibility: visible"><img src=' + popup_images_arr[i] + '></a>';
473            } else {
474                appendBody += '<a href="javascript:void(0)" class="popup-image" style="position: absolute;  opacity: 0; visibility: hidden"><img src=' + popup_images_arr[i] + '></a>';
475            }
476        }
477
478        $("#slides-container").append(appendBody);
479
480        // Slider Width in Window Resize time
481        windowElement.resize(function () {
482            slideWidth = $("#popup-container").width() * 0.8;
483            if (windowElement.width() <= 767) {
484                slideWidth = $("#popup-container").width() * 0.9;
485            }
486        });
487
488        // Slider Width during <=767
489        if (windowElement.width() <= 767) {
490            slideWidth = $("#popup-container").width() * 0.9;
491        }
492
493
494        for (var i = 0; i < popup_images_arr.length; i++) {
495            if (event.currentTarget != $(".anim_border")[i]) {
496                $("#popup-container ul").append("<li></li>");
497            } else {
498                $("#popup-container ul").append("<li class='active'></li>");
499            }
500        }
501
502        $("#popup-container").css("display", "block").animate({
503            opacity: 1
504        }, 300);
505    });
506
507    body.on("click", ".popup_left",  function () {
508        prev_slide = current_slide;
509        if (current_slide) {
510            current_slide--;
511        } else {
512            current_slide = slides_length - 1;
513        }
514        changeSlide();
515    });
516    body.on("click", ".popup_right",  function () {
517        prev_slide = current_slide;
518        if (current_slide < slides_length - 1) {
519            current_slide++;
520        } else {
521            current_slide = 0;
522        }
523        changeSlide();
524    });
525
526    body.on("click", "#popup-container li", function () {
527        prev_slide = current_slide;
528        current_slide = $("#popup-container li").index($(this));
529        changeSlide();
530    });
531
532    $("#popup-container").on("click", function (e) {
533        if ( !$(e.target).is($("#slides-container a img")) && !$(e.target).is($("#popup-container ul li")) && !$(e.target).is($("#popup_block .popup_arrow")) && !$(e.target).is($("#popup_block .popup_arrow i")) )
534            $("#popup-container").animate({
535                opacity: 0
536            }, 300, function () {
537                $(this).css("display", "none");
538            })
539
540    });
541
542    if($('.nav li.active').length == 0)
543    {
544        $('.nav li:first-child').addClass('active');
545    }
546    $('.centered-bottom').attr('style', 'background-position: center bottom !important;');
547    $('.carousel-inner .carousel-item:first-child').addClass('active');
548    for(i=0 ; i < $('#carouselExampleIndicators .carousel-inner .carousel-item').length ; i++){
549        let carousel_active = 'active';
550        if(i != 0){
551            carousel_active = ''
552        }
553        $('#carouselExampleIndicators .carousel-indicators').append('<li data-target="#carouselExampleIndicators" data-sli
553de-to="'+i+'" class="'+carousel_active+'"></li>')
554    }
555
556
557/* ----------------------------------------------------------- */
558/*  11. Music Discography banners equal width and height
559/* ----------------------------------------------------------- */
560setTeamMemberHeight();
561
562
563    /* ----------------------------------------------------------- */
564    /*  12.BLOG MANSORY
565    /* ----------------------------------------------------------- */
566if($('.grid').length > 0){
567    window.msnry = new Masonry( '.grid', {
568        columnWidth: '.grid-sizer',
569        percentPosition: true
570    });
571}
572
573    /* ----------------------------------------------------------- */
574    /*  13.CART NUMBER PICKER
575    /* ----------------------------------------------------------- */
576
577    $.fn.numberPicker = function() {
578        var dis = 'disabled';
579        return this.each(function() {
580            var picker = $(this),
581                p = picker.find('button:last-child'),
582                m = picker.find('button:first-child'),
583                input = picker.find('input'),
584                min = parseInt(input.attr('min'), 10),
585                max = parseInt(input.attr('max'), 10),
586                inputFunc = function(picker) {
587                    var i = parseInt(input.val(), 10);
588                    if ( (i <= min) || (!i) ) {
589                        input.val(min);
590                        p.prop(dis, false);
591                        m.prop(dis, true);
592                    } else if (i >= max) {
593                        input.val(max);
594                        p.prop(dis, true);
595                        m.prop(dis, false);
596                    } else {
597                        p.prop(dis, false);
598                        m.prop(dis, false);
599                    }
600                },
601                changeFunc = function(picker, qty) {
602                    var q = parseInt(qty, 10),
603                        i = parseInt(input.val(), 10);
604                    if ((i < max && (q > 0)) || (i > min && !(q > 0))) {
605                        input.val(i + q);
606                        inputFunc(picker);
607                    }
608                };
609            m.on('click', function(){changeFunc(picker,-1);});
610            p.on('click', function(){changeFunc(picker,1);});
611            input.on('change', function(){inputFunc(picker);});
612            inputFunc(picker); //init
613        });
614    };
615    $('.plusminus').numberPicker();
616    $('.minusplus').click(function () {
617        $('button[name="update_cart"]').removeAttr('disabled');
618    })
619
620    /** 404 Page fiull height **/
621    $('.page-404 #header-404').fullHeight();
622
623
624    /* ----------------------------------------------------------- */
625    /*  14.SHOP SORTING DROPDOWN SELECT
626    /* ----------------------------------------------------------- */
627    $(".dropdown-menu li a").on('click', function () {
628        var selText = $(this).text();
629        $(this).parents('.btn-group').find('.dropdown-toggle').html(selText+' <span class="caret"></span>');
630    });
631
632    /* ----------------------------------------------------------- */
633    /*  15.SINGLE PRODUCT IMAGE ZOOM
634    /* ----------------------------------------------------------- */
635    var $zoom = $('.zoom').magnify();
636
637
638    /* ----------------------------------------------------------- */
639    /*  16.PAYMENT RADIO BUTTON
640    /* ----------------------------------------------------------- */
641
642    $('.pay-text').css('display','none');
643    if ($(".paypal input").is(':checked')) {
644        $(".paypal input").closest('.custom-control').find('.pay-text').css('display','block');
645        $(".paypal input").closest('.custom-control').siblings().find('.pay-text').css('display','none');
646    } else {
647        $(".ubs input").closest('.custom-control').find('.pay-text').css('display','block');
648        $(".ubs input").closest('.custom-control').siblings().find('.pay-text').css('display','none');
649    }
650    $(body).on("change", ".paypal input, .ubs input", function () {
651            $(this).closest('.custom-control').find('.pay-text').css('display','block');
652            $(this).closest('.custom-control').siblings().find('.pay-text').css('display','none');
653    });
654
655    // Add To Cart
656    var nav = $('.shop-view-cart'),
657        animateTime = 300,
658        navLink = $('.catd-button');
659    nav.css({'height':'0'});
660    navLink.on('click',function(){
661        nav.css({overflow:'visible'});
662        if(nav.height() === 0){
663            autoHeightAnimate(nav, animateTime);
664        }
665    });
666
667/* Function to animate height: auto */
668    function autoHeightAnimate(element, time) {
669    var curHeight = element.height(), // Get Default Height
670        autoHeight = element.css('height', 'auto').height() + 30; // Get Auto Height
671    element.height(curHeight); // Reset to Default Height
672    element.stop().animate({height: autoHeight}, time); // Animate to Auto Height
673}
674
675    // Auto complete Search focus
676    body.on("click", ".chosen-single", function () {
677        $('.chosen-search input').focus();
678        // $('.chosen-search input').trigger('click');
679    });
680    /* COUNTRY SELECT */
681    if($('.chosen-select').length > 0){
682        $('.chosen-select').chosen();
683        $('.chosen-select-deselect').chosen({ allow_single_deselect: true });
684    }
685    $('#shipping_method li').click(function () {
686        $('.shipping-method').find('.dropdown-toggle').html($(this).find('label').html());
687    });
688    $('.checkout_coupon').css('display','flex');
689    //for big title alignment
690    if(!$('.title-image img').length){
691        $('.global-title').css({"position":"relative","padding":"0"});
692        $(window).resize(function(){
693            if (window.matchMedia("(min-width:1025px) and (max-width: 1380px)").matches) {
694                $('#page-title').css({"margin":"92px 0px 70px"});
695            } else  if(window.matchMedia("(min-width:768px) and (max-width: 1024px)").matches){
696                $('#page-title').css({"margin":"75px 0px 52px"});
697            }else  if(window.matchMedia("(min-width:576px) and (max-width: 767px)").matches){
698                $('#page-title').css({"margin":"51px 0px 34px"});
699            }else if(window.matchMedia("(max-width: 575px)").matches){
700                $('#page-title').css({"margin":"37px 0px 34px 0px"});
701            }else{
702                $('#page-title').css({"margin":"140px 0px 104px 0px"});
703            }
704        });
705    }
706
707    /* ----------------------------------------------------------- */
708    /*  17.userAgent for browser
709     /* ----------------------------------------------------------- */
710    if (navigator.userAgent.search("MSIE") >= 0) {
711        $('body').addClass('msie');
712    }
713    else if (navigator.userAgent.search("Chrome") >= 0) {
714        $('body').addClass('chrome');
715    }
716    else if (navigator.userAgent.search("Firefox") >= 0) {
717        $('body').addClass('firefox');
718    }
719    else if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) {
720        $('body').addClass('safari');
721    }
722    else if (navigator.userAgent.search("Opera") >= 0) {
723        $('body').addClass('opera');
724    }
725    else if (navigator.userAgent.search("NET") >= 0) {
726        $('body').addClass('net');
727    }
728    else if (navigator.userAgent.search("Edge") >= 0) {
729        $('body').addClass('edge');
730    }
731
732
733    /* ----------------------------------------------------------- */
734    /*  18.DISPLAY MAP AFTER CLICK
735    /* ----------------------------------------------------------- */
736    if(!$('body').hasClass('white')){
737        $(".overly-1").on("click", function (e) {
738            e.stopPropagation();
739            if ($(e.target).is($(".overly-1")))
740                $(".overly-1").animate({
741                    opacity: 0
742                }, 300, function () {
743                    $(this).css("display", "none");
744                });
745            $("#text-and-video").css('position','relative');
746        });
747        $("body.single-js_events").on("click", function (event) {
748            event.stopPropagation();
749            $(".overly-1").css("display", "block").animate({
750                opacity: 1
751            }, 300);
752            $("#text-and-video").css('position','initial');
753        });
754    }
755
756
757
758
759    /** Function for Explorer ****/
760    $(document).ready(msieversion);
761
762    if (navigator.userAgent.search("NET") >= 0) {
763        if ( ! Modernizr.objectfit ) {
764            if($('body').hasClass('rocks')){
765                $('.music-banner-image').each(function () {
766                    var $container = $(this),
767                        imgUrl = $container.find('img').prop('src');
768                    if (imgUrl) {
769                        $container
770                            .css('backgroundImage', 'url(' + imgUrl + ')')
771                            .addClass('compat-object-fit');
772                    }
773                });
774            }
775            jQuery('.music-banner .w-100').each(function () {
776                var $container = jQuery(this),
777                    imgUrl = $container.find('img').prop('src');
778                if (imgUrl) {
779                    $container
780                        .css('backgroundImage', 'url(' + imgUrl + ')')
781                        .addClass('compat-object-fit');
782                }
783            });
784
785            jQuery('.embed-responsive .youtube').each(function () {
786                var $container = jQuery(this),
787                    imgUrl = $container.find('img').prop('src');
788                if (imgUrl) {
789                    $container
790                        .css('backgroundImage', 'url(' + imgUrl + ')')
791                        .addClass('compat-object-fit');
792                }
793            });
794
795            jQuery('.video-block .video-img-banner').each(function () {
796                var $container = jQuery(this),
797                    imgUrl = $container.find('img').prop('src');
798                if (imgUrl) {
799                    $container
800                        .css('backgroundImage', 'url(' + imgUrl + ')')
801                        .addClass('compat-object-fit');
802                }
803            });
804
805            jQuery('.grid-item-img').each(function () {
806                var $container = jQuery(this),
807                    imgUrl = $container.find('img').prop('src');
808                if (imgUrl) {
809                    $container
810                        .css('backgroundImage', 'url(' + imgUrl + ')')
811                        .addClass('compat-object-fit');
812                }
813            });
814
815            jQuery('.blog-grid-image').each(function () {
816                var $container = jQuery(this),
817                    imgUrl = $container.find('img').prop('src');
818                if (imgUrl) {
819                    $container
820                        .css('backgroundImage', 'url(' + imgUrl + ')')
821                        .addClass('compat-object-fit');
822                }
823            });
824
825            jQuery('.featured-image').each(function () {
826                var $container = jQuery(this),
827                    imgUrl = $container.find('img').prop('src');
828                if (imgUrl) {
829                    $container
830                        .css('backgroundImage', 'url(' + imgUrl + ')')
831                        .addClass('compat-object-fit');
832                }
833            });
834
835            jQuery('.t-shirt-image').each(function () {
836                var $container = jQuery(this),
837                    imgUrl = $container.find('img').prop('src');
838                if (imgUrl) {
839                    $container
840                        .css('backgroundImage', 'url(' + imgUrl + ')')
841                        .addClass('compat-object-fit');
842                }
843            });
844        }
845    }
846
847/* ----------------------------------------------------------- */
848/*  19.BLOG MASONRY HOVER FUNCTION
849 /* ----------------------------------------------------------- */
850
851    jQuery("body").on("mouseover", "#blog-mansory-section > .grid > .grid-item", function(){
852        jQuery(".grid-item").not(this).not(".active").addClass("active");
853        jQuery(this).removeClass("active");
854    });
855    jQuery("body").on("mouseout", "#blog-mansory-section > .grid > .grid-item" , function(){
856        if (!jQuery(".grid-item:hover").length) {
857            jQuery(".grid-item.active").removeClass("active");
858        }
859    });
860
861});
862
863/* ----------------------------------------------------------- */
864/*  20.PRE LOADER
865/* ----------------------------------------------------------- */
866windowElement.on('load', function(){
867    jQuery('#preloader').fadeOut('slow',function(){
868        jQuery(this).remove();
869    });
870    if(!jQuery('.title-image img').length) {
871        if (window.matchMedia("(min-width: 1025px) and (max-width: 1380px)").matches) {
872            jQuery('#page-title').css({"margin": "92px 0px 70px"});
873        } else if (window.matchMedia("(min-width: 768px) and (max-width: 1024px)").matches) {
874            jQuery('#page-title').css({"margin": "75px 0px 52px"});
875        } else if (window.matchMedia("(min-width:576px) and (max-width: 767px)").matches) {
876            jQuery('#page-title').css({"margin": "51px 0px 34px"});
877        } else if (window.matchMedia("(max-width: 575px)").matches) {
878            jQuery('#page-title').css({"margin": "37px 0px 34px 0px"});
879        } else {
880            jQuery('#page-title').css({"margin": "140px 0px 104px 0px"});
881        }
882    }
883    if ( jQuery(body).css('background-image') != 'none' || jQuery('.canvas_image.lc_lif_background_image').length ) {
884        jQuery.each(jQuery("body > div, #lc_lif_content > div"), function (index, value) {
885            if ( !jQuery(value).find(".section_bg_image").length && jQuery(value).attr("id") != "wpadminbar" ) {
886                jQuery(this).addClass('no-bg-color');
887                jQuery(this).css('opacity', 1);
888            }
889        })
890    }
891});
892
893

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.