//			var newbgpos = 0;
			var bgpos = 0;
				
			function makeSwitch(newimg){
//				var bgpos = $(this).attr("value");
				
				/* Animate slider background */
				/*
				$("#fcNavHilite").animate(
					{top: bgpos + "px"},
					{duration: 400});
				*/
				/* Set foreground image as opaque */	
				$("#fcContentImageFore").css({"opacity": 1});
				/* Set background image as next item */
				$("#fcContentImage").css({ backgroundImage: "url(images/slideshow/" + newimg + ".jpg)"});
				/* Animate foreground image to be transparent to produce fade effect to display background image */
				$("#fcContentImageFore").animate({"opacity": 0}, 400, function(){
				/* Set transparent foreground image as current item */
				$("#fcContentImageFore").css({backgroundImage: "url(images/slideshow/" + newimg + ".jpg)"});
				});
			}
			
			function makeNowt(){};
			
			function animateFeature(newbgpos){
				if (newbgpos > 0) {
					bgpos = parseInt(newbgpos);
				} else {
					if (bgpos > 209) {
						bgpos = 0;
					} else {
						bgpos += 30;
					}
				}
				$("#fcNavHilite").stop().animate(
					{top: bgpos + "px"},
					{duration: 400});
				$("#fcContentText > div").css("display", "none");
				switch (bgpos) {
					case 30: 
						result = 'fcPrint'; 
						$('#fcText_print').css("display", "block");
						break;
					case 60: 
						result = 'fcFinishing'; 
						$('#fcText_finishing').css("display", "block");
						break;
					case 90:
						result = 'fcWarehousing'; 
						$('#fcText_warehousing').css("display", "block");
						break;
					case 120: 
						result = 'fcPublic'; 
						$('#fcText_public').css("display", "block");
						break;
					case 150: 
						result = 'fcEducational'; 
						$('#fcText_educational').css("display", "block");
						break;
					case 180: 
						result = 'fcSecure'; 
						$('#fcText_secure').css("display", "block");
						break;
					case 210: 
						result = 'fcOnline'; 
						$('#fcText_online').css("display", "block");
						break;
					default: 
						result = 'fcReprographics'; 
						$('#fcText_repro').css("display", "block");
				}
				makeSwitch(result);
			};
			
			$(document).ready(function() {
			    var refreshIntervalId = setInterval( "animateFeature(0)", 5000 );
			   	$("#fcNav a").hover(
			   		function(){
						var manualbgpos = $(this).attr("value");
						animateFeature(manualbgpos);
						clearInterval(refreshIntervalId);
			   		},
			   		function(){
						manualbgpos = $(this).attr("value");
						refreshIntervalId = setInterval( "animateFeature(0)", 5000 );
			    	}
			    );			    
			})
