	window.onload = function(){
		
		$('img:not(.no-replace)').each(function() {
			var span = $(document.createElement("SPAN"));
			var image = $(this);
			span.html('&nbsp;');
			span.css('display', 'block');
			
			if(image.parent().parent().hasClass('bt') && jQuery.browser.msie)
			{
				span.width(image.width()+4);
				span.height(image.height()+4);			
			}
			else
			{
				span.width(image.width());
				span.height(image.height());			
			}
			span.css('background', 'url(' + image.attr('src') + ') no-repeat');
			span.css('position', image.css('position'));
			span.css('top', image.css('top'));
			span.css('left', image.css('left'));
			span.css('margin-top', image.css('margin-top'));
			span.css('margin-left', image.css('margin-left'));
			span.css('margin-right', image.css('margin-right'));
			span.css('margin-bottom', image.css('margin-bottom'));
			span.css('padding-top', image.css('padding-top'));
			span.css('padding-left', image.css('padding-left'));
			span.css('float', image.css('float'));
			span.addClass('replaced-image');
			
			$(this).replaceWith(span);
		});
		
	};
