<?php include (TEMPLATEPATH . '/header-home.php'); ?>   
<?php $aOptions = RevolutionChrome::initOptions(false); ?>

    <div class="wrapper">
    
        <div id="secondarytop">
            <!-- nothing to see here -->
        </div>
        
        <div id="secondary">
            
			<div id="content">
				
                <div id="featured">
                
                    <div id="slider">
                    
                        <div class="scroll">
                         <div class="scrollContainer">
                            <?php if ($aOptions['featured-cat'] != '') { query_posts('cat=' . $aOptions['featured-cat'] . '&showposts=7'); } ?>
                            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                                <div class="panel" id="post-<?php the_ID(); ?>" style="background: url(<?php $key="postimage"; echo get_post_meta($post->ID, $key, true); ?>) top left no-repeat;">
                           
                                    <div class="insert">
                                        <h2><a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php the_title() ?></a></h2>
                                        <?php the_content_rss('', TRUE, '', 60); ?>
                                        <span class="featuredmorelink">
                                            <a href="<?php the_permalink() ?>" title="<?php the_title() ?>">Read More...</a>
                                        </span>
                                    </div>
                                </div>
                            <?php endwhile; else: ?>
                            <?php endif; ?>
                            </div>
                            
                        </div> <!-- end scroll -->
                        
                    </div> <!-- end slider -->
                    
                </div> <!-- end featured -->                 
                
                <div class="title">
                	<h3>Featured Photos:</h3>
                </div>
                
                <div id="photos">
                <?php if ($aOptions['photo-cat'] != '') { query_posts('showposts=5&cat=' . $aOptions['photo-cat']); } ?>
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                	<a href="<?php $key="postimage"; echo get_post_meta($post->ID, $key, true); ?>" title="<?php the_title() ?>"><img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php the_title() ?>" /></a>
                <?php endwhile; else: ?>
                <?php endif; ?>  
                </div>
                
                <div class="title">
                	<h3>Recent Articles:</h3>
                </div>
              
				<div id="homebox">
				<?php if ($aOptions['homebox-cat'] != '') { query_posts('showposts=4&cat=' . $aOptions['homebox-cat']); } ?>
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                    <div class="boxitem">
						<h5><a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php the_title() ?></a></h5>
                        <span class="itemdets">
                            Posted On: <a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php the_time('F j, Y'); ?></a><br />
                            Posted In: <?php the_category(', ') ?><br />
                            Comments: <a href="<?php the_permalink() ?>#comments" title="<?php the_title() ?>"><?php comments_number('No Responses','One Response','% Responses'); ?></a>
                        </span>
                        <img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php the_title() ?>" />
                        <?php the_content_rss('', TRUE, '', 25); ?>
						<span class="morelink">
                        	<a href="<?php the_permalink() ?>" title="<?php the_title() ?>">Read More...</a>
                        </span>
                    </div>
                <?php endwhile; else: ?>
                <?php endif; ?>    
                </div>            
                
            </div> <!-- end content -->
        
			<?php get_sidebar(); ?>       
        
        </div> <!-- end secondary -->
        
    </div> <!-- end wrapper -->

<?php get_footer(); ?>