<footer class="footer-wrapper" id="footer">
    <?php if (!isset($hideTopFooter)): ?>
        <div class="footer-top">
            <div class="container">
                <div class="row">
                    <div class="col c4">
                        <div class="footer-nav">
                            <h2 class="footer-block-title">Information</h2>
                            <!--<div><span class="icon icon-right-open"></span> <a href="<?php echo site_url('about') ?>" class="text-capitalize">About us</a></div>
                            <div><span class="icon icon-right-open"></span> <a href="<?php echo site_url('delivery-information') ?>" class="text-capitalize">Delivery information</a></div> -->
                            <div><span class="icon icon-right-open"></span> <a href="<?php echo site_url('terms-and-condition') ?>" class="text-capitalize">Terms & conditions</a></div>
                        </div>
                    </div>
                    <div class="col c4">
                        <div class="footer-nav">
                            <h2 class="footer-block-title">Contact</h2>
                            <div><a class="text-capitalize"><span class="icon icon-location"></span> <?php echo $restaurantInfo['address_street'] ?>, <?php echo $restaurantInfo['address_city'] ?>, <?php echo $restaurantInfo['address_postcode'] ?></a></div>
                            <div><a class="text-capitalize"><span class="icon icon-phone"></span>&nbsp;<?php echo $restaurantInfo['general_phone'] ?></a></div> 
                            <div><a><span class="icon icon-mail"></span> <?php echo $restaurantInfo['general_email'] ?></a> </div>
                            <div class="social-icon">
                                <!-- <?php if (isset($extranalLinks['youtube'])): ?>
                                                                                                                                                                                                                <a href="<?php echo $extranalLinks['youtube']->link ?>" title="<?php echo $extranalLinks['youtube']->title ?>" class="text-capitalize"><img src="<?php echo ONLINE_RESOURCES_PATH . 'images/youtube.png' ?>" style="width: 32px"></a>
                                <?php endif; ?>
                               
                                <?php if (isset($extranalLinks['twitter'])): ?>
                                    <a href="<?php echo $extranalLinks['twitter']->link ?>" title="<?php echo $extranalLinks['twitter']->title ?>" class="text-capitalize"><span class="icon icon-twitter-circled"></span></a>
                                <?php endif; ?>
                                <?php if (isset($extranalLinks['facebook'])): ?>   
                                    <a href="<?php echo $extranalLinks['facebook']->link ?>" title="<?php echo $extranalLinks['facebook']->title ?>" class="text-capitalize"><span class="icon icon-facebook-circled"></span></a>
                                <?php endif; ?>
                                <?php if (isset($extranalLinks['gplus'])): ?>     
                                    <a href="<?php echo $extranalLinks['gplus']->link ?>" title="<?php echo $extranalLinks['gplus']->title ?>" class="text-capitalize"><span class="icon icon-gplus-circled"></span></a>
                                <?php endif; ?>
                                <?php if (isset($extranalLinks['pinterest'])): ?>
                                    <a href="<?php echo $extranalLinks['pinterest']->link ?>" title="<?php echo $extranalLinks['pinterest']->title ?>" class="text-capitalize"><span class="icon icon-pinterest-circled"></span></a>
                                <?php endif; ?> -->
                            </div>
                        </div>
                    </div>
                    <div class="col c4">
                        <div class="footer-nav">
                            <h2 class="footer-block-title">Get Offer Note</h2>
                            <div>Please subscribe to let us inform you about our latest offer and discount</div>
                            <div class="subscription-form">
                                <div class="tab-group" style="border: none;">
                                    <input type="text" class="smooth" placeholder="Email Address" id="subscriberEmailAddress">
                                    <span class="addon"><a href="javascript:void(0)" onclick="subscribe($('#subscriberEmailAddress').val())">Subscribe</a></span>
                                </div>
                                <div class="error tab-group" id="subscriberEmailAddressError"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--<div class="row payment-img">
                    <div class="col c6 text-left">
                        <div class="col c12"><img src="<?php echo ONLINE_RESOURCES_PATH ?>images/ssl.jpg"></div>
                    </div>
                    <div class="col c6 text-right">
                        <div class="col c12">
                            <?php if (isset($extranalLinks['android'])): ?>
                                <div class="col c6"> <a href="<?php echo $extranalLinks['android']->link ?>"><img src="<?php echo ONLINE_RESOURCES_PATH ?>images/appStore.png"></a></div>
                            <?php endif; ?>
                            <?php if (isset($extranalLinks['apple'])): ?>
                                <div class="col c6"> <a href="<?php echo $extranalLinks['apple']->link ?>"><img src="<?php echo ONLINE_RESOURCES_PATH ?>images/googlePlay.png"></a></div>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>-->
            </div>
            <div class="v-gap-20"></div>
        </div>
    <?php endif; ?>
    <div class="footer-bottom">
        <div class="container">
            <div class="footer-bottom-inside">
                <div class="col c6 text-left copyright">&copy;<?php echo date('Y') ?> <?php echo getDomain() ?>  All Rights Reserved</div>
                <div class="col c6 powered-by text-right">
                    <div class="powered-by-company"><a href="https://www.gksoft.co.uk" target="_blank"><img src="<?php echo ONLINE_RESOURCES_PATH . 'images/poweredby_logo.png' ?>" style="width: 150px; height:30px; margin-top:-8px"/></a></div>
                    <div class="powered-by-backtotop" onclick="scrollBackTop()"><a href="javascript:void(0)"><span class="icon icon-up-open-big"></span></a></div>
                </div>
            </div>
        </div>
    </div>
