$(document).ready(function(){
	$("#button").bind("click", function(){
		var email = $("#email").val();
		var name = $("#name").val();
		var lastname = $("#lastname").val();
		var pass1 = $("#password1").val();
		var pass2 = $("#password2").val();
		var num = $("#num").val();
		var phone = $("#phone").val();
		var contry = $("#contry").val();
		var city = $("#city").val();
		var area = $("#area").val();
		var city_other = $("#city_other").val();
		var area_other = $("#area_other").val();
		var address = $("#address").val();
		var zip = $("#zip").val();
		var ch = $("#ch:checked").val();
		var send = {
			'email': email,
			'name': name,
			'lastname': lastname,
			'pass1': pass1,
			'pass2': pass2,
			'num': num,
			'phone': phone,
			'contry': contry,
			'city': city,
			'area': area,
			'city_other': city_other,
			'area_other': area_other,
			'address': address,
			'zip': zip,
			'ch': ch
		}
		$.post("php/registration.php", send, function(resp){
			if(resp == "true"){
				$("#form").html("Qeydiyyat başa çatdı, siz öz hesabınıza daxil ola bilərsiniz.");
				$("#alert").html("");
			} else {
				$("#alert").html(resp);
			}
		});
	});
});
