
$(window).load(function(){
	// NowLoading
	if(!$.browser.msie) {
		$("#loader")
			.animate({
					opacity: 0
				}
				, 1500
				, "easeOutExpo"
				, function()
					{
						$(this).css("display","none");
						$("#wrapper").css("display","block");
						$("#wrapper").fadeTo(0, 0).fadeTo(1200, 1);
						
						// jScrollPane
						//$('#page_4 .works_detail .exp').jScrollPane();
					}
			);
	} else {
		if(parseInt($.browser.version) > 6){
			$("#loader").css("display","none");
			$("#wrapper").css("display","block");
			
			// jScrollPane
			//$('#page_4 .works_detail .exp').jScrollPane();
		} else {
			// IE6
			return false;
		}
	}
	
	// image rollover
	initRollOverImages();
	
	if( !$.browser.chrome && !$.browser.safari ){
/*
		// Cursor
		$( "body, body a" ).css( "cursor","url(" + imgPath + "cursor.cur), pointer" );
		// Mouse Down
		$('body, body a').mousedown(function() {
			changeCursor( $(this), false );
		});
		// Mouse Up
		$('body, body a').mouseup(function() {
			changeCursor( $(this), true );
		});
*/
	}
	
	
	// 中央に調整する
	updatePosition.setup();
	
	
	// マウスホイールで横スクロール
	$(window).mousewheel(horizontalScroll.setup);
	window.onmousewheel = document.onmousewheel = horizontalScroll.setup;
	
	// 場所によってアイコンを表示させる
	scrollComplete();


	// TOPまでスクロールする
	setTimeout(function () {
		//smartScroll.start('top',0.08);
		//smartScroll.start('top',0.03);
		smartScroll.start('top',0.5);
		
		// SAKURA
		$("#wrapper .effect_area_1").snowfall({
			flakeCount :50, // 数
			flakeIndex : 1000, // スタイルシートのz-indexの値
			maxSpeed : 3, // 最大速度
			minSpeed : 1, // 最小速度
			maxSize  : 20, // 最大サイズ
			minSize  : 3, // 最小サイズ
			image : templateUrl + imgPath + 'sakura_hanabira.png'
		});
	}, 3000 );



});




