Assign ID to Main Menu
function mytheme_links__system_main_menu($variables) {
$site_frontpage = variable_get('site_frontpage', 'node');
  $html = "&lt;nav id='main-nav' class='animate'&gt;\n";
  foreach ($variables['links'] as $link) {
      if($link['href'] == '&lt;front&gt;') {
        $html .= "&lt;a class='1' href='" .$site_frontpage ."'&gt;" .$link['title'] ."&lt;/a&gt;";
      }
      else {
        $html .= "&lt;a class='2' href='" .$link['href'] ."'&gt;" .$link['title'] ."&lt;/a&gt;";
      }
  }
  $html .= "&lt;/nav&gt;\n";

  return $html;
}


The code can be used in template.php to override the output of the . However, the only variable it seems to accept is $tree, which prints out all the contents of a  and so is not very helpful.