$(document).ready(function() {
	$("#nav ul").css({display: "none"}); // Opera Fix
	$("#nav li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show();
	},function(){ $(this).find('ul:first').css({visibility: "hidden"}); 
	});
});


function slideSwitch() {
    var $active = $('#header IMG.active');

    //if ( $active.length == 0 ) $active = $('#header IMG:first');

    var $next =  $active.next().length ? $active.next()
        : $('#header IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 10000 );
});
