var CIPHER={
	decrypt:function(strIn){
		var strOut="";
		for(var i=1;i<strIn.length;i++){
			strOut+=CIPHER.shiftChar(strIn.charAt(i),((i % 25)*-1));
			}
		hexRegEx=/\.([A-Za-z0-9]{2})/;
		foundHex=hexRegEx.exec(strOut);
		while(foundHex!=null){
			if(foundHex[1]=="2E"){
				strOut=strOut.replace(foundHex[0],"%%dotx%%");
				}
			else{ 
				strOut=strOut.replace(foundHex[0],String.fromCharCode(parseInt(foundHex[1],16)));
				}
			foundHex=hexRegEx.exec(strOut);
			}	
		strOut=strOut.replace(/%%dotx%%/g,".");
		return strOut;
		},
	encrypt:function(cStrIn){
		var foundChar="";
		var hexDot=".2E";
		var strOp=cStrIn.replace(/\./g,hexDot);
		var re=new RegExp(/[\.A-Za-z0-9\\]+/g);
		var strClean="";
		for(var counter=0;counter<strOp.length;counter++){
			foundChar=strOp.substr(counter,1)
			if(foundChar.match(re)){
				strClean+=foundChar;
				}
			else{
				strClean+=("."+(foundChar.charCodeAt(0)-0).toString(16));
				}
			}
		strClean.replace(/^\s+|\s+$/g,"");
		var strOut="s";
		for (counter=0;counter<strClean.length;counter++){
			strOut+=CIPHER.shiftChar(strClean.substr(counter,1),((counter+1)%25))
			}
		return strOut
		},
	shiftChar:function(charIn,count){
		var decCode=charIn.charCodeAt(0);
		var resCode=decCode+count;
		if(decCode>=65&&decCode<=90){
			if(resCode>90)resCode=resCode-26;
			if(resCode<65)resCode=resCode+26;
			}
		else if(decCode>=97&&decCode<=122){
			if(resCode>122)resCode=resCode-26;
			if(resCode<97)resCode=resCode+26;
			}
		else resCode=decCode;
		return String.fromCharCode(resCode);
		},
	init:function(){
		cipherObject=$.getByClass("cipher");
		for(cipherCounter=0;cipherCounter<cipherObject.length;cipherCounter++){
			cipherObject[cipherCounter].innerHTML=CIPHER.decrypt(cipherObject[cipherCounter].id);
			}
		}
	}

