window.addEvent('domready', function() {


	var alertLinks 		= $$( "a.warn" );
	var confirmLinks 	= $$( "a.confirm" );
	var adviseLinks 	= $$( "a.advise" );

	alertLinks.each(function(element, i) {
		element.addEvent('click', function( event ){
    	event = new Event(event);
			if( confirm("Please be advised that you are leaving the main Nanthala Bank & Trust website and moving to another website operated by Nantahala Bank & Trust Company.") ) {
				return true;
			} else {
				event.stop();
				return false;
			}

		});
	});

	confirmLinks.each(function(element, i) {
		element.addEvent('click', function( event ){
    	event = new Event(event);
			if( confirm("Please be advised that you are leaving Nantahala Bank & Trust Company's website. This link is provided as a courtesy.  Nantahala Bank & Trust Company does not endorse or control the content of third party websites.") ) {
				return true;
			} else {
				event.stop();
				return false;
			}

		});
	});
	
	adviseLinks.each(function(element, i) {
		element.addEvent('click', function( event ){
    	event = new Event(event);
			if( confirm("Please be advised that you are leaving the main Nanthala Bank & Trust website and moving to another website operated by Nantahala Bank & Trust Company.") ) {
				return true;
			} else {
				event.stop();
				return false;
			}

		});
	});
 	
 
});
