$(function() {
	/* These functions adds a disclosure to all off site links */
	var links;
	linkDisclosure = 	"You are now leaving the credit union's Web site. " +
						"The Web site you have selected is an external one located on another server." +
						"The credit union has no responsibility for any external Web site. " +
						"It neither endorses the information, content, presentation, or accuracy nor makes any warranty, " +
						"express or implied, regarding any external site. Thank you for visiting our website.";
	
	function addLinkDisclosure () {
		if(!document.getElementsByTagName || !document.domain) return false; // exit if we can't do it
		
		var offSite = new Array; 								// For our link that lead off site
		var domain = document.domain;							// The domain of the current document
		domain = domain.replace('www.', '');					// To make things consistant take out "www."
		var domainRegex = new RegExp(domain+"|mailto|itsme247.com", "i"); 	// Cuz vars in /regexes/ can be sticky
		links = document.getElementsByTagName('A'); 			// An array of all our page link objects
		for(var i=0; i<links.length; i++) {
			if(!links[i].href.match(domainRegex)) {
				offSite.push(links[i].href);
				links[i].target = "_blank";
				links[i].onclick = function () {
					return window.confirm(linkDisclosure);
				}
			}
		}
	}
	
	addLinkDisclosure();
});