<!-- VERIFICA REGRA
if((window.location.href).indexOf("/meusite/")!=-1){
prefixo="/meusite/bandaaovivoke.com.br";
}else{
prefixo="";
}
pd=Undefined(LerCookie("eventos"))
padrao=pd;
if(padrao==""){padrao="c";}
<!-- VERIFICA REGRA

<!-- ACIONA ONLOAD
$(document).ready(function(){
LinksExternos();
VarreFormulario("form_contato");
$("div#menu ul:last li:not(:first)").appendTo("div#menu ul:first");
$("div#menu ul:last li").prependTo("div#menu ul:first");
$("div#menu ul:last").remove();
$("div#menu").show();
$("body.hom div#menu").after("<div id='slides'><div id='slide'>&nbsp;</div></div>");
SelecionaMenu("menu","selecao","","<span>&nbsp;</span>");
$("div#clientes ul").simplyScroll({speed:5,autoMode:"loop"});
Twitter("twitter",7);
preparaDivs("body.exc div#principal","h3");
ColocaLink("body.exc div#principal","fotos");
VideoYouTube("body.hom div#videos","player");
$("body.rtf div.youtube ul li a").each(function(h){
var $urr=$(this).parent();
$urr.attr("id","li_"+parseInt(h+1));
youtube($(this),$urr.attr("id"));
})
$("body.rtf div.youtube").append("<div class='limpar'>&nbsp;</div>").show();
callback("e","eventos");
$("div#principal a[href$=.jpg],div#principal a[href$=.JPG],a.lightbox").prettyPhoto({theme:'facebook',modal:true,allow_resize:false});
$("div.coluna.esquerda").append("<h2>Contato</h2><div class='menu'><ul><li>"+$("div.coluna.esquerda div.menu ul li a[href$=contato.html]").parent().html()+"</li></ul></div>");
$("div#menu ul li a[href$=o-show.html],div#menu ul li a[href$=a-dinamica.html],div#menu ul li a[href$=a-aplicacao.html],div#menu ul li a[href$=a-estrutura.html]").parent().remove();
ajustaMenu("div#menu ul li a");
$("div.coluna h2:eq(1)").addClass("titulo_"+aleatorio(1,3));
$("div#principal h1:eq(0)").addClass("titulo_"+aleatorio(3,5));
$("body.hom div#principal h3:eq(0)").addClass("titulo_"+aleatorio(5,7));
$("body.hom div#principal h3:eq(1)").addClass("titulo_"+aleatorio(7,9));
$("div#rodape div.apoio h3").addClass("titulo_"+aleatorio(9,11));
$("div#chamadas h3").addClass("titulo_"+aleatorio(11,13));
flash("slide",1000,400)
$("body:not(.exc) div#principal h3").addClass("titulo");
$("form#form").submit(function(){return checa_formulario("form")});
valorPadrao("input#n010nome","seu nome");
valorPadrao("input#n020email","seu e-mail");
menu("div#menu");
$("div.coluna ul.menu li").removeClass("tick").find("a[href$='?e="+padrao+"']").parent().addClass("tick");
arredonda("div.padrao form button","roundtotal10px",10,10,10,10);
arredonda("div#principal h1,div.coluna h2,div#chamadas h3,div#principal h3.titulo,div#rodape div.apoio h3","roundtopo05px",5,5,0,0);
});
//--> ACIONA ONLOAD

<!-- AJUSTA MENU
function ajustaMenu(id){
var remove;
if(padrao=="c"){remove="s";}else{remove="c";}
$(id+"[href$='-"+remove+".html']").remove();
$(id).each(function(h){$(this).html($(this).html().replace("-"+padrao,""))});
}
//--> AJUSTA MENU

<!-- MENU JQUERY
function menu(id){
if(!document.all){
$(id+" ul li:not(.selecao) a")
.css({padding:"12px 0px 0px",height:"26px"})
.mouseover(function(){
$(this).stop().animate({padding:"8px 0px 0px",height:"30px"},"slow")
.children("span").stop().animate({width:"100%"},"slow")
})
.mouseout(function(){
$(this).stop().animate({padding:"12px 0px 0px",height:"26px"},"slow")
.children("span").stop().animate({width:"0px"},"slow")
})
.children("span").css({width:"0px"})
}
}
//--> MENU JQUERY

