<?php
/**
 * @version   $Id: item.php 3362 2012-09-06 18:23:55Z josh $
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2012 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */

/**
 * @var $item RokSprocket_Item
 */
?>

<li class="sprocket-features-index-<?php echo $index;?>">
	<?php
		;
		if (($image = $item->getPrimaryImage())):
	?>
	<div class="sprocket-features-img-container" data-slideshow-image>
		<?php if ($item->getPrimaryLink()) : ?>
			<a href="<?php echo $item->getPrimaryLink()->getUrl(); ?>"><img src="<?php echo $image->getSource(); ?>" alt="" style="max-width: 100%; height: auto;" /></a>
		<?php else: ?>
			<img src="<?php echo $image->getSource(); ?>" alt="" style="max-width: 100%; height: auto;" />
		<?php endif; ?>
		<div class="rt-slideshow-overlay"></div>
		<div class="rt-slideshow-overlay2"></div>
	</div>
	<?php endif; ?>
	
	<div class="sprocket-features-content" data-slideshow-content>
		<?php if ( $item->getPrimaryLink() || $item->getTitle() || $item->getText()) : ?>
		<div class="sprocket-features-content-top"></div>
		<?php endif; ?>
		<?php if ($parameters->get('features_show_title') && $item->getTitle()) : ?>
			<h2 class="sprocket-features-title">
				<?php if ($item->getPrimaryLink()) : ?><a href="<?php echo $item->getPrimaryLink()->getUrl(); ?>"><?php endif; ?><?php echo $item->getTitle(); ?><?php if ($item->getPrimaryLink()) : ?></a><?php endif; ?>
			</h2>
		<?php endif; ?>
		<?php if ($parameters->get('features_show_article_text') && ($item->getText() || $item->getPrimaryLink())) : ?>
			<div class="sprocket-features-desc">
				<span>
					<?php echo $item->getText(); ?>
				</span>
				
			</div>
		<?php endif; ?>
		<?php if ($item->getPrimaryLink()) : ?>
				<a href="<?php echo $item->getPrimaryLink()->getUrl(); ?>" class="readon"><span><?php rc_e('READ_MORE'); ?></span></a>
				<?php endif; ?>
		<?php if ( $item->getPrimaryLink() || $item->getTitle() || $item->getText()) : ?>
		<div class="sprocket-features-content-bottom"></div>
		<?php endif; ?>
	</div>
	
</li>
