<? $segs = $this->uri->segment_array();

foreach ($segs as $segment)
{
switch($segment){
		case '/':
			$home='active';
			break;
		case 'home':
			$home='active';
			break;
		case 'home_new':
			$home='active';
			break;
		case 'contact':
			$contact='active';
			break;
	}
}
?>
  <?  $links = $this->MFuncs->getLinks('top'); ?>
<div id="top_menu_layer">
	<div id="menuHolder">
        <ul id="menu">
        	<li id="home"><?=anchor('home', '<b>'.$this->lang->line('links_home').'</b>', array('class' => @$home));?></li>
  <? foreach($links as $links=>$link): ?>
              <? if ($link['path']==$this->uri->segment(2)) { ?>
			<li id="single"><?=anchor('pages/'.$link['path'], '<b>'.$link['name'].'</b>', array('class' => 'active'));?></li>
              <? } else {?>
			<li id="single"><?=anchor('pages/'.$link['path'], '<b>'.$link['name'].'</b>', array('class' => ''));?></li>
              <? } ?>
  <? endforeach ?>
			<li id="dropdown"><?=anchor('contact', '<c>'.$this->lang->line('links_contact').'</c>', array('class' => @$contact));?></li>
		</ul>
   </div>
</div>