 	function slideSwitch_left() {
    var $active = $('.tileslidercontainer_left #slideshow IMG.active');

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

    var $next =  $active.next().length ? $active.next()
        : $('.tileslidercontainer_left #slideshow 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 slideSwitch_right() {
    var $active = $('.tileslidercontainer_right #slideshow IMG.active');

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

    var $next =  $active.next().length ? $active.next()
        : $('.tileslidercontainer_right #slideshow 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_left()", 5000 );
	setInterval( "slideSwitch_right()", 5000 );
});

