function initSlideshow(){
	photos = new Array("1.jpg","2.jpg","3.png","4.png","5.png","6.jpg","7.png","8.png");
	
	idSlideShow = 1;

	idCurrent = 0;
	showImage(idCurrent);
	
	numerotation = $("#slideshow_nav li:contains('/')");
	
	numerotation.append(photos.length);
	numerotation.prepend(idCurrent);

	$("#slideshow_nav li:first").bind("click", prevImage);
	
	$("#slideshow_nav li:last").bind("click", nextImage);
}

function initSlideshow2(){
	photos = new Array("1.jpg","2.jpg","3.png","4.png","5.jpg","6.png");
	
	idSlideShow = 2;

	idCurrent = 0;
	showImage(idCurrent);
	
	numerotation = $("#slideshow_nav li:contains('/')");
	
	numerotation.append(photos.length);
	numerotation.prepend(idCurrent);

	$("#slideshow_nav li:first").bind("click", prevImage);
	
	$("#slideshow_nav li:last").bind("click", nextImage);
}

function prevImage(){
	if(idCurrent == 0) idCurrent= photos.length-1;
	else idCurrent--;
	showImage(idCurrent);
}

function nextImage(){
	if(idCurrent == photos.length-1) idCurrent= 0;
	else idCurrent++;
	showImage(idCurrent);
}

function showImage(id){
	$("#imageSlideshow").fadeOut("200",function(){
		$("#image").html('<img id="imageSlideshow" src="themes/default/images/slideshow'+idSlideShow+'/'+photos[id]+'" alt="Slideshow"'+id+'">');
		numerotation.html((id+1)+"/"+photos.length);
	});
}
