jQuery(function($){

	$(document).ready(function() {
	
		$('a[name=modal]').click(function() {
			
			if ($("input[@name=opcao]").is(':checked') && $("input[@name=email]").val() != ""){
				
				$('#retorno-enquete-vazio').html("");
				$('#form-enquete').submit();
			
			}else{
				
				if($("input[@name=opcao]").is(':checked') && $("input[@name=email]").val() == ""){
					$('#retorno-enquete-vazio').html("<b style='color:#990000; padding:7px; border:#660000 1px dotted; background-color:#f2ecd6'>Digite seu e-mail.</b>");
				}else{
					$('#retorno-enquete-vazio').html("<b style='color:#990000; padding:7px; border:#660000 1px dotted; background-color:#f2ecd6'>Selecione uma opção.</b>");
				}
			}
		
		});	
		
	});
});