<?php
/**
 * @package ZT Slideshow module for Joomla! 1.6
 * @author http://www.zootemplate.com
 * @copyright (C) 2011- zootemplate.Com
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
// no direct access
defined('_JEXEC') or die('Restricted access');

JHTML::_('stylesheet','ztslideshow.css','templates/zt_moscho/css/');
?>
<?php
	$id 		= $module->id;
	$height 	= $params->get('height');
	$width 		= $params->get('width');
	$background = $params->get('background');
?>
<style type="text/css">
#mySlideshow<?php echo $id; ?>,
#mySlideshowSet<?php echo $id; ?>{
	width: <?php echo $width; ?>px;
	height: <?php echo $height; ?>px;
	z-index: 5;
}

#mySlideshow<?php echo $id; ?> img.thumbnail, 
#mySlideshowSet<?php echo $id; ?> img.thumbnail{
	display: none;
}
</style>
<script type="text/javascript">	
	/*<![CDATA[ */
	function startSlideshow<?php echo $module->id; ?>() {
		var mySlideshow<?php echo $module->id; ?> = new gallery($('mySlideshow<?php echo $module->id; ?>'), {
			timed: <?php if($params->get('autorun')==1) : echo "true"; else :echo "false"; endif; ?>,
			defaultTransition: "<?php echo $params->get('transition'); ?>",
			baseClass: 'jdSlideshow',
			embedLinks: <?php if($params->get('linkable')) : echo "true"; else : echo "false"; endif; ?>,
			showArrows: <?php if($params->get('arrows')) : echo "true"; else : echo "false"; endif; ?>,
			showInfopane: <?php if($params->get('showtitle') || $params->get('showdescription')) : echo "true"; else : echo "false"; endif; ?>,
			showCarousel: false,
			fadeDuration: <?php echo $params->get('duration',500); ?>,
			delay: <?php echo $params->get('delay',5000); ?>
		});
	}
	window.addEvent('domready',startSlideshow<?php echo $module->id; ?>);
	/* ]]> */
</script>
<div style="display: none;"><a href="http://www.joomvision.com" title="Joomla Templates">Joomla Templates</a> and Joomla Extensions by JoomVision.Com</div>
<div class="slideshow2">
	
</div>
<div id="mySlideshow<?php echo $module->id; ?>" class="slideshow2left">
<?php foreach($slides as $slide) :?>
<div class="imageElement">
	<a href="<?php echo $slide->link; ?>" class="open" target="<?php if($params->get('newwindow')) : echo "_blank"; else :  echo ""; endif; ?>" title="<?php echo $slide->title; ?>">
		<img src="<?php echo $slide->path; ?>" class="full" alt="<?php echo $slide->title; ?>" />
    </a>
</div>
<?php endforeach; ?>
</div>