$.fn.equalizeChildHeights = function (options) {
  settings = $.extend({
    only_visible_children: false
  }, options);
  var result = $(this);
  if ($.browser.msie && $.browser.version == '6.0') {
    result.children().css("height", "auto");
  } else {
    result.children().css("min-height", "0px");
  }
  result.each(function () {
    if (settings.only_visible_children) {
      var childs = $(this).children(":visible")
    } else if (settings.child_selector) {
      var childs = $(this).children(settings.child_selector);
    } else {
      var childs = $(this).children();
    }
    var tallest = 0;
    childs.each(function () {
      var height = $(this).outerHeight();
      if (height > tallest) tallest = height;
    });
    childs.each(function () {
      var elem = $(this);
      var remainder = elem.outerHeight() - elem.height();
      var new_height = tallest - remainder;
      if ($.browser.msie && $.browser.version == '6.0') {
        elem.css("height", new_height + "px");
      } else {
        elem.css("min-height", new_height + "px");
      }
    });
  });
};

