{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2015 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{if !isset($content_only) || !$content_only}
    </div><!-- #center_column -->
    {if isset($right_column_size) && !empty($right_column_size)}
        <div id="right_column" class="col-xs-12 col-sm-{$right_column_size|intval} column">{$HOOK_RIGHT_COLUMN}</div>
    {/if}
    </div><!-- .row -->
    </div><!-- #columns -->
    </div><!-- .columns-container -->
    <div class="home_block section13 left_text_block">
        <div class="section_bg">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <div class="section_left col-md-6">
                            <h3 class="block_header">DES QUESTIONS? CONTACTEZ-NOUS!</h3>
                            <p class="block_text">Si vous avez des questions sur l'un de nos services, n'hésitez pas à nous contacter. Vous pouvez nous joindre par téléphone du lundi au vendredi, de 9 h à 20 h HNE, ou envoyez-nous un message à tout moment.</p>
                            <p class="block_text_orange">Appel sans frais:</p>
                            <p class="block_text">(855) 552-7233</p>

                            <p class="block_text_orange">Texte 24/7:</p>
                            <p class="block_text">(413) 454-5570</p>

                            <p class="block_text_orange">Notre adresse postale: </p>
                            <p class="block_text">SAFETY RESTORE, 40 Main St., Westfield, MA 01085</p>

                            <div class="button_orange">
                                <a href="mailto:service@safetyrestore.com" class="button_text">
                                    {l s='Envoie-nous un message'} <i class="fa fa-caret-right" aria-hidden="true"></i>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    {if isset($HOOK_FOOTER)}
        <!-- Footer -->
        <div class="footer-container">
            <footer id="footer" class="container">
                <div class="row">{str_replace(['Store Information', 'Text us', 'Email'], ['Informations du magasin', 'Testez-nous', 'Email'], $HOOK_FOOTER)}</div>
            </footer>
        </div>
        <!-- #footer -->
    {/if}
    </div><!-- #page -->
{/if}
{include file="$tpl_dir./global.tpl"}

{if $smarty.server.HTTP_USER_AGENT|strstr:"Google"}


{else}
{/if}

<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/8.6.0/lazyload.min.js"></script>
<script>
var myLazyLoad = new LazyLoad();
</script>


<script>
// Supported SRS Airbag Reset Modules List
$(document).ready(function() {
    $('.model-dropdown .selected').text($('.model-tabs li.active').text());
})

$(document).on('click', '.model-dropdown-item', function(e) {
    e.preventDefault();
    var model = $(this).text(),
        cls   = $(this).attr('href').replace('#', '');

    $('.model-tabs li.' + cls + ' a').trigger('click');
    $('.model-dropdown .selected').text(model);
});

$(document).on('click', '.model-tabs-item', function() {
    var model = $(this).text();

    $('.model-dropdown .selected').text(model);
});


var _rejoiner = _rejoiner || [];
_rejoiner.push(['setAccount', '5a8ea1755b3a42744c3c91bb']);
_rejoiner.push(['setDomain', '.safetyrestore.com']);
(function() {
    var s = document.createElement('script'); s.type = 'text/javascript';
    s.async = true;
    s.src = 'https://cdn.rejoiner.com/js/v4/rejoiner.lib.js';
    var x = document.getElementsByTagName('script')[0];
    x.parentNode.insertBefore(s, x);
})();


if($("div[itemtype='http://schema.org/Product']").length && $("#add_to_cart").length && $("#buy_block").length){
  _rejoiner.push(['trackProductView', {
      'product_id': $("#product_page_product_id").val(),
      'name': $("meta[property='og:title']").attr('content'),
      'category': [$(".navigation_page span[itemprop='title']").text()], // array of categories the product belongs to
      'price': parseInt(parseFloat($("#our_price_display").text().replace("$", ""))*100) , // the unit price *in cents*
      'product_url': window.location.href, // link to product
      'image_url': $("#bigpic").attr('src')
  }]);
}

if(window.location.href.indexOf('quick-order') > -1){
  var totalCnt = 0;
  $(".cart_quantity_input").each(function(){
    totalCnt = totalCnt + parseInt($(this).val());
  });
  _rejoiner.push(['setCartData', {
    'cart_value': parseInt(parseFloat($("#total_price").text().replace("$", ""))*100), // total value *in cents* - integer
    'cart_item_count': totalCnt,
    'return_url': 'https://www.safetyrestore.com/' //link to regenerate cart
  }]);


  $(".cart_item").each(function(){
    var id = $(this).attr('id');
    var productId = id.split("_")[1];
    var productName = $(this).find('.product-name').text();
    var price = parseInt(parseFloat($(this).find('.price').text().replace("$", "")) * 100);
    var quantity = parseInt($(this).find('.cart_quantity_input').val());
    price = price/quantity;
    var url = $(this).find('.product-name a').attr('href');
    var img = $(this).find('img.initial').attr('src');
    img = img.replace('small', 'large');

    if(productName.indexOf("Belt") != -1){
        var category = "Seat Belt Repair Service";
    } else {
        var category = "Airbar Module Reset Service";
    }

    _rejoiner.push(['setCartItem', {
      'product_id': productId,
      'name': productName,
      'category': [category], // array of categories the product belongs to
      'price': price, // the unit price *in cents*
      'item_qty': quantity, // quantity of items
      'qty_price': price*quantity, // total price *in cents* = item_qty X price
      'product_url': url, // link to product
      'image_url': img, // link to product image
      'description': ''
    }]);

  });

}

if($(".page-heading").text() == 'Order confirmation'){
  var orderNumber = window.location.href.split("id_order=")[1];
  orderNumber = orderNumber.split("&")[0];


  var pushObject = {
    cart_data: {
        'cart_value': parseInt(parseFloat(total_paid_tax_incl) * 100), // total value *in cents* - integer
        'cart_item_count': bought_products.length,
        'customer_order_number': orderNumber, // external ID of this order
        'return_url': window.location.href //link to your order
    },
    cart_items: []
  };

  $(bought_products).each(function(i, element){
    var obj = {};
    obj.product_id = element.id_product;
    obj.name = element.name;
    if(obj.name.indexOf("Belt") != -1){
        var category = "Seat Belt Repair Service";
    } else {
        var category = "Airbar Module Reset Service";
    }
    obj.category = [category];
    obj.price = element.price * 100;
    obj.item_qty = parseInt(element.quantity);
    obj.qty_price = obj.price*obj.item_qty;
    pushObject.cart_items.push(obj);
  });

  _rejoiner.push(['sendConversion', pushObject]);

  // 'product_url': 'https://yourdomain.com/tv/exclusive/SKU-1002', // link to product
  //'image_url': 'https://yourdomain.com/assets/SKU-1002.jpg', // link to product image
}

</script>

  

<!-- Google Code for Remarketing Tag -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 987809132;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/987809132/?guid=ON&amp;script=0"/>
</div>
</noscript>
</body>
</html>
