2014-10-28 11:23:50 +01:00
|
|
|
jQuery(document).ready(function($){
|
2014-10-27 14:39:31 +01:00
|
|
|
|
|
|
|
// remove anchors onclick handler, if have
|
2014-10-28 11:23:50 +01:00
|
|
|
$('a[rel^="magnificPopup"]').removeAttr('onclick');
|
|
|
|
$('a[rel="onemagnificPopup"]').removeAttr('onclick');
|
2014-10-27 14:39:31 +01:00
|
|
|
|
|
|
|
// get all magnificPopup anchors by group
|
|
|
|
$('a:visible[rel^="magnificPopup"]').each(function() {
|
|
|
|
// get the real rel attribute name including index entry id, eg "magnificPopup[28]"
|
|
|
|
theRel = $(this).attr('rel');
|
|
|
|
|
|
|
|
// check grouped galleries
|
|
|
|
//console.log(theRel);
|
|
|
|
|
|
|
|
// Init magnificPopup for grouped galleries
|
|
|
|
$('a:visible[rel^="'+theRel+'"]').magnificPopup({
|
2014-11-01 20:00:10 +01:00
|
|
|
type: 'image',
|
|
|
|
gallery: { enabled: true },
|
|
|
|
removalDelay: 300,
|
|
|
|
mainClass: 'popup-slide'
|
2014-10-27 14:39:31 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// this is a single image only init - plugin option : Single Image
|
2014-10-28 11:23:50 +01:00
|
|
|
$('a:visible[rel="onemagnificPopup"]').magnificPopup({
|
2014-10-27 14:39:31 +01:00
|
|
|
type:'image'
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|