   var Rollover = {

	init: function (options) {
		// init default options

		this.anchors = [];
		$A($$('a')).each(function(el){
			if(el.rel && el.href && el.rel.test('rollover', 'i')) {
				el.addEvent('mouseover', function (e) {
          e = new Event(e);
          e.stop();
          this.mouseover(el);
				}.bind(this));
				el.addEvent('mouseout', function (e) {
          e = new Event(e);
          e.stop();
          this.mouseout(el);
				}.bind(this));
				this.preloadImage(el);
				this.anchors.push(el);
			}
    }, this);
	},

	preloadImage: function(link){
		if (link && link.childNodes && link.childNodes[0] && link.childNodes[0].src){
			var i = new Image;
			i.src = link.childNodes[0].src.replace('init', 'over');
		}
	},
	
	mouseover: function(link){
		if (link && link.childNodes && link.childNodes[0] && link.childNodes[0].src) link.childNodes[0].src = link.childNodes[0].src.replace('init', 'over');
	},

	mouseout: function(link){
		if (link && link.childNodes && link.childNodes[0] && link.childNodes[0].src) link.childNodes[0].src = link.childNodes[0].src.replace('over', 'init');
	}

};
window.addEvent('domready', Rollover.init.bind(Rollover));

