$(document).ready(function() {
	$('ul#filtre a').click(function() {
		$(this).css('outline','none');
		$('ul#filtre .current').removeClass('current');
		$(this).parent().addClass('current');
		
		var filtreVal = $(this).text().toLowerCase().replace(' ','-');
				
		if(filtreVal == 'tout') {
			$('ul#articles li.hidden').fadeIn('slow').removeClass('hidden');
		} else {
			
			$('ul#articles li').each(function() {
				if(!$(this).hasClass(filtreVal)) {
					$(this).fadeOut('normal').addClass('hidden');
				} else {
					$(this).fadeIn('slow').removeClass('hidden');
				}
			});
		}
		
		return false;
	});
});
