<!--
//video fcn
//time array for link-changes in html menu
//value are in seconds
var arrTimesGbl = [ 1, 17, 34, 50, 66 ];
function homepageVideo() {
function buildCuePoints() {
for(var x=0; x<arrTimesGbl.length; x++) {
arrTimesGbl[x]= (arrTimesGbl[x] * 1000);
}
//			alert(arrTimesGbl);
//			cueString = cueString.replace(", (arrTimesGbl[0", "(arrTimesGbl[0");
//			alert(cueString);
}
buildCuePoints();
var flowplayerVideoStream = flowplayer("player1", {
"src" : "/video/flowplayer-3.2.1.swf",
"wmode" : "opaque"
}, {
clip: {
autoPlay: true,
autobuffering: true,
url: "haven_700",
onBeforeFinish: function() {return false;},
provider: "rtmp", 				//rtmp server
onCuepoint: [arrTimesGbl, function(clip, cuepoint) {
// alert(cuepoint);
$("DIV#homePageVideoLinks A").removeClass("active");
var tmp = parseInt(cuepoint);
for(var i=0; i<arrTimesGbl.length; i++)
{
if (tmp == arrTimesGbl[i])
{
$("A#chapter" + (i+1)).addClass("active");
$("DIV#video-details").html(tmp + "<br />" + arrTimesGbl[i]);
}
}
}]
},
// streaming plugins are configured under the plugins node
plugins: {
// here is our rtmp plugin configuration
rtmp: {
url: "/video/flowplayer.rtmp-3.2.0.swf",	// local file
netConnectionUrl: "rtmp://haven.fv.miisolutions.net/haven/flash"	//live streaming server location
},
controls: null
}
});
flowplayerVideoStream.play();
function showLinks() {
$("#homePageVideoLinks").show();
}
showLinks();
function timesArray() {
//video menu links interaction
$("#homePageVideoLinks A").click(function () {
$("#homePageVideoLinks A").removeClass("active");
var chapterID = $(this).attr("id");
$("A#"+chapterID).addClass("active");
// assuming chapter 1 starts at start of the movie
switch(chapterID) {
case "chapter1":
flowplayerVideoStream.seek(arrTimesGbl[0] / 1000);
WEBABACUS.logclientdata('0','/Homepage|?desc=Video&action=TimeSlot1_OurHolidayParks'); // WEBABACUS Tracking for chapter1
return false;
break;
case "chapter2":
flowplayerVideoStream.seek(arrTimesGbl[1] / 1000);
WEBABACUS.logclientdata('0','/Homepage|?desc=Video&action=TimeSlot2_SportsAndWaterSports'); // WEBABACUS Tracking for chapter2
return false;
break;
case "chapter3":
flowplayerVideoStream.seek(arrTimesGbl[2] / 1000);
WEBABACUS.logclientdata('0','/Homepage|?desc=Video&action=TimeSlot3_KidsClubs'); // WEBABACUS Tracking for chapter3
return false;
break;
case "chapter4":
flowplayerVideoStream.seek(arrTimesGbl[3] / 1000);
WEBABACUS.logclientdata('0','/Homepage|?desc=Video&action=TimeSlot4_Accommodation'); // WEBABACUS Tracking for chapter4
return false;
break;
case "chapter5":
flowplayerVideoStream.seek(arrTimesGbl[4] / 1000);
WEBABACUS.logclientdata('0','/Homepage|?desc=Video&action=TimeSlot5_OutAndAbout'); // WEBABACUS Tracking for chapter5
return false;
break;
default:
flowplayerVideoStream.seek(arrTimesGbl[0] / 1000);
return false;
}			
});
}
timesArray();
$("A#homePageVideoBtnOverlayLoad").click(function() {
WEBABACUS.logclientdata('0','/Homepage|?desc=Video&action=ViewOffers'); // WEBABACUS Tracking for view offers button
$f("player1").pause();
$("DIV#homePageVideo").hide();
$("DIV#homePageVideoBtnOverlay").fadeIn(1500);
return false;
});
$("AREA#homePageVideoBtnOverlayClose").click(function() {
WEBABACUS.logclientdata('0','/Homepage|?desc=Video&action=OffersOverlay_Close'); // WEBABACUS Tracking for Close button
$("DIV#homePageVideo").fadeIn(1500);
setTimeout('$f("player1").play();', 1500);
$("DIV#homePageVideoBtnOverlay").fadeOut(1500);
return false;
});
$("A#homePageVideoBtnSlowConn").click(function() {
WEBABACUS.logclientdata('0','/Homepage|?desc=Video&action=LowResolution'); // WEBABACUS Tracking for view in Low Resolution
startCarousel();
});
}

//-->
