You need to break down the menu into its fundamental parts. Starting with the outermost frame or outerTpl, which in the case of your menu is the <ul>. So the outerTpl will be:
outerTpl:
<ul id="menu1" class="menu">
[+wf.wrapper+]
</ul>
the rowTpl is the tricky one because of the custom ID for each item. You will need to be creative here and adapt the styling to something that is readily available like the document id.
RowTpl:
<li[+wf.classes+]><a class="m[+wf.docid+]" href="#">[+wf.linktext+] </a>
[+wf.wrapper+]
</li>
This will output ’m12’ for the class for document number 12, so you would need to change the css to accommodate these changes.
Next is the innerTpl to style the inner <ul> (note: you need to set this or else it will use the same as the outerTpl):
<ul[+wf.classes+]>
[+wf.wrapper+]
</ul>
And finally the innerRowTpl:
<li[+wf.classes+]><a href="[+wf.link+]">[+wf.linktext+]</a></li>
This should do it. There are other ways of working with the unique id issue, this is just one idea.
Read more on the wayfinder parameters at:
http://www.muddydogpaws.com/development/wayfinder/parameters.html