window.RBFF_FS = {
    logFbUserIn: function(redirect, nextUrl) {
        
        if (! redirect) {
            redirect = app['base_url'] + 'community/sn/users/home/fblogin/true';
        }
        
        if (nextUrl) {
            // set a cookie for the next URL
            createCookie('nextUrl', nextUrl, 1);
        }
        
    	window.location = redirect;
    },
    linkFbUser: function() {
    	window.location = app['base_url'] + 'community/sn/users/link-facebook';
    }
};


if (window.fb_api_key && typeof FB === 'object') {
    FB.init(fb_api_key, app['base_url'] + 'xd_receiver.htm');
}

