/* DESTOON Copyright (C)2008-2099 www.destoon.com This is NOT a freeware,Use is subject to license.txt */ function dslide(id, time) { if($('#'+id).length == 0) return; if($('#'+id).html().indexOf(''; for(var i = 0; i < this.max; i++) { this.htm += '
  • '; } this.htm += ''; if(this.alt[0]) this.htm += '
    '+this.alt[0]+'
    '; this.htm += '
    '; for(var i = 0; i < this.max; i++) { this.htm += ''; } this.htm += '
    '; $('#'+id).html(this.htm); if(this.max == 1) return; this.t; this.p = 0; $('#'+id).mouseover(function() {_this.p=1;}); $('#'+id).mouseout(function() {_this.p=0;}); $('#'+id).find('span').each(function(i) { $(this).mouseover(function() { _this.slide(i); }); }); this.slide = function(o) { if(o == this.c) return; if(o < 0 || o >= this.max) return; if(o == 0 && this.c == this.max - 1) { $('#'+id+'_ul').append($('#'+id+'_ul li:first').clone()); $('#'+id+'_ul').stop(true, true).animate({'left':-this.w*this.max},500,function() { $('#'+id+'_ul').css('left','0'); $('#'+id+'_ul li:last').remove(); }); } else { $('#'+id+'_ul').stop(true, true).animate({'left':-o*this.w},500); } $('#'+id+'_no_'+this.c).css('background','#FFFFFF'); $('#'+id+'_no_'+o).css('background','#007AFF'); if(this.alt[0]) $('#'+id+'_alt').html(this.alt[o]); this.c = o; } this.start = function() { if(this.p) return; if(this.c == this.max - 1) { this.slide(0); } else { this.slide(this.c+1); } } this.t = setInterval(function() {_this.start();}, time); return true; }