<?php
/*
 * ARI Easy Slider Joomla! module
 *
 * @package		ARI Easy Slider Joomla! module.
 * @version		1.0.0
 * @author		ARI Soft
 * @copyright	Copyright (c) 2009 www.ari-soft.com. All rights reserved
 * @license		GNU/GPL (http://www.gnu.org/copyleft/gpl.html)
 * 
 */

(defined('_JEXEC') && defined('ARI_FRAMEWORK_LOADED')) or die;

$firstShow = (bool)$defParams['firstShow'];
$lastShow = (bool)$defParams['lastShow'];
$prevShow = (bool)AriUtils::getParam($defParams, 'prevShow', true);
$nextShow = (bool)AriUtils::getParam($defParams, 'nextShow', true);
$playPauseShow = (bool)$defParams['playPauseShow'];
$pagingShow = (bool)$defParams['pagingShow'];
$continuos = (bool)$opt['continuous'];
$controlsFade = (bool)$opt['controlsFade'];
$pageType = AriUtils::getParam($defParams, 'pagingType', 'numeric');
?>
<div class="es-controls">
	<?php
		if ($playPauseShow):
	?>
	<a class="es-play-button es-button" rel="play" title="<?php echo $defParams['playText']; ?>"><span><?php echo $defParams['playText']; ?></span></a>
	<a class="es-pause-button es-button" rel="pause" title="<?php echo $defParams['pauseText']; ?>"><span><?php echo $defParams['pauseText']; ?></span></a>
	<?php
		endif;
	?>
	<?php
		if ($lastShow):
	?>
	<a class="es-last-button es-nav-button es-button" rel="last" title="<?php echo $defParams['lastText']; ?>"><span><?php echo $defParams['lastText']; ?></span></a>
	<?php
		endif;
	?>
	<?php
		if ($nextShow): 
	?>
	<a class="es-next-button es-nav-button es-button" rel="next" title="<?php echo $defParams['nextText']; ?>"><span><?php echo $defParams['nextText']; ?></span></a>
	<?php
		endif; 
	?>
	<?php
		if ($firstShow):
	?>
	<a class="es-first-button es-nav-button es-button<?php if (!$continuos && $controlsFade): ?> es-button-hidden<?php endif; ?>" rel="first" title="<?php echo $defParams['firstText']; ?>"><span><?php echo $defParams['firstText']; ?></span></a>
	<?php
		endif;
	?>
	<?php
		if ($prevShow): 
	?>
	<a class="es-prev-button es-nav-button es-button<?php if (!$continuos && $controlsFade): ?> es-button-hidden<?php endif; ?>" rel="prev" title="<?php echo $defParams['prevText']; ?>"><span><?php echo $defParams['prevText']; ?></span></a>
	<?php
		endif;
	?>
	<?php
		if ($pagingShow):
	?>
	<div class="es-paging">
		<div class="es-paging-container">
	<?php
		$pageCount = ceil(count($items) / $itemsPerPage);
		for ($i = 0; $i < $pageCount; $i++):
			$pageTitle = $pageType == 'words' ? JText::_('LIB_ARISMARTCONTENT_EASYSLIDER_LABEL_PAGE' . ($i + 1)) : ($i + 1);
	?>
		<a class="es-page-button es-page-<?php echo $i; ?> es-nav-button es-button<?php if ($i == 0): ?> es-button-active<?php endif; ?>" rel="<?php echo $i; ?>" title="<?php echo $pageTitle; ?>"><span><?php echo $pageTitle; ?></span></a>
	<?php
		endfor;
	?>
		</div>
	</div>
	<?php
		endif;
	?>
	<br class="es-clear" />
</div>