var fotoPortada = 1;
var numFotosPortada = 3;

function fotosPortada(){
	$('#imgFotoPortada'+fotoPortada).animate({opacity:0}, 600, function () {});
	fotoPortada ++;
	if (fotoPortada > numFotosPortada)
		fotoPortada = 1;
	$('#imgFotoPortada'+fotoPortada).animate({opacity:1}, 600, function () {});
}

function iniciarFotosPortada(){
	id = setInterval("fotosPortada()", 4000);
}

function ajustaDatos(){
	var altura = document.getElementById("contenido").offsetHeight;
	$('#datos').css("top", altura+300);
}

function slide(num,max){
	for (i=1; i<=max; i++){
		if (i == num){
			$("#foto"+i).show("slow");
		} else {
			$("#foto"+i).hide("slow");
		}
	}
	num += 1;
	if (num > max){
		num = 1;
	}
	setTimeout("slide("+num+","+max+")", 5000);
}

function slideshow(num,max){
	setTimeout("slide("+num+","+max+")", 5000);
}
