$(document).ready(function() {

	/* slide headers into place */
      jQuery(".feature1 h1").show("slide", { direction: "right" }, 1000);
      jQuery(".feature2 h1").delay(100).show("slide", { direction: "right" }, 1000);
      jQuery(".feature3 h1").delay(200).show("slide", { direction: "right" }, 1000); 	

});/*close document.ready */

jQuery(function() {    

/* rollovers for the feature1 copy */
	jQuery(".feature1 h1").click(function(){
		jQuery(".feature1_copy").animate({left:'0px'},{queue:false,duration:500});
	});
	jQuery(".feature1 h1").click(function(){
		jQuery(this).animate({left:'704px'},{queue:false,duration:500});
	});
	
	jQuery(".feature1 #reset_feature").click(function(){
		jQuery(".feature1_copy").animate({left:'704px'},{queue:false,duration:500});
	});
	jQuery(".feature1 #reset_feature").click(function(){
		jQuery(".feature1 h1").animate({left:'450px'},{queue:false,duration:500});
	});
	
	jQuery(".feature1 h1").hover(function(){
		jQuery(this).addClass("h1_hover");
	}, function(){
		jQuery(this).removeClass("h1_hover");
	});
	jQuery(".feature1 #reset_feature").hover(function(){
		jQuery(this).addClass("reset_hover");
	}, function(){
		jQuery(this).removeClass("reset_hover");
	});

/* rollovers for the feature2 copy */
	jQuery(".feature2 h1").click(function(){
		jQuery(".feature2_copy").animate({left:'0px'},{queue:false,duration:500});
	});
	jQuery(".feature2 h1").click(function(){
		jQuery(this).animate({left:'704px'},{queue:false,duration:500});
	});
	
	jQuery(".feature2 #reset_feature").click(function(){
		jQuery(".feature2_copy").animate({left:'704px'},{queue:false,duration:500});
	});
	jQuery(".feature2 #reset_feature").click(function(){
		jQuery(".feature2 h1").animate({left:'350px'},{queue:false,duration:500});
	});
	
	jQuery(".feature2 h1").hover(function(){
		jQuery(this).addClass("h1_hover");
	}, function(){
		jQuery(this).removeClass("h1_hover");
	});
	jQuery(".feature2 #reset_feature").hover(function(){
		jQuery(this).addClass("reset_hover");
	}, function(){
		jQuery(this).removeClass("reset_hover");
	});	
	
/* rollovers for the feature3 copy */
	jQuery(".feature3 h1").click(function(){
		jQuery(".feature3_copy").animate({left:'0px'},{queue:false,duration:500});
	});
	jQuery(".feature3 h1").click(function(){
		jQuery(this).animate({left:'704px'},{queue:false,duration:500});
	});
	
	jQuery(".feature3 #reset_feature").click(function(){
		jQuery(".feature3_copy").animate({left:'704px'},{queue:false,duration:500});
	});
	jQuery(".feature3 #reset_feature").click(function(){
		jQuery(".feature3 h1").animate({left:'400px'},{queue:false,duration:500});
	});
	
	jQuery(".feature3 h1").hover(function(){
		jQuery(this).addClass("h1_hover");
	}, function(){
		jQuery(this).removeClass("h1_hover");
	});
	jQuery(".feature3 #reset_feature").hover(function(){
		jQuery(this).addClass("reset_hover");
	}, function(){
		jQuery(this).removeClass("reset_hover");
	});

/* rollovers for the bottom nav */
	/* home 43 */
	jQuery(".menu-item-43").hover(function(){
		jQuery("ul.footer_photo li.footer_photo43 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo43 img").removeClass("top");
	});
	/* photo gallery 41 */
	jQuery("#footer .menu-item-41").hover(function(){
		jQuery("ul.footer_photo li.footer_photo41 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo41 img").removeClass("top");
	});
	/* The ranches 39 */
	jQuery("#footer .menu-item-39").hover(function(){
		jQuery("ul.footer_photo li.footer_photo39 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo39 img").removeClass("top");
	});
	/* voices 468 */
	jQuery("#footer .menu-item-468").hover(function(){
		jQuery("ul.footer_photo li.footer_photo468 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo468 img").removeClass("top");
	});
	/* about us 48 */
	jQuery("#footer .menu-item-48").hover(function(){
		jQuery("ul.footer_photo li.footer_photo48 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo48 img").removeClass("top");
	});
	/* videos 38 */
	jQuery("#footer .menu-item-38").hover(function(){
		jQuery("ul.footer_photo li.footer_photo38 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo38 img").removeClass("top");
	});
	/* administration 47 */
	jQuery("#footer .menu-item-47").hover(function(){
		jQuery("ul.footer_photo li.footer_photo47 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo47 img").removeClass("top");
	});
	/* Vitual Tour 37 */
	jQuery("#footer .menu-item-37").hover(function(){
		jQuery("ul.footer_photo li.footer_photo37 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo37 img").removeClass("top");
	});
	/* history 44 */
	jQuery("#footer .menu-item-44").hover(function(){
		jQuery("ul.footer_photo li.footer_photo44 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo44 img").removeClass("top");
	});
	/* news 42 */
	jQuery("#footer .menu-item-42").hover(function(){
		jQuery("ul.footer_photo li.footer_photo42 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo42 img").removeClass("top");
	});
	/* upcoming events 45 */
	jQuery("#footer .menu-item-45").hover(function(){
		jQuery("ul.footer_photo li.footer_photo45 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo45 img").removeClass("top");
	});
	/* contact 46 */
	jQuery("#footer .menu-item-46").hover(function(){
		jQuery("ul.footer_photo li.footer_photo46 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo46 img").removeClass("top");
	});
	/* publications 40 */
	jQuery("#footer .menu-item-40").hover(function(){
		jQuery("ul.footer_photo li.footer_photo40 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo40 img").removeClass("top");
	});
	/* ways to help 133 */
	jQuery("#footer .menu-item-133").hover(function(){
		jQuery("ul.footer_photo li.footer_photo133 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo133 img").removeClass("top");
	});
	/* family builders 134 */
	jQuery("#footer .menu-item-134").hover(function(){
		jQuery("ul.footer_photo li.footer_photo134 img").addClass("top");
	}, function(){
		jQuery("ul.footer_photo li.footer_photo134 img").removeClass("top");
	});

});

$.fn.delay = function(time, callback){
    // Empty function:
    jQuery.fx.step.delay = function(){};
    // Return meaningless animation, (will be added to queue)
    return this.animate({delay:1}, time, callback);
}
