--- nice_menus.module	2008-11-30 20:47:53.000000000 +0100
+++ ../nice_menus.module	2009-07-20 13:39:03.000000000 +0200
@@ -301,10 +301,22 @@
  */
 function theme_nice_menu_build($menu) {
   $output = '';
+  $index = 0;
+  $count = 0;
+  foreach ($menu as $menu_count) {
+    if ($menu_count['link']['hidden'] == 0) {
+      $count++;
+    }
+  }
 
   foreach ($menu as $menu_item) {
     $mlid = $menu_item['link']['mlid'];
     // Check to see if it is a visible menu item.
+      //prepare marking of li tag as odd, even, first or last
+      $index++;
+      $first_class = $index == 1 ? ' first ' : '';
+      $oddeven_class = $index % 2 == 0 ? ' even ' : ' odd ';
+      $last_class = $index == $count ? ' last ' : '';
     if ($menu_item['link']['hidden'] == 0) {
       // Build class name based on menu path
       // e.g. to give each menu item individual style.
@@ -319,7 +331,7 @@
         $children = theme('nice_menu_build', $menu_item['below']);
         // Set the class to parent only of children are displayed.
         $parent_class = $children ? 'menuparent ' : '';
-        $output .= '<li id="menu-'. $mlid .'" class="'. $parent_class . $path_class .'">'. theme('menu_item_link', $menu_item['link']);
+        $output .= '<li id="menu-'. $mlid .'" class="'. $parent_class . $path_class . $first_class . $oddeven_class . $last_class .'">'. theme('menu_item_link', $menu_item['link']);
         // Build the child UL only if children are displayed for the user.
         if ($children) {
           $output .= '<ul>';
@@ -329,7 +341,7 @@
         $output .= "</li>\n";
       }
       else {
-        $output .= '<li id="menu-'. $mlid .'" class="'. $path_class .'">'. theme('menu_item_link', $menu_item['link']) .'</li>'."\n";
+        $output .= '<li id="menu-'. $mlid .'" class="'. $path_class . $first_class . $oddeven_class . $last_class .'">'. theme('menu_item_link', $menu_item['link']) .'</li>'."\n";
       }
     }
   }
