//****************************************
var effect_time = 2500;// 2500ms;
//****************************************
function initMain(){
	/*
	var _basket = document.getElementById('basket');
	if (_basket){
		var opn_butt = $$('#basket a.basket');
		var _basket_box = $$('#basket div.drop-down');
		var _close_basket = $('close-basket');
		if (opn_butt.length && _basket_box.length && _close_basket){
			var _opn = opn_butt[0];
			var _box = _basket_box[0];
			_box._h = _box.offsetHeight;
			_box.style.height = 0 + 'px';
			_box.style.top = -2 + 'px';
			_box.mooeffect = new Fx.Morph(_box, {duration: effect_time});
			_opn.onclick = function(){
				_box.style.height = 0 + 'px';
				_box.mooeffect.start({'height':[_box._h]});
			}
			_close_basket.onclick = function(){
				_box.mooeffect.start({'height':[0]});
			}
		}
	}*/
}
if (window.addEventListener){
	window.addEventListener("load", initMain, false);
	
}
else if (window.attachEvent && !window.opera){
	window.attachEvent("onload", initMain);	
}


// FIX for IE
function setInnerHTML(obj, html) {
	var div = new Element('div');
	div.innerHTML = html;
	obj.empty();
	obj.adopt(div);
}
function showInfo(infoText, infoTitle) {
	// skip if the text is undefined or empty
	if (!$defined(infoText) || infoText == '') return;
	//$('infoText').innerHTML = infoText;
	setInnerHTML($('infoText'), infoText);
	
	// if the title is not empty
	if ($defined(infoTitle) && infoTitle != '') {
		//$('infoTitle').innerHTML = infoTitle;
		setInnerHTML($('infoTitle'), infoTitle);
	}
	
	$('infoOverlay').removeClass('hidden');
}
function closeInfo() {
	$('infoOverlay').addClass('hidden');
}
