(function(a) { (function() { var b = false; var c = (/xyz/.test(function() { xyz })) ? (/\b_super\b/) : (/.*/); this.class = function() {}; class.extend = function(h) { var g = this.prototype; b = true; var f = new this(); b = false; for (var e in h) { if (typeof h[e] == "function" && typeof g[e] == "function" && c.test(h[e])) { f[e] = (function(i, j) { return function() { var l = this._super; this._super = g[i]; var k = j.apply(this, arguments); this._super = l; return k } })(e, h[e]) } else { f[e] = h[e] } } function d() { if (!b && this.init) { this.init.apply(this, arguments) } } d.prototype = f; d.constructor = d; d.extend = arguments.callee; return d } })(); a.fn.lateralslider = function(b) { var d = { displayduration: 2000, animateduration: 1500, numcolumns: 10, transitions: "fade,slideup,slidedown,slideleft,slideright,slideupanddown,slideleftandright,fadeandslideup,fadeandslidedown,fadeandslideleft,fadeandslideright,fadeslideupandright,fadeslidedownandleft", random: false, hideprevandnextarrows: false, hideslidechooser: false, captionopacity: 0.8 }; var c = a.extend({}, d, b); this.each(function() { var j = a(this); var t = class.extend({ $imgs: null, size: null, displayimg: null, nextimg: null, numdivs: null, divwidth: null, basecss: null, $divs: null, transitions: [], transition: null, transitioncount: null, interval: null, width: null, init: function() { this.$imgs = a("img", j); this.size = this.$imgs.size(); this.$imgs.hide(); this.nextimg = 0; this.width = j.width(); this.numdivs = c.numcolumns; this.divwidth = this.width / this.numdivs; this.basecss = { width: this.divwidth, position: "absolute", top: 0, backgroundrepeat: "no-repeat" }; this.createdivs(); this.$divs = a("div", j); this.transitioncount = -1 }, createdivs: function() { for (var a = 0; a < this.numdivs; a++) { var b = a("
"); b.css(this.basecss); b.css("left", this.divwidth * a); b.appendto(j) } } }); var y = new t(); var g = class.extend({ baseduration: null, originaloffset: null, offset: null, init: function() { this.baseduration = c.animateduration / 8; this.originaloffset = 7 * c.animateduration / (8 * y.numdivs); this.offset = 7 * c.animateduration / (8 * y.numdivs) }, duration: function() { return this.baseduration + this.offset }, increment: function() { this.offset += this.originaloffset }, reset: function() { this.offset = this.originaloffset }, getcss: function(a) { return {} }, eachdiv: function() { return {} }, applytransition: function() { y.$divs.each(this.eachdiv); this.reset() } }); var v = g.extend({ applytransition: function() { var a = this; y.$divs.each(function() { var b = a.eachdiv; if (typeof(a.eachdiv) == "function") { b = b() } a(this).animate(b, a.duration()); a.increment() }); this.reset() } }); var m = v.extend({ getcssindex: null, eachdivindex: null, getcssgroup: null, eachdivgroup: null, init: function() { this._super(); this.getcssgroup = new array(); this.eachdivgroup = new array(); this.getcssindex = 0; this.eachdivindex = 0 }, getcss: function(b) { var a = this.getcssgroup[this.getcssindex]; this.getcssindex = (this.getcssindex + 1) % this.getcssgroup.length; return a(b) }, addtransition: function(a) { this.getcssgroup.push(a.getcss); this.eachdivgroup.push(a.eachdiv) }, applytransition: function() { var a = this; y.$divs.each(function() { var b = a.eachdivgroup[a.eachdivindex]; if (typeof(b) == "function") { b = b() } a(this).animate(b, a.duration()); a.eachdivindex = (a.eachdivindex + 1) % a.eachdivgroup.length; a.increment() }); this.reset() } }); var u = v.extend({ getcss: function(a) { return { opacity: 0 } }, eachdiv: { opacity: 1 } }); var f = v.extend({ getcss: function(a) { return { top: y.$imgs.eq(y.nextimg).height() } }, eachdiv: { top: 0 } }); var h = v.extend({ getcss: function(a) { return { height: 0 } }, eachdiv: function() { return { height: y.$imgs.eq(y.nextimg).height() } } }); var r = v.extend({ getcss: function(b) { var a = b.css("left"); a = parseint(a.substring(0, a.length - 2), 10); return { left: a + y.divwidth, width: 0 } }, eachdiv: { left: "-=" + y.divwidth, width: y.divwidth } }); var q = v.extend({ getcss: function(a) { return { width: 0 } }, eachdiv: { width: y.divwidth } }); var o = m.extend({ addtransitions: function(a, b) { this.addtransition(a); this.addtransition(b) } }); var w = m.extend({ addtransitions: function(b, a) { this.addtransition(b); this.addtransition(a) } }); var k = m.extend({ addtransitions: function(a, b) { this.addtransition(a); this.addtransition(b) } }); var n = m.extend({ addtransitions: function(a, b) { this.addtransition(a); this.addtransition(b) } }); var p = m.extend({ addtransitions: function(a, b) { this.addtransition(a); this.addtransition(b) } }); var e = m.extend({ addtransitions: function(a, b) { this.addtransition(a); this.addtransition(b) } }); var x = m.extend({ addtransitions: function(a, c, b) { this.addtransition(a); this.addtransition(c); this.addtransition(b) } }); var s = m.extend({ addtransitions: function(c, a, b) { this.addtransition(c); this.addtransition(a); this.addtransition(b) } }); var z = { fade: new u(), slideup: new f(), slidedown: new h(), slideleft: new r(), slideright: new q(), slideupanddown: new o(), slideleftandright: new w(), fadeandslideup: new k(), fadeandslidedown: new n(), fadeandslideleft: new p(), fadeandslideright: new e(), fadeslideupandright: new x(), fadeslidedownandleft: new s() }; z.slideupanddown.addtransitions(z.slideup, z.slidedown); z.slideleftandright.addtransitions(z.slideleft, z.slideright); z.fadeandslideup.addtransitions(z.slideup, z.fade); z.fadeandslidedown.addtransitions(z.fade, z.slidedown); z.fadeandslideleft.addtransitions(z.fade, z.slideleft); z.fadeandslideright.addtransitions(z.slideright, z.fade); z.fadeslideupandright.addtransitions(z.slideup, z.fade, z.slideright); z.fadeslidedownandleft.addtransitions(z.slidedown, z.fade, z.slideleft); t.prototype.populatetransitions = function() { var b = c.transitions.split(/,\s*/g); for (var a in b) { this.transitions.push(z[b[a]]) } }; t.prototype.gettransition = function() { if (c.random) { var a = math.floor(math.random() * this.transitions.length); return this.transitions[a] } else { this.transitioncount = (this.transitioncount + 1) % this.transitions.length; return this.transitions[this.transitioncount] } }; t.prototype.adddivcss = function() { var b = this; var c = b.$imgs.eq(b.nextimg); var d = "url(" + c.attr("src") + ")"; var a = c.height(); this.$divs.each(function() { var e = a(this); e.css({ backgroundimage: d, backgroundposition: "-" + e.css("left") + " 0px", height: a }); e.css(b.transition.getcss(e)) }) }; t.prototype.process = function() { j.css({ backgroundimage: "url(" + this.$imgs.eq(this.displayimg).attr("src") + ")", backgroundrepeat: "no-repeat" }); this.transition = this.gettransition(); this.adddivcss(); this.transition.applytransition(); j.animate({ height: this.$imgs.eq(this.nextimg).height() }, c.animateduration); this.advanceshow() }; t.prototype.updatecurrent = function() { a('.circle[rel="' + this.displayimg + '"]').removeclass("circle-current"); a('.circle[rel="' + this.nextimg + '"]').addclass("circle-current") }; t.prototype.advanceshow = function() { this.updatecurrent(); this.displayimg = this.nextimg; if (this.nextimg == this.size - 1) { this.nextimg = 0 } else { this.nextimg++ } }; t.prototype.startshow = function() { this.interval = window.setinterval(a.proxy(this.runner, this), c.displayduration + c.animateduration) }; t.prototype.stopshow = function() { window.clearinterval(this.interval) }; t.prototype.gotoslide = function(a) { if (this.$divs.filter(":animated").size() > 0) { return } this.stopshow(); this.nextimg = a; this.updatecurrent(); this.runner(); if (this.nextimg == 0) { this.displayimg = this.size - 1 } else { this.displayimg = this.nextimg - 1 } this.startshow() }; t.prototype.applylink = function() { var c = this.$imgs.eq(this.displayimg); var b = c.parent(); if (b.is("a")) { b.removeattr("style") } var a = this.$imgs.eq(this.nextimg); var d = a.parent(); if (d.is("a")) { d.css({ display: "block", textdecoration: "none", border: "0", width: j.width(), height: a.height(), position: "absolute", top: 0, left: 0, zindex: 100 }) } }; t.prototype.applycaption = function() { var a = this.$imgs.eq(this.nextimg); var c = a.attr("title"); var d = a(".caption", j); d.slideup(function() { a(this).html(c) }); if (c != "") { if (d.size() > 0) { if (!d.is(":visible")) { d.html(c) } d.slidedown() } else { var b = a('
' + c + "
"); b.css({ opacity: c.captionopacity, width: j.width(), position: "absolute", top: 0, left: 0, display: "none" }); b.appendto(j); b.slidedown() } } }; t.prototype.runner = function() { this.applylink(); this.applycaption(); this.process() }; t.prototype.begin = function() { var a = this.$imgs.eq(this.nextimg); j.css({ backgroundimage: "url(" + a.attr("src") + ")", height: a.height() }); this.runner(); this.transitioncount--; this.startshow() }; var i = class.extend({ circlecount: null, init: function() { this.circlecount = 0 }, addall: function() { this.addcircles(); this.addprevandnextlinks(); a("a.circle").click(this.circleclickhandler); a(".prev-link").click(this.prevlinkhandler); a(".next-link").click(this.nextlinkhandler); if (c.hideslidechooser) { a("a.circle").hide() } if (c.hideprevandnextarrows) { a(".prev-link, .next-link").hide() } }, addcircles: function() { var a = this; y.$imgs.each(function() { var b = a(''); b.css({ right: (y.size - a.circlecount - 1) * 20 + 10 }); b.appendto(j); a.circlecount++ }) }, addprevandnextlinks: function() { a('').appendto(j); a('').appendto(j) }, circleclickhandler: function(b) { var a = parseint(a(this).attr("rel"), 10); y.gotoslide(a); b.preventdefault() }, prevlinkhandler: function(b) { var a = y.displayimg - 1; if (a < 0) { a = y.size - 1 } y.gotoslide(a); b.preventdefault() }, nextlinkhandler: function(b) { var a = y.displayimg + 1; if (a >= y.size) { a = 0 } y.gotoslide(a); b.preventdefault() } }); var l = new i(); l.addall(); y.populatetransitions(); y.begin() }); return this } })(jquery); /* 鏈唬鐮佺敱97绔欓暱缃戞敹闆嗗苟缂栬緫鏁寸悊; 灏婇噸浠栦汉鍔冲姩鎴愭灉; 杞浇璇蜂繚鐣?7绔欓暱缃戦摼鎺?- www.97zzw.com */