$(function(){

/*  -----------------------------------------------------------------------
	DFC Widget Init ------------------------------------------------------- */
	/*
	var DFCcookie = $.DFCCookie('DFCWidget') ? false : true;
	$("#dfc_data").DFCWidget({
		wtSite:"All-You-Need-Is-Cheese",
		widgetAttrs: { id:'dfc_widget' },
		onLoad: {show:DFCcookie, delay:3000},
		onShow:function (widget) {
			if(DFCcookie){
				$('#header .centerFull').css({ paddingTop:50 });
				$('#header').css({ height:190 });
				t = setTimeout(function(){ //Old version of jQuery - so no delay()
					$('#header .centerFull').animate({ paddingTop:0 }, 1500);
					$('#header').animate({ height:140 }, 1500);
				}, 1500);
				$.DFCCookie('DFCWidget', true, { expires: 1, path: '/'  });
			}else{
				$('#dfc_widget').width(305);
			}
		}
	});
	$("#dfc_data").DFCWidget();
	*/
	
/*  -----------------------------------------------------------------------
	Login et Register ----------------------------------------------------- */
	/*$("#b_login, #b_register").bind("click", function(){	
		msg         = '\
			<div class="pi_transfertodg"> \
				<h2>You are about to leave<br />All You Need is Cheese.</h2> \
				<p>All You Need is Cheese is part of the Dairy Goodness family of sites. Registering as a member allows you to create a virtual recipe book, save and share menus, post tips, subscribe to the Dairy Goodness monthly e-newsletter, and more!</p> \
			</div> \
			<a href='+ $(this).attr('href') +' class="b b3"   id="b_goondg"><span>Register or Log In</span></a> \
			<a href="javascript:;" onclick="$.modal.close();" id="b_stayonaynic">Stay on All You Need is Cheese</a> \
		'; //Msg hardcoded, because it will be temporary. For all popin, use tipopins module
		$.modal(msg, { maxWidth:600 });
		
		return false;
	});*/
	
	
/*  -----------------------------------------------------------------------
	Footer Parallax ------------------------------------------------------- */
	var w=$(window).width();
    $('body').mousemove(function(e){
        var xpos=e.pageX;
        var p=Math.round(e.pageX/$(window).width()*100);

		$('#footer').css({backgroundPosition: Math.round(p / 3) + '% 50px'});
        $('.middleground', "#footer").css({backgroundPosition: Math.round(p / 2) + '% 30px'});
		$('.foreground', "#footer").css({backgroundPosition: Math.round(p -20) + '% 0'});
    });
});
