$(function() { var noticia = ""; var contador = 1; var contador_total; var i=1; var imgs; var imgs2; var cont=""; var imgs3; var total; var larg; var a=0; $("#slider_total").find("#slider_parte").each(function(){ a++;}); if (a>3){ a=(125*4)-(a*125); $("#slider_total").everyTime(5000, 'controlled', function() { if ($("#slider_total").css("marginLeft") != a+"px"){ $("#slider_total").animate({"marginLeft":'-=125px'},"slow");}else{ $("#slider_total").animate({"marginLeft":'0px'},"slow");}
}); $(".esq2").click(function(){ $("#slider_total").stopTime('controlled'); if ($("#slider_total").css("marginLeft") != "0px"){ $("#slider_total").animate({"marginLeft":"+=125px"},"slow");}else{ $("#slider_total").animate({"marginLeft":a+"px"},"slow");}
}); $(".dir2").click(function(){ $("#slider_total").stopTime('controlled'); if ($("#slider_total").css("marginLeft") != "-"+a+"px"){ $("#slider_total").animate({"marginLeft":"-=125px"},"slow");}else{ $("#slider_total").animate({"marginLeft":"0px"},"slow");}
}); $("#tempo").click(function(){ $("#slider_total").everyTime(5000, 'controlled', function() { if ($("#slider_total").css("marginLeft") == "-"+a+"px"){ $("#slider_total").animate({"marginLeft":'0px'},"slow");}else{ $("#slider_total").animate({"marginLeft":'-=125px'},"slow");}
});});}
$("#esq").click(function(){ if ($("#slider_total").css("marginLeft") != "0px"){ $("#slider_total").animate({"marginLeft": "+=135"},500);}
}); $("#dir").click(function(){ if ($("#slider_total").css("marginLeft") != "-405px"){ $("#slider_total").animate({"marginLeft": "-=135"},500);}
}); $("#menu_evento li").click(function(){ $("#cont_evento").html("<iframe frameborder='0' allowtransparency='true' src='evento.php?id="+this.value+"' height='490' width='600'></iframe>");}); $("#menu_evento li").mouseover(function(){ $(this).animate({"marginLeft":"-=30px","width":"+=30px"},500);}); $("#menu_evento li").mouseout(function(){ $(this).animate({"marginLeft":"+=30px","width":"-=30px"},500);}); $("#slider_total img").mouseover(function(){ $(this).animate({"height":"+=10","width":"+=10px"},650); $("#info").html(this.name); $("#info").css("display","block");}); $("#slider_total img").mouseout(function(){ $(this).animate({"height":"-=10px","width":"-=10px"},650); $("#info").html(""); $("#info").css("display","none");}); $("#menu_conteudo .empresa").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#noticia_titulo").fadeIn(500); $("#slider").css("display","none"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"-920"},1500); $("#noticias_rodape").fadeIn();}); $("#noticias_home img").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#noticia_titulo").fadeIn(500); $("#slider").css("display","none"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"-920"},1500); $("#noticias_rodape").fadeIn();}); $("#menu_conteudo .processo").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#slider").css("display","none"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"-1840"},1500); $("#noticias_rodape").fadeIn(); $("#noticia_titulo").fadeIn(500);}); $("#menu_conteudo .produto").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#slider").css("display","none"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"-2760"},1500); $("#noticias_rodape").fadeIn(); $("#noticia_titulo").fadeIn(500);}); $("#menu_conteudo .vantagem").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#slider").css("display","none"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"-3680"},1500); $("#noticias_rodape").fadeIn(); $("#noticia_titulo").fadeIn(500);}); $("#menu_conteudo .estetica").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#slider").css("display","none"); $(".imageflow").css("visibility","visible"); $("#conteudo_total").animate({"marginLeft":"-4600"},1500); $("#noticias_rodape").fadeIn(); $("#noticia_titulo").fadeIn(500);}); $("#menu_conteudo .parceiro").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#slider").css("display","none"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"-5520"},1500); $("#noticias_rodape").fadeIn(); $("#noticia_titulo").fadeIn(500);}); $("#menu_conteudo .evento").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#slider").css("display","none"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"-6440"},1500); $("#noticias_rodape").fadeIn(); $("#noticia_titulo").fadeIn(500);}); $("#menu_conteudo .contato").click(function(){ $("#mulher").fadeOut(); $("#evento_titulo").css("display","none"); $("#slider").css("display","none"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"-7360"},1500); $("#noticias_rodape").fadeIn(); $("#noticia_titulo").fadeIn(500);}); $("#logo").click(function(){ $("#noticias_rodape").fadeOut(); $("#noticia_titulo").fadeOut(500); $("#mulher").fadeIn(3000); $("#evento_titulo").css("display","block"); $("#slider").css("display","block"); $(".imageflow").css("visibility","hidden"); $("#conteudo_total").animate({"marginLeft":"0"},1500);}); $("#fundo_info_centro").click(function(){ if ($("#fundo_info").css("top") != "0px"){ $("#fundo_info").animate({"top":"0"},1500); $("#fundo_barra_info").animate({"top":"465"},1500); $("#fundo_info_centro").html("<img src='imagens/images/aba_canal.png'><img src='imagens/images/aba_btn_fechar.png'>");}else{ $("#fundo_info").animate({"top":"-465"},1500); $("#fundo_barra_info").animate({"top":"0"},1500); $("#fundo_info_centro").html("<img src='imagens/images/aba_canal.png'><img src='imagens/images/aba_btn_informacoes.png'>");}
}); $("#imgs img").fadeTo(1,"0.5"); $("#imgs img").click(function(){ if ($(this).css("width") != "300px"){ $("#imgs img").fadeTo(1,"0.5"); $(this).nextAll().animate({"width":"110px"},"slow"); $(this).prevAll().animate({"width":"110px"},"slow"); $(this).animate({"width":"300px"},"slow"); $(this).fadeTo(500,"1"); $("#texto_processo").html(this.name);}else{ $("#imgs img").animate({"width":"140px"},"slow"); $(this).fadeTo(1,"0.5");}
}); $("#slider_total img").click(function(){ $("#conteudo_total").animate({"marginLeft":"-6440"},1500); $("#mulher").fadeOut(); $("#evento_titulo").fadeOut(); $("#slider").css("display","none"); $("#cont_evento").html("<iframe frameborder='0' allowtransparency='true' src='evento.php?id="+this.title+"' height='490' width='600'></iframe>"); $("#noticias_rodape").fadeIn();}); var b=0; var d=0; var e=1; $("#slider_total img").click(function(){ $("#cont_frame #slider #conteudo_slider").find("#slider_parte").each(function(){ b++;}); d = (b*455)-455; while (e <= b){ imgs = $("#slider_total").find("img").attr("src"); imgs2 = imgs.split("."); total = imgs2[0].length; imgs3 = imgs2[0].substr(0,total-1); cont += "<div id='parte'><img src='"+imgs3+e+".jpg' height='350px'></div>"; e++;}
$("#mostra_total").html(cont); $("#cont_frame").css("display","none"); $("#galeria_total").css("display","block"); var ini = $(this).attr("name")*455; $("#mostra_total").animate({"marginLeft":"-"+ini+"px"},"slow");}); $("#right").click(function(){ if ($("#mostra_total").css("marginLeft") != "-"+d+"px"){ $("#mostra_total").animate({"marginLeft":"-=455px"},"slow");}
}); $("#left").click(function(){ if ($("#mostra_total").css("marginLeft") != "0px"){ $("#mostra_total").animate({"marginLeft":"+=455px"},"slow");}
}); $("#mostra_foto").click(function(){ $("#mostra_total").animate({"marginLeft":"0px"},"slow"); $("#galeria_total").css("display","none"); $("#cont_frame").css("display","block"); $("#cont_frame #slider").css("display","block");}); $.ajax({ type: "GET", url: "noticia.xml", dataType: "xml", success: function(xml) { $(xml).find("noticia").each(function(){ contador ++; var titulo = $(this).find("titulo").text(); var texto = $(this).find("texto").text(); noticia += "<div id='noticias_rodape_parte'><strong>"+titulo+"</strong><br><br>"+texto+"</div>";}); contador_total = (contador*110)-220; contador_total = "-"+contador_total+"px"; $("#noticias_rodape_total").html(noticia).everyTime(5000, 'controlled', function() { if ($("#noticias_rodape_total").css("marginTop") != contador_total){ $("#noticias_rodape_total").animate({marginTop:'-=110px'},"slow");}else{ $("#noticias_rodape_total").animate({marginTop:'0px'},"slow");}
});}
}); $("#seta_cima").click(function(){ $("#noticias_rodape_total").stopTime('controlled'); if ($("#noticias_rodape_total").css("marginTop") == "0px"){ $("#noticias_rodape_total").animate({marginTop:'-780px'},"slow");}else{ $("#noticias_rodape_total").animate({marginTop:'+=110px'},"slow");}
}); $("#seta_baixo").click(function(){ $("#noticias_rodape_total").stopTime('controlled'); if ($("#noticias_rodape_total").css("marginTop") == contador_total){ $("#noticias_rodape_total").animate({marginTop:'0px'},"slow");}else{ $("#noticias_rodape_total").animate({marginTop:'-=110px'},"slow");}
}); $("#tempo").click(function(){ $("#noticias_rodape_total").everyTime(5000, 'controlled', function() { if ($("#noticias_rodape_total").css("marginTop") == contador_total){ $("#noticias_rodape_total").animate({marginTop:'0px'},"slow");}else{ $("#noticias_rodape_total").animate({marginTop:'-=110px'},"slow");}
});});});
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}