﻿/*
	メニュー用
*/
$(document).ready(function(){
	$("#nav-one li").hover(
		function(){ $("ul", this).fadeIn("fast"); }, 
		function() { } 
	);
if (document.all) {
		$("#nav-one li").hoverClass ("sfHover");
	}
});

$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};	  



/*
	firefox 2 bugfix inline-block
*/

$(function(){  
var UA = navigator.userAgent;  
var version = UA.replace(/.+Firefox\/([\d\.]+$)/,"$1");  
if(UA.match(/Firefox/) && version.match(/[12]\.[\d\.]+/)){  
$(".inline-block").each(function(){  

$(this).css("display","-moz-inline-box").html("<div style='display: block; width: "+$(this).width()+"px;'>"+$(this).html()+"</div>");  
}); 
}  
});  

	

/*
	共通関数
*/

function getRandomNumber(){
	return new Date().getTime();
}

/*
	OSの違いを吸収する
*/
function loadCustamCSS(){
	
	var os = (navigator.appVersion.indexOf ("Win") > -1) ? "win" : "mac";
	
	if( os == "mac"){
		document.write ('<link rel="stylesheet" href="/css/mac.css" type="text/css" />');		
	}

}
loadCustamCSS();


