Change the class of wordpress menu

This will add class sub-menu-0, sub-menu-1 and so on depending upon their depth.

//This will go in functions.php file
class wpse61220_submenu_class extends Walker_Nav_Menu {
  function start_lvl(&$output, $depth) {
    $indent = str_repeat("\t", $depth);
    $output .= "\n$indent<ul class=\"sub-menu-".$depth."\">\n";
  }
}

//  Usage -
//  wp_nav_menu( array('walker' => new wpse61220_submenu_class() ) );

Reference – function wp_nav_menu()