<div class="navbar-fixed-top">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script>
		 $(document).ready(function(){
	   $('a[href^="#"]').on('click',function (e) {
	    e.preventDefault();
	    var target = this.hash;
	    var $target = $(target);
	    $('html, body').stop().animate({
	        'scrollTop': $target.offset().top
	    }, 900, 'swing', function () {
	        window.location.hash = target;
	    });
	});
});
</script>

<script>
$(window).scroll(function() {
    if($(this).scrollTop() > 12)  /*height in pixels when the navbar becomes non opaque*/
    {
        $('.opaque-navbar').addClass('opaque');
    } else {
        $('.opaque-navbar').removeClass('opaque');
    }
});
</script>

<style>

.dropdown-item{
	background-color: rgba(0,0,0,0.5) !important;
}

</style>

	<nav class="navbar navbar-inverse navbar-static-top opaque-navbar">
		<div class="container topnav">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<div class="brand">
					<a href="http://paintingdecoratingbk.co.uk/index.php"><img class="brand" align="left" src="http://paintingdecoratingbk.co.uk//images/logo.png" style="vertical-align: middle;margin-top:5px;margin-left:10px" height="57px"/></a>
				</div>
			</div>
				<div id="navbar" class="navbar-collapse collapse">
					<ul class="nav navbar-nav navbar-right line2" >
						<li style="margin:8px"><a class="line" href="#Service">Service</a></li>
						<li style="margin:8px"><a class="line" href="#AboutMe">About me</a></li>
						<li style="margin:8px"><a class="line" href="#OurWork" >Our Work</a></li>
						<li style="margin:8px"><a class="line" href="#Reviews">Reviews</a></li>
						<li style="margin:8px"><a class="line" href="#ContactUs">Contact us</a></li>
					
					      <?php
					      if(isset($_SESSION['admin'])): ?>
					      <li class="dropdown" style="margin: 8px;">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Admin <span class="caret"></span></a>
							  <ul class="dropdown-menu" style="background-color: rgba(0,0,0,0.5);">
							    <li><a class="dropdown-item" href="../admin/admin_panel.php">Admin Panel</a></li>
							    <li><a class="dropdown-item" href="../admin/add_image.php">Add Image</a></li>
							    <li><a class="dropdown-item" href="?logout=1">Log Out</a></li>
							  </ul>
						</li>
						<?php endif; ?>
					</ul>
				</div>
			</div>
		</nav>
	</div>