<?php $latestcount =  $data['latestcount'];?>

                    <div id="latestPosts">
                    	<div id="latestPostsTop">
                        	<div id="latestPostsTitle">
                            	<h2><?php _e('Latest Posts','lioit') ?></h2>
                            </div><!--End Latest PostsTitle-->
                            <span class="titleArrow"></span>
                            <a href="<?php bloginfo( 'rss2_url' ); ?>" class="blackRss"></a>
                        </div><!--End LatestPostsTop-->
                        <div class="contentBox">
                        	<div id="latestPostsList">
                                <?php query_posts(array('showposts' => $latestcount)); ?>
                  				<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>	
                            	<div class="latestPost">
                            		
                                	<div class="latestPostThumb ThumbCover">
                                    	<div class="cover" style="top: 100%;">
                                            <a class="postype" href="<?php the_permalink(); ?>"></a>
                                            <a class="detail" href="<?php the_permalink(); ?>" title="View detail"></a>										
                                        </div>
                                    	<?php $img = catch_that_image($post->ID); ?>
                                    	<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
                                        <img src="<?php echo Lioit_URI; ?>/scripts/timthumb.php?src=<?php echo $img ?>&amp;w=140&amp;h=120&amp;zc=1" alt="<?php the_title(); ?>" />
                                        </a>
                                    </div><!--End LatestPostThumb-->
                                    <div class="latestPostDetails">
                                    	<?php $type_badge = get_post_meta($post->ID, 'lioit_post_type', true);?>
                                    	<h1 class="latestPostTitle"><div class="<?php echo $type_badge; ?> articleType"></div><a href="<?php the_permalink();?>"><?php the_title(''); ?> ...</a></h1>
                                        <p><?php the_excerpt_max_charlength('160'); ?> ...</p>
                                        <ul class="postMeta">
                                        	<li class="postAuthor"><?php the_author_posts_link(); ?></li>
                                        	<li class="postDate"><?php the_time('F d, Y'); ?></li>
                                            <li class="postComments"><a href="<?php comments_link();?>"><?php comments_number('No Comments','1 Comment','% Comments');?></a></li>
                                        </ul><!--End postMeta-->
                                    </div><!--End LatestPostDetails-->
                                </div><!--End LatestPost-->
                                <?php endwhile; ?>
								<?php  else:  ?>
                                <!-- Else in here -->
                                <?php  endif; ?>
                                <?php wp_reset_query(); ?>
                            </div><!--End Latest Posts List-->
                        </div><!--End ContentBox-->
                    </div><!--End Latest Posts-->