<?php get_header(); ?>
<div id="container">
<?php if (get_option('op_single_sub_menu') == 'on') { ?>
<div class="sub_menu">
<div class="inner">
<?php if ( function_exists( 'wp_nav_menu' ) ){
wp_nav_menu( array('theme_location' => 'secondary-menu', 'container_id' => 'secondaryMenu', 'fallback_cb'=>'secondarymenu' ));
} else { secondarymenu(); }
?>
<ul id="search_categories">
<li>
<form action="<?php bloginfo('url'); ?>/" method="get">
<div>
<?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=1&orderby=name&echo=0');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><div><input type="submit" value="View" /></div></noscript>
</div></form>
</li>
</ul>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
</div>
</div>
<?php } ?>
<div class="inner">
<div id="container_inline">
<?php get_sidebar('single'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="single_post">
<div class="single_title">
<h1><?php the_title(); ?></h1>
</div>
<?php if (get_option('op_single_meta') == 'on') { ?>
<div class="single_textmeta">
<div class="single_textmeta_day"><?php the_time('j'); ?></div>
<?php the_time('F'); ?>
</div>
<?php } ?>
<div class="clear"></div>
<div class="su-tabs">
<div class="su-tabs-nav">
<span><img src="<?php echo get_bloginfo('template_url').'/images/post_icon.png';?>" alt="Description"/>Description</span>
<span><img src="<?php echo get_bloginfo('template_url').'/images/video_icon.png';?>" alt="Trailer"/>Trailer</span>
<span><img src="<?php echo get_bloginfo('template_url').'/images/comments_icon.png';?>" alt="Comments"/>Comments (<?php comments_popup_link('0', '1', '%'); ?>)</span>
<span><img src="<?php echo get_bloginfo('template_url').'/images/your_icon.png';?>" alt="New tab"/> New tab </span>
</div>
<div class="su-tabs-panes">
<div class="su-tabs-pane">
<?php if (get_option('op_single_thumbnail') == 'on') { ?>
<?php if( has_post_thumbnail() ) { ?>
<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'post-thumbnails', false, '' ); $thumbnailSrc = $src[0]; ?>
<div class="single_thumbnail">
<a href="<?php echo $thumbnailSrc; ?>" rel="prettyPhoto" title="<?php the_title(); ?>" >
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $thumbnailSrc; ?>&h=240&w=170&zc=1&q=100" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
</a>
</div>
<?php } else {} ?>
<?php } ?>
<div class="single_text">
<div class="posts_rating">
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</div>
<?php the_content(''); ?>
</div>
</div>
<div class="su-tabs-pane">
<?php
$youtube = get_post_meta($post->ID, 'youtube', true);
$vimeo = get_post_meta($post->ID, 'vimeo', true);
?>
<?php if($youtube) { ?>
<div class="youtube_video">
<object style="height: 360px; width: 665px"><embed src="http://www.youtube.com/v/<?php echo $youtube; ?>&hl=en_US&fs=1&" type="application/x-shockwave-flash" width="665px" height="360px"></embed></object>
</div>
<? } ?>
<?php if($vimeo) { ?>
<div class="youtube_video">
<iframe src='http://player.vimeo.com/video/<?php echo $vimeo; ?>?title=0&byline=0&portrait=0' width='665' height='360' frameborder='0'></iframe>
</div>
<? } ?>
</div>
<div class="su-tabs-pane">
<?php if (get_option('op_author_box') == 'on') { ?>
<div id="authorbox">
<div class="authorbox_header">
<h3><?php $author_about = get_option("op_author_about"); ?>
<?php echo $author_about ?></h3><span></span>
</div>
<div class="authortext">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?>
<p>
<?php $author_description = get_option("op_author_description"); ?>
<?php echo $author_description ?>
</p>
</div>
</div>
<?php } ?>
<?php comments_template('', true); ?>
</div>
</div>
<div class="clear"></div>
<?php if (get_option('op_tags') == 'on') {?>
<p class="tags"> <?php the_tags('Tags: ', ', ', '<br />'); ?> </p>
<?php } ?>
<?php if (get_option('op_single_share_links') == 'on') { ?>
<div class="post_small_share_buttons">
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
<span><script type="IN/Share"></script></span>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis…f0ea34665803640"></script>
</div>
<?php } ?>
<div class="clear"></div>
<br />
<?php if (get_option('op_single_sim_posts') == 'on') { ?>
<div class="su-tabs">
<div class="su-tabs-nav">
<span><img src="<?php echo get_bloginfo('template_url').'/images/sim_posts_icon.png';?>" alt="Similar posts"/>Similar posts</span>
<span><img src="<?php echo get_bloginfo('template_url').'/images/recent_posts_icon.png';?>" alt="Recent"/>Recent posts</span>
<span><img src="<?php echo get_bloginfo('template_url').'/images/comments_icon.png';?>" alt="Popular posts"/>Popular posts</span>
</div>
<div class="su-tabs-panes">
<div class="su-tabs-pane">
<ul class="similar_posts_box">
<?php
$tags = wp_get_post_tags($post->ID);
if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'showposts'=>3,
'caller_get_posts'=>1
);
$my_query = new wp_query($args);
if( $my_query->have_posts() ) { while ($my_query->have_posts()) { $my_query->the_post();
?>
<li class="similar_post">
<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'post-thumbnails', false, '' ); $thumbnailSrc = $src[0]; ?>
<?php if(has_post_thumbnail()) { ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" >
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $thumbnailSrc; ?>&h=280&w=200&zc=1&q=100" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
</a>
<?php } else { } ?>
<h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?> »</a></h1>
</li>
<?php } echo '</ul>'; } } ?>
<?php wp_reset_query();?>
</div>
<div class="su-tabs-pane">
<ul class="similar_posts_box">
<?php
$my_query = new WP_Query('showposts=3');
while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;
?>
<li class="similar_post">
<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'post-thumbnails', false, '' ); $thumbnailSrc = $src[0]; ?>
<?php if(has_post_thumbnail()) { ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" >
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $thumbnailSrc; ?>&h=280&w=200&zc=1&q=100" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
</a>
<?php } else { } ?>
<h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?> »</a></h1>
</li>
<?php endwhile; ?>
<?php wp_reset_query();?>
</ul>
</div>
<div class="su-tabs-pane">
<ul class="similar_posts_box">
<?php
$my_query = new WP_Query('orderby=comment_count&posts_per_page=3');
while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;
?>
<li class="similar_post">
<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'post-thumbnails', false, '' ); $thumbnailSrc = $src[0]; ?>
<?php if(has_post_thumbnail()) { ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" >
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $thumbnailSrc; ?>&h=280&w=200&zc=1&q=100" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
</a>
<?php } else { } ?>
<h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php the_title(); ?> »</a></h1>
</li>
<?php endwhile; ?>
<?php wp_reset_query();?>
</ul>
</div>
</div>
</div>
<div class="clear"></div>
<?php } ?>
<?php if (get_option('op_single_banner') == 'on') { ?>
<div id="banner_single">
<?php $single_banner = get_option("op_single_banner_code"); ?>
<?php echo stripslashes($single_banner); ?>
</div>
<?php } ?>