Fixed some bugs and upgrade jQuery to version 1.9.1