is there any reason this chain does not work? It does not add the class:
document.getElementsByTagName(\'nav\')[0].firstChild.className = \"current\"
Jquery can make this very easy:
$("#nav:first-child").addClass("current");