PageSourceSearch

https://www.katyperry.com/wp-content/themes/umg-grand-royal-theme/…/assets/js/main.js?v=8&ver=3.5.8

js katyperry.com collected 2026-09-24 15:16:13 UTC 27,822 bytes, 693 lines download raw bytes

1(function ($) {
2
3    var firstLoad = true;
4    var mobile = false;
5    var sound_playing = false;
6    var muteButton;
7    var separatePage = ($('#fullpage').hasClass('page-separate') ? true : false);
8
9    //disable deeplink scrolling for this layout because it's handled by FullPage lib
10    UMGGR_Deeplink_Module.deeplinkScrollEnabled = false;
11
12    function enq() {
13        enquire.register("screen and (min-width: 801px)", {
14            match: function () {
15                mobile = false;
16            },
17            unmatch: function () {
18                mobile = true;
19            },
20            setup: function () {
21                mobile = true;
22            }
23        });
24    }
25
26    var md = new MobileDetect(window.navigator.userAgent);
27    if (md.mobile() != null) {
28        $('body').addClass('mobile');
29        mobile = true;
30    }
31
32    var ytPlayerHost = (!UMGGRSwish.disable_cookies ? 'https://www.youtube.com' : 'https://www.youtube-nocookie.com');
33
34    $('#umggr-open-newsletter, .newsletter-button').on('click', function (e) {
35        e.preventDefault();
36        if ($(this).hasClass('newsletter-type-inline')) {
37            showInlineNewsletter($(this));
38        } else {
39            $('#ae-cform-modal-display-cta-1').trigger('click');
40        }
41    });
42
43    $('#ae-close').on('click', function (e) {
44        e.preventDefault();
45        $('#ae').css({'position': 'absolute', 'z-index': 1});
46    });
47
48    function showInlineNewsletter(elem) {
49        var menuAnchor = $(elem).data('section-type');
50        if (menuAnchor) {
51            fullpage_api.moveTo(menuAnchor);
52        }
53    }
54
55    $('#mp4-video').on('click', function(e){
56        var video = document.getElementById("mp4-video") ;
57        (video.paused ? video.play() : video.pause());
58    });
59
60    // add the mute / unmute functionality to the mute icons
61    $('body').on('click', '.mute-unmute', function(e) {
62        e.preventDefault();
63        sound_playing = !sound_playing;
64        $(this).toggleClass('playing');
65        if (UMGGRSwish.video_type == 'mp4') {
66            muteUnmute(null, sound_playing);
67        } else {
68            var player = $('#background-video').data('ytPlayer').player;
69            muteUnmute(player, sound_playing);
70        }
71    });
72
73    $('body').on('click', '.fp-tableCell', function(e) {
74        if ('fp-tableCell' == e.target.className) {
75            if ($('#background-video').length > 0) {
76                var player = $('#background-video').data('ytPlayer').player;
77                var state = player.getPlayerState();
78                if(state == 1){
79                    player.pauseVideo();
80                } else {
81                    player.playVideo();
82                }
83            }
84        }
85    })
86
87    function muteUnmute(player, sound_playing) {
88        var muteButton = $('.mute-unmute .mute-unmute-mute');
89        var unmuteButton = $('.mute-unmute .mute-unmute-unmute');
90        if (sound_playing) {
91            if (UMGGRSwish.video_type == 'mp4') {
92                $(".video-banner #mp4-video").prop('muted', false);
93            } else {
94                player.unMute();
95                player.playVideo();
96            }
97
98            $(muteButton).show();
99            $(muteButton).toggleClass('active');
100            $(unmuteButton).hide();
101            $(unmuteButton).toggleClass('active');
102        } else {
103            if (UMGGRSwish.video_type == 'mp4') {
104                $(".video-banner #mp4-video").prop('muted', true);
105            } else {
106                player.mute();
107            }
108
109            $(muteButton).hide();
110            $(muteButton).toggleClass('active');
111            $(unmuteButton).show();
112            $(unmuteButton).toggleClass('active');
113        }
114    }
115
116    $('body').on('click', '.umggr-open-newsletter', function (e) {
117        e.preventDefault();
118        if ($(this).hasClass('newsletter-type-inline')) {
119            showInlineNewsletter($(this));
120        } else {
121            $('.ae-cform-modal-display-cta').trigger('click');
122        }
123    });
124
125
126    function pauseBgVideo() {
127        if ($('#background-video').length > 0 && !mobile) {
128            var player = $('#background-video').data('ytPlayer').player;
129            player.pauseVideo();
130        }
131    }
132
133    function playBgVideo() {
134        if ($('#background-video').length > 0 && !mobile) {
135            var player = $('#background-video').data('ytPlayer').player;
136            player.playVideo();
137        }
138    }
139
140    function initMP4Video() {
141        if ($('#mp4-video').length > 0) {
142            if (UMGGRSwish.background_video_mute == 1 && md.mobile() == null) {
143                $('.c-site-nav').append('<li class="mute-unmute"><div class="mute-unmute-unmute"><a href="#unmute"><i class="fa fa-volume-mute" aria-hidden="true"></i></a></div><div class="mute-unmute-mute"><a href="#mute"><i class="fa fa-volume-up" aria-hidden="true"></i></a></div></li>');
144                if ($('#home-section #main-menu-center').length == 1) {
145                    $('#home-section #main-menu-center').append('<li class="mute-unmute"><div class="mute-unmute-mute"><a href="#mute"><i class="fa fa-volume-up" aria-hidden="true"></i></a></div><div class="mute-unmute-unmute"><a href="#unmute"><i class="fa fa-volume-mute" aria-hidden="true"></i></a></div></li>');
146                }
147            }
148        }
149    }
150
151    if ($('#background-video').length > 0) {
152        var bgvideo, bgvideoplaying = false;
153
154        function bgvideo_check_if_ready() {
155            if (typeof window.YT !== 'undefined' && typeof window.YT.Player !== 'undefined') {
156                initialise_bg_video();
157            } else {
158                setTimeout(function () {
159                    bgvideo_check_if_ready();
160                }, 100)
161            }
162        }
163
164        function initialise_bg_video() {
165            var $video = $('#background-video');
166            var ytid = $video.data('ytid');
167            var ytautoplay = md.mobile() == null && $video.data('ytautoplay') ? 1 : 0;
168            var ytmute = md.mobile() == null && ytautoplay == 1 ? 1 : 0;
169            var bg_video_playing = 0;
170            
171            bgvideo = $video.YTPlayer({
172                fitToBackground: true,
173                videoId: ytid,
174                host: ytPlayerHost,
175                playerVars: {
176                    loop: 1,
177                    html5: 1,
178                    modestbranding: 0,
179                    autoplay: ytautoplay,
180                    controls: 0,
181                    showinfo: 0,
182                    branding: 0,
183                    rel: 0,
184                    autohide: 0,
185                    start: 0,
186                    mute: ytmute,
187                    enablejsapi: 1,
188                    playlist: ytid
189                },
190                events: {
191                    'onReady': onPlayerReady
192                }
193            });
194
195            function onPlayerReady(event) {
196                center_video($video);
197            }
198
199            UMGGRSwish.player = $('#background-video').data('ytPlayer').player;
200            if (UMGGRSwish.background_video_mute == 1 && md.mobile() == null) {
201                $('.c-site-nav').append('<li class="mute-unmute"><div class="mute-unmute-unmute"><a href="#unmute"><i class="fa fa-volume-mute" aria-hidden="true"></i></a></div><div class="mute-unmute-mute"><a href="#mute"><i class="fa fa-volume-up" aria-hidden="true"></i></a></div></li>');
202                if ($('#home-section #main-menu-center').length == 1) {
203                    $('#home-section #main-menu-center').append('<li class="mute-unmute"><div class="mute-unmute-mute"><a href="#mute"><i class="fa fa-volume-up" aria-hidden="true"></i></a></div><div class="mute-unmute-unmute"><a href="#unmute"><i class="fa fa-volume-mute" aria-hidden="true"></i></a></div></li>');
204                }
205            }
206
207        }
208    }
209
210    function center_video(elem) {
211        var $video = elem;
212        var cw = $video.width();
213        var ch = $video.height();
214        var iw = $video.find('iframe').width();
215        var ih = $video.find('iframe').height();
216        if (iw > cw) {
217            var ol = (iw - cw) / 2;
218        }
219        if (ih > ch) {
220            var ot = (ih - ch) / 2;
221        }
222        $video.find('iframe').css({
223            'position': 'absolute',
224            'left': -ol,
225            'top': -ot
226        });
227    }
228
229    $(window).resize($.throttle(250, function () {
230        checkMobile();
231    }));
232
233
234    function checkMobile() {
235        var md = new MobileDetect(window.navigator.userAgent);
236        if (md.mobile() != null) {
237            $('body').addClass('mobile');
238        } else {
239            $('body').removeClass('mobile');
240        }
241    }
242
243    function newsletterInSocials() {
244        var n = $('.umggr-newsletter-menu');
245        if (n.length > 0 && n.hasClass('position-socials')) {
246            var contents = n.html();
247            n.hide();
248            $('.c-social').append(contents);
249            if (n.hasClass('newsletter-text-or-icon-icon')) {
250                $('.c-social').addClass('newsletter-text-or-icon-icon');
251            }
252            if (n.hasClass('newsletter-text-or-icon-text')) {
253                $('.c-social').addClass('newsletter-text-or-icon-text');
254            }
255            var mobileNewsletter = $('.umggr-nav-mobile .umggr-open-newsletter');
256            $('.umggr-nav-mobile ul#menu-social').append(mobileNewsletter);
257        }
258        if (n.length > 0 && n.hasClass('position-nav')) {
259            var contents = n.html();
260            n.hide();
261            $('.c-site-nav').append(contents);
262            if (n.hasClass('newsletter-text-or-icon-icon')) {
263                $('.c-site-nav').addClass('newsletter-text-or-icon-icon');
264            }
265            if (n.hasClass('newsletter-text-or-icon-text')) {
266                $('.c-site-nav').addClass('newsletter-text-or-icon-text');
267            }
268            // if ('.site-nav.position-center') {
269            // 	$('.site-nav.position-center').append(contents)
270            // 	if (n.hasClass('newsletter-text-or-icon-icon')) {
271            //         $('.site-nav.position-center').addClass('newsletter-text-or-icon-icon');
272            //     }
273            // }
274
275
276        }
277    }
278
279    newsletterInSocials();
280
281    /**
282     * Automatically update header links to mobile display depending on amount of space they are taking
283     * - this is to prevent menu jumping down to more than single level
284     */
285    window.responsive_header_bar = {
286        allowance: 20,
287
288        init: function () {
289            //toggle responsive
290            this.toggle_responsive();
291        },
292
293        //get header width if all items were shown
294        get_full_header_width: function () {
295            var innerWidth = 0;
296            $('#header-bar > .wrap').each(function () {
297                if ($(this).hasClass('c-social')) {
298                    $(this).children().each(function () {
299                        innerWidth += $(this).width();
300                    });
301                } else {
302                    innerWidth += $(this).width();
303                }
304            });
305
306            return innerWidth;
307        },
308        get_current_header_width: function () {
309            var innerWidth = 0;
310            // innerWidth = this.get_logo_width() + this.get_sitenav_width() + this.get_social_width();
311            let leftWidth = $('#header-bar .-dynamic-menus.-left').width() ? $('#header-bar .-dynamic-menus.-left').width() : 0
312            let rightWidth = $('#header-bar .-dynamic-menus.-right').width() ? $('#header-bar .-dynamic-menus.-right').width() : 0
313            innerWidth = this.get_left_area_width() + this.get_middle_area_width() + this.get_right_area_width();
314            return innerWidth + leftWidth + rightWidth;
315        },
316
317        get_left_area_width: function () {
318            var width = 0;
319            var left = $('#header-bar .-dynamic-header.-top-left').children();
320            $(left).each(function () {
321                if ($(this).width() > width) {
322                    width = $(this).width();
323                }
324            });
325            $('#header-bar .-dynamic-header.-top-left').attr('data-w', width);
326            return width;
327        },
328        get_middle_area_width: function () {
329            var width = 0;
330            var middle = $('#header-bar .-dynamic-header.-middle').
330children();
331            $(middle).each(function () {
332                if ($(this).width() > width) {
333                    width = $(this).width();
334                }
335            });
336            $('#header-bar .-dynamic-header.-middle').attr('data-w', width);
337            return width;
338        },
339        get_right_area_width: function () {
340            var width = 0;
341            var right = $('#header-bar .-dynamic-header.-top-right').children();
342            $(right).each(function () {
343                if ($(this).width() > width) {
344                    width = $(this).width();
345                }
346            });
347            $('#header-bar .-dynamic-header.-top-right').attr('data-w', width);
348            return width;
349        },
350
351        //get real width of logo
352        get_logo_width: function () {
353            let logoWidth = $('#header-bar > .c-site-logo').width() ? $('#header-bar > .c-site-logo').width() : 0
354            $('#header-bar > .c-site-logo').attr('data-w', logoWidth);
355        },
356
357        //get real width of sitenav items
358        get_sitenav_width: function () {
359            let navWidth = $('#header-bar .c-site-nav').width() ? $('#header-bar .c-site-nav').width() : 0
360            $('#header-bar .c-site-nav').attr('data-w', navWidth);
361            return navWidth + 20; // include 20 padding
362        },
363
364        //get real width of social items
365        get_social_width: function () {
366            var width = 0;
367            let socialWidth = $('#header-bar .social-nav .social-links').width() ? $('#header-bar .social-nav .social-links').width() : 0
368            if ($('#header-bar .social-nav .social-links').css('display') == 'none') {
369                width = 0;
370            } else {
371                width = socialWidth + 20; //20 for padding
372            }
373            $('#header-bar .social-nav .social-links').attr('data-w', width);
374            return width;
375        },
376
377        //get real width of sitenav items
378        get_newsletter_width: function () {
379            let listWidth = $('#header-bar .header-mailing-list').width() ? $('#header-bar .header-mailing-list').width() : 0
380            $('#header-bar .header-mailing-list').attr('data-w', listWidth);
381            return listWidth + 20; // include 20 padding
382        },
383
384
385        //check if social links can fit
386        can_nav_fit: function () {
387            var headerInnerWidth = $('#header-bar').width() ? $('#header-bar').width() : 0;
388            var fullContentWidth = this.get_current_header_width();
389            return headerInnerWidth > (fullContentWidth + 50); // add 50px to account for margins around the header-bar
390        },
391
392        //toggle responsive body classes
393        toggle_responsive: function (skipSocial) {
394            $('body').removeClass('-mobile-social');
395            $('body').removeClass('-mobile-nav');
396            if (!this.can_nav_fit() || this.get_social_width() == 0) {
397                $('body').addClass('-mobile-social');
398            } else {
399                $('body').removeClass('-mobile-social');
400            }
401            if (!this.can_nav_fit()) {
402                $('body').addClass('-mobile-nav');
403            } else {
404                $('body').removeClass('-mobile-nav');
405            }
406            // this is to stop the page load to run the toggle_responsive function twice. this is used on window resize function
407            firstLoad = false;
408        }
409    };
410
411    /**
412     * Position all header/menu elements correctly in mobile view
413     */
414    $(window).load(function () {
415        enq();
416    });
417
418    $(window).on('resize', function () {
419        enq();
420        // update responsive header bar
421        if (firstLoad == false) {
422            responsive_header_bar.toggle_responsive();
423        }
424    });
425
426    $(window).trigger('resize');
427
428    // Contains necessary mutation observer to watch for changes to the standard AE Connect login and apply successful sign up message the other element on the page
429    var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
430    $.fn.attrchange = function (callback) {
431        if (MutationObserver) {
432            var options = {
433                subtree: false,
434                attributes: true
435            };
436            var observer = new MutationObserver(function (mutations) {
437                mutations.forEach(function (e) {
438                    callback.call(e.target, e.attributeName);
439                });
440            });
441            return this.each(function () {
442                observer.observe(this, options);
443            });
444        }
445    }
446
447    function checkCformComplete() {
448        var form = $(`#ae-cform-container-${UMGGR.newsletterCustomFormId}`)
449        if (!$(form).length || typeof $(form).attr("class") === 'undefined') {
450            return;
451        }
452        if ($(form).attr("class").indexOf("ae-cform-mailing-list-success-1") >= 0) {
453            if (UMGGRSwish.newsletter_icon !== 'icon') {
454                $('.umggr-open-newsletter .newsletter-link-text').text($('#ae-cform-container-1').text());
455            }
456        }
457    }
458
459    if (UMGGRSwish.newsletter_enabled) {
460        $(`#ae-cform-container-${UMGGR.newsletterCustomFormId}`).attrchange(function (attrName) {
461            if (attrName == 'class') {
462                checkCformComplete();
463            }
464        });
465        checkCformComplete();
466    }
467
468    $(document).ready(function () {
469
470        muteButton = $('.mute-unmute-mute');
471        $(muteButton).show();
472        $(muteButton).toggleClass('active');
473
474        // update responsive header bar
475        responsive_header_bar.init();
476
477        let headerHeight = $('#header-bar').outerHeight() ? $('#header-bar').outerHeight() : 0
478
479        var paddingTop = headerHeight + 'px';
480
481        //check if autoscroll feature has been disabled in site settings
482        var autoscroll = true;
483        if (typeof UMGGRSwish !== 'undefined' && typeof UMGGRSwish.autoscroll_enabled !== 'undefined') {
484            autoscroll = UMGGRSwish.autoscroll_enabled == 'enabled';
485        }
486
487        //check if the fitToSection feature has been disabled in site settings
488        var fitToSectionSetting = true;
489        if (typeof UMGGRSwish !== 'undefined' && typeof UMGGRSwish.fittosection_enabled !== 'undefined') {
490            fitToSectionSetting = UMGGRSwish.fittosection_enabled == 'on';
491        }
492
493        var windowHeight = $(window).height();
494        var mobileFooterHeight = $('#docked-menu-gr').outerHeight() ? $('#docked-menu-gr').outerHeight() : 0;
495        if (UMGGRSwish.home_header_type === 'slickslider') {
496            if (!mobile) {
497                $('.promo.home').height(windowHeight - headerHeight);
498                $('.promo.home[data-headerType=slickslider] .slider-gr .slider-gr-container').height(windowHeight - (headerHeight + mobileFooterHeight));
499            } else {
500                $('.promo.home').height(windowHeight - (headerHeight + mobileFooterHeight));
501                $('.promo.home[data-headerType=slickslider] .slider-gr').height(windowHeight - (headerHeight + mobileFooterHeight));
502                $('.promo.home[data-headerType=slickslider] .slider-gr .slider-gr-container').height(windowHeight - (headerHeight + mobileFooterHeight));
503                $('.promo.home[data-headerType=slickslider] .slider-gr .slider-gr-container .slick-list').height(windowHeight - (headerHeight + mobileFooterHeight));
504                $('#home .slider-gr.wide-slide .slider-gr-slide .slide-image .slide-image-background').height(windowHeight - (headerHeight + mobileFooterHeight));
505            }
506        }
507
508        if ($('.slider-gr .promo-slider').length) {
509
510            var stdPromoSliderSettings = {
511                slidesToShow: 1,
512                slidesToScroll: 1,
513                infinite: true,
514                dots: UMGGRSwish.banner_navigation == 'dots' ||  UMGGRSwish.banner_navigation == 'both',
515                arrows: UMGGRSwish.banner_navigation == 'arrows' ||  UMGGRSwish.banner_navigation == 'both',
516                draggable: true,
517                prevArrow: '<span class="slick-prev"></span>',
518                nextArrow: '<span class="slick-next"></span>'
519            }
520
521            if (typeof window.UMGGR_Promo_Slick_Slider_Option != "undefined") { //
522                var mergedPromoSliderSettings = {...stdPromoSliderSettings, ...window.UMGGR_Promo_Slick_Slider_Option};
523            } else {
524                var mergedPromoSliderSettings = stdPromoSliderSettings;
525            }
526
527            $('.promo-slider').not('.slick-initialized').slick(mergedPromoSliderSettings);
528
529            // show / hide the mobile version of the slider images
530            if ($(window).width() > 800) {
531                $(".slide-mobile").css('display', 'none');
532            } else {
533                $(".slide-mobile").css('display', 'block');
534            }
535        }
536
537        if(!separatePage) {
538            $('#fullpage').fullpage({
539                //options here
540                autoScrolling: autoscroll,
541                scrollHorizontally: autoscroll,
542                scrollOverflow: autoscroll, //only enable if autoscroll is on
543                paddingTop: paddingTop,
544                paddingBottom: Math.round(headerHeight/2) + 'px',
545                anchors: UMGGRSwish.sectionAnchors,
546                // fixedElements: fixedElements,
547                bigSectionsDestination: 'top',
548                lazyLoading: autoscroll,
549                fitToSection: fitToSectionSetting,
550                afterResize: function (width, height) {
551                    fullpage_api.reBuild();
552                },
553                afterRender: function () {
554                    if ($('#background-video').length) {
555                        bgvideo_check_if_ready();
556                        center_video($('#background-video'));
557                    }
558                    if (window.location.hash) {
559                        const menuAnchor = window.location.hash.replace('#/', '')
560                        fullpage_api.moveTo(menuAnchor)
561                    }
562                },
563                afterLoad: function(origin, destination, direction) {
564                    // Check if the destination section has the video
565                    if ($(destination.item).find('video').length > 0) {
566                        if ('' == md.mobile() || null == md.mobile()) { // only do this on desktop
567                            // Play the video
568                            $(destination.item).find('video').get(0).play();
569                        } else {
570                            $(destination.item).find('video').get(0).pause();
571                        }
572                    }
573                },
574                onLeave: function (origin, destination, direction) {
575                    // show menu clone when navigating away from home
576                    if ($('#site-header').length) {
577                        if (!destination.isFirst) {
578                            $('#site-header').addClass('offset-nav');
579                            $('.nav-center-scroll').removeClass('-hidden');
580                        } else {
581                            $('#site-header').removeClass('offset-nav');
582                            $('.nav-center-scroll').addClass('-hidden')
583                        }
584                    }
585                    if ($(origin.item).find('video').length > 0) {                        
586                        if ('' == md.mobile() || null == md.mobile()) { // only do this on desktop
587                            $('#home-section').find('video').get(0).pause();
588                            setTimeout(function(){
589                                $('#home-section').find('video').get(0).play();
590                            }, 1);                        
591                        } else {
592                            $('#home-section').find('video').get(0).pause();
593                        }
594                    }
595                },
596                licenseKey: UMGGRSwish.fullpage_license_key
597            });
598
599            $('[data-menuanchor]').on('click', function(e) {
600                const menuAnchor = $(this).attr('data-menuanchor')
601                if (menuAnchor.length) {
602                    fullpage_api.moveTo(menuAnchor)
603                }
604            })
605
606            //rebuild the fullpage display when music links are opened/closed because they change section height
607            $('.open-links').on('click', function () {
608                setTimeout(function () {
609                    fullpage_api.reBuild();
610                }, 800);
611            });
612        } else {
613            $('#site-header').addClass('offset-nav');
614            $('.nav-center-scroll').removeClass('-hidden');
615            $('.content-section').css('margin-top', paddingTop);
616        }
617
618        /**
619         * Set body overflow to visible after closing newsletter modal (when opened it sets the overflow to hidden)
620         */
621        $('.ae-cform-modal-container').on('modal:close', function () {
622            $('body').removeClass('-no-overflow');
623            if ($('body').hasClass('autoscroll-disabled')) {
624                $('body').css('overflow', 'visible');
625            }
626        });
627
628
629        // Hide home section from menu, as sections are loaded in iframes, which we close to return to Home.
630        $('#home-inner .site-nav .menu-item-home').hide();
631
632        $('body').on('click', '.menu-links-open', function (e) {
633            $('#umggr-mobile-nav-main').show();
634            $('#umggr-mobile-nav-social').hide();
635            $('#umggr-nav-overlay').show();
636            $('body').addClass('-no-overflow');
637            e.preventDefault();
638        });
639        $('body').on('click', '.social-links-open', function (e) {
640            $('#umggr-mobile-nav-main').hide();
641            $('#umggr-mobile-nav-social').show();
642            $('#umggr-nav-overlay').show();
643            $('body').addClass('-no-overflow');
644            e.preventDefault();
645        });
646        $('body').on('click', '.umggr-mobile-nav-close', function (e) {
647            $('#umggr-nav-overlay').hide();
648            $('body').removeClass('-no-overflow');
649            e.preventDefault();
650        });
651        $('body').on('click', '#umggr-mobile-nav-main #main-menu li a', function (e) {
652            $('#umggr-nav-overlay').hide();
653            $('body').removeClass('-no-overflow');
654        });
655
656        if ($('.ae-cform-modal-display-cta').length > 0) {
657            $('.umggr-mobile-newsletter-menu').show();
658        }
659
660        $('body').on('click', '.umggr-open-newsletter', function (e) {
661            $('.ae-cform-modal-display-cta').trigger('click');
662            e.preventDefault();
663        });
664
665
666        $('body').trigger('umggr-body-loaded');
667
668        $('.umggr-fixed-social-menu-top-right, umggr-fixed-social-menu-top-left').css('top', headerHeight);
669
670        if (typeof UMGGR_Video_Shortcode !== 'undefined' && UMGGR_Video_Shortcode.fullscreen === '1') {
671            var contentHeight = 600 // TODO Make it dynamic
672            $('.umg-gr-display-layout-fullscreen-slider .video-slick-container .slider-gr .video-slider')
673                .css('height', contentHeight);
674        }
675
676        if (UMGGRSwish.video_type == 'mp4') {
677            initMP4Video();
678        }
679
680    });
681
682    $.fn.hasScrollBar = function () {
683        return this.get(0).scrollHeight > this.height();
684    }
685
686    var md = new MobileDetect(window.navigator.userAgent);
687    if (md.mobile() && UMGGRSwish.mobile_override_setting == true) {
688        var videoImage = '<img src="' + UMGGRSwish.mobile_image + '" width="100%" />'
689        $('#background-video').replaceWith(videoImage);
690    }
691
692
693})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.