$(function() {
	$("#yellowBox li a").click(function(){
		var rel = $(this).attr("rel");
		if($("#yellowBox").hasClass("on")){
			if($("."+ rel).hasClass("open")){
				$("."+ rel).removeClass("open").slideUp("fast");
				$("#header .inside").animate( { height:"211"}, "fast" );
				$("#yellowBox li a").removeClass("inactive");
				$("#yellowBox").removeClass("on");
			} else {
				$("#yellowBox li a").addClass("inactive");
				$(this).removeClass("inactive");
				$(".open").hide().removeClass("open");
				$("." + rel).addClass("open").show();
			}
		} else {
			$("#yellowBox").addClass("on");
			$("#yellowBox li a").addClass("inactive");
			$(this).removeClass("inactive");
			$("#header .inside").animate( { height:"500"}, "fast" );
			$("#yellowBox,." + rel).css("height","auto");
			$("." + rel).addClass("open").slideDown("fast");
		}
		return false;
	});
	if($("body").hasClass("home")){
		$("#yellowBox").addClass("on");
		$("#yellowBox li a").addClass("inactive");
		$("#yellowBox li a").eq(0).removeClass("inactive");
		$(".tab1").addClass("open").slideDown("fast");
	}
});

