$(document).ready(function() {
	// External links
	$('a[rel=external]').click(function(event) {
		event.preventDefault();
		window.open($(this).attr('href'));
	});
	
	// Donation form
	if ($('#amount-other').val() == '') {
		$('#amount-other').val('Enter Other Amount');
	}
	
	$('#amount-other').focus(function() {
		if ($(this).val() == 'Enter Other Amount')
			$(this).val('');
	}).blur(function() {
		if ($(this).val() == '')
			$(this).val('Enter Other Amount');
	});
	
	$("#raiseup img").hover(
	 function()
	 {
	  this.src = this.src.replace("_rest","_roll");
	 },
	 function()
	 {
	  this.src = this.src.replace("_roll","_rest");;
	 }
	);
	$("#learnmore img").hover(
	 function()
	 {
	  this.src = this.src.replace("_rest","_roll");
	 },
	 function()
	 {
	  this.src = this.src.replace("_roll","_rest");
	 }
	);
	/*
	$("#video_vision").hover(
	 function()
	 {
	  this.src = this.src.replace("_rest","_roll");
	 },
	 function()
	 {
	  this.src = this.src.replace("_roll","_rest");;
	 }
	);
	$("#video_transform").hover(
	 function()
	 {
	  this.src = this.src.replace("_rest","_roll");
	 },
	 function()
	 {
	  this.src = this.src.replace("_roll","_rest");
	 }
	);
	$("#video_story").hover(
	 function()
	 {
	  this.src = this.src.replace("_rest","_roll");
	 },
	 function()
	 {
	  this.src = this.src.replace("_roll","_rest");
	 }
	);
	*/
	// Interactive components
	$('#video_vision').colorbox({width:673, height:427, opacity:0.35, href:'video.html', onCleanup:function() { $('#cboxLoadedContent').remove(); }});
	$('#video_story').colorbox({width:673, height:427, opacity:0.35, href:'video3.html', onCleanup:function() { $('#cboxLoadedContent').remove(); }});
	$('#video_transform').colorbox({width:673, height:427, opacity:0.35, href:'video2.html', onCleanup:function() { $('#cboxLoadedContent').remove(); }});
	
	$('a[rel=haiti-photos]').colorbox({opacity:0.35, slideshow:true, slideshowSpeed:3500});
	$('a[rel=soccer-photos]').colorbox({opacity:0.35, slideshow:true, slideshowSpeed:3500});
});
