tranform image to div with javascipt