$(document).ready(function(){
 function slideSwitch() {
  var $active = $('#slideshow .active');
  if ( $active.length == 0 ) $active = $('#slideshow .plugin_picture:first');
  var $next =  $active.next().length ? $active.next() : $('#slideshow .plugin_picture:first');
  $active.addClass('last-active');

  $next.css({opacity: 0.0})
  .addClass('active')
  .animate({opacity: 1.0}, 1500, function() {
   $active.removeClass('active last-active');
  });
 }

 if ($('#slideshow').length){
  $('#slideshow .plugin_picture:first').addClass('active');
  setInterval( slideSwitch, 3000 );
 } 
});

