function addFonts(){
	if($('.cufon').length) Cufon.replace('.cufon',{hover: true,fontFamily : 'Univers'}); // Appliquer le font Univers	
	if($('.cufonL').length) Cufon.replace('.cufonL',{hover: true,fontFamily :'UniversLight'}); // Appliquer le font Univers  Light
}


$(function(){
	filterEvent();
	
	langageLinkEvent();
	
	Most();
	
	addFonts();
})

/* ---    le filtre    --- */

function filterEvent(){
	$('#filter > ul > li').mouseenter(function(){	
		$('#filter ul ul').hide();
		$(this).addClass('on');
		$('ul',$(this)).show();
	});
	
	$('#filter > ul > li').mouseleave(function(){
		$('#filter ul ul').hide();
		$(this).removeClass('on');		
	});
}

/*--- le rollover sur le lien langues ---*/

function langageLinkEvent(){
	$('a.lang').bind('click',function(){
		$('.lang_list').fadeIn();
		$('.links').addClass('jump');
		return false;
	})
	
	$('.lang_list .close').bind('click',function(){
		$('.lang_list').fadeOut();
	})
}

/* -------- get button 'savoir plus' ==> design -------- */
function Most(){
	$('#more').css({'display':'block','position':'relative','top':'-140px','left':'-50px','width':'490px','height':'85px','padding':'130px 0 0 0'});
	$('#more').click(function(){
			var imgSrc= $('#shut_img').attr('src');
			var path = imgSrc.substring(0, imgSrc.lastIndexOf('/')+1);			
			if($('.most_info:visible').length !=0){
				$('.most_info,.bg-event').fadeOut('slow', function(){
					$('#shut_img').attr('src',path+'more_link.gif');
				});
			}
		else {
			$('.most_info,.bg-event').fadeIn('slow', function(){
				
				$('#shut_img').attr('src',path+'less_link.gif');
			});
		}
		return false;
	});
	$('.shut').click(function(){
		var imgSrc= $('#shut_img').attr('src');
		var path = imgSrc.substring(0, imgSrc.lastIndexOf('/')+1);	
		
		$(this).parent('.most_info,.bg-event').fadeOut('slow', function(){
			$('#shut_img').attr('src',path+'more_link.gif');
		});
		
		$('.bg-event').fadeOut('slow', function(){});
		
		
		
				
		$('#shut_img').attr('src',path+'more_link.gif');
				
		return false;
	});
}

/*****************************************/

