$(document).ready( function(){
							


<!--///////////////////////////// Apparitions des éléments (premier chargement) /////////////////////////////-->
$("img#bgimg").fadeTo(500, 1);
$("div#col1").delay(800).fadeTo(500, 1);
$("div#col2").delay(1200).fadeTo(500, 1);
$("div#col3").delay(1600).fadeTo(500, 1);
<!--////////////////////////////FIN//////////////////////////////-->

var fonction_a_rappeller=function(){
	

	
<!--///////////////////////////// Rétablissement de shadowbox (on AjaxLoad) /////////////////////////////-->
Shadowbox.init({skipSetup: true}); Shadowbox.setup();
<!--////////////////////////////FIN//////////////////////////////-->


<!--/////////////////////////////  gestion du scroll de la page /////////////////////////////-->
hauteur=$("#realbody").height();
$("#realbody").height(hauteur-20);
$(window).bind("resize", resizeWindow);
function resizeWindow(){
var newWindowHeight = $(window).height();
$("#realbody").css("height", newWindowHeight-20 );
}
<!--////////////////////////////FIN//////////////////////////////-->


<!--///////////////////////////// Apparitions des éléments (on AjaxLoad) /////////////////////////////-->
$("img#bgimg").show();
$("div#col1").show();
$("div#col2").show();
$("div#col3").delay(500).fadeTo(500, 1);
<!--////////////////////////////FIN//////////////////////////////-->

<!--///////////////////////////// Ouverture des projets par le bt ouvrir /////////////////////////////-->
$("div.project.iteration div.texte div.open").each(function(e){
$(this).click(function(){
					   
<!--fct bt ouvrir-->
$("div.close").parent("div.texte").children("div.more").hide();
$("div.close").css({"display":"none"});
$("div.open").show();
$("span.annonce").show();
$("div.project.iteration div.medias").hide();
$(this).parent("div.texte").children("span.annonce").hide();
$(this).parent("div.texte").parent("div.project.iteration").children("div.medias").show();
$(this).parent("div.texte").children("div.more").show();
$(this).css({"display":"none"});
$(this).parent("div.texte").children("div.close").show();

<!--items menu taggés-->
$("ul#artiste li").children("a").removeClass("selected");
$("ul#artiste li").eq(e).children("a").addClass("selected");

<!--new id fiche projet-->
$("div.project.iteration").removeAttr("id");
$("div.project.iteration").eq(e).attr("id" , "newfocus2");

<!--scroll des fiches-->
var divOffset = $('#realbody').offset().top;
var pOffset = $('div#newfocus2').offset().top;
var pScroll = pOffset - divOffset - 13;
$('#realbody').animate({scrollTop: '+=' + pScroll + 'px'}, 1000);
<!--chgt background-->
$("ul#background li").children("img").hide();
$("ul#background li").children("img").eq(e).fadeIn("slow");
});
});
<!--////////////////////////////FIN//////////////////////////////-->


<!--///////////////////////////// BT fermer /////////////////////////////-->
$("div.close").click(function(){
$(this).parent("div.texte").children("span.annonce").show();
$(this).parent("div.texte").parent("div.project.iteration").children("div.medias").hide();
$(this).parent("div.texte").children("div.more").hide();
$(this).css({"display":"none"});
$(this).parent("div.texte").children("div.open").show();
$("ul#background li img").fadeOut("slow");
$("ul#artiste li").children("a").removeClass("selected");

});
<!--////////////////////////////FIN//////////////////////////////-->



<!--///////////////////////////// Gestion des projets par le menu /////////////////////////////-->
<!----Action sur menus---->
$("ul#artiste li a").each(function(i){								 
$(this).click(function(){

<!--items menu taggés-->
$("ul#artiste li").children("a").removeClass("selected");
$(this).addClass("selected");

<!--selection fiche projet-->
$("div.project.iteration").removeAttr("id");
$("div.project.iteration").eq(i).attr("id" , "newfocus");
$("div.project.iteration").children("div.texte").children("div.close").click();
$("div.project.iteration").eq(i).children("div.texte").children("div.open").click();

<!--scroll des fiches-->
var divOffset = $('#realbody').offset().top;
var pOffset = $('div#newfocus').offset().top;
var pScroll = pOffset - divOffset - 13;
$('#realbody').animate({scrollTop: '+=' + pScroll + 'px'}, 1000);

<!--chgt background-->
$("ul#background li").children("img").hide();
$("ul#background li").children("img").eq(i).fadeIn("slow");

});
});
<!--////////////////////////////FIN//////////////////////////////-->


<!--/////////////////////////////  Tiret entre les disciplines /////////////////////////////-->
$("div.texte").each(function(j){
$(this).find("span.cat").last().css({"border":"none"});
});
<!--////////////////////////////FIN//////////////////////////////-->

}
if(typeof onAjaxLoad=='function')onAjaxLoad(fonction_a_rappeller);
if(window.jQuery)jQuery(document).ready(function(){
fonction_a_rappeller.apply(document);
});


});
