function gallery()
{
  this.currentGallery = 0;
  this.left = function ()
  {
    if(this.currentGallery > 0)
    {
      this.currentGallery--;
      $("#galleryContainer_"+this.currentGallery).animate({height: "show"}, 300, "easein");
    }
    this.showArrow();
  }
  this.right = function ()
  {
    if(document.getElementById("galleryContainer_"+(this.currentGallery+1)))
    {
      $("#galleryContainer_"+this.currentGallery).animate({height: "hide"}, 300, "easein");
      this.currentGallery++;
    }
    this.showArrow();
  }
  this.showArrow = function()
  {
    if(document.getElementById("galleryContainer_"+(this.currentGallery-1)))
      $("#imgUp").css('visibility', 'visible');
    else
      $("#imgUp").css('visibility', 'hidden');
      
    if(document.getElementById("galleryContainer_"+(this.currentGallery+1)))
      $("#imgDown").css('visibility', 'visible');
    else
      $("#imgDown").css('visibility', 'hidden');
    
  }
  return this;
}

gl = new gallery();
gl.left();
