$(document).ready(
				function(){
				$('.zoom').lightBox();
				$('.slide ul').innerfade({
						speed: 2000,
						timeout: 8000,
						type: 'random',
						containerheight: '239px'
					});	
				
				$('.letter ul').innerfade({
						 				  
						speed: 500,
						timeout: 4000,
						type: 'sequence',
						containerheight: '23px'
					});	
				
			});

$(document).ready(function() {
    $(".topMenuAction").click( function() {
        if ($("#openCloseIdentifier").is(":hidden")) {
            $("#slider").animate({
                marginTop: "-265px"
                }, 500 );
            $("#topMenuImage").html('<img src="arquivos/images/video.png"/>');
            $("#openCloseIdentifier").show();
        } else {
            $("#slider").animate({
                marginTop: "0px"
                }, 500 );
            $("#topMenuImage").html('<img src="arquivos/images/video.png"/>');
            $("#openCloseIdentifier").hide();
        }
    }); 
});



 

function enviaAjax(url,div)
{

$("alvo_principal").append("<p class='wait'>carregando...</p>");
		$.ajax({
			type: 'GET',
			url: 'arquivos/pages/ajax.php',
			data: url,
				success: function( data )
					{
						$(div).html(data);
						$().ajaxStop(function() { 
						});
						}
					});

}
function midia(midia)
{

	if(midia=='videos')
	{
		$(".btFotos").removeClass('ativo');
		$(".btVideos").addClass('ativo');
		document.getElementById('iframe').src="arquivos/midia.php?tipo=video";
	}
	else
	{
		$(".btVideos").removeClass('ativo');
		$(".btFotos").addClass('ativo');
		document.getElementById('iframe').src="arquivos/midia.php?tipo=foto";
	}

}

function abaHome(aba)
{
 
 
	$('#boxEntrada ul li').removeClass('ativo');
	$('.conteudodiv').removeClass('mostra');

 	$('li.aba_1').css('zIndex',Number(30));
	$('li.aba_2').css('zIndex',Number(20));
	$('li.aba_3').css('zIndex',Number(10));
	$('li.aba_'+aba).css('zIndex',Number(40));
	
	for(x = 1;x<=3;x++)
	{
		var d = x+'0';
		$('#mostra_'+x).hide();
		$('li.aba_'+x).removeClass('ativo');
	}
	$('li.aba_'+aba).addClass('ativo');
	$('#mostra_'+aba).addClass('mostra');
	$('#mostra_'+aba).show();

}

function addNews()
{
var email = document.getElementById('email').value;
var sair = document.getElementById('sair').checked==false?"entrar":"sair";


	if( email=="" || email.indexOf('@')==-1 || email.indexOf('.')==-1 )
	{
		alert('PREENCHA SEU E-MAIL CORRETAMENTE');
	}
	else
	{
			var url = 'tipo=news&email='+email+'&lista='+sair;
			enviaAjax(url,'.alvoNews');
	}

}



function openArvore(id)
{
var subs = document.getElementById('sub_'+id);

if(subs.style.display =='none')
{
document.getElementById('sub_'+id).style.display = 'block';
document.getElementById('bullet_'+id).src="../arquivos/images/bullet_.gif";

}else
{
document.getElementById('sub_'+id).style.display = 'none';
document.getElementById('bullet_'+id).src="../arquivos/images/bullet.gif";
}

}
stepcarousel.setup({
	galleryid: 'galeriaVideos',
	beltclass: 'belt', 
	panelclass: 'panel', 
	autostep: {enable:false, moveby:1, pause:3000},
	panelbehavior: {speed:500, wraparound:true, wrapbehavior:'slide', persist:true},
	defaultbuttons: {enable: false, moveby: 1},
	contenttype: ['inline'] 
})
