$(document).ready(function()
{
  $('.navi > li').hover(function() {
    var $subnavi = $('ul', this);
    
    if ($subnavi.size() > 0) {
      $(this).addClass('hover');
      $subnavi.show();
    }
  }, function() {
     
    var $subnavi = $('ul', this);
    if ($subnavi.size() > 0) {
      $(this).removeClass('hover');
      $subnavi.hide();
    }
  });

  setInterval('switchSplasher()', 6000);
  
});

function switchSplasher()
{
  var $current = $('#splasher img.active');
  var $next = $current.next('img');

  if(!$next.size())
    $next = $('#splasher img:first');

  $next.css('z-index',2).css('opacity',0);
  $current.css('z-index', 1);
  
  $next.animate({opacity: 1}, 2000, function(){
    $next.addClass('active');
    $current.removeClass('active');
  });  

}
