/*
 * This is a magic script which will extract all the elements from the body and
 * add them into a div element which allows for the autocentering. Also
 * contains the navigation bar. Cut and paste of template.js but the html
 * refered to by the template var refers to the larger images on the front
 * page
 *
 */

var template = '<img id="scroll"src="img/scroll.png" />            <a id="title" href="default.html"><img src="img/faith_title.png" /></a>            <img src="img/subtitle.png" id="subtitle" />            <div id="navigation">                <div class="navitem"><a href="about.html"><img src="img/about.png"/></a></div>                <div class="navitem"><a href="prices.html"><img src="img/prices.png"/></a></div>                <div class="navitem"><a href="gallery.html"><img src="img/gallery.png"/></a></div>                <div class="navitem"><a href="links.html"><img src="img/links.png"/></a></div>                <div class="navitem"><a href="http://faithbarber.wordpress.com/"><img src="img/blog.png"/></a></div>                <div class="navitem"><a href="contact.html"><img src="img/contact.png"/></a></div>            </div><div id="copyright">©2008 Faith Barber</div>';

dojo.addOnLoad(function(){
    var elem = dojo.doc.createElement( 'div' );
    elem.id='template';
    elem.className='tundra'
    dojo.require("dojo.html");
    dojo.html.set(elem, template);
    var body = dojo.body();
    while(body.firstChild != null){
        elem.appendChild(body.firstChild);
    }
    body.appendChild(elem);
    body.style.visibility = 'visible'
});


