$(function() {
	$('.error').hide();
	$(".button").click(function() {
	//validate and form process here
	
	$('.error').hide();
	var name = $("input#name").val();
	if (name == "") {
	$("label#name_error").show();
	$("input#name").focus();
	return false;
	}
	var city = $("input#city").val();
	if (city == "") {
	$("label#city_error").show();
	$("input#city").focus();
	return false;
	}
	var country = $("input#country").val();
	if (country == "") {
	$("label#country_error").show();
	$("input#country").focus();
	return false;
	} 
	var phone = $("input#phone").val();
	if (phone == "") {
	$("label#phone_error").show();
	$("input#phone").focus();
	return false;
	}
	var email = $("input#email").val();
	if (email == "") {
	$("label#email_error").show();
	$("input#email").focus();
	return false;
	}
	var comments = $("input#comments").val();
	if (comments == "") {
	$("label#comments_error").show();
	$("input#comments").focus();
	return false;
	}
	
	var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone + '&city=' + city + '&country=' + country + '&comments=' + comments;
	//alert (dataString);return false;
	$.ajax({
    type: "POST",
    url: "bin/process.php",
    data: dataString,
    success: function() {
	//Display success message
      $('#contact_wrap').html("<div id='message'></div>");
      $('#message').html("<h2>Contact Form Submitted!</h2>")
      .append("<p>We will be in touch soon.</p>")
      .hide()
      .fadeIn(1500, function() {
        $('#message');
      });
    }
	});
	return false;
			
		
	});
});

	