jQuery usage bugs & html simplification