// JavaScript Document
if (!window.jQuery) {
	throw("jQuery must be referenced before using slideshow");
} else {	
	(function() { 
		jQuery.fn.roundcorners = function(params) {
			var box = this;			
		
			params = jQuery.extend({
				tl_image			: "gr/rc_topleft.gif",	
				tr_image			: "gr/rc_topright.gif",
				bl_image			: "gr/rc_bottomleft.gif",
				br_image			: "gr/rc_bottomright.gif"
			},params);
			
			rc_init();
			
			function rc_init(){
				var prefix = box.attr("id");
				box.css('position','relative');
				box.css('z-index','10');
				$("#"+prefix+"_tl").remove();
				$("#"+prefix+"_tr").remove();
				$("#"+prefix+"_bl").remove();
				$("#"+prefix+"_br").remove();
				box.append("<img src=\""+params["tl_image"]+"\" alt=\"TopLeftCorner\" id=\""+prefix+"_tl\" />");
				box.append("<img src=\""+params["tr_image"]+"\" alt=\"TopRightCorner\" id=\""+prefix+"_tr\" />");
				box.append("<img src=\""+params["bl_image"]+"\" alt=\"BottomLeftCorner\" id=\""+prefix+"_bl\" />");
				box.append("<img src=\""+params["br_image"]+"\" alt=\"BottomRightCorner\" id=\""+prefix+"_br\" />");
				$("#"+prefix+"_tl").css("position","absolute").css("top","0").css("left","0");
				$("#"+prefix+"_tr").css("position","absolute").css("top","0").css("right","0");
				$("#"+prefix+"_bl").css("position","absolute").css("bottom","0").css("left","0");
				$("#"+prefix+"_br").css("position","absolute").css("bottom","0").css("right","0");
			}
		}
	})(jQuery); 
}//end if