// JavaScript Document


$(document).ready(function(){
	var sh = screen.height;														 
	var sw = screen.width;
	$(".checkText").text("あなたの画面解像度は"+sw+"x"+sh+"です。");
	
	$(".wink").hover(function(){
		$(this).css("opacity", "0.2");
		$(this).css("filter", "alpha(opacity=20)");
		$(this).fadeTo("fast", 1.0);
	});

	$(".fade").hover(function(){
		$(this).fadeTo("fast", 0.6);
	}, function(){
		$(this).fadeTo("fast", 1);
	});
	
	
	$(".grid .itemBox").hover(function(){
		$(this).addClass("hoverDeco");
	}, function(){
		$(this).removeClass("hoverDeco");												 
	});
	
	// smooth scroller
	$("a[href^=#]").click(function() {
		var hash = this.hash;
		if(!hash || hash == "#")
			return false;
		$($.browser.safari ? 'body' : 'html')
			.animate({scrollTop: $(hash).offset().top}, 1000, "swing");
	});

	$(".gmenuAbout").click(function(){
		$("#about").addClass("hoverDeco");
		$("#profile").removeClass("hoverDeco");												 
		$("#twitter").removeClass("hoverDeco");												 
		$("#link").removeClass("hoverDeco");												 
		$("#contact").removeClass("hoverDeco");												 
	});
	
	$(".gmenuProfile").click(function(){
		$("#profile").addClass("hoverDeco");
		$("#about").removeClass("hoverDeco");												 
		$("#twitter").removeClass("hoverDeco");												 
		$("#link").removeClass("hoverDeco");												 
		$("#contact").removeClass("hoverDeco");												 
	});
	
	$(".gmenuTwitter").click(function(){
		$("#twitter").addClass("hoverDeco");
		$("#about").removeClass("hoverDeco");												 
		$("#profile").removeClass("hoverDeco");												 
		$("#link").removeClass("hoverDeco");												 
		$("#contact").removeClass("hoverDeco");												 
	});
	
	$(".gmenuLink").click(function(){
		$("#link").addClass("hoverDeco");
		$("#about").removeClass("hoverDeco");												 
		$("#profile").removeClass("hoverDeco");												 
		$("#twitter").removeClass("hoverDeco");												 
		$("#contact").removeClass("hoverDeco");												 
	});
	
	$(".gmenuContact").click(function(){
		$("#contact").addClass("hoverDeco");
		$("#about").removeClass("hoverDeco");												 
		$("#profile").removeClass("hoverDeco");												 
		$("#twitter").removeClass("hoverDeco");												 
		$("#link").removeClass("hoverDeco");												 
	});

	//$("a[rel^='prettyPhoto']").prettyPhoto();
	//$("#wrapper img").lazyload();
});

