// prepare the form when the DOM is ready 
$(document).ready(function() { 
						   
	$('#formNewsletter').ajaxForm({
		dataType:  'json', 
		success :   processJson 
	}); 
	
    $('#NewsletterResultado').hide();

});

function processJson(data) {
	$('#NewsletterResultado').show();
	$('#NewsletterResultado').html(data.msg);
	
	if( data.result=='true' ){
		$('#formNewsletter')[0].reset();
	}
}
