added js for closing image