/*******************************************/
/********* HTML5 stuff below ***************/
/*******************************************/

// was automatically extracted from the spec in May 2010
var media_properties = [ "error", "src", "currentSrc", "networkState", "preload", "buffered", "readyState", "seeking", "currentTime", "startTime", "duration", "paused", "defaultPlaybackRate", "playbackRate", "played", "seekable", "ended", "autoplay", "loop", "controls", "volume", "muted" ];

function init() {
    document._video = document.getElementById("video");
}

try {
    document.addEventListener("DOMContentLoaded", init, false);
}
	catch (e) {
}

function trackHTML5Video(videoID){	
	console.log('trackHTML5Video() called');
	var videoTime = eval("document._video." + media_properties[8]);
	var videoLength = eval("document._video." + media_properties[10]);
	var isVideoCompleted = eval("document._video." + media_properties[16]);
	trackvideo('%6E%65%72%66%76%75%6C%63%61%6E', '%69%68%61%74%65%74%68%61%74%62%6F%62%62%61%72%6B%65%72', videoID, videoTime, videoLength, isVideoCompleted);
}

