PageSourceSearch

https://www.unionbankandtrust.com/scripts/global.js?v=1791460800

js unionbankandtrust.com collected 2026-10-09 22:41:39 UTC 11,611 bytes, 318 lines download raw bytes

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

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.