Use jQuery.
wrap configurator elements in #configurator.
begin dynamic generation code.
Moved configurator stuff into separat function.
Added code to finish dynamic generation.