$(document).ready(function () {
  
	$("#showAllFormFields").click(function(){
		$(".showmorefields_desc").hide();
	  $("#additional-fields").slideDown();																			 
	});
	
	$("#hideAllFormFields").click(function(){
		$(".showmorefields_desc").show();
	  $("#additional-fields").slideUp();																			 
	});
	
	$("#lp1-form :input").removeAttr("disabled");
	
	$("#lp1-form").submit(function(){
		var check = true;
		
		$(":input", this).removeClass("error");
		
		if( $("#name", this).val()=="" || $("#name", this).val()==$("#name", this)[0].defaultValue ) {
		  check = false; 
			$("#name", this).addClass("error");
		}
		if( $("#email", this).val()=="" || $("#email", this).val()==$("#email", this)[0].defaultValue ) {
		  check = false; 
			$("#email", this).addClass("error");
		}
		if( $("#phone", this).val()=="" || $("#phone", this).val()==$("#phone", this)[0].defaultValue ) {
		  check = false; 
			$("#phone", this).addClass("error");
		}
		
		if (!check) {
		  alert(unescape("Bitte f%FCllen Sie die rot markierten Felder aus%21"));
		}
		
		
		return check;
	});
	
});

