simplified setAttribute calls to .attr
simplified setAttribute calls to .attr

made use of jQuery to clean up code.

TiddlySpace/tiddlyspace,FND/tiddlyspace,FND/tiddlyspace,FND/tiddlyspace,TiddlySpace/tiddlyspace,TiddlySpace/tiddlyspace