	var Kwix = {
		
		start: function(){
			Kwix.parseKwicks();
		},
		
		parseKwicks: function(){
			
			var squeeze_to = 23;
			//var max_height = 221;
			
			//get original widths
			var start_heights = new Array();
			var kwicks = $$('#nav1level .kwick');
			var fx = new Fx.Elements(kwicks, {wait: false, duration: 250, transition:Fx.Transitions.Cubic.easeOut});
			kwicks.each(function(kwick, i){
				
				start_heights[i] = kwick.getStyle('height').toInt();
				
				kwick.addEvent('mouseenter', function(e){
					
					var obj = {};
					if (kwick.id=='navsolutions'){
						obj[i] = {
							'height': [kwick.getStyle('height').toInt(), 100]
						};
					}else if (kwick.id=='navproduits'){
						obj[i] = {
							'height': [kwick.getStyle('height').toInt(), 80]
						};
					
					}else if (kwick.id=='navservices'){
						obj[i] = {
							'height': [kwick.getStyle('height').toInt(), 80]
						};
					}
					
					var counter = 0;
					
					kwicks.each(function(other, j){
						if (other != kwick){
							var w = other.getStyle('height').toInt();
							if (w != squeeze_to) obj[j] = {'height': [w,squeeze_to] };
						}
					});
					fx.start(obj);
				}
				);
			});
			
			$('nav1level').addEvent('mouseleave', function(e){
				var obj = {};
				kwicks.each(function(other, j){
					obj[j] = {'height': [other.getStyle('height').toInt(), start_heights[j]]};
				});
				fx.start(obj);
			});
		}
	};
	window.addEvent('domready',Kwix.start);
