Can any one help me in proving the following equality:

$$n^n= \sum_{i=1}^n {n \choose i}\cdot i^{i-1}\cdot (n-i)^{n-i}$$

I tried some different ideas but none of them worked!