$(document).ready(function(){
	$('.cube').each(function(){
		emplacement='';
		//$(this).width($(this).width());
		
		//on reprend l'emplacement de l'image
		if($(this).hasClass('imgGche')){
			emplacement='imgGche';
			$(this).removeClass('imgGche');
		}
		
		if($(this).hasClass('imgDte')){
			emplacement='imgDte';
			$(this).removeClass('imgDte');
		}
		
		 //on récupère l'objet en chaine texte
		image=$('<div>').append($(this).clone()).remove().html();
		
		//on construit la nouvelle structure
		structure='<div class="'+emplacement+'"><div class="volume"><div class="angleHaut"></div><div class="angleBas"></div>'+image+'</div></div>';
		
		//on remplace l'image par la structure
		$(this).replaceWith(structure);
		
		//debugIe=setTimeout('imgResize($(".volume img")), 500');
		
	});
	
	
	imgResize=function(cible){
		alert(cible);
		cible.width(cible.width);
	}
});
