Javascript class to responsively recalculate an image map