[UPDATE] changed behavior and use jQuery