$(document).ready(function(){

	$('.accordion').accordion({
		autoHeight  : false,
		collapsible : true,
		active      : false // start compressed
	});

	$('#slider1')
	.anythingSlider({
//		width          : 700,
//		height         : 260,
//		startStopped   : true,
//		toggleControls : true,
//		theme          : 'metallic',

  // Appearance
  width               : 700,      // Override the default CSS width
  height              : 260,      // Override the default CSS height
  //  resizeContents      : false,      // If true, solitary images/objects in the panel will expand to fit the viewport

  // Navigation
  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
  buildNavigation     : true,      // If true, buildsa list of anchor links to link to each panel
  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)

  // Slideshow options
  autoPlay            : true,      // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
  startStopped        : false,     // If autoPlay is on, this can force it to start stopped
  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, it will pause the autoplay until the video has completed
  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               : 6000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
  animationTime       : 800,       // How long the slideshow transition takes (in milliseconds)
  easing              : "swing",    // Anything other than "linear" or "swing" requires the easing plugin

	})
//	.find('.panel:not(.cloned) img') // ignore the cloned panels
//		.attr('rel','group')           // add all slider images to a colorbox group
//		.colorbox({
//			width: '90%',
//			height: '90%',
//			href: function(){ return $(this).attr('src'); },
			// use $(this).attr('title') for specific image captions
//			title: 'Press escape to close',
//			rel: 'group'
//		});

	$('#slider2')
	.anythingSlider({
		width               : 600,
		height              : 350,
		startStopped        : true,
		resizeContents      : false,
		navigationFormatter : function(i, panel){
			return ['Recipe', 'Quote', 'Image', 'Quote #2', 'Image #2', 'Test'][i - 1];
		}
	})
	.anythingSliderFx({
		// base FX definitions
		// '.selector' : [ 'effect(s)', 'distance/size', 'time', 'easing' ] - 'time' and 'easing' are optional parameters
		'.quoteSlide'         : [ 'top', '500px', '1000', 'easeOutElastic' ],
		'.expand'             : [ 'expand', '10%', '400', 'easeOutBounce' ],
		'.textSlide h3'       : [ 'top left', '200px', '500', 'easeOutCirc' ],
		'.textSlide img,.fade': [ 'fade' ],
		'.textSlide li'       : [ 'listLR' ] /*,

		// for more precise control, use the "in" and "out" definitions
		// in = the animation that occurs when you slide "in" to a panel
		    inFx  : {
		     '.textSlide h3'  : { opacity: 1, top  : 0, time: 400, easing : 'easeOutBounce' },
		     '.textSlide li'  : { opacity: 1, left : 0, time: 400 },
		     '.textSlide img' : { opacity: 1, time: 400 },
		     '.quoteSlide'    : { top : 0, time: 400, easing : 'easeOutElastic' },
		     '.expand'        : { width: '100%', top: '0%', left: '0%', time: 400, easing : 'easeOutBounce' }
		    },
		// out = the animation that occurs when you slide "out" of a panel
		// (it also occurs before the "in" animation)
		     outFx : {
		     '.textSlide h3'      : { opacity: 0, top  : '-100px', time: 350 },
		     '.textSlide li:odd'  : { opacity: 0, left : '-200px', time: 350 },
		     '.textSlide li:even' : { opacity: 0, left : '200px',  time: 350 },
		     '.textSlide img'     : { opacity: 0, time: 350 },
		     '.quoteSlide:first'  : { top : '-500px', time: 350 },
		     '.quoteSlide:last'   : { top : '500px', time: 350 },
		     '.expand'            : { width: '10%', top: '50%', left: '50%', time: 350 },
		    } */
	});

	$('#slider3')
	.anythingSlider({
		width               : 500,
		height              : 400,
		startStopped        : true,
		navigationFormatter : function(i, panel){
			return ['Top', 'Right', 'Bottom', 'Left'][i - 1];
		}
	})
	.anythingSliderFx({
		'.caption-top'    : [ 'caption-Top', '50px' ],
		'.caption-right'  : [ 'caption-Right', '130px' ],
		'.caption-bottom' : [ 'caption-Bottom', '50px' ],
		'.caption-left'   : [ 'caption-Left', '130px' ]
	})
	/* use this code to have the caption slide in and out from the bottom with each panel
	.anythingSliderFx({
		inFx: {
			'.caption-top'    : { top: 0, opacity: 1, time: 400 },
			'.caption-right'  : { right: 0, opacity: 1, time: 400 },
			'.caption-bottom' : { bottom: 0, opacity: 1, time: 400 },
			'.caption-left'   : { left: 0, opacity: 1, time: 400 }
		},
		outFx: {
			'.caption-top'    : { top: -50, opacity: 0, time: 350 },
			'.caption-right'  : { right: -150, opacity: 0, time: 350 },
			'.caption-bottom' : { bottom: -50, opacity: 0, time: 350 },
			'.caption-left'   : { left: -150, opacity: 0, time: 350 }
		}
	}) */
	// 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') );
*/
});
