

First off, this only supports the primary menu items, and if you can avoid it, I highly recommend you to use ul/li selectors. In some wacky universe out there, spanning horizonal menus across your page is desired and achievable by formatting the array of links return by menu_primary_links() function.
The use of extracting arguments in Drupal is a very powerful thing. Once you break down the Drupal path, you can customize practically everything. The path is the part after ?q= or /drupal_installation/.

The snippit generates active states which follow through from top level menus as well as sub menu's, picking out the first and last links in each list.
First, create a region in page.tpl.php. In the example below, the region is named $primary_nav. This region name will also appear in the template.php file. The division tag 'primarynav' is the CSS construct that is used to style the menu's.
Let's revisit Drupal arguments to extend page layouts for our newly customized login/registration form. Assuming the login page you want is different than the rest, say a one column layout with custom blocks that are not found on any other page. If you just want the custom login forms, skip step 1.
The following snippit will cover the following arguments: