var _relativeSeals = function() {
	this.up = null;
	this.seals = null;
	this.down = null;
	this.page = null;
	this.max_page = null;
};
_relativeSeals.prototype.init = function() {
	if(!document.getElementById('sidebarRight')) return;
	var self = this;

	this.up = $($('#sidebarRight .navi')[0]).find('img');
	this.down = $($('#sidebarRight .navi')[1]).find('img');
	this.seals = $('#sidebarRight .sidesealboxul');
	var length = this.seals.find('li').length;
	
	this.page = 1;
	this.max_page = Math.ceil(length / 3);
	
	this.up.css('cursor', 'pointer');
	this.down.css('cursor', 'pointer');
	this.seals.css('top', 0);
	
	this.up.css('visibility', 'hidden');
	if(length <= 3)
		this.down.css('visibility', 'hidden');
	
	this.up.click( function() { self.moveUp(); } );
	this.down.click( function() { self.moveDown(); } );
};
_relativeSeals.prototype.moveUp = function() {
	if(!this.seals) return;
	// 225px
	this.down.css('visibility', '');
	this.seals.animate({top: (this.page-2) * -205 }, 400);
	
	--this.page;
	if(this.page == 1)
		this.up.css('visibility', 'hidden');
};
_relativeSeals.prototype.moveDown = function() {
	if(!this.seals) return;
	// 225px
	this.up.css('visibility', '');
	this.seals.animate({top: this.page * -205 }, 400);
	
	++this.page;
	if(this.page == this.max_page)
		this.down.css('visibility', 'hidden');
};
