
$(document).ready(function() {
	$(".roundme").each(function() {	
		$(this).one("load",function() { 
			var url = $(this).attr("src");
			var imageHeight = $(this).height();
			var imageWidth = $(this).width();
			$(this).css("visibility", "hidden");
			$(this).wrap('<span class="roundedimage" />');
			$(this).parent()
				.css("width",imageWidth)
				.css("height",imageHeight)
				.css("background-image","url("+url+")");
		});
		if (this.complete) $(this).trigger('load'); // needed because gecko won't fire load event for cached images
	})
});

