$j(document).ready(function() {

	// Get all the images inside the post-body except the sociable icons
	if($j(".post-body img").not(".sociable-hovers") != null) {
		$j(".post-body img").not(".sociable-hovers").each(function() {

			// Setup titles on anchors based on image titles that they wrap
			$j(this).parent("a").attr("title",$j(this).attr("title"));

			// Set the rel attribute of the anchor based on the post title	
			var galleryName = $j(this).parents().filter(".post").attr("id");
			
			// Add the thickbox class to each image
			$j(this).parent("a").addClass("smoothbox");
	
			// Now set the actual rel attribute appropriately
			$j(this).parent("a").attr("rel", galleryName);

		});
	}	

}); // end document.ready
