$(function() {
	$('#btn_resetpass')
	.click(function() {
		$.ajax({
			type: 'get',
			url: '/bg/reset_password.php',
			cache: false,
			data: { 'act': 'reset_password', 'email': $('#resetpass_email').val() },
			dataType: 'json',
			success: function(json) {
				if (json.result == 0) {
					window.location.href = '/reset_password.php';
				} else {
					$.showError(json.errors);
				}
			}
		});
	})
	.parents('form').submit(function() {
		return false;
	});
});
