<?php
/*------------------------------------------------------------------------
# Module By http://www.themelan.com
# ------------------------------------------------------------------------
# Author    ThemeLan by http://www.themelan.com
# Copyright (C) 2013 - 2014 http://www.themelan.com All Rights Reserved.
# @license - GNU/GPL V2 for PHP files. CSS / JS are Copyrighted Commercial
# Websites: http://www.themelan.com
-------------------------------------------------------------------------*/

// no direct access
defined('_JEXEC') or die;
?>
<div id="k2ModuleBox<?php echo $module->id; ?>" class="k2ItemsBlock<?php if($params->get('moduleclass_sfx')) echo ' '.$params->get('moduleclass_sfx'); ?>">
<div class="lan_accordian">
<?php if(count($items)): ?>
  <ul>
    <?php foreach ($items as $key=>$item):	?>
    <li class="<?php echo ($key%2) ? "odd" : "even"; if(count($items)==$key+1) echo ' lastItem'; ?>">
			<div class="lan_acc_content">
				<!-- itemImage -->
				<?php if($params->get('itemImage') && isset($item->image)): ?>
					<a class="moduleItemImage lan_img lan_border" href="<?php echo $item->link; ?>" title="<?php echo JText::_('K2_CONTINUE_READING'); ?>">
					<img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>"/>
					</a>
				<?php endif; ?>
				<div class="content">
					<!-- itemTitle -->
					<?php if($params->get('itemTitle')): ?>
					<a class="moduleItemTitle" href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a>
					<?php endif; ?>
					
					<!-- itemDateCreated -->
					<?php if($params->get('itemDateCreated')): ?>
					<span class="moduleItemDateCreated">Posted, <?php echo JHTML::_('date', $item->created, JText::_("d F Y")); ?></span>
					<?php endif; ?>
					<!-- itemCategory -->
					<?php if($params->get('itemCategory')): ?> | 
					<a class="moduleItemCategory" href="<?php echo $item->categoryLink; ?>"><?php echo $item->categoryname; ?></a>
					<?php endif; ?>
					
					<!-- itemIntroText -->		 
					<?php if($params->get('itemIntroText')): ?>
					<?php echo $item->introtext; ?>
					<?php endif; ?>
					<!-- itemReadMore -->
					<?php if($params->get('itemReadMore') && $item->fulltext): ?>
					<a class="moduleItemReadMore btn btn-primary" href="<?php echo $item->link; ?>">
						<?php echo JText::_('Read More'); ?>
					</a>
					<?php endif; ?>
				</div>
			</div>
		</li>
    <?php endforeach; ?>
    <li class="clearList"></li>
  </ul>
  <?php endif; ?>
</div>		
</div>