function rotateBg(){
	var dly = 1200;
	var nextBg = currentBg+1;
	var howManyBg = 3;
	if(nextBg > howManyBg) nextBg = 1;
//	console.log('fade out current:' + currentBg);
//	console.log('fade in next:' + nextBg);
//	$( "#campanha0" + currentBg ).stop(true, true).fadeOut(dly).hide();
	$( "#campanha0" + currentBg ).fadeOut(dly, function() {
		$( "#campanha0" + nextBg ).stop(true, true).fadeIn(dly);
	});
	currentBg = nextBg;
	return;
}

var currentBg = 1;
var slideShow = 0;
$(document).ready(function(){
//	$("#campanha01").hide().fadeIn(5000);
	
	$("#campanha01").hide().fadeIn(1200);
	$("#campanha02").hide();
	$("#campanha03").hide();
	slideShow = setInterval("rotateBg()", 7000);
	
	$("#campanha").mouseenter(function() {
//		console.log('clear interval');
		clearInterval(slideShow);
	}).mouseleave(function() {
//		console.log('restart interval');
		slideShow = setInterval("rotateBg()" , 7000);
	});
});
