$(document).ready(function(){


$('#masque').click(function(){cache();});

$(window).scroll(function()
{

	var scroll=$('html').attr('scrollTop');
	if(scroll==0)
	{
		scroll=$('body').attr('scrollTop');
	}

		$('#lienSite a.twitter').css('top',scroll+10);
		$('#lienSite a.facebook').css('top',scroll+10);
		$('#masque').css('top',scroll);
		
	}
);		  
		  
});

function actualiseDefile(identifiant)
{
$.post('./actualiseDefile.php', {id:identifiant}, function(e){ 

$('#myImageFlow').html(e);
var instanceOne = new ImageFlow();
	instanceOne.init({ ImageFlowID: 'myImageFlow' });

} );


return false;
}


function agrandir(nom)
{

;var scroll=$('html').attr('scrollTop');
if(scroll==0)
	{
		scroll=$('body').attr('scrollTop');
	}
$('#masque').fadeIn();
$('#detail').html('<img src="./photos/defile/G/'+nom+'" onclick="cache()"  />');


var largeur = $(window).width();
var left=largeur/2-390;
var top=270;
$('#zone').css({'width':'500px','height':'500px','top':50+scroll+'px','left':largeur/2-250,'background':'transparent'});
$('#zone').fadeIn();

setTimeout("$('#detail').fadeIn()",200);


}

function cache()
	{
	$('#masque').fadeOut();
	
	$('#detail').fadeOut();
	$('#detail').html(' ');
	$('#zone').fadeOut();
	setTimeout("$('#zone').css({'width':'130px','height':'110px','background-color':'#d82173'})",500);
	}
