<div class="wrapper">
	<nav class="navbar header header-homepage" role="navigation">
		<div class="container">
			<div class="navbar-header">
				<?php
				if($tpl['option_arr']['o_website_seo'] == 'No')
				{
					?>
			        <a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionIndex" class="logo"><img src="<?php echo PJ_INSTALL_URL . PJ_TEMPLATE_PATH . basename(dirname(dirname(__FILE__))); ?>/css/images/logo.png" alt=""></a>
			        <?php
		    	}else{
		    		?>
		    		<a href="index.html" class="logo"><img src="<?php echo PJ_INSTALL_URL . PJ_TEMPLATE_PATH . basename(dirname(dirname(__FILE__))); ?>/css/images/logo.png" alt=""></a>
					<?php
		    	} 
				?>
				<button class="navbar-toggle collapsed" data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
			</div><!-- /.Navbar-header -->
			
			<div class="nav-utility navbar-right">
				<ul>
					<?php
					if (isset($tpl['locale_arr']))
					{
						$cnt = count($tpl['locale_arr']);
						if ($cnt > 1)
						{
							$selected_title = null;
							$locale_id = $controller->getLocaleId();
							foreach ($tpl['locale_arr'] as $locale)
							{
								if($locale_id == $locale['id'])
								{
									$selected_title = $locale['title'];
								}
							}
							?>
							<li class="dropdown">
								<a class="dropdown-toggle" aria-expanded="false" role="button" data-toggle="dropdown" href="#">
									<?php echo $selected_title;?>
									<span class="caret"></span>
								</a>
								<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
									<?php
									foreach ($tpl['locale_arr'] as $locale)
									{
										?>
										<li role="presentation" class="text-right">
											<a role="menuitem"<?php echo $controller->getLocaleId() == $locale['id'] ? ' class="active"' : NULL;?> href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?controller=pjWebsite&amp;action=pjActionSetLocale&amp;locale=<?php echo $locale['id']; ?><?php echo isset($_GET['iframe']) ? '&amp;iframe' : NULL; ?>"><?php echo  $locale['title'];?></a>
										</li>
										<?php
									} 
									?>
								</ul>
							</li><!-- /.dropdown -->
							<?php
						}
					} 
					?>
				</ul>
			</div><!-- /.nav-utility -->

			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<?php
					if($tpl['option_arr']['o_website_seo'] == 'No')
					{ 
						?>
						<li<?php echo $_GET['action'] == 'pjActionIndex' ? ' class="active"' : NULL;?>><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionIndex"><?php __('ws_menu_home');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionYachts' && (isset($_GET['for']) && $_GET['for'] == 'rent')  ? ' class="active"' : NULL;?>><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionYachts&amp;listing_search=1&amp;for=rent"><?php __('ws_menu_for_rent');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionYachts' && (isset($_GET['for']) && $_GET['for'] == 'sale') ? ' class="active"' : NULL;?>><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionYachts&amp;listing_search=1&amp;for=sale"><?php __('ws_menu_for_sale');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionSearch' ? ' class="active"' : NULL;?>><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionSearch"><?php __('ws_menu_search');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionServices' ? ' class="active"' : NULL;?>><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionServices"><?php __('ws_menu_services');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionAboutUs' ? ' class="active"' : NULL;?>><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionAboutUs"><?php __('ws_menu_about_us');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionContactUs' ? ' class="active"' : NULL;?>><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionContactUs"><?php __('ws_menu_contact_us');?></a></li>
						<?php
						if($tpl['option_arr']['o_allow_add_listing'] == 'Yes')
						{
							?>
							<li<?php echo $_GET['action'] == 'pjActionAccount' ? ' class="active"' : NULL;?>><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjWebsite&amp;action=pjActionAccount"><?php __('ws_menu_my_account');?></a></li>
							<?php
						} 
					}else{
						?>
						<li<?php echo $_GET['action'] == 'pjActionIndex' ? ' class="active"' : NULL;?>><a href="index.html"><?php __('ws_menu_home');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionYachts' && (isset($_GET['for']) && $_GET['for'] == 'rent')  ? ' class="active"' : NULL;?>><a href="yachts-for-rent.html"><?php __('ws_menu_for_rent');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionYachts' && (isset($_GET['for']) && $_GET['for'] == 'sale') ? ' class="active"' : NULL;?>><a href="yachts-for-sale.html"><?php __('ws_menu_for_sale');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionSearch' ? ' class="active"' : NULL;?>><a href="search.html"><?php __('ws_menu_search');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionServices' ? ' class="active"' : NULL;?>><a href="services.html"><?php __('ws_menu_services');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionAboutUs' ? ' class="active"' : NULL;?>><a href="about-us.html"><?php __('ws_menu_about_us');?></a></li>
						<li<?php echo $_GET['action'] == 'pjActionContactUs' ? ' class="active"' : NULL;?>><a href="contact-us.html"><?php __('ws_menu_contact_us');?></a></li>
						<?php
						if($tpl['option_arr']['o_allow_add_listing'] == 'Yes')
						{
							?>
							<li<?php echo $_GET['action'] == 'pjActionAccount' ? ' class="active"' : NULL;?>><a href="my-account.html"><?php __('ws_menu_my_account');?></a></li>
							<?php
						}
					}
					?>
				</ul>
			</div><!-- /.navbar-collapse -->		

		</div><!-- /.container -->
	</nav><!-- /.nav -->