<div class="copyright hidden-xs">
    <div class="container-fluid">
        <div class="col-md-6">
            <p>©<span><?php echo date('Y') . ' ' . $this->config->item('gk_name') ?>  - All Rights Reserved.</span>&nbsp;<span>Powered By <a class="" href="http://gksoft.co.uk"><img src="<?php echo ASSETS_PUBLIC_PATH . 'img/gk-logo.png' ?>" max-height="35px;" width="50px;"></a></span></p>
        </div>
        <div class="col-sm-5">
            <?php if (trim($this->config->item('website_style') == 'singlepage')): ?>
                <ul class="bottom_ul navigate-me navbar-right">
                    <?php if (trim($this->config->item('page_home')) == 'yes'): ?>
                        <li><a href="javascript:void(0)" data-target="#home">Home</a></li>
                    <?php endif; ?>
                    <?php if (trim($this->config->item('page_about')) == 'yes'): ?>   
                        <li><a href="javascript:void(0)" data-target="#about">About us</a></li>
                    <?php endif; ?>
                    <?php if (trim($this->config->item('page_contact')) == 'yes'): ?>      
                        <li><a href="javascript:void(0)" data-target="#contact">Contact</a></li>
                    <?php endif; ?>
                    <?php if (trim($this->config->item('page_reservation')) == 'yes'): ?>  
                        <li><a href="javascript:void(0)" data-target="#reservation">Reservation</a></li>
                    <?php endif; ?>
                    <li><a href="javascript:void(0)" onclick="showTermsCondition()">Terms & Conditions</a></li>
                </ul>
            <?php else: ?>
                <ul class="bottom_ul navbar-right">
                    <?php if (trim($this->config->item('page_home')) == 'yes'): ?>
                        <li><a href="<?php echo base_url() ?>">Home</a></li>
                    <?php endif; ?>
                    <?php if (trim($this->config->item('page_about')) == 'yes'): ?>   
                        <li><a href="<?php echo base_url() . 'about' ?>">About us</a></li>
                    <?php endif; ?>
                    <?php if (trim($this->config->item('page_contact')) == 'yes'): ?>      
                        <li><a href="<?php echo base_url() . 'contact' ?>">Contact</a></li>
                    <?php endif; ?>
                    <?php if (trim($this->config->item('page_reservation')) == 'yes'): ?>  
                        <li><a href="<?php echo base_url() . 'contact/reservation' ?>">Reservation</a></li>
                    <?php endif; ?>
                    <li><a href="javascript:void(0)" onclick="showTermsCondition()">Terms & Conditions</a></li>
                </ul>
            <?php endif; ?>
        </div>
    </div>
</div>
<div id="FooterAppsNavigation" class="visible-xs">
    <div class="navbar-fixed-bottom  bs-dark apps-navigation">
        <?php if (trim($this->config->item('website_style') == 'singlepage')): ?>
            <ul class="bottom_ul navigate-me">
                <?php if (trim($this->config->item('page_home')) == 'yes'): ?>
                    <?php if (detectDevice()): ?>
                        <li class="active"><a href="javascript:void(0)" data-target="#homeContent">Home</a></li>
                    <?php else: ?>
                        <li class="active"><a href="javascript:void(0)" data-target="#home">Home</a></li>
                    <?php endif; ?>
                <?php endif; ?>
                <?php if (trim($this->config->item('page_contact')) == 'yes'): ?>    
                    <li><a href="javascript:void(0)" data-target="#contact">Contact</a></li>
                <?php endif; ?>
                <?php if (trim($this->config->item('page_menu')) == 'yes'): ?>  
                    <li><a href="javascript:void(0)" data-target="#food-menu"><?php $this->config->item('gk_order_online') == 'yes' ? print 'Online Order' : print 'Menu' ?></a></li>
                <?php endif; ?>
                <li><a href="javascript:void(0)" onclick="showTermsCondition()">Terms & Conditions</a></li>

            </ul>
        <?php else: ?>
            <ul class="bottom_ul">
                <?php if (trim($this->config->item('page_home')) == 'yes'): ?>
                    <li class="active"><a href="<?php echo base_url() ?>">Home</a></li>
                <?php endif; ?>
                <?php if (trim($this->config->item('page_contact')) == 'yes'): ?>    
                    <li><a href="<?php echo base_url() . 'contact' ?>">Contact</a></li>
                <?php endif; ?>
                <?php if (trim($this->config->item('page_menu')) == 'yes'): ?>  
                    <li><a href="<?php echo base_url() . 'onlineorder' ?>"><?php $this->config->item('gk_order_online') == 'yes' ? print 'Online Order' : print 'Menu' ?></a></li>
                <?php endif; ?>
                <li><a href="javascript:void(0)" onclick="showTermsCondition()">Terms & Conditions</a></li>
            </ul>
        <?php endif; ?>
    </div>
