
//$(document).ready(
//    function()
//    {
        if (!$("body").hasClass('domain-voetbal-nl')) {
            if(typeof Voetbal !== 'undefined') {
                $.ajax({
                    url: "/login/menu/data",
                    data: {},
                    type: 'POST',
                    success: function(response) {
                        // Call all callbacks.
                        if (response.__callbacks) {
                            $.each(response.__callbacks, function(i, callback) {
                                eval(callback)(response);
                            });
                        }
                    },
                    error: function() {
                    },
                    dataType: 'json'
                });

                Voetbal.login = {};
                Voetbal.login.response = function (response) {
                    Voetbal.fillBlock('logged-in-menu', response.content);
                };

                Voetbal.fillBlock = function(id, content) {
                    var path = location.pathname.substr(1);
                    if (path == '' || path == 'toegang-geweigerd') {
                        path = 'frontpage/home';
                    }
                    content = content.replace('?destination=', '?destination=' + path);
                    $('#' + id).html(content);
                    //alert('Vriendelijke boodschap: Laten we het login block cufonizen');
                    Cufon.replace('#logged-in-menu .onsoranje-user, #logged-in-menu .mijn_gegevens_link, #logged-in-menu .mijn_profiel_link', {fontFamily:'Aero'});
                    //Cufon.refresh();
                    Onsoranje.setDefaultToggle();
                    
                };
            }
        }
//    }
//);
