window.addEvent('domready', function() {
	if ($('boat-box')) {
		var boats = $$('#boat .boat');
		var fx = new Fx.Elements(boats, {wait: false, duration: 400, transition: Fx.Transitions.quadOut});
		boats.each(function(boat, i){
			boat.addEvent('click', function(e){
				var obj = {};
				obj[i] = {
					'width': [boat.getStyle('width').toInt(), 930]
				};
				boats.each(function(other, j){
					if (other != boat){
						var w = other.getStyle('width').toInt();
						if (w != 35) obj[j] = {'width': [w, 35]};
					}
				});
				fx.start(obj);
			});
		});
	}
});
