<?php if (!$page): ?>
<!-- product teaser -->
<div id="<?php print $node->nid; ?>" class="products node node-product-teaser col-md-3"> <?php print render($title_prefix); ?> <?php print render($title_suffix); ?>
  <figure class="product">
    <?php if (!empty($content['field_product_status'])): ?>
    <?php
        /* $field_product_status = field_get_items('node', $node, 'field_product_status');
          $product_status = !empty($field_product_status[0]['taxonomy_term']->name) ? $field_product_status[0]['taxonomy_term']->name : ''; */
        hide($content['field_product_status']);
        ?>
    <div class="product-discount"><?php print render($content['field_product_status']); ?></div>
    <?php endif; ?>
    <div class="mediaholder">
    <!--Disable product slides on front page -->
     <?php if (!empty($content['product:field_image'])): ?>
      <?php
          hide($content['product:field_image']);
          if (!empty($content['product:field_image'][0])) {
            print render($content['product:field_image'][0]);
          }
          ?>
      <a href="<?php print $node_url; ?>">
      <div class="cover">
        <?php
              $img1 = !empty($content['product:field_image'][1]) ? $content['product:field_image'][1] : $content['product:field_image'][0];
              print render($img1);
              ?>
             
      </div>
      </a>
      <?php endif; ?>
      <!--//Disable product slides on front page -->
      <?php if (!empty($content['field_product_display'])): ?>
      <?php hide($content['field_product_display']); ?>
      <div class="product-button">
        <?php if (!empty($content['field_product_display']['#items']) && (count($content['field_product_display']['#items']) > 1)): ?>
        <div class="commerce-add-to-cart"> <a class="btn" href="<?php print $node_url; ?>" title="<?php print t('Select options'); ?>"><?php print t('Select options'); ?></a> </div>
        <?php else: ?>
        <?php print render($content['field_product_display']); ?>
        <?php endif; ?>
      </div>
      <?php endif; ?>
    </div>
    <section>
      <?php if ($title): ?>
      <a href="<?php print $node_url; ?>">
      <h5><?php print $title; ?></h5>
      </a>
      <?php endif; ?>
      <?php
          //dsm($node);
          hide($content['comments']);
          hide($content['links']);
          print render($content);
          ?>
     <!--Link to node-->
      <div class="jewelry-more-details">
      <a href="<?php print $node_url; ?>">
      More Details
      </a>
      </div> 
      <!--//Link to node--> 
    </section>
  </figure>
</div>
<!-- // product teaser -->
<?php else: ?>
<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> node-product clearfix"<?php print $attributes; ?>> <?php print $user_picture; ?> <?php print render($title_prefix); ?> <?php print render($title_suffix); ?>
  <?php if ($display_submitted): ?>
  <div class="submitted"> <?php print $submitted; ?> </div>
  <?php endif; ?>
  <div class="content"<?php print $content_attributes; ?>>
    <?php if (!empty($content['product:field_image'])): ?>
    <div class="row">
      <div class="col-md-6">
	  <?php print render($content['product:field_image']); ?> 
      <!--video-->
      <?php if(!empty($content['field_product_video'])): ?>
      <div class="video-container">
      <br />
      <?php print render($content['field_product_video']); ?>
      </div>
      <?php endif; ?>
      <!--//video-->
      </div>
      <?php endif; ?>
      <?php if (!empty($content['product:field_image'])): ?>
      <div class="col-md-6">
        <?php endif; ?>
        <div class="product-title">
          <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
         <?php /*?> <?php if (!empty($content['product:commerce_price'])): ?>
          <?php print render($content['product:commerce_price']); ?>
          <?php endif; ?><?php */?>
         
        </div>
        <?php
          // We hide the comments and links now so that we can render them later.

          hide($content['comments']);
          hide($content['links']);
         
          if (!empty($content['field_product_display']['attributes'])) {
            
          }
          print render($content);
          ?>
        <?php if (!empty($content['product:field_image'])): ?>
        <?php /*?>  <?php if ($page && $node->type != 'product' && $node->type != 'product_display'): ?><?php */?>
        <?php print render($content['links']); ?>
        <?php /*?> <?php endif; ?><?php */?>
      </div>
    </div>
    <?php endif; ?>
  </div>
  <?php if ($page): ?>
  <div id="product-tabs-wrapper" class="row">
    <div class="col-md-12">
      <ul class="product-tab nav nav-tabs" role="tablist" id="trizzyTab">
        <li class="active"><a data-toggle="tab" role="tab" href="#product-description"><?php print t('Recently Viewed'); ?></a></li>
        <li><a data-toggle="tab" role="tab" href="#item-details"><?php print t('You May Also Like'); ?></a></li>
      </ul>
      <div class="tab-content">
        <div class="tab-pane active" id="product-description">
          <?php
    print views_embed_view('recently_read', 'block');
    ?>
        </div>
        <div class="tab-pane" id="item-details">
          <?php
    print views_embed_view('you_may_also_like', 'block');
    ?>
        </div>
      </div>
    </div>
  </div>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
