CmdUtils.CreateCommand( {
	names: ['jquery', 'jquery search'],
	arguments: [ {role: 'object', nountype: noun_arb_text, label: 'text'} ],
	homepage: "http://erikvold.com/tools/ubiquity/jquery/jquery.cfm",
	icon: "http://static.jquery.com/favicon.ico",
	author: {name:"Erik Vergobbi Vold",email:"erikvvold@gmail.com"},
	version: "0.4",
	description: "Search the jQuery Documentation",
	help: "Select some text to search the jQuery documentation.",
	execute: function( args ){
		var searchText = jQuery.trim( args.object.text );

		if( searchText.length <= 0 ){
			// go to the main page
			Utils.openUrlInBrowser( "http://docs.jquery.com/Main_Page" );
		}
		else{
			// perform search
			Utils.openUrlInBrowser( "http://docs.jquery.com/Special:Search?search=" + searchText );
		}

		return true;
	},
	preview: function( pblock, args ){
		var searchText = jQuery.trim( args.object.text );

		if( searchText.length <= 0 ){
			pblock.innerHTML = _( "Go to the jQuery documentation main page." );
			return;
		}

		pblock.innerHTML = _( "Search the jQuery documentation for " + searchText );

		return true;
	}
});
