var MenuNavSlideshow = new Class({
	Extends: Slideshow,
	
	initialize: function(__element, __id, _type) {
		this.id		= __id;
		this.parent(__element);
		
		this.setSlideIds();
	},
	
	slideIdsArray	: [],
	currentSlideId	: '',
	
	setup: function() {
		this.parent();
		
		//add transparent div to avoid clicking elements in inactive slides
		for (var i=0; i<this.slidesArray.length; i++) {
			var slide	= this.slidesArray[i],
				div		= '<div class="' + COVER_CLASS + '" style="z-index:108;position:relative;margin-top:-' + this.slideHeight + 'px;width:' + this.slideWidth + 'px;height:' + this.slideHeight + 'px"></div>';
			
			slide.set('html', slide.get('html') + div);
		}
		
		this.iniWithFirstSlide(true);
	},
	
	iniWithFirstSlide: function(_setupDone) {
		if (_setupDone) this.gotoSlide(0);
	},
	
	setDimensions: function() {
		this.slideWidth		= 719;
		this.slideHeight	= 540;
	},
	
	addNav: function() {
		
	},
	
	updateNav: function() {
		
	},
	
	nextClicked: function() {
		if (this.currentSlide < this.numSlides-1) {
			var slideId	= this.slidesArray[this.currentSlide+1].get('id');
			slideId		= slideId.replace(this.id + '_', '');
			hashnav.navigateTo(this.id, OFFICES_STRING + '=' + slideId);
		}
	},
	
	prevClicked: function() {
		if (this.currentSlide > 0) {
			var slideId	= this.slidesArray[this.currentSlide-1].get('id');
			slideId		= slideId.replace(this.id + '_', '');
			hashnav.navigateTo(this.id, OFFICES_STRING + '=' + slideId);
		}
	},
	
	gotoSlide: function(_i) {
		if (this.currentSlide > -1) {
			//add cover div back
			this.slidesArray[this.currentSlide].getChildren('.' + COVER_CLASS).setStyle('display', 'block');
		}
		
		this.parent(_i);
		
		this.slidesArray[this.currentSlide].getChildren('.' + COVER_CLASS).setStyle('display', 'none');
	},
	
	
	gotoSlideId: function(_id) {
		if (this.currentSlideId != _id) {
			this.currentSlideId	= _id;
			var index			= this.slideIdsArray.indexOf(_id);
			this.gotoSlide(index);
		}
	},
	
	setSlideIds: function() {
		var slideRef	= this;
		
		this.el.getElements('.slide').each(function(el){
			var divId	= el.get('id');
			var id		= divId.replace(slideRef.id+'_', '');
			slideRef.slideIdsArray.push(id);
		});
		
		this.currentSlideId	= this.slideIdsArray[0];
	}
	
});
