Jquery optimization

Some modifications to the jquery-code. Most of them are according to the tips in: http://www.learningjquery.com/2009/03/43439-reasons-to-use-append-correctly

Duration of the rendering of index.html (in this repo):  Firefox 15: before 2800 ms, after 2100 ms,
IE 9: before 15000 ms, after 6000 ms.