var console;

if(!console) {
    console = { log: function() {} } 
}

var Recmnd = { };

Recmnd.docLocation = document.location;
Recmnd.apiKey = '5f8588fcf072af7856c455467265ee9b9cf9e440-d2c7f6a9d9bdd7cd7c9adb166fa7bff7';

Recmnd.showRecommendations = function( options ) {
	if( !options['resultsCount'] ) options['resultsCount'] = '';
	if( !options['resultType'] ) options['resultType'] = 'combined';
	if( !options['debug'] ) options['debug'] = 0;

	var $params = '?api_key='+Recmnd.apiKey+'&item_url='+escape(Recmnd.docLocation).replace(/\//g, '%2F')+'&return_type='+options['returnType']+'&results_count='+options['resultsCount']+'&result_type='+options['resultType']+'&debug='+options['debug'];

	document.write( '<script type="text/javascript" src="http://api00014.recmnd.com/api/js/recmnd_tracker/?api_key=' + Recmnd.apiKey + '"></script>' );
	document.write( '<script type="text/javascript" src="http://api00014.recmnd.com/api/js/show_recmnd/' + $params + '"></script>' );
	document.write( '<link href="http://api00014.recmnd.com/api/css/load/?api_key=' + Recmnd.apiKey + '" rel="stylesheet" type="text/css" />' );
};

Recmnd.prepContent = function( ) {
	document.write( '<div id="recmnd-widget"></div>' );
};

