<?php
/**
 * @version		$Id: default.php 16306 2010-04-21 18:47:28Z louis $
 * @package		Joomla.Site
 * @subpackage	mod_menu
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access.
defined('_JEXEC') or die;

// Note. It is important to remove spaces between elements.
?>

<ul class="menu<?php echo $params->get('tag_id'); ?>"><?php
foreach ($list as $i => &$item) :

	$id = '';
	if($item->id == $active_id)
	{
		
	}
	$class = '';
	if(in_array($item->id, $path))
	{
		if ($item->params->get('class_sfx')) {
			$class = $item->params->get('class_sfx').' ';
		}
		$class .= 'active ';
	}
	$class = ' class="'.$class.'item'.$item->id.'"';

	echo '<li'.$id.$class.'><span class="s5_outer_active"><span class="s5_rs">';

	// Render the menu item.
	switch ($item->type) :
		case 'separator':
		case 'url':
		case 'component':
			require JModuleHelper::getLayoutPath('mod_menu', 'default_'.$item->type);
			break;

		default:
			require JModuleHelper::getLayoutPath('mod_menu', 'default_url');
			break;
	endswitch;
	
	
	
	

	// The next item is deeper.
	if ($item->deeper) {
		echo '</span></span><ul>';
	}
	// The next item is shallower.
	elseif ($item->shallower) {
		echo '</span></span></li>';
		echo str_repeat('</ul></li>', $item->level_diff);
	}
	// The next item is on the same level.
	else {
		echo '</span></span></li>';
	}
endforeach;
?></ul>