rewriting DOM creation with jquery