"
},
onkeyup: false,
submitHandler: function(form) {
var response = grecaptcha.getResponse();
if (response.length == 0 || response == '' || response === false) {
return false;
} else {
form.submit();
}
}
});
// fim - enquete
// validação
$("#form-pesquisa").validate({
rules: {
pesquisa: {
required: true,
minlength: 4
}
},
messages: {
pesquisa: "Informe uma palavra com mais de letras.
"
},
onkeyup: false
});
// fim - validação
// buscar
$("#form-pesquisa").submit(function(e) {
if (e.isDefaultPrevented()) {
return false;
} else {
//var pesquisa = $('input[name="pesquisa"]',this).val().replace(/[áàâã]/g,'a').replace(/[éèê]/g,'e').replace(/[óòôõ]/g,'o').replace(/[úùû]/g,'u').replace(/[ç]/g,'c');
var pesquisa = $('input[name="pesquisa"]', this).val();
window.location = '/noticia/pesquisa/' + pesquisa;
return false;
}
});
// fim - buscar
// colorbox
$(".iframe").colorbox({
iframe: true,
escKey: true,
overlayClose: false,
fixed: true,
width: "90%",
height: "90%"
});
// fim - colorbox
// colorbox
$(".youtube").colorbox({
iframe: true,
escKey: true,
overlayClose: false,
fixed: true,
width: "90%",
height: "90%"
});
// fim - colorbox
$(".inline").colorbox({
inline: true,
width: "50%",
height: "50%"
});
// imagem (colorbox)
$(".imagem_atual").colorbox({
rel: 'imagem_atual',
current: "Imagem {current} de {total}",
scalePhotos: true,
maxWidth: '90%',
maxHeight: '90%'
});
// fim - imagem (colorbox)
// contato
// fim - contato
// envie
// fim - envie
// validação - logar
$("#logar").validate({
rules: {
email: "required",
senha: "required"
},
messages: {
email: "obrigatório
",
senha: "obrigatório
"
},
onkeyup: false
});
// fim - validação - logar
// validação - cliente_cadastrar
// fim - validação - cliente_cadastrar
// cliente_recuperar
// validação
$("#cliente_recuperar").validate({
rules: {
email: {
required: true,
email: true
}
},
messages: {
email: {
required: "obrigatório
",
email: "Informe um e-mail válido.
"
}
},
onkeyup: false,
submitHandler: function(form) {
var response = grecaptcha.getResponse();
if (response.length == 0 || response == '' || response === false) {
return false;
} else {
form.submit();
}
}
});
// fim - validação
// fim - cliente_recuperar
// fim - cliente_refedinir
// fim - cliente_refedinir
// cliente
// fim - cliente
// cliente_comentar
// fim - cliente_comentar
// - arquivo (funcao_verifica_input_file)
$("input#arquivo").change(function() {
funcao_verifica_input_file(8192, ['pdf', 'txt', 'doc', 'docx', 'jpg', 'jpeg', 'bmp', 'png', 'gif', 'zip', 'rar'], $("input#arquivo"), $("#arquivo_retorno_html"));
});
// fim - - arquivo (funcao_verifica_input_file)
$('[data-toggle="tooltip"]').tooltip();
});