Nominal and real wage rigidity in a friction model