﻿function AttachClick()
            {
                var refTags= ['a','area'];
                var el, els, rel;
                         
                //attaching the lightbox initializing method for the light box link
		        for(var i=0; i < refTags.length; i++){
			        els = document.getElementsByTagName(refTags[i]);
			        for(var j=0; j < els.length; j++){
				        el = els[j];
				        rel = String(el.getAttribute('rel'));
				        if (el.getAttribute('href') && (rel.toLowerCase().match("lightbox"))){
					        el.onclick = function(){Lightbox.initialize('',''); return false;}
				        }
			        }
		        }
		   }