/** 
 * @projectDescription	Simple Equal Columns
 * @author 	Matt Hobbs
 * @version 	0.01 
 */
jQuery.fn.equalCols = function(){
	//Array Sorter
	var sortNumber = function(a,b){return b - a;};
	var heights = [];
	//Push each height into an array
	$(this).each(function(){
		heights.push($(this).height());
	});
	heights.sort(sortNumber);
	var maxHeight = heights[0];
	return this.each(function(){
		//Set each column to the max height
		$(this).css({'height': maxHeight});
	});
};

/* Dette er også en funksjon:
jQuery.fn.equalCols=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");
    }
  });
};
*/	

