$(document).ready(function() {
	//$('#col-droite-contenu, #contenuOnline').jScrollPane();
	$('.online').jScrollPane();

	/* Menu */
	$("#menu-container ul li a.link").each(function() {
		$(this).hover(function() {
			$("#menu-container ul li .menu").hide();
			$("#menu-" + $(this).parent("li").attr("id")).show();
		}, function() {
			$("#menu-container ul li .menu").hide();				
		});
	});
	
	$("#menu-container ul li .menu").each(function() {
		$(this).hover(function() {
			$(this).show();
		}, function() {
			$(this).hide();	
		});
	});
	
	/* Espace Pro */
	$("#espace-pro, #espace-pro-menu").hover(function() {
		$("#espace-pro-menu").show();	
	}, function() {
		$("#espace-pro-menu").hide();		
	});
	
	$("#identifiant").focus(function() {
		if ($(this).val() == "Identifiant") $(this).val("");		
	});
	
	/* Newsletter */
	$("#newsletter, #newsletter-menu").hover(function() {
		$("#newsletter-menu").show();	
	}, function() {
		$("#newsletter-menu").hide();		
	});	
	
	$("#email").focus(function() {
		if ($(this).val() == "Email") $(this).val("");
	});
	
	/* Recherche */
	$("#rechercher").focus(function() {
		if ($(this).val() == "Rechercher") $(this).val("");
	});
	
	$("#rechercher").blur(function() {
		if ($(this).val() == "") $(this).val("Rechercher");
	});

	$('a.lightbox').fancybox();

});

function diaporama_affiche(gid,deb,lien,liste){
	$('#'+liste+' a').each(function(){
		$(this).attr('class', '');
	});

	lien.className='actif';

	$('#diaporama'+gid).load('ajax-diaporama.php?GID='+gid+'&DEB='+deb);
}

/*$(window).load(function() {
	$("#coldContenu").jScrollPane();
});*/
