    if ( $.browser.msie == true) {
        Cufon.replace('h1', {fontFamily: 'Helvetica',
                             textShadow: '#000 1px 1px'});

    }

$(document).ready(function(){
    $("a.fancybox").fancybox();

    $('.active').children().attr('style','display:inline;');
    $('.active a').attr('style','padding-left:0px;background-image: url(/images/menu-bg.png);background-repeat:repeat-x;color:#564b00;');

    $('a.submit').click(function(){
        $('#formulier').submit();
        return false;
    });

    $('.menu-bg').each(function(){
        bgwidth = $(this).width();
        $(this).parent().width(bgwidth+16);
    });

    $('.menu-bg').mouseenter(function(){
        if ( !$(this).parent().hasClass('active') ) {
            $(this).attr('style','padding-left:0px')
            $(this).next().attr('style','display:inline');
            $(this).prev().attr('style','display:inline');
        }
    });

    $('.menu-bg').mouseleave(function(){
        if ( !$(this).parent().hasClass('active') ) {
            $(this).attr('style','padding-left:8px')
            $(this).next().attr('style','display:none');
            $(this).prev().attr('style','display:none');
        }
    });
    
    $('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
});
