function slideSwitch() {
    var $active = $('#slideshow IMG.active');

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

    var $next =  $active.next().length ? $active.next()
        : false;
		if( !$next ) {
			location.href= "http://www.leadership-branding.de/home.html";
		} 
    $active.addClass('last-active');
  $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 600, function() {
            $active.removeClass('active last-active');
        });
}
jQuery(document).ready(function(){

jQuery( "table.nav img" ).each(function(){
   var id2 = jQuery(this).attr("id");
   if( id2 == 1 || id2 == 3 || id2 == 4 || id2 == 5  || id2 == 6  || id2 == 7 ){
   jQuery(this).attr({
      src: "files/ordner/navactive" + id2 + "_1.gif"
   }); 
   }
   else{
   jQuery(this).attr({
      src: "files/ordner/nav" + id2 + ".gif"
   });
   }   
});


   $(".down img").hover(function(event){
      $( ".down img" ).each(function(){
         var id = $(this).attr("id");
            $(this).attr({
               src: "files/ordner/nav" + id + ".gif"
            });
       });
   var id2 = $(this).attr("id");
   jQuery(this).attr({
      src: "files/ordner/navactive" + id2 + ".gif"
   });
   });


jQuery(function() {
    var threadID;
    threadId = setInterval( "slideSwitch()", 3500 );
});

$('#slideshow img').click(function(){
  location.href= "http://www.leadership-branding.de/home.html";
});

jQuery("#navi img").hover(function(){
    clearInterval(threadId);
});



});

