<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>{{ DJOBBERBASE_HTML_TITLE }}</title>
    <meta name="description" content="{% if selected_category %}{{ selected_category.description }}{% else %}{{ DJOBBERBASE_SITE_DESCRIPTION }}{% endif %}" />
    <meta name="keywords" content="{% if selected_category %}{{ selected_category.keywords }}{% else %}{%for keyword in DJOBBERBASE_SITE_KEYWORDS%}{{keyword}}{% if not forloop.last %},{% endif %}{%endfor%}{% endif %}" />
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/rss/all/" />
    <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{% if selected_category %} {% url djobberbase_feed selected_category.var_name %} {% else %} {% url djobberbase_feed 'all' %} {% endif %}" />
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script>    
 	<script src="/js/jquery.form.js" type="text/javascript"></script>
	<script src="/js/cmxforms.js" type="text/javascript"></script>
	<script src="/js/jquery.metadata.js" type="text/javascript"></script>
	<script src="/js/jquery.validate.min.js" type="text/javascript"></script>
	<script src="/js/functions.js" type="text/javascript"></script>
	<script type="text/javascript">
		Jobber.I18n = {"js": {"location_pick_from_list":"Pick one from the list","location_other":"other","send_to_friend_successful":"Your message was sent. Let\'s hope it doesn\'t get marked as spam!","send_to_friend_unsuccessful":"Your message could not be sent. Did you enter both addresses?","report_spam_successful":"Thank you, your vote was registered and is highly appreciated!","report_spam_unsuccessful":"Thank you for your intention, but your vote could not be registered.","delete_job_confirmation_question":"Are you sure you want to delete this post?"}};
	</script>
	
</head>

<body>

    <div style="font-size: 11px; background: #444; border-bottom: 1px solid #ccc; padding: 3px; color: #eee;">
        {% if messages %}
            {% for message in messages %}
                {{ message }}
            {% endfor %}
        {% endif %}
	</div>


    <div id="container">

    {% load djobberbase_tags %}

        <div id="header">
		    <h1 id="logo">
                <a href="{% url djobberbase_job_list %}" title="Djobberbase">
                    {{ DJOBBERBASE_SITE_NAME }}
                </a>
            </h1>
		    <ul id="top">
        		
		    </ul>

		    <div id="the_feed">
			    <a href="{% url djobberbase_feed 'all' %}" title="Subscribe to the RSS feed"><img src="/img/bt-rss.png" alt="RSS" /></a>
		    </div>
	    </div><!-- #header -->

        <div id="box">
			<div id="search">
				<form id="search_form" method="post" action="{% url djobberbase_job_search %}">
                {% csrf_token %}
					<fieldset>
						<div>
							<input type="text" name="keywords" id="keywords" maxlength="30" value="{%if keywords %}{{ keywords }}{% else %}Search for a job{% endif %}" />
							<span id="indicator" style="display: none;">
                                <img src="/img/ajax-loader.gif" alt="" />
                            </span>
						</div>
						<div><label class="suggestionTop">(e.g. &quot;django&quot;, &quot;python developer&quot;)</label></div>
					</fieldset>
				</form>
			</div><!-- #search -->

			<div class="addJob">
				<a href="{% url djobberbase_job_post %}" title="Post a new job" class="add">
                    Post a new job
                </a>
			</div><!-- .addJob -->
		</div><!-- #box -->    

    <div id="categs-nav">
    	<ul>

        {% get_categories %}

            {% for category in categories %}

			<li id="{{ category.var_name }}" {% if category.var_name == selected_category.var_name %}class="selected"{% endif %}>
                <a href="{% url djobberbase_job_list_category category.var_name %}" title="{{ category }}">
                <span>{{ category }}</span>
                <span class="cnr">&nbsp;</span>
                </a>
            </li>

            {% endfor %}
		
    	</ul>
	</div><!-- #categs-nav -->

	<div class="clear">
    </div>

    <div id="sidebar"> 
	    <br /> 
	    <div id="stats"> 
		    <strong>{{ total_jobs }} total jobs</strong> 
		    <br />
            {% for category in categories %}
                <strong>{{ category.get_total_jobs }}</strong>
                <a href="{% url djobberbase_job_list_category category.var_name %}">{{ category }}</a>
                <br />
            {% endfor %}
	    </div><!-- #stats --> 
    </div><!-- #sidebar -->	

    <div id="content"> 
        {% block content %}
        {% endblock %}
    </div><!-- #content -->

    </div><!-- #container -->

    <div class="footer"> 
		<div id="footer-contents"> 
			<div id="footer-col1"> 
            Use:<br /> 
            <a href="{% url djobberbase_cities_list %}">Cities</a>
            <br />
            <a href="{% url djobberbase_jobs_in_other_cities %}">Jobs in other cities</a>
            <br />    
            <a href="{% url djobberbase_companies %}">Companies</a>
            <br />
            <a href="/admin">Admin</a>
            <br />
            </div>
			<div id="footer-copyright">
                <p>
                Made with:
                </p>
                <a href="http://www.python.org/">
                    <img src="/img/logo_python.png" border="0" alt="Made with Python." title="Made with Python." />
                </a>
                &nbsp;&nbsp;&nbsp;
                <a href="http://www.djangoproject.com/">
                    <img src="/img/logo_django.png" border="0" alt="Made with Django." title="Made with Django." />
                </a>
			</div> 
			<div class="clear"></div> 
		</div><!-- #footer-contents --> 
	</div><!-- .footer --> 
	
	<script type="text/javascript"> 
		//<![CDATA[
		
 		$(document).ready(function()
		{
		   var keywords = $('#keywords');
			// setup search box
			keywords.bind('click', function() {
				if (this.value == 'Search for a job')
				{
					keywords.clearFields();
				}
			});
 
			keywords.bind('blur', function() {  
				if (this.value == 'Search for a job' || this.value == '')
				{
					this.value = 'Search for a job';
				}
			});
 
			// setup live search
            // no live search yet for djobberbase
            /*
			keywords.keyup(function(key) {
				var searchKeywords = jQuery.trim(this.value);
				var len = searchKeywords.length;
				
			    if (key.keyCode != 9 && len >= 3)
				{
					$("#indicator").show();	
					clearTimeout(window.search_timer);	
					window.search_timer = setTimeout(function(){Jobber.PerformSearch('http://www.jobberbase.com/demo/search/home|', searchKeywords)}, 800);
			    }
			});
            */

		});
		Jobber.jobber_url = "http://www.jobberbase.com/demo/";
		//]]>
	</script> 

</body> 

</html>
