	var slideShow = new Class({    	Implements: [Options, Events],
		container:null,		timer:null,		status:'playing',		elements:[],		path:null,		slider:null,		total:0,		cur:0,		prev:0,		initialize: function(container, images, path){    	    this.container = $(container);			images.each(function(item,index){					var cElement = new Element('div',{						'styles':{									'position':'absolute',									'backgroundImage':'url('+path+'/'+item+')',									'height':'200px',									'width':'686px',									'opacity':'0'								}					})
				cElement.inject(this.container);this.elements.extend([cElement]);this.total++;			}, this);				this.elements.getLast().setStyle('opacity','100');this.cur = this.total - 1;	    },		startShow: function(){				var els = this.container.getElements('div');				var slide = function(){					if (this.cur == this.total) this.cur = 0;					if (this.cur == 0) this.prev = this.total - 1; else this.prev = this.cur - 1;					els[this.prev].fade('out');					els[this.cur].fade('in');					this.cur++;				}			slide.bind(this);			this.slider = slide.periodical(7000,this);
		},		stopShow:function(){
			this.slider = $clear(this.slider);	},
		log:function(){			console.log(this.container);			console.log(this.images);		}	});function init(container, slides, path, play_but, stop_but){var show = new slideShow(container,	slides, path);$('play-stop').addEvent('click',function(){if (show.status == 'stoped'){show.startShow();show.status = 'playing';this.setStyle('background', 'url('+path+'/'+stop_but+') no-repeat top left');	} else if (show.status == 'playing'){show.stopShow();show.status = 'stoped';this.setStyle('background', 'url('+path+'/'+play_but+') no-repeat top left');}});	show.startShow();}
