$(function(){
	// MENU GERAL ====================================//	   
	$('a.fac_menu_pai').hover(
		function(){
				var id = $(this).attr('id').split('-')[2];
				$('#fac-menu_geral_pais li a.show').removeClass('show');
				$(this).addClass('show');
				$('ul[id^=fac-menu_geral_filhos-]').hide();
				$('#fac-menu_geral_filhos-'+id).show();
			},
		function(){
			}
	);
	//================================================//
});
$('#bt_ok_boletim').click(function(){
	 var regmail = /^[\w!#$%&amp;'*+\/=?^`{|}~-]+(\.[\w!#$%&amp;'*+\/=?^`{|}~-]+)*@(([\w-]+\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
				if($('#email').val() == ''){
					alert('Preencha seu e-mail.');
					return false;
				}else{
				  if (regmail.test($("#email").val())) {
					   alert("E-mail válido");
				  } else {
					   alert("E-mail inválido");
					   return false;
				  }
						$.ajax({
							url: '/_ajax/fac.boletim.php',
							type: 'post',
							dataType:'text',
							cache: false,
							data: {email:$('#email').val(), id_canal:$('#id_canal').val() },
							async: true,  
							error: function(XMLHttpRequest, textStatus, errorThrown){
								alert('Ocorreu um problema, entre em contato com o setor de informática!');
								},
								success: function(response){
									//$('#result').html(response);
								}
						});
						$('#email').val('');
						$('#id_canal').val('');
						$('#email').attr('disabled','disabled');
				}
 });

