


function slideSwitch() {
    var jqactive = jq('.pic_container img.active');

    if ( jqactive.length == 0 ) jqactive = jq('.pic_container img:last');

    // use this to pull the images in the order they appear in the markup
    var jqnext =  jqactive.next().length ? jqactive.next()
        : jq('.pic_container img:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var jqsibs  = jqactive.siblings();
    // var rndNum = Math.floor(Math.random() * jqsibs.length );
    // var jqnext  = jq( jqsibs[ rndNum ] );


    jqactive.addClass('last-active');

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