var imgOk = '<img src="/files/website/images/icon/v.gif" alt=":)">';
var imgBad = '<img src="/files/website/images/icon/x.gif" alt=":(">';
var imgWait = '<img src="/files/website/images/loader.gif" alt="...">';
var imgWaitBig = '<img src="/files/website/images/ajax.gif" alt="..." class="loader-big">';

var tConfig = {position:'bottom center', effect: 'fade', offset: [2, 0]}; //tooltipConfig

function correctIcon(cont, correct, message){
	cont = jQuery(cont);
	var img = correct ? ':)' : ':(';
	if(!cont.find('img[alt=' + img + ']').length){
		if(cont.children().length){
			cont.children().fadeOut(200, function(){ showCorrectIcon(cont, correct, message); });
		}
		else showCorrectIcon(cont, correct, message);
	}
}

function showCorrectIcon(cont, correct, message){
	var image = correct ? imgOk : imgBad;
	cont.children().remove();
	cont.html(image);
	if(message)
		cont.find('img').attr('title', message);
	cont.children().fadeIn(200);
}

function showWaitIcon(cont){
	cont = jQuery(cont);
	cont.html(imgWait);
}
