A weighted empirical interpolation method: a priori convergence analysis and applications. (30th June 2014)