https://www.westlakegov.com/sites/default/files/js/js_KxY1VMpP_7RDXW3eGhF6ZfmtosPV7dKh5ZqVPenkm3k.js
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/*global jQuery */ 216/*! 217* FitText.js 1.2 218* 219* Copyright 2011, Dave Rupert http://daverupert.com 220* Released under the WTFPL license 221* http://sam.zoy.org/wtfpl/ 222* 223* Date: Thu May 05 14:23:00 2011 -0600 224*/ 225 226(function( $ ){ 227 228 $.fn.fitText = function( kompressor, options ) { 229 230 // Setup options 231 var compressor = kompressor || 1, 232 settings = $.extend({ 233 'minFontSize' : Number.NEGATIVE_INFINITY, 234 'maxFontSize' : Number.POSITIVE_INFINITY 235 }, options); 236 237 return this.each(function(){ 238 239 // Store the object 240 var $this = $(this); 241 242 // Resizer() resizes items based on the object width divided by the compressor * 10 243 var resizer = function () { 244 $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize))); 245 }; 246 247 // Call once to set. 248 resizer(); 249 250 // Call on resize. Opera debounces their resize by default. 251 $(window).bind('resize.fittext orientationchange.fittext', resizer); 252 253 }); 254 255 }; 256 257})( jQuery ); 258 259(function($) { 260 $(document).ready(function() { 261 $('#block-block-13 .microsite_name a').fitText(0.9, {maxFontSize: '40px'}); 262 }); 263 264})( jQuery ); 265; 266(function ($) { 267 268/* RANDOMIZE SITE BACKGROUND IMAGE Add .random class to html tag */ 269$(function() { // onReady() 270 if ((top.location.pathname === '/')){ /*only randomize the home page*/ 271 /* Default numbers */ 272 var dt = new Date(); 273 var numRand = Math.floor((Math.random()*2)+1); 274 var dayTime = ''; 275 var season = ''; 276 277 278 /* Find out what season it is */
279 /*var month = dt.getMonth() + 1; //starts at 0 280 var seasonDayPhoto; //These will be how many photo's are in each section 281 var seasonNightPhoto; 282 if ((month >= 3) && (month <= 5)){ 283 season = 'sp' 284 seasonDayPhoto = 3; 285 seasonNightPhoto = 2; 286 } 287 else if ((month >= 6) && (month <= 8)){ 288 season = 'su' 289 seasonDayPhoto = 3; 290 seasonNightPhoto = 2; 291 } 292 else if ((month >= 9) && (month <= 11)){ 293 season = 'f' 294 seasonDayPhoto = 3; 295 seasonNightPhoto = 2; 296 } 297 else{ 298 season = 'w' 299 seasonDayPhoto = 3; 300 seasonNightPhoto = 2; 301 }*/ 302 303 /* Find out if it's night or day */ 304 /*if ((dt.getHours() > 6) || (dt.getHours() <= 18)){ 305 numRand = Math.floor((Math.random()*seasonDayPhoto)+1); //this is here so the client can have a different number of day photos then night photos 306 dayTime = 'd'; 307 } 308 else { 309 numRand = Math.floor((Math.random()*seasonNightPhto)+1); 310 dayTime = 'n'; 311 }*/ 312 313 var randomClass = 'random' + numRand + dayTime + season; 314 $('html').addClass(randomClass); 315 } else { 316 $('html').addClass('not-random'); 317 } 318}); 319 320} )( jQuery );; 321(function ($) { 322 323$(function() { 324 $('.page-search h1#page-title').text('Website Search Results'); 325 $('.page-search #block-system-main h2:contains("Search results")').remove(); /*this removes extra unnecessary text from the search results page*/ 326}); 327 328$(function () { 329 $('.region-content form.search-form').appendTo('#block-block-48'); 330}); 331 332$(function () { 333 /*this handles the expand/collapse logic when clicking on the advanced search filter button*/ 334 $('.block-facetapi').hide(); 335 if(window.location.href.indexOf("im_field") > -1) { 336 $('#advancedsearch-button').toggleClass('expanded'); 337 $('.block-facetapi').show(); 338 } 339}); 340 341$(function () { 342 $('#aha-search-buttons .button.municipalcode span').click(function() { 343 var searchtext = document.querySelector('.search-form .form-item input').value; 344 //window.open('https://www.municode.com/library/search?stateId=9&clientId=2443&searchText=' + searchtext,'_blank'); 345 document.location = "/municipalcode?keys=" + searchtext; 346 }); 347}) 348 349$(function () { 350 $('#aha-search-buttons .button.projects span').click(function() { 351 var searchtext = document.querySelector('.search-form .form-item input').value; 352 document.location = "/projects?keys=" + searchtext; 353 }); 354}); 355 356$(function () { 357 $('#aha-search-buttons .button.citycouncil-mtgs span').click(function() { 358 var searchtext = document.querySelector('.search-form .form-item input').value; 359 document.location = "/search/site/" + searchtext + "?f[0]=im_field_microsite%3A27&f[1]=im_field_event_type%3A14"; 360 }); 361}); 362 363$(function () { 364 $('#aha-search-buttons .button.all-mtgs span').click(function() { 365 var searchtext = document.querySelector('.search-form .form-item input').value; 366 document.location = "/search/site/" + searchtext + "?f[0]=im_field_event_type%3A14"; 367 }); 368}); 369 370$(function () { 371 $('#aha-search-buttons .button.departments span').click(function() { 372 var searchtext = document.querySelector('.search-form .form-item input').value; 373 document.location = "/search/site/" + searchtext + "?f[0]=im_field_microsite%3A20"; 374 }); 375}); 376 377$(function () { 378 $('#aha-search-buttons .button.parks span').click(function() { 379 var searchtext = document.querySelector('.search-form .form-item input').value; 380 document.location = "/parksites?keys=" + searchtext; 381 }); 382}); 383 384$(function () { 385 $('#aha-search-buttons .button.bids-rfps span').click(function() { 386 var searchtext = document.querySelector('.search-form .form-item input').value; 387 document.location = "/rfps"; 388 }); 389}); 390 391$(function () { 392 $('#aha-search-buttons .button.staff-directory span').click(function() { 393 var searchtext = document.querySelector('.search-form .form-item input').value; 394 document.location = "/directory?keys=" + searchtext; 395 }); 396}); 397 398})( jQuery );; 399(function($) { 400 /** 401 * 402 * Adds toogle function to latest news header in homepage 403 * 404 */ 405 $(document).ready(function() { 406 // Only run in the homepage 407 if ($('body.front')) { 408 var latestBlock = $('#block-block-47'); 409 var latestHeader = $('#block-block-47 .block-header h2'); 410 411 latestHeader.click(function() { 412 latestBlock.toggleClass('open'); 413 }) 414 } 415 });
416 417})( jQuery );; 418/* Version: 1.0 -= 9/18/2017 */ 419/* Version: 2.0 = 10/5/2017 -- Old style working with keyboard keys -- extra stuff for some blocks to */ 420(function($) { 421 /* Adding tab function for menu's -- will apply to class aha_focus*/ 422 /* When adding .aha-focus to a website element, dont forget to add tabindex="0" as well*/ 423 424 /* 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, 425 You will need to delete both but only add in one .focus-within. */ 426 $(function() { 427 $(".front #block-views-calendar-block-2 .block-header h2").attr({ "class": "aha-focus", "aria-expanded": "false", "tabindex": "0", "role": "button" }); 428 $(".front #block-views-calendar-block-2").addClass("aha-focus"); 429 /* need to add tab index to all li tags that don't have a tags */ 430 $('.aha-focus .hover_effect li').each(function() { 431 if ($(this).find('strong')[0]) { 432 $(this).attr({ "role": "separator" }); 433 } 434 if (!$(this).find('a')[0] && $(this).find('strong')[0]) { 435 $(this).attr({ "tabindex": "5" }); 436 } 437 }); 438 /* add tabindex equal the mega menu tag index */ 439 $('.aha-focus .hover_effect li a').each(function() { 440 $(this).attr({ "tabindex": "5" }); 441 }); 442 keyCode: { 443 ENTER = 13, 444 SPACE = 32, 445 LEFT = 37, 446 UP = 38, 447 RIGHT = 39, 448 DOWN = 40, 449 ESCAPE = 27, 450 TAB = 9 451 }; 452 var $blockContent = null; 453 var $parentBlock = null; 454 /* Seems each block is different but it took 3 for brookhaven */ 455 var $startingBlockPos = 2; 456 /* this is just used to keep track of the block pos */ 457 var $blockPos = $startingBlockPos; 458 var $menuOpen = false; 459 $('#top_level_mega').delegate('.aha-focus','keydown', function(e) { 460 var $focused = $(document.activeElement); 461 if ($focused.is('h2')) { 462 $blockContent = $(document.activeElement.parentNode.parentNode.getElementsByClassName("block-content")); 463 $parentBlock = $(document.activeElement.parentNode.parentNode); 464 } 465 /* this is just for initial use to make sure they aren't blank*/ 466 else if (!$blockContent) { 467 $blockContent = $focused; 468 $parentBlock = $focused; 469 } 470 471 /* add event that in case of click */ 472 document.addEventListener("mousedown", handler, true); 473 /* If user presses the 'enter' key then it will add 'focus-within' class to current class */ 474 if ( ( ( (e.keyCode == ENTER) || (e.keyCode == SPACE)) && $focused.parent().hasClass("aha-focus")) || 475 ((e.keyCode == DOWN) && !($(this).hasClass("focus-within")) && !($parentBlock.hasClass("open")) && !$(this).hasClass('mobileOpen'))) { 476 e.preventDefault(); 477 e.stopPropagation(); 478 /* Check to see if we are on h2 block */ 479 480 if ($blockContent != $focused && !($(this).is('li.aha-focus'))) { 481 /* focus-within won't work here for no reason at all */ 482 $parentBlock.toggleClass("open"); 483 if (document.activeElement.getAttribute("aria-expanded") == "true") { 484 document.activeElement.setAttribute("aria-expanded", "false"); 485 } else { 486 document.activeElement.setAttribute("aria-expanded", "true"); 487 } 488 489 } 490 /* for menu or mega menu */ 491 else { 492 $(this).toggleClass("focus-within"); 493 if (document.activeElement.getAttribute("aria-expanded") == "true") { 494 document.activeElement.setAttribute("aria-expanded", "false"); 495 } else { 496 document.activeElement.setAttribute("aria-expanded", "true"); 497 $menuOpen = true; 498 } 499 } 500 501 502 503 /* 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 */ 504 if ($(this).find('a')[0]) { 505 if ((e.keyCode == ENTER) && ($(this).find('a')[0].hasAttribute("tabindex"))) { 506 $(this).find('a:first')[0].click(); 507 } 508 } 509 510 } 511 /* key board keys within the menu */ 512 /* now are treating tab the same as long as the menu is open */ 513 else if (((e.keyCode == DOWN) || (e.keyCode == UP) || (e.keyCode == TAB)) && !$(this).hasClass('mobileOpen')) { 514 if(e.keyCode == TAB && !$menuOpen){ 515 /* if tab and the menu isn't open, then return and run the tab code */ 516 return; 517 } 518 e.preventDefault(); 519 e.stopPropagation(); 520 if ( (e.keyCode == DOWN) || ((e.keyCode == TAB && !e.shiftKey)) ) { 521 /* if it's on the top level, focus the first a tag */
522 if ($focused.parent().is('.aha-focus') && !$focused.is('h2')) { 523 /* Go to the first column and then the first child */ 524 if ($(document.activeElement.parentElement.getElementsByClassName("column_1")[0].firstElementChild).find('a')[0]) { 525 $(document.activeElement.parentElement.getElementsByClassName("column_1")[0].firstElementChild).find('a')[0].focus(); 526 } else { 527 $(document.activeElement.parentElement.getElementsByClassName("column_1")[0].firstElementChild).focus() 528 } 529 } else if ($focused.is('h2') || $blockPos > $startingBlockPos) { 530 $blockPos += 1; 531 if ($parentBlock.find('a')[$blockPos]) { 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 545 /* check to see if there is something next */ 546 if ($(document.activeElement).closest('li').next().find('a')[0]) { 547 $(document.activeElement).closest('li').next().find('a')[0].focus(); 548 } else if ($(document.activeElement).closest('li').next()) { 549 $(document.activeElement).closest('li').next().focus(); 550 } else { 551 /* catch any error, this should never get run */ 552 $(document.activeElement).closest('.aha-focus').focus(); 553 clearFocus(); 554 } 555 556 557 /* check and see if it was the same thing -- meaning it needs to go to the next column*/ 558 if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) { 559 /* have to do two next because of the P tag */ 560 if ($(document.activeElement).closest('ul').next().next().children('li')[0]) { 561 $(document.activeElement).closest('ul').next().next().children('li')[0].focus(); 562 /* check to see if the next 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').next().next().find('a')[0].focus() 565 } 566 } else { 567 $(document.activeElement).closest('.aha-focus').find('a')[0].focus(); 568 clearFocus(); 569 } 570 } 571 } 572 573 574 575 } 576 if ((e.keyCode == UP) || (e.keyCode == TAB && e.shiftKey) ) { 577 /* if it's on the top level, focus the first a tag */ 578 if ($blockPos > $startingBlockPos) { 579 $blockPos -= 1; 580 if ($parentBlock.find('a')[$blockPos] && $blockPos > $startingBlockPos) { 581 $parentBlock.find('a')[$blockPos].focus(); 582 /* might need to clear this later */ 583 584 } else { 585 $parentBlock.find('h2')[0].focus(); 586 $blockPos = $startingBlockPos; 587 clearFocus(); 588 } 589 590 } 591 /* not on top level */ 592 else { 593 /* check to see if there is something prev */ 594 595 if ($(document.activeElement).closest('li').prev().find('a')[0]) { 596 $(document.activeElement).closest('li').prev().find('a')[0].focus(); 597 } else if ($(document.activeElement).closest('li').prev()) { 598 $(document.activeElement).closest('li').prev().focus(); 599 } else { 600 /* catch any error, this should never get run */ 601 $(document.activeElement).closest('.aha-focus').find('a').focus(); 602 clearFocus(); 603 } 604 605 606 /* check and see if it was the same thing -- meaning it needs to go to the prev column*/
607 if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) { 608 /* have to do two prev because of the P tag */ 609 if ($(document.activeElement).closest('ul').prev().prev().children('li').last()) { 610 $(document.activeElement).closest('ul').prev().prev().children('li').last().focus(); 611 /* check to see if the prev column is just an a tag -- deosn't happen very often */ 612 if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) { 613 $(document.activeElement).closest('ul').prev().prev().find('a').last().focus() 614 /* checking to see if it's top level up arrow */ 615 if ($focused.context.innerHTML == $(document.activeElement).context.innerHTML) { 616 $(document.activeElement).closest('.aha-focus').find('a')[0].focus(); 617 clearFocus(); 618 } 619 } 620 } 621 } 622 } 623 624 } 625 } 626 /* Left and Right keys */ 627 if (e.keyCode == RIGHT && !$(this).hasClass('mobileOpen')) { 628 e.preventDefault(); 629 e.stopPropagation(); 630 if ($(this).next().find('a')) { 631 $(this).next().find('a').focus() 632 } 633 clearFocus(); 634 } 635 if (e.keyCode == LEFT && !$(this).hasClass('mobileOpen')) { 636 e.preventDefault(); 637 e.stopPropagation(); 638 if ($(this).prev().find('a')) { 639 $(this).prev().find('a').focus() 640 } 641 clearFocus(); 642 } 643 644 645 646 if (e.keyCode == TAB && e.shiftKey && $blockPos > $startingBlockPos) { 647 $blockPos -= 1; 648 } else if (e.keyCode == TAB && $blockPos > $startingBlockPos) { 649 $blockPos += 1; 650 } 651 652 /* if the user presses 'escape' then it will remove the focus-within class and focus back at the top */ 653 else if (e.keyCode == ESCAPE) { 654 e.preventDefault(); 655 e.stopPropagation(); 656 /* check to see if you are in mobile, then if you are close the expanded menu */ 657 if ($(document.activeElement).closest('.aha-focus').is('li')) { 658 $(document.activeElement).closest('.aha-focus').find('a')[0].focus(); 659 } else { 660 $parentBlock.find('h2')[0].focus(); 661 $blockPos = 0; 662 } 663 clearFocus(); 664 665 } 666 667 /* if hovering, it clears focus-within */ 668 $('ul#top_level_mega > li.aha-focus > a').hover(function() { 669 clearFocus(); 670 }); 671 }); 672 /* Create event when the user clicks outside of focus it closes the menu */ 673 function handler(e) { 674 if (!($(this).hasClass('open'))) { 675 clearFocus(); 676 document.removeEventListener("click", handler, true); 677 $(this).focus(); 678 } 679 680 } 681 /* Clear focus-within no matter the focus */ 682 function clearFocus() { 683 if ($('.focus-within').length > 0) { 684 document.getElementsByClassName("focus-within")[0].getElementsByTagName('a')[0].setAttribute("aria-expanded", "false"); 685 document.getElementsByClassName("focus-within")[0].classList.remove("focus-within"); 686 $menuOpen = false; 687 } 688 /* For Blocks */ 689 if ($('.open:not(.mobile-nav-toggle)').length > 0) { 690 document.getElementsByClassName("open")[0].setAttribute("aria-expanded", "false"); 691 document.getElementsByClassName("open")[0].classList.remove("open"); 692 } 693 /* clear because of block */ 694 $blockContent = null; 695 $parentBlock = null; 696 $blockPos = $startingBlockPos; 697 } 698 699 });
700 701 702 703 704})(jQuery);; 705(function($) { 706 $(document).ready(function() { 707 $('.node').each(function() { 708 addTableStlye() 709 }); 710 function addTableStlye() { 711 var $table = document.getElementsByTagName("table"); 712 var $widthScreen = $( window ).width(); 713 for (i = 0; i < $table.length; i++) { 714 $curTable = $(document.getElementsByTagName("table")[i]) 715 if(!$curTable.hasClass('views-table') && !$curTable.parent().hasClass('table-responsive') ) { 716 var $widthTable = document.getElementsByTagName("table")[i].offsetWidth; 717 $curTable.wrap('<div class="table-responsive"></div>'); 718 if($widthScreen < $widthTable && $widthScreen < 1000) { 719 $curTable.before('<div class="table-overlay"></div>') 720 $curTable.siblings('.table-overlay').css({ 721 'height': $curTable.height() + 'px', 722 'width':$widthScreen + 'px' 723 }); 724 $curTable.parent('.table-responsive').addClass('overlayed') 725 } 726 727 } 728 729 730 } 731 } 732 733 }); 734 $(document).ready(function() { 735 //$('.region-content .table-overlay').css({"aria-label":"Table"}) 736 $('.region-content').delegate('.table-responsive','touchmove click', function(e) { 737 if(!$(this).hasClass('clicked')){ 738 var $this = $(this) 739 $this.addClass('clicked') 740 var timeoutHandle = null; 741 if (timeoutHandle) { 742 clearTimeout(timeoutHandle); 743 timeoutHandle = null; 744 } 745 timeoutHandle = setTimeout(function() { 746 $this.find('.table-overlay').css({ 747 "height": 0, 748 "width":0 749 }) 750 }, 1100); 751 } 752 }) 753 }) 754 755})(jQuery); 756 757; 758(function($) { 759 $(function() { 760 if($('.view-alerts')){ 761 var alerts = $('.view-alerts'); 762 var activeRow = [] 763 $.each(alerts,function(key,value){ 764 var rows = $(value).find('.views-row') 765 var numOfRows = rows.length 766 activeRow[key] = 0; 767 768 //Add roles to each row 769 $.each(rows, function(key2,value2) { 770 value2.setAttribute('role','alert') 771 }) 772 773 774 //Add active to the first one 775 rows[activeRow[key]].classList.add('active') 776 rows[activeRow[key]].getElementsByTagName("a")[0].tabIndex = 2 777 778 //Add multiple class 779 if(numOfRows > 1){ 780 $(value).addClass('multiple') 781 782 //add click arrow key functionality 783 var controls = $(value).find('.alert-controls') 784 controls.find('a').attr({'tabindex':'-1'}) 785 controls.find('.alert-prev').click(function(){ 786 prevRow(rows,key, numOfRows); 787 }) 788 controls.find('.alert-next').click(function(){ 789 nextRow(rows,key, numOfRows) 790 }) 791 //Add keyboard functionality 792 $(value).keydown(function(e){ 793 //left 794 if(e.keyCode == 37){ 795 prevRow(rows,key, numOfRows) 796 797 } 798 //right 799 if(e.keyCode == 39) { 800 nextRow(rows,key, numOfRows) 801 } 802 }) 803 } 804 805 }) 806 807 808 } 809 function prevRow(rows,key, numOfRows) { 810 rows[activeRow[key]].classList.remove('active') 811 activeRow[key] = activeRow[key] -1 812 if(activeRow[key] < 0) { 813 activeRow[key] = numOfRows - 1 814 } 815 rows[activeRow[key]].classList.add('active') 816 rows[activeRow[key]].getElementsByTagName('a')[0].focus() 817 } 818 function nextRow(rows, key, numOfRows) { 819 820 rows[activeRow[key]].classList.remove('active') 821 activeRow[key] = 1 + activeRow[key] 822 if(activeRow[key] >= numOfRows){ 823 activeRow[key] = 0; 824 } 825 rows[activeRow[key]].classList.add('active') 826 rows[activeRow[key]].getElementsByTagName('a')[0].focus() 827 } 828 829 }) 830 831 832})(jQuery);; 833/*! Respond.js v1.4.2: min/max-width media query polyfill 834 * Copyright 2014 Scott Jehl 835 * Licensed under MIT 836 * http://j.mp/respondjs */ 837 838!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='­<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.