jQuery(document).ready(function() {
	// hides the Content... and 
	// shows the Excerpt... as soon as the DOM is ready
	jQuery('.theContent').hide();
});

function expand_post_content(id){
	jQuery('#theContent-'+id).toggle('slow');
		zxcAnimator('background-Color#','post-'+id,'#ffffff','#f1f1f1',2000)
}//you should probably use textContent/innerText but I am not going to get into that here


function zxcAnimator(zxcmde,zxcobj,zxcsrt,zxcfin,zxctime,zxccurve){
 if (typeof(zxcobj)=='string'){ zxcobj=document.getElementById(zxcobj); }
 if (!zxcobj||(!zxcsrt&&!zxcfin)||zxcsrt==zxcfin) return;
 var zxcoop=zxcobj[zxcmde.replace(/[-#]/g,'')+'oop'];
 var zxcunits=zxcsrt.toString().replace(/\d|-/g,'')||'px';
 zxcsrt=zxcNuClipRGB(zxcsrt,zxcmde); zxcfin=zxcNuClipRGB(zxcfin,zxcmde);
 if (zxcoop){
  if (zxcmde.match('#')&&zxcsrt.compare(zxcoop.srtfin[0])&&zxcfin.compare(zxcoop.srtfin[1])) zxcoop.update([zxcoop.data[0],(zxcoop.srtfin[0].compare(zxcoop.data[2]))?zxcfin:zxcsrt],zxccurve,zxctime,zxcunits);
  else zxcoop.update([zxcsrt,zxcfin],zxccurve,zxctime);
 }
 else zxcobj[zxcmde.replace(/[-#]/g,'')+'oop']=new zxcAnimatorOOP(zxcmde.replace(/[-#]/g,''),zxcobj,zxcsrt,zxcfin,zxccurve,zxctime,zxcunits);
}

function zxcAnimatorOOP(zxcmde,zxcobj,zxcsrt,zxcfin,zxccurve,zxctime,zxcunits){
 if (zxcStyleValue(zxcobj,'position')=='static'&&(zxcmde=='left'||zxcmde=='top')) zxcobj.style.position='relative';
 this.srtfin=[[],[]];
 for (var zxc0=0;zxc0<zxcsrt.length;zxc0++){ this.srtfin[0].push(zxcsrt[zxc0]); this.srtfin[1].push(zxcfin[zxc0]); }
 this.to=null;
 this.obj=zxcobj;
 this.mde=zxcmde;
 this.std=!(zxcmde.indexOf('olor')>0||zxcmde=='clip'||zxcmde=='opacity');
 this.update([zxcsrt,zxcfin],zxccurve,zxctime,zxcunits);
}

zxcAnimatorOOP.prototype.update=function(zxcsrtfin,zxccurve,zxctime,zxcunits){
 clearTimeout(this.to);
 zxccurve=zxccurve||this.curve||'';
 this.time=zxctime||this.time||2000;
 this.units=zxcunits||this.units;
 if (zxcsrtfin[0]==zxcsrtfin[1]) return;
 for (var zxc0=0;zxc0<zxcsrtfin.length;zxc0++){
  var zxcobj=document.getElementById(zxcsrtfin[zxc0]);
  if (zxcobj){ zxcsrtfin[zxc0]=zxcStyleValue(zxcobj,zxcmde); if (!this.mde.match('olor')) zxcsrtfin[zxc0]=parseInt(zxcsrtfin[zxc0]); }
  if (zxcsrtfin[zxc0]==[0]) zxcsrtfin[zxc0]=[0.00001];
 }
 if (this.mde=='opacity'&&(zxcsrtfin[0]<0||zxcsrtfin[0]>100||zxcsrtfin[0]<0||zxcsrtfin[0]>100)) return;
 this.curve=zxccurve.charAt(0).toLowerCase();
 var zxcmatch=zxcsrtfin[0].toString();
 this.data=[[],zxcsrtfin[0],zxcsrtfin[1]];
 for (var zxc0 in this.data[1]) this.data[0][zxc0]=(this.data[1][zxc0]);
 this.srttime=new Date().getTime();
 this.inc=Math.PI/(2*this.time);
 this.cng();
}

zxcAnimatorOOP.prototype.cng=function(){
 var zxcms=new Date().getTime()-this.srttime;
 for (var zxc0 in this.data[2]){
  this.data[0][zxc0]=(this.curve=='s')?Math.floor((this.data[2][zxc0]-this.data[1][zxc0])*Math.sin(this.inc*zxcms)+this.data[1][zxc0]):(this.curve=='c')?(this.data[2][0])-Math.floor((this.data[2][zxc0]-this.data[1][zxc0])*Math.cos(this.inc*zxcms)):(this.data[2][zxc0]-this.data[1][zxc0])/this.time*zxcms+this.data[1][zxc0];
  if (this.mde!='left'&&this.mde!='top'&&this.data[0][zxc0]<0) this.data[0][zxc0]=0;
 }
 this.cngstyle(this.data[0]);
 if (zxcms<this.time) this.to=setTimeout(function(zxcoop){return function(){zxcoop.cng();}}(this), 10);
 else { this.data[0]=this.data[2]; this.cngstyle(this.data[0]);  }
}

zxcAnimatorOOP.prototype.cngstyle=function(zxcv){
 for (var zxc0=0;zxc0<zxcv.length;zxc0++) zxcv[zxc0]=Math.floor(zxcv[zxc0]);
 if (this.std) this.obj.style[this.mde]=zxcv[0]+this.units;
 else if (this.mde.indexOf('olor')>0) this.obj.style[this.mde]='rgb('+zxcv[0]+','+zxcv[1]+','+zxcv[2]+')';
 else if (this.mde=='clip') this.obj.style[this.mde]='rect('+zxcv[0]+' '+zxcv[1]+' '+zxcv[2]+' '+zxcv[3]+')';
 else if (this.mde=='opacity')this.opacity(zxcv[0]);
}

zxcAnimatorOOP.prototype.opacity=function(zxcopc){
 if (zxcopc<0||zxcopc>100){ return; }
 this.obj.style.filter='alpha(opacity='+zxcopc+')';
 this.obj.style.opacity=this.obj.style.MozOpacity=this.obj.style.KhtmlOpacity=zxcopc/100-.001;
}

function zxcStyleValue(zxcel,zxcp){
 if (zxcel.currentStyle) return zxcel.currentStyle[zxcp.replace('-','')];
 return document.defaultView.getComputedStyle(zxcel,null).getPropertyValue(zxcp.toLowerCase());
}

function zxcNuClipRGB(zxccol,zxcmde){
 if (typeof(zxccol)=='object') return zxccol;
 if (zxcmde=='clip') return zxccol.replace(/[rect()]/g,'').split(' ');
 if (!zxccol.toString().match('#')) return [parseInt(zxccol)];
 zxccol=parseInt(zxccol.substring(1,3),16)+','+parseInt(zxccol.substring(3,5),16)+','+parseInt(zxccol.substring(5,7),16);
 zxccol=zxccol.replace(/[rgb()\s]/g,'').split(',');
 return [parseInt(zxccol[0]),parseInt(zxccol[1]),parseInt(zxccol[2])];
}

Array.prototype.compare=function(zxcary){
 for (var zxc0=0;zxc0<this.length;zxc0++){ if (this[zxc0]!=zxcary[zxc0]) return false; }
 return true;
}
