<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- base_content.html -->
{% load i18n extra_tags extra_filters markup ui_registry %}
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>{% block after_head_js %}{% endblock %}
        <title>{% block fulltitle %}{% block title %}{% endblock %} - {{ settings.APP_SHORT_NAME }}{% endblock %}</title>
        <meta name="description" content="{% block metadescription %}{{ settings.APP_DESCRIPTION }}{% endblock %}" />
        <meta name="keywords" content="{% block metakeywords %}{{ settings.APP_KEYWORDS }}{% endblock %}" />
        {% block meta %}{% endblock %}
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        {% if settings.GOOGLE_SITEMAP_CODE %}
        <meta name="google-site-verification" content="{{ settings.GOOGLE_SITEMAP_CODE }}" />
        {% endif %}
        <link rel="shortcut icon" href="{{ settings.APP_FAVICON }}" />
        <link href="{% media  "/media/style/style.css" %}" rel="stylesheet" type="text/css" />
        {% if settings.USE_CUSTOM_CSS|or_preview:request %}
        <link href="{% url custom_css %}" rel="stylesheet" type="text/css" />
        {% endif %}
        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" />
        <!--[if IE 6]>
        <style type="text/css">
        img, div, a { behavior: url({% media "/media/iepngfix/iepngfix.htc" %}) }
        </style>
        <![endif]-->
        {% block forestyle %}{% endblock %}

        <script src="http://www.google.com/jsapi" type="text/javascript"></script>
        <script type="text/javascript">
        /*<![CDATA[*/
            google.load("jquery", "1");
            google.load("jqueryui", "1", {autoload:true});

            var i18nLang = '{{ settings.LANGUAGE_CODE }}';
            var appUrl = '{{ settings.APP_URL }}'
            var scriptUrl = '{{ settings.FORCE_SCRIPT_NAME }}/'
            var osqaSkin = '{{ settings.OSQA_SKIN }}';

            var messages = {
                username: '{{ user.username }}',
                confirm: "{% trans "Are you sure?" %}",
                yes: "{% trans "Yes" %}",
                no: "{% trans "No" %}",
                message: "{% trans "Message:" %}",
                cancel: "{% trans "Cancel" %}",
                close: "{% trans "Close" %}",
                ok: "{% trans "Ok" %}",
                matching_tags_url: "{% url matching_tags %}",
                word: "{% trans "word" %}",
                words: "{% trans "words" %}",
                character: "{% trans "character" %}",
                characters: "{% trans "characters" %}"
            }
        /*]]>*/
        </script>
        <script type="text/javascript" src="{% media  "/media/js/accessibility.js" %}"></script>
        <script type="text/javascript" src="{% media  "/media/js/cookies.js" %}"></script>
        <script type="text/javascript" src="{% media  "/media/js/osqa.main.js" %}"></script>
        {% if user_messages %}
        <script type="text/javascript">
            $(document).ready(function() {
                var element = $('#validate_email_alert');
                element.click(function(){notify.close(true);})
                notify.show();
            });
        </script>
        {% endif %}
        {% if settings.USE_CUSTOM_HEAD|or_preview:request %}
            {{ settings.CUSTOM_HEAD|or_preview:request|safe }}
        {% endif %}
        {% block forejs %}{% endblock %}
        <script type="text/javascript" src="{% media  "/media/js/l18n-it.js" %}"></script>
        <link rel="search" type="application/opensearchdescription+xml" href="{% url opensearch %}" title="{{ settings.APP_SHORT_NAME }} Search" />
        {% loadregistry head_content %}{% endloadregistry %}
    </head>
    <body>
        <div class="wrapper">
        {% if settings.USE_CUSTOM_HEADER|or_preview:request %}
            <div id="custom_header">
                {{ settings.CUSTOM_HEADER|or_preview:request|static_content:settings.CUSTOM_HEADER_RENDER_MODE }}
            </div>
        {% endif %}
        {% include "header.html" %}
        <div id="content">
        <div id="content-top"></div>
        <div id="content-center">
        {% if settings.USE_ANNOUNCEMENT_BAR|or_preview:request %} 
            <div id="announcement"> 
                {{ settings.ANNOUNCEMENT_BAR|or_preview:request|static_content:settings.ANNOUNCEMENT_BAR_RENDER_MODE }} 
            </div> 
        {% endif %}
         <div class="notify" style="display:none">
            {% autoescape off %}
                {% if user_messages %}
                    {% for message in user_messages %}
                          <p class="darkred">{{ message }}</p>
                    {% endfor %}
                {% endif %}
            {% endautoescape %}
            <a id="close-notify" onclick="notify.close(true)"></a>
        </div>
        {% block page_center %}
        <div id="wrapper">
            <div id="room">
        
                <div id="CAFull">
                    {% block content%}
                    {% endblock%}

                </div>
                <div id="tail" style="clear:both;">
                    {% block tail %}
                    {% endblock %}
                </div>
            </div>
            <!--<div class="spacer3"></div>-->
        </div>
        {% endblock %}
    </div>
    <div id="content-bottom"></div>
</div>
        {% if settings.USE_CUSTOM_FOOTER|or_preview:request %}
            {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "above" %}
                <div id="custom_footer">
                    {{ settings.CUSTOM_FOOTER|or_preview:request|static_content:settings.CUSTOM_FOOTER_RENDER_MODE }}
                </div>
                {% endifequal %}
            <div id="ground">
                {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "replace" %}
                    {{ settings.CUSTOM_FOOTER|or_preview:request|static_content:settings.CUSTOM_FOOTER_RENDER_MODE }}
                {% else %}
                    {% include "footer.html" %}
                {% endifequal %}
            </div>
            {% ifequal settings.CUSTOM_FOOTER_MODE|or_preview:request "below" %}
                <div id="custom_footer">
                    {{ settings.CUSTOM_FOOTER|or_preview:request|static_content:settings.CUSTOM_FOOTER_RENDER_MODE }}
                </div>
            {% endifequal %}
            {% else %}
            <div id="ground">
                {% include "footer.html" %}
            </div>
        {% endif %}
        {% block endjs %}
        {% endblock %}
        {% if settings.GOOGLE_ANALYTICS_KEY %}
            <script type="text/javascript">
                var _gaq = _gaq || [];
                _gaq.push(['_setAccount', '{{ settings.GOOGLE_ANALYTICS_KEY }}']);
                _gaq.push(['_trackPageview']);

                (function() {
                    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                })();
            </script>
        {% endif %}
        </div>

        <!-- Put all elements with fixed position here, IE6 fixed position fix: http://ryanfait.com/position-fixed-ie6/ -->
    </body>
</html>
<!-- end template base_content.html -->
