jQuery(document).ready(function(){ jQuery("a[rel^='prettyPhoto']").prettyPhoto(); });