'
},
infobar : 1,
baseClass : 'thumb_right'
}
});
jQuerGall(".tab-click-loadMore").click(function(){
gallery.loadMore("scroll");
})
gallery.loadMore("scroll");
// add social sharing script
var href = window.location.href;
var img_el_id = '';
var pos1 = href.indexOf('os_image_id');
var pos2 = href.lastIndexOf('#');
var os_show_load_more = "scroll";
if (pos1 > -1 && pos2 > - 1) {
img_el_id = href.substring(pos1, pos2);
}else if(pos1 > -1 && pos2 == -1){
img_el_id = href.substring(pos1);
}
os_fancy_box_getInst = jQuerGall.os_fancybox.getInstance();
if(!os_fancy_box_getInst){
if(img_el_id && img_el_id.indexOf('os_image_id') > -1) {
if(document.getElementById(img_el_id) == null){
if (os_show_load_more == 'auto'){
gallery.loadMore("auto");
}
else if (os_show_load_more !== null){
gallery.loadMore("button");
jQuerGall('#load-more-1_1974259895').trigger('click');
}
}
else {
jQuerGall('#' + img_el_id).trigger('click');
}
}
}
var position_gallery = href.indexOf('cat');
var gallery_cat_id = '';
var gallery_cat_id = href.substring(position_gallery);
if(gallery_cat_id.indexOf('&') > -1){
gallery_cat_id = gallery_cat_id.substr(0, gallery_cat_id.indexOf('&'));
}
if(gallery_cat_id && gallery_cat_id.indexOf('cat-') > -1){
jQuerGall('#' + gallery_cat_id + '1_1974259895').trigger('click');
}
window.onpopstate = function(event) {
//alert("location: " + document.location + ", state: " + JSON.stringify(event.state));
from_history = true;
var href = window.location.href;
var img_el_id = '';
var pos1 = href.indexOf('os_image_id');
var pos2 = href.lastIndexOf('-');
os_fancy_box_getInst = jQuerGall.os_fancybox.getInstance();
if (!os_fancy_box_getInst && (pos1 > -1)){
if (pos1 > -1 && href.indexOf('#os_fancybox') > - 1) {
pos2 = href.lastIndexOf('#os_fancybox')
img_el_id = href.substring(pos1, pos2);
}else if(pos1 > -1 && href.indexOf('#os_fancybox') == -1){
img_el_id = href.substring(pos1);
}
jQuerGall('#' + img_el_id).trigger('click');
}
else if (pos1 > -1) {
img_el_id = href.substring(pos1);
var ordering_id = jQuerGall('#' + img_el_id).attr('data-index');
os_fancy_box_getInst.jumpTo(ordering_id);
}else if(pos1 == -1 && href.indexOf('os_fancybox') == -1 && os_fancy_box_getInst){
os_fancy_box_getInst.close();
}
var cat_id = '';
if(href.indexOf('cat-') > -1 && href.indexOf('os_image_id') == -1){
cat_id = href.substring(href.indexOf('cat-'));
jQuerGall('#' + cat_id + '1_1974259895').trigger('click');
}
from_history = false;
};
// end sharing script
});