<?php if ((!function_exists("check_theme_footer") || !function_exists("check_theme_header"))) { ?><?php { /* nothing */ } ?><?php } else { ?><?php get_header(); ?>

<div id="content">
<div id="contentinner">

<div id="content2">
<div id="content2inner">
<ul class="sidebar_list">

<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(2)) : ?>

<?php /*
<li class="widget_text">
<h6>Notice</h6>
<div class="textwidget">
Dear user, please setup this secondary sidebar inside the widget control panel. Thanks.
</div>
<div class="clearfix"></div>
</li>
*/?>

<?php $twitter_activate = get_theme_option('twitter_activate'); if(($twitter_activate == '') || ($twitter_activate == 'No')) { ?>
<?php { /* nothing */ } ?>
<?php } else { ?>
<?php include (TEMPLATEPATH . '/includes/twitter.php'); ?> 
<?php } ?>

<?php $featured_category_active = get_theme_option('featured_category_activate'); if(($featured_category_active == '') || ($featured_category_active == 'No')) { ?>
<?php { /* nothing */ } ?>
<?php } else { ?>
<?php if((is_home()) && (is_front_page())) { ?>
<?php include (TEMPLATEPATH . '/includes/featured-category.php'); ?> 
<?php } ?> 
<?php } ?>

<?php endif; ?>

</ul><!-- SIDEBAR LIST END -->
</div><!-- CONTENT2INNER END -->
</div><!-- CONTENT2 END -->

<div id="post-entry-homebox">

<?php $featured_slider_activate = get_theme_option('featured_activate'); if(($featured_slider_activate == '') || ($featured_slider_activate == 'No')) { ?>
<?php { /* nothing */ } ?>
<?php } else { ?>
<?php if((is_home()) && (is_front_page()) && ($paged < 1)) { ?>
<?php include (TEMPLATEPATH . '/includes/featured.php'); ?> 
<?php } ?>
<?php } ?>

<div id="post-entry">

<?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query('showposts=4&cat=&paged=' . $paged);?>

<?php $postcounter = 0; if ($wp_query->have_posts()) : ?>

<?php while ($wp_query->have_posts()) : $postcounter = $postcounter + 1; $wp_query->the_post();?>

<div class="post-meta" id="post-<?php the_ID(); ?>">
<div class="post-info">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="post-date">
Posted On <?php the_time('l, F j, Y') ?> By <?php the_author_posts_link(); ?>. Under&nbsp;<?php the_category(', ') ?>&nbsp;&nbsp;<?php if(function_exists("the_tags")) : ?><?php the_tags('Tags:&nbsp;') ?><?php endif; ?>&nbsp;&nbsp;<?php edit_post_link('+Edit Post'); ?>
</div><!-- POST DATE END -->
</div><!-- POST INFO END -->
<div class="post-content">
<?php if ( has_post_thumbnail() ) { ?>
<?php the_post_thumbnail(array(150,120), array('class' => 'alignleft')); ?>
<?php } ?>
<?php the_post_excerpt($excerpt_length=50); ?>
<div class="readmore"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read More</a></div>
<div class="clearfix"></div>
</div><!-- POST CONTENT END -->
</div><!-- POST META <?php the_ID(); ?> END -->

<?php $get_google_code = get_theme_option('adsense_loop'); if($get_google_code == '') { ?>
<?php } else { ?>
<?php if($postcounter <= 3){ ?>
<div class="adsense-loop">
<?php echo stripcslashes($get_google_code); ?>
</div>
<?php } ?>
<?php } ?>

<?php endwhile; ?>

<?php else : ?>

<p class="center">NOT FOUND</p>

<p class="center">Sorry, but you are looking for something that isn't here.</p>

<?php endif; ?>

<?php $wp_query = null; $wp_query = $temp; ?>

</div><!-- POST ENTRY END -->
</div><!-- POST ENTRY HOMEBOX END -->

<?php include (TEMPLATEPATH . '/includes/paginate.php'); ?>

</div><!-- CONTENTINNER END -->
</div><!-- CONTENT END -->

<?php get_sidebar(); ?>

<?php get_footer(); ?><?php } ?>