// JavaScript Document (index.php en showcase.php)

$(document).ready(function(){
	
	$('#filter label').click(function () {
		$('#filter label').removeClass('active');
		$(this).addClass('active');
	});
	
	$('#sort label').click(function () {
		$('#sort label').removeClass('active');
		$(this).addClass('active');
	});

	$('#style label').click(function () {
		$('#style label').removeClass('active');
		$(this).addClass('active');
	});
	
	// Verberg de projecten, IE fix
	$(".project-content").animate({
		opacity: 0
	}, 0, function() {
		// Animation complete.
	});	
	
	// Toon de project content pas wanneer je met de huis over dit project beweegt
	$(".project-content").hover(
		
		function () {
			
			$(this).delay(100).animate({
				opacity: 1
			}, 1000, function() {
				// Animation complete.
			});
						
		}, 
		function () {
			
			$(this).animate({
				opacity: 0
			}, 1000, function() {
				// Animation complete.
			});
			
		}
		
	);
	
});

// Maakt het zoekveld leeg wanneer je er op klikt
function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
		thefield.value = ""
}
