<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php wp_title(' - ', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<?php //admin option to remove meta description if a SEO plugin is used
if(get_option('tigu_no_seo_plugin') == 'true'): ?>
<?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<meta name="description" content="<?php the_excerpt_rss(); ?>" />
<?php endwhile; endif; elseif(is_home()) : ?>
<meta name="description" content="<?php bloginfo('description'); ?>" />
<?php 
//if category page, use category description as meta description
elseif (is_category()): ?>
<?php 
// Removing Paragraph Tags Around the Category Description on source code only - useful in terms of SEO
remove_filter('term_description','wpautop');
?>
<meta name="description" content="<?php echo category_description(); ?>" />
<?php endif; ?>
<?php endif; ?>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php echo get_option('tigu_feedburner'); ?>" />
<?php if(get_option('tigu_favicon')): ?>
<link rel="shortcut icon" href="<?php echo get_option('tigu_favicon'); ?>" />
<link rel="alternate" type="application/rss+xml" title="بیست اسکریپت - مرجع دانلود اسکریپت &raquo; قالب خوراک برچسب" href="http://www.20script.ir/tag/%d9%82%d8%a7%d9%84%d8%a8/feed/" />
<?php endif; ?>
<?php require_once( trailingslashit( get_template_directory() ). 'css/admin-css.php' ); ?>

<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<!-- START WRAPPER -->
<div id="wrapper">
	<div id="fb-root"></div>
	<script>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];  if (d.getElementById(id)) return;  js = d.createElement(s); js.id = id;  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";  fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
	
<!-- START TOP MENU -->
<div class="topmenu-area">
<div class="topmenu">
<div class="topmenu-grid1">
<?php wp_nav_menu(array(
     'theme_location' => 'topmenu',
     'depth' => 3,
     'fallback_cb' => false
)); ?>
</div>

<?php if(get_option('tigu_search_box', 'false') == 'true'): ?>
<div class="topmenu-grid2">
<?php get_search_form(); ?>
</div>
<?php endif; ?>

 </div>
 </div>
<?php if(get_option('tigu_scroll_bottom', 'true') == 'true'): ?>
<div id="scrollBottom"></div>
<?php endif; ?>

<!-- END TOP MENU -->

<!-- BEGIN CONTENT WRAPPER -->
<div id="wrapper-content">

<!-- START MAIN HEADER -->
  <div id="header">

<!-- START MIDDLE HEADER -->
<?php if(get_option('tigu_scroll_bottom', 'true') == 'true'): ?>
 <div id="header-middle">
<?php endif; ?>
<?php if(get_option('tigu_scroll_bottom', 'true') == 'false'): ?>
 <div id="header-middle2">
<?php endif; ?>
 <div id="logo">
<?php
if(get_option('tigu_logo')) {
$logo = get_option('tigu_logo');
} else {
$logo = get_template_directory_uri('template_directory') . '/images/logo_gameleon.png';
}
?>
  <?php if(get_option('tigu_h1_tag', 'true') == 'true'): ?>
<h1 class="seo-logo"><a href="<?php echo site_url(); ?>" title="<?php bloginfo('name'); ?> <?php wp_title(' - ', true, 'left'); ?>"><img src="<?php echo $logo; ?>" alt="<?php if(get_option('tigu_logo_alt')): ?><?php echo get_option('tigu_logo_alt'); ?><?php else: ?><?php bloginfo('name'); ?><?php endif; ?>" /></a></h1>
 <?php else: ?>
<a href="<?php echo site_url(); ?>" title="<?php bloginfo('name'); ?> <?php wp_title(' - ', true, 'left'); ?>"><img src="<?php echo $logo; ?>" alt="<?php if(get_option('tigu_logo_alt')): ?><?php echo get_option('tigu_logo_alt'); ?><?php else: ?><?php bloginfo('name'); ?><?php endif; ?>" /></a>
<?php endif; ?>  
</div>
<?php if(get_option('tigu_banner_header') == 'true'): ?>  
<?php if(get_option('tigu_head_banner_image')): ?>			
<div id="banner468x60-header">
<a target="<?php echo (get_option('tigu_head_banner_target')); ?>" href="<?php echo (get_option('tigu_head_banner_url')); ?>" title="<?php echo (get_option('tigu_head_banner_title')); ?>"><img src="<?php echo (get_option('tigu_head_banner_image')); ?>" alt="<?php echo (get_option('tigu_head_banner_alt')); ?>"></a>
</div>
<?php else: ?>
<div id="banner468x60-header"><?php echo stripslashes(get_option('tigu_header_banner_code')); ?></div>
<?php endif; ?>
<?php endif; ?>
  </div>

<!-- END MIDDLE HEADER -->

<!-- START MAIN MENU -->

<?php
if ( has_nav_menu( 'mainmenu' ) ): ?>
<div id="wrapper-menu">

<?php wp_nav_menu( array(
  'container'       => false,
   'menu_class'      => 'sf-menu',
   'menu_id'         => 'main-menu',
   'depth'           => '3',
   'theme_location'  => 'mainmenu')
    ); ?>

</div>

<div class="shaddow"></div>
<?php endif; ?>
<!-- END MAIN MENU -->
</div>
<!-- END MAIN HEADER -->