<?php
if (!isset($_SESSION)) {
	@session_start();
}
global $website_options;
$website_title = !empty($website_title) ? $website_title : "BASE Cross-Platform Framework";
//$website_title = !empty($website_title) ? $website_title : $website_options['website_title'];
$website_description = !empty($website_description) ? $website_description : $website_options['website_description'];
$website_image = !empty($website_image) ? $website_image : "https://basepages.com/share_base.png";
ini_set('display_errors', 'Off');
if (!$_SESSION['user']['id']) {
	//handleReferralLogic();
}
?>
<!DOCTYPE html>
<!-- should it be this? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">-->
<html>
<head>
	<!-- Google tag (gtag.js) -->

	<title><?= $website_title ?></title>
	<meta charset="utf-8">

	<!--<meta name="apple-itunes-app" content="app-id=6472619013">-->

	<meta name="google-site-verification" content="" />
	<meta name="viewport" content="width=device-width, initial-scale = 1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
	<meta name="apple-touch-fullscreen" content="yes">

	<!-- new stuff -->
	<link rel="manifest" href="manifest.json">
	<meta name="mobile-web-app-capable" content="yes">
	<meta name="application-name" content="FantasyTrivia">
	<meta name="apple-mobile-web-app-title" content="FantasyTrivia">
	<meta name="msapplication-starturl" content="https://fantasytrivia.com">
	<!-- new stuff ends -->

	<script src="/static/js/stay_standalone.js" type="text/javascript"> </script>
	<!--<meta name="theme-color" content="#000" />-->
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
	<meta name="apple-mobile-web-app-title" content="<?= $website_options['short_title'] ?>">

	<!--<script type="text/javascript" src="https://js.stripe.com/v2/"></script>-->

	<meta name="keywords" content="<?= $website_options['website_keywords'] ?>" />
	<meta name="description" content="<?= $website_options['website_description'] ?>" />

	<?php
	if ($_SESSION['user']['id']) : ?>
	<meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>/r/<?= $_SESSION['user']['ref'] ?>" />
	<?php else : ?>
	<meta property="og:url" content="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" />
	<?php
