code: function(element) {
              var elementContainer = pgwSlideshow.plugin.find('.ps-current > ul');
  
              elementContainer.find('li').not('.elt_' + pgwSlideshow.currentSlide).not('.elt_' + element.id).each(function(){
                  if (typeof $(this).stop == 'function') {
                      $(this).stop();
                  }
                  $(this).css('position', '').css('z-index', 1).hide();
              });
  
              // Current element
              if (pgwSlideshow.currentSlide > 0) {
                  var currentElement = elementContainer.find('.elt_' + pgwSlideshow.currentSlide);
  
                  if (typeof currentElement.animate != 'function') {
                      currentElement.animate = function(css, duration, callback) {
                          currentElement.css(css);
                          if (callback) {
                              callback();
                          }
                      };
                  }
  
                  if (typeof currentElement.stop == 'function') {
                      currentElement.stop();
                  }
  
                  currentElement.css('position', 'absolute').animate({
                      opacity : 0,
                  }, pgwSlideshow.config.transitionDuration, function() {
                      currentElement.css('position', '').css('z-index', 1).hide();
                  });
              }
  
              // Update current id
              pgwSlideshow.currentSlide = element.id;
  
              // Next element
              var nextElement = elementContainer.find('.elt_' + element.id);
  
              if (typeof nextElement.animate != 'function') {
                  nextElement.animate = function(css, duration, callback) {
                      nextElement.css(css);
                      if (callback) {
                          callback();
                      }
                  };
              }
  
              if (typeof nextElement.stop == 'function') {
                  nextElement.stop();
              }
  
              nextElement.css('position', 'absolute').show().animate({
                  opacity : 1,
              }, pgwSlideshow.config.transitionDuration, function() {
                  nextElement.css('position', '').css('z-index', 2).css('display', 'block');
                  finishElement(element);
              });
  
              return true;
          }
docs: Fade an element