	function validatefin() {
		if(validate_company_name($("#company_name").val()) == false) { return false };
		if(validate_first_name($("#first_name").val()) == false) { return false };
		if(validate_last_name($("#last_name").val()) == false) { return false };
		if(validate_phone($("#phone").val()) == false) { return false };
		if(validate_email($("#email").val()) == false) { return false };
		if(validate_address($("#address").val()) == false) { return false };
		if(validate_zip($("#zip").val()) == false) { return false };
		if(validate_business_desc($("#business_desc").val()) == false) { return false };
		if(validate_project_desc($("#project_desc").val()) == false) { return false };
		if(validate_menu_items($("#menu_items").val()) == false) { return false };
		if(validate_three_sites($(".three_sites:eq(0)").val(), 0) == false) { return false };
		if(validate_three_sites_why($(".three_sites_why:eq(0)").val(), 0) == false) { return false };
		if(validate_three_sites($(".three_sites:eq(1)").val(), 1) == false) { return false };
		if(validate_three_sites_why($(".three_sites_why:eq(1)").val(), 1) == false) { return false };
		if(validate_three_sites($(".three_sites:eq(2)").val(), 2) == false) { return false };
		if(validate_three_sites_why($(".three_sites_why:eq(2)").val(), 2) == false) { return false };
		if(validate_color_pref($(".color_pref:eq(0)").val(), 0) == false) { return false };
		if(validate_color_pref($(".color_pref:eq(1)").val(), 1) == false) { return false };
		if(validate_color_pref($(".color_pref:eq(2)").val(), 2) == false) { return false };
		if(validate_color_pref($(".color_pref:eq(3)").val(), 3) == false) { return false };
		if(validate_graphics_desc($("#graphics_desc").val()) == false) { return false };
		return true;
	}
	
	function postitfin() {
		if(validatefin() == true) {
			var ajax = true;
			if(ajax == true) {
				$.post("other_sec.php", $("#infoSheetForm").serialize(), function(data){
					 $("#save_status").html(data);  
				});
			} else {
				document.infoSheetForm.submit();
			}
		} else {
			$("#save_status").html("There were errors submitting the form. Try again.<br /><br /><br />");	
		}
	}
function closetext() {
	$('#textspace').fadeOut();
}

function opentext(menu_item) {
	$('#textspace').fadeIn();
	$('#text_titleu').focus();
	$('#menu_itema').val(menu_item);
}

function savetext() {
	alert("Text saved");
	closetext();
}

function logogo() {
	alert("Page will refresh in 5 seconds");
	document.logo_upform.submit(); 
	setTimeout("window.location = 'index.php?page=client&page2=4'", 5000);
}

function picturesup() {
	alert("Page will refresh in 5 seconds");
	document.picturesform.submit(); 
	setTimeout("window.location = 'index.php?page=client&page2=4'", 5000);
}

function move() {
	$('#finalme').hide();
	$('#save_status').html(''); 
	window.location = 'index.php';
}

$(document).ready(function() {
	$("#infoMenu div").css({color: 'black'});
	$("#infoMenu div:eq(0)").css({color: 'red'});
	$("#infoSheet div.sheetss").hide();
	$("#infoSheet div.sheetss").eq(0).fadeIn('slow');
	$("#infoSheet div.sheetss:eq(3) table").css({float: 'left'});

	$("#infoMenu div").css("cursor","pointer");
	$("#infoMenu div").click(function() {
		index = $(this).index();
		$("#infoMenu div").css({color: 'black'});
		$(this).css({color: 'red'});
		$("#infoSheet div.sheetss").hide();
		$("#infoSheet div.sheetss").eq(index).fadeIn('slow');
	});

//save text stuff
	$("#text_titleu").blur(function() {
		$("#text_title").val($("#text_titleu").val());
	});


//clear default value of text box when clicked
	for(a = 0; a < $("input").length; a++) {
		if($("input:eq(" + a + ")").attr("type") != "file") {
			$("input:eq(" + a + ")").css("opacity","0.5");
		}

	}

	$("input").focus(function() {
		if($(this).val().indexOf("---") > -1) {
			$(this).val("");
		}
		$(this).css("opacity","1");

	});

	$("input").blur(function() {
		if($(this).val().length < 1) {
			$(this).val($(this).attr("title"));
			$(this).css("opacity","0.5");
			$(".color_pref").css("opacity", "1");
		} else {
			$(".color_pref").css("opacity", "1");
		}
	});

	$(".color_pref").change(function() {
		$(this).css("opacity", "1");
	});	


//tooltips

	//personal
	$('#infoMenu div:eq(0)').qtip({
	   content: 'This section aims to get basic information about you and your business',
	   show: 'mouseover',
	   hide: 'mouseout',
	   position: {
		  corner: {
			 target: 'right',
			 tooltip: 'leftMiddle'
			 }
	   },
	   style: {
		  border: {
			  width: 3,
			  radius: 8,
			  color: 'black'
  	      },
		  background: '#6699CC',
		  color: 'white'
		}
	
	});

	//project overview
	$('#infoMenu div:eq(1)').qtip({
	   content: 'This section aims to get an overall perspective on your project in order to see what exactly you need',
	   show: 'mouseover',
	   hide: 'mouseout',
	   position: {
		  corner: {
			 target: 'right',
			 tooltip: 'leftMiddle'
			 }
	   },
	   style: {
		  border: {
			  width: 3,
			  radius: 8,
			  color: 'black'
  	      },
		  background: '#6699CC',
		  color: 'white'
		}
	
	});


	//design
	$('#infoMenu div:eq(2)').qtip({
	   content: 'This section aims to get a feel for how you want your project to look',
	   show: 'mouseover',
	   hide: 'mouseout',
	   position: {
		  corner: {
			 target: 'right',
			 tooltip: 'leftMiddle'
			 }
	   },
	   style: {
		  border: {
			  width: 3,
			  radius: 8,
			  color: 'black'
  	      },
		  background: '#6699CC',
		  color: 'white'
		}
	
	});

	//site technical
	$('#infoMenu div:eq(3)').qtip({
	   content: 'This section aims to find out all the functionality / features you will be expecting to be implented into your project',
	   show: 'mouseover',
	   hide: 'mouseout',
	   position: {
		  corner: {
			 target: 'right',
			 tooltip: 'leftMiddle'
			 }
	   },
	   style: {
		  border: {
			  width: 3,
			  radius: 8,
			  color: 'black'
  	      },
		  background: '#6699CC',
		  color: 'white'
		}
	
	});



});
