$(document).ready(function() {
	$('#filter a').click(function() {
		$(this).css('outline','none');
		$('#filter .current').removeClass('current');
		$(this).parent().addClass('current');
		
		var filterVal = $(this).text().toLowerCase().replace(' ','-');
			
		if(filterVal == 'all' || filterVal == 'alles') {
			$('#portfolio').fadeOut('normal',function(){
			$('#portfolio li.hidden').removeClass('hidden');
			$('#portfolio').fadeIn('normal');
			});
		}
		else {
			$('#portfolio').fadeOut('normal',function(){
				$('#portfolio li').each(function() {
					if(!$(this).hasClass(filterVal)) {
						$(this).addClass('hidden');
					}
					else{
						$(this).removeClass('hidden');
					}
					$('#portfolio').fadeIn('normal');
				});
			});
		}
	
		
		return false;
	});
});



/* instead of
fadeOut(’normal’).addClass(’hidden’);
use
fadeTo(’normal’,0.1)
Of course, to fade back to normal you use
fadeTo(’slow’,1)
*/
/*
$(document).ready(function() {
	$('#filter a').click(function() {
		$(this).css('outline','none');
		$('#filter .current').removeClass('current');
		$(this).parent().addClass('current');
		
		var filterVal = $(this).text().toLowerCase().replace(' ','-');
			
		if(filterVal == 'all' || filterVal == 'alles') {
			$('#portfolio').fadeOut('normal',function(){
			$('#portfolio li.hidden').removeClass('hidden');
			$('#portfolio').fadeIn('normal');
			});
		}
		else {
			$('#portfolio').fadeOut('normal',function(){
				$('#portfolio li').each(function() {
					if(!$(this).hasClass(filterVal)) {
						$(this).addClass('hidden');
					}
					else{
						$(this).removeClass('hidden');
					}
					$('#portfolio').fadeIn('normal');
				});
			});
		}
	
		
		return false;
	});
});*/
