Surface waves in media having lateral inhomogeneities