
		// Set up Sliders
		// **************
		$(function(){

			$('#slider1').anythingSlider({
				startStopped    : false, // If autoPlay is on, this can force it to start stopped
				
				theme           : 'default',
				startPanel          : 1,         // This sets the initial panel
				hashTags            : true,      // Should links change the hashtag in the URL?
				buildArrows         : false,      // If true, builds the forwards and backwards buttons
				toggleArrows        : false,     // if true, side navigation arrows will slide out on hovering & hide @ other times
				buildNavigation     : true,      // If true, builds a list of anchor links to link to each panel
				toggleControls      : false,     // if true, slide in controls (navigation + play/stop button) on hover and slide change, hide @ other times
				navigationFormatter : null,      // Details at the top of the file on this use (advanced use)
				forwardText         : "&raquo;", // Link text used to move the slider forward (hidden by CSS, replaced with arrow image)
				backText            : "&laquo;", // Link text used to move the slider back (hidden by CSS, replace with arrow image)
				autoPlay            : true,      // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
				pauseOnHover        : true,      // If true & the slideshow is active, the slideshow will pause on hover
				resumeOnVideoEnd    : true,      // If true & the slideshow is active & a youtube video is playing, the autoplay will pause until the video completes
				stopAtEnd           : false,     // If true & the slideshow is active, the slideshow will stop on the last page
				playRtl             : false,     // If true, the slideshow will move right-to-left
				startText           : "Start",   // Start button text
				stopText            : "Stop",    // Stop button text
				delay               : 8000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
				animationTime       : 600,       // How long the slideshow transition takes (in milliseconds)

				onSlideComplete : function(slider){
					// alert('Welcome to Slide #' + slider.currentPage);
				}
			});

		});




		// Demo functions
		// **************
		$(function(){

			// External Link
			$("#slide-jump").click(function(){
				$('#slider2').anythingSlider(4);
				return false;
			});

			// Report Events to console & features list
			$('.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);
			});

			// Add a slide
			var imageNumber = 1;
			$('button.add').click(function(){
				$('#slider1')
					.append('<li><img src="images/slide-tele-' + (++imageNumber%2 + 1)  + '.jpg" alt="" /></li>')
					.anythingSlider(); // update the slider
			});
			$('button.remove').click(function(){
				$('#slider1 > li:not(.cloned):last').remove();
				$('#slider1').anythingSlider(); // update the slider
			});

		});
