<!-- Video -->

<div class="app">
<?php
	$video_file = get_option('gpp_video_file');
	$iphone_file = get_option('gpp_iphone_file');
	$video_thumbnail = get_option('gpp_video_thumbnail');
	$video_width = get_option('gpp_video_width');
	$video_height = get_option('gpp_video_height');
?>

<div id="flashcontent-home">
	<?php
		if (get_option('gpp_iphone') =='false')
		{
		echo '<div class=\"box\"><p>Please install the free <a href=\"http://www.adobe.com/products/flashplayer/\">Adobe Flash Player</a> to view this content.</p></div>';
		}
	?>
</div>

<script type="text/javascript">
	var flashvars = {};
	flashvars.imagePath = "<?php echo $video_thumbnail; ?>";
	flashvars.videoPath = "<?php echo $video_file; ?>";
	flashvars.autoStart = "false";
	flashvars.autoHide = "false";
	flashvars.autoHideTime = "5";
	flashvars.hideLogo = "true";
	flashvars.volAudio = "60";
	flashvars.newWidth = "<?php echo $video_width; ?>";
	flashvars.newHeight = "<?php echo $video_height; ?>";
	flashvars.disableMiddleButton = "false";
	flashvars.playSounds = "true";
	flashvars.soundBarColor = "0x0066FF";
	flashvars.barColor = "0x0066FF";
	flashvars.barShadowColor = "0x91BBFB";
	flashvars.subbarColor = "0xffffff";
	
	var params = {};
	params.wmode = "transparent";
	params.allowFullScreen = "true";

	var attributes = {};
	
	swfobject.embedSWF("<?php bloginfo('template_directory'); ?>/apps/flash/flvPlayer.swf", "flashcontent-home", "<?php echo $video_width; ?>", "<?php echo $video_height; ?>", "9", "<?php bloginfo('template_directory'); ?>/apps/flash/expressInstall.swf", flashvars, params, attributes);
			
		</script>
		
		<?php if (get_option('gpp_iphone') =='true' && ($iphone_file!="")) { ?>
		
		<script type="text/javascript" language="javascript">
<!--
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)))
{
     document.getElementById("flashcontent-home").innerHTML = "<div class=\"play\"><a href=\"<?php echo $iphone_file; ?>\"><img src=\"<?php echo $video_thumbnail; ?>\" /><span></span></a></div>";
}
-->
	</script>
	
	<?php } ?>

</div>
<div class="clear"></div>