jQuery usage bugs & simplify html