<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="{$smarty.const.RL_LANG_CODE|lower}">
<head>

<title>{if $pageInfo.meta_title}{$pageInfo.meta_title}{else}{foreach from=$title item='title_item' name='titleF'}{if $smarty.foreach.titleF.first}{$title_item}{else} &#171; {$title_item}{/if}{/foreach}{/if}</title>

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="generator" content="Flynax Classifieds Software" />
<meta charset="UTF-8" />
<meta http-equiv="x-dns-prefetch-control" content="on" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1" />

<meta name="description" content="{$pageInfo.meta_description|strip_tags|escape}" />
<meta name="Keywords" content="{$pageInfo.meta_keywords|strip_tags|escape}" />

{displayCSS mode='header'}

<link rel="shortcut icon" href="{$rlTplBase}img/favicon.ico" />

{if $pageInfo.canonical}
<link rel="canonical" href="{$pageInfo.canonical}" />
{/if}

{if $languages|@count > 1}
{foreach from=$languages item='lang_item'}
{if $hreflang[$lang_item.Code]}
<link rel="alternate" href="{$hreflang[$lang_item.Code]}" hreflang="{$lang_item.Code}" />
{else}
<link rel="alternate" href="{if $lang_url_home}{$lang_url_home}{else}{$smarty.const.RL_URL_HOME}{/if}{if $config.mod_rewrite}{$lang_item.dCode}{$pageLink|replace:'&':'&amp;'}{else}?language={$lang_item.Code}{/if}" hreflang="{$lang_item.Code}" />
{/if}
{/foreach}
{/if}
{if $rss && $pages.rss_feed}
<link rel="alternate" type="application/rss+xml" title="{$rss.title}" href="{getRssUrl}" />
{/if}

{if $smarty.const.RL_LANG_DIR == 'rtl'}
	{assign var='text_dir' value='right'}
	{assign var='text_dir_rev' value='left'}
{else}
	{assign var='text_dir' value='left'}
	{assign var='text_dir_rev' value='right'}
{/if}

<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0; url={$rlBase}templates/{$config.template}/browser-upgrade.htx" />
<style>{literal}body { display: none!important; }{/literal}</style>
<![endif]-->

<!--[if lt IE 9]>
<script src="{$rlTplBase}js/ie/css3-mediaqueries.js"></script>
<script src="{$rlTplBase}js/ie/html5shiv.js"></script>
<script src="{$rlTplBase}js/ie/selectivizr-min.js"></script>
<![endif]-->

<script src="{$smarty.const.RL_LIBS_URL}jquery/jquery.js"></script>
<script src="{$smarty.const.RL_LIBS_URL}javascript/system.lib.js"></script>
<script src="{$smarty.const.RL_LIBS_URL}jquery/jquery.ui.js"></script>
<script src="{$smarty.const.RL_LIBS_URL}jquery/datePicker/i18n/ui.datepicker-{$smarty.const.RL_LANG_CODE|lower}.js"></script>

{rlHook name='tplHeaderCommon'}

{include file='js_config.tpl'}

<script src="{$rlTplBase}js/lib.js"></script>

{rlHook name='tplHeader'}

{$ajaxJavascripts}

{assign var='side_bar_exists' value=false}
{if ($blocks.left && $pageInfo.Controller != 'home') || $pageInfo.Controller == 'listing_details'}
    {assign var='side_bar_exists' value=true}
{/if}

</head>
<body class="{$pageInfo.Key|replace:'_':'-'}-page{if (!$blocks.left || $pageInfo.Controller == 'listing_details') && $pageInfo.Key != 'search_on_map'} no-sidebar{/if}{if $config.header_banner_space} header-banner{/if}{if $pageInfo.Controller == 'listing_details' && $blocks.get_more_details} get-details-box{/if}" {if $smarty.const.RL_LANG_DIR == 'rtl'}dir="rtl"{/if}>
	<header>
		<section class="point1">
			<div id="logo">
				<a href="{$rlBase}" title="{$config.site_name}">
					<img alt="{$config.site_name}" src="{$rlTplBase}img/blank.gif" />
				</a>
			</div>
			
			{if $config.header_banner_space}
			<div id="header-banner">
				{include file='blocks'|cat:$smarty.const.RL_DS|cat:'header_banner.tpl'}
			</div>
			{/if}

			<div id="top-navigation" class="clearfix">
				{rlHook name='tplHeaderUserNav'}
				
				{if $pages.login}
				{include file='blocks'|cat:$smarty.const.RL_DS|cat:'user_navbar.tpl'}
				{/if}
				{include file='blocks'|cat:$smarty.const.RL_DS|cat:'lang_selector.tpl'}				
			</div>
		</section>
		<section class="main-menu">
			<nav class="point1 clearfix">
				<div class="kw-search">
					{strip}
					<span class="lens"><span></span></span>
				 	<span class="field">
						<form method="post" action="{$rlBase}{if $config.mod_rewrite}{$pages.search}.html{else}?page={$pages.search}{/if}">
							<input type="hidden" name="form" value="keyword_search" />
							{assign var='ks_phrase' value='blocks+name+keyword_search'}
							<input placeholder="{$lang.$ks_phrase}" id="autocomplete" type="text" maxlength="255" name="f[keyword_search]" {if $smarty.post.f.keyword_search}value="{$smarty.post.f.keyword_search}"{/if}/>
						</form>
					</span>
					{/strip}
					<span class="close"></span>
					
					<script>
						var view_details = '{$lang.view_details}';
						var join_date = '{$lang.join_date}';
						var category_phrase = '{$lang.category}';
					</script>
				</div>
				{include file='menus'|cat:$smarty.const.RL_DS|cat:'main_menu.tpl'}
			</nav>
		</section>
	</header>