wrap javascript object in jquery