$(document).ready(function(){

	$(".content h1").wrap("<div class='wholeheading'></div>");
	
	$(".content .wholeheading h1").before("<div class='p3h1'> </div>");
	$(".content .wholeheading h1").after("<div class='p3h3'> </div>");
	$(".content .wholeheading .p3h3").after("<div class='enddiv clear'> </div>");	
	
	nPadding = parseInt($(".content .wholeheading h1").css("padding-left").replace("px","")) + parseInt($(".content .wholeheading h1").css("padding-right").replace("px",""));
	
	$(".content .wholeheading").width(  nPadding + $(".content .p3h1").width() + $(".content .p3h3").width() + $(".content h1").width() + $(".content .enddiv").width() + "px"); 
	
	// I have to do this for IE 7 to center the UL list of products correctly.
	$("ul.thumbwrap").parents("div.content").css("text-align","center"); 
	
	
	cBackground = $(".thumbwrap li > div").css("background");
	$(".thumbwrap li > div").css("background", cBackground);
	
	if (($.browser.msie) && ($.browser.version == "7.0")){
		$("span.caption").each(function(i){
			cHeightThis = $(this).height();
			cHeightText = $(this).find("span>span>span").height();			
			$(this).css("margin-top", (((cHeightThis - cHeightText)/2)-5) + "px");
		}); 
			
	}
	
});


