//css selectors

$(document).ready(function() {
   
$("h2 + img").css("margin-top", "-6px")
$("img + p").css("margin-top", ".5em")
$("p + h2,h3,h4,h5,h6").css("margin-top", "2em")

$("h2 + h3").css("margin-top", "-9px").css("border-top", "1px solid #eee").css("padding-top", "2em")




$(".squeeze-content > h1").css("width", "910px").css("margin", "0 0 1.5em 0").css("border-bottom", "1px solid #A9A6A0")

$("h1 > span").css("display", "none")




});





// this will add a caption below an image 
// img class="add-caption"
// caption taken from alt


$(window).load(function(){
		$("img.add-caption").each(function(i) {
			var imgwidth = $(this).width();
			var thetext = $(this).attr("alt");
			$(this).wrap("<div class='image-wrap'></div>");	
			$(this).parent().width(imgwidth);
			if ((thetext != null)&&(thetext != ""))
			{
				$(this).parent().append("<p class='image-caption'>" + thetext + "</p>");
			}	
		});	
	});
	
