Display issues for footer gallery on "Page Not Found" page

Permalink
I've got a site I'm working on (C5 v5.4.2.2) where I am using a modified version of Jordan Lev's "Simple Image Gallery" to display a lightboxed gallery of images from the footer of the site. Check out a link to a functioning page here: http://tinyurl.com/83phkpq The gallery is down in the middle of the footer and displays & functions as you'd expect.

I added the gallery to all of the "normal" pages of the site through the Defaults for all of the page types... and pushed it down to the existing "children" in the usual way.

Now comes the strange behavior: I was testing the site and tried entering an invalid URL to check out my "Page Not Found" page (http://tinyurl.com/88seoll ). At first, the gallery wasn't there... so I edited the page and added the correct block to the area, exited and saved. Now, the gallery shows up, but the formatting isn't carrying over.

I have a "page_not_found.php" file in my theme that has the same structure as all of my other pages, but has the content I wanted to display for the Not Found page hard-coded into it. It's code looks like this:

<?php defined('C5_EXECUTE') or die(_("Access Denied.")); 
$this->inc('elements/header.php'); 
?>
<!-- Main Content Elements go here -->
<div id="contentWrapper">
   <div id="content">
      <div class="highlight" style="min-height: 500px;">
         <h1>We're Sorry! That Page Can't Be Found!</h1>
         <p>Either it has been moved, or the link you followed was broken.</p>
         <p>Please use one of the links in our navigation panel above (or in the footer) to find what you were looking for.</p>
      </div><!-- End highlight -->
   </div><!-- End content -->
</div><!-- End contentWrapper -->
<?php $this->inc('elements/footer.php'); ?>


So why wouldn't it display the footer gallery correctly? I'm guessing there's some weird pathing issue when you're dealing with one of these "special" types of pages... but what would it be? And is there something I can do to correct it?

Thanks for any help!

- John

arrestingdevelopment