1/* ========================================================================== 2AOS 3========================================================================== */ 4 5 AOS.init(); 6 7 8 9/* ========================================================================== 10Bg-Image-JS 11========================================================================== */ 12 $(".bg-image-js").each(function() { 13 var img = $(this).find("img"); 14 if (img.length) { 15 $(this).css({ 16 "background-image": "url(" + img.attr("src") + ")" 17 }); 18 img.remove(); 19 } 20 }); 21 22 23 24 25/* ========================================================================== 26SideCar Toggle 27========================================================================== */ 28 29$('button#drawer-toggle').click(function() { 30 $(this).toggleClass('active'); 31 $('.body-overlay, nav#sidecar, div#siteWrapper').toggleClass('active'); 32 $('body').toggleClass('locked'); 33}); 34 35$('.body-overlay, .close-drawer').click(function() { 36 $('.body-overlay, button#drawer-toggle, nav#sidecar, div#siteWrapper').removeClass('active'); 37 $('body').removeClass('locked'); 38}); 39 40/* ========================================================================== 41ie9 & ie10 browser control (adds body.class) 42========================================================================== */ 43if (/*@cc_on!@*/false && document.documentMode === 9) { 44 document.documentElement.className+=' ie9'; 45} 46if (/*@cc_on!@*/false && document.documentMode === 10) { 47 document.documentElement.className+=' ie10'; 48} 49 50$(document).ready(function() { 51 52 /* ========================================================================== 53 Miscellaneous Class Additions 54 ========================================================================== */ 55 jQuery(document).ready(function(){ 56 jQuery(".events-widget .tribe-events-event-image a").addClass("event-bg"); 57 58 jQuery(".event-bg").each(function () { 59 var img = jQuery(this).find("img"); 60 if (img.length) { 61 jQuery(this).css({"background-image": "url(" + img.attr("src") + ")"}); 62 img.remove(); 63 } 64 }); 65 }); 66 67 68 /* ========================================================================== 69 Sticky Nav (remove if unneeded) 70 ========================================================================== */ 71 72// function stickyNavigation(stickyOffsetTop) { 73// var scrollFromTop = $(window).scrollTop(); 74// if (scrollFromTop > stickyOffsetTop) { 75// $('header').addClass('fixed'); 76// $('#home-top').addClass('fixed'); 77// } 78// else { 79// $('header').removeClass('fixed'); 80// $('#home-top').removeClass('fixed'); 81// } 82// } 83// var stickyOffsetTop = $('header').offset().top; 84// stickyNavigation(stickyOffsetTop); 85// $(window).scroll(function() { 86// stickyNavigation(stickyOffsetTop); 87// }); 88 89 /* ========================================================================== 90 Mobile Nav Drop Downs 91 ========================================================================== */ 92 93 $('#sidecar #mainnav li').each(function() { 94 if ($(this).children('ul').length >= 1) { 95 $(this).addClass('hasChild'); 96 $(this).append('<a class="expand"></a>'); 97 } 98 }); 99 100 $('#sidecar .expand').click(function() { 101 $(this).parent().children('ul').toggleClass('active'); 102 $(this).toggleClass('active'); 103 }); 104 105 106 /* ========================================================================== 107 Open MBS in New Window 108 ========================================================================== */ 109 $('.site-credit-link').attr('target','_blank'); 110 111 /* ========================================================================== 112 Adding Body Class based on Breadcrumb 113 ========================================================================== */ 114// only works if breadcrumb is set to 'true' 115 var currentPage = $("ul#breadcrumb ul li:last-child a").text(); 116 currentPage = currentPage.toLowerCase().replace(/ /g, '-'); 117 118 119}); //end doc ready 120 121/* ========================================================================== 122Responsive Banner Rotator (Requires 1.7.1 wrap) (remove if unneeded) 123========================================================================== */ 124 125// (function($){ 126// var jQuery = $; 127 128// $(document).ready(function() { 129 130// $(window).on('resize load',function() { 131// sliderHeight(); 132// }); 133 134// function sliderHeight() { 135// var sh = $('.item img:visible').height(); 136// $('.slider').css({'height': sh +'px'}); 137// $('.slider .scrollable').css({'height': sh +'px'}); 138// } 139 140// }); 141 142// })(jQ171); 143 144 145/* ========================================================================== 146Hide & Toggle Map 147========================================================================== */ 148 149function showHideMap() { 150 var x = document.getElementById("map"); 151 if (x.style.display === "none") { 152 x.style.display = "block"; 153 } else { 154 x.style.display = "none"; 155 } 156} 157 158 159 function toggle_visibility() { 160 var e = document.getElementById("gallery-toggle"); 161 if(e.style.display == 'block') 162 e.style.display = 'none'; 163 else 164 e.style.display = 'block'; 165 } 166 167 168 169/* ========================================================================== 170 Hide & Toggle Text 171========================================================================== */ 172 173 174 // cut the mustard 175if ('querySelector' in document && 176'addEventListener' in window) { 177 178var toggleButtons = document.querySelectorAll('.toggle-content'); 179var fullTextWrappers = document.querySelectorAll('.fulltext'); 180var fullText; 181var toggleButtonText; 182 183 184[].forEach.call(fullTextWrappers, function(fullTextWrapper) { 185 // hide all full text on load 186 fullTextWrapper.setAttribute('hidden', true); 187}); 188 189[].forEach.call(toggleButtons, function(toggleButton) { 190 // show toggle more buttons 191 toggleButton.removeAttribute('hidden'); 192 193 // add listener for each button 194 toggleButton.addEventListener('click', function () { 195 196 fullTextWrapper = this.parentElement.querySelector('.fulltext'); 197 toggleButtonText = this.querySelector('.text'); 198 199 // change attributes and text if full text is shown/hidden 200 if (!fullTextWrapper.hasAttribute('hidden')) { 201 toggleButtonText.innerText = 'Show More'; 202 fullTextWrapper.setAttribute('hidden', true); 203 toggleButton.setAttribute('aria-expanded', false); 204 } else { 205 toggleButtonText.innerText = 'Show Less'; 206 fullTextWrapper.removeAttribute('hidden'); 207 toggleButton.setAttribute('aria-expanded', true); 208 } 209 }); 210}); 211} 212 213
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.