Replace background-image with img + inline js