if (typeof Slide == "undefined") var Slide = new Object();Slide = {	/* Customizable Variables */	time				: 3	, refresh_banners 	: true	, track_views 		: true	, track_directory	: 'spectacle'	/* Class Variables */	, current 			: 1	, count 			: 1	, timer				: false	, auto 				: false	, t 				: false	, page_title		: ''	, init: function(count) {						if (parseInt(count) > 0) this.count = count;			// Store base page title, used for tracking			this.page_title = document.title;			return true;				}	, next: function() {				var go = ((this.current + 1) > this.count) ? 1 : (parseInt(this.current) + 1);			this._go(go);	}	, prev: function() {				var go = (this.current == 1) ? this.count : (parseInt(this.current) - 1);						this._go(go);	}	, go: function(go) {			this._go(go);	}	, toggleAuto: function() {			if (!this.auto) {							this.timer = this.time;								// Turn auto on				$('slide_nav_prev', 'slide_nav_next').invoke('addClassName', 'disabled');				$('slide_nav_auto').update('STOP SLIDESHOW');				$('slide_nav_auto_details').update('('+this.timer+')');								this.auto 	= true;				this.t 		= setTimeout('slide_doAuto()', 1000);													} else {							// Turn auto off				$('slide_nav_prev', 'slide_nav_next').invoke('removeClassName', 'disabled');				$('slide_nav_auto').update('VIEW AS SLIDESHOW');				$('slide_nav_auto_details').update('');				this.auto 	= false;							}	}		, doAuto: function() {			this.t = false;				if (!this.auto) return;				if (this.timer === 0) {			// Show next			this.next();				} else {				this.timer = (this.timer - 1);			$('slide_nav_auto_details').update('('+this.timer+')');			this.t = setTimeout('slide_doAuto()', 1000);		}				}	, _go: function(go) {				//console.log('_go:: '+go+'/current:'+this.current+'/count:'+this.count);			// Turn off slideshow timer			this.t 	= null;			// Hide current & remove thumbnail class 			$$('.slide_image_item', '.slide_desc_item').invoke('hide');			$$('.photos_thumbs A.current').invoke('removeClassName', 'current');			// Show next image & add thumbnail class			$('slide_image_'+go, 'slide_desc_'+go).invoke('show');			$('slide_thumb_'+go).addClassName('current');			// Navigation Buttons			$('slide_nav_prev', 'slide_nav_next').invoke('removeClassName', 'disabled');			if (go == 1) {				$('slide_nav_prev').addClassName('disabled');			} else if (go == this.count) {				$('slide_nav_next').addClassName('disabled');			}			// Is slideshow on?			if (this.auto) {				if (go >= this.count) {					// Turn off slideshow, we are at the end					this.toggleAuto();										this.auto = false;									} else {					// Continue slideshow					this.auto 	= false;					this.toggleAuto();				}							}			if (!this.track_views && this.refresh_banners) {				// Refresh banners manually (From sundance.js)				if (frames['bannerTopFrame']) frames['bannerTopFrame'].location.href = frames['bannerTopFrame'].location.href;				if (frames['bannerBtmFrame']) frames['bannerBtmFrame'].location.href = frames['bannerBtmFrame'].location.href;			} else if (this.track_views) {								// Page tracking				Sundance.tracking.flashAction(this.track_directory, this.page_title + ' - Photo '+go, ((this.refresh_banners) ? 1 : 0));			}			this.current = go;						return true;		}};function slide_doAuto() {	Slide.doAuto();}