/*

Call this by:

including this document in the header and then call

$(function(){
	match_heights()
})

By defaul the class called is: ".match_height"

To add a custum class do this:

$(function(){
	match_heights('.your_class')
})

*/


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
	})
	
}
