var Catapult = (!Catapult) ? new Object() : Catapult;
/**
 * Very easy poppers.
 * requires the popup handles to have a class="popper_handle".
 * Uses the rel attribute to find the popup element on page.
 */
Catapult.nicePoppers = function() {
    $('a.popper_handle').click(function(){
        try {
            if(this.getAttribute("rel")) {
                var rel_attr = this.getAttribute("rel");
            } else {
                return false;
            }
            var pop = $('#' + rel_attr);
            $('div.pop').hide();
            pop.toggle();
            $('.rr1', pop).pop_center("vertical");
            return false;  
        }
        catch (e) {
            console.error(e);
        }
        return false;
    });
}

var body;

$(document).ready(function(){
    try {
        body = $('body').get(0);
        Catapult.nicePoppers();
    } catch (er) {
        return null;
    }
});