window.addEvent('domready', function() {
	
	/* Slide Effekt der Startseite */

	var szNormal = 83, szSmall  = 83, szFull   = 95;
	 
	var kwicks = $$("#nav-leistungen .kwick");
	var fx = new Fx.Elements(kwicks, {wait: false, duration: 300, transition: Fx.Transitions.Sine.easeOut});
	kwicks.each(function(kwick, i) {
		kwick.addEvent("mouseenter", function(event) {
			var o = {};
			o[i] = {height: [kwick.getStyle("height").toInt(), szFull]}
			kwicks.each(function(other, j) {
				if(i != j) {
					var w = other.getStyle("height").toInt();
					if(w != szSmall) o[j] = {height: [w, szSmall]};
				}
			});
			fx.start(o);
		});
	});
	 
	if ($("nav-leistungen")){
		$("nav-leistungen").addEvent("mouseleave", function(event) {
			var o = {};
			kwicks.each(function(kwick, i) {
				o[i] = {height: [kwick.getStyle("height").toInt(), szNormal]}
			});
			fx.start(o);
		})
	}
	
});

