
// Script do Accordion




// MOSTRAR FOTOS

function mostra(id) {
var mostrar = document.getElementById(id);
	for (var i = 1; i<=30; i++) {
		if (document.getElementById('foto'+i)) {document.getElementById('foto'+i).style.display='none';}
	}
{mostrar.style.display='block';}
}



// JavaScript Document
var obj = null;

/* MENU */
function checkHover() {
	if (obj) {
		obj.find('ul').fadeOut('fast');	
	} //if
} //checkHover

$(document).ready(function() {
	$('.menu > li').hover(function() {
		if (obj) {
			obj.find('ul').fadeOut(100);
			obj = null;
		} //if
		
		$(this).find('ul').fadeIn(100);
	}, function() {
		obj = $(this);
		setTimeout("checkHover()",200);
	});
});


// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(60)
image[0] = 'fundo_topo.png'
image[1] = 'fundo_topo2.png'
image[2] = 'fundo_topo3.png'
image[3] = 'fundo_topo4.png'
image[4] = 'fundo_topo.png'
image[5] = 'fundo_topo2.png'
image[6] = 'fundo_topo3.png'
image[7] = 'fundo_topo4.png'
image[8] = 'fundo_topo.png'
image[9] = 'fundo_topo2.png'
image[10] = 'fundo_topo3.png'
image[11] = 'fundo_topo4.png'
image[12] = 'fundo_topo.png'
image[13] = 'fundo_topo2.png'
image[14] = 'fundo_topo3.png'
image[15] = 'fundo_topo4.png'
image[16] = 'fundo_topo.png'
image[17] = 'fundo_topo2.png'
image[18] = 'fundo_topo3.png'
image[19] = 'fundo_topo4.png'
image[20] = 'fundo_topo.png'
image[21] = 'fundo_topo2.png'
image[22] = 'fundo_topo3.png'
image[23] = 'fundo_topo4.png'
image[24] = 'fundo_topo.png'
image[25] = 'fundo_topo2.png'
image[26] = 'fundo_topo3.png'
image[27] = 'fundo_topo4.png'
image[28] = 'fundo_topo.png'
image[29] = 'fundo_topo2.png'
image[30] = 'fundo_topo3.png'
image[31] = 'fundo_topo4.png'
image[32] = 'fundo_topo.png'
image[33] = 'fundo_topo2.png'
image[34] = 'fundo_topo3.png'
image[35] = 'fundo_topo4.png'
image[36] = 'fundo_topo.png'
image[37] = 'fundo_topo2.png'
image[38] = 'fundo_topo3.png'
image[39] = 'fundo_topo4.png'
image[40] = 'fundo_topo.png'
image[41] = 'fundo_topo2.png'
image[42] = 'fundo_topo3.png'
image[43] = 'fundo_topo4.png'
image[44] = 'fundo_topo.png'
image[45] = 'fundo_topo2.png'
image[46] = 'fundo_topo3.png'
image[47] = 'fundo_topo4.png'
image[48] = 'fundo_topo.png'
image[49] = 'fundo_topo2.png'
image[50] = 'fundo_topo.png'
image[51] = 'fundo_topo2.png'
image[52] = 'fundo_topo3.png'
image[53] = 'fundo_topo4.png'
image[54] = 'fundo_topo.png'
image[55] = 'fundo_topo2.png'
image[56] = 'fundo_topo3.png'
image[57] = 'fundo_topo4.png'
image[58] = 'fundo_topo.png'
image[59] = 'fundo_topo2.png'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}

document.write("<style> #topo { background-image:url('img/"+ranimage()+"');}</style>")
