function subscribe()
{
	var url = "include/subscribe_newsletter.ajax.php";
	var pars = "name=" + $('#nome').val() + "&email=" + $('#email').val();
	
	showLoading();
	
	$.ajax({
		url: url,
		data: pars,
		type: 'POST',
		dataType: 'text',
		error: reportError,
		success: showResponse
	});
	
	return true;
}

function getChecked(name)
{
    return $('#' + name + ':checked').val() == null ? 0 : 1;
}

function showLoading()
{
	$('#loading').show();
	return true;
}

function showResponse(msg)
{
	$('#loading').hide();
	$('#feedback').text('E-mail cadastrado');
	return true;
}

function reportError()
{
	$('#loading').hide();
	alert('erro');
	return true;
}