rem: (function(){ var _makeFadeable = function(node){ if(dojo.isIE){   if(!node.style.zoom.length && dojo.style(node, "zoom") == "normal"){    node.style.zoom = "1";  }   if(!node.style.width.length && dojo.style(node, "width") == "auto"){ node.style.width = "auto"; } } }  dojo._fade = function(/*Object*/ args){    if(typeof args.end == "undefined"){ throw new Error("dojo._fade needs an end value"); } args.node = dojo.byId(args.node); var fArgs = dojo.mixin({ properties: {} }, args); var props = (fArgs.properties.opacity = {}); props.start = (typeof fArgs.start == "undefined") ? function(){ return Number(dojo.style(fArgs.node, "opacity")); } : fArgs.start; props.end = fArgs.end;  var anim = dojo.animateProperty(fArgs); dojo.connect(anim, "beforeBegin", null, function(){ 
add: dojo.connect(anim, "beforeBegin", null, function(){ 
context: (function(){	var _makeFadeable = function(node){		if(dojo.isIE){			// only set the zoom if the "tickle" value would be the same as the			// default			if(!node.style.zoom.length && dojo.style(node, "zoom") == "normal"){				// make sure the node "hasLayout"				// NOTE: this has been tested with larger and smaller user-set text				// sizes and works fine				node.style.zoom = "1";				// node.style.zoom = "normal";			}			// don't set the width to auto if it didn't already cascade that way.			// We don't want to f anyones designs			if(!node.style.width.length && dojo.style(node, "width") == "auto"){				node.style.width = "auto";			}		}	}	dojo._fade = function(/*Object*/ args){		// summary:Returns an animation that will fade the "nodes" from the start to end values passed.		//FIXME: remove arg checking?  Change docs above to show that end is not optional.  Just make sure this blows up in a reliable way?		if(typeof args.end == "undefined"){			throw new Error("dojo._fade needs an end value");		}		args.node = dojo.byId(args.node);		var fArgs = dojo.mixin({ properties: {} }, args);		var props = (fArgs.properties.opacity = {});		props.start = (typeof fArgs.start == "undefined") ?			function(){ return Number(dojo.style(fArgs.node, "opacity")); } : fArgs.start;		props.end = fArgs.end;		var anim = dojo.animateProperty(fArgs);		dojo.connect(anim, "beforeBegin", null, function(){			_makeFadeable(fArgs.node);		});		return anim; // dojo._Animation	}	dojo.fadeIn = function(/*Object*/ args){		// summary: Returns an animation that will fade node		// defined in 'args' from its current opacity to fully 		// opaque.		// 		// mixins:		// args.duration: Duration of the animation in milliseconds.		// args.easing: An easing function.		return dojo._fade(dojo.mixin({ end: 1 }, args)); // dojo._Animation	}	dojo.fadeOut = function(/*Object*/ args){		// summary: Returns an animation that will fade node		// defined in 'args'  from its current opacity to fully 		// transparent.		// mixins:		// duration: Duration of the animation in milliseconds.		// easing: An easing function.		return dojo._fade(dojo.mixin({ end: 0 }, args)); // dojo._Animation	}	if(dojo.isKhtml && !dojo.isSafari){		// the cool kids are obviously not using konqueror...		// found a very wierd bug in floats constants, 1.5 evals as 1		// seems somebody mixed up ints and floats in 3.5.4 ??		// FIXME: investigate more and post a KDE bug (Fredrik)		dojo._defaultEasing = function(/*Decimal?*/ n){			//	summary: Returns the point for point n on a sin wave.			return parseFloat("0.5")+((Math.sin((n+parseFloat("1.5")) * Math.PI))/2); //FIXME: Does this still occur in the supported Safari version?		}	}else{		dojo._defaultEasing = function(/*Decimal?*/ n){			return 0.5+((Math.sin((n+1.5) * Math.PI))/2);		}	}	dojo.animateProperty = function(/*Object*/ args){		// summary: Returns an animation that will transition the properties of node		// defined in 'args' depending how they are defined in 'args.properties'		args.node = dojo.byId(args.node);		if (!args.easing){ args.easing = dojo._defaultEasing; }				var PropLine = function(properties){			this._properties = properties;			for (var p in properties){				var prop = properties[p];				// calculate the end - start to optimize a bit				if(dojo.isFunction(prop.start)){					prop.start = prop.start(prop);				}				if(dojo.isFunction(prop.end)){					prop.end = prop.end(prop);				}				/*				if(prop.start instanceof dojo.Color){					// save these so we don't have to call toRgb() every getValue() call					prop.startRgb = prop.start.toRgb();					prop.endRgb = prop.end.toRgb();				}				*/			}			this.getValue = function(n){				var ret = {};				for(var p in this._properties){					var prop = this._properties[p];					var value = null;					if(prop.start instanceof dojo.Color){						value = dojo.rgb2hex(dojo.blendColors(prop.end, prop.start, n));						// value = "rbg("+dojo.blendColors(prop.end, prop.start, n).join(",")+")";					}else if(!dojo.isArray(prop.start)){						value = ((prop.end - prop.start) * n) + prop.start + (p != "opacity" ? prop.units||"px" : "");					}					ret[p] = value;				}				return ret;			}		}				var anim = new dojo._Animation(args);		dojo.connect(anim, "beforeBegin", anim, function(){			var pm = this.properties;			for(var p in pm){				var prop = pm[p];				if(dojo.isFunction(prop.start)){					prop.start = prop.start();				}				if(dojo.isFunction(prop.end)){					prop.end = prop.end();				}				var isColor = (p.toLowerCase().indexOf("color") >= 0);				if(typeof prop.end == "undefined"){					prop.end = dojo.style(this.node, p);				}else if(typeof prop.start == "undefined"){					prop.start = dojo.style(this.node, p);				}				if(isColor){					// console.debug("it's a color!");					prop.start = new dojo.Color(prop.start);					prop.end = new dojo.Color(prop.end);				}else{					prop.start = (p == "opacity") ? Number(prop.start) : parseInt(prop.start);				}				// console.debug("start:", prop.start);				// console.debug("end:", prop.end);			}			this.curve = new PropLine(pm);		});		dojo.connect(anim, "onAnimate", anim, function(propValues){			// try{			for(var s in propValues){				// console.debug(s, propValues[s], this.node.style[s]);				dojo.style(this.node, s, propValues[s]);				// this.node.style[s] = propValues[s];			}			// }catch(e){ console.debug(dojo.toJson(e)); }		});		return anim; // dojo._Animation	}})();
meta: 4497	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4497/a981ac8ff18ea6b7d5ca25e556c57a9bfc65001e/fx.js/clean/_base/fx.js