<?php $Template = get_template(); ?>
<?php $this->load->view('partials/customcss', array('Template' => $Template)) ?>
<script>
    var baseUrl = '<?php echo site_url() ?>';
    var WrapperPage = '<?php echo $this->config->item('website_style') ?>';
</script>
<div id="menu" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="container">
            <div class="navbar-header visible-xs navigate-me">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand text-capitalize" href="javascript:void(0)" data-target="#home" style="color: #FFF"><?php echo $this->config->item('gk_name') ?></a>
            </div>

            <div class="hidden-xs" id="logo">
                <a href="javascript:void(0)" data-target="#home"><img src="<?php echo UPLOAD_PATH . 'gkpos/logo/' . $this->config->item('gk_logo') ?>" alt="<?php echo $this->config->item('gk_name') ?>"></a>
            </div>
            <div class="collapse navbar-collapse">
                <?php if (trim($this->config->item('website_style') == 'singlepage')): ?>
                    <ul class="nav navbar-nav navbar-left navigate-me">
                        <?php if ($url_page != 'page_home'): ?>
                            <?php if (trim($this->config->item('page_home')) == 'yes'): ?>
                                <li <?php echo $url_page == 'page_home' ? 'class="active"' : '' ?>><a href="<?php echo base_url() . '#home'; ?>" data-target="page">Home</a></li>
                            <?php endif; ?>
                            <?php if (trim($this->config->item('page_about')) == 'yes'): ?>   
                                <li <?php echo $url_page == 'page_about' ? 'class="active"' : '' ?>><a href="<?php echo base_url() . '#about'; ?>" data-target="page">About us</a></li>
                            <?php endif; ?>
                            <?php if (trim($this->config->item('page_contact')) == 'yes'): ?>      
                                <li <?php echo $url_page == 'page_contact' ? 'class="active"' : '' ?>><a href="<?php echo base_url() . '#contact'; ?>" data-target="page">Contact</a></li>
                            <?php endif; ?>
                            <?php if (trim($this->config->item('page_gallery')) == 'yes'): ?>   
                                <?php if (!detectDevice()): ?>
                                    <li <?php echo $url_page == 'page_gallery' ? 'class="active"' : '' ?>><a href="<?php echo base_url() . '#gallery'; ?>" data-target="page">Gallery</a></li>
                                <?php endif; ?>
                            <?php endif; ?>
                        <?php else: ?>
                            <?php if (trim($this->config->item('page_home')) == 'yes'): ?>
                                <?php if (detectDevice()): ?>
                                    <li><a href="javascript:void(0)" data-target="#homeContent">Home</a></li>
                                <?php else: ?>
                                    <li ><a href="javascript:void(0)" data-target="#home">Home</a></li>
                                <?php endif; ?>
                            <?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_gallery')) == 'yes'): ?>      
                                <?php if (!detectDevice()): ?>
                                    <li><a href="javascript:void(0)" data-target="#gallery">Gallery</a></li>
                                <?php endif; ?>
                            <?php endif; ?>
                        <?php endif ?>    
                    </ul>
                    <ul class="nav navbar-nav navbar-right navigate-me">
                        <?php if ($url_page != 'page_home'): ?>
                            <?php if (trim($this->config->item('page_menu')) == 'yes'): ?>  
                                <li <?php echo $url_page == 'page_menu' ? 'class="active"' : '' ?>><a href="<?php echo base_url() . '#food-menu' ?>" data-target="page"><?php $this->config->item('gk_order_online') == 'yes' ? print 'Online Order' : print 'Menu' ?></a></li>
                            <?php endif; ?>
                            <?php if (trim($this->config->item('page_reservation')) == 'yes'): ?>  
                                <li <?php echo $url_page == 'page_reservation' ? 'class="active"' : '' ?>><a href="<?php echo base_url() . '#reservation' ?>" data-target="page">Reservation</a></li>
                            <?php endif; ?>
                            <?php if (trim($this->config->item('page_review')) == 'yes'): ?>   
                                <?php //if (!detectDevice()): ?>
                                <li <?php echo $url_page == 'page_review' ? 'class="active"' : '' ?>><a href="<?php echo base_url() . '#review' ?>" data-target="page">Review</a></li>
                                <?php //endif; ?>
                            <?php endif; ?>

                            <?php if ($this->config->item('gk_order_online') == 'yes' && (trim($this->config->item('page_login')) == 'yes' || trim($this->config->item('page_register')) == 'yes')): ?>  
                                <li id="navigationShowLogin" style="display:none;"><a href="javascript:void(0)" data-target="#login">Login</a></li>
                                <li id="navigationShowRegister" style="display:none;"><a href="javascript:void(0)" data-target="#register">Register</a></li>
                                <li id="navigationShowAccount" style="display:none;"><a href="<?php echo site_url('customer') ?>" data-target="page">My Account</a></li>
                                <li id="navigationShowLogout" style="display:none;"><a href="<?php echo site_url('customer/logout') ?>" data-target="page">Logout</a></li>
                            <?php endif; ?>   

                        <?php else: ?>
                            <?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; ?>
                            <?php if (trim($this->config->item('page_reservation')) == 'yes'): ?>  
                                <li><a href="javascript:void(0)" data-target="#reservation">Reservation</a></li>
                            <?php endif; ?>
                            <?php if (trim($this->config->item('page_review')) == 'yes'): ?>   
                                <?php //if (!detectDevice()): ?>
                                <li><a href="javascript:void(0)" data-target="#review">Review</a></li>
                                <?php //endif; ?>
                            <?php endif; ?>

                            <?php if ($this->config->item('gk_order_online') == 'yes' && (trim($this->config->item('page_login')) == 'yes' || trim($this->config->item('page_register')) == 'yes')): ?>  
                                <li id="navigationShowLogin" style="display:none;"><a href="javascript:void(0)" data-target="#login">Login</a></li>
                                <li id="navigationShowRegister" style="display:none;"><a href="javascript:void(0)" data-target="#register">Register</a></li>
                                <li id="navigationShowAccount" style="display:none;"><a href="<?php echo site_url('customer') ?>" data-target="page">My Account</a></li>
                                <li id="navigationShowLogout" style="display:none;"><a href="<?php echo site_url('customer/logout') ?>" data-target="page">Logout</a></li>
                            <?php endif; ?>  
                        <?php endif; ?>
                    </ul>
                <?php else : ?>
                    <ul class="nav navbar-nav navbar-left">
                        <?php if (trim($this->config->item('page_home')) == 'yes'): ?>
                            <li <?php $url_page == 'page_home' ? print 'class="active"' : '' ?>><a href="<?php echo base_url() ?>">Home</a></li>
                        <?php endif; ?>
                        <?php if (trim($this->config->item('page_about')) == 'yes'): ?>   
                            <li <?php $url_page == 'page_about' ? print 'class="active"' : '' ?>><a href="<?php echo base_url() . 'about'; ?>">About us</a></li>
                        <?php endif; ?>
                        <?php if (trim($this->config->item('page_contact')) == 'yes'): ?>      
                            <li <?php $url_page == 'page_contact' ? print 'class="active"' : '' ?>><a href="<?php echo base_url() . 'contact'; ?>">Contact</a></li>
                        <?php endif; ?>
                        <?php if (trim($this->config->item('page_gallery')) == 'yes'): ?>   
                            <?php if (!detectDevice()): ?>
                                <li class="<?php $url_page == 'page_gallery' ? print 'active' : '' ?>" ><a  href="<?php echo base_url() . 'gallery'; ?>">Gallery</a></li>
                            <?php endif; ?>
                        <?php endif; ?>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <?php if (trim($this->config->item('page_menu')) == 'yes'): ?>  
                            <li <?php $url_page == 'page_menu' ? print 'class="active"' : '' ?>><a href="<?php echo base_url() . 'onlineorder' ?>"><?php $this->config->item('gk_order_online') == 'yes' ? print 'Online Order' : print 'Menu' ?></a></li>
                        <?php endif; ?>
                        <?php if (trim($this->config->item('page_reservation')) == 'yes'): ?>  
                            <li <?php $url_page == 'page_reservation' ? print 'class="active"' : '' ?>><a href="<?php echo base_url() . 'contact/reservation' ?>">Reservation</a></li>
                        <?php endif; ?>
                        <?php if (trim($this->config->item('page_review')) == 'yes'): ?>      
                            <?php //if (!detectDevice()): ?>
                            <li <?php $url_page == 'page_review' ? print 'class="active"' : '' ?>><a href="<?php echo base_url() . 'review' ?>">Review</a></li>
                            <?php //endif; ?>
                        <?php endif; ?>
                        <?php if ($this->config->item('gk_order_online') == 'yes' && (trim($this->config->item('page_login')) == 'yes' || trim($this->config->item('page_register')) == 'yes')): ?>  
                            <?php if ($this->User_Model->is_logged_in()): ?>
                                <li <?php $url_page == 'customer' ? print 'class="active"' : '' ?>><a href="<?php echo site_url('customer') ?>">My Account</a></li>
                                <li><a href="<?php echo site_url('customer/logout') ?>">Logout</a></li>
                            <?php else: ?>
                                <li class="navigate-me"><a href="javascript:void(0)" data-target="#login">Login</a></li>
                                <li class="navigate-me"><a href="javascript:void(0)" data-target="#register">Register</a></li>
                            <?php endif; ?>
                        <?php endif; ?>   
                    </ul>
                <?php endif; ?>
                <div class="shopping-cart"></div>
            </div>
        </div>  
    </div>
