<!--
var timerval;
var currentIndex = 1;
var numberImages = 4;
function slideSwitch(index) {

	if(index != currentIndex) {
	    var $active = $('#slideshow IMG.active');
	    var $activeLink = $('#slideshow div.activeLink');
	    var $currentButton = $('#slideshow li.activeButton');

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

	    if(index == 0) {
	    	currentIndex = currentIndex + 1;
				if(currentIndex > numberImages) {
					currentIndex = 1;
				}

	    	var $next = $('#slideImage'+currentIndex);
	    	var $nextLink = $('#link'+currentIndex);
	    	var $nextButton = $('#number'+currentIndex);
	    } else {
	      //reset the counter index to the current one selected
	    	currentIndex = index;

				var $next = $('#slideImage'+index);
				var $nextLink = $('#link'+index);
				var $nextButton = $('#number'+index);
	    }

	    $active.addClass('last-active');
	    $activeLink.css('display', 'none');
	    $next.css('display', 'block');
	    $currentButton.removeClass('activeButton');
	    $nextButton.addClass('activeButton');

	    $next.css({opacity: 0.0})
	        .addClass('active')
	        .animate({opacity: 1.0}, 500, function() {
	        	$nextLink.addClass('activeLink');
	        	$nextLink.show('slow');
            $active.removeClass('active last-active');
            $activeLink.removeClass('activeLink');
            $activeLink.removeClass('activeLink');
            $active.css('display', 'none');
	        });

	    if(index > 0){
	    	timeron();
	    }
	}
}

$(function() {
	timerval = setInterval("slideSwitch(0)",5000);
});

function timeron() {
	clearInterval(timerval);
	timerval = setInterval("slideSwitch(0)",5000);
}
-->