
function slideSwitch(slideShowId){
 var $active = $(slideShowId + ' img.active');
 var $next = $active.next();

 var $next =  $active.next().length ? $active.next(): $(slideShowId + ' img:first');

 $active.addClass('last-active');

 $next.css({opacity: 0.0})
      .addClass('active')
      .animate({opacity: 1.0}, 1000, function(){
		  $active.removeClass('active last-active');
		});
}

function jumpTo(whichPic, whichSlideShow){
  var selector = '#' + whichSlideShow + ' img';
  $(selector).removeClass('active');

  selector = '#' + whichPic;
  $(selector).addClass('active');
}

$(document).ready(function(){
	$(function(){
		$('.lbox').lightBox();
	});
	$(function(){
		$('.thumb a').lightBox();
	});
	$(function(){
	setInterval("slideSwitch('#slideshow01')", 5000 );
	});
	$(function(){
	setInterval("slideSwitch('#slideshow02')", 4000 );
	});
});
