PageSourceSearch

https://www.lmunet.edu/_global/js/scripts.js

js lmunet.edu collected 2026-09-24 08:39:41 UTC 24,161 bytes, 765 lines download raw bytes

1var _DeferredScripts = _DeferredScripts || [];
2
3function initDeferredVideos() {
4    var maxVideoResolution = 200;
5    $("video.defer.init").each(function () {
6        if (window.innerWidth >= maxVideoResolution) {
7            $(this).find("source").each(function () {
8                var sourceFile = $(this).attr("data-src");
9                $(this).attr("src", sourceFile);
10            });
11            $(this).removeClass("init");
12            var video = $(this)[0];
13            video.load();
14            video.play();
15        }
16    });
17    $("video.defer:not(.init)").each(function () {
18        var video = $(this)[0];
19        if (window.innerWidth >= maxVideoResolution) {
20            video.play();
21        } else {
22            video.pause();
23        }
24    });
25}
26
27// BEGIN: LOADERS
28$(window).on('load', function () {
29    //Program Listing Loader
30    jQuery('.programs .loading').css('display','none');
31})
32// END: LOADERS
33
34jQuery(document).ready(function() {
35	
36	$('#play-video').on('click', function(ev) {
37 
38    $("#video")[0].src += "&autoplay=1";
39    ev.preventDefault();
40 
41  });
42	
43	//BEGIN: TOGGLE TOP NAV
44	jQuery(".parentMenu").addClass('entry');
45	jQuery('#skipToTopNav').click(function (e) {
46		if (jQuery(e.target).attr('id') != 'toggleButtonClose') {
47			jQuery(".topNav").fadeIn(0);
48			jQuery(".parentMenu").addClass('entry');
49			jQuery("#skipToTopNav, .eyebrow").addClass('open');
50			jQuery(".dim").addClass('on');
51			jQuery("#skipToTopNav, #toggleButtonClose").attr('aria-expanded', true);
52			jQuery("#toggleButtonClose").removeClass('close');
53			jQuery("body").css("overflow-y","hidden");
54			event.stopPropagation();
55		}
56	});
57	jQuery('.dim,#toggleButtonClose, #searchtog').click(function () {
58		jQuery(".parentMenu").removeClass('entry');
59		jQuery("#toggleButtonClose").addClass('close');
60		jQuery(".dim").removeClass('on');
61		jQuery("#skipToTopNav, #toggleButtonClose").attr('aria-expanded', false);
62		jQuery("#skipToTopNav, .eyebrow").removeClass('open');
63		jQuery("body").css("overflow-y","auto");
64		event.stopPropagation();
65		jQuery(".topNav").css("display","none");
66	})
67	jQuery('.parentMenu').click(function (e) {
68		jQuery(".parentMenu").removeClass('entry');
69		event.stopPropagation();
70	});
71	//END: TOGGLE TOP NAV
72	
73	// BEGIN: TOP NAV ACCESSIBLE MENU
74	jQuery("#mainMenu > nav").accessibleMegaMenu({
75        uuidPrefix: "accessibleMegamenu",
76        menuClass: "navMenu",
77        topNavItemClass: "menuItem",
78        panelClass: "subNav",
79        panelGroupClass: "subNavGroup",
80        hoverClass: "hover",
81        focusClass: "focus",
82        openClass: "open"
83    });
84	setTimeout(function(){ 
85		jQuery(".topNav").addClass("hideNav"); 
86	},600)
87	// END: TOP NAV ACCESSIBLE MENU
88	
89	//BEGIN: ESC MOBILE MENU
90	$(document).keydown(function(e) {
91		if (e.keyCode == 27) { // escape key maps to keycode '27'
92			if (jQuery("#skipToTopNav.open").length != 0) {
93				$('#toggleButtonClose').trigger('click');
94			}
95		}
96	});	
97	//END: ESC MOBILE MENU
98	
99	//BEGIN: TOGGLE SEARCH NAV
100	var $search = jQuery('.searchbox, #searchtog');
101	jQuery(document).mouseup(function (e) {
102	   if (!$search.is(e.target) // if the target of the click isn't the container...
103	   && $search.has(e.target).length === 0) // ... nor a descendant of the container
104	   {
105		$search.removeClass('open');
106		if(jQuery(".searchbox").hasClass('open')) {
107			jQuery("#searchtog").attr('aria-expanded', true);
108		} else {
109			jQuery("#searchtog").attr('aria-expanded', false);
110		}
111	  }
112	 });
113	jQuery('#searchtog').click(function () {
114		$search.toggleClass('open');
115		if(jQuery(".searchbox").hasClass('open')) {
116			jQuery("#searchtog").attr('aria-expanded', true);
117			setTimeout(function () {
118				jQuery("#searchBar").focus();
119			}, 500);
120		} else {
121			jQuery("#searchtog").attr('aria-expanded', false);
122		}
123	});
124	// ESC Search
125	$(document).keydown(function(e) {
126		if (e.keyCode == 27) { // escape key maps to keycode '27'
127			if(jQuery(".searchbox").hasClass('open')) {
128				jQuery('#searchtog').trigger('click');
129			}	
130		}
131	});
132	//END: TOGGLE SEARCH NAV
133	
134	//BEGIN: EMERGENCY POPUP MAGNIFIC-POPUP
135    if (jQuery(".toggleAlertBtn").length != 0) {
136      $(window).on('load', function() {
137        if (!localStorage.getItem('popup_show')) {
138          $.magnificPopup.open({
139              callbacks: {
140                  open: function(){
141                      jQuery(".toggleAlertBtn").hide();
142                  },
143                  close: function(){
144                    jQuery(".toggleAlertBtn").show();
145                  }
146              },
147              items: {
148                  src: '#alertMessage'
149              },
150              type: 'inline',
151              mainClass: 'mfp-fade',
152              removalDelay: 160,
153              preloader: false,
154              fixedContentPos: false,
155              closeOnContentClick: false
156          }, 0);
157        localStorage.setItem('popup_show', 'true'); // Set the flag in localStorage
158        }
159      });
160    }
161    if (jQuery(".toggleAlertBtn").length != 0) {
162      jQuery('.toggleAlertBtn').magnificPopup({
163          callbacks: {
164              open: function(){
165                  jQuery(".toggleAlertBtn").hide();
166              },
167              close: function(){
168                jQuery(".toggleAlertBtn").show();
169              }
170          },
171          items: {
172              src: '#alertMessage'
173          },
174          type: 'inline',
175          mainClass: 'mfp-fade',
176          removalDelay: 160,
177          preloader: false,
178          fixedContentPos: false,
179          closeOnContentClick: false
180      });
181    }
182	//END: EMERGENCY POPUP MAGNIFIC-POPUP 
183	
184	//BEGIN: EXT POPLINK
185	$('a.extLink').click(function() {
186       // alert("You are now leaving lmunet.edu");
187       event.preventDefault();
188       $('.extLinkPopup').addClass('open');
189       var link = $(this).attr("href");
190       $( 'a.clonedLink' ).attr( "href", link );
191       $( 'a.clonedLink' ).attr( "target", "_blank" );
192    });
193    $('a.closeExtLink').click(function() {
194        $('.extLinkPopup').removeClass('open');
195    });
196    $('a.clonedLink').click(function() {
197        $('.extLinkPopup').removeClass('open');
198    });
199    //END: EXT POPLINK
200
201	//BEGIN: HOME IMPACT SLIDER WITH VIDEO AND IMAGE
202	if (jQuery(".slider-main.video-image").length != 0) {
203		jQuery('.slider-main.video-image').slick({
204		  slidesToShow: 1,
205		  slidesToScroll: 1,
206		  arrows: false,
207		  dots: true,
208		  fade: false,
209		  autoplay: true,
210		  speed: 300,
211		  autoplaySpeed: 0,
212		  pauseOnHover: false,
213		  pauseOnFocus: false
214		});
215		jQuery('.slider-main').on('afterChange', function(event, slick, currentSlide) {
216		  var vid = $(slick.$slides[currentSlide]).find('video');
217		  if (vid.length > 0) {
218			jQuery('.slider-main').slick('slickPause');
219			jQuery(vid).get(0).play();
220		  }
221		  else {
222			if (currentSlide === 0) {
223			  jQuery('.slider-main').slick("setOption", "autoplaySpeed", 0);
224			  jQuery('.slider-main').slick("setOption", "speed", 0);
225			}
226			else {
227			  jQuery('.slider-main').slick("setOption", "autoplaySpeed", 5000);
228			  jQuery('.slider-main').slick("setOption", "speed", 300);
229			}
230		  }
231		});
232		jQuery('video').on('ended',function(){      
233		  jQuery('.slider-main').slick('slickPlay');
234		});
235	}
236	//END: HOME IMPACT SLIDER WITH VIDEO AND IMAGE
237
238	//BEGIN: HOME IMPACT SLIDER WITH VIDEO
239	if (jQuery(".slider-main.video-only").length != 0) {
240	  jQuery('.slider-main.video-only').slick({
241		slidesToShow: 1,
242		slidesToScroll: 1,
243		arrows: false,
244		useCSS: false,
245		pauseOnFocus: false,
246		pauseOnHover: false,
247		fade: false,
248		autoplay: false,
249		autoplaySpeed: 1
250	  });
251	  jQuery('.slider-main.video-only').on('afterChange', function(event, slick, currentSlide) {
252		var vid = $(slick.$slides[currentSlide]).find('video');
253		if (vid.length > 0) {
254				$('.slider-main').slick('slickPause');
255		  $(vid).get(0).play();
256		}
257	  });
258	  jQuery('video').on('ended',function(){      
259		$('.slider-main.video-only').slick('slickPlay');
260	  });
261	}
262	//END: HOME IMPACT SLIDER WITH VIDEO
263	
264	//BEGIN: HOME VIDEO VIMEO IFRAME PAUSE PLAY - REQUIRES VIMEO JS
265	if (jQuery(".vimeo #homeVideo").length != 0) {
266	    var iframe = $('#homeVideo').get(0);
267        var player = new Vimeo.Player(iframe);
268		jQuery('#pauseVideo').on('click', function() {
269			jQuery(this).css('display', 'none');
270			jQuery('#playVideo').css('display', 'block');
271			player.pause();
272		});
273		jQuery('#playVideo').on('click', function() {
274			jQuery(this).css('display', 'none');
275			jQuery('#pauseVideo').css('display', 'block');
276			player.play();
277		});
278	}
279	//END: HOME VIDEO VIMEO IFRAME PAUSE PLAY - REQUIRES VIMEO JS
280	
281	// BEGIN: VIDEO PLAY OPTIONS - UPDATE IDs AND SPAN TEXT AS NEEDED
282	if (jQuery("#theVideo-0").length != 0) {
283		var ppbutton = document.getElementById("pauseVideo");
284		ppbutton.addEventListener("click", playPause);
285		mainVideo = document.getElementById("theVideo-0");
286		jQuery("#pauseVideo").on('click', function(){
287            $(this).addClass('initial');
288        });
289		function playPause() { 
290			if (mainVideo.paused) {
291				mainVideo.play();
292				ppbutton.innerHTML = "<span>Pause Home Video</span>";
293				jQuery("#pauseVideo").addClass("on");
294				jQuery("#pauseVideo").removeClass("initial");
295				}
296			else  {
297				mainVideo.pause(); 
298				ppbutton.innerHTML = "<span>Play Home Video</span>";
299				jQuery("#pauseVideo").removeClass("on");
300				jQuery("#pauseVideo").removeClass("initial");
301				}
302		}
303	}
304    // END: VIDEO PLAY OPTIONS - UPDATE IDs AND SPAN TEXT AS NEEDED
305	
306	//BEGIN: HOME IMPACT SLIDER WITH IMAGE NOT AUTO
307	if (jQuery(".slider-main.image-only.not-auto").length != 0) {
308	  jQuery('.slider-main.image-only').slick({
309		slidesToShow: 1,
310		slidesToScroll: 1,
311		arrows: false,
312		useCSS: false,
313		dots: false,
314		autoplay: false
315	  });
316	}
317	//END: HOME IMPACT SLIDER WITH IMAGE NOT AUTO
318	
319	//BEGIN: HOME IMPACT SLIDER WITH IMAGE
320	if (jQuery(".slider-main.image-only").length != 0) {
321	  jQuery('.slider-main.image-only').slick({
322		slidesToShow: 1,
323		slidesToScroll: 1,
324		arrows: true,
325		useCSS: false,
326		pauseOnFocus: true,
327		pauseOnHover: true,
328		dots: false,
329		fade: true,
330		autoplay: true,
331		autoplaySpeed: 7500,
332		responsive: [
333		  {
334			breakpoint: 720,
335			 settings: {
336				arrows: false,
337				dots: true
338			 }
339		   }
340		]
341	  });
342	}
343	//END: HOME IMPACT SLIDER WITH IMAGE
344
345	//BEGIN: SHORT-WIDTH FEATURED SLIDER
346	if ($('.featured-slider').length > 0) {   
347		  $('.slider').slick({
348			centerMode: false,
349			centerPadding: 0,
350			slidesToShow:2.5,
351			infinite: true,
352			prevArrow: '.previous.fa.fa-chevron-left',
353			arrows: true,
354			nextArrow: '.next.fa.fa-chevron-right',
355			dots: true,
356			customPaging : function(slider, i) {
357				var thumb = $(sli
357der.$slides[i]).data();
358				return '<button type="button">'+(i + 1)+'<span class="slick-sr-only">Go to slide '+(i + 1)+'</span></button>';
359			},
360			appendDots: '.dots',
361			responsive: [
362			  {
363				breakpoint: 720,
364				 settings: {    
365					slidesToShow: 1 
366				 }
367			   }
368			]
369		});
370	}
371	//END: SHORT-WIDTH FEATURED SLIDER 
372	
373	//BEGIN: FULL-WIDTH FEATURED SLIDER
374	if (jQuery(".featuredSlides").length != 0) {
375		jQuery('.featuredSlides').slick({
376			slidesToShow: 1,
377			slidesToScroll: 1,
378			arrows: true,
379			useCSS: false,
380			pauseOnFocus: true,
381			pauseOnHover: true,
382			dots: false,
383			fade: true,
384			autoplay: true,
385			autoplaySpeed: 7500
386		});
387	}
388	//END: FULL-WIDTH FEATURED SLIDER
389	
390	//BEGIN: TESTIMONIAL SLIDER
391	if (jQuery(".testimonialSlider").length != 0) {
392		//var slideCount = jQuery('.testimonialSlider > div').length;
393		//var randomStart = Math.floor(Math.random() * slideCount);	
394		jQuery('.testimonialSlider').slick({
395			//initialSlide: randomStart,  
396			slidesToShow: 1,
397			slidesToScroll: 1,
398			arrows: true,
399			useCSS: false,
400			pauseOnFocus: true,
401			pauseOnHover: true,
402			dots: false,
403			fade: true,
404			autoplay: true,
405			autoplaySpeed: 7500
406		});
407	}
408	//END: TESTIMONIAL SLIDER
409	
410	// COMMENT: ADDS SCOLL FUNCTIONALITY TO #top-link ELEMENTS BACK TO TOP BUTTON/LINK
411    jQuery(window).scroll(function() {
412        if (jQuery(this).scrollTop() > 100) {
413            jQuery('.showText').addClass('notVisible');
414        } else {
415            jQuery('.showText').removeClass('notVisible');
416        }
417    });
418  
419	//BEGIN: GALLERY AUTO SLIDER WITH IMAGE
420    if (jQuery(".gallery-slides").length != 0) {
421    	$(function () { 
422    		// setting for slick.js
423    		$('.gallery-slides').slick({
424    			slidesToShow: 1,
425    			slidesToScroll: 1,
426    			arrows: true,
427    			useCSS: false,
428    			pauseOnFocus: true,
429    			pauseOnHover: true,
430    			dots: true,
431    			fade: true,
432    			autoplay: true,
433    			autoplaySpeed: 7000,
434    			responsive: [
435    				{
436    				  breakpoint: 960,
437    				   settings: {
438    					  arrows: false
439    				   }
440    				}
441    			  ]
442    		}).slick('slickPause');
443    		
444    		// PLAY AND PAUSE BUTTONS FOR IMAGES
445    		  jQuery('.playSlide').css('display', 'none');
446    		  jQuery('.pauseSlide').click(function() {
447    			jQuery('.gallery-slides').slick('slickPause');
448    			jQuery('.playSlide').css('display', 'block');
449    			jQuery('.pauseSlide').css('display', 'none');
450    		  });
451    		  
452    		  jQuery('.playSlide').click(function() {
453    			jQuery('.gallery-slides').slick('slickPlay');
454    			jQuery('.playSlide').css('display', 'none');
455    			jQuery('.pauseSlide').css('display', 'block');
456    		  });
457    
458    		// A function that start autoplay when entering the viewport
459    		function triggerScroll(targetObj) {
460				let targetName = targetObj.attr("class"); //for console.log
461				let targetFlag = false;
462				let scrollTop = $(window).scrollTop();
463				let scrollBottom = scrollTop - 100 + $(window).height();
464				let targetTop = targetObj.offset().top;
465				let targetBottom = targetTop - 100 + targetObj.height();
466				// while loading
467				if (scrollBottom > targetTop && scrollTop < targetBottom) {
468					if (!targetFlag) {
469						//console.log(targetName + ' is in sight'); //for console.log
470						targetObj.slick('slickPlay');
471						targetFlag = true;
472					}
473				} else {
474						//console.log(targetName + ' is not in sight'); //for console.log
475						targetObj.slick('slickPause');
476						targetFlag = false;
477				}
478		
479				$(window).on('scroll', function () {
480					scrollTop = $(window).scrollTop();
481					scrollBottom = scrollTop - 100 + $(window).height();
482					targetTop = targetObj.offset().top;
483					targetBottom = targetTop - 100 + targetObj.height();
484					if (scrollBottom > targetTop && scrollTop < targetBottom) {
485						// Start autoplay when entering the viewport
486						if (!targetFlag) {
487							//console.log(targetName + ' is in sight');
488							targetObj.slick('slickPlay');
489							targetFlag = true;
490						}
491					} else {
492						// Stop autoplay when you get out of the viewport
493						if (targetFlag) {
494							//console.log(targetName + ' is not in sight');//for console.log
495							targetObj.slick('slickPause');
496							targetFlag = false;
497						}
498					}
499				});
500			}
501    		// Execute function
502			triggerScroll($('.gallery-slides'));
503    	});
504    }
505    //END: GALLERY AUTO SLIDER WITH IMAGE
506	
507	//BEGIN: ANIMATE BASE ACCORDIONS
508	if (jQuery(".accordion").length != 0) {
509		if (jQuery(".accordion .wrapper > button").length != 0) {
510			jQuery(".accordion .wrapper > button").click(function () {
511				jQuery(this).next(".accordionPanel").slideToggle("slow");
512			});
513		}
514	}
515	//END: ANIMATE BASE ACCORDIONS
516
517	// ACTIVATE KEYBOARD FOR SECTION NAV
518	jQuery(".interior:not(.progList) .sectionNav").accessibleMegaMenu();
519	//BEGIN: TOGGLE SECTION NAV
520		var $sectionMenu = jQuery('.sectionNav');
521		jQuery(document).mouseup(function (e) {
522		   if (!$sectionMenu.is(e.target) // if the target of the click isn't the container...
523		   && $sectionMenu.has(e.target).length === 0) // ... nor a descendant of the container
524		   {
525			$sectionMenu.removeClass('open');
526			if ($(window).width() <= 1060 ) {
527				if(jQuery(".sectionNav").hasClass('open')) {
528					jQuery("#navSection").attr('aria-expanded', true);
529					jQuery("#sectionNavMenu").attr('aria-expanded', true);
530				} else {
531					jQuery("#navSection").attr('aria-expanded', false);
532					jQuery("#sectionNavMenu").attr('aria-expanded', false);
533				}
534				if (jQuery('#navSection').is(":visible")) {
535					jQuery("#sectionNavMenu").slideUp("slow");
536				}
537			}
538		  }
539		 });
540		jQuery('#navSection').click(function () {
541			$sectionMenu.toggleClass('open');
542			if(jQuery(".sectionNav").hasClass('open')) {
543				jQuery("#navSection").attr('aria-expanded', true);
544				jQuery("#sectionNavMenu").attr('aria-expanded', true);
545			} else {
546				jQuery("#navSection").attr('aria-expanded', false);
547				jQuery("#sectionNavMenu").attr('aria-expanded', false);
548			}
549			if (jQuery('#navSection').is(":visible")) {
550				jQuery("#sectionNavMenu").slideToggle("slow");
551			}
552		});
553		// on mobile update section navigation ARIA roles
554		$(window).on('resize', function(){
555			if($(window).width()<= 1060) {
556				jQuery("#sectionNavMenu, #navSection").attr('aria-expanded', false);
557			}
558		});
559		// on desktop update section navigation ARIA roles
560		if ($(window).width() >= 1061) {
561			jQuery("#sectionNavMenu, #navSection").attr('aria-expanded', true);
562		}
563		$(window).on('resize', function(){
564			if($(window).width()>= 1061) {
565				jQuery("#sectionNavMenu, #navSection").attr('aria-expanded', true);
566			}
567		});
568		// ESC Mobile Menu
569		$(document).keydown(function(e) {
570			if (e.keyCode == 27) { // escape key maps to keycode '27'
571				jQuery('.sectionNav.open #navSection').trigger('click');
572			}
573		});
574	//END: TOGGLE SECTION NAV
575	
576	// BEGIN: REMOVE AHREF BORDER ON IMAGES
577    jQuery("a").has("img").css({"border-bottom" : "none", "box-shadow" : "none" });  
578    // END: REMOVE AHREF BORDER ON IMAGES
579
580	// YOUTUBE POPUP MAGNIFIC-POPUP
581	if (jQuery('.popup-youtube').length > 0) {
582	  jQuery('.popup-youtube').magnificPopup({
583		  //disableOn: 700,
584		  type: 'iframe',
585		  mainClass: 'mfp-fade',
586		  removalDelay: 160,
587		  preloader: false,
588		  fixedContentPos: false
589	  });
590	}
591
592	// NEWS LISTING CATEGORY FILTER
593	if (jQuery("select[name=categoryDropdown]").length > 0) {
594	  jQuery("select[name=categoryDropdown]").change(function () {
595		  var showingCategory = $(this).val().replace(/ /g, '_');
596
597		  if (showingCategory != "") {
598			  jQuery(".article:not(." + showingCategory + ")").hide();
599			  jQuery(".article." + showingCategory).show();
600		  } else {
601			  jQuery(".article").show();
602		  }
603	  });
604	}
605	
606	//BEGIN: LANDING PROGRAMS MAGNIFIC-POPUP
607    if (jQuery(".progList").length != 0) {
608        jQuery('.programPop').click(function() {
609          var currIndex = $(this).closest('.programLink').index();
610          // alert( currIndex );
611          var items = [];
612          jQuery( jQuery(this).attr('data-link') ).find('.programBox').each(function() {
613            items.push( {
614              src: jQuery(this) 
615            } );
616          });
617          jQuery.magnificPopup.open({
618            items:items,
619            mainClass: 'mfp-fade programs',
620            removalDelay: 160,
621            preloader: false,
622            fixedContentPos: true,
623            closeOnContentClick: false,
624            closeBtnInside: true,
625            gallery: {
626              enabled: true 
627            }
628            //callbacks: {
629                //buildControls: function() {
630                    // re-appends controls inside the main container
631                    //this.arrowLeft.appendTo(this.contentContainer);
632                    //this.arrowRight.appendTo(this.contentContainer);
633                //}
634            //},
635          },currIndex);
636        });
637        // Show popup
638        jQuery("a.programPop").attr("data-link", "#programPop");
639        
640        var emptyCells, i;
641        jQuery(".programContainer").each(function() {
642          emptyCells = [];
643          for (i = 0; i < $(this).find(".programLink").length; i++) {
644            emptyCells.push($("<div>", {
645              class: "programLink is-empty"
646            }));
647          }
648          jQuery(this).append(emptyCells);
649        });
650    }
651    //END: LANDING PROGRAMS MAGNIFIC-POPUP
652  
653	// BEGIN: VIDEO DEFER
654	if ($("video.defer").length > 0) {
655        _DeferredScripts.push({
656            //object properties here:
657            priority: 1,
658            thirdParty: 0,
659            callback: function () {
660                $(window).bind("resize", function () {
661                    initDeferredVideos();
662                });
663                initDeferredVideos();
664            }
665        });
666    }
667	// END: VIDEO DEFER
668	
669	//BEGIN: TABLE SAW
670	if (jQuery(".wysiwyg-content table").length != 0) {
671		jQuery(".wysiwyg-content table").each(function(){
672			$(this)
673				.attr("class", "tablesaw tablesaw-stack" )
674				.attr("data-tablesaw-mode", "stack");
675		});
676	}
677	//END: TABLE SAW
678});
679
680function custInterval(func, wait, times) {
681    var interv = function (w, t) {
682        return function () {
683            if (typeof t === "undefined" || t-- > 0) {
684                setTimeout(interv, w);
685                try {
686                    func.call(null);
687                }
688                catch (e) {
689                    t = 0;
690                    throw e.toString();
691                }
692            }
693        };
694    }(wait, times);
695
696    setTimeout(interv, wait);
697};
698// Include these at the end  of the main scripts file:
699function downloadJSAtOnload() {
700    // call function now
701    getDeferredScripts();
702    // create function interval
703    custInterval(getDeferredScripts, 5000, 10);
704}
705function getDeferredScripts() {
706	// if _DeferredScripts is an object and has items
707    if (typeof _DeferredScripts == 'object' && _DeferredScripts.length > 0) {
708		// Sort
709        _DeferredScripts.sort(function (a, b) {
710            try {
711				// if they have the same priority
712                if (a.priority == b.priority) {
713                    return a.thirdParty - b.thirdParty;
714                } else {
715                    //priority is different so third party doesn't matter
716                    return a.priority - b.priority;
717                }
718            } catch (e) {
719                return 1;
720            }
721        });
722        while (_DeferredScripts.length > 0) {
723			// remove the first item in _DeferredScripts and return that item
724            var scriptObj = _DeferredScripts.shift();
725			
726			// if returned object has a callback function
727			// else if it has a url 
728            if (typeof scriptObj.callback == 'function') {
729                scriptObj.callback();
730            } else if (typeof scriptObj.url == 'string') {
731                var element = document.createElement("script");
732                element.src = scriptObj.url;
733                document.body.appendChild(element);
734            }
735        }
736    }
737}
738if (window.addEventListener)
739    window.addEventListener("load", downloadJSAtOnload, false);
740else if (window.attachEvent)
741    window.attachEvent("onload", downloadJSAtOnload);
742else
743    window.onload = downloadJSAtOnload;
744
745// FOR PASSIVE EVENT LISTENERS
746jQuery.event.special.touchstart = {
747    setup: function( _, ns, handle ) {
748        this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") });
749    }
750};
751jQuery.event.special.touchmove = {
752    setup: function( _, ns, handle ) {
753        this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") });
754    }
755};
756jQuery.event.special.wheel = {
757    setup: function( _, ns, handle ){
758        this.addEventListener("wheel", handle, { passive: true });
759    }
760};
761jQuery.event.special.mousewheel = {
762    setup: function( _, ns, handle ){
763        this.addEventListener("mousewheel", handle, { passive: true });
764    }
765};

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.