var buttons = $$('.button'); buttons.each(function (button, intIdx) { button.observe('mouseover', function () { button[intIdx] = scaleUp(this); });