$(document).ready(function(){
	
	$('#slider2')
	.anythingSlider({
		width               : 628,
		height              : 150,
		startStopped        : true,
		resizeContents      : false,
		navigationFormatter : function(i, panel){
			return [' ', ' ', ' ', ' ', ' ', ' '][i - 1];
		}
	})
	
	$('#slider3')
	.anythingSlider({
		width               : 938,
		height              : 230,
		startStopped        : true,
		resizeContents      : false,
		navigationFormatter : function(i, panel){
			return [' ', ' ', ' ', ' ', ' ', ' '][i - 1];
		}
	})
	
	$('#slider4')
	.anythingSlider({
		width               : 308,
		height              : 130,
		startStopped        : true,
		resizeContents      : false,
		navigationFormatter : function(i, panel){
			return [' ', ' ', ' ', ' ', ' ', ' '][i - 1];
		}
	})
	
	// 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(); } );
		});
});
