CmdUtils.CreateCommand({
  name: "bas",
  homepage: "http://www.jawish.org/",
  author: {name: "Jawish Hameed", email: "jaa@jawish.org"},
  license: "GPL",

  icon: "http://www.radheef.com/favicon.ico",
  description: "Shows the Radheef definition of a Dhivehi word",
  help: "Select a dhivehi word from a page or type one in",

  takes: {"ބަސް": noun_arb_text},

  preview: function( pblock, query ) {
    pblock.innerHTML = "Looking up '" + query.text + "'";
    jQuery.get( "http://www.radheef.com/search.php?l=1&q=" + query.text, 
      function(results) {
        pblock.innerHTML = "<div style='text-align: right;'>" + results + "</div>";
    })
  },
  
  execute: function( query ) {
    Utils.openUrlInBrowser("http://www.radheef.com/bas/" + query.text);
  }

})
