$(document).ready(function() {
	
	//display work
	$activeNavItem = "";
	
	$("#thumbnails li a").click(function(e) {
		var $value = $(this).attr("href");
		e.preventDefault();
		$($value).stop(true, true).delay(300).fadeIn(500);
		$("#work-feature").stop().slideDown(400);
		$("#close-btn").fadeIn(400);
		$activeNavItem = $value;
		
		
		if($activeNavItem == "#ppz"){
			$("#wilkes").fadeOut(200);
			$("#yume-ume").fadeOut(200);
		}
		else if($activeNavItem == "#wilkes"){
			$("#ppz").fadeOut(200);
			$("#yume-ume").fadeOut(200);
		}
		else if($activeNavItem == "#yume-ume"){
			$("#ppz").fadeOut(200);
			$("#wilkes").fadeOut(200);
		}

	});
	
	$("#close-btn").click(function(e) {
		e.preventDefault();
		$(".work-piece").fadeOut(200);
		$("#work-feature").stop().slideUp(400);
		$("#close-btn").fadeOut(400);
	});
	
	//form checker
	$('input').each(function() {
	    var default_value = this.value;
	    $(this).focus(function() {
	        if(this.value == default_value) {
	            this.value = '';
	        }
	    });
	    $(this).blur(function() {
	        if(this.value == '') {
	            this.value = default_value;
	        }
	    });
	});
	
	$('#skills ul li').mouseenter(function() {
		$(this).toggleClass('hover');
	});
		$('#skills ul li').mouseout(function() {
		$(this).removeClass('hover');
	});
	
});
