<div class="modal fade" id="whatsapp" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Message on WhatsApp</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form method="post" id="whatsappEnq">
                    <p id="whatsapp_response"></p>
                    <div class="row">
                        <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            <div class="form-group">
                                <input class="form-control" type="text" name="wname" id="wname" placeholder="Full Name*" value="" required>
                            </div>
                        </div>
                        <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            <div class="form-group">
                                <input class="form-control" type="text" name="wmobile" id="wmobile" value="" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="10" placeholder="Mobile Number*" required>
                            </div>
                        </div>
                        <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            <button type="submit" name="whatsapp_submit" id="whatsEnq" class="read_more">Submit</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Quick Enquiry</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form id="quick_enquiry" method="post">
                    <script>
                        setTimeout(function() {
                            $.getScript("https://www.google.com/recaptcha/api.js");
                        }, 10000)
                    </script>
                    <p id="enqstatus"></p>
                    <div class="form-group">
                        <input class="form-control" type="text" name="user_name" id="user_name" placeholder="Your Name*" value="" required>
                    </div>

                    <div class="form-group">
                        <input class="form-control" type="text" name="email_address" id="email_address" value="" placeholder="Your Email*" required>
                    </div>

                    <div class="form-group">
                        <input class="form-control" name="phone_no" id="phone_no" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="10" type="tel" placeholder="Your Mobile Number*" required>
                    </div>

                    <div class="form-group">
                        <input class="form-control" type="text" name="locations" id="locations" value="" placeholder="Your Location*" onFocus="geolocate()" required>
                    </div>

                    <div class="form-group">
                        <textarea class="form-control" name="en_message" id="en_message" placeholder="Your Message*" required></textarea>
                    </div>

                    <div class="form-group" style="margin-bottom: 0;">
                        <div class="g-recaptcha" data-sitekey="6Lf6jT0iAAAAACzJctoG1Vcppxw_i7sj6-ed6IZ9"></div>

                    </div>

                    <button type="submit" id="quicksend1" class="read_more">Submit</button>
                </form>
            </div>
        </div>
    </div>
</div>


<!-- Product Popup -->
<div class="modal fade" id="productID" tabindex="-1">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h6 class="modal-title">Send Enquiry</h6>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-xxl-7 col-xl-7 col-lg-7 col-md-7 col-sm-7 col-12">
                        <div class="product_popup">
                            <div class="product_popup_image">
                                <img src="designer/images/Intrauterine-Insemination.jpg" alt="Intrauterine Insemination" title="Intrauterine Insemination" class="catImg">
                            </div>
                            <h6 class="catName">Intrauterine Insemination</h6>
                        </div>
                    </div>
                    <div class="col-xxl-5 col-xl-5 col-lg-5 col-md-5 col-sm-5 col-12">

                        <form name="contact-form" method="post" id="quick_enquiry1">
                            <div id="mail-status1"></div>
                            <script>
                        setTimeout(function() {
                            $.getScript("https://www.google.com/recaptcha/api.js");
                        }, 10000)
                    </script>
                            <div class="form-group">
                                <input class="form-control" type="text" name="catuser_name" id="catuser_name" placeholder="Your Name*" value="" pattern="[a-z A-Z]+" required>
                            </div>

                            <div class="form-group">
                                <input class="form-control" type="email" name="catemail_address" id="catemail_address" placeholder="Your Email ID*" value="" required>
                            </div>

                            <div class="form-group">
                                <input class="form-control" name="catphone_no" type="tel" placeholder="Phone No *" maxlength="10" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" value="" id="catphone_no" required>
                            </div>

                            <div class="form-group">
                                <input class="form-control" type="text" name="catlocation" id="catlocation" placeholder="Your Location*" onfocus="geolocate()" value="" pattern="[a-z A-Z]+" autocomplete="off" required>
                            </div>
                            <div class="form-group">
                                <textarea class="form-control" name="caten_message" id="caten_message" placeholder="Your Message*" required></textarea>
                            </div>

                            <div class="form-group" style="margin-bottom: 0;">
                                <div class="g-recaptcha" data-sitekey="6Lf6jT0iAAAAACzJctoG1Vcppxw_i7sj6-ed6IZ9"></div>

                            </div>

                            <div class="form-group">
                                <button type="submit" class="read_more" id="cat_submit">Submit</button>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script>
    $(document).ready(function() {
        $('#emailSub').click(function(e) {
            e.preventDefault();
            var email_subscribe = $('#email_subscribe').val();
            $.ajax({
                url: "<?= site_url; ?>/ajaxEmailscribe.php",
                data: $('#emailsubscribeform').serialize(),
                type: "POST",
                success: function(data) {
                    if (data == 'success') {
                        $('#email_response').html('<div class="alert alert-success">Email Subscribe successfully<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button></div>');
                        $('#emailsubscribeform').trigger('reset');
                    } else {
                        $('#email_response').html(data);
                    }
                }

            })

        })
    })
