<?php
/* Droconut SLIDERS v1.3; Droconut - Dropping Coconut KG
http://www.droconut.com 
Support: office@droconut.com

Copyright 2012, Attila Santo (Dropping Coconut KG) */
?>
<div class="slideshow" style="width:<?php echo $width; ?>px;overflow:hidden">
  <div id="droco_slideshow<?php echo $module; ?>" class="pix_diapo" style="width:<?php echo $width; ?>px; height:<?php echo $height; ?>px;">
<?php foreach ($banners as $key => $banner) { ?>
<?php if ($banner['link']) { ?>
	<div data-thumb="<?php echo $banner['thumb']; ?>">
		<a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" /></a>
		<?php if ($banner['caption']) { ?><div class="caption elemHover fromLeft"><?php echo $banner['caption']; ?></div><?php } ?>
	</div>
<?php } else { ?>
	<div data-thumb="<?php echo $banner['thumb']; ?>">
		<img src="<?php echo $banner['image']; ?>" />
		<?php if ($banner['caption']) { ?><div class="caption elemHover fromLeft"><?php echo $banner['caption']; ?></div><?php } ?>
	</div>
<?php } ?>
<?php } ?>
  </div>
</div>
<script type="text/javascript">
$(document).ready(function() {
	$('#droco_slideshow<?php echo $module; ?>').diapo({
<?php $i=0;
foreach ($preferences as $key => $value) {
	if(!empty($value)) {
		if($i!=0){echo ",\n";}
			if(is_array($value)) {echo "\t\t$key: '" . implode(', ', $value) . "'";}
			else if(is_numeric($value)) {echo "\t\t$key: $value";}
			else if(in_array($value, array("true","false"))) {echo "\t\t$key: $value";}
			else if(substr($value, -1) == "}") {echo "\t\t$key: $value";}
			else {echo "\t\t$key: '$value'";}
		$i++;
	};}; echo "\n";?>
	});
});
</script>