$(document).ready(function() {
    $('#unsubscribe').submit(function() {
		removeError('email');
		$.get(this.action, { email: jQuery.trim($('#email').attr('value')) }, function(data){
	    	if (1 == jQuery.trim(data)) {
				window.location.href = 'result.php?code=unsubscribed';
            }
            else {
				showError('email', 'Please check the email address and try again.');
            }
		});
		return false;
	});
});