$(document).ready(function() {
	if ($(".coworker a").attr("rel") == "doberman.se"){
		$(".coworker a").each(function(i) {	
			$(this).text($(this).text() + "@" + $(this).attr("rel"));
		});
	}
});
//Image preloader
/*
imageSource = new Array (
	"images/"
);

imageList = new Array ();

for (counter in imageSource) {
    imageList[counter] = new Image();
    imageList[counter].src = imageSource[counter];
}
*/

function hideContacts() {
	document.getElementById('opacityContainer').className = 'hidden';
	document.getElementById('clientContainer').className = 'hidden';
}

function addEvent(oObj, evType, fn, useCapture){
   if (oObj.addEventListener){
       oObj.addEventListener(evType, fn, useCapture);
       return true;
   } else if (oObj.attachEvent){
       var r = oObj.attachEvent("on"+evType, fn);
       return r;
   } else {
       alert("Handler could not be attached");
   }
}

/* New */
var alpha = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9','_','-','@','.','?','&','=');
var stringCheck = "";
for (i = 0; i < alpha.length; i++) {
	stringCheck += alpha[i];
}

function degrease(obfusc,shift) 
{
	var plainText = '';
	cipherText = obfusc;

	for (i = 0; i < cipherText.length; i++) {
		var currentText = stringCheck.indexOf(cipherText.charAt(i));

		if(currentText != -1) {

			if ((currentText - shift) >= 0) { 
				plainText += alpha[currentText - shift]; }
			else { 
				plainText += alpha[(alpha.length + currentText)  - shift]; }
			}
		}

	parent.location = 'm'+'ai'+'l'+'t'+'o:'+plainText;
}
