<!--Begin Review Panels-->
<div id="review-panels">

	<!--Begin Review Panel-->
	<div class="review-panel" id="<?php echo $gp_settings['review_tab']; ?>">

		<?php the_content(); ?>
		
		<?php if($gp_settings['meta_tags'] == "0") { ?>
			<?php the_tags('<div class="post-meta post-tags">'.__('Tags: ', 'gp_lang'), ', ', '</div>'); ?>
		<?php } ?>
	
		<?php wp_link_pages('before=<div class="clear"></div><div class="wp-pagenavi post-navi">&pagelink=<span>%</span>&after=</div>'); ?>		
		
		<?php if($gp_settings['author_info'] == "0") { ?><div class="clear"></div><?php echo do_shortcode('[author]'); } ?>
							
		<?php if($gp_settings['related_items'] == "0") { require('related-items.php'); } ?>
				
		<?php comments_template(); ?>
		
	</div>
	<!--End Review Panel-->
	
	<?php for($i = 1; $i < 11; $i++) { // Begin Loop Tabs ?>
	
	<?php if(get_post_meta($post->ID, 'ghostpool_link_title_'.$i, true)) { // Begins Tabs ?>
	
		<?php if(preg_match("/http:/", get_post_meta($post->ID, 'ghostpool_link_url_'.$i, true))) {} else { ?>

			<!--Begin Review Panel-->
			<div class="review-panel" id="<?php echo(get_post_meta($post->ID, 'ghostpool_link_title_'.$i, true)); ?>">
			
				<?php if(get_post_meta($post->ID, 'ghostpool_link_type_'.$i, true) == "List Of Articles") { ?>
		
					<?php $tab_query = new WP_Query('post_type=any&posts_per_page=-1&tag='.get_post_meta($post->ID, 'ghostpool_link_url_'.$i, true)); if ($tab_query->have_posts()) : while ($tab_query->have_posts()) : $tab_query->the_post(); ?>
					
						<?php require('review-tab-loop.php'); ?>
					
					<?php endwhile; endif; wp_reset_query(); ?>
				
				<?php } elseif(get_post_meta($post->ID, 'ghostpool_link_type_'.$i, true) == "List Of Videos") { ?>

					<?php $tab_query = new WP_Query('post_type=any&posts_per_page=-1&meta_key=ghostpool_post_type&meta_compare==&meta_value=Video&tag='.get_post_meta($post->ID, 'ghostpool_link_url_'.$i, true)); if ($tab_query->have_posts()) : while ($tab_query->have_posts()) : $tab_query->the_post(); ?>
					
						<?php require('review-tab-loop.php'); ?>
					
					<?php endwhile; endif; wp_reset_query(); ?>
					
				<?php } elseif(get_post_meta($post->ID, 'ghostpool_link_type_'.$i, true) == "Single Post/Page") { ?>
						
					<?php $tab_query = new WP_Query('post_type=any&name='.get_post_meta($post->ID, 'ghostpool_link_url_'.$i, true)); if ($tab_query->have_posts()) : while ($tab_query->have_posts()) : $tab_query->the_post(); ?>
						
						<?php if($gp_settings['title'] == "Show") { ?><h2><?php the_title(); ?></h2><?php } ?>
						
						<?php require('videoplayer.php'); ?>

						<?php the_content(); ?>
						
						<?php if($gp_settings['meta_tags'] == "0") { ?>
							<?php the_tags('<div class="post-meta post-tags">'.__('Tags: ', 'gp_lang'), ', ', '</div>'); ?>
						<?php } ?>
					
					<?php endwhile; endif; wp_reset_query(); ?>
								
				<?php } elseif(get_post_meta($post->ID, 'ghostpool_link_type_'.$i, true) == "Image Gallery") { ?>
				
					<?php $tab_query = new WP_Query('post_type=any&meta_key=ghostpool_post_type&meta_compare==&meta_value=Image Gallery&name='.get_post_meta($post->ID, 'ghostpool_link_url_'.$i, true)); if ($tab_query->have_posts()) : while ($tab_query->have_posts()) : $tab_query->the_post(); ?>
	
						<?php if($post->post_content) { ?>
							<?php the_content(); ?>			
							<div class="sc-divider"></div>
						<?php } ?>	
						
						<?php $args = array('post_type' => 'attachment', 'post_mime_type' => 'image', 'numberposts' => -1, 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_parent' => $post->ID); $attachments = get_children($args); if ($attachments) { foreach ($attachments as $attachment) { ?>
	
							<a href="<?php echo wp_get_attachment_url($attachment->ID); ?>" rel="prettyPhoto[gallery<?php echo $i; ?>]" title="<?php echo $attachment->post_excerpt ?>">		
								<?php $image = vt_resize($attachment->ID, '', 137, 100, true); ?>
								<img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" alt="<?php echo $attachment->post_title ?>" class="review-image" />				
							</a>
							
						<?php }} ?>
						
					<?php endwhile; endif; wp_reset_query(); ?>
					
				<?php } ?>	
							
			</div>
			<!--End Review Panel-->
		
		<?php } ?>
		
	<?php } // End Tabs ?>
	
	<?php } // End Loop Tabs ?>

</div>
<!--End Review Panels-->