
var SlideOut=Class.create({initialize:function(options){this.options=Object.extend({Container:'photos',showMove:{x:0,y:310,mode:"absolute",duration:0.5},hideMove:{x:-270,y:310,mode:"absolute",duration:0.2}},options);Event.observe(document.body,'mouseover',this.check.bind(this));this.running=false;this.lastAction='';this.showMove=null;this.hideMove=null;this.showMoveRunning=false;this.hideMoveRunning=false;this.containerActive=false;this.hideIt=false;},check:function(e){var ele=e.findElement('#'+this.options.Container);if(typeof(ele)=="undefined"){this.hide();}
else{this.show();}},show:function(){this.hideIt=false;if(this.hideMoveRunning||this.showMoveRunning){return;}
this.showMove=new Effect.Move(this.options.Container,{x:this.options.showMove.x,y:this.options.showMove.y,mode:this.options.showMove.mode,duration:this.options.showMove.duration,beforeStart:function(){this.showMoveRunning=true;this.hideMoveRunning=false;this.containerActive=true;}.bind(this),afterFinish:function(){this.showMoveRunning=false;this.hideMoveRunning=false;this.containerActive=true;if(this.hideIt){this.hide();}}.bind(this)});},hide:function(){this.hideIt=true;if(!this.containerActive)
return;if(this.hideMoveRunning||this.showMoveRunning){return;}
this.hideMove=new Effect.Move(this.options.Container,{x:this.options.hideMove.x,y:this.options.hideMove.y,mode:this.options.hideMove.mode,duration:this.options.hideMove.duration,beforeStart:function(){this.hideMoveRunning=true;this.showMoveRunning=false;}.bind(this),afterFinish:function(){this.hideMoveRunning=false;this.showMoveRunning=false;this.containerActive=false;}.bind(this)});}});
