{% 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" %}" />

    {% editable_loader %}

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

    <style type="text/css">

        /* 960 Grid System */
        .container_12,.container_16{margin-left:auto;margin-right:auto;width:960px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16{display:inline;float:left;margin-left:10px;margin-right:10px}.push_1,.pull_1,.push_2,.pull_2,.push_3,.pull_3,.push_4,.pull_4,.push_5,.pull_5,.push_6,.pull_6,.push_7,.pull_7,.push_8,.pull_8,.push_9,.pull_9,.push_10,.pull_10,.push_11,.pull_11,.push_12,.pull_12,.push_13,.pull_13,.push_14,.pull_14,.push_15,.pull_15{position:relative}.container_12 .grid_3,.container_16 .grid_4{width:220px}.container_12 .grid_6,.container_16 .grid_8{width:460px}.container_12 .grid_9,.container_16 .grid_12{width:700px}.container_12 .grid_12,.container_16 .grid_16{width:940px}.alpha{margin-left:0}.omega{margin-right:0}.container_12 .grid_1{width:60px}.container_12 .grid_2{width:140px}.container_12 .grid_4{width:300px}.container_12 .grid_5{width:380px}.container_12 .grid_7{width:540px}.container_12 .grid_8{width:620px}.container_12 .grid_10{width:780px}.container_12 .grid_11{width:860px}.container_16 .grid_1{width:40px}.container_16 .grid_2{width:100px}.container_16 .grid_3{width:160px}.container_16 .grid_5{width:280px}.container_16 .grid_6{width:340px}.container_16 .grid_7{width:400px}.container_16 .grid_9{width:520px}.container_16 .grid_10{width:580px}.container_16 .grid_11{width:640px}.container_16 .grid_13{width:760px}.container_16 .grid_14{width:820px}.container_16 .grid_15{width:880px}.container_12 .prefix_3,.container_16 .prefix_4{padding-left:240px}.container_12 .prefix_6,.container_16 .prefix_8{padding-left:480px}.container_12 .prefix_9,.container_16 .prefix_12{padding-left:720px}.container_12 .prefix_1{padding-left:80px}.container_12 .prefix_2{padding-left:160px}.container_12 .prefix_4{padding-left:320px}.container_12 .prefix_5{padding-left:400px}.container_12 .prefix_7{padding-left:560px}.container_12 .prefix_8{padding-left:640px}.container_12 .prefix_10{padding-left:800px}.container_12 .prefix_11{padding-left:880px}.container_16 .prefix_1{padding-left:60px}.container_16 .prefix_2{padding-left:120px}.container_16 .prefix_3{padding-left:180px}.container_16 .prefix_5{padding-left:300px}.container_16 .prefix_6{padding-left:360px}.container_16 .prefix_7{padding-left:420px}.container_16 .prefix_9{padding-left:540px}.container_16 .prefix_10{padding-left:600px}.container_16 .prefix_11{padding-left:660px}.container_16 .prefix_13{padding-left:780px}.container_16 .prefix_14{padding-left:840px}.container_16 .prefix_15{padding-left:900px}.container_12 .suffix_3,.container_16 .suffix_4{padding-right:240px}.container_12 .suffix_6,.container_16 .suffix_8{padding-right:480px}.container_12 .suffix_9,.container_16 .suffix_12{padding-right:720px}.container_12 .suffix_1{padding-right:80px}.container_12 .suffix_2{padding-right:160px}.container_12 .suffix_4{padding-right:320px}.container_12 .suffix_5{padding-right:400px}.container_12 .suffix_7{padding-right:560px}.container_12 .suffix_8{padding-right:640px}.container_12 .suffix_10{padding-right:800px}.container_12 .suffix_11{padding-right:880px}.container_16 .suffix_1{padding-right:60px}.container_16 .suffix_2{padding-right:120px}.container_16 .suffix_3{padding-right:180px}.container_16 .suffix_5{padding-right:300px}.container_16 .suffix_6{padding-right:360px}.container_16 .suffix_7{padding-right:420px}.container_16 .suffix_9{padding-right:540px}.container_16 .suffix_10{padding-right:600px}.container_16 .suffix_11{padding-right:660px}.container_16 .suffix_13{padding-right:780px}.container_16 .suffix_14{padding-right:840px}.container_16 .suffix_15{padding-right:900px}.container_12 .push_3,.container_16 .push_4{left:240px}.container_12 .push_6,.container_16 .push_8{left:480px}.container_12 .push_9,.container_16 .push_12{left:720px}.container_12 .push_1{left:80px}.container_12 .push_2{left:160px}.container_12 .push_4{left:320px}.container_12 .push_5{left:400px}.container_12 .push_7{left:560px}.container_12 .push_8{left:640px}.container_12 .push_10{left:800px}.container_12 .push_11{left:880px}.container_16 .push_1{left:60px}.container_16 .push_2{left:120px}.container_16 .push_3{left:180px}.container_16 .push_5{left:300px}.container_16 .push_6{left:360px}.container_16 .push_7{left:420px}.container_16 .push_9{left:540px}.container_16 .push_10{left:600px}.container_16 .push_11{left:660px}.container_16 .push_13{left:780px}.container_16 .push_14{left:840px}.container_16 .push_15{left:900px}.container_12 .pull_3,.container_16 .pull_4{left:-240px}.container_12 .pull_6,.container_16 .pull_8{left:-480px}.container_12 .pull_9,.container_16 .pull_12{left:-720px}.container_12 .pull_1{left:-80px}.container_12 .pull_2{left:-160px}.container_12 .pull_4{left:-320px}.container_12 .pull_5{left:-400px}.container_12 .pull_7{left:-560px}.container_12 .pull_8{left:-640px}.container_12 .pull_10{left:-800px}.container_12 .pull_11{left:-880px}.container_16 .pull_1{left:-60px}.container_16 .pull_2{left:-120px}.container_16 .pull_3{left:-180px}.container_16 .pull_5{left:-300px}.container_16 .pull_6{left:-360px}.container_16 .pull_7{left:-420px}.container_16 .pull_9{left:-540px}.container_16 .pull_10{left:-600px}.container_16 .pull_11{left:-660px}.container_16 .pull_13{left:-780px}.container_16 .pull_14{left:-840px}.container_16 .pull_15{left:-900px}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}* html .clearfix,*:first-child+html .clearfix{zoom:1}

        /* Reset (from 960.gs) */
        html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}

        * {font-family:Garamond, Georgia, serif;}

        .grid {padding:30px 0;}
        #grid-top {background:#ccc; border-bottom:1px solid #999;
            text-align:center; padding:0;}
        #grid-top li {display:inline-block;
            border-right:1px solid #999; padding:10px 20px;}
        #grid-top .first {border-left:1px solid #999;}
        #grid-top .active {background:#eee;}
        .container_12 {background:#e9e9e9;}
        #grid-middle {background:#fff; min-height:100%;}
        #grid-middle img {max-width:400px;}
        .gutter {padding:0 30px;}
        #grid-left {font-size:130%;}
        #grid-left li {display:block; margin:5px 30px;}
        #grid-left ul ul li {list-style-type:disc; font-size:80%;}
        #grid-right li {display:block; margin-top:3px;}

        #grid-bottom {background:#666;}
        #grid-bottom .container_12 {background:#555;}
        #grid-bottom .grid {background:#444; border:1px solid #333;
            border-top:0; border-bottom:0;}

        #grid-bottom ul {margin:0 30px;}
        #grid-bottom ul ul {margin:0;}
        #grid-bottom li {float:left;}
        #grid-bottom li li {width:100px; clear:both; margin:5px;
            border:1px solid #333; background:#555; padding:5px 10px;
            border-right:0; border-bottom:0;}
        
        h2, p, #breadcrumb-menu, #description, .paging, .share,
          #comments, .comment {margin:20px 0;}

        h1 {font-size:250%; border-bottom:1px solid #ccc; font-weight:normal;}
        h2 {font-size:150%;}
        h3 {font-weight:normal; margin:20px 0 10px;}
        h4 {font-weight:normal; margin-top:10px;}
        h5 {font-weight:bold; margin-top:20px;}
        a {color:#008;}
        .active, .active .active {font-style:italic;}
        .active li {font-style:normal;}
        p {line-height:150%;}
        pre, pre *, code, code * {font-family:monospace;}
        pre {padding:15px;}
        li {list-style-type:none; display:inline;}
        input, textarea {border:1px solid #999;}
        textarea {width:100%;}
        #grid-bottom a {color:#eee; text-decoration:none;}

        .since {display:block; margin-bottom:20px;}
        .paging {border-top:1px solid #ccc;}
        .paging li {padding:0 5px;}
        .paging * {display:inline;}
        .button {cursor:pointer;}
        .help {font-size:60%; margin:0;}
        .tags ul, .tags li {display:inline !important;}
        .share {background:#eee; padding:5px;}
        .button {float:right; padding:10px; margin:10px;}
        .form li {display:block; padding:5px 10px;}
        
        #search .button {margin:0; padding:1px 5px; float:none;}
        #comments p {border-bottom:1px solid #ddd;}
        #comments li {padding:5px; display:block;}er
        #comments li ul {padding:5px 0 0 30px;}
        #comments img {margin-right:5px; vertical-align:middle;}
        .comment {background:#eee;}
        .comment th, .comment td {text-align:left; vertical-align:top;
            padding:5px 10px;}
        .comment .button {margin-right:0px !important;}
        .author {background:#fafbd2;}
        ul .comment {display:none;}
        ul .posted {display:block !important;}
        .errorlist li {color:#f00; float:left; width:100%; 
            padding:0 !important;}
        
        .tag-weight-1 {font-size:80%;}
        .tag-weight-2 {font-size:120%;}
        .tag-weight-3 {font-size:160%;}
        .tag-weight-4 {font-size:200%;}
        
        .tweets li {font-size:70%; clear:both; margin-bottom:10px; 
            line-height:130%;}
        .tweets img {float:left; border:1px solid #000; margin:0 5px 5px 0;
            width:32px; height:32px;}
        .tweets .timespan {font-style:italic;}
        .recycle {font-size:150%;}
        .retweet  {float:none; margin-bottom:-5px; width:16px; height:16px;}
        .mezzanine {font-size:80%;}

        .form {background:#eee; border-bottom:1px solid #ccc; float:left;
            width:100%;}
        .form li ul, .form li li {display:inline;}
        .form li label {width:30%; float:left;}
        .form li li label {width:auto; float:none;cursor:pointer;}
        
        #search-results p {margin:5px 0;}

        legend {font-weight:bold; padding:15px 10px; font-size:130%;}
        .checkbox label {width:90% !important; margin-bottom:10px !important; 
            float:left;}
        .checkbox input {float:left;}

        #account, #cart-panel {margin:20px 0;}
        #cart-panel {background:#333; padding:10px;} 
        #cart-panel a {color:#eee; font-weight:bold; line-height:20px;}
        #product-images-thumb img {margin:10px; margin-left:0;}
        #variations {margin-bottom:20px;}

        #items {width:100%;}
        #items th, #items td {text-align:right; padding:5px; font-size:80%;}
        #items th {background:#ccc; white-space:nowrap;}
        .items-item {text-align:left !important; width:100%;}
        .items-item form {display:inline;}
        .items-item img {width:30px; height:30px; vertical-align:middle; 
            margin-right:5px;}
        .row1 {background:#eee;}
        .row2 {background:#ddd;}
        
        #checkout #grid-left *, #checkout #grid-right *, 
            #checkout #breadcrum-menu {display:none;}
        #card-fields p {float:left; margin:0;}
        #card-fields p label {display:none;}
        #card-fields p select {margin:0 5px 0 0;}
        
        .confirmation {margin:5px 10px;}

        .category .products li {float:left; margin:10px 15px 0 0; 
            padding:10px; text-align:center; background:#ddd; width:95px; 
            height:210px;}
        .category .products li .img {width:90px; height:90px; margin:auto; 
            padding:0 !important; border:2px solid #333; margin-bottom:5px;}
        .img img {margin:0;}
        .product-paging {float:left; margin-top:10px; width:100%;}
        .product-paging li {padding:0 5px;}
        .product-sorting, .product-paging {padding:10px !important; 
            background:#eee; float:left; width:100%; margin-bottom:10px; 
            border-top:1px solid #ddd;}
        .product-sorting p, .product-paging p, .product-sorting ul, 
            .product-paging ul {float:left; padding:0 5px 0 0px; margin:0; 
            font-size:.8em;}
        .category .price {font-size:.8em;}
        .old-price {text-decoration: line-through;}

    </style>
    <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">{% primary_menu %}</div>
<div class="container_12 clearfix">

    <div id="grid-left" class="grid_3 grid">{% tree_menu %}</div>

    <div id="grid-middle" class="grid_6 grid">
        <div class="gutter">
            <h1>{% block title %}{% endblock %}</h1>
            <div id="breadcrumb-menu">
                {% block breadcrumb_menu %}{% breadcrumb_menu %}{% 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 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="{{ 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">Powered by <a 
            href="http://mezzanine.jupo.org">Mezzanine</a></p>
    </div>

</div>
<div id="grid-bottom">
    <div class="container_12 clearfix">
        <div class="grid_6 push_3 grid">{% footer_menu %}</div>
    </div>
</div>

{% load_settings GOOGLE_ANALYTICS_ID %}
{% if GOOGLE_ANALYTICS_ID %}
<script> 
var _gaq = [['_setAccount', '{{ GOOGLE_ANALYTICS_ID }}'], ['_trackPageview']];
(function(d, t) {
var g = d.createElement(t),
    s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = '//www.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
{% endif %}

</body>
</html>

