<?php 
	get_header(); 
?>
    
    <!-- ID | BODY -->
    <div id="body">
    	<!-- ID | CONTENT -->
    	<div id="content">
        
			<!-- FOREACH | POST -->
		<?php
		if(have_posts()) :
			while(have_posts()) :
			the_post();
			
			$visit_link	= reviewSiteCustomPost('reviewsite_visit_link',get_the_ID());
		?>
            <div <?php post_class(); ?>>
            	<div class="post-header">
                	<h1 class="post-title"><?php the_title(); ?></h1>
                    <div class="post-rating"><?php reviewSitePostRating(get_the_ID()); ?></div>
                    <div class="clearfix"></div>
                </div>
                
                <div class="post-body">
                <?php if(has_post_thumbnail()) : ?>
                	<div class="post-thumb">
						<?php 
						the_post_thumbnail('single-post-thumbnail');
						if(!is_null($visit_link)) : 
							$image	= "<img src='".get_bloginfo('template_url')."/images/button-visit.png' alt='' />";
							linkcloaker_only_link($visit_link,$image);
                        endif; 
						?>
                    </div>
				<?php endif; ?>
                    <div class="post-content">
					<?php the_content(); ?>
                    <?php reviewSiteShowRating(get_the_ID()) ?>
                    </div>
                    <div class="post-button">
                        <?php
						if(!is_null($visit_link)) : 
							$image	= "<img src='".get_bloginfo('template_url')."/images/button-visit-yourself.png' alt='' />";
							linkcloaker_only_link($visit_link,$image);
                        endif; 
						?>
                    </div>
                    
                    <div class="clearfix"></div>
                </div>
            </div>
		<?php
			endwhile;
			
			comments_template( '', true );
			
		endif;
		?>
            <!-- END | FOREACH | POST -->
        </div>
        <!-- ID | END | CONTENT -->
        
		<?php get_sidebar(); ?>
        
        <div class="clearfix"></div>
    </div>
    <!-- ID | END | BODY -->

<?php get_footer(); ?>