﻿// JavaScript Document
//ボックス
$(document).ready(function(){
	$(".jqbox").colorbox();
		$("#click").click(function(){ 
		$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this			 window again and this message will still be here.");
			return false;
		});
	});

function add(drpid,txt,gyo) {
	$("#"+drpid).empty();
	var tag1 = document.getElementById(drpid);
	
	tag1.removeAttribute("onmouseover");

  	/* A要素を新たに生成 */

	var ancdom = document.createElement("a");

	ancdom.href = "http://www.meigaracode.com/ps/meigara.php?key="+txt+"&id="+drpid;
	
	ancdom.rel = "jqbox";
	ancdom.className = "jqbox";
	
	var txt = drpid+" "+ txt + "(" + gyo + ")";
	/* テキストノードを新たに生成 */
	var text = document.createTextNode(txt);
	
			/* 画面表示 */

	ancdom.appendChild(text);
	tag1.appendChild(ancdom);
	
    $(".jqbox").colorbox();

}

//タブ
$(document).ready(function() {

	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});

$(document).ready(function() {

	//Default Action
	$(".tab_content2").hide(); //Hide all content
	$("ul.tabs2 li:first").addClass("active").show(); //Activate first tab
	$(".tab_content2:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs2 li").click(function() {
		$("ul.tabs2 li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content2").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});


