Use of percolation clusters in nucleation theory