Dynamic PNG shadow position & opacity with jQuery by Daniel Kurdoghlian The Source Code Below you can see the magic interesting part of my script: function moveShadow(){ lightX = parseInt(lightbulb.offset().left) + lightCenterX; lightY = parseInt(lightbulb.offset().top) + lightCenterY; logoX = parseInt(logo.offset().left) + logoCenterX; logoY = parseInt(logo.offset().top) + logoCenterY; distanceX