jFlow problem: Opposite of document.ready?

jFlow problem: Opposite of document.ready?

Hi guys,
 
I'm trying to use jFlow on my site, and have a bit of a problem.
 
What I have is a page with the slider that is hidden with CSS, and then when I click to bring the page onto the screen, the slider appears. I'm using this code:
 
$(document).ready(function(){
     $("#mySlides").jFlow({
         slides: "#mySlides",
         width: "400px",
         height: "300px",
         duration: 1000
        });
    });






 
The problem occurs when I close this page and re-open it. If I do that, the jFlow slider is erratic (skips slides, etc). So I'm thinking that I need to unload it from my pop up page, when a user closes it.
 
So, is there a function or something that will do the opposite of document.ready, and essentially unload the slider?
 
Thanks in advance.