{% load pages_tags mezzanine_tags i18n shop_tags %}
<html>
<head>

    <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
    <meta name="keywords" content="{% block meta_keywords %}{% endblock %}" /> 
    <meta name="description" content="{% block meta_description %}{% endblock %}" /> 
    <title>{% block meta_title %}{% endblock %}</title>

    <link rel="alternate" type="application/rss+xml" title="RSS" 
        href="{% url blog_post_feed "rss" %}" />
    <link rel="alternate" type="application/atom+xml" title="Atom"  
        href="{% url blog_post_feed "atom" %}" />

    <script language="javascript" 
        src="{{ MEDIA_URL }}js/jquery-1.4.2.min.js"></script>

    <link rel="stylesheet" href="{{ MEDIA_URL }}css/960.css" type="text/css" />
    <link rel="stylesheet" href="{{ MEDIA_URL }}css/reset.css" type="text/css" />
    <link rel="stylesheet" href="{{ MEDIA_URL }}css/global.css" type="text/css" />
    <link rel="stylesheet" href="{{ MEDIA_URL }}css/shop.css" type="text/css" />

    <script type="text/javascript">
	    $(function() {
		    $('#messages a').click(function() {
			    $(this).parent().hide();
			    return false;
		    });
	    });
    </script>

    {% block extra_head %}{% endblock %}

</head>
<body id="{% block body_id %}{% endblock %}">

<div id="grid-top">
    {% page_menu "pages/menus/primary.html" %}
</div>

<div class="container_12 clearfix">

    <div id="grid-left" class="grid_3 grid">
        {% page_menu "pages/menus/tree.html" %}
    </div>

    <div id="grid-middle" class="grid_6 grid">
        <div class="gutter">
            <h1>{% block title %}{% endblock %}</h1>
            <div id="breadcrumb-menu">
                {% block breadcrumb_menu %}
                    {% page_menu "pages/menus/breadcrumb.html" %}
                {% endblock %}
            </div>
            {% block main %}{% endblock %}
        </div>
    </div>

    <div id="grid-right" class="grid_3 grid">
        {% include "includes/search.html" %}

        <div id="cart-panel">
	        <a href="{% url shop_cart %}">
		        {% blocktrans count cart.total_quantity as cart_quantity %}
		        Cart contains 1 item:
		        {% plural %}
		        Cart contains {{ cart_quantity }} items:
		        {% endblocktrans %}
		        {{ cart.total_price|currency }}
	        </a><br />
	        <a href="{% url shop_wishlist %}" class="wishlist">
		        {% blocktrans count wishlist|length as wishlist_count %}
		        Wishlist contains 1 item
		        {% plural %}
		        Wishlist contains {{ wishlist_count }} items
		        {% endblocktrans %}
	        </a>
        </div>

        {% if settings.SHOP_CHECKOUT_ACCOUNT_ENABLED %}
        <div id="account">
            {% if request.user.is_authenticated %}
            {% trans "Logged in as: " %}{{ request.user.username }} / 
            <a href="{% url shop_logout %}?next={{ request.path }}"
                >{% trans "Log out" %}</a>
            {% else %}
            <a href="{{ settings.SHOP_LOGIN_URL }}?next={{ request.path }}"
                >{% trans "Log in or sign up" %}</a>
            {% endif %}
        </div>
        {% endif %}
        
        {% block right_panel %}
            {% include "twitter/tweets.html" %}
        {% endblock %}
        <p class="mezzanine">
            {% trans "Powered by" %} 
            <a href="http://mezzanine.jupo.org">Mezzanine</a><br />
            <a href="{% url set_device "mobile" %}?next={{ request.path }}">
                {% trans "View Mobile Site." %}
            </a>
        </p>
    </div>

</div>

<div id="grid-bottom">
    <div class="container_12 clearfix">
        <div class="grid_6 push_3 grid">
            {% page_menu "pages/menus/footer.html" %}
        </div>
    </div>
</div>

{% include "includes/footer_scripts.html" %}

</body>
</html>
