$(document).ready(function(){
	
	var classNames = {
						0: 'yellow',
						1: 'green',
						2: 'blue'
					}

	$('ul.nav-box a').each(function(index) {

		$(this).addClass(classNames[index % 3])
	});
	
	if ($('.cals').length > 0){

		$('.cals').cycle({
			
			fx:			'fade', 
			speed:		'fast', 
			timeout:	0, 
			next:		'.controls .next', 
			prev:		'.controls .prev',
			after:		function(){ 
							
							if (this.id != 0){

								$('.controls .prev').show(); 
							
							} else {
								
								$('.controls .prev').hide(); 
							}

							if (this.id != 11){

								$('.controls .next').show(); 
							
							} else {
								
								$('.controls .next').hide(); 
							}
						}
		});
	}
});