  We introduce a new approach to the enumeration of rational slope parking
functions with respect to the area and a generalized dinv statistics, and
relate the combinatorics of parking functions to that of affine permutations.
We relate our construction to two previously known combinatorial constructions:
Haglund's bijection exchanging the pairs of statistics (area,dinv) and
(bounce,area) on Dyck paths, and Pak-Stanley labeling of the regions of k-Shi
hyperplane arrangements by k-parking functions. Essentially, our approach can
be viewed as a generalization and a unification of these two constructions. We
also relate our combinatorial constructions to representation theory. We derive
new formulas for the Poincare polynomials of certain affine Springer fibers and
describe a connection to the theory of finite dimensional representations of
DAHA and nonsymmetric Macdonald polynomials.
