\
`, gallery_markup: '
', 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_scroll737463(); $(window).on('resize',function () { tsvgCheckWidth(); }); if (tsvg_pp_settings.keyboard_shortcuts) { $(document).unbind('keydown').keydown(function (e) { if (typeof $tsvg_pp_pic_holder737463 != 'undefined') { if ($tsvg_pp_pic_holder737463.is(':visible')) { switch (e.keyCode) { case 37: $.prettyPhoto737463.changePage('previous'); break; case 39: $.prettyPhoto737463.changePage('next'); break; case 27: if (!settings.modal) $.prettyPhoto737463.close(); break; } return false; } } }) } $.prettyPhoto737463.initialize = function () { settings = tsvg_pp_settings; if (navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest && parseInt($.browser.version) == 6) settings.theme = "light_square"; _buildOverlay737463(this); set_position = jQuery(this).closest('li').index(); $.prettyPhoto737463.open(); return false; } $.prettyPhoto737463.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"; _buildOverlay737463(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'); _checkPosition737463($(pp_images).length); $('.tsvg_pp_loader_icon737463').show(); if ($ppt.is(':hidden')) $ppt.css('opacity', 0).show(); $tsvg_pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity); $tsvg_pp_pic_holder737463.find('.tsvg_current_text_holder').text((set_position + 1) + settings.counter_separator_label + $(pp_images).length); $tsvg_pp_pic_holder737463.find('.tsvg_pp_description737463').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_param737463('width', pp_images[set_position]))) ? grab_param737463('width', pp_images[set_position]) : settings.default_width.toString(); movie_height = (parseFloat(grab_param737463('height', pp_images[set_position]))) ? grab_param737463('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_holder737463.fadeIn(function () { var tsvg_autoplay = jQuery('.tsvg-main-content-737463').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 (_getFileType737463(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_holder737463.find('#tsvg_pp_full_res737463')[0].innerHTML = settings.image_markup; $tsvg_pp_pic_holder737463.find('#tsvg_full_res_image').attr('src', pp_images[set_position]); imgPreloader.onload = function () { correctSizes = _fitToViewport737463(imgPreloader.width, imgPreloader.height); _showContent737463(); }; imgPreloader.onerror = function () { alert('Image cannot be loaded. Make sure the path is correct and image exist.'); $.prettyPhoto737463.close(); }; imgPreloader.src = pp_images[set_position]; break; case 'youtube': correctSizes = _fitToViewport737463(movie_width, movie_height); movie = 'https://www.youtube.com/embed/' + grab_param737463('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 = _fitToViewport737463(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 = _fitToViewport737463(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 = _fitToViewport737463(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 = _fitToViewport737463(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 = _fitToViewport737463(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 = _fitToViewport737463(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 = _fitToViewport737463(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 = _fitToViewport737463($(myClone).width(), $(myClone).height()); $(myClone).remove(); toInject = settings.inline_markup.replace(/{content}/g, $(pp_images[set_position]).html()); break; case 'mp4': correctSizes = _fitToViewport737463(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_holder737463.find('#tsvg_pp_full_res737463')[0].innerHTML = toInject; _showContent737463(); } }) return false; } $.prettyPhoto737463.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_contract737463').removeClass('pp_contract737463').addClass('tsvg_pp_expand737463'); _hideContent737463(function () { $.prettyPhoto737463.open(); }) } $.prettyPhoto737463.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_holder737463.find('.tsvg_pp_gallery737463 li').each(function (i) { $(this).animate({ 'left': (i * itemWidth) - ((itemsToSlide * itemWidth) * currentGalleryPage) }); }) } $.prettyPhoto737463.startSlideshow = function () { if (typeof pp_slideshow == 'undefined') { $tsvg_pp_pic_holder737463.find('.pp_play737463').unbind('click').removeClass('pp_play737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-play')).addClass('pp_pause737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-paus'),).click(function () { $.prettyPhoto737463.stopSlideshow(); return false; }) pp_slideshow = setInterval($.prettyPhoto737463.startSlideshow, settings.slideshow); } else { $.prettyPhoto737463.changePage('next'); } } $.prettyPhoto737463.stopSlideshow = function () { $tsvg_pp_pic_holder737463.find('.pp_pause737463').unbind('click').removeClass('pp_pause737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-paus'),).addClass('pp_play737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-play')).click(function () { $.prettyPhoto737463.startSlideshow(); return false; }) clearInterval(pp_slideshow); pp_slideshow = undefined; } $.prettyPhoto737463.close = function () { clearInterval(pp_slideshow); $tsvg_pp_pic_holder737463.stop().find('object,embed').css('visibility', 'hidden'); $('div.tsvg_pp_pic_holder737463,div.ppt737463,.tsvg_pp_fade737463').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; }) } _showContent737463 = function () { $('.tsvg_pp_loader_icon737463').hide(); $ppt.fadeTo(settings.animation_speed, 1); new ResizeSensor($tsvg_pp_pic_holder737463.find('.tsvg_pp_fade_overlay737463'), function(event){ if(event.height > 0 && resizeHeight737463 != event.height && windowResized737463){ resizeHeight737463 = event.height; $tsvg_pp_pic_holder737463.find('.tsvg_pp_content737463').animate({ 'max-height': event.height}, 300); } }); $tsvg_pp_pic_holder737463.find('.tsvg_pp_hover_container737463,#tsvg_full_res_image').height(correctSizes['height']).width(correctSizes['width']); $tsvg_pp_pic_holder737463.find('.tsvg_pp_fade737463').fadeIn(settings.animation_speed); if (isSet && _getFileType737463(pp_images[set_position]) == "image") { $tsvg_pp_pic_holder737463.find('.tsvg_pp_hover_container737463').show(); } else { $tsvg_pp_pic_holder737463.find('.tsvg_pp_hover_container737463').hide(); } if (correctSizes['resized']) $('a.tsvg_pp_expand737463,a.pp_contract737463').fadeIn(settings.animation_speed); if (settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto737463.startSlideshow(); settings.changepicturecallback(); pp_open = true; _insert_gallery737463(); } function _hideContent737463(callback) { $tsvg_pp_pic_holder737463.find('#tsvg_pp_full_res737463 object,#tsvg_pp_full_res737463 embed').css('visibility', 'hidden'); $tsvg_pp_pic_holder737463.find('.tsvg_pp_fade737463').fadeOut(settings.animation_speed, function () { $('.tsvg_pp_loader_icon737463').show(); callback(); }) } function _checkPosition737463(setCount) { if (set_position == setCount - 1) { $tsvg_pp_pic_holder737463.find('a.tsvg_pp_next').css('visibility', 'hidden'); $tsvg_pp_pic_holder737463.find('a.tsvg_pp_next').addClass('disabled').unbind('click'); } else { $tsvg_pp_pic_holder737463.find('a.tsvg_pp_next').css('visibility', 'visible'); $tsvg_pp_pic_holder737463.find('a.tsvg_pp_next.disabled').removeClass('disabled').bind('click', function () { $.prettyPhoto737463.changePage('next'); return false; }) } if (set_position == 0) { $tsvg_pp_pic_holder737463.find('a.tsvg_pp_previous').css('visibility', 'hidden').addClass('disabled').unbind('click'); } else { $tsvg_pp_pic_holder737463.find('a.tsvg_pp_previous.disabled').css('visibility', 'visible').removeClass('disabled').bind('click', function () { $.prettyPhoto737463.changePage('previous'); return false; }) } (setCount > 1) ? $('.tsvg_pp_nav737463').show() : $('.tsvg_pp_nav737463').hide(); } function _fitToViewport737463(width, height) { resized = false; _getDimensions737463(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; } _getDimensions737463(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 _getDimensions737463(width, height) { width = parseFloat(width); height = parseFloat(height); tsvg_pp_border_width = parseFloat($tsvg_pp_pic_holder737463.css("border-left-width")) ; tsvg_pp_height = $tsvg_pp_pic_holder737463.height() + parseFloat(tsvg_pp_border_width * 2 ); tsvg_pp_width = $tsvg_pp_pic_holder737463.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_holder737463.attr('data-item-title-align', jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-title-align')) $tsvg_pp_pic_holder737463.attr('data-item-title-show', jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-title-show')) $tsvg_pp_pic_holder737463.find('.totalsoft-gv-lvg-pl-pa737463').attr('class', 'totalsoft-gv-lvg-pl-pa737463 pp_play737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-play')); $tsvg_pp_pic_holder737463.find('.totalsoft-gv-lvg-close737463').attr('class', 'totalsoft-gv-lvg-close737463 pp_close737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-close')); $tsvg_pp_pic_holder737463.find('.totalsoft-gv-lvg-close737463 span').text(jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-close-text')); $tsvg_pp_pic_holder737463.find('.tsvg_pp_arrow_previous737463').attr('class', 'tsvg_pp_arrow_previous737463 totalsoft-gv-lvg-nepr737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-prev')); $tsvg_pp_pic_holder737463.find('.tsvg_pp_arrow_next737463').attr('class', 'tsvg_pp_arrow_next737463 totalsoft-gv-lvg-nepr737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-next')); $tsvg_pp_pic_holder737463.find('.totalsoft-gv-lvg-close737463').attr('class', 'totalsoft-gv-lvg-close737463 pp_close737463 ' + jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-close')); } function _getFileType737463(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_scroll737463() { 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_gallery737463() { if (isSet && settings.overlay_gallery && _getFileType737463(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_holder737463.find('.tsvg_pp_gallery737463 .tsvg_pp_arrow_next737463,.tsvg_pp_gallery737463 .tsvg_pp_arrow_previous737463').hide(); } else { $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463 .tsvg_pp_arrow_next737463,.tsvg_pp_gallery737463 .tsvg_pp_arrow_previous737463').show(); } ; galleryWidth = itemsPerPage * itemWidth + navWidth; $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463').width(galleryWidth).css('margin-left', -Math.floor((galleryWidth / 2))); $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463 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_holder737463.find('.tsvg_pp_gallery737463').hide().show().removeClass('disabled'); } else { $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463').hide().addClass('disabled'); } $.prettyPhoto737463.changeGalleryPage(goToPage); $tsvg_pp_pic_holder737463.find(`.tsvg_pp_gallery737463 ul li:eq( ${set_position} )`).addClass('selected'); } else { $tsvg_pp_pic_holder737463.find('.tsvg_pp_content737463').unbind('mouseenter mouseleave'); $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463').hide(); } } function _buildOverlay737463(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_holder737463 = $('.tsvg_pp_pic_holder737463'), $ppt = $('.ppt737463'), $tsvg_pp_overlay = $('div.tsvg_pp_overlay737463'); 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_holder737463.find('#tsvg_pp_full_res737463').after(toInject); $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463 .tsvg_pp_arrow_next737463').click(function () { $.prettyPhoto737463.changeGalleryPage('next'); $.prettyPhoto737463.stopSlideshow(); return false; }); $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463 .tsvg_pp_arrow_previous737463').click(function () { $.prettyPhoto737463.changeGalleryPage('previous'); $.prettyPhoto737463.stopSlideshow(); return false; }); $tsvg_pp_pic_holder737463.find('.tsvg_pp_content737463').hover(function () { $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463:not(.disabled)').fadeIn(); }, function () { $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463:not(.disabled)').fadeOut(); }); itemWidth = 57; $tsvg_pp_pic_holder737463.find('.tsvg_pp_gallery737463 ul li').each(function (i) { $(this).css({ 'position': 'absolute', 'left': i * itemWidth }); $(this).find('a').unbind('click').click(function () { $.prettyPhoto737463.changePage(i); $.prettyPhoto737463.stopSlideshow(); return false; }); }); } if (settings.slideshow) { $tsvg_pp_pic_holder737463.find('.tsvg_pp_nav737463').prepend('
') $tsvg_pp_pic_holder737463.find('.tsvg_pp_nav737463 .pp_play737463').click(function () { $.prettyPhoto737463.startSlideshow(); return false; }); } $tsvg_pp_pic_holder737463.attr('class', 'tsvg_pp_pic_holder737463 ' + settings.theme); $tsvg_pp_overlay.css({ 'opacity': 0 }).bind('click', function () { if (!settings.modal) $.prettyPhoto737463.close(); }); $('i.pp_close737463').bind('click', function () { $.prettyPhoto737463.close(); return false; }); $('a.tsvg_pp_expand737463').bind('click', function (e) { if ($(this).hasClass('tsvg_pp_expand737463')) { $(this).removeClass('tsvg_pp_expand737463').addClass('pp_contract737463'); doresize = false; } else { $(this).removeClass('pp_contract737463').addClass('tsvg_pp_expand737463'); doresize = true; } _hideContent737463(function () { $.prettyPhoto737463.open(); }); return false; }); $tsvg_pp_pic_holder737463.find('.tsvg_pp_previous, .tsvg_pp_nav737463 .tsvg_pp_arrow_previous737463').bind('click', function () { $.prettyPhoto737463.changePage('previous'); $.prettyPhoto737463.stopSlideshow(); return false; }); $tsvg_pp_pic_holder737463.find('.tsvg_pp_next, .tsvg_pp_nav737463 .tsvg_pp_arrow_next737463').bind('click', function () { $.prettyPhoto737463.changePage('next'); $.prettyPhoto737463.stopSlideshow(); return false; }); } return this.unbind('click').click($.prettyPhoto737463.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_param737463(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 tsvgLightBoxResizeTo737463, tsvgLightBoxHeight737463 = 0, tsvgDoneResizing737463 = function() { jQuery('#tsvg-section-737463').css("min-height",(jQuery('.tsvg-main-content-737463').height() + jQuery('#tsvg-section-737463 .tsvg-pagination-pages-wrapper').height()) + "px"); }; new ResizeSensor(jQuery('.tsvg-main-content-737463'), function(event){ tsvgLightBoxHeight737463 = event.height; clearTimeout(tsvgLightBoxResizeTo737463); tsvgLightBoxResizeTo737463 = setTimeout(tsvgDoneResizing737463, 100); }); }) function lightboxPhoto737463() { jQuery(".tsvg-lightbox-block-737463 figure").prettyPhoto737463({ animationSpeed:'fast', slideshow:5000, theme:'light_rounded', show_title:false, icon_play:jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-play'), icon_paus:jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-paus'), icon_close:jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-close'), icon_close_text:jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-close-text'), icon_next:jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-next'), icon_prev:jQuery(".tsvg-lb-blocks-container-737463").attr('data-item-prev'), overlay_gallery: false }); } if(jQuery().prettyPhoto737463) { jQuery('.tsvg-section-737463').fadeIn(); lightboxPhoto737463(); } }