<div class="homeVideos">
<div class="homeTitle"><h2><i class="icon-doc"></i><?php _e('Latest Videos','lioit') ?></h2></div>
<div class="mainVideos">

	
    <div class="VideosList">
    	<ul>
        	<?php query_posts(array('post_type' => 'videos','showposts' => '4')); ?>
        	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
        	<li class="smallVideo mainBorder">
            	<div class="smallVideoitem">
                	<?php
					$video_type = get_post_meta($post->ID, 'lioit_video_type', true);
					$video_id = get_post_meta($post->ID, 'lioit_video_id', true);
					$video_thumb = get_post_meta($post->ID, 'lioit_video_thumb', true);
					$featured_image = get_post_meta($post->ID, 'featured_image', true);
					$video = get_post_meta($post->ID, 'video', true);
					?> 
					<?php if($video_thumb == 'video') { ?>
						<?php if($video_type == 'youtube') { ?>
						<iframe width="320" height="220" src="http://www.youtube.com/embed/<?php echo $video_id; ?>?rel=0" frameborder="0" allowfullscreen></iframe>
						<?php } elseif($video_type == 'vimeo') { ?>
						<iframe src="http://player.vimeo.com/video/<?php echo $video_id; ?>?title=0&amp;byline=0&amp;portrait=0&amp;color=ba0d16" width="320" height="220" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
						<?php } elseif($video_type == 'dialymotion') { ?>
						<iframe frameborder="0" width="320" height="220" src="http://www.dailymotion.com/embed/video/<?php echo $video_id ?>?logo=0"></iframe>
						<?php } ?>
					<?php } elseif($video_thumb == 'featured_image') { ?>
                    
						<div class="homeVThumb ThumbCover">
                        	<div class="cover" style="top: 100%;">
                                            <a class="postype prettyphoto" href="<?php echo $img ?>" rel="prettyPhoto"></a>
                                            <a class="detail" href="<?php the_permalink(); ?>" title="View detail"></a>										
                                        </div>
							
							<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
							<?php the_post_thumbnail('main-block', array('title' => strip_tags(get_the_title()))); ?>
							</a>
						</div><!--End HomeVideo Thumb-->
					<?php } ?>
                    <div class="listVideoContent">
                    <h3 class="videoTitle"><a href="<?php the_permalink(); ?>"><i class="icon-film"></i><?php the_title(); ?></a></h3>
                </div><!--End Video Content-->
                </div><!--End Small Video item-->
            </li>
            <?php endwhile; ?>
			<?php  else:  ?>
            <!-- Else in here -->
            <?php  endif; ?>
            <?php wp_reset_query(); ?>
        </ul>
    </div><!--End Video List-->
    
</div><!--End Main Videos-->
	<div class="otherVideos">
    	<ul>
        	<?php query_posts(array('post_type' => 'videos','showposts' => '2','offset' => 4)); ?>
        	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
        	<li class="mainBorder"><h3 class="videoTitle"><a href="<?php the_permalink(); ?>"><i class="icon-film"></i><?php the_title(); ?></a></h3></li>
            <?php endwhile; ?>
			<?php  else:  ?>
            <!-- Else in here -->
            <?php  endif; ?>
            <?php wp_reset_query(); ?>
        </ul>
    </div><!--End OtherVideos-->
</div><!--End HomeVideos-->