jQuery(function ($) {
    //bullets coords set
    $('#menu ul li a').each(function () {
        var left = $(this).find('span:first').get(0).offsetLeft - 25;
        var top  = $(this).find('span:first').get(0).offsetTop;
        
        $(this).find('p.bullet').css({
            'left': left + 'px',
            'top': top + 'px'
        });
    });

    //bullets hover ftionality
    $('#menu ul li a').hover(function () {
        $(this).find('p.bullet').show();
    },function () {
        $(this).find('p.bullet').hide();
    });

    //ie menu hovers fix
    if ($.browser.msie)
    {
        $('#menu ul li a').hover(function () {
            $(this).find('p:not(.bullet)').each(function () {
                var bg  = $(this).css('background-image');
                var reg = new RegExp('\.gif');
                
                $(this).css('background-image',bg.replace(reg,'-hover.gif'));
            });
        },function () {
            $(this).find('p:not(.bullet)').each(function () {
                var bg  = $(this).css('background-image');
                var reg = new RegExp('-hover');
                
                $(this).css('background-image',bg.replace(reg,''));
            });
        });
    }//if ($.browser.msie)
    
    //horizontal separator height set
    var height = $('#cont-left').height();
    
    if ($('#cont-right').get(0))    
    {
        if ($('#cont-right').height() > height)
        {
            height = $('#cont-right').height();
        }
    }//if ($('#cont-right').get(0))
    
    $('div.horizontal-separator').css('height',height + 'px');
});

function GetAbsPos(elem)
{
    var end  = false;
    var prnt = elem;
    var x    = 0;
    var y    = 0;
    
    while (!end)
    {
        if (prnt != null)
        {
            if (prnt.offsetLeft)
            {
                x += prnt.offsetLeft;
            }
            
            if (prnt.offsetTop)
            {
                y  += prnt.offsetTop;
            }
        
            prnt = prnt.offsetParent;
        }
        else
        {
            break;
        }
    }//while
    
    return {Left: x, Top: y};
}//GetAbsPos

