Orthogonal polynomials with discontinuous weights