<!-- FORMULARIO
function checa_formulario(id){
if(document.getElementById(id)){
var f=TransformaObjeto(id);
var campo;
campo=f.n010nome;
if((campo.value=="")||(campo.value=="seu nome")||(campo.value.indexOf(" ")==-1)){
alerta(campo,"Por favor informe o seu nome!");
return false;
}
campo=f.n020email;
if(!checaEmail(campo.value)){
alerta(campo,"Por favor digite um endereço de E-mail válido!");
return false;
}
f.submit();
}
}
//--> FORMULARIO

<!-- ALERTA
function alerta(c,mensagem){
if(mensagem!=""){alert(unescape(mensagem));}
if(c!=""){var campo=TransformaObjeto(c);if(campo){campo.focus();}}
}
//--> ALERTA

<!-- VALOR PADRÃO
function valorPadrao(id,frase){
if((id!="")&&(frase!="")){
$(id).val(frase).blur(function(){if($(this).val()==""){$(this).val(frase)}}).focus(function(){if($(this).val(frase)){$(this).val("")}});
}
}
//--> VALOR PADRÃO

<!-- FLASH
function flash(id,largura,altura){
var flashvars={};
flashvars.xml=prefixo+"/config-"+padrao+".xml";
flashvars.font=prefixo+"/layout/lay/font.swf";
var attributes={};
attributes.wmode="transparent";
attributes.id="slider";
swfobject.embedSWF(prefixo+"/layout/lay/cu3er.swf",id,largura,altura,"9",prefixo+"/layout/lay/expressInstall.swf",flashvars,attributes);	
}
//--> FLASH

<!-- COLOCAR LINK NAS IMAGENS PARA LIGHTBOX
function ColocaLink(id,Rel){
$(id).addClass(Rel);
$(id+" img").each(function(h){
$(this).after("<a href='"+$(this).attr("src")+"' rel='prettyPhoto["+Rel+"]' title='"+$(this).attr("title")+"'></a>");
$(this).appendTo($(this).next());
});
}
//--> COLOCAR LINK NAS IMAGENS PARA LIGHTBOX

<!-- PREPARA DIVS
function preparaDivs(id,tg){
var tag=tg.toLowerCase(),i=0;
$(id+">*").not("*[id]").removeClass("collaps").each(function(e){
if($(this).attr("tagName")==tag.toUpperCase()){
$(this).after("<div class='collaps'>")
.mouseover(function(){$(this).addClass("hover");})
.mouseout(function(){$(this).removeClass("hover");})
.click(function(){
$(this).toggleClass("aberto").next().slideToggle("slow");
});
}else if($(this).attr("tagName")!="BLOCKQUOTE"){$(this).appendTo($(this).prev("div.collaps"));}
})
}
//--> PREPARA DIVS

<!-- YOUTUBE
function VideoYouTube(id,ide){
$(id+" h3").after("<div id='"+ide+"'></div>");
$(id+" ul li a").each(function(y){
$(this).click(function(event){
event.preventDefault();
if($(this).attr("class")!="ativo"){
$(id+" ul li a").removeClass("ativo");
$(this).addClass("ativo");
youtube($(this),ide);
}
});
})
$(id+" a:first").click();
}
function youtube($id,ide){
var url=$id.attr("href");
var results=url.match("[\\?&]v=([^&#]*)");
var vid=(results===null)?url:results[1];
var embed='<object width="330" height="210">'+
'<param value="http://www.youtube.com/v/'+vid+'&amp;hl=pt-br&amp;fs=1&amp;" name="movie">'+
'<param value="true" name="allowFullScreen"><param value="always" name="allowscriptaccess">'+
'<param value="transparent" name="WMODE">'+
'<embed width="330" height="210" wmode="transparent" movie="http://www.youtube.com/v/'+vid+'&amp;hl=pt-br&amp;fs=1&amp;" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://www.youtube.com/v/'+vid+'&amp;hl=pt-br&amp;fs=1&amp;">'+
'</object>';
$("#"+ide).html(embed);
}
//--> YOUTUBE

