
$(document).ready(function(){
	//$.cookie("open", null, )
	//$("#verbose").val("Cookie value is - " + $.cookie("open") + " -");
	
	if ($.cookie("open") != null) {
		//var $new = $.cookie("open");
		var $str = $.cookie("open");
		$("p.menu_head").each(function(){ 
			if ($(this).text() == $str) { 
				$(this).next("div.menu_body").fadeIn(300);
				$.cookie("open", null, {path: '/'});
			} 
		});
	}
	
	$("#firstpane p.menu_head").click(function()
	{
		$(this).css({backgroundImage:"url(down .png)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		$(this).siblings().css({backgroundImage:"url(left .png)"});
		$.cookie("open", null, {path: '/'});
		$.cookie("open", $(this).text(), {expires: 0, path: '/'});
	});
	
 	


/*/////////////////////////////////////////////////////////

$var page=$(this).text(); 
$.cookie("open", page);

а по документ тэди смотришь, ели совпало, то разворачиваешь: 
$("p.menu_head").each(function(){ 
		if ($(this).text()==str) { $(this).next("div.menu_body").show() } 
	});


/////////////////////////////////////////////////////////*/	
		
});
