PageSourceSearch

https://www.decorah.bank/Portals/_default/skins/decorahbank/Js/custom.js?cdv=190

js decorah.bank collected 2026-10-09 22:59:41 UTC 11,353 bytes, 303 lines download raw bytes

1$(document).ready(function() {
2		
3      //#selectdepartment custom staff module
4  $("#selectDepartment").on("change", function() {
5    var ind = $(this).prop("selectedIndex");
6    if (ind > 0) {
7      window.open($(this).children("option").eq(ind).attr("value"), "_self");
8    }
9  });    
10//add active class to menu	
11    $(".icons button.navbar-toggle").on("click", function() {
12        $(this).toggleClass("active");
13    });
14
15    //inject menucontents
16    $('.MenuContent').each(function(i) {
17        $(this).appendTo('#megamenu > li:nth-child(' + (i + 1) + ') .menushadow').show();
18    });
19	
20	//toggle search
21	$(".searchicon").on("click", function() {
22      $("#search").toggle();
23    });
24	$(".alertClose").on("click", function() {
25      $(".alertBar").slideUp("slow");
26    });
27	
28	//branches toggle
29	 $("a.locationlink,.closeiconx").click(function(event) {
30        $(".locationListingHead").toggle();
31    });
32	$(".loginBtn,.AccountLoginBtn").on("click", function() {
33		$(".whitewrapper").show();
34        $(".olbTop").slideToggle();
35	});
36	$(".loginX").on("click", function() {
37		 $(".olbTop").slideToggle();
38		$(".whitewrapper").hide();
39	});
40	
41		
42	//dnn edit mode
43	if ($("#personaBar-iframe").length > 0) {
44         $('#Body').addClass("loggedin");
45		  $('#TopHeader').removeClass("sticky");
46    }
47	//hide footer logo on wealth blogs - detail view
48	if ($('#WealthManagement a:contains("Wealth Management")').length > 0) {
49    	$('footer .FDICLogo').addClass("d-none");
50	}
51	if ($('#WealthManagement a:contains("Investments")').length > 0) {
52    	$('footer .FDICLogo').addClass("d-none");
53	}
54	
55	//hide footer logo on wealth blogs - category url
56	 var loc = window.location.href; // returns the full URL
57	  if(/wealth-management/.test(loc)) {
58		$('footer .FDICLogo').addClass("d-none");
59	  }
60	   var loc = window.location.href; // returns the full URL
61	  if(/investments/.test(loc)) {
62		$('footer .FDICLogo').addClass("d-none");
63	  }
64	//calculator toggle
65	$('#togglecalculator').click(function() {
66		$('.togglecalculator').slideToggle('fast');
67		return false;
68	});
69	//if ($("#BlogDetail").length > 0) {
70    //     $('#FullBlog').addClass("fullength");
71    //}
72	
73 //scrollTop
74    $("a.smoothScroll").on("click", function() {
75        $("html, body").animate({
76            scrollTop: $($.attr(this, "href")).offset().top - 5
77        }, "slow");
78        return false;
79    });
80	$('a[href*="https://orderpoint.deluxe.com/personal-checks/welcome.htm"]').addClass("speedbump");
81	$('a[href*="https://decorahbank.banzai.org/wellness"]').addClass("speedbump");
82	
83	
84    //speedbump
85    $('a.speedbump').on('click', function(e) {
86        e.preventDefault();
87        //var extclicked = $(this);
88        var linkurl = $(this).attr('href');
89        $('.extlinkContent').html('<h2 style="text-align:center;">External Link Disclaimer</h2><p style="text-align:center;">You are now leaving the Decorah Bank website. Decorah Bank neither endorses nor controls third-party website content and is not liable for any products or services advertised there. Each third-party site may have a different privacy policy, and their security measures may be less robust than those of Decorah Bank.</p><p style="text-align:center;"><a class="BlueOrange_Btn" href="' + linkurl + '" target="_blank" style="margin-right:1em;">Continue</a><a class="BlueOrange_Btn" href="">Cancel</a></p>');
90        $('.popupBG').show();
91        $('.extlinkContent a.BlueOrange_Btn:nth-child(1)').on('click', function() {
92            $('.extlinkContent').html('');
93            $('.popupBG').hide();
94        });
95        $('.extlinkContent a.BlueOrange_Btn:nth-child(2)').on('click', function(e) {
96            e.preventDefault();
97            $('.extlinkContent').html('');
98            $('.popupBG').hide();
99        });
100    });
101	
102	//youtube video embed
103	 var video_wrapper = $('.youtube-video-place');
104	if(video_wrapper.length){
105	$('.youtube-video-place').on('click', function(){
106	$('#'+this.id).html('<iframe allowfullscreen allow="autoplay" frameborder="0" class="embed-responsive-item" src="' + $(this).data("yt-url") + '"></iframe>');});}
107 //vimeo embed
108    var video_wrappervimeo = $('.vimeo-video-place');
109    if(video_wrappervimeo.length){
110    $('.vimeo-video-place').on('click', function(){
111    $('#'+this.id).html('<iframe allowfullscreen allow="autoplay" class="embed-responsive-item" src="' + $(this).data("vimeo-url") + '"></iframe>');});}
112	
113	//checking height for Bamkers h3
114	var maxHeight = 0;
115	$(".Bankers h3").each(function(){
116	   if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
117	});
118	$(".Bankers h3").height(maxHeight);	
119	// checking height for box
120    $('.Bankers').each(function(){  
121      // Cache the highest
122      var highestBox = 0;
123      // Select and loop the elements you want to equalise
124      $('.Bankers', this).each(function(){
125        // If this box is higher than the cached highest then store it
126        if($(this).height() > highestBox) {
127          highestBox = $(this).height(); 
128        }
129      });  
130     // Set the height of all those children to whichever was highest 
131      $('.Bankers',this).height(highestBox);                
132    });  
133	
134	//checking height for Bamkers p
135	var maxHeight = 0;
136	$(".Bankers .content p:nth-child(2)").each(function(){
137	   if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
138	});
139	$(".Bankers .content p:nth-child(2)").height(maxHeight);	
140	// checking height for box
141    $('.Bankers .content p:nth-child(2)').each(function(){  
142      // Cache the highest
143      var highestBox = 0;
144      // Select and loop the elements you want to equalise
145      $('.Bankers .content p:nth-child(2)', this).each(function(){
146        // If this box is higher than the cached highest then store it
147        if($(this).height() > highestBox) {
148          highestBox = $(this).height(); 
149        }
150      });  
151     // Set the height of all those children to whichever was highest 
152      $('.Bankers .content p:nth-child(2)',this).height(highestBox);                
153    });  
154	
155	
156	
157	 //Hide email address
158	$(".email-address").on("click touchstart", function() {
159		var x = $(this).data("email")+"@"+$(this).data("address");
160		$(this).attr("href", "mailto:"+x).attr("title", x);
161	});
162	
163		
164}); //end ready
165
166
167$(window).load(function(){
168//alertbar css
169	if($('.alertBar').css('display') == 'block')
170	{
171		 $('.heightsection').addClass("taller");
172	} 
173	
174	$(".alertClose").on("click touchstart", function() {
175		 $('.heightsection').removeClass("taller");
176	});
177	
178	if (window.location.href.indexOf('category') > -1){
179         $(".TopArtSection").addClass("hidden");
180    }
181}); //end load
182
183$(document).scroll(function() {
184	 if ($(this).scrollTop() > 300) {
185      $("#scrollTopBtn").fadeIn();
186    } else {
187      $("#scrollTopBtn").fadeOut();
188    }
189	//sticky header
190	window.onscroll = function() {myFunction()};
191
192var header = document.getElementById("TopHeader");
193var sticky = header.offsetTop;
194
195function myFunction() {
196  if (window.pageYOffset > sticky) {
197    header.classList.add("sticky");
198  } else {
199    header.classList.remove("sticky");
200  }
201}
202});//end scroll function
203
204$(window).scroll(function(){
205    if ($(this).scrollTop() > 50) {
206        $('#dnn_TopBannerNote').slideUp('fast');
207    } else {
208        $('#dnn_TopBannerNote').slideDown('fast');
209    }
210   $("#personaBar-iframe #dnn_TopBannerNote").stop();
211		 
212
213});
214
215//ONLINE BANKING LOGIN START
216
217function doQ2Login() {
218    //Get the inputs
219    var username = $('#dnnBankLoginUsername_Q2').val();
220    var password = $('#dnnBankLoginPassword_Q2').val();
221
222    //Update the actual form
223    $('#user_id').val(username);
224    $('#password').val(password);
225
226    //Submit their form
227    $('#Q2OnlineLogin').submit();
228}
229
230
231// Submit Login Form with Enter Key:
232$(document).ready(function(){
233    $('body').on('keydown', function(e) {
234        if (e.keyCode === 13) {
235                e.stopPropagation();
236                e.preventDefault();
237                e.stopImmediatePropagation();
238                if ($('.olbTop').css('display') == 'block' && $('.olbTop #personal').css('display') == 'block') {
239                    $('#dnnBankLoginSubmit_Q2').trigger('click');
240                } else if ($('.AccountLogin #business').css('display') == 'block' && $('#loginBox').css('display') == 'block') {
241                    $('#dnnBankLoginSubmit_Business').trigger('click');
242                }
243                return false;
244        }
245    });
246 });
247
248// Start Login Selector
249$(document).ready(function() {
250	//eye icon in password field tap function
251		const togglePassword = document.querySelector('#togglePassword');
252  const password = document.querySelector('#dnnBankLoginPassword_Q2');
253 
254  togglePassword.addEventListener('click', function (e) {
255    // toggle the type attribute
256    const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
257    password.setAttribute('type', type);
258    // toggle the eye slash icon
259    this.classList.toggle('fa-eye-slash');
260});
261    // Online Banking Login select change options
262    $("#onlineBankingLogin").on("change", function() {
263        switch ($.trim($(this).val())) {
264            case "0":
265                $("#personal").show();
266                $("#wealth_management,#trust_services").hide();
267                break;
268            case "1":
269                // Wealth management
270                $("#wealth_management").show();
271                $("#personal,#trust_services").hide();
272                break;
273            case "2":
274                // Trust Services
275                $("#trust_services").show();
276                $("#personal,#trust_services").hide();
277                break;    
278        }
279    });
280    $("#onlineBankingLogin").on("change", function() {
281        var end = this.value;
282        if (end == "1") { showspeedbump('https://myaccountviewonline.com/login/'); }
283        if (end == "2") { showspeedbump('https://trust.accessasc.com/Account/Login?ReturnUrl=%2F'); }
284    });
285
286});
287// END Login Selector
288
289// Start Speedbump for Login Links
290function showspeedbump(linkurl) {
291    $('.extlinkContent').html('<h2 style="text-align:center;">External Link Disclaimer</h2><p style="text-align:center;">You are now leaving the Decorah Bank website. Decorah Bank neither endorses nor controls third-party website content and is not liable for any products or services advertised there. Each third-party site may have a different privacy policy, and their security measures may be less robust than those of Decorah Bank.</p><p style="text-align:center;"><a class="BlueOrange_Btn" href="' + linkurl + '" target="_blank" style="margin-right:1em;">Continue</a><a class="BlueOrange_Btn" href="">Cancel</a></p>');
292        $('.popupBG').show();
293        $('.extlinkContent a.BlueOrange_Btn:nth-child(1)').on('click', function() {
294            $('.extlinkContent').html('');
295            $('.popupBG').hide();
296        });
297        $('.extlinkContent a.BlueOrange_Btn:nth-child(2)').on('click', function(e) {
298            e.preventDefault();
299            $('.extlinkContent').html('');
300            $('.popupBG').hide();
301        });
302}
303// End Speedbump for Login Links

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.