$(document).ready(function() {$('#portfolio').innerfade({ speed: 2000, timeout: 8000, type: 'sequence', containerheight: '220px' }); });

$(document).ready(function(){
	$(".img_holder").each(function(i) {
		id = $(this).attr('id');
		$(this).html('<img src="img/cibles/'+ id +'.jpg" style="display:none;" class="ajaxLoad_'+ i +'" title="Voir le projet" width="225" height="450" />');
		$(".ajaxLoad_"+i+"").load(function () {
			$(".ajaxLoad_"+i+"").delay(200).fadeIn(1000);
		});
	});

	$("ul.gallery li").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') 0px -225px no-repeat'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});

		//Full Caption Sliding (Hidden to Visible)
		$('.boxgrid.captionfull').hover(function(){
			$(".cover", this).stop().animate({top:'74px'},{queue:false,duration:160});
		}, function() {
			$(".cover", this).stop().animate({top:'308px'},{queue:false,duration:160});
	});


});  

