/* DO NOT EDIT. THIS IS A CACHE FILE AND WILL GET OVERWRITTEN RANDOMLY.
INSTEAD EDIT THE TEMPLATE FROM WITHIN THE ADMIN ZONE, OR BY MANUALLY EDITING A TEMPLATES_CUSTOM OVERRIDE. */


var DisplayObject3D=function(){return this;};DisplayObject3D.prototype._x=0;DisplayObject3D.prototype._y=0;DisplayObject3D.prototype.make3DPoint=function(x,y,z){var point={};point.x=x;point.y=y;point.z=z;return point;};DisplayObject3D.prototype.make2DPoint=function(x,y,depth,scaleFactor){var point={};point.x=x;point.y=y;point.depth=depth;point.scaleFactor=scaleFactor;return point;};DisplayObject3D.prototype.container=undefined;DisplayObject3D.prototype.pointsArray=[];DisplayObject3D.prototype.init=function(_container){this.container=_container;this.containerId=this.container.id;};var Camera3D=function(){};Camera3D.prototype.x=0;Camera3D.prototype.y=0;Camera3D.prototype.z=500;Camera3D.prototype.focalLength=1000;Camera3D.prototype.scaleRatio=function(item){return this.focalLength/(this.focalLength+item.z-this.z);};Camera3D.prototype.init=function(x,y,z,focalLength){this.x=x;this.y=y;this.z=z;this.focalLength=focalLength;};var Object3D=function(_container){this.container=_container;};Object3D.prototype.objects=[];Object3D.prototype.addChild=function(object3D){this.objects.push(object3D);object3D.init(this.container);return object3D;};var Scene3D=function(){};Scene3D.prototype.sceneItems=[];Scene3D.prototype.addToScene=function(object){this.sceneItems.push(object);};Scene3D.prototype.Transform3DPointsTo2DPoints=function(points,axisRotations,camera){var TransformedPointsArray=[];var sx=Math.sin(axisRotations.x);var cx=Math.cos(axisRotations.x);var sy=Math.sin(axisRotations.y);var cy=Math.cos(axisRotations.y);var sz=Math.sin(axisRotations.z);var cz=Math.cos(axisRotations.z);var x,y,z,xy,xz,yx,yz,zx,zy,scaleFactor;var i=points.length;while(i--){x=points[i].x;y=points[i].y;z=points[i].z;xy=cx*y-sx*z;xz=sx*y+cx*z;yz=cy*xz-sy*x;yx=sy*xz+cy*x;zx=cz*yx-sz*xy;zy=sz*yx+cz*xy;scaleFactor=camera.focalLength/(camera.focalLength+yz);x=zx*scaleFactor+camera.x;y=zy*scaleFactor+camera.y;z=yz;var displayObject=new DisplayObject3D();TransformedPointsArray[i]=displayObject.make2DPoint(x,y,-z,scaleFactor);}
return TransformedPointsArray;};Scene3D.prototype.renderCamera=function(camera){for(var i=0;i<this.sceneItems.length;i++){var obj=this.sceneItems[i].objects[0];var screenPoints=this.Transform3DPointsTo2DPoints(obj.pointsArray,axisRotation,camera);var lis=document.getElementById(obj.containerId).getElementsByTagName("li");for(k=0;k<obj.pointsArray.length;k++){var currItem=null;currItem=lis[k];if(currItem){currItem._x=screenPoints[k].x;currItem._y=screenPoints[k].y;currItem.scale=screenPoints[k].scaleFactor;currItem.style.position="absolute";currItem.style.top=currItem._y+'px';currItem.style.left=currItem._x+'px';currItem.style.fontSize=100*currItem.scale+'%';setOpacity(currItem,(currItem.scale-0.75)*2);}}}};var axisRotation=new DisplayObject3D().make3DPoint(0,0,0);var Sphere=function(radius,sides,numOfItems){numOfItems++;for(var j=sides;j>=0;j--){for(var i=numOfItems/sides;i>=0;i--)
{var angle=i*Math.PI*2/(numOfItems/sides);var angleB=j*Math.PI*2/sides;var x=Math.sin(angle)*Math.sin(angleB)*radius;var y=Math.cos(angle)*Math.sin(angleB)*radius;var z=Math.cos(angleB)*radius;this.pointsArray.push(this.make3DPoint(x,y,z));}};var shuffle=function(o){for(var j,x,i=o.length;i;j=parseInt(Math.random()*i),x=o[--i],o[i]=o[j],o[j]=x);return o;};shuffle(this.pointsArray);};Sphere.prototype=new DisplayObject3D();function load_tag_cloud(container)
{var width=findWidth(container);var height=findHeight(container);var lis=container.getElementsByTagName("li");container.readyToClick=false;for(var i=0;i<lis.length;i++){lis[i].onmouseover=function(){container.readyToClick=true;};lis[i].onmouseout=function(){container.readyToClick=false;};}
var sizing=(width>height&&height!=0)?height:width;var camera=new Camera3D();camera.init(width/2-25,height/2-10,0,300);var item=new Object3D(container);var numItems=container.getElementsByTagName('li').length;item.addChild(new Sphere(sizing/3.5,10,numItems));var scene=new Scene3D();scene.addToScene(item);var mouseX,mouseY=0;var speed=1000;var animateIt=function(){var offsetX=findPosX(container,true);var offsetY=findPosY(container,true);var width=findWidth(container);var height=findHeight(container);var mouseX=window.mouseX-offsetX-(width/2);var mouseY=window.mouseY-offsetY-(height/2);if((Math.abs(mouseX)*2<width)&&(Math.abs(mouseY)*2<height)&&(!container.readyToClick))
{axisRotation.y+=mouseX/speed;axisRotation.x-=mouseY/speed;scene.renderCamera(camera);}};scene.renderCamera(camera);window.setInterval(animateIt,60);}
