window.addEvent('domready', function() {
  var kwicks = $$('#kwick .kwick');
  var fx = new Fx.Elements(kwicks, {wait: false, duration: 500, transition: Fx.Transitions.Pow.easeOut});
  kwicks.each(function(kwick, i){
    kwick.addEvent('mouseenter', function(e){
      var obj = {};
      obj[i] = {
        'width': [kwick.getStyle('width').toInt(), 670]
      };
      kwicks.each(function(other, j){
        if (other != kwick){
          var w = other.getStyle('width').toInt();
          if (w != 96) obj[j] = {'width': [w, 96]};
        }
      });
      fx.start(obj);
    });
  });
  if ($('kwick'))
  {
	  $('kwick').addEvent('mouseleave', function(e){
		var obj = {};
		kwicks.each(function(other, j){
		  obj[j] = {'width': [other.getStyle('width').toInt(), 239.7]};
		});
		fx.start(obj);
	  });
  }
});

