<?php get_header(); ?>
       
    <!-- Content Starts -->
    <div id="content" class="wrap">
		<div class="col-left">
			<div id="main">
            
            <?php if (have_posts()) : $count = 0; ?>
                <h2 class="arh"><?php _e('Search Results for','woothemes');?> "<?php /* Search Count */ $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e('<span class="search-terms">','woothemes'); echo $key; _e('</span>','woothemes');?>" &rarr; <?php echo $count . ' '; _e('articles','woothemes'); wp_reset_query(); ?></h2>
            <?php $count = 0; while (have_posts()) : the_post(); $count++; ?>
                                                                        
                <!-- Post Starts -->
                <div class="post wrap">

                    <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
                     <?php if($post_meta == 'true'){ ?>
                    <p class="post-details">Posted on <?php the_time('d. M, Y'); ?> by  <?php the_author_posts_link(); ?> in <?php the_category(', ') ?></p>
                    <?php } ?>
                    <?php 
					if (in_category($audio_id) OR post_is_in_descendant_category( $audio_id ,get_the_id())) { 
					} else { ?>
                    <div class="post-image">
	                    <?php woo_get_image('image','80','80'); ?>
	                 </div>
                     <?php } ?>
                    
                    <div class="intro">
                    	<?php the_excerpt(); ?>
                    </div>
                    <div class="fix"></div>
                    
                    <div class="post-content">
                    
                    <?php
					if (in_category($audio_id) OR post_is_in_descendant_category( $audio_id ,get_the_id())) { 
					 woo_get_image('image','80','80','audio-thumb'); 
					 }
                    
                       
                       if (in_category($blog_id) OR post_is_in_descendant_category( $blog_id ,get_the_id())) { 
                         
                       the_content();
                       
                       } else {
                        // Media rich Content     
                        $instance = array(
                            'post_id' => get_the_id(),
                            'size' => 'thumb',
                            'image_caption' => 'off',
                            'image_title' => 'off',
							'image_width' => get_option('woo_gallery_image_width_archive'),
							'image_height' => get_option('woo_gallery_image_height_archive'),
                            'video_width' => 400,
                            'video_height' => 320,
                            'audio_width' => 240,
                            'audio_height' => 19,
                            'max' => 0,
                            "rows" => 0,
                            "lb" => false
                        );
                        
                        woo_media_add($instance);
                       
                        
                        ?>
                        <div class="fix"></div>
                        <?php
                           the_content();   
                        }
                        ?>
                        </div>
                <div class="fix"></div>

                </div>
                <!-- Post Ends -->
                                                    
               <?php if ($count == 1 && get_option('woo_ad_content') == 'true') include (TEMPLATEPATH . "/ads/content_ad.php"); ?>
               		 
               		      

                <?php endwhile; else: ?>
                	
                    <div class="post"><p><?php _e('Sorry, no posts matched your criteria.','woothemes'); ?></p></div>
                <?php endif; ?>  
        
                <div class="more_entries">
                    <?php if (function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
                    <div class="alignleft"><?php previous_posts_link(__('&laquo; Newer Entries ','woothemes')); ?></div>
                    <div class="alignright"><?php next_posts_link(__(' Older Entries &raquo;','woothemes')); ?></div>
                    <br class="fix" />
                    <?php } ?> 
                </div>		
                
            </div><!-- main ends -->
        </div><!-- .col-left ends -->

        <?php get_sidebar(); ?>

    </div><!-- Content Ends -->
		
<?php get_footer(); ?>
