Virtual Resources
Welcome to our Virtual Resources – your one-stop destination for essential information as you embark on your academic journey with us.
\
\
\
\
\
\
\
\
\
\
\
{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_scroll635552();
$(window).on('resize',function () {
tsvgCheckWidth();
});
if (tsvg_pp_settings.keyboard_shortcuts) {
$(document).unbind('keydown').keydown(function (e) {
if (typeof $tsvg_pp_pic_holder635552 != 'undefined') {
if ($tsvg_pp_pic_holder635552.is(':visible')) {
switch (e.keyCode) {
case 37:
$.prettyPhoto635552.changePage('previous');
break;
case 39:
$.prettyPhoto635552.changePage('next');
break;
case 27:
if (!settings.modal) $.prettyPhoto635552.close();
break;
}
return false;
}
}
})
}
$.prettyPhoto635552.initialize = function () {
settings = tsvg_pp_settings;
if (navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest && parseInt($.browser.version) == 6) settings.theme = "light_square";
_buildOverlay635552(this);
set_position = jQuery(this).closest('li').index();
$.prettyPhoto635552.open();
return false;
}
$.prettyPhoto635552.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";
_buildOverlay635552(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');
_checkPosition635552($(pp_images).length);
$('.tsvg_pp_loader_icon635552').show();
if ($ppt.is(':hidden')) $ppt.css('opacity', 0).show();
$tsvg_pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity);
$tsvg_pp_pic_holder635552.find('.tsvg_current_text_holder').text((set_position + 1) + settings.counter_separator_label + $(pp_images).length);
$tsvg_pp_pic_holder635552.find('.tsvg_pp_description635552').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_param635552('width', pp_images[set_position]))) ? grab_param635552('width', pp_images[set_position]) : settings.default_width.toString();
movie_height = (parseFloat(grab_param635552('height', pp_images[set_position]))) ? grab_param635552('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_holder635552.fadeIn(function () {
var tsvg_autoplay = jQuery('.tsvg-main-content-635552').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 (_getFileType635552(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_holder635552.find('#tsvg_pp_full_res635552')[0].innerHTML = settings.image_markup;
$tsvg_pp_pic_holder635552.find('#tsvg_full_res_image').attr('src', pp_images[set_position]);
imgPreloader.onload = function () {
correctSizes = _fitToViewport635552(imgPreloader.width, imgPreloader.height);
_showContent635552();
};
imgPreloader.onerror = function () {
alert('Image cannot be loaded. Make sure the path is correct and image exist.');
$.prettyPhoto635552.close();
};
imgPreloader.src = pp_images[set_position];
break;
case 'youtube':
correctSizes = _fitToViewport635552(movie_width, movie_height);
movie = 'https://www.youtube.com/embed/' + grab_param635552('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 = _fitToViewport635552(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 = _fitToViewport635552(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 = _fitToViewport635552(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 = _fitToViewport635552(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 = _fitToViewport635552(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 = _fitToViewport635552(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 = _fitToViewport635552(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 = _fitToViewport635552($(myClone).width(), $(myClone).height());
$(myClone).remove();
toInject = settings.inline_markup.replace(/{content}/g, $(pp_images[set_position]).html());
break;
case 'mp4':
correctSizes = _fitToViewport635552(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_holder635552.find('#tsvg_pp_full_res635552')[0].innerHTML = toInject;
_showContent635552();
}
})
return false;
}
$.prettyPhoto635552.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_contract635552').removeClass('pp_contract635552').addClass('tsvg_pp_expand635552');
_hideContent635552(function () {
$.prettyPhoto635552.open();
})
}
$.prettyPhoto635552.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_holder635552.find('.tsvg_pp_gallery635552 li').each(function (i) {
$(this).animate({ 'left': (i * itemWidth) - ((itemsToSlide * itemWidth) * currentGalleryPage) });
})
}
$.prettyPhoto635552.startSlideshow = function () {
if (typeof pp_slideshow == 'undefined') {
$tsvg_pp_pic_holder635552.find('.pp_play635552').unbind('click').removeClass('pp_play635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-play')).addClass('pp_pause635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-paus'),).click(function () {
$.prettyPhoto635552.stopSlideshow();
return false;
})
pp_slideshow = setInterval($.prettyPhoto635552.startSlideshow, settings.slideshow);
}
else {
$.prettyPhoto635552.changePage('next');
}
}
$.prettyPhoto635552.stopSlideshow = function () {
$tsvg_pp_pic_holder635552.find('.pp_pause635552').unbind('click').removeClass('pp_pause635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-paus'),).addClass('pp_play635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-play')).click(function () {
$.prettyPhoto635552.startSlideshow();
return false;
})
clearInterval(pp_slideshow);
pp_slideshow = undefined;
}
$.prettyPhoto635552.close = function () {
clearInterval(pp_slideshow);
$tsvg_pp_pic_holder635552.stop().find('object,embed').css('visibility', 'hidden');
$('div.tsvg_pp_pic_holder635552,div.ppt635552,.tsvg_pp_fade635552').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;
})
}
_showContent635552 = function () {
$('.tsvg_pp_loader_icon635552').hide();
$ppt.fadeTo(settings.animation_speed, 1);
new ResizeSensor($tsvg_pp_pic_holder635552.find('.tsvg_pp_fade_overlay635552'), function(event){
if(event.height > 0 && resizeHeight635552 != event.height && windowResized635552){
resizeHeight635552 = event.height;
$tsvg_pp_pic_holder635552.find('.tsvg_pp_content635552').animate({ 'max-height': event.height}, 300);
}
});
$tsvg_pp_pic_holder635552.find('.tsvg_pp_hover_container635552,#tsvg_full_res_image').height(correctSizes['height']).width(correctSizes['width']);
$tsvg_pp_pic_holder635552.find('.tsvg_pp_fade635552').fadeIn(settings.animation_speed);
if (isSet && _getFileType635552(pp_images[set_position]) == "image") {
$tsvg_pp_pic_holder635552.find('.tsvg_pp_hover_container635552').show();
}
else {
$tsvg_pp_pic_holder635552.find('.tsvg_pp_hover_container635552').hide();
}
if (correctSizes['resized']) $('a.tsvg_pp_expand635552,a.pp_contract635552').fadeIn(settings.animation_speed);
if (settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto635552.startSlideshow();
settings.changepicturecallback();
pp_open = true;
_insert_gallery635552();
}
function _hideContent635552(callback) {
$tsvg_pp_pic_holder635552.find('#tsvg_pp_full_res635552 object,#tsvg_pp_full_res635552 embed').css('visibility', 'hidden');
$tsvg_pp_pic_holder635552.find('.tsvg_pp_fade635552').fadeOut(settings.animation_speed, function () {
$('.tsvg_pp_loader_icon635552').show();
callback();
})
}
function _checkPosition635552(setCount) {
if (set_position == setCount - 1) {
$tsvg_pp_pic_holder635552.find('a.tsvg_pp_next').css('visibility', 'hidden');
$tsvg_pp_pic_holder635552.find('a.tsvg_pp_next').addClass('disabled').unbind('click');
}
else {
$tsvg_pp_pic_holder635552.find('a.tsvg_pp_next').css('visibility', 'visible');
$tsvg_pp_pic_holder635552.find('a.tsvg_pp_next.disabled').removeClass('disabled').bind('click', function () {
$.prettyPhoto635552.changePage('next');
return false;
})
}
if (set_position == 0) {
$tsvg_pp_pic_holder635552.find('a.tsvg_pp_previous').css('visibility', 'hidden').addClass('disabled').unbind('click');
}
else {
$tsvg_pp_pic_holder635552.find('a.tsvg_pp_previous.disabled').css('visibility', 'visible').removeClass('disabled').bind('click', function () {
$.prettyPhoto635552.changePage('previous');
return false;
})
}
(setCount > 1) ? $('.tsvg_pp_nav635552').show() : $('.tsvg_pp_nav635552').hide();
}
function _fitToViewport635552(width, height) {
resized = false;
_getDimensions635552(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;
}
_getDimensions635552(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 _getDimensions635552(width, height) {
width = parseFloat(width);
height = parseFloat(height);
tsvg_pp_border_width = parseFloat($tsvg_pp_pic_holder635552.css("border-left-width")) ;
tsvg_pp_height = $tsvg_pp_pic_holder635552.height() + parseFloat(tsvg_pp_border_width * 2 );
tsvg_pp_width = $tsvg_pp_pic_holder635552.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_holder635552.attr('data-item-title-align', jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-title-align'))
$tsvg_pp_pic_holder635552.attr('data-item-title-show', jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-title-show'))
$tsvg_pp_pic_holder635552.find('.totalsoft-gv-lvg-pl-pa635552').attr('class', 'totalsoft-gv-lvg-pl-pa635552 pp_play635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-play'));
$tsvg_pp_pic_holder635552.find('.totalsoft-gv-lvg-close635552').attr('class', 'totalsoft-gv-lvg-close635552 pp_close635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-close'));
$tsvg_pp_pic_holder635552.find('.totalsoft-gv-lvg-close635552 span').text(jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-close-text'));
$tsvg_pp_pic_holder635552.find('.tsvg_pp_arrow_previous635552').attr('class', 'tsvg_pp_arrow_previous635552 totalsoft-gv-lvg-nepr635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-prev'));
$tsvg_pp_pic_holder635552.find('.tsvg_pp_arrow_next635552').attr('class', 'tsvg_pp_arrow_next635552 totalsoft-gv-lvg-nepr635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-next'));
$tsvg_pp_pic_holder635552.find('.totalsoft-gv-lvg-close635552').attr('class', 'totalsoft-gv-lvg-close635552 pp_close635552 ' + jQuery(".tsvg-lb-blocks-container-635552").attr('data-item-close'));
}
function _getFileType635552(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_scroll635552() {
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_gallery635552() {
if (isSet && settings.overlay_gallery && _getFileType635552(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_holder635552.find('.tsvg_pp_gallery635552 .tsvg_pp_arrow_next635552,.tsvg_pp_gallery635552 .tsvg_pp_arrow_previous635552').hide();
}
else {
$tsvg_pp_pic_holder635552.find('.tsvg_pp_gallery635552 .tsvg_pp_arrow_next635552,.tsvg_pp_gallery635552 .tsvg_pp_arrow_previous635552').show();
}
; galleryWidth = itemsPerPage * itemWidth + navWidth;
$tsvg_pp_pic_holder635552.find('.tsvg_pp_gallery635552').width(galleryWidth).css('margin-left', -Math.floor((galleryWidth / 2)));
$tsvg_pp_pic_holder635552.find('.tsvg_pp_gallery635552 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_holder635552.find('.tsvg_pp_gallery635552').hide().show().removeClass('disabled');
}
else {
$tsvg_pp_pic_holder635552.find('.tsvg_pp_gallery635552').hide().addClass('disabled');
}
$.prettyPhoto635552.changeGalleryPage(goToPage);
$tsvg_pp_pic_holder635552.find(`.tsvg_pp_gallery635552 ul li:eq( ${set_position} )`).addClass('selected');
}
else {
$tsvg_pp_pic_holder635552.find('.tsvg_pp_content635552').unbind('mouseenter mouseleave');
$tsvg_pp_pic_holder635552.find('.tsvg_pp_gallery635552').hide();
}
}
function _buildOverlay635552(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_holder635552 = $('.tsvg_pp_pic_holder635552'), $ppt = $('.ppt635552'), $tsvg_pp_overlay = $('div.tsvg_pp_overlay635552');
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 += `