$(function(){
    $('#serviceLinks li .header:not(.noanimation), #productNavigator li .header').toggle(function(){
        //$(this).parent().siblings().children('div.body').slideUp('slow');
        $(this).parent().children('div.body').slideDown('slow');
        $(this).parent().children('div.header').children('div:first').css('background-image', $(this).parent().children('div.header').children('div:first').css('background-image').replace(/inactive/, 'active'));
        $(this).parent().attr('class', 'active ' + $(this).parent().attr('class'));
    }, function(){
        if (this.parentNode.parentNode.id == 'productNavigator') {
            finder.removeLayers(1, true);
        }
        $(this).parent().children('div.body').slideUp('slow');
        var className = '';
        var classes = $(this).parent().attr('class').split(' ');
        if (classes[1]) {
            var className = classes[1];
        }
        $(this).parent().children('div.header').children('div:first').css('background-image', $(this).parent().children('div.header').children('div:first').css('background-image').replace(/active/, 'inactive'));
        $(this).parent().attr('class', className);
    });
    $('#sb_location_link_europe').mouseover(function(){
         document.getElementById('sb_location_map').src = '../files/serviceBox/$file/serviceLinks_map_europe.gif';
    });
    $('#sb_location_link_america').mouseover(function(){
         document.getElementById('sb_location_map').src = '../files/serviceBox/$file/serviceLinks_map_america.gif';
    });
    $('#sb_location_link_asafoc').mouseover(function(){
         document.getElementById('sb_location_map').src = '../files/serviceBox/$file/serviceLinks_map_afasoc.gif';
    });
});
/*
$(function(){
    $('#serviceLinks li').toggle(function(){
        $(this).children('div.body').slideDown('slow');
        $(this).children('div.header').children('div:first').css('background-image', $(this).children('div.header').children('div:first').css('background-image').replace(/inactive/, 'active'));
        $(this).attr('class', 'active ' + $(this).attr('class'));
    }, function(){
        $(this).children('div.body').slideUp('slow');
        var className = '';
        var classes = $(this).attr('class').split(' ');
        if (classes[1]) {
            var className = classes[1];
        }
        $(this).children('div.header').children('div:first').css('background-image', $(this).children('div.header').children('div:first').css('background-image').replace(/active/, 'inactive'));
        $(this).attr('class', className);
    });
});*/
