// ----------------------- //
// Accordion Image Changer //
// ----------------------- //

// グローバル変数 初期設定
var _aic_image_id = new Array();
_aic_image_id[0] = 'image01';
_aic_image_id[1] = 'image02';
_aic_image_id[2] = 'image03';
_aic_image_id[3] = 'image04';

var _aic_image_logo = new Array();
_aic_image_logo[0] = 'logo01';
_aic_image_logo[1] = 'logo02';
_aic_image_logo[2] = 'logo03';
_aic_image_logo[3] = 'logo04';

var _aic_image_left = new Array();
_aic_image_left[0] = '0px';
_aic_image_left[1] = '195px';
_aic_image_left[2] = '389px';
_aic_image_left[3] = '583px';

var _aic_image_bgpos = new Array();
_aic_image_bgpos[0] = '-118px';
_aic_image_bgpos[1] = '-194px';
_aic_image_bgpos[2] = '-438px';
_aic_image_bgpos[3] = '-434px';

var _aic_easing_type = 'easeInOutSine';

// マウスオーバー時の処理
function aicMouseOverImage(idname)
{
	if(navigator.userAgent.match(/iPhone|iPad/))
	{
		return;
	}
	var id_match = false;
	for(i = 0; i < 4; i++)
	{
		if(_aic_image_id[i] == idname)
		{
			// マウスオーバー画像処理
			$("#"+idname).stop().animate($.browser.msie?{width:'766px', left:'0px', opacity:1, backgroundPositionX:'0px'}:{width:'766px', left:'0px', opacity:1, backgroundPosition:'0px'}, 350, _aic_easing_type);
			$("#"+_aic_image_logo[i]).css({display:'none'});
			id_match = true;
		}
		else
		{
			if(id_match)
			{
				// マウスオーバーより右側の画像処理
				$("#"+_aic_image_id[i]).stop().animate({width:'0px', left:'766px', opacity:0.8}, 350, _aic_easing_type);
				$("#"+_aic_image_logo[i]).stop().animate({left:'368px', opacity:0}, 350, _aic_easing_type);
			}
			else
			{
				// マウスオーバーより左側の画像処理
				$("#"+_aic_image_id[i]).stop().animate({width:'0px', left:'0px', opacity:0.8}, 350, _aic_easing_type);
				$("#"+_aic_image_logo[i]).stop().animate({left:'-184px', opacity:0}, 350, _aic_easing_type);
			}
		}
	}
}

// マウスアウト時の処理
function aicMouseOutImage()
{
	for(i = 0; i < 4; i++)
	{
		$("#"+_aic_image_id[i]).stop().animate($.browser.msie?{width:'184px', left:_aic_image_left[i], opacity:1, backgroundPositionX:_aic_image_bgpos[i]}:{width:'184px', left:_aic_image_left[i], opacity:1, backgroundPosition:_aic_image_bgpos[i]}, 550, _aic_easing_type);
		$("#"+_aic_image_logo[i]).css({opacity:'0.0', display:'inline'});
		$("#"+_aic_image_logo[i]).stop().animate({left:'0px', opacity:1}, 550, _aic_easing_type);
	}
}
// --- //
// EOF //
// --- //
