On September 18, 2013 at 6:09 am
Open up fancybox.js file from the “js” folder of your theme and replace these lines:
jQuery('.single_page_post a, .type-attachment a').has('img').addClass('hasimg');
jQuery('.single_page_post .gallery a, .imgwrap a').removeClass('hasimg');
jQuery("a.hasimg").fancybox({
with this:
jQuery('.single_page_post a, .type-attachment a').has('img').addClass('hasimg');
jQuery('.single_page_post .gallery a, .imgwrap a').removeClass('hasimg');
jQuery(".post_content .gallery .hasimg[href$='.png'], .post_content .gallery .hasimg[href$='.jpg'], .post_content .gallery .hasimg[href$='.gif']").addClass('grouped_elements');
jQuery('.post_content .gallery .hasimg').attr("rel","group1");
jQuery(".hasimg[href$='.jpg'], .hasimg[href$='.png'], .hasimg[href$='.gif'], a.grouped_elements").fancybox({