We examine antiferromagnetic and d-wave superfluid phases of cold fermionic atoms with repulsive interactions in a two-dimensional optical lattice combined with a harmonic trapping potential. For experimentally realistic parameters, the trapping potential leads to the coexistence of magnetic and superfluid ordered phases with the normal phase. We study the intriguing shell structures arising from the competition between the magnetic and superfluid order as a function of the filling fraction. In certain cases antiferromagnetism induce superfluidity by charge redistributions. We furthermore demonstrate how these shell structures can be detected as distinct anti-bunching dips and pairing peaks in the density-density correlation function probed in expansion experiments.