How to theme a menu block?
In order to theme the unordered list, you need to call theme_menu_tree(). You can edit your template.php in order to call this.

function THEMENAME_menu_tree__MENUNAME($variables){
  return '&lt;ul class="your-custom-class" id="your-custom-id"&gt;' . $variables['tree'] . '&lt;/ul&gt;';
}


Then, if you want to theme your links, call theme_menu_link().

function THEMENAME_menu_link__MENUNAME($variables) {
  $element = $variables['element'];
  $sub_menu = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }
  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . "&lt;/li&gt;\n";
}


Now, the problem with Drupal 7 is that there is a major bug when it comes to displaying the active trail of custom menus. 

See issue
Issue #520106 - No way to dynamically set active trail
Issue #942782 - Custom menus never receive an active trail

You are basically out of luck if you want some true custom menus. These issues are very long standing in the drupal community so I am not sure if they will be fixed anytime soon. I don't know if there is some PHP that can help with it. You can turn to some alternative modules in order to help ease functionaltiy, like Menu Attributes and Menu Block. They both can help get around the cruddy menu system in Drupal 7.