added click to jquery/javascript doc ready seems likely to fix; also fixed javascript datastore bug