Wordpress adds in a class on it's own, so you don't need to bloat it with more code.
wp_list_categories is the function you'd use within Wordpress.
Code:
<ul>
<?php wp_list_categories('&title_li='); ?>
</ul>
That will simple just display all of your categories and will hide the heading that can be output.
The classes attached that would achieve the effect you need are li.current-cat {} and li.current-cat-parent {}. Styling those will show the "current" category you're in for your navigation.