<div class="bold b10"><?php echo pjSanitize::html( @$tpl['calendars'][$controller->getForeignId()]['name'] ); ?></div>
<?php
$active = ' ui-tabs-active ui-state-active';
if($controller->isAdmin())
{
	?>
	<div class="ui-tabs ui-widget ui-widget-content ui-corner-all b10">
		<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
			<li class="ui-state-default ui-corner-top<?php echo $_GET['controller'] == 'pjAdminCalendars' && $_GET['action'] == 'pjActionView' ? $active : NULL; ?>"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminCalendars&amp;action=pjActionView"><?php __('menuCalendar'); ?></a></li>
			<li class="ui-state-default ui-corner-top"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminReservations&amp;action=pjActionIndex&amp;calendar_id=<?php echo $controller->getForeignId();?>"><?php __('menuReservations'); ?></a></li>
			<li class="ui-state-default ui-corner-top<?php echo $_GET['controller'] == 'pjAdminOptions' && (isset($_GET['tab']) && $_GET['tab'] != '10') ? $active : NULL; ?>"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminOptions&amp;tab=1"><?php __('menuSettings'); ?></a></li>
			<?php
			if ($tpl['option_arr']['o_price_plugin'] == 'price' && pjObject::getPlugin('pjPrice') !== NULL)
			{
				?><li class="ui-state-default ui-corner-top<?php echo $_GET['controller'] == 'pjPrice' ? $active : NULL; ?>"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjPrice&amp;action=pjActionIndex"><?php __('plugin_price_menu'); ?></a></li><?php
			} elseif ($tpl['option_arr']['o_price_plugin'] == 'period' && pjObject::getPlugin('pjPeriod') !== NULL) {
				?><li class="ui-state-default ui-corner-top<?php echo $_GET['controller'] == 'pjPeriod' ? $active : NULL; ?>"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjPeriod&amp;action=pjActionIndex"><?php __('plugin_price_menu'); ?></a></li><?php
			}
			?>
			<li class="ui-state-default ui-corner-top<?php echo $_GET['controller'] != 'pjAdminOptions' || $_GET['tab'] != '10' ? NULL : $active; ?>"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminOptions&amp;tab=10"><?php __('menuLimits'); ?></a></li>
			
			<li class="ui-state-default ui-corner-top"><a target="_blank" href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminOptions&amp;action=pjActionPreview&amp;cid=<?php echo $controller->getForeignId();?>&amp;locale=&amp;view=1"><?php __('menuPreview'); ?></a></li>
			<li class="ui-state-default ui-corner-top"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminOptions&amp;action=pjActionInstall&amp;calendar_id=<?php echo $controller->getForeignId();?>"><?php __('menuInstall'); ?></a></li>
			
		</ul>
	</div>
	<?php
}else{
	?>
	<div class="ui-tabs ui-widget ui-widget-content ui-corner-all b10">
		<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
			<li class="ui-state-default ui-corner-top<?php echo $_GET['controller'] == 'pjAdminCalendars' && $_GET['action'] == 'pjActionView' ? $active : NULL; ?>"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminCalendars&amp;action=pjActionView"><?php __('menuCalendar'); ?></a></li>
			<?php
			if ($tpl['option_arr']['o_price_plugin'] == 'price' && pjObject::getPlugin('pjPrice') !== NULL)
			{
				?><li class="ui-state-default ui-corner-top<?php echo $_GET['controller'] == 'pjPrice' ? $active : NULL; ?>"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjPrice&amp;action=pjActionIndex"><?php __('plugin_price_menu'); ?></a></li><?php
			} elseif ($tpl['option_arr']['o_price_plugin'] == 'period' && pjObject::getPlugin('pjPeriod') !== NULL) {
				?><li class="ui-state-default ui-corner-top<?php echo $_GET['controller'] == 'pjPeriod' ? $active : NULL; ?>"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjPeriod&amp;action=pjActionIndex"><?php __('plugin_price_menu'); ?></a></li><?php
			}
			?>
		</ul>
	</div>
	<?php
} 
?>