/* slightly modified code from http://jonraasch.com/blog/a-simple-jquery-slideshow */

function slideSwitch() {
  var $active = $("#slideshow div.active");
  if ( $active.length == 0 ) $active = $("#slideshow div:last");
  var $next =  $active.next().length ? $active.next()
    : $("#slideshow div:first");
  $active.addClass("last-active");
  var linkRelActive = $active.attr("rel");
  var linkRelNext = $next.attr("rel");
  $next.css({opacity: 0.0})
  .addClass("active")
  .animate({opacity: 1.0}, 2000, function() {
  $active.removeClass("active last-active");
  $("#slidernav a[rel=" +linkRelActive+ "]").removeClass("activeBannerLink");
  $("#slidernav a[rel=" +linkRelNext+ "]").addClass("activeBannerLink");
  })
}
