function slideSwitch() {
var $active = $('#slidewrapper div.active');
if ( $active.length == 0 ) $active = $('#slidewrapper div:last');
var $next =  $active.next().length ? $active.next()
: $('#slidewrapper div:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}

$(function() {
//menu hover
$(".menuitem, .menuitemlast").hover(function() {
$(this).css("background-image","url(../images/pointerflagon.png)");
$(this).find("*").css({"color":"#333","text-decoration":"underline"});
},function(){
$(this).css("background-image","url(../images/pointerflag.png)");
$(this).find("*").css({"color":"#666","text-decoration":"none"});
});

//all link containers become links themselves
$(".menuitem, .menuitemlast").click(function(){
var a = $(this).children();
var h = a.first().attr("href");
document.location.href = h;
return false;
});
//
//
//setInterval( "slideSwitch()", 3000 );
});
