/**
 * aquarius Theme JS
 * Author: 24 bytes - fast moving IT
 * Author URI: http://www.24bytes.de
 */
function changeStyle(id, style) {
  var d = document.getElementById(id);
  d.className=style;  
}

function openHeyPopup(objectLink) {
	window.open(objectLink, "Externer Link",  "width=520,height=400,scrollbars=no");
}

function initHeyPopup()
{
	if (!document.getElementsByTagName){ return; }
	var anchors = document.getElementsByTagName("a");

	// loop through all anchor tags
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "heypopup")){
			anchor.onclick = function () {openHeyPopup(this); return false;}
		}
	}

}
function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}
}
addLoadEvent(initHeyPopup);	// run initLightbox onLoad
