function acontece(){}acontece.init          = function(n){	if(acontece.initialized)		return;		acontece.initialized = true;	acontece.nslides     = n;	acontece.slide_atual = 1;	acontece.status      = 'play';	acontece.timer       = false;	acontece.sprites     = 'images/v2/acontece_sprites.gif';	acontece.delay       = 8000;	acontece.autoPlay    = true;	acontece.drawPages();	acontece.startTimer();}acontece.drawPages     = function(){	var html = '';	for(var i = 1; i <= acontece.nslides; i++){		html += "<div class='nsel' id='acontece_pgbt"+i+"'><a href='#' onclick='return acontece.setPage("+i+", true)'>"+i+"</a></div>";	}	//~ acontece.$('div_acontece').onmouseover = acontece.mOver;	//~ acontece.$('div_acontece').onmouseout  = acontece.mOut;	acontece.$('acontece_bar').innerHTML = html;	acontece.$('acontece_cmd').innerHTML = "<a id='acontece_pgst' href='#' onclick='return false'></a>";	acontece.refreshStatus();}acontece.refreshStatus = function(){	var isPlay = (acontece.status=='play');	if(isPlay){		acontece.$('acontece_pgst').style.backgroundPosition = "0px -43px";		acontece.$('acontece_pgst').onclick = function(){ acontece.pause(); return false; }	}	else{		acontece.$('acontece_pgst').style.backgroundPosition = "-64px -43px"		acontece.$('acontece_pgst').onclick = function(){ acontece.unpause(); return false; }	}	for(var i = 1; i <= acontece.nslides; i++)		acontece.$('acontece_pgbt'+i).className = (acontece.slide_atual==i)?'sel':'nsel';}acontece.startTimer = function(){	acontece.stopTimer();	acontece.timer    = setTimeout(acontece.hitTimer, acontece.delay);	acontece.status   = 'play';	acontece.autoPlay = true;	acontece.refreshStatus();}acontece.stopTimer  = function(){	clearTimeout(acontece.timer);	acontece.status = 'paused';	acontece.refreshStatus();}acontece.hitTimer   = function(){	var gp = acontece.slide_atual+1;	if(gp > acontece.nslides)		gp = 1;		acontece.setPage(gp);}acontece.setPage    = function(pg, pause){	for(var i = 1; i <= acontece.nslides; i++)		acontece.$('acontece-'+i).style.display = (pg == i)?'block':'none';		acontece.slide_atual = pg;	pause?		acontece.pause():		acontece.startTimer();		acontece.refreshStatus();	return false;}// Pause: Ao clicar em uma página ou clicar em "Pausar"acontece.pause     = function(){	acontece.autoPlay = false;	acontece.stopTimer();}acontece.unpause  = function(){	acontece.startTimer();}acontece.$ = function(id){	return document.getElementById(id);}
