Event.observe(window, 'load', function() {

	Event.observe('nb_give', 'mouseover', function () {
		reset_nb_receive();
		reset_nb_share();
		$('nbg_off').hide();
		$('nbg_on').show();
		Event.observe('nb_give', 'click', function() { window.location = '/give'; });
	});
	
	Event.observe('nb_give', 'mouseout', function() {
		$('nbg_on').hide();
		$('nbg_off').show();
	});
	
	
	Event.observe('nb_receive', 'mouseover', function () {
		reset_nb_give();
		reset_nb_share();
		$('nbr_off').hide();
		$('nbr_on').show();
		Event.observe('nb_receive', 'click', function() { window.location = '/receive'; });
		
	});
	
	Event.observe('nb_receive', 'mouseout', function () {
		reset_nb_receive();
		$('nbg_on').hide();
		$('nbg_off').show();
	});
	
	Event.observe('nb_share', 'mouseover', function () {
		reset_nb_give();
		reset_nb_receive();
		$('nbs_off').hide();
		$('nbs_on').show();
		Event.observe('nb_share', 'click', function() { window.location = '/share-your-story'; });
		
	});
	
	Event.observe('nb_share', 'mouseout', function() {
		reset_nb_share();
		$('nbg_on').hide();
		$('nbg_off').show();
	});
	
	function reset_nb_give() {
		$('nbg_off').show();
		$('nbg_on').hide();
		Event.observe('nb_give', 'mouseover', function() { if(!this.hasClassName('nb_current')) this.style.backgroundColor = '#631a48'; } );
		Event.observe('nb_give', 'mouseout', function() { if(!this.hasClassName('nb_current')) this.style.backgroundColor = '#b2aba5'; } );
		Event.observe('nb_give', 'click', function () {
			reset_nb_receive();
			reset_nb_share();
			$('nbg_off').hide();
			$('nbg_on').show();
			Event.observe('nb_give', 'click', function() { window.location = '/give'; });
		});
	}
	
	function reset_nb_receive() {
		$('nbr_off').show();
		$('nbr_on').hide();
		Event.observe('nb_receive', 'mouseover', function() { if(!this.hasClassName('nb_current')) this.style.backgroundColor = '#cccc00'; } );
		Event.observe('nb_receive', 'mouseout', function() { if(!this.hasClassName('nb_current')) this.style.backgroundColor = '#b2aba5'; } );
		Event.observe('nb_receive', 'click', function () {
			reset_nb_give();
			reset_nb_share();
			$('nbr_off').hide();
			$('nbr_on').show();
			Event.observe('nb_receive', 'click', function() { window.location = '/receive'; });
		});
	}
	
	function reset_nb_share() {
		$('nbs_off').show();
		$('nbs_on').hide();
		Event.observe('nb_share', 'mouseover', function() { if(!this.hasClassName('nb_current')) this.style.backgroundColor = '#6698cb'; } );
		Event.observe('nb_share', 'mouseout', function() { if(!this.hasClassName('nb_current')) this.style.backgroundColor = '#b2aba5'; } );
		Event.observe('nb_share', 'click', function () {
			reset_nb_give();
			reset_nb_receive();
			$('nbs_off').hide();
			$('nbs_on').show();
			Event.observe('nb_share', 'click', function() { window.location = '/share-your-story'; });
		});
	}
});
var snda = new Image(); snda.src='/images/sn_donate_off.jpg';
var sndb = new Image(); sndb.src='/images/sn_donate_on.jpg';
var snca = new Image(); snca.src='/images/sn_contact_off.jpg';
var sncb = new Image(); sncb.src='/images/sn_contact_on.jpg';
var snsa = new Image(); snsa.src='/images/sn_share_off.jpg';
var snsb = new Image(); snsb.src='/images/sn_share_on.jpg';