Statistical Mechanics of Networks