  We introduce the notion of crossings and nestings of a permutation. We
compute the generating function of permutations with a fixed number of weak
exceedances, crossings and nestings. We link alignments and permutation
patterns to these statistics. We generalize to the case of decorated
permutations. Finally we show how this is related to the stationary
distribution of the Partially ASymmetric Exclusion Process (PASEP) model.
