
/* jQuery Slideshow Tabs
 *
 * Example:
 * $( "#slideshow" ).slideshowTabs( 2300 );
 *
 * dependencies: jquery.core.js,
 *               jquery.ui.js,
 *               slideshow.css
 */
 
;( function( $ )
{
	$.fn.extend( $.fn,
	{
		startSlideshow: function( rotateInterval )
		{
			var _self = this; // just in case the scope gets screwey
			
			if( rotateInterval == null ) {
				rotateInterval = 3000; // set a default value to rotateInterval
			}
			
			$( this ).find( "> ul" ).tabs({ fx: { opacity: "toggle" } }); // create the tabs
			$( this ).find( "> ul" ).tabs( "rotate", rotateInterval ); // set them spinning!
			
			// create the pause button			
			/*
			$( this ).find( "> ul" ).append( "<li />" );
			$( this ).find( "> ul li:last" )
				.addClass( "pause" )
				.append( "<span>Pause</span>" )
				.attr( "title", "pause" )
				.bind( "click", function( e ) {
					$( _self ).find( "> ul" ).tabs( "rotate", null );
				});
			*/
			
			// create the play button			
			/*
			$( this ).find( "> ul" ).append( "<li />" );
			$( this ).find( "> ul li:last" )
				.addClass( "play" )
				.append( "<span>Play</span>" )
				.attr( "title", "play" )
				.bind( "click", function( e ) {
					$( _self ).find( "> ul" ).tabs( "rotate", rotateInterval );
				});
			*/
			
		} // slideshowTabs
		
	}); // $.fn.extend()
	
})( $ );