
<?php
	$show = ARRAY(); // initiate
	for ($i = 1; $i <= $Webcolors['showcatsN']; $i++ ) array_push($show, $Webcolors['showcats'.$i]);
	$rightwidgetsArray = array_merge($show);
?>  
            	<div id="slider">
                	<div id="sliderContent">
                        <div class="list_carousel">
                            <ul id="foo2">
                            	<?php foreach($show as $section) : ?>
										<?php $getposts = new WP_query(); $getposts->query('showposts='.$Webcolors['showpostnum'].'&cat='.$section); ?>
                                        <?php global $wp_query; $wp_query->in_the_loop = true; ?>
                                        <?php while ($getposts->have_posts()) : $getposts->the_post(); ?>
                                    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(); ?></a></li>
                                    <?php endwhile; ?>
        								<?php endforeach; ?> 
                            </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-->
