var cType = null, cClass = null;
$(function(){
	$("#News,#Article,#DH,#Soft").click(function(e){
		e.preventDefault();
		if (cType == null) {
			cType = $(this).css("color", "#000");
			cType.parent().css("background-color", "#FFF");
			$("#closeNav").show();
		} else {
			cType.css("color", "#FFF");
			cType.parent().css("background-color", "#C00");
			cType = $(this).css("color", "#000");
			cType.parent().css("background-color", "#FFF");
		}
		if (cClass == null)
			cClass = $("#"+this.id+"C").slideDown("normal");
		else {
			cClass.hide();
			cClass = $("#"+this.id+"C").show();
		}
	});
	$("#closeNav").click(function(){
		$("#closeNav").hide();
		cType.css("color", "#FFF");
		cType.parent().css("background-color", "#C00");
		cClass.slideUp("normal");
		cType = null, cClass = null;
	});
});