(function($){
$("#justified_gallery_OMO36E").justifiedGallery({
sizeRangeSuffixes : {
'lt100': '',
'lt240': '',
'lt320': '',
'lt500': '',
'lt640': '',
'lt1024': ''
},rowHeight: 400,
margins: 10,
lastRow: "justify",
fixedHeight: false,
captions: false,
captionsColor: "#000000",
captionsOpacity: 0.7,
randomize: false,
maxRowHeight: 0,
rel: "OMO36E",
target: null,
refreshTime: 250,
cssAnimation: true,
captionsAnimationDuration: 500,
imagesAnimationDuration: 300,
captionsVisibleOpacity: 0.7,
class: "",
})
.on('jg.complete', function(){
$('#justified_gallery_OMO36E a').magnificPopup({type: 'image',
mainClass: 'mfp-with-zoom',
closeOnContentClick: true,
closeBtnInside: false,
preloader: 'true',
tLoading: '',
tClose: '',image: {
verticalFit: true,titleSrc: function(item) {
return "";
}},zoom: {
enabled: true,
duration: 300
},
gallery: {
enabled: true,
tPrev: '',
tNext: '',
tCounter: '(%curr%/%total%)'
},iframe: {
patterns: {
youtube: {
index: 'youtube.com/', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index).
id: 'v=', // String that splits URL in a two parts, second part should be %id%
// Or null - full URL will be returned
// Or a function that should return %id%, for example:
// id: function(url) { return 'parsed id'; }
src: '//www.youtube.com/embed/%id%?showinfo=0' // URL that will be set as a source for iframe.
},
youtu_be: {
index: 'youtu.be/',
id: '/',
src: '//www.youtube.com/embed/%id%?showinfo=0'
},
vimeo: {
index: 'vimeo.com/',
id: '/',
src: '//player.vimeo.com/video/%id%?byline=0&portrait=0'
}
}
}}); });
var galleries = [];
var gallery = $("#justified_gallery_OMO36E");
$(window).scroll(function() {
if ( galleries.length >= 1 ) {
var scroll_top = $(window).scrollTop();
var scroll_bottom = scroll_top + $(window).height();
var gallery_top = $(gallery).offset().top;
var gallery_height = $(gallery).innerHeight();
var gallery_bottom = gallery_top + gallery_height;
if( gallery_bottom <= scroll_bottom ) {
var images = galleries.splice(0,1);
var image_html = $("#load_more_holder_OMO36E").html(images).text();
$(gallery).append(image_html);
$(gallery).justifiedGallery('norewind');
}
}
}); })(jQuery);
#justified_gallery_OMO36E .sgg-caption {
background: rgb(0,0,0);
background: rgba(0,0,0,0.7);
color: #ffffff;
font-size: 1em;
font-weight: 400;
font-family: Helvetica, Arial, sans-serif;
}
#load_more_OMO36E {
background: #444444;
color: #ffffff;
}