');insurance_form();}});}insurace_func();function insurance_form(){var ins_form='';ins_form+='
';ins_form+='
';ins_form+=' Ask Your Questions';ins_form+='
';ins_form+='
Any query related to insurance?Ask us
';ins_form+='
';ins_form+='';ins_form+='';ins_form+='';ins_form+='';ins_form+='
';ins_form+='
+
';ins_form+='';ins_form+='
';ins_form+='
';ins_form+='
View all Question
';ins_form+='
';$("#insurance_listing").append(ins_form);}function randomNums(){var rand_num1=Math.floor(Math.random()*10)+1;var rand_num2=Math.floor(Math.random()*10)+1;document.getElementById("digit1").innerHTML=rand_num1;document.getElementById("digit2").innerHTML=rand_num2;}function addNums(){var answer=document.getElementById("capcha").value;var digit2=parseInt(document.getElementById("digit2").innerHTML);var digit1=parseInt(document.getElementById("digit1").innerHTML);var sum=digit1+digit2;if(answer==''){return false;}else if(answer!=sum){return false;}else{return true;}}$(function(){$("form[name='insurance_form']").validate({rules:{uquestion:"required",uname:{required:true,minlength:3},uemail:{required:true,email:true},umobile:{number:true,minlength:9,maxlength:11},ucity:"required",capcha:"required"},messages:{uquestion:"Please enter your question",uname:{required:"Please enter your name",minlength:"Please enter at least 3 characters"},uemail:"Please enter a valid email address",umobile:"Please enter a valid contact number",ucity:"Please enter your city name",capcha:"Please enter correct capcha"},submitHandler:function(form){var captcha_verified=addNums();if(captcha_verified){$("#incorrect-capcha-error").css('display','none');ques=$("#uquestion").val();name=$("#uname").val();email=$("#uemail").val();mobile=$("#umobile").val();city=$("#ucity").val();$.ajax({type:"POST",url:'https://cldmum1.bhaskar.com/webfeed/insurance-coverfox/',cache:false,data:{"question":ques,"name":name,"email":email,"mobile":mobile,"city":city},beforeSend:function(){$("#submit_response").html('');},success:function(rdata){$("#submit_response").html('Thank you for writing to us.');$('.frm form')[0].reset();},error:function(xhr){$("#submit_response").html('Something went wrong.Please try again later.');},complete:function(){return false;}});}else{$("#incorrect-capcha-error").css('display','block');$("#incorrect-capcha-error").html('Please enter correct capcha')}return false}})});randomNums();