$(document).ready(function(){
	/*menu...*/
	$('div[class^="menuLeft"]').click(function(){
			var op = $(this).attr('class');
			$("#"+op).slideToggle();

	});
	/*
	$('.menuLeftExpand').click(function(){
		var op = $(this).attr('id');
		$("div[id^=\""+op+"_\"]").slideToggle();
		$('#'+op).fadeOut();
		ex[exi++] = '#'+op;
	});*/
	//---
	$('ul[id^="menuUL"]').each(function(){
		var $a = $(this).children();
		var hide = true;
		var id = $(this).attr('id');
		var nr = id.substring(6);
		$a.each(function(){
				if($(this).html().indexOf("activ")>0)hide=false;
		});
		if(!hide)$('div[id^="menuLeft'+nr+'"]').removeClass('hide');

	});
	//--------
	/**/
	var rc = false;
	$("#menuLeft li ul li > a").click(function(){rc=true;});
		$("#menuLeft li a").click(function(){
			var $a = $(this).parent().children();
			$a.each(function(){
				var s = String($(this).get(0).tagName).toLowerCase();
				if(s=="ul"){
					$(this).children().slideToggle();
				}
			});
		if(!rc){rc=false; return false;}
		rc = false;
	});
	//---show opened...
	$('#menuLeft > li > ul > li > .activ').parent().parent().children().each(function(){$(this).css('display','block');});
	/**/
});
