1// HP video Parallax - for traditional slideshow, change "welcomevid" to "home-slideshow" below on line 13 and 20 2/* 3var prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; 4function e(e, o) { 5 var a = `translateY(${o}px)`; 6 e.style['-webkit-transform'] = a, 7 e.style.transform = a, 8 e.style.willChange = 'transform'; 9} 10 11 12var o = function () { 13 var o = document.getElementById('welcomevid'), 14 a = window.scrollY / -2; 15 e(o, a) 16}; 17 18function paraV() { 19 if (window.innerWidth > 1299 && !prefersReducedMotion) { 20 const welcomevid = document.getElementById('welcomevid'); 21 if (welcomevid) { 22 window.addEventListener('scroll', function () { 23 requestAnimationFrame(o); 24 }); 25 } 26 } 27} 28 29paraV(); 30*/ 31 32$(window).on('resize',function() { }); 33 34$(document).ready(function() { 35 36 $(window).trigger('resize'); 37 38 //Back to top hide and animate 39 // if ($('#bd').height() > $(window).height()) { 40 // $('#backtotop').removeClass('hide'); 41 // } 42 /* $('#backToTop').removeClass('hide'); */ 43 44 //BTTs 45 $('#backtotop, .common-procedures a[href="#hd"], .faq-s a[href="#top"]').click(function () { 46 $('body,html').scrollTop(0); 47 $('#masthead').focus(); 48 return false; 49 }); 50 51 //hide subnav from 404pages 52 /* 53 var subnav = $("#subnav"); 54 var error404 = $("h1:contains('Error 404')"); 55 if(error404) { 56 $("#subnav").css('display', 'none'); 57 }; 58 */ 59 60//hide ip-sub if it contains only one item 61if($('#subnav a').length == '1'){ 62$('#subnav h2, #subnav p').hide(); 63}; 64 65 66 /* add class to email */ 67var $emailLinks = $('a.email'); 68$emailLinks.emailProt(); 69 70// Open external links in new windows 71$('a[href^="http://"], a[href^="https://"]') 72 .filter(function () { 73 return this.hostname && 74 this.hostname !== window.location.hostname && 75 !this.hasAttribute('download'); 76 }) 77 .addClass('external') 78 .attr({ target: '_blank', rel: 'noopener noreferrer' }); 79 80// Apply 'external' class and attributes to .doc and .pdf links regardless of domain 81$('a[href$=".doc" i], a[href$=".docx" i], a[href$=".pdf" i]') 82.not('[download]') 83.addClass('external') 84.attr({ target: '_blank', rel: 'noopener noreferrer' }); 85 86 87}); // end doc ready 88 89 90/* toggle mobtron class on elements in conjunction with main-nav */ 91(function ($) { 92 $.fn.mobtron = function (options) { 93 const settings = $.extend({ 94 maxWidth: 599, // Default max-width value 95 collapsibleSelector: '#main-nav', // Selector for collapsible element 96 }, options); 97 98 const mql = window.matchMedia(`(max-width: ${settings.maxWidth}px)`); 99 100 // Function to handle observing and toggling based on class changes 101 function setupClassObserver(hdElement) { 102 const collapsibleElement = $(settings.collapsibleSelector); 103 if (!collapsibleElement.length || !hdElement.length) return; 104 105 const observer = new MutationObserver((mutationsList) => { 106 mutationsList.forEach(mutation => { 107 if (mutation.type === 'attributes' && mutation.attributeName === 'class') { 108 if (collapsibleElement.hasClass('open')) { 109 hdElement.removeClass('mobtron'); 110 } else { 111 hdElement.addClass('mobtron'); 112 } 113 } 114 }); 115 }); 116 117 observer.observe(collapsibleElement[0], { attributes: true, attributeFilter: ['class'] }); 118 return () => observer.disconnect(); // Cleanup function for when matchMedia condition changes 119 } 120 121 // Function to check and apply observer based on viewport size 122 function checkViewportChange(hdElement) { 123 if (mql.matches) { 124 return setupClassObserver(hdElement); // Start observing if the viewport is <= maxWidth 125 } 126 } 127 128 return this.each(function () { 129 const hdElement = $(this); 130 let observerCleanup = checkViewportChange(hdElement); // Initial check and setup for viewport size 131 132 // Listen for viewport changes and toggle observer as needed 133 mql.addEventListener('change', () => { 134 if (observerCleanup) observerCleanup(); // Disconnect previous observer if it exists 135 observerCleanup = checkViewportChange(hdElement); // Re-apply observer based on new viewport size 136 }); 137 }); 138 }; 139})(jQuery);
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.