  We present simultaneous XMM-Newton UV and X-ray observations of the quadruply
lensed quasar SDSS J1004+4112 (RBS 825). Simultaneously with the XMM-Newton
observations we also performed integral field spectroscopy on the two closest
lens images A and B using the Calar Alto PMAS spectrograph. In X-rays the
widely spaced components C and D are clearly resolved, while the closer pair of
images A and B is marginally resolved in the XMM-EPIC images. The integrated
X-ray flux of the system has decreased by a factor of 6 since it was observed
in the ROSAT All Sky Survey in 1990, while the X-ray spectrum became much
harder with the power law index evolving from Gamma=-2.3 to -1.86. By
deblending the X-ray images of the lensed QSO we find that the X-ray flux
ratios between the lens images A and B are significantly different from the
simultaneously obtained UV ratios and previously measured optical flux ratios.
Our optical spectrum of lens image A shows an enhancement in the blue emission
line wings, which has been observed in previous epochs as a transient feature.
We propose a scenario where intrinsic UV and X-ray variability gives rise to
line variations which are selectively magnified in image A by microlensing. The
extended emission of the lensing cluster of galaxies is clearly detected in the
EPIC images, we measure a 0.5-2.0 keV luminosity of 1.4 E44 erg/s. Based on the
cluster X-ray properties, we estimate a mass of 2-6 E14 solar masses.
