First link implements your case. Your item transformation should be similar to this:
<li class="{% if (IsCurrentDocument()) { return "CMSListMenuHighlightedLI" } else { return "CMSListMenuLI" } |(identity)GlobalAdministrator%}</a>
{^SubLevelPlaceHolder^}
</li>
{^SubLevelPlaceHolder^}
will be replaced with <ul>
with second level items.