<?php 
global $smof_data; 
$carouselposts = $smof_data['cat_carouselposts']; 
$carocount = $smof_data['carocount']; 
$carotitle = $smof_data['carotitle']; 
$category_id = get_cat_ID($carouselposts); 
?>
				
					
					
						<div id="carouselPosts">
                        <div class="homeTitle"><h2><i class="icon-doc"></i><?php echo $carotitle; ?></h2><div class="carouselControl">
                           <a class="carousel-prev buttonShadow" href="#"><i class="icon-angle-left"></i></a>
                           <a class="carousel-next buttonShadow" href="#"><i class="icon-angle-right"></i></a>
                     	 </div><!--End Control--></div>
                        <div class="contentBox">
                        
                        <div id="carousel" class="clearfix">
                	<ul id="featuredcarousel">
                                <?php query_posts(array("ignore_sticky_posts" => 1, 'showposts' => $carocount, 'cat' => $category_id )); ?>
                  				<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                                <li <?php post_class(); ?>>
                               		
                                    	<div class="latestPostThumb ">
                                    	
                                    	<a href="<?php the_permalink(); ?>" class="tooltip top" title="<?php the_title(); ?>">
                                        <?php the_post_thumbnail('main-block', array('title' => strip_tags(get_the_title()))); ?>
                                        </a>
                                    </div><!--End LatestPostThumb-->
                                       	
                                        
                                       
                            
                                </li>
                                <?php endwhile; ?>
								<?php  else:  ?>
                                <!-- Else in here -->
                                <?php  endif; ?>
                                <?php wp_reset_query(); ?>
                </ul>
              </div><!--End carouselPosts-->
              </div><!--End contentBox-->
              </div><!--End carouselPosts-->
            
                <script type="text/javascript">
    
        jQuery(document).ready(function($){
        // jQuery("html").niceScroll();
        $('#featuredcarousel').carouFredSel({
          auto: false,
            prev: '.carousel-prev',
            next: '.carousel-next',
            mousewheel: true,
            swipe: {
                onMouse: true,
                onTouch: true
            }
        });
        });

</script>