$(document).ready(function(){
	$('#slider3')
	.anythingSlider({
		width               : 636,
		height              : 330,
		autoPlay            : true,
		buildArrows         : false,
		startPanel          : 1,
		delay               : 4000,
		navigationFormatter : function(i, panel){
			return ['Company', 'Town', 'Cerezo', 'Character', 'New', 'New'][i - 1];
		}
	})

/*
	.anythingSliderFx({
		'.caption-top'     : [ 'caption-Top', '50px', '1000', 'easeOutBounce' ],
		'.caption-right'   : [ 'caption-Right', '130px', '1000', 'easeOutBounce' ],
		'.caption-bottom'  : [ 'caption-Bottom', '50px', '1000', 'easeOutBounce' ],
		'.caption-left'    : [ 'caption-Left', '130px', '1000', 'easeOutBounce' ],
		'.caption-bottom2' : [ 'caption-Bottom', '50px', '1000', 'easeOutBounce' ],
		'.caption-bottom3' : [ 'caption-Bottom', '60px', '1000', 'easeOutBounce' ]
	})
*/
	/* use this code to have the caption slide in and out from the bottom with each panel */
	.anythingSliderFx({
		inFx: {
			'.caption-top'    : { top: 0, opacity: 0.8, duration: 200 },
			'.caption-right'  : { right: 0, opacity: 0.8, duration: 200 },
			'.caption-bottom' : { bottom: 0, opacity: 0.8, duration: 200 },
			'.caption-left'   : { left: 0, opacity: 0.8, duration: 200 },
			'.caption-bottom2': { bottom: 0, opacity: 0.8, duration: 200 },
			'.caption-bottom3': { bottom: 0, opacity: 0.8, duration: 200 }
		},
		outFx: {
			'.caption-top'    : { top: -50, opacity: 0, duration: 400 },
			'.caption-right'  : { right: -150, opacity: 0, duration: 400 },
			'.caption-bottom' : { bottom: -50, opacity: 0, duration: 400 },
			'.caption-left'   : { left: -150, opacity: 0, duration: 400 },
			'.caption-bottom2': { bottom: -50, opacity: 0, duration: 400 },
			'.caption-bottom3': { bottom: -60, opacity: 0, duration: 400 }
		}
	})
	// add a close button (x) to the caption
	.find('div[class*=caption]')
		.css({ position: 'absolute' })
		.prepend('<span class="close">x</span>')
		.find('.close').click(function(){
			var cap = $(this).parent(),
				ani = { bottom : -50 }; // bottom
			if (cap.is('.caption-top')) { ani = { top: -50 }; }
			if (cap.is('.caption-left')) { ani = { left: -150 }; }
			if (cap.is('.caption-right')) { ani = { right: -150 }; }
			cap.animate(ani, 400, function(){ cap.hide(); } );
		});

	/*  use this code if you only want the caption to appear when you hover over the panel
	.find('.panel')
		.find('div[class*=caption]').css({ position: 'absolute' }).end()
		.hover(function(){ showCaptions( $(this) ) }, function(){ hideCaptions( $(this) ); });

	showCaptions = function(el){
		var $this = el;
		if ($this.find('.caption-top').length) { $this.find('.caption-top').show().animate({ top: 0, opacity: 1 }, 400); }
		if ($this.find('.caption-right').length) { $this.find('.caption-right').show().animate({ right: 0, opacity: 1 }, 400); }
		if ($this.find('.caption-bottom').length) { $this.find('.caption-bottom').show().animate({ bottom: 0, opacity: 1 }, 400); }
		if ($this.find('.caption-left').length) { $this.find('.caption-left').show().animate({ left: 0, opacity: 1 }, 400); }
	};
	hideCaptions = function(el){
		var $this = el;
		if ($this.find('.caption-top').length) { $this.find('.caption-top').stop().animate({ top: -50, opacity: 0 }, 400, function(){ $this.find('.caption-top').hide(); }); }
		if ($this.find('.caption-right').length) { $this.find('.caption-right').stop().animate({ right: -150, opacity: 0 }, 400, function(){ $this.find('.caption-right').hide(); }); }
		if ($this.find('.caption-bottom').length) { $this.find('.caption-bottom').stop().animate({ bottom: -50, opacity: 0 }, 400, function(){ $this.find('.caption-bottom').hide(); }); }
		if ($this.find('.caption-left').length) { $this.find('.caption-left').stop().animate({ left: -150, opacity: 0 }, 400, function(){ $this.find('.caption-left').hide(); }); }
	};

	// hide all captions initially
	hideCaptions( $('#slider3 .panel') );
*/
});