endif; ?>

	<meta property="og:type"          content="website" />
	<meta property="og:title"         content="<?= $website_title ?>" />
	<meta property="og:description"   content="<?= $website_description ?>" />
	<meta property="og:image"         content="<?= $website_image ?>" />
	<meta property="og:image:url"	  content="<?= $website_image ?>" />
	<meta property="og:image:alt"	  content="BASE" />
	<!--<meta property="og:image"	  content="https://basepages.com/share_base.png" />-->
	<meta property="fb:app_id" 		  content="343621772671036" />

	<!--	<?php if (preg_match("/^\/category\/all(\?.+)?/", substr($_SERVER['REQUEST_URI'], 0, 9))) { ?>
	<link href="https://flipmob.com/mob/all" rel="canonical">
	<? } ?>-->

	<!-- CHECK THE URL, WHICH HELPS WITH CONDITIONAL TAGS -->
	<!--<?php $is_listings = (bool) preg_match("/^\/listings(\?.+)?/", substr($_SERVER['REQUEST_URI'], 0, 9)); ?>-->
	<!--	<?php echo $_SERVER['REQUEST_URI'] . "<br />"; ?>
	<?php echo substr($_SERVER['REQUEST_URI'], 0, 9) . "<br />"; ?>
	<?php echo "Listings:" . $is_listings; ?>-->

	<!--<link href="https://flipmobs.com/listings" rel="canonical">-->

	<link rel="preconnect" href="https://fonts.googleapis.com">
	<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
	<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
	<link href='//fonts.googleapis.com/css?family=Oswald:400,700' rel='stylesheet' type='text/css'>
	<link href='//fonts.googleapis.com/css?family=Raleway:400,700' rel='stylesheet' type='text/css'>
	<link href='//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300' rel='stylesheet' type='text/css'>

	<link rel="stylesheet" href="/static/css/normalize.css"/>
	<link rel="stylesheet" href="/static/css/jquery.sidr.light.css"/>
	<link rel="stylesheet" href="/static/css/animate.min.css"/>
	<link rel="stylesheet" href="/static/css/md-slider.css"/>
	<link rel="stylesheet" href="/static/css/responsiveslides.css"/>
	<link rel="stylesheet" href="/static/css/style.css"/>

	<script src="https://kit.fontawesome.com/528dc48127.js" crossorigin="anonymous"> </script>
	<!--<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">-->
	<!--<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.6.0/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">-->

	<link rel="icon" type="image/x-icon" href="/<?= $website_options['website_favicon'] ?>" />
	<link rel="icon" type="image/png" href="/<?= $website_options['website_favicon'] ?>" sizes="16x16" />
	<link rel="icon" type="image/png" href="/favicon.png" sizes="32x32" />
	<link rel="shortcut icon" href="<?= $website_options['website_favicon'] ?>" type="image/x-icon" />
	<link rel="apple-touch-icon" sizes="57x57" href="/<?= $website_options['mobile_logo_57x57'] ?>" />
	<link rel="apple-touch-icon" sizes="72x72" href="/<?= $website_options['mobile_logo_72x72'] ?>" />
	<link rel="apple-touch-icon" sizes="76x76" href="/<?= $website_options['mobile_logo_76x76'] ?>" />
	<link rel="apple-touch-icon" sizes="114x114" href="/<?= $website_options['mobile_logo_114x114'] ?>" />
	<link rel="apple-touch-icon" sizes="120x120" href="/<?= $website_options['mobile_logo_120x120'] ?>" />
	<link rel="apple-touch-icon" sizes="144x144" href="/<?= $website_options['mobile_logo_144x144'] ?>" />
	<link rel="apple-touch-icon" sizes="152x152" href="/<?= $website_options['mobile_logo_152x152'] ?>" />

	<link rel="stylesheet" type="text/css" href="/static/js/addtohomescreen.css">
	<script src="/static/js/addtohomescreen.js"> </script>
	<script type="application/javascript" >
		addToHomescreen();
	</script>

	<!-- lightbox
	<script type="text/javascript" src="/static/js/jquery.lightbox.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
	<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" />	 -->

	<script type="text/javascript" charset="utf-8">
		//window.onload = function() {
		//  setTimeout(function(){window.scrollTo(0, 0);}, 100);
		//}
	</script>

	<!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>	-->

	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"> </script>
	<!--<script>var jQuery = $.noConflict(true); </script>-->
	<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"> </script>

	<script type="text/javascript">
		$(document).ready(function() {

			//jQuery.noConflict();
			if ($(window).width() <= 480) {
				var cookie=2;

				// if cookie is a string
				//  if the string is a number = the number of days before showing, ie '1',
				//  if the string is 'always' = show ever time,
				// or show once per session,
				// if cookie is a string number
				// the number is the display frequency, ie if cookie = 10 show 1 in 10 page loads

				var id = 'dialog';
				if ((typeof(cookie)=='number'&&Math.floor(Math.random()*cookie)==0)||(mycookie(id)==null||cookie=='always')) {
					typeof(cookie)=='string'?document.cookie=id+'=true;'+(isFinite(cookie)?'expires='+(new Date(new Date().getTime()+cookie*86400000).toGMTString())+';path=/':''):null;

					//transition effect
					$('#mask').fadeIn(0);
					$('#mask').fadeTo("fast",0.85);

					//transition effect
					$('#'+id).fadeIn(0);

					//if close button is clicked
					$('.window .close').click(function (e) {
						//Cancel the link behavior
						e.preventDefault();

						$('#mask').hide();
						$('.window').hide();
					});

					//if mask is clicked
					$('#mask').click(function () {
						$(this).hide();
						$('.window').hide();
					});

					//enter buttons opens overlay
					$('#ol').click(function () {
						//transition effect
						$('#mask').fadeIn(1000);
						$('#mask').fadeTo("slow",0.85);

						//transition effect
						$('#'+id).fadeIn(2000);
					});
				}
			}
		});

		function mycookie(nme)
		{
			var re=new RegExp(nme+'=[^;]+','i');
			return document.cookie.match(re)?document.cookie.match(re)[0].split("=")[1]:null;
		}
	</script>
	<!-- lightbox -->

	<!--[if lte IE 7]>
	<link rel="stylesheet" href="/static/css/ie7.css"/>
	<![endif]-->
	<!--[if lte IE 8]>
	<link rel="stylesheet" href="/static/css/ie8.css"/>
	<![endif]-->
	<link rel="stylesheet" href="/static/css/responsive.css"/>
	<!--[if lt IE 9]>
	<script type="text/javascript" src="/static/js/html5.js"></script>
	<![endif]-->
	<script type="text/javascript" src="/static/js/raphael-min.js"> </script>

	<link rel="stylesheet" href="/static/css/normalize.css"/>
	<link rel="stylesheet" href="/static/css/jquery.sidr.light.css"/>
	<link rel="stylesheet" href="/static/css/style.css"/>
	<!--[if lte IE 7]>
	<link rel="stylesheet" href="/static/css/ie7.css"/>
	<![endif]-->
	<!--[if lte IE 8]>
	<link rel="stylesheet" href="/static/css/ie8.css"/>
	<![endif]-->
	<link rel="stylesheet" href="/static/css/responsive.css"/>
	<!--[if lt IE 9]>
	<script type="text/javascript" src="/static/js/html5.js"></script>
	<![endif]-->


	<style type="text/css">
		#wrapper {
			overflow: hidden;
		}
		.wrap-top-menu {
			padding-top: constant(safe-area-inset-top);
			margin-top: -constant(safe-area-inset-top);
		}
		#header .top-message a {
			color: #ddd;
	font-weight: 400 !important;
		}
		#header .top-message a:hover {
			color: #fff;
		}
		.backarrowdiv {
			display: none;
		}
		a.logoutbtn {
			color: #ff0000 !important;
		}
		a.logoutbtn:hover {
			color: #fff !important;
		}
		#overlaystyle {
			color: #fff;
			font-family: oswaldlight,Futura-Medium,sans-serif;
		}
		.btn-toogle-menu {
			margin-right: 15px;
		}
		.nav-horizontal > li > a {
			font-weight: 400 !important;
			font-size: 14px;
	text-transform: uppercase;
			font-family: Montserrat,Raleway,'Open Sans',Helvetica,Verdana,oswald,sans-serif !important;
		}
		hr.sidr-class-custom {
			border: 0;
			height: 1px;
			background-image: linear-gradient(to right, rgba(128, 128, 128, 0), rgba(128, 128, 128, 0.75), rgba(128, 128, 128, 0));
			width: 85%;
		}
		.marketplacediv a, .marketplacediv a:active, .marketplacediv a:visited, .marketplacediv a:link {
			color: #92999d;
		}
		.marketplacediv a:hover {
			color: #fff;
		}
		.applogo {
			display: inline-block;
	margin: 6px auto 0 !important;
	text-align: center;
	background: none;
	width: 200px;
	height: 30px;
	overflow: hidden;
	margin-right: -105px !important;
		}
		.button a,.button a:active, .button a:visited {
			-webkit-appearance: none;
			height: auto;
			width: auto;
			padding: 20px 25px;
			font-size: 20px !important;
			font-weight: normal;
			text-decoration: none;
			background: #6BB130;
			border: 1px solid #6BB130;
			border-bottom: 0px solid #619E2C !important;
			color: #fff;
			font-family: Montserrat-Light,Augustus,Futura-Medium,oswald,serif !important;
			text-shadow: 0px -1px 1px rgba(0,0,0,.3);
			border-radius: 5px;
			-moz-border-radius: 5px;
			-webkit-border-radius: 5px;
		}
		.submit, .submit a, .submit a:active, .submit a:visited {
			-webkit-appearance: none;
			height: auto;
			width: auto;
			padding: 9px 15px;
			font-size: 15px;
			font-weight: normal;
			text-decoration: none;
			background: #6BB130;
			border: 1px solid #6BB130;
			border-bottom: 0px solid #619E2C !important;
			color: #fff;
			font-family: Montserrat-Light,oswald,Futura-Medium,oswald,serif !important;
			text-shadow: 0px -1px 1px rgba(0,0,0,.3);
			border-radius: 5px;
			-moz-border-radius: 5px;
			-webkit-border-radius: 5px;
		}
		#maski {
			display: none;
			position: absolute;
			left: 0;
			top: 0;
			bottom: 0;
			z-index: 90000;
			background: url(/static/images/diag.png);
			/*background-color:#000;
			opacity: 0.85;*/
			display: none;
			width: 100%;
			height: 100%;
		}
		#boxes .window {
			position: absolute;
			left: 0;
			top: 0;
			bottom: 0;
			width: 100%;
			height: 100%;
			overflow: hidden;
			display: none;
			z-index: 99999;
			padding: 0;
		}
		#boxes #dialog {
			display: none;
			position: absolute;
			left: 0;
			top: 0;
			right: 0;
			bottom: 0;
			height: auto;
			width: auto;
			overflow: hidden;
		}

		hr.style-two {
			border: 0;
			height: 1px;
			width: 90%;
			background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
			background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
			background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
			background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
		}

		.btn-gold {
			border-color: #8E8E63;
			color: #FFF;
			background: #c6c687;
			background: -moz-linear-gradient(top, #AFAF79 0%, #c6c687 100%);
			background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#AFAF79), color-stop(100%,#c6c687));
			background: -webkit-linear-gradient(top, #AFAF79 0%,#c6c687 100%);
			background: -o-linear-gradient(top, #AFAF79 0%,#c6c687 100%);
			background: -ms-linear-gradient(top, #AFAF79 0%,#c6c687 100%);
			background: linear-gradient(top, #AFAF79 0%,#c6c687 100%);
			filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#AFAF79', endColorstr='#c6c687',GradientType=0 );
		}
		.btn-gold:hover {
			background: #D3D394;
			background: -moz-linear-gradient(top, #D3D394 0%, #AFAF79 100%);
			background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#D3D394), color-stop(100%,#AFAF79));
			background: -webkit-linear-gradient(top, #D3D394 0%,#AFAF79 100%);
			background: -o-linear-gradient(top, #D3D394 0%,#AFAF79 100%);
			background: -ms-linear-gradient(top, #D3D394 0%,#AFAF79 100%);
			background: linear-gradient(top, #D3D394 0%,#AFAF79 100%);
			filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#D3D394', endColorstr='#AFAF79',GradientType=0 );
		}
		.loginlinks a, .loginlinks a:active, .loginlinks a:visited, .loginlinks a:link {
			color: #14E06E !important;
		}
		.loginlinks a:hover {
			color: #fff !important;
		}
		a.neongreen {
			color: #14E06E !important;
		}
		a.neongreen:hover {
			color: #fff !important;
		}
		a.whitehover:hover {
			/*color:#fff !important;
			text-shadow: 0px -1px 1px rgba(0,0,0,.1) !important;*/
			background: #fff !important;
		}

		/* ################################## */
		/* SCROLL BARS */
		/* ################################## */

		::-webkit-scrollbar {
			width: 14px;
			background: #eee;
		}

		/* Track */
		::-webkit-scrollbar-track {
			-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0);
			-webkit-border-radius: 10px;
			border-radius: 10px;
		}

		/* Handle */
		::-webkit-scrollbar-thumb {
			border: 3px solid #eee;
			background-clip: padding-box;
			-webkit-border-radius: 10px;
			border-radius: 10px;
			background: rgba(0,0,0,0.1);
			background-color: #ccc !important;
			-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.2);
		}
		::-webkit-scrollbar-thumb:window-inactive {
			background: rgba(255,0,0,0.3);
		}

		/* ################################## */
		/* AUTOCOMPLETE */
		/* ################################## */

		.ui-autocomplete {
			z-index: 99999;
			color: #000;
			background: #fff;
			border: 1px solid #777;
			box-shadow: 0px 8px 10px rgba(0,0,0,.5),
			-10px 8px 15px rgba(0,0,0,.5), 10px 8px 15px rgba(0,0,0,.5);
			list-style: none;
			width: 350px;
			max-height: 355px;
			overflow: auto;
			margin: 0;
			padding: 0 0 5px 0;
		}

		.ui-menu-item {
			color: #000;
			text-shadow: 0px 1px 0px rgba(255,255,255,.3);
			height: auto;
			max-height: 80px;
			padding: 5px;
			overflow: hidden;
			border-bottom: 1px solid #ddd;
		}

		.ui-menu-item.matching-deal {
			height: 80px;
		}

		.ui-menu-item:hover {
			background: #D9FFC9;
			text-shadow: 0px 1px 0px rgba(255,255,255,.3);
		}
		.ui-menu-item a:link,
		.ui-menu-item a:visited,
		.ui-menu-item a:hover,
		.ui-menu-item a:active {
			color: #000;
		}
		.ui-item-thumb {
			width: 80px;
			height: auto;
			max-height: 75px;
			margin-right: 7px;
			float: left;
			overflow: hidden;
		}
		.ui-menu-item p {
			float: left;
	margin: 0;
	padding: 0;
		}

		/* Do not display count of results next to search bar */
		span[role='status'].ui-helper-hidden-accessible {
			display: none;
		}

		/* #### TOP MENU NAV #### */
		nav.top-menu {
			margin-left: 10px;
		}
		ul#main-menu {
			height: 20px;
	padding: 9px;
	overflow: hidden;
		}

		nav.top-menu li:hover {
			width: auto;
			color: #fff;
			text-shadow: 0px -1px 0px rgba(0,0,0,.4);
			display: block;
		}

		.nav-horizontal > li {
			float: left;
			padding: 0 8px;
		}

		/* DROPDOWN MENU EXPANDED */
		nav.top-menu ul li.expanded ul {
			display: none;
		}
		nav.top-menu ul li.expanded:hover ul {
			display: block;
			position: absolute;
			top: 43px;
			left: 0;
			right: 0;
			width: 100%;
			padding: 0;
			height: auto;
			text-align: left;
		}

		nav.top-menu ul li.expanded ul a {
			font-family: Montserrat,'Open Sans',Helvetica,Verdana,sans-serif;
			background: #ddd;
			color: #000;
			text-shadow: 0px 1px 0px rgba(255,255,255,.4);
		}

		nav.top-menu ul li.expanded ul a:hover {
			background: #00D315;   /* green lime 00de00 */
			color: #000;
			text-shadow: 0px 1px 0px rgba(255,255,255,.4);
			/**color:#fff;
			text-shadow: 1px 1px 1px rgba(0,0,0,.5); **/
		}
		img.hthumb {
			height: 27px;
	width: 27px;
	border-radius: 50%;
	-moz-border-radius: 50%;
	-webkit-border-radius: 50%;
	margin-top: 5px;
		}

		.loginlinks, .marketplacediv {
			display: inline-block;
		}

		.greenplus {
			display: none;
		}

		#rotate > img {
			-webkit-transition-duration: 0.8s;
			-moz-transition-duration: 0.8s;
			-o-transition-duration: 0.8s;
			transition-duration: 0.8s;

			-webkit-transition-property: -webkit-transform;
			-moz-transition-property: -moz-transform;
			-o-transition-property: -o-transform;
			transition-property: transform;

			overflow: hidden;
		}

		#rotate:hover > img  {
			-webkit-transform: rotate(180deg);
			-moz-transform: rotate(180deg);
			-o-transform: rotate(180deg);
		}

		/* ########################################################################## */
		/* #####################         MOBILE STYLING         ##################### */
		/* ########################################################################## */

		/* ######################################## */
		/* Portrait tablet to landscape and desktop */
		@media (min-width: 1025px) and (max-width: 4399px) {
			#header .top-messagediv {
				display: inline-block;
			}
			.newhdrlogo {
			}
		}

		/* ######################################## */
		/* Portrait tablet to landscape and desktop */

		@media (min-width: 980px) and (max-width: 1024px) {
			#header .top-messagediv {
				display: inline-block;
			}
			.newhdrlogo {
				/*display: none;*/
			}
		}

		/* ######################################## */
		/* Portrait tablet to landscape and desktop */

		@media (min-width: 768px) and (max-width: 979px) {
			#header .top-messagediv {
				display: none;
			}
			.newhdrlogo {
			}
		}
		/* ######################################## */
		/* Landscape phone to portrait tablet */

		@media (max-width: 767px) {
			.loginlinks, .marketplacediv {
				display: none;
			}
			#header .top-messagediv {
				display: none;
			}
			.newhdrlogo {
			}
			.greenplus {
				display: inline;
			}
		}
		/* ######################################## */
		/* Landscape phones and down */

		@media (max-width: 587px) {
			.loginlinks, nav.top-menu, .marketplacediv {
				display: none !important;
			}
			.newhdrlogo {
			}
			#header .top-messagediv {
				display: none;
			}
			.backarrowdiv {
				display: inline-block;
			}
			.applogo {
				display: inline-block;
	padding-top: 6px;
	text-align: center;
	width: 200px;
	max-width: 200px;
				margin: 0 auto !important;
	overflow: hidden;
			}
			img.sidr-class-LB {
				margin-top: 50px !important;
			}
		}

	</style>
	<!-- <script type="text/javascript" src="/static/js/jquery-1.9.1.min.js"></script> -->

	<script type="text/javascript" src="/static/js/jquery.sidr.min.js"> </script>
	<script type="text/javascript" src="/static/js/notify.min.js"> </script>

	<script type="text/javascript" src="/static/js/fancybox/jquery.fancybox.pack.js"> </script>

	<link rel="stylesheet" href="/static/js/fancybox/jquery.fancybox.css" type="text/css" media="screen" />

	<!-- <script type="text/javascript" src="/static/js/fancybox/jquery.fancybox.js"></script> -->

	<!-- <script type="text/javascript" src="/static/js/popup.js"></script>
	<script type="text/javascript" src="/static/js/ajax.js"></script>-->

	<script type="text/javascript">
		$(document).ready(function() {
			// App Mode Detection
			var standalone = window.navigator.standalone,
			userAgent = window.navigator.userAgent.toLowerCase(),
			safari = /safari/.test( userAgent ),
			ios = /iphone|ipod|ipad/.test( userAgent );
			android = (window.matchMedia('(display-mode: standalone)').matches);

			if (android == true) {
				$('.wrap-top-menu').css('padding-top',6);
				$('.header-content').css('padding-top',38);
				$('.spacer').css('padding-top',57);
			}

			if (window.navigator.standalone == true) {
				//alert("You're using our Hybrid App!");
				$('.spacer').css('padding-top',85);
				$('#homepage').css('padding-top',40);
				$('.wrap-top-menu').css('padding-top',43);
				$('.topsection').css('margin-top',40);
				$('.hybridlogo').css('top',38);
				$('.header-content').css('padding-top',53);
				$('.btn-toogle-menu').css('margin-top',0);
				$('.bottomtray').css('padding-bottom',15);
				$('#fixed-btm-btn').css('padding-bottom',80);
				$('.scrollup').css('bottom',80);
				$('.modalhdr').css('margin-top',90);
				$('.updatebutton').css('padding-bottom',90);
				$('.invtxt').css('margin-bottom',20);
				$('.support').css('margin-top',5);
				//$('.webapptop').css('padding-top',12);
				// Super small phones
				if ($(window).width() <= 375) {
					//alert("iPhone SEs etc");
					$('.bottomtray').css('padding-bottom',0);
					$('#fixed-btm-btn').css('padding-bottom',0);
				}
				// 393px is the cutoff
				if ($(window).width() <= 393) {
					$('.spacer').css('padding-top',72);
					$('#lpcontainer').css('padding-top',25);
					$('#featurelist').css('margin-top',18);
					//alert("iPhone 15 Pros etc");
				}
				if ($(window).width() <= 586) {
					$('.tophdrimg').css('padding-top',0);
					$('.qrfixedbottom').css('padding-bottom',30);
					$('.floatingqr').css('top',100);
					$('.timelinedetailsspacer').css('display','block');
					$('.logintext').css('padding-top',40); // load page only
					$('#moredivarea').css('padding-bottom',25);
					$('.scrollup').css('bottom',90);
				}

				// iPad Portrait
				if ($(window).width() == 768) {
					$('.updatebutton').css('padding-bottom',60);
					$('.invtxt').css('margin-bottom',0);
					$('.scrollup').css('bottom',57);
					//$('.spacer').css('padding-top',25);
					//$('.wrap-top-menu').css('padding-top',17);
					//alert("You're using our Hybrid App!");
				}
				if ($(window).width() >= 1024) {
					$('.spacer').css('padding-top',77);
					$('.wrap-top-menu').css('padding-top',27);
					//$('.btn-toogle-menu').css('margin-top',2);
					$('.updatebutton').css('padding-bottom',60);
					$('.invtxt').css('margin-bottom',0);
					$('.scrollup').css('bottom',60);
					//alert("You're using our Hybrid App and this is probably an iPad!");
				}
			} else {
				// NOT STAND-ALONE
				if ( ios ) {
					if ( !standalone && !safari ) {
						$('.wrap-top-menu').css('padding-top',47);
						$('.hybridlogo').css('top',38);
						$('.header-content').css('padding-top',53);
						$('.applogo').css('margin-right',35);
						//alert("You're using the Native App.");
					};
					if ( !standalone && safari ) {
						$('.wrap-top-menu').css('padding-top',6);
						$('.hybridlogo').css('top',38);
						$('.header-content').css('padding-top',38);
						//					$('.spacer').css('padding-top',53);	// commented out due to jump on all opps page
						$('.support').css('margin-top',10);
						//alert("You're using Mobile Safari.");
						// iPad Portrait
						//					if ($(window).width() == 768) {
						//						//$('.spacer').css('padding-top',25);
						//						$('.wrap-top-menu').css('padding-top',17);
						//						alert("You're using our iPad upright version!");
						//					}
					};
				} else {
					if (!android) {
						//alert('Not iOS and not Hybrid App');
						// Chrome Mobile, NOT Hybrid App
						$('.wrap-top-menu').css('padding-top',6);
						$('.header-content').css('padding-top',38);
						//$('.spacer').css('padding-top',57);
						// END
					}
					$('#invform').css('padding-top',35);
					//alert("You're using a desktop browser");
					//$('.wrap-top-menu-desktop').css('padding-top',7);
					//if (screen.width < 1025) {
					if (window.matchMedia("(max-width: 480px)").matches) {
						// scripts
						$('.wrap-top-menu-desktop').css('padding-top',8);
						//$('.wrap-top-menu-desktop').css('background','red');
					}
				}
				// Display message asking to open the app from an iPhone
				//alert("This is a Hybrid App, please add the App Icon to your Home screen & open it from there to access all features.");
				//document.write('<p>Tap the + button and choose "Add to Home Screen"</p>');
				//document.write('<link rel="apple-touch-icon" href="/static/images/icon@2x.png"/>');
				//$('#addtheapp').show();
			}

			$(".loginpop").fancybox({
				'hideOnOverlayClick':false,
				'hideOnContentClick':false,
				'nextEffect': 'fade',
				'prevEffect': 'fade'
			});

			$(".registerpop").fancybox({
				'hideOnContentClick': true
			});

			$(".signUpDiv")
			.die('click')
			.live('click', function () {
				$(".loginFrm").hide();
				$('.fancybox-skin').css({'background' : 'none repeat scroll 0 0 #ffffff'});
				$(".loginFrm").after($("#signUpForm").html());
				return false;
			});

			$(".registerDiv")
			.die('click')
			.live('click', function () {
				$(".regFrm").hide();
				$('.fancybox-skin').css({'background' : 'none repeat scroll 0 0 #ffffff'});
				$(".regFrm").after($("#registerForm").html());
				return false;
			});

			$(".backToLogin")
			.die('click')
			.live('click', function () {
				$(".loginFrm").show();
				$(".quickSignupFrm").replaceWith('');
				return false;
			});

		});

		$(document).ready(function () {
			$('.btn-reset-keyword').click(function () {
				//alert('Clicked reset');
				$("#sys_txt_keyword").val('');
				return false;
			});
			$(window).scroll(function () {
				if ($(this).scrollTop() > 100) {
					$('.scrollup').fadeIn();
				} else {
					$('.scrollup').fadeOut();
				}
			});

			$('.scrollup').click(function () {
				$("html, body").animate({
					scrollTop: 0
				}, 600);
				return false;
			});
			$("#48hours").click(function() {
				$('html, body').animate({
					scrollTop: $("#approvaltime").offset().top
				}, 2000);
			});
			$("#gotobottomform").click(function() {
				$('html, body').animate({
					scrollTop: $("#bottomform").offset().top
				}, 2000);
			});
			$("#recentworklink").click(function() {
				$('html, body').animate({
					scrollTop: $("#recentwork").offset().top
				}, 2000);
			});

			$(".more").click(function () {
				$(".morediv").slideToggle(500, function () {
				});
			});
			$(".more2").click(function () {
				$(".morediv2").slideToggle(500, function () {
				});
			});

			if ($(".header-search .multi-search").length) {
				$(".header-search .multi-search").autocomplete({
					source: "/search",
					minLength: 1,
					select: function(event, ui) {
					}
				})
				.data("ui-autocomplete")._renderItem = function(ul, item) {
					item_html = "<a href='" + item.url + "'>"
					+ "<div style='height:75px; width:75px; float:left; margin-right:7px; background:#ccc; object-fit:cover;'><img class='ui-item-thumb' src='/" + item.thumb + "' onerror=\"this.src='/static/images/placeholder.jpg'\" style='object-fit:cover; height:100%;' /></div>"
					+ "<div style='float:left; width:220px; background:none; '><p style='overflow:hidden; text-transform:uppercase; font-weight:300;' class='be-fc-orange; float:left;'><b><span style='text-transform:uppercase; color:#00A1FE'>" + item.label + "</span></b><br />"
					+ " <div style='position:absolute; right:0; float:right; height:75px; line-height:75px; width:15px;'><i class='fa fa-angle-right' aria-hidden='true'></i></span>"
					+ "</a>";

					return $( "<li>" )
					.append(item_html)
					.appendTo(ul);
				};
			}

		});
	</script>

	<script type="text/javascript" src="/static/js/jquery-migrate-1.2.1.min.js"> </script>
	<script type="text/javascript" src="/static/js/jquery.touchwipe.min.js"> </script>
	<script type="text/javascript" src="/static/js/md_slider.min.js"> </script>
	<script type="text/javascript" src="/static/js/jquery.sidr.min.js"> </script>
	<script type="text/javascript" src="/static/js/jquery.tweet.min.js"> </script>
	<script type="text/javascript" src="/static/js/pie.js"> </script>
	<script type="text/javascript" src="/static/js/script.js"> </script>
	<script type="text/javascript" src="/static/js/responsiveslides.min.js"> </script>
	<script type="text/javascript" src="/static/js/lbRealtime.js"> </script>

	<?php
	if (isset($_SESSION['user_id'])) : ?>
	<script type="text/javascript">
		$(document).ready(function() {
			var lbr = new lbRealtime();
			lbr.init();
		});
	</script>
	<?php
