﻿/*************************************************
* functions with jQuery
* since:	2010-11-25
* last update: 2011-01-11
* create: morita
*************************************************/
/*====================================================================


 ■　function.js


--------------------------------------------------------------------*/


/*====================================================================

 □　初期設定

--------------------------------------------------------------------*/



/*====================================================================

 □　処理リスト

--------------------------------------------------------------------*/

$(document).ready(function(){
	//実行する処理を記述
	funcRollOver();
	funcPageScroll()
	//funcCrossBrowser()
});

/*--------------------------------------------
	funcRollOver [ロールオーバー制御]
--------------------------------------------*/
function funcRollOver(){
	var cache = [];
	$('img[src*=_off.],input[src*=_off.]').hover(function(){
           var onSrc=$(this).attr('src').replace('_off.','_on.')
           $(this).attr('src',onSrc)
       },function(){
           var offSrc=$(this).attr('src').replace('_on.','_off.')
           $(this).attr('src',offSrc)
       }).each(function(){
		var cacheImage = $(this)
		var cacheSrc=cacheImage.attr('src').replace('_off.','_on.')
		cacheImage.src = cacheSrc;
		cache.push(cacheImage);
	})
};

/*--------------------------------------------
	funcPageScroll [ページスクロール制御]
--------------------------------------------*/

function funcPageScroll(){
	$(".pagetop a").click(function(e){
		e.preventDefault(); 																
		$((navigator.userAgent.indexOf("Opera") != -1) ? document.compatMode == 'BackCompat' ? 'body' : 'html' :'html,body').animate({scrollTop:0}, 'normal');
	});
}

		

/*--------------------------------------------
	funcCrossBrowser [ブラウザバグ調整]
--------------------------------------------*/
/*
function funcCrossBrowser(){

	if(navigator.userAgent.indexOf("Firefox/3.0") != -1 || navigator.userAgent.indexOf("Firefox/3.5") != -1){
		;	
	}
	
	if(navigator.userAgent.indexOf("Opera") != -1){ 
		
	}
	
	if(navigator.userAgent.indexOf("Mac") != -1 && navigator.userAgent.indexOf("Safari") != -1 ){ 
		
	}
	
	if(navigator.userAgent.indexOf("Mac") != -1 && navigator.userAgent.indexOf("Firefox") != -1 ){
		
	}	
	
	if(navigator.userAgent.indexOf("iPad") != -1){
		
	}	

}
*/
