I have 2 plugins in the same page and now one is not working

I have 2 plugins in the same page and now one is not working

I am not a jQuery savy the following are the scripts:

<script type="text/javascript">
$(document).ready(function(){
   
    $(".accordion h4:first").addClass("active");
    $(".accordion p:not(:first)").hide();

    $(".accordion h4").click(function(){
        $(this).next("p").slideToggle("slow")
        .siblings("p:visible").slideUp("slow");
        $(this).toggleClass("active");
        $(this).siblings("h4").removeClass("active");
    });

});
</script>
<script type="text/javascript">

function slideSwitch() {
    var $active = $('#slideshow IMG.active,#slideshow2 IMG.active,#slideshow3 IMG.active,#slideshow4 IMG.active ');

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

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first,#slideshow2 IMG:first,#slideshow3 IMG:first,#slideshow4 IMG:first');

    // uncomment the 3 lines below to pull the images in random order
   
   //var $sibs  = $active.siblings();
  // var rndNum = Math.floor(Math.random() * $sibs.length );
  // var $next  = $( $sibs[ rndNum ] );


    $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()", 10000 );
});

</script>