$(function(){

	//イメージロールオーバー
	var image_cache = new Object();
	$("img.ovr").each(function(i) {
	var imgsrc = this.src;
	var dot = this.src.lastIndexOf('.');
	var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
	image_cache[this.src] = new Image();
	image_cache[this.src].src = imgsrc_on;
	/*$(this).css("opacity","1");*/
	$(this).hover(
	  function() { this.src = imgsrc_on; /*$(this).stop().animate({opacity: 0.8},300);*/ },
	  function() { this.src = imgsrc; /*$(this).stop().animate({opacity: 1},300);*/ });
	});
	
	//ブロック要素リンク	
	$('ul#rakutopul li a').each(function(){
		var biglink = $(this).attr('href');
		
		$(this).parent().hover(
			function(){
				$(this).css("cursor","pointer");
				$(this).css("background","#efefef");
				$(this).css("border-color","#aba99d");
			},
			function(){
				$(this).css("cursor","default");
				$(this).css("background","#ffffff");
				$(this).css("border-color","#efefef");
			});
		
		$(this).parent().click(function() {
		window.open(biglink,'_self');
		return false;
	  });
	});

	//ブロック要素リンク	
	$('ul#bousaitopul li a').each(function(){
		var biglink = $(this).attr('href');
		
		$(this).parent().hover(
			function(){
				$(this).css("cursor","pointer");
				$(this).css("background","#efefef");
				$(this).css("border-color","#aba99d");
			},
			function(){
				$(this).css("cursor","default");
				$(this).css("background","#ffffff");
				$(this).css("border-color","#efefef");
			});
		
		$(this).parent().click(function() {
		window.open(biglink,'_self');
		return false;
	  });
	});
	
	//ブロック要素リンク	
	$('ul#tobiraul li a').each(function(){
		var biglink = $(this).attr('href');
		
		$(this).parent().hover(
			function(){
				$(this).css("cursor","pointer");
				$(this).css("background","#efefef");
				$(this).css("border-color","#aba99d");
			},
			function(){
				$(this).css("cursor","default");
				$(this).css("background","#ffffff");
				$(this).css("border-color","#efefef");
			});
		
		$(this).parent().click(function() {
		window.open(biglink,'_self');
		return false;
	  });
	});


	//ブロック要素リンク	
	$('ul.productul li a').each(function(){
		var biglink = $(this).attr('href');
		
		$(this).parent().hover(
			function(){
				$(this).css("cursor","pointer");
				$(this).css("background","#efefef");
				$(this).css("border-color","#aba99d");
			},
			function(){
				$(this).css("cursor","default");
				$(this).css("background","#ffffff");
				$(this).css("border-color","#efefef");
			});
		
		$(this).parent().click(function() {
		window.open(biglink,'_self');
		return false;
	  });
	});

})
