// xAniOpacity, Copyright 2006-2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

// xAniOpacity - Animate an element's opacity.

function xAniOpacity(xa, o, tt, at, qc, oed, oea, oef)
{
  var a = xa.init(xa.e, at, qc, tt, onRun, onRun, oed, oea, oef);
  a.x1 = xOpacity(a.e); // start opacity
  a.x2 = o; // end opacity
  if (a.as) a.start();
  return a;
  function onRun(o) { xOpacity(o.e, o.x); }
  // (o.x == 1) ? 0.9999 : o.x; // for Gecko bug?
}