</div>
<!-- Delivery Postcode Form -->
<div class="hidden">
    <div id="PostcodeFormPopup">
        <div class="popup-content">
            <div class="modal-header">
                <button type="button" class="close" onclick="javascript:closeColorbox()" style="color: #ff0000"><i class="fa fa-close"></i></button>
                <h4 class="modal-title">Your Delivery Postal Code</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="tab-content">
                            <?php echo form_open('onlineorder/checkdeliveryplan', array('class' => 'form-horizontal', 'id' => 'deliveryPostcodeForm')) ?>
                            <div class="form-group">
                                <label for="email" class="col-sm-3 control-label">Postal Code</label>
                                <div class="col-sm-9">
                                    <input type="text" name="postcode" data-error="#deliveryPostcodeError" class="form-control" id="deliveryPostcode" placeholder="CF5 4DR"/>
                                </div>
                                <div id="deliveryPostcodeError"  class="col-sm-offset-3 col-sm-9"></div>
                            </div>
                            <input type="hidden" id="PostcodeFormPopupTriggeredFrom" value="menu">
                            <div class="row">
                                <div class="col-sm-9 col-sm-offset-3">
                                    <input class="btn-u btn-brd btn-brd-hover btn-u-green" type="submit" name="submit_form" tabindex="4" value="Submit" onclick="checkDeliveryPlan('deliveryPostcodeForm')">
                                    &nbsp;&nbsp;&nbsp;<span class="please-wait" style="display:none;">Calculating...</span>
                                </div>
                            </div>
                            <?php echo form_close() ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<style>
    .navbar-fixed-bottom.bs-dark.apps-navigation {background: rgba(0,35,54,1);}
    #FooterAppsNavigation ul.bottom_ul {float:none;}
    #FooterAppsNavigation ul.bottom_ul li a{font-size: 11px;}
    .bottom_ul li:after { content:""; color:#FFF; margin-right:8px; margin-left:8px;}
</style>

<script>
    $(document).ready(function () {
        var windowHeight = $(window).height();
        windowHeight -= 44;
        if (WrapperPage == 'multipage') {
            $('.wrapper').css({'minHeight': windowHeight + 'px'});
        }
        $('.customer-wrapper').css({'minHeight': windowHeight + 'px'});
    });

    function checkDeliveryPlan(formId) {
        $('#' + formId).validate({
            submitHandler: function () {
                var myform = document.getElementById(formId);
                var formdata = new FormData(myform);
                $.ajax({
                    url: $('#' + formId).attr('action'),
                    data: formdata,
                    cache: false,
                    processData: false,
                    contentType: false,
                    type: 'POST',
                    dataType: 'json',
                    beforeSend: function () {
                        $('.please-wait').removeAttr('style').css({'display': 'inline-block'});
                    },
                    success: function (response) {
                        $('.please-wait').removeAttr('style').css({'display': 'none'});
                        if (response.success) {
                            closeColorbox();
                            if ($('#PostcodeFormPopupTriggeredFrom').val() == 'menu') {
                                loadCart('1');
                            } else {
                                window.location.reload();
                            }
                        } else {
                            $('#online_delivery').attr('checked', false);
                            alert(response.message);
                            window.setTimeout(function () {
                                $('#online_collection').click();
                            }, 5000);
                        }
                    }
                });
            },
            errorClass: "has-error",
            highlight: function (e) {
                $(e).closest('.form-group').addClass('has-error');
                $('#colorbox').colorbox.resize();
            },
            unhighlight: function (e) {
                $(e).closest('.form-group').removeClass('has-error');
                $('#colorbox').colorbox.resize();
            },
            rules: {
                postcode: {postcodeUK: true, required: true}
            },
            messages: {
                postcode: "Please Provide Valid Uk Postal Code"

            },
            errorPlacement: function (error, element) {
                errorPlacement(error, element);
            }
        });
    }


</script>
<!--===Login/Registration Page ==== --> 
<?php if (trim($this->config->item('page_login')) == 'yes' || trim($this->config->item('page_register')) == 'yes'): ?>
    <?php echo $this->load->view('partials/login_register') ?>
<?php endif; ?>
<!--=== End Login/Registration Page ==== --> 
<?php echo $this->load->view('partials/terms_condition'); ?>
<?php echo $this->load->view('partials/alergy'); ?>