// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

$(document).ready(function() {
	if($('#mycarousel').length != 0) {
		$('#mycarousel').jcarousel({wrap:'circular'});
	}
});	

Shadowbox.init();

function showIngredients()
{
	var xmlhttp, htmlText;
	if (window.XMLHttpRequest)
	{
		 xmlhttp=new XMLHttpRequest();
	} else {
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (xmlhttp != null) 
	{ 
		xmlhttp.open("GET","ingredients/beetroot-almond.txt",false); // the false makes this synchronous!
		xmlhttp.send();
		htmlText = xmlhttp.responseText;		
	}
	else
	{
		alert("Could not load ingredients!");
	}
	
	Shadowbox.open({
        content: htmlText,
        player:     "html",
        title:      "Ingredients",
        height:     350,
        width:      350
    });
}
