changed styles and added click event to modal window to destory it