

function rhInitCmsImages()
{
	jQuery(".rh_cmsimg").each(function() {
		jQuery(this).click(function() {
			jQuery(":ui-dialog").dialog("destroy");
			$img = jQuery(this);
			$width = ($img.attr("owidth") ? (parseInt($img.attr("owidth"))) : 400);
			$height = ($img.attr("oheight") ? (parseInt($img.attr("oheight"))) : 200);
			jQuery("<div><img src=\"" + $img.attr("src") + "\"></div>").dialog({
				title: null,
				autoOpen: true,
				modal: true,
				width: $width + 30,
				height: $height + 60,
				autoResize: true,
				resizable: true,
				position: "top",
				overlay: {
					opacity: 0.5,
					background: "black"
				}
			})
			.click(function(){
				jQuery(":ui-dialog").dialog("destroy");
			})
			.css("cursor","pointer")
			.find("img").attr("title", "Schließen");
			jQuery(".ui-dialog-titlebar").css("line-height", "10px");
		})
		.attr("title","Klick zum vergrößern")
		.css("cursor", "pointer");
	});
}


