/* Menu animé */
var Menu = function(menuId,sliderId){
	var menu = $$('#'+menuId+' a');
	var slider = $(sliderId);
	if (menu && slider){
		var fx = new Fx.Styles(slider, {duration:100, wait:false});
		menu.each(function(element) {
			element.addEvent('mouseenter', function(){
				fx.start({
					'left' : [element.getLeft()],
					'width' : [element.getStyle('width').toInt()+element.getStyle('padding-left').toInt()+element.getStyle('padding-right').toInt()],
					'background-color': '#53a32b'
				});
			});
			element.addEvent('mouseleave', function(){
				fx.start({
					'background-color': '#314f7d'
				});
			});
		});
	}
}
/* Menu sous forme de colonnes */
var MenuColonne = function(colonneClass,heightDiff){
	var colonne = $$(colonneClass);
	if (colonne){
		colonne.each(function(element,i) {
			var div = $E('div', element);
			if (div){
				var heightStart = div.getStyle('height').toInt();
				var fx = new Fx.Styles(div, {duration:150, wait:false});
				element.addEvent('mouseenter', function(){
					fx.start({
						'margin-top' : [- heightDiff],
						'height' : [heightStart + heightDiff],
						'background-color': '#53a32b'
					});
				});
				element.addEvent('mouseleave', function(){
					fx.start({
						'margin-top' :0,
						'height' : [heightStart],
						'background-color': '#314f7d'
					});
				});
			}
		});
	}
}