There are some libs out there for AJAX that allow you to just define a <div> like:
<div class="ajax" id="pagename.html"></div>
and the div will load the page defined. (I wrote one that does the above and have seen others that have similar syntax)
Maybe that would be a start to work on. I have only looked at smarty but never used it so I'm not sure how to define new template variables but the thing would be to use smarty to generate the html above...
If someone could post up a solution to having smarty write out the following output: