Hi Daniel,
May be this is posted too late but I think it will help someone any day,
You are displaying the images from the entire site because you are not receiving the post as parameter on your function, so it does something weird and grab the latest images that you upload on the site, just send the pust as parameter and it will work.
Ex:
function get_all_images($post){
$args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => 'inherit',
'post_mime_type' => 'image',
'post_parent' => $post->ID
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$link=wp_get_attachment_url($attachment->ID);
echo $out="<a rel='fBox' href=".$link.">";
echo "<img src=".$link.">";
echo "</a>";
}
}
}