<!-- Blog -->

<div class="app">
<?php
$blog_number = get_option('gpp_blog_number');
$blog_category_ID = get_option('gpp_blog_cat');
$blog_category = get_cat_name($blog_category_ID);
if($blog_category_ID=="0") {$blog_category = __('Blog','gpp_i18n');}
?>
<div id="blog-section">
<div class="span-<?php if (get_option('gpp_sidebar') == 'true' || !get_option('gpp_sidebar')) { echo "15 colborder home"; } else { echo "24 last"; } ?>">
<h3 class="sub"><?php echo $blog_category; ?></h3>
	<?php $blog_query = new WP_Query("cat='$blog_category_ID'&showposts=$blog_number"); $blog_counter = 1; ?>
	<?php if ($blog_query->have_posts()) : while ($blog_query->have_posts()) : $blog_query->the_post(); ?>
			<div <?php if(function_exists('post_class')) : ?><?php post_class(); ?><?php else : ?>class="post post-<?php the_ID(); ?>"<?php endif; ?>>
				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s','gpp_i18n'),the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
				<div class="entry">
					<?php if ( !post_password_required() ) { ?>
						<?php include (TEMPLATEPATH . '/apps/multimedia.php'); ?>
						<?php include (TEMPLATEPATH . '/apps/video.php'); ?>
					<?php } ?>
					<?php the_content(); ?>
					<?php if ($blog_counter == 1) { ?>
					<?php include (TEMPLATEPATH . '/apps/ad-main.php'); ?>
					<?php  } ?>
				</div>
				<div class="clear"></div>
				<p class="postmetadata"><?php the_time(__('M d, Y', 'gpp_i18n')); ?> | <?php _e('Categories:','gpp_i18n'); if (the_category(', '))  the_category(); ?> <?php if (get_the_tags()) the_tags(__('| Tags: ','gpp_i18n')); ?> | <?php comments_popup_link(__('Leave A Comment &#187;', 'gpp_i18n'), __('1 Comment &#187;', 'gpp_i18n'),__ngettext('% Comment &#187;', '% Comments &#187;',get_comments_number (),'gpp_i18n')); ?> <?php edit_post_link(__('Edit','gpp_i18n'), '| ', ''); ?></p>
			</div>
		<div class="clear"></div>
	<?php $blog_counter++; endwhile; endif; wp_reset_query(); ?>
</div>
</div>
</div>
<?php if (get_option('gpp_sidebar') =='true' || !get_option('gpp_sidebar')) { get_sidebar(); } ?>
<hr />