jQuery(window).load(function(){
		jQuery("img.rightcaption").each(function(i) { 
			var imgwidth = jQuery(this).width(); 
			var thetext = jQuery(this).attr("alt"); 
			jQuery(this).wrap("<div class='captionborderright'></div>");	
			jQuery(this).parent().wrap("<div style='float: right; margin-right: 25px; margin-left: 20px; width:  " + imgwidth + "px'></div>");	 
			jQuery(this).parent().corner("round 3px");  
			jQuery(this).parent().width(imgwidth);     
				if ((thetext != null)&&(thetext != "")) 
				{jQuery(this).parent().parent().append("<p class='captiontext'>" + thetext + "</p>");}	 
			}); 
			jQuery("img.leftcaption").each(function(i) { 
				var imgwidth = jQuery(this).width(); 
				var thetext = jQuery(this).attr("alt"); 
				jQuery(this).wrap("<div class='captionborderleft'></div>");	 
				jQuery(this).parent().wrap("<div style='float: left;margin-left: 15px; margin-right: 20px; width:  " + imgwidth + "px'></div>");	 
				jQuery(this).parent().corner("round 3px");  
				jQuery(this).parent().width(imgwidth);  
				if ((thetext != null)&&(thetext != "")) 
				{jQuery(this).parent().parent().append("<p class='captiontext'>" + thetext + "</p>");}	 
		});  
			jQuery("img.caption").each(function(i) { 
				var imgwidth = jQuery(this).width(); 
				var thetext = jQuery(this).attr("alt"); 
				jQuery(this).wrap("<div class='captionborder'></div>");	 
				jQuery(this).parent().corner("round 3px");  
				jQuery(this).parent().width(imgwidth).css("margin","0px auto");  
				if ((thetext != null)&&(thetext != "")) 
				{jQuery(this).parent().parent().append("<p class='captiontext'>" + thetext + "</p>");}	 
		});  
		
		jQuery("img.newscaption").each(function(i) { 
				var imgwidth = jQuery(this).width(); 
				jQuery(this).parent().wrap("<div style='float: left;margin-left: 0px; margin-right: 40px; padding-bottom: 40px;  width:  " + imgwidth + "px'></div>");	 
				jQuery(this).wrap("<div class='captionborder'></div>");	 
				jQuery(this).parent().corner("round 3px");  
				jQuery(this).parent().width(imgwidth).css("margin","0px auto");  
				
		});
		
		jQuery("img.galcaption").each(function(i) { 
				var imgwidth = jQuery(this).width(); 
				var thetext = jQuery(this).attr("alt"); 
				jQuery(this).wrap("<div class='captionborderleft'></div>");	 
				jQuery(this).parent().wrap("<div style='float: left; margin-left: 10px; margin-bottom: 10px; width:  " + imgwidth + "px'></div>");	 
				jQuery(this).parent().corner("round 3px");  
				jQuery(this).parent().width(imgwidth);  
				
		});
		jQuery("img.shopthumb").each(function(i) { 
			var imgwidth = jQuery(this).width(); 
			var thetext = jQuery(this).attr("alt"); 
			jQuery(this).wrap("<div class='captionborderright'></div>");	
			jQuery(this).parent().wrap("<div style='float: left; margin-right: 10px; margin-left: 15px; width:  " + imgwidth + "px'></div>");	 
			jQuery(this).parent().corner("round 3px");  
			jQuery(this).parent().width(imgwidth);     
				if ((thetext != null)&&(thetext != "")) 
				{jQuery(this).parent().parent().append("<p class='captiontext'>" + thetext + "</p>");}	 
			}); 
		jQuery("img.shopimg").each(function(i) { 
				var imgwidth = jQuery(this).width(); 
				var thetext = jQuery(this).attr("alt"); 
				jQuery(this).wrap("<div class='captionborderleft'></div>");	 
				jQuery(this).parent().wrap("<div style='float: left;margin-left: 15px; margin-bottom: 15px; margin-right: 20px; width:  " + imgwidth + "px'></div>");	 
				jQuery(this).parent().corner("round 3px");  
				jQuery(this).parent().width(imgwidth);  
				if ((thetext != null)&&(thetext != "")) 
				{jQuery(this).parent().parent().append("<p class='captiontext'>" + thetext + "</p>");}	 
		});  
		
	});
