//css selectors

$(document).ready(function() {
   

$("img + p").css("margin-top", ".5em")
$("p + h2,h3,h4,h5").css("margin-top", "2em")




$(".round").corner("8px");


$("blockquote").corner("8px");









$(".squeeze-content > h1").css("width", "910px").css("margin", "0 0 1.5em 0").css("border-bottom", "1px solid #A9A6A0")

$("h1 > span").css("display", "none")

$("#sf-nav > li:last").css("border-right", "1px solid #3CB677");




jQuery(function($) {
    $("#main-title > img").pngfix();
});
jQuery(function($) {
    $("img[@src$=png], #page-top, #page-foot, .pngfix, .panda-mountain").pngfix();
});


});







$(window).load(function(){

$("h2 + img").each(function(i) {

var imgwidth = $(this).width();
$(this).prev().width(imgwidth);
$(this).prev().css("background-image", "url(Styles/g/title-shader.png)").css("border", "1px solid #38B574").css("color", "#fff").css("font-size", "120%").css("margin-bottom", "0em").prepend("&nbsp;");	

});


	});









// 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'>" + "&nbsp;" + thetext + "</p>");
			}	
		});	
	});
	
