jQuery(document).ready(function() {
	/* AJAX Contact Form */
	
		$("#contactquote").submit(function(){
			// 'this' refers to the current submitted form
			var str = $(this).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"><ul><li>Your message has been sent. Thank you!</li></ul></div>';
								$("#fields").hide();
							} else {
								result = msg;
							}
						$(this).html(result);
						$(".notification_ok").delay(4000).slideUp(500);
						$(".notification_error").delay(4000).slideUp(500);
						$("#fields").delay(3500).slideDown(500);
					});
				}
			});
			return false;
		});

});
