CmdUtils.CreateCommand({
  name: "hurl",
  takes: {"url to shorten": noun_arb_text},
  preview: "Replaces the selected URL with a Hurl.",
  execute: function( urlToShorten ) {
    var baseUrl = "http://www.hurl.ws/api/";
    var params = {url: urlToShorten.text, user:"ubiquity"};
    jQuery.post( baseUrl, params, function( Hurl ) {
      CmdUtils.setSelection( Hurl );
    })
  }
})

