CmdUtils.CreateCommand({
      name: "doit",
      homepage: "http://azarask.in/",
      author: { name: "Karl Norby", email: "knorby@uchicago.edu"},
      license: "BSD",
      description: "insert a random doit, from http://yacc.cs.uchicago.edu/doit/",
      help: "display a doit joke, or insert it in place",
      //just takes the callback function for a jQuery 'get' call to make things a little cleaner
      _getDoitString: function( callbackFunc ){
      jQuery.get("http://yacc.cs.uchicago.edu/doit/random-doit.php", {}, callbackFunc);
    },
      preview: function( pblock ) {
      this._getDoitString(function(doit){
			    pblock.innerHTML = doit;
			  });
    },
      execute: function( urlToShorten ) {
      this._getDoitString(function(doit){
			    CmdUtils.setSelection( doit );
			  });
    }
  })

