$(document).ready(function(){
	cssBrowserSelector();
	initRollOvers();
	smoothScroll(); //イージングスクロール
	//$('img').each( function () { enablePNG (this) });
	$('.mainConcept,.oneEntryWrap a.permalink').hover(
		function(){
			$(this).find('img').fadeTo(350,0.5);
		},
		function(){
			$(this).find('img').fadeTo(200,1);
		}
	);
	if(jQuery("body#index")[0]) {
		$('.permalink').click(function(){
			var postLinks = $(this).attr("href");
			window.location.href = postLinks;
		})
	};
	if(jQuery("body.cate")[0]) {
		$('.permalink').click(function(){
			var postLinks = $(this).attr("href");
			window.location.href = postLinks;
		})
	};
	if(jQuery("body#awards,body#media")[0]) {
		$('.thumbList li').hover(
			function(){
				$(this).find('p.thumbAwards img').fadeTo(350,0.5);
				$(this).find('p.thumbAwards a').css('background-position','left bottom');
			},
			function(){
				$(this).find('p.thumbAwards img').fadeTo(200,1);
				$(this).find('p.thumbAwards a').css('background-position','left top');
			}
		);
		$('.thumbList li').each(function(){
			var thisLink = $(this).find('.thumbAwards a').attr('href');
			$(this).find('a').removeAttr('href');
			$(this).click(function(){
				window.open(thisLink);
				//window.location.href = thisLink;
			});
		});
	};
});
function thumbs(){
	$(".mainPhoto img").wrap("<div class='thumb-img'><div class='thumb-inner'></div></div>");
}
function thumbsImg(){
	$(".mainPhoto img").each(
		function(){
			$(this).css("margin-left","-60%");
			$(this).css("margin-top","-60%");
		}
	)
}
function commentOpen () {
	/* comment open */
	$("#comment .commentLog").slideToggle(300);
}
function commentWrite () {
	/* comment open */
	$("#comment #commentForm").slideToggle(300);
}
