Я знаю, что "вконтакте" подобная проблема решена. Вот часть их скрипта.
Тут при наведении мышки изменяется цвет фона кнопки
var close_button = ge('im_x');
var popup_button = ge('im_popup');
var sound_button = ge('im_sound');
var fadeToColor = function(color, master) {
return function() {
this.fading = master ? true : false;
animate(this, {backgroundColor: color}, 200);
}
}
addEvent(close_button, 'mouseover', fadeToColor('#FFFFFF'));
addEvent(close_button, 'mouseout', fadeToColor('#9CB8D4'));
addEvent(close_button, 'click', im.popup ? function() { window.close(); } : winBoxes.im.hide);
if (im.popup) {
hide('im_popup_button');
im.fix_popup();
addEvent(window, 'onorientationchange' in window ? 'orientationchange' : 'resize', im.fix_popup);
} else {
addEvent(popup_button, 'mouseover', fadeToColor('#FFFFFF'));
addEvent(popup_button, 'mouseout', fadeToColor('#9CB8D4'));
addEvent(popup_button, 'click', im.go_popup);
if (window.im_check) {
winBoxes.im.setOptions({onHide: function() {
window.im_ts = im.ts;
setTimeout(window.im_check, 1000);
}});
}
}
addEvent(sound_button, 'mouseover', fadeToColor('#FFFFFF'));
addEvent(sound_button, 'mouseout', fadeToColor('#9CB8D4'));
addEvent(sound_button, 'click', function() {
if (im.sound_off) {
im.sound_off = false;
ge('im_sound').className = '';
} else {
im.sound_off = true;
ge('im_sound').className = 'off';
}
});