PageSourceSearch

https://cityofpt.us/sites/default/files/js/js_VPWGAex2EcGH9Pk-ansT2uBaglJlyCeVYHJtfqNFb9U.js

js cityofpt.us collected 2026-10-02 10:58:22 UTC 43,702 bytes, 1,096 lines download raw bytes

1(function($) {
2var mobileOpen = false;
3var mobileMenuOpen = false;
4	/* ADD NAVIGATION TOGGLE BUTTON FOR USE WITH MOBILE SCREEN WIDTHS */
5	$(function() {
6		
7		$('.mobile-nav-toggle').click(function() {
8			toggleMobileMenu();
9		});
10		/* if enter is pressed on the menu */
11		$('.mobile-nav-toggle').keydown(function(e) {
12			if (e.keyCode == 13) {
13				toggleMobileMenu();
14			}
15			/* Navigation through mobile menu - pressing tab and shift, return to last item */
16			if (e.keyCode == 9 && e.shiftKey && mobileOpen) {
17				e.preventDefault();
18				e.stopPropagation();
19				$('.lastMobileItem')[0].focus();
20			}
21		});
22
23		function toggleMobileMenu() {
24			var menu = $('.global-nav-mega-wrapper');
25			var button = $('.mobile-nav-toggle')
26			var timeoutHandle = null;
27			if (timeoutHandle) {
28				clearTimeout(timeoutHandle);
29				timeoutHandle = null;
30			}
31			/* check to see if jquery block is open and close it */
32			if ($('.mobile-subnav-toggle').hasClass('visible')) {
33				var subnavmenu = $('.block-jquerymenu');
34				subnavmenu.toggleClass('visible');
35				$('.mobile-subnav-toggle').toggleClass('visible');
36			}
37			/* if not open, open the mobile menu, timeoutHandle allows display:none to work */
38			if (!button.hasClass('openMobile')) {
39				mobileOpen = true;
40				button.toggleClass("openMobile");
41				timeoutHandle = setTimeout(function() {
42					menu.toggleClass('left-open').toggleClass('left-closed');
43				}, 1);
44				menu.toggleClass('visible');
45				$('.mega_link').each(function() {
46					$(this).toggleClass('mobileOpen');
47					$(this).toggleClass('aha-focus');
48				})
49			} 
50			/* close the menu */
51			else {
52				mobileOpen = false;
53				menu.toggleClass('left-open').toggleClass('left-closed');
54				timeoutHandle = setTimeout(function() {
55					button.toggleClass("openMobile");
56					menu.toggleClass('visible');
57					$('.mega_link').each(function() {
58						$(this).toggleClass('mobileOpen');
59						$(this).toggleClass('aha-focus');
60					})
61					/* 300 is the time set in css as well */
62				}, 300);
63
64			}
65			/* tell the user that the menu is expanded or collapsed */
66			if (document.activeElement.getAttribute("aria-expanded") == "true") {
67				document.activeElement.setAttribute("aria-expanded", "false");
68			} else {
69				document.activeElement.setAttribute("aria-expanded", "true");
70			}
71			/* if tabbing on list item, return to first item in mobile */
72			$('.lastMobileItem').keydown(function(e) {
73				if ((e.keyCode == 9) && (mobileOpen) && !e.shiftKey && !$(this).closest('li').hasClass('expanded')) {
74					e.preventDefault();
75					e.stopPropagation();
76					$('.mobile-nav-toggle')[0].focus();
77				}
78			})
79			
80
81			
82
83
84		}
85
86	});
87
88	/* Adding the correct tabindex to the entire header*/
89	$(function() {
90		$(".form-item-search-block-form #edit-search-block-form--2").attr({ "tabindex": "4" })
91		$("#edit-actions #edit-submit").attr({ "tabindex": "-1" })
92		$("#logo").attr({ "tabindex": "2" })
93		$(".element-invisible.element-focusable").attr({ "tabindex": "1" })
94		/* need to find the last item for mobile */
95		var length = $("li.mega_link > a").length;
96		$("li.mega_link > a").each(function(index) {
97			$(this).attr({ "tabindex": "5" });
98			if (index == length - 1) {
99				$(this).addClass("lastMobileItem")
100				$('li.mega_link div.hover_effect li a').last().addClass('lastMobileItem')
101			}
102		});
103		// var length = $("#block-menu-menu-header-links a").length;
104		$("#block-menu-menu-header-links a").each(function(index) {
105			$(this).attr({ "tabindex": "6" })
106			// if (index == length - 1) {
107			//     $(this).addClass("lastMobileItem")
108			// }   
109		})
110		/* Set the mega wrapper to closed */
111		$('.global-nav-mega-wrapper').addClass("left-closed")
112	});
113
114
115
116	/*MEGA MENU --- ADD SUB-MENU EXPAND/COLLASE FUNCTIONALITY FOR MOBILE SUB_MENU ITEMS */
117	$(function() {
118		$mobileFocus = null;
119		$('#top_level_mega.hover_effect > li div.hover_effect').each(function() {
120			$(this).before('<div title="Click to expand or collapse" class="nested-menu-item-toggle"></div>');
121		}); 
122		$('.page-outer').delegate('.mobileOpen',"keydown click",function(e){
123			$mobileFocus = $(this)
124			/* close on escape */
125			if(e.keyCode == 27) {
126				e.preventDefault();
127				$(document.activeElement).closest('li.mobileOpen').find('a')[0].focus();
128				clearOtherMobileMenu();
129			}
130			
131			/* if on one of the tabs then toggle menu for click and enter */
132			if(e.type == "click"  && !$(document.activeElement).closest('ul').hasClass('column')){
133				toggleMobileMenu();
134			}
135			else if(e.keyCode == 13 && !$(document.activeElement).closest('ul').hasClass('column')) {
136				toggleMobileMenu();
137			}
138		})
139
140		function toggleMobileMenu() {
141			if(!$mobileFocus.closest('li').hasClass('expanded')) {
142					  clearOtherMobileMenu()
143				}
144			$mobileFocus.toggleClass('expanded');
145			$mobileFocus.find('.hover_effect').toggle(); 
146			toggleAria();
147		}
148		function toggleAria() {
149			if ($mobileFocus.find('a')[0].getAttribute("aria-expanded") == "true") {
150				$mobileFocus.find('a')[0].setAttribute("aria-expanded", "false");
151			} else {
152				$mobileFocus.find('a')[0].setAttribute("aria-expanded", "true");
153			}
154		}
155		function clearOtherMobileMenu() {
156			if(document.getElementsByClassName("expanded")[0]){
157				document.getElementsByClassName("expanded")[0].getElementsByTagName('a')[0].setAttribute("aria-expanded", "false");
158				$(document.getElementsByClassName("expanded")[0].getElementsByClassName('hover_effect')[0]).toggle()
159				document.getElementsByClassName("expanded")[0].classList.remove("expanded");
160
161			}
162			
163		}
164		
165
166	});
167
168	/* Delay on the mega menu */
169	$(function() {
170		$('#block-views-mega-menu-node-block ul#top_level_mega li').hover(function() {
171			$(this).find('.mega_hover_wrapper').stop(true, true).delay(500).queue(function() {
172				$(this).addClass('show')
173			});
174		}, function () {
175			$(this).find('.mega_hover_wrapper').stop(true, true).delay(500).queue(function() {
176				$(this).removeClass('show')
177			});
178		});
179	});
180
181})(jQuery);;
182(function ($) {
183
184// $(function() {
185//       $('.block-jquerymenu ul.jquerymenu > li.parent').each(function() {
186//           if (!$(this).hasClass('active-trail')) {
187// 			  $(this).removeClass('open').addClass('closed');
188// 		  }
189//       });  
190// });
191
192// $(function() {
193//       $('.block-jquerymenu ul.jquerymenu > li.parent > span').each(function() {
194//           if (!$(this).hasClass('active-trail')) {
195// 			  $(this).removeClass('open').addClass('closed');
196// 		  }
197//       });  
198// });
199
200/* ADD SUBNAVIGATION TOGGLE BUTTON FOR USE WITH MOBILE SCREEN WIDTHS */
201$(function() {
202	if ($('.block-jquerymenu').length>0) {
203		$('.mobile-subnav-placeholder').addClass('mobile-subnav-toggle');
204	} 		   
205  $('.mobile-subnav-toggle').click(function() {
206    var subnavmenu = $('.block-jquerymenu');
207    subnavmenu.toggleClass('visible');
208	$('.mobile-subnav-toggle').toggleClass('visible');
209    return false;
210  });
211});
212
213} )( jQuery );
214;
215(function ($) {
216
217/* RANDOMIZE SITE BACKGROUND IMAGE Add .random class to html tag */
218$(function() { // onReady() 
219		if ((top.location.pathname === '/')){		/*only randomize the home page*/
220			/* Default numbers */
221			var dt = new Date();
222			var numRand = Math.floor((Math.random()*2)+1); 
223			var dayTime = '';
224			var season = '';
225			var seasonDayPhoto = '';  //These will be how many photo's are in each section
226			var seasonNightPhoto = '';
227
228			/* Find out what season it is */
229			/*var month = dt.getMonth() + 1; //starts at 0
230			
231			if ((month >= 3) && (month <= 5)){
232				season = 'sp'
233				seasonDayPhoto = 3;
234				seasonNightPhoto = 2;
235			}
236			else if ((month >= 6) && (month <= 8)){
237				season = 'su'
238				seasonDayPhoto = 3;
239				seasonNightPhoto = 2;
240			}
241			else if ((month >= 9) && (month <= 11)){
242				season = 'f'
243				seasonDayPhoto = 3;
244				seasonNightPhoto = 2;
245			}
246			else{
247				season = 'w'
248				seasonDayPhoto = 3;
249				seasonNightPhoto = 2;
250			}*/
251			
252			/* Find out if it's night or day */
253			/*if ((dt.getHours() > 6) && (dt.getHours() <= 18)){ 
254				numRand = Math.floor((Math.random()*seasonDayPhoto)+1); //this is here so the client can have a different number of day photos then night photos
255				dayTime = 'd';
256			}
257			else {
258				numRand = Math.floor((Math.random()*seasonNightPhoto)+1);
259				dayTime = 'n';
260			}*/
261			
262			var randomClass = 'random' + numRand + dayTime + season;
263			$('html').addClass(randomClass);
264		} else {
265			$('html').addClass('not-random');
266		}
267});
268
269} )( jQuery );;
270(function ($) {
271
272$(function() {
273	$('.page-search h1#page-title').text('Website Search Results');
274	$('.page-search #block-system-main h2:contains("Search results")').remove();  /*this removes extra unnecessary text from the search results page*/	
275});
276
277$(function () {
278	/*this handles the expand/collapse logic when clicking on the advanced search filter button*/ 
279	$('.block-facetapi').hide();
280    if(window.location.href.indexOf("im_field") > -1) {
281		$('#advancedsearch-button').toggleClass('expanded');
282		$('.block-facetapi').show();
283	}
284});
285
286$(function () {	
287	$('#aha-search-buttons .button.municipalcode span').click(function() {
288		var searchtext = document.querySelector('.search-form .form-item input').value;
289		//window.open('https://www.municode.com/library/search?stateId=9&clientId=2443&searchText=' + searchtext,'_blank');
290		document.location = "/municipalcode?keys=" + searchtext;
291	});
292})
293	
294$(function () {	
295	$('#aha-search-buttons .button.projects span').click(function() {
296		var searchtext = document.querySelector('.search-form .form-item input').value;
297		document.location = "/projects?keys=" + searchtext;
298	});
299});
300	
301$(function () {	
302	$('#aha-search-buttons .button.citycouncil-mtgs span').click(function() {
303		var searchtext = document.querySelector('.search-form .form-item input').value;
304		document.location = "/search/site/" + searchtext + "?f[0]=im_field_microsite%3A27&f[1]=im_field_event_type%3A14";
305	});
306});
307	
308$(function () {	
309	$('#aha-search-buttons .button.all-mtgs span').click(function() {
310		var searchtext = document.querySelector('.search-form .form-item input').value;
311		document.location = "/search/site/" + searchtext + "?f[0]=im_field_event_type%3A14";
312	});
313});
314	
315$(function () {	
316	$('#aha-search-buttons .button.departments span').click(function() {
317		var searchtext = document.querySelector('.search-form .form-item input').value;
318		document.location = "/search/site/" + searchtext + "?f[0]=im_field_microsite%3A20";
319	});
320});
321	
322$(function () {	
323	$('#aha-search-buttons .button.parks span').click(function() {
324		var searchtext = document.querySelector('.search-form .form-item input').value;
325		document.location = "/parksites?keys=" + searchtext;
326	});
327});
328	
329$(function () {	
330	$('#aha-search-buttons .button.bids-rfps span').click(function() {
331		var searchtext = document.querySelector('.search-form .form-item input').value;
332		document.location = "/rfps";
333	});
334});
335	
336$(function () {	
337	$('#aha-search-buttons .button.staff-directory span').click(function() {
338		var searchtext = document.querySelector('.search-form .form-item input').value;
339		document.location = "/directory?keys=" + searchtext;
340	});
341});
342
343$(function () {	
344	$('#aha-search-buttons .button.all-faqs span').click(function() {
345		var searchtext = document.querySelector('.search-form .form-item input').value;
346		document.location = "/faqs?keys=" + searchtext;
347	});
348});
349
350$(function () {	
351	window.onload = function() {
352		if($(window).width() > 1000) {
353			$('.region-content form.search-form').appendTo('#block-block-48');
354		} else {
355			$('#block-block-49').appendTo('.region-content form.search-form');
356			$('.block-facetapi').appendTo('.region-content form.search-form');
357		}
358	}
359});
360
361$(function () {	
362	var $filter = $('#block-block-49');
363	$('#block-block-49 .block-header').click(function() {
364		$filter.toggleClass('show');
365	});
366});
367
368})( jQuery );;
369/* Version: 1.0 -= 9/18/2017 */
370/* Version: 2.0 = 10/5/2017 -- Old style working with keyboard keys -- extra stuff for some blocks to  */
371(function($) {
372    /* Adding tab function for menu's -- will apply to class aha_focus*/
373    /* When adding .aha-focus to a website element, dont forget to add tabindex="0" as well*/
374
375    /* To add to Menu Setting to the mega menu, you need to go into _nav-global-nav-mega.scss and copy all lines with :hover and replace them with .focus-within. Be careful with ones that have two :hover, 
376        You will need to delete both but only add in one .focus-within. */
377    $(function() {
378        $(".front #block-views-calendar-block-2 .block-header h2").attr({ "class": "aha-focus", "aria-expanded": "false", "tabindex": "0", "role": "button" });
379        $(".front #block-views-calendar-block-2").addClass("aha-focus");
380        /* need to add tab index to all li tags that don't have a tags */
381        $('.aha-focus .hover_effect li').each(function() {
382            if ($(this).find('strong')[0]) {
383                $(this).attr({ "role": "separator" });
384            }
385            if (!$(this).find('a')[0] && $(this).find('strong')[0]) {
386                $(this).attr({ "tabindex": "5" });
387            }
388        });
389        /* add tabindex equal the mega menu tag index */
390        $('.aha-focus .hover_effect li a').each(function() {
391            $(this).attr({ "tabindex": "5" });
392        });
393        keyCode: {
394            ENTER = 13,
395            SPACE = 32,
396            LEFT = 37,
397            UP = 38,
398            RIGHT = 39,
399            DOWN = 40,
400            ESCAPE = 27,
401            TAB = 9
402        };
403        var $blockContent = null;
404        var $parentBlock = null;
405        /* Seems each block is different but it took 3 for brookhaven */
406        var $startingBlockPos = 2;
407        /* this is just used to keep track of the block pos */
408        var $blockPos = $startingBlockPos;
409        var $menuOpen = false;
410        $('#top_level_mega').delegate('.aha-focus','keydown', function(e) {
411            var $focused = $(document.activeElement);
412            if ($focused.is('h2')) {
413                $blockContent = $(document.activeElement.parentNode.parentNode.getElementsByClassName("block-content"));
414                $parentBlock = $(document.activeElement.parentNode.parentNode);
415            }
416            /* this is just for initial use to make sure they aren't blank*/
417            else if (!$blockContent) {
418                $blockContent = $focused;
419                $parentBlock = $focused;
420            }
421
422            /* add event that in case of click */
423            document.addEventListener("mousedown", handler, true);
424            /* If user presses the 'enter' key then it will add 'focus-within' class to current class */
425            if ( ( ( (e.keyCode == ENTER) || (e.keyCode == SPACE)) && $focused.parent().hasClass("aha-focus")) || 
426                ((e.keyCode == DOWN) && !($(this).hasClass("focus-within")) && !($parentBlock.hasClass("open")) && !$(this).hasClass('mobileOpen'))) {
427                e.preventDefault();
428                e.stopPropagation();
429                /* Check to see if we are on h2 block */
430
431                if ($blockContent != $focused && !($(this).is('li.aha-focus'))) {
432                    /* focus-within won't work here for no reason at all */
433                    $parentBlock.toggleClass("open");
434                    if (document.activeElement.getAttribute("aria-expanded") == "true") {
435                        document.activeElement.setAttribute("aria-expanded", "false");
436                    } else {
437                        document.activeElement.setAttribute("aria-expanded", "true");
438                    }
439
440                }
441                /* for menu or mega menu */
442                else {
443                    $(this).toggleClass("focus-within");
444                    if (document.activeElement.getAttribute("aria-expanded") == "true") {
445                        document.activeElement.setAttribute("aria-expanded", "false");
446                    } else {
447                        document.activeElement.setAttribute("aria-expanded", "true");
448                        $menuOpen = true;
449                    }
450                }
451
452
453
454                /* If the user presses enter and the main menu has a A tag under it, it will go to the a tag instead of opening the menu */
455                if ($(this).find('a')[0]) {
456                    if ((e.keyCode == ENTER) && ($(this).find('a')[0].hasAttribute("tabindex"))) {
457                        $(this).find('a:first')[0].click();
458                    }
459                }
460
461            }
462            /* key board keys within the menu */
463            /* now are treating tab the same as long as the menu is open */
464            else if (((e.keyCode == DOWN) || (e.keyCode == UP) || (e.keyCode == TAB)) && !$(this).hasClass('mobileOpen')) {
465                if(e.keyCode == TAB && !$menuOpen){
466                    /* if tab and the menu isn't open, then return and run the tab code */
467                   return;
468                }
469                e.preventDefault();
470                e.stopPropagation();
471                if ( (e.keyCode == DOWN) || ((e.keyCode == TAB && !e.shiftKey)) ) {
472                    /* if it's on the top level, focus the first a tag */
473                    if ($focused.parent().is('.aha-focus') && !$focused.is('h2')) {
474                        /* Go to the first column and then the first child */
475                        if ($(document.activeElement.parentElement.getElementsByClassName("column_1")[0].firstElementChild).find('a')[0]) {
476                            $(document.activeElement.parentElement.getElementsByClassName("column_1")[0].firstElementChild).find('a')[0].focus();
477                        } else {
478                            $(document.activeElement.parentElement.getElementsByClassName("column_1")[0].firstElementChild).focus()
479                        }
480                    } else if ($focused.is('h2') || $blockPos > $startingBlockPos) {
481                        $blockPos += 1;
482                        if ($parentBlock.find('a')[$blockPos]) {
483                            $parentBlock.find('a')[$blockPos].focus();
484                            /* might need to clear this later */
485
486                        } else {
487                            $parentBlock.find('h2')[0].focus();
488                            $blockPos = $startingBlockPos;
489                            clearFocus();
490                        }
491
492                    }
493                    /* not on top level */
494                    else {
495
496                        /* check to see if there is something next */
497                        if ($(document.activeElement).closest('li').next().find('a')[0]) {
498                            $(document.activeElement).closest('li').next().find('a')[0].focus();
499                        } else if ($(document.activeElement).closest('li').next()) {
500                            $(document.activeElement).closest('li').next().focus();
501                        } else {
502                            /* catch any error, this should never get run */
503                            $(document.activeElement).closest('.aha-focus').focus();
504                            clearFocus();
505                        }
506
507
508                        /* check and see if it was the same thing -- meaning it needs to go to the next column*/
509                        if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) {
510                            /* have to do two next because of the P tag */
511                            if ($(document.activeElement).closest('ul').next().next().children('li')[0]) {
512                                $(document.activeElement).closest('ul').next().next().children('li')[0].focus();
513                                /* check to see if the next column is just an a tag -- deosn't happen very often */
514                                if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) {
515                                    $(document.activeElement).closest('ul').next().next().find('a')[0].focus()
516                                }
517                            } else {
518                                $(document.activeElement).closest('.aha-focus').find('a')[0].focus();
519                                clearFocus();
520                            }
521                        }
522                    }
523
524
525
526                }
527                if ((e.keyCode == UP) || (e.keyCode == TAB && e.shiftKey) ) {
528                    /* if it's on the top level, focus the first a tag */
529                    if ($blockPos > $startingBlockPos) {
530                        $blockPos -= 1;
531                        if ($parentBlock.find('a')[$blockPos] && $blockPos > $startingBlockPos) {
532                            $parentBlock.find('a')[$blockPos].focus();
533                            /* might need to clear this later */
534
535                        } else {
536                            $parentBlock.find('h2')[0].focus();
537                            $blockPos = $startingBlockPos;
538                            clearFocus();
539                        }
540
541                    }
542                    /* not on top level */
543                    else {
544                        /* check to see if there is something prev */
545
546                        if ($(document.activeElement).closest('li').prev().find('a')[0]) {
547                            $(document.activeElement).closest('li').prev().find('a')[0].focus();
548                        } else if ($(document.activeElement).closest('li').prev()) {
549                            $(document.activeElement).closest('li').prev().focus();
550                        } else {
551                            /* catch any error, this should never get run */
552                            $(document.activeElement).closest('.aha-focus').find('a').focus();
553                            clearFocus();
554                        }
555
556
557                        /* check and see if it was the same thing -- meaning it needs to go to the prev column*/
558                        if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) {
559                            /* have to do two prev because of the P tag */
560                            if ($(document.activeElement).closest('ul').prev().prev().children('li').last()) {
561                                $(document.activeElement).closest('ul').prev().prev().children('li').last().focus();
562                                /* check to see if the prev column is just an a tag -- deosn't happen very often */
563                                if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) {
564                                    $(document.activeElement).closest('ul').prev().prev().find('a').last().focus()
565                                    /* checking to see if it's top level up arrow */
566                                    if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) {
567                                        $(document.activeElement).closest('.aha-focus').find('a')[0].focus();
568                                        clearFocus();
569                                    }
570                                }
571                            }
572                        }
573                    }
574
575                }
576            }
577            /* Left and Right keys */
578            if (e.keyCode == RIGHT && !$(this).hasClass('mobileOpen')) {
579                e.preventDefault();
580                e.stopPropagation();
581                if ($(this).next().find('a')) {
582                    $(this).next().find('a').focus()
583                }
584                clearFocus();
585            }
586            if (e.keyCode == LEFT && !$(this).hasClass('mobileOpen')) {
587                e.preventDefault();
588                e.stopPropagation();
589                if ($(this).prev().find('a')) {
590                    $(this).prev().find('a').focus()
591                }
592                clearFocus();
593            }
594
595
596
597            if (e.keyCode == TAB && e.shiftKey && $blockPos > $startingBlockPos) {
598                $blockPos -= 1;
599            } else if (e.keyCode == TAB && $blockPos > $startingBlockPos) {
600                $blockPos += 1;
601            }
602
603            /* if the user presses 'escape' then it will remove the focus-within class and focus back at the top */
604            else if (e.keyCode == ESCAPE) {
605                e.preventDefault();
606                e.stopPropagation();
607                /* check to see if you are in mobile, then if you are close the expanded menu */
608                if ($(document.activeElement).closest('.aha-focus').is('li')) {
609                    $(document.activeElement).closest('.aha-focus').find('a')[0].focus();
610                } else {
611                    $parentBlock.find('h2')[0].focus();
612                    $blockPos = 0;
613                }
614                clearFocus();
615
616            }
617            
618            /* if hovering, it clears focus-within */
619            $('ul#top_level_mega > li.aha-focus > a').hover(function() {
620                clearFocus();
621            });
622        });
623        /* Create event when the user clicks outside of focus it closes the menu */
624        function handler(e) {
625            if (!($(this).hasClass('open'))) {
626                clearFocus();
627                document.removeEventListener("click", handler, true);
628                $(this).focus();
629            }
630
631        }
632        /* Clear focus-within no matter the focus */
633        function clearFocus() {
634            if ($('.focus-within').length > 0) {
635                document.getElementsByClassName("focus-within")[0].getElementsByTagName('a')[0].setAttribute("aria-expanded", "false");
636                document.getElementsByClassName("focus-within")[0].classList.remove("focus-within");
637                $menuOpen = false;
638            }
639            /* For Blocks */
640            if ($('.open:not(.mobile-nav-toggle)').length > 0) {
641                document.getElementsByClassName("open")[0].setAttribute("aria-expanded", "false");
642                document.getElementsByClassName("open")[0].classList.remove("open");
643            }
644            /* clear because of block */
645            $blockContent = null;
646            $parentBlock = null;
647            $blockPos = $startingBlockPos;
648        }
649
650    });
651
652
653
654
655})(jQuery);;
656(function($) {
657
658	$(document).ready(function() {
659		/* this is where you add all the front blocks */
660		var $allBlocks = [
661			$(".front #block-views-news-block-2")
662		]
663
664		var $ifOpen = []
665		$.each($allBlocks, function(i,v) {
666			/* fill array with 0's to show that they are closed */
667			$ifOpen[i] = 0
668
669			addAttributes(v)
670
671			/* find the clickable area so the whole block doesn't open and close when clicked
672			-- this might not always be needed -- */
673			$h2 = v.find('h2')
674			$h2.click(function(){
675				checkOtherBlocks(i)
676			})
677			v.keydown(function(e) {
678				/* pressing enter key */
679				if ((e.keyCode == 13) && v.is(':focus')) {
680					checkOtherBlocks(i)
681				}
682				/* Pressing escape */
683				if (e.keyCode == 27 && $ifOpen[i] == 1) {
684					v.focus();
685					toggleBlock(v,i)
686				}
687			})
688
689		})
690
691		function addAttributes($block) {
692			$block.attr({"aria-expanded": "false", "tabindex": "0", "role": "button"})
693		}
694
695		function checkOtherBlocks($posistion) {
696			$.each($ifOpen, function(ii,vv) {
697				/* close all other blocks first */
698				if((vv == 1) && (ii != $posistion)) {
699					toggleBlock($allBlocks[ii],ii)
700				}
701				/* Toggle current block */
702				if(ii == $posistion) {
703					toggleBlock($allBlocks[ii],ii)
704				}
705			})
706		}
707
708		function toggleBlock($block,$posistion){
709			$ifOpen[$posistion] = 1 - $ifOpen[$posistion]
710			$content = $block.find('.block-content');
711			if (document.activeElement.getAttribute("aria-expanded") == "true") {
712				document.activeElement.setAttribute("aria-expanded", "false");
713
714			} else {
715				document.activeElement.setAttribute("aria-expanded", "true");
716
717			}
718			$content.slideToggle('slow')
719			/* This is for any image changes like + to - */
720			$block.toggleClass('open')
721
722		}
723
724	});
725
726
727
728
729})(jQuery);;
730(function($) {
731	$(window).load(function() {
732		if(document.getElementById('background').classList.contains('not-front')){
733			var $background = document.getElementById('html_background');
734			$($background).css({"height":"unset"}) //Overriding Google Translate
735			var $windowHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
736			var $curHeight = $background.offsetHeight;
737			if($windowHeight > $curHeight) {
738				var $curContainer = $('.container2-wrapper');
739				var $newContainer = $windowHeight - $curHeight + $curContainer.height();
740				$curContainer.css({'min-height':$newContainer - 1 + 'px'})
741			}
742		}
743		
744	});
745})(jQuery);;
746(function($) {
747	$(document).ready(function() {
748		$('.node').each(function() {
749			addTableStlye()
750		});
751		function addTableStlye() {
752			var $table = document.getElementsByTagName("table");
753			var $widthScreen = $( window ).width();
754			for (i = 0; i < $table.length; i++) {
755				$curTable = $(document.getElementsByTagName("table")[i])
756				if(!$curTable.hasClass('views-table') && !$curTable.parent().hasClass('table-responsive') ) {
757					var $widthTable = document.getElementsByTagName("table")[i].offsetWidth;
758					$curTable.wrap('<div class="table-responsive"></div>');
759					if($widthScreen < $widthTable && $widthScreen < 1000) {
760						$curTable.before('<div class="table-overlay"></div>')
761						$curTable.siblings('.table-overlay').css({
762							'height': $curTable.height() + 'px',
763							'width':$widthScreen + 'px'
764						});
765						$curTable.parent('.table-responsive').addClass('overlayed')
766					}	
767					
768				}
769				
770
771			}
772		}
773		
774	});
775	$(document).ready(function() {
776		$('.region-content').delegate('.table-responsive','touchmove click', function(e) {
777			if(!$(this).hasClass('clicked')){
778				var $this = $(this)
779				$this.addClass('clicked')
780				var timeoutHandle = null;
781				 if (timeoutHandle) {
782					clearTimeout(timeoutHandle);
783					timeoutHandle = null;
784				}
785				timeoutHandle = setTimeout(function() {
786					$this.find('.table-overlay').css({
787						"height": 0,
788						"width":0
789					})
790				}, 1100);
791			}
792		})
793	})
794
795})(jQuery);
796
797;
798(function ($) {
799$(function() {
800	/* add pausing to flexsliders */
801	 if ($('.flexslider').length > 0) {
802		$('.flexslider a').focus(function() {
803			$(this).closest('.flexslider').flexslider("pause");
804		})
805
806		/* have alerts tabindex second in line */
807		if($('#alerts_wrapper .flexslider').length > 0) {
808			$('#alerts_wrapper .flexslider a').attr("tabindex", "2");
809		}
810
811		var timeoutHandle = null;
812		/* Making sure focus isn't dorpped */
813		$('.flexslider_views_slideshow_main').delegate('.flex-nav-container',"keydown click touchstart",function(index){
814			index.stopPropagation();
815			if(index.type === "click" || index.type === "touchstart" || index.which == 39 || index.which == 37){
816				nextSlide($(this), $(index.target));
817			}
818			
819
820		});
821		function nextSlide(flexslider, targets) {
822			if (timeoutHandle) {
823		          clearTimeout(timeoutHandle);
824		          timeoutHandle = null;
825		        }
826				timeoutHandle = setTimeout(function() {
827					if(flexslider.find('.flex-active-slide a')[0]){
828						flexslider.find('.flex-active-slide a')[0].focus();
829					}
830					else {
831						targets.focus();
832					}
833		            
834		        }, 150);
835		}
836	}
837});
838
839} )( jQuery );
840;
841(function($) {
842	$(function() {
843		if($('.view-alerts')){
844			var alerts = $('.view-alerts');
845			var activeRow = []
846			$.each(alerts,function(key,value){
847				var rows = $(value).find('.views-row')
848				var numOfRows = rows.length
849				activeRow[key] = 0;
850				
851				//Add roles to each row
852				$.each(rows, function(key2,value2) {
853					value2.setAttribute('role','alert')
854				})
855
856
857				//Add active to the first one
858				rows[activeRow[key]].classList.add('active')
859				rows[activeRow[key]].getElementsByTagName("a")[0].tabIndex = 2
860
861				//Add multiple class
862				if(numOfRows > 1){
863					$(value).addClass('multiple')
864
865					//add click arrow key functionality 
866					var controls = $(value).find('.alert-controls')
867					controls.find('a').attr({'tabindex':'-1'})
868					controls.find('.alert-prev').click(function(){				
869						prevRow(rows,key, numOfRows);
870					})
871					controls.find('.alert-next').click(function(){				
872						nextRow(rows,key, numOfRows)
873					})
874					//Add keyboard functionality
875					$(value).keydown(function(e){
876						//left
877						if(e.keyCode == 37){
878							prevRow(rows,key, numOfRows)
879
880						}
881						//right
882						if(e.keyCode == 39) {
883							nextRow(rows,key, numOfRows)
884						}
885					})
886				}
887				
888			})
889			
890			
891		}
892		function prevRow(rows,key, numOfRows) {
893			rows[activeRow[key]].classList.remove('active')
894			activeRow[key] = activeRow[key] -1
895			if(activeRow[key] < 0) {
896				activeRow[key] = numOfRows - 1
897			}
898			rows[activeRow[key]].classList.add('active')
899			rows[activeRow[key]].getElementsByTagName('a')[0].focus()
900		}
901		function nextRow(rows, key, numOfRows) {
902
903			rows[activeRow[key]].classList.remove('active')
904			activeRow[key] = 1 + activeRow[key]
905			if(activeRow[key] >= numOfRows){
906				activeRow[key] = 0;
907			}
908			rows[activeRow[key]].classList.add('active')	
909			rows[activeRow[key]].getElementsByTagName('a')[0].focus()
910		}
911
912	})
913
914
915})(jQuery);;
916/**
917 * Use minwidth() to bind callbacks to changes of
918 * the window width or a minimum width at page load.
919 *
920 * Copyright by Eike Send, Edenspiekermann AG
921 *
922 * Licensed under the GPLv2 and the MIT license
923 *
924 */
925
926(function(win){
927  var getWindowWidth = function() {
928    // Get window width, code adapted from jQuery
929    if ('innerWidth' in win) {
930      return win.innerWidth;
931    } else {
932      var docwindowProp = doc.documentElement["clientWidth"];
933      return doc.compatMode === "CSS1Compat" && docwindowProp
934            || doc.body && doc.body["clientWidth"]
935            || docwindowProp;
936    }
937  }
938
939  var doc = win.document,
940      instances = [],
941      oldWidth = 0,
942      windowWidth = getWindowWidth();
943
944  var resizeCallback = function() {
945    windowWidth = getWindowWidth();
946    var i, instance;
947    for (i = 0; i < instances.length; i++) {
948      instance = instances[i];
949      // Check Forward:
950      if (instance.old < instance.wdt &&
951          windowWidth >= instance.wdt &&
952          instance.fwd) {
953        instance.fwd();
954      }
955      // Check Backward:
956      if (instance.old >= instance.wdt &&
957          windowWidth < instance.wdt &&
958          instance.bck) {
959        instance.bck();
960      }
961      instance.old = windowWidth;
962    }
963  }
964
965  if (win.addEventListener) {
966    win.addEventListener("resize", resizeCallback, false);
967  } else {
968    win.attachEvent("onresize", resizeCallback);
969  }
970
971  // This is the function that is exported into the global namespace
972  // The paramaters are:
973  // * the width at which the callbacks are called
974  // * the callback going from below to above the width, this is
975  //   initially called if the screen width is wider that "width"
976  // * the callback going back from above the width to below it
977  // * if the fourth paramater is passed as "true", the forward callback
978  //   is initally not called, but the backward callback is called
979  //   if the screenwidth is smaller than width.
980  win.minwidth = function(width, forwardCallback, backwardCallback, desktopFirst) {
981    instances.push({
982      wdt: width,
983      old: desktopFirst ? 1E9 : 0,
984      fwd: forwardCallback,
985      bck: backwardCallback
986    });
987    resizeCallback();
988  }
989
990})(this);
991
992;
993/**
994 * Use relocat() to move HTML elements in the DOM 
995 * above a certain window width.
996 * 
997 * Copyright by Eike Send, Edenspiekermann AG
998 * 
999 * Licensed under the GPLv2 and the MIT license
1000 *
1001 */
1002
1003relocate = function(width, elements, destinationElement, desktopFirst) {
1004  // ensure that we use an array-like argument, NodeList and HTMLCollection work as well
1005  if (elements.nodeName) elements = [elements];
1006  var placeHolders = [],
1007      els = [], 
1008      parentEl, el, i,
1009      l = elements.length;
1010  // first, create a non-live copy of the elements
1011  // this avoids nasty bugs when elements are removed and added again
1012  for (i = l-1; i >= 0; i--) {
1013    els.push(elements[i]);
1014  }
1015  var forwardFunction = function() {
1016    for (i = 0; i < l; i++) {
1017      parentEl = els[i].parentNode;
1018      if (placeHolders[i] === undefined) {
1019        placeHolders[i] = document.createElement("span");
1020        parentEl.insertBefore(placeHolders[i], els[i]);
1021      }
1022      el = parentEl.removeChild(els[i]);
1023      destinationElement.insertBefore(el, destinationElement.firstChild);
1024    }
1025  }
1026  var backwardFunction = function() {
1027    for (i = 0; i < l; i++) {
1028      parentEl = els[i].parentNode;
1029      el = parentEl.removeChild(els[i]);
1030      placeHolders[i].parentNode.insertBefore(el, placeHolders[i]);
1031    }
1032  }
1033  // then create a object that operates on it:
1034  if (!desktopFirst) {
1035    minwidth(width, forwardFunction, backwardFunction);
1036  } else {
1037    minwidth(width, backwardFunction, forwardFunction, desktopFirst);
1038  }
1039}
1040;
1041(function($) {
1042  /**
1043   * Relocate sidebar-second into sidebar first when the viewport gets narrow
1044   * Relocate search inside global-nav-mega in narrow viewports
1045   */
1046  $(document).ready(function() {
1047    var sidebarSecondBreakpoint = 1340;
1048
1049    var sidebarSecondBlock = $('.sidebar-second-wrapper')[0];
1050    var sidebarSecondCatcher = $('#sidebar-second-catcher')[0];
1051
1052    if (sidebarSecondBlock) {
1053      relocate(sidebarSecondBreakpoint, sidebarSecondBlock, sidebarSecondCatcher, true);
1054    }
1055  });
1056
1057  /**
1058   * Code to present focus outline only to keyboard users and not the rest
1059   * from https://hackernoon.com/removing-that-ugly-focus-ring-and-keeping-it-too-6c8727fefcd2
1060   */
1061  $(document).ready(function() {
1062    function handleFirstTab(e) {
1063      if (e.keyCode === 9) { // the "I am a keyboard user" key
1064        document.body.classList.add('user-is-tabbing');
1065        window.removeEventListener('keydown', handleFirstTab);
1066      }
1067    }
1068    window.addEventListener('keydown', handleFirstTab);
1069  });
1070
1071})( jQuery );
1072;
1073(function ($) {
1074
1075$(function () {	
1076	var facility = $("#edit-field-facility-und");
1077	$('.form-item.form-type-select.form-item-field-chetzemoka-park-und').hide();
1078	facility.change(function() {
1079		if (facility.val() == '1100') {
1080			$('.form-item.form-type-select.form-item-field-chetzemoka-park-und').show();
1081		}
1082		else {
1083			$('.form-item.form-type-select.form-item-field-chetzemoka-park-und').hide();
1084		}
1085
1086	});
1087});
1088
1089
1090} )( jQuery );;
1091/*! Respond.js v1.4.2: min/max-width media query polyfill
1092 * Copyright 2014 Scott Jehl
1093 * Licensed under MIT
1094 * http://j.mp/respondjs */
1095
1096!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b<t.length;b++){var c=t[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!p[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(w(c.styleSheet.rawCssText,e,f),p[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!s||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}x()};y(),c.update=y,c.getEmValue=u,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);;

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.