 $(document).ready(function(){

    $('#top_navi_bar').find('li').hide();
    $('#top_navi_bar').find('li').fadeIn();
    
    $('.download_cat').hover(
        function(){
            $(this).find('.gray_button').hide();
            $(this).find('.orange_button').fadeIn('slow');
        },
        function(){
            $(this).find('.orange_button').hide();
            $(this).find('.gray_button').fadeIn('slow');
        }
    );

    $('.pager_link').hover(function(){
       $(this).css('background', '#569fd8');
    }, function(){
       $(this).css('background', '#ccc');
    });


    //colors          = new Array("#a2121b", "#2c69ad", "#7e418f", '#15832d', '#ec751d', '#127265',"#a2121b", "#2c69ad", "#7e418f", '#15832d');
    curr_color      = getUrlVars()['colored'];
    if(curr_color){
        $('#top_navi_header').find('h1').css('background', "#" + curr_color );
    }
    
 });


function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}
 // document.write(Math.floor(Math.random()*10));
