(function( $ ){

  $.fn.rowHeight = function( options ) {  

    // Create some defaults, extending them with any options that were provided
    var settings = $.extend( {
		cols: this.size()
    }, options);
	
	var index = 0;
	
	while (index < this.size())
	{
		var end = index + settings.cols < this.size() ? index + settings.cols : this.size();
		var $row = this.slice(index, end)
		
		var maxHeight = 0;
		$row.each(function(){
			maxHeight = maxHeight < $(this).height() ? $(this).height() : maxHeight;
		});
		
		$row.css('height', maxHeight + 'px');
		index += settings.cols;
	}

	return this;

  };
})(jQuery);

