<?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 if($params->get('itemPreText')): ?>
    <div class="t-section_pera">
        <p class="modulePretext"><?php echo $params->get('itemPreText'); ?></p>
    </div>
    <?php endif; ?>
    
   <div class="t-our_team_list row">    
        <div class="clearfix t-our_team_carousel" id="t-our_team_carousel">
        <?php foreach ($items as $key => $item) : ?>
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 item">
              <div class="t-our_team_overlay">
                <?php if($params->get('itemImage') && isset($item->image)): ?>
                <a href="<?php echo $item->link; ?>">
                  <img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>" class="t-team_img">
                </a>  
                <?php endif; ?>
                <?php if($params->get('itemExtraFields') && count($item->extra_fields)): ?>
                  <div class="t-our_team_social">
                      <ul>
                        <?php foreach ($item->extra_fields as $extraField): ?>
                            <?php if($extraField->value != '' and $extraField->type = 'link' ): ?>
                            <li><a href="<?php echo $extraField->url; ?>" class="<?php echo $extraField->text; ?>"></a></li>
                            <?php endif; ?>
                        <?php endforeach; ?>
                      </ul>
                  </div> 
                <?php endif; ?>
              </div>
              <?php if($params->get('itemTitle')): ?>
              <a href="<?php echo $item->link; ?>" class="t-team_name">
                <span><?php echo $item->title; ?></span>
              </a>
              <?php endif; ?>
              
              <?php if($params->get('itemTags') && count($item->tags)>0): ?>
              <?php $tags = array(); ?>
              <span class="t-team_post">
                  <?php foreach ($item->tags as $tag): ?>
                    <?php array_push( $tags, $tag->name ); ?>
                  <?php endforeach; ?>
                  <?php echo implode( ', ', $tags ); ?>
              </span>  
              <?php endif; ?>           
        </div>
        <?php endforeach;  ?>
    </div>
        <div class="t-slide_controls">
            <a href="javascript:void(0)" class="t-team_prev fa fa-angle-left t-prev_team wow bounceInLeft animated" data-wow-duration="2s"></a>
            <a href="javascript:void(0)" class="t-team_next fa fa-angle-right t-next_team wow bounceInRight animated" data-wow-duration="2s"></a>
        </div>

  </div>
  <?php endif; ?>
