Another quick WordPress snippet.
Assuming that you have fancybox linked up to your WordPress install you can add the following to your theme’s functions.php file to open all images that are linked to their full size image with jQuery Fancy Box:-
// Add Fancy Box to Images add_action('wp_footer','auto_fancy_box'); function auto_fancy_box(){ if (!is_single() && !is_page()) return; ?> <SCRIPT TYPE="text/javascript"> jQuery(document).ready(function(){ jQuery(".div-containing-your-images").find("a:has(img)").addClass('group'); jQuery("a.group").fancybox({'transitionIn':'elastic','transitionOut':'elastic','speedIn':600,'speedOut':200,'overlayShow':false}); }); </SCRIPT> <?php }