/* 
 * RealBvoice
 * utility.js - サイト内機能用
 * 
 * created : 2009.10.06
 * last modified : 2009.11.26
 *
 */

/*
 * ■aboutRBV
 *----------------------------------------------------------------------------------------------
 */

/*
 * family
 * サムネイル　一列の最後にクラス追加（余白削除のため）
 */
$(document).ready(function() {
	$("#family .layout_inner-2col .main_column ul.mod_pictView li:nth-child(3n)").addClass("tail");
});

/*
 * BBBSC
 */
$(document).ready(function() {
	$("#bbbsc ul.bbbsc_posters li:nth-child(4n)").addClass("tail");
});

/*
 * Buffulo Style
 */
$(document).ready(function() {
	$("#buffulo-style ul.view_styles li:nth-child(3n)").addClass("tail");
});


/*
 * ■Shop
 *----------------------------------------------------------------------------------------------
 */

/*
 * トップ
 */ 
$(document).ready(function() {
	$(".category_shop .shopLinks div:nth-child(3n)").addClass("tail");
});


/*
 * 各詳細ページ
 * 
 * ・サムネイル　一列の３つめにクラス追加（余白削除のため）
 *             　マウスオン・オフでクラス追加・削除（IE6対策）
 * ・店舗詳細情報の上にpが来たら余白あける
 */

$(document).ready(function() {
	$(".category_shop .main_column .shop_images ul.shop_images-thumb li:nth-child(3n)").addClass("third");
	$(".category_shop .main_column .shop_images ul.shop_images-thumb li").hover(
		function(){$(this).addClass("thumb_on");},
		function(){$(this).removeClass("thumb_on");}		
	);
	
	//サムネイルにオンマウスでメイン写真切り替え
	$(".category_shop .main_column .shop_images ul.switch_tn li img").hover(
		function(){$(".category_shop .main_column .shop_images .shop_images-top img").attr("src",$(this).attr("alt"));}
	);

	$(".category_shop .main_column .shop_info p + dl.shop_info-detail").addClass("underSel");
});


/*
 * ■RBVRiders
 *----------------------------------------------------------------------------------------------
 */

$(document).ready(function() {
	$("#surf ul.ridersList li:nth-child(5n)").addClass("tail");
});



/*
 * ■news
 *----------------------------------------------------------------------------------------------
 */
 
/* サイドバーに角丸
 */
$(document).ready(function() {
	$(function() {
		$("#news div.sub_column").corner("5px");
	});
});




/* ■汎用
 * サムネイル←→メイン画像操作
 *-----------------------------------------------------------------------------------------------
 */
 
$(document).ready(function() {
	$("#content ul.switch-thumb li img").hover(
		function(){$(this).css("border-color","#C1C1C1");},
		function(){$(this).css("border-color","#000000");}		
	);
	
	//サムネイルにオンマウスでメイン写真切り替え
	$("#content ul.switch-thumb img").hover(
		function(){$("#content .switch-main img").attr("src",$(this).attr("alt"));}
	);
	
	/* 以下テスト用 */
	$("#content .switch-thumb-indivi img").hover(
		function(){$(this).css("border-color","#C1C1C1");},
		function(){$(this).css("border-color","#000000");}		
	);
	$("#content .switch-thumb-indivi img").hover(
		function(){$("#content .switch-main img").attr("src",$(this).attr("alt"));}
	);
});




/* ■汎用
 * ボーダー色変え
 *-----------------------------------------------------------------------------------------------
 */
 
$(document).ready(function() {
	$("#content ..mod_pictView02 img").hover(
		function(){$(this).css("border-color","#C1C1C1");},
		function(){$(this).css("border-color","#000000");}		
	);
});




