window.addEvent('domready', function() {
	
	// ++++++++++++ LOAD CHAR FROM ARMORY / CACHE ++++++++++++ //
	
	
	
	$('CharForm').addEvent('submit', function(e) 
	{
	
		new Event(e).stop();
		
		var log = $('Log_Res').empty().addClass('ajax-loading');
		
		log.setText('Loading... please wait!');
		
		this.send(
		{
			update: log,
			evalScripts: true,
			onComplete: function()
					{
						evalScripts: true,
						log.removeClass('ajax-loading');
					},
			
		});
	});
	
 
	// +++++++++++ REALM SUGGESTION ++++++++++++ //
	
	  var suggestArray = [];
	  var iCount = 0;
	  suggestionobjects = $$('input[rel=Suggest]');
	  suggestionobjects.each(function(txt){
	    suggestArray.extend([
	      new mSuggest({
		InputBox: txt,
		SuggestArray: txt.getProperty('data').split(','),
		MaxDisplay: 5,
		EffectDuration: 500,
		SuggestItem: iCount
	      })
	    ]);
	    iCount++;
	  });

	
	var Tips2 = new Tips($$('.Tips'), {
	initialize:function(){
		this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
	},
	onShow: function(toolTip) {
		this.fx.start(1);
	},
	onHide: function(toolTip) {
		this.fx.start(0);
	}
});
});