CmdUtils.CreateCommand( {
	names: [ "inlinks", "inlinks yahoo", "inlinks yahoo.com", "yahoo inlinks" ],
	arguments: [ {role: 'object', nountype: noun_arb_text, label: 'url'} ],
	homepage:"http://erikvold.com/tools/ubiquity/inlinks/inlinks.cfm",
	icon:"http://www.yahoo.com/favicon.ico",
	author:{name:"Erik Vergobbi Vold",email:"erikvvold@gmail.com"},
	description:"Search Yahoo.com for the inlinks to the currently viewed page or provided url string",
	help:"Seach Yahoo.com for the inlinks to the current page or to a provided url.",
	version:"0.3",
	execute: function( args ){
		var selectedURL = jQuery.trim( args.object.text );
		if( selectedURL == 0 ) {
			selectedURL = context.focusedWindow.document.location + "";
		}

		var domainOfSubmitURL = "";
		try {
			domainOfSubmitURL = Utils.url(selectedURL).host;
		}
		catch( e ){
			displayMessage( _( "Your url string is invalid, please correct it and try again." ) );
			return false;
		}

		Utils.openUrlInBrowser( 'http://search.yahoo.com/search?p=link:'+selectedURL+'%20-site:' + domainOfSubmitURL );
		return true;
	},
	preview: function( pblock, args ){
		var selectedURL = jQuery.trim( args.object.text );

		if( selectedURL.length == 0 ) {
			pblock.innerHTML = _( "Search Yahoo.com for the inlinks to the currently viewed page." );
			return;
		}

		pblock.innerHTML = _( "Seach Yahoo.com for the inlinks to " + selectedURL );
		return true;
	}
});