jQuery.noConflict();

jQuery(document).ready(function(){
    jQuery(function() {
        setInterval( "slideSwitch()", 6000 );
        setInterval( "slideSwitchEvents()", 6000 );
    });
});

function slideSwitch() {
    var $active = jQuery('#slideshow div.active');

    if ( $active.length == 0 ) $active = jQuery('#slideshow div:last');
    
    var $next =  $active.next().length ? $active.next() : jQuery('#slideshow div:first');
    $active.addClass('last-active');

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

function slideSwitchEvents() {
    var $active = jQuery('#eventshow div.active');

    if ( $active.length == 0 ) $active = jQuery('#eventshow div:last');
    
    var $next =  $active.next().length ? $active.next() : jQuery('#eventshow div:first');
    $active.addClass('last-active');

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