</div>
<?php if ($this->config->item('gk_order_online') == 'yes'): ?>
    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
        <div class="navigate-me" id="XmSmCartbtn">
            <!-- change class among base, base-alt,orange,dark, red, yellow,light -->
            <a href="javascript:void(0)" data-target="#shoppingCart"><div class="row"> 
                    <div class="col-md-12 no-padding">
                        <div class="col-md-8 col-sm-8 hidden-xs ribbon-inner-content"></div>
                        <div class="col-md-3 col-sm-3 col-xs-11 no-padding ribbon red"><span class="glyphicon glyphicon-shopping-cart mycart"><?php $this->session->userdata('cart_total') ? print to_currency($this->session->userdata('cart_total')) : print to_currency(0) ?></span></div>
                    </div>
                </div>
            </a>
        </div>
    <?php else: ?>
        <?php if ($url_page == 'page_menu'): ?>
            <div class="navigate-me" id="XmSmCartbtn">
                <!-- change class among base, base-alt,orange,dark, red, yellow,light -->
                <a href="javascript:void(0)" data-target="#shoppingCart"><div class="row"> 
                        <div class="col-md-12 no-padding">
                            <div class="col-md-8 col-sm-8 hidden-xs ribbon-inner-content"></div>
                            <div class="col-md-3 col-sm-3 col-xs-11 no-padding ribbon red"><span class="glyphicon glyphicon-shopping-cart mycart"><?php $this->session->userdata('cart_total') ? print to_currency($this->session->userdata('cart_total')) : print to_currency(0) ?></span></div>
                        </div>
                    </div>
                </a>
            </div>
        <?php else: ?>
            <div id="XmSmCartbtn">
                <!-- change class among base, base-alt,orange,dark, red, yellow,light -->
                <a href="<?php echo base_url() . 'onlineorder#shoppingCart' ?>"><div class="row"> 
                        <div class="col-md-12 no-padding">
                            <div class="col-md-8 col-sm-8 hidden-xs ribbon-inner-content"></div>
                            <div class="col-md-3 col-sm-3 col-xs-11 no-padding ribbon red"><span class="glyphicon glyphicon-shopping-cart mycart"><?php $this->session->userdata('cart_total') ? print to_currency($this->session->userdata('cart_total')) : print to_currency(0) ?></span></div>
                        </div>
                    </div>
                </a>
            </div>
        <?php endif; ?>
    <?php endif ?>
<?php endif; ?>