<?php echo $header; ?>
<?php echo $column_left; ?>
<?php echo $column_right; ?>
<div id="content">
<?php echo $content_top; ?>

  <!-- breadcrumb 
  ===========================================================-->
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  
  <!-- Title 
  ===========================================================-->
  <h1 class="product-title"><?php echo $heading_title; ?></h1>
  
  <!-- product-info 
  ===========================================================-->
  <div class="product-info">
  
  	<!-- **** Left **** -->
    <?php if ($thumb || $images) { ?>
        <div class="left">
        
          <?php if ($thumb) { ?>
          <div class="image">
          	<span class="zoom"></span>

			
				<?php if($popup){ ?>
			
			
            <a href="<?php echo $popup; ?>" class = 'cloud-zoom' id='zoom1' rel="">
            <img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" />
            </a>

			
				<?php }else{ ?>
				<img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" />
				<?php } ?>				
			
			
          </div>
          <?php } ?>
          
          <?php if ($images) { ?>
          
          <div class="image-additional">
		  
            <!--Hugo- mostrar imagem principal nas listas de miniatura, possibilitando voltar para imagem principal  -->
			    <a href="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>' ">
				<img id="cloud-zoom" src="<?php echo $thumb; ?>" width="74" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a>
			<!-- FIM Hugo -->
            
			<?php foreach ($images as $image) { ?>
            
            <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>' ">
            <img src="<?php echo $image['thumb']; ?>"  title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" />
            </a>
            
            <?php } ?>
          </div>
          
          <?php } ?>
          
        </div>
    <?php } ?>
    
    <!-- **** right **** -->
    <div class="right">
    
      <!-- description -->
      <div class="description">
        <?php if ($manufacturer) { ?>
        <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br />
        <?php } ?>
        <span><?php echo $text_model; ?></span> <?php echo $model; ?><br />
        <?php if ($reward) { ?>
        <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br />
        <?php } ?>
        <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div>
        
      <!-- price -->
      <?php if ($price) { ?>
      <div class="price">
        
				<?php if( (isset($status) && ($status) && ($quantity <= 0)) || (($this->config->get('futura_preco_dinamico_status')=='Habilitado') && ($futura_preco_dinamico_produto) ) ){ ?>
					<div class="price-text"></div>
				<?php }else{ ?>
				    <div class="price-text"><?php echo $text_price; ?></div>
				<?php } ?>	
			      
        
        <div class="price-data">
        <?php if (!$special) { ?>
        
			    <?php if(isset($status) && ($status) && ($quantity <= 0) ){ ?>
			        <?php echo $price_esgotado; ?>
				<!--AQUI VERIFICA SE O MODULO PREÇO DINAMICO ESTÁ HABILITADO-->
				<?php }elseif(($this->config->get('futura_preco_dinamico_status')=='Habilitado') && ($futura_preco_dinamico_produto) ){?>
						<?php eval($futura_preco_dinamico_produto); ?>	
				<?php }else{ ?>
					<?php echo $price; ?>
                <?php } ?>				
			      
        <?php } else { ?>
        <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
        <?php } ?>
        <br />
        <?php if ($tax) { ?>
        
				<?php if(isset($status) && ($status) && ($quantity <= 0) ){ ?>
					<span class="price-tax"></span>
				<?php }else{ ?>
				    <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
				<?php } ?>	
			      
        <?php } ?>
        <?php if ($points) { ?>
        <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br />
        <?php } ?>
        <?php if ($discounts) { ?>
        <div class="discount">
          <?php foreach ($discounts as $discount) { ?>
          <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
          <?php } ?>
        </div>
        <?php } ?>
      </div>
      </div>
      <?php } ?>
      
      <!-- cart -->

			
		
			
			<?php if(isset($status) && ($status)  ){ ?>
				<?php if ($quantity <= 0): ?>
				<div id="aviseme" ></div>
				
				<?php endif ?>
				
			<?php } ?>	
				
			
      <div class="cart">
        <?php echo $text_qty; ?>
          		
					<?php if ( ($futura_quantidade_atacado_status) && (!(isset($status) && ($status) && ($quantity <=0) )) ){ ?>
						
						<input class="button" type="button" id="decrease_<?php echo $product_id; ?>" value="-"  onclick="javascript:onAction(<?php echo $product_id; ?>, -1);" style="width:20px; text-indent:0px; height:22px; color: #ffffff;  " >
						<input type="text" name="quantity" class="quantity" id="htop_<?php echo $product_id; ?>" size="2" value="1" class="numeric"/>
						<input class="button" type="button" id="increase_<?php echo $product_id; ?>" value="+" onclick="javascript:onAction(<?php echo $product_id; ?>, 1);" style="width:20px; text-indent:0px; height:22px; color: #ffffff; "/>
						<input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />					
							
						
					<?php }elseif( (isset($status) && ($status) && ($quantity <=0) ) ){?>
						<div class="product_attacked" style="height:47px;;"></div>
					<?php }else{?>
						<input type="text" class="quantity" name="quantity" size="2" value="<?php echo $minimum; ?>" />
					<?php } ?>		
			
          <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
          &nbsp;
          <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button cart-product" />
        
        <!--<div><span>&nbsp;&nbsp;&nbsp;<?php echo $text_or; ?>&nbsp;&nbsp;&nbsp;</span></div>-->
        <div class="wish-compare">
          <a class="wish tooltip" onclick="addToWishList('<?php echo $product_id; ?>');"><span><?php echo $button_wishlist; ?></span></a>
          <a class="compare tooltip" onclick="addToCompare('<?php echo $product_id; ?>');"><span><?php echo $button_compare; ?></span></a>
        </div>
        <?php if ($minimum > 1) { ?>
        <div class="minimum"><?php echo $text_minimum; ?></div>
        <?php } ?>
      </div>

              
              
				<?php if( ( (isset($pagseguro_parcela) && ($pagseguro_parcela)) && ($fator_perfil_pagseguro)) && (!isset($status) || (!$status) || (($status) && ($quantity > 0)))){ ?>  
					<label><strong>Parcele em até 12x no cartão de crédito.</strong></label>
					</br>
					<span>Parcelamento com PagSeguro</span>
					<div class="todas-parcleas" style="font-family: 'open sans',verdana,sans-serif;margin-top :5px;">
						<?php foreach($fator_perfil_pagseguro as $indice => $fator) { ?>
							<div class='parcelas' style="background-color: #f0f0f0;border: 0px solid red;
							width: 150px;line-height: 25px;text-align: center;float: left;font-size: 12px;color: #333;
							margin:1px;">
							<b><?php echo $indice+1; ?>x de R$ <?php echo number_format(($preco_pag * $fator), 2,',','.'); ?> </b></div> 
					    <?php } ?>
					 </div>		
				 <?php } ?>
			
          
      

      <!-- review - share -->
      <?php if ($review_status) { ?>
      <div class="review">
      	
        <div class="review-text">
        <img class="review-img" src="catalog/view/theme/gazal/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />
        <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;
        <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a>
        </div>
        
        
        <div class="share"><!-- AddThis Button BEGIN -->
          <!-- AddThis Button BEGIN -->
            <div class="addthis_toolbox addthis_default_style ">
            <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
            <a class="addthis_button_tweet"></a>
            <a class="addthis_button_pinterest_pinit"></a>
            <a class="addthis_counter addthis_pill_style"></a>
            </div>
            
			<!-- COMEÇO Ajusta BUG dos Buttons Social para IE8 - Henrique R. Pohl -->
			<script type="text/javascript">
			  $(document).ready(function() {
				  if (($.browser.msie && $.browser.version > 8 ) || (!$.browser.msie)) {
				  var j = document.createElement("script"); 
				  j.type = "text/javascript"; 
				  j.src = '//s7.addthis.com/js/250/addthis_widget.js'; 
				  document.body.appendChild(j);
				}else{
				  var j = document.createElement("script"); 
				  j.type = "text/javascript"; 
				  j.src = '//s7.addthis.com/js/250/addthis_widget.js'; 
				  document.body.appendChild(j);
				  //alert($.browser.version);
				  }
			  });
			</script> 
			<!-- FIM Ajusta BUG dos Buttons Social para IE8 - Henrique R. Pohl -->
			
          <!-- AddThis Button END -->
        </div>
      </div>
      
      
      
      <!-- options -->
      <?php if ($options) { ?>
      <div class="options">
        <h2 class="option-title"><?php echo $text_option; ?></h2>
        <br />
        <?php foreach ($options as $option) { ?>
        <?php if ($option['type'] == 'select') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <select name="option[<?php echo $option['product_option_id']; ?>]">
            <option value=""><?php echo $text_select; ?></option>
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
            </option>
            <?php } ?>
          </select>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'radio') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'checkbox') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'image') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <table class="option-image">
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <tr>
              <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td>
              <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td>
              <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
                  <?php if ($option_value['price']) { ?>
                  (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                  <?php } ?>
                </label></td>
            </tr>
            <?php } ?>
          </table>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'text') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'textarea') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'file') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button">
          <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'date') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'datetime') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'time') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" />
        </div>
        <br />
        <?php } ?>
        <?php } ?>
      </div>
      <?php } ?>
      
      <?php } ?>
    </div>
  </div><!--/product-info-->
  
  
  <!-- Tabs 
  =========================================================-->
  <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a>
    <?php if ($attribute_groups) { ?>
    <a href="#tab-attribute"><?php echo $tab_attribute; ?></a>
    <?php } ?>
    <?php if ($review_status) { ?>
    <a href="#tab-review"><?php echo $tab_review; ?></a>
    <?php } ?>
    <?php if ($tags) { ?>
    <a href="#tab-tags"><?php echo $text_tags; ?></a>
    <?php } ?>
  </div>
  
  
  <div id="tab-description" class="tab-content"><?php echo $description; ?></div>
  <?php if ($attribute_groups) { ?>
  <div id="tab-attribute" class="tab-content">
    <table class="attribute">
      <?php foreach ($attribute_groups as $attribute_group) { ?>
      <thead>
        <tr>
          <td colspan="2"><?php echo $attribute_group['name']; ?></td>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
        <tr>
          <td><?php echo $attribute['name']; ?></td>
          <td><?php echo $attribute['text']; ?></td>
        </tr>
        <?php } ?>
      </tbody>
      <?php } ?>
    </table>
  </div>
  <?php } ?>
  <?php if ($review_status) { ?>
  <div id="tab-review" class="tab-content">
    <div id="review"></div>
    <h2 id="review-title"><?php echo $text_write; ?></h2>
    <b><?php echo $entry_name; ?></b><br /><br />
    <input type="text" name="name" value="" />
    <br />
    <br />
    <b><?php echo $entry_review; ?></b><br /><br />
    <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea>
    <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
    <br />
    <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span>&nbsp;
    <input type="radio" name="rating" value="1" />
    &nbsp;
    <input type="radio" name="rating" value="2" />
    &nbsp;
    <input type="radio" name="rating" value="3" />
    &nbsp;
    <input type="radio" name="rating" value="4" />
    &nbsp;
    <input type="radio" name="rating" value="5" />
    &nbsp;<span><?php echo $entry_good; ?></span><br />
    <br />
    <b><?php echo $entry_captcha; ?></b><br /><br />
    <input type="text" name="captcha" value="" />
    <br /><br />
    <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br />
    <br />
    <div class="buttons">
      <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div>
    </div>
  </div>
  <?php } ?>
  
  
  
  
  <?php if ($tags) { ?>
  <div id="tab-tags" class="tab-content">
  <div class="tags">
    <?php for ($i = 0; $i < count($tags); $i++) { ?>
    <?php if ($i < (count($tags) - 1)) { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
    <?php } else { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
    <?php } ?>
    <?php } ?>
  </div>
  </div>
  <?php } ?>
  
  
  
  <?php if ($products) { ?>
  <div class="related-product">
  	<h2 class="realted-title"><?php echo $tab_related; ?>(<?php echo count($products); ?>)</h2>
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div class="related grid_2">
        <?php if ($product['thumb']) { ?>
        <div class="image">
        	<a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a>
        </div>
        <?php } ?>
        <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
        <div class="rating">
        	<img src="catalog/view/theme/gazal/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" />
        </div>
        <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div>
      <?php } ?>
    </div>
  </div>
  <?php } ?>
  
  
  <?php echo $content_bottom; ?></div>

			<?php if(isset($status) && ($status)  ){ ?>
				<?php if ($quantity <= 0): ?>
				<script type="text/javascript"><!--
                var quantityStock = <?php echo $quantity; ?>;
                if (quantityStock <= 0) {
					$("#aviseme").html("<?php echo sprintf($btnStock,$heading_title_aviseme_btn); ?>");
					$(".cart").remove();
				}
                $("#btnStock").click(function (){
					var HTML="";
					HTML+= ' <style>';
					HTML+= ' #formaviseme{height:100% !important;width:100% !important}'; 
					HTML+= ' label{position:relative;margin-top:0px!important;}';
					HTML+= ' #formaviseme .campos{position:relative;margin-bottom:0px !important;margin-left:0px !important;}';
					HTML+= ' #formaviseme span{position:relative;margin-top:0px !important;}';
					HTML+= ' </style>' ;
					
                    HTML+=' <div id="formaviseme"> <div style="font-size:14px;text-align:center;"><?php echo $heading_title_aviseme; ?></div><br>';
					HTML+='	<!-- NAME -->';
					HTML+='	<label>Nome:</label>';
					HTML+=' </br>';
					HTML+='	<input type="text"  class="campos" name="name" placeholder="<?php echo $entry_nome ?>" size="15" style="width:95%;"/>';
				    HTML+=' </br>';
					HTML+=' </br>';
					HTML+=' <!-- EMAIL -->';
					HTML+='	<label>Email:</label>';
					HTML+=' </br>';
					HTML+='	<input type="text" class="campos" name="email" placeholder="<?php echo $entry_email ?>" size="27" style="width:95%;"/>'
				    HTML+=' </br>';
					HTML+=' </br>';
					HTML+=' <!-- CAPTCHA PRODUCT -->';
					HTML+='	<label>Captcha:</label>';
					HTML+=' </br>';
					HTML+='	<input type="text"class="campos"  name="captcha" value="" placeholder="<?php echo $entry_captcha; ?>" size="27" style="width:80%;" /><img src="index.php?route=information/contact/captcha" alt="CAPTCHA"  style="float:left;clear:left;margin-top:3px;margin-bottom:3px;"/>';
					HTML+='	<!-- HIDDEN | BUTTON -->';
				    HTML+='	<input type="hidden" name="body_message" value="<?php echo sprintf($body_message, '%s', $heading_title); ?>" />';
					HTML+='	<input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />';
				    HTML+=' </br>';
					HTML+=' <div class="btnn"><input  type="button"  value="<?php echo $text_continue ?>" class="button" id="btnLetmeknow" style="clear:left;float:left !important;margin-top:1px;" /></div>';
                    HTML+=' </div>';
					
					$.fancybox({
						opacity     : 0.5,
						maxWidth    : '100%',
						maxHeight   : '100%',
						fitToView   : false,
						width		: '100%',
						height		: '100%',
						autoSize    : true,
						closeClick  : false,
						openEffect  : 'none',
						closeEffect : 'none',
						scrolling   : false,
						href        : false,
						loop        : false,
						content     : HTML
					});  
				});
				$(".addthis_default_style").hide();
				$('.error').hide();
				$('.review').remove();
				$('#tab-review').remove();
				
				$('#btnLetmeknow').live('click',function(){
					$.ajax({
					    url		 : 'index.php?route=product/avise_me/index',
					    type	    : 'POST',
					    data     : $('#formaviseme input[type=\'text\'], input[type=\'hidden\']'),
					    dataType : 'json',
					    success  : function(json){
							if(json['error']){ 
								$('.error').remove(); 
								if (json['error']['name']){
									$('#formaviseme input[name=\'name\']').after('<span class="error">'+ json['error']['name'] + '</span>');
								} 
								if (json['error']['email']){
									$('#formaviseme input[name=\'email\']').after('<span class="error">'+ json['error']['email'] + '</span>');
								}
								if (json['error']['captcha']){
									$('#formaviseme input[name=\'captcha\']').after('<span class="error">'+ json['error']['captcha'] + '</span>');
								}
								 parent.$.fancybox.resize();
								$('#formaviseme').css({"width":"100%","height":"100%"});
								$('#formaviseme').resize();
							}else if(json['success']){
								parent.$.fancybox.close();
							}
						},
					    error: function(xhr, ajaxOptions, thrownError) {
							alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
					    }
                    });
				});
				//--></script>
				<?php endif; ?>
			<?php } ?>	
			
