// JavaScript Document
/* Function to slide panels  to a set point (var num) using elastic easing functions */
function slide(num, start,callback) {
	debug("slide called: N - "+num+" - S: "+start);
	easeType = 'easeOutBounce';
	easeTime = 4000;
	$('#panel1').animate({"left": num+"em",
						 	"width": 75-num+"em"}, 
						 	easeTime, easeType);
	
	$('#panel2').animate({"left": num+1.5+"em",
						 	"width": 75-(num+1.5)+"em"}, 
						 	easeTime+100, easeType);
	
	$('#panel3').animate({"left": num+3+"em",
						 	"width": 75-(num+3)+"em"}, 
						 	easeTime+200, easeType);
	
	$('#panel4').animate({"left": num+4.5+"em",
						 	"width": 75-(num+4.5)+"em"}, 
						 	easeTime+300, 
							easeType,
							function(){
							 	$("#content div:eq(4)").fadeIn(2000,callback);
							});
}
function debug(string){
	if (document.getElementById('debug')){
		out = document.getElementById('debug').innerHTML + "<br />\n" + string;
		document.getElementById('debug').innerHTML = out;
	}
}
