/**
 * Sets Elements height to the max height of the element
 * Equalize the heights of elements. Great for columns or any elements
 * that need to be the same size (floats, etc).
 * 
 * Version 1.0
 * Updated 12/10/2008
 *
 * Author: Ananta Saurabh 
 * URL: http://www.worxpro.com/jQuery
 *
 * Usage: $('.items').setToMaxHeight();
 *        $('.items').setToMaxHeight(2); //
 * 
 * 
 */
$.fn.setToMaxHeight = function(coll){
	if(typeof(coll)=="undefined"){
		ht=Math.max.apply(this, $.map(this , function(e){ return $(e).height() }) )
		 this.height(ht);
		return ht;
	}else{
		for(i=0;i < $(this).length;i=i+coll){
			p=$(this).slice(i,i+coll);
			p.height( Math.max.apply(p, $.map(p , function(e){ return $(e).height() }) ) )
		}
	}
}
