PageSourceSearch

https://baysidewi.gov/_assets_/js/scripts.js

js baysidewi.gov collected 2026-10-02 19:43:34 UTC 25,105 bytes, 805 lines download raw bytes

1/*-----------------------------------------------------------------------------------
2
3	Theme Name: Village of Bayside, WI
4	Front-end developer: Abir Hossain
5	Author Design: Matt Hicks
6	Author URI: https://www.revize.com/
7	Date: 04/30/2025
8
9-----------------------------------------------------------------------------------*/
10function RZRenderMini(elementList) {
11
12	$('#homepage .mini-calendar').css('display', 'block');
13
14	function hasEventClick() {
15		$('#homepage .day-has-event .fc-daygrid-day-top a').each(function(){
16			var parent = $(this).closest('.mini-calendar')
17			$(this).click(function(){
18				parent.find('.fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:first-child > button').css({'pointer-events':'all','opacity':'1'});
19				parent.find('.fc-toolbar.fc-header-toolbar .fc-toolbar-chunk>.fc-button-group').css('opacity', '0').css('pointer-events', 'none');
20			})
21		})
22	}
23
24	function eachEvent(){
25		hasEventClick()
26	}
27
28	eachEvent();
29	hasEventClick()
30
31	$('button.fc-dayGridMonth-button')
32	.add('#homepage .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk>.fc-button-group button')
33	.add('#homepage .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:first-child > button')
34	.on('click', function(){
35		eachEvent();
36	});
37
38	$('.fc-dayGridMonth-button').each(function(){
39		var parent = $(this).closest('.mini-calendar');
40		$(this).on('click', function(){
41			parent.find('.fc-toolbar.fc-header-toolbar .fc-toolbar-chunk>.fc-button-group')
42				.css({'opacity': '1', 'pointer-events': 'all'});
43			parent.find('.fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:first-child > button')
44				.css({'pointer-events':'none', 'opacity':'0'});
45			hasEventClick();
46		});
47	});
48
49
50	$('#homepage .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk>.fc-button-group .fc-today-button').each(function(){
51		var parent = $(this).closest('.mini-calendar');
52		$(this).on('click', function(){
53			parent.find('.fc-toolbar.fc-header-toolbar .fc-toolbar-chunk>.fc-button-group').css('opacity', '1');
54		});
55	});
56
57	
58
59	// $('#tabs-button').detach().appendTo('#tab-header').show();
60	// $('.events-buttons').detach().appendTo('.calendar-right');
61
62
63	$(document).ready(function () {
64		// tabs
65		$('#tabs-button .tab').click(function (e) {
66			$(window).trigger("resize");
67			var tabsIndex = $(this).index();
68			console.log(tabsIndex);
69			$('#tabs-button .tab').removeClass('active');
70			$(this).addClass('active');
71			$('.event-in .mini-events').removeClass('active');
72			$('.event-in .mini-events').hide();
73			$('.event-in .mini-events').eq(tabsIndex).addClass('active');
74			$('.event-in .mini-events').eq(tabsIndex).show();
75		});
76	});
77
78	// slider
79	$(document).ready(function () {
80		if (typeof tns !== "undefined" && !window.tnsInitialized) {
81			window.tnsInitialized = true; // Set a flag to prevent re-running
82	
83			$('.mini-events-list').each(function (i, el) {
84				var $el = $(el);
85				var tinyItemCount = $el.children().length;
86				tns({
87					loop: false,
88					container: el,
89					items: 4,
90					preventScrollOnTouch: 'force',
91					slideBy: "page",
92					speed: 600,
93					nav: false,
94					axis: 'vertical',
95					onInit: function () {
96						console.log('Tiny Slider initialized for:', el);
97					},
98					controlsText: ['<img src="_assets_/images/arrow_circle_left.png" alt="icon">', '<img src="_assets_/images/arrow_circle_right.png" alt="icon">'],
99				});
100			});
101		}
102		setTimeout(() => {
103			$('.event-in .mini-events').hide()
104		}, 1000);
105	});
106
107
108		$('.event ').on('click', function () {
109			setTimeout(() => {
110				if (($(window).innerHeight() + 100) <= $('#event-modal-dialog').innerHeight()) {
111				$('#event-modal').addClass('widder');
112			} else {
113				$('#event-modal').removeClass('widder');
114			}
115
116			$('#event-modal').modal('show');
117			}, 500);
118		});
119		$('#event-modal').on('scroll', function () {
120			const $this = $(this);
121			const scrollHeight = $this[0].scrollHeight;
122			const scrollTop = $this.scrollTop();
123			const innerHeight = $this.innerHeight();
124
125			if (scrollTop + innerHeight >= scrollHeight - 1) {
126				$this.addClass('scrolled-bottom');
127			} else {
128				$this.removeClass('scrolled-bottom');
129			}
130		});		
131
132}
133
134
135(function ($) {
136
137	'use strict';
138
139	var $window = $(window),
140		$body = $('body'),
141		$html = $('html'),
142		$rzBarWrap = $('#rz-bar-wrap'),
143		$rzBtnsContainer = $('.rz-btns-container');
144
145	// RZ Class + remove revize bar
146	if (typeof RZ !== "undefined") {
147		if (RZ.login) {
148			$body.addClass("user-logged-in");
149		} else {
150			$body.addClass("user-not-logged-in");
151		}
152	}
153
154	// needed for revize bar
155	$('[data-toggle="tooltip"]').tooltip({ trigger: "hover" })
156
157	//make menu Mega
158	$("#nav>li>ul").filter(function () {
159		return $(this).find('li').length >= 0
160	}).addClass("make-mage").parent().addClass("static");
161
162	$(window).on("scroll", function () {
163		if ($(window).scrollTop() > 0) {
164			$(".sticky-header").addClass("sticky-top");
165		} else {
166			//remove the background property so it comes transparent again (defined in your css)
167			$(".sticky-header").removeClass("sticky-top");
168		}
169	});
170
171
172	// Keyboard Navigation: Nav, flyout
173	var isClick = false;
174	$("#nav li a, #flyout  li a, a, button, .toggle, .toggle2").on('focusin', function (e) {
175		if (isClick === false) {
176			$(".focused").removeClass("focused");
177			$(e.currentTarget).parents("#nav li, #flyout li").addClass("focused");
178			$(".opened:not(.focused) ul:visible,.opened2:not(.focused) ul:visible").slideUp().parent().removeClass("opened opened2");
179		} else {
180			$(".focused").removeClass("focused");
181			isClick = false;
182		}
183	});
184
185	// for revize buttons container
186	$rzBtnsContainer.each(function () {
187		var $container = $(this);
188		if ($container.html().trim() != "") {
189			$container.closest(".has-edit-buttons").addClass('yes-has-edit-buttons');
190		}
191	});
192	$(".has-edit-buttons").not(".yes-has-edit-buttons").removeClass("has-edit-buttons");
193
194	// responsive views from revize bar 
195	var urlParams = new URLSearchParams(window.location.search); //get all parameters
196	var hidebar = urlParams.get('hidebar'); //extract the hidebar parameter - this will return NULL if hidebar isn't a parameter
197
198	if (hidebar) { //check if hidebar parameter is set to anything
199		$body.removeClass("user-logged-in").addClass("hide-edit-btns");
200	}
201
202	// prevent focused class changes on click - This way arrows wont pop when clicking nav links
203	$("#nav a,#flyout a").on('mousedown', function () {
204		isClick = true;
205	});
206
207	// Search Toggle
208	$('#search-toggle').on('click', function (e) {
209		$('#search').stop().slideToggle(200);
210		$(this).toggleClass('fa-search fa-close');
211	});
212	// $('#searchToggle').click(function () {
213	// 	$('#search form').slideToggle();
214	// 	$('img', this).attr('src', function (_,targetImg) {
215	// 		return (targetImg.indexOf('search') != -1) ? '_assets_/images/close.png' : '_assets_/images/search.png';
216	// 	})
217	// })
218
219
220	// Navigation Toggle
221	$("#info-toggle").on("click", function () {
222		$(".header-right").stop().slideToggle();
223		$(this).toggleClass("fa-bars fa-close");
224	});
225
226	// Menu Arrows and Toggles
227	$("#nav >li>ul,#flyout >li>ul").addClass('first-level');
228	$("#nav  li ul ul").addClass('second-level');
229	$("#nav>li:has(ul)").each(function () {
230		$('<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'));
231		$(this).find('ul:first').attr('aria-labelledby', 'dropdown-toggle-' + $(this).index());
232	});
233	$('#nav li ul>li:has(ul)').each(function (index) {
234		$('<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'));
235		$(this).find('ul:first').attr('aria-labelledby', 'sub-dropdown-toggle-' + index);
236	});
237	$('#flyout >li:has(ul)').each(function () {
238		$('<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'));
239		$(this).find('ul:first').attr('aria-labelledby', 'flyout-dropdown-toggle-' + $(this).index());
240	});
241
242	function addNavClass() {
243		if ($window.width() < 992) {
244			// Insert needed for mobile
245		} else {
246			// Insert needed for desktop
247			$('#nav ul, #flyout ul').css('display', '');
248		}
249	}
250	addNavClass();
251	$window.resize(addNavClass);
252
253	$(".toggle").on("click keydown", function (e) {
254		if (e.keyCode === 13 || e.type === 'click') {
255			e.preventDefault();
256			var $parent = $(this).parent();
257			var $parentLi = $parent.parent();
258			$parent.toggleClass('opened');
259			if ($parent.addClass('active') && $(this).next('.first-level').is(":visible")) {
260				$(this).next('.first-level').slideUp();
261				$parent.removeClass('active');
262				$(this).attr({ 'aria-expanded': 'false' });
263			} else {
264				$(this).attr({ 'aria-expanded': 'true' });
265				$(".first-level").slideUp("slow");
266				$parent.addClass('active');
267				$(this).next('.first-level').slideToggle();
268			}
269		}
270	});
271	$(".toggle2").on("click keydown", function (e) {
272		if (e.keyCode === 13 || e.type === 'click') {
273			e.preventDefault();
274			var $parent = $(this).parent();
275			var $parentLi = $parent.parent();
276			$parent.toggleClass('opened2');
277			if ($parent.addClass('active') && $(this).next('.second-level').is(":visible")) {
278				$(this).next('.second-level').slideUp();
279				$parent.removeClass('active');
280				$(this).attr({ 'aria-expanded': 'false' });
281			} else {
282				$(this).attr({ 'aria-expanded': 'true' });
283				$(".second-level").slideUp("slow");
284				$parent.addClass('active');
285				$(this).next('.second-level').slideToggle();
286			}
287		}
288	});
289
290	function scrollNavigationWrap() {
291		if ($window.width() < 992) {
292			// Insert needed for mobile
293			$('#nav>li').each(function(){
294				$('ul.first-level>.mega-scroll>li',this).unwrap();
295				$('.first-level').css('max-height','' )
296			})
297			
298		} else{
299			// Insert needed for desktop
300			var megaMenuHeight = (window.innerHeight - $('.site-header').height())-50
301			$('.first-level').css('max-height',megaMenuHeight )
302
303			$('#nav>li').each(function(){
304				$('ul.first-level>li',this).wrapAll('<div class="mega-scroll"></div>');
305			})
306	
307		}
308	}
309	scrollNavigationWrap();
310	$window.resize(scrollNavigationWrap);
311
312	// close nav if left
313	$(".desktop *").focus(function (e) {
314		var $opened = $(".opened");
315		var $opened2 = $(".opened2");
316		if ($opened.length > 0 || $opened2.length > 0) {
317			if ($(".opened :focus").length < 1) {
318				$opened.children("ul").slideUp();
319				$opened.removeClass("opened");
320				$(".opened2").removeClass("opened2");
321			}
322			if ($(".opened2 :focus").length < 1) {
323				$opened2.children("ul").slideUp();
324				$opened2.removeClass("opened2");
325			}
326		}
327	});
328
329	// Flyout
330	var flyout = $('#flyout'),
331		flyoutwrap = $('#flyout-wrap');
332
333	if (flyout.text().length) {
334		flyoutwrap.prepend('<div id="flyout-toggle" class="d-lg-none"><i class="fa fa-bars"></i> Sub Menu</div>');
335	}
336
337	$("#flyout-toggle").on("click", function () {
338		flyout.slideToggle();
339		$(this).toggleClass("active");
340	});
341
342	/*
343	* E-Notify Auto submit
344	*/
345	$.urlParam = function (n) { var e = new RegExp("[?&]" + n + "=([^]*)").exec(window.location.href); return null == e ? null : e[1] || 0 };
346	var $enotify = $('iframe[src*="/revize/plugins/notify/notify.jsp"]');
347	if ($enotify.length > 0) {
348		var emailStr = $.urlParam("email");
349		if (emailStr != null) {
350			$enotify.attr("src", $enotify.attr("src") + "&email=" + emailStr);
351		}
352	}
353
354	// Make sure all calendars have unique ids
355	$('iframe[name="calendar"]').each(function (index, calendar) {
356		calendar.id = 'calendar-' + index;
357	});
358
359	// Start Frame Resizer
360	function resizeIframe(height, frameElement) {
361		if (frameElement) {
362			frameElement.height = "";
363			frameElement.height = height;
364		}
365	}
366
367	var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
368	var eventHandler = window[eventMethod];
369	var messageEvent = eventMethod === "attachEvent" ? "onmessage" : "message";
370	eventHandler(messageEvent, function (e) {
371		if (Array.isArray(e.data)) {
372			if (e.data[0] === "setCalHeight" || e.data[0] === "setNotifyHeight") {
373				var frames = document.querySelectorAll('iframe');
374				for (var i = 0; i < frames.length; i++) {
375					if (frames[i].contentWindow === e.source) {
376						resizeIframe(e.data[1], frames[i]);
377					}
378				}
379			}
380		}
381	});
382	// End Frame Resizer
383
384	// Alert Close Caching
385	if ($("div.alert").length) {
386		var hide = window.sessionStorage && parseInt(window.sessionStorage.getItem("alertClosed")) > 1;
387		if (!hide || $(".user-logged-in").length != 0) {
388			$("div.alert").addClass('show');
389		}
390		$("div.alert .close-alert").on('click', function (e) {
391			if (window.sessionStorage) {
392				window.sessionStorage.setItem("alertClosed", parseInt(window.sessionStorage.getItem("alertClosed") || 0) + 1);
393			}
394		});
395	}
396
397
398	// revizeWeather
399	if( typeof $.fn.revizeWeather !== "undefined" ){
400		$.fn.revizeWeather({
401			zip: '53217',
402			city_name: '',
403			unit: 'f',
404			success: function(weather) {
405				var date = new Date();
406				date = (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear();
407				var html = '<i class="'+weather.icon+'"></i>';
408				html += '<span id="weather-date">'+date+'</span> <span class="forecast">'+''+weather.temp+'&deg; '+'<span class="forecast-details"> F</span>'+'</span>';
409
410				$("#weather").html(html);
411			},
412			error: function(error) {
413				// better to just hide the secion if there is an error
414				$('.weather').hide();
415				console.log(error);
416			}
417		});
418	}
419
420	// Tabs
421	$('#tabs li a').on('click keypress', function (e) {
422		if (e.keyCode === 13 || e.type === 'click') {
423			$('#tabs li, #tabs-content .current').removeClass('current').removeClass('fadeInLeft');
424			$(this).parent().addClass('current');
425
426			var currentTab = $(this).attr('href');
427
428			e.preventDefault();
429			$(currentTab).addClass('current animated fadeInLeft');
430			$(currentTab).find('h2').focus();
431		}
432	});
433
434	$('#translator-toggle').on('keydown click', function(e){
435		if (e.keyCode === 13 || e.type === 'click') {
436			$('#translation').stop().fadeToggle();
437		}
438	});
439
440	$('#translation').not('#translation-links ul').on('mouseleave',function(){
441		$(this).fadeOut();
442	});
443
444	var $translateButton = $('#translate-button');
445	$translateButton.on('keydown click', function(e){
446		if (e.keyCode === 13 || e.type === 'click') {
447			$('#translation-links ul').stop().fadeToggle();
448			$translateButton.attr('aria-expanded', !('true' === $translateButton.attr('aria-expanded')));
449		}
450	});
451
452	$('#translation-links ul').on('mouseleave',function(){
453		$(this).fadeOut();
454		$translateButton.attr('aria-expanded', false);
455	});
456
457	function removeCookieString(value, domain) {
458		domain = domain ? 'domain='+domain+'; ' : '';
459		return value+'; expires=Thu, 01 Jan 1970 00:00:01 GMT; '+domain+'path=/';
460	}
461
462	function unsetGoogtransCookie() {
463		for (var domains = window.location.hostname.split('.'); domains.length >= 2; domains.shift()) {
464			var cookieString = removeCookieString('googtrans=unset', domains.join('.'));
465			document.cookie=cookieString;
466			if	(domains.length === 2) {
467				cookieString = removeCookieString('googtrans=unset', '.'+domains.join('.'));
468				document.cookie=cookieString;
469			}
470		}
471		document.cookie=removeCookieString('googtrans=unset');
472	}
473
474	if (document.cookie.split(';').some(function(item) { return item.trim().startsWith('googtrans=/auto/en'); })) {
475		unsetGoogtransCookie();
476	}
477
478
479
480	 // Translate Script
481	var translateURL =
482	"//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit";
483	$.getScript(translateURL);
484	$('#translation-links a,.quick-language a').click(function() {
485		var lang = $(this).data('lang');
486		var $frame = $('iframe.skiptranslate');
487		if (lang === 'English') {
488			$frame.contents().find('span.text:contains("English")').parent().parent().get(0).click();
489		return false;
490		}
491		if (!$frame.length) {
492			return false;
493		}
494		var $el = $frame.contents().find('span.text:contains(' + lang +')').parent().parent().get(0);
495			console.log($el);
496		if (!$el) {
497			$frame.contents().find('span.text:contains("English")').parent().parent().get(0).click();
498		}
499		$el.click();
500		return false;
501	});
502
503	// Tiny Slider
504	if (typeof tns !== "undefined") {
505		$('.tiny-slider').each(function (i, el) {
506			tns({
507				autoplay: true,
508				autoplayTimeout: 8000,
509				container: el,
510				items: 1,
511				lazyload: true,
512				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
513				mode: "gallery",
514				preventScrollOnTouch: 'force',
515				autoplayButtonOutput: false,
516				controlsText: ['<i class="fa fa-angle-left" aria-hidden="true"></i>', '<i class="fa fa-angle-right" aria-hidden="true"></i>']
517			});
518		});
519
520		$('#report .tiny-carousel').each(function (i, el) {
521			var $el = $(el);
522			var tinyItemCount = $el.children().length;
523			var tinyItemData = $el.data('tinyItems') ? $el.data('tinyItems') : 6;
524			tns({
525				container: el,
526				items: Math.min(tinyItemCount, tinyItemData),
527				lazyload: true,
528				lazyloadSelector: '.tns-lazy-img', // accompanied with data src or data-style
529				preventScrollOnTouch: 'force',
530				controlsText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
531				nav:false,
532				items: 1,
533				controlsContainer: '#report .carousel-controls',
534				loop:false
535			});
536		});
537	}
538
539	// Responsive Tables
540	$('.post table:not(.layout-table):not(.not-responsive)').wrap('<div class="table-responsive"></div>');
541	$('.layout-table').attr('role', 'presentation');
542
543	// Preloader
544	$(document).ready(function() {
545		if($window.width() > 991 && $('body').attr('id') == 'homepage'){
546			var screenWidth = $('.container').width();
547			var screenHeight = $(window).height();
548			var topValue = (screenHeight - $('#logo').outerHeight()) / 2;
549			var leftValue = (screenWidth - $('#logo').outerWidth()) / 2;
550
551			$('#logo').css({
552				'left': leftValue,
553				'top': topValue,
554			});
555
556			setTimeout(function() {
557				$('#logo').css('transition', 'all 1s');
558			}, 100);
559
560			setTimeout(function() {
561				$('body').addClass('loaded');
562			}, 1500);
563		}
564	});
565
566	$window.ready(function () {
567
568		$(window).on('load resize', function () {
569			if ($(window).width() > 991) {
570				$('#nav>.divider').remove();
571				$('#nav>li:not(:last-child)').after('<div class="divider"></div>')
572			}
573			
574		})
575
576		// Video for slider
577		if ($('body').attr('id') == 'homepage') {
578			$("#sliderVideo").YTPlayer();
579			$('#wrapper_sliderVideo').css('z-index', '1')
580		}
581
582		// hide hero slider control when video will be play
583		var interval = setInterval(hideControl, 1000);
584		function hideControl() {
585			var videoId = document.getElementById('wrapper_sliderVideo');
586			if (videoId) {
587				if (videoId.style.opacity == '1') {
588					clearInterval(interval);
589					$('#slider .tns-controls,#slider .tns-nav').hide();
590				} else {
591					$('#slider .tns-controls,#slider .tns-nav').show();
592				}
593			}
594		}
595
596
597	
598	
599
600		// full page
601		if ($(window).width() > 991 && $('body').attr('id') == 'homepage') {
602			if (typeof $.fn.fullpage !== "undefined") {
603				$('#main').fullpage({
604					anchors: ['section1', 'section2', 'section3', 'section4', 'section5', 'section6', 'section7'],
605					menu: '#ftabs',
606					scrollingSpeed: 800,
607					loopBottom: false,
608					keyboardScrolling: false,
609					recordHistory: false,
610					onLeave: function (origin) {
611						if (origin === 1) {
612							$('#slider').addClass('no_view');
613						}
614					},
615					afterLoad: function (destination) {
616						if (destination === 'section1') {
617							$('#slider').removeClass('no_view');
618						}
619					},
620					afterRender: function() {
621						$('#translation-links ul').on('mouseenter', function() {
622							$.fn.fullpage.setAllowScrolling(false);
623						});
624				
625						$('#translation-links ul').on('mouseleave', function() {
626							$.fn.fullpage.setAllowScrolling(true);
627						});
628						
629						const observer = new MutationObserver(function (mutations) {
630							
631						mutations.forEach(function () {
632						if ($('body').hasClass('modal-open')) {
633							$.fn.fullpage.setAllowScrolling(false);
634						} else {
635							$.fn.fullpage.setAllowScrolling(true);
636						}
637						});
638					});
639
640					observer.observe(document.body, {
641						attributes: true,
642						attributeFilter: ['class']
643					});
644
645					}
646					
647				});
648
649			};
650		} else {
651			// Destroy Fullpage js
652			if ($('html').hasClass('fp-enabled')) {
653				$.fn.fullpage.destroy('all');
654			}
655		}
656
657		$(window).on('load resize', function () {
658			if ($(window).width() < 1368) {
659				$('#ftabs-wrap').toggleClass('smallBar')
660			}
661			if ($(window).width() > 991) {
662				var reportCardsHeight = ($('#report .col-lg-7').outerHeight()+32)/2;
663				$('.report-card-item').css('min-height',reportCardsHeight)
664				$('#report .report-left .report-card').css('min-height', ($('#report .col-lg-5').height()) - 88);
665			
666				var connectCardsHeight = ($('#connect .col-lg-6').outerHeight())/2;
667				$('.connect-card-item').css('min-height',connectCardsHeight + 16)
668			}
669
670
671			if ($(window).width() < 992) {
672				$('#social-media-links').detach().appendTo('.header-top')
673				$('.translation-in').detach().appendTo('.header-top')
674			}
675		})
676
677		$('#ftabs li').each(function () {
678			if (!$(this).attr('data-menuanchor')) {
679				$('a', this).addClass('flink');
680			}
681		});
682
683		
684		// tiles
685		document.querySelectorAll('.tile-box').forEach(tileBox => {
686			// Select the first element with the class 'tile-title' inside tileBox
687			const thisTitle = tileBox.querySelector('.tile-title').cloneNode(true); 
688			if (thisTitle) {
689				tileBox.appendChild(thisTitle);
690			}
691		});
692
693		// match height
694		['.connect-left .connect-card,.report-right .report-card,.tile-box'].forEach(function(selector) {
695			if ($(selector).length) {
696				$(selector).matchHeight();
697			}
698		});
699
700		$('.tile-box').matchHeight({byRow:false})
701
702		$('#freeform .sidebar h2').each(function () {
703			if ($(this).length === 0 || $(this).is(':empty')) {
704				$(this).closest('.box').hide();
705			}
706		});
707		
708
709		//#Smooth Scrolling
710		$('a[href*="#"]').not('[href="#"]').not('[href*="#collapse"]').not('.faq-header').click(function (event) {
711			if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
712				var target = $(this.hash);
713				target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
714				if (target.length) {
715					event.preventDefault();
716					$('html,body').animate({
717						scrollTop: target.offset().top
718					}, 1000, function () {
719						var $target = $(target);
720						$target.focus();
721						if ($target.is(":focus")) {
722							return false;
723						} else {
724							$target.attr('tabindex', '-1');
725							$target.focus();
726							$target.removeAttr('tabindex');
727						};
728					});
729				}
730			}
731		});
732
733	}); // Ready
734
735})(jQuery);
736// $('body').addClass('user-logged-in')
737if (!$('body').hasClass('user-logged-in')) {
738	$('.rz-btns-container').css({
739		'pointer-events': 'none',
740		'display': 'none'
741	})
742}
743
744/* Calendar V2 Placeholder Data --- Delete this chunk after enabling 
745window.scriptToPromise = new Proxy(window.scriptToPromise, {
746	apply: async function (func, ref, args) {
747		args.push("//development.revize.com");
748		return await func.apply(ref, args);
749	}
750});
751if (typeof RZ === 'undefined') {
752	RZ = { webspace: "localdev" };
753} else {
754	if (window.location.host.indexOf("development") < 0) {
755		var warn = document.createElement("div");
756		warn.style = "position:fixed;top:0;left:0;right:0;text-align:center;padding:15px;background:red;color:white;z-index:100000";
757		warn.innerText = "Calendar V2 Placeholder data is in effect. Please delete the section and clear your cache!";
758		document.body.appendChild(warn);
759	}
760}
761window.revizeCalendar.importData = [{
762	parser: function () {
763		var randEvs = [];
764		var rules = { events: 10, allDay: 2, days: [-2, -1, 0, 1, 2, 3], maxFuture: 12, multipleDays: 2 };
765		for (var i = 0; i < rules.events; i++) {
766			var start = new Date();
767			start.setMinutes(start.getMinutes() + (Math.random() * 60 * 8));
768			if (rules.hasOwnProperty("days") && i < rules.days.length) {
769				start.setMinutes(start.getMinutes() + (rules.days[i] * 60 * 24));
770			} else if (rules.hasOwnProperty("maxFuture")) {
771				start.setMinutes(start.getMinutes() + (Math.random() * rules.maxFuture * 60 * 24));
772			}
773
774			var end = new Date(start);
775			if (rules.hasOwnProperty("days") && i < rules.multipleDays) {
776				end.setMinutes(end.getMinutes() + (Math.random() * 60 * 24 * 3));
777			} else {
778				end.setMinutes(end.getMinutes() + (Math.random() * 60 * 4));
779			}
780
781			var title = "";
782			for (var p = 0; p < 5 + (Math.floor(Math.random() * 8)); p++) {
783				var piece = Math.random().toString(36).slice(2);
784				piece = piece.slice(Math.floor(Math.random() * (piece.length - 4)));
785				title += piece;
786				if (Math.random() * 2 > 1) {
787					title += " ";
788				}
789			}
790
791			var ev = {
792				title: title,
793				start: start.toISOString(),
794				end: end.toISOString(),
795				calendar_displays: [1],
796				image: "",
797			}
798			ev.color = window.revizeCalendar.fns.getEventColor(ev);
799
800			randEvs.push(ev);
801		}
802		return randEvs;
803	}
804}];
805/* End Calendar V2 Placeholder Data --- Delete this chunk after enabling */

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.