  Let X=H\G be a homogeneous spherical variety for a split reductive group G
over the integers o of a p-adic field k, and K=G(o) a hyperspecial maximal
compact subgroup of G=G(k). We compute eigenfunctions ("spherical functions")
on X=X(k) under the action of the unramified (or spherical) Hecke algebra of G,
generalizing many classical results of "Casselman-Shalika" type. Under some
additional assumptions on X we also prove a variant of the formula which
involves a certain quotient of L-values, and we present several applications
such as: (1) a statement on "good test vectors" in the multiplicity-free case
(namely, that an H-invariant functional on an irreducible unramified
representation \pi is non-zero on \pi^K), (2) the unramified Plancherel formula
for X, including a formula for the "Tamagawa measure" of X(o), and (3) a
computation of the most continuous part of H-period integrals of principal
Eisenstein series.
