// JavaScript Document
jQuery.noConflict();
//トップページ　トピックスエリアのスクロールバーデザイン
jQuery(function(){
	jQuery(".itemid33 #component").jScrollPane({showArrows:true,scrollbarWidth:14});
});

/*商品検索オプション*/
jQuery(function() {
	jQuery("#search_option_show a").click(option_show);
});
function option_show(){
	jQuery("#search_detail").css("display","block");	
}

jQuery(function() {
	jQuery("#search_option_hide a").click(option_hide);
});
function option_hide(){
	jQuery("#search_detail").css("display","none");	
}

//リストの高さを揃える
jQuery(function(){
	var tallestcolumn = 0;
	jQuery(".itemInfo > a").each(function(){
 			currentHeight = jQuery(this).height();
 			if(currentHeight > tallestcolumn){
 				tallestcolumn  = currentHeight;
 			}
 		}	
 	)
	jQuery(".itemInfo > a").css("height",tallestcolumn);	
	//jQuery(".itemInfo > a").css("height",200);	
});








/*メニュー関連*/
jQuery(function() {
	jQuery('.menu li').hover(
		function() { jQuery(this).addClass('hover'); },
      	function() { jQuery(this).removeClass('hover'); }
	);
	jQuery('.menu li ul li').hover(
		function() { jQuery(this).addClass('hover'); },
      	function() { jQuery(this).removeClass('hover'); }
	);
});


//通常ボタン用
jQuery(function(){
	jQuery(".rollover[id!='select']").each(function(){
		this.originalSrc = jQuery(this).attr("src");
		this.rolloverSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)$/, "_f2"+"$1");
		this.rolloverImg = new Image();
		this.rolloverImg.src = this.rolloverSrc;
	}).hover(function(){
		jQuery(this).attr("src",this.rolloverSrc);
	},function(){
		jQuery(this).attr("src",this.originalSrc);
	});
    
	jQuery("#select").each(function(){
    	this.originalSrc = jQuery(this).attr("src");
    	this.selectSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)$/, "_f3"+"$1");
    	jQuery("#select").attr("src",this.selectSrc);
	});
	
});


//カートボタン用
jQuery(function(){
				
	//「購入する」ボタン
	jQuery("#btnBuy").each(function(){
		this.originalSrc = jQuery(this).attr("src");
		this.rolloverSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)$/, "_f2"+"$1");
		this.rolloverImg = new Image();
		this.rolloverImg.src = this.rolloverSrc;
	}).hover(function(){
		jQuery(this).attr("src",this.rolloverSrc);
	},function(){
		jQuery(this).attr("src",this.originalSrc);
	});
	
	//「お気に入りに追加する」ボタン
	jQuery("#btnOkiniiri").each(function(){
		this.originalSrc = jQuery(this).attr("src");
		this.rolloverSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)$/, "_f2"+"$1");
		this.rolloverImg = new Image();
		this.rolloverImg.src = this.rolloverSrc;
	}).hover(function(){
		jQuery(this).attr("src",this.rolloverSrc);
	},function(){
		jQuery(this).attr("src",this.originalSrc);
	});
	
	
});




//トップページ レコメンドリストの高さを揃える
jQuery(function(){
	var tallestcolumn = 0;
	jQuery(".moduletable_recommend > a").each(function(){
 			currentHeight = jQuery(this).height();
 			if(currentHeight > tallestcolumn){
 				tallestcolumn  = currentHeight;
 			}
 		}	
 	)
	jQuery(".moduletable_recommend > a").css("height",tallestcolumn);	
});

//リスト レコメンドリストの高さを揃える
jQuery(function(){
	var tallestcolumn = 0;
	jQuery("#recommend > a").each(function(){
 			currentHeight = jQuery(this).height();
 			if(currentHeight > tallestcolumn){
 				tallestcolumn  = currentHeight;
 			}
 		}	
 	)
	jQuery("#recommend > a").css("height",tallestcolumn);	
});


//吹き出しのフッターを付加する
jQuery(function(){
	jQuery(".moduletable_submenu .menu ul").append(jQuery("<div id='fukidashi_foot'> </div>"));	
	//jQuery(".moduletable_submenu .menu ul").after(jQuery("<div id='fukidashi_foot'> </div>"));	
});


//トップページ　トピックスエリアのスクロールバーデザイン
/*
jQuery(function(){
	jQuery(".id0 #component").jScrollPane({showArrows:true,scrollbarWidth:14});
});
*/


//ライトボックス
jQuery(function() {
    jQuery('#thumbnail a').lightBox();
});


//商品詳細ページ　商品説明分（下側）色変更
jQuery(function() {
    jQuery('#detail .itemText:eq(1)').css("color","#333");
});

//メニューの吹き出し内
/*
jQuery(function() {
	//吹き出し内の最初の要素（非表示）
    jQuery('.moduletable_submenu ul.menu li li:eq(0)').addClass("first");
});
jQuery(function() {
	//吹き出し内の２番目の要素（タイトル扱い）
    jQuery('.moduletable_submenu ul.menu li li:eq(1)').addClass("second");
});
*/


//パンくず
/*
jQuery(function(){
	jQuery(".pathway:eq(4)").css("display","none");			
});
*/




