// JavaScript Document
$(function(){
	// キービジュアル切り替え	 
	// jumpURL[0]、imgSRC[0]を増やせば2枚以上での画像切り替えが可能
	
	// コンフィグ
	num = 0;
	jumpURL = new Array();
	imgSRC = new Array(); 
	jumpURL[0] = "/english/products/projector/lineup/ip-01ue/";
	jumpURL[1] = "/english/products/projector/lineup/ip-01ue/";
	imgSRC[0] = "/english/products/projector/images/index-keyvisual-01.jpg";
	imgSRC[1] = "/english/products/projector/images/index-keyvisual-02.jpg"; 
	timer = 10000;// ""で数字を囲わないで下さい。文字列扱いになるので。
	
	function changeImg(){
		num++;
		num %= 2;

		$('div#keyVisual p a').each(function(){
			$(this).attr('href',jumpURL[num]);	
			$(this).find('img').attr('src',imgSRC[num]);
		});
		setTimeout(function(){changeImg()}, timer);
	}
	changeImg();
	
	// 暫定版ロールオーバー
	$('img.hover').hover(function(){
		$(this).css("opacity","0.8");
	},function() {
		$(this).css('opacity','1.0');
	});

});