Added var declaration to js query object