function validateEmailSignup() {
	var isGood = true;
	
	$('#emailSignupForm .textInput').each(function(index) {
		if ($(this).val() == '') {
			isGood = false;
			$(this).addClass('errorHere');
		} else
			$(this).removeClass('errorHere');
	});
	
	return isGood;
}

function sendEmailSignup() {
	if (validateEmailSignup()) {
		var parameters = $('#emailSignupForm').serializeArray();
		$('#emailSignupContents').html('<div style="margin-top: 20px; margin-bottom: 20px; text-align: center;"><img src="tickets/images/loader-circle.gif" /></center>');
		$.ajax({
			url: 'tickets/engine/actions/emailSignupGo.php',
			type: 'post',
			data: parameters,
			success: function(transport) {
				$('#emailSignupContents').html(transport);
			}
		});
	}
}

function clearEmailSignup() {
	$('#emailSignupForm .textInput').val('');
}
