/*
	We like tidy columns here at Red Hammer. This script keeps the lower content and sidebar coluns at the same height.
	
	Requires:
	- jquery library
*/
$(document).ready(function() {
	//We like tidy columns here at Red Hammer.
	var maxColHeight = 0;
	var contentHeight = $("#content").height();
	var sidebarHeight = $("#sidebar").height();
	
	// When the folding paper hero area is deployed, we need a means of 
	// establishing a height for the content div that allows the absolutely positioned
	// image's bottom to line up with black footer
	
	var aboveHeroHeight = $("#above_hero").height();
	if(aboveHeroHeight)
	{
		//our image is 725px high. We add this to the height of the content above it to
		// establish the overall height of our content div
		//alert (aboveHeroHeight);
		//alert(contentHeight);
		contentHeight += $("#hero").height() - 30 ;//30 is a fudge factor 	
	} else {
		// hero div not detected	
	}
	
	
	// Now set column heights equal
	
	if(contentHeight>sidebarHeight)
	{
		maxColHeight = contentHeight;
		$("#sidebar").height(maxColHeight);
	} else
	{
		maxColHeight = sidebarHeight;
		$("#content").height(maxColHeight);
	}
	
				
}); // end doc ready
