	jQuery(function($){
		//Allows the customer to choose which form of contact they would like and 
		//creates a star beside the required field.
		//Contact By code
		$("#phoneContact").click(function(){
		  $("#emailReq").removeClass('required');
		  $("#phoneReq").addClass('required');
		  $("#email").removeClass('{val:[\'req\', \'email\'],msg:\'Please enter your correct email address.\'}');
		  $("#email").addClass('{val:[\'email\'],msg:\'Please enter your correct email address.\'}');
		  $("#phone").removeClass('{val:[\'phone\'],msg:\'Please enter your correct phone number.\'}');      
		  $("#phone").addClass('{val:[\'req\', \'phone\'],msg:\'Please enter your correct phone number.\'}');
		});
		$("#emailContact").click(function(){
		  $("#phoneReq").removeClass('required');
		  $("#emailReq").addClass('required');
		  $("#phone").removeClass('{val:[\'req\', \'phone\'],msg:\'Please enter your correct phone number.\'}');      
		  $("#phone").addClass('{val:[\'phone\'],msg:\'Please enter your correct phone number.\'}');         
		  $("#email").removeClass('{val:[\'email\'],msg:\'Please enter your correct email address.\'}');       
		  $("#email").addClass('{val:[\'req\', \'email\'],msg:\'Please enter your correct email address.\'}');
		});		
		
		//If they choose other from the drop down it will display the "other" input field.
		$("#heardAboutSelect").change(function(){
		   if($(this).val()=="Other") {
         $("#otherheard").attr("name", "Other Heard about Courtyard");  
         $("#otherhidden").fadeIn('normal');
       } 
		   else {
          $("#otherhidden").fadeOut('normal');
         $("#otherheard").removeAttr("name");        
       }    
		});
    });	