function search_form(){
	document.getElementById('search_form_code').onfocus= function(){this.value = this.value=='vpišite kodo'?'':this.value;};
	document.getElementById('search_form_code').onblur= function(){this.value = this.value=='' ? 'vpišite kodo':this.value;};
	document.getElementById('search_form').onsubmit = function(){if(document.getElementById('search_form_code').value=='vpišite kodo'){return false}else{return true;}}
}

var prevMarque;
var mt;
var m_size = 28;
var m_time = 200;
function do_bubble(id){
	document.getElementById(id).style.display = 'block';
	prevMarque = document.getElementById('m'+id).innerHTML;
	mt = setTimeout("marque('m"+id+"')",1500);
}
function undo_bubble(id){
	document.getElementById(id).style.display = 'none';
	document.getElementById('m'+id).innerHTML = prevMarque;
	clearTimeout(mt);
}


function marque(id){
	clearTimeout(mt);
	mt = setInterval("marque_t('"+id+"')",m_time);
}


function marque_t(id){
	m = document.getElementById(id);
	if(m.innerHTML.length > m_size)
		m.innerHTML = m.innerHTML.substr(1);
	else{
		clearTimeout(mt);
		mt = setTimeout("document.getElementById('"+id+"').innerHTML = '"+prevMarque+"';",1000);
		mt = setTimeout("marque('"+id+"')",2500);
	}
}

function product_added(){
	(function(){
		$('success').get('tween', {property: 'opacity', duration: 'long'}).start(0).chain(
			function(){
					var x = new Fx.Morph('success', {duration: 1000, transition: Fx.Transitions.Sine.easeOut});
					x.start({'height': [30, 0]});	
			}
		);
	}).delay(1000);
}

window.addEvent('domready', function(){
        /*var Tips1 = new Tips($$('.Tips1'));*/
}); 
