1/* globals Swiper */ 2 3(function () { 4 let activeLvl0ItemFooter = null; 5 6 document 7 .querySelector(".footer-menu") 8 .addEventListener("click", function (event) { 9 const lvl0TitleFooter = event.target.closest(".footer-title"); 10 if (!lvl0TitleFooter) return; 11 12 const item = lvl0TitleFooter.closest(".footer-subnav-lvl0"); 13 // only one open at a time 14 if (item === activeLvl0ItemFooter) { 15 item.classList.remove("is-active"); 16 activeLvl0ItemFooter = null; 17 } else { 18 if (activeLvl0ItemFooter) 19 activeLvl0ItemFooter.classList.remove("is-active"); 20 item.classList.add("is-active"); 21 activeLvl0ItemFooter = item; 22 } 23 }); 24 25 // -------------------------- Swiper -------------------------- // 26 27 if (document.querySelector(".swiper-container")) { 28 new Swiper(".swiper-container", { 29 loop: true, 30 pagination: { 31 el: ".swiper-pagination", 32 }, 33 navigation: { 34 nextEl: ".swiper-button-next", 35 prevEl: ".swiper-button-prev", 36 }, 37 }); 38 } 39 40 // -------------------------- Show more items -------------------------- // 41 42 function initShowNextItems(options) { 43 const itemNodes = document.querySelectorAll(options.itemSelector); 44 const button = document.querySelector(options.buttonSelector); 45 46 if (!itemNodes) return function () {}; 47 48 let items = []; 49 // convert nodeList to Array 50 for (let i = 0; i < itemNodes.length; i++) { 51 items.push(itemNodes[i]); 52 } 53 54 function showNext() {
55 items.slice(0, 5).forEach((item) => item.classList.add("shown")); 56 items = items.slice(5); 57 // hide button when no more to show 58 if (button) button.style.display = items.length ? "block" : "none"; 59 } 60 // show first set 61 showNext(); 62 return showNext; 63 } 64 65 // make global to be used onclick in /press-center 66 window.morePress = initShowNextItems({ 67 itemSelector: ".press-on-air > div", 68 buttonSelector: "#moreButtonPress", 69 }); 70 71 window.readMore = initShowNextItems({ 72 itemSelector: ".news__listing .link-item", 73 buttonSelector: "#readMoreButton", 74 }); 75 76 window.showMore = initShowNextItems({ 77 itemSelector: ".press-release__listing .link-item", 78 buttonSelector: "#moreButton", 79 }); 80})(); 81 82// mobile drawer nav 83// jQuery(document).ready(function($) { 84// $(document).on("click", function () { 85// document.querySelector(".site-header").addEventListener("click", navclose); 86// function navclose() { 87// $(".mobile-nav-btn-label").trigger("click"); 88// } 89// }); 90 91// module navigation 92 93(function ($) { 94 // Begin jQuery 95 // DOM ready 96 const mediaQuery = window.matchMedia("(max-width: 1024px)"); 97 if (mediaQuery.matches) { 98 // Toggle open and close nav styles on click 99 $("#nav-toggle-subnav-module").click(function () { 100 $(".module-subnav ul").slideToggle(); 101 }); 102 // Hamburger to X toggle 103 $("#nav-toggle-subnav-module").on("click", function () { 104 this.classList.toggle("active"); 105 }); 106 $(".module-subnav ul li a").click(function () { 107 $(".module-subnav ul").slideToggle(); 108 $("#nav-toggle-subnav-module").removeClass("active"); 109 }); 110 $(window).scroll(function () { 111 if ($(this).scrollTop() > 600) { 112 $(".module-table-mobile").show(50); 113 } else { 114 $(".module-table-mobile").hide(50); 115 } 116 }); 117 $(window).scroll(function () { 118 if ($(this).scrollTop() > 130) { 119 $(".friday-legal").show(50); 120 } else { 121 $(".friday-legal").hide(50); 122 } 123 }); 124 $(window).scroll(function () { 125 if ($(this).scrollTop() > 130) { 126 $(".modules-subnav-trigger").show(50); 127 } else { 128 $(".modules-subnav-trigger").hide(50); 129 } 130 }); 131 } 132}); // end jQuery 133 134// accordian function 135(function ($) { 136 $.fn.ashCordian = function () { 137 var container = $(this); 138 container.find(".accordian-head ").click(function () { 139 if ($(this).siblings("section").css("display") == "block") { 140 container.find("section").slideUp(150); 141 // $(this).toggleClass('faq-arrow-reverse') 142 } else { 143 container.find("section").slideUp(150); 144 $(this).siblings("section").slideDown(150); 145 // $(this).removeClass('faq-arrow-reverse') 146 } 147 }); 148 }; 149 $(".dp-faq-accordian").ashCordian(); 150}); 151 152// Mobile Filter Functions 153function mobileFilter() { 154 document.getElementById("filterHide").classList.toggle("mobileFilterHide"); 155} 156 157function applyBtn() { 158 document.getElementById("applyBtn").classList.toggle("mobileFilterHide"); 159} 160 161(function ($) { 162 $(".jet-filter-items-dropdown").addClass("jet-dropdown-open"); 163}); 164
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.