1$(document).ready(function() { 2 "use strict"; 3 4 // If header is fixed push marketing message or page title down 5 $(window).on('load resize', function() { 6 var $headerHeight = $('header.masthead').outerHeight(); 7 8 if ( $('.masthead').css('position') == 'fixed' && $('section.mod-marketing').length > 0 ) { 9 $('.slides > li').css("padding-top", $headerHeight); 10 return false; 11 } else if ( $('.masthead').css('position') == 'fixed' ) { 12 $('.page-title').css("padding-top", $headerHeight); 13 return false; 14 } else { 15 $('.slides > li, .page-title').css("padding-top", ""); 16 } 17 }) 18 19 // On skip content link click, change tabindex to content area 20 $('.skip-to-content').on('click', function() { 21 var $skip = $('#content-anchor'); 22 23 $skip.attr('tabindex',-1).on('blur focusout', function() { 24 $(this).removeAttr('tabindex'); 25 }).focus(); 26 }); 27 28 // If content on page is shorter than the window height, push footer to bottom of screen 29 $(window).on('load', function() { 30 var $bodyHeight = $('body').outerHeight(); 31 var $windowHeight = $(window).height(); 32 33 if ( $bodyHeight < $windowHeight ) { 34 $('footer').css( 'padding-top', (($windowHeight - $bodyHeight) + 1) ); // The + 1 here makes sure that the scrollbar is still visible so the break-out classes don't break 35 } 36 }); 37 38 // Search 39 $('.nav-search').on('click', function() { 40 $('.search-field-wrapper').slideToggle(); 41 $('.searchField').focus(); 42 return false; 43 }); 44 45 $('.close-search').on('click', function() { 46 $('.search-field-wrapper').slideUp(); 47 return false; 48 }); 49 50 // Open Mobile Menu 51 $('.open-mobilemenu').on('click', function() { 52 $('.mobilemenu').toggleClass('slide-in'); 53 $('body').addClass('overflow-hidden'); 54 return false; 55 }); 56 57 // Close Mobile Menu 58 $('.close-mobilemenu').on('click', function() { 59 $('.mobilemenu').removeClass('slide-in'); 60 $('body').removeClass('overflow-hidden'); 61 return false; 62 }); 63 64 // Clone Parent Pages 65 $('.mobilemenu ul li a').each( function(){ 66 if($(this).siblings().length > 0 && !$(this).siblings().hasClass('active') ) { 67 if ($(this).attr('href') != '#') { 68 var cloney = $(this).prop('outerHTML'); 69 $(this).siblings('ul').prepend('<li>'+cloney+'</li>'); 70 } 71 } 72 }); 73 74 // Mobile Menu Sliding 75 $('.mobilemenu.sliding-menu ul li a').on('click', function() { 76 if($(this).siblings().length > 0) { 77 $(this).parents('ul').removeClass('active'); 78 $(this).parents('ul').addClass('left'); 79 $(this).siblings('ul').addClass('active'); 80 $(this).siblings('ul').removeClass('right'); 81 return false; 82 } 83 84 if($(this).hasClass('backup')) { 85 $(this).parents('.active').addClass('right'); 86 $(this).closest('.left').addClass('active'); 87 $(this).closest('.left').removeClass('left'); 88 $(this).closest('ul').removeClass('active'); 89 return false; 90 } 91 }); 92 93 //disclaimer 94 $('#disclaimerGo').click(function() { 95 setTimeout(function(){ history.back(); }, 2000); 96 }); 97 98 // Overlays 99 $('[data-overlay]').on('click', function() { 100 var overlayrel = $(this).data('overlay'); 101 102 $('body').addClass('overflow-hidden'); 103 $(overlayrel+', .overlay-mask').fadeIn(); 104 return false; 105 }); 106 107 $('.modal .close, .overlay-mask').on('click', function() { 108 $('body').removeClass('overflow-hidden'); 109 $('.modal, .overlay-mask').fadeOut(); 110 return false; 111 }); 112 113 114 // Animation Handler 115 $('.animate').each(function () { 116 // Grab the data-animation value to add class, grab offset and height to set the scroll position. 117 var $this = $(this), 118 anim = $this.data('animation'), 119 delay = $this.data('delay'), 120 duration = $this.data('duration'), 121 offset = $(this).offset().top - ($(window).height() / 1.05); 122 123 // If data-delay is added 124 if (delay) { 125 $this.css('animation-delay', delay); 126 } 127 128 // If data-duration is added 129 if (duration) { 130 $this.css('animation-duration', duration); 131 } 132 133 // Add the animation class when scroll position is met 134 $(window).on('scroll load', function () { 135 if ($(window).scrollTop() >= offset) { 136 $this.addClass(anim); 137 $this.addClass('animated'); 138 } 139 140 // Remove the classes to allow for z-indexing after animations run. 141 // Removes animate because above script adds it back and we can't always target the animation name. 142 if($this.hasClass('animated')) { 143 var timeout = 1000; 144 145 setTimeout(function() { 146 $this.removeClass('animate'); 147 }, timeout); 148 } 149 }); 150 }); 151 152 // Back to Top 153 $(window).scroll(function() { 154 if ($(this).scrollTop() > 400) { 155 $('.back-to-top').addClass('visible'); 156 } else { 157 $('.back-to-top').removeClass('visible'); 158 } 159 }); 160 161 $('.back-to-top').on('click', function(e) { 162 e.preventDefault(); 163 $('html, body').animate({ scrollTop: 0 }, 500); 164 }); 165 166 // Text resize using HTML classes (minus 3 stylesheets) 167 $('.resizerButton').on('click', function() { 168 var item = $(this); 169 $.post("/ajax/text-resizer.php", { style: $(this).attr("data-style")}, function(d) { 170 // DO NOTHING 171 $('.resizerButton').each(function() { 172 $(this).css("font-weight", "normal"); 173 }); 174 175 item.css("font-weight", "bold"); 176 $('html').removeClass('text-normal'); 177 $('html').removeClass('text-medium'); 178 $('html').removeClass('text-large'); 179 $('html').addClass(d); 180 181 }); 182 return false;
183 }); 184 185 // IE Fix for jumpy fixed backgrounds 186 if(navigator.userAgent.match(/Trident\/7\./)) { // if IE 187 $('body').on("mousewheel", function () { 188 // remove default behavior 189 event.preventDefault(); 190 191 //scroll without smoothing 192 var wheelDelta = event.wheelDelta; 193 var currentScrollPosition = window.pageYOffset; 194 window.scrollTo(0, currentScrollPosition - wheelDelta); 195 }); 196 } 197 198 // Notification message close 199 $("div.message.relative").on('click', function(){ 200 $(this).slideUp(); 201 }); 202 203 204 // Smooth Scroll 205 $('a[href*="#"]').not('[href="#"]').not('[href="#0"]').on('click', function(event) { 206 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 207 var target = $(this.hash); 208 209 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 210 if (target.length) { 211 event.preventDefault(); 212 213 $('html, body').animate({ scrollTop: target.offset().top }, 1000, function() { 214 var $target = $(target); 215 $target.focus(); 216 217 if ($target.is(":focus")) { 218 return false; 219 } else { 220 $target.attr('tabindex','-1'); 221 $target.focus(); 222 } 223 }); 224 } 225 } 226 }); 227}); 228 229 230// Class to fade in on load - Can be used to hide html exploding before the jquery can get to it 231$(window).on('load', function() { 232 $('.show-on-load').css('opacity','1'); 233}); 234 235 236// Measure the scrollbar width 237 // Create the measurement node 238 var scrollDiv = document.createElement("div"); 239 scrollDiv.className = "js-scrollbar-measure"; 240 document.body.appendChild(scrollDiv); 241 242 // Get the scrollbar width 243 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; 244 245 // Delete the DIV 246 document.body.removeChild(scrollDiv); 247 248 // Add data-scrollbarwidth to elements that may use it 249 // elements that use .js-break-out 250 var breakOutElements = document.querySelectorAll('.js-break-out'); 251 for (var i=0; i < breakOutElements.length; i++) { 252 breakOutElements[i].setAttribute('data-scrollbarwidth', scrollbarWidth); 253 } 254 255 256// Password Input Toggle 257$(".js-toggle-password").on('click', function() { 258 $(this).toggleClass("fa-eye fa-eye-slash"); 259 var input = $($(this).attr("toggle")); 260 261 if (input.attr("type") == "password") { 262 input.attr("type", "text"); 263 } else { 264 input.attr("type", "password"); 265 } 266}); 267 268 269function createCookie(name,value,days) { 270 if (days) { 271 var date = new Date(); 272 date.setTime(date.getTime()+(days*24*60*60*1000)); 273 var expires = "; expires="+date.toGMTString(); 274 } 275 else expires = ""; 276 document.cookie = name+"="+value+expires+"; path=/"; 277} 278 279function readCookie(name) { 280 var nameEQ = name + "="; 281 var ca = document.cookie.split(';'); 282 for(var i=0;i < ca.length;i++) { 283 var c = ca[i]; 284 while (c.charAt(0)==' ') c = c.substring(1,c.length); 285 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 286 } 287 return null; 288} 289 290var cookie = readCookie("style"); 291 292 293if(siteType == 'BANK' || siteType == 'CREDIT-UNION') { 294 //////////////////////////////////////// URI OBJECT MINIFIED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 295 296 function URI(a){if(!a)a="";var b=/^(?:([^:\/?\#]+):)?(?:\/\/([^\/?\#]*))?([^?\#]*)(?:\?([^\#]*))?(?:\#(.*))?/;var c=a.match(b);this.scheme=c[1]||null;this.authority=c[2]||null;this.path=c[3]||null;this.query=c[4]||null;this.fragment=c[5]||null}URI.prototype.toString=function(){var a="";if(this.scheme){a+=this.scheme+":"}if(this.authority){a+="//"+this.authority}if(this.path){a+=this.path}if(this.query){a+="?"+this.query}if(this.fragment){a+="#"+this.fragment}return a};(function(){function a(a,b){var c=/^(.*)\//;if(a.authority&&!a.path){return"/"+b}else{return a.path.match(c)[0]+b}}function c(a){if(!a)return"";var c=a.replace(/\/\.\//g,"/");c=c.replace(/\/\.$/,"/");while(c.match(b)){c=c.replace(b,"/")}c=c.replace(/\/([^\/]*)\/\.\.$/,"/");while(c.match(/\/\.\.\//)){c=c.replace(/\/\.\.\//,"/")}return c}var b=/\/((?!\.\.\/)[^\/]*)\/\.\.\//;URI.prototype.resolve=function(b){var d=new URI;if(this.scheme){d.scheme=this.scheme;d.authority=this.authority;d.path=c(this.path);d.query=this.query}else{if(this.authority){d.authority=this.authority;d.path=c(this.path);d.query=this.query}else{if(!this.path){d.path=b.path;if(this.query){d.query=this.query}else{d.query=b.query}}else{if(this.path.charAt(0)==="/"){d.path=c(this.path)}else{d.path=a(b,this.path);d.path=c(d.path)}d.query=this.query}d.authority=b.authority}d.scheme=b.scheme}d.fragment=this.fragment;return d}})() 297
298 ///////////////////////////////////////// DISCLAIMER WINDOW \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\; 299 var url; 300 var newWin; 301 var domains = ''; 302 303 $(function () { 304 // add the class to all external links 305 $("a[href*='http://'], a[href*='https://']").not("[data-nodisclaimer='true']").not(".nodisclaimer").each(function () { 306 var uri = new URI($(this).attr('href').toLowerCase()); 307 var url = $(this).attr('href'); 308 var token = encodeURIComponent(window.btoa(url)); 309 if (domains.toLowerCase().indexOf(uri.authority) < 0 && url.indexOf('disclaimer?') == -1) { 310 $(this).addClass('triggerDisclaimer'); 311 $(this).attr("target", "_self"); 312 $(this).attr("href", "/disclaimer?url=" + token); 313 } 314 }); 315 316 ///////////////////////////////////////// EMAIL DISCLAIMER WINDOW \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\; 317 $("a[href*='mailto:']").not("[data-nodisclaimer='true']").not(".nodisclaimer").each(function () { 318 $(this).addClass('triggerDisclaimer'); 319 $(this).attr("target", "_self"); 320 $(this).attr("href", "/email-disclaimer?email=" + $(this).attr("href")); 321 $(this).attr("target", "_self"); 322 }); 323 }); 324} else if(siteType == "ECOMMERCE") { 325 $(function() { 326 $("img.lazy").lazyload({threshold : 200}); 327 }); 328}
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.