<!-- Let Me Know -Hugo -->
			
				 

				   
					<?php if ( ($futura_quantidade_atacado_status) ){ ?>
					<script>
						function onAction(prodid, v1) {
							
							var elm = $('#htop_' + prodid); 			 
							if ((elm.prop("value") > 1) || (parseInt(v1, 10) == 1)){
								elm.val( parseInt( elm.val(), 10 ) + parseInt(v1, 10) );
							}			 				  
						};
						
						function carrinhoAdd(prodid){
						    
							var elm = $('#htop_' + prodid);
							addToCart(prodid, parseInt(elm.prop("value"), 10));
						}
					</script>
					<?php } ?>
				
			
<script type="text/javascript"><!--
$(document).ready(function() {
  $('.colorbox').colorbox({
    overlayClose: true,
    opacity: 0.5,
    rel: "colorbox"
  });
});
//--></script> 
<script type="text/javascript"><!--
$('#button-cart').bind('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/cart/add',
		type: 'post',
		data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		dataType: 'json',
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
			
			if (json['error']) {
				if (json['error']['option']) {
					for (i in json['error']['option']) {
						$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
					}
				}
			} 
			
			if (json['success']) {
				$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/gazal/image/close.png" alt="" class="close" /></div>');
					
				$('.success').fadeIn('slow');
					
				$('#cart-total').html(json['total']);
				
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
			}	
		}
	});
});
//--></script>
<?php if ($options) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'file') { ?>
<script type="text/javascript"><!--
new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', {
	action: 'index.php?route=product/product/upload',
	name: 'file',
	autoSubmit: true,
	responseType: 'json',
	onSubmit: function(file, extension) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/gazal/image/loading.gif" class="loading" style="padding-left: 5px;" />');
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true);
	},
	onComplete: function(file, json) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false);
		
		$('.error').remove();
		
		if (json['success']) {
			alert(json['success']);
			
			$('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']);
		}
		
		if (json['error']) {
			$('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>');
		}
		
		$('.loading').remove();	
	}
});
//--></script>
<?php } ?>
<?php } ?>
<?php } ?>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').fadeOut('slow');
		
	$('#review').load(this.href);
	
	$('#review').fadeIn('slow');
	
	return false;
});			

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
	$.ajax({
		url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
		type: 'post',
		dataType: 'json',
		data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#button-review').attr('disabled', true);
			$('#review-title').after('<div class="attention"><img src="catalog/view/theme/gazal/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#button-review').attr('disabled', false);
			$('.attention').remove();
		},
		success: function(data) {
			if (data['error']) {
				$('#review-title').after('<div class="warning">' + data['error'] + '</div>');
			}
			
			if (data['success']) {
				$('#review-title').after('<div class="success">' + data['success'] + '</div>');
								
				$('input[name=\'name\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').attr('checked', '');
				$('input[name=\'captcha\']').val('');
			}
		}
	});
});
//--></script> 
<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script> 
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> 
<script type="text/javascript"><!--
if ($.browser.msie && $.browser.version == 6) {
	$('.date, .datetime, .time').bgIframe();
}

$('.date').datepicker({dateFormat: 'yy-mm-dd'});
$('.datetime').datetimepicker({
	dateFormat: 'yy-mm-dd',
	timeFormat: 'h:m'
});
$('.time').timepicker({timeFormat: 'h:m'});
//--></script> 

<?php echo $footer; ?>