// DOMREADY

function switchback(myid) {
  var movie1intro       = "<img src=\"images/vid_th_1.jpg\" alt=\"Intro - Welcome to ACZONE High\" />";
  var movie2queenbee    = "<img src=\"images/vid_th_2.jpg\" alt=\"Long Live the Queen Bee\" />";
  var movie3cheerleader = "<img src=\"images/vid_th_3.jpg\" alt=\"Cheerleader in Love\" />";
  var movie4slice       = "<img src=\"images/vid_th_4.jpg\" alt=\"Little Slice of Purgatory\" />";
  var movie5minor       = "<img src=\"images/vid_th_5.jpg\" alt=\"Minor in Biology\" />";
  var movie6lovebot     = "<img src=\"images/vid_th_6.jpg\" alt=\"Lovebot\" />";
  var movie7bump        = "<img src=\"images/vid_th_7.jpg\" alt=\"Bump in the Night\" />";
  var movie8hail        = "<img src=\"images/vid_th_8.jpg\" alt=\"Hail the Mothership\" />";
  var movie9clear       = "<img src=\"images/vid_th_9.jpg\" alt=\"Clear as Day\" />";
  var movie10making     = "<img src=\"images/vid_th_10.jpg\" alt=\"The Making Of ACZONE the Musical\" />";

  switch (myid) {
    case "movie1intro":
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie4slice").html(movie4slice);
      $("#movie5minor").html(movie5minor);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie7bump").html(movie7bump);
      $("#movie8hail").html(movie8hail);
      $("#movie9clear").html(movie9clear);
      $("#movie10making").html(movie10making);
      break;
    case "movie2queenbee":
      $("#movie1intro").html(movie1intro);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie4slice").html(movie4slice);
      $("#movie5minor").html(movie5minor);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie7bump").html(movie7bump);
      $("#movie8hail").html(movie8hail);
      $("#movie9clear").html(movie9clear);
      $("#movie10making").html(movie10making);
      break;
    case "movie3cheerleader":
      $("#movie1intro").html(movie1intro);
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie4slice").html(movie4slice);
      $("#movie5minor").html(movie5minor);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie7bump").html(movie7bump);
      $("#movie8hail").html(movie8hail);
      $("#movie9clear").html(movie9clear);
      $("#movie10making").html(movie10making);
      break;
    case "movie4slice":
      $("#movie1intro").html(movie1intro);
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie5minor").html(movie5minor);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie7bump").html(movie7bump);
      $("#movie8hail").html(movie8hail);
      $("#movie9clear").html(movie9clear);
      $("#movie10making").html(movie10making);
      break;
    case "movie5minor":
      $("#movie1intro").html(movie1intro);
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie4slice").html(movie4slice);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie7bump").html(movie7bump);
      $("#movie8hail").html(movie8hail);
      $("#movie9clear").html(movie9clear);
      $("#movie10making").html(movie10making);
      break;
    case "movie6lovebot":
      $("#movie1intro").html(movie1intro);
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie4slice").html(movie4slice);
      $("#movie5minor").html(movie5minor);
      $("#movie7bump").html(movie7bump);
      $("#movie8hail").html(movie8hail);
      $("#movie9clear").html(movie9clear);
      $("#movie10making").html(movie10making);
      break;
    case "movie7bump":
      $("#movie1intro").html(movie1intro);
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie4slice").html(movie4slice);
      $("#movie5minor").html(movie5minor);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie8hail").html(movie8hail);
      $("#movie9clear").html(movie9clear);
      $("#movie10making").html(movie10making);
      break;
    case "movie8hail":
      $("#movie1intro").html(movie1intro);
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie4slice").html(movie4slice);
      $("#movie5minor").html(movie5minor);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie7bump").html(movie7bump);
      $("#movie9clear").html(movie9clear);
      $("#movie10making").html(movie10making);
      break;
    case "movie9clear":
      $("#movie1intro").html(movie1intro);
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie4slice").html(movie4slice);
      $("#movie5minor").html(movie5minor);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie7bump").html(movie7bump);
      $("#movie8hail").html(movie8hail);
      $("#movie10making").html(movie10making);
      break;
    case "movie10making":
      $("#movie1intro").html(movie1intro);
      $("#movie2queenbee").html(movie2queenbee);
      $("#movie3cheerleader").html(movie3cheerleader);
      $("#movie4slice").html(movie4slice);
      $("#movie5minor").html(movie5minor);
      $("#movie6lovebot").html(movie6lovebot);
      $("#movie7bump").html(movie7bump);
      $("#movie8hail").html(movie8hail);
      $("#movie9clear").html(movie9clear);
      break;
    default:
      break;
  }
  
}

$(function () {
  $(".qtmovie").click(function(){
    var $me = $(this);
    var movie1intro       = "<embed src=\"images/HD_WELCOME_TO_ACZONE-download h264-h264_AczoneDownload-aczone-small.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie2queenbee    = "<embed src=\"images/HD_QUEEN_BEE-download h264-h264_AczoneDownload-aczone-small.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie3cheerleader = "<embed src=\"images/HD_CHEERLEADER-download h264-h264_AczoneDownload-aczone-small.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie4slice       = "<embed src=\"images/HD_PURGATORY-download h264-h264_AczoneDownload-aczone-small.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie5minor       = "<embed src=\"images/HD_BIOLOGY-download h264-h264_AczoneDownload-aczone-small.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie6lovebot     = "<embed src=\"images/HD_LOVEBOT-download h264-h264_AczoneDownload-aczone-small.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie7bump        = "<embed src=\"images/HD_BUMP_IN_THE_NIGHT-download h264-h264_AczoneDownload-H.264 LAN.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie8hail        = "<embed src=\"images/HD_MOTHERSHIP-download h264-h264_AczoneDownload-aczone-small.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie9clear       = "<embed src=\"images/HD_CLEAR_AS_DAY-download h264-h264_AczoneDownload-H.264 LAN.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";
    var movie10making     = "<embed src=\"images/HD_THE_MAKING_OF_MUSICAL-download h264-h264_AczoneDownload-aczone-small.mov\" width=\"279\" height=\"175\" autoplay=\"true\"></embed>";  
    
    myid = $me.attr("id");
    switch (myid) {
      case "movie1intro":
        switchback(myid);
        $me.html(movie1intro);
        break;
      case "movie2queenbee":
        switchback(myid);
        $me.html(movie2queenbee);
        break;
      case "movie3cheerleader":
        switchback(myid);
        $me.html(movie3cheerleader);
        break;
      case "movie4slice":
        switchback(myid);
        $me.html(movie4slice);
        break;
      case "movie5minor":
        switchback(myid);
        $me.html(movie5minor);
        break;
      case "movie6lovebot":
        switchback(myid);
        $me.html(movie6lovebot);
        break;
      case "movie7bump":
        switchback(myid);
        $me.html(movie7bump);
        break;
      case "movie8hail":
        switchback(myid);
        $me.html(movie8hail);
        break;
      case "movie9clear":
        switchback(myid);
        $me.html(movie9clear);
        break;
      case "movie10making":
        switchback(myid);
        $me.html(movie10making);
        break;
      default:
        break;
    }
  });

});