The first thing to do is to put your functions inside the ready method, that will execute those functions after the DOM has loaded.
<script type="text/javascript">
jQuery(document).ready(function() {
// Your functions come here
});
</script>
Then just put your script before the </body>. This way the append will be triggered just as the dom loads.
<script type="text/javascript">
$('head').append();
</script>
Another aproach is to use the load event:
Check this link with the working example, within it I've set the body with a green background, it loads the stackoverflow stylesheet that when finishes loading it changes the body to white.
http://jsfiddle.net/CQbqA/1/
<head>block from the getgo without using jquery?