Effects of confinement on static and dynamical properties of water