
var Site = {

	start: function(){

		if ($('kwick')) Site.parseKwicks();

	},

	parseKwicks: function(){
		var kwicks = $$('#kwick .kwick');
		var fx = new Fx.Elements(kwicks, {wait: false, duration: 200, transition: Fx.Transitions.quadOut});
		kwicks.each(function(kwick, i){
			kwick.addEvent('mouseenter', function(e){
				var obj = {};
				obj[i] = {
					'height': [kwick.getStyle('height').toInt(), 55] // Wert vorher: 185
				};
				kwicks.each(function(other, j){
					if (other != kwick){
						var w = other.getStyle('height').toInt();
						if (w != 17) obj[j] = {'height': [w, 15]}; // Wert vorher: 105 (Zweimal)
					}
				});
				fx.start(obj);
			});
		});

		$('kwick').addEvent('mouseleave', function(e){
			var obj = {};
			kwicks.each(function(other, j){
				obj[j] = {'height': [other.getStyle('height').toInt(), 17]}; // WErt vorher: 125
			});
			fx.start(obj);
		});
	},

/*

ORIGINAL Funktion

	parseKwicks: function(){
		var kwicks = $$('#kwick .kwick');
		var fx = new Fx.Elements(kwicks, {wait: false, duration: 200, transition: Fx.Transitions.quadOut});
		kwicks.each(function(kwick, i){
			kwick.addEvent('mouseenter', function(e){
				var obj = {};
				obj[i] = {
					'width': [kwick.getStyle('width').toInt(), 100] // Wert vorher: 185
				};
				kwicks.each(function(other, j){
					if (other != kwick){
						var w = other.getStyle('width').toInt();
						if (w != 60) obj[j] = {'width': [w, 60]}; // Wert vorher: 105 (Zweimal)
					}
				});
				fx.start(obj);
			});
		});

		$('kwick').addEvent('mouseleave', function(e){
			var obj = {};
			kwicks.each(function(other, j){
				obj[j] = {'width': [other.getStyle('width').toInt(), 65]}; // WErt vorher: 125
			});
			fx.start(obj);
		});
	},

*/
};

window.addEvent('load', Site.start);


