$(document).ready(function () {
  $('.gridnav').each(function(){
    $(this).find('li:even').addClass('clearrow');
    
    // hack for IE float model bug
    if ($.browser.msie && $.browser.version < 8.0) {
      $(this).find('li:odd').each(function(){
        var tallestInRow = Math.max($(this).height(), $(this).prev('li').height());
        $(this).css('height', tallestInRow);
        $(this).prev('li').css('height', tallestInRow);
      });
    }
  });
});