// JavaScript Document

$(document).ready(function(){
        

	// validation handler for contact form
	$("#form-contact, #form-signup").validate({		
		errorContainer: "#validation",
		focusCleanup: false
	});
	
	// Rollover effect for main nav
	$("ul#main-nav li").hover(function() {		
		$(this).find('a').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
			.animate({
				backgroundPosition: '(0 -10px)'
			}, 400); /* this value of "200" is the speed of how fast/slow this hover animates */
	
		} , function() {		
		$(this).find('a').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
			.animate({
				backgroundPosition: '(0 0)'
			}, 300);
	});
	
	// Rollover effect for subtle buttons
	$("div#header ul.top li.subtle a").hover(function() {		
		$(this).addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
			.animate({
				backgroundPosition: '(0 0px)'
			}, 400); /* this value of "200" is the speed of how fast/slow this hover animates */
	
		} , function() {		
		$(this).removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
			.animate({
				backgroundPosition: '(0 -10px)'
			}, 300);
	});  
	
	// Rollover effect for standard buttons
	$("div#container a.button, div#header ul.top li:not(.subtle) a").hover(function() {		
		$(this).addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
			.animate({
				backgroundPosition: '(0 -10px)'
			}, 400); /* this value of "200" is the speed of how fast/slow this hover animates */
	
		} , function() {		
		$(this).removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
			.animate({
				backgroundPosition: '(0 0)'
			}, 300);
	});  
	

});

