$(document).ready(function() {
  $.ajax({
    type: "GET",
    url: "quotes.xml",
    dataType: "xml",
    success: parseXml
  });

  function parseXml(xml) {
    quotes = $(xml).find("quote");
    random = Math.floor(Math.random() * quotes.length);
    
    $("#quote-text").append('"' + $(quotes[random]).text() + '"');
    $("#quote-by").append("- " + $(quotes[random]).attr("author"));
  }

});

