title: Find the longest element (jQuery)
body: <p>I use this script to equalize heights of elements:</p>
  
  <pre><code>(function ($) {
      $.fn.autoheight = function () {
          var height = 0,
              reset = $.browser.msie ? "1%" : "auto";
          return this.css("height", reset).each(function () {
              height = Math.max(height, this.offsetHeight);
          }).css("height", height).each(function () {
              var h = this.offsetHeight;
              if (h &gt; height) {
                  $(this).css("height", height - (h - height));
              };
          });
      };
  })(jQuery);
  </code></pre>
  
  <p>I'd like to add just one extra functionality to it - addclass 'longest' to the longest element found when equalizing heights, what do I change in the above script?</p>
  
  <p>Many thanks.</p>