var slider2 = ['1', '2', '3', '4', '5'];


function formatText(index, panel){
	return slider2[index - 1];
}

$(document).ready(function(){
  $('#slider2').removeClass('closed'); //ARITHNEA: Added due to Fallback solution
  
	$('#slider2').anythingSlider({
		width               : 600,        // if resizeContent is false, this is the default width if panel size is not defined
		height              : 350,        // if resizeContent is false, this is the default height if panel size is not defined
		resizeContents      : false,      // If true, solitary images/objects in the panel will expand to fit the viewport
		startStopped        : false,       // If autoPlay is on, this can force it to start stopped
		buildArrows         : false,     // If true, builds the forwards and backwards buttons
		 autoPlay            : false      // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not

	});

	$("#slide-jump").click(function(){
		$('#slider2').anythingSlider(4);
		return false;
	});

	// Report Events to console
	$('.anythingSlider').bind('slideshow_start slideshow_stop slideshow_paused slideshow_unpaused slide_init slide_begin slide_complete',function(e, slider){
		// show object ID + event (e.g. "slider1: slide_begin")
		var txt = slider.$el[0].id + ': ' + e.type + ', now on panel #' + slider.currentPage;
		$('#status').text(txt);
		if (window.console && window.console.firebug){ console.debug(txt); } // added window.console.firebug to make this work in Opera
	});

	// Theme Selector (This is really for demo purposes only)
	var themes = ['minimalist-round','minimalist-square','metallic','construction','cs-portfolio'];
	$('#currentTheme').change(function(){
		var theme = $(this).val();

		if (!$('link[href*=' + theme + ']').length) {
			$('body').append('<link rel="stylesheet" href="css/theme-' + theme + '.css" type="text/css" media="screen" />');
		}
		$('#slider1').closest('div.anythingSlider')
			.removeClass( $.map(themes, function(t){ return 'anythingSlider-' + t; }).join(' ') )
			.addClass('anythingSlider-' + theme);
	});

});


