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

var szNormal = 165, szSmall  = 100, szFull   = 350;
 
var maev_menus = $$("#maev_menus .maev_menu");
var fx = new Fx.Elements(maev_menus, {wait: false, duration: 500, transition: Fx.Transitions.Back.easeOut});
maev_menus.each(function(maev_menu, i) {
	maev_menu.addEvent("mouseenter", function(event) {
		var o = {};
		o[i] = {width: [maev_menu.getStyle("width").toInt(), szFull]}
		maev_menus.each(function(other, j) {
			if(i != j) {
				var w = other.getStyle("width").toInt();
				if(w != szSmall) o[j] = {width: [w, szSmall]};
			}
		});
		fx.start(o);
	});
});
 
$("maev_menus").addEvent("mouseleave", function(event) {
	var o = {};
	maev_menus.each(function(maev_menu, i) {
		o[i] = {width: [maev_menu.getStyle("width").toInt(), szNormal]}
	});
	fx.start(o);
})

el1=$('maev_menu_txt_01');
$('maev_menu_red').addEvent('mouseleave', el1.fade.bind(el1, [0]));
$('maev_menu_red').addEvent('mouseenter', function(e) {
  // You often will need to stop propagation of the event
  e.stop();
  el1.fade(1);
});

el2=$('maev_menu_txt_02');
$('maev_menu_orange').addEvent('mouseleave', el2.fade.bind(el2, [0]));
$('maev_menu_orange').addEvent('mouseenter', function(e) {
  // You often will need to stop propagation of the event
  e.stop();
  el2.fade(1);
});

el3=$('maev_menu_txt_03');
$('maev_menu_yellow').addEvent('mouseleave', el3.fade.bind(el3, [0]));
$('maev_menu_yellow').addEvent('mouseenter', function(e) {
  // You often will need to stop propagation of the event
  e.stop();
  el3.fade(1);
});

el4=$('maev_menu_txt_04');
$('maev_menu_green').addEvent('mouseleave', el4.fade.bind(el4, [0]));
$('maev_menu_green').addEvent('mouseenter', function(e) {
  // You often will need to stop propagation of the event
  e.stop();
  el4.fade(1);
});

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

var szNormal = 165, szSmall  = 100, szFull   = 350;
 
var maev_menus = $$("#maev_menus .maev_menu");
var fx = new Fx.Elements(maev_menus, {wait: false, duration: 500, transition: Fx.Transitions.Back.easeOut});
maev_menus.each(function(maev_menu, i) {
	maev_menu.addEvent("mouseenter", function(event) {
		var o = {};
		o[i] = {width: [maev_menu.getStyle("width").toInt(), szFull]}
		maev_menus.each(function(other, j) {
			if(i != j) {
				var w = other.getStyle("width").toInt();
				if(w != szSmall) o[j] = {width: [w, szSmall]};
			}
		});
		fx.start(o);
	});
});
 
$("maev_menus").addEvent("mouseleave", function(event) {
	var o = {};
	maev_menus.each(function(maev_menu, i) {
		o[i] = {width: [maev_menu.getStyle("width").toInt(), szNormal]}
	});
	fx.start(o);
})

el1=$('maev_menu_txt_01');
$('maev_menu_red').addEvent('mouseleave', el1.fade.bind(el1, [0]));
$('maev_menu_red').addEvent('mouseenter', function(e) {
  // You often will need to stop propagation of the event
  e.stop();
  el1.fade(1);
});

el2=$('maev_menu_txt_02');
$('maev_menu_orange').addEvent('mouseleave', el2.fade.bind(el2, [0]));
$('maev_menu_orange').addEvent('mouseenter', function(e) {
  // You often will need to stop propagation of the event
  e.stop();
  el2.fade(1);
});

el3=$('maev_menu_txt_03');
$('maev_menu_yellow').addEvent('mouseleave', el3.fade.bind(el3, [0]));
$('maev_menu_yellow').addEvent('mouseenter', function(e) {
  // You often will need to stop propagation of the event
  e.stop();
  el3.fade(1);
});

el4=$('maev_menu_txt_04');
$('maev_menu_green').addEvent('mouseleave', el4.fade.bind(el4, [0]));
$('maev_menu_green').addEvent('mouseenter', function(e) {
  // You often will need to stop propagation of the event
  e.stop();
  el4.fade(1);
});

});