/*!
 * jQuery domAnnaChor plugin: jQuery vertical centering
 * Examples and documentation at: 
 * version 1.0.0 (05/03/2009)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */

/**
 *  .goKayChoをつけた次の要素がスライドアップしたりスライドダウンしたり。
 *  サイドバーとかであるやつですね！
 *  ex.<div class='sidebar_title'>リンク集はここをクリック！</div><div class='sidebar_content'>リンク１....</div>
 *  で、$('.sidebar_title').goKayCho();ってやると、
 *  .sidebar_titleをクリックするたびに、sidebar_contentが見えたり見えなくなったり。カーソルもポインタに変えるよ！
 *  ↓の一箇所をちょっといじれば、最初は非表示状態に出来るよ！
 *
 * @name goKayCho
 * @type jQuery
 * @cat Plugins/
 * @return jQuery
 * @author psychedesire (http://www.psychedesire.org/)
 */
(function($){
	$.fn.goKayCho = function(){
		$(this).css("cursor","pointer");
//		$(this).next().css("display","none");
//↑のコメントを消すと、最初は非表示状態に出来るよ！
		$(this).click(function(){
			var nextDisplay = $(this).next().css("display");
			if(nextDisplay != "none"){
					$(this).next().slideUp(500);
			}else{
				$(this).next().slideDown(500);
			}
		});
	}

})(jQuery);