
 
	$(document).ready(function() {
		var imgWrapper = $('#networkingslideshow > img');
		// only show the first image, hide the rest
		imgWrapper.hide().filter(':first').show();
		
		// next button
		$('#networkingslideshow ul.nav_buttons li a').click(function () {
      var path = ":first"
      if (this.className.indexOf('next') == -1)
        path = ":last"

      var current_li = $('#networkingslideshow ul.recentlist li a.current');
      var next_li;
      if (this.className.indexOf('next') == -1)
        next_li = $('#networkingslideshow ul.recentlist li a.current').parent().prev('li');
      else
        next_li = $('#networkingslideshow ul.recentlist li a.current').parent().next('li');
        
      var next_a = $("a", next_li);
      if ($(next_a).attr("href") == null)
      {
        next_li = $('#networkingslideshow ul.recentlist').children(path);
        next_a = $("a", next_li);
      }
      
      $(current_li).removeClass('current');
      
      imgWrapper.hide();
      imgWrapper.filter($(next_a).attr("href")).fadeIn(500);

      $(next_a).addClass('current');

      return false;
    });
   
	});
 
