/* JS */
// illustration des menus
function ill_menu(var1,season) {
	document.getElementById('illustration_menu').style.display='block';
	document.getElementById('illustration_conteneur').style.zIndex='3';
	document.getElementById('illustration_menu').style.background='url(/img/menu_illustration_'+var1+(season != null?'_'+(season=='w'?'h':'e'):'')+'.png)';
	document.getElementById('illustration_menu').style.left = 120*var1+'px';
}

function ill_menu_out() {
	document.getElementById('illustration_menu').style.display='none';
	document.getElementById('illustration_conteneur').style.zIndex='1';
}

/* JQUERY */
$(function() { 
	$(".img_ajax[id]").each(function(i, item_) {
		//var id = $(item_).attr('id');
		var id_ = $(item_).attr('id');
	});

	// fancy box
	$("a.fancy").fancybox(); 

	// FULL - LIGHT
	$(".full").hide();
	$(".light").click(function()  {
		// verification de l'ouverture du next full
		if ($(this).next(".full:visible").length != 0) {
			$(this).next(".full").slideToggle(100, function () { $(this).prev(".light").css('background-image','url(/img/icons/en_savoir_plus.png)');}); 
		}
		else  {
			$(this).next(".full").slideToggle(100, function () { $(this).prev(".light").css('background-image','url(/img/icons/en_savoir_moins.png)');}); 
		}
	});
		   
	/* ANIMATION CYCLE */						   
	$('#contenu ul.cycle').cycle({
		fx: 'fade', 
		speed: 400,
		timeout: 5000
	});
	
	$('#actu ul.cycle').cycle({
		fx: 'turnDown', 
		speed: 400,
		timeout: 5000
	});
});
