
<?php
if(TL_MODE == 'FE' && $this->isStandalone)
{
	// include the revolutonslider script
	global $objPage;
	if(!$objPage->hasJQuery)
	{
		$GLOBALS['TL_JAVASCRIPT'] = TL_ASSETS_URL.'assets/jquery/ui/'.$GLOBALS['TL_ASSETS']['JQUERY_UI'].'/jquery-ui.min.js';
	}
	$GLOBALS['TL_JAVASCRIPT'][] = 'files/cto_layout/scripts/rs-plugin/js/jquery.themepunch.revolution.js|satic';
	$GLOBALS['TL_JAVASCRIPT'][] = 'files/cto_layout/scripts/rs-plugin/js/jquery.themepunch.tools.min.js';
	$GLOBALS['TL_CSS'][] = 'files/cto_layout/scripts/rs-plugin/css/settings.css|static';
	$GLOBALS['TL_CSS'][] = REVOLUTIONSLIDER_PATH.'/assets/css/styles.css|static';
}
?>

<?php if($this->isStandalone): ?>
<div <?php echo $this->cssID; ?> class="ce_revolutionslider_video_wrapper standalone <?php echo $this->selector; ?> banner responsive tp-banner fullwidthbanner-container">
<ul>
	<li class="slide slide_0 first last" data-transition="fade">
<?php endif; ?>

	<div class="<?php echo $this->class; ?> tp-caption block" data-aspectratio="16:9" data-forcerewind="on" <?php echo $this->attributes; ?> <?php if($this->styles): ?>style="<?php echo $this->styles; ?>"<?php endif; ?>>
	
	<?php if($this->source == 'local'): ?>
	<video class="video-js vjs-default-skin" <?php if($this->styles): ?>style="<?php echo $this->styles; ?>"<?php endif; ?> preload="none" <?php echo $this->controls; ?> <?php echo $this->loop; ?> <?php if($this->poster): ?>poster="<?php echo $this->poster; ?>"<?php endif; ?><?php if($this->autoplay): ?> muted<?php endif; ?>>
		<?php foreach($this->files as $file): ?>
		<source src="<?php echo $file['src']; ?>" type="<?php echo $file['mime']; ?>"/>
		<?php endforeach; ?>
		<!-- <track kind="captions" src="" srclang="en" label="English" /> -->
		<p class="error"><?php echo $this->no_video_support; ?></p>
	</video>
	<?php elseif($this->source == 'external'): ?>
	<?php echo $this->iframe; ?>
	<?php endif; ?>
	</div>

<?php if($this->isStandalone): ?>
	</li>
</ul></div>

<script>
/* <![CDATA[ */

/**
 * Revolution Slider Template file
 * For more settings see: http://www.orbis-ingenieria.com/code/documentation/documentation.html#!/documenter_cover
 */
jQuery(document).ready(function() 
{	
	// init slider  
	jQuery('.<?php echo $this->selector; ?>').show().revolution({
		// general settings
		startwidth:			<?php echo $this->startWidth; ?>,
		startheight:		<?php echo $this->startHeight; ?>,
		shadow: 0
	});
});

/* ]]> */
</script>

<?php endif; ?>
