background image

  return fun.apply(object, arguments);
 }
}

var Each = function(list, fun){
 for (var i = 0, len = list.length; i < len; i++) { fun(list[i], i); }
};

//ie only
var RevealTrans = Class.create();
RevealTrans.prototype = {
  initialize: function(container, options) {
 this._img = document.createElement("img");
 this._a = document.createElement("a");

 this._timer = null;//计时器
 this.Index = 0;//显示索引
 this._onIndex = -1;//当前索引
 
 this.SetOptions(options);
 
 this.Auto = !!this.options.Auto;
 this.Pause = Math.abs(this.options.Pause);
 this.Duration = Math.abs(this.options.Duration);
 this.Transition = parseInt(this.options.Transition);
 this.List = this.options.List;
 this.onShow = this.options.onShow;
 
 //初始化显示区域
 this._img.style.visibility = "hidden";//第一次变换时不显示红 x 图
 this._img.style.width = this._img.style.height = "100%"; 

this._img.style.border = 0;
 this._img.onmouseover = Bind(this, this.Stop);
 this._img.onmouseout = Bind(this, this.Start);
 isIE && (this._img.style.filter = "revealTrans()");
 
 this._a.target = "_blank";
 
 $(container).appendChild(this._a).appendChild(this._img);
  },
  //设置默认属性
  SetOptions: function(options) {
 this.options = {//默认值