function doBalloon(index){
	var theID = "tapeBalloon" + index;
	$("#" + theID).css("display","block");
}
function undoBalloon(index){
	var theID = "tapeBalloon" + index;
	$("#" + theID).css("display","none");
}

var s1playing = false;
var s2playing = false;
var s3playing = false;
soundManager.url = 'swf/';
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
	var s1 = soundManager.createSound({
	  id:'s1',
	  url:'playerFiles/Wedding Ring.mp3'
	});
	var s2 = soundManager.createSound({
		id:'s2',
		url:'playerFiles/The Arms Forest.mp3'
	});
	var s3 = soundManager.createSound({
		id:'s3',
		url:'playerFiles/Talk It Over.mp3'
	});
}
					
function doTape(theID){
	if(theID == "s1"){
			if(s1playing == true){
				soundManager.stop(theID);
				s1playing = false;
				$("#tape1").css("background-position","top");
			}
			else {
				if(s2playing == true){
					soundManager.stop('s2');
					s2playing = false;
					$("#tape2").css("background-position","top");
				}
				if(s3playing == true){
					soundManager.stop('s3');
					s3playing = false;
					$("#tape3").css("background-position","top");
				}
				soundManager.play(theID,{volume:50});
				s1playing = true;
				$("#tape1").css("background-position","bottom");
			}
	}
	if(theID == "s2"){
			if(s2playing == true){
				soundManager.stop(theID);
				s2playing = false;
				$("#tape2").css("background-position","top");
			}
			else {
				if(s1playing == true){
					soundManager.stop('s1');
					s2playing = false;
					$("#tape1").css("background-position","top");

				}
				if(s3playing == true){
					soundManager.stop('s3');
					s3playing = false;
					$("#tape3").css("background-position","top");

				}
				soundManager.play(theID, {volume:50});
				s2playing = true;
				$("#tape2").css("background-position","bottom");

			}					
	}
	if(theID == "s3"){
			if(s3playing == true){
				soundManager.stop(theID);
				s3playing = false;
				$("#tape3").css("background-position","top");
			}
			else {
				if(s2playing == true){
					soundManager.stop('s2');
					s2playing = false;
					$("#tape2").css("background-position","top");
				}
				if(s1playing == true){
					soundManager.stop('s1');
					s3playing = false;
					$("#tape1").css("background-position","top");
				}
				soundManager.play(theID, {volume:50});
				s3playing = true;
				$("#tape3").css("background-position","bottom");
			}				
	}
}
