/* -----------------------------------------------------------------------*/
// imageOpacity
/* -----------------------------------------------------------------------*/
$(function() {
	$(".banner").hover(function() {
		$(this).fadeTo(360, 0.8)
	},function() {
		$(this).fadeTo(360, 1.0)
	});
	$("#RecipeBox .box02 .fBox .colImg a").hover(function() {
		$(this).fadeTo(360, 0.8)
	},function() {
		$(this).fadeTo(360, 1.0)
	});
});
$(function(){
	$("#RecipeBox #zairyou .itemCol:odd").addClass('itemColR');
	var sets = [], temp = [];
	$('#RecipeBox #zairyou .itemCol').each(function(i) {
		temp.push(this);
		if (i % 2 == 1) {
		sets.push(temp);
		temp = [];
	}
	});
	if (temp.length) sets.push(temp);
	/* 各組ごとに高さ揃え */
	$.each(sets, function() {
		$(this).flatHeights();
	});
});
	$(document).ready(function() {
		// fadeBtn
		$('.detailBtn').append('<span class="hover"></span>').each(function () {
			var $span = $('> span.hover', this).css('opacity', 0);
				$(this).hover(function () {
				$span.stop().fadeTo(500, 1);
				},function () {
				$span.stop().fadeTo(500, 0);
			});
		});
	});
$(function() {
	var offset = $('#pagetop').offset();
	var topPadding = 180;
	$(window).scroll(function() {
		if ($(window).scrollTop() > offset.top) {
			$('#pagetop').stop().animate({
				marginTop: $(window).scrollTop() - offset.top + topPadding
			});
		} else {
			$('#pagetop').stop().animate({
				marginTop: 0
			});
		};
	});
});
/* -----------------------------------------------------------------------*/
// scroll
/* -----------------------------------------------------------------------*/
$(function () {
	$('a[href*=#TOP]').click(function () {
		$(this).blur();
		$('html,body').animate({ scrollTop: 0 }, 1000, 'easeInOutQuart');
	return false;
	});
});
