function ps_init() {
    ps_oldheight = $('#prodSolOverview .desc').height();
    
    ps_last = $('#prodSolOverview .desc li:first');
    
    ps_last.siblings().hide();
    
    hide_ps();
    
    $('#prodSolOverview .brands li').hover(
        function() {
            if(typeof out_tmr != "undefined")
                clearTimeout(out_tmr);
            cls = $(this).attr('class');
            
            $('#prodSolOverview .desc').stop().animate({
                height: ps_oldheight + 'px'
            }, 'fast');
            //if (ps_last[0] != $('#prodSolOverview .desc li:first')[0] || !$(this).hasClass('water'))
                ps_last.stop(true, true).fadeOut('fast');
            ps_last = $('#prodSolOverview .desc .' + cls);
            
            ps_last.fadeIn('normal');
            
            $(this).addClass('hover');
            $(this).siblings().addClass('inactive');
        },
        function() {
            //$('#prodSolOverview .desc .' + $(this).attr('class')).hide();
            out_tmr = setTimeout("hide_ps()", 150);
            $(this).removeClass('hover');
            $(this).siblings().removeClass('inactive');
        }
    );
    $('#prodSolOverview .desc').hover(
        function() {
            if(typeof out_tmr != "undefined")
                clearTimeout(out_tmr);
        },
        function() {
            out_tmr = setTimeout("hide_ps()", 150);
            //hide_ps();
        }
    );
    $('#prodSolOverview .desc li').hover(
        function() {
            $('#prodSolOverview .brands .' + $(this).attr('class')).addClass('hover');
            $('#prodSolOverview .brands .' + $(this).attr('class')).siblings().addClass('inactive');
        },
        function() {
            $('#prodSolOverview .brands .' + $(this).attr('class')).removeClass('hover');
            $('#prodSolOverview .brands .' + $(this).attr('class')).siblings().removeClass('inactive');
        }
    );
    $('#prodSolOverview .desc li ul li').hover(
        function() {
            //par_elems = $(this).parents('ul:first').siblings();
            //par_elems.fadeOut('fast');
            
            $(this).children('div,img').fadeIn('fast');
        },
        function() {
            $(this).children('div,img').fadeOut('fast');
            
            //par_elems = $(this).parents('ul:first').siblings();
            //par_elems.fadeIn('fast');
        }
    );
        $('#prodSolOverview .desc li ul').hover(
            function() {
                $(this).siblings().fadeOut('fast');
            },
            function() {
                $(this).siblings().fadeIn('fast');
            }
        );
}

function hide_ps() {
    //if ($('#prodSolOverview .desc li:first').is(':visible'))
        //return;
    if (ps_last[0] != $('#prodSolOverview .desc li:first')[0])
        ps_last.stop(true, true).fadeOut('fast');
    bg = $('#prodSolOverview .desc').css('background-position');
    $('#prodSolOverview .desc').stop().animate({ height: '59px' }, 'fast');
    ps_last = $('#prodSolOverview .desc li:first');
    
    ps_last.fadeIn('fast', function() { $(this).css('background-position', bg) });
    
}

$(document).ready(function() {
    ps_init();
});

