clear and show loader on popout div
<p>I'm using the follow jquery to show certain links in a popout div. When the div is closed a new link is clicked to open in a the div, the old content shows until the new content is loaded. Is there a way to clear the div and/or show a preloader until the new content is loaded?</p>

<pre><code>$(function() {

    // if the function argument is given to overlay,
    // it is assumed to be the onBeforeLoad event listener
    $("a[rel]").overlay({

        mask: 'black',
        effect: 'apple',

        onBeforeLoad: function() {

            // grab wrapper element inside content
            var wrap = this.getOverlay().find(".contentWrap");

            // load the page specified in the trigger
            wrap.load(this.getTrigger().attr("href"));
        }

    });
});
</code></pre>
