

<div class="fullwidthbanner-container">
<div class="fullwidthbanner" >
			
<ul>	

<?php 
    $featucat = get_option('op_feat_cat');
	$slides = get_option('op_feat_slides');
	if (get_option('op_recent_featured_flex') == 'Recent posts') {
	$my_query = new WP_Query('showposts='. $slides .'');	
	} else {
    $my_query = new WP_Query('showposts='. $slides .'&category_name='. $featucat .'');	
	}
    if ($my_query->have_posts()) :
    ?>					
		
    <?php while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; ?>	
	
			
	<li data-transition="zoomout" data-slotamount="7" data-masterspeed="1000" >
	<img src="<?php echo get_template_directory_uri(); ?>/images/transparent.png"  alt=""  data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">

	<div class="caption fade fullscreenvideo"
    data-autoplay="true"
    data-nextslideatend="true"
    data-x="0"
    data-y="0"
    data-speed="500"
    data-start="10"
    data-easing="easeOutBack">

		<?php 
        $youtube = get_post_meta($post->ID, 'r_youtube', true);
        $vimeo = get_post_meta($post->ID, 'r_vimeo', true);
        ?>

		<?php if($youtube) { ?>
		<iframe src="http://www.youtube.com/embed/<?php echo $youtube; ?>?hd=1&amp;enablejsapi=1&amp;wmode=opaque&amp;controls=1&amp;showinfo=0" width="100%" height="100%"></iframe>
		<?php } ?>
		
        <?php if($vimeo) { ?>
		<iframe src="http://player.vimeo.com/video/<?php echo $vimeo; ?>?title=0&amp;byline=0&amp;portrait=0;api=1" width="100%" height="100%" ></iframe>
		<?php } ?>
	
	</div>
	</li>
	
	<?php endwhile; wp_reset_query(); ?> 
    <?php endif; ?>   
				
</ul>
<div class="tp-bannertimer"></div>
			
</div>
</div>
	
<script type="text/javascript">

var revapi;

(function($){ 
$(window).load(function(){ 

var video = $(".fullwidthbanner").attr("src");
$(".fullwidthbanner").attr("src","");
$(".fullwidthbanner").attr("src",video);
revapi = jQuery('.fullwidthbanner').revolution(
{
							delay:9000,
							startwidth:1170,
							startheight:500,
							hideThumbs:10,

							thumbWidth:100,
							thumbHeight:50,
							thumbAmount:5,

							navigationType:"both",
							navigationArrows:"solo",
							navigationStyle:"round",

							touchenabled:"on",
							onHoverStop:"on",

							navigationHAlign:"center",
							navigationVAlign:"bottom",
							navigationHOffset:0,
							navigationVOffset:0,

							soloArrowLeftHalign:"left",
							soloArrowLeftValign:"center",
							soloArrowLeftHOffset:20,
							soloArrowLeftVOffset:0,

							soloArrowRightHalign:"right",
							soloArrowRightValign:"center",
							soloArrowRightHOffset:20,
							soloArrowRightVOffset:0,

							shadow:0,
							fullWidth:"on",
							fullScreen:"off",

							stopLoop:"off",
							stopAfterLoops:-1,
							stopAtSlide:-1,

							shuffle:"off",

							autoHeight:"off",
							forceFullWidth:"on",

							hideThumbsOnMobile:"off",
							hideBulletsOnMobile:"on",
							hideArrowsOnMobile:"on",
							hideThumbsUnderResolution:0,

							hideSliderAtLimit:0,
							hideCaptionAtLimit:768,
							hideAllCaptionAtLilmit:0,
							startWithSlide:0,
					
							fullScreenOffsetContainer: ""
});

})
})(jQuery);

</script>
