//var today = new Date();
//if (today.getMonth()+'.'+today.getDate()=='3.1')  {

  $(document).ready(function(){

    $('a').live('click',
      function(event) {
        event.preventDefault();
        $('#footer').before('<embed src="klink.wav" hidden="true" autostart="true"/>');
        if (!$(this).hasClass('updateAjaxContent')&&!$(this).hasClass('speakerPopout'))
          window.setTimeout('window.location="'+$(this).attr('href')+'"',1000);
      }
    );

    function dec2hex(a) {
      a = parseInt(a).toString(16);
      return a.length<2?"0"+a:a;
    }

    var swatch, r, g, b, color;

    randomColor();

    function randomColor()  {
      swatch = Math.floor(Math.random()*5);
      r = dec2hex(Math.floor(Math.random()*256));
      g = dec2hex(Math.floor(Math.random()*256));
      b = dec2hex(Math.floor(Math.random()*256));
      color = '#'+r+g+b;
      switch (swatch) {
        case 0:
          $('body').css('color',color);
          $('#searchInput').css('color',color);
          $('boxLink:hover').css('background-color',color);
          $('.logo2').animate({color:color},2500,function(){randomColor()});
          break;
        case 1:
          $('.boxLink').css('color',color);
          $('.footerMenu').children('a').css('border-color',color);
          $('a').animate({color:color},12500,function(){randomColor()});
          break;
        case 2:
          $('div').children('.boxLink').css('background-color',color);
          $('#searchInput').css('background-color',color);
          $('.levelProgress').css('border-color',color);
          $('#StatusBoxBottomRow').css('border-color',color);
          $('#footer').css('border-color',color);
          $('.logo1').animate({color:color},3500,function(){randomColor()});
          break;
        case 3:
          $('div').children('.inner').not('.boxLink').css('background-color',color);
          $('div').children('.innerNoOPEN').css('background-color',color);
          $('.levelProgress').css('background-color',color);
          $('#footer').css('background-color',color);
          $('.logo0').animate({color:color},1500,function(){randomColor()});
          break;
        case 4:
          $('html').css('background-color',color);
          $('body').css('background-color',color);
          if ($('#pageWrap').css('text-shadow').length>5)
            $('#pageWrap').css('text-shadow','0px 1px 1px '+color);
          $('#USER_STATUS .innerNoOPEN').css('border-color',color);
          $('boxLink:hover').animate({color:color},4500,function(){randomColor()});
          break;
      }
    }
  });

//}
