<?php /* Smarty version Smarty-3.1.8, created on 2020-01-01 15:21:22
         compiled from "/home/agmc/public_html/beta/application/core/views/frontend/custom/CommonJavaScript.tpl" */ ?>
<?php /*%%SmartyHeaderCode:10660285205e0c80b23cc8a6-99191213%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '65d79b8012c334829a817777ae31d2898f1b7f73' => 
    array (
      0 => '/home/agmc/public_html/beta/application/core/views/frontend/custom/CommonJavaScript.tpl',
      1 => 1577772525,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '10660285205e0c80b23cc8a6-99191213',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'common_js' => 0,
    'datePickerDateFormat' => 0,
    '_currencies' => 0,
    'currentCurrencyID' => 0,
    '_section' => 0,
    '_defaultCurrency' => 0,
    'languageDirection' => 0,
    'AjaxCurrLanguage' => 0,
    'language' => 0,
    'view_host' => 0,
    'popup_iframe_url' => 0,
    'fbApplicationID' => 0,
    'default_catalog_listing' => 0,
    'global_http_url' => 0,
    'compiled_js_path' => 0,
    'common_frontend_js' => 0,
    'common_frontend_js_path' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5e0c80b23f6807_35377080',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5e0c80b23f6807_35377080')) {function content_5e0c80b23f6807_35377080($_smarty_tpl) {?><!--[if lt IE 9]>
    <script src="<?php echo $_smarty_tpl->tpl_vars['common_js']->value;?>
/jquery-1.9.1.min.js"></script>
<![endif]-->
<?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->globalpath_script(array(),$_smarty_tpl);?>


<script type="text/javascript">
var datePickerDateFormat="<?php echo $_smarty_tpl->tpl_vars['datePickerDateFormat']->value;?>
";
var _currencies=<?php echo $_smarty_tpl->tpl_vars['_currencies']->value;?>
;
var currentCurrencyID = "<?php echo $_smarty_tpl->tpl_vars['currentCurrencyID']->value;?>
";
var _section = "<?php echo $_smarty_tpl->tpl_vars['_section']->value;?>
"; 
var _defaultCurrency="<?php echo $_smarty_tpl->tpl_vars['_defaultCurrency']->value;?>
";
var direction ="<?php echo $_smarty_tpl->tpl_vars['languageDirection']->value;?>
";
var languageLCIDStr = '<?php echo $_smarty_tpl->tpl_vars['AjaxCurrLanguage']->value;?>
';

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 = '<?php echo $_smarty_tpl->tpl_vars['language']->value['lblRecordfound'];?>
';
	var lblSelectatleastOneItem = '<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectatleastOneItem'];?>
';
        var select_item = '<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectatleast'];?>
';
	var select_status = '<?php echo $_smarty_tpl->tpl_vars['language']->value['lblSelectastatus'];?>
';
	var siteUrl   			=  '<?php echo $_smarty_tpl->tpl_vars['view_host']->value;?>
' ;  
        var lblAlert='<?php echo $_smarty_tpl->tpl_vars['language']->value['lblAlert'];?>
'; 
	var lblAlertOk='<?php echo $_smarty_tpl->tpl_vars['language']->value['lblAlertOk'];?>
';
	var lblAlertCancel='<?php echo $_smarty_tpl->tpl_vars['language']->value['lblAlertCancel'];?>
';
	var lblAlertYes='<?php echo $_smarty_tpl->tpl_vars['language']->value['lblAlertYes'];?>
';
	var lblAlertNo='<?php echo $_smarty_tpl->tpl_vars['language']->value['lblAlertNo'];?>
';
        var lblConfirm='<?php echo $_smarty_tpl->tpl_vars['language']->value['lblConfirm'];?>
';
	var __redirect_URL = '';
	var popup_iframe_url =  '<?php echo $_smarty_tpl->tpl_vars['popup_iframe_url']->value;?>
' ; 
</script>	

<script type="text/javascript">
	var fbApplicationID 	= '<?php echo $_smarty_tpl->tpl_vars['fbApplicationID']->value;?>
';		
	var lblUpdatePermission	="<?php echo $_smarty_tpl->tpl_vars['language']->value['lblUpdatePermission'];?>
";
	var lblfacebookUpdate	="<?php echo $_smarty_tpl->tpl_vars['language']->value['lblfacebookUpdate'];?>
";
	var lblPostNotPublished	="<?php echo $_smarty_tpl->tpl_vars['language']->value['lblPostNotPublished'];?>
";
	var lblPostPublished	="<?php echo $_smarty_tpl->tpl_vars['language']->value['lblPostPublished'];?>
";
	var default_catalog_listing='<?php echo (($tmp = @$_smarty_tpl->tpl_vars['default_catalog_listing']->value)===null||$tmp==='' ? '' : $tmp);?>
';
	var global_http_url='<?php echo $_smarty_tpl->tpl_vars['global_http_url']->value;?>
';
	var lblInbrands='<?php echo $_smarty_tpl->tpl_vars['language']->value['lblInbrands'];?>
';
</script>

<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script_group_start(array('name'=>($_smarty_tpl->tpl_vars['compiled_js_path']->value)."/commonjavascript.js"),$_smarty_tpl);?>

	<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_js']->value)."/jquery-3.3.1.min.js"),$_smarty_tpl);?>

        <?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_js']->value)."/jquery-migrate-3.0.0.min.js"),$_smarty_tpl);?>

        <?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_frontend_js']->value)."/jquery-ui.min.js"),$_smarty_tpl);?>
	
	<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_frontend_js']->value)."/common.head.application.js"),$_smarty_tpl);?>

	<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_frontend_js']->value)."/jquery.mCustomScrollbar.concat.min.js"),$_smarty_tpl);?>

	<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_frontend_js']->value)."/popper.min.js"),$_smarty_tpl);?>

	<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_frontend_js']->value)."/bootstrap.min.js"),$_smarty_tpl);?>

	<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_frontend_js']->value)."/slick.js"),$_smarty_tpl);?>

	<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script(array('src'=>($_smarty_tpl->tpl_vars['common_js']->value)."/validate.plugin.js"),$_smarty_tpl);?>

        
<?php echo $_smarty_tpl->smarty->registered_objects['html'][0]->script_group_end(array(),$_smarty_tpl);?>
 
<script type="text/javascript"  src="<?php echo $_smarty_tpl->tpl_vars['common_frontend_js_path']->value;?>
/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() {
	    
	    $(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'}),'*' ); 	
	    });
	    

	    // 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">

    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;
        }
    })();
 
</script>

<noscript>
<div class="noscript-alert">
  <div class="alert-wrapper"><strong><?php echo $_smarty_tpl->tpl_vars['language']->value['msgJavascriptDisabled'];?>
 </strong><?php echo $_smarty_tpl->tpl_vars['language']->value['msgJavascriptEnable'];?>
</div>
</div>
</noscript>
<!-- Google Tag Manager -->

<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>

<!-- End Google Tag Manager -->


<?php }} ?>