Added ajax support, updated demo.js