/*
	Main Javascript File
	Cazarin Web Group	
*/

$(function(){
	
	// floorplan table actions
	$(".floorPlans tbody tr").hover(
		function(){
			$(this).addClass("rowHover");
		},
		function(){
			$(this).removeClass("rowHover");
		}
	);
	
	$(".floorPlans tbody tr").click(function(){
		var rowLink = $(this).find("a").attr("href");
		if (rowLink){
			window.location=rowLink;
		}
		
	});
		
	$("#getDirections").toggle(
		function(){
			$(this).next("div").slideDown();
			return false;
		},
		function(){
			$(this).next("div").slideUp();
			return false;
		}
	);

});

function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
}

function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}
