document.write("
");
loadScript('https://dprwxtzpkcwpg.cloudfront.net/video/jwplayer/jwplayer.js', 'jwplayer');
setJSONPaser();
var globalVideoSource= "";
var videoNameFromScriptbiznaga_jasmine_flowervideo = null;
videoNameFromScriptbiznaga_jasmine_flowervideo = 'biznaga_jasmine-flowervideo';
var showOverlayybiznaga_jasmine_flowervideo = true;
var onlyShowEmbedOverlaybiznaga_jasmine_flowervideo = false;
var videoDatabiznaga_jasmine_flowervideo;
var heightbiznaga_jasmine_flowervideo = (640 / 16 * 9) + "px";
var heightbiznaga_jasmine_flowervideoInt = (640 / 16 * 9);
var widthbiznaga_jasmine_flowervideoInt = 640;
var widthbiznaga_jasmine_flowervideo = 640 + "px";
var topbiznaga_jasmine_flowervideo;
var bottombiznaga_jasmine_flowervideo;
var leftbiznaga_jasmine_flowervideo;
var rightbiznaga_jasmine_flowervideo;
var stalledbiznaga_jasmine_flowervideo = 0;
var waitingbiznaga_jasmine_flowervideo = 0;
var mouseMoveFunctionsbiznaga_jasmine_flowervideo = new Array();
var newWindowOptionsbiznaga_jasmine_flowervideo = "status=0,directories=0,toolbar=0,menubar=0,resizable=0";
var overlayShownbiznaga_jasmine_flowervideo = false;
var isResponsivebiznaga_jasmine_flowervideo = false;
//Load stylesheets
loadCSS('https://d1ez3020z2uu9b.cloudfront.net/video/Embed2013-01-11.css', 'ShVideoCss');
loadAnalytics();
getDatabiznaga_jasmine_flowervideo();
function getDatabiznaga_jasmine_flowervideo() {
var browserLocation = "";
try
{
browserLocation = document.URL;
}
catch(browserUrlException)
{
}
var idElement = document.getElementById('biznaga_jasmine-flowervideo');
try {
responsiveData = document.getElementById('biznaga_jasmine-flowervideo').getAttribute('data-responsiveVideo');
if(typeof responsiveData != "undefined" && responsiveData != null && responsiveData.length > 0 && responsiveData.toLowerCase() == "true") {
isResponsivebiznaga_jasmine_flowervideo = true;
}
}
catch(respVideoExp) {
}
if(typeof videoNameFromScriptbiznaga_jasmine_flowervideo != "undefined" && videoNameFromScriptbiznaga_jasmine_flowervideo != null)
{
loadScript('https://www.spain-holiday.com/services/VideoService.svc/getVideoData?urlString=' + encodeURI(videoNameFromScriptbiznaga_jasmine_flowervideo) + '_fromscript&callback=loadPlayerbiznaga_jasmine_flowervideo&browserLocation=' + encodeURI(browserLocation), 'jsonbiznaga_jasmine_flowervideo');
}
else
{
var hrefString = idElement.href;
var noFollow = false;
try
{
if(document.getElementById('biznaga_jasmine-flowervideo').hasAttribute('rel') && document.getElementById('biznaga_jasmine-flowervideo').rel)
{
if(document.getElementById('biznaga_jasmine-flowervideo').rel.length > 0 && document.getElementById('biznaga_jasmine-flowervideo').rel.toLowerCase().indexOf('nofollow') != -1)
{
noFollow = true;
}
}
}
catch(relExp)
{
}
if(noFollow)
{
throw "NoFollow in video link found";
}
if (typeof hrefString == "undefined" || hrefString == null || hrefString.length == 0) {
hrefString = document.getElementById('biznaga_jasmine-flowervideo').getAttribute('data-video');
}
if (hrefString.indexOf('translate') != -1)
{
//This url has been modified by Google or Bing translate, get the data using the text instead
var linkText = document.getElementById('biznaga_jasmine-flowervideo').href;
var params = linkText.split('&');
for(i = 0; i < params.length; i++)
{
var ps = params[i].split('=');
if(ps && ps.length == 2)
{
if(ps[0] == 'u')
{
linkText = ps[1];
}
}
}
try
{
loadScript('https://www.spain-holiday.com/services/VideoService.svc/getVideoData?urlString=' + encodeURI(linkText) + '&callback=loadPlayerbiznaga_jasmine_flowervideo&browserLocation=' + encodeURI(browserLocation), 'jsonbiznaga_jasmine_flowervideo');
}
catch(serviceExpOne)
{
}
}
else
{
try
{
loadScript('https://www.spain-holiday.com/services/VideoService.svc/getVideoData?urlString=' + encodeURI(hrefString) + '&callback=loadPlayerbiznaga_jasmine_flowervideo&browserLocation=' + encodeURI(browserLocation), 'jsonbiznaga_jasmine_flowervideo');
}
catch(serviceExpTwo)
{
}
}
}
}
function getStylesbiznaga_jasmine_flowervideo()
{
if(widthbiznaga_jasmine_flowervideoInt > 600)
{
var toReturn = "#ShTwitterIconbiznaga_jasmine-flowervideo, #ShStumbleIconbiznaga_jasmine-flowervideo, #ShFacebookIconbiznaga_jasmine-flowervideo, #ShEmbedIconbiznaga_jasmine-flowervideo { width: 47px; height: 50px; display:block; margin-bottom: 3px; margin-right: 3px; background-repeat: no-repeat; float : left; } ";
toReturn += "#ShEmbedIconbiznaga_jasmine-flowervideo { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -16px -0px; } #ShEmbedIconbiznaga_jasmine-flowervideo:hover { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -16px -276px; border-bottom: 0px; } ";
toReturn += "#ShFacebookIconbiznaga_jasmine-flowervideo { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -16px -69px; } #ShFacebookIconbiznaga_jasmine-flowervideo:hover { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -16px -345px; border-bottom: 0px; } ";
toReturn += "#ShStumbleIconbiznaga_jasmine-flowervideo { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -16px -138px; } #ShStumbleIconbiznaga_jasmine-flowervideo:hover { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -16px -414px; border-bottom: 0px; } ";
toReturn += "#ShTwitterIconbiznaga_jasmine-flowervideo { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -16px -207px; } #ShTwitterIconbiznaga_jasmine-flowervideo:hover { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -16px -483px; border-bottom: 0px; } ";
writeStylebiznaga_jasmine_flowervideo(toReturn);
}
else
{
var toReturn = "#ShTwitterIconbiznaga_jasmine-flowervideo, #ShStumbleIconbiznaga_jasmine-flowervideo, #ShFacebookIconbiznaga_jasmine-flowervideo, #ShEmbedIconbiznaga_jasmine-flowervideo { width: 33px; height: 33px; display:block; margin-bottom: 3px; margin-right: 3px; background-repeat: no-repeat; float : left; } ";
toReturn += "#ShEmbedIconbiznaga_jasmine-flowervideo { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -4px -736px; } #ShEmbedIconbiznaga_jasmine-flowervideo:hover { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -4px -918px; border-bottom: 0px; } ";
toReturn += "#ShFacebookIconbiznaga_jasmine-flowervideo { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -4px -782px; } #ShFacebookIconbiznaga_jasmine-flowervideo:hover { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -4px -964px; border-bottom: 0px; } ";
toReturn += "#ShStumbleIconbiznaga_jasmine-flowervideo { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -4px -825px; } #ShStumbleIconbiznaga_jasmine-flowervideo:hover { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -4px -1007px; border-bottom: 0px; } ";
toReturn += "#ShTwitterIconbiznaga_jasmine-flowervideo { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -4px -871px; } #ShTwitterIconbiznaga_jasmine-flowervideo:hover { background-image: url(https://d1ez3020z2uu9b.cloudfront.net/pics-uk/VideoSprite_2013-01-11.png); background-position: -4px -1053px; border-bottom: 0px; } ";
writeStylebiznaga_jasmine_flowervideo(toReturn);
}
}
var useSmallPosterbiznaga_jasmine_flowervideo = false;
function setHeightAndWidthbiznaga_jasmine_flowervideo()
{
var isHtml5 = false;
try {
var myVideo = document.createElement('video');
if (myVideo.canPlayType('video/mp4;codecs="avc1.4D401E, mp4a.40.2"')) {
isHtml5 = true;
}
}
catch(videoExp) {
}
var mobileDevices = /MSIE 9/i;
if ( navigator.userAgent.search(mobileDevices) > 0)
{
isHtml5 = false;
}
if (isHtml5)
{
var mobileDevices = /ipod|ipad|iphone|android|SymbianOS|BlackBerry|IEMobile/i;
var hasTouch = false;
try {
hasTouch = navigator.msMaxTouchPoints > 0;
}
catch(touchExp) {
}
if (navigator.userAgent.search(mobileDevices) > 0 || hasTouch)
{
if(videoDatabiznaga_jasmine_flowervideo && videoDatabiznaga_jasmine_flowervideo.SmallVideoIs480p == "false")
{
heightbiznaga_jasmine_flowervideo = (640 / 720 * 400) + "px";
heightbiznaga_jasmine_flowervideoInt = (640 / 720 * 400);
widthbiznaga_jasmine_flowervideoInt = 640;
widthbiznaga_jasmine_flowervideo = 640 + "px";
useSmallPosterbiznaga_jasmine_flowervideo = true;
}
else
{
heightbiznaga_jasmine_flowervideo = ((640 / 16 * 9) - 1) + "px";
heightbiznaga_jasmine_flowervideoInt = ((640 / 16 * 9) - 1);
widthbiznaga_jasmine_flowervideoInt = 640;
widthbiznaga_jasmine_flowervideo = 640 + "px";
}
}
else
{
heightbiznaga_jasmine_flowervideo = (640 / 16 * 9) + "px";
heightbiznaga_jasmine_flowervideoInt = (640 / 16 * 9);
widthbiznaga_jasmine_flowervideoInt = 640;
widthbiznaga_jasmine_flowervideo = 640 + "px";
}
}
else
{
heightbiznaga_jasmine_flowervideo = (640 / 16 * 9) + "px";
heightbiznaga_jasmine_flowervideoInt = (640 / 16 * 9);
widthbiznaga_jasmine_flowervideoInt = 640;
widthbiznaga_jasmine_flowervideo = 640 + "px";
}
}
function loadPlayerbiznaga_jasmine_flowervideo(serviceResponse) {
videoDatabiznaga_jasmine_flowervideo = serviceResponse;
setHeightAndWidthbiznaga_jasmine_flowervideo();
getStylesbiznaga_jasmine_flowervideo();
var isHtml5 = false;
try {
var myVideo = document.createElement('video');
if (myVideo.canPlayType('video/mp4;codecs="avc1.4D401E, mp4a.40.2"')) {
isHtml5 = true;
}
}
catch(videoExp) {
}
var mobileDevices = /MSIE 9/i;
if ( navigator.userAgent.search(mobileDevices) > 0)
{
isHtml5 = false;
}
if (isHtml5)
{
loadHtml5Playerbiznaga_jasmine_flowervideo();
}
else
{
waitForJWplayerbiznaga_jasmine_flowervideo();
}
}
function waitForJWplayerbiznaga_jasmine_flowervideo() {
try
{
if (typeof jwplayer == "function")
{
setTimeout('loadJWPlayerbiznaga_jasmine_flowervideo()', 1000);
}
else
{
window.setTimeout("waitForJWplayerbiznaga_jasmine_flowervideo()", 1000);
}
}
catch(notLoadedException)
{
window.setTimeout("waitForJWplayerbiznaga_jasmine_flowervideo()", 1000);
}
}
function loadJWPlayerbiznaga_jasmine_flowervideo() {
//Replace href with a div
var newOuterDiv = getOuterDivbiznaga_jasmine_flowervideo();
var hrefElement = document.getElementById('biznaga_jasmine-flowervideo');
if(hrefElement.tagName.toLowerCase() == "a") {
var newdiv = document.createElement('div');
var divIdName = 'biznaga_jasmine-flowervideo';
newdiv.setAttribute('id',divIdName);
newOuterDiv.appendChild(newdiv);
insertVideoOnPage(hrefElement, newOuterDiv);
}
else if(hrefElement.tagName.toLowerCase() == "div") {
var newdiv = document.createElement('div');
var divIdName = 'biznaga_jasmine-flowervideo';
newdiv.setAttribute('id',divIdName);
newOuterDiv.appendChild(newdiv);
insertVideoOnPage_new(hrefElement, newOuterDiv);
}
jwplayer("biznaga_jasmine-flowervideo").setup({flashplayer: "https://dprwxtzpkcwpg.cloudfront.net/video/jwplayer/player.swf",
file: videoDatabiznaga_jasmine_flowervideo.VideoUrlLarge,
image: videoDatabiznaga_jasmine_flowervideo.PosterUrl,
height: heightbiznaga_jasmine_flowervideo,
width: 640,
events: {onPlay: trackPlayFlashbiznaga_jasmine_flowervideo, onComplete: trackEndFlashbiznaga_jasmine_flowervideo, onPause: trackPauseFlashbiznaga_jasmine_flowervideo, onAbort: trackAbortFlashbiznaga_jasmine_flowervideo, onReady: loadOverlaybiznaga_jasmine_flowervideo(false)}
});
if(isResponsivebiznaga_jasmine_flowervideo) {
var playerElement = document.getElementById("biznaga_jasmine-flowervideo");
playerElement.className = 'embed-responsive-item';
playerElement.setAttribute('className', 'embed-responsive-item');
playerElement.setAttribute('class', 'embed-responsive-item');
var parentDiv = playerElement.parentNode;
parentDiv.style.position = '';
}
}
function setStyleClassOnLink(link)
{
if (link.className.search("shLink") == -1)
link.className += " shLink";
}
function getOuterDivbiznaga_jasmine_flowervideo()
{
var newOuterDiv = document.createElement('div');
newOuterDiv.setAttribute('id', 'biznaga_jasmine-flowervideoOuterDiv');
newOuterDiv.style.textAlign = 'left';
if(isResponsivebiznaga_jasmine_flowervideo) {
newOuterDiv.className = 'embed-responsive embed-responsive-16by9';
newOuterDiv.setAttribute('className', 'embed-responsive embed-responsive-16by9');
newOuterDiv.setAttribute('class', 'embed-responsive embed-responsive-16by9');
}
else {
newOuterDiv.style.width = widthbiznaga_jasmine_flowervideo;
newOuterDiv.style.height = heightbiznaga_jasmine_flowervideo;
newOuterDiv.style.zIndex = '100';
newOuterDiv.style.position = 'relative';
newOuterDiv.style.top = '0px';
newOuterDiv.style.left = '0px';
}
var trackImg = document.createElement('img');
trackImg.setAttribute('id', 'biznaga_jasmine-flowervideoLoadTracker');
trackImg.style.width = '0px';
trackImg.style.height = '0px';
newOuterDiv.appendChild(trackImg);
return newOuterDiv;
}
function insertVideoOnPage(link, video)
{
link.parentNode.insertBefore(video, link);
link.parentNode.removeChild(link);//Move the copyright text within the div to get the right alignment
video.appendChild(link);
setStyleClassOnLink(link);
}
function insertVideoOnPage_new(link, video)
{
link.parentNode.replaceChild(video, link);
}
function loadHtml5Playerbiznaga_jasmine_flowervideo() {
var mobileDevices = /ipod|ipad|iphone|android|SymbianOS|BlackBerry|IEMobile/i;
var newOuterDiv = getOuterDivbiznaga_jasmine_flowervideo();
var videoElement = document.createElement('video');
videoElement.setAttribute('controls', 'controls');
if(useSmallPosterbiznaga_jasmine_flowervideo)
{
try {
videoElement.setAttribute('poster', '' + videoDatabiznaga_jasmine_flowervideo.PosterUrl.replace('.jpg', '_small.jpg'));
}
catch(smallPosterExp) {
}
}
else
{
videoElement.setAttribute('poster', '' + videoDatabiznaga_jasmine_flowervideo.PosterUrl);
}
videoElement.setAttribute('id', 'biznaga_jasmine-flowervideo');
videoElement.setAttribute('preload', 'metadata');
videoElement.setAttribute('oncontextmenu', 'return false;');
if(isResponsivebiznaga_jasmine_flowervideo) {
videoElement.className = 'embed-responsive-item';
videoElement.setAttribute('className', 'embed-responsive-item');
videoElement.setAttribute('class', 'embed-responsive-item');
}
else {
videoElement.setAttribute('width', widthbiznaga_jasmine_flowervideo);
videoElement.setAttribute('height', heightbiznaga_jasmine_flowervideo);
videoElement.style.position = 'relative';
}
var hasTouch = false;
try {
hasTouch = navigator.msMaxTouchPoints > 0;
}
catch(touchExp) {
}
if (navigator.userAgent.search(mobileDevices) > 0 || hasTouch)
{
var sourceElement = document.createElement('source');
sourceElement.setAttribute('src', '' + videoDatabiznaga_jasmine_flowervideo.VideoUrlSmall);
sourceElement.setAttribute('id', 'videosource');
videoElement.appendChild(sourceElement);
globalVideoSource = '' + videoDatabiznaga_jasmine_flowervideo.VideoUrlSmall;
}
else
{
var sourceElementLarge = document.createElement('source');
sourceElementLarge.setAttribute('src', '' + videoDatabiznaga_jasmine_flowervideo.VideoUrlLarge);
sourceElementLarge.setAttribute('id', 'videosource');
videoElement.appendChild(sourceElementLarge);
globalVideoSource = '' + videoDatabiznaga_jasmine_flowervideo.VideoUrlLarge;
}
var gvsSplit = globalVideoSource.split("/");
globalVideoSource = gvsSplit[gvsSplit.length - 1];
videoElement.setAttribute("playerstate", "Idle");
videoElement.setAttribute("fullscreen", "Fullscreen off");
var spanElement = document.createElement('span');
spanElement.innerHTML = '
Sorry, but your browser does not support flash or html5.';
videoElement.appendChild(spanElement);
var aElement = document.createElement('a');
aElement.innerHTML = 'Click here to download the video';
aElement.setAttribute('href', '' + videoDatabiznaga_jasmine_flowervideo.VideoUrl);
videoElement.appendChild(aElement);
newOuterDiv.appendChild(videoElement);
var oldElement = document.getElementById('biznaga_jasmine-flowervideo');
insertVideoOnPage(oldElement, newOuterDiv);
//Bind events
loadOverlaybiznaga_jasmine_flowervideo(true);
}
function togglePlay(player)
{
if (player.paused || player.ended)
player.play();
else
player.pause();
}
function loadOverlaybiznaga_jasmine_flowervideo(isHtml5)
{
if(showOverlayybiznaga_jasmine_flowervideo)
{
var newdivOverlay = document.createElement('div');
newdivOverlay.setAttribute("style", "float: left;");
var divIdName = 'overlaybiznaga_jasmine-flowervideo';
newdivOverlay.setAttribute('id',divIdName);
var playerToOverlay = document.getElementById('biznaga_jasmine-flowervideo');
document.getElementById('biznaga_jasmine-flowervideoOuterDiv').appendChild(newdivOverlay);
newdivOverlay.style.zIndex = '1';
//Set overlay position
newdivOverlay.style.position = 'absolute';
newdivOverlay.style.height = '110px';
var overflowDiv = document.createElement('div');
overflowDiv.style.overflow = 'hidden';
overflowDiv.style.height = '0px';
overflowDiv.style.display = 'none';
overflowDiv.setAttribute('id','overflowDivbiznaga_jasmine-flowervideo');
newdivOverlay.appendChild(overflowDiv);
if(!onlyShowEmbedOverlaybiznaga_jasmine_flowervideo)
{
var newAEmbedElement = document.createElement('a');
newAEmbedElement.className = 'ShEmbedIcon';
newAEmbedElement.setAttribute('className', 'ShEmbedIcon');
newAEmbedElement.setAttribute('class', 'ShEmbedIcon');
var newAFacebookElement = document.createElement('a');
newAFacebookElement.className = 'ShFacebookIcon';
var newAStumbleElement = document.createElement('a');
newAStumbleElement.className = 'ShStumbleIcon';
var newATwitterElement = document.createElement('a');
newATwitterElement.className = 'ShTwitterIcon';
overflowDiv.appendChild(newAEmbedElement);
overflowDiv.appendChild(newAFacebookElement);
overflowDiv.appendChild(newAStumbleElement);
overflowDiv.appendChild(newATwitterElement);
//Get the overlay design
setSocialLinksbiznaga_jasmine_flowervideo();
}
else
{
var newAEmbedElement = document.createElement('a');
newAEmbedElement.className = 'ShEmbedIcon';
newAEmbedElement.setAttribute('className', 'ShEmbedIcon');
newAEmbedElement.setAttribute('class', 'ShEmbedIcon');
overflowDiv.appendChild(newAEmbedElement);
//Get the overlay design
setSocialLinksbiznaga_jasmine_flowervideo();
}
if (isHtml5)
{
//Load play button
var aElement = document.createElement('a');
aElement.setAttribute('id', 'playbiznaga_jasmine-flowervideo');
aElement.setAttribute('className','playButton');
aElement.setAttribute('class','playButton');
aElement.style.position = 'absolute';
document.getElementById('biznaga_jasmine-flowervideo').parentNode.appendChild(aElement);
playerToOverlay.setAttribute('onplay', 'setPlayerStatePlay(this); trackPlaybiznaga_jasmine_flowervideo(this)');
playerToOverlay.setAttribute('onpause', 'setPlayerStatePause(this); trackPausebiznaga_jasmine_flowervideo(this)');
playerToOverlay.setAttribute('onended', 'setPlayerStateFinish(this); trackEndbiznaga_jasmine_flowervideo(this)');
playerToOverlay.setAttribute('onabort', 'setPlayerStateAbort(this); trackAbortbiznaga_jasmine_flowervideo(this)');
playerToOverlay.setAttribute('onfullscreen', 'setPlayerFullScreen(this)');
if (/chrom(e|ium)/.test(navigator.userAgent.toLowerCase()))
playerToOverlay.addEventListener('ended',function(){setPlayerStateFinish(this); trackEndbiznaga_jasmine_flowervideo(this);},false);
document.getElementById('playbiznaga_jasmine-flowervideo').onclick = PlayStartbiznaga_jasmine_flowervideo;
}
windowResizedbiznaga_jasmine_flowervideo();
setTimeout('onPlayerMouseOverNewbiznaga_jasmine_flowervideo()', 1000);
var appleMobileDevices = /ipod|ipad|iphone/i;
if (navigator.userAgent.search(appleMobileDevices) > 0)
{
playerToOverlay.removeAttribute("controls");
}
}
}
function windowResizedbiznaga_jasmine_flowervideo()
{
var overlayElement = document.getElementById('overlaybiznaga_jasmine-flowervideo');
var playerToOverlay = document.getElementById('biznaga_jasmine-flowervideo');
var playerElement = document.getElementById('biznaga_jasmine-flowervideo');
var position = getPos(playerElement);
if(isResponsivebiznaga_jasmine_flowervideo) {
overlayElement.style.top = '0px';
overlayElement.style.marginTop = '20px';
overlayElement.style.marginRight = '20px';
}
else {
overlayElement.style.top = (position.top + 10) + 'px';
}
if(widthbiznaga_jasmine_flowervideoInt > 600)
{
if(!onlyShowEmbedOverlaybiznaga_jasmine_flowervideo)
{
overlayElement.style.width = '100px';
if(isResponsivebiznaga_jasmine_flowervideo) {
overlayElement.style.right = '0px';
}
else {
overlayElement.style.left = (position.left + 640 - 107) + 'px';
}
}
else
{
overlayElement.style.width = '50px';
if(isResponsivebiznaga_jasmine_flowervideo) {
overlayElement.style.right = '0px';
}
else {
overlayElement.style.left = (position.left + 640 - 57) + 'px';
}
}
}
else
{
if(!onlyShowEmbedOverlaybiznaga_jasmine_flowervideo)
{
overlayElement.style.width = '80px';
if(isResponsivebiznaga_jasmine_flowervideo) {
overlayElement.style.right = '0px';
}
else {
overlayElement.style.left = (position.left + 640 - 80) + 'px';
}
}
else
{
overlayElement.style.width = '40px';
if(isResponsivebiznaga_jasmine_flowervideo) {
overlayElement.style.right = '0px';
}
else {
overlayElement.style.left = (position.left + 640 - 40) + 'px';
}
}
}
var dialogDiv = document.getElementById('dialogDivbiznaga_jasmine_flowervideo');
if(isResponsivebiznaga_jasmine_flowervideo) {
}
else {
dialogDiv.style.top = (position.top + 100) + 'px';
dialogDiv.style.left = (position.left + 50) + 'px';
}
var play = document.getElementById('playbiznaga_jasmine-flowervideo');
if (play != null)
{
//Set playButton position
var playTopbiznaga_jasmine_flowervideo = topbiznaga_jasmine_flowervideo - 84 + (640 / 16 * 9 / 2);
var playLeftbiznaga_jasmine_flowervideo = leftbiznaga_jasmine_flowervideo - 84 + (640 / 2);
var topPosPlay = ((heightbiznaga_jasmine_flowervideoInt / 2) - 84) + position.top;
var leftPosPlay = (widthbiznaga_jasmine_flowervideoInt / 2) - 84 + position.left;
if(isResponsivebiznaga_jasmine_flowervideo) {
play.style.margin = 'auto';
play.style.left = '0';
play.style.right = '0';
play.style.top = '0';
play.style.bottom = '0';
}
else {
play.style.top = topPosPlay + 'px';
play.style.left = leftPosPlay + 'px';
}
}
}
function getPos (obj) {
var output = new Object();
var mytop=0, myleft=0;
while(obj) {
if(obj.style.position.toLowerCase() != 'relative')
{
mytop+= obj.offsetTop;
myleft+= obj.offsetLeft;
obj= obj.offsetParent;
}
else
{
mytop+= obj.offsetTop;
myleft+= obj.offsetLeft;
obj= obj.offsetParent;
obj = null;
}
}
output.left = myleft;
output.top = mytop;
return output;
}
function PlayStartbiznaga_jasmine_flowervideo()
{
var player = document.getElementById('biznaga_jasmine-flowervideo');
player.play();
}
function togglePlayButtonFlashbiznaga_jasmine_flowervideo(player)
{
onPlayerMouseOutNewbiznaga_jasmine_flowervideo();
}
function togglePauseButtonFlashbiznaga_jasmine_flowervideo(player)
{
onPlayerMouseOverNewbiznaga_jasmine_flowervideo();
}
function togglePlayButtonbiznaga_jasmine_flowervideo(player)
{
var play = document.getElementById('playbiznaga_jasmine-flowervideo');
var appleMobileDevices = /ipod|ipad|iphone/i;
if (player.paused || player.ended)
{
play.style.display = 'block';
onPlayerMouseOverNewbiznaga_jasmine_flowervideo();
if (navigator.userAgent.search(appleMobileDevices) > 0)
{
player.removeAttribute("controls");
}
}
else
{
play.style.display = 'none';
onPlayerMouseOutNewbiznaga_jasmine_flowervideo();
if (navigator.userAgent.search(appleMobileDevices) > 0)
{
player.setAttribute("controls","true");
}
}
}
function onPlayerMouseOverNewbiznaga_jasmine_flowervideo()
{
try
{
var overlay = document.getElementById('overlaybiznaga_jasmine-flowervideo');
var video = document.getElementById('biznaga_jasmine-flowervideo');
var dialogDiv = document.getElementById('dialogDivbiznaga_jasmine_flowervideo');
var playButton = document.getElementById('playbiznaga_jasmine-flowervideo');
if(dialogDiv.style.display != 'block')
{
if(!overlayShownbiznaga_jasmine_flowervideo)
{
windowResizedbiznaga_jasmine_flowervideo();
var options = {};
opacityCounterShowbiznaga_jasmine_flowervideo = 0;
overlayShownbiznaga_jasmine_flowervideo = true;
showOverLaybiznaga_jasmine_flowervideo();
}
}
}
catch(ignore)
{
}
}
function onPlayerMouseOverbiznaga_jasmine_flowervideo(e)
{
try
{
var overlay = document.getElementById('overlaybiznaga_jasmine-flowervideo');
var video = document.getElementById('biznaga_jasmine-flowervideo');
var dialogDiv = document.getElementById('dialogDivbiznaga_jasmine_flowervideo');
var playButton = document.getElementById('playbiznaga_jasmine-flowervideo');
if(dialogDiv.style.display != 'block')
{
if (!e)
{
var e = window.event;
}
var tg = (window.event) ? e.srcElement : e.target;
if (tg == overlay || tg == video)
{
var reltg = (e.relatedTarget) ? e.relatedTarget : e.fromElement;
do
{
if(reltg == overlay || reltg == video || reltg == dialogDiv || reltg == playButton)
{
//Den kommer inde fra et element over videon så ignorer
return;
}
}
while (reltg = reltg.parentNode);
if(!overlayShownbiznaga_jasmine_flowervideo)
{
windowResizedbiznaga_jasmine_flowervideo();
var options = {};
opacityCounterShowbiznaga_jasmine_flowervideo = 0;
overlayShownbiznaga_jasmine_flowervideo = true;
showOverLaybiznaga_jasmine_flowervideo();
}
}
}
}
catch(ignore)
{
}
}
function onPlayerMouseOutNewbiznaga_jasmine_flowervideo()
{
try
{
var overlay = document.getElementById('overlaybiznaga_jasmine-flowervideo');
var video = document.getElementById('biznaga_jasmine-flowervideo');
var dialogDiv = document.getElementById('dialogDivbiznaga_jasmine_flowervideo');
var playButton = document.getElementById('playbiznaga_jasmine-flowervideo');
if(dialogDiv.style.display != 'block')
{
if (overlayShownbiznaga_jasmine_flowervideo)
{
overlayShownbiznaga_jasmine_flowervideo = false;
opacityCounterHidebiznaga_jasmine_flowervideo = 100;
hideOverLaybiznaga_jasmine_flowervideo();
}
}
}
catch(ignore)
{
}
}
function onPlayerMouseOutbiznaga_jasmine_flowervideo(e)
{
try
{
var overlay = document.getElementById('overlaybiznaga_jasmine-flowervideo');
var video = document.getElementById('biznaga_jasmine-flowervideo');
var dialogDiv = document.getElementById('dialogDivbiznaga_jasmine_flowervideo');
var playButton = document.getElementById('playbiznaga_jasmine-flowervideo');
if(dialogDiv.style.display != 'block')
{
if (!e)
{
var e = window.event;
}
var tg = (window.event) ? e.srcElement : e.target;
if (tg == overlay || tg == video)
{
var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement;
do
{
if(reltg == overlay || reltg == video || reltg == dialogDiv || reltg == playButton)
{
//Den kommer inde fra et element over videon så ignorer
return;
}
}
while (reltg = reltg.parentNode);
if (overlayShownbiznaga_jasmine_flowervideo)
{
overlayShownbiznaga_jasmine_flowervideo = false;
opacityCounterHidebiznaga_jasmine_flowervideo = 100;
hideOverLaybiznaga_jasmine_flowervideo();
}
}
}
}
catch(ignore)
{
}
}
var opacityCounterHidebiznaga_jasmine_flowervideo = 100;
function hideOverLaybiznaga_jasmine_flowervideo()
{
var overlay = document.getElementById('overflowDivbiznaga_jasmine-flowervideo');
opacityCounterHidebiznaga_jasmine_flowervideo = opacityCounterHidebiznaga_jasmine_flowervideo - 5;
if(opacityCounterHidebiznaga_jasmine_flowervideo >= 0 && overlayShownbiznaga_jasmine_flowervideo == false)
{
overlay.style.height = opacityCounterHidebiznaga_jasmine_flowervideo + '%';
setTimeout('hideOverLaybiznaga_jasmine_flowervideo()', 20);
if(opacityCounterHidebiznaga_jasmine_flowervideo == 0)
{
overlay.style.display = 'none';
}
}
else
{
overlay.style.display = 'none';
}
}
var opacityCounterShowbiznaga_jasmine_flowervideo = 0;
function showOverLaybiznaga_jasmine_flowervideo()
{
var overlay = document.getElementById('overflowDivbiznaga_jasmine-flowervideo');
opacityCounterShowbiznaga_jasmine_flowervideo = opacityCounterShowbiznaga_jasmine_flowervideo + 5;
if(opacityCounterShowbiznaga_jasmine_flowervideo < 101 && overlayShownbiznaga_jasmine_flowervideo == true)
{
overlay.style.display = 'block';
overlay.style.height = opacityCounterShowbiznaga_jasmine_flowervideo + '%';
setTimeout('showOverLaybiznaga_jasmine_flowervideo()', 20);
}
}
function setSocialLinksbiznaga_jasmine_flowervideo(data)
{
var overlay = document.getElementById('overlaybiznaga_jasmine-flowervideo');
var tags = overlay.getElementsByTagName('a');
for(i = 0; i < tags.length; i++)
{
if(tags[i].className.indexOf('ShEmbedIcon') > -1)
{
createEmbedDivbiznaga_jasmine_flowervideo();
tags[i].setAttribute('id', 'ShEmbedIconbiznaga_jasmine-flowervideo');
tags[i].onclick= openEmbedDialogbiznaga_jasmine_flowervideo;
tags[i].href= '#';
}
if(tags[i].className.indexOf('ShFacebookIcon') > -1)
{
tags[i].setAttribute('id', 'ShFacebookIconbiznaga_jasmine-flowervideo');
tags[i].onclick= facebookLinkClickedbiznaga_jasmine_flowervideo;
tags[i].href= '#';
}
if(tags[i].className.indexOf('ShStumbleIcon') > -1)
{
tags[i].setAttribute('id', 'ShStumbleIconbiznaga_jasmine-flowervideo');
tags[i].onclick = stumbleLinkClickedbiznaga_jasmine_flowervideo;
tags[i].href= '#';
}
if(tags[i].className.indexOf('ShTwitterIcon') > -1)
{
tags[i].setAttribute('id', 'ShTwitterIconbiznaga_jasmine-flowervideo');
tags[i].onclick = twitterLinkClickedbiznaga_jasmine_flowervideo;
tags[i].href= '#';
}
}
}
function facebookLinkClickedbiznaga_jasmine_flowervideo()
{
window.open(videoDatabiznaga_jasmine_flowervideo.FacebookShareUrl, 'facebook', newWindowOptionsbiznaga_jasmine_flowervideo);
return false;
}
function stumbleLinkClickedbiznaga_jasmine_flowervideo()
{
window.open(videoDatabiznaga_jasmine_flowervideo.StumbleUrl, 'stumble', newWindowOptionsbiznaga_jasmine_flowervideo);
return false;
}
function twitterLinkClickedbiznaga_jasmine_flowervideo()
{
window.open(videoDatabiznaga_jasmine_flowervideo.TwitterUrl, 'twitter', newWindowOptionsbiznaga_jasmine_flowervideo);
return false;
}
function createEmbedDivbiznaga_jasmine_flowervideo()
{
var playerToOverlay = document.getElementById('biznaga_jasmine-flowervideo');
var position = getPos(playerToOverlay);
var dialogDiv = document.createElement('div');
dialogDiv.style.clear = 'both';
dialogDiv.style.display = 'none';
dialogDiv.setAttribute('class', 'dialogDiv');
dialogDiv.setAttribute('className', 'dialogDiv');
dialogDiv.style.zIndex = '1';
dialogDiv.setAttribute('id', 'dialogDivbiznaga_jasmine_flowervideo');
if(isResponsivebiznaga_jasmine_flowervideo) {
dialogDiv.style.position = 'relative';
dialogDiv.style.marginRight = 'auto';
dialogDiv.style.marginLeft = 'auto';
}
else {
dialogDiv.style.position = 'absolute';
dialogDiv.style.top = (position.top + 100) + 'px';
dialogDiv.style.left = (position.left + 50) + 'px';
}
var titleDiv = document.createElement('div');
titleDiv.setAttribute('class', 'dialogTitleDiv');
titleDiv.setAttribute('className', 'dialogTitleDiv');
dialogDiv.appendChild(titleDiv);
var titleSpan = document.createElement('span');
titleSpan.innerHTML = 'Embed this video';
titleSpan.setAttribute('class', 'dialogTitleSpan');
titleSpan.setAttribute('className', 'dialogTitleSpan');
titleDiv.appendChild(titleSpan);
var closeLink = document.createElement('a');
closeLink.setAttribute('class', 'closeLink');
closeLink.setAttribute('className', 'closeLink');
closeLink.setAttribute('href', '#');
closeLink.onclick = closeEmbedDialogbiznaga_jasmine_flowervideo;
var closeSpan = document.createElement('span');
closeSpan.setAttribute('class', 'closeSpan');
closeSpan.setAttribute('className', 'closeSpan');
closeLink.appendChild(closeSpan);
titleDiv.appendChild(closeLink);
var dialogTextarea = document.createElement('textarea');
dialogTextarea.setAttribute('id', 'embedCodebiznaga_jasmine_flowervideo');
dialogTextarea.onclick = dialogTextAreaClickbiznaga_jasmine_flowervideo;
dialogTextarea.setAttribute('readonly', 'readonly');
dialogTextarea.setAttribute('class', 'dialogTextarea');
dialogTextarea.setAttribute('className', 'dialogTextarea');
var dialogTextareaText = "";
if(videoDatabiznaga_jasmine_flowervideo.OverrideCurrentEmbedHost != null && videoDatabiznaga_jasmine_flowervideo.OverrideCurrentEmbedHost.length > 0) {
dialogTextareaText = "";
}
dialogTextarea.value = dialogTextareaText;
dialogDiv.appendChild(dialogTextarea);
var divClearOne = document.createElement('div');
divClearOne.setAttribute('class', 'divClearOne');
divClearOne.setAttribute('className', 'divClearOne');
dialogDiv.appendChild(divClearOne);
var dialogWidthInput = document.createElement('select');
dialogWidthInput.setAttribute('id', 'textWidthbiznaga_jasmine-flowervideo');
dialogWidthInput.onchange = updateShareScriptbiznaga_jasmine_flowervideo;
dialogWidthInput.style.fontSize = '10px';
var option320 = document.createElement('option');
option320.setAttribute('value', '320');
option320.innerHTML = '320';
dialogWidthInput.appendChild(option320);
var option352 = document.createElement('option');
option352.setAttribute('value', '352');
option352.innerHTML = '352';
dialogWidthInput.appendChild(option352);
var option400 = document.createElement('option');
option400.setAttribute('value', '400');
option400.innerHTML = '400';
dialogWidthInput.appendChild(option400);
var option432 = document.createElement('option');
option432.setAttribute('value', '432');
option432.innerHTML = '432';
dialogWidthInput.appendChild(option432);
var option480 = document.createElement('option');
option480.setAttribute('value', '480');
option480.innerHTML = '480';
dialogWidthInput.appendChild(option480);
var option560 = document.createElement('option');
option560.setAttribute('value', '560');
option560.innerHTML = '560';
dialogWidthInput.appendChild(option560);
var option640 = document.createElement('option');
option640.setAttribute('value', '640');
option640.innerHTML = '640';
option640.selected = true;
dialogWidthInput.appendChild(option640);
var option720 = document.createElement('option');
option720.setAttribute('value', '720');
option720.innerHTML = '720';
dialogWidthInput.appendChild(option720);
var option800 = document.createElement('option');
option800.setAttribute('value', '800');
option800.innerHTML = '800';
dialogWidthInput.appendChild(option800);
var option960 = document.createElement('option');
option960.setAttribute('value', '960');
option960.innerHTML = '960';
dialogWidthInput.appendChild(option960);
var option1024 = document.createElement('option');
option1024.setAttribute('value', '1024');
option1024.innerHTML = '1024';
dialogWidthInput.appendChild(option1024);
var option1280 = document.createElement('option');
option1280.setAttribute('value', '1280');
option1280.innerHTML = '1280';
dialogWidthInput.appendChild(option1280);
var dialogWidthSelectSpan = document.createElement('span');
dialogWidthSelectSpan.style.fontSize = '10px';
dialogWidthSelectSpan.innerHTML = 'Select width ';
dialogDiv.appendChild(dialogWidthSelectSpan);
dialogDiv.appendChild(dialogWidthInput);
var dialogWidthPxSpan = document.createElement('span');
dialogWidthPxSpan.style.fontSize = '10px';
dialogWidthPxSpan.innerHTML = 'px';
dialogDiv.appendChild(dialogWidthPxSpan);
var divClearTwo = document.createElement('div');
divClearTwo.setAttribute('class', 'divClearOne');
divClearTwo.setAttribute('className', 'divClearOne');
dialogDiv.appendChild(divClearTwo);
var spanDescriptionOne = document.createElement('span');
var descTextOne = 'Feel free to embed this video.';
descTextOne = descTextOne.replace('<', '<');
descTextOne = descTextOne.replace('>', '>');
descTextOne = descTextOne.replace('
', '\n');
descTextOne = descTextOne.replace('
', '\n');
descTextOne = descTextOne.replace('
', '\n');
spanDescriptionOne.innerHTML = '
' + descTextOne;
spanDescriptionOne.setAttribute('class', 'spanDescription');
spanDescriptionOne.setAttribute('className', 'spanDescription');
dialogDiv.appendChild(spanDescriptionOne);
var spanDescriptionTwo = document.createElement('span');
var descTextTwo = 'Please credit';
descTextTwo = descTextTwo.replace('<', '<');
descTextTwo = descTextTwo.replace('>', '>');
descTextTwo = descTextTwo.replace('
', '\n');
descTextTwo = descTextTwo.replace('
', '\n');
descTextTwo = descTextTwo.replace('
', '\n');
spanDescriptionTwo.innerHTML = '
' + descTextTwo;
spanDescriptionTwo.setAttribute('class', 'spanDescription');
spanDescriptionTwo.setAttribute('className', 'spanDescription');
dialogDiv.appendChild(spanDescriptionTwo);
var spanDescriptionFour = document.createElement('span');
var descTextFour = videoDatabiznaga_jasmine_flowervideo.CreditUrl;
descTextFour = descTextFour.replace('<', '<');
descTextFour = descTextFour.replace('>', '>');
descTextFour = descTextFour.replace('
', '\n');
descTextFour = descTextFour.replace('
', '\n');
descTextFour = descTextFour.replace('
', '\n');
spanDescriptionFour.innerHTML = '
' + descTextFour;
spanDescriptionFour.setAttribute('class', 'spanDescription');
spanDescriptionFour.setAttribute('className', 'spanDescription');
dialogDiv.appendChild(spanDescriptionFour);
var spanDescriptionThree = document.createElement('span');
var descTextThree = '© All rights Spain-holiday.com';
descTextThree = descTextThree.replace('<', '<');
descTextThree = descTextThree.replace('>', '>');
descTextThree = descTextThree.replace('
', '\n');
descTextThree = descTextThree.replace('
', '\n');
descTextThree = descTextThree.replace('
', '\n');
spanDescriptionThree.innerHTML = '
' + descTextThree;
spanDescriptionThree.setAttribute('class', 'spanDescription');
spanDescriptionThree.setAttribute('className', 'spanDescription');
dialogDiv.appendChild(spanDescriptionThree);
var videoDivElement = document.getElementById('biznaga_jasmine-flowervideoOuterDiv');
videoDivElement.appendChild(dialogDiv);
}
function closeEmbedDialogbiznaga_jasmine_flowervideo()
{
document.getElementById('dialogDivbiznaga_jasmine_flowervideo').style.display = 'none';
return false;
}
function openEmbedDialogbiznaga_jasmine_flowervideo()
{
document.getElementById('dialogDivbiznaga_jasmine_flowervideo').style.display = 'block';
return false;
}
function dialogTextAreaClickbiznaga_jasmine_flowervideo()
{
this.select();
}
function updateShareScriptbiznaga_jasmine_flowervideo()
{
var regexpress = /w=\d+/gmi;
var embedText = document.getElementById('embedCodebiznaga_jasmine-flowervideo');
var m = regexpress.exec(embedText.value);
if(document.getElementById('textWidthbiznaga_jasmine-flowervideo').value != '')
{
embedText.value = embedText.value.replace(m, 'w=' + document.getElementById('textWidthbiznaga_jasmine-flowervideo').value);
}
}
function loadScript(scriptScr, id) {
if (document.getElementById(id) == null)
{
var oHead = document.getElementsByTagName('HEAD').item(0);
var oScript = document.createElement("script");
oScript.type = "text/javascript";
oScript.id = id;
//oScript.defer = "true";
oScript.src = scriptScr;
oHead.appendChild(oScript);
}
}
function writeStylebiznaga_jasmine_flowervideo(styles) {
var head = document.getElementsByTagName('head')[0];
style = document.createElement('style');
rules = document.createTextNode(styles);
style.type = 'text/css';
if(style.styleSheet)
{
style.styleSheet.cssText = rules.nodeValue;
}
else
{
style.appendChild(rules);
}
head.appendChild(style);
}
function loadCSS(cssScr, id) {
if (document.getElementById(id) == null)
{
var oHead = document.getElementsByTagName('HEAD').item(0);
var newCss = document.createElement("link");
newCss.setAttribute('type', 'text/css');
newCss.setAttribute('rel', 'stylesheet');
newCss.setAttribute('href', cssScr);
newCss.setAttribute('id', id);
oHead.appendChild(newCss);
}
}
function loadAnalytics()
{
if (typeof _gaq == "undefined")
{
//Set global variable _gaq
_gaq = [];
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);
}
_gaq.push(['sha._setAccount', 'UA-768102-16']);
}
var hasTrackedPlayedbiznaga_jasmine_flowervideo = false;
function trackPlaybiznaga_jasmine_flowervideo(player, flash)
{
if(!hasTrackedPlayedbiznaga_jasmine_flowervideo)
{
var dataToSend = videoDatabiznaga_jasmine_flowervideo.TrackVideoName;
var browserLocation = "";
try
{
browserLocation = document.URL;
}
catch(browserUrlException)
{
}
try
{
var date = new Date();
var ticks = date.getTime();
var urlToUse = 'https://www.spain-holiday.com/video/PlayTracker.aspx?urlString=' + encodeURI(dataToSend);
urlToUse += '&browserLocation=' + encodeURI(browserLocation);
urlToUse += '&ticks=' + ticks;
document.getElementById('biznaga_jasmine-flowervideoLoadTracker').src = urlToUse;
}
catch(trackExp)
{
console.log('trackExp: ' + trackExp);
}
hasTrackedPlayedbiznaga_jasmine_flowervideo = true;
}
if (flash)
togglePlayButtonFlashbiznaga_jasmine_flowervideo(player);
else
togglePlayButtonbiznaga_jasmine_flowervideo(player);
}
function trackPausebiznaga_jasmine_flowervideo(player, flash)
{
if (flash)
togglePlayButtonFlashbiznaga_jasmine_flowervideo(player);
else
togglePlayButtonbiznaga_jasmine_flowervideo(player);
}
function trackEndbiznaga_jasmine_flowervideo(player, flash)
{
if (flash)
togglePlayButtonFlashbiznaga_jasmine_flowervideo(player);
else
togglePlayButtonbiznaga_jasmine_flowervideo(player);
}
function trackAbortbiznaga_jasmine_flowervideo(player, flash)
{
if (flash)
togglePlayButtonFlashbiznaga_jasmine_flowervideo(player);
else
togglePlayButtonbiznaga_jasmine_flowervideo(player);
}
function trackPlayFlashbiznaga_jasmine_flowervideo(player)
{
setPlayerStatePlay(player);
trackPlaybiznaga_jasmine_flowervideo(player, true)
}
function trackPauseFlashbiznaga_jasmine_flowervideo(player)
{
setPlayerStatePause(player);
trackPausebiznaga_jasmine_flowervideo(player, true)
}
function trackEndFlashbiznaga_jasmine_flowervideo(player)
{
setPlayerStateFinish(player);
trackEndbiznaga_jasmine_flowervideo(player, true)
}
function trackAbortFlashbiznaga_jasmine_flowervideo(player)
{
setPlayerStateAbort(player);
trackAbortbiznaga_jasmine_flowervideo(player, true)
}
function setPlayerStatePlay(player)
{
var playerState = player.attributes["playerstate"];
if (playerState.value == "Pause")
setPlayerState(player, "Resume");
else
setPlayerState(player, "Play");
}
function setPlayerStatePause(player)
{
if (!player.ended)
setPlayerState(player, "Pause");
}
function setPlayerStateFinish(player)
{
setPlayerState(player, "Finish");
}
function setPlayerStateAbort(player)
{
setPlayerState(player, "Abort");
}
function setPlayerState(player, state)
{
player.setAttribute("playerstate", state);
var gtmDLData = { 'event': 'GAevent', 'eventCategory': 'Videos', 'eventAction': state, 'eventLabel': globalVideoSource };
trackVideoEvent(gtmDLData);
}
function setPlayerFullScreen(state)
{
var player = document.getElementById("biznaga_jasmine-flowervideo");
player.setAttribute("fullscreen", state);
var gtmDLData = { 'event': 'GAevent', 'eventCategory': 'Videos', 'eventAction': state, 'eventLabel': globalVideoSource };
trackVideoEvent(gtmDLData);
}
function enableVideoFullscreenTracking() {
if (document.addEventListener)
{
document.addEventListener("fullscreenchange", FullScreenHandler);
document.addEventListener("webkitfullscreenchange", FullScreenHandler);
document.addEventListener("mozfullscreenchange", FullScreenHandler);
document.addEventListener("MSFullscreenChange", FullScreenHandler);
}
else
{
document.attachEvent("onfullscreenchange", FullScreenHandler);
/*document.attachEvent("webkitfullscreenchange", FullScreenHandler);
document.attachEvent("mozfullscreenchange", FullScreenHandler);
document.attachEvent("MSFullscreenChange", FullScreenHandler);*/
}
}
function FullScreenHandler(){
var fullScreenElem = document.fullscreenElement ||
document.webkitFullscreenElement ||
document.mozFullScreenElement ||
document.msFullscreenElement;
if (fullScreenElem)
if(fullScreenElem.id == "shVideo")
setPlayerFullScreen("Fullscreen on");
else
setPlayerFullScreen("Fullscreen off");
else
setPlayerFullScreen("Fullscreen off");
}
function trackVideoEvent(gtmDLData)
{
if (typeof dataLayer != 'undefined')
dataLayer.push(gtmDLData);
}
function setJSONPaser()
{
window.jsonParse=function(){var r="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)",k='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))';k='(?:"'+k+'*")';var s=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+r+"|"+k+")","g"),t=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),u={'"':'"',"/":"/","\\":"\\",b:"\u0008",f:"\u000c",n:"\n",r:"\r",t:"\t"};function v(h,j,e){return j?u[j]:String.fromCharCode(parseInt(e,16))}var w=new String(""),x=Object.hasOwnProperty;return function(h,
j){h=h.match(s);var e,c=h[0],l=false;if("{"===c)e={};else if("["===c)e=[];else{e=[];l=true}for(var b,d=[e],m=1-l,y=h.length;m=0;)delete f[i[g]]}return j.call(n,
o, f)
}; e = p({ "": e }, "")
} return e
}
} ();
}
function domReadybiznaga_jasmine_flowervideo() {
enableVideoFullscreenTracking();
}
if (document.addEventListener) {
document.addEventListener( "DOMContentLoaded", function() {
document.removeEventListener("DOMContentLoaded", arguments.callee, false);
domReadybiznaga_jasmine_flowervideo();
}, false );
}
else if (document.attachEvent) {
document.attachEvent("onreadystatechange", function(){
if (document.readyState === "complete") {
document.detachEvent("onreadystatechange", arguments.callee);
domReadybiznaga_jasmine_flowervideo();
}
});
}