jogos = {
	jogoAtual : '',
	arrayJogos : new Array(),
	flgMarcado : 0,
	
	preencheArrayJogos : function(){
		this.arrayJogos.push(this.structJogos('mnMegasena','controllerMegaSena', '379', '577',1,'/Megasena'));
		this.arrayJogos.push(this.structJogos('mnTimemania','controllerTimemania', '379', '740',2,'/Timemania'));
		this.arrayJogos.push(this.structJogos('mnLotomania','controllerLotomania', '379', '577',1,'/Lotomania'));
		this.arrayJogos.push(this.structJogos('mnDuplasena','controllerDuplasena', '379', '577',1,'/Duplasena'));
		this.arrayJogos.push(this.structJogos('mnQuina','controllerQuina', '379', '577',1,'/Quina'));
		this.arrayJogos.push(this.structJogos('mnLotofacil','controllerLotofacil', '379', '577',1,'/Lotofacil'));
		this.arrayJogos.push(this.structJogos('mnLoteca','controllerLoteca', '379', '577',1,'/Loteca'));
		this.arrayJogos.push(this.structJogos('mnLotogol','controllerLotogol', '379', '577',1,'/Lotogol'));
		this.arrayJogos.push(this.structJogos('mnFederal','controllerFederal', '379', '577',1,'/Federal'));
		this.arrayJogos.push(this.structJogos('mnInstantania','controllerInstantanea', '379', '660',3,'/Instantanea'));
	},
	
	trocaSecao : function(index){
		if(this.flgMarcado==0){
			window.location.hash = this.arrayJogos[index].analitics;
			this.trocaMenu(this.arrayJogos[index].idMenu,'click');
			pageTracker._trackPageview(this.arrayJogos[index].analitics);
			FuncoesGerais.CarregaFlashDiv('_FLA/jogos/loader.swf?nomeArquivo=' + this.arrayJogos[index].flash + '.swf', this.arrayJogos[index].l, this.arrayJogos[index].a,'divFlash');
			bodyBg(this.arrayJogos[index].tCorpo);
			this.jogoAtual =this.arrayJogos[index].idMenu; 
		}else{
			document.getElementById('linkDescartarVolante').href = "javascript:jogos.flgMarcado=0;navegacao.acao('divHome'," + index + ",1);lightbox.fechar();";
			lightbox.abrir('divTrocaVolantes', '000')
		}
	},
	
	trocaMenu : function(obj,acao){
		
		if (acao=='over'){
			document.getElementById(obj).style.backgroundPosition='bottom';
		}
		if(acao=='out' && obj.indexOf(document.getElementById('headerMenu1_hidJogoAtual').value)==-1){
			if (obj!=this.jogoAtual){
				document.getElementById(obj).style.backgroundPosition='top';
			}
		}
		
		if(acao=='click'){
			document.getElementById(obj).style.backgroundPosition='bottom';
			if(this.jogoAtual!=''){
				document.getElementById(this.jogoAtual).style.backgroundPosition='top';
			}
		}
	},
	
	structJogos : function(menu,swf,largura,altura,corpo,page){
		return {
			idMenu : menu,
			flash : swf,
			l : largura,
			a : altura,
			tCorpo : corpo,
			analitics : page
		}
	}
	
	
}