'
+ '
'
+ '');
if (jQuerGall.isEmptyObject(button)) {
jQuerGall('.icons_download').css('top', '5px');
}
}
});
jQuerGall(".gallery-fanc-next,.gallery-fanc-prev").on('click', function(){
jQuerGall(".gallery-fanc-next,.gallery-fanc-prev").unbind();
});
},
wrapCSS : osg.params.fancSettings.wrapCSS,
openEffect : osg.params.fancSettings.openEffect,
openSpeed : osg.params.fancSettings.openSpeed,
closeEffect : osg.params.fancSettings.closeEffect,
closeSpeed : osg.params.fancSettings.closeSpeed,
prevEffect : osg.params.fancSettings.prevEffect,
nextEffect : osg.params.fancSettings.nextEffect,
nextSpeed: osg.params.fancSettings.nextSpeed,
prevSpeed: osg.params.fancSettings.prevSpeed,
loop: osg.params.fancSettings.loop,
closeBtn: osg.params.fancSettings.closeBtn,
arrows: osg.params.fancSettings.arrows,
arrowsPosition: osg.params.fancSettings.arrowsPosition,
nextClick: osg.params.fancSettings.nextClick,
mouseWheel: osg.params.fancSettings.mouseWheel,
autoPlay: osg.params.fancSettings.autoPlay,
playSpeed: osg.params.fancSettings.playSpeed,
helpers : {
title : {type : 'inside'},
overlay : {locked: false,closeClick : 1,css : {'background' : 'rgba(0, 0, 0, 0.75)'}}
},
});
}
});
jQuerGall(container+" .os-cat-tab-images div:first-child").show();
jQuerGall(container+" .osgalery-cat-tabs li:first-child a").addClass("active");
var curCatId = jQuerGall(container+" .osgalery-cat-tabs a.active").attr('data-cat-id');
var curEnd = jQuerGall(container+" .osgalery-cat-tabs a.active").attr('data-end');
jQuerGall("#load-more-1").attr('data-cat-id', curCatId);
jQuerGall("#load-more-1").attr('data-end', curEnd);
jQuerGall(container+" .osgalery-cat-tabs a").click(function(e) {
e.preventDefault();
jQuerGall('li a').removeClass("active");
jQuerGall(container+" .os-cat-tab-images>div").hide();
jQuerGall(this).addClass("active");
curCatId = jQuerGall(container+" .osgalery-cat-tabs a.active").attr('data-cat-id');
jQuerGall("#load-more-1").attr('data-cat-id', curCatId);
curEnd = jQuerGall(container+" .osgalery-cat-tabs a.active").attr('data-end');
if(curEnd != -1)
jQuerGall("#load-more-1").removeAttr("disabled");
jQuerGall("#load-more-1").attr('data-end', curEnd);
jQuerGall(jQuerGall(this).attr("href")).fadeTo(500, 1);
});
osg.resizeGallery = function (){
imgBlockW = osg.getImgBlockWidth();
jQuerGall(container+" .img-block").css("width",imgBlockW+"%");
}
jQuerGall(window).resize(function(event) {
osg.resizeGallery();
});
}
osg.loadMore = function() {
}
osg.init();
}
window.osGallery1 = osGallery1;
})();
jQuerGall(window).on('load',function($) {
var gallery= new osGallery1(".os-gallery-tabs-main-1",{
minImgEnable : 1,
spaceBetween: 2.5,
minImgSize: 200,
numColumns: 3,
fancSettings:{
wrapCSS: 'os-os_fancybox-window',
openEffect: "none",
openSpeed: 500,
closeEffect: "none",
closeSpeed: 500,
prevEffect: "none",
nextEffect: "none",
nextSpeed: 500,
prevSpeed: 500,
loop: 0,
closeBtn: 1,
arrows: 1,
arrowsPosition: 1,
nextClick: 0,
mouseWheel: 0,
autoPlay: 0,
playSpeed: 3000,
buttons: new Array(),
downloadButton: 0 }
});
// add load more script
var limEnd = 5;
jQuerGall("#load-more-1").on("click", function() {
var path = "index.php?option=com_osgallery&format=raw";
jQuerGall.post(
path,
{
task : "loadMoreButton",
Itemid: '116',
end : jQuerGall("#load-more-1").attr('data-end'),
catId : jQuerGall("#load-more-1").attr('data-cat-id'),
galId : 1 },
function(data) {
if(data.success){
jQuerGall("#cat-"+data.catId).append(data.html);
jQuerGall("#cat-"+ data.catId+ ", #load-more-1").attr('data-end', data.limEnd);
if(data.limEnd == -1)
jQuerGall("#load-more-1").attr("disabled","disabled");
limEnd = data.limEnd;
gallery.resizeGallery();
}
}, 'json');
});
// end load more script
// add social sharing script
var href = window.location.href;
var img_el_id = '';
var pos = href.indexOf('os_image_id');
if (pos > -1)
img_el_id = href.substring(pos);
if(img_el_id && img_el_id.indexOf('os_image_id') > -1) {
if(document.getElementById(img_el_id) !== null){
jQuerGall('#' + img_el_id).trigger('click');
}
}
// end sharing script
});
