﻿$(document).ready(function(){
	// Topo - Inicio
	$('#topo #canais img').click(function(){
		$(this).next().slideDown('fast').show();
		$(this).next().hover(function(){
		}, function(){
			$(this).slideUp('slow');
		});
	});
	$('#menu li:first').css({'border':'none'});
	// Topo - Fim
	
	// Lateral - Inicio
	$('#lateral .menu li a').hover(function(){
		$(this).parent().addClass('hover');
	}, function(){
		$(this).parent().removeClass('hover');
	});
	// Lateral - Fim
	
	// Home - Inicio
	$('#home .bloco ul').each(function(){
		$(this).find('li:eq(0)').css({'border':'none'});
	});
	$('#home .bloco li:nth-child(odd)').addClass('linha1');
	$('#home .bloco li:nth-child(even)').addClass('linha2');
	$('#home .bloco li a').hover(function(){
		$(this).css({'background':'#ebebeb'});
	}, function(){
		$(this).css({'background':'none'});
	});
	// Home - Fim
	
	// Interna | Padrao - Inicio
	$('.padrao_lista ul').each(function(){
		$(this).find('li:eq(0)').css({'border':'none'});
	});
	// Interna | Padrao - Fim
});

MyTimer = null;
function pos1(s){if(document.layers){return document.layers[s];}else if(document.all && !document.getElementById) {return document.all[s];}else {return document.getElementById(s);}}
function pos2(s,x,y){_o = pos1(s);_o.style.width=x+'px';_o.style.height=y+'px';}
function abreRadio(id) {
	radioPopUpWindow = window.open('/radio.php?id='+id,'radio','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=258')
}

function fecharBannerFlutuante() {
    var divs    = document.getElementsByTagName("div");
    var divsnum = divs.length;
    for (i = 0; i < divsnum; i++) {
        var nome = divs[i].id.toString();
        if (nome.indexOf("MAX_") != -1) {
            var div = document.getElementById(nome);
            div.style.display = 'none';
            break;
           }
    }
}