Finished jQuery/javascript functionality of game