complete paint app using ajax,jquery,postgresql