<?php get_header(); ?>

<div id="wrap">

<div id="content">

	<div id="homepage">
    
		<?php /*Check for the 'gallery_styles' function. if it's there, then include it. If not, do nothing*/ ?>
        <?php if (function_exists('gallery_styles')) : ?>
       	<div id="fcg">
        	<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
        </div>
        <?php endif; ?>  
            
    	<div class="homepageleft">
			<?php $featured_cat_1 = get_option('allure_featured_cat_1'); $featured_cat_1_num = get_option('allure_featured_cat_1_num'); if(!$featured_cat_1) $featured_cat_1 = 1; //setting a default ?>
            <h3><?php echo cat_id_to_name($featured_cat_1); ?></h3>	
            <div class="homebox">   
				<?php $recent = new WP_Query("cat=".$featured_cat_1."&showposts=".$featured_cat_1_num); while($recent->have_posts()) : $recent->the_post();?>              
                <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
				<a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
				<?php else: ?>
				<?php endif; ?>	
                <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
                <?php the_content_limit(110, ""); ?>
                <div style="border-bottom:1px solid #DDDDDD; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div>
                <?php endwhile; ?>
                
			<b><a href="<?php echo get_category_link($featured_cat_1); ?>" rel="bookmark">Read More Posts From This Category</a></b>
                
            </div> 
                                                               
		</div>
        
        <div class="homepageright">
			<?php $featured_vid_1 = get_option('allure_featured_vid_1'); $featured_vid_1_num = get_option('allure_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?>           
            <h3><?php echo cat_id_to_name($featured_vid_1); ?></h3>	
            <div class="homebox">    
				<?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$featured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?>
        		<h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
                <?php the_content(__('Read more'));?>
                <?php endwhile; ?>
            
            <?php $featured_vid_1 = get_option('allure_featured_vid_1'); $featured_vid_1_num = get_option('allure_featured_vid_1_num'); if(!$featured_vid_1) $featured_vid_1 = 1; //setting a default ?>  
            <h4>More <?php echo cat_id_to_name($featured_vid_1); ?></h4>
                <ul>
					<?php $recent = new WP_Query("cat=".$featured_vid_1."&showposts=".$featured_vid_1_list."&offset=".$featured_vid_1_num); while($recent->have_posts()) : $recent->the_post();?>
                    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                    <?php endwhile; ?>
                </ul>
                
            </div>            

        </div>	
        
	<div style="clear:both;"></div>
        
	</div>
			
	<?php include(TEMPLATEPATH."/sidebar.php");?>

</div>

<!-- The main column ends  -->

<?php get_footer(); ?>