/*
	Artist List Tab Switch
	Author : CREATIVEMAN PRODUCTIONS.
*/

$(document).ready(function(){
	/* パラメータを受取る */
	/* アドレスの「?」以降の引数(パラメータ)を取得 */
	var parm=location.search;
	/* 引数がない時は処理しない */
	if (parm) {
		/* 先頭の?をカット */
		parm=parm.substring(1);
		/* 「&」で引数を分割して配列に */
		var pair=parm.split("&");
		var i=temp="";
		var key=new Array();
		for (i=0; i < pair.length; i++) {
			/* 配列の値を「=」で分割 */
			temp=pair[i].split("=");
			keyName=temp[0];
			keyValue=temp[1];
			/* キーと値の連想配列を生成 */
			key[keyName]=keyValue;
		}
		/* タブのデフォルト表示切替 */
		switch (key['a'].substr(-2,2)) {
		case "08":
			$("#tab01").hide();
			$("#tab03").hide();
			break;
		case "09":
			$("#tab01").hide();
			$("#tab02").hide();
			break;
		default:
			$("#tab02").hide();
			$("#tab03").hide();
			break;
		}
	} else {
		$("#tab02").hide();
		$("#tab03").hide();
	}

	$(".ctab01").click(function () {
		$("#tab01").fadeIn("fast");
		$("#tab02").fadeOut("fast");
		$("#tab03").fadeOut("fast");
		return false;
	});
	$(".ctab02").click(function () {
		$("#tab01").fadeOut("fast");
		$("#tab02").fadeIn("fast");
		$("#tab03").fadeOut("fast");
		return false;
	});
	$(".ctab03").click(function () {
		$("#tab01").fadeOut("fast");
		$("#tab02").fadeOut("fast");
		$("#tab03").fadeIn("fast");
		return false;
	});
});
