/*
 * jQuery UI Effects Transparent
 *
 * Copyright (c) 2008 Max Manets (manets@gmail.com)
 * Depends:
 *	effects.core.js
 */
(function($) {
$.effects.transparent = function(o) {
	return this.queue(function() {
		var el = $(this), props = ['opacity'];
		var mode = $.effects.setMode(el, o.options.mode || 'hide');
		if (mode == 'show') el.css('opacity', 0);
		var animation = {opacity: mode == 'show' ? 1 : 0};
		el.animate(animation, { queue: false, duration: o.duration, complete: function() {
			if(mode == 'hide') el.hide(); else el.show();
			$.effects.restore(el, props); 
			$.effects.removeWrapper(el);
			if(o.callback) o.callback.apply(this, arguments);
			el.dequeue();
		}});
	});
};
})(jQuery);
