/* This script simply modifys the width of the span tag to match the image.
	
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _*/

$(window).load(function(){ 

	// For each instance of p.caption
	$("p.caption").each(function(){
		$(this)
			// Add the following CSS properties and values
			.css({

				// Width equal to the width of the image
				"width" : $(this).children("img").width() + "px"
			})
			// Select the child "span" of this p.caption
			// Add the following CSS properties and values
			.children("span").css(

				// Width equal to p.caption
				// But subtract 8px to callibrate for the padding
				"width", $(this).width() - 8 + "px")

	// End $(this)
	});

});
