<div class="blog-post-header">    
<?php if (has_post_thumbnail() && $blog_layout !== 'minimal' ): // Post Thumbnail ?>
	<div class="blog-post-image slides">
        <?php echo cloudfw_make_slider_for_blog(get_the_ID(), __url( get_permalink() )); ?>
    </div><!-- /.blog-post-image -->
<?php endif;?>

<?php if (!is_search()): ?>
    <div class="left-side">
        <div class="make-shadow min-container global-radius">
            <div class="min-content global-radius">
                
                <?php if ($sharing !== 'FALSE'):?>
                <a href="javascript:void(0);" class="blog-post-min-share tooltip sharethis" title="<?php _e('Share The Post','cloudfw'); ?>">
                    <span class="blog-post-min-share-icon sprite"></span>
                </a><!-- /a.blog-post-min-share -->  
                      
                <div class="min-divider"></div>
                <?php endif; // sharing ?>
            
                <?php
                    $commentscount = get_comments_number();
                    if (comments_open()):
                ?>
                <a href="<?php comments_link();?>" class="blog-post-min-comment">
                    <span class="blog-post-min-comment-icon sprite"></span>
                    <?php echo $commentscount;?>
                </a><!-- /a.blog-post-min-comment -->
                
                <div class="min-divider"></div>
                <?php endif; // comment_open ?>
                
                <a href="<?php the_permalink();?>" class="blog-post-min-permalink tooltip" title="<?php printf( esc_attr__( 'Permalink to %s', 'cloudfw' ), the_title_attribute( 'echo=0' ) );?>" rel="bookmark">
                    <span class="blog-post-min-permalink-icon sprite"></span>
                </a>
                
            </div><!-- /.min-content -->
        </div><!-- /.min-container -->

         <?php if (is_single()):
		 	
			$prePost = get_previous_post(false);
			$prevURL = __url( get_permalink($prePost->ID) );
			$prevTitle = __translate( get_the_title($prePost->ID) );
			
			$nextPost = get_next_post(false);
			$nextURL = __url( get_permalink($nextPost->ID) );
			$nextTitle = __translate( get_the_title($nextPost->ID) );
			
		  ?>
      	 <div class="make-shadow min-container global-radius" style="margin-top: 20px;">
            <div class="min-content global-radius">
                
                
                <?php if ( __url( get_permalink() ) != $nextURL):?>
                <a href="<?php echo $nextURL; ?>" class="blog-post-min-next-post tooltip" title="<?php printf( esc_attr__( 'Next Post: %s', 'cloudfw' ), $nextTitle );?>" rel="next">
                    <span class="blog-post-min-next-post-icon sprite"></span>
                </a>
                
                <div class="min-divider"></div>
                <?php endif; // next_post?>
                
                <?php if ( __url( get_permalink() ) != $prevURL):?>
                <a href="<?php echo $prevURL; ?>" class="blog-post-min-previous-post tooltip" title="<?php printf( esc_attr__( 'Previous Post: %s', 'cloudfw' ), $prevTitle );?>" rel="previous">
                    <span class="blog-post-min-previous-post-icon sprite"></span>
                </a>
                <?php endif; // previous_post?>
            
            </div><!-- /.min-content -->
        </div><!-- /.min-container -->
        <?php endif; // is_single?>
        
    </div><!-- /.left-side -->
<?php endif;?>
    
    
    <div class="blog-post-header-init">
    
    <div class="blog-post-header-wrapper">
		
        <div class="blog-post-header-action">
    
            
            <!-- Blog Post Title -->
            <h1 class="blog-title"><?php 
                echo '<a href="'. __url( get_permalink() ) .'" title="'.sprintf( esc_attr__( 'Permalink to %s', 'cloudfw' ), the_title_attribute( 'echo=0' ) ).'" rel="bookmark">'.__translate( get_the_title() ).'</a>';
            ?></h1>
            <!-- /Blog Post Title -->
        	
            <?php if(get_post_type() == "post" ) { // ?>
            <div class="blog-post-meta">
            
            <?php
                printf( '<span class="blog-post-date" title="%1$s, %2$s">%1$s</span>',
                        get_the_date( $date_format ),
                        esc_attr( get_the_time( $time_format ) ));
                
                printf(  ', %1$s', get_the_category_list( ', ' ) );
            ?>
            
            </div><!-- /.blog-post-meta -->
            <?php } // ?>
                
        </div><!-- /.blog-post-header-action -->
        
              
        <div class="blog-post-sharing">
            
            <div class="blog-post-ss">
                <span class="permalink"><?php the_permalink(); ?></span>
                <?php if ($sharing !== 'FALSE') echo cloudfw_bookmark_it(); ?>
                <div class="cf"></div>
                
            </div><!-- /.blog-post-ss -->
            
        </div><!-- /.blog-post-sharing -->
        
        <div class="cf"></div>
        
    </div><!-- /.blog-post-header-wrapper -->
    </div><!-- /.blog-post-header-init -->

</div><!-- /.blog-post-header -->

<div class="blog-post-in">

<?php if ($blog_layout == 'minimal' && !is_single()) if (has_post_thumbnail()) echo '<div class="blog-post-minimal-thumbnail">'.get_the_post_thumbnail(get_the_ID(),array(80,80)).'</div>'; ?>

<?php 
if (($blog_type !== 'excerpt' && $blog_layout !=='minimal')):
	the_content(); 
else:
	if (is_single()): the_content(); else: the_excerpt(); endif;
endif;

if (_isOnOff($facebook_after_content)) echo facebook_like_button();

if (is_single()) {echo get_the_tag_list( '', ', ' );}

?>

<div class="cf"></div>
</div>

<div class="sector"></div>

<?php if (is_single() && $author !== 'FALSE'):?>

<div id="author">

	<div id="author-gravatar">
    	<a href="<?php the_author_meta('url'); ?>"><?php echo get_avatar(get_the_author_meta( 'ID' ),60); ?></a>
	</div><!-- /#author-gravatar -->
    
	<div id="author-info">
    	<div id="author-name">
        	<strong><?php _e('Author','cloudfw'); ?>:</strong> 
		<?php
		
			if (get_the_author_meta('first_name') || get_the_author_meta('last_name'))
				echo get_the_author_meta('first_name').' '.get_the_author_meta('last_name');
			else
				echo get_the_author();
		
		  ?>
        </div><!-- /#author-info -->
        
        <?php the_author_meta('description'); ?>
        
         <div class="cf"></div>
		 
		 <?php $author_twitter = get_the_author_meta( 'twitter' ); $author_facebook = get_the_author_meta( 'facebook' ); $author_website = get_the_author_meta( 'user_url' );
		
			if ($author_website) echo '<div id="author-website"><a href="'.$author_website.'">'.__('Website','cloudfw').'</a></div>';
			if ($author_facebook) echo '<div id="author-facebook"><a href="'.$author_facebook.'" rel="nofollow">'.__('Facebook','cloudfw').'</a></div>';
			if ($author_twitter) echo '<div id="author-twitter"><a href="http://twitter.com/'.$author_twitter.'" rel="nofollow">'.__('Twitter','cloudfw').'</a></div>';
		
		?>
        <div class="cf"></div>
	</div><!-- /#author-info -->
    
    <div class="cf"></div>

</div><!-- /#author -->
<div class="sector"></div>

<?php endif; // author

wp_reset_postdata();
?>


<?php if (is_single()){
	
	if ( comments_open() && !cloudfw_comments_open() ) comments_template();	

}?>

