
<div class="row header-bg">
	<div class="topAdvanced-overlay"></div>
	<div class="container-fluid topAdvanced-navbar container">
		<div class="row">
			<div class="col-md-offset-2- col-md-2 topAdvanced-logoWrapper">
				<a href="<?php echo base_url(); ?>">
					<img class="topAdvanced-logo" src="<?php echo base_url() ?>/img/logo-dark-colored.png" height="25px">
				</a>
			</div>
			<div class="col-md-offset-2- col-md-6 topAdvanced-searchWrapper">
				<div class="form-group topAdvanced-searchContainer">
					<form action="<?php echo base_url(); ?>/search" method="GET" id="topAdvanced-search" type="get">
						<input id="topAdvanced-searchInput" type="text" class="form-control topAdvanced-search" id="search" placeholder="SEARCH" name="search">
						<i class="fa fa-search" aria-hidden="true"></i>
					</form>
					<br style='clear:both' />
				</div>
			</div>
			<div class="col-xs-6 col-md-2 topAdvanced-searchCloseWrapper">
				<div class="pull-left topAdvanced-searchClose">
					<span class="glyphicon glyphicon-remove"></span>
				</div>
				<div class="clearfix"></div>
			</div>
			<div class="col-xs-6 col-md-1 topAdvanced-browseWrapper">
				<div class="dropdown topAdvanced-dropdown">
					<button class="dropdown-toggle" type="button" data-toggle="dropdown">

						<!--<img src="<?php echo base_url() ?>/img/icon-browse.png" height="15">-->
						BROWSE
						<!--						<span class="caret"></span>-->
						<i class="fa fa-caret-down" aria-hidden="true"></i>
					</button>
					<ul class="dropdown-menu">
						<?PHP
						foreach ($_categories as $category) {
							?>
							<li class="topAdvanced-browseItems">
								<a href="<?php echo base_url(); ?>search?categories=<?php echo $category['id']; ?>">
									<div class="pull-left menu-icon">
										<span class="topAdvanced-browseIcons">
											<img src="<?php echo base_url() . $category['image']; ?>" alt="">
										</span>
									</div>
									<div class="pull-left menu-text">
										<?php echo $category['title']; ?>
									</div>

								</a>
							</li>
							<?php
						}
						?>
					</ul>
				</div>
			</div>
			<?php
			if(!empty($my_user)){
				?>
				<div class="col-xs-6 col-md-2 topAdvanced-userWrapper">
					<div class="dropdown">
						<button class="dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
							
							<div class="pull-left topAdvanced-userWrapperName">Welcome <b><?php echo $my_user->first_name; ?></b><i class='fa fa-user-circle'></i></div>
							<div class="clearfix"></div>
						</button>
						<ul class="dropdown-menu">
							<li>
								<a href="<?php echo base_url(); ?>my_videos?videos=later">
									<i class="topAdvanced-userIcons glyphicon glyphicon-certificate"></i>
									Watch Later
								</a>
							</li>
							<li>
								<a href="<?php echo base_url(); ?>my_videos?videos=likes">
									<i class="topAdvanced-userIcons glyphicon glyphicon-certificate"></i>
									Liked Videos
								</a>
							</li>
							<li>
								<a href="<?php echo base_url(); ?>/logout">
									<i class="topAdvanced-userIcons glyphicon glyphicon-certificate"></i>
									SIGN OUT
								</a>
							</li>
						</ul>
					</div>
				</div>
				<?php
			}else{
				?>
				<div class="col-xs-3 col-md-1 topAdvanced-loginWrapper">
					<a role="button" class="topAdvanced-loginLink" href="<?php echo base_url(); ?>/login-signup">
						LOGIN <i class="fa fa-sign-in" aria-hidden="true"></i>
					</a>
				</div>
				<div class="col-xs-3 col-md-1 topAdvanced-signinWrapper">
					<a role="button" class="topAdvanced-signinLink" href="<?php echo base_url(); ?>/login-signup">
						REGISTER
					</a>
				</div>
				<?php
			}
			?>

		</div>
	</div>
</div>