/**
 * @author Daniele Corti - GESTWEB Research s.r.l. * All the contents of this file belog to GESTWEB Research s.r.l. - Italy
 */
var szNormal = 29, szSmall  = 29, szFull   = 150;

window.addEvent('load', function(){
	var kwicks = $$("#AutoAccordion .Panel");
	var fx = new Fx.Elements(kwicks, {wait: false, duration: 300, transition: Fx.Transitions.Back.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);
		});
	});
	 
	$("AutoAccordion").addEvent("mouseleave", function(event) {
		var o = {};
		kwicks.each(function(kwick, i) {
			o[i] = {height: [kwick.getStyle("height").toInt(), szNormal]}
		});
		fx.start(o);
	})
});