jsLib.classListener('top_bar',function(elem){
	_(elem).setStyle('fontSize','2px');
});

jsLib.addOnload(window,function(){
	var menu=_('stri_left_menu');
	if(!menu) return;
	var cmenu=null;
	var out='';
	var curr_menu=null;
	var prev_menu=null;
	var fspeed=3;
	var first=null;
	for(var i=0;i<menu.childNodes.length;i++){
		cmenu=jsAnimable(menu.childNodes[i]);
		if(cmenu.tagName){
			if(cmenu.childNodes[0].tagName=='SPAN'){
				cmenu.setStyle('cursor',document.all?'hand':'pointer');
				if(!first) first=cmenu;
				curr_menu=cmenu;
				prev_menu=null;
				curr_menu.child_list=new Array();
				curr_menu.child_show=true;
				curr_menu.onclick=function(){
					if(window.sel_menu && window.sel_menu!=this){
						window.sel_menu.onclick();
					}
					if(this.child_show){
						window.sel_menu=this;
						this.child_list[0].animation('show').play();
					}else{
						window.sel_menu=null;
						this.child_list[this.child_list.length-1].animation('hide').play();
					}
					this.child_show=!this.child_show;
				}
			}else{
				if(prev_menu){
					prev_menu.next_menu=cmenu;
					cmenu.prev_menu=prev_menu;
				}
				var anim=cmenu.addAnimation('show');
				anim.fps=60;
				anim.setKeyFrame('style',0,{opacity:10});
				anim.setKeyFrame('style',fspeed,{opacity:100});
				anim.addFrameListener(0,function(obj){
					obj._target.show();
				});
				anim.addFrameListener(fspeed,function(obj){
					if(obj._target.next_menu){
						obj._target.next_menu.animation('show').play();
					}
				});
				var anim=cmenu.addAnimation('hide');
				anim.fps=60;
				anim.setKeyFrame('style',0,{opacity:100});
				anim.setKeyFrame('style',fspeed,{opacity:1});
				anim.addFrameListener(fspeed,function(obj){
					obj._target.hide();
					if(obj._target.prev_menu){
						obj._target.prev_menu.animation('hide').play();
					}
				});
				cmenu.hide();
				cmenu.className='';
				curr_menu.child_list.push(cmenu);				
				prev_menu=cmenu;
			}
		}
	}/*
	if(first){
		first.onclick();
	}*/
});
