window.onload = function(e) {

    try
    {
        document.execCommand("BackgroundImageCache", false, true);
    }
    catch(err){}
    
    //setInterval( "slideSwitch()", 3000 );

};

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

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

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

    if($next.width() == 280)
        $next = $('#demomenu IMG:first');
        
    $active.addClass('last-active');

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

$(function() {
        //$("a.image[rel='album']").colorbox();
        
        setInterval( "slideSwitch()", 8000 ); 
    });

