Separate JavaScript and CSS.

WRONG

$$('.element').each(function(el){
  el.addEvent('mouseenter', function(){
    el.set({ style: 'border: 1px solid #AAA;' });
  });
  
  el.addEvent('mouseenter', function(){
    el.set({ style: 'border: 0;' });
  });
});
	    

COOL

$$('.element').each(function(el){
  el.addEvent('mouseenter', function(){
    el.addClass('border');
  });

  el.addEvent('mouseenter', function(){
    el.removeClass('border');
  });
});