// JavaScript Document

// FORM checking
jQuery( function($) {
	
	
	/***** NAV MENU (Superfish) ****/
	$('ul.sf-menu').superfish({
		delay: 0,
		dropShadows: true
	});
	
	$('ul.sf-menu').highlightNav({
		topLevelOnly: true
	});
	
	
	/***** CONTACT FORM ****/
	
	$('#contact_form').validate();
	
	// blur Selects on change, so that their validation is updated.
	$('#contact_form select').change( function() { this.blur(); });



	/****** HOVER IMAGE OPACITY *****/

	$(".hoverme").css('opacity', 0.7);
	$(".hoverme").hover(
		function(e){											  
			$(this).css('opacity', 1);
		 },
		function(){
			$(this).css('opacity', 0.7);
		 });	


	$("#photogrid img").css('opacity', 0.9);
	$("#photogrid img").hover(
		function(e){											  
			$(this).css('opacity', 1);
		 },
		function(){
			$(this).css('opacity', 0.9);
		 });	
	
	
	/*******  ORDER FORM (and donate form) *******/
	$('#orderform').submit(function() {
		
		// Set Shopping URL
		$('#shopping_url').val( window.location );
		
		return true;
	});
	
	
	/**** SLIDESHOW (Home page) ******/
	$('.slideshow').cycle({
		speed: 'slow'
	});

});
