<?php

/**
 * include some common code (like we did in the 90s)
 * People still do this? ;)
 */
include_once 'config.php';

// todo : 
// - gestion du parent.document.location mediafragment
// - limite taille vertical embed 
// - ajouter la polemic timline en dessous de la video 

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>RSLN  - Polemic player embed page</title>
	
	<!-- JAVASCRIPT --> 
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
	<script type="text/javascript" src="../res/raphael/raphael-min.js"></script>
	
	<!-- FONT -->
	<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css?family=Geo&subset=latin' rel='stylesheet' type='text/css'>
	<style type="text/css"> 
		body{
			padding:0px;
			margin:0px;
		}
		.tooltip{
			 z-index: 10000000000;
		}
		#tip{
			 position : absolute;
			 padding : 3px;
			 z-index: 10000000000;
			 max-width: 200px;
		}	
		#tip {
			display: none;
			background: transparent url("../images/white_arrow_long.png");
			font-size: 12px;
			height: 125px;
			width: 180px;
			padding: 10px;
			padding-left: 15px;
			padding-top: 15px;
			padding-right: 15px;
			color: black;
			z-index: 10000000000;
			font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
			overflow:hidden;
		}
		#chartTimeline{
			z-index: 9;
			position : absolute;
		}

	</style>
	<script type="text/javascript">
	
	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', 'UA-9955524-3']);
	  _gaq.push(['_setDomainName', '.iri.centrepompidou.fr']);
	  _gaq.push(['_trackPageview']);
	
	  (function() {
	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();
	
	</script>
  </head>
  
  <script type="text/javascript">
  	// Configuration Polemical Timeline
	var config = {
					target:"chartTimeline",
					x:8,
					y:418,
					width:<?php echo($player_width); ?>,
					height:<?php echo($player_height); ?>,
					heightmax:<?php echo($player_height); ?>,
					duration:<?php echo($config['duration']); ?>,
					metadata:"<?php echo($config['metadata']); ?>"
					}
  </script>
  <script type='text/javascript' src='../res/metadataplayer.polemic/src/js/polemic.js'></script>
  
  <body>
  <!-- tooltip --> 
  <div id="tip">
  <div id="tipcolor" style="height:10px;width:10px"></div>
  <div id="tiptext"></div>
  </div>
  
	  <div class="root" >
		<div class="videoLivePlayer">
		<div id="chartTimeline"> </div>	
		<script type="text/javascript">
			var paper = Raphael(document.getElementById("chartTimeline"),config.width, config.height);
		</script>
		<script type='text/javascript' src='../res/metadataplayer/src/js/LdtPlayer.js'></script>
		<script type="text/javascript">
			$.extend(__IriSP.lib,{jQueryToolTip:"../res/metadataplayer/res/js/jquery.tools.min.js"});
		</script>
		<div id="player_project_843fff80-6b50-11e0-8aef-00145ea49a02_embed" class="iri_player_embed"> </div>
		
			<script type="text/javascript">
				var configMP = {
						metadata:{
							format:'cinelab',
							src:'<?php echo($config['metadata']); ?>',
							load:'jsonp'},
						gui:{
							width:<?php echo($player_width); ?>,
							height:<?php echo($player_height); ?>,
							mode:'video',
							container:'player_project_843fff80-6b50-11e0-8aef-00145ea49a02_embed',
							debug:false,
							css:'../res/css/LdtPlayer.css'},
	
						player:{
							type:'jwplayer',
							src:'http://www.iri.centrepompidou.fr//dev/ldt/static/ldt/swf/player.swf'}
					};
				__IriSP.init(configMP);     
			</script>
		</div>	
	  </div>	
  </body>
</html>
