// Register onload function to transform popup links
ff.event.onload(function()
{
    // for every <a class="popup"> ..   
    ff.forElement("A", "popup", function(link)
    {
        // add a click event handler         
        ff.event.add(link, "click", function(event)
        {
            // open href of the source link as popup 
            window.open(this.href);
            // prevent default handling of click event
            ff.event.preventDefault(event);
        });
    });    
});
