<?php
if ($node = node_load(arg(1))) {
  $node_language = (isset($node->language) && strlen($node->language)) ? $node->language : LANGUAGE_NONE;
  if ($node->type == 'project' && in_array($node->field_project_status[$node_language][0]['value'], array('draft', 'submitted', 'archived'))) {//need to force render for these non-published states
    $overview = render(field_view_field('node', $node, 'body'));
    $media = render(field_view_field('node', $node, 'field_project_image'));
?>
<div id="overview-placeholder" style="display:none;"><?php print $overview; ?></div>
<div id="media-placeholder" style="display:none;"><?php print $media; ?></div>
<script type="text/javascript">
jQuery(document).ready(function(){
  jQuery('#qt-deliver_project_overview_support-ui-tabs1').append(jQuery('#overview-placeholder').show());
  jQuery('#block-system-main .content').append(jQuery('#media-placeholder').show());
});
</script>
<?php
  }
}
?>