Spin glasses, random graphs and percolation