atual = 0;
total = imagensBox.length;

atual2 = 0;
total2 = imagensBox2.length;

function proxima(atual){
	$('#boxListaDesc').html('<a href="'+ linkBox[atual] +'"><img src="' + imagensBox[atual] + '" alt="" border="0" width="140" height="140"></a><div class="descFotoLista"><span class="corTitulo"><a href="'+ linkBox[atual] +'">' + descBox[atual] + '</a></span></div>');
		for(i=0;i<total;i++) {
			$("#opNavegaH_"+i+"").css("background-color","#F0F0F0");
		}
		$("#opNavegaH_"+atual+"").css("background-color","#FFF");
	if(atual == total-1)atual= total;
}

function proxima2(atual2){
	$('#boxListaDesc2').html('<a href="'+ linkBox2[atual2] +'"><img src="' + imagensBox2[atual2] + '" alt="" border="0" width="140" height="140"></a><div class="descFotoLista"><span class="corTitulo"><a href="'+ linkBox2[atual2] +'">' + descBox2[atual2] + '</a></span></div>');
		for(i=0;i<total2;i++) {
			$("#linkNavegaH_"+i+"").css("background-color","#F0F0F0");
		}
		$("#linkNavegaH_"+atual2+"").css("background-color","#FFF");
	if(atual2 == total2-1)atual2= total2;
}

function tvflashPub(linkTVFLASH,imagensTVFLASH){

		$(".box1Links").addClass("swap");

		$('#chamadasPrincipaisH').html('<a href="'+ linkTVFLASH +'"><img src="/noiva/imagem/home/'+ imagensTVFLASH +'" width="366" height="512" alt="Publicidade" border="0" /></a>');
		
		for(i=0;i<=4;i++) {
			$("#linkNavegaH_"+i+"").css("background-color","#F3F3E9");
		}

}

function show(){
	$(this).everyTime(5000, 'slideshow', function() {atual++; if(atual >= total){atual = 0; proxima(atual);} else proxima(atual);});
}

function show2(){
	$(this).everyTime(5000, 'slideshow2', function() {atual2++; if(atual2 >= total2){atual2 = 0; proxima2(atual2);} else proxima2(atual2);});
}

function stop(recente){
	$(this).stopTime('slideshow');
	atual = recente;
}

function stop2(recente2){
	$(this).stopTime('slideshow2');
	atual2 = recente2;
}

function init() {
/* Primeiro Box */

$('#boxListaDesc').html('<a href="'+ linkBox[atual] +'"><img src="' + imagensBox[atual] + '" alt="" border="0" width="140" height="140"></a><div class="descFotoLista"><span class="corTitulo"><a href="'+ linkBox[atual] +'">' + descBox[atual] + '</a></span></div>');
	for(i=0;i<total;i++) {
		$('#opcoesNavegaH_'+i+'').html('<a href="'+ linkBox[i] +'" onmouseover="javascript:proxima('+i+');stop('+i+');" onmouseout="javascript:show()"><div id="opNavegaH_'+i+'" class="itensBoxLista">'+catBox[i]+'</div></a>');
	}
	$("#opNavegaH_"+atual+"").css("background-color","#FFF");
	$("#opNavegaH_"+atual+"").css("border-color","#FFF");		
/*Segundo Box */
$('#boxListaDesc2').html('<a href="'+ linkBox2[atual2] +'"><img src="' + imagensBox2[atual2] + '" alt="" border="0" width="140" height="140"></a><div class="descFotoLista"><span class="corTitulo"><a href="'+ linkBox2[atual2] +'">' + descBox2[atual2] + '</a></span></div>');
	for(i=0;i<total2;i++) {
		$('#linkNavegaH_'+i+'').html('<a href="'+ linkBox2[i] +'" onmouseover="javascript:proxima2('+i+');stop2('+i+');" onmouseout="javascript:show2()"><div id="linkNavegaH_'+i+'" class="itensBoxLista">'+catBox2[i]+'</div></a>');
	}
	$("#linkNavegaH_"+atual+"").css("background-color","#FFF");
	$("#linkNavegaH_"+atual+"").css("border-color","#FFF");
	var startSS = show();	
	var startSS = show2();		
}
window.onload = init;