// Imulus Global Javscript Code

// Create an external link icon using an image
$(document).ready(function() {
	// Open all external links in a new window
	$('a[href^="http://"],a[href^="https://"]').filter(function() {
		 return this.hostname && this.hostname !== location.hostname;
	}).attr('target', '_blank');
			
	// Tell them they're leaving the site
	$('a[href^="http://"]:not(a.exclude-external),a[href^="https://"]:not(a.exclude-external)').filter(function() {
		 return this.hostname && this.hostname !== location.hostname;
	}).click(function(e) {
		return leaving();
	});
	
	function leaving() {
		return confirm("The 'Continue' link below will take you out of the Young Americans Bank and affiliates website (collectively 'Young Americans')." + '\n \n' + "Links which take you out of Young Americans web site are not under the control of the Young Americans, and the Young Americans are not responsible for the contents of any such site or any further links from such site." + '\n \n' + "Young Americans is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement of the linked site by Young Americans.");
	}
});
