window.addEvent('domready', function(){
	/* This code handle the CV menu */
  var szNormal = 98, szSmall  = 55, szFull   = 319;
  /* First assign a "mouseenter" event to each element of the menu */
	var kwicks = $$("#mainMenu .main_k");
	var fx = new Fx.Elements(kwicks, {wait: false, duration: 300, transition: Fx.Transitions.quadOut});
	kwicks.each(function(kwick, i) {
		kwick.addEvent("mouseenter", function(event) {
			var o = {};
			o[i] = {width: [kwick.getStyle("width").toInt(), szFull]}
			kwicks.each(function(other, j) {
				if(i != j) {
					var w = other.getStyle("width").toInt();
					if(w != szSmall) o[j] = {width: [w, szSmall]};
				}
			});
			fx.start(o);
		});
	});
	/* Secondly assign a "mouseleave" event to each element of the menu */
	$("mainMenu").addEvent("mouseleave", function(event) {
		var o = {};
		kwicks.each(function(kwick, i) {
			o[i] = {width: [kwick.getStyle("width").toInt(), szNormal]}
		});
		fx.start(o);
	})
});