// The Quick And Dirty jQuery/jCarousel Mashup
// littlerobothead.com


$(document).ready(function() {
	// setup the carousel; I'm using 'wrap' 
	// because it makes the carousel circular
	$("#mycarousel").jcarousel({wrap: "both"});
	
	// next, hide all divs except the first one
	// alternately, you could just show one:
	// 	$("#content div:gt(0)").hide();
	$("#content").children("div").hide();
	
	// all of this could just as easily be a JS array
	// but this is quicker. It gets cumbersome when you
	// have lots of objects here, though.
	// Definitely consider an array, maybe even populated by PHP.
	$("#mycarousel a:eq(0)").click(function(){
		$("#content div:eq(0)").fadeIn();
		$("#content div").not($("#content div:eq(0)")).hide();
	});
	$("#mycarousel a:eq(1)").click(function(){
		$("#content div:eq(1)").fadeIn();
		$("#content div").not($("#content div:eq(1)")).hide();
	});
	$("#mycarousel a:eq(2)").click(function(){
		$("#content div:eq(2)").fadeIn();
		$("#content div").not($("#content div:eq(2)")).hide();
	});
	$("#mycarousel a:eq(3)").click(function(){
		$("#content div:eq(3)").fadeIn();
		$("#content div").not($("#content div:eq(3)")).hide();
	});
	$("#mycarousel a:eq(4)").click(function(){
		$("#content div:eq(4)").fadeIn();
		$("#content div").not($("#content div:eq(4)")).hide();
	});
	$("#mycarousel a:eq(5)").click(function(){
		$("#content div:eq(5)").fadeIn();
		$("#content div").not($("#content div:eq(5)")).hide();
	});
	$("#mycarousel a:eq(6)").click(function(){
		$("#content div:eq(6)").fadeIn();
		$("#content div").not($("#content div:eq(6)")).hide();
	});
	$("#mycarousel a:eq(7)").click(function(){
		$("#content div:eq(7)").fadeIn();
		$("#content div").not($("#content div:eq(7)")).hide();
	});
	$("#mycarousel a:eq(8)").click(function(){
		$("#content div:eq(8)").fadeIn();
		$("#content div").not($("#content div:eq(8)")).hide();
	});
	$("#mycarousel a:eq(9)").click(function(){
		$("#content div:eq(9)").fadeIn();
		$("#content div").not($("#content div:eq(9)")).hide();
	});
$("#mycarousel a:eq(10)").click(function(){
		$("#content div:eq(10)").fadeIn();
		$("#content div").not($("#content div:eq(10)")).hide();
	});
$("#mycarousel a:eq(11)").click(function(){
		$("#content div:eq(11)").fadeIn();
		$("#content div").not($("#content div:eq(11)")).hide();
	});
	$("#mycarousel a:eq(12)").click(function(){
		$("#content div:eq(12)").fadeIn();
		$("#content div").not($("#content div:eq(12)")).hide();
	});
	$("#mycarousel a:eq(13)").click(function(){
		$("#content div:eq(13)").fadeIn();
		$("#content div").not($("#content div:eq(13)")).hide();
	});
	$("#mycarousel a:eq(14)").click(function(){
		$("#content div:eq(14)").fadeIn();
		$("#content div").not($("#content div:eq(14)")).hide();
	});
	$("#mycarousel a:eq(15)").click(function(){
		$("#content div:eq(15)").fadeIn();
		$("#content div").not($("#content div:eq(15)")).hide();
	});
	$("#mycarousel a:eq(16)").click(function(){
		$("#content div:eq(16)").fadeIn();
		$("#content div").not($("#content div:eq(16)")).hide();
	});
	$("#mycarousel a:eq(17)").click(function(){
		$("#content div:eq(17)").fadeIn();
		$("#content div").not($("#content div:eq(17)")).hide();
	});
	$("#mycarousel a:eq(18)").click(function(){
		$("#content div:eq(18)").fadeIn();
		$("#content div").not($("#content div:eq(18)")).hide();
	});
	$("#mycarousel a:eq(19)").click(function(){
		$("#content div:eq(19)").fadeIn();
		$("#content div").not($("#content div:eq(19)")).hide();
	});
	$("#mycarousel a:eq(20)").click(function(){
		$("#content div:eq(20)").fadeIn();
		$("#content div").not($("#content div:eq(20)")).hide();
	});
});
