<?php
/**
 * @version		2.6.x
 * @package		K2
 * @author		JoomlaWorks http://www.joomlaworks.net
 * @copyright	Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
 * @license		GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die;
?>
<?php if(count($items)): ?>   
    <?php foreach ($items as $key => $item) : ?>
        <?php if($params->get('itemImage') && isset($item->image)): ?>
            <?php if($params->get('itemAttachments') && count($item->attachments)): ?>
                <div class="moduleAttachments">
                    <?php foreach ($item->attachments as $attachment): ?>
                    <video class="t-intro_video" id="intro-video" preload="auto" autoplay loop style="background-image:url(<?php echo $item->image; ?>)">
                      <source src="<?php echo $attachment->link; ?>"" type="video/mp4"> 
                      <source src="<?php echo $attachment->link; ?>"" type="video/webm">
                       <img src="<?php echo $item->image; ?>" >
                    </video> 
                    <?php endforeach; ?>
                </div>
          <?php endif; ?>         
      <?php endif; ?>         
    <?php endforeach; ?> 
  <?php endif; ?>
