$(document).ready(function() {
if (jQuery) {
	

	$(window).bind('load', function() {
		
		 //Runde Ecken für Bilder in den Listen
         $('.entrylist tr td img').each( function( i, n ) {		 
		 			$(this).parent("a").append("<span class='c" + i + "'></span>");
					$(".c" + i).height(($(this).height()-12) + "px");
					$(".c" + i).width(($(this).width()) + "px");
					$(".c" + i).css("display","block");
					$(".c" + i).css("background-repeat","no-repeat");
					$(".c" + i).css("background-image","url(" + $(this).attr("src") + ")");
					$(this).hide();

					$(".c" + i).corner({
				  		tr: { radius: 4 },
				  		tl: { radius: 4 },
				  		bl: { radius: 4 },
				  		br: { radius: 4 }
					});
			 
		 });
		
		//Runde Ecken für Bilder in der Einzelsicht (Artikel Image)
		$(".neutral .svcontent .articleImg img").each(function(i, n){
			if($(this).parent().parent().attr("class")!="imgIcon") {
				$(this).parent().append("<span class='c" + i + "'></span>");

					$(".c" + i).height(($(this).height()-17) + "px");
					$(".c" + i).width(($(this).width()) + "px");
					$(".c" + i).css("display","block");
					$(".c" + i).css("background-repeat","no-repeat");
					$(".c" + i).css("background-image","url(" + $(this).attr("src") + ")");
					$(this).hide();
					$(".c" + i).corner({
				  		tr: { radius: 4 },
				  		tl: { radius: 4 },
				  		bl: { radius: 4 },
				  		br: { radius: 4 }
					});

				}							
			});
			
			//Runde Ecken für Bilder in der Einzelsicht (per RichText eingehängt)
			$(".neutral .svcontent .float-right img").each(function(i, n){
			if($(this).parent().parent().attr("class")!="imgicon") {
				$(this).before("<span class='cr" + i + "'></span>");

					$(".cr" + i).height(($(this).height()-17) + "px");
					$(".cr" + i).width(($(this).width()) + "px");
					$(".cr" + i).css("display","block");
					$(".cr" + i).css("background-repeat","no-repeat");
					$(".cr" + i).css("background-image","url(" + $(this).attr("src") + ")");
					$(this).hide();
					$(".cr" + i).corner({
				  		tr: { radius: 4 },
				  		tl: { radius: 4 },
				  		bl: { radius: 4 },
				  		br: { radius: 4 }
					});

				}							
			});			
	 	 
		 	$(".neutral .svcontent .float-left img").each(function(i, n){
			if($(this).parent().parent().attr("class")!="imgicon") {
				$(this).before("<span class='cl" + i + "'></span>");

					$(".cl" + i).height(($(this).height()-17) + "px");
					$(".cl" + i).width(($(this).width()) + "px");
					$(".cl" + i).css("display","block");
					$(".cl" + i).css("background-repeat","no-repeat");
					$(".cl" + i).css("background-image","url(" + $(this).attr("src") + ")");
					$(this).hide();
					$(".cl" + i).corner({
				  		tr: { radius: 4 },
				  		tl: { radius: 4 },
				  		bl: { radius: 4 },
				  		br: { radius: 4 }
					});

				}							
			});			
		 
     	});

	}		
});