<!-- NÚMERO ALEATÓRIO
function aleatorio(menor,maior){
numPossibilidades=maior-menor;
aleat=Math.random()*numPossibilidades;
aleat=Math.floor(aleat);
return parseFloat(menor)+aleat;
} 
//--> NÚMERO ALEATÓRIO

<!-- SLIDES FADE IN FADE OUT
function slides(id,tempo,tamanho){
if(document.getElementById(id)){
$("div#"+id+" ul").innerfade({
speed:1000,
timeout:tempo,
type:"random_start",
containerheight:"100%"
});
}
}
//--> SLIDES FADE IN FADE OUT

<!-- ARREDONDA IE
function arredonda(obj,classe,r1,r2,r3,r4){
if((navigator.userAgent.indexOf("MSIE 6")==-1)&&(navigator.userAgent.indexOf("MSIE 9")==-1)){
if(navigator.userAgent.indexOf("MSIE")!=-1){
$(obj).addClass(classe);
var settings={tl:{radius:r1},tr:{radius:r2},bl:{radius:r3},br:{radius:r4},antiAlias:true}
curvyCorners(settings,"."+classe);
}
}
}
//--> ARREDONDA IE

<!-- TWITTER
function Twitter(id,qts){
if(document.getElementById(id)){
$("div#"+id).getTwitter({
userName:"aovivoke",
numTweets:qts,
loaderText:"carregando...",
slideIn:true,
slideDuration:750,
showHeading:false,
headingText:"Tweets Mais Recentes",
showProfileLink:false,
showTimestamp:false
});
}
}
//--> TWITTER

<!-- PEGA VALORES DO ENDEREÇO (QUERY STRING)
function PegarQuery(param){
var wind=window.location.href;
var params=urlDecode(wind.substring(wind.indexOf("?")+1));
return(params[param]);
}
function urlDecode(string,overwrite){
if((!string)||(!string.length)){
return{};
}
var obj={};
var pairs=string.split("&");
var pair,name,value;
var lsRegExp=/\+/g;
for(var i=0,len=pairs.length; i < len; i++){
pair=pairs[i].split("=");
name=unescape(pair[0]);
value=unescape(pair[1]).replace(lsRegExp," ");
value=decodeURIComponent(pair[1]).replace(lsRegExp," ");
if(overwrite!==true){
if(typeof obj[name]=="undefined"){
obj[name]=value;
}else if(typeof obj[name]=="string"){
obj[name]=[obj[name]];
obj[name].push(value);
}else{
obj[name].push(value);
}
}else{
obj[name]=value;
}
}
return obj;
}
//--> PEGA VALORES DO ENDEREÇO (URL STRING)

<!-- TESTA UNDEFINED
function Undefined(valor){
if((valor==undefined)||(valor=="undefined")){
return "";
}else{
return valor;
}
}
//--> TESTA UNDEFINED

<!-- COOKIE CALLBACK
function callback(campo,cookie){
var valor=PegarQuery(campo);
if((Undefined(valor)=="c")||(Undefined(valor)=="s")){
CriaCookie(cookie,valor,30);
padrao=valor;
$("body").addClass(valor);
}else if(Undefined(valor)!=""){
$("body").addClass(padrao);
}
if((pd=="")&&(Undefined(valor)=="")){
$("body.hom").prepend("<a id='ban' title='Clique em uma das Op&ccedil;&otilde;es ACIMA!' class='lightbox' href='"+prefixo+"/destaques.html?iframe=true&width=430&height=590'>Destaques</a>");
setTimeout(function(){$("a#ban").click()},100);
}
}
//--> COOKIE CALLBACK

<!-- COOKIES
function CriaCookie(nome,valor,dias){
if(dias){
var data=new Date();
data.setTime(data.getTime()+(dias*1000*60*60*24));
var expira="; expires="+data.toGMTString();}
else var expira="";
document.cookie=nome+"="+valor+expira+"; path=/";
}
function LerCookie(nome){
var nomeEQ=nome + "=";
var ca=document.cookie.split(';');
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==' ')c=c.substring(1,c.length);
if(c.indexOf(nomeEQ)==0)return c.substring(nomeEQ.length,c.length);
}
return null;
}
//--> COOKIES
