
function txt2img() {

	$(document.body).getElements('*[txt2img]').each(function(el,idx){

		var o = { 
			src: el.getProperty('txt2img'),
			border: '0'
			};
		if (el.getProperty('hover')) {
			o.src_over = el.getProperty('hover');
			o.src_out = el.getProperty('txt2img');
			o.events = {
				mouseover: function() {
					this.setProperty('src',this.src_over);
				},
				mouseout: function() {
					this.setProperty('src',this.src_out);
				}
			};
		}

		if (window.ie) {
			var i = new Element('img', o);
			i.injectBefore(el);
			el.remove();
		} else {
			var i = new Element('img', o);
			el.replaceWith(i);
		}
		
	});

}