/**
 * Equal Heights Plugin
 * Equalize the heights of elements. Great for columns or any elements
 * that need to be the same size (floats, etc).
 * 
 * Copyright (c) 2008 Richard Hulse (http://richardhulse.blogspot.com/2008/11/equal-height-columns-with-jquery.html)
 *
 * Usage: $(object1,object2,...,objectn).equalHeights();
 * 
 * Example : $("#div1,#div2,#div3").equalHeights(); Sets all columns to the same height.
 * 
 */

(function($) {

jQuery.fn.equalHeights = function() {
	var maxHeight=0;
	
	this.each(function(){
 		if (this.offsetHeight>maxHeight) {maxHeight=this.offsetHeight;}
	});
	
	this.each(function(){
		$(this).height(maxHeight + "px");
	 	
	 	if (this.offsetHeight>maxHeight) {
	  		$(this).height((maxHeight-(this.offsetHeight-maxHeight))+"px");
	 	}
	});	
};

})(jQuery); 