595
| <![CDATA[<script type="text/javascript">
var maxLoop = 2;
var currentLoop = 0;
$(document).ready(function(){
// Mask
$(".mask_cep").mask("99.999-999");
$('.mask_phone').focusout(function(){
var phone, element;
element = $(this);
element.unmask();
phone = element.val().replace(/\D/g, '');
if(phone.length > 10) {
element.mask("(99) 99999-999?9");
} else {
element.mask("(99) 9999-9999?9");
}
}).trigger('focusout');
// Acordion geral
$('.totop .panel-default').on('show.bs.collapse', function () {
$(this).addClass('panel_collapse_active');
}).on('hide.bs.collapse', function () {
$(this).removeClass('panel_collapse_active');
});
$('.totop .panel-default').on('shown.bs.collapse', function () {
$(window).scrollTop($(this).offset().top-155);
});
$(document).on("scroll",function(){
// console.log($(document).scrollTop())
if($(document).scrollTop()>1){
$('#page').stop().animate({
'background-position-y':-500
},100);
}else{
$('#page').stop().animate({
'background-position-y':-222
},100);
}
if($(document).scrollTop()>10){
$("header").addClass("header-small");
$('#page').addClass('page_scroll');
$('.mm-page').addClass("padding-top-mmenu");
} else{
$("header").removeClass("header-small");
$('#page').removeClass('page_scroll');
$('.mm-page').removeClass("padding-top-mmenu");
}
});
/* Menu Acessibilidade */
$(document).on('click','.acessabilidade-text',function(e){
e.preventDefault();
var action = $(this).data('action');
if(action=='contraste'){
if($('body').hasClass("contraste")){
$('body').removeClass("contraste");
}else{
$('body').addClass("contraste");
}
}else{
}
});
/* MM Menu JS */
$("#menu_principal").mmenu({
extensions: ["pageshadow"],
offCanvas: {
position: 'right'
},
navbar:{
add: true,
title:'<span class="acessabilidade-text" data-action="contraste">CONTRASTE</span>'
}
});
var api = $("#menu_principal").data( "mmenu" );
api.bind( "opened", function() {
$('#menu-responsive i').css('margin-left',3).removeClass('fa-align-justify').addClass('fa-close');
});
api.bind( "closed", function() {
$('#menu-responsive i').css('margin-left',0).removeClass('fa-close').addClass('fa-align-justify');
});
/* MM Menu JS */
animateLogo(1200);
});
var animateLogo = function(time)
{
// Escondo Tudo
$('.item-c,.item-r-or-12,.first-sphere').fadeOut(time,function(){
// Mudo posição do CRQ
$('.second-sphere').css('left','0px');
//Escondo todas as palavras e mostro o Conselho .conselho_txt
$('.conselho_regional,.conselho_quimica,.conselho_12').stop().animate({'opacity':.1},time);
// Mstro o C
$('.item-c').stop().fadeIn(time,function(){
// Escondo o C
// Volto o Conselho ao normal .conselho_txt
$('.conselho_regional,.conselho_quimica,.conselho_12').stop().animate({'opacity':1},time);
$('.item-c').stop().fadeOut(time,function(){
// Mostro R
$('.conselho_quimica,.conselho_12,.conselho_txt').stop().animate({'opacity':.2},time);
$('.item-r-or-12').stop().fadeIn(time,function(){
// Escondo R
// Fica Só texto R
$('.conselho_quimica,.conselho_12,.conselho_txt').stop().animate({'opacity':1},time);
$('.item-r-or-12').stop().fadeOut(time,function(){
// Mostro Q
// Fica Só química
$('.conselho_12,.conselho_txt,.conselho_regional').stop().animate({'opacity':.2},time);
$('.item-c,.item-r-or-12').stop().fadeIn(time,function(){
// Escondo Q
$('.conselho_12,.conselho_txt,.conselho_regional').stop().animate({'opacity':1},time);
$('.item-c,.item-r-or-12').stop().fadeOut(time,function(){
// Mostro 12
$('.conselho_txt,.conselho_regional,.conselho_quimica').stop().animate({'opacity':.2},time);
$('.item-r-or-12').stop().fadeIn(time,function(){
// Escondo 12
$('.conselho_txt,.conselho_regional,.conselho_quimica').stop().animate({'opacity':1},time);
$('.item-r-or-12').stop().fadeOut(time,function(){
// Monstro Tudo
$('.item-c,.item-r-or-12').stop().fadeIn(time,function(){
// Mostro CFQ
setTimeout(function(){
// Movo o CRQ para a direita
$('.second-sphere').stop().animate({
left:53
},time,function(){
// Mostro o CFQ
$('.first-sphere').stop().fadeIn(time,function(){
currentLoop++;
if(currentLoop<maxLoop){
setTimeout(function(){animateLogo(800)},10000);
}
});
})
},800);
});
});
});
});
});
});
});
});
});
});
}
</script>]]>
|
774
| <![CDATA[<script type="text/javascript">
var sliderSets = $('.tab_content');
var sliderNews = Array();
// var herovide = document.getElementById('vid');
// herovide.autoplay=true;
// herovide.load();
// setTimeout(function(){herovide.play()},1000);
$(document).ready(function(){
$('#image-gallery').modal('show');
/*
$('#image-gallery').on('hidden.bs.modal', function () {
herovide.remove();
});
*/
$('.logos_links').bxSlider({
minSlides: 4,
maxSlides: 4,
slideMargin: 100,
controls:false,
slideWidth: 200,
infiniteLoop: true,
auto: true,
autoStart: true
});
$('.bxslider-mobile').bxSlider({
controls:false
});
$(sliderSets).each( function() {
var targetSlider = "#" + $(this).children('.bxslider').attr('id');
var targetPager = "#" + $(this).children('.bx-pager').attr('id');
initSliders(targetSlider, targetPager);
});
});
function initSliders(targetSlider, targetPager) {
var sliderNewsCurrent = $(targetSlider).bxSlider({
pagerCustom: targetPager,
controls:false,
tickerHover:true,
mode:'fade',
infiniteLoop: true,
auto: true,
autoStart: true,
onSlideNext: function(oldIndex,newIndex){
}
});
sliderNews.push(sliderNewsCurrent);
/****** CONTRLE TAB SELECIONADA DE NOTICIAS DE DESTAQUE NA PAGINA INICIAL ******/
$(document).on('click','#tab_news_home ul li a.tablink_news',function(e){
e.preventDefault();
var obj = $(this), tab = obj.data('tabname');
var indexTab = obj.data('index');
$('#tab_news_home ul li a.tablink_news').removeClass('active');
obj.addClass('active');
// Hide all tabs content
$('.tab_content').hide();
$('.tab_'+tab).show();
// Click first page
sliderNews[indexTab].goToSlide(0);
if(indexTab==0){
var liNoticias = $('#slider1').find('li');
} else if(indexTab==1) {
var liNoticias = $('#slider2').find('li');
} else {
var liNoticias = $('#slider3').find('li');
}
$(liNoticias[0]).show();
$(liNoticias[1]).hide();
$(liNoticias[2]).hide();
$(liNoticias[3]).hide();
});/**** END ****/
}
function closeModal()
{
// document.cookie="noviewmodal=noviewmodal";
// setCookie('noviewmodal','noviewmodal','2147483647');
SetCookie("informativo_28_06_2019", 'informativo_28_06_2019', 365, '/', '');
$('#image-gallery').modal('hide');
}
function SetCookie (name,value,expires,path,domain,secure) {
if ('number' === typeof expires) {
expires = new Date(new Date().getTime() + expires * 86400000);
}
document.cookie = name + "=" + escape (value) +
((expires) ? "; expires=" + expires.toUTCString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}
function setCookie(name, value, duration) {
var cookie = name + "=" + escape(value) +
((duration) ? "; duration=" + duration.toGMTString() : "");
document.cookie = cookie;
}
function getCookie(name) {
var cookies = document.cookie;
var prefix = name + "=";
var begin = cookies.indexOf("; " + prefix);
if (begin == -1) {
begin = cookies.indexOf(prefix);
if (begin != 0) {
return null;
}
} else {
begin += 2;
}
var end = cookies.indexOf(";", begin);
if (end == -1) {
end = cookies.length;
}
return unescape(cookies.substring(begin + prefix.length, end));
}
</script>]]>
|