(function($){  
 $.fn.langCloud = function(options) {  

			var defaults = {  
				size: 10,
				text: "hello world"
			};  

	 		var map = {  'Afrikaans': 'af', 'Albanian': 'sq', 'Arabic': 'ar', 'Belarusian': 'be', 'Bulgarian': 'bg',
						 'Catalan': 'ca', 'Chinese Simplified': 'zh-CN', 'Chinese Traditional': 'zh-TW', 'Croatian': 'hr',
						 'Czech': 'cs', 'Danish': 'da', 'Dutch': 'nl', 'English': 'en',  'Estonian': 'et', 'Filipino': 'tl',
						 'Finnish': 'fi', 'French': 'fr', 'Galician': 'gl', 'German': 'de', 'Greek': 'el', 'Haitian Creole': 'ht',
						 'Hebrew': 'iw', 'Hindi': 'hi', 'Hungarian': 'hu', 'Icelandic': 'is', 'Indonesian': 'id', 'Irish': 'ga',
						 'Italian': 'it', 'Japanese': 'ja', 'Latvian': 'lv', 'Lithuanian': 'lt', 'Macedonian': 'mk', 'Malay': 'ms',
						 'Maltese': 'mt', 'Norwegian': 'no', 'Persian': 'fa', 'Polish': 'pl', 'Portuguese': 'pt', 'Romanian': 'ro',
						 'Russian': 'ru', 'Serbian': 'sr', 'Slovak': 'sk', 'Slovenian': 'sl', 'Spanish': 'es', 'Swahili': 'sw', 
						 'Swedish': 'sv', 'Thai': 'th', 'Turkish': 'tr', 'Ukrainian': 'uk', 'Vietnamese': 'vi', 'Welsh': 'cy',
						 'Yiddish': 'yi'			 
			};

			var options = $.extend(defaults, options);
			var map_rand_lang = new Array();
			var map_size = 0;
			var counter = 0;
			var map_counter = 0;
			var obj = $(this);
			
			/* Get the size of our map */
			for (e in map) { map_size++; }

			/* We setup the tag cloud grabbing random languages of our text from googleapi */
			for(i = 0; i < options.size; i++) map_rand_lang[i] = Math.floor(Math.random() * map_size);

			/* Loop through every language map we have and add a few random ones to our object */
			$.each(map, function(key, value) {
				if($.inArray(counter, map_rand_lang) != -1) 
				{
					$.translate( options.text, value, {
						complete: function(){
				  			if(this.translation != options.text)
				  			{
								/* Create the tag object to put in our cloud */
				  				tagNum = Math.floor(Math.random() * options.size);
				  				obj.append( "<li id=\"tag" + counter + "\" class=\"tag" + tagNum + "\" title=\"" + key + "\">" + this.translation + "</li>" );
								
								/* Setup Mouse Movements For Tag Cloud */
								obj.children("li").mouseover(function(){		
									/* make everyone disappear except of course for yourself */
									obj.children("li").stop().animate( { opacity: .1 } , 500 );
									$(this).stop().animate( { opacity: 1 } , 500 );
								}).mouseout(function(){	
									/* everyone is now visiable again */
									obj.children("li").stop().animate( { opacity: 1 } , 1000 );
								});
				  			}
					  	}
				  	});		
				}
				counter++;
	  		});
			
			return this.each(function() {  
  
			});  
 };  
})(jQuery);
