$(function(){
	// scroll ----------------
	// for エラー: jQuery.dequeue is not a function
	( function( $ ) {
	$.dequeue = function( a , b ){
	return $(a).dequeue(b);
	};
	})( jQuery );
	
	if(typeof document.body.style.maxHeight != "undefined") {
		$('a.pageTopLink').click(function() {
		$('#header').ScrollTo(500, 'easeout');
		return false;
		});
	}
	
	// rollover ----------------
	$("img.mHover").hover(function(){
		//$(this).fadeTo(500,1.0);
		$(this).fadeTo("fast",0.7);
	}, function(){
		$(this).fadeTo("fast",1.0);
	});
	
	// OS,browser check ----------------
	osCheck();
	
});



//------------------------------------------------------------
// Function
//------------------------------------------------------------

// OS,browser check
function osCheck() {
	// OS判定	
	var Mac=(navigator.userAgent.indexOf("Mac")!=-1);
	if (Mac){
		var Safari = (navigator.userAgent.indexOf('Safari') >= 0);
		var Firefox = (navigator.userAgent.indexOf('Firefox') >= 0);
		if (Safari){ 
			// Mac Safari
			bodyClass('s');
		} else if (Firefox) {
			// Mac Firefox
			bodyClass('f');
		}
	}
}

// body add class
function bodyClass(bw) {
	if (bw == 's') {
		// bodyに class「safari」を設定
		document.getElementsByTagName('body')[0].className='safari';
	} else {
		// bodyに class「firefox」を設定
		document.getElementsByTagName('body')[0].className='firefox';
	}
}