' }, infobar : 1, baseClass : 'thumb_right' } }); // 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 = "0"; 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 = jQuerOs.os_fancybox.getInstance(); if(!os_fancy_box_getInst){ if(img_el_id && img_el_id.indexOf('os_image_id') > -1) { jQuerOs('#' + 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 && gallery_cat_id.indexOf('=') == -1){ jQuerOs('#' + gallery_cat_id + '1_2134011727').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 = jQuerOs.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); } jQuerOs('#' + img_el_id).trigger('click'); } else if (pos1 > -1) { img_el_id = href.substring(pos1); var ordering_id = jQuerOs('#' + 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(); window.history.back(); } var cat_id = ''; if(href.indexOf('cat-') > -1 && href.indexOf('os_image_id') == -1){ cat_id = href.substring(href.indexOf('cat-')); jQuerOs('#' + cat_id + '1_2134011727').trigger('click'); } from_history = false; }; // end sharing script });