<?php $slidercat = of_get_option('slider_cat'); ?>
<?php $slidercount = of_get_option('slider_count'); ?>
<?php if(of_get_option('slider_show') != 'true') { ?>
        <div id="slider">
        	<div id="sliderContent">
            	<div class="list_carousel">
                    <ul id="foo2">
                        <?php $getposts = new WP_query(); $getposts->query('showposts='.$slidercount.'&cat='.$slidercat); ?>
						<?php global $wp_query; $wp_query->in_the_loop = true; ?>
                        <?php while ($getposts->have_posts()) : $getposts->the_post(); ?>
                        <li><a href="<?php the_permalink();?>"><?php the_post_thumbnail(); ?></a>
                        	<a href="<?php the_permalink();?>"><h2><?php $title = the_title('','',FALSE); echo substr($title, 0, 50); ?> ...</h2></a>
                        </li>
                        <?php endwhile; ?>
                    </ul>
                    <div class="clearfix"></div>
                    <a id="prev2" class="prev" href="#"></a>
                    <a id="next2" class="next" href="#"></a>
                    <div id="pager2"></div>
                </div>        
            </div><!--End SliderContent-->
        </div><!--End Slider-->
<?php }else { ?> 
<?php } ?>