$(document).ready(
				function(){
					$('.ticket').innerfade({
						speed: 500,
						timeout: 5000,
						type: 'sequence',
						containerheight: '15px'
					});			
				
				$('.slideTopo ul').innerfade({
						speed: 2000,
						timeout: 5000,
						type: 'random',
						containerheight: '133px'
					});	
					$('.bannerMenor ul').innerfade({
						speed: 2000,
						timeout: 5000,
						type: 'random',
						containerheight: '77px'
					});	
					$('.boxBannerLateral ul').innerfade({
						speed: 2000,
						timeout: 5000,
						type: 'random',
						containerheight: '273px'
					});	

					$('.boxBannerHome ul').innerfade({
						speed: 2000,
						timeout: 5000,
						type: 'random',
						containerheight: '108px'
					});	
 

					
					
					

					$('.lightbox').lightBox();

					
			});


function buscaPlayer()
{

var campo = document.getElementById('busca').value;
var posicao = document.getElementById('posicao').value;
window.location = '?pg=jogadores&posicao='+posicao+'&busca='+campo;


}

function addNews()
{
var email = document.getElementById('email').value;

	if( email=="" || email.indexOf('@')==-1 || email.indexOf('.')==-1 )
	{
		alert('PREENCHA SEU E-MAIL CORRETAMENTE');
	}
	else
	{
			var url = 'tipo=news&email='+email;
			enviaAjax(url,'.alvoNews');
	}

}

function carregaTwitter()
{
			var url = 'tipo=twitter';
			enviaAjax(url,'.alvotwitter');
}



function abreJogador(id)
{
	if(id!='')
	{
		window.location = '?pg=jogador&id='+id;
	}
}

function enviaAjax(url,div)
{
var alvo = '#alvo_principal';

$(div).append("<p class='wait'>verificando...</p>");

		$.ajax({
			type: 'GET',
			url: 'arquivos/pages/ajax.php',
			data: url,
				success: function( data )
					{
						$(div).html(data);
						$().ajaxStop(function() { 
						});
						}
					});

}

   function mascaraData(x){
              var data = document.getElementById('data_'+x).value;
			 // alert(data);
              if (data.length == 2){
                  data = data + '/';
                  data = data;
				  document.getElementById('data_'+x).value = data ;
      return true;              
              }
              if (data.length == 5){
                  data = data + '/';
                  document.getElementById('data_'+x).value = data ;
                  return true;
              }
         }
 
function addSWF (URL, WIDTH, HEIGHT, TRANSPARENT)
{
document.write (' <object classid="clsid:27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write (' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ');
document.write (' width="'+ WIDTH +'" height="'+ HEIGHT +'">');
document.write (' <param name="movie" value="'+ URL +'" />');
document.write (' <param name="quality" value="high" />');

if ( TRANSPARENT ) {
  document.write (' <param name="Wmode" value="Transparent" />'); 
}

document.write (' <embed src="'+ URL +'" quality="high" ');

if ( TRANSPARENT ) {
document.write (' Wmode = "transparent" ');
}

document.write (' pluginspage="http://www.macromedia.com/go/getflashplayer" ');
document.write (' type="application/x-shockwave-flash" width="'+ WIDTH +'" height="'+ HEIGHT +'"></embed> ');
document.write (' </object>');

}


stepcarousel.setup({
	galleryid: 'galeriaEquipamentos',
	beltclass: 'beltel', 
	panelclass: 'boxs', 
	autostep: {enable:false, moveby:1, pause:3000},
	panelbehavior: {speed:500, wraparound:true, wrapbehavior:'slide', persist:true},
	defaultbuttons: {enable: false, moveby: 1},
	contenttype: ['inline'] 
})

