<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_articles_categories
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
$articles = array();
JModelLegacy::addIncludePath( JPATH_SITE . '/components/com_content/models', 'ContentModel' );
?>
<div class="t-our_work_cat" id="t-our_work_cat">
<ul class="categories-module<?php echo $moduleclass_sfx; ?>">
<?php require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default') . '_items'); ?>
</ul>
</div>
<?php if( count( $articles ) ) : ?>
<div class="t-our_work_listing">
    <?php $i = 0; ?>
    <?php foreach( $articles as $alias => $a_items ) : ?>
        <?php if( count( $a_items ) ) : ?>
            <?php $i++; ?>
            <div id="t-our_work_<?php echo $i; ?>" class="t-our_work_portfolio">
                <div class="clearfix" id="<?php echo $alias; ?>">
                    <?php foreach( $a_items as $a_item ) : ?>
                        <?php $images = json_decode( $a_item->images ); ?>
                        <?php if( $images ) : ?>
                            <div class="t-our_work_outer">
                                  <div class="t-our_work_links">  
                                    <img src="<?php echo $images->image_intro; ?>" class="img-responsive" alt="<?php echo $images->image_intro_alt; ?>">
                                    <a href="#" class="t-our_work_link"><i class="fa fa-link"></i></a>
                                    <a href="<?php echo $images->image_fulltext; ?>" class="t-our_work_search" data-lightbox="<?php echo $alias; ?>"><i class="fa fa-search"></i></a>
                                  </div>
                                  <div class="t-our_list_detail">
                                    <a href="#" class="t-our_work_title"><?php echo $a_item->title; ?></a>
                                    <span class="t-our_work_type">Web Design</span>
                                  </div>
                            </div>  
                        <?php endif; ?>
                    <?php endforeach; ?>
                </div>
                <div class="t-slide_controls">
                  <a href="javascript:void(0)" class="t-team_prev fa fa-angle-left t-prev_our_work wow bounceInLeft animated" data-wow-duration="2s"></a>
                  <a href="javascript:void(0)" class="t-team_next fa fa-angle-right t-next_our_work wow bounceInRight animated" data-wow-duration="2s"></a>
                </div>   
            </div>
        <?php endif; ?>
    <?php endforeach; ?>
</div>
<?php endif; ?>