{% load currency_filters %}
{% load category_tags %}
{% load i18n %}
<div class="navbar primary">
    <div class="navbar-inner">
        <div class="container" style="width: auto;">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <a class="btn btn-navbar app-ico ico_shop_bag btn-cart hidden" href="{% url checkout:index %}">
				<strong>{% trans "Basket" %}
                {% if not request.basket.is_empty %}
				{% trans "Total:" %} {{ basket.total_incl_tax|currency }}
                {% endif %}
                </strong>
            </a>
			<a class="brand hidden" href="{% url promotions:home %}">{{ shop_name }}</a>
             <div class="nav-collapse">
                  <!-- Added 'open' to dropdown so below menu will display - only on home page -->
                  <div id="browse" class="nav dropdown open">
                        {% if categories %}
                        <!-- Removed data-toggle="dropdown" from the anchor so the dropdown doesn't work on the home page -->
						<a href="#browse" class="dropdown-toggle">{% trans "Browse Store" %}</a>
                        <ul class="dropdown-menu nav-tabs nav-stacked">
							<li><a href="/products">{% trans "All Products" %}</a></li>
                        {% for category in categories %}
                            <li><a href="{{ category.0.get_absolute_url }}">{{ category.0.name }} {% if category.1 %}<span class="app-ico ico_fill_right"></span>{% endif %}</a>
                            {% if category.1 %}
                                <ul class="sub-nav dropdown-menu nav nav-tabs nav-stacked span3">
                                {% for subcategory in category.1 %}
                                    <li><a href="{{ subcategory.0.get_absolute_url }}" class="app-ico ico_outline_right"> {{ subcategory.0.name }}</a></li>
                                {% endfor %}
                                </ul>
                            {% endif %}
                            </li>
                        {% endfor %}
                        </ul>
                    {% else %}
					<a href="#browse" class="dropdown-toggle" data-toggle="dropdown">{% trans "Browse Store" %}</a>
                        <ul class="dropdown-menu nav-tabs nav-stacked">
							<li><a href="/products">{% trans "All Products" %}</a></li>
                            <li>
							<a href="#" >{% trans "Contains a Submenu" %}  <span class="app-ico ico_fill_right"></span></a>
                                <ul class="sub-nav dropdown-menu nav nav-tabs nav-stacked span3">
									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
                                </ul>
                            </li>
							<li><a href="/">{% trans "Go Home!" %}</a></li>
                        </ul>
                    {% endif %}
                </div>
                {% include "partials/search.html" %}
            </div><!-- /.nav-collapse -->
        </div>
    </div><!-- /navbar-inner -->
</div><!-- /navbar -->