</footer>
<script type="text/javascript">
    $('form input[type="text"]').first().focus();
    function toCurrency(number) {
        var currencySymbol = '<?php echo $this->config->item('locale_currencysymbol') ?>';
        var localeCurrencyside = '<?php echo $this->config->item('locale_currencyside') ?>';
        var currencyIcon = '<?php echo $this->config->item('locale_currencyicon') ?>';
        if ($.trim(currencyIcon)) {
            if ($.trim(localeCurrencyside) === $.trim('left')) {
                return currencyIcon + '' + Number(number).toFixed(2);
            } else {
                return Number(number).toFixed(2) + '' + currencyIcon;
            }
        } else {
            if ($.trim(localeCurrencyside) === $.trim('left')) {
                return currencySymbol + '' + Number(number).toFixed(2);
            } else {
                return Number(number).toFixed(2) + '' + currencySymbol;
            }
        }
    }
    function toCurrencyNoMoney(number) {
        return  Number(number).toFixed(2);
    }
    function sleep(time) {
        return new Promise((resolve) => setTimeout(resolve, time));
    }
    function subscribe(Email) {
        if (isEmail(Email)) {
            $.ajax({
                url: "<?php echo site_url('takeaway/subscribe') ?>",
                type: 'POST',
                dataType: 'json',
                data: {email: Email},
                success: function (response) {
                    if (response.status) {
                        $('#subscriberEmailAddressError').html('<span style="color:green;">' + response.message + '</span>');
                    } else {
                        $('#subscriberEmailAddressError').text(response.message);
                    }
                }
            });
        } else {
            $('#subscriberEmailAddressError').text('Please provide valid email address only');
        }
    }
    function isEmail(email) {
        return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(email);
    }
</script>
<div style="display: none;">
    <div id="customerPreorderWarning">
        <div class="popup-container" id="preOrderPopup">
            <div class="popup-container-pre-order-inner">
                <h1 class="text-center" style="font-size: 17px;"><?php ($isTodayOpened) ? print 'We are closed now, open at ' . $openingTime : print '<span style="color:#d33;">We are closed today</span>' ?></h1>
                <?php if ($isTodayOpened): ?>
                    <div class="tab-group"><a href="<?php echo site_url('pre-order') ?>" class="btn-block btn btn-fb text-center" style="width: 100%; border-radius:0px">Pre-order for later</a></div>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function openCustomerPreorderWarningPopup() {
        $.colorbox({inline: true, scrolling: false, href: "#customerPreorderWarning", width: '420px', height: 'auto', maxWidth: "100%", open: true, closeButton: true, transition: 'none'});
    }
</script>
<div style="display: none;">
    <div id="CustomerAllergyWarningPopup">
        <div class="popup-container" style="background: #fffbf7;padding: 10px;">
            <div class="popup-container-pre-order-inner">
                <h1 class="text-center" style="font-size: 17px;">Allergy & Dietary information</h1>
                <p>If you have an allergy that could harm your health please contact us before you place your order. Thank you</p>
                <br/>
                <div style="text-align: center;"><a href="javascript:void(0)" style="border: 1px solid #d33; text-align: center; padding: 3px 40px; color: #d33;" onclick="closePopup()">Close</a></div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function openCustomerAllergyWarningPopup() {
        $.colorbox({inline: true, scrolling: false, href: "#CustomerAllergyWarningPopup", width: '420px', height: 'auto', maxWidth: "100%", open: true, closeButton: false, transition: 'none'});
    }
</script>