window.addEvent("domready",function(){
    
    	
	Fx.Height = Fx.Style.extend({initialize: function(el, options){this.parent(el, 'height', options);this.element.setStyle('overflow', 'hidden');},toggle: function(){return (this.element.offsetHeight > 0) ? this.custom(this.element.offsetHeight, 0) : this.custom(0, this.element.scrollHeight);},show: function(){return this.set(this.element.scrollHeight);}});
	
	Fx.Opacity = Fx.Style.extend({initialize: function(el, options){this.now = 1;this.parent(el, 'opacity', options);},toggle: function(){return (this.now > 0) ? this.start(1, 0) : this.start(0, 1);},show: function(){return this.set(1);}});
	
	
	if($('bottom_wrap')){
		var max_height = 0;
		$ES('.users', $('bottom_wrap')).each(function(el, i){
			var chld = el.getChildren()[0];
			var h = chld.getSize().size.y - chld.getStyle("padding-top").toInt() - chld.getStyle("padding-bottom").toInt();
			if(h > max_height) max_height = h;
		});
		
		$ES('.users', $('bottom_wrap')).each(function(el, i){
			el.getChildren()[0].setStyle("height", max_height+"px");
		});
	}




	var backs = new Array();

	if($$('.mainlevel_fx') != '' ){

	var list11 = $$('.mainlevel_fx');
	var menuVer;
	var inW = list11[0].getStyle('width').toInt();
	var inWplus = list11[0].getStyle('padding-right').toInt() + 0 + list11[0].getStyle('padding-left').toInt();
	var inH = 28;
	

		list11.each(function(element, i) {

		menuVer = element.getParent();

		backs[i] = new Element('div',{
      'styles': {
			'position': 'absolute',
      'width': '0%',
      'height': '27px',
      'border': '0px solid',
      'padding': '0px',
      'margin': '0px',
			'margin-top': '-16px',
			'background': '#eaeaea'
      }
	  });

		if (navigator.appName == "Microsoft Internet Explorer"){
			backs[i].setStyle('margin-top', '0px');
		}

		menuVer.setStyle('position', 'relative');
		//menuVer.setStyle('border', '1px solid');
		menuVer.setStyle('height', inH);
		menuVer.setStyle('width', inW);

		element.setStyle('position', 'absolute');
		element.setStyle('margin-top', '-16px');
		if (navigator.appName == "Microsoft Internet Explorer"){
			element.setStyle('margin-top', '0px');
		}
		element.setStyle('width', inW);
		element.setStyle('z-index', 100);

		backs[i].injectInside(menuVer);
		

		var fx11 = new Fx.Styles(backs[i], {duration:180, wait:false});
	

		element.addEvent('mouseenter', function(){
				
			fx11.start({ 'width': inW + inWplus });

		});

		element.addEvent('mouseleave', function(){

			fx11.start({ 'width': '0%' });

		});
					
 
	});

	}//if menuholder exists


});


 

