/* --------------------------------
	グローバルメニュー
-------------------------------- */

$(function() {
	gnav.prototype.init();
});

function gnav(e, elm) {
	if ((e || window.event).type == 'mouseout') gnav.prototype.hide(elm);
	else gnav.prototype.show(elm);
}

gnav.prototype = {
	// 初期化
	init: function() {
		$('#header_gnav>ul').eq(0).children('li:has(ul)').each(function() {
			$(this).mouseout(function(e) {
				gnav(e, this);
			}).mouseover(function(e) {
				gnav(e, this);
			});
		});
	},

	// 表示
	show: function(elm) {
		$(elm).addClass('open');
	},

	// 非表示
	hide: function(elm) {
		$(elm).removeClass('open');
	}
}







