<?php
/**
* Gallery show
* Version		: 1.0
* Created by	: joomla2you
* Email			: info@joomla2you.com
* URL			: www.joomla2you.com
* License GPLv2.0 - http://www.gnu.org/licenses/gpl-2.0.html
*/

// no direct access
defined('_JEXEC') or die('Restricted access');
$modID = $module->id;
$modPath = JURI::base(true).'/modules/mod_ju_galleryshow/';

$doc = JFactory::getDocument();

// Load CSS/JS
$doc->addStyleSheet ($modPath.'media/css/style.css' );

// Styling from module parameters
$ju_css = '#ju_mains {position: relative; z-index: 200;  }
#ju_tilt {margin: ' . ($ju_image_margin_y) . 'px; }
#ju_mains figure {position: relative; float: left; width:' . $ju_image_width . ';}
@media only screen and (min-width: 960px) and (max-width: 1280px) {#ju_mains figure {width:' . $ju_image_width_tabl . ';}}
@media only screen and (min-width: 768px) and (max-width: 959px) {#ju_mains figure {width:' . $ju_image_width_tabp . ';}}
@media only screen and ( max-width: 767px ) {#ju_mains figure {width:' . $ju_image_width_mobl . ';}}
@media only screen and (max-width: 440px) {#ju_mains figure {width:' . $ju_image_width_mobp . ';}}
';
// Put styling in header
$doc->addStyleDeclaration($ju_css);
?>
<div id="ju_mains">
<?php foreach ($imagehover_images as $item) : ?>
<figure data-tilt>
<div id="ju_tilt"> 
<img src="<?php echo $item->ju_image; ?>" alt="<?php echo $item->ju_title; ?>" class="thumb">
<figcaption>  <?php if (!empty($item->ju_thumb)) : ?><?php if (!empty($item->ju_target_url)) : ?><a href="<?php echo $item->ju_target_url; ?>" target="<?php echo $ju_target; ?>"><?php endif; ?><img src="<?php echo $item->ju_thumb; ?>" alt="<?php echo $item->ju_title; ?>" class="brand" ><?php if (!empty($item->ju_target_url)) : ?></a><?php endif; ?><?php endif; ?>
<h3><?php echo $item->ju_title; ?></h3>
<small><?php echo $item->ju_text; ?></small> 
<?php if (!empty($item->ju_target_url)) : ?><div class="ju_link"> <a href="<?php echo $item->ju_target_url; ?>" target="<?php echo $ju_target; ?>"> <?php echo $item->ju_rmore; ?></a></div><?php endif; ?> </figcaption>
</div>
</figure>
<?php endforeach; ?>
</div>
<?php if($params->get('tilt_load')=='1') : ?>
<script type="text/javascript" src="<?php echo $modPath ?>media/js/tilt.js"></script>	
<?php endif; ?>