updated dreaming in jquery