Edit

Template Coding Drupal Add unique IDs to menu items

<?php
function HOOK_menu_link( array $variables ){

    $element = $variables['element'];
    $sub_menu = '';
    $name_id = strtolower(strip_tags($element['#title']));

    // remove colons and anything past colons
    if (strpos($name_id, ':')) $name_id = substr ($name_id, 0, strpos($name_id, ':'));

    //Preserve alphanumerics, everything else goes away
    $pattern = '/[^a-z]+/ ';
    $name_id = preg_replace($pattern, '', $name_id);

    $element['#attributes']['id'][] = 'menu-' . $element['#original_link']['mlid'] . ' '.$name_id;

    if( $element['#below'] )
        $sub_menu = drupal_render($element['#below']);

    $output = l($element['#title'], $element['#href'], $element['#localized_options']);

    return '' . $output . $sub_menu . "\n";
}
?>