$(function() {
     $('#slideshow').cycle({ 
      fx:     'fade',
        speed:  1000,
        timeout: 15000,
		activePagerClass: 'activeSlide',
		pager: '#nav',
		cleartypeNoBg: true
    });
	
	$('#s0, #st0').click(function() { 
		$('#slideshow').cycle(0);
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st0').className = 'annoOrange';
		return false; 
	}); 
	$('#s1, #st1').click(function() { 
		$('#slideshow').cycle(1);
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st1').className = 'annoOrange';
		return false; 
	}); 
	$('#s2, #st2').click(function() { 
		$('#slideshow').cycle(2);
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st2').className = 'annoOrange';
		return false; 
	}); 
	$('#s3, #st3').click(function() { 
		$('#slideshow').cycle(3);  
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st3').className = 'annoOrange';
		return false; 
	}); 
	$('#s4, #st4').click(function() { 
		$('#slideshow').cycle(4);  
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st4').className = 'annoOrange';
		return false; 
	}); 
	$('#s5, #st5').click(function() { 
		$('#slideshow').cycle(5);  
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st5').className = 'annoOrange';
		return false; 
	}); 
	$('#s6, #st6').click(function() { 
		$('#slideshow').cycle(6);  
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st6').className = 'annoOrange';
		return false; 
	}); 
	$('#s7, #st7').click(function() { 
		$('#slideshow').cycle(7);  
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st7').className = 'annoOrange';
		return false; 
	}); 
	$('#s8, #st8').click(function() { 
		$('#slideshow').cycle(8);  
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st8').className = 'annoOrange';
		return false; 
	}); 
	$('#s9, #st9').click(function() { 
		$('#slideshow').cycle(9);  
		var i = 0;
		while(document.getElementById('st' + i) != null) {
			document.getElementById('st' + i).className = 'annoGray';
			++i;
		}
		document.getElementById('st9').className = 'annoOrange';
		return false; 
	}); 
});
