function startTime()	{
	var JSclock=document.getElementById('JSclock');
	if (JSclock) {
		var today=new Date();
		var h=today.getHours();
		var m=today.getMinutes();
		var s=today.getSeconds();
		m=addZero(m);
		s=addZero(s);
		JSclock.innerHTML=h+":"+m+":"+s;
		setTimeout('startTime()',1000);
	}
}

function addZero(i)	{ 
	if (i<10) i="0" + i; 
	return i; 
}

Slimbox.scanPage = function() {

	var links = $$("a").filter(function(el) {
		return el.rel && el.rel.test(/^lightbox/i);
	});
	
	$$(links).slimbox({
			counterText: "{x}/{y}"
		}
		, null
		, function(el) {
/**			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));	/**/
			return (this == el) || (this.rel.length > 8);
	});
};

window.addEvent("domready", function () {

	Slimbox.scanPage();
	
	document.body.className = document.body.className.replace(/jsOFF/gi, "jsON");
	
	switch (document.body.id) {
		case 'index':
		break;
		case 'contacts':
		break;
	}
	
	if (Browser.Engine.trident4) {
		var CurLi = {className: ''};
		$$('li').each(function(liItem)  {
			liItem.addEvent("mouseover", function() {this.className += ' IEover'; CurLi = this;})
			liItem.addEvent("mouseout", function() {this.className = this.className.replace(/ IEover/g, "");})
		})
	}
	
});
