2021-04-21 18:17:34 +03:00
|
|
|
/**
|
2022-12-13 16:41:32 +03:00
|
|
|
* Set up image stuff
|
2022-10-25 14:26:44 +03:00
|
|
|
*/
|
2021-04-21 18:17:34 +03:00
|
|
|
|
2022-12-13 16:41:32 +03:00
|
|
|
(function() {
|
|
|
|
if ($('#core-wrapper img[data-src]') <= 0) {
|
2022-10-25 14:26:44 +03:00
|
|
|
return;
|
|
|
|
}
|
2021-04-21 18:17:34 +03:00
|
|
|
|
2022-12-13 16:41:32 +03:00
|
|
|
/* See: <https://github.com/dimsemenov/Magnific-Popup> */
|
2022-10-25 14:26:44 +03:00
|
|
|
$('.popup').magnificPopup({
|
|
|
|
type: 'image',
|
|
|
|
closeOnContentClick: true,
|
|
|
|
showCloseBtn: false,
|
|
|
|
zoom: {
|
|
|
|
enabled: true,
|
|
|
|
duration: 300,
|
|
|
|
easing: 'ease-in-out'
|
|
|
|
}
|
|
|
|
});
|
2021-04-21 18:17:34 +03:00
|
|
|
|
2022-12-13 16:41:32 +03:00
|
|
|
/* Stop shimmer when image loaded */
|
|
|
|
document.addEventListener('lazyloaded', function(e) {
|
|
|
|
const $img = $(e.target);
|
|
|
|
$img.parent().removeClass('shimmer');
|
|
|
|
});
|
2021-07-19 18:22:04 +03:00
|
|
|
|
2022-12-13 16:41:32 +03:00
|
|
|
})();
|