selected menu item

I definetly suggest you to use WordPress menu feature, is quite easier to implement and you will never need to wory if the user want to rename or add new items.

Just add this to your functions.php:

    register_nav_menus(
    array(
      'main_menu' => 'Main menu',
    )
);

Then in header.php or wherever you have the menu add:

<?php wp_nav_menu( array( 'theme_location' => 'main_menu', 'menu_class' => 'the_main_menu' ) ); ?>

You can reuse your CSS classes also, please check the doc.