/*
 * 隱藏已來過訪客的迴響輸入欄位
 * http://blog.joytown.tw
 * Date: 2009-03-24
 */

jQuery.noConflict();
jQuery(document).ready(function() {
if(jQuery('input#author[value!=""]').length>0){
jQuery("#author_info").css('display','none');
var change='<span  id="show_author_info" style="cursor: pointer; color:#2970A6;">change &raquo;</span>';  //定義change，style是定義CSS樣式，讓他有超鏈接的效果，color要根據你自己的來改，當然你也可以在CSS中定義#show_author_info來實現，這樣是為了不用再去修改style.css而已！
var close='<span  id="hide_author_info" style="cursor: pointer;color: #2970A6;">cancel &raquo;</span>';   //定義close
jQuery('#guest').append(change);
jQuery('#guest').append(close);
jQuery('#hide_author_info').css('display','none');
jQuery('#show_author_info').click(function() {
jQuery('#author_info').slideDown('slow')
jQuery('#show_author_info').css('display','none');
jQuery('#hide_author_info').css('display','inline');
jQuery('#hide_author_info').click(function() {
jQuery('#author_info').slideUp('slow')
jQuery('#hide_author_info').css('display','none');
jQuery('#show_author_info').css('display','inline'); })})}})

/*
 * Comment Tab
 */
function selectTab(showContent,selfObj){
	var tab = document.getElementById("tabs").getElementsByTagName("li");
	var tablength = tab.length;
	for(i=0; i<tablength; i++){
		tab[i].className = "";
	}
	selfObj.parentNode.className = "selectTab";
	for(i=0; j=document.getElementById("tabContent"+i); i++){
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";	
}

