window.addEvent('domready', function(){
	linkFunctions();
});

function linkFunctions(){
	// Removes the ugly borders around links when they are clicked 
	// Handle the kamPopup rel tag to open links in a new tab
	$$("a").each(function(elm){
		elm.addEvent("click",function(evt){
			this.blur();
			if(elm.get('rel') == 'kamPopUp'){				
				evt.stop();
				var newTab = window.open(elm.get('href'),'_blank'); 
				newTab.focus();
			}
		});				
	});
}
