function waitForElement(selector, callback) {
        waitFor(function() {
            return !!$(selector).length;
        }, callback);
    }
Wait for an element to appear, then execute the callback
@name _pjs.waitForElement
@param {String} selector     JQuery selector to look for
@param {Function} callback   Callback function to execute