var HoverBehavior = Class.create();
HoverBehavior.prototype = {
	initialize: function() {
		$A(document.styleSheets).each( function(stylesheet) {
			$A(stylesheet.rules).each( function(rule) {
				if( rule.selectorText.match(/:hover/i) ) {
					stylesheet.addRule( rule.selectorText.replace(/:hover/ig, '.hover'), rule.style.cssText );
				}
			});
		});

		$A(arguments).each( function(arg) {
			$$(arg).each( function(tag) {
				Event.observe(tag, 'mouseover', function() { Element.addClassName(tag, 'hover'); });
				Event.observe(tag, 'mouseout', function() { Element.removeClassName(tag, 'hover'); });
			});
		});
	}
};