﻿/**
2 * Equal Heights Plugin
3 * Equalize the heights of elements. Great for columns or any elements
4 * that need to be the same size (floats, etc).
5 *
6 * Version 1.0
7 * Updated 12/10/2008
8 *
9 * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com)
10 *
11 * Usage: $(object).equalHeights([minHeight], [maxHeight]);
12 *
13 * Example 1: $(".cols").equalHeights(); Sets all columns to the same height.
14 * Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall.
15 * Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more
16 * than 300 pixels tall. Elements with too much content will gain a scrollbar.
17 *
18 */

(function($) {
 $.fn.equalHeights = function(minHeight, maxHeight) {
	 tallest = (minHeight) ? minHeight : 0;
 	this.each(function() {
 	if($(this).outerHeight() > tallest) {
 		tallest = $(this).outerHeight();
 	}
 });
 	if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
 	return this.each(function() {
	 if ($(this).outerHeight() < tallest) {
 		$(this).height(tallest).css("overflow","visible"); //changed auto with visible
	}
	});
 }
})(jQuery);



