 <!-- partial:../../partials/_footer.html -->
        <footer class="footer">
          <div class="container-fluid clearfix">
            <span class="text-muted d-block text-center text-sm-left d-sm-inline-block">Copyright &copy; 2018 <a href="http://www.mybooster.biz/" target="_blank">MyBooster</a>. All rights reserved.</span>
            <span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center"></span>
          </div>
        </footer>
        <!-- partial -->
      </div>
      <!-- main-panel ends -->
    </div>
    <!-- page-body-wrapper ends -->
  </div>

 
 
  <link href="css/intlTelInput.css" rel="stylesheet" type="text/css">
  <!-- container-scroller -->
  <!-- plugins:js -->
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

  <script type="text/javascript" src="js/vendor.bundle.addons.js"></script>
  <script type="text/javascript" src="js/vendor.bundle.base.js"></script>
  <script type="text/javascript" src="js/vendor.bundle.addons.js"></script>
  <script type="text/javascript" src="js/form-validation.js"></script>
  <!-- endinject -->
  <!-- Plugin js for this page-->
  <!-- End plugin js for this page-->
  <!-- inject:js -->
  <script type="text/javascript" src="js/template.js"></script>
  <!-- endinject -->
  <!-- Custom js for this page-->
  <script type="text/javascript" src="js/wizard.js"></script>
  <script type="text/javascript" src="js/form-validation.js"></script>
  <script type="text/javascript" src="js/bt-maxLength.js"></script>
  <script type="text/javascript" src="js/dropify.js"></script>
  <script type="text/javascript" src="js/dropzone.js"></script>
  <script type="text/javascript" src="js/intlTelInput.js"></script>

  
  <script type="text/javascript">
	  
	$(document).ready(function() {
		 $("#mobileNumber").intlTelInput({
			 preferredCountries: [ "in" ],
			 placeholderNumberType: "MOBILE",
			 separateDialCode: true,
		});

			
	 $("#loader").hide();
	 $("#loader_Registration").hide();


	 var sharedUrl      = getUrlVars(); 
         //console.log(sharedUrl);
        if(sharedUrl['leg'] && sharedUrl['refer_id'] && (sharedUrl['leg']!=='') &&  (sharedUrl['refer_id']!=='')){
          $("#sponsorID").val(sharedUrl['refer_id']).trigger("input").prop('readonly',true);
          $("#cmbPlacement").val(sharedUrl['leg']).prop('disabled',true);
          var closestRow = $("#placementID").closest("div.form-group");
          closestRow.hide();
          $("#placementID").prop('readonly',true);
        }

     function getUrlVars()
	{
		var vars = [], hash;
		var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
		for(var i = 0; i < hashes.length; i++)
		{
			hash = hashes[i].split('=');
			vars.push(hash[0]);
			vars[hash[0]] = hash[1];
		}
		return vars;
	}






  $("#btnLogin").click(function(){

		 // validate signup form on keyup and submit
     $("#frmLogin").validate({
		  rules: {
			memberID:{
			  required: true,
			  digits: true,
			  minlength: 9
			},
			password:{
			  required: true,
			  minlength: 6
			}
		  },
		  messages: {
			memberID:{
			required: 'Please enter a 9 digit valid Member ID.',
			digits:   'Please enter a 9 digit valid Member ID.',
			minlength: 'Please enter a 9 digit valid Member ID.'
			},
			password:{
			  required: "Please provide a password",
			  minlength: "Your password must be at least 6 characters long"
			}
		  },
		  errorPlacement: function(label, element) {
			label.addClass('mt-2 text-danger');
			label.insertAfter(element);
		  },
		  highlight: function(element, errorClass) {
			$(element).parent().addClass('has-danger')
			$(element).addClass('form-control-danger')
		  }

		
	  });

	  if($("#frmLogin").valid())
		$("#frmLogin").submit();

  });


	  $("#frmLogin").on('submit',(function(e){
			e.preventDefault();
			$("#loader").show();
			$("#btnLogin").hide();

		 $.ajax({
			type        : 'POST', 
			url         : 'verifyLogin.php', 
			data        : new FormData(this),
			dataType    : 'json', 
			encode      :  true,
			cache		: false,
			contentType : false,
			processData : false,
			})

			.done(function(data){
			  $("#loader").hide();
			  $("#btnLogin").show();

			  if (data.success){
				//alert(data.message);
			    location.href = 'panel/dashboard.php';
			  }

			  else{
				alert(data.message);
			  } 

			}) 
			
			.fail(function(data){
				$("#loader").hide();
			    $("#btnLogin").show();
				alert("Some error has occured. Please try again later!"); 
			});


		}));

	});

	
	$("input[name='membershipRadios']"). click(function(){

		if($("input[name='membershipRadios']:checked"). val() ==1)
		{
			$("#lblKYC").text("Your PAN / AADHAR Card: *");
			$("#txtKYC").attr("placeholder", "PAN / AADHAR Card");
		}

		else
		{
			$("#lblKYC").text("Company PAN / Docs: *");
			$("#txtKYC").attr("placeholder", "Company PAN / Docs");
		}

	});

	</script>

  <!-- End custom js for this page-->
</body>

</html>
