/*================================================
INDEX script. by sensitivefreak, delie. 080430
------------------------------------------------*/
var Index = {};
	Index.init = function() {
		new Index.latest();
	};
	Index.latest = function() {
		this._parent = dom.$("latest-article");
		this._tab_parent = dom.$$(this._parent, "div", "tab")[0];
		this._tab = dom.$$(this._parent, "a", "section");
		this._more = dom.$$(this._parent, "a", "more");
		this._more_link = new Array("/www_v2/bbs/board.php?bo_table=news","/www_v2/bbs/board.php?bo_table=new_product");
		this._con = dom.$$(this._parent, "div", "list");
		this._space = 22;
		this._on = 1;
		this.evt();
	};
	Index.latest.prototype = {
		evt : function() {
			for(var i = 0; i < this._tab.length; i++) {
				this._tab[i].no = i;
				this._tab[i].call = this;
				evt.add(this._tab[i], "mouseover", function() { this.call.swap(this.no) });
			}
		},
		swap : function(_no) {
			this._tab_parent.style.backgroundPosition = "left "+(-(_no*this._space))+"px";
			this._more[0].setAttribute("href",this._more_link[_no]);
			for(var i = 0; i < this._tab.length; i++)
				(i == _no) ? this._con[i].style.display = "block" : this._con[i].style.display = "none";
		}
	};

evt.add(window, "load", function() { Index.init() });