$(document).ready(function(){
	
	//This keeps track of the slideshow's current location
	var current_panel = 1;
	//Controlling the duration of animation by variable will simplify changes
	var animation_duration = 2500;
	
	$.timer(6000, function (timer) {
		//Determine the current location, and transition to next panel
		switch(current_panel){
			case 1:
				$("#show").stop().animate({left: "-640px", top: "0px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 2;
			break;
			case 2:
				$("#show").stop().animate({left: "0px", top: "-512px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 3;
			break;
			case 3:
				$("#show").stop().animate({left: "-640px", top: "-512px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 4;
			break;
			case 4:
				$("#show").stop().animate({left: "0px", top: "-1024px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 5;
			break;
			case 5:
				$("#show").stop().animate({left: "-640px", top: "-1024px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 6;
			break;
			case 6:
				$("#show").stop().animate({left: "0px", top: "-1536px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 7;
			break;
			case 7:
				$("#show").stop().animate({left: "-640px", top: "-1536px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 8;
			break;
			case 8:
				$("#show").stop().animate({left: "0px", top: "-2048px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 9;
			break;
			case 9:
				$("#show").stop().animate({left: "-640px", top: "-2048px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 10;
			break;
			case 10:
				$("#show").stop().animate({left: "0px", top: "-2560px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 11;
			break;
			case 11:
				$("#show").stop().animate({left: "-640px", top: "-2560px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 12;
			break;
			case 12:
				$("#show").stop().animate({left: "0px", top: "-3072px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 13;
			break;
			case 13:
				$("#show").stop().animate({left: "-640px", top: "-3072px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 14;
			break;
			case 14:
				$("#show").stop().animate({left: "0px", top: "-3584px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 15;
			break;
			case 15:
				$("#show").stop().animate({left: "-640px", top: "-3584px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 16;
			break;
			case 16:
				$("#show").stop().animate({left: "0px", top: "-4096px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 17;
			break;
			case 17:
				$("#show").stop().animate({left: "-640px", top: "-4096px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 18;
			break;
			case 18:
				$("#show").stop().animate({left: "0px", top: "-4608px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 19;
			break;
			case 19:
				$("#show").stop().animate({left: "-640px", top: "-4608px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 20;
			break;
			case 20:
				$("#show").stop().animate({left: "0px", top: "-5120px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 21;
			break;
			case 21:
				$("#show").stop().animate({left: "-640px", top: "-5120px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 22;
			break;
			case 22:
				$("#show").stop().animate({left: "0px", top: "-5632px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 23;
			break;
			case 23:
				$("#show").stop().animate({left: "-640px", top: "-5632px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 24;
			break;
			case 24:
				$("#show").stop().animate({left: "0px", top: "-6144px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 25;
			break;
			case 25:
				$("#show").stop().animate({left: "-640px", top: "-6144px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 26;
			break;
			case 26:
				$("#show").stop().animate({left: "0px", top: "-6656px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 27;
			break;
			case 27:
				$("#show").stop().animate({left: "-640px", top: "-6656px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 28;
			break;
			case 28:
				$("#show").stop().animate({left: "0px", top: "-7168px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 29;
			break;
			case 29:
				$("#show").stop().animate({left: "-640px", top: "-7168px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 30;
			break;
			case 30:
				$("#show").stop().animate({left: "0px", top: "-7680px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 31;
			break;
			case 31:
				$("#show").stop().animate({left: "-640px", top: "-7680px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 32;
			break;
			case 32:
				$("#show").stop().animate({left: "0px", top: "0px"}, {easing: 'jswing', duration: animation_duration});
				current_panel = 1;
			break;	
	  		timer.reset(12000);
		}
	});
	
});
