CmdUtils.CreateCommand({
  name: "lurl",
  homepage: "http://lurl.no/",
  takes: {"url to shorten": noun_arb_text},
  preview: "Replaces the selected URL with a lurl.",
  author: { name: "Jon Lonne", email: "jon@funkpilot.no"},
  description: "Replaces the selected URL with a <a href=\"http://lurl.no\">lurl</a>.",
  help: "If you're in an editable text area, replaces the current url with a lurl.",
  execute: function( urlToShorten ) {
    var baseUrl = "http://lurl.no/api/0.1/?url=";
    jQuery.get( baseUrl + urlToShorten.text, function( lurl ) {
      CmdUtils.setSelection( lurl );
    })
  }
})

