<?php get_header(); ?>
<div class="wrapper">
	<div id="content">
	<div class="index-posts">
			<?php if (have_posts()) : ?>

				<div class="search-results"><h2><?php _e('Search results for','parallax');?> &#8216;<?php echo get_search_query(); ?>&#8217;</h2></div>

				 <?php $i = 0; ?>  
  <?php $per_column = ceil($posts_per_page / 2); ?>  
  <?php if ($wp_query->post_count <= $posts_per_page) $per_column = ceil($wp_query->post_count / 2); ?>  
<div class="column">
				 <?php while (have_posts()) { the_post(); $i++; ?>  

					<div class="single-post"id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php if (trim(get_the_title()) != '') { the_title(); } else  _e('No title', 'parallax'); ?></a></h2>
<div class="single-post-image"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumb-feature', array('alt' => '', 'title' => '')) ?></a></div>			
						
							<div class="entry"><?php the_excerpt() ?></div></a>
				</div><!-- .post -->

		<?php if ($i == $per_column) { ?>
			</div><!-- .column -->

			<div class="column right">
	      <?php } ?>  
  
  <?php } ?>  


	

			</div><!-- .column -->

			<div class="clear"></div>


				

				<div class="posts-navigation">
<div id="nav"><?php if (function_exists('parallax_wp_corenavi')) parallax_wp_corenavi(); ?></div>
					<div class="clearfix"></div>
				</div>

			<?php endif; ?>

		</div>


<div class="bottom-widget">
<div class="sb-right">
    <?php if ( is_active_sidebar( 'sidebar-posts' ) ) : ?>
	    <?php dynamic_sidebar( 'sidebar-posts' ); ?>
    <?php endif; ?>
</div>
</div>
<div class="clear"></div>
	<?php 
	include get_template_directory() . '/featured-posts.php'; ?>
	<div class="clearfix"></div>		
</div>
</div>
<div class="clear"> </div>
<?php get_footer(); ?>
