<?php if (Mage::getStoreConfig('easybanner/info/enabled')):?>

<script src="<?php echo $this->getSkinUrl('js/galleryview/jquery.easing.1.3.js')?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('js/galleryview/jquery.galleryview-1.1.js')?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('js/galleryview/jquery.timers-1.1.2.js')?>" type="text/javascript"></script>


<!-- InstanceBeginEditable name="head" -->

<?php $_banner = $this->getBanner(); ?>
<script type="text/javascript">
	jQuery.noConflict(); 
	jQuery(document).ready(function(){
		jQuery('#photos').galleryView({
			panel_width: <?php echo $_banner->getWidth()?>,
			panel_height: <?php echo $_banner->getHeight()?>,
			frame_width: 100,
			frame_height: 100,
			nav_theme: 'light'
		});
	});
</script>
 <?php if ($_banner->getShowTitle()==1): ?>
<h3><?php echo $_banner->getTitle(); ?></h3>
<?php endif; ?>


<div id="photos" class="galleryview">
  <?php $_banner_items = $this->getBannerItems(); ?>
  <?php foreach ($_banner_items as $_banner_item): ?>
    <div class="panel">
     <?php if ($_banner_item->getImage()): ?>
		<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$_banner_item->getImage()?>" width="<?php echo $_banner->getWidth().'px'?> " height=" <?php echo $_banner->getHeight().'px'?>" alt="easybanner"/>
     <?php elseif ($_banner_item->getImageUrl()): ?>
		<img src="<?php echo $_banner_item->getImageUrl()?>" width="<?php echo $_banner->getWidth().'px'?> " height=" <?php echo $_banner->getHeight().'px'?>" alt="easybanner" />
     <?php endif; ?>
     
     <div class="panel-overlay">
	 <h2><a href="<?php echo $_banner_item->getLinkUrl(); ?>"><?php echo $_banner_item->getTitle(); ?></a></h2>
	 <p><?php echo $_banner_item->getContent(); ?></p>
     </div>
  </div>
 <?php endforeach ?>
  
  <ul class="filmstrip">
  
    <?php $_banner_items = $this->getBannerItems(); ?>
    <?php foreach ($_banner_items as $_banner_item): ?>
	<?php if ($_banner_item->getThumbImage()): ?>
		<li><img src="<?php echo $this->helper('easybanner/image')->init($_banner_item->getThumbImage())->resize(100, 100) ?>" alt="easybanner"/></li>
	<?php elseif ($_banner_item->getThumbImageUrl()): ?>
		<li><img src="<?php echo $_banner_item->getThumbImageUrl() ?>" /></li>
	<?php elseif ($_banner_item->getImage()): ?>
		<li><img src="<?php echo $this->helper('easybanner/image')->init($_banner_item->getImage())->resize(100, 100) ?>" alt="easybanner"/></li>
	<?php endif; ?>	
	 
    <?php endforeach ?>
   
  </ul>
</div>
<?php endif; ?>
