
        function slideShow(mysel, time){
            $(mysel + ' div').css({opacity: 0.0});
            $(mysel + ' div:first').css({opacity: 1.0});
            $(mysel + ' .caption').css({opacity: 0.7});
            $(mysel + ' .content').html($(mysel + ' div:first').find('div').html()).animate({opacity: 0.7}, 400);
            setInterval('gallery("' + mysel + '")', time);
        }

        function gallery(mysel){
            var current = ($(mysel + ' div.show') ? $(mysel + ' div.show') : $(mysel + ' div:first'));
            var next    = ((current.next().length) ? ((current.next().hasClass('caption')) ? $(mysel + ' div:first') :current.next()) : $(mysel + ' div:first'));
            var caption = next.find('div').html();

            next.css({opacity: 0.0, display: 'block'}).addClass('show').animate({opacity: 1.0}, 1000);
            current.animate({opacity: 0.0}, 1000).removeClass('show').css({display: 'none'});

            $(mysel + ' .caption').animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height: '1px'}, { queue:true, duration:300 });
            $(mysel + ' .caption').animate({opacity: 0.7},100 ).animate({height: $(mysel + ' .caption').css('height')}, 500);
            $(mysel + ' .content').html(caption);
        }
