$("#enquiry").on("hide.bs.modal",function(e){$("#callback_Form").show(),$(".otp_Form,.thnks_Form").hide(),$('input[type="tel"],input[type="text"]',this).val("")});var loc_main=window.location.origin;r=document.getElementById("time"),time=20,tmp=time,rs=document.getElementById("resend");var DGt=setInterval(t_S,1e3);function t_S(){var e=tmp--,t=e/60>>0,e=e-60*t+"";r.innerHTML='You will receive OTP within '+t+":"+(1",0<=tmp||(r.style.display="none",rs.style.display="",clearInterval(DGt),tmp=time)}function st_S(){clearInterval(DGt)}function rt_S(){r.style.display="",r.innerHTML='OTP Sent Successfully',rs.style.display="none",DGt=setInterval(t_S,1e3)}var err_icon="",lod_img='Please Wait...';function sendVerificationCode(e){var t=loc_main+"/thanksQry.php?sid="+Math.random();$("#time").show().html('Sending new OTP');var r=$("#inq_no").val(),n=$("#page_origin").val();return st_S(),$.ajax({type:"POST",url:t,dataType:"html",cache:!1,data:{action_id:"resend_mob_verification_code",inq_no:r,page_origin:n},success:function(e){e=(e=e.replace(/\s/g,"")).split("||");"Y"==e[0].trim()?rt_S():"M"==e[0].trim()&&$("#resend").show().html(err_icon+' You have reached the daily limit.')},xhrFields:{withCredentials:!0},error:function(e,t){404==e.status?alert("Page Not Found."):401==e.status&&alert("Authorization Required.")}}),!1}$(function(){jQuery.validator.addMethod("validatenumber",function(e,t){var r=$("#country_code").val(),n=$("#phone_popup").val();return!isNaN(n)&&(!("91"==r&&parseInt(n.charAt(0))<5)&&("91"==r&&10==n.length||("91"!=r&&""!=r&&8<=parseInt(n.length)&&parseInt(n.length)<=20||void 0)))},function(e,t){var r=$("#country_code").val(),n=$("#phone_popup").val();return isNaN(n)?err_icon+" Enter Your mobile number":"91"==r&&parseInt(n.charAt(0))<5?err_icon+" Invalid mobile number":"91"==r&&(10Sending OTP'),st_S(),$.ajax({type:"POST",url:t,dataType:"html",cache:!1,data:$("#request_a_callback_form").serialize(),success:function(e){$("#loading_process").html('OTP Sent Successfully').delay(1e3).fadeOut();e=e.split("||");"Y"==e[0].trim()?($("#callback_Form").hide(),$(".otp_Form").show(),$("#smsMobile").html(e[1].trim()),$("#inq_no").val(e[2].trim()),rt_S(),gtag("event","conversion",{send_to:"AW-987574786/meqpCMbr7AgQguT01gM"})):($("#errMsg").show(),$("#errMsg").html(e[1].trim())),callback_filled()},xhrFields:{withCredentials:!0},error:function(e,t){404==e.status?alert("Page Not Found."):401==e.status&&alert("Authorization Required.")}})}}),$("#send_verification_code").validate({rules:{verification_code:{required:!0,minlength:4,maxlength:4}},messages:{verification_code:{required:err_icon+" Enter 4 Digit OTP.",minlength:err_icon+" Enter 4 Digit OTP.",maxlength:err_icon+" Enter 4 Digit OTP."}},highlight:function(e){$(e).addClass("error")},unhighlight:function(e){$(e).removeClass("error")},submitHandler:function(e){Path;var t=loc_main+"/thanksQry.php?sid="+Math.random();$("#verification_code-error").prop("style","").html('Validating OTP'),$.ajax({type:"POST",url:t,dataType:"html",cache:!1,data:$("#send_verification_code").serialize(),success:function(e){$("#ver_loading_proc").html(""),"Y"==e.split("||")[0].trim()?($(".otp_Form").hide(),$("#phone_popup").val(""),$(".thnks_Form").show(),$("#verification_code").val("")):$("#verification_code-error").prop("style","").html(err_icon+" Invalid OTP"),OTP_filled()},xhrFields:{withCredentials:!0},error:function(e,t){404==e.status?alert("Page Not Found."):401==e.status&&alert("Authorization Required.")}})}})});