Help with swap depth

I’m trying to set up a gallery with individual flash windows for each image. I’ve got a couple buttons set up with actionscript to open the windows. each window is a seperate MC in the library with an instance on the stage. I want these instances to swap depths when they are over one another, but for some reason nothing I’ve tried will work. The windows in question are windowfail and window fail2. I’ve posted a FLA file, please help. thanks.