// JavaScript Document
window.addEvent('domready', function(){
var szNormal = 240, szSmall  = 120, szFull   = 600;
 
var slides = $$("#slides .slide");
var fx = new Fx.Elements(slides, {wait: false, duration: 300, transition: Fx.Transitions.Back.easeOut});
slides.each(function(slide, i) {
	slide.addEvent("mouseenter", function(event) {
		var o = {};
		o[i] = {width: [slide.getStyle("width").toInt(), szFull]}
		slides.each(function(other, j) {
			if(i != j) {
				var w = other.getStyle("width").toInt();
				if(w != szSmall) o[j] = {width: [w, szSmall]};
			}
		});
		fx.start(o);
	});
});
 
$("slides").addEvent("mouseleave", function(event) {
	var o = {};
	slides.each(function(kwick, i) {
		o[i] = {width: [kwick.getStyle("width").toInt(), szNormal]}
	});
	fx.start(o);
})
});
