/* ---------------------------------------------------------------------------- *
gnavi.js
	hover effect(fadein/fadeout)
	(C)isabella.jp.
/* ---------------------------------------------------------------------------- */



$(function(){
/* ------------------------------------------------------------ */



DS_gnavi = {
	dir_level     : $('body').attr('id'),
	category_id   : ['about','regu','result','column','play'],
	speed_fadein  : 200,//mouseover
	speed_fadeout : 200,//mouseout
	set:function(){
		var path;
		if( this.dir_level == 'top' ){
			path = '';
		}else if( this.dir_level == 'second' ){
			path = '/common/';
		}
		var gnavi_len = $('div#gnavi li').length;
		for(var i=0; i<gnavi_len; i++){
			$( 'a', $('div#gnavi li')[i] ).append('<img src="' + path + 'images/gnavi_' + this.category_id[i] + '_' + this.dir_level + '_ovr.gif" width="120" height="54" alt="" class="gnavi_ovr" />');
		}
		$('.gnavi_def').hover(
			function(){
				$(this).stop().animate({opacity:'0'},this.speed_fadein);
			},
			function(){
				$(this).stop().animate({opacity:'1'},this.speed_fadeout);
			}
		);
	}
};
DS_gnavi.set();



/* ------------------------------------------------------------ */
});




