// these are plugins I've customized for my own use
CmdUtils.CreateCommand({
  homepage: "http://horsesaw.com",
  name: "freedict",
  icon: "http://img.tfd.com/favicon.ico",
  takes: {"Title": noun_arb_text},
  preview: function( pblock, theSearch ) {
    pblock.innerHTML = "Searches the Free Dictionary for: " + theSearch.text;
  }, 
  execute: function( theSearch ) {
    var url = "http://thefreedictionary.com/" + theSearch.text;
    Utils.openUrlInBrowser( url );
  }
})

CmdUtils.CreateCommand({
  homepage: "http://horsesaw.com",
  name: "lala",
  icon: "http://www.lala.com/favicon.ico",
  takes: {"Title": noun_arb_text},
  preview: function( pblock, theSearch ) {
    pblock.innerHTML = "Searches Lala for: " + theSearch.text;
  }, 
  execute: function( theSearch ) {
    var url = "http://www.lala.com/#search/" + theSearch.text;
    Utils.openUrlInBrowser( url );
  }
})

CmdUtils.CreateCommand({
  homepage: "http://horsesaw.com",
  name: "anagram",
  icon: "http://wordsmith.org/anagram/favicon.ico",
  takes: {"Title": noun_arb_text},
  preview: function( pblock, theSearch ) {
    pblock.innerHTML = "Searches Internet Anagram Server for: " + theSearch.text;
  }, 
  execute: function( theSearch ) {
    var url = "http://wordsmith.org/anagram/anagram.cgi?anagram=" + theSearch.text + "&t=1000";
    Utils.openUrlInBrowser( url );
  }
})

CmdUtils.CreateCommand({
  homepage: "http://horsesaw.com",
  name: "oneacross",
  icon: "http://oneacross.com/favicon.ico",
  takes: {"Title": noun_arb_text},
  preview: function( pblock, theSearch ) {
    pblock.innerHTML = "Searches One Across for: " + theSearch.text;
  }, 
  execute: function( theSearch ) {
    var url = "http://oneacross.com/cgi-bin/search_banner.cgi?c0=&p0=" + theSearch.text + "&s=+Go!+";
    Utils.openUrlInBrowser( url );
  }
})

CmdUtils.CreateCommand({
  homepage: "http://horsesaw.com",
  name: "amazon",
  icon: "http://www.amazon.com/favicon.ico",
  takes: {"Title": noun_arb_text},
  preview: function( pblock, theSearch ) {
    pblock.innerHTML = "Searches Amazon for: " + theSearch.text;
  },
  execute: function( theSearch ) {
    var url = "http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Daps&field-keywords=" + theSearch.text + "&x=0&y=0";
    Utils.openUrlInBrowser( url );
  }
})
