<?php include_once APP_PATH.'template/responsive/header.php';?>

		<div class="content">
		
		<?php if (!PAGE_ACTIVE) { ?>
		<div class="alert"><?php echo $tl["errorpage"]["ep"];?></div>
		<?php } ?>
		
		<section class="topsection">
			
			<!-- Heading -->
			<div class="page-header">
			<h1><?php echo $PAGE_TITLE;?> <small><?php echo $tl["general"]["g1"].$SHOP_HITS; if ($SHOWDATE) { ?> <time datetime="<?php echo $PAGE_TIME_HTML5;?>" pubdate><?php echo $PAGE_TIME;?></time><?php } ?></small></h1>
			</div>
				
		</section>
		
		<article class="post">
			
			<div class="entry-content shop-product">
			
				<figure class="shop_item">
					
					<?php if ($row['img']) { ?>
					<a href="<?php echo BASE_URL.$row["img"];?>" class="ilightbox">
					<?php } ?>
					<img class="product-image" src="<?php echo BASE_URL.$row["previmg"];?>" alt="product thumbnail" id="p_<?php echo $row["id"];?>" />
					<?php if ($row['img']) { ?>
					</a>
					<?php } ?>
					
					<h2><?php echo $PAGE_TITLE;?></h2>
					
					<div class="add-option">
					
					<?php if ($row['product_options']) { ?>
					<select name="product-option" class="product-option" id="po_<?php echo $row["id"];?>">
						<option value=""><?php echo $tl["shop"]["m54"];?></option>
						<?php $poptarray = explode(',', $row['product_options']); for ($i = 0; $i < count($poptarray); $i++) { 
						
							$optearray = explode('::', $poptarray[$i]);
							
							if ($_SESSION['ECOMMERCE_CURRENCY'] != JAK_CURRENCY && $optearray[1] != "0.00") {
							
								$optearray[1] = $convert->Convert($optearray[1], $_SESSION['ECOMMERCE_CURRENCY']);
							}
						
						?>
						
						<option value="<?php echo $poptarray[$i];?>"><?php echo $optearray[0]; if ($optearray[1] != "0.00") { echo ' ('.$optearray[1].'&nbsp;'.$JAK_CURRENCY.')'; }?></option>
						
						<?php } ?>
					</select><br />
					<input type="hidden" name="pop_<?php echo $row["id"];?>" id="pop_<?php echo $row["id"];?>" value="" />
					<?php } ?>
					
					<?php if ($row['product_options'] && $row['product_options1']) { ?>
					<select name="product-option1" class="product-option1" id="po1_<?php echo $row["id"];?>">
						<option value=""><?php echo $tl["shop"]["m54"];?></option>
						
						<?php $poptarray1 = explode(',', $row['product_options1']); for ($i = 0; $i < count($poptarray1); $i++) { 
						
							$optearray1 = explode('::', $poptarray1[$i]);
							
							if ($_SESSION['ECOMMERCE_CURRENCY'] != JAK_CURRENCY && $optearray[1] != "0.00") {
							
								$optearray1[1] = $convert->Convert($optearray1[1], $_SESSION['ECOMMERCE_CURRENCY']);
							}
						
						?>
						
						<option value="<?php echo $poptarray1[$i];?>"><?php echo $optearray1[0]; if ($optearray1[1] != "0.00") { echo ' ('.$optearray1[1].'&nbsp;'.$JAK_CURRENCY.')'; }?></option>
						
						<?php } ?>
					</select><br />
					<input type="hidden" name="pop1_<?php echo $row["id"];?>" id="pop1_<?php echo $row["id"];?>" value="" />
					<?php } ?>
					
					<?php if ($row['product_options'] && $row['product_options1'] && $row['product_options2']) { ?>
					<select name="product-option2" id="po2_<?php echo $row["id"];?>" class="product-option2">
						<option value=""><?php echo $tl["shop"]["m54"];?></option>
						<?php $poptarray2 = explode(',', $row['product_options2']); for ($i = 0; $i < count($poptarray2); $i++) { 
						
							$optearray2 = explode('::', $poptarray2[$i]);
							
							if ($_SESSION['ECOMMERCE_CURRENCY'] != JAK_CURRENCY && $optearray[1] != "0.00") {
							
								$optearray2[1] = $convert->Convert($optearray2[1], $_SESSION['ECOMMERCE_CURRENCY']);
							}
						
						?>
						
						<option value="<?php echo $poptarray2[$i];?>"><?php echo $optearray2[0]; if ($optearray2[1] != "0.00") { echo ' ('.$optearray2[1].'&nbsp;'.$JAK_CURRENCY.')'; }?></option>
						
						<?php } ?>
					</select>
					<input type="hidden" name="pop2_<?php echo $row["id"];?>" id="pop2_<?php echo $row["id"];?>" value="" />
					<?php } ?>
					
					</div>
					
					<p><?php echo $tl["shop"]["m46"].'<strong>'.$instock;?></strong> <?php if ($row["digital_file"]) echo $tl['shop']['m90'];?></p>
					
					<p><?php if ($row["onsale"]) { echo $tl["shop"]["m31"]; } else { echo $tl["shop"]["m"]; } echo '<span class="pprice_'.$row["id"].'">'.$row["price"].'</span>&nbsp;'.$JAK_CURRENCY;?></p>
					
						<?php if ($row['stock']) { ?>
						<p><button class="btn btn-success btn-small" onclick="addlist(<?php echo $row['id'];?>);return false;"><?php echo $tl["shop"]["m76"];?></button></p>
						<?php } ?>
					
				</figure>
				
				<h3><?php echo $PAGE_TITLE;?></h3>
				
			    <p><?php echo $PAGE_CONTENT;?></p>
			    
			    
			    
			</div>
		
		</article>
		
		<div class="clearfix"></div>
		
		<hr>
		
		<ul class="pager">
		<?php if ($JAK_NAV_PREV) { ?>
			<li class="previous"><a href="<?php echo $JAK_NAV_PREV;?>"><i class="icon-arrow-left"></i> <?php echo $JAK_NAV_PREV_TITLE;?></a></li>
		<?php } if ($JAK_NAV_NEXT) { ?>
			<li class="next"><a href="<?php echo $JAK_NAV_NEXT;?>"><?php echo $JAK_NAV_NEXT_TITLE;?> <i class="icon-arrow-right"></i></a></li>
		<?php } ?>
		</ul>
		
		<div class="shopping-cart drop-here" id="shopping-cart">
		
			<div class="inside">
			
				<h2><?php echo $tl["shop"]["m26"];?></h2>
				
					<a href="javascript:;" class="minimize_shoppingcart btn btn-mini btn-info" title="minimize shopping cart">_</a><a href="javascript:;" class="maximize_shoppingcart btn btn-mini btn-success" title="maximize shopping cart">+</a>
				
		            	<div class="basket-icons">
		            		
			            	<img id="scart" src="<?php echo BASE_URL;?>img/shopping_cart.png" alt="shopping cart" width="120" height="80" />
			            	
							<img src="<?php echo BASE_URL;?>img/loader.gif" alt="loading.." id="basket-loader" width="16" height="11" />
							
						</div>
							
						<div id="drag-product-info"><?php echo $tl["shop"]["m27"];?></div>
						
						<div id="item-list" class="item-list"></div>
						
						<div id="total">
						<?php echo $tl["shop"]["m"];?><span id="total-amount"></span> <?php echo $JAK_CURRENCY;?>
						<a href="<?php echo $shopcheckout;?>" class="btn btn-success btn-mini"><?php echo $tl["shop"]["m29"];?></a>
						</div>
						<hr>
						<div id="trash">
						<a href="#" class="btn btn-danger btn-mini pull-right"><?php echo $tl["shop"]["m28"];?></a>
						</div>
						
			</div>
		                
		</div>
		
		<script type="text/javascript">
		
			jQuery(document).ready(function() {
			
				jQuery(document).on('click', '.minimize_shoppingcart',function(){
					
					jQuery('.minimize_shoppingcart').css('display','none');
					jQuery('.maximize_shoppingcart').css('display','block');
					jQuery('.shopping-cart').css('height', '52px');
					
				});
				
				jQuery(document).on('click', '.maximize_shoppingcart',function(){
					
					jQuery('.maximize_shoppingcart').css('display','none');
					jQuery('.minimize_shoppingcart').css('display','block');
					jQuery('.shopping-cart').css('height', '512px');
					
				});
			
			});
		
		</script>
		
		</div><!-- #content -->
		
<?php include_once APP_PATH.'template/responsive/footer.php';?>