
$(function(){
	match_heights('.feature');
	match_heights('.footer_col');
	
	
	//Hide the subnav
	if($("#sub_nav ul li").length == 0){
		$("#sub_nav").hide();
	}
	
})



function match_heights(c){
	c = c || ".match_height";
	
	//Create an array of matched elements
	e = $(c)
	
	//Create an empty array to add the height of the elements to
	e_array = new Array()
	
	//Loop through the matched elements and add height to the array
	for(i=0; i<e.length; i++){
		e_array.push($(e[i]).height())
	}

	//Get the tallest height
	h = Math.max.apply( Math, e_array );

	//Set all the heightd
	$(c).css({
		height: h
	})
	
}