endif; ?>
</head>
<body>

<!-- LIGHTBOX END -->
<div id="wrapper" style="overflow:hidden;">
<!--<div style="background:#fff;">
<!-- DISPLAY THE USER SESSION INFO
<?php
echo "<pre>";
var_dump($_SESSION['user']) ?>
</div>-->
<header id="header" style="background:none !important;">
	<!-- TOP BAR STARTS HERE -->
	<div class="wrap-top-menu wrap-top-menu-desktop" style="text-align:center;">

		<!--<div class="backarrowdiv"
		style="width:20px; height:20px; background:none; position:absolute; left:0;
		margin-left:10px; margin-top:10px;">
		<a href="javascript:history.back()"><img src="/static/client/back_arrow.png" alt="<" /></a>
		</div>-->

		<a id="btn-toogle-menu" class="btn-toogle-menu" href="#alternate-menu"
		style="float:left; background:none !important;">
		<img src="/static/images/menu_icon.png" alt="Menu" style="height:22px;" />
		<!--<span class="line-bar"></span>
		<span class="line-bar lb2" style="width:15px;"></span>
		<span class="line-bar lb2" style="width:10px;"></span>-->
		</a>

		<div class="newhdrlogo" style="background:none; overflow:hidden;
				position:absolute; right:0; left:0; bottom:11px; margin:0 auto;
			   text-align:center; max-width:179px; height:32px;">
			<a href="/"><img src="/<?= $website_options['website_logo'] ?>"
			style="height:32px; width:auto; background:none" alt="Home" /></a>
		</div>

		<!--<div class="applogo" style="">
		<a href="/"><img src="/<?= $website_options['website_logo'] ?>"
		style="height:auto; max-width:200px; max-height:30px" alt="D" /></a>
		</div>-->

		<?php
		if ($_SESSION['loggedin']) { ?>
		<div class="greenplus" style="width:35px; margin-top:7px; height:25px;
				background:none; float:right;">
			<a href="/questions/add" id="greenplus"><img
			src="/static/client/animated_plus.gif"
			style="height:25px;" alt="+" /></a>
			<!--<a href="/project/addnew" id="greenplus"><img
			src="/static/client/plus_sign_icon_green.png"
			style="height:25px;" alt="+" /></a>-->
		</div>
		<?php
	} else { ?>
		<div class="greenplus" style="width:35px; margin-top:7px; height:25px;
				background:none; float:right;">

			<a href="#login" class="loginpop" id="greenplus"><img
			src="/static/client/animated_plus.gif"
			style="height:25px;" alt="+" /></a>

			<!-- GRAY PLUS SIGN -->
			<!--<a href="#login" class="loginpop" id="grayplus"><img
			src="/static/client/animated_plus_gray.gif"
			style="height:25px;" alt="+" /></a>-->

			<!-- ORIGINAL PLUS SIGN -->
			<!--<a href="#login" class="loginpop" id="grayplus"><img
			src="/static/client/plus_sign_icon_gray.png"
			style="height:25px;" alt="+" /></a>-->
		</div>
		<?php
	} ?>

		<!-- ####################################################################### -->
		<!-- ############################# RIGHT MENU ############################## -->
		<!-- ####################################################################### -->

		<div class="loginlinks" style="float:right; width:auto; background:none;
				height:38px; line-height:38px; margin-right:15px; color:#ccc">

			<?php
			if ($_SESSION['loggedin']) { ?>
			<!-- PROFILE AVATAR/IMAGE BEGINS static/images/users -->
			<a href="/profile/<?= $_SESSION['user']['user_slug'] ?>" class="thumb-leftxxx">
			<?php $fb = 'facebook';
			if (strstr($_SESSION['user']['image'], $fb)) {
				echo "<img src='" . $_SESSION['user']['image'] . "'
					   onerror=\"this.src='/static/images/users/default_avatar.png'\"
					   alt='" . $user['name'] . "' class='hthumb' align='absmiddle' style='margin-top:2px' />";
			} else {
				echo "<img src='/static/images/users/agency/" . $_SESSION['user']['image'] . "'
						onerror=\"this.src='/static/images/users/default_avatar.png'\"
						alt='" . $user['name'] . "' class='hthumb' align='absmiddle' style='margin-top:2px' />";
			}
			?>&nbsp;</a>
			<!-- PROFILE AVATAR/IMAGE ENDS -->
			Welcome, <a href="/membership"
			style="color:#14E06E;"><?= $_SESSION['user']['name'] ?></a>
			<span style="color:#999;">|</span>
			<a href="/auth/logout"
					class="logoutbtn" style="font-weight:500;">
				<i class="fa fa-power-off"
					aria-hidden="true"></i> Logout</a>
			<?php
		} else { ?>
			<!--<a href="/profile/registerBusiness" class="btn btn-gold
			business-reg registerbtn">Register Business</a>-->
			<a href="#login" class="loginpop loginbtn" style="font-weight:400;
					font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana,oswald,sans-serif;">
				<i
					class="fa fa-power-off" aria-hidden="true"></i>
				LOGIN <span style="font-family:'Times New Roman';">»</span></a>
			<span style="color:#999;">|</span>
			<a href="/auth/join" class="" style="font-weight:400;
			font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana,oswald,sans-serif;">SIGN UP!</a>
			<?php
		} ?>
		</div>

		<!-- #################################################################### -->
		<!-- ############################ TOP MENU BAR ########################## -->
		<!-- #################################################################### -->

		<nav class="top-menu" style="padding-left:0px; display:inline-block; height:38px;">
			<ul id="main-menu" class="nav nav-horizontal clearfix">
				<li class="activexxx">
					<a href="/" title="Home"><img src="/static/client/mini_waves.gif"
					alt="FantasyTrivia" style="height:30px; margin-top:-4px"></a>
				</li>
				<li class="sep"></li>
				<li class="activexxx"><a href="/" title="Home">Home</a></li>
				<?php
				if ($_SESSION['loggedin'] && $_SESSION['user_id']) : ?>
				<!--<li class="sep"></li>
				<li class="activexxx"><a href="/profile/myaccount" title="Dash"
				style="color:#14E06E; font-weight:500 !important;">Dash</a></li> -->
				<?php
			endif; ?>
				<li class="sep"></li>
				<!--                    <li class="expanded" style="">
				<a href="#comingsoon" class="loginpop" title="Coming Soon">All Lessons
				<i class="fa fa-chevron-down"></i></a>
				</li>-->
				<li class="activexxx" style="display:nonex;">
					<a href="/about" title="About">About</a>
				</li>
				<li class="sep"></li>
				<li class="activexxx" style="display:nonex;">
					<a href="/contact" title="Contact">
						<i class="fa fa-envelop" aria-hidden="true"></i> CONTACT</a>
				</li>
				<li class="activexxx" style="display:none;">
					<a href="/project/add" title="Add New">
					<img src="/static/client/animated_plus.gif"
					style="height:15px; margin-top:-3px" alt="+" /> NΞW</a>
				</li>
				<li class="sep"></li>
				<li class="activexxx"><a href="/faqs" title="FAQ">FAQ</a></li>

				<?php
				if (isset($_SESSION['loggedin']) && $_SESSION['user_id']) : ?>

				<?php else : ?>

				<?php
			endif; ?>

				<?php
				if (isset($_SESSION['user']['is_admin']) && $_SESSION['user']['is_admin'] ==1) {
				?>
				<li class="sep"></li>
				<li>
					<a href="/admin/dash" class="nav-title" style="color:#ff0000;">A</a>
				</li>
				<?php
			} ?>
			</ul>

			<!-- ############################################################# -->
			<!-- ######################### SIDE MENU ######################### -->
			<!-- ############################################################# -->

			<div id="left-menu" style="display:none; overflow:hidden !important;">
				<ul class="alternate-menu mlogo">
					<center><a href="/"><img src="/<?= $website_options['mobile_logo'] ?>" alt="<?= $website_options['short_title'] ?>" class="BP" /></a></center>
				</ul>
				<ul class="alternate-menu">
					<?php
					if (isset($_SESSION['loggedin']) && $_SESSION['user_id']) : ?>
					<!-- ################## LOGGED IN / CUSTOMER ################# -->
					<li><a href="/membership"><img
						src="/static/images/users/agency/<?= $_SESSION['user']['image'] ?>"
						class="pthumb"
						onerror="this.src='/static/images/users/default-avatar.jpg'"
						align="absmiddle" />&nbsp;<?= $_SESSION['user']['name'] ?></a>
					</li>
					<!--<li><a href="/profile/<?= $_SESSION['user']['user_slug'] ?>"><img src="/static/images/users/<?= $_SESSION['user']['image'] ?>" class="pthumb" align="left" />&nbsp;&nbsp;<?= $_SESSION['user']['name'] ?></a></li>-->
					<!--<li><a href="/profile/edit" class="thumb-leftxxx">
					<?php
					$fb = 'facebook';
					if (strstr($_SESSION['user']['image'], $fb)) {
					echo "<img src='" . $_SESSION['user']['image'] . "' alt='" . $user['name'] . "' class='pthumb' align='absmiddle' />";
					} else {
					echo "<img src='/static/images/users/" . $_SESSION['user']['image'] . "' alt='" . $user['name'] . "' class='pthumb' align='absmiddle' />";
					}
					?>
					&nbsp;&nbsp;<?= $_SESSION['user']['name'] ?></a></li>-->

					<li>
						<a href="/profile/edit" class="home">
							<i
                            	class="fa fa-home"></i> Edit Account</a>
					</li>
					<li>
						<a href="/category/all" class="star">
							<i class="fa fa-star"></i> CATEGORIES</a>
					</li>
					<li>
						<a href="/example" class="usd">
							<i class="fa fa-usd"></i> Load Funds</a>
					</li>
					<li>
						<a href="/project/add" class="plus-circle">
							<i class="fa fa-plus-circle"></i>Add NΞW</a>
					</li>
					<li>
						<a href="/example" class="video">
							<i class="fa fa-usd"></i> CRΞATORS</a>
					</li>
					<li>
						<a href="/example" class="handshake">
							<i class="fa fa-handshake"></i> WORK WITH US</a>
					</li>
					<!--								<li>
					<a href="/membership" class="user">
					<i class="fa fa-user"></i> Member Area</a>
					</li> -->
					<!--								<li>
					<a href="/cats" class="trophy">
					<i class="fa fa-trophy"></i> LΞaderboards</a>
					</li>-->
					<!--								<li>
					<a href="/beta" class="certificate">
					<i class="fa fa-certificate"></i> Join BETA</a>
					</li>-->
					<!--								<li>
					<a href="/ownership" class="users">
					<i class="fa fa-users"></i> Become an Owner</a>
					</li>-->
					<!--<li>
					<a href="/plans" class="star">
					<i class="fa fa-star"></i> UpgradΞ Plan</a>
					</li>-->
					<!--								<li>
					<a href="/challenge/addnew" class="plus-circle"><i
					class="fa fa-plus-circle"></i> CrΞate Challenge</a>
					</li>
					<li>
					<a href="/leaderboards/all" class="trophy">
					<i class="fa fa-trophy"></i> LΞaderboards</a>
					</li>-->
					<!--								<li>
					<a href="/leaderboards" class="trophy">
					<i class="fa fa-trophy"></i> LΞaderboards</a>
					</li>-->
					<!--<li><a href="/membership" class="child"><i
					class="fa fa-child"></i> My Child Profiles</a></li>
					<li><a href="/quick-setup" class="wifi"><i
					class="fa fa-wifi"></i> Quick Setup</a></li>
					<li><a href="/quick-setup-overview" class="th-list"><i
					class="fa fa-th-list"></i> Detailed Setup</a></li>-->

					<!--<li><a href="/founding" class="star"><i class="fa fa-star"></i> 10K Club</a></li>-->
					<!--<li><a href="/profile/myaccount" class="cog"><i class="fa fa-cog"></i> My Dash</a></li>-->
					<!--<li><a href="/profile/<?= $_SESSION['user']['user_slug'] ?>" class="user"><i
					class="fa fa-user"></i> My Profile</a></li>-->
					<!--<li><a href="/profiles/<?= $_SESSION['user']['user_slug'] ?>" class="user"><i class="fa fa-user"></i> My Profile</a></li>-->
					<!--<li><a href="/news" class="flag"><i class="fa fa-flag"></i> My Activity Feed</a></li>-->
					<!--<li><a href="/mob/all" class="star"><i class="fa fa-star"></i> Browse FlipMobs</a></li>-->
					<!--<li><a href="/listing/addnew" class="plus-circle"><i
					class="fa fa-plus-circle"></i> Create Lesson</a></li>-->
					<!--<li><a href="/marketplace/all" class="bag-shopping"><i class="fa fa-bag-shopping"></i> Marketplace</a></li>-->
					<!--<li><a href="/balances" class="credit-card"><i class="fa fa-credit-card"></i> Load Funds/Tix</a></li>-->
					<!--<li><a href="/nearby" class="map-marker"><i class="fa fa-map-marker"></i> Nearby Mobs</a></li>-->
					<!--<li><a href="/e-blast" class="plane"><i class="fa fa-plane"></i> Send E-Blast</a></li>-->
					<!--<li><a href="/listings/deals" class="tag"><i class="fa fa-tag"></i> Browse DealOpps</a></li>-->
					<!--<li><a href="/members" class="user"><i class="fa fa-user"></i> Members</a></li>-->
					<!--<li><a href="/managed-services" class="plus-circle"><i
					class="fa fa-plus-circle"></i> +Open Request</a></li>-->
					<!--<li><a href="/buycredits" class="usd"><i class="fa fa-usd"></i> Buy Credits</a></li>-->
					<!--<li><a href="/profile/load" class="usd"><i class="fa fa-usd"></i> +Add Funds</a></li>-->
					<!--<li><a href="/news" class="bell"><i class="fa fa-bell"></i> +Activity Feed</a></li>-->
					<!--<li><a href="/pricing" class="usd"><i class="fa fa-usd"></i> Pricing</a></li>
					<li><a href="/founding-partners" class="sitemap"><i class="fa fa-sitemap"></i> Founding Partners</a></li>-->
					<!--<li><a href="/project/add" class="plus-circle"><i class="fa fa-plus-circle"></i> Upload Your Assets</a></li>
					<li><a href="//preorderapps.square.site" class="usd"><i class="fa fa-usd"></i> Shop</a></li>
					<li><a href="/vip" class="sitemap"><i class="fa fa-sitemap"></i> VIP</a></li>   -->
					<?php else : ?>
					<li>
						<a href="/" class="home">
							<i class="fa fa-home"></i> Home</a></li>
					<!--						<li>
					<a href="/plans" class="star">
					<i class="fa fa-star"></i> UpgradΞ Plan</a>
					</li>-->
					<li>
						<a href="/category/all" class="star">
							<i class="fa fa-star"></i> CATEGORIES</a>
					</li>
					<li>
						<a href="/example" class="video">
							<i class="fa fa-usd"></i> CRΞATORS</a>
					</li>
					<li>
						<a href="/example" class="handshake">
							<i class="fa fa-handshake"></i> PARTNERS</a>
					</li>
					<li>
						<a href="/auth/login" class="sign-out">
							<i
                            class="fa fa-sign-out"></i> Login</a></li>
					<li>
						<a href="/auth/join" class="user">
							<i
                            class="fa fa-user"></i> Sign up</a></li>
					<?php
				endif; ?>

					<!--<li><a href="/mob/all" class="th-list"><i class="fa fa-th-list"></i>
					Thin&#923;pp Blog</a></li>-->
					<!--<li><a href="/partners" class="usd"><i class="fa fa-usd"></i>
					Partners</a></li>--><!--
					<li><a href="/how-it-works" class="gears"><i
					class="fa fa-gears"></i> How It Works</a></li>-->
					<li>
						<a href="/faqs" class="question-circle">
							<i
                        class="fa fa-question-circle"></i> FAQ</a></li>
					<!--<li><a href="/contact" class="phone"><i class="fa fa-phone"></i>
					Support</a></li>-->
					<!--<li><a href="/contact" class="envelope"><i
					class="fa fa-envelope"></i> Contact us</a></li>-->

					<?php
					if ($_SESSION['loggedin'] && $_SESSION['user_id']) : ?>
					<li>
						<a href="/auth/logout" class="power-off">
							<i
                        	class="fa fa-power-off"></i> Logout</a></li>
					<?php
				endif; ?>

					<?php
					if (isset($_SESSION['user']['is_admin'])) { ?>
					<hr class="custom" style="" />
					<li>
						<a href="/admin/dash" class="sliders" style="color:#ff0000 !important;">
							<i
                            class="fa fa-sliders"></i> Admin</a></li>
					<!--<li><a href="/pitches/add" class="plus-circle"><i
					class="fa fa-plus-circle"></i> Create New</a></li>-->
					<?php
				} ?>

					<!-- ################################################################ -->
					<!-- ####################### CUSTOM MENU ITEMS ###################### -->
					<!-- ################################################################ -->

					<?php

					$custom = json_decode($website_options['menu_custom_items'], 1);

					function showSubmenu($menu)
					{
						if (gettype($menu) != 'array') {
							return;
						}

						foreach ($menu as $item) {
							echo "<li><a href='{$item['url']}' class='caret-right'><i class='fa fa-caret-right'></i> {$item['title']}</a></li>";
							if (isset($item['children'])) {
								echo '<ul class="submenu">';
								showSubmenu($item['children']);
								echo '</ul>';
							}
						}
					}
					showSubmenu($custom);
					?>

					<!--<li><a href="javascript:top.frames.location.reload();"
					class="refresh"><i class="fa fa-refresh"></i> Refresh App</a></li>-->
				</ul>

				<div class="sidr sliv">
					<a href="sms:?&amp;body=Hi. Checkout BASE Pages at https://basepages.com!"
					title="Click here to share by text" class="texticon"></a>
					<a href="https://www.facebook.com/basepages" title="Like Us on Facebook"
                        class="facebook">
						<i class="fa fa-facebook"></i></a>
					<a href="https://instagram.com/basepages" title="Follow Us on Instagram"
                        class="instagram">
						<i class="fa fa-instagram"></i></a>
					<!--<a href="<?= $website_options['linkedin_url'] ?>"
					title="Connect with us on LinkedIn" class="linkedin"><i
					class="fa fa-linkedin"></i></a>-->
					<a href="mailto:<?= $website_options['contact_email'] ?>"
                        title="Click here to email us" class="emailicon">
						<i
                        class="fa fa-envelope-o"></i></a>
					<a href="javascript:top.frames.location.reload();" class="refresh">
						<i
                        class="fa fa-refresh"></i></a>
				</div>
				<ul class="alternate-menu copyr">
					<?= $website_options['footer_copyright'] ?><br />
					Made in Chicago with
					<a href="/about" class="heart-o">
						<i
                        class="fa fa-heart-o"></i></a>
				</ul>
			</div>
		</nav>
		<div class="clear"></div>
	</div>
	<!-- end: .wrap-top-menu -->
</header>
<!--end: #header -->
<div class="spacer"></div>