<div class="ylNavBar">
	<nav class="ylNav">
		<a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjListings&amp;action=pjActionIndex&amp;listing_search=1&amp;for=rent"<?php echo isset($_GET['for']) && $_GET['for'] == 'rent' ? ' class="ylActive"' : null; ?>><?php echo $listing_for['rent'];?></a>
		<a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjListings&amp;action=pjActionIndex&amp;listing_search=1&amp;for=sale"<?php echo isset($_GET['for']) && $_GET['for'] == 'sale' ? ' class="ylActive"' : null; ?>><?php echo $listing_for['sale'];?></a>
	</nav><!-- /.nav -->				
	
	<div class="ylNavSecondary">
		<?php
		if (isset($tpl['locale_arr']))
		{
			if (count($tpl['locale_arr']) > 1)
			{
				$locale_id = $controller->pjActionGetLocale();
				$selected_lang = '';
				$selected_flag = '';
				foreach ($tpl['locale_arr'] as $locale)
				{
					if($locale_id == $locale['id'])
					{
						$selected_lang = pjSanitize::html($locale['title']);
						$selected_flag = PJ_INSTALL_URL . PJ_FRAMEWORK_LIBS_PATH . 'pj/img/flags/'. $locale['file'];
					}
				}
				?>
				<a href="javascript:void(0);" class="ylActive"><img src="<?php echo $selected_flag;?>" alt="" height="24" width="24"/> <?php echo $selected_lang;?></a>
				<ul>
					<?php
					foreach ($tpl['locale_arr'] as $k => $locale)
					{
						$flag = PJ_INSTALL_URL . PJ_FRAMEWORK_LIBS_PATH . 'pj/img/flags/'. $locale['file'];
						?>
						<li>
							<a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?controller=pjListings&amp;action=pjActionSetLocale&amp;locale=<?php echo $locale['id']; ?><?php echo isset($_GET['iframe']) ? '&amp;iframe' : NULL; ?>">
								<img src="<?php echo $flag;?>" alt="" height="24" width="24"/> <?php echo pjSanitize::html($locale['title']); ?>
							</a>
						</li>
						<?php
					}
					?>
				</ul>
				<?php
			}
		} 
		?>
	</div><!-- /.ylNavSecondary -->	
	<div class="ylSearch">
		<form id="frmSearch" name="frmSearch" action="#" method="get">
			<input type="hidden" value="pjListings" name="controller">
			<input type="hidden" value="pjActionIndex" name="action">
			<input type="hidden" value="1" name="listing_search">
			<label for="q" class="ylIco ylIcoSearch"><?php __('front_search');?></label>

			<input name="keyword" placeholder="<?php __('front_search');?>" class="ylSearchField" type="text">

			<input value="GO" class="ylBtnSearch" type="submit">
		</form>
	</div><!-- /.ylSearch -->
</div><!-- /.ylNavBar -->