<?php get_header();?>
            <div id="main" class="container">
            	<div id="mainContent">
					<div class="singlePost row">
                    	<?php
                          $post_type = 'videos';
                        // Get all the taxonomies for this post type
                        $taxonomies = get_object_taxonomies( (object) array( 'post_type' => $post_type ) );
                            // Gets every "category" (term) in this taxonomy to get the respective posts
                            $terms = get_terms( $taxonomy->name );
                          query_posts(array (
                            'post_type'=> "videos",
                            'paged' => get_query_var( 'paged' ),
                            'taxonomy' => $taxonomy ,
                            'term' => $term,
                            )); ?>
       					<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    	<div class="article span3">
                        	<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="300" height="190" 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="300" height="190" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
                                    <?php } elseif($video_type == 'dialymotion') { ?>
                                    <iframe frameborder="0" width="300" height="190" src="http://www.dailymotion.com/embed/video/<?php echo $video_id ?>?logo=0"></iframe>
                                    <?php } ?>
                                <?php } elseif($video_thumb == 'featured_image') { ?>
                                <?php $img = catch_that_image($post->ID); ?>
                                    <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-->
                        </div><!--End article-->
                        <?php endwhile; ?>
						<?php  else:  ?>
                        <?php  endif; ?>
                        <?php lio_pagination(); ?>
                    </div><!--End ContentBox-->
                </div><!--End Main Content-->
            </div><!--End Main-->
        </div><!--End Content-->
<?php get_footer();?>
