jQuery().ready(function(){
	jQuery('#navigation').Accordion({
		active: false,									
		header: '.head',
		navigation: true,
		autoheight: false
	});
	jQuery('#switch select').change(function() {
		jQuery('#list1, #list2, #list3, #navigation').activate( this.selectedIndex-1 );
	});
	jQuery('#close').click(function() {
		jQuery('#list1, #list2, #list3, #navigation').activate(-1);
	});
	jQuery('#switch2').change(function() {
		jQuery('#list1, #list2, #list3, #navigation').activate(this.value);
	});

	//pulls id from filename and assigns to wrapper
	str1 = location.href;
	file1="nodef";
	file1=(str1.split("/"))[(str1.split("/")).length-1];
	file1=file1.split(".")[(file1.split(".")).length-2];
	$("body").addClass(file1);
	if ($("#feat-photo").css("background-image") == "none") { $("#feat-photo").css("background-image",  "url(images/feat-ph-default.jpg)") }
});
function branchWin (URL) {
	$("#branch-2").load("branches/br-" + URL + " #branch");
	$("#branch-ctn").animate({
		height: 'toggle', opacity: 'toggle'
	}, "slow");
}
function timeline () {
	newWin = window.open("timeline.html","timeline","width=700,height=332,resizable=0,menubar=0,status=0,toolbar=0");
	newWin.focus();
}
function rdPopup () {
	newWin = window.open("rd/fidelitybank.html","RD","width=664,height=478,resizable=0,menubar=0,status=0,toolbar=0");
	newWin.focus();
}
function checkForAst () {
	
}

var warningmsg = "Notice:  By accessing this link you will be leaving the Fidelity Bank Website.  The Bank is not responsible for and has no control over the subject matter, content, information or graphics of the Website that is linked here.  Our privacy and security policies do not apply to the linked Website and you should consult the privacy and security disclosures of that site for further information.";
var warningmsgPdf = "Please note there are several external links on the document you are about to view and by clicking on any of these links you will be leaving the Fidelity Bank website. The Bank is not responsible for and has no control over the subject matter, content, information or graphics of the websites that are linked here. Our privacy and security policies do not apply to the linked website(s) and you should consult the privacy and disclosures of that site for further information.";
var testimonial_foot = ''; 
var asteriskmsg = "Welcome to the new Fidelity Bank online banking environment.  On the old system, your login id contained one or more \" * \" symbols.  On the new system, you will be required to replace any \" * \" symbols with a \" # \".  Please continue the login process by entering your login id so that it meets the new guidelines.";

$(function() {
	$(".ext").click(function () { 
		if (!confirm(warningmsg)) return false;
    });
	$(".ext-pdf").click(function () { 
		if (!confirm(warningmsgPdf)) return false;
    });
	$("p.quote").before('<img src="images/testimonials_hd.png" alt="" class="quote-hd" />').after('<img src="images/testimonials_ft.png" alt="" class="quote-ft" />');

	$("#form0").submit(function() {
		var mySTR = $("#fiduserid").val();
		if (mySTR.match("\\*") != null){
			alert(asteriskmsg);
			return false;
		} 
      })
	
	
});	