function new_excerpt_more($more) {
global $post;
return '<a href="'. get_permalink($post->ID) . '" id="whatever">Read the Rest...</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
You can see more here.
Try…
$pages_query = $wpdb->prepare("SELECT COUNT(*) FROM Table WHERE FullName LIKE '%s';", '%'.$NameSearch.'%');
$pages = ceil($wpdb->get_results($pages_query, 0) / $per_page);
You can use the image_send_to_editor filter, but this is probably easier to do via jQuery in your <head> tag somewhere:
jQuery(document).ready(function($){
$('a[href$="jpg"], a[href$="png"], a[href$="jpeg"]').attr('rel', 'prettyPhoto');
});
Haven’t tested it, but if you add this before the prettyPhoto js is included, it should work.