// summary: like it sounds
// description: category agx.currentPage initializer for ag, 
//      bulk of logic is in the 'ag.agx.currentPages.agbetacategory' resource  
//      and its client classes.

if(!dojo.exists("products")){products=[];}
//waits for required layers, then requires the agx.currentPage resource, which 
//in turn calls the generated javascript on the pd
agx.currentPage.waiter = agx.wait_for_events(
    ["/ag.layers.core/loaded/", "/ag.layers.ext/loaded/"], 
    function(){
        dojo.require("ag.pages.invitations.category");
        if(agx.currentPage.pdCallback){
            try{
                agx.currentPage.pdCallback();
            }catch(e){
                console.warn(this + ".pdCallback() failed");
            }
        }
    }
);
