/*
         ___                         _____       __
        /  /\        ________       /    /\     / /\
(-----//  /  \//----/_____/__\\--) /____/  \___/_/ //--------------------------)
      /  /   /      \     | //     \    \  /    /\/    this code was created by
     /__/   /        \    |///-----\\____\/____/  \                       sigea
(---\\  \  /   (-----\\___|/        /    /\    \  /       
      \__\/                        /____/ /\____\/            __       sigea.ch
                                   \____\/  \  /             /\_\--------------)
                                         \___\//-------------\/_/  

*/
var hideLightboxTitle;
function HideLightboxTitle(){
	var imgTitleArray=Array();
	this.prepare=function(){
		if (!document.getElementsByTagName) return false;
		if (!document.getElementById) return false;
		var aTags=document.getElementsByTagName('a');
		var imgNo=0;
		for(var i=0; i<aTags.length; i++){
			if(aTags[i].rel.indexOf('lightbox')>=0){
				imgTitleArray[imgNo]=Object();
				imgTitleArray[imgNo]['title']=aTags[i].title;
				aTags[i].title='';
				imgTitleArray[imgNo]['tag']=aTags[i];
				/*aTags[i].onclick=function(){
					hideLightboxTitle.addTitle(this);
				}*/
				imgNo++;
			}
		}
		document.onmousedown=function(){
			hideLightboxTitle.showTitle();
		}
		document.onmouseup=function(){
			setTimeout('hideLightboxTitle.hideTitle();',100);
		}
		return true;
	}
/*	this.addTitle=function(element){
		element.title=imgTitleArray[element.href];
	}*/
	this.showTitle=function(){
		for(var i=0; i<imgTitleArray.length; i++){
			//imgTitleArray[i]['tag'].title=imgTitleArray[i]['title'];
			imgTitleArray[i]['tag'].lightboxTitle=imgTitleArray[i]['title'];
		}
	}
	this.hideTitle=function(){
		for(var i=0; i<imgTitleArray.length; i++){
			imgTitleArray[i]['tag'].lightboxTitle='';
		}
	}
}
addLoadEvent(function(){hideLightboxTitle=new HideLightboxTitle(); hideLightboxTitle.prepare();});