<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?> >
<head profile="http://gmpg.org/xfn/11">
<meta charset="<?php bloginfo( 'charset' ); ?>" />

<title>
  <?php if (is_home()) { ?>
    <?php bloginfo('name'); ?> - <?php bloginfo('description'); ?>
  <?php } elseif (is_category()) {?>
    <?php single_cat_title(); ?> - <?php bloginfo('name'); ?>
  <?php } elseif (is_single()) { ?>
    <?php single_post_title(); ?>
  <?php } elseif (is_page()) { ?>
    <?php bloginfo('name'); ?>: <?php single_post_title(); ?>
  <?php } elseif (is_404()) { ?>
     <?php bloginfo('name'); ?> - <?php _e("Page not found", "fungames"); ?>
  <?php } elseif (is_search()) { ?>
     <?php bloginfo('name'); ?> - <?php _e("Search results for", "fungames"); ?> <?php echo esc_html($s, 1); ?>
  <?php } ?>
</title>

<?php if( get_option('fungames_custom_favicon_status') == 'enable' ) : ?>
  <?php $faviconurl = get_option('fungames_custom_favicon'); ?>
  <link rel="shortcut icon" href="<?php echo $faviconurl ?>" />
<?php endif; ?>

<?php if ( get_option('fungames_site_sitedesc_status') == 'enable') : ?>
<meta name="keywords" content="<?php echo stripslashes(get_option('fungames_custom_site_keywords')); ?>" />
<meta name="description" content="<?php echo stripslashes(get_option('fungames_custom_sitedesc')); ?>" />
<?php endif; ?>
<link rel="canonical" href="http://www.20script.ir" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> <?php _e("RSS Feed", "fungames"); ?>" href="<?php bloginfo('rss2_url'); ?>" />

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

<?php
	/* We add some JavaScript to pages with the comment form
	 * to support sites with threaded comments (when in use).
	 */
	if ( is_singular() && get_option( 'thread_comments' ) )
		wp_enqueue_script( 'comment-reply' );

	/* Always have wp_head() just before the closing </head>
	 * tag of your theme, or you will break many plugins, which
	 * generally use this hook to add elements to <head> such
	 * as styles, scripts, and meta tags.
	 */
	wp_head();
?>
 
<?php 
if ( get_option('fungames_custom_headercode_status') == 'enable' ) { echo stripslashes( get_option('fungames_custom_headercode') ); } 
?>

</head>

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

<div id="wrapper">
  <?php
  // Custom Header Image
  $header_img = get_header_image();
  if ( !empty($header_img) ) {
    $header_bg_style = 'style="background-image:url('.$header_img.');"';
  } else {
    $header_bg_style = ''; 
  }  
  ?>
  <div id="top" <?php echo $header_bg_style; ?>> 
    <div class="blogname">
      <h1>
        <a href="<?php bloginfo('url');?>" title="<?php bloginfo('name');?>">
          <?php $custom_logo = get_option('fungames_custom_logo');
            if ( !empty($custom_logo) ) {
              ?><img src="<?php echo $custom_logo; ?>" alt="<?php bloginfo('name');?>"><?php
            } else {
              ?><img src="<?php bloginfo('template_directory'); ?>/images/logo.png" alt="<?php bloginfo('name');?>" /><?php
            }
           ?>
        </a>
      </h1>
    </div>
    
    <?php // include header banner ?>
    <div id="headbanner"> <?php echo stripslashes( get_option('fungames_headerad') ); ?></div>

    <?php // show search form ?>
    <div id="rss">
      <form method="get" id="search_form" action="<?php bloginfo ('url'); ?>">
        <input type="text" name="s" id="s" value="<?php _e("Search For Games...", "fungames"); ?>" onfocus="if (this.value == '<?php _e("Search For Games...", "fungames"); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e("Search For Games...", "fungames"); ?>';}" />
        <input type="submit" name="btn_search" id="btn_search" value="" />
      </form>
    </div> <?php // end rss ?>
    
    <div class="clear"></div>
  </div> <?php // end top ?>

  <?php // Header menu ?>
  <div id="catcontainer">
    <div id="catmenu">
      <ul>
      <?php 
        // show header menu
        wp_nav_menu( array( 
            'theme_location'  => 'primary',
            'menu_id' => '', 
            'container' => '', 
            'fallback_cb' => 'fungames_default_header_menu'
            ) 
         );
      ?>
      </ul>
    </div>
  </div>
  
  <div class="clear"></div>
  <div id="fgpage">