<?php
/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_main_product_image.php 18698 2011-05-04 14:50:06Z wilt $
 */
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); 

if (in_array($current_page_base,explode(",",'product_reviews')) ) {
  $products_image_large = zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('reviews_id')));
}

?>


<figure id="productMainImage" class="product-main-image" itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<a href="<?php echo $products_image_large; ?>" itemprop="contentUrl" data-size="<?php printf( '%dx%d', $image_info[0], $image_info[1] ); ?>" data-index="0">
<?php echo zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'data-zoom-src="' . $products_image_large . '" itemprop="thumbnail" class="img-responsive"'); ?>
</a>
</figure>
<script>
	jQuery(document).ready(function(){
		"use strict";

		$("#productMainImage a").zoom({
      url  : '<?php echo $products_image_large; ?>'
    });
	});
</script>