<!--[if lt IE 9]>
    <script src="{$common_js}/jquery-1.9.1.min.js"></script>
<![endif]-->
{form->globalpath_script}

<script type="text/javascript">
var datePickerDateFormat="{$datePickerDateFormat}";
var _currencies={$_currencies};
var currentCurrencyID = "{$currentCurrencyID}";
var _section = "{$_section}"; 
var _defaultCurrency="{$_defaultCurrency}";
var direction ="{$languageDirection}";
var languageLCIDStr = '{$AjaxCurrLanguage}';
{*String.prototype.trim = function() {  return this.replace(/^\s+|\s+$/g, '');  }*}
var enableAlgolia = 'No';
function convertDate(date,inputFormat)
{

	var dateElement = new Array();
	var subElement = new Array();
	var m,y,d,h=00,i=00,s=00;
	if(date=="")
	  return "";
	else
	{
	   if(inputFormat.indexOf('mm/dd/yy')!=-1)
	   	var newdate= new Date(date);	
	   else
	   {
	   	 if(inputFormat.indexOf('yy-mm-dd')!=-1)
		 {
			dateElement = date.split('-');
			y=dateElement[0];
			m=dateElement[1];
			d=dateElement[2].substr(0,2);
			if(dateElement[2].indexOf(':')!=-1)
			{
			  dateElement[2]= dateElement[2].substring(3);
			  subElement = dateElement[2].split(':');
			  if(subElement[0]) h=subElement[0].trim();
			  if(subElement[1]) i=subElement[1].trim();
			}
		 }
		 else if(inputFormat.indexOf('dd-mm-yy')!=-1)
		 {
		 	dateElement = date.split('-');
			d=dateElement[0];
			m=dateElement[1];
			y=dateElement[2].substr(0,4);
			if(dateElement[2].indexOf(':')!=-1)
			{
			  dateElement[2]= dateElement[2].substring(5);
			  subElement = dateElement[2].split(':');
			  if(subElement[0]) h=subElement[0].trim();
			  if(subElement[1]) i=subElement[1].trim();
			}
		 }	 
		var newdate= new Date(y,m,d,h,i);	
	   }
	   return newdate;
    }  
}

</script>
 <script type="text/javascript">
    var record_text = '{$language.lblRecordfound}';
	var lblSelectatleastOneItem = '{$language.lblSelectatleastOneItem}';
        var select_item = '{$language.lblSelectatleast}';
	var select_status = '{$language.lblSelectastatus}';
	var siteUrl   			=  '{$view_host}' ;  
        var lblAlert='{$language.lblAlert}'; 
	var lblAlertOk='{$language.lblAlertOk}';
	var lblAlertCancel='{$language.lblAlertCancel}';
	var lblAlertYes='{$language.lblAlertYes}';
	var lblAlertNo='{$language.lblAlertNo}';
        var lblConfirm='{$language.lblConfirm}';
	var __redirect_URL = '';
	var popup_iframe_url =  '{$popup_iframe_url}' ; 
</script>	
{*if $enableFBlogin == 'Yes' || $paymentthankyou== 'Yes'*}
<script type="text/javascript">
	var fbApplicationID 	= '{$fbApplicationID}';		
	var lblUpdatePermission	="{$language.lblUpdatePermission}";
	var lblfacebookUpdate	="{$language.lblfacebookUpdate}";
	var lblPostNotPublished	="{$language.lblPostNotPublished}";
	var lblPostPublished	="{$language.lblPostPublished}";
	var default_catalog_listing='{$default_catalog_listing|default:''}';
	var global_http_url='{$global_http_url}';
	var lblInbrands='{$language.lblInbrands}';
</script>
{*/if*}
{html->script_group_start name="{$compiled_js_path}/commonjavascript.js"}
	{* outdated modified *}
{*{html->script src="{$common_js}/jquery-3.3.1.min.js"}
{html->script src="{$common_js}/jquery-migrate-3.0.0.min.js"}*}
	{html->script src="{$common_js}/jquery-3.7.1.min.js"}
{html->script src="{$common_js}/jquery-migrate-3.4.0.min.js"}
        {html->script src="{$common_frontend_js}/jquery-ui.min.js"}	
	{html->script src="{$common_frontend_js}/common.head.application.js"}
	{html->script src="{$common_frontend_js}/jquery.mCustomScrollbar.concat.min.js"}
	{html->script src="{$common_frontend_js}/popper.min.js"}
	{html->script src="{$common_frontend_js}/bootstrap.min.js"}
	{html->script src="{$common_frontend_js}/slick.js"}
	{html->script src="{$common_js}/validate.plugin.js"}
        
{html->script_group_end} 
<script type="text/javascript"  src="{$common_frontend_js_path}/common.head.plugin.js?c"></script>

<!--
<script>
$("body").addClass(direction);  
$(window).load(function(){
    $("body").addClass(direction);  
});  
</script> 
-->

<script>
	$(function () {
  		$('[data-toggle="tooltip"]').tooltip()
	});
	$(document).ready(function() {
	    {literal}
	    $(document).on("click","#cartRedirectCheckout",function(){
	        delete NO_VALIDATION_SCROLL;
	       window.parent.postMessage(JSON.stringify({functionality: 'cartRedirectCheckout'}),'*' ); 	
	    });
	     $(document).on("click",".popuplogin",function(){
	        delete NO_VALIDATION_SCROLL;
	       window.parent.postMessage(JSON.stringify({functionality: 'popuplogin'}),'*' ); 	
	    });
	    {/literal}

	    // Dropdown on Hover
	    if (window.matchMedia('(min-width: 992px)').matches) {
		    $(".dropdown").hover(function(){
		        $(this).addClass('open');
		        }, function(){
		        $(this).removeClass('open');
		    });
		}
         

	});

</script>
<script type="text/javascript">
{literal}
    jQuery.browser = {};
    (function () {
        jQuery.browser.msie = false;
        jQuery.browser.version = 0;
        if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
            jQuery.browser.msie = true;
            jQuery.browser.version = RegExp.$1;
        }
    })();
 {/literal}
</script>

<noscript>
<div class="noscript-alert">
  <div class="alert-wrapper"><strong>{$language.msgJavascriptDisabled} </strong>{$language.msgJavascriptEnable}</div>
</div>
</noscript>
<!-- Google Tag Manager -->
{literal}
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':

new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);

})(window,document,'script','dataLayer','GTM-WRHDPW8');</script>
{/literal}
<!-- End Google Tag Manager -->
 <!-- Facebook Pixel Code -->
 {literal}
<script>
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', '666987373839940');
  fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
  src="https://www.facebook.com/tr?id=666987373839940&ev=PageView&noscript=1"
/></noscript>
{/literal}
<!-- End Facebook Pixel Code -->

