var stage;

/* Stage
----------------------------------------------- */
var Stage = function() {
	stage = this;

	// list
	stage.width = 0;
	stage.height = 0;
	stage.max_cols = 0;
	stage.max_rows = 0;
	stage.over_cols = 0;
	stage.over_rows = 0;

	// detail image
	stage.detail_top = 0;
	stage.detail_left = 0;

	// control
	stage.previous_top = 0;
	stage.previous_left = 0;
	stage.next_top = 0;
	stage.next_left = 0;
}

Stage.prototype = {
	StageListGrid: function() {
		stage.width = $(window).width() - itemsize;
		stage.height = $(window).height() - itemsize;
		stage.max_cols = Math.floor(stage.width / itemsize);
		stage.max_rows = Math.floor(stage.height / itemsize);
		stage.over_cols = Math.floor((stage.width % itemsize) / stage.max_cols);
		stage.over_rows = Math.floor((stage.height % itemsize) / stage.max_rows);
	},
	StageDetailGrid: function() {
		stage.width = $(window).width();
		stage.height = $(window).height();
		stage.detail_top = Math.floor(stage.height / 2 - itemlargesize / 2) - 40;
		stage.detail_left = 0;
		
		stage.previous_top = Math.floor(stage.height / 2 - 60);
		stage.previous_left = Math.floor(stage.width / 2 - itemlargesize / 2) - 100;
		
		stage.next_top = Math.floor(stage.height / 2 - 60);
		stage.next_left = Math.floor(stage.width / 2 + itemlargesize / 2) + 50;
	}
}
