var switchbackground = function(nb) {
			var divActif = '1'
			if(document.getElementById("skin1").style.display == 'block'){ divActif = '1'; divInactif = '2'; currentZindex=document.getElementById("skin1").style.zIndex;} else { divActif = '2' ;  divInactif = '1' ; currentZindex=document.getElementById("skin1").style.zIndex;}
			currentZindex--;
	if(typeof(photos) != "undefined"){
					
					var showImage = function(photoObject) {
					
						
					
					// Set the background image of the new active container
					$("#skin"+divInactif).css({
						"background-image" : "url(./"+ photoObject.image + ".jpg)",
						"display" : "block",
						"background-color" : photoObject.couleur,
						"z-index" : currentZindex
					});
						animating=true;
						$("#skin"+divActif).fadeOut(function() {
						setTimeout(function() {
							animating = false;
						}, 100);
					});
					
					
				};
				
				showImage(photos[nb]);
				
				
				
	}
};


