jQuery(function(){

	// フォントサイズ
	var fontSize = 100;

	if (jQuery.cookie('fontSize_midera')) {
		fontSize = Number(jQuery.cookie('fontSize_midera'));
	}

	function fontResize() {
		jQuery.cookie('fontSize_midera', fontSize);
		jQuery('#main').css('font-size', fontSize + '%');
	}

	jQuery('#font_resize_s').click(function() {
		if(fontSize <= 84) return;
		fontSize = fontSize - 8;
		fontResize();
	});
	jQuery('#font_resize_m').click(function() {
		fontSize = 100;
		fontResize();
	});
	jQuery('#font_resize_l').click(function() {
		if(fontSize >= 116) return;
		fontSize = fontSize + 8;
		fontResize();
	});

	fontResize();

	jQuery('.to_top a').click(function() {
		jQuery('html,body').animate({ scrollTop: 0 }, 500);
		return false;
	});

	jQuery('a.hover_image img').hover(
		function(){
			var src = jQuery(this).attr('src').replace('.png', '_hover.png');
			jQuery(this).attr('src', src);
		},
		function(){
			var src = jQuery(this).attr('src').replace('_hover.png', '.png');
			jQuery(this).attr('src', src);
		}		
	);

	// ぼかしタイトル
	var grow = jQuery('#content h3.grow');
	var growHtml = grow.html();
	grow.html(
		'<span style="top: 6px; color: #FBC8DD;">' + growHtml + '</span>' + 
		'<span style="top: 10px; color: #FBC8DD;">' + growHtml + '</span>' + 
		'<span style="left: 26px; color: #FBC8DD;">' + growHtml + '</span>' + 
		'<span style="left: 30px; color: #FBC8DD;">' + growHtml + '</span>' + 
		'<span style="top: 7px; color: #FEF7FA;">' + growHtml + '</span>' + 
		'<span style="top: 9px; color: #FEF7FA;">' + growHtml + '</span>' + 
		'<span style="left: 27px; color: #FEF7FA;">' + growHtml + '</span>' + 
		'<span style="left: 29px; color: #FEF7FA;">' + growHtml + '</span>' + 
		'<span style="color: #970F44;">' + growHtml + '</span>'
	);
});