// JavaScript Document
$(document).ready(function() {
    $('#LeftYourName').focus(function(){
	  if ($(this).val() == 'Name'){
	  $(this).val("");
	  }
	});
	$('#LeftYourName').blur(function(){
	  if ($(this).val() == ""){
	  $(this).val('Name');
	  }
	});	
	$('#LeftEmailAddress').focus(function(){
	  if ($(this).val() == 'Email'){
	  $(this).val("");
	  }
	});
	$('#LeftEmailAddress').blur(function(){
	  if ($(this).val() == ""){
	  $(this).val('Email');
	  }
	});	
		$('#LeftPhone').focus(function(){
	  if ($(this).val() == 'Phone'){
	  $(this).val("");
	  }
	});
	$('#LeftPhone').blur(function(){
	  if ($(this).val() == ""){
	  $(this).val('Phone');
	  }
	});
	$('#LeftOrganisation').focus(function(){
	  if ($(this).val() == 'Organization'){
	  $(this).val("");
	  }
	});
	$('#LeftOrganisation').blur(function(){
	  if ($(this).val() == ""){
	  $(this).val('Organization');
	  }
	});
	$('#LeftMessage').focus(function(){
	  if ($(this).val() == 'Message'){
	  $(this).val("");
	  }
	});
	$('#LeftMessage').blur(function(){
	  if ($(this).val() == ""){
	  $(this).val('Message');
	  }
	});
	

		jQuery("#LeftFreeQuoteForm").validate({
		onkeyup: false,
		rules: {
			LeftEmailAddress: {
				required: true,
				email: true
			},
			file : {
				accept: 'docx|doc|pdf|odt'
			}
		},
		messages: {
			LeftEmailAddress: {
				required: "Please enter your email, this will be confidential.",
				email: "Please enter a valid email."
			}
		}
	});
});
