/*
ドロップダウンメニューを jQueryで実現するスクリプト
http://www.css-lecture.com/template/2008/0524/
*/

// onLoad出来たら、実行
function dropDownInit( targetID ){
	$(document).ready(function(){
		// FireFoxだけなら下記ブロックだけでOK
		$(targetID+" li").hover(
			function(){ $("ul", this).fadeIn("fast"); }, 
			function() { } 
		);
		
		// IE6は <a> にしか :hoverが効かないので、 li にも効かせるための対応
		if (document.all) {
			$(targetID+" li").hoverClass ("sfHover");
		}
	});
}


// hover したときに、クラスを一時的に与える
$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};	  


