$(document).ready(function(){
	$(".modalclose").click(function() {
		tb_remove();
		return false;
	});
	
	$('#left li').fadeTo('fast', 0.5);
	$('#left li').hover(function() {
			$(this).stop().fadeTo("fast", 1);
		}, function() {
			$(this).stop().fadeTo("fast", 0.5);
		}
	);
	
	$('.minilink').click(function (){
			var photo = $(this).attr('href');
			var chemin = $(this).parents('li').attr('className');
			var height2 = $(this).children('img').attr('height');
			var width2 = $(this).children('img').attr('width');
				$('#chargement').fadeIn();
				$('#imgtitre').fadeOut();
				$('#bigphoto').fadeOut('slow', function() {
					if(width2 > height2) { width2 = 640; }
					else { width2 = 320; }
					height2 = 480;
					$(this).attr({src: chemin + photo, width: width2, height: height2}).load( function() {
						$('#chargement').fadeOut('slow');
						$(this).fadeIn('slow');
					});
				});
		return false;
	});
});