</script>

<script>
    $(document).ready(function() {
        $('#whatsEnq').click(function(e) {

            e.preventDefault();
            var wname = $('#wname').val();
            var wmobile = $('#wmobile').val();
            $.ajax({
                url: "<?= site_url; ?>/whatsapp_enq.php",
                data: $('#whatsappEnq').serialize(),
                type: "POST",
                success: function(data) {
                    if (data == 'success') {
                        $('#whatsapp_response').html('<div class="alert alert-success">Whatsapp Enquiry Submitted successfully<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button></div>');
                        $('#whatsappEnq').trigger('reset');
                        window.open("https://api.whatsapp.com/send?phone=917298666555 &text=&source=&data=&app_absent=");
                    } else {
                        setTimeout(() => {}, 10000);
                        $('#whatsapp_response').html(data);
                    }
                }

            })

        })
    })
</script>

<script>
    $(document).ready(function() {
        $('#quicksend1').click(function(e) {
            e.preventDefault();
            if ($("#user_name").val() != '' && $("#email_address").val() != '' && $("#phone_no").val() != '' && $("#en_message").val() != '' && $("#locations").val() != '') {
                jQuery.ajax({
                    url: "<?= site_url; ?>/ajaxEnquiry.php",
                    data: $('#quick_enquiry').serialize(),
                    type: "POST",
                    success: function(data) {
                        var data = data.trim();
                        if (data == 'success') {
                            $("#enqstatus").html('<div class="alert alert-success alert-dismissible show">Your Enquiry has been sent successfully.  Our Team will contact you shortly!<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true"></span></button></div>');
                            $('#quick_enquiry').trigger('reset');
                        } else {
                            $("#enqstatus").html(data).css('color', 'red');
                        }
                    },
                    error: function() {}
                });
            } else {
                $("#enqstatus").html('<div class="alert alert-danger alert-dismissible show">Asterisk(*) Marked fields are gMandatory!<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true"></span></button></div>');
            }
        })
    });
</script>
<script>
    $(document).ready(function() {
        $('#cat_submit').click(function(e) {
            e.preventDefault();
            if ($("#catuser_name").val() != '' && $("#catemail_address").val() != '' && $("#catphone_no").val() != '' && $("#caten_message").val() != '' && $("#catlocation").val() != '') {
                jQuery.ajax({
                    url: "<?= site_url; ?>/ajaxEnquirycat.php",
                    data: $('#quick_enquiry1').serialize(),
                    type: "POST",
                    success: function(data) {
                        var data = data.trim();
                        if (data == 'success') {
                            $("#mail-status1").html('<div class="alert alert-success alert-dismissible show">Your Enquiry has been sent successfully.  Our Team will contact you shortly!<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button></div>');
                            $('#quick_enquiry1').trigger('reset');

                        } else {
                            $("#mail-status1").html(data).css('color', 'red');
                        }
                    },
                    error: function() {}
                });
            } else {
                $("#mail-status1").html('<div class="alert alert-danger alert-dismissible show"><strong>Asterisk(*) Marked fields are Mandatory!<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button></div>');
            }

        })

    })
</script>