// JavaScript Document

(function ($) {
  $.fn.equalHeights = function (minHeight, maxHeight) {
    tallest = (minHeight) ? minHeight : 0;
    this.each(function () {
      if ($.browser.msie && $.browser.version < 7) {
        $(this).css("height", "");
      }
      $(this).css("min-height", "");
    });
    this.each(function () {
      if ($(this).height() > tallest) {
        tallest = $(this).height();
      }
    });
    if ((maxHeight) && tallest > maxHeight) tallest = maxHeight;
    return this.each(function () {
      if ($.browser.msie && $.browser.version < 7) {
        $(this).css("height", tallest + "px");
      }
      $(this).css("min-height", tallest + "px");
    });
  }
})(jQuery);
