//This is the contac form script
$(document).ready(function(){
		$("form#contact-form").submit(function(){
			var str = $("form").serialize();
			 $.ajax({
			 type: "POST",
			 url: "contact.php",
			 data: str,
			 success: function(msg){
				$("#note").ajaxComplete(function(event, request, settings){
						if(msg == 'OK'){ // Message Sent? Show the 'Thank You' message and hide the form
							  result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
							  $("#fields").hide();
						}else{
							  result = msg;
				  }
			   $(this).html(result);
				  });
				 }});
			   return false;
				});
		
		$("form#quote-form").submit(function(){
			var str = $("form").serialize();
			 $.ajax({
			 type: "POST",
			 url: "quote.php",
			 data: str,
			 success: function(msg){
				$("#note").ajaxComplete(function(event, request, settings){
						if(msg == 'OK'){ // Message Sent? Show the 'Thank You' message and hide the form
							  result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
							  $("#fields").hide();
						}else{
							  result = msg;
				  }
			   $(this).html(result);
				  });
				 }});
			   return false;
				});
		
	$("form#contact1-form").submit(function(){
			var str = $("form").serialize();
			 $.ajax({
			 type: "POST",
			 url: "newsletter.php",
			 data: str,
			 success: function(msg){
				$("#note1").ajaxComplete(function(event, request, settings){
						if(msg == 'OK'){ // Message Sent? Show the 'Thank You' message and hide the form
							  result = '<div class="notification_ok1">Thank you!</div>';
							  $("#fields").hide();
						}else{
							  result = msg;
				  }
			   $(this).html(result);
				  });
				 }});
			   return false;
				});	
		
		$("form#contact2-form").submit(function(){
			var str = $("form").serialize();
			 $.ajax({
			 type: "POST",
			 url: "testimonial.php",
			 data: str,
			 success: function(msg){
				$("#note").ajaxComplete(function(event, request, settings){
						if(msg == 'OK'){ // Message Sent? Show the 'Thank You' message and hide the form
							  result = '<div class="notification_okt">Your message has been sent. Thank you!</div>';
							  $("#fields").hide();
							 
						}else{
							  result = msg;
				  }
			   $(this).html(result);
			   $(this).reset();
			   	  });
				 }});
			   return false;
				});	
		
		
		
		
			 });

//end contact form script
