// JavaScript Document

$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)

$('#yes').hide();
$('#problynot').hide();
$('#maybe').hide();
$('#hate').hide();


$.slideUp = function(){
	$('#yes').slideUp(400);
	$('#problynot').slideUp(400);
	$('#maybe').slideUp(400);
	$('#hate').slideUp(400);
	
	
};


$.textOpen = function(){
	$("a#yes-toggle").text("+ Music we like and will play");	
	$("a#problynot-toggle").text("+ Music we like but probably won’t play");	
	$("a#maybe-toggle").text("+ Music we don’t really like a whole lot but might play if you ask nicely");	
	$("a#hate-toggle").text("+ Music we don’t like and won’t play, ever");
};


  
 // toggles the slickbox on clicking the noted link
  $('a#yes-toggle').click(function() {
	switch ($(this).text()){
		case "+ Music we like and will play":
		$.textOpen();
		$(this).text("- Music we like and will play");
		$.slideUp();
		break;
		default:
		$(this).text("+ Music we like and will play");
	}
	$('#yes').slideToggle(400);
	return false;	
  });  





  $('a#problynot-toggle').click(function() {
	switch ($(this).text()){
		case "+ Music we like but probably won’t play":
		$.textOpen();
		$(this).text("- Music we like but probably won’t play");
		$.slideUp();
		break;
		default:
		$(this).text("+ Music we like but probably won’t play");
	}
	$('#problynot').slideToggle(400);
	return false;	
  });  




  $('a#maybe-toggle').click(function() {
	switch ($(this).text()){
		case "+ Music we don’t really like a whole lot but might play if you ask nicely":
		$.textOpen();
		$(this).text("- Music we don’t really like a whole lot but might play if you ask nicely");
		$.slideUp();
		break;
		default:
		$(this).text("+ Music we don’t really like a whole lot but might play if you ask nicely");
	}
	$('#maybe').slideToggle(400);
	return false;	
  });  



  $('a#hate-toggle').click(function() {
	switch ($(this).text()){
		case "+ Music we don’t like and won’t play, ever":
		$.textOpen();
		$(this).text("- Music we don’t like and won’t play, ever");
		$.slideUp();
		break;
		default:
		$(this).text("+ Music we don’t like and won’t play, ever");
	}
	$('#hate').slideToggle(400);
	return false;	
  });  

});
