/*Cultiv8ed.com*/
var url;
function embedVideo(video) {
			videoEmbedCode = video.html;
			document.getElementById('embed').innerHTML = unescape(video.html);
		}
		
		// This function loads the data from Vimeo
function init() 	{
			var js = document.createElement('script');
			js.setAttribute('type', 'text/javascript');
			js.setAttribute('src', url);
			document.getElementsByTagName('head').item(0).appendChild(js);
		}


function videoMenuPopup()
{
if(document.getElementById("videoMenu").style.height=='50px'){
document.getElementById("videoMenu").style.height=400;
document.getElementById("alignVideo").style.top=-350;
document.getElementById("siteCentre").style.top=-1460;
document.getElementById("floatVideo").style.top=980;
document.getElementById("floatImageHide").style.top=970;
}
else{document.getElementById("videoMenu").style.height=50;
document.getElementById("alignVideo").style.top=0;
document.getElementById("siteCentre").style.top=-1149;
document.getElementById("floatVideo").style.top=669;
document.getElementById("floatImageHide").style.top=-91;
}
}

function changeVideo(videoName)
{
clipUrl='';
if(videoName=='Seafood'){
clipUrl = 'http://www.vimeo.com/2574929';}

if(videoName=='Night Ride'){
clipUrl = 'http://www.vimeo.com/2579640';}

if(videoName=='Circles'){
clipUrl = 'http://www.vimeo.com/2579873';}

if(videoName=='Nazi Halo'){
clipUrl = 'http://www.vimeo.com/2580042';}

document.getElementById("alignVideo").style.visibility="visible";

endpoint = 'http://www.vimeo.com/api/oembed.json';
callback = 'embedVideo';
url = endpoint + '?url=' + encodeURIComponent(clipUrl) + '&callback=' + callback + '&width=640';
videoEmbedCode = '';
init();

}

function hideAll()
{
document.getElementById("floatVideo").style.visibility='hidden';
document.getElementById("videoMenu").style.visibility='hidden';
document.getElementById("alignVideo").style.visibility='hidden';
init();
}

function showVideos()
{
document.getElementById("floatVideo").style.visibility='visible';
document.getElementById("videoMenu").style.visibility='visible';
document.getElementById("alignVideo").style.visibility='hidden';
}

