CmdUtils.CreateCommand({
  name: "su",
  description: "Searches SoundUnwound, the music site from IMDb and Amazon",
  help: "Searches soundunwound.com for the data given in the search terms.",
  homepage: "http://xnyl.net",
  author: { name: "Derek Reeve", email: "derek@audilis.com"},
  icon: "http://www.soundunwound.com/favicon.ico",
  takes: {"search terms": noun_arb_text},
    execute: function(terms) {
        var doc =  Application.activeWindow.activeTab.document;
        var en=encodeURIComponent;
        var urlTerms = en(terms.text).replace(/%20/g, "+");
        // TODO: handle selections
        doc.location.href = "http://www.soundunwound.com/sp/search/find?Search.x=0&Search.y=0&Search=Search&searchPhrase=" + urlTerms;
   }
});
