PageSourceSearch

https://www.cityofgreenwoodsc.com/_assets_/js/scripts.js

js cityofgreenwoodsc.com collected 2026-10-02 11:32:39 UTC 25,283 bytes, 803 lines download raw bytes

1/*-----------------------------------------------------------------------------------
2
3	Theme Name: Greenwood, SC
4	Front-end developer: Richard Opiniano
5	Author Design: Alex Parent
6	Author URI: http://www.revize.com/
7	Date: 1/17/22
8
9-----------------------------------------------------------------------------------*/
10
11function RZRenderMini(elementList) {
12
13	function eachEvent(){
14		$('a.fc-day-grid-event').each(function(){
15			var eventIndex = $(this).parent('.fc-event-container').index();
16			$(this).parent().parent(':first-child').parent().siblings().find('td').eq(eventIndex).addClass('day-has-event');
17		});
18
19		$('#homepage .fc-day-top.day-has-event a').on('click', function(){
20			$('#homepage .fc-left .fc-button-group+.fc-button-group').css('opacity', '1');
21			$('#homepage .fc-left .fc-button-group+.fc-button-group button').css('cursor', 'pointer');
22			$('#homepage .fc-left .fc-prev-button').css('opacity', '0').css('pointer-events', 'none');
23			$('#homepage .fc-left .fc-next-button').css('opacity', '0').css('pointer-events', 'none');
24		})
25	}
26
27	eachEvent();
28
29	$('#homepage .fc-left .fc-button-group > .fc-dayGridMonth-button')
30	.add('#homepage .fc-left .fc-button-group > .fc-prev-button')
31	.add('#homepage .fc-left .fc-button-group > .fc-next-button')
32	.add('#homepage .fc-left .fc-button-group > .fc-today-button')
33	.on('click', function(){eachEvent()});
34
35	$('#homepage .fc-day-top.day-has-event a').on('click', function(){
36		$('#homepage .fc-left .fc-button-group+.fc-button-group').css('opacity', '1');
37		$('#homepage .fc-left .fc-button-group+.fc-button-group button').css('cursor', 'pointer');
38		$('#homepage .fc-left .fc-prev-button').css('opacity', '0').css('pointer-events', 'none');
39		$('#homepage .fc-left .fc-next-button').css('opacity', '0').css('pointer-events', 'none');
40	})
41
42	$('#homepage .fc-left .fc-button-group+.fc-button-group').on('click', function(){
43		$(this).css('opacity', '0');
44		$('#homepage .fc-left .fc-prev-button').css('opacity', '1').css('pointer-events', 'all');
45		$('#homepage .fc-left .fc-next-button').css('opacity', '1').css('pointer-events', 'all');
46	
47		$('#homepage .fc-day-top.day-has-event a').on('click', function(){
48			$('#homepage .fc-left .fc-button-group+.fc-button-group').css('opacity', '1');
49			$('#homepage .fc-left .fc-button-group+.fc-button-group button').css('cursor', 'pointer');
50			$('#homepage .fc-left .fc-prev-button').css('opacity', '0').css('pointer-events', 'none');
51			$('#homepage .fc-left .fc-next-button').css('opacity', '0').css('pointer-events', 'none');
52		})
53	})
54
55}
56
57(function($) {
58
59	'use strict';
60
61	var $window = $(window),
62		$body = $('body');
63
64	/*!
65	 * IE10 viewport hack for Surface/desktop Windows 8 bug
66	 * Copyright 2014-2015 Twitter, Inc.
67	 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
68	 */
69
70	// See the Getting Started docs for more information:
71	// http://getbootstrap.com/getting-started/#support-ie10-width
72	if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
73		var msViewportStyle = document.createElement('style');
74		msViewportStyle.appendChild(
75			document.createTextNode(
76			  '@-ms-viewport{width:auto!important}'
77			)
78		); document.querySelector('head').appendChild(msViewportStyle);
79	}
80
81	// RZ Class
82	if(typeof RZ !== "undefined"){
83		if(RZ.login){
84			$body.addClass("user-logged-in");
85		} else{
86			$body.addClass("user-not-logged-in");
87		}
88	}
89
90	// Keyboard Navigation: Nav, flyout
91	var isClick = false;
92	$("#nav li a, #flyout  li a, a, button, .toggle, .toggle2").on('focusin', function(e) {
93		if( isClick === false ) {
94			$(".focused").removeClass("focused");
95			$(e.currentTarget).parents("#nav li, #flyout li").addClass("focused");
96			$(".opened:not(.focused) ul:visible:not(.level2),.opened2:not(.focused) ul:visible:not(.level2)").slideUp().parent().removeClass("opened opened2");
97		} else {
98			$(".focused").removeClass("focused");
99			isClick = false;
100		}
101	});
102
103	// prevent focused class changes on click - This way arrows wont pop when clicking nav links
104	$("#nav a,#flyout a").on('mousedown',function(){
105		isClick = true;
106	});
107
108	// Search Toggle
109	$('#search-toggle').on('click',function(e){
110		$('#search').stop().slideToggle(200);
111		$(this).toggleClass('fa-search fa-close');
112	});
113
114	// Navigation Toggle
115	$("#nav-toggle").on("click", function(){
116		$("#nav").stop().slideToggle();
117		$(this).toggleClass("fa-bars fa-close");
118	});
119
120	// Menu Arrows and Toggles
121	$("#nav >li>ul,#flyout >li>ul").addClass('first-level');
122	$("#nav  li ul ul").addClass('second-level');
123	$("#nav>li:has(ul)").each(function(){
124		$('<a href="#" class="fa fa-angle-down toggle" tabindex="0" aria-haspopup="true" aria-expanded="false" id="dropdown-toggle-'+$(this).index()+'" aria-label="Show Dropdown for '+ $(this).find('a:first').text() +'"></a>').insertAfter($(this).find('a:first'));
125		$(this).find('ul:first').attr('aria-labelledby', 'dropdown-toggle-'+$(this).index());
126	});
127	$('#nav li ul>li:has(ul)').each(function(index) {
128		$('<a href="#" class="fa fa-angle-down toggle2" tabindex="0" aria-haspopup="true" aria-expanded="false" id="sub-dropdown-toggle-'+index+'" aria-label="Show Dropdown for '+ $(this).find('a:first').text() +'"></a>').insertAfter($(this).find('a:first'));
129		$(this).find('ul:first').attr('aria-labelledby', 'sub-dropdown-toggle-'+index);
130	});
131	$('#flyout >li:has(ul)').each(function() {
132		$('<a href="#" class="fa fa-angle-down toggle" tabindex="0" aria-haspopup="true" aria-expanded="false" id="flyout-dropdown-toggle-'+$(this).index()+'" aria-label="Show Flyout for '+ $(this).find('a:first').text() +'"></a>').insertAfter($(this).find('a:first'));
133		$(this).find('ul:first').attr('aria-labelledby', 'flyout-dropdown-toggle-'+$(this).index());
134	});
135
136	function addNavClass() {
137		if ($window.width() < 992) {
138			// Insert needed for mobile
139		} else{
140			// Insert needed for desktop
141			$('#nav ul, #flyout ul').css('display', '');
142		}
143	}
144	addNavClass();
145	$window.resize(addNavClass);
146
147	$(".toggle").on("click keydown",function(e) {
148		if (e.keyCode === 13 || e.type === 'click') {
149			e.preventDefault();
150			var $parent = $(this).parent();
151			var $parentLi = $parent.parent();
152			$parent.toggleClass('opened');
153			if($parent.addClass('active') && $(this).next('.first-level').is(":visible")){
154				$(this).next('.first-level').slideUp();
155				$parent.removeClass('active');
156				$(this).attr({'aria-expanded': 'false'});
157			} else {
158				$(this).attr({'aria-expanded': 'true'});
159				$(".first-level").slideUp("slow");
160				$parent.addClass('active');
161				$(this).next('.first-level').slideToggle();
162			}
163		}
164	});
165	$(".toggle2").on("click keydown",function(e) {
166		if (e.keyCode === 13 || e.type === 'click') {
167			e.preventDefault();
168			var $parent = $(this).parent();
169			var $parentLi = $parent.parent();
170			$parent.toggleClass('opened2');
171			if($parent.addClass('active') && $(this).next('.second-level').is(":visible")){
172				$(this).next('.second-level').slideUp();
173				$parent.removeClass('active');
174				$(this).attr({'aria-expanded': 'false'});
175			} else {
176				$(this).attr({'aria-expanded': 'true'});
177				$(".second-level").slideUp("slow");
178				$parent.addClass('active');
179				$(this).next('.second-level').slideToggle();
180			}
181		}
182	});
183
184	// close nav if left
185	$(".desktop *").focus(function(e){
186		var $opened = $(".opened");
187		var $opened2 = $(".opened2");
188		if( $opened.length > 0 || $opened2.length > 0 ) {
189			if( $(".opened :focus").length < 1 ){
190				$opened.children("ul").slideUp();
191				$opened.removeClass("opened");
192				$(".opened2").removeClass("opened2");
193			}
194			if( $(".opened2 :focus").length < 1 ){
195				$opened2.children("ul").slideUp();
196				$opened2.removeClass("opened2");
197			}
198		}
199	});
200
201	// Flyout
202	var flyout = $('#flyout'),
203		flyoutwrap = $('#flyout-wrap');
204
205	if (flyout.text().length){
206		flyoutwrap.prepend('<div tabindex="0" id="flyout-toggle" class="hidden-lg hidden-md"><i class="fa fa-bars"></i> Sub Menu</div>');
207	}
208
209	$("#flyout-toggle").on("click", function(){
210		flyout.slideToggle();
211		$(this).toggleClass("active");
212	});
213
214	$("#flyout-toggle").on("keydown", function (e) {
215    if (e.keyCode === 13) {
216      flyout.slideToggle();
217      $(this).toggleClass("active");
218    }
219  });
220
221  $("#flyout").on("keydown", function (e) {
222    if (e.keyCode === 27 && $(window).width() < 992) {
223      flyout.slideUp();
224      $("#flyout-toggle").removeClass("active");
225    }
226  });
227
228  $("#flyout li:last-child").on("keydown", function (e) {
229    if (e.keyCode === 9 && !e.shiftKey && $(window).width() < 992) {
230      flyout.slideUp();
231      $("#flyout-toggle").removeClass("active");
232    }
233  });
234
235	function fillSide(){
236		var whiteSpace = parseFloat($('.container').css('margin-right')) + 15;
237		$('.fillLeft').css('margin-left',-whiteSpace);
238		$('.fillLeft.withPadding').css('padding-left',whiteSpace);
239		$('.fillRight').css('margin-right',-whiteSpace);
240		$('.fillRight.withPadding').css('padding-right',whiteSpace);
241	}
242	fillSide();
243	$window.resize(fillSide);
244
245	/*
246	* E-Notify Auto submit
247	*/
248	$.urlParam=function(n){var e=new RegExp("[?&]"+n+"=([^]*)").exec(window.location.href);return null==e?null:e[1]||0};
249	var $enotify = $('iframe[src*="/revize/plugins/notify/notify.jsp"]');
250	if( $enotify.length > 0 ){
251		var emailStr = $.urlParam("email");
252		if( emailStr != null ){
253			$enotify.attr("src", $enotify.attr("src") + "&email=" + emailStr);
254		}
255	}
256
257	// Make sure all calendars have unique ids
258	$('iframe[name="calendar"]').each(function (index, calendar) {
259		calendar.id = 'calendar-' + index;
260	});
261
262	// Start Frame Resizer
263	function resizeIframe(height, frameElement) {
264		if ( frameElement ) {
265			frameElement.height = "";
266			frameElement.height = height;
267		}
268	}
269
270	var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
271	var eventHandler = window[eventMethod];
272	var messageEvent = eventMethod === "attachEvent" ? "onmessage" : "message";
273	eventHandler(messageEvent, function (e) {
274		if ( Array.isArray(e.data) ) {
275			if( e.data[0] === "setCalHeight" || e.data[0] === "setNotifyHeight") {
276				var frames = document.querySelectorAll('iframe');
277				for( var i = 0; i < frames.length; i++ ) {
278					if( frames[i].contentWindow === e.source ){
279						resizeIframe(e.data[1], frames[i]);
280					}
281				}
282			}
283		}
284	});
285	// End Frame Resizer
286
287	// Alert Close Caching
288	if ($("div.alert").length) {
289		var hide = window.sessionStorage && parseInt(window.sessionStorage.getItem("alertClosed")) > 1;
290		if (!hide || $(".user-logged-in").length != 0) {
291			$("div.alert").addClass('show');
292		}
293		$("div.alert button.close").on('click', function(e) {
294			if (window.sessionStorage) {
295				window.sessionStorage.setItem("alertClosed",parseInt(window.sessionStorage.getItem("alertClosed")||0)+1);
296			}
297		});
298	}
299
300	var $translateButton = $('#translate-button');
301	$translateButton.on('click', function(e){
302			$('#translation-links ul').stop().fadeToggle();
303			$translateButton.attr('aria-expanded', !('true' === $translateButton.attr('aria-expanded')));
304	});
305
306	$('#translation-links ul').on('mouseleave',function(){
307		$(this).fadeOut();
308		$translateButton.attr('aria-expanded', false);
309	});
310
311	$("#translation-links ul").on("mouseleave", function () {
312    $(this).fadeOut();
313    $translateButton.attr("aria-expanded", false);
314  });
315
316  $("#translation-links ul").on("keydown", function (e) {
317    if (e.keyCode === 27) {
318      $(this).fadeOut();
319      $translateButton.attr("aria-expanded", false);
320      $translateButton.focus();
321    }
322  });
323
324	function removeCookieString(value, domain) {
325		domain = domain ? 'domain='+domain+'; ' : '';
326		return value+'; expires=Thu, 01 Jan 1970 00:00:01 GMT; '+domain+'path=/';
327	}
328
329	function unsetGoogtransCookie() {
330		for (var domains = window.location.hostname.split('.'); domains.length >= 2; domains.shift()) {
331			var cookieString = removeCookieString('googtrans=unset', domains.join('.'));
332			document.cookie=cookieString;
333			if	(domains.length === 2) {
334				cookieString = removeCookieString('googtrans=unset', '.'+domains.join('.'));
335				document.cookie=cookieString;
336			}
337		}
338		document.cookie=removeCookieString('googtrans=unset');
339	}
340
341	if (document.cookie.split(';').some(function(item) { return item.trim().startsWith('googtrans=/auto/en'); })) {
342		unsetGoogtransCookie();
343	}
344
345	 // Translate Script
346	var translateURL = "//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit";
347	$.getScript(translateURL);
348	$('#translation-links a').click(function() {
349		var lang = $(this).data('lang');
350		var $frame = $('.goog-te-menu-frame').first();
351
352		if (lang === 'English') {
353			$('.goog-te-banner-frame').contents().find('.goog-close-link').get(0).click();
354			return;
355		}
356
357		if (!$frame.length) {
358			return false;
359		}
360		var $el =$frame.contents().find('.goog-te-menu2-item span.text:contains(' + lang + ')').get(0);
361		if (!$el) {
362			$frame.contents().find('.goog-te-menu2-item-selected span.text:contains(' + lang + ')').get(0)
363		}
364		$el.click();
365		return false;
366	});
367
368	// Tiny Slider
369	if (typeof tns !== "undefined") {
370		$('.tiny-slider').each(function(i, el) {
371			tns({
372				autoplay: true,
373				autoplayTimeout: 8000,
374				container: el,
375				items: 1,
376				lazyload: true,
377				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
378				mode: "gallery",
379				preventScrollOnTouch: 'force',
380				nav: false,
381				controlsText: [
382				'<img class="prev" src="_assets_/images/prev.png" alt="scroll left">',
383				'<img class="prev" src="_assets_/images/next.png" alt="scroll right">'
384				]
385			});
386		});
387
388		$('#quick-links .tiny-carousel').each(function(i, el) {
389			var $el = $(el);
390			var tinyItemCount = $el.children().length;
391			var tinyItemData = $el.data('tinyItems') ? $el.data('tinyItems') : 6;
392			tns({
393				container: el,
394				items: Math.min(tinyItemCount, tinyItemData),
395				lazyload: true,
396				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
397				preventScrollOnTouch: 'force',
398				gutter: 20,
399				nav: false,
400				controlsText: [
401				'<img class="prev" src="_assets_/images/prev.png" alt="scroll left">',
402				'<img class="prev" src="_assets_/images/next.png" alt="scroll right">'
403				],
404                responsive:{
405                    1199:{
406                        items:4
407                    },
408                    991:{
409                        items:3
410                    },
411                    767:{
412                        items:2
413                    },
414                    0:{
415                        items:1
416                    }
417                }
418			});
419		});
420
421		$('#news .tiny-carousel').each(function(i, el) {
422			var $el = $(el);
423			var tinyItemCount = $el.children().length;
424			var tinyItemData = $el.data('tinyItems') ? $el.data('tinyItems') : 6;
425			tns({
426				container: el,
427				items: Math.min(tinyItemCount, tinyItemData),
428				lazyload: true,
429				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
430				preventScrollOnTouch: 'force',
431				gutter: 20,
432				nav: false,
433				controlsText: [
434				'<img class="prev" src="_assets_/images/prev.png" alt="scroll left">',
435				'<img class="prev" src="_assets_/images/next.png" alt="scroll right">'
436				],
437                responsive:{
438                    991:{
439                        items:3
440                    },
441                    767:{
442                        items:2
443                    },
444                    0:{
445                        items:1
446                    }
447                }
448			});
449		});
450	}
451
452	// Responsive Tables
453	$('.post table:not(.layout-table):not(.not-responsive)').wrap('<div class="table-responsive"></div>');
454	$('.layout-table').attr('role', 'presentation');
455
456
457	$window.ready(function(){
458
459		$("#homepage #search-toggle-desktop").on("click keydown", function(e) {
460			if (e.type === "click" || e.which === 13) {
461				e.preventDefault();
462				$("#search input").focus();
463			}
464		})
465
466		$('#freeform #search-toggle-desktop').click(function(){
467			$('#search').stop().slideToggle();
468			$("#search input").focus();
469		})
470        
471		$('.news-info').each(function(){
472			var diz = $(this);
473			var newsBrief = diz.find('.news-brief').outerHeight() + 18;
474			var newsLink = diz.find('.news-link').outerHeight() + 29;
475			var newsTotal = newsBrief + newsLink;
476			diz.css('bottom',-newsTotal)
477		})
478
479		// matchHeight
480		if(typeof $.fn.matchHeight !== "undefined"){
481			$('.equal').matchHeight({
482				//defaults
483				byRow: true,
484				property: 'height', // height or min-height
485				target: null,
486				remove: false
487			});
488		}
489
490		// Animations http://www.oxygenna.com/tutorials/scroll-animations-using-waypoints-js-animate-css
491		function onScrollInit( items, trigger ) {
492			items.each( function() {
493				var osElement = $(this),
494					osAnimationClass = osElement.data('os-animation'),
495					osAnimationDelay = osElement.data('os-animation-delay');
496
497				osElement.css({
498					'-moz-animation-delay':     osAnimationDelay,
499					'animation-delay':          osAnimationDelay,
500					'-webkit-animation-delay':  osAnimationDelay
501				});
502
503				var osTrigger = ( trigger ) ? trigger : osElement;
504
505				if(typeof $.fn.waypoint !== "undefined"){
506					osTrigger.waypoint(function() {
507						osElement.addClass('animated').addClass(osAnimationClass);
508					},{
509						triggerOnce: true,
510						offset: '100%'
511					});
512				}
513			});
514		}
515		onScrollInit($('.os-animation'));
516
517		//#Fix Bootstrap Strict Collapse
518		$("a[data-toggle='collapse']").each(function() {
519		    this.href = this.href.substring(this.href.indexOf("#collapse"));
520		});
521
522		//#Smooth Scrolling
523		$('a[href*="#"]').not('[href="#"]').not('[href*="#collapse"]').click(function(event) {
524			if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname) {
525				var target = $(this.hash);
526				target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
527				if (target.length) {
528					event.preventDefault();
529					$('html,body').animate({
530						scrollTop: target.offset().top
531					}, 1000, function() {
532						var $target = $(target);
533						$target.focus();
534						if ($target.is(":focus")) {
535							return false;
536						} else {
537							$target.attr('tabindex','-1');
538							$target.focus();
539							$target.removeAttr('tabindex');
540						};
541					});
542				}
543			}
544		});
545        
546        $("#skip").click(function (e) {
547            e.preventDefault();
548            $('html, body').animate({
549                scrollTop: $("#main").offset().top
550            });
551            var target = $('#main')
552				if (target.length) {
553					event.preventDefault();
554					$('html,body').animate({
555						scrollTop: target.offset().top
556					}, 1000, function() {
557						var $target = $(target);
558						$target.focus();
559						if ($target.is(":focus")) {
560							return false;
561						} else {
562							$target.attr('tabindex','-1');
563							$target.focus();
564							$target.removeAttr('tabindex');
565						};
566					});
567				}
568        });
569
570		/*global jQuery */
571		/*!
572		* FlexVerticalCenter.js 1.0
573		*
574		* Copyright 2011, Paul Sprangers http://paulsprangers.com
575		* Released under the WTFPL license
576		* http://sam.zoy.org/wtfpl/
577		*
578		* Date: Fri Oct 28 19:12:00 2011 +0100
579		*/
580		$.fn.flexVerticalCenter = function( options ) {
581			var settings = $.extend({
582				cssAttribute:   'margin-top', // the attribute to apply the calculated value to
583				verticalOffset: 0,            // the number of pixels to offset the vertical alignment by
584				parentSelector: null,         // a selector representing the parent to vertically center this element within
585				debounceTimeout: 25,          // a default debounce timeout in milliseconds
586				deferTilWindowLoad: false     // if true, nothing will take effect until the $(window).load event
587			}, options || {});
588
589			return this.each(function(){
590				var $this   = $(this); // store the object
591				var debounce;
592
593				// recalculate the distance to the top of the element to keep it centered
594				var resizer = function () {
595
596					var parentHeight = (settings.parentSelector && $this.parents(settings.parentSelector).length) ?
597						$this.parents(settings.parentSelector).first().height() : $this.parent().height();
598
599					$this.css(
600						settings.cssAttribute, ( ( ( parentHeight - $this.height() ) / 2 ) + parseInt(settings.verticalOffset) )
601					);
602				};
603
604				// Call on resize. Opera debounces their resize by default.
605				$(window).resize(function () {
606					clearTimeout(debounce);
607					debounce = setTimeout(resizer, settings.debounceTimeout);
608				});
609
610				if (!settings.deferTilWindowLoad) {
611					// call it once, immediately.
612					resizer();
613				}
614
615				// Call again to set after window (frames, images, etc) loads.
616				$(window).on('load', function () {
617					resizer();
618				});
619
620			});
621
622		};
623		$('.v-align').flexVerticalCenter();
624
625	}); // Ready
626
627	$('.table-headdd').click(function(){
628		$(this).nextAll('.table-wrap').stop().slideUp();
629		$(this).nextAll('.table-wrap:first').stop().slideToggle(500);
630	})
631
632	// ADA
633	$(".tns-controls, .tns-controls button").removeAttr("tabindex");
634
635	function observeOwlItemsForActiveClass() {
636		function updateTabindex() {
637			$(".tns-item").each(function () {
638				if ($(this).hasClass("tns-slide-active")) {
639					$(this).find("a").attr("tabindex", "0");
640					$(this).find("a").attr("aria-hidden", "false");
641				} else {
642					$(this).find("a").attr("tabindex", "-1");
643					$(this).find("a").attr("aria-hidden", "true");
644				}
645			});
646		}
647
648		const observer = new MutationObserver(function (mutations) {
649			mutations.forEach(function (mutation) {
650				if (mutation.attributeName === "class") {
651					updateTabindex();
652				}
653			});
654		});
655
656		$(".tns-item").each(function () {
657			observer.observe(this, { attributes: true });
658		});
659
660		updateTabindex();
661	}
662
663	observeOwlItemsForActiveClass();
664
665	$(document).ready(function () {
666		function isZoomedInBeyond(threshold) {
667			const zoomLevel = window.innerWidth / window.outerWidth;
668			return zoomLevel < threshold;
669		}
670
671		function toggleAlertVisibility() {
672			const $alert = $('.alert');
673			const zoomThreshold = 0.25;
674			if (isZoomedInBeyond(zoomThreshold)) {
675				$alert.hide();
676			} else {
677				$alert.show();
678			}
679		}
680
681		toggleAlertVisibility();
682
683		$(window).on('resize', function () {
684			toggleAlertVisibility();
685		});
686	});
687
688	function moveSkipLink() {
689		if ($('.uwy').length) {
690			$('body').prepend($('#skip'));
691		} else {
692			setTimeout(moveSkipLink, 100);
693		}
694	}
695
696	$(document).ready(function () {
697		moveSkipLink();
698	});
699
700	function fixGoogleTranslateInputs() {
701		const inputs = [
702			{ id: 'goog-gt-votingInputSrcLang', label: 'Source Language Input' },
703			{ id: 'goog-gt-votingInputTrgLang', label: 'Target Language Input' },
704			{ id: 'goog-gt-votingInputSrcText', label: 'Source Text Input' },
705			{ id: 'goog-gt-votingInputTrgText', label: 'Target Text Input' },
706			{ id: 'goog-gt-votingInputVote', label: 'Vote Input' }
707		];
708	
709		inputs.forEach(item => {
710			const input = document.getElementById(item.id);
711			if (input) {
712				input.setAttribute('aria-label', item.label);
713			}
714		});
715	}
716	
717	const googleObserver = new MutationObserver((mutationsList, observer) => {
718		for (let mutation of mutationsList) {
719			if (mutation.type === 'childList') {
720				fixGoogleTranslateInputs();
721			}
722		}
723	});
724	
725	googleObserver.observe(document.body, { childList: true, subtree: true });
726		
727	fixGoogleTranslateInputs();
728
729	function updateModalTitle() {
730		const observer = new MutationObserver((mutationsList, observer) => {
731			mutationsList.forEach(mutation => {
732				if (mutation.type === 'childList') {
733					const modalTitle = document.getElementById('modal-event-title');
734					const modalSubtitle = document.getElementById('modal-event-subtitle');
735						
736					if (modalTitle && modalTitle.textContent.trim() === "") {
737						modalTitle.textContent = 'Modal Title';
738					}
739						
740					if (modalSubtitle && modalSubtitle.textContent.trim() === "") {
741						modalSubtitle.textContent = 'Modal Subtitle';
742					}
743				}
744			});
745		});
746			
747		observer.observe(document.body, { childList: true, subtree: true });
748	}
749	
750	updateModalTitle();
751
752	$(document).ready(function () {
753    function removeIfEmpty(selector) {
754        $(selector).each(function () {
755            if ($(this).text().trim() === '') {
756                $(this).remove();
757            }
758        });
759    }
760
761    removeIfEmpty('.footer-header');
762});
763
764function addTitleToIframe() {
765	var $iframe = $('#events iframe');
766	if ($iframe.length > 0) {
767		$iframe.attr('title', 'Event Calendar');
768		clearInterval(checkIframeInterval);
769	}
770}
771
772// Check every 500 milliseconds if the iframe is present
773var checkIframeInterval = setInterval(addTitleToIframe, 500);
774
775// ADA - Links with target blank will have sr div announcing this is the case
776$('a').each(function (index) {
777	if ($(this).attr('target') === "_blank" || $(this).attr("target") === "_new") {
778		$(this).append('<div class="sr-only">Opens in new window</div>');
779	}
780});
781
782// ADA, close menu on escape key (mobile nav)
783$(document).on("keydown", "#nav", function (e) {
784	if (e.keyCode === 27 && $("#nav").is(":visible") && $(window).width() < 992) {
785		$("#nav").slideUp();
786		$("#nav-toggle").removeClass("fa-close").addClass("fa-bars");
787		$("#nav-toggle").focus();
788	}
789});
790
791// ADA, close menu on escape key (desktop nav)
792$(document).on("keydown", "ul.menuUL.level1", function (e) {
793	if (e.keyCode === 27 && $("ul.menuUL.level1").is(":visible") && $(window).width() > 992) {
794		$("ul.menuUL.level1").slideUp();
795		$(this).focus();
796	}
797});
798
799if ($("#page-title").text().trim() === "") {
800	$("#page-title").remove();
801}
802
803})(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.