		 //ORIGINAL
		expand_f = function(event,target,options){
			var _li = Ext.get(this.dom.parentNode);
			if( _li.hasClass('act') ) return false;
//console.log('in: '+this.dom);
			_li.dom.style.zIndex = 1;
			_li.addClass('act');
			_li.stopIt.cancel();
			Ext.select('ul.sub_left',true,this.dom.parentNode).slideIn('l', {
//				afterStyle: 'z-index:100;',
				useDisplay: true,
				duration: .5
			});
		};
		
		
		collapse_f = function(event,target,options){
			var _li = this;
//			if( this.dom != target ) return false;
			if( !this.hasClass('act') ) return false;
//console.log('out: '+this.dom);
			Ext.select('ul.sub_left',true,this.dom).slideOut('l', {
			//	afterStyle: 'z-index:0;',
				useDisplay: true,
				callback: function() { 
					_li.removeClass('act'); 
					_li.dom.style.zIndex = 0; 
				},
				duration: .5
			});
			
		};
	//------------------------------------------
		accord_open_sub = function(){
			var _li = this;
			var sub = Ext.DomQuery.selectNode('ul',this.dom);
			close_opened_sub();
			if( !sub ) return;
			var sub_el = Ext.get(sub);
			sub_el.stopIt = new Ext.util.DelayedTask();
			sub_el.on('mouseover',function(){_li.stopIt.cancel();});
			Ext.get(sub).slideIn('l', {
					useDisplay: false,
					callback: function() { _li.on('mouseout',function(a,b,c){this.stopIt.delay(10,accord_close_sub,this,[a,b,c])})},
					duration: .5
				}); 
			_li.addClass('opened');
		};
		
		close_opened_sub = function() {
			Ext.select('li.opened',true).each(function(){
				var _li = this;
				var sub = Ext.DomQuery.selectNode('ul',this.dom);
				if(sub){
					Ext.get(sub).slideOut('l', {
						useDisplay: false,
						callback: function() { _li.on('mouseover',accord_open_sub,false,{single:true}) },
						duration: .5
					});
				}
				_li.removeClass('opened');
			});
			
		};
		
		accord_close_sub = function() {
			var _li = this;
			if( _li.hasClass('opened') ){
				var sub = Ext.DomQuery.selectNode('ul',this.dom);
				if(sub){
					Ext.get(sub).slideOut('l', {
						useDisplay: false,
						callback: function() { _li.on('mouseover',accord_open_sub,false,{single:true}) },
						duration: .5
					});
				}
				_li.removeClass('opened'); 
			}
		};
	//------------------------------------------	
Ext.onReady(function(){				
		Ext.select('span.mouseHover',true).on('mouseover',expand_f);
		Ext.select('li.ll1',true).each(function(){this.stopIt = new Ext.util.DelayedTask();});
		Ext.select('li.ll1',true).on('mouseout',function(a,b,c){this.stopIt.delay(10,collapse_f,this,[a,b,c])});
		Ext.select('li.ll1',true).on('mouseover',function(){this.stopIt.cancel()});
	
		Ext.select('li.sub_bottom',true).each(function(){this.stopIt = new Ext.util.DelayedTask();});
		Ext.select('li.sub_bottom',true).on('mouseover',accord_open_sub,false,{single:true});
		Ext.select('li.sub_bottom',true).on('mouseout',function(a,b,c){this.stopIt.delay(10,accord_close_sub,this,[a,b,c])});
});

