window.addEvent('domready', function()
{
	var szNormal = 239;
	var szSmall  = 226;
	var szFull   = 280;
	var images = $$("#images .image");

	var fx = new Fx.Elements(images,
	{
		wait: true, duration: 150, 
		transition: Fx.Transitions.Back.easeOut
	});
	
	images.each(function(image, i)
	{
		image.addEvent("mouseenter", function(event)
		{
			var o = {};
			o[i] = {width: [image.getStyle("width").toInt(), szFull]}
			images.each(function(other, j)
			{
				if(i != j)
				{
					var w = other.getStyle("width").toInt();
					if(w != szSmall)
					{
						o[j] = {width: [w, szSmall]};
					}
				}
			});
			fx.start(o);
		});
	});
	 
	$("images").addEvent("mouseleave", function(event)
	{
		var o = {};
		images.each(function(image, i)
		{
			o[i] = {width: [image.getStyle("width").toInt(), szNormal]};
		});
		fx.start(o);
	})	
});