{ifset $registerErrors}
<div id="ait-dir-register-notifications" class="error">
	<div class="message defaultContentWidth">
	{!$registerErrors}
	<div class="close"></div>
	</div>
</div>
{/ifset}

{ifset $registerMessages}
<div id="ait-dir-register-notifications" class="info">
	<div class="message defaultContentWidth">
	{!$registerMessages}
	<div class="close"></div>
	</div>
</div>
{/ifset}

<header id="branding" role="banner">
	<div class="defaultContentWidth clearfix">

		{if !empty($themeOptions->general->topBarContact)}

			<p class="info">{$themeOptions->general->topBarContact}</p>
			{include 'social-icons.php'}
			{if !is_admin()}
				{include 'wpml-flags.php'}
			{/if}
			<!-- {include 'search-form.php'} -->

		{/if}

		<div id="logo">
			{if is_admin()}
				{if !empty($themeOptions->general->easyadmin_logo_img)}
				<a class="trademark" href="{$homeUrl}">
					<img src="{linkTo $themeOptions->general->easyadmin_logo_img}" alt="logo" />
				</a>
				{else}
				<a href="{$homeUrl}">
					<span>{$themeOptions->general->logo_text}</span>
				</a>
				{/if}
			{else}
				{if !empty($themeOptions->general->logo_img)}
				<a class="trademark" href="{$homeUrl}">
					<img src="{linkTo $themeOptions->general->logo_img}" alt="logo" />
				</a>
				{else}
				<a href="{$homeUrl}">
					<span>{$themeOptions->general->logo_text}</span>
				</a>
				{/if}
			{/if}
		</div>
	</div>
		
</header><!-- #branding -->

<div class="page-shadow">

<nav id="access" class="clear" role="navigation">
	{if !is_admin()}
		<h3 class="assistive-text">{__ 'Main menu'}</h3>
		{menu 'theme_location' => 'primary-menu', 'fallback_cb' => 'default_menu', 'container' => 'nav', 'container_class' => 'mainmenu', 'menu_class' => 'menu' }
	{else}
		<!-- EASY ADMIN MENU -->
		{var $screen = get_current_screen()}
		{var $subscriber = in_array('subscriber', $GLOBALS['current_user']->roles)}

		{if !$subscriber}
		<a href="{!admin_url('edit.php?post_type=ait-dir-item')}" class="items button{if (($screen->base == 'edit' && $screen->post_type == 'ait-dir-item') || ($screen->base == 'post' && $screen->post_type == 'ait-dir-item'))} button-primary{/if}">
			{__ 'My Items'}
		</a>
		<a href="{!admin_url('edit.php?post_type=ait-dir-item-offer')}" class="item-offers button{if (($screen->base == 'edit' && $screen->post_type == 'ait-dir-item-offer') || ($screen->base == 'post' && $screen->post_type == 'ait-dir-item-offer'))} button-primary{/if}">
			{__ 'Item Offers'}
		</a>
		<a href="{!admin_url('edit.php?post_type=ait-tour-reservation')}" class="reservations button{if (($screen->base == 'edit' && $screen->post_type == 'ait-tour-reservation') || ($screen->base == 'post' && $screen->post_type == 'ait-tour-reservation'))} button-primary{/if}">
			{__ 'Reservations'}
		</a>
		{ifset $themeOptions->rating->enableRating}
		<a href="{!admin_url('edit.php?post_type=ait-rating')}" class="ratings button{if ($screen->base == 'edit' && $screen->post_type == 'ait-rating')} button-primary{/if}">
			{__ 'Ratings'}
		</a>
		{/ifset}
		{/if}
		<a href="{!admin_url('profile.php')}" class="account button{if ($screen->base == 'profile')} button-primary{/if}">
			{__ 'Account'}
		</a>
		<a href="{home_url()}" class="view-site button">
			{__ 'View site'}
		</a>

		{if is_user_logged_in()}
		<a href="{!wp_logout_url(home_url())}" class="menu-login menu-logout">{__ "Logout"}</a>
		{/if}
	{/if}
</nav><!-- #accs -->