Video Gallery

\
\
\
\
\
\
\
\
\
\
\ Expand \
\ next \ previous \
\
\
\

\ ${tsvg_pp_settings.icon_close_text} \
\ \

0/0

\ \
\
\
\
\
\
\
\
\
\
\
\
\
\
`, gallery_markup: '
\ Previous \
    \ {gallery} \
\ Next \
', image_markup: '', flash_markup: '', quicktime_markup: '', iframe_markup: '
', inline_markup: '
{content}
', custom_markup: '', mp4_markup: '' }, tsvg_pp_settings); var matchedObjects = this, percentBased = false, correctSizes, pp_open, tsvg_pp_content_height, tsvg_pp_content_width, tsvg_pp_container_height, tsvg_pp_container_width, windowHeight = $(window).height(), windowWidth = $(window).width(), pp_slideshow, doresize = true, scroll_pos = _get_scroll117656(); $(window).on('resize',function () { tsvgCheckWidth(); }); if (tsvg_pp_settings.keyboard_shortcuts) { $(document).unbind('keydown').keydown(function (e) { if (typeof $tsvg_pp_pic_holder117656 != 'undefined') { if ($tsvg_pp_pic_holder117656.is(':visible')) { switch (e.keyCode) { case 37: $.prettyPhoto117656.changePage('previous'); break; case 39: $.prettyPhoto117656.changePage('next'); break; case 27: if (!settings.modal) $.prettyPhoto117656.close(); break; } return false; } } }) } $.prettyPhoto117656.initialize = function () { settings = tsvg_pp_settings; if (navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest && parseInt($.browser.version) == 6) settings.theme = "light_square"; _buildOverlay117656(this); set_position = jQuery(this).closest('li').index(); $.prettyPhoto117656.open(); return false; } $.prettyPhoto117656.open = function (event) { if (typeof settings == "undefined") { settings = tsvg_pp_settings; if (navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest && $.browser.version == 6) settings.theme = "light_square"; _buildOverlay117656(event.target); pp_images = $.makeArray(arguments[0]); pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray(""); pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray(""); isSet = (pp_images.length > 1) ? true : false; set_position = 0; } if (navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequestmsie && $.browser.version == 6) $('select').css('visibility', 'hidden'); if (settings.hideflash) $('object,embed').css('visibility', 'hidden'); _checkPosition117656($(pp_images).length); $('.tsvg_pp_loader_icon117656').show(); if ($ppt.is(':hidden')) $ppt.css('opacity', 0).show(); $tsvg_pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity); $tsvg_pp_pic_holder117656.find('.tsvg_current_text_holder').text((set_position + 1) + settings.counter_separator_label + $(pp_images).length); $tsvg_pp_pic_holder117656.find('.tsvg_pp_description117656').show().html(unescape(pp_descriptions[set_position])); (settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(' '); movie_width = (parseFloat(grab_param117656('width', pp_images[set_position]))) ? grab_param117656('width', pp_images[set_position]) : settings.default_width.toString(); movie_height = (parseFloat(grab_param117656('height', pp_images[set_position]))) ? grab_param117656('height', pp_images[set_position]) : settings.default_height.toString(); if (movie_width.indexOf('%') != -1 || movie_height.indexOf('%') != -1) { movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true; } else { percentBased = false; } $tsvg_pp_pic_holder117656.fadeIn(function () { var tsvg_autoplay = jQuery('.tsvg-main-content-117656').attr('data-tsvg-autoplay'),imgPreloader = ""; if (pp_images[set_position].indexOf('youtube.com/shorts/') > -1 ) { pp_images[set_position] = pp_images[set_position].replace("shorts", "embed") } pp_images[set_position] = pp_images[set_position].replace('embed/', 'watch?v='); switch (_getFileType117656(pp_images[set_position])) { case 'image': imgPreloader = new Image(); nextImage = new Image(); if (isSet && set_position > $(pp_images).length) nextImage.src = pp_images[set_position + 1]; prevImage = new Image(); if (isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; $tsvg_pp_pic_holder117656.find('#tsvg_pp_full_res117656')[0].innerHTML = settings.image_markup; $tsvg_pp_pic_holder117656.find('#tsvg_full_res_image').attr('src', pp_images[set_position]); imgPreloader.onload = function () { correctSizes = _fitToViewport117656(imgPreloader.width, imgPreloader.height); _showContent117656(); }; imgPreloader.onerror = function () { alert('Image cannot be loaded. Make sure the path is correct and image exist.'); $.prettyPhoto117656.close(); }; imgPreloader.src = pp_images[set_position]; break; case 'youtube': correctSizes = _fitToViewport117656(movie_width, movie_height); movie = 'https://www.youtube.com/embed/' + grab_param117656('v', pp_images[set_position]); if (tsvg_autoplay == "true") { movie += "?autoplay=1&mute=1"; } toInject = settings.iframe_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, movie); break; case 'vimeo': correctSizes = _fitToViewport117656(movie_width, movie_height); movie_id = pp_images[set_position]; var regExp = movie_id.split('vimeo.com/'); var match = regExp[1]; movie = 'https://player.vimeo.com/' + match; if (tsvg_autoplay == "true") movie += "?autoplay=1&muted=1"; vimeo_width = correctSizes['width'] + '/embed/?moog_width=' + correctSizes['width']; toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, movie); break; case 'rumble': correctSizes = _fitToViewport117656(movie_width, movie_height); movie_id = pp_images[set_position]; var regExp = movie_id.split('rumble.com/'); var match = regExp[1]; movie = 'https://rumble.com/' + match; if (movie.indexOf('watch?v=') > -1) { movie = movie.replace('watch?v=','embed/'); } toInject = settings.iframe_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{path}/g,movie).replace('allowFullScreen','allowFullScreen sandbox="allow-scripts"'); break; case 'wistia': correctSizes = _fitToViewport117656(movie_width, movie_height); movie_id = pp_images[set_position]; var regExp = movie_id.match(/wistia\.com\/medias\/([a-zA-Z0-9\-_]+)/); var match = regExp[1]; movie = '//fast.wistia.net/embed/iframe/' + match + ''; toInject = settings.iframe_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, movie); break; case 'quicktime': correctSizes = _fitToViewport117656(movie_width, movie_height); correctSizes['height'] += 15; correctSizes['contentHeight'] += 15; correctSizes['containerHeight'] += 15; toInject = settings.quicktime_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay); break; case 'flash': correctSizes = _fitToViewport117656(movie_width, movie_height); flash_vars = pp_images[set_position]; flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10, pp_images[set_position].length); filename = pp_images[set_position]; filename = filename.substring(0, filename.indexOf('?')); toInject = settings.flash_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + '?' + flash_vars); break; case 'iframe': correctSizes = _fitToViewport117656(movie_width, movie_height); var frame_url = pp_images[set_position]; if (frame_url.indexOf("wistia") != -1) { var arr = frame_url.split('/'), frame_url = '//' + arr[2] + '/embed/iframe/' + arr[4]; toInject = settings.iframe_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, frame_url); } else { frame_url = frame_url.substr(0, frame_url.indexOf('iframe') - 1); toInject = settings.iframe_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, frame_url); } break; case 'custom': correctSizes = _fitToViewport117656(movie_width, movie_height); toInject = settings.custom_markup; break; case 'inline': myClone = $(pp_images[set_position]).clone().css({ 'width': settings.default_width }).wrapInner(`
`).appendTo($('body')); correctSizes = _fitToViewport117656($(myClone).width(), $(myClone).height()); $(myClone).remove(); toInject = settings.inline_markup.replace(/{content}/g, $(pp_images[set_position]).html()); break; case 'mp4': correctSizes = _fitToViewport117656(movie_width, movie_height); toInject = settings.mp4_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, pp_images[set_position]).replace(/{tsvg_autoplay_b}/g,tsvg_autoplay == "true" ? "autoplay" : ""); break; } if (!imgPreloader) { $tsvg_pp_pic_holder117656.find('#tsvg_pp_full_res117656')[0].innerHTML = toInject; _showContent117656(); } }) return false; } $.prettyPhoto117656.changePage = function (direction) { currentGalleryPage = 0; if (direction == 'previous') { set_position--; if (0 > set_position) { set_position = 0; return; } } else if (direction == 'next') { set_position++; if (set_position > $(pp_images).length - 1) { set_position = 0; } } else { set_position = direction; } if (!doresize) doresize = true; $('.pp_contract117656').removeClass('pp_contract117656').addClass('tsvg_pp_expand117656'); _hideContent117656(function () { $.prettyPhoto117656.open(); }) } $.prettyPhoto117656.changeGalleryPage = function (direction) { if (direction == 'next') { currentGalleryPage++; if (currentGalleryPage > totalPage) { currentGalleryPage = 0; } } else if (direction == 'previous') { currentGalleryPage--; if (0 > currentGalleryPage) { currentGalleryPage = totalPage; } } else { currentGalleryPage = direction; } itemsToSlide = (currentGalleryPage == totalPage) ? pp_images.length - ((totalPage) * itemsPerPage) : itemsPerPage; $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656 li').each(function (i) { $(this).animate({ 'left': (i * itemWidth) - ((itemsToSlide * itemWidth) * currentGalleryPage) }); }) } $.prettyPhoto117656.startSlideshow = function () { if (typeof pp_slideshow == 'undefined') { $tsvg_pp_pic_holder117656.find('.pp_play117656').unbind('click').removeClass('pp_play117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-play')).addClass('pp_pause117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-paus'),).click(function () { $.prettyPhoto117656.stopSlideshow(); return false; }) pp_slideshow = setInterval($.prettyPhoto117656.startSlideshow, settings.slideshow); } else { $.prettyPhoto117656.changePage('next'); } } $.prettyPhoto117656.stopSlideshow = function () { $tsvg_pp_pic_holder117656.find('.pp_pause117656').unbind('click').removeClass('pp_pause117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-paus'),).addClass('pp_play117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-play')).click(function () { $.prettyPhoto117656.startSlideshow(); return false; }) clearInterval(pp_slideshow); pp_slideshow = undefined; } $.prettyPhoto117656.close = function () { clearInterval(pp_slideshow); $tsvg_pp_pic_holder117656.stop().find('object,embed').css('visibility', 'hidden'); $('div.tsvg_pp_pic_holder117656,div.ppt117656,.tsvg_pp_fade117656').fadeOut(settings.animation_speed, function () { $(this).remove(); }) $tsvg_pp_overlay.fadeOut(settings.animation_speed, function () { if (navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest && $.browser.version == 6) $('select').css('visibility', 'visible'); if (settings.hideflash) $('object,embed').css('visibility', 'visible'); $(this).remove(); settings.callback(); doresize = true; pp_open = false; delete settings; }) } _showContent117656 = function () { $('.tsvg_pp_loader_icon117656').hide(); $ppt.fadeTo(settings.animation_speed, 1); new ResizeSensor($tsvg_pp_pic_holder117656.find('.tsvg_pp_fade_overlay117656'), function(event){ if(event.height > 0 && resizeHeight117656 != event.height && windowResized117656){ resizeHeight117656 = event.height; $tsvg_pp_pic_holder117656.find('.tsvg_pp_content117656').animate({ 'max-height': event.height}, 300); } }); $tsvg_pp_pic_holder117656.find('.tsvg_pp_hover_container117656,#tsvg_full_res_image').height(correctSizes['height']).width(correctSizes['width']); $tsvg_pp_pic_holder117656.find('.tsvg_pp_fade117656').fadeIn(settings.animation_speed); if (isSet && _getFileType117656(pp_images[set_position]) == "image") { $tsvg_pp_pic_holder117656.find('.tsvg_pp_hover_container117656').show(); } else { $tsvg_pp_pic_holder117656.find('.tsvg_pp_hover_container117656').hide(); } if (correctSizes['resized']) $('a.tsvg_pp_expand117656,a.pp_contract117656').fadeIn(settings.animation_speed); if (settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto117656.startSlideshow(); settings.changepicturecallback(); pp_open = true; _insert_gallery117656(); } function _hideContent117656(callback) { $tsvg_pp_pic_holder117656.find('#tsvg_pp_full_res117656 object,#tsvg_pp_full_res117656 embed').css('visibility', 'hidden'); $tsvg_pp_pic_holder117656.find('.tsvg_pp_fade117656').fadeOut(settings.animation_speed, function () { $('.tsvg_pp_loader_icon117656').show(); callback(); }) } function _checkPosition117656(setCount) { if (set_position == setCount - 1) { $tsvg_pp_pic_holder117656.find('a.tsvg_pp_next').css('visibility', 'hidden'); $tsvg_pp_pic_holder117656.find('a.tsvg_pp_next').addClass('disabled').unbind('click'); } else { $tsvg_pp_pic_holder117656.find('a.tsvg_pp_next').css('visibility', 'visible'); $tsvg_pp_pic_holder117656.find('a.tsvg_pp_next.disabled').removeClass('disabled').bind('click', function () { $.prettyPhoto117656.changePage('next'); return false; }) } if (set_position == 0) { $tsvg_pp_pic_holder117656.find('a.tsvg_pp_previous').css('visibility', 'hidden').addClass('disabled').unbind('click'); } else { $tsvg_pp_pic_holder117656.find('a.tsvg_pp_previous.disabled').css('visibility', 'visible').removeClass('disabled').bind('click', function () { $.prettyPhoto117656.changePage('previous'); return false; }) } (setCount > 1) ? $('.tsvg_pp_nav117656').show() : $('.tsvg_pp_nav117656').hide(); } function _fitToViewport117656(width, height) { resized = false; _getDimensions117656(width, height); imageWidth = width, imageHeight = height; if (((tsvg_pp_container_width > windowWidth) || (tsvg_pp_container_height > windowHeight)) && doresize && settings.allow_resize && !percentBased) { resized = true, fitting = false; while (!fitting) { if ((tsvg_pp_container_width > windowWidth)) { imageWidth = (windowWidth - 50); imageHeight = (height / width) * imageWidth; } else if ((tsvg_pp_container_height > windowHeight)) { imageHeight = (windowHeight - 150); imageWidth = (width / height) * imageHeight; } else { fitting = true; } tsvg_pp_container_height = imageHeight, tsvg_pp_container_width = imageWidth; } _getDimensions117656(imageWidth, imageHeight); } return { width: Math.floor(imageWidth), height: Math.floor(imageHeight), containerHeight: Math.floor(tsvg_pp_container_height) , containerWidth: Math.floor(tsvg_pp_container_width) , contentHeight: Math.floor(tsvg_pp_content_height + 60), contentWidth: Math.floor(tsvg_pp_content_width), resized: resized } } function _getDimensions117656(width, height) { width = parseFloat(width); height = parseFloat(height); tsvg_pp_border_width = parseFloat($tsvg_pp_pic_holder117656.css("border-left-width")) ; tsvg_pp_height = $tsvg_pp_pic_holder117656.height() + parseFloat(tsvg_pp_border_width * 2 ); tsvg_pp_width = $tsvg_pp_pic_holder117656.width() + parseFloat(tsvg_pp_border_width * 2 ); tsvg_pp_content_height = height + parseFloat(tsvg_pp_border_width * 2 ) ; tsvg_pp_content_width = width + parseFloat(tsvg_pp_border_width * 2 ) ; tsvg_pp_container_width = width ; tsvg_pp_container_height = tsvg_pp_content_height + parseFloat(tsvg_pp_border_width * 2 ) ; $tsvg_pp_pic_holder117656.attr('data-item-title-align', jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-title-align')) $tsvg_pp_pic_holder117656.attr('data-item-title-show', jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-title-show')) $tsvg_pp_pic_holder117656.find('.totalsoft-gv-lvg-pl-pa117656').attr('class', 'totalsoft-gv-lvg-pl-pa117656 pp_play117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-play')); $tsvg_pp_pic_holder117656.find('.totalsoft-gv-lvg-close117656').attr('class', 'totalsoft-gv-lvg-close117656 pp_close117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-close')); $tsvg_pp_pic_holder117656.find('.totalsoft-gv-lvg-close117656 span').text(jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-close-text')); $tsvg_pp_pic_holder117656.find('.tsvg_pp_arrow_previous117656').attr('class', 'tsvg_pp_arrow_previous117656 totalsoft-gv-lvg-nepr117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-prev')); $tsvg_pp_pic_holder117656.find('.tsvg_pp_arrow_next117656').attr('class', 'tsvg_pp_arrow_next117656 totalsoft-gv-lvg-nepr117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-next')); $tsvg_pp_pic_holder117656.find('.totalsoft-gv-lvg-close117656').attr('class', 'totalsoft-gv-lvg-close117656 pp_close117656 ' + jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-close')); } function _getFileType117656(itemSrc) { if (itemSrc.match(/youtube\.com\/watch/i)) { return 'youtube'; } else if (itemSrc.match(/vimeo\.com/i)) { return 'vimeo'; } else if (itemSrc.indexOf('.mov') != -1) { return 'quicktime'; } else if (itemSrc.indexOf('rumble') != -1) { return 'rumble'; } else if (itemSrc.indexOf('.swf') != -1) { return 'flash'; } else if (itemSrc.indexOf('.mp4') != -1) { return 'mp4'; } else if (itemSrc.indexOf('iframe') != -1) { return 'iframe'; } else if (itemSrc.indexOf('custom') != -1) { return 'custom'; } else if (itemSrc.substr(0, 1) == '#') { return 'inline'; } else if (itemSrc.match(/wistia\.com\/medias/i)) { return 'wistia'; } else { return 'image'; } } function _get_scroll117656() { if (self.pageYOffset) { return { scrollTop: self.pageYOffset, scrollLeft: self.pageXOffset }; } else if (document.documentElement && document.documentElement.scrollTop) { return { scrollTop: document.documentElement.scrollTop, scrollLeft: document.documentElement.scrollLeft }; } else if (document.body) { return { scrollTop: document.body.scrollTop, scrollLeft: document.body.scrollLeft }; } } function _insert_gallery117656() { if (isSet && settings.overlay_gallery && _getFileType117656(pp_images[set_position]) == "image") { itemWidth = 52 + 5; navWidth = (settings.theme == "facebook") ? 58 : 38; itemsPerPage = Math.floor((correctSizes['containerWidth'] - 100 - navWidth) / itemWidth); itemsPerPage = (pp_images.length > itemsPerPage) ? itemsPerPage : pp_images.length; totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1; if (totalPage == 0) { navWidth = 0; $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656 .tsvg_pp_arrow_next117656,.tsvg_pp_gallery117656 .tsvg_pp_arrow_previous117656').hide(); } else { $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656 .tsvg_pp_arrow_next117656,.tsvg_pp_gallery117656 .tsvg_pp_arrow_previous117656').show(); } ; galleryWidth = itemsPerPage * itemWidth + navWidth; $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656').width(galleryWidth).css('margin-left', -Math.floor((galleryWidth / 2))); $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656 ul').width(itemsPerPage * itemWidth).find('li.selected').removeClass('selected'); goToPage = totalPage >= (Math.floor(set_position / itemsPerPage)) ? Math.floor(set_position / itemsPerPage) : totalPage; if (itemsPerPage) { $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656').hide().show().removeClass('disabled'); } else { $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656').hide().addClass('disabled'); } $.prettyPhoto117656.changeGalleryPage(goToPage); $tsvg_pp_pic_holder117656.find(`.tsvg_pp_gallery117656 ul li:eq( ${set_position} )`).addClass('selected'); } else { $tsvg_pp_pic_holder117656.find('.tsvg_pp_content117656').unbind('mouseenter mouseleave'); $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656').hide(); } } function _buildOverlay117656(caller) { theRel = $(caller).attr('data-tsvg-href'); isSet = true; pp_images = (isSet) ? jQuery.map(matchedObjects, function (n, i) { return $(n).attr('data-tsvg-href'); }) : $.makeArray($(caller).attr('data-tsvg-href')); pp_titles = (isSet) ? jQuery.map(matchedObjects, function (n, i) { if ($(n).attr('data-tsvg-href').indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(caller).find('img').attr('alt')); pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function (n, i) { return $(n).attr('data-tsvg-title'); }) : $.makeArray($(caller).attr('data-tsvg-title')); $('body').append(settings.markup); $tsvg_pp_pic_holder117656 = $('.tsvg_pp_pic_holder117656'), $ppt = $('.ppt117656'), $tsvg_pp_overlay = $('div.tsvg_pp_overlay117656'); if (isSet && settings.overlay_gallery) { currentGalleryPage = 0; toInject = ""; for (var i = 0;pp_images > i.length; i++) { var regex = new RegExp("(.*?)\.(jpg|jpeg|png|gif)$"); var results = regex.exec(pp_images[i]); if (!results) { classname = 'default'; } else { classname = ''; } toInject += `
  • `; } toInject = settings.gallery_markup.replace(/{gallery}/g, toInject); $tsvg_pp_pic_holder117656.find('#tsvg_pp_full_res117656').after(toInject); $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656 .tsvg_pp_arrow_next117656').click(function () { $.prettyPhoto117656.changeGalleryPage('next'); $.prettyPhoto117656.stopSlideshow(); return false; }); $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656 .tsvg_pp_arrow_previous117656').click(function () { $.prettyPhoto117656.changeGalleryPage('previous'); $.prettyPhoto117656.stopSlideshow(); return false; }); $tsvg_pp_pic_holder117656.find('.tsvg_pp_content117656').hover(function () { $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656:not(.disabled)').fadeIn(); }, function () { $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656:not(.disabled)').fadeOut(); }); itemWidth = 57; $tsvg_pp_pic_holder117656.find('.tsvg_pp_gallery117656 ul li').each(function (i) { $(this).css({ 'position': 'absolute', 'left': i * itemWidth }); $(this).find('a').unbind('click').click(function () { $.prettyPhoto117656.changePage(i); $.prettyPhoto117656.stopSlideshow(); return false; }); }); } if (settings.slideshow) { $tsvg_pp_pic_holder117656.find('.tsvg_pp_nav117656').prepend('') $tsvg_pp_pic_holder117656.find('.tsvg_pp_nav117656 .pp_play117656').click(function () { $.prettyPhoto117656.startSlideshow(); return false; }); } $tsvg_pp_pic_holder117656.attr('class', 'tsvg_pp_pic_holder117656 ' + settings.theme); $tsvg_pp_overlay.css({ 'opacity': 0 }).bind('click', function () { if (!settings.modal) $.prettyPhoto117656.close(); }); $('i.pp_close117656').bind('click', function () { $.prettyPhoto117656.close(); return false; }); $('a.tsvg_pp_expand117656').bind('click', function (e) { if ($(this).hasClass('tsvg_pp_expand117656')) { $(this).removeClass('tsvg_pp_expand117656').addClass('pp_contract117656'); doresize = false; } else { $(this).removeClass('pp_contract117656').addClass('tsvg_pp_expand117656'); doresize = true; } _hideContent117656(function () { $.prettyPhoto117656.open(); }); return false; }); $tsvg_pp_pic_holder117656.find('.tsvg_pp_previous, .tsvg_pp_nav117656 .tsvg_pp_arrow_previous117656').bind('click', function () { $.prettyPhoto117656.changePage('previous'); $.prettyPhoto117656.stopSlideshow(); return false; }); $tsvg_pp_pic_holder117656.find('.tsvg_pp_next, .tsvg_pp_nav117656 .tsvg_pp_arrow_next117656').bind('click', function () { $.prettyPhoto117656.changePage('next'); $.prettyPhoto117656.stopSlideshow(); return false; }); } return this.unbind('click').click($.prettyPhoto117656.initialize).children('a').click(function () { let link = jQuery(this).attr('href'), target = jQuery(this).attr('target'); if (target != '_self') { window.open(link); } else { window.location.assign(link); } return false; }); } function grab_param117656(name, url) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^]*)"; var regex = new RegExp(regexS); var results = regex.exec(url); return (results == null) ? "" : results[1]; } })(jQuery); jQuery(document).on("ready", function ($) { jQuery(document).on("mousedown", ".tsvg-block-link-hover", function (e) { e.preventDefault(); e.stopPropagation(); return false; }); let tsvgLightBoxResizeTo117656, tsvgLightBoxHeight117656 = 0, tsvgDoneResizing117656 = function() { jQuery('#tsvg-section-117656').css("min-height",(jQuery('.tsvg-main-content-117656').height() + jQuery('#tsvg-section-117656 .tsvg-pagination-pages-wrapper').height()) + "px"); }; new ResizeSensor(jQuery('.tsvg-main-content-117656'), function(event){ tsvgLightBoxHeight117656 = event.height; clearTimeout(tsvgLightBoxResizeTo117656); tsvgLightBoxResizeTo117656 = setTimeout(tsvgDoneResizing117656, 100); }); }) function lightboxPhoto117656() { jQuery(".tsvg-lightbox-block-117656 figure").prettyPhoto117656({ animationSpeed:'fast', slideshow:5000, theme:'light_rounded', show_title:false, icon_play:jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-play'), icon_paus:jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-paus'), icon_close:jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-close'), icon_close_text:jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-close-text'), icon_next:jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-next'), icon_prev:jQuery(".tsvg-lb-blocks-container-117656").attr('data-item-prev'), overlay_gallery: false }); } if(jQuery().prettyPhoto117656) { jQuery('.tsvg-section-117656').fadeIn(); lightboxPhoto117656(); } }