$(document).ready(function() {
	
// Slideshow - settings for the various slideshows
	$('ul#words').cycle({
		timeout:		4000
	});
	
	$('ul#feature').cycle({
		timeout:		6500
	});
	
	
// Donate Form - show/hide the donate form
	$('#form_popup').hide();
		
	$('a.form_popup').click(function(){
		$('#form_popup').hide().fadeIn(250);
		return false;
	});
	
	$("#form_popup a.close").click(function() {
		$('#form_popup').fadeOut(150);
    });
      

// Form List - add a unique class to each item
	$('ul.gcs_list li').each(function() {
		var index = $('ul.gcs_list li').index(this);
		
		$(this).addClass('gcs_'+index+'');
	});
      
      
// Swaps default text area value when in focus
	/*$('input[type="text"]').each(function() {
	    var default_value = this.value;
	    $(this).focus(function() {
	        if(this.value == default_value) {this.value = '';}
	    });
	    $(this).blur(function() {
	        if(this.value == '') {this.value = default_value;}
	    });
	});*/
	
	
// Disables radio buttons for donation if 'other' amount is entered
	$('#gcs_amount').blur(function() {		
		if ( this.value == 0 ) {
			$('li.gcs_6 input').removeAttr('disabled');
		} else {
			$('li.gcs_6 input').attr('disabled','disabled').removeAttr('checked');
		}
	});
	

// Swap the paypal image when hovered
	$('input#gcs_submit').hover(function(){
		$(this).attr('src','i/paypal_button_hover.gif');
		},function(){
		$(this).attr('src','i/paypal_button.gif');
	});

	$('input#gcs_submit').click(function(){
		$('#form_popup').show();
	});


// Add a class for each type of input for IE 6
	$('input[type=text]').addClass('textbox');
	$('input[type=radio]').addClass('radio');
	$('input[type=submit]').addClass('submit');
	$('ul.gcs_list li.gcs_0').find('label:eq(1)').hide();
	
	
	

});



	
