var kheight = 150; //was 183, also defined in leftmenu.css

var Site = {
	
	start: function(){
		if ($('kwick')) Site.parseKwicks();
	},
	
	parseKwicks: function(){
		var kwicks = $$('#kwick .kwick');
		var fx = new Fx.Elements(kwicks, {wait: false, duration: 250, transition: Fx.Transitions.quadOut});
		kwicks.each(function(kwick, i){
			kwick.addEvent('mouseenter', function(e){
				var obj = {};		
       		
				obj[i] = {
					'height': [kwick.getStyle('height').toInt(), kheight] //image height
				};
				
				kwicks.each(function(other, j){
					if (other != kwick){
						var w = other.getStyle('height').toInt();
						if (w != 30) obj[j] = {'height': [w, 30]};
					}
				});
			fx.start(obj); //flag==0 end  //if want to close the last open submenu on mouseover of home then remove the brackets for the flag if
			});
		});
	
	}
};

window.addEvent('load', Site.start);