var anchors = document.getElementsByTagName('a');
for (var i=0; i<anchors.length; i++){
	var anchor = anchors[i];
	var relAttribute = String(anchor.getAttribute('rel'));
	
	if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))) {
		anchor.onclick = function () {top.lBiFrame(this.href,this.title,this.rel); return false;}
		if ( anchor.getAttribute('rel') != "lightbox" ) {
			top.lBiFrameSet(anchor.getAttribute('href'),anchor.getAttribute('title'),anchor.getAttribute('rel'));
		}
	}
}
top.initLightbox();
