$(document).ready(function(){
    $('#navigation>ul>li').hover(function(){
        $(this).addClass('hover');
        if($.browser.msie && $.browser.version == '6.0') {
            $('select').css('visibility', 'hidden');
        }
    }, function(){
        $(this).removeClass('hover');
        if($.browser.msie && $.browser.version == '6.0') {
            $('select').css('visibility', 'visible');
        }
    });
    $('#category-dropdown').change(function(){
        if($(this).val() != 1) {
            window.location.href = $(this).val();
        }
    });

    $('.reveal').click(function(){
        reveal = $(this).attr('reveal');
        if(reveal != '')
        {
            state = $('#' + reveal).css('display');
            if(state == 'none')
            {
                $('#' + reveal).slideDown(400);
            }
        }
        return false;
    });

    $('.toggle').click(function(){
        reveal = $(this).attr('reveal');
        if(reveal != '')
        {
            state = $('#' + reveal).css('display');
            if(state == 'none')
            {
                $('#' + reveal).slideDown(400);
            }
            else
            {
                $('#' + reveal).slideUp(400);
            }
        }
        return false;
    });
});

function PopupWindow(URL, WIDTH, HEIGHT)
{
   var winleft = (screen.width-WIDTH)/2;
   var winright = (screen.height-HEIGHT)/2;
   day = new Date();
   id = day.getTime();
   eval("page"+id+" = window.open(URL,'"+id+"','toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width="+WIDTH+",height="+HEIGHT+",left="+winleft+",top="+winright+"');");
}

