// Hunt Electrical Contractors, Inc
// Copyright 2011 Nathman Studios, LLC. All rights reserved.



function sendValue(txt) {
	$.post("test.php", { "firstname": txt }, function(data){ $("#maintext").html(data); });
}

function displayServices(){
					var bodytextbg = $("#bodytextbg");
					var bodytextmessage = $("#bodytextmessage");


	if(!$("#bodytextbg").is(":animated")) {
		 if(!$("#bodytextmessage").is(":visible")){

			bodytextbg.slideUp(1500, function(){ 
												
												bodytextmessage.html("<font color='white'>Loading...</font>").fadeIn(500);
												$("#bodytextbg").css("height", "543px");
												$("#maintext").load("/beta/services.php");
												
											});
			$(document).ajaxStop(function(){
			bodytextmessage.fadeOut(500, function(){										  
					bodytextbg.slideDown(1500);
					$("#page_name").fadeOut(300, function(){					  
						$("#page_name").css("background-image", "url(/beta/services.png)").fadeIn(300); 
														  });
												 });
										  });
		}
	}
}

function displayAboutUs(){
					var bodytextbg = $("#bodytextbg");
					var bodytextmessage = $("#bodytextmessage");


	if(!$("#bodytextbg").is(":animated")) {
		 if(!$("#bodytextmessage").is(":visible")){

			bodytextbg.slideUp(1500, function(){ 
												
												bodytextmessage.html("<font color='white'>Loading...</font>").fadeIn(500);
												$("#bodytextbg").css("height", "250px");												
												$("#maintext").load("/beta/about_us.php");												
											});
			$(document).ajaxStop(function(){
			bodytextmessage.fadeOut(500, function(){										  
					bodytextbg.slideDown(1500);
					$("#page_name").fadeOut(300, function(){					  
						$("#page_name").css("background-image", "url(/beta/about_us.png)").fadeIn(300); 
														  });
												 });
										  });
		}
	}
}


function displayContactUs(){
					var bodytextbg = $("#bodytextbg");
					var bodytextmessage = $("#bodytextmessage");


	if(!$("#bodytextbg").is(":animated")) {
		 if(!$("#bodytextmessage").is(":visible")){

			bodytextbg.slideUp(1500, function(){ 
												
												bodytextmessage.html("<font color='white'>Loading...</font>").fadeIn(500);
												$("#bodytextbg").css("height", "500px");												
												$("#maintext").load("/beta/contact_us.php");												
											});
			$(document).ajaxStop(function(){
			bodytextmessage.fadeOut(500, function(){										  
					bodytextbg.slideDown(1500);
					$("#page_name").fadeOut(300, function(){					  
						$("#page_name").css("background-image", "url(/beta/contact_us.png)").fadeIn(300); 
														  });
												 });
										  });
		}
	}
}

function widththingy(){
						var bodytext = $("#bodytext");
					var bodytextmessage = $("#bodytextmessage");
					
		if(!$("#bodytext").is(":animated")) {
		 if(!$("#bodytextmessage").is(":visible")){
			 
			 bodytext.toggle(function(){
			 bodytext.animate({height: "1"}, 2000);
							   },
					function(){
			bodytext.animate({height: "500"}, 2000);
							});
 			 bodytext.animate({width: "toggle"}, 2000);
		 }
		}


}
