1$(document).ready(function(){ 2 3 $('#masthead.site-header .page-container nav .primary-menu-container ul li a').on('mouseover', function(e){ 4 5 //e.stopPropagation(); 6 }) 7 8 var winWidth = $(window).width(); 9 10 if (winWidth <= 1275) { 11 //$('#primary-menu-list>li>a').doubleTapToGo(); 12 13 14 15 // $('.primary-menu-container ul li .sub-menu-toggle').attr('onclick', ''); 16 17 $('#masthead.site-header .page-container nav .primary-menu-container ul .menu-item').on('click', function(e){ 18 // e.stopPropagation(); 19 // e.preventDefault(); 20 //var attrTarget = $(this).parent().children('.page-container'); 21 22 console.log('Main Link has clicked'); 23 24 if (!$(this).parent().children('.page-container').hasClass('active')) { 25 $(this).parent().children('.page-container').addClass('active'); 26 } else { 27 $(this).parent().children('.page-container').removeClass('active'); 28 } 29 }); 30 } 31 32 // -------------- // 33 // NAV ALTERATION // 34 // -------------- // 35 var firstSubNavChild = $('#primary-menu-list .menu-item-has-children .sub-menu'); 36 $('#primary-menu-list>.menu-item-has-children>.sub-menu').each(function(){ 37 38 var firstNavChildLink = $(this).children('li').first().children('.sub-menu').children('li').first().children('a').attr('href'); 39 40 // --------------------------------------------------------- // 41 // REPLACE THE TOP LEVEL NAV LINK WITH THE FIRST CHILDS HREF // 42 // --------------------------------------------------------- // 43 if (winWidth >= 1276) { 44 $(this).parent().children('a').attr('href', firstNavChildLink); 45 } 46 47 }); 48 49 50 $( "#primary-menu-list>.menu-item-has-children>.sub-menu" ).wrap('<div class="page-container"></div>'); 51 52 $('#primary-menu-list li').each(function(){ 53 if(!$(this).hasClass('menu-item-has-children')) { 54 $(this).append('<button class="sub-menu-toggle" aria-expanded="false" onclick="twentytwentyoneExpandSubMenu(this)"><span class="icon-plus"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 15.4 15.6" style="enable-background:new 0 0 15.4 15.6;" xml:space="preserve"><style type="text/css">.st0-top-nav-indicator{fill:#DB0B2E;}</style><polygon class="st0-top-nav-indicator" points="15.4,15.6 13.7,15.6 0,0 1.7,0 "></polygon></svg></span><span class="icon-minus"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21.8 1.4" style="enable-background:new 0 0 21.8 1.4;" xml:space="preserve"><style type="text/css">.st0-logo-item-current{fill:#DB0B2E;}</style><polygon class="st0-logo-item-current" points="21.8,0 20.7,1.3 0,1.4 1.1,0.2 "></polygon></svg></span><span class="screen-reader-text">Open menu</span></button>'); 55 } 56 }); 57 $('#primary-menu-list li .sub-menu .sub-menu li').each(function(){ 58 if($(this).hasClass('menu-item-has-children')) { 59 $(this).append('<button class="sub-menu-toggle" aria-expanded="false" onclick="twentytwentyoneExpandSubMenu(this)"><span class="icon-plus"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 15.4 15.6" style="enable-background:new 0 0 15.4 15.6;" xml:space="preserve"><style type="text/css">.st0-top-nav-indicator{fill:#DB0B2E;}</style><polygon class="st0-top-nav-indicator" points="15.4,15.6 13.7,15.6 0,0 1.7,0 "></polygon></svg></span><span class="icon-minus"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21.8 1.4" style="enable-background:new 0 0 21.8 1.4;" xml:space="preserve"><style type="text/css">.st0-logo-item-current{fill:#DB0B2E;}</style><polygon class="st0-logo-item-current" points="21.8,0 20.7,1.3 0,1.4 1.1,0.2 "></polygon></svg></span><span class="screen-reader-text">Open menu</span></button>'); 60 } 61 }); 62 63 // ----------------------------------------- // 64 // REPLACE THE TOP LEVEL NAV LINK INDICATORS // 65 // ----------------------------------------- // 66 $('#primary-menu-list .menu-item-has-children .sub-menu-toggle .
66icon-plus').each(function(){ 67 $(this).html('<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 15.4 15.6" style="enable-background:new 0 0 15.4 15.6;" xml:space="preserve"><style type="text/css">.st0-top-nav-indicator{fill:#DB0B2E;}</style><polygon class="st0-top-nav-indicator" points="15.4,15.6 13.7,15.6 0,0 1.7,0 "/></svg>'); 68 }) 69 $('#primary-menu-list .menu-item-has-children .sub-menu-toggle .icon-minus').each(function(){ 70 $(this).html('<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21.8 1.4" style="enable-background:new 0 0 21.8 1.4;" xml:space="preserve"><style type="text/css">.st0-logo-item-current{fill:#DB0B2E;}</style><polygon class="st0-logo-item-current" points="21.8,0 20.7,1.3 0,1.4 1.1,0.2 "/></svg>'); 71 }); 72 73 // ---------------------- // 74 // SEARCH FORM ACTIVATION // 75 // ---------------------- // 76 77 $('.search .searchForm').on('click', function(){ 78 $('.hiddenSearch').addClass('active'); 79 }); 80 $('.hiddenSearch .searchUpArrow').on('click', function(){ 81 $('.hiddenSearch').removeClass('active'); 82 }); 83 84 $('.menu-toggle').on('click', function(){ 85 $(this).toggleClass('mobile-active'); 86 $('#masthead.site-header').toggleClass('mobile-active'); 87 }) 88 89 // ---------------------- // 90 // PRODUCT FILTER SCRIPTS // 91 // ---------------------- // 92 93 function productFilters() { 94 var countryFilterVal = $('.product-filter .country').val(); 95 var productFilterVal = $('.product-filter .productArea').find(':selected').data('id'); 96 97 if (productFilterVal == "All" && countryFilterVal == "All") { 98 $('.product-selector-body').addClass('active'); 99 } 100 if (productFilterVal !== "All" && countryFilterVal == "All") { 101 $('.product-selector-body').removeClass('active'); 102 $('.product-selector-body[data-catid="'+ productFilterVal +'"]').addClass('active'); 103 } 104 if (productFilterVal == "All" && countryFilterVal !== "All") { 105 $('.product-selector-body').removeClass('active'); 106 $('.product-selector-body[data-country="'+ countryFilterVal +'"]').addClass('active'); 107 } 108 if (productFilterVal !== "All" && countryFilterVal !== "All") { 109 $('.product-selector-body').removeClass('active'); 110 $('.product-selector-body[data-country="'+ countryFilterVal +'"][data-catid="'+ productFilterVal +'"]').addClass('active'); 111 } 112 113 } 114 115 $('.product-filter .productArea').on('change', function(){ 116 117 productFilters(); 118 119 }); 120 121 $('.product-filter .country').on('change', function(){ 122 123 productFilters(); 124 125 }); 126 127 $("select option:contains('SPC')").each(function(){ 128 $(this).text($(this).text().replace('SPC','')); 129 $(this).text($(this).text().replace(',','')); 130 }); 131 $("select option:contains('RARE')").each(function(){ 132 $(this).text($(this).text().replace('RARE DISEASE','')); 133 $(this).text($(this).text().replace(',','')); 134 }); 135 136 137 // -------------------- // 138 // MEDIA FILTER SCRIPTS // 139 // -------------------- // 140 $('.media_top_nav li').first().addClass('active'); 141 $('.media_top_nav li').first().children('.posts').addClass('active'); 142 $('.media_top_nav li').first().children('a').addClass('active'); 143 144 $('.media_top_nav li a').each(function(){ 145 $(this).on('click', function(){ 146 var yearFilterVal = $('.year_nav ul li a.active').data('dateid'); 147 var currentTabLink = $(this).data('dateid'); 148 149 $('.media_top_nav li').removeClass('active'); 150 $('.media_top_nav li .posts').removeClass('active'); 151 $('.media_top_nav li a').removeClass('active'); 152 $(this).addClass('active'); 153 $(this).parent().children('.posts').addClass('active'); 154 $(this).parent().addClass('active'); 155 $(this).parent().children('.posts').children('.post').removeClass('active'); 156 157 $(this).parent().children('.posts').children('.post[data-date='+yearFilterVal+'][data-catid='+currentTabLink+']').addClass('active'); 158 }); 159 }); 160 161 $('.year_nav ul li').first().children().addClass('active'); 162 163 164 $('.year_nav ul li a').each( function(){ 165 $(this).on('click',function(){ 166 var dateFilterVal = $(this).data('dateid'); 167 var activeTabLink = $('.media_top_nav li.active>a').data('dateid'); 168 169 $('.media_top_nav li .posts .post').removeClass('active'); 170 $('.media_top_nav li .posts .post').removeClass('latest'); 171 $('.media_top_nav li.active .posts .post[data-date='+dateFilterVal+'][data-catid='+activeTabLink+']').addClass('active'); 172 $('.year_nav ul li a').removeClass('active'); 173 $(this).addClass('active'); 174 175 }); 176 }); 177 178 179 $('.presentDownloads .elementor-button').each(function(){ 180 var hrefString = $(this).attr('href'); 181 var extension = hrefString.split('/').pop().split('.')[1]; 182 183 if (extension == 'pdf'){ 184 $(this).addClass('pdf'); 185 } 186 if (extension == 'html') { 187 $(this).addClass('html'); 188 } 189 if (extension == 'xhtml') { 190 $(this).addClass('html'); 191 console.log('xhtml found'); 192 } 193 if (extension == 'mp4') { 194 $(this).addClass('mp4'); 195 } 196 if (extension == 'mp3') { 197 $(this).addClass('mp3'); 198 } 199 if (extension == 'zip') { 200 $(this).addClass('zip'); 201 } 202 203 }); 204 205 // openFile("somestring.png"); 206 207 208 209 210 211 212 $(window).resize(function(){ 213 var winWidth = $(window).width(); 214 215 if (winWidth >= 1276) { 216 $('.menu-toggle').removeClass('mobile-active'); 217 $('#masthead.site-header').removeClass('mobile-active'); 218 } 219 }); 220 221 222});
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.