// Loads latest vimeo video
// Change this to your username to load in your clips
		var vimeoUserName = 'parachute';
		
		// Tell Vimeo what function to call
		var videoCallback = 'latestVideo';
		var oEmbedCallback = 'embedVideo';
		
		// Set up the URLs
		var videosUrl = 'http://www.vimeo.com/api/v2/' + vimeoUserName + '/videos.json?callback=' + videoCallback;
		var oEmbedUrl = 'http://www.vimeo.com/api/oembed.json';
		
		// This function puts the video on the page
		function embedVideo(video) {
			videoEmbedCode1 = unescape(video.html);
	//		videoEmbedCode1 = unescape(video.html).replace('width="1280"','width="392"');
		//	videoEmbedCode1 = videoEmbedCode1.replace('height="720"','height="224"');
		//	videoEmbedCode1 = videoEmbedCode1.replace('color=00ADEF','color=FF0000');
		//	videoEmbedCode1 = videoEmbedCode1.replace('show_portrait=1','show_portrait=0');
		//	videoEmbedCode1 = videoEmbedCode1.replace('show_byline=1','show_byline=0&amp;maxwidth=392&amp;maxheight=224'); 
			
			
			videoEmbedCode1 = videoEmbedCode1.replace('<param name="allowfullscreen" value="true"/>','<param name="allowfullscreen" value="true"/><param name="wmode" value="transparent"/>');
			//alert(videoEmbedCode1);
			//alert(videoEmbedCode1);
			//alert(videoEmbedCode1);
		//	document.getElementById('embed').innerHTML = unescape(video.html);
		document.getElementById('embed').innerHTML = videoEmbedCode1;
		
		}
		
		// This function uses oEmbed to get the last clip
		function latestVideo(videos) {
			var videoUrl = videos[0].url;
			
			// Get the oEmbed stuff
			loadScript(oEmbedUrl + '?url=' + encodeURIComponent(videoUrl) + '&width=392&height=224&color=FF0000&show_portrait=0&show_byline=0&callback=' + oEmbedCallback);
		}
		
		// This function loads the data from Vimeo
		function loadScript(url) {
			var js = document.createElement('script');
			js.setAttribute('type', 'text/javascript');
			js.setAttribute('src', url);
			document.getElementsByTagName('head').item(0).appendChild(js);
		}
		
		// Call our init function when the page loads
		//loadScript(videosUrl);
		// this has been moved to the non-essential load sqeuence