Saltar al contenido
Peña Quinielaticas

Todos los Anuncios de la Lotería de Navidad (El Gordo)

12 junio, 2019

Os ponemos todos los vídeos de la Lotería de Navidad en orden cronológico. Los primeros vídeos son difíciles de encontrar. A partir del año 1998 están todos.

El Calvo de la Lotería (1998-2005)

De 1998 hasta 2005 la agencia Publicis España se encargó de realizar los anuncios. Empezaba la era de un mito “el calvo de la lotería” del que no muchos conocen su nombre: Clive Arrindell. Hay algunas curiosidades:

  • Clive Arrindell el Calvo de la loteríaClive Arrindell nació en Trinidad y Tobago.
  • C. Arrindell es un intérprete de teatro al que le encanta hablar y que, sin embargo protagonizó durante 8 años el anuncio mudo de la Lotería de Navidad.
  • C. Arrindell tenía contrato de hasta 2009 pero dejó de aparecer en el 2005 porque, y cito literalmente “me dijeron que mi personaje ensombrecía a la propia marca”. Su protagonismo en los anuncios eclipsaba el objetivo del anuncio: vender Lotería de Navidad. Él cree que más que ensombrecerla, el aspecto económico tenía algo que ver. Y no es de extrañar. Sigue leyendo y lo entenderás.
  • C. Arrindell tenía un contrato de exclusividad que le impedía aparecer en otros proyectos audiovisuales. Por lo que públicamente solo podía aparecer en el spot anual de Loterías y Apuestas del Estado.
  • Su exclusividad tenía un precio. Cobraba la friolera de 120.000 euros al año (según El Mundo en un artículo del 25 de noviembre de 2007) por hacer un único anuncio.
  • Como su contrato terminaba en 2009 y en 2006 ya no protagonizó la campaña, cobró durante 4 años sin hacer nada.
  • La gente que ve a Clive Arrindell por la calle, le pide que toque sus boletos como si de un santo urbano posmoderno se tratase. Reconócelo, tú lo harías también si lo vieras.
  • C. Arrindell ha participado en varias películas y series como Yesterday’s Tomorrow, Dinotopía, Bellas Durmientes, The Scarlet and the Black o Turbulence, entre otras.
  • El tema musical del anuncio es de Maurice Jarre, titulado “El café de los estudiantes”, incluido en la banda sonora del Doctor Zhivago.

Estos son los 8 anuncios protagonizados por Clive Arrindell:

La Diosa de la Fortuna (2006-2010)

En el año 2006 empieza a encargarse la agencia Ricardo Pérez Asociados y duraría 5 años dándole una imagen totalmente nueva a los anuncios. Cambió el protagonista, la música, dejaron de ser anuncios mudos e intentó imponer a La Diosa de la Fortuna.

" + description + "
" ); } if (inst.options.showplaybutton && TotalSoft_VG_FG_ShSlPlIc == "true" && TotalSoft_GV_FG_PT == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + text + "
" + description + "
" ); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + text + "
" + description + "
" ); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT != "true" && TotalSoft_GV_FG_PD == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + description + "
" ); } if (TotalSoft_GV_FG_PD == "true") { jQuery(".tsvg-fancy-popup-desc").css("display", "block"); } if (TotalSoft_GV_FG_PT == "true") { jQuery(".tsvg-fancy-popup-text").css("display", "inline-block"); } if (TotalSoft_GV_FG_PD != "true") { jQuery(".tsvg-fancy-popup-desc").css("display", "none"); } if (TotalSoft_GV_FG_PT != "true") { jQuery(".tsvg-fancy-popup-text").css("display", "none"); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT != "true" && TotalSoft_GV_FG_PD != "true") { jQuery("#tsvg-fancy-html5-text").css("display", "none"); } } if (inst.options.showdescription && description && description.length > 0) { inst.$text.html(text); } if (inst.options.inGroup && inst.options.showplaybutton) { if (inst.autosliding) { $("#tsvg-fancy-html5-play", inst.$lightbox).hide(); $("#tsvg-fancy-html5-pause", inst.$lightbox).show(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.slideTimeout.start(); inst.autosliding = true; } } else { $("#tsvg-fancy-html5-play", inst.$lightbox).show(); $("#tsvg-fancy-html5-pause", inst.$lightbox).hide(); } $("#tsvg-fancy-html5-play", inst.$lightbox).click( function () { $("#tsvg-fancy-html5-play", inst.$lightbox).hide(); $("#tsvg-fancy-html5-pause", inst.$lightbox).show(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.slideTimeout.start(); inst.autosliding = true; } } ); $("#tsvg-fancy-html5-pause", inst.$lightbox).click( function () { $("#tsvg-fancy-html5-play", inst.$lightbox).show(); $("#tsvg-fancy-html5-pause", inst.$lightbox).hide(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.autosliding = false; } } ); } $("#tsvg-fancy-html5-social", inst.$lightbox).show(); }); (inst.showImage = function (elem, imgW, imgH) { var elemW, elemH; if (elem[ELEM_WIDTH]) { elemW = elem[ELEM_WIDTH]; } else { elemW = imgW; elem[ELEM_WIDTH] = imgW; } if (elem[ELEM_HEIGHT]) { elemH = elem[ELEM_HEIGHT]; } else { elemH = imgH; elem[ELEM_HEIGHT] = imgH; } var sizeObj = inst.calcElemSize({ w: elemW, h: elemH }, inst.options.imagekeepratio); inst.resizeLightbox( sizeObj.w, sizeObj.h, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); var timercode = !inst.options.showtimer || !inst.options.inGroup ? "" : ""; inst.$image.show(); inst.$image.html( "
" + timercode + "
" ); inst.$elem.fadeIn( inst.options.fadespeed, function () { inst.showData(); } ); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }); inst.showSWF = function (elem) { var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); inst.embedFlash($("#tsvg-html5lightbox-swf"), elem[ELEM_HREF], "window", { width: dataW, height: dataH }); inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.showVideo = function (elem) { inst.slideTimeout.stop(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var isHTML5 = false; if (inst.options.isIE678 || elem[ELEM_TYPE] == 8 || (inst.options.isIE9 && inst.options.useflashonie9) || (inst.options.isIE10 && inst.options.useflashonie10) || (inst.options.isIE11 && inst.options.useflashonie11)) { isHTML5 = false; } else if (inst.options.isMobile) { isHTML5 = true; } else if ((inst.options.html5player || !inst.options.flashInstalled) && inst.options.html5VideoSupported) { if ((!inst.options.isFirefox && !inst.options.isOpera) || ((inst.options.isFirefox || inst.options.isOpera) && (elem[ELEM_HREF_OGG] || elem[ELEM_HREF_WEBM]))) { isHTML5 = true; } } if (isHTML5) { var videoSrc = elem[ELEM_HREF]; if (inst.options.isFirefox || inst.options.isOpera || !videoSrc) { videoSrc = elem[ELEM_HREF_WEBM] ? elem[ELEM_HREF_WEBM] : elem[ELEM_HREF_OGG]; } inst.embedHTML5Video($("#tsvg-html5lightbox-video"), videoSrc, inst.options.autoplay, inst.options.loopvideo); } else { var videoFile = elem[ELEM_HREF]; if (videoFile.charAt(0) != "/" && videoFile.substring(0, 5) != "http:" && videoFile.substring(0, 6) != "https:") { videoFile = inst.options.htmlfolder + videoFile; } inst.embedFlash( $("#tsvg-html5lightbox-video"), inst.options.jsfolder + "html5boxplayer.swf", "transparent", { width: dataW, height: dataH, jsobjectname: "html5Lightbox", hidecontrols: inst.options.videohidecontrols ? "1" : "0", hideplaybutton: "0", videofile: videoFile, hdfile: "", ishd: "0", defaultvolume: inst.options.defaultvideovolume, autoplay: inst.options.autoplay ? "1" : "0", loop: inst.options.loopvideo ? "1" : "0", errorcss: ".html5box-error" + inst.options.errorcss, id: 0, } ); } inst.$elem.show(); inst.showData(); } ); }; inst.loadNext = function () { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } }; inst.getYoutubeParams = function (href) { var result = {}; if (0 > href.indexOf("?") ) { return result; } var params = href.substring(href.indexOf("?") + 1).split("&"); for (var i = 0;params.length > i ; i++) { var value = params[i].split("="); if (value && value.length == 2 && value[0].toLowerCase() != "v") { result[value[0].toLowerCase()] = value[1]; } } return result; }; inst.getYoutubeId = function (href) { var youtubeId = ""; var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(shorts\/)|(watch\??v?=?))([^#\&\?]*).*/; var match = href.match(regExp); if (match && match[match.length -1].length == 11) { youtubeId = match[match.length -1]; } return youtubeId; }; inst.prepareYoutubeHref = function (href) { let youtubeId = inst.getYoutubeId(href), protocol = "https:", result = protocol + "//www.youtube.com/embed/" + youtubeId, params = this.getYoutubeParams(href), first = true; for (var key in params) { if (first) { result += "?"; first = false; } else { result += "&"; } result += key + "=" + params[key]; } return result; }; inst.prepareDailymotionHref = function (href) { if (href.match(/\:\/\/.*(dai\.ly)/i)) { var protocol = "https:"; var id = href.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2]; href = protocol + "" + id; } return href; }; inst.showYoutubeVimeo = function (elem) { var tsvg_autoplay = jQuery('.tsvg-main-content-' + id).attr('data-tsvg-autoplay'); inst.slideTimeout.stop(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var href = elem[ELEM_HREF]; var youtubeid = ""; if (elem[ELEM_TYPE] == 3) { youtubeid = inst.getYoutubeId(href); href = inst.prepareYoutubeHref(href); if (tsvg_autoplay == "true") { href += "?autoplay=1&mute=1" } else { href += "?autoplay=0&mute=0" } } if (elem[ELEM_TYPE] == 9) { href = inst.prepareDailymotionHref(href); } if (inst.options.autoplay) { if (elem[ELEM_TYPE] == 4) { if (href.indexOf('player.vimeo.com/video/') > -1) { if (tsvg_autoplay == "true") { href += "?autoplay=1&muted=1"; } } } } if (inst.options.loopvideo) { href += 0 > href.indexOf("?") ? "?" : "&"; switch (elem[ELEM_TYPE]) { case 3: href += "loop=1&playlist=" + youtubeid; break; case 4: case 9: href += "loop=1"; break; case 11: href += "endVideoBehavior=loop"; break; } } if (elem[ELEM_TYPE] == 3 && Totalsoft_FG_ShVAutoPl == "true") { if (0 > href.indexOf("?")) { href += "?wmode=transparent&rel=0&iv_load_policy=3"; } else { href += "&wmode=transparent&rel=0&iv_load_policy=3"; } if (inst.options.videohidecontrols) { href += "&controls=0&showinfo=0"; } href += "&mute=1&enablejsapi=1&origin=" + document.location.protocol + "//" + document.location.hostname; } if (href.indexOf('.mp4') > -1) { let autoplay_bool = tsvg_autoplay == "true" ? "autoplay muted" : ""; $("#tsvg-html5lightbox-video").html(''); } else { $("#tsvg-html5lightbox-video").html(""); } inst.$elem.show(); inst.showData(); if (elem[ELEM_TYPE] == 3 && typeof YT === "object" && typeof YT.Player === "function") { new YT.Player( "html5boxiframevideo", { events: { onStateChange: function (event) { if (event.data == YT.PlayerState.ENDED) { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } }, }, } ); } else if (elem[ELEM_TYPE] == 4 && typeof $f === "function") { var vimeoIframe = $("#html5boxiframevideo")[0]; var vimeoPlayer = $f(vimeoIframe); vimeoPlayer.addEvent( "ready", function () { vimeoPlayer.addEvent( "finish", function (id) { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } ); } ); } } ); }; inst.showPDF = function (elem) { }; inst.showMP3 = function (elem) { }; inst.showDiv = function (elem) { var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : winWidth; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : winH - inst.options.navheight; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, false); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.$loading.hide(); inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var divID = elem[ELEM_HREF]; if ($(divID).length > 0) { $("#tsvg-html5lightbox-div").html($(divID).html()); } else { $("#tsvg-html5lightbox-div").html("
The specified div ID does not exist.
"); } inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.showWeb = function (elem) { var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : winWidth; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : winH - inst.options.navheight; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, false); var tsvgRumbleCheck = elem[ELEM_HREF].indexOf('rumble.com/') > -1 ? 'sandbox="allow-scripts"' : ''; dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.$loading.hide(); inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); $("#tsvg-html5lightbox-web").html(""); inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.scrollBox = function () { }; inst.resizeWindow = function () { if (!inst.currentElem) { return; } if (!inst.options.responsive) { return; } var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); if (inst.options.responsivebarheight) { if (inst.options.smallscreenheight >= winH) { inst.options.barheight = inst.options.barheightonsmallheight; } else { inst.options.barheight = inst.options.barheightoriginal; } if (inst.options.titlestyle == "bottom" && inst.options.barautoheight != "auto") { inst.$elemData.css({ height: inst.options.barheight + "px", "max-height": inst.options.barheight + "px" }); } } var elemW, elemH, keepratio; if (inst.currentElem[ELEM_TYPE] == 7 || inst.currentElem[ELEM_TYPE] == 10) { elemW = inst.currentElem[ELEM_WIDTH] ? inst.currentElem[ELEM_WIDTH] : winWidth; elemH = inst.currentElem[ELEM_HEIGHT] ? inst.currentElem[ELEM_HEIGHT] : winH - inst.options.navheight; keepratio = false; } else { elemW = inst.currentElem[ELEM_WIDTH] ? inst.currentElem[ELEM_WIDTH] : DEFAULT_WIDTH; elemH = inst.currentElem[ELEM_HEIGHT] ? inst.currentElem[ELEM_HEIGHT] : DEFAULT_HEIGHT; if (inst.currentElem[ELEM_TYPE] == 0) { keepratio = inst.options.imagekeepratio; } else { keepratio = true; } } var sizeObj = inst.calcElemSize({ w: elemW, h: elemH }, keepratio); var boxPos = inst.calcBoxPosition(sizeObj.w, sizeObj.h); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } if (inst.options.titlestyle == "inside") { inst.$elemData.css({ width: sizeObj.w + "px" }); } if (0 >= $(".tsvg-fancy-html5-nav").length ) { return; } $(".tsvg-fancy-html5-nav-list").css({ "margin-left": 0 }); var $navMask = $(".tsvg-fancy-html5-nav-mask"); var $navPrev = $(".tsvg-fancy-html5-nav-prev"); var $navNext = $(".tsvg-fancy-html5-nav-next"); var winWidth = $(window).width(); if (winWidth >= inst.options.totalwidth ) { $navMask.css({ width: inst.options.totalwidth + "px" }); $navPrev.hide(); $navNext.hide(); } else { $navMask.css({ width: winWidth - 2 * inst.options.navbuttonwidth + "px" }); $navPrev.show(); $navNext.show(); } }; inst.calcElemSize = function (sizeObj, keepratio) { if (!inst.options.responsive) { return sizeObj; } var winWidth = $(window).width(); winWidth = winWidth ? winWidth : $(document).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); winH = winH ? winH : $(document).height(); if ((inst.options.titlestyle == "left" || inst.options.titlestyle == "right") && winWidth > inst.options.sidetobottomscreenwidth) { sizeObj.w = (sizeObj.w * 100) / inst.options.imagepercentage; } var topmargin = inst.options.navarrowsbottomscreenwidth > $(window).width() ? inst.options.bordertopmarginsmall : inst.options.bordertopmargin; var h0 = winH - inst.options.navheight - 2 * inst.options.bordersize - 2 * topmargin; if (inst.options.titlestyle == "bottom") { h0 -= inst.options.barheight; } if (((inst.options.titlestyle == "left" || inst.options.titlestyle == "right") && inst.options.sidetobottomscreenwidth >= winWidth ) || (inst.options.notkeepratioonsmallheight && inst.options.smallscreenheight >= winH)) { keepratio = false; } if (sizeObj.h > h0) { if (keepratio) { sizeObj.w = Math.round((sizeObj.w * h0) / sizeObj.h); } sizeObj.h = h0; } var w0 = winWidth - 2 * inst.options.bordersize - 2 * inst.options.bordermargin; if ( (inst.options.fullscreenmode && winWidth > inst.options.navarrowsbottomscreenwidth) || (((inst.options.isTouch && inst.options.navarrowsalwaysshowontouch) || inst.options.alwaysshownavarrows) && winWidth > inst.options.navarrowsbottomscreenwidth) ) { w0 -= 64; } if (sizeObj.w > w0) { if (keepratio) { sizeObj.h = Math.round((sizeObj.h * w0) / sizeObj.w); } sizeObj.w = w0; } return sizeObj; }; inst.showData = function () { if (inst.$text.text().length > 0) { inst.$elemData.show(); } if (inst.options.titlestyle == "bottom" || inst.options.titlestyle == "inside") { inst.$lightboxBox.css({ height: "auto" }); } if (inst.$text.text().length > 0 && inst.options.titlestyle == "bottom") { inst.$elemData.css({ "max-height": inst.options.barheight + "px" }); } $("#tsvg-fancy-html5-lightbox-overlay", inst.$lightbox).css({ height: Math.max($(window).height(), $(document).height()) }); $(window).trigger("html5lightbox.lightboxopened"); }; inst.resizeLightbox = function (elemW, elemH, bAnimate, onFinish) { inst.hideNavArrows(); var boxPos = inst.calcBoxPosition(elemW, elemH); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$loading.hide(); inst.$watermark.hide(); if (inst.options.curElem >= inst.options.nextElem) { if (inst.options.onlastitem && window[inst.options.onlastitem] && typeof window[inst.options.onlastitem] == "function") { window[inst.options.onlastitem](inst.currentElem); } } if (inst.options.prevElem >= inst.options.curElem) { if (inst.options.onfirstitem && window[inst.options.onfirstitem] && typeof window[inst.options.onfirstitem] == "function") { window[inst.options.onfirstitem](inst.currentElem); } } if (!inst.options.fullscreenmode && (!inst.options.isTouch || !inst.options.navarrowsalwaysshowontouch) && !inst.options.alwaysshownavarrows) { inst.$elem.bind( "mouseenter mousemove", function () { if ((inst.options.arrowloop && inst.options.prevElem >= 0) || (!inst.options.arrowloop && inst.options.prevElem >= 0 && inst.options.curElem > inst.options.prevElem )) { inst.$prev.fadeIn(); } if ((inst.options.arrowloop && inst.options.nextElem >= 0) || (!inst.options.arrowloop && inst.options.nextElem >= 0 && inst.options.nextElem > inst.options.curElem)) { inst.$next.fadeIn(); } } ); inst.$elem.bind( "mouseleave", function () { inst.$next.fadeOut(); inst.$prev.fadeOut(); } ); } inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { var speed = bAnimate ? inst.options.resizespeed : 0; if (boxW == inst.$lightboxBox.width() && boxH == inst.$lightboxBox.height()) { speed = 0; } inst.$lightboxBox.animate({ width: boxW }, speed).animate( { height: boxH }, speed, function () { inst.onAnimateFinish(onFinish); } ); } else { var speed = bAnimate ? inst.options.resizespeed : 0; if (boxW == inst.$elemWrap.width() && boxH == inst.$elemWrap.height()) { speed = 0; } inst.$lightboxBox.css({ width: boxW, height: "auto", "min-width": boxW - 15 }); inst.$elemWrap.animate({ width: boxW, "min-width": boxW - 15 }, speed).animate( { height: boxH, "min-height": boxH - 15 }, speed, function () { inst.onAnimateFinish(onFinish); } ); } }; inst.onAnimateFinish = function (onFinish) { inst.$loading.show(); inst.$watermark.show(); inst.$close.show(); inst.$elem.css({ "background-color": inst.options.bgcolor }); onFinish(); }; inst.reset = function () { if (inst.options.stamp) { inst.$watermark.hide(); } inst.showing = false; inst.$image.empty(); inst.$text.empty(); inst.$error.hide(); inst.$loading.hide(); inst.$image.hide(); if (inst.options.titlestyle == "bottom" || inst.options.titlestyle == "inside") { inst.$elemData.hide(); } if (!inst.options.fullscreenmode) { inst.$close.hide(); } inst.$elem.css({ "background-color": "" }); }; inst.resetNavigation = function () { inst.options.navheight = 0; $(".tsvg-fancy-html5-nav").remove(); }; inst.finish = function () { if ($("#tsvg-fancy-html5-lightbox-video", inst.$lightbox).length) { $("#tsvg-fancy-html5-lightbox-video", inst.$lightbox).attr("src", ""); } $("head") .find("style") .each( function () { if ($(this).data("creator") == "tsvg-fancy-html5box-html5-lightbox") { $(this).remove(); } } ); inst.slideTimeout.stop(); inst.reset(); inst.resetNavigation(); inst.$lightbox.remove(); $("#tsvg-fancy-html5box-html5-lightbox").remove(); inst.showObjects(); if (inst.options.oncloselightbox && window[inst.options.oncloselightbox] && typeof window[inst.options.oncloselightbox] == "function") { window[inst.options.oncloselightbox](inst.currentElem); } if (inst.onLightboxClosed && typeof inst.onLightboxClosed == "function") { inst.onLightboxClosed(inst.currentElem); } }; inst.pauseSlide = function () { }; inst.playSlide = function () { }; inst.gotoSlide = function (slide) { if (slide == -1) { if (0 > inst.options.nextElem ) { return; } inst.options.curElem = inst.options.nextElem; } else if (slide == -2) { if (0 > inst.options.prevElem ) { return; } inst.options.curElem = inst.options.prevElem; } else if (slide >= 0) { inst.options.curElem = slide; } if (inst.autosliding) { inst.slideTimeout.stop(); } inst.calcNextPrevElem(); inst.reset(); inst.loadCurElem(); }; inst.enableSwipe = function () { inst.$elem.html5lightboxTouchSwipe149383( { preventWebBrowser: false, swipeLeft: function () { inst.gotoSlide(-1); }, swipeRight: function () { inst.gotoSlide(-2); }, } ); }; inst.hideObjects = function () { $("select, embed, object").css({ visibility: "hidden" }); }; inst.showObjects = function () { $("select, embed, object").css({ visibility: "visible" }); }; inst.embedHTML5Video = function ($container, src, autoplay, loopvideo) { let embedVideoPoster = (inst.options.html5videoposter && inst.options.html5videoposter.length > 0 ? "poster='" + inst.options.html5videoposter + "'" : ""), embedVideoControls = (inst.options.nativehtml5controls && !inst.options.videohidecontrols ? " controls='controls'" : ""); $container.html( "
" ); if (!inst.options.nativehtml5controls) { $("video", $container).data("src", src); $("video", $container).lightboxHTML5VideoControls149383(inst.options.skinsfolder, inst, inst.options.videohidecontrols, false, inst.options.defaultvideovolume); } $("video", $container) .unbind("ended") .bind( "ended", function () { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } ); }; inst.embedFlash = function ($container, src, wmode, flashVars) { if (inst.options.flashInstalled) { var htmlOptions = { pluginspage: "", quality: "high", allowFullScreen: "true", allowScriptAccess: "always", type: "application/x-shockwave-flash" }; htmlOptions.width = "100%"; htmlOptions.height = "100%"; htmlOptions.src = src; htmlOptions.flashVars = $.param(flashVars); htmlOptions.wmode = wmode; var htmlString = ""; for (var key in htmlOptions) { htmlString += key + "=" + htmlOptions[key] + " "; } $container.html(""); } else { $container.html( "
The required Adobe Flash Player plugin is not installed

Get Adobe Flash player
" ); } }; inst.checkType = function (href) { if (!href) { return -1; } if (href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)) { return 0; } if (href.match(/[^\.]\.(swf)\s*$/i)) { return 1; } if (href.match(/\.(mp4|m4v|ogv|ogg|webm)(.*)?$/i)) { return 4; } if (href.match(/\:\/\/.*(youtube\.com)/i) || href.match(/\:\/\/.*(youtu\.be)/i)) { return 3; } if (href.match(/\:\/\/.*(vimeo\.com)/i)) { return 4; } if (href.match(/\:\/\/.*(dailymotion\.com)/i) || href.match(/\:\/\/.*(dai\.ly)/i)) { return 9; } if (href.match(/[^\.]\.(pdf)\s*$/i)) { return 5; } if (href.match(/[^\.]\.(mp3)\s*$/i)) { return 6; } if (href.match(/[^\.]\.(flv)\s*$/i)) { return 8; } if (href.match(/\#\w+/i)) { return 10; } if (href.match(/\:\/\/.*(wistia)/i)) { return 11; } return 7; }; inst.getURLParams = function () { var result = {}; var params = window.location.search.substring(1).split("&"); for (var i = 0; params.length > i ; i++) { var value = params[i].split("="); if (value && value.length == 2) { result[value[0].toLowerCase()] = unescape(value[1]); } } return result; }; inst.absoluteUrl = function (href) { var link = document.createElement("a"); link.href = href; return link.protocol + "//" + link.host + link.pathname + link.search + link.hash; }; inst.showLightbox = function (type, href, title, width, height, webm, ogg, thumbnail, description) { inst.options = $.extend(inst.options, inst.defaultoptions); $(window).trigger("html5lightbox.lightboxshow"); inst.init(); inst.reset(); inst.$lightbox.show(); var boxPos = inst.calcBoxPosition(inst.options.loadingwidth, inst.options.loadingheight); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } inst.loadElem(new Array(type, href, title, null, width, height, webm, ogg, thumbnail, description)); }; inst.addItem = function (href, title, group, width, height, webm, ogg, thumbnail, description, mediatype) { type = mediatype && mediatype >= 0 ? mediatype : inst.checkType(href); inst.elemArray.push(new Array(type, href, title, group, width, height, webm, ogg, thumbnail, description)); }; inst.showItem = function (href) { inst.options = $.extend(inst.options, inst.defaultoptions); $(window).trigger("html5lightbox.lightboxshow"); inst.init(); if (0 >= inst.elemArray.length) { return true; } inst.hideObjects(); for (var i = 0; inst.elemArray.length > i; i++) { if (inst.elemArray[i][ELEM_HREF] == href) { break; } } if (i == inst.elemArray.length) { return true; } inst.options.curElem = i; inst.calcNextPrevElem(); inst.reset(); inst.$lightbox.show(); var boxPos = inst.calcBoxPosition(inst.options.loadingwidth, inst.options.loadingheight); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } inst.loadCurElem(); return false; }; inst.unbind("click").click(inst.clickHandler); inst.each( function () { var self = $(this); if (self.data("autoopen")) { setTimeout( function () { self.click(); }, self.data("autoopendelay") ? self.data("autoopendelay") : 0 ); return false; } } ); var urlParams = inst.getURLParams(); if ("html5lightboxshare" in urlParams) { var shareUrl = decodeURIComponent(urlParams["html5lightboxshare"]); var shareLink = $('.tsvg-html5lightbox-149383[href="' + shareUrl + '"]'); if (shareLink.length > 0) { shareLink.click(); } } return inst; }; })(jQuery); (function ($) { $.fn.html5lightboxTouchSwipe149383 = function (options) { var defaults = { preventWebBrowser: false, swipeLeft: null, swipeRight: null, swipeTop: null, swipeBottom: null }; if (options) { $.extend(defaults, options); } return this.each( function () { var startX = -1, startY = -1; var curX = -1, curY = -1; function touchStart(event) { var e = event.originalEvent; if (e.targetTouches.length >= 1) { startX = e.targetTouches[0].pageX; startY = e.targetTouches[0].pageY; } else { touchCancel(event); } } function touchMove(event) { if (defaults.preventWebBrowser) { event.preventDefault(); } var e = event.originalEvent; if (e.targetTouches.length >= 1) { curX = e.targetTouches[0].pageX; curY = e.targetTouches[0].pageY; } else { touchCancel(event); } } function touchEnd(event) { if (curX > 0 || curY > 0) { triggerHandler(); touchCancel(event); } else { touchCancel(event); } } function touchCancel(event) { startX = -1; startY = -1; curX = -1; curY = -1; } function triggerHandler() { if (Math.abs(curX - startX) > Math.abs(curY - startY)) { if (curX > startX) { if (defaults.swipeRight) { defaults.swipeRight.call(); } } else { if (defaults.swipeLeft) { defaults.swipeLeft.call(); } } } else if (curY > startY) { if (defaults.swipeBottom) { defaults.swipeBottom.call(); } } else if (defaults.swipeTop) { defaults.swipeTop.call(); } } try { $(this).bind("touchstart", touchStart); $(this).bind("touchmove", touchMove); $(this).bind("touchend", touchEnd); $(this).bind("touchcancel", touchCancel); } catch (e) { } } ); }; })(jQuery); (function ($) { $.fn.lightboxHTML5VideoControls149383 = function (skinFolder, parentInst, hidecontrols, hideplaybutton, defaultvolume) { var isTouch = "ontouchstart" in window; var eStart = isTouch ? "touchstart" : "mousedown"; var eMove = isTouch ? "touchmove" : "mousemove"; var eCancel = isTouch ? "touchcancel" : "mouseup"; var eClick = "click"; var BUTTON_SIZE = 32; var BAR_HEIGHT = isTouch ? 48 : 36; var hideControlsTimerId = null; var hideVolumeBarTimeoutId = null; var sliderDragging = false; var isFullscreen = false; var userActive = true; var isIPhone = navigator.userAgent.match(/iPod/i) != null || navigator.userAgent.match(/iPhone/i) != null; var isHd = $(this).data("ishd"); var hd = $(this).data("hd"); var src = $(this).data("src"); var $videoObj = $(this); $videoObj.get(0).removeAttribute("controls"); if (isIPhone) { var h = $videoObj.height() - BAR_HEIGHT; $videoObj.css({ height: h }); } var $videoPlay = $("
"); if (!isIPhone) { $videoObj.after($videoPlay); $videoPlay .css( { position: "absolute", top: "50%", left: "50%", display: "block", cursor: "pointer", width: 64, height: 64, "margin-left": -32, "margin-top": -32, "background-image": "url('" + skinFolder + "html5boxplayer_playvideo.png" + "')", "background-position": "center center", "background-repeat": "no-repeat", } ) .bind( eClick, function () { $videoObj.get(0).play(); } ); } var $videoFullscreenBg = $("
"); var $videoControls = $( "
" + "
" + "
" + "
" + "
" + "
" + "
--:--
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
--:--
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" ); $videoObj.after($videoControls); $videoObj.after($videoFullscreenBg); $videoFullscreenBg.css({ display: "none", position: "fixed", left: 0, top: 0, bottom: 0, right: 0, "z-index": 2147483647 }); $videoControls.css({ display: "block", position: "absolute", width: "100%", height: BAR_HEIGHT, left: 0, bottom: 0, right: 0, "max-width": "640px", margin: "0 auto" }); var userActivate = function () { userActive = true; }; $videoObj .bind( eClick, function () { userActive = true; } ) .hover( function () { userActive = true; }, function () { userActive = false; } ); if (!hidecontrols) { setInterval( function () { if (userActive) { $videoControls.show(); userActive = false; clearTimeout(hideControlsTimerId); hideControlsTimerId = setTimeout( function () { if (!$videoObj.get(0).paused) { $videoControls.fadeOut(); } }, 5e3 ); } }, 250 ); } $(".html5boxVideoControlsBg", $videoControls).css({ display: "block", position: "absolute", width: "100%", height: "100%", left: 0, top: 0, "background-color": "#000000", opacity: 0.7, filter: "alpha(opacity=70)" }); $(".html5boxPlayPause", $videoControls).css({ display: "block", position: "relative", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), float: "left" }); var $videoBtnPlay = $(".html5boxPlay", $videoControls); var $videoBtnPause = $(".html5boxPause", $videoControls); $videoBtnPlay .css( { display: "block", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_playpause.png" + "')", "background-position": "top left", } ) .hover( function () { $(this).css({ "background-position": "bottom left" }); }, function () { $(this).css({ "background-position": "top left" }); } ) .bind( eClick, function () { $videoObj.get(0).play(); } ); $videoBtnPause .css( { display: "none", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_playpause.png" + "')", "background-position": "top right", } ) .hover( function () { $(this).css({ "background-position": "bottom right" }); }, function () { $(this).css({ "background-position": "top right" }); } ) .bind( eClick, function () { $videoObj.get(0).pause(); } ); var $videoTimeCurrent = $(".html5boxTimeCurrent", $videoControls); var $videoTimeTotal = $(".html5boxTimeTotal", $videoControls); var $videoSeeker = $(".html5boxSeeker", $videoControls); var $videoSeekerPlay = $(".html5boxSeekerPlay", $videoControls); var $videoSeekerBuffer = $(".html5boxSeekerBuffer", $videoControls); var $videoSeekerHandler = $(".html5boxSeekerHandler", $videoControls); $videoTimeCurrent.css( { display: "block", position: "relative", float: "left", "line-height": BAR_HEIGHT + "px", "font-weight": "normal", "font-size": "12px", margin: "0 8px", "font-family": "Arial, Helvetica, sans-serif", color: "#fff", } ); $videoTimeTotal.css( { display: "block", position: "relative", float: "right", "line-height": BAR_HEIGHT + "px", "font-weight": "normal", "font-size": "12px", margin: "0 8px", "font-family": "Arial, Helvetica, sans-serif", color: "#fff", } ); $videoSeeker .css({ display: "block", cursor: "pointer", overflow: "hidden", position: "relative", height: "10px", "background-color": "#222", margin: Math.floor((BAR_HEIGHT - 10) / 2) + "px 4px" }) .bind( eStart, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var pos = e0.pageX - $videoSeeker.offset().left; $videoSeekerPlay.css({ width: pos }); $videoObj.get(0).currentTime = (pos * $videoObj.get(0).duration) / $videoSeeker.width(); $videoSeeker.bind( eMove, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var pos = e0.pageX - $videoSeeker.offset().left; $videoSeekerPlay.css({ width: pos }); $videoObj.get(0).currentTime = (pos * $videoObj.get(0).duration) / $videoSeeker.width(); } ); } ) .bind( eCancel, function () { $videoSeeker.unbind(eMove); } ); $videoSeekerBuffer.css({ display: "block", position: "absolute", left: 0, top: 0, height: "100%", "background-color": "#444" }); $videoSeekerPlay.css({ display: "block", position: "absolute", left: 0, top: 0, height: "100%", "background-color": "#fcc500" }); if (!isIPhone && ($videoObj.get(0).requestFullscreen || $videoObj.get(0).webkitRequestFullScreen || $videoObj.get(0).mozRequestFullScreen || $videoObj.get(0).webkitEnterFullScreen || $videoObj.get(0).msRequestFullscreen)) { var switchScreen = function (fullscreen) { if (fullscreen) { if ($videoObj.get(0).requestFullscreen) { $videoObj.get(0).requestFullscreen(); } else if ($videoObj.get(0).webkitRequestFullScreen) { $videoObj.get(0).webkitRequestFullScreen(); } else if ($videoObj.get(0).mozRequestFullScreen) { $videoObj.get(0).mozRequestFullScreen(); } else if ($videoObj.get(0).webkitEnterFullScreen) { $videoObj.get(0).webkitEnterFullScreen(); } if ($videoObj.get(0).msRequestFullscreen) { $videoObj.get(0).msRequestFullscreen(); } } else if (document.cancelFullScreen) { document.cancelFullScreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } }; var switchScreenCSS = function (fullscreen) { $videoControls.css({ position: fullscreen ? "fixed" : "absolute" }); var backgroundPosY = $videoFullscreen.css("background-position") ? $videoFullscreen.css("background-position").split(" ")[1] : $videoFullscreen.css("background-position-y"); $videoFullscreen.css({ "background-position": (fullscreen ? "right" : "left") + " " + backgroundPosY }); $videoFullscreenBg.css({ display: fullscreen ? "block" : "none" }); if (fullscreen) { $(document).bind("mousemove", userActivate); $videoControls.css({ "z-index": 2147483647 }); } else { $(document).unbind("mousemove", userActivate); $videoControls.css({ "z-index": "" }); } }; document.addEventListener( "fullscreenchange", function () { isFullscreen = document.fullscreen; switchScreenCSS(document.fullscreen); }, false ); document.addEventListener( "mozfullscreenchange", function () { isFullscreen = document.mozFullScreen; switchScreenCSS(document.mozFullScreen); }, false ); document.addEventListener( "webkitfullscreenchange", function () { isFullscreen = document.webkitIsFullScreen; switchScreenCSS(document.webkitIsFullScreen); }, false ); $videoObj.get(0).addEventListener( "webkitbeginfullscreen", function () { isFullscreen = true; }, false ); $videoObj.get(0).addEventListener( "webkitendfullscreen", function () { isFullscreen = false; }, false ); $("head").append(""); var $videoFullscreen = $(".html5boxFullscreen", $videoControls); $videoFullscreen .css( { display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_fullscreen.png" + "')", "background-position": "left top", } ) .hover( function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " bottom" }); }, function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " top" }); } ) .bind( eClick, function () { isFullscreen = !isFullscreen; switchScreen(isFullscreen); } ); } if (hd) { var $videoHD = $(".html5boxHD", $videoControls); $videoHD .css( { display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_hd.png" + "')", "background-position": (isHd ? "right" : "left") + " center", } ) .bind( eClick, function () { isHd = !isHd; $(this).css({ "background-position": (isHd ? "right" : "left") + " center" }); parentInst.isHd = isHd; var isPaused = $videoObj.get(0).isPaused; $videoObj.get(0).setAttribute("src", (isHd ? hd : src) + "#t=" + $videoObj.get(0).currentTime); if (!isPaused) { $videoObj.get(0).play(); } else if (!isIPhone) { $videoObj.get(0).pause(); } } ); } $videoObj.get(0).volume = defaultvolume; var volumeSaved = defaultvolume == 0 ? 1 : defaultvolume; var volume = $videoObj.get(0).volume; $videoObj.get(0).volume = volume / 2 + 0.1; if ($videoObj.get(0).volume === volume / 2 + 0.1) { $videoObj.get(0).volume = volume; var $videoVolume = $(".html5boxVolume", $videoControls); var $videoVolumeButton = $(".html5boxVolumeButton", $videoControls); var $videoVolumeBar = $(".html5boxVolumeBar", $videoControls); var $videoVolumeBarBg = $(".html5boxVolumeBarBg", $videoControls); var $videoVolumeBarActive = $(".html5boxVolumeBarActive", $videoControls); $videoVolume.css({ display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2) }).hover( function () { clearTimeout(hideVolumeBarTimeoutId); var volume = $videoObj.get(0).volume; $videoVolumeBarActive.css({ height: Math.round(volume * 100) + "%" }); $videoVolumeBar.show(); }, function () { clearTimeout(hideVolumeBarTimeoutId); hideVolumeBarTimeoutId = setTimeout( function () { $videoVolumeBar.hide(); }, 1e3 ); } ); $videoVolumeButton .css( { display: "block", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_volume.png" + "')", "background-position": "top " + (volume > 0 ? "left" : "right"), } ) .hover( function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " bottom" }); }, function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " top" }); } ) .bind( eClick, function () { var volume = $videoObj.get(0).volume; if (volume > 0) { volumeSaved = volume; volume = 0; } else { volume = volumeSaved; } var backgroundPosY = $(this).css("background-position") ? $(this).css("background-position").split(" ")[1] : $(this).css("background-position-y"); $videoVolumeButton.css({ "background-position": (volume > 0 ? "left" : "right") + " " + backgroundPosY }); $videoObj.get(0).volume = volume; $videoVolumeBarActive.css({ height: Math.round(volume * 100) + "%" }); } ); $videoVolumeBar.css( { display: "none", position: "absolute", left: 4, bottom: "100%", width: 24, height: 80, "margin-bottom": Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), "background-color": "#000000", opacity: 0.7, filter: "alpha(opacity=70)", } ); $videoVolumeBarBg.css({ display: "block", position: "relative", width: 10, height: 68, margin: 7, cursor: "pointer", "background-color": "#222" }); $videoVolumeBarActive.css({ display: "block", position: "absolute", bottom: 0, left: 0, width: "100%", height: "100%", "background-color": "#fcc500" }); $videoVolumeBarBg .bind( eStart, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var vol = 1 - (e0.pageY - $videoVolumeBarBg.offset().top) / $videoVolumeBarBg.height(); vol = vol > 1 ? 1 : 0 > vol ? 0 : vol; $videoVolumeBarActive.css({ height: Math.round(vol * 100) + "%" }); $videoVolumeButton.css({ "background-position": "left " + (vol > 0 ? "top" : "bottom") }); $videoObj.get(0).volume = vol; $videoVolumeBarBg.bind( eMove, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var vol = 1 - (e0.pageY - $videoVolumeBarBg.offset().top) / $videoVolumeBarBg.height(); vol = vol > 1 ? 1 : 0 > vol ? 0 : vol; $videoVolumeBarActive.css({ height: Math.round(vol * 100) + "%" }); $videoVolumeButton.css({ "background-position": "left " + (vol > 0 ? "top" : "bottom") }); $videoObj.get(0).volume = vol; } ); } ) .bind( eCancel, function () { $videoVolumeBarBg.unbind(eMove); } ); } var calcTimeFormat = function (seconds) { var h0 = Math.floor(seconds / 3600); var h = 10 > h0 ? "0" + h0 : h0; var m0 = Math.floor((seconds - h0 * 3600) / 60); var m = 10 > m0 ? "0" + m0 : m0; var s0 = Math.floor(seconds - (h0 * 3600 + m0 * 60)); var s = 10 > s0 ? "0" + s0 : s0; var r = m + ":" + s; if (h0 > 0) { r = h + ":" + r; } return r; }; if (hideplaybutton) { $videoPlay.hide(); } if (hidecontrols) { $videoControls.hide(); } var onVideoPlay = function () { if (!hideplaybutton) { $videoPlay.hide(); } if (!hidecontrols) { $videoBtnPlay.hide(); $videoBtnPause.show(); } }; var onVideoPause = function () { if (!hideplaybutton) { $videoPlay.show(); } if (!hidecontrols) { $videoControls.show(); clearTimeout(hideControlsTimerId); $videoBtnPlay.show(); $videoBtnPause.hide(); } }; var onVideoEnded = function () { $(window).trigger("html5lightbox.videoended"); if (!hideplaybutton) { $videoPlay.show(); } if (!hidecontrols) { $videoControls.show(); clearTimeout(hideControlsTimerId); $videoBtnPlay.show(); $videoBtnPause.hide(); } }; var onVideoUpdate = function () { var curTime = $videoObj.get(0).currentTime; if (curTime) { $videoTimeCurrent.text(calcTimeFormat(curTime)); var duration = $videoObj.get(0).duration; if (duration) { $videoTimeTotal.text(calcTimeFormat(duration)); if (!sliderDragging) { var sliderW = $videoSeeker.width(); var pos = Math.round((sliderW * curTime) / duration); $videoSeekerPlay.css({ width: pos }); $videoSeekerHandler.css({ left: pos }); } } } }; var onVideoProgress = function () { if ($videoObj.get(0).buffered && $videoObj.get(0).buffered.length > 0 && !isNaN($videoObj.get(0).buffered.end(0)) && !isNaN($videoObj.get(0).duration)) { var sliderW = $videoSeeker.width(); $videoSeekerBuffer.css({ width: Math.round((sliderW * $videoObj.get(0).buffered.end(0)) / $videoObj.get(0).duration) }); } }; try { $videoObj.bind("play", onVideoPlay); $videoObj.bind("pause", onVideoPause); $videoObj.bind("ended", onVideoEnded); $videoObj.bind("timeupdate", onVideoUpdate); $videoObj.bind("progress", onVideoProgress); } catch (e) { } }; })(jQuery); jQuery(".tsvg-html5lightbox-149383").html5lightbox149383({},'149383'); jQuery(function() { jQuery('.tsvg-section-149383').fadeIn(); var tsvgFancyHoverInverse149383 = 'Default'; tsvgFancyHoverInverse149383 = tsvgFancyHoverInverse149383 == 'Default' ? false : true; jQuery('.tsvg-fancy-blocks-list-149383 > li').each(function() { jQuery(this).hoverdir({hoverDelay: 50, inverse:tsvgFancyHoverInverse149383}); }); }); clearInterval(tsvgFancyInterval149383); } }, tsvgFancyReference149383 = ( function tsvgFancySameCall149383() { tsvgFancyInterval149383 = setInterval(tsvgFancyIntervalFunction149383, 1000); return tsvgFancySameCall149383; }() );
'); }else{ jQuery('.tsvg-section-149383 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
'); } var svg = document.querySelector('.btn-lg svg'), svgPath = new Proxy({ y: null, smoothing: null }, { set(target, key, value) { target[key] = value; if(target.y !== null && target.smoothing !== null) { svg.innerHTML = getPath(target.y, target.smoothing, null); } return true; }, get(target, key) { return target[key]; } }); svgPath.y = 20; svgPath.smoothing = 0; } } jQuery('.tsvg-section-149383 .btn-lg').click(function (e) { let max_heigth =jQuery('.tsvg-main-content-149383').height(); let main_length = jQuery('.tsvg-main-content-149383 figure ul li').length; tsvgPaginationLoad149383 = 'false'; if(jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-3'||jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-4'||jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5'){ tsvgPaginationLoad149383 = 'true'; } jQuery('.tsvg-main-content-149383').css({'max-height': max_heigth+'px','transition':'unset'}); setTimeout(() => { jQuery('.tsvg-main-content-149383').css({'transition':'max-height 3s ease-in-out','max-height':main_length+'000vh'}); }, 100); tsvgPaginationCreate149383(jQuery('.tsvg-main-content-149383 figure ul li').not('.tsvg-layout-item-show'),0, numberItemsPerPage); if(jQuery('.tsvg-section-149383 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-3'){ jQuery('.tsvg-section-149383 .btn-lg').addClass('animate'); setTimeout(function(){ jQuery('.tsvg-section-149383 .btn-lg').removeClass('animate'); },700); } if(!jQuery('.tsvg-section-149383 .btn-lg').hasClass('loading')&&(jQuery('.tsvg-section-149383 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-4'||jQuery('.tsvg-section-149383 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5')&&jQuery('.tsvg-section-149383 .tsvg-pagination-pages-wrapper svg').length) { jQuery('.tsvg-section-149383 .btn-lg').addClass('loading'); setTimeout(() => { svg.innerHTML = getPath(0, 0, [ [3, 14], [8, 19], [21, 6] ]); }, 1000 / 2); setTimeout(() => { jQuery('.tsvg-section-149383 .btn-lg').removeClass('loading'); if(jQuery('.tsvg-section-149383 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5'){ jQuery('.tsvg-section-149383 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
  • '+load_text+'
'); }else{ jQuery('.tsvg-section-149383 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
'); } }, 2000 ); } }) tsvgPaginationCreate149383(jQuery('.tsvg-section-149383 .tsvg-main-content-149383 figure ul li').not('.tsvg-layout-item-show'),0, numberItemsPerPage) } } function tsvgNewPagination149383(){ var interval_pag_fn_149383 = setInterval(setPagina_149383, 100); function setPagina_149383() { if( typeof(jQuery) != "undefined" && jQuery != null){ if( jQuery('.tsvg-main-content-149383').attr("data-pagination")=='pagination'){ tsvgPaginationGenerate149383(); } if( jQuery('.tsvg-main-content-149383').attr("data-pagination")=='load-more'){ tsvgPaginationGenerate149383(); } clearInterval(interval_pag_fn_149383); } } } tsvgNewPagination149383(); function tsvgPaginationGenerate(){ tsvgPaginationGenerate149383(); } function getPoint(point, i, a, smoothing) { let cp = (current, previous, next, reverse) => { let p = previous || current, n = next || current, o = { length: Math.sqrt(Math.pow(n[0] - p[0], 2) + Math.pow(n[1] - p[1], 2)), angle: Math.atan2(n[1] - p[1], n[0] - p[0]) }, angle = o.angle + (reverse ? Math.PI : 0), length = o.length * smoothing; return [current[0] + Math.cos(angle) * length, current[1] + Math.sin(angle) * length]; }, cps = cp(a[i - 1], a[i - 2], point, false), cpe = cp(point, a[i - 1], a[i + 1], true); return `C ${cps[0]},${cps[1]} ${cpe[0]},${cpe[1]} ${point[0]},${point[1]}`; } function getPath(update, smoothing, pointsNew) { let points = pointsNew ? pointsNew : [ [4, 12], [12, update], [20, 12] ], d = points.reduce((acc, point, i, a) => i === 0 ? `M ${point[0]},${point[1]}` : `${acc} ${getPoint(point, i, a, smoothing)}`, ''); return ``; }

La Fábrica de los sueños (2011-2012)

Terminada la etapa de Ricardo Pérez Asociados empezó la de la agencia Grey España y su doble trabajo de la fábrica de sueños, el primero protagonizado por niños (como durante el sorteo) y el segundo por adultos rodado en Madrid.

" + description + "
" ); } if (inst.options.showplaybutton && TotalSoft_VG_FG_ShSlPlIc == "true" && TotalSoft_GV_FG_PT == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + text + "
" + description + "
" ); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + text + "
" + description + "
" ); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT != "true" && TotalSoft_GV_FG_PD == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + description + "
" ); } if (TotalSoft_GV_FG_PD == "true") { jQuery(".tsvg-fancy-popup-desc").css("display", "block"); } if (TotalSoft_GV_FG_PT == "true") { jQuery(".tsvg-fancy-popup-text").css("display", "inline-block"); } if (TotalSoft_GV_FG_PD != "true") { jQuery(".tsvg-fancy-popup-desc").css("display", "none"); } if (TotalSoft_GV_FG_PT != "true") { jQuery(".tsvg-fancy-popup-text").css("display", "none"); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT != "true" && TotalSoft_GV_FG_PD != "true") { jQuery("#tsvg-fancy-html5-text").css("display", "none"); } } if (inst.options.showdescription && description && description.length > 0) { inst.$text.html(text); } if (inst.options.inGroup && inst.options.showplaybutton) { if (inst.autosliding) { $("#tsvg-fancy-html5-play", inst.$lightbox).hide(); $("#tsvg-fancy-html5-pause", inst.$lightbox).show(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.slideTimeout.start(); inst.autosliding = true; } } else { $("#tsvg-fancy-html5-play", inst.$lightbox).show(); $("#tsvg-fancy-html5-pause", inst.$lightbox).hide(); } $("#tsvg-fancy-html5-play", inst.$lightbox).click( function () { $("#tsvg-fancy-html5-play", inst.$lightbox).hide(); $("#tsvg-fancy-html5-pause", inst.$lightbox).show(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.slideTimeout.start(); inst.autosliding = true; } } ); $("#tsvg-fancy-html5-pause", inst.$lightbox).click( function () { $("#tsvg-fancy-html5-play", inst.$lightbox).show(); $("#tsvg-fancy-html5-pause", inst.$lightbox).hide(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.autosliding = false; } } ); } $("#tsvg-fancy-html5-social", inst.$lightbox).show(); }); (inst.showImage = function (elem, imgW, imgH) { var elemW, elemH; if (elem[ELEM_WIDTH]) { elemW = elem[ELEM_WIDTH]; } else { elemW = imgW; elem[ELEM_WIDTH] = imgW; } if (elem[ELEM_HEIGHT]) { elemH = elem[ELEM_HEIGHT]; } else { elemH = imgH; elem[ELEM_HEIGHT] = imgH; } var sizeObj = inst.calcElemSize({ w: elemW, h: elemH }, inst.options.imagekeepratio); inst.resizeLightbox( sizeObj.w, sizeObj.h, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); var timercode = !inst.options.showtimer || !inst.options.inGroup ? "" : ""; inst.$image.show(); inst.$image.html( "
" + timercode + "
" ); inst.$elem.fadeIn( inst.options.fadespeed, function () { inst.showData(); } ); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }); inst.showSWF = function (elem) { var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); inst.embedFlash($("#tsvg-html5lightbox-swf"), elem[ELEM_HREF], "window", { width: dataW, height: dataH }); inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.showVideo = function (elem) { inst.slideTimeout.stop(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var isHTML5 = false; if (inst.options.isIE678 || elem[ELEM_TYPE] == 8 || (inst.options.isIE9 && inst.options.useflashonie9) || (inst.options.isIE10 && inst.options.useflashonie10) || (inst.options.isIE11 && inst.options.useflashonie11)) { isHTML5 = false; } else if (inst.options.isMobile) { isHTML5 = true; } else if ((inst.options.html5player || !inst.options.flashInstalled) && inst.options.html5VideoSupported) { if ((!inst.options.isFirefox && !inst.options.isOpera) || ((inst.options.isFirefox || inst.options.isOpera) && (elem[ELEM_HREF_OGG] || elem[ELEM_HREF_WEBM]))) { isHTML5 = true; } } if (isHTML5) { var videoSrc = elem[ELEM_HREF]; if (inst.options.isFirefox || inst.options.isOpera || !videoSrc) { videoSrc = elem[ELEM_HREF_WEBM] ? elem[ELEM_HREF_WEBM] : elem[ELEM_HREF_OGG]; } inst.embedHTML5Video($("#tsvg-html5lightbox-video"), videoSrc, inst.options.autoplay, inst.options.loopvideo); } else { var videoFile = elem[ELEM_HREF]; if (videoFile.charAt(0) != "/" && videoFile.substring(0, 5) != "http:" && videoFile.substring(0, 6) != "https:") { videoFile = inst.options.htmlfolder + videoFile; } inst.embedFlash( $("#tsvg-html5lightbox-video"), inst.options.jsfolder + "html5boxplayer.swf", "transparent", { width: dataW, height: dataH, jsobjectname: "html5Lightbox", hidecontrols: inst.options.videohidecontrols ? "1" : "0", hideplaybutton: "0", videofile: videoFile, hdfile: "", ishd: "0", defaultvolume: inst.options.defaultvideovolume, autoplay: inst.options.autoplay ? "1" : "0", loop: inst.options.loopvideo ? "1" : "0", errorcss: ".html5box-error" + inst.options.errorcss, id: 0, } ); } inst.$elem.show(); inst.showData(); } ); }; inst.loadNext = function () { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } }; inst.getYoutubeParams = function (href) { var result = {}; if (0 > href.indexOf("?") ) { return result; } var params = href.substring(href.indexOf("?") + 1).split("&"); for (var i = 0;params.length > i ; i++) { var value = params[i].split("="); if (value && value.length == 2 && value[0].toLowerCase() != "v") { result[value[0].toLowerCase()] = value[1]; } } return result; }; inst.getYoutubeId = function (href) { var youtubeId = ""; var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(shorts\/)|(watch\??v?=?))([^#\&\?]*).*/; var match = href.match(regExp); if (match && match[match.length -1].length == 11) { youtubeId = match[match.length -1]; } return youtubeId; }; inst.prepareYoutubeHref = function (href) { let youtubeId = inst.getYoutubeId(href), protocol = "https:", result = protocol + "//www.youtube.com/embed/" + youtubeId, params = this.getYoutubeParams(href), first = true; for (var key in params) { if (first) { result += "?"; first = false; } else { result += "&"; } result += key + "=" + params[key]; } return result; }; inst.prepareDailymotionHref = function (href) { if (href.match(/\:\/\/.*(dai\.ly)/i)) { var protocol = "https:"; var id = href.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2]; href = protocol + "" + id; } return href; }; inst.showYoutubeVimeo = function (elem) { var tsvg_autoplay = jQuery('.tsvg-main-content-' + id).attr('data-tsvg-autoplay'); inst.slideTimeout.stop(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var href = elem[ELEM_HREF]; var youtubeid = ""; if (elem[ELEM_TYPE] == 3) { youtubeid = inst.getYoutubeId(href); href = inst.prepareYoutubeHref(href); if (tsvg_autoplay == "true") { href += "?autoplay=1&mute=1" } else { href += "?autoplay=0&mute=0" } } if (elem[ELEM_TYPE] == 9) { href = inst.prepareDailymotionHref(href); } if (inst.options.autoplay) { if (elem[ELEM_TYPE] == 4) { if (href.indexOf('player.vimeo.com/video/') > -1) { if (tsvg_autoplay == "true") { href += "?autoplay=1&muted=1"; } } } } if (inst.options.loopvideo) { href += 0 > href.indexOf("?") ? "?" : "&"; switch (elem[ELEM_TYPE]) { case 3: href += "loop=1&playlist=" + youtubeid; break; case 4: case 9: href += "loop=1"; break; case 11: href += "endVideoBehavior=loop"; break; } } if (elem[ELEM_TYPE] == 3 && Totalsoft_FG_ShVAutoPl == "true") { if (0 > href.indexOf("?")) { href += "?wmode=transparent&rel=0&iv_load_policy=3"; } else { href += "&wmode=transparent&rel=0&iv_load_policy=3"; } if (inst.options.videohidecontrols) { href += "&controls=0&showinfo=0"; } href += "&mute=1&enablejsapi=1&origin=" + document.location.protocol + "//" + document.location.hostname; } if (href.indexOf('.mp4') > -1) { let autoplay_bool = tsvg_autoplay == "true" ? "autoplay muted" : ""; $("#tsvg-html5lightbox-video").html(''); } else { $("#tsvg-html5lightbox-video").html(""); } inst.$elem.show(); inst.showData(); if (elem[ELEM_TYPE] == 3 && typeof YT === "object" && typeof YT.Player === "function") { new YT.Player( "html5boxiframevideo", { events: { onStateChange: function (event) { if (event.data == YT.PlayerState.ENDED) { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } }, }, } ); } else if (elem[ELEM_TYPE] == 4 && typeof $f === "function") { var vimeoIframe = $("#html5boxiframevideo")[0]; var vimeoPlayer = $f(vimeoIframe); vimeoPlayer.addEvent( "ready", function () { vimeoPlayer.addEvent( "finish", function (id) { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } ); } ); } } ); }; inst.showPDF = function (elem) { }; inst.showMP3 = function (elem) { }; inst.showDiv = function (elem) { var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : winWidth; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : winH - inst.options.navheight; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, false); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.$loading.hide(); inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var divID = elem[ELEM_HREF]; if ($(divID).length > 0) { $("#tsvg-html5lightbox-div").html($(divID).html()); } else { $("#tsvg-html5lightbox-div").html("
The specified div ID does not exist.
"); } inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.showWeb = function (elem) { var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : winWidth; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : winH - inst.options.navheight; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, false); var tsvgRumbleCheck = elem[ELEM_HREF].indexOf('rumble.com/') > -1 ? 'sandbox="allow-scripts"' : ''; dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.$loading.hide(); inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); $("#tsvg-html5lightbox-web").html(""); inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.scrollBox = function () { }; inst.resizeWindow = function () { if (!inst.currentElem) { return; } if (!inst.options.responsive) { return; } var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); if (inst.options.responsivebarheight) { if (inst.options.smallscreenheight >= winH) { inst.options.barheight = inst.options.barheightonsmallheight; } else { inst.options.barheight = inst.options.barheightoriginal; } if (inst.options.titlestyle == "bottom" && inst.options.barautoheight != "auto") { inst.$elemData.css({ height: inst.options.barheight + "px", "max-height": inst.options.barheight + "px" }); } } var elemW, elemH, keepratio; if (inst.currentElem[ELEM_TYPE] == 7 || inst.currentElem[ELEM_TYPE] == 10) { elemW = inst.currentElem[ELEM_WIDTH] ? inst.currentElem[ELEM_WIDTH] : winWidth; elemH = inst.currentElem[ELEM_HEIGHT] ? inst.currentElem[ELEM_HEIGHT] : winH - inst.options.navheight; keepratio = false; } else { elemW = inst.currentElem[ELEM_WIDTH] ? inst.currentElem[ELEM_WIDTH] : DEFAULT_WIDTH; elemH = inst.currentElem[ELEM_HEIGHT] ? inst.currentElem[ELEM_HEIGHT] : DEFAULT_HEIGHT; if (inst.currentElem[ELEM_TYPE] == 0) { keepratio = inst.options.imagekeepratio; } else { keepratio = true; } } var sizeObj = inst.calcElemSize({ w: elemW, h: elemH }, keepratio); var boxPos = inst.calcBoxPosition(sizeObj.w, sizeObj.h); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } if (inst.options.titlestyle == "inside") { inst.$elemData.css({ width: sizeObj.w + "px" }); } if (0 >= $(".tsvg-fancy-html5-nav").length ) { return; } $(".tsvg-fancy-html5-nav-list").css({ "margin-left": 0 }); var $navMask = $(".tsvg-fancy-html5-nav-mask"); var $navPrev = $(".tsvg-fancy-html5-nav-prev"); var $navNext = $(".tsvg-fancy-html5-nav-next"); var winWidth = $(window).width(); if (winWidth >= inst.options.totalwidth ) { $navMask.css({ width: inst.options.totalwidth + "px" }); $navPrev.hide(); $navNext.hide(); } else { $navMask.css({ width: winWidth - 2 * inst.options.navbuttonwidth + "px" }); $navPrev.show(); $navNext.show(); } }; inst.calcElemSize = function (sizeObj, keepratio) { if (!inst.options.responsive) { return sizeObj; } var winWidth = $(window).width(); winWidth = winWidth ? winWidth : $(document).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); winH = winH ? winH : $(document).height(); if ((inst.options.titlestyle == "left" || inst.options.titlestyle == "right") && winWidth > inst.options.sidetobottomscreenwidth) { sizeObj.w = (sizeObj.w * 100) / inst.options.imagepercentage; } var topmargin = inst.options.navarrowsbottomscreenwidth > $(window).width() ? inst.options.bordertopmarginsmall : inst.options.bordertopmargin; var h0 = winH - inst.options.navheight - 2 * inst.options.bordersize - 2 * topmargin; if (inst.options.titlestyle == "bottom") { h0 -= inst.options.barheight; } if (((inst.options.titlestyle == "left" || inst.options.titlestyle == "right") && inst.options.sidetobottomscreenwidth >= winWidth ) || (inst.options.notkeepratioonsmallheight && inst.options.smallscreenheight >= winH)) { keepratio = false; } if (sizeObj.h > h0) { if (keepratio) { sizeObj.w = Math.round((sizeObj.w * h0) / sizeObj.h); } sizeObj.h = h0; } var w0 = winWidth - 2 * inst.options.bordersize - 2 * inst.options.bordermargin; if ( (inst.options.fullscreenmode && winWidth > inst.options.navarrowsbottomscreenwidth) || (((inst.options.isTouch && inst.options.navarrowsalwaysshowontouch) || inst.options.alwaysshownavarrows) && winWidth > inst.options.navarrowsbottomscreenwidth) ) { w0 -= 64; } if (sizeObj.w > w0) { if (keepratio) { sizeObj.h = Math.round((sizeObj.h * w0) / sizeObj.w); } sizeObj.w = w0; } return sizeObj; }; inst.showData = function () { if (inst.$text.text().length > 0) { inst.$elemData.show(); } if (inst.options.titlestyle == "bottom" || inst.options.titlestyle == "inside") { inst.$lightboxBox.css({ height: "auto" }); } if (inst.$text.text().length > 0 && inst.options.titlestyle == "bottom") { inst.$elemData.css({ "max-height": inst.options.barheight + "px" }); } $("#tsvg-fancy-html5-lightbox-overlay", inst.$lightbox).css({ height: Math.max($(window).height(), $(document).height()) }); $(window).trigger("html5lightbox.lightboxopened"); }; inst.resizeLightbox = function (elemW, elemH, bAnimate, onFinish) { inst.hideNavArrows(); var boxPos = inst.calcBoxPosition(elemW, elemH); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$loading.hide(); inst.$watermark.hide(); if (inst.options.curElem >= inst.options.nextElem) { if (inst.options.onlastitem && window[inst.options.onlastitem] && typeof window[inst.options.onlastitem] == "function") { window[inst.options.onlastitem](inst.currentElem); } } if (inst.options.prevElem >= inst.options.curElem) { if (inst.options.onfirstitem && window[inst.options.onfirstitem] && typeof window[inst.options.onfirstitem] == "function") { window[inst.options.onfirstitem](inst.currentElem); } } if (!inst.options.fullscreenmode && (!inst.options.isTouch || !inst.options.navarrowsalwaysshowontouch) && !inst.options.alwaysshownavarrows) { inst.$elem.bind( "mouseenter mousemove", function () { if ((inst.options.arrowloop && inst.options.prevElem >= 0) || (!inst.options.arrowloop && inst.options.prevElem >= 0 && inst.options.curElem > inst.options.prevElem )) { inst.$prev.fadeIn(); } if ((inst.options.arrowloop && inst.options.nextElem >= 0) || (!inst.options.arrowloop && inst.options.nextElem >= 0 && inst.options.nextElem > inst.options.curElem)) { inst.$next.fadeIn(); } } ); inst.$elem.bind( "mouseleave", function () { inst.$next.fadeOut(); inst.$prev.fadeOut(); } ); } inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { var speed = bAnimate ? inst.options.resizespeed : 0; if (boxW == inst.$lightboxBox.width() && boxH == inst.$lightboxBox.height()) { speed = 0; } inst.$lightboxBox.animate({ width: boxW }, speed).animate( { height: boxH }, speed, function () { inst.onAnimateFinish(onFinish); } ); } else { var speed = bAnimate ? inst.options.resizespeed : 0; if (boxW == inst.$elemWrap.width() && boxH == inst.$elemWrap.height()) { speed = 0; } inst.$lightboxBox.css({ width: boxW, height: "auto", "min-width": boxW - 15 }); inst.$elemWrap.animate({ width: boxW, "min-width": boxW - 15 }, speed).animate( { height: boxH, "min-height": boxH - 15 }, speed, function () { inst.onAnimateFinish(onFinish); } ); } }; inst.onAnimateFinish = function (onFinish) { inst.$loading.show(); inst.$watermark.show(); inst.$close.show(); inst.$elem.css({ "background-color": inst.options.bgcolor }); onFinish(); }; inst.reset = function () { if (inst.options.stamp) { inst.$watermark.hide(); } inst.showing = false; inst.$image.empty(); inst.$text.empty(); inst.$error.hide(); inst.$loading.hide(); inst.$image.hide(); if (inst.options.titlestyle == "bottom" || inst.options.titlestyle == "inside") { inst.$elemData.hide(); } if (!inst.options.fullscreenmode) { inst.$close.hide(); } inst.$elem.css({ "background-color": "" }); }; inst.resetNavigation = function () { inst.options.navheight = 0; $(".tsvg-fancy-html5-nav").remove(); }; inst.finish = function () { if ($("#tsvg-fancy-html5-lightbox-video", inst.$lightbox).length) { $("#tsvg-fancy-html5-lightbox-video", inst.$lightbox).attr("src", ""); } $("head") .find("style") .each( function () { if ($(this).data("creator") == "tsvg-fancy-html5box-html5-lightbox") { $(this).remove(); } } ); inst.slideTimeout.stop(); inst.reset(); inst.resetNavigation(); inst.$lightbox.remove(); $("#tsvg-fancy-html5box-html5-lightbox").remove(); inst.showObjects(); if (inst.options.oncloselightbox && window[inst.options.oncloselightbox] && typeof window[inst.options.oncloselightbox] == "function") { window[inst.options.oncloselightbox](inst.currentElem); } if (inst.onLightboxClosed && typeof inst.onLightboxClosed == "function") { inst.onLightboxClosed(inst.currentElem); } }; inst.pauseSlide = function () { }; inst.playSlide = function () { }; inst.gotoSlide = function (slide) { if (slide == -1) { if (0 > inst.options.nextElem ) { return; } inst.options.curElem = inst.options.nextElem; } else if (slide == -2) { if (0 > inst.options.prevElem ) { return; } inst.options.curElem = inst.options.prevElem; } else if (slide >= 0) { inst.options.curElem = slide; } if (inst.autosliding) { inst.slideTimeout.stop(); } inst.calcNextPrevElem(); inst.reset(); inst.loadCurElem(); }; inst.enableSwipe = function () { inst.$elem.html5lightboxTouchSwipe593554( { preventWebBrowser: false, swipeLeft: function () { inst.gotoSlide(-1); }, swipeRight: function () { inst.gotoSlide(-2); }, } ); }; inst.hideObjects = function () { $("select, embed, object").css({ visibility: "hidden" }); }; inst.showObjects = function () { $("select, embed, object").css({ visibility: "visible" }); }; inst.embedHTML5Video = function ($container, src, autoplay, loopvideo) { let embedVideoPoster = (inst.options.html5videoposter && inst.options.html5videoposter.length > 0 ? "poster='" + inst.options.html5videoposter + "'" : ""), embedVideoControls = (inst.options.nativehtml5controls && !inst.options.videohidecontrols ? " controls='controls'" : ""); $container.html( "
" ); if (!inst.options.nativehtml5controls) { $("video", $container).data("src", src); $("video", $container).lightboxHTML5VideoControls593554(inst.options.skinsfolder, inst, inst.options.videohidecontrols, false, inst.options.defaultvideovolume); } $("video", $container) .unbind("ended") .bind( "ended", function () { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } ); }; inst.embedFlash = function ($container, src, wmode, flashVars) { if (inst.options.flashInstalled) { var htmlOptions = { pluginspage: "", quality: "high", allowFullScreen: "true", allowScriptAccess: "always", type: "application/x-shockwave-flash" }; htmlOptions.width = "100%"; htmlOptions.height = "100%"; htmlOptions.src = src; htmlOptions.flashVars = $.param(flashVars); htmlOptions.wmode = wmode; var htmlString = ""; for (var key in htmlOptions) { htmlString += key + "=" + htmlOptions[key] + " "; } $container.html(""); } else { $container.html( "
The required Adobe Flash Player plugin is not installed

Get Adobe Flash player
" ); } }; inst.checkType = function (href) { if (!href) { return -1; } if (href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)) { return 0; } if (href.match(/[^\.]\.(swf)\s*$/i)) { return 1; } if (href.match(/\.(mp4|m4v|ogv|ogg|webm)(.*)?$/i)) { return 4; } if (href.match(/\:\/\/.*(youtube\.com)/i) || href.match(/\:\/\/.*(youtu\.be)/i)) { return 3; } if (href.match(/\:\/\/.*(vimeo\.com)/i)) { return 4; } if (href.match(/\:\/\/.*(dailymotion\.com)/i) || href.match(/\:\/\/.*(dai\.ly)/i)) { return 9; } if (href.match(/[^\.]\.(pdf)\s*$/i)) { return 5; } if (href.match(/[^\.]\.(mp3)\s*$/i)) { return 6; } if (href.match(/[^\.]\.(flv)\s*$/i)) { return 8; } if (href.match(/\#\w+/i)) { return 10; } if (href.match(/\:\/\/.*(wistia)/i)) { return 11; } return 7; }; inst.getURLParams = function () { var result = {}; var params = window.location.search.substring(1).split("&"); for (var i = 0; params.length > i ; i++) { var value = params[i].split("="); if (value && value.length == 2) { result[value[0].toLowerCase()] = unescape(value[1]); } } return result; }; inst.absoluteUrl = function (href) { var link = document.createElement("a"); link.href = href; return link.protocol + "//" + link.host + link.pathname + link.search + link.hash; }; inst.showLightbox = function (type, href, title, width, height, webm, ogg, thumbnail, description) { inst.options = $.extend(inst.options, inst.defaultoptions); $(window).trigger("html5lightbox.lightboxshow"); inst.init(); inst.reset(); inst.$lightbox.show(); var boxPos = inst.calcBoxPosition(inst.options.loadingwidth, inst.options.loadingheight); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } inst.loadElem(new Array(type, href, title, null, width, height, webm, ogg, thumbnail, description)); }; inst.addItem = function (href, title, group, width, height, webm, ogg, thumbnail, description, mediatype) { type = mediatype && mediatype >= 0 ? mediatype : inst.checkType(href); inst.elemArray.push(new Array(type, href, title, group, width, height, webm, ogg, thumbnail, description)); }; inst.showItem = function (href) { inst.options = $.extend(inst.options, inst.defaultoptions); $(window).trigger("html5lightbox.lightboxshow"); inst.init(); if (0 >= inst.elemArray.length) { return true; } inst.hideObjects(); for (var i = 0; inst.elemArray.length > i; i++) { if (inst.elemArray[i][ELEM_HREF] == href) { break; } } if (i == inst.elemArray.length) { return true; } inst.options.curElem = i; inst.calcNextPrevElem(); inst.reset(); inst.$lightbox.show(); var boxPos = inst.calcBoxPosition(inst.options.loadingwidth, inst.options.loadingheight); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } inst.loadCurElem(); return false; }; inst.unbind("click").click(inst.clickHandler); inst.each( function () { var self = $(this); if (self.data("autoopen")) { setTimeout( function () { self.click(); }, self.data("autoopendelay") ? self.data("autoopendelay") : 0 ); return false; } } ); var urlParams = inst.getURLParams(); if ("html5lightboxshare" in urlParams) { var shareUrl = decodeURIComponent(urlParams["html5lightboxshare"]); var shareLink = $('.tsvg-html5lightbox-593554[href="' + shareUrl + '"]'); if (shareLink.length > 0) { shareLink.click(); } } return inst; }; })(jQuery); (function ($) { $.fn.html5lightboxTouchSwipe593554 = function (options) { var defaults = { preventWebBrowser: false, swipeLeft: null, swipeRight: null, swipeTop: null, swipeBottom: null }; if (options) { $.extend(defaults, options); } return this.each( function () { var startX = -1, startY = -1; var curX = -1, curY = -1; function touchStart(event) { var e = event.originalEvent; if (e.targetTouches.length >= 1) { startX = e.targetTouches[0].pageX; startY = e.targetTouches[0].pageY; } else { touchCancel(event); } } function touchMove(event) { if (defaults.preventWebBrowser) { event.preventDefault(); } var e = event.originalEvent; if (e.targetTouches.length >= 1) { curX = e.targetTouches[0].pageX; curY = e.targetTouches[0].pageY; } else { touchCancel(event); } } function touchEnd(event) { if (curX > 0 || curY > 0) { triggerHandler(); touchCancel(event); } else { touchCancel(event); } } function touchCancel(event) { startX = -1; startY = -1; curX = -1; curY = -1; } function triggerHandler() { if (Math.abs(curX - startX) > Math.abs(curY - startY)) { if (curX > startX) { if (defaults.swipeRight) { defaults.swipeRight.call(); } } else { if (defaults.swipeLeft) { defaults.swipeLeft.call(); } } } else if (curY > startY) { if (defaults.swipeBottom) { defaults.swipeBottom.call(); } } else if (defaults.swipeTop) { defaults.swipeTop.call(); } } try { $(this).bind("touchstart", touchStart); $(this).bind("touchmove", touchMove); $(this).bind("touchend", touchEnd); $(this).bind("touchcancel", touchCancel); } catch (e) { } } ); }; })(jQuery); (function ($) { $.fn.lightboxHTML5VideoControls593554 = function (skinFolder, parentInst, hidecontrols, hideplaybutton, defaultvolume) { var isTouch = "ontouchstart" in window; var eStart = isTouch ? "touchstart" : "mousedown"; var eMove = isTouch ? "touchmove" : "mousemove"; var eCancel = isTouch ? "touchcancel" : "mouseup"; var eClick = "click"; var BUTTON_SIZE = 32; var BAR_HEIGHT = isTouch ? 48 : 36; var hideControlsTimerId = null; var hideVolumeBarTimeoutId = null; var sliderDragging = false; var isFullscreen = false; var userActive = true; var isIPhone = navigator.userAgent.match(/iPod/i) != null || navigator.userAgent.match(/iPhone/i) != null; var isHd = $(this).data("ishd"); var hd = $(this).data("hd"); var src = $(this).data("src"); var $videoObj = $(this); $videoObj.get(0).removeAttribute("controls"); if (isIPhone) { var h = $videoObj.height() - BAR_HEIGHT; $videoObj.css({ height: h }); } var $videoPlay = $("
"); if (!isIPhone) { $videoObj.after($videoPlay); $videoPlay .css( { position: "absolute", top: "50%", left: "50%", display: "block", cursor: "pointer", width: 64, height: 64, "margin-left": -32, "margin-top": -32, "background-image": "url('" + skinFolder + "html5boxplayer_playvideo.png" + "')", "background-position": "center center", "background-repeat": "no-repeat", } ) .bind( eClick, function () { $videoObj.get(0).play(); } ); } var $videoFullscreenBg = $("
"); var $videoControls = $( "
" + "
" + "
" + "
" + "
" + "
" + "
--:--
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
--:--
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" ); $videoObj.after($videoControls); $videoObj.after($videoFullscreenBg); $videoFullscreenBg.css({ display: "none", position: "fixed", left: 0, top: 0, bottom: 0, right: 0, "z-index": 2147483647 }); $videoControls.css({ display: "block", position: "absolute", width: "100%", height: BAR_HEIGHT, left: 0, bottom: 0, right: 0, "max-width": "640px", margin: "0 auto" }); var userActivate = function () { userActive = true; }; $videoObj .bind( eClick, function () { userActive = true; } ) .hover( function () { userActive = true; }, function () { userActive = false; } ); if (!hidecontrols) { setInterval( function () { if (userActive) { $videoControls.show(); userActive = false; clearTimeout(hideControlsTimerId); hideControlsTimerId = setTimeout( function () { if (!$videoObj.get(0).paused) { $videoControls.fadeOut(); } }, 5e3 ); } }, 250 ); } $(".html5boxVideoControlsBg", $videoControls).css({ display: "block", position: "absolute", width: "100%", height: "100%", left: 0, top: 0, "background-color": "#000000", opacity: 0.7, filter: "alpha(opacity=70)" }); $(".html5boxPlayPause", $videoControls).css({ display: "block", position: "relative", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), float: "left" }); var $videoBtnPlay = $(".html5boxPlay", $videoControls); var $videoBtnPause = $(".html5boxPause", $videoControls); $videoBtnPlay .css( { display: "block", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_playpause.png" + "')", "background-position": "top left", } ) .hover( function () { $(this).css({ "background-position": "bottom left" }); }, function () { $(this).css({ "background-position": "top left" }); } ) .bind( eClick, function () { $videoObj.get(0).play(); } ); $videoBtnPause .css( { display: "none", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_playpause.png" + "')", "background-position": "top right", } ) .hover( function () { $(this).css({ "background-position": "bottom right" }); }, function () { $(this).css({ "background-position": "top right" }); } ) .bind( eClick, function () { $videoObj.get(0).pause(); } ); var $videoTimeCurrent = $(".html5boxTimeCurrent", $videoControls); var $videoTimeTotal = $(".html5boxTimeTotal", $videoControls); var $videoSeeker = $(".html5boxSeeker", $videoControls); var $videoSeekerPlay = $(".html5boxSeekerPlay", $videoControls); var $videoSeekerBuffer = $(".html5boxSeekerBuffer", $videoControls); var $videoSeekerHandler = $(".html5boxSeekerHandler", $videoControls); $videoTimeCurrent.css( { display: "block", position: "relative", float: "left", "line-height": BAR_HEIGHT + "px", "font-weight": "normal", "font-size": "12px", margin: "0 8px", "font-family": "Arial, Helvetica, sans-serif", color: "#fff", } ); $videoTimeTotal.css( { display: "block", position: "relative", float: "right", "line-height": BAR_HEIGHT + "px", "font-weight": "normal", "font-size": "12px", margin: "0 8px", "font-family": "Arial, Helvetica, sans-serif", color: "#fff", } ); $videoSeeker .css({ display: "block", cursor: "pointer", overflow: "hidden", position: "relative", height: "10px", "background-color": "#222", margin: Math.floor((BAR_HEIGHT - 10) / 2) + "px 4px" }) .bind( eStart, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var pos = e0.pageX - $videoSeeker.offset().left; $videoSeekerPlay.css({ width: pos }); $videoObj.get(0).currentTime = (pos * $videoObj.get(0).duration) / $videoSeeker.width(); $videoSeeker.bind( eMove, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var pos = e0.pageX - $videoSeeker.offset().left; $videoSeekerPlay.css({ width: pos }); $videoObj.get(0).currentTime = (pos * $videoObj.get(0).duration) / $videoSeeker.width(); } ); } ) .bind( eCancel, function () { $videoSeeker.unbind(eMove); } ); $videoSeekerBuffer.css({ display: "block", position: "absolute", left: 0, top: 0, height: "100%", "background-color": "#444" }); $videoSeekerPlay.css({ display: "block", position: "absolute", left: 0, top: 0, height: "100%", "background-color": "#fcc500" }); if (!isIPhone && ($videoObj.get(0).requestFullscreen || $videoObj.get(0).webkitRequestFullScreen || $videoObj.get(0).mozRequestFullScreen || $videoObj.get(0).webkitEnterFullScreen || $videoObj.get(0).msRequestFullscreen)) { var switchScreen = function (fullscreen) { if (fullscreen) { if ($videoObj.get(0).requestFullscreen) { $videoObj.get(0).requestFullscreen(); } else if ($videoObj.get(0).webkitRequestFullScreen) { $videoObj.get(0).webkitRequestFullScreen(); } else if ($videoObj.get(0).mozRequestFullScreen) { $videoObj.get(0).mozRequestFullScreen(); } else if ($videoObj.get(0).webkitEnterFullScreen) { $videoObj.get(0).webkitEnterFullScreen(); } if ($videoObj.get(0).msRequestFullscreen) { $videoObj.get(0).msRequestFullscreen(); } } else if (document.cancelFullScreen) { document.cancelFullScreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } }; var switchScreenCSS = function (fullscreen) { $videoControls.css({ position: fullscreen ? "fixed" : "absolute" }); var backgroundPosY = $videoFullscreen.css("background-position") ? $videoFullscreen.css("background-position").split(" ")[1] : $videoFullscreen.css("background-position-y"); $videoFullscreen.css({ "background-position": (fullscreen ? "right" : "left") + " " + backgroundPosY }); $videoFullscreenBg.css({ display: fullscreen ? "block" : "none" }); if (fullscreen) { $(document).bind("mousemove", userActivate); $videoControls.css({ "z-index": 2147483647 }); } else { $(document).unbind("mousemove", userActivate); $videoControls.css({ "z-index": "" }); } }; document.addEventListener( "fullscreenchange", function () { isFullscreen = document.fullscreen; switchScreenCSS(document.fullscreen); }, false ); document.addEventListener( "mozfullscreenchange", function () { isFullscreen = document.mozFullScreen; switchScreenCSS(document.mozFullScreen); }, false ); document.addEventListener( "webkitfullscreenchange", function () { isFullscreen = document.webkitIsFullScreen; switchScreenCSS(document.webkitIsFullScreen); }, false ); $videoObj.get(0).addEventListener( "webkitbeginfullscreen", function () { isFullscreen = true; }, false ); $videoObj.get(0).addEventListener( "webkitendfullscreen", function () { isFullscreen = false; }, false ); $("head").append(""); var $videoFullscreen = $(".html5boxFullscreen", $videoControls); $videoFullscreen .css( { display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_fullscreen.png" + "')", "background-position": "left top", } ) .hover( function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " bottom" }); }, function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " top" }); } ) .bind( eClick, function () { isFullscreen = !isFullscreen; switchScreen(isFullscreen); } ); } if (hd) { var $videoHD = $(".html5boxHD", $videoControls); $videoHD .css( { display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_hd.png" + "')", "background-position": (isHd ? "right" : "left") + " center", } ) .bind( eClick, function () { isHd = !isHd; $(this).css({ "background-position": (isHd ? "right" : "left") + " center" }); parentInst.isHd = isHd; var isPaused = $videoObj.get(0).isPaused; $videoObj.get(0).setAttribute("src", (isHd ? hd : src) + "#t=" + $videoObj.get(0).currentTime); if (!isPaused) { $videoObj.get(0).play(); } else if (!isIPhone) { $videoObj.get(0).pause(); } } ); } $videoObj.get(0).volume = defaultvolume; var volumeSaved = defaultvolume == 0 ? 1 : defaultvolume; var volume = $videoObj.get(0).volume; $videoObj.get(0).volume = volume / 2 + 0.1; if ($videoObj.get(0).volume === volume / 2 + 0.1) { $videoObj.get(0).volume = volume; var $videoVolume = $(".html5boxVolume", $videoControls); var $videoVolumeButton = $(".html5boxVolumeButton", $videoControls); var $videoVolumeBar = $(".html5boxVolumeBar", $videoControls); var $videoVolumeBarBg = $(".html5boxVolumeBarBg", $videoControls); var $videoVolumeBarActive = $(".html5boxVolumeBarActive", $videoControls); $videoVolume.css({ display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2) }).hover( function () { clearTimeout(hideVolumeBarTimeoutId); var volume = $videoObj.get(0).volume; $videoVolumeBarActive.css({ height: Math.round(volume * 100) + "%" }); $videoVolumeBar.show(); }, function () { clearTimeout(hideVolumeBarTimeoutId); hideVolumeBarTimeoutId = setTimeout( function () { $videoVolumeBar.hide(); }, 1e3 ); } ); $videoVolumeButton .css( { display: "block", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_volume.png" + "')", "background-position": "top " + (volume > 0 ? "left" : "right"), } ) .hover( function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " bottom" }); }, function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " top" }); } ) .bind( eClick, function () { var volume = $videoObj.get(0).volume; if (volume > 0) { volumeSaved = volume; volume = 0; } else { volume = volumeSaved; } var backgroundPosY = $(this).css("background-position") ? $(this).css("background-position").split(" ")[1] : $(this).css("background-position-y"); $videoVolumeButton.css({ "background-position": (volume > 0 ? "left" : "right") + " " + backgroundPosY }); $videoObj.get(0).volume = volume; $videoVolumeBarActive.css({ height: Math.round(volume * 100) + "%" }); } ); $videoVolumeBar.css( { display: "none", position: "absolute", left: 4, bottom: "100%", width: 24, height: 80, "margin-bottom": Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), "background-color": "#000000", opacity: 0.7, filter: "alpha(opacity=70)", } ); $videoVolumeBarBg.css({ display: "block", position: "relative", width: 10, height: 68, margin: 7, cursor: "pointer", "background-color": "#222" }); $videoVolumeBarActive.css({ display: "block", position: "absolute", bottom: 0, left: 0, width: "100%", height: "100%", "background-color": "#fcc500" }); $videoVolumeBarBg .bind( eStart, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var vol = 1 - (e0.pageY - $videoVolumeBarBg.offset().top) / $videoVolumeBarBg.height(); vol = vol > 1 ? 1 : 0 > vol ? 0 : vol; $videoVolumeBarActive.css({ height: Math.round(vol * 100) + "%" }); $videoVolumeButton.css({ "background-position": "left " + (vol > 0 ? "top" : "bottom") }); $videoObj.get(0).volume = vol; $videoVolumeBarBg.bind( eMove, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var vol = 1 - (e0.pageY - $videoVolumeBarBg.offset().top) / $videoVolumeBarBg.height(); vol = vol > 1 ? 1 : 0 > vol ? 0 : vol; $videoVolumeBarActive.css({ height: Math.round(vol * 100) + "%" }); $videoVolumeButton.css({ "background-position": "left " + (vol > 0 ? "top" : "bottom") }); $videoObj.get(0).volume = vol; } ); } ) .bind( eCancel, function () { $videoVolumeBarBg.unbind(eMove); } ); } var calcTimeFormat = function (seconds) { var h0 = Math.floor(seconds / 3600); var h = 10 > h0 ? "0" + h0 : h0; var m0 = Math.floor((seconds - h0 * 3600) / 60); var m = 10 > m0 ? "0" + m0 : m0; var s0 = Math.floor(seconds - (h0 * 3600 + m0 * 60)); var s = 10 > s0 ? "0" + s0 : s0; var r = m + ":" + s; if (h0 > 0) { r = h + ":" + r; } return r; }; if (hideplaybutton) { $videoPlay.hide(); } if (hidecontrols) { $videoControls.hide(); } var onVideoPlay = function () { if (!hideplaybutton) { $videoPlay.hide(); } if (!hidecontrols) { $videoBtnPlay.hide(); $videoBtnPause.show(); } }; var onVideoPause = function () { if (!hideplaybutton) { $videoPlay.show(); } if (!hidecontrols) { $videoControls.show(); clearTimeout(hideControlsTimerId); $videoBtnPlay.show(); $videoBtnPause.hide(); } }; var onVideoEnded = function () { $(window).trigger("html5lightbox.videoended"); if (!hideplaybutton) { $videoPlay.show(); } if (!hidecontrols) { $videoControls.show(); clearTimeout(hideControlsTimerId); $videoBtnPlay.show(); $videoBtnPause.hide(); } }; var onVideoUpdate = function () { var curTime = $videoObj.get(0).currentTime; if (curTime) { $videoTimeCurrent.text(calcTimeFormat(curTime)); var duration = $videoObj.get(0).duration; if (duration) { $videoTimeTotal.text(calcTimeFormat(duration)); if (!sliderDragging) { var sliderW = $videoSeeker.width(); var pos = Math.round((sliderW * curTime) / duration); $videoSeekerPlay.css({ width: pos }); $videoSeekerHandler.css({ left: pos }); } } } }; var onVideoProgress = function () { if ($videoObj.get(0).buffered && $videoObj.get(0).buffered.length > 0 && !isNaN($videoObj.get(0).buffered.end(0)) && !isNaN($videoObj.get(0).duration)) { var sliderW = $videoSeeker.width(); $videoSeekerBuffer.css({ width: Math.round((sliderW * $videoObj.get(0).buffered.end(0)) / $videoObj.get(0).duration) }); } }; try { $videoObj.bind("play", onVideoPlay); $videoObj.bind("pause", onVideoPause); $videoObj.bind("ended", onVideoEnded); $videoObj.bind("timeupdate", onVideoUpdate); $videoObj.bind("progress", onVideoProgress); } catch (e) { } }; })(jQuery); jQuery(".tsvg-html5lightbox-593554").html5lightbox593554({},'593554'); jQuery(function() { jQuery('.tsvg-section-593554').fadeIn(); var tsvgFancyHoverInverse593554 = 'Default'; tsvgFancyHoverInverse593554 = tsvgFancyHoverInverse593554 == 'Default' ? false : true; jQuery('.tsvg-fancy-blocks-list-593554 > li').each(function() { jQuery(this).hoverdir({hoverDelay: 50, inverse:tsvgFancyHoverInverse593554}); }); }); clearInterval(tsvgFancyInterval593554); } }, tsvgFancyReference593554 = ( function tsvgFancySameCall593554() { tsvgFancyInterval593554 = setInterval(tsvgFancyIntervalFunction593554, 1000); return tsvgFancySameCall593554; }() );
'); }else{ jQuery('.tsvg-section-593554 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
'); } var svg = document.querySelector('.btn-lg svg'), svgPath = new Proxy({ y: null, smoothing: null }, { set(target, key, value) { target[key] = value; if(target.y !== null && target.smoothing !== null) { svg.innerHTML = getPath(target.y, target.smoothing, null); } return true; }, get(target, key) { return target[key]; } }); svgPath.y = 20; svgPath.smoothing = 0; } } jQuery('.tsvg-section-593554 .btn-lg').click(function (e) { let max_heigth =jQuery('.tsvg-main-content-593554').height(); let main_length = jQuery('.tsvg-main-content-593554 figure ul li').length; tsvgPaginationLoad593554 = 'false'; if(jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-3'||jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-4'||jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5'){ tsvgPaginationLoad593554 = 'true'; } jQuery('.tsvg-main-content-593554').css({'max-height': max_heigth+'px','transition':'unset'}); setTimeout(() => { jQuery('.tsvg-main-content-593554').css({'transition':'max-height 3s ease-in-out','max-height':main_length+'000vh'}); }, 100); tsvgPaginationCreate593554(jQuery('.tsvg-main-content-593554 figure ul li').not('.tsvg-layout-item-show'),0, numberItemsPerPage); if(jQuery('.tsvg-section-593554 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-3'){ jQuery('.tsvg-section-593554 .btn-lg').addClass('animate'); setTimeout(function(){ jQuery('.tsvg-section-593554 .btn-lg').removeClass('animate'); },700); } if(!jQuery('.tsvg-section-593554 .btn-lg').hasClass('loading')&&(jQuery('.tsvg-section-593554 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-4'||jQuery('.tsvg-section-593554 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5')&&jQuery('.tsvg-section-593554 .tsvg-pagination-pages-wrapper svg').length) { jQuery('.tsvg-section-593554 .btn-lg').addClass('loading'); setTimeout(() => { svg.innerHTML = getPath(0, 0, [ [3, 14], [8, 19], [21, 6] ]); }, 1000 / 2); setTimeout(() => { jQuery('.tsvg-section-593554 .btn-lg').removeClass('loading'); if(jQuery('.tsvg-section-593554 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5'){ jQuery('.tsvg-section-593554 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
  • '+load_text+'
'); }else{ jQuery('.tsvg-section-593554 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
'); } }, 2000 ); } }) tsvgPaginationCreate593554(jQuery('.tsvg-section-593554 .tsvg-main-content-593554 figure ul li').not('.tsvg-layout-item-show'),0, numberItemsPerPage) } } function tsvgNewPagination593554(){ var interval_pag_fn_593554 = setInterval(setPagina_593554, 100); function setPagina_593554() { if( typeof(jQuery) != "undefined" && jQuery != null){ if( jQuery('.tsvg-main-content-593554').attr("data-pagination")=='pagination'){ tsvgPaginationGenerate593554(); } if( jQuery('.tsvg-main-content-593554').attr("data-pagination")=='load-more'){ tsvgPaginationGenerate593554(); } clearInterval(interval_pag_fn_593554); } } } tsvgNewPagination593554(); function tsvgPaginationGenerate(){ tsvgPaginationGenerate593554(); } function getPoint(point, i, a, smoothing) { let cp = (current, previous, next, reverse) => { let p = previous || current, n = next || current, o = { length: Math.sqrt(Math.pow(n[0] - p[0], 2) + Math.pow(n[1] - p[1], 2)), angle: Math.atan2(n[1] - p[1], n[0] - p[0]) }, angle = o.angle + (reverse ? Math.PI : 0), length = o.length * smoothing; return [current[0] + Math.cos(angle) * length, current[1] + Math.sin(angle) * length]; }, cps = cp(a[i - 1], a[i - 2], point, false), cpe = cp(point, a[i - 1], a[i + 1], true); return `C ${cps[0]},${cps[1]} ${cpe[0]},${cpe[1]} ${point[0]},${point[1]}`; } function getPath(update, smoothing, pointsNew) { let points = pointsNew ? pointsNew : [ [4, 12], [12, update], [20, 12] ], d = points.reduce((acc, point, i, a) => i === 0 ? `M ${point[0]},${point[1]}` : `${acc} ${getPoint(point, i, a, smoothing)}`, ''); return ``; }

Pon tus sueños a jugar (2013)

Y llegamos al año más polémico de todos. En anuncio del 2013 fue dirigido por Pablo Berger con la agencia Tactics y protagonizado por Montserrat Caballé, Raphael, David Bustamante, Marta Sánchez y Niña Pastori. Quién no se acuerda de este anuncio…

Anuncio Lotería Navidad 2013

El mayor premio es compartirlo

Esta campaña se convirtió en la campaña más viral de la publicidad española, incrementando en 110 millones de euros las ventas tras 6 años de pérdidas con un total de 123 millones de décimos vendidos y generando más conversación que la coronación del Rey Felipe VI en 2014. Pero es que, el resto de años, las ventas siguieron en aumento. No es de extrañar que la mantengan.

Anuncios de loterías de Navidad

El bar de Antonio (2014)

El cineasta Santiago Zannou junto con la agencia Leo Burnett fueron los encargados de levantar el sentimiento emotivo de la campaña navideña de Loterías y Apuestas del Estado y se marcaron un dramón entre el dueño del bar Antonio y su cliente Manuel. Además, S. Zannou también dirigió otras 8 historias relacionadas

Teniendo en cuenta que en España viven 46 millones de habitantes incluyendo niños, salimos a más de 2,6 décimos por persona aunque sea un bebé. Siendo más realistas, si eliminamos de la ecuación a los menores de 15 años (de 0 a 14 pocos décimos comprarán) salimos a más de 3,16 décimos por persona. Una auténtica locura.

La canción de fondo de todas las historias es Glacier de James Vincent Mcmorrow

Anuncio Lotería Navidad 2014

Las 8 historias relacionadas del anuncio de Lotería de Navidad 2014:

" + description + "
" ); } if (inst.options.showplaybutton && TotalSoft_VG_FG_ShSlPlIc == "true" && TotalSoft_GV_FG_PT == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + text + "
" + description + "
" ); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + text + "
" + description + "
" ); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT != "true" && TotalSoft_GV_FG_PD == "true") { jQuery("#tsvg-fancy-html5-elem-data-box") .css("display", "inline-block") .html( "
" + description + "
" ); } if (TotalSoft_GV_FG_PD == "true") { jQuery(".tsvg-fancy-popup-desc").css("display", "block"); } if (TotalSoft_GV_FG_PT == "true") { jQuery(".tsvg-fancy-popup-text").css("display", "inline-block"); } if (TotalSoft_GV_FG_PD != "true") { jQuery(".tsvg-fancy-popup-desc").css("display", "none"); } if (TotalSoft_GV_FG_PT != "true") { jQuery(".tsvg-fancy-popup-text").css("display", "none"); } if (TotalSoft_VG_FG_ShSlPlIc != "true" && TotalSoft_GV_FG_PT != "true" && TotalSoft_GV_FG_PD != "true") { jQuery("#tsvg-fancy-html5-text").css("display", "none"); } } if (inst.options.showdescription && description && description.length > 0) { inst.$text.html(text); } if (inst.options.inGroup && inst.options.showplaybutton) { if (inst.autosliding) { $("#tsvg-fancy-html5-play", inst.$lightbox).hide(); $("#tsvg-fancy-html5-pause", inst.$lightbox).show(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.slideTimeout.start(); inst.autosliding = true; } } else { $("#tsvg-fancy-html5-play", inst.$lightbox).show(); $("#tsvg-fancy-html5-pause", inst.$lightbox).hide(); } $("#tsvg-fancy-html5-play", inst.$lightbox).click( function () { $("#tsvg-fancy-html5-play", inst.$lightbox).hide(); $("#tsvg-fancy-html5-pause", inst.$lightbox).show(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.slideTimeout.start(); inst.autosliding = true; } } ); $("#tsvg-fancy-html5-pause", inst.$lightbox).click( function () { $("#tsvg-fancy-html5-play", inst.$lightbox).show(); $("#tsvg-fancy-html5-pause", inst.$lightbox).hide(); if (inst.slideTimeout) { inst.slideTimeout.stop(); inst.autosliding = false; } } ); } $("#tsvg-fancy-html5-social", inst.$lightbox).show(); }); (inst.showImage = function (elem, imgW, imgH) { var elemW, elemH; if (elem[ELEM_WIDTH]) { elemW = elem[ELEM_WIDTH]; } else { elemW = imgW; elem[ELEM_WIDTH] = imgW; } if (elem[ELEM_HEIGHT]) { elemH = elem[ELEM_HEIGHT]; } else { elemH = imgH; elem[ELEM_HEIGHT] = imgH; } var sizeObj = inst.calcElemSize({ w: elemW, h: elemH }, inst.options.imagekeepratio); inst.resizeLightbox( sizeObj.w, sizeObj.h, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); var timercode = !inst.options.showtimer || !inst.options.inGroup ? "" : ""; inst.$image.show(); inst.$image.html( "
" + timercode + "
" ); inst.$elem.fadeIn( inst.options.fadespeed, function () { inst.showData(); } ); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }); inst.showSWF = function (elem) { var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); inst.embedFlash($("#tsvg-html5lightbox-swf"), elem[ELEM_HREF], "window", { width: dataW, height: dataH }); inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.showVideo = function (elem) { inst.slideTimeout.stop(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var isHTML5 = false; if (inst.options.isIE678 || elem[ELEM_TYPE] == 8 || (inst.options.isIE9 && inst.options.useflashonie9) || (inst.options.isIE10 && inst.options.useflashonie10) || (inst.options.isIE11 && inst.options.useflashonie11)) { isHTML5 = false; } else if (inst.options.isMobile) { isHTML5 = true; } else if ((inst.options.html5player || !inst.options.flashInstalled) && inst.options.html5VideoSupported) { if ((!inst.options.isFirefox && !inst.options.isOpera) || ((inst.options.isFirefox || inst.options.isOpera) && (elem[ELEM_HREF_OGG] || elem[ELEM_HREF_WEBM]))) { isHTML5 = true; } } if (isHTML5) { var videoSrc = elem[ELEM_HREF]; if (inst.options.isFirefox || inst.options.isOpera || !videoSrc) { videoSrc = elem[ELEM_HREF_WEBM] ? elem[ELEM_HREF_WEBM] : elem[ELEM_HREF_OGG]; } inst.embedHTML5Video($("#tsvg-html5lightbox-video"), videoSrc, inst.options.autoplay, inst.options.loopvideo); } else { var videoFile = elem[ELEM_HREF]; if (videoFile.charAt(0) != "/" && videoFile.substring(0, 5) != "http:" && videoFile.substring(0, 6) != "https:") { videoFile = inst.options.htmlfolder + videoFile; } inst.embedFlash( $("#tsvg-html5lightbox-video"), inst.options.jsfolder + "html5boxplayer.swf", "transparent", { width: dataW, height: dataH, jsobjectname: "html5Lightbox", hidecontrols: inst.options.videohidecontrols ? "1" : "0", hideplaybutton: "0", videofile: videoFile, hdfile: "", ishd: "0", defaultvolume: inst.options.defaultvideovolume, autoplay: inst.options.autoplay ? "1" : "0", loop: inst.options.loopvideo ? "1" : "0", errorcss: ".html5box-error" + inst.options.errorcss, id: 0, } ); } inst.$elem.show(); inst.showData(); } ); }; inst.loadNext = function () { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } }; inst.getYoutubeParams = function (href) { var result = {}; if (0 > href.indexOf("?") ) { return result; } var params = href.substring(href.indexOf("?") + 1).split("&"); for (var i = 0;params.length > i ; i++) { var value = params[i].split("="); if (value && value.length == 2 && value[0].toLowerCase() != "v") { result[value[0].toLowerCase()] = value[1]; } } return result; }; inst.getYoutubeId = function (href) { var youtubeId = ""; var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(shorts\/)|(watch\??v?=?))([^#\&\?]*).*/; var match = href.match(regExp); if (match && match[match.length -1].length == 11) { youtubeId = match[match.length -1]; } return youtubeId; }; inst.prepareYoutubeHref = function (href) { let youtubeId = inst.getYoutubeId(href), protocol = "https:", result = protocol + "//www.youtube.com/embed/" + youtubeId, params = this.getYoutubeParams(href), first = true; for (var key in params) { if (first) { result += "?"; first = false; } else { result += "&"; } result += key + "=" + params[key]; } return result; }; inst.prepareDailymotionHref = function (href) { if (href.match(/\:\/\/.*(dai\.ly)/i)) { var protocol = "https:"; var id = href.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2]; href = protocol + "" + id; } return href; }; inst.showYoutubeVimeo = function (elem) { var tsvg_autoplay = jQuery('.tsvg-main-content-' + id).attr('data-tsvg-autoplay'); inst.slideTimeout.stop(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : DEFAULT_WIDTH; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : DEFAULT_HEIGHT; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, true); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var href = elem[ELEM_HREF]; var youtubeid = ""; if (elem[ELEM_TYPE] == 3) { youtubeid = inst.getYoutubeId(href); href = inst.prepareYoutubeHref(href); if (tsvg_autoplay == "true") { href += "?autoplay=1&mute=1" } else { href += "?autoplay=0&mute=0" } } if (elem[ELEM_TYPE] == 9) { href = inst.prepareDailymotionHref(href); } if (inst.options.autoplay) { if (elem[ELEM_TYPE] == 4) { if (href.indexOf('player.vimeo.com/video/') > -1) { if (tsvg_autoplay == "true") { href += "?autoplay=1&muted=1"; } } } } if (inst.options.loopvideo) { href += 0 > href.indexOf("?") ? "?" : "&"; switch (elem[ELEM_TYPE]) { case 3: href += "loop=1&playlist=" + youtubeid; break; case 4: case 9: href += "loop=1"; break; case 11: href += "endVideoBehavior=loop"; break; } } if (elem[ELEM_TYPE] == 3 && Totalsoft_FG_ShVAutoPl == "true") { if (0 > href.indexOf("?")) { href += "?wmode=transparent&rel=0&iv_load_policy=3"; } else { href += "&wmode=transparent&rel=0&iv_load_policy=3"; } if (inst.options.videohidecontrols) { href += "&controls=0&showinfo=0"; } href += "&mute=1&enablejsapi=1&origin=" + document.location.protocol + "//" + document.location.hostname; } if (href.indexOf('.mp4') > -1) { let autoplay_bool = tsvg_autoplay == "true" ? "autoplay muted" : ""; $("#tsvg-html5lightbox-video").html(''); } else { $("#tsvg-html5lightbox-video").html(""); } inst.$elem.show(); inst.showData(); if (elem[ELEM_TYPE] == 3 && typeof YT === "object" && typeof YT.Player === "function") { new YT.Player( "html5boxiframevideo", { events: { onStateChange: function (event) { if (event.data == YT.PlayerState.ENDED) { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } }, }, } ); } else if (elem[ELEM_TYPE] == 4 && typeof $f === "function") { var vimeoIframe = $("#html5boxiframevideo")[0]; var vimeoPlayer = $f(vimeoIframe); vimeoPlayer.addEvent( "ready", function () { vimeoPlayer.addEvent( "finish", function (id) { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } ); } ); } } ); }; inst.showPDF = function (elem) { }; inst.showMP3 = function (elem) { }; inst.showDiv = function (elem) { var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : winWidth; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : winH - inst.options.navheight; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, false); dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.$loading.hide(); inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); var divID = elem[ELEM_HREF]; if ($(divID).length > 0) { $("#tsvg-html5lightbox-div").html($(divID).html()); } else { $("#tsvg-html5lightbox-div").html("
The specified div ID does not exist.
"); } inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.showWeb = function (elem) { var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); var dataW = elem[ELEM_WIDTH] ? elem[ELEM_WIDTH] : winWidth; var dataH = elem[ELEM_HEIGHT] ? elem[ELEM_HEIGHT] : winH - inst.options.navheight; var sizeObj = inst.calcElemSize({ w: dataW, h: dataH }, false); var tsvgRumbleCheck = elem[ELEM_HREF].indexOf('rumble.com/') > -1 ? 'sandbox="allow-scripts"' : ''; dataW = sizeObj.w; dataH = sizeObj.h; inst.resizeLightbox( dataW, dataH, true, function () { inst.$loading.hide(); inst.showTitle(sizeObj.w, elem[ELEM_TITLE], elem[ELEM_DESCRIPTION]); inst.$image.html("
").show(); $("#tsvg-html5lightbox-web").html(""); inst.$elem.show(); inst.showData(); if (inst.autosliding) { inst.slideTimeout.stop(); inst.slideTimeout.start(); } } ); }; inst.scrollBox = function () { }; inst.resizeWindow = function () { if (!inst.currentElem) { return; } if (!inst.options.responsive) { return; } var winWidth = $(window).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); if (inst.options.responsivebarheight) { if (inst.options.smallscreenheight >= winH) { inst.options.barheight = inst.options.barheightonsmallheight; } else { inst.options.barheight = inst.options.barheightoriginal; } if (inst.options.titlestyle == "bottom" && inst.options.barautoheight != "auto") { inst.$elemData.css({ height: inst.options.barheight + "px", "max-height": inst.options.barheight + "px" }); } } var elemW, elemH, keepratio; if (inst.currentElem[ELEM_TYPE] == 7 || inst.currentElem[ELEM_TYPE] == 10) { elemW = inst.currentElem[ELEM_WIDTH] ? inst.currentElem[ELEM_WIDTH] : winWidth; elemH = inst.currentElem[ELEM_HEIGHT] ? inst.currentElem[ELEM_HEIGHT] : winH - inst.options.navheight; keepratio = false; } else { elemW = inst.currentElem[ELEM_WIDTH] ? inst.currentElem[ELEM_WIDTH] : DEFAULT_WIDTH; elemH = inst.currentElem[ELEM_HEIGHT] ? inst.currentElem[ELEM_HEIGHT] : DEFAULT_HEIGHT; if (inst.currentElem[ELEM_TYPE] == 0) { keepratio = inst.options.imagekeepratio; } else { keepratio = true; } } var sizeObj = inst.calcElemSize({ w: elemW, h: elemH }, keepratio); var boxPos = inst.calcBoxPosition(sizeObj.w, sizeObj.h); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } if (inst.options.titlestyle == "inside") { inst.$elemData.css({ width: sizeObj.w + "px" }); } if (0 >= $(".tsvg-fancy-html5-nav").length ) { return; } $(".tsvg-fancy-html5-nav-list").css({ "margin-left": 0 }); var $navMask = $(".tsvg-fancy-html5-nav-mask"); var $navPrev = $(".tsvg-fancy-html5-nav-prev"); var $navNext = $(".tsvg-fancy-html5-nav-next"); var winWidth = $(window).width(); if (winWidth >= inst.options.totalwidth ) { $navMask.css({ width: inst.options.totalwidth + "px" }); $navPrev.hide(); $navNext.hide(); } else { $navMask.css({ width: winWidth - 2 * inst.options.navbuttonwidth + "px" }); $navPrev.show(); $navNext.show(); } }; inst.calcElemSize = function (sizeObj, keepratio) { if (!inst.options.responsive) { return sizeObj; } var winWidth = $(window).width(); winWidth = winWidth ? winWidth : $(document).width(); var winH = window.innerHeight ? window.innerHeight : $(window).height(); winH = winH ? winH : $(document).height(); if ((inst.options.titlestyle == "left" || inst.options.titlestyle == "right") && winWidth > inst.options.sidetobottomscreenwidth) { sizeObj.w = (sizeObj.w * 100) / inst.options.imagepercentage; } var topmargin = inst.options.navarrowsbottomscreenwidth > $(window).width() ? inst.options.bordertopmarginsmall : inst.options.bordertopmargin; var h0 = winH - inst.options.navheight - 2 * inst.options.bordersize - 2 * topmargin; if (inst.options.titlestyle == "bottom") { h0 -= inst.options.barheight; } if (((inst.options.titlestyle == "left" || inst.options.titlestyle == "right") && inst.options.sidetobottomscreenwidth >= winWidth ) || (inst.options.notkeepratioonsmallheight && inst.options.smallscreenheight >= winH)) { keepratio = false; } if (sizeObj.h > h0) { if (keepratio) { sizeObj.w = Math.round((sizeObj.w * h0) / sizeObj.h); } sizeObj.h = h0; } var w0 = winWidth - 2 * inst.options.bordersize - 2 * inst.options.bordermargin; if ( (inst.options.fullscreenmode && winWidth > inst.options.navarrowsbottomscreenwidth) || (((inst.options.isTouch && inst.options.navarrowsalwaysshowontouch) || inst.options.alwaysshownavarrows) && winWidth > inst.options.navarrowsbottomscreenwidth) ) { w0 -= 64; } if (sizeObj.w > w0) { if (keepratio) { sizeObj.h = Math.round((sizeObj.h * w0) / sizeObj.w); } sizeObj.w = w0; } return sizeObj; }; inst.showData = function () { if (inst.$text.text().length > 0) { inst.$elemData.show(); } if (inst.options.titlestyle == "bottom" || inst.options.titlestyle == "inside") { inst.$lightboxBox.css({ height: "auto" }); } if (inst.$text.text().length > 0 && inst.options.titlestyle == "bottom") { inst.$elemData.css({ "max-height": inst.options.barheight + "px" }); } $("#tsvg-fancy-html5-lightbox-overlay", inst.$lightbox).css({ height: Math.max($(window).height(), $(document).height()) }); $(window).trigger("html5lightbox.lightboxopened"); }; inst.resizeLightbox = function (elemW, elemH, bAnimate, onFinish) { inst.hideNavArrows(); var boxPos = inst.calcBoxPosition(elemW, elemH); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$loading.hide(); inst.$watermark.hide(); if (inst.options.curElem >= inst.options.nextElem) { if (inst.options.onlastitem && window[inst.options.onlastitem] && typeof window[inst.options.onlastitem] == "function") { window[inst.options.onlastitem](inst.currentElem); } } if (inst.options.prevElem >= inst.options.curElem) { if (inst.options.onfirstitem && window[inst.options.onfirstitem] && typeof window[inst.options.onfirstitem] == "function") { window[inst.options.onfirstitem](inst.currentElem); } } if (!inst.options.fullscreenmode && (!inst.options.isTouch || !inst.options.navarrowsalwaysshowontouch) && !inst.options.alwaysshownavarrows) { inst.$elem.bind( "mouseenter mousemove", function () { if ((inst.options.arrowloop && inst.options.prevElem >= 0) || (!inst.options.arrowloop && inst.options.prevElem >= 0 && inst.options.curElem > inst.options.prevElem )) { inst.$prev.fadeIn(); } if ((inst.options.arrowloop && inst.options.nextElem >= 0) || (!inst.options.arrowloop && inst.options.nextElem >= 0 && inst.options.nextElem > inst.options.curElem)) { inst.$next.fadeIn(); } } ); inst.$elem.bind( "mouseleave", function () { inst.$next.fadeOut(); inst.$prev.fadeOut(); } ); } inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { var speed = bAnimate ? inst.options.resizespeed : 0; if (boxW == inst.$lightboxBox.width() && boxH == inst.$lightboxBox.height()) { speed = 0; } inst.$lightboxBox.animate({ width: boxW }, speed).animate( { height: boxH }, speed, function () { inst.onAnimateFinish(onFinish); } ); } else { var speed = bAnimate ? inst.options.resizespeed : 0; if (boxW == inst.$elemWrap.width() && boxH == inst.$elemWrap.height()) { speed = 0; } inst.$lightboxBox.css({ width: boxW, height: "auto", "min-width": boxW - 15 }); inst.$elemWrap.animate({ width: boxW, "min-width": boxW - 15 }, speed).animate( { height: boxH, "min-height": boxH - 15 }, speed, function () { inst.onAnimateFinish(onFinish); } ); } }; inst.onAnimateFinish = function (onFinish) { inst.$loading.show(); inst.$watermark.show(); inst.$close.show(); inst.$elem.css({ "background-color": inst.options.bgcolor }); onFinish(); }; inst.reset = function () { if (inst.options.stamp) { inst.$watermark.hide(); } inst.showing = false; inst.$image.empty(); inst.$text.empty(); inst.$error.hide(); inst.$loading.hide(); inst.$image.hide(); if (inst.options.titlestyle == "bottom" || inst.options.titlestyle == "inside") { inst.$elemData.hide(); } if (!inst.options.fullscreenmode) { inst.$close.hide(); } inst.$elem.css({ "background-color": "" }); }; inst.resetNavigation = function () { inst.options.navheight = 0; $(".tsvg-fancy-html5-nav").remove(); }; inst.finish = function () { if ($("#tsvg-fancy-html5-lightbox-video", inst.$lightbox).length) { $("#tsvg-fancy-html5-lightbox-video", inst.$lightbox).attr("src", ""); } $("head") .find("style") .each( function () { if ($(this).data("creator") == "tsvg-fancy-html5box-html5-lightbox") { $(this).remove(); } } ); inst.slideTimeout.stop(); inst.reset(); inst.resetNavigation(); inst.$lightbox.remove(); $("#tsvg-fancy-html5box-html5-lightbox").remove(); inst.showObjects(); if (inst.options.oncloselightbox && window[inst.options.oncloselightbox] && typeof window[inst.options.oncloselightbox] == "function") { window[inst.options.oncloselightbox](inst.currentElem); } if (inst.onLightboxClosed && typeof inst.onLightboxClosed == "function") { inst.onLightboxClosed(inst.currentElem); } }; inst.pauseSlide = function () { }; inst.playSlide = function () { }; inst.gotoSlide = function (slide) { if (slide == -1) { if (0 > inst.options.nextElem ) { return; } inst.options.curElem = inst.options.nextElem; } else if (slide == -2) { if (0 > inst.options.prevElem ) { return; } inst.options.curElem = inst.options.prevElem; } else if (slide >= 0) { inst.options.curElem = slide; } if (inst.autosliding) { inst.slideTimeout.stop(); } inst.calcNextPrevElem(); inst.reset(); inst.loadCurElem(); }; inst.enableSwipe = function () { inst.$elem.html5lightboxTouchSwipe450370( { preventWebBrowser: false, swipeLeft: function () { inst.gotoSlide(-1); }, swipeRight: function () { inst.gotoSlide(-2); }, } ); }; inst.hideObjects = function () { $("select, embed, object").css({ visibility: "hidden" }); }; inst.showObjects = function () { $("select, embed, object").css({ visibility: "visible" }); }; inst.embedHTML5Video = function ($container, src, autoplay, loopvideo) { let embedVideoPoster = (inst.options.html5videoposter && inst.options.html5videoposter.length > 0 ? "poster='" + inst.options.html5videoposter + "'" : ""), embedVideoControls = (inst.options.nativehtml5controls && !inst.options.videohidecontrols ? " controls='controls'" : ""); $container.html( "
" ); if (!inst.options.nativehtml5controls) { $("video", $container).data("src", src); $("video", $container).lightboxHTML5VideoControls450370(inst.options.skinsfolder, inst, inst.options.videohidecontrols, false, inst.options.defaultvideovolume); } $("video", $container) .unbind("ended") .bind( "ended", function () { $(window).trigger("html5lightbox.videofinished"); if (inst.autosliding) { inst.gotoSlide(-1); } else if (inst.options.autoclose) { inst.finish(); } } ); }; inst.embedFlash = function ($container, src, wmode, flashVars) { if (inst.options.flashInstalled) { var htmlOptions = { pluginspage: "", quality: "high", allowFullScreen: "true", allowScriptAccess: "always", type: "application/x-shockwave-flash" }; htmlOptions.width = "100%"; htmlOptions.height = "100%"; htmlOptions.src = src; htmlOptions.flashVars = $.param(flashVars); htmlOptions.wmode = wmode; var htmlString = ""; for (var key in htmlOptions) { htmlString += key + "=" + htmlOptions[key] + " "; } $container.html(""); } else { $container.html( "
The required Adobe Flash Player plugin is not installed

Get Adobe Flash player
" ); } }; inst.checkType = function (href) { if (!href) { return -1; } if (href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)) { return 0; } if (href.match(/[^\.]\.(swf)\s*$/i)) { return 1; } if (href.match(/\.(mp4|m4v|ogv|ogg|webm)(.*)?$/i)) { return 4; } if (href.match(/\:\/\/.*(youtube\.com)/i) || href.match(/\:\/\/.*(youtu\.be)/i)) { return 3; } if (href.match(/\:\/\/.*(vimeo\.com)/i)) { return 4; } if (href.match(/\:\/\/.*(dailymotion\.com)/i) || href.match(/\:\/\/.*(dai\.ly)/i)) { return 9; } if (href.match(/[^\.]\.(pdf)\s*$/i)) { return 5; } if (href.match(/[^\.]\.(mp3)\s*$/i)) { return 6; } if (href.match(/[^\.]\.(flv)\s*$/i)) { return 8; } if (href.match(/\#\w+/i)) { return 10; } if (href.match(/\:\/\/.*(wistia)/i)) { return 11; } return 7; }; inst.getURLParams = function () { var result = {}; var params = window.location.search.substring(1).split("&"); for (var i = 0; params.length > i ; i++) { var value = params[i].split("="); if (value && value.length == 2) { result[value[0].toLowerCase()] = unescape(value[1]); } } return result; }; inst.absoluteUrl = function (href) { var link = document.createElement("a"); link.href = href; return link.protocol + "//" + link.host + link.pathname + link.search + link.hash; }; inst.showLightbox = function (type, href, title, width, height, webm, ogg, thumbnail, description) { inst.options = $.extend(inst.options, inst.defaultoptions); $(window).trigger("html5lightbox.lightboxshow"); inst.init(); inst.reset(); inst.$lightbox.show(); var boxPos = inst.calcBoxPosition(inst.options.loadingwidth, inst.options.loadingheight); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } inst.loadElem(new Array(type, href, title, null, width, height, webm, ogg, thumbnail, description)); }; inst.addItem = function (href, title, group, width, height, webm, ogg, thumbnail, description, mediatype) { type = mediatype && mediatype >= 0 ? mediatype : inst.checkType(href); inst.elemArray.push(new Array(type, href, title, group, width, height, webm, ogg, thumbnail, description)); }; inst.showItem = function (href) { inst.options = $.extend(inst.options, inst.defaultoptions); $(window).trigger("html5lightbox.lightboxshow"); inst.init(); if (0 >= inst.elemArray.length) { return true; } inst.hideObjects(); for (var i = 0; inst.elemArray.length > i; i++) { if (inst.elemArray[i][ELEM_HREF] == href) { break; } } if (i == inst.elemArray.length) { return true; } inst.options.curElem = i; inst.calcNextPrevElem(); inst.reset(); inst.$lightbox.show(); var boxPos = inst.calcBoxPosition(inst.options.loadingwidth, inst.options.loadingheight); var boxW = boxPos[0]; var boxH = boxPos[1]; var boxT = boxPos[2]; inst.$lightboxBox.css({ "margin-top": boxT }); if (!inst.options.positionFixed) { inst.$lightboxBox.css("margin-top", $(window).scrollTop() + inst.options.bordertopmargin); } if (inst.options.titlestyle == "left" || inst.options.titlestyle == "right") { inst.$lightboxBox.css({ width: boxW, height: boxH }); } else { inst.$lightboxBox.css({ width: boxW, height: "auto" }); inst.$elemWrap.css({ width: boxW, height: boxH }); } inst.loadCurElem(); return false; }; inst.unbind("click").click(inst.clickHandler); inst.each( function () { var self = $(this); if (self.data("autoopen")) { setTimeout( function () { self.click(); }, self.data("autoopendelay") ? self.data("autoopendelay") : 0 ); return false; } } ); var urlParams = inst.getURLParams(); if ("html5lightboxshare" in urlParams) { var shareUrl = decodeURIComponent(urlParams["html5lightboxshare"]); var shareLink = $('.tsvg-html5lightbox-450370[href="' + shareUrl + '"]'); if (shareLink.length > 0) { shareLink.click(); } } return inst; }; })(jQuery); (function ($) { $.fn.html5lightboxTouchSwipe450370 = function (options) { var defaults = { preventWebBrowser: false, swipeLeft: null, swipeRight: null, swipeTop: null, swipeBottom: null }; if (options) { $.extend(defaults, options); } return this.each( function () { var startX = -1, startY = -1; var curX = -1, curY = -1; function touchStart(event) { var e = event.originalEvent; if (e.targetTouches.length >= 1) { startX = e.targetTouches[0].pageX; startY = e.targetTouches[0].pageY; } else { touchCancel(event); } } function touchMove(event) { if (defaults.preventWebBrowser) { event.preventDefault(); } var e = event.originalEvent; if (e.targetTouches.length >= 1) { curX = e.targetTouches[0].pageX; curY = e.targetTouches[0].pageY; } else { touchCancel(event); } } function touchEnd(event) { if (curX > 0 || curY > 0) { triggerHandler(); touchCancel(event); } else { touchCancel(event); } } function touchCancel(event) { startX = -1; startY = -1; curX = -1; curY = -1; } function triggerHandler() { if (Math.abs(curX - startX) > Math.abs(curY - startY)) { if (curX > startX) { if (defaults.swipeRight) { defaults.swipeRight.call(); } } else { if (defaults.swipeLeft) { defaults.swipeLeft.call(); } } } else if (curY > startY) { if (defaults.swipeBottom) { defaults.swipeBottom.call(); } } else if (defaults.swipeTop) { defaults.swipeTop.call(); } } try { $(this).bind("touchstart", touchStart); $(this).bind("touchmove", touchMove); $(this).bind("touchend", touchEnd); $(this).bind("touchcancel", touchCancel); } catch (e) { } } ); }; })(jQuery); (function ($) { $.fn.lightboxHTML5VideoControls450370 = function (skinFolder, parentInst, hidecontrols, hideplaybutton, defaultvolume) { var isTouch = "ontouchstart" in window; var eStart = isTouch ? "touchstart" : "mousedown"; var eMove = isTouch ? "touchmove" : "mousemove"; var eCancel = isTouch ? "touchcancel" : "mouseup"; var eClick = "click"; var BUTTON_SIZE = 32; var BAR_HEIGHT = isTouch ? 48 : 36; var hideControlsTimerId = null; var hideVolumeBarTimeoutId = null; var sliderDragging = false; var isFullscreen = false; var userActive = true; var isIPhone = navigator.userAgent.match(/iPod/i) != null || navigator.userAgent.match(/iPhone/i) != null; var isHd = $(this).data("ishd"); var hd = $(this).data("hd"); var src = $(this).data("src"); var $videoObj = $(this); $videoObj.get(0).removeAttribute("controls"); if (isIPhone) { var h = $videoObj.height() - BAR_HEIGHT; $videoObj.css({ height: h }); } var $videoPlay = $("
"); if (!isIPhone) { $videoObj.after($videoPlay); $videoPlay .css( { position: "absolute", top: "50%", left: "50%", display: "block", cursor: "pointer", width: 64, height: 64, "margin-left": -32, "margin-top": -32, "background-image": "url('" + skinFolder + "html5boxplayer_playvideo.png" + "')", "background-position": "center center", "background-repeat": "no-repeat", } ) .bind( eClick, function () { $videoObj.get(0).play(); } ); } var $videoFullscreenBg = $("
"); var $videoControls = $( "
" + "
" + "
" + "
" + "
" + "
" + "
--:--
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" + "
--:--
" + "
" + "
" + "
" + "
" + "
" + "
" + "
" ); $videoObj.after($videoControls); $videoObj.after($videoFullscreenBg); $videoFullscreenBg.css({ display: "none", position: "fixed", left: 0, top: 0, bottom: 0, right: 0, "z-index": 2147483647 }); $videoControls.css({ display: "block", position: "absolute", width: "100%", height: BAR_HEIGHT, left: 0, bottom: 0, right: 0, "max-width": "640px", margin: "0 auto" }); var userActivate = function () { userActive = true; }; $videoObj .bind( eClick, function () { userActive = true; } ) .hover( function () { userActive = true; }, function () { userActive = false; } ); if (!hidecontrols) { setInterval( function () { if (userActive) { $videoControls.show(); userActive = false; clearTimeout(hideControlsTimerId); hideControlsTimerId = setTimeout( function () { if (!$videoObj.get(0).paused) { $videoControls.fadeOut(); } }, 5e3 ); } }, 250 ); } $(".html5boxVideoControlsBg", $videoControls).css({ display: "block", position: "absolute", width: "100%", height: "100%", left: 0, top: 0, "background-color": "#000000", opacity: 0.7, filter: "alpha(opacity=70)" }); $(".html5boxPlayPause", $videoControls).css({ display: "block", position: "relative", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), float: "left" }); var $videoBtnPlay = $(".html5boxPlay", $videoControls); var $videoBtnPause = $(".html5boxPause", $videoControls); $videoBtnPlay .css( { display: "block", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_playpause.png" + "')", "background-position": "top left", } ) .hover( function () { $(this).css({ "background-position": "bottom left" }); }, function () { $(this).css({ "background-position": "top left" }); } ) .bind( eClick, function () { $videoObj.get(0).play(); } ); $videoBtnPause .css( { display: "none", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_playpause.png" + "')", "background-position": "top right", } ) .hover( function () { $(this).css({ "background-position": "bottom right" }); }, function () { $(this).css({ "background-position": "top right" }); } ) .bind( eClick, function () { $videoObj.get(0).pause(); } ); var $videoTimeCurrent = $(".html5boxTimeCurrent", $videoControls); var $videoTimeTotal = $(".html5boxTimeTotal", $videoControls); var $videoSeeker = $(".html5boxSeeker", $videoControls); var $videoSeekerPlay = $(".html5boxSeekerPlay", $videoControls); var $videoSeekerBuffer = $(".html5boxSeekerBuffer", $videoControls); var $videoSeekerHandler = $(".html5boxSeekerHandler", $videoControls); $videoTimeCurrent.css( { display: "block", position: "relative", float: "left", "line-height": BAR_HEIGHT + "px", "font-weight": "normal", "font-size": "12px", margin: "0 8px", "font-family": "Arial, Helvetica, sans-serif", color: "#fff", } ); $videoTimeTotal.css( { display: "block", position: "relative", float: "right", "line-height": BAR_HEIGHT + "px", "font-weight": "normal", "font-size": "12px", margin: "0 8px", "font-family": "Arial, Helvetica, sans-serif", color: "#fff", } ); $videoSeeker .css({ display: "block", cursor: "pointer", overflow: "hidden", position: "relative", height: "10px", "background-color": "#222", margin: Math.floor((BAR_HEIGHT - 10) / 2) + "px 4px" }) .bind( eStart, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var pos = e0.pageX - $videoSeeker.offset().left; $videoSeekerPlay.css({ width: pos }); $videoObj.get(0).currentTime = (pos * $videoObj.get(0).duration) / $videoSeeker.width(); $videoSeeker.bind( eMove, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var pos = e0.pageX - $videoSeeker.offset().left; $videoSeekerPlay.css({ width: pos }); $videoObj.get(0).currentTime = (pos * $videoObj.get(0).duration) / $videoSeeker.width(); } ); } ) .bind( eCancel, function () { $videoSeeker.unbind(eMove); } ); $videoSeekerBuffer.css({ display: "block", position: "absolute", left: 0, top: 0, height: "100%", "background-color": "#444" }); $videoSeekerPlay.css({ display: "block", position: "absolute", left: 0, top: 0, height: "100%", "background-color": "#fcc500" }); if (!isIPhone && ($videoObj.get(0).requestFullscreen || $videoObj.get(0).webkitRequestFullScreen || $videoObj.get(0).mozRequestFullScreen || $videoObj.get(0).webkitEnterFullScreen || $videoObj.get(0).msRequestFullscreen)) { var switchScreen = function (fullscreen) { if (fullscreen) { if ($videoObj.get(0).requestFullscreen) { $videoObj.get(0).requestFullscreen(); } else if ($videoObj.get(0).webkitRequestFullScreen) { $videoObj.get(0).webkitRequestFullScreen(); } else if ($videoObj.get(0).mozRequestFullScreen) { $videoObj.get(0).mozRequestFullScreen(); } else if ($videoObj.get(0).webkitEnterFullScreen) { $videoObj.get(0).webkitEnterFullScreen(); } if ($videoObj.get(0).msRequestFullscreen) { $videoObj.get(0).msRequestFullscreen(); } } else if (document.cancelFullScreen) { document.cancelFullScreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } }; var switchScreenCSS = function (fullscreen) { $videoControls.css({ position: fullscreen ? "fixed" : "absolute" }); var backgroundPosY = $videoFullscreen.css("background-position") ? $videoFullscreen.css("background-position").split(" ")[1] : $videoFullscreen.css("background-position-y"); $videoFullscreen.css({ "background-position": (fullscreen ? "right" : "left") + " " + backgroundPosY }); $videoFullscreenBg.css({ display: fullscreen ? "block" : "none" }); if (fullscreen) { $(document).bind("mousemove", userActivate); $videoControls.css({ "z-index": 2147483647 }); } else { $(document).unbind("mousemove", userActivate); $videoControls.css({ "z-index": "" }); } }; document.addEventListener( "fullscreenchange", function () { isFullscreen = document.fullscreen; switchScreenCSS(document.fullscreen); }, false ); document.addEventListener( "mozfullscreenchange", function () { isFullscreen = document.mozFullScreen; switchScreenCSS(document.mozFullScreen); }, false ); document.addEventListener( "webkitfullscreenchange", function () { isFullscreen = document.webkitIsFullScreen; switchScreenCSS(document.webkitIsFullScreen); }, false ); $videoObj.get(0).addEventListener( "webkitbeginfullscreen", function () { isFullscreen = true; }, false ); $videoObj.get(0).addEventListener( "webkitendfullscreen", function () { isFullscreen = false; }, false ); $("head").append(""); var $videoFullscreen = $(".html5boxFullscreen", $videoControls); $videoFullscreen .css( { display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_fullscreen.png" + "')", "background-position": "left top", } ) .hover( function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " bottom" }); }, function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " top" }); } ) .bind( eClick, function () { isFullscreen = !isFullscreen; switchScreen(isFullscreen); } ); } if (hd) { var $videoHD = $(".html5boxHD", $videoControls); $videoHD .css( { display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_hd.png" + "')", "background-position": (isHd ? "right" : "left") + " center", } ) .bind( eClick, function () { isHd = !isHd; $(this).css({ "background-position": (isHd ? "right" : "left") + " center" }); parentInst.isHd = isHd; var isPaused = $videoObj.get(0).isPaused; $videoObj.get(0).setAttribute("src", (isHd ? hd : src) + "#t=" + $videoObj.get(0).currentTime); if (!isPaused) { $videoObj.get(0).play(); } else if (!isIPhone) { $videoObj.get(0).pause(); } } ); } $videoObj.get(0).volume = defaultvolume; var volumeSaved = defaultvolume == 0 ? 1 : defaultvolume; var volume = $videoObj.get(0).volume; $videoObj.get(0).volume = volume / 2 + 0.1; if ($videoObj.get(0).volume === volume / 2 + 0.1) { $videoObj.get(0).volume = volume; var $videoVolume = $(".html5boxVolume", $videoControls); var $videoVolumeButton = $(".html5boxVolumeButton", $videoControls); var $videoVolumeBar = $(".html5boxVolumeBar", $videoControls); var $videoVolumeBarBg = $(".html5boxVolumeBarBg", $videoControls); var $videoVolumeBarActive = $(".html5boxVolumeBarActive", $videoControls); $videoVolume.css({ display: "block", position: "relative", float: "right", width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", margin: Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2) }).hover( function () { clearTimeout(hideVolumeBarTimeoutId); var volume = $videoObj.get(0).volume; $videoVolumeBarActive.css({ height: Math.round(volume * 100) + "%" }); $videoVolumeBar.show(); }, function () { clearTimeout(hideVolumeBarTimeoutId); hideVolumeBarTimeoutId = setTimeout( function () { $videoVolumeBar.hide(); }, 1e3 ); } ); $videoVolumeButton .css( { display: "block", position: "absolute", top: 0, left: 0, width: BUTTON_SIZE + "px", height: BUTTON_SIZE + "px", cursor: "pointer", "background-image": "url('" + skinFolder + "html5boxplayer_volume.png" + "')", "background-position": "top " + (volume > 0 ? "left" : "right"), } ) .hover( function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " bottom" }); }, function () { var backgroundPosX = $(this).css("background-position") ? $(this).css("background-position").split(" ")[0] : $(this).css("background-position-x"); $(this).css({ "background-position": backgroundPosX + " top" }); } ) .bind( eClick, function () { var volume = $videoObj.get(0).volume; if (volume > 0) { volumeSaved = volume; volume = 0; } else { volume = volumeSaved; } var backgroundPosY = $(this).css("background-position") ? $(this).css("background-position").split(" ")[1] : $(this).css("background-position-y"); $videoVolumeButton.css({ "background-position": (volume > 0 ? "left" : "right") + " " + backgroundPosY }); $videoObj.get(0).volume = volume; $videoVolumeBarActive.css({ height: Math.round(volume * 100) + "%" }); } ); $videoVolumeBar.css( { display: "none", position: "absolute", left: 4, bottom: "100%", width: 24, height: 80, "margin-bottom": Math.floor((BAR_HEIGHT - BUTTON_SIZE) / 2), "background-color": "#000000", opacity: 0.7, filter: "alpha(opacity=70)", } ); $videoVolumeBarBg.css({ display: "block", position: "relative", width: 10, height: 68, margin: 7, cursor: "pointer", "background-color": "#222" }); $videoVolumeBarActive.css({ display: "block", position: "absolute", bottom: 0, left: 0, width: "100%", height: "100%", "background-color": "#fcc500" }); $videoVolumeBarBg .bind( eStart, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var vol = 1 - (e0.pageY - $videoVolumeBarBg.offset().top) / $videoVolumeBarBg.height(); vol = vol > 1 ? 1 : 0 > vol ? 0 : vol; $videoVolumeBarActive.css({ height: Math.round(vol * 100) + "%" }); $videoVolumeButton.css({ "background-position": "left " + (vol > 0 ? "top" : "bottom") }); $videoObj.get(0).volume = vol; $videoVolumeBarBg.bind( eMove, function (e) { var e0 = isTouch ? e.originalEvent.touches[0] : e; var vol = 1 - (e0.pageY - $videoVolumeBarBg.offset().top) / $videoVolumeBarBg.height(); vol = vol > 1 ? 1 : 0 > vol ? 0 : vol; $videoVolumeBarActive.css({ height: Math.round(vol * 100) + "%" }); $videoVolumeButton.css({ "background-position": "left " + (vol > 0 ? "top" : "bottom") }); $videoObj.get(0).volume = vol; } ); } ) .bind( eCancel, function () { $videoVolumeBarBg.unbind(eMove); } ); } var calcTimeFormat = function (seconds) { var h0 = Math.floor(seconds / 3600); var h = 10 > h0 ? "0" + h0 : h0; var m0 = Math.floor((seconds - h0 * 3600) / 60); var m = 10 > m0 ? "0" + m0 : m0; var s0 = Math.floor(seconds - (h0 * 3600 + m0 * 60)); var s = 10 > s0 ? "0" + s0 : s0; var r = m + ":" + s; if (h0 > 0) { r = h + ":" + r; } return r; }; if (hideplaybutton) { $videoPlay.hide(); } if (hidecontrols) { $videoControls.hide(); } var onVideoPlay = function () { if (!hideplaybutton) { $videoPlay.hide(); } if (!hidecontrols) { $videoBtnPlay.hide(); $videoBtnPause.show(); } }; var onVideoPause = function () { if (!hideplaybutton) { $videoPlay.show(); } if (!hidecontrols) { $videoControls.show(); clearTimeout(hideControlsTimerId); $videoBtnPlay.show(); $videoBtnPause.hide(); } }; var onVideoEnded = function () { $(window).trigger("html5lightbox.videoended"); if (!hideplaybutton) { $videoPlay.show(); } if (!hidecontrols) { $videoControls.show(); clearTimeout(hideControlsTimerId); $videoBtnPlay.show(); $videoBtnPause.hide(); } }; var onVideoUpdate = function () { var curTime = $videoObj.get(0).currentTime; if (curTime) { $videoTimeCurrent.text(calcTimeFormat(curTime)); var duration = $videoObj.get(0).duration; if (duration) { $videoTimeTotal.text(calcTimeFormat(duration)); if (!sliderDragging) { var sliderW = $videoSeeker.width(); var pos = Math.round((sliderW * curTime) / duration); $videoSeekerPlay.css({ width: pos }); $videoSeekerHandler.css({ left: pos }); } } } }; var onVideoProgress = function () { if ($videoObj.get(0).buffered && $videoObj.get(0).buffered.length > 0 && !isNaN($videoObj.get(0).buffered.end(0)) && !isNaN($videoObj.get(0).duration)) { var sliderW = $videoSeeker.width(); $videoSeekerBuffer.css({ width: Math.round((sliderW * $videoObj.get(0).buffered.end(0)) / $videoObj.get(0).duration) }); } }; try { $videoObj.bind("play", onVideoPlay); $videoObj.bind("pause", onVideoPause); $videoObj.bind("ended", onVideoEnded); $videoObj.bind("timeupdate", onVideoUpdate); $videoObj.bind("progress", onVideoProgress); } catch (e) { } }; })(jQuery); jQuery(".tsvg-html5lightbox-450370").html5lightbox450370({},'450370'); jQuery(function() { jQuery('.tsvg-section-450370').fadeIn(); var tsvgFancyHoverInverse450370 = 'Default'; tsvgFancyHoverInverse450370 = tsvgFancyHoverInverse450370 == 'Default' ? false : true; jQuery('.tsvg-fancy-blocks-list-450370 > li').each(function() { jQuery(this).hoverdir({hoverDelay: 50, inverse:tsvgFancyHoverInverse450370}); }); }); clearInterval(tsvgFancyInterval450370); } }, tsvgFancyReference450370 = ( function tsvgFancySameCall450370() { tsvgFancyInterval450370 = setInterval(tsvgFancyIntervalFunction450370, 1000); return tsvgFancySameCall450370; }() );
'); }else{ jQuery('.tsvg-section-450370 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
'); } var svg = document.querySelector('.btn-lg svg'), svgPath = new Proxy({ y: null, smoothing: null }, { set(target, key, value) { target[key] = value; if(target.y !== null && target.smoothing !== null) { svg.innerHTML = getPath(target.y, target.smoothing, null); } return true; }, get(target, key) { return target[key]; } }); svgPath.y = 20; svgPath.smoothing = 0; } } jQuery('.tsvg-section-450370 .btn-lg').click(function (e) { let max_heigth =jQuery('.tsvg-main-content-450370').height(); let main_length = jQuery('.tsvg-main-content-450370 figure ul li').length; tsvgPaginationLoad450370 = 'false'; if(jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-3'||jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-4'||jQuery(this).closest('.tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5'){ tsvgPaginationLoad450370 = 'true'; } jQuery('.tsvg-main-content-450370').css({'max-height': max_heigth+'px','transition':'unset'}); setTimeout(() => { jQuery('.tsvg-main-content-450370').css({'transition':'max-height 3s ease-in-out','max-height':main_length+'000vh'}); }, 100); tsvgPaginationCreate450370(jQuery('.tsvg-main-content-450370 figure ul li').not('.tsvg-layout-item-show'),0, numberItemsPerPage); if(jQuery('.tsvg-section-450370 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-3'){ jQuery('.tsvg-section-450370 .btn-lg').addClass('animate'); setTimeout(function(){ jQuery('.tsvg-section-450370 .btn-lg').removeClass('animate'); },700); } if(!jQuery('.tsvg-section-450370 .btn-lg').hasClass('loading')&&(jQuery('.tsvg-section-450370 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-4'||jQuery('.tsvg-section-450370 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5')&&jQuery('.tsvg-section-450370 .tsvg-pagination-pages-wrapper svg').length) { jQuery('.tsvg-section-450370 .btn-lg').addClass('loading'); setTimeout(() => { svg.innerHTML = getPath(0, 0, [ [3, 14], [8, 19], [21, 6] ]); }, 1000 / 2); setTimeout(() => { jQuery('.tsvg-section-450370 .btn-lg').removeClass('loading'); if(jQuery('.tsvg-section-450370 .tsvg-pagination-pages-wrapper').attr("data-load-vw")=='ef-5'){ jQuery('.tsvg-section-450370 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
  • '+load_text+'
'); }else{ jQuery('.tsvg-section-450370 .tsvg-pagination-pages-wrapper').find('.btn-lg').html('
'); } }, 2000 ); } }) tsvgPaginationCreate450370(jQuery('.tsvg-section-450370 .tsvg-main-content-450370 figure ul li').not('.tsvg-layout-item-show'),0, numberItemsPerPage) } } function tsvgNewPagination450370(){ var interval_pag_fn_450370 = setInterval(setPagina_450370, 100); function setPagina_450370() { if( typeof(jQuery) != "undefined" && jQuery != null){ if( jQuery('.tsvg-main-content-450370').attr("data-pagination")=='pagination'){ tsvgPaginationGenerate450370(); } if( jQuery('.tsvg-main-content-450370').attr("data-pagination")=='load-more'){ tsvgPaginationGenerate450370(); } clearInterval(interval_pag_fn_450370); } } } tsvgNewPagination450370(); function tsvgPaginationGenerate(){ tsvgPaginationGenerate450370(); } function getPoint(point, i, a, smoothing) { let cp = (current, previous, next, reverse) => { let p = previous || current, n = next || current, o = { length: Math.sqrt(Math.pow(n[0] - p[0], 2) + Math.pow(n[1] - p[1], 2)), angle: Math.atan2(n[1] - p[1], n[0] - p[0]) }, angle = o.angle + (reverse ? Math.PI : 0), length = o.length * smoothing; return [current[0] + Math.cos(angle) * length, current[1] + Math.sin(angle) * length]; }, cps = cp(a[i - 1], a[i - 2], point, false), cpe = cp(point, a[i - 1], a[i + 1], true); return `C ${cps[0]},${cps[1]} ${cpe[0]},${cpe[1]} ${point[0]},${point[1]}`; } function getPath(update, smoothing, pointsNew) { let points = pointsNew ? pointsNew : [ [4, 12], [12, update], [20, 12] ], d = points.reduce((acc, point, i, a) => i === 0 ? `M ${point[0]},${point[1]}` : `${acc} ${getPoint(point, i, a, smoothing)}`, ''); return ``; }

Como clave de humor, Tuti Fernández presentó un cortometraje del desenlace de los protagonistas. Podéis verlo aquí

Justino y la fábrica de Maniquíes (2015)

La agencia Leo Burnett también se encargó del 2015 con otro anuncio polémico dentro del sector de animación español y es que en vez de contratar una empresa española para el trabajo (un trabajo para Loterías y Apuestas del ESTADO), contrataron a Milford, una empresa Sueca. Su calidad es indiscutible, pero no significa que las empresas de animación españolas no puedan igualar (o superar) esa calidad. A través del ‘hashtag’ #JustinoNoEsEspañol, no son pocos los que reivindicaron la animación española y denunciaron la aparente falta de confianza en los profesionales del país.

Anuncio Lotería Navidad 2015

Roquetas de Mar – Verano 2016

El 12 de julio de 2016 se estrenó la campaña de verano de la Lotería de Navidad para fomentar la compra de las personas que veranean por España y vean ese inconfundible cartel de ¿y si cae aquí?

Roquetas de Mar es el municipio almeriense galardonado con el anuncio al haber tocado íntegro el gordo el año anterior en su administración número 2.

Anuncio Lotería Navidad 2016 (Verano)

21 de diciembre (2016)

El tercer año consecutivo de la campaña de «El mejor premio es compartirlo» lo protagoniza Carmina, una profesora jubilada que le falla la memoria. Un día antes del sorteo, viendo un reportaje piensa que su décimo ha sido el agraciado.

Anuncio Lotería Navidad 2016

Danielle (2017)

El lunes 13 de noviembre de 2017, LAE estrenaba en los Cines Doré de Madrid el cortometraje de Alejandro Amenábar y la agencia Leo Brunett «Danielle y daniel». Casi 20 minutos. 

Anuncio Lotería Navidad 2017

22 otra vez (2018)

Y volviendo al espíritu de «lo importante es compartirlo», el anuncio del 2018 cuenta la historia de Juan, un hombre amargado, que vive el día 22 de diciembre como el día de la marmota, siendo el agraciado del sorteo.

Anuncio Lotería Navidad 2018

Adivinos – Verano 2019

En esta ocasión, Loterías y Apuestas del Estado apuesta por los adivinos a los que les preguntan ¿Dónde va a caer el gordo de Navidad? Con unas pinceladas de humor y con el objetivo de «compra lotería, vayas donde vayas» le preguntan a la astróloga Esperanza Gracia, al futurólogo Miguel Pacheco, al mentalista Pablo Raijenstein y a Úrsula Dulcinea, experta en tarot. 

Anuncio Lotería Navidad 2019 (Verano)

Anuncio Lotería Navidad 2019

Siguiendo con la dinámica de compartir el décimo, los lemas de este año son:

  • «Cuando compartes un décimo, compartes mucho más»
  • «Lotería de Navidad, el sorteo que nos une»

Y se nos presenta en 4 vídeos:

Anuncio Lotería Navidad 2020

Anuncio Lotería Navidad 2021

Versión de verano

Anuncio Lotería Navidad 2021

Esta web utiliza cookies propias y de terceros para su correcto funcionamiento y para fines analíticos y para mostrarte publicidad relacionada con sus preferencias en base a un perfil elaborado a partir de tus hábitos de navegación. Contiene enlaces a sitios web de terceros con políticas de privacidad ajenas que podrás aceptar o no cuando accedas a ellos. Al hacer clic en el botón Aceptar, acepta el uso de estas tecnologías y el procesamiento de tus datos para estos propósitos. Configurar y más información
Privacidad