window.addEvent('domready', function() {

	if ($('left-null')){

			var menuitems = $$('#left-null li.IFSUB');	
			menuitems.each(function(element){
				var childhref = $E('a', element);	
			 	var childlist = $E('ul', element);

				childhref.href = 'javascript:void(0)';
				childlist.setStyle('display', 'block')

				var fx = new Fx.Slide(childlist, {'duration': 400, 'onStart': function(){$$('li.IFSUB').fireEvent('mouseleave')}});

				fx.hide();

				childhref.addEvent('click', function(){
					fx.slideIn();

				});


			});
			
			var menuitems = $$('#left-null li');
			menuitems.each(function(el, i){
					var first = el.getFirst();
					if (!first || first.getTag() != 'a') return;
					var overfxs = new Fx.Styles(first, {'duration': 200, 'wait': false});

					first.mouseouted = true;
					first.addEvent('mouseenter', function(e){
						overfxs.start({
							/* 'padding-left': 10, 
							'opacity' : 0.7*/
								color: '#ff7522'

						});
					});
					first.addEvent('mouseleave', function(e){
						overfxs.start({
							/* 'padding-left': 0, 
							'opacity' : 1*/
								color: '#666'
						});
					});

			}, this);

			var menuitems = $$('#left-null li.ACTIFSUB');	
			menuitems.each(function(element){
				var childhref = $E('a', element);			
				childhref.href = 'javascript:void(0)';
				childhref.removeEvents('mouseenter');
				childhref.removeEvents('mouseleave');

			});
		
	}	
});
