

// JavaScript Document



	//title down function
	$(document).ready(function(){
		
	$(".titleDown").parent().parent().css("overflow","hidden");
	$(".titleDown").next().addClass("uShow");
	$(".titleDown").next().next().addClass("uShow");
	$(".titleDown").next().removeClass("uHide");
	$(".titleDown").next().next().removeClass("uHide");
		
	$(".titleDown").mouseover(function(){	
	
	
	$(this).stop().animate({"top":"1px"},250, function() {
	$(this).parent().parent().css("overflow", "visible");
	
});
	});
	
	$(".titleDown").mouseleave(function(){	
	
	$(this).parent().parent().css("overflow", "hidden");
	$(this).stop().animate({"top":"22px"},250);
	

	});
	
});

	//title up function
	$(document).ready(function(){
	
	
	
		
	$(".titleUp").parent().parent().css("overflow","visible");
	$(".titleUp").next().addClass("uHide");
	$(".titleUp").next().next().addClass("uHide");
	$(".titleUp").next().removeClass("uShow");
	$(".titleUp").next().next().removeClass("uShow");
	
	$(".titleUp").mouseover(function(){	
	
	$(this).next(".uHide").stop().animate({"opacity":"1"}, 300);
		$(this).next(".uHide").next(".uHide").stop().animate({"opacity":"1"}, 300);
		
	
	});
	
		
	$(".titleUp").mouseleave(function(){	
	
	$(this).next(".uHide").stop().animate({"opacity":"0"}, 400);
		$(this).next(".uHide").next(".uHide").stop().animate({"opacity":"0"}, 300);
	
	
	
});
	});
	


// for rollover in the up state

$(document).ready(function(){
	
	
	
	$(".up").mouseover(function(){
		
		
	if($(this).parent().children().length== 2)	
	{
	$(this).next(".uHide").stop().animate({"opacity":"1"}, 300);
	} else if ($(this).parent().children().length== 3)	
	{
		$(this).next(".uHide").stop().animate({"opacity":"1"}, 300);
		$(this).next(".uHide").next(".uHide").stop().animate({"opacity":"1"}, 300);
	}else if ($(this).parent().children().length== 4)	
	{
		$(this).next(".uHide").stop().animate({"opacity":"1"}, 300);
		$(this).next(".uHide").next(".uHide").stop().animate({"opacity":"1"}, 300);
		$(this).next(".uHide").next(".uHide").next(".uHide").stop().animate({"opacity":"1"}, 300);
	}

});
$(".up").mouseleave(function(){
	
	if($(this).parent().children().length== 2)	
	{
	$(this).next(".uHide").stop().animate({"opacity":"0"}, 450);
	} else if ($(this).parent().children().length== 3)	
	{
		$(this).next(".uHide").stop().animate({"opacity":"0"}, 400);
		$(this).next(".uHide").next(".uHide").stop().animate({"opacity":"0"}, 400);
	} else if ($(this).parent().children().length== 4)	
	{
		$(this).next(".uHide").stop().animate({"opacity":"0"}, 400);
		$(this).next(".uHide").next(".uHide").stop().animate({"opacity":"0"}, 400);
		$(this).next(".uHide").next(".uHide").next(".uHide").stop().animate({"opacity":"0"}, 400);
	}
	
		
		
		

});

});
	

// for rollover in down state

$(document).ready(function(){
	
	$(".projectTitle").mouseover(function(){
		
		if ($(this).hasClass("down")== true){	
		$(this).stop().animate({"top":"0px"},300, function() {
	$(this).parent().css("overflow", "visible");
	});
		}

});
$(".projectTitle").mouseleave(function(){
		
		if ($(this).hasClass("down")== true){	
		$(this).parent().css("overflow", "hidden");
		$(this).stop().animate({"top":"41px"},400);
		}

});

});




// filters

$(document).ready(function(){
	
	$("#designFilter").click(function(){
		
		showDesign();
		hideInteractive();
		hideForm();
		
		
		
	
		
});

$("#interactiveFilter").click(function(){
		
		showInteractive();
		hideDesign();
		hideForm();
});

$("#formFilter").click(function(){
		
		showForm();
		hideDesign();
		hideInteractive();
		
});

$("#allFilter").click(function(){
		
		showAll();
		
});

$("#designMenu").children().children().children().click(function(){
	
	showDesign();
		hideInteractive();
		hideForm();
		


});

$("#interactiveMenu").children().children().children().click(function(){
	
	showInteractive();
	hideDesign();
	hideForm();
		


});

$("#formMenu").children().children().children().click(function(){
	showForm();
	hideDesign();
	hideInteractive();
		
		


});



});
