Using $document instead of document in domquery