<?php get_header(); ?>
  <div id="content" class="content<?php echo get_option('fungames_sidebar_position'); ?>">
    
    <?php if (class_exists('breadcrumb_navigation_xt')) : ?>
      <div class="breadcrumb">
        <?php _e("You Are Here: ", "fungames"); ?>
          <?php
          $mybreadcrumb = new breadcrumb_navigation_xt;
          $mybreadcrumb->display();
          ?>
      </div>
    <?php endif; ?>
    
      <div class="archive_view">
  
      <?php if (have_posts()) : ?>
        <?php $post = $posts[0]; ?>
        <?php if (is_category()) { ?>
          <h1><?php echo single_cat_title(); ?></h1>
        <?php } elseif (is_day()) { ?>
          <h1><?php _e("Archive for", "fungames"); ?> <?php the_time('F jS, Y'); ?></h1>
        <?php } elseif (is_month()) { ?>
          <h1><?php _e("Archive for", "fungames"); ?> <?php the_time('F, Y'); ?></h1>
        <?php } elseif (is_year()) { ?>
          <h1><?php _e("Archive for", "fungames"); ?> <?php the_time('Y'); ?></h1>
        <?php } elseif (is_author()) { ?>
          <h1><?php _e("Author Archive", "fungames"); ?></h1>
        <?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
          <h1><?php _e("Blog Archives", "fungames"); ?></h1>
        <?php } ?>

        <?php while (have_posts()) : the_post(); ?>
          <div class="cat_view">
            <div class="gametitle">
              <h4>
                <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php myabp_get_title(40); ?></a>
              </h4>
            </div>
            
            <div class="cover">
              <div class="entry">
                <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php echo $post->post_title; ?>">
                  <img src="<?php myabp_print_thumbnail_url(); ?>" height="80" width="80" alt="<?php echo $post->post_title; ?>" align="left"/>
                </a>
                <?php fungames_get_excerpt(180); ?>
                <div class="clear"></div>
              </div>
            </div>
            
              <?php if(function_exists('the_ratings')) : ?>
                <div align="left">
                  <?php the_ratings(); ?>
                </div>                
              <?php endif; ?>  
          </div>
        <?php endwhile; ?>
      
        <div class="clear"></div>

       <div id="navigation">
        <?php if(function_exists('wp_pagenavi')) : ?>
          <?php wp_pagenavi(); ?>
        <?php else: ?>
          <div class="post-nav clearfix">
			     <p id="previous"><?php next_posts_link(__('Older games &laquo;', 'fungames')) ?></p>
			     <p id="next-post"><?php previous_posts_link(__('&raquo; Newer games', 'fungames')) ?></p>
		      </div>
        <?php endif; ?>  
        </div>

    <?php else: ?>
      <h1 class="title"><?php _e("Not Found", "fungames"); ?></h1>
      <p><?php _e("Sorry, but you are looking for something that isn't here.", "fungames"); ?></p>
    <?php endif; ?>
    </div> <?php // end archive ?>
    
    <?php fungames_action_after_archive_content(); ?>
    
  </div> <?php // end content ?>
  
<?php get_sidebar(); ?>
<?php get_footer(); ?>