1jQuery(document).ready(function () { 2 if ($("body").hasClass("bodyclass")) { 3 var $window = jQuery(window); 4 5 function check_if_in_view() { 6 7 var $animation_elements = jQuery('.menu-4-links, #footer'); 8 var window_height = $window.height(); 9 var window_top_position = $window.scrollTop(); 10 var window_bottom_position = (window_top_position + window_height); 11 12 $.each($animation_elements, function () { 13 var $element = $(this); 14 var element_height = $element.outerHeight(); 15 var element_top_position = $element.offset().top; 16 var element_bottom_position = (element_top_position + element_height); 17 18 //check to see if this current container is within viewport 19 if ((element_bottom_position >= window_top_position) 20 && (element_top_position <= window_bottom_position)) { 21 $element.addClass("in-view"); 22 } else { 23 $element.removeClass("in-view"); 24 } 25 }); 26 } 27 28 var home_animate = function () { 29 var $window = jQuery(window); 30 $window.bind('scroll smartresize', check_if_in_view); 31 $window.trigger('scroll'); 32 }; 33 34 home_animate(); 35 36 jQuery('body, main').bind('orientationchange', function () { 37 setTimeout(function () { 38 home_animate(); 39 jQuery(window).trigger('scroll'); 40 }, 100); 41 }); 42 } 43 44}); 45 46function scrollFunction() { 47 var scrollBtn = $xa(".scroll-top"); 48 if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { 49 scrollBtn.css("display", "block"); 50 } else { 51 scrollBtn.css("display", "none"); 52 } 53} 54 55function scrollToTop() { 56 document.body.scrollTop = 0; 57 document.documentElement.scrollTop = 0; 58} 59 60 61/************ Pills dropdown **************/ 62$(document).ready(function () { 63 if ($("body").hasClass('home')) { 64 var pillValue = $('#pillSelecter').val(); 65 if (pillValue != "") { 66 $("#pills-brand-name .Subheading-sections-icon").hide(); 67 $("#pills-brand-name .Subheading-sections-icon." + pillValue).show(); 68 } 69 } 70 $('#pillSelecter').on('change', function () { 71 $("#pills-brand-name .Subheading-sections-icon").hide(); 72 $("#pills-brand-name .Subheading-sections-icon." + this.value).show(); 73 }); 74 75 /*********************** ISI expander ***************/ 76 $xa(".resize-isi-icon").on("click", function () { 77 $("#interstitial-overlay").show(); 78 $('.self-cert-interstitial').show(); 79 $('.isi-interstitial').show(); 80 }); 81 82 $xa(".collapse-resize-isi-icon").on("click", function () { 83 $("#interstitial-overlay").hide(); 84 $('.self-cert-interstitial').hide(); 85 $('.isi-interstitial').hide(); 86 }); 87 88 /*********** END ********/ 89 90}); 91 92/************* Savings **************/ 93$(document).ready(function () { 94 95 96 97 98 99 $('.close-icon').click(function () { 100 $('.external-interstitial').hide(); 101 $('#interstitial-overlay').hide(); 102 }); 103 var fullURL = window.location.href; 104 //const getLastItem = thePath => thePath.substring(thePath.lastIndexOf('/') + 1); 105 function getLastItem(thePath) { 106 return thePath.substring(thePath.lastIndexOf('/') + 1); 107 } 108 109 var urlPath = getLastItem(fullURL); 110 if (urlPath === '') { 111 $('header ul.menu-4-links li.home-btn a').addClass('a-active'); 112 } else { 113 $("header ul.menu-4-links li a").each(function () { 114 var eachPath = getLastItem(this.href.toLowerCase()); 115 (urlPath.toLowerCase() == eachPath) ? $(this).addClass("a-active"): $(this).removeClass("a-active"); 116 }); 117 } 118 if ($("body").hasClass("faqs")) { 119 $("header .main-menu-section .menu-4-links li:nth-child(3) a").addClass("a-active") 120 } else { 121 $("header .main-menu-section .menu-4-links li:nth-child(3) a").removeClass("a-active") 122 } 123 124 $("a[href='#important-info-xan']").click(function () { 125 $(this).parents('.bodyclass').find('#important-info-xan').parent('.faqAnswer').addClass('expanded'); 126 $(this).parents('.bodyclass').find('.expand-icon').addClass('expanded'); 127 $("html,body").animate({ 128 scrollTop: $("#general-in").offset().top 129 }, "1000"); 130 return false; 131 }); 132 133 134 135});
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.