<!DOCTYPE html>
<html ng-app="myapp">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{$language.lblLoginSignUp}</title>
    {*<!--{include file='CommonStyles.tpl'}-->*}
    <meta name="viewport" content="width=device-width">
      <link href="{$view_styles}/login.css" rel="stylesheet" type="text/css" media="screen" />
    <script type="text/javascript">
      var cart = new Array();
      cart["items"]=new Array();
      cart["purchasedDetails"]=new Array();
      var showCartNotification = "{$showCartNotification|default:''}";
      var __ANALYTICS_MODULE	= {$__ANALYTICS_MODULE};
      var targetPath			= "";
      var targetPathType	= "";
      var statPageName	= "";
      var otpEnableRegistration =  "{$otpEnableRegistration}";  
      var otpEnableCheckout =  "{$otpEnableCheckout}"; 
    </script>
    {include file='CommonJavaScript.tpl'  }
    {include file='cart/CartNotification.tpl'} 
    {include file='cart/CartPopUp.tpl'} 
    <script type="text/javascript">
      $(document).ready(function() {
{*      	var sPageURL = document.URL.split('?section=');*}
        
          $.urlParam = function(name){
	var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(document.URL);
	if(results){
	return results[1] || 0;
	}else{
	return  0;
	}
}
      	 	var section = 'login';
        var AjaxCurrLanguage = '{$AjaxCurrLanguage}';
        
      	if($.urlParam('verify')  !== undefined && $.urlParam('verify')=='yes' ) {
          
        if(otpEnableRegistration =='Yes' || otpEnableCheckout =='Yes'){ 
                 
                $(".signup-div").hide(); 
		$('#verify-block').attr('style','display:block');
		
      	}
    }
    	if($.urlParam('phone')  !== undefined && $.urlParam('phone')!='' ) {
			$("#userPhoneVerify").val($.urlParam('phone'));	
			 var last4Num = $.urlParam('phone').substring(6);
			 $(".moibleHint").html('XXXXXX'+last4Num);
			 $('#verify-code-div').attr('style','display:block');   
			 $('#sendCodeBlock').addClass('hide');   
			 $('#resendCodeBlock').removeClass('hide');   
			 $('#submitCodeDisable').hide();
      	}	
      	if($.urlParam('country')  !== undefined && $.urlParam('country')!='' ) {
			$("#countryCodeVerify").val($.urlParam('country'));	      		
      	}			
       	if($.urlParam('section').length > 1) {
      		section = $.urlParam('section');
      	}
      	activePopupSection(section);
      	      	
      	$(document).on("click",".log-close",function(){
      		delete NO_VALIDATION_SCROLL;
      		 {literal}
                window.parent.postMessage(JSON.stringify({functionality: 'Close Popup'}), document.referrer);   
                 {/literal}   
      	});
      	$(document).on("click",".logintab",function(){
      		var thisVar = $(this);
      		$(".logintab").addClass("active");
      		$(".signuptab").removeClass("active");
      		$(".SignupPanel").hide();
      		$(".loginPanel").show();
      	});
      	$(document).on("click",".signuptab",function(){
      		$(".signuptab").addClass("active");
      		$(".logintab").removeClass("active");
      		$(".loginPanel").hide();
      		$(".SignupPanel").show();
			$("#forgot-password-block").hide();
			$(".login-div").show();		
      	});
      		$(document).on("click","#forgot-password-link",function(){
      		$(".forgot-password-block").show();
          $(".loginPanel").hide(); 
      		
      	});
      $(document).on("click",".bk-login",function(){
      		$(".forgot-password-block").hide();
      		$(".loginPanel").show();	
      	});

        if(AjaxCurrLanguage=='ar') {
          $("body").addClass("rtl");
        }
        
      });

    </script>
    <div id="fb-root" class="fb-root01"></div>
  </head>
  <body class="{$languageDirection}">  
    <div class="clearfix popupMainDiv position-relative rounded-0">
      <div class="contentPanal bg-white rounded position-fixed">
        <span class="log-close icon-cross-medium position-absolute"></span>
        <div  class="loginSignupPanel">
          {include file='account/AjaxLoginDetails.tpl'}
        </div>
      </div>
    </div>
    {html->script_group_start name="{$compiled_js_path}/account.ajaxpopuplogin.js"}
    {html->script src="{$common_js}/validate.plugin.js"}
    {html->script_group_end}
    {html->messages_script id="common_login_message"}
  </body>
</html>