PageSourceSearch

http://www.uwes.com.cn/js/VNew/tj/public_fun.js?0321

js uwes.com.cn collected 2026-09-27 17:13:24 UTC 299,624 bytes, 6,467 lines download raw bytes

1if (!$.browser.msie || $.browser.msie && $.browser.version * 1 > 10) {
2    //下雪方法
3    (function (a) {
4        function g() {
5            var b, a = {};
6            for (type in{
7                Top: "",
8                Left: ""
9            }) b = "Top" == type ? "Y" : "X", "undefined" != typeof window["page" + b + "Offset"] ? a[type.toLowerCase()] = window["page" + b + "Offset"] : (b = document.documentElement.clientHeight ? document.documentElement : document.body, a[type.toLowerCase()] = b["scroll" + type]);
10            return a
11        }
12
13        function o(a) {
14            this.parent = document.body, this.createEl(this.parent, a), this.size = 5 * Math.random() + 5, this.el.style.width = Math.round(this.size) + "px", this.el.style.height = Math.round(this.size) + "px", this.maxLeft = document.body.offsetWidth - this.size, this.maxTop = document.body.offsetHeight - this.size, this.left = Math.random() * this.maxLeft, this.top = g().top + 1, this.angle = 1.4 + .2 * Math.random(), this.minAngle = 1.4, this.maxAngle = 1.6, this.angleDelta = .01 * Math.random(), this.speed = 2 + Math.random()
15        }
16
17        var b = window, d = function () {
18            var a = document.createElement("canvas");
19            return "function" == typeof a.getContext
20        };
21        window.Snow = function (a, b) {
22            !function () {
23                var c, b = ["webkit", "moz"];
24                for (c = 0; c < b.length && !window.requestAnimationFrame; ++c) window.requestAnimationFrame = window[b[c] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[b[c] + "CancelAnimationFrame"] || window[b[c] + "CancelRequestAnimationFrame"];
25                window.requestAnimationFrame || (window.requestAnimationFrame = function (a) {
26                    var c = 14, d = window.setTimeout(function () {
27                        a(c)
28                    }, c);
29                    return d
30                }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function (a) {
31                    clearTimeout(a)
32                })
33            }(), this.settings = b, this.flakes = [], this.flakeCount = b.count, this.mx = -100, this.my = -100, this.init(a)
34        }, Snow.prototype.init = function (c) {
35            var d, e, f, g, h, i;
36            for (this.canvas = c.get(0), this.ctx = this.canvas.getContext("2d"), this.canvas.width = b.innerWidth, this.canvas.height = a(c.get(0)).attr("height"), this.flakes = [], d = 0; d < this.flakeCount; d++) e = Math.floor(Math.random() * this.canvas.width), f = Math.floor(Math.random() * this.canvas.height), g = Math.floor(100 * Math.random()) % this.settings.size + 2, h = Math.floor(100 * Math.random()) % this.settings.speed + Math.random() * g / 10 + .5, i = .5 * Math.random() + this.settings.opacity, this.flakes.push({
37                speed: h,
38                velY: h,
39                velX: 0,
40                x: e,
41                y: f,
42                size: g,
43                stepSize: Math.random() / 30,
44                step: 0,
45                angle: 180,
46                opacity: i
47            });
48            1 == this.settings.interaction && this.canvas.addEventListener("mousemove", function (a) {
49                this.mx = a.clientX, this.my = a.client
50            }), "string" == typeof this.settings.image && (this.image = a("<img src='" + this.settings.image + "' style='display: none'>")), this.snow()
51        }, Snow.prototype.snow = function () {
52            var a = this, c = function () {
53                var d, e, f, g, h, i, j, k, l, m, n, o, p;
54                for (a.ctx.clearRect(0, 0, a.canvas.width, a.canvas.height), d = 0; d < a.flakeCount; d++) {
55                    if (e = a.flakes[d], f = a.mx, g = a.my, h = 100, i = e.x, j = e.y, k = Math.sqrt((i - f) * (i - f) + (j - g) * (j - g)), h > k) l = h / (k * k), m = (f - i) / k, n = (g - j) / k, o = l / 2, e.velX -= o * m, e.velY -= o * n; else switch (e.velX *= .98, e.velY <= e.speed && (e.velY = e.speed), a.settings.windPower) {
56                        case!1:
57                            e.velX += Math.cos(e.step += .05) * e.stepSize;
58                            break;
59                        case 0:
60                            e.velX += Math.cos(e.step += .05) * e.stepSize;
61                            break;
62                        default:
63                            e.velX += .01 + a.settings.windPower / 100
64                    }
65                    e.y += e.velY, e.x += e.velX, (e.y >= a.canvas.height || e.y <= 0) && a.resetFlake(e), (e.x >= a.canvas.width || e.x <= 0) && a.resetFlake(e), 0 == a.settings.image ? (p = a.ctx.createRadialGradient(e.x, e.y, 0, e.x, e.y, e.size - 1), p.addColorStop(0, a.settings.startColor), p.addColorStop(1, a.settings.endColor), a.ctx.fillStyle = p, a.ctx.beginPath(), a.ctx.arc(e.x, e.y, e.size, 0, 2 * Math.PI), a.ctx.fill()) : a.ctx.drawImage(a.image.get(0), e.x, e.y, 2 * e.size, 2 * e.size)
66                }
67                b.cancelAnimationFrame(c), b.requestAnimationFrame(c)
68            };
69            c()
70        }, Snow.prototype.resetFlake = function (a) {
71            var b, c, d, e;
72            0 == this.settings.windPower || 0 == this.settings.windPower ? (a.x = Math.floor(Math.random() * this.canvas.width), a.y = 0) : this.settings.windPower > 0 ? (b = Array(Math.floor(Math.random() * this.canvas.width), 0), c = Array(0, Math.floor(Math.random() * this.canvas.height)), d = Array(b, c), e = d[Math.floor(Math.random() * d.length)], a.x = e[0], a.y = e[1]) : (b = Array(Math.floor(Math.random() * this.canvas.width), 0), c = Array(this.canvas.width, Math.floor(Math.random() * this.canvas.height)), d = Array(b, c), e = d[Math.floor(Math.random() * d.length)], a.x = e[0], a.y = e[1]), a.size = Math.floor(100 * Math.random()) % this.settings.size + 2, a.speed = Math.floor(100 * Math.random()) % this.settings.speed + Math.random() * a.size / 10 + .5, a.velY = a.speed, a.velX = 0, a.opacity = .5 * Math.random() + this.settings.opacity
73        }, a.fn.canvasSnow = function () {
74            var b = d();
75            b && a(this).each(function (b, c) {
76                var d = {};
77                a.each(c.attributes, function (b, c) {
78                    d[a.camelCase(c.name)] = Number(Number(c.value)) ? Number(c.value) : c.value
79                }), "string" == typeof d.image && "false" === d.image && (d.image = !1), new Snow(a(c), {
80                    speed: 1,
81                    interaction: d.interaction || !0,
82                    size: d.size || 2,
83                    count: d.count || 200,
84                    opacity: d.opacity || 1,
85                    startColor: d.startColor || "rgba(255,255,255,1)",
86                    endColor: d.endColor || "rgba(255,255,255,0)",
87                    windPower: d.windPower || 0,
88                    image: d.image || !1
89                })
90            })
91        }, o.prototype = {
92            createEl: function (a, b) {
93                this.el = document.createElement("img"), this.el.classname = "nicesnowclass", this.el.setAttribute("src", b || ""), this.el.style.position = "absolute", this.el.style.display = "block", this.el.style.zIndex = "99999", this.parent.appendChild(this.el)
94            }, move: function () {
95                (this.angle < this.minAngle || this.angle > this.maxAngle) && (this.angleDelta = -this.angleDelta), this.angle += this.angleDelta, this.left += this.speed * Math.cos(this.angle * Math.PI), this.top -= this.speed * Math.sin(this.angle * Math.PI), this.left < 0 ? this.left = this.maxLeft : this.left > this.maxLeft && (this.left = 0)
96            }, draw: function () {
97                this.el.style.top = Math.round(this.top) + "px", this.el.style.left = Math.round(this.left) + "px"
98            }, remove: function () {
99                this.parent.removeChild(this.el), this.parent = this.el = null
100            }
101        }
102    })(jQuery);
103    //流星
104    (function (a) {
105        function n(e, f) {
106            var g = a(e), i = document.createElement("canvas");
107            g.append(i), i.width = f.width || window.innerWidth, i.height = f.he
107ight || window.innerHeight, i.className = "meteor-canvas", c = i.height, d = i.width, b = i.getContext("2d"), b.fillStyle = "black", 100 > d / h && (j = 100)
108        }
109
110        function p() {
111            for (var a = 0; f > a; a++) e[a].getColor(), e[a].draw();
112            clearTimeout(l), l = setTimeout(p, 200)
113        }
114
115        function r() {
116            var a, d;
117            for (a = 0; h > a; a++) d = g[a], d.move(), d.y > c + 100 && (b.clearRect(d.x, d.y - d.height, d.width, d.height), i[a] = 0, g[a] = new q(a), g[a].init(a));
118            clearTimeout(k), k = setTimeout(r, 10)
119        }
120
121        var b, c, d, k, l, q, e = [], f = 200, g = [], h = 3, i = [], j = 200, m = function () {
122            var a = document.createElement("canvas");
123            return "function" == typeof a.getContext
124        }, o = function () {
125            this.x = d * Math.random(), this.y = 5e3 * Math.random(), this.text = ".", this.color = "white"
126        };
127        o.prototype = {
128            constructor: o, getColor: function () {
129                var a = Math.random();
130                this.color = .5 > a ? "gray" : "white"
131            }, init: function () {
132                this.getColor()
133            }, draw: function () {
134                b.beginPath(), b.arc(this.x, this.y, .05, 0, 2 * Math.PI), b.strokeStyle = this.color, b.stroke(), b.closePath()
135            }
136        }, q = function () {
137            this.x = -1, this.y = -1, this.length = -1, this.angle = 30, this.width = -1, this.height = -1, this.speed = 1, this.offset_x = -1, this.offset_y = -1, this.alpha = 1, this.color1 = "", this.color2 = ""
138        }, q.prototype = {
139            constructor: q, init: function (a) {
140                var b, c, d;
141                this.getPos(a), this.alpha = 1, b = 80 * Math.random() + 180, this.length = Math.ceil(b), this.angle = 30, b = Math.random() + .5, this.speed = Math.ceil(b), c = Math.cos(3.14 * this.angle / 180), d = Math.sin(3.14 * this.angle / 180), this.width = this.length * c, this.height = this.length * d, this.offset_x = 3.5 * this.speed * c, this.offset_y = 3.5 * this.speed * d
142            }, countPos: function () {
143                this.x = this.x - this.offset_x, this.y = this.y + this.offset_y
144            }, getPos: function (a) {
145                function b() {
146                    if (_this.x = Math.random() * d, i.length) for (var c = 0; c < i.length; c++) if (Math.abs(_this.x - i[c]) < j) return b();
147                    i[a] = _this.x
148                }
149
150                _this = this, b(), this.y = .2 * c
151            }, draw: function () {
152                b.save(), b.beginPath(), b.lineWidth = 2.5, b.globalAlpha = this.alpha;
153                var a = b.createLinearGradient(this.x, this.y, this.x + this.width, this.y - this.height);
154                a.addColorStop(0, "rgba(255, 255, 255, 1)"), a.addColorStop(1, "rgba(255, 255,255 , 0)"), this.alpha < 0 && (this.alpha = -this.alpha), b.strokeStyle = a, b.moveTo(this.x, this.y), b.lineTo(this.x + this.width, this.y - this.height), b.closePath(), b.stroke(), b.restore()
155            }, move: function () {
156                this.x + this.width - this.offset_x;
157                var c = this.y - this.height;
158                this.alpha -= .002, this.countPos(), this.alpha <= 0 ? this.alpha = 0 : this.alpha > 1 && (this.alpha = 1), b.clearRect(this.x - this.offset_x, c, this.width + this.offset_x, this.height), this.draw()
159            }
160        }, a.fn.extend({
161            canvasMeteor: function (b) {
162                var c = m();
163                b = b || {}, e = [], g = [], c && a(this).each(function (a, c) {
164                    var d, i;
165                    for (n(c, b), a = 0; f > a; a++) d = new o, d.init(), d.draw(), e.push(d);
166                    for (a = 0; h > a; a++) i = new q(a), i.init(a), i.draw(), g.push(i);
167                    p(), r()
168                })
169            }
170        })
171    })(jQuery);
172    //烟花
173    (function (a) {
174        var b = function () {
175            var a = document.createElement("canvas");
176            return "function" == typeof a.getContext
177        }, c = function (a, b) {
178            return ~~(Math.random() * (b - a + 1) + a)
179        }, d = function (a, b, c, d, e, f, g, h) {
180            return !(e > a + c || a > e + g || f > b + d || b > f + h)
181        }, e = function () {
182            return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) {
183                window.setTimeout(a, 1e3 / 60)
184            }
185        }(), f = function (b, c) {
186            this.canvas = document.createElement("canvas"), this.canvas.width = this.cw = c.width || a(window).innerWidth(), this.canvas.height = this.ch = c.height || a(window).innerHeight(), this.particles = [], this.partCount = 150, this.fireworks = [], this.mx = this.cw / 2, this.my = this.ch / 2, this.currentHue = 30, this.partSpeed = 5, this.partSpeedVariance = 10, this.partWind = 50, this.partFriction = 5, this.partGravity = 1, this.hueMin = 0, this.hueMax = 360, this.fworkSpeed = 4, this.fworkAccel = 10, this.hueVariance = 30, this.flickerDensity = 25, this.showShockwave = !0, this.showTarget = !1, this.clearAlpha = 25, a(b).append(this.canvas), this.canvas.className = "fireworks-canvas", this.ctx = this.canvas.getContext("2d"), this.ctx.lineCap = "round", this.ctx.lineJoin = "round", this.lineWidth = 1, this.bindEvents(), this.canvasLoop()
187        };
188        f.prototype = {
189            constructor: f, createParticles: function (a, b, d) {
190                for (var f, e = this.partCount; e--;) f = {
191                    x: a,
192                    y: b,
193                    coordLast: [{x: a, y: b}, {x: a, y: b}, {x: a, y: b}],
194                    angle: c(0, 360),
195                    speed: c(this.partSpeed - this.partSpeedVariance <= 0 ? 1 : this.partSpeed - this.partSpeedVariance, this.partSpeed + this.partSpeedVariance),
196                    friction: 1 - this.partFriction / 100,
197                    gravity: this.partGravity / 2,
198                    hue: c(d - this.hueVariance, d + this.hueVariance),
199                    brightness: c(50, 80),
200                    alpha: c(40, 100) / 100,
201                    decay: c(10, 50) / 1e3,
202                    wind: (c(0, this.partWind) - this.partWind / 2) / 25,
203                    lineWidth: this.lineWidth
204                }, this.particles.push(f)
205            }, updateParticles: function () {
206                for (var b, c, e, f, a = this.particles.length; a--;
206) b = this.particles[a], c = b.angle * Math.PI / 180, e = Math.cos(c) * b.speed, f = Math.sin(c) * b.speed, b.speed *= b.friction, b.coordLast[2].x = b.coordLast[1].x, b.coordLast[2].y = b.coordLast[1].y, b.coordLast[1].x = b.coordLast[0].x, b.coordLast[1].y = b.coordLast[0].y, b.coordLast[0].x = b.x, b.coordLast[0].y = b.y, b.x += e, b.y += f, b.y += b.gravity, b.angle += b.wind, b.alpha -= b.decay, (!d(0, 0, this.cw, this.ch, b.x - b.radius, b.y - b.radius, 2 * b.radius, 2 * b.radius) || b.alpha < .05) && this.particles.splice(a, 1)
207            }, drawParticles: function () {
208                for (var b, d, e, f, a = this.particles.length; a--;) b = this.particles[a], d = c(1, 3) - 1, this.ctx.beginPath(), this.ctx.moveTo(Math.round(b.coordLast[d].x), Math.round(b.coordLast[d].y)), this.ctx.lineTo(Math.round(b.x), Math.round(b.y)), this.ctx.closePath(), this.ctx.strokeStyle = "hsla(" + b.hue + ", 100%, " + b.brightness + "%, " + b.alpha + ")", this.ctx.stroke(), this.flickerDensity > 0 && (e = 50 - this.flickerDensity, c(0, e) === e && (this.ctx.beginPath(), this.ctx.arc(Math.round(b.x), Math.round(b.y), c(b.lineWidth, b.lineWidth + 3) / 2, 0, 2 * Math.PI, !1), this.ctx.closePath(), f = c(50, 100) / 100, this.ctx.fillStyle = "hsla(" + b.hue + ", 100%, " + b.brightness + "%, " + f + ")", this.ctx.fill()))
209            }, createFireworks: function (a, b, d, e) {
210                var f = {
211                    x: a,
212                    y: b,
213                    startX: a,
214                    startY: b,
215                    hitX: !1,
216                    hitY: !1,
217                    coordLast: [{x: a, y: b}, {x: a, y: b}, {x: a, y: b}],
218                    targetX: d,
219                    targetY: e,
220                    speed: this.fworkSpeed,
221                    angle: Math.atan2(e - b, d - a),
222                    shockwaveAngle: Math.atan2(e - b, d - a) + 90 * (Math.PI / 180),
223                    acceleration: this.fworkAccel / 100,
224                    hue: this.currentHue,
225                    brightness: c(50, 80),
226                    alpha: c(50, 100) / 100,
227                    lineWidth: this.lineWidth
228                };
229                this.fireworks.push(f)
230            }, updateFireworks: function () {
231                for (var b, a = this.fireworks.length; a--;) b = this.fireworks[a], this.ctx.lineWidth = b.lineWidth, vx = Math.cos(b.angle) * b.speed, vy = Math.sin(b.angle) * b.speed, b.speed *= 1 + b.acceleration, b.coordLast[2].x = b.coordLast[1].x, b.coordLast[2].y = b.coordLast[1].y, b.coordLast[1].x = b.coordLast[0].x, b.coordLast[1].y = b.coordLast[0].y, b.coordLast[0].x = b.x, b.coordLast[0].y = b.y, b.startX >= b.targetX ? b.x + vx <= b.targetX ? (b.x = b.targetX, b.hitX = !0) : b.x += vx : b.x + vx >= b.targetX ? (b.x = b.targetX, b.hitX = !0) : b.x += vx, b.startY >= b.targetY ? b.y + vy <= b.targetY ? (b.y = b.targetY, b.hitY = !0) : b.y += vy : b.y + vy >= b.targetY ? (b.y = b.targetY, b.hitY = !0) : b.y += vy, b.hitX && b.hitY && (this.createParticles(b.targetX, b.targetY, b.hue), this.fireworks.splice(a, 1))
232            }, drawFireworks: function () {
233                var b, d, a = this.fireworks.length;
234                for (this.ctx.globalCompositeOperation = "lighter"; a--;) b = this.fireworks[a], this.ctx.lineWidth = b.lineWidth, d = c(1, 3) - 1, this.ctx.beginPath(), this.ctx.moveTo(Math.round(b.coordLast[d].x), Math.round(b.coordLast[d].y)), this.ctx.lineTo(Math.round(b.x), Math.round(b.y)), this.ctx.closePath(), this.ctx.strokeStyle = "hsla(" + b.hue + ", 100%, " + b.brightness + "%, " + b.alpha + ")", this.ctx.stroke(), this.showTarget && (this.ctx.save(), this.ctx.beginPath(), this.ctx.arc(Math.round(b.targetX), Math.round(b.targetY), c(1, 8), 0, 2 * Math.PI, !1), this.ctx.closePath(), this.ctx.lineWidth = 1, this.ctx.stroke(), this.ctx.restore()), this.showShockwave && (this.ctx.save(), this.ctx.translate(Math.round(b.x), Math.round(b.y)), this.ctx.rotate(b.shockwaveAngle), this.ctx.beginPath(), this.ctx.arc(0, 0, 1 * (b.speed / 5), 0, Math.PI, !0), this.ctx.strokeStyle = "hsla(" + b.hue + ", 100%, " + b.brightness + "%, " + c(25, 60) / 100 + ")", this.ctx.lineWidth = b.lineWidth, this.ctx.stroke(), this.ctx.restore(
234))
235            }, bindEvents: function () {
236                function d() {
237                    a.mx = a.canvas.width * Math.random() - a.canvas.offsetLeft, a.my = a.canvas.height * Math.random() - a.canvas.offsetTop, a.currentHue = c(a.hueMin, a.hueMax), a.createFireworks(a.cw / 2, a.ch, a.mx, a.my), setTimeout(function () {
238                        e(d.bind(a))
239                    }, 500)
240                }
241
242                var a = this;
243                a.clear(), e(d.bind(a))
244            }, clear: function () {
245                this.particles = [], this.fireworks = [], this.ctx.clearRect(0, 0, this.cw, this.ch)
246            }, canvasLoop: function () {
247                var a = this;
248                e(this.canvasLoop.bind(a), this.canvas), this.ctx.globalCompositeOperation = "destination-out", this.ctx.fillStyle = "rgba(0, 0, 0, " + this.clearAlpha / 100 + ")", this.ctx.fillRect(0, 0, this.cw, this.ch), this.updateFireworks(), this.updateParticles(), this.drawFireworks(), this.drawParticles()
249            }
250        }, a.fn.extend({
251            canvasFireworks: function (c) {
252                var d = b();
253                c = c || {}, d && a(this).each(function (a, b) {
254                    new f(b, c)
255                })
256            }
257        })
258    })(jQuery);
259    //下雨
260    (function (a) {
261        function b() {
262            this.dir = 3, this.height = 30, this.count = 100
263        }
264
265        b.prototype.init = function () {
266            var a = this;
267            a.canvas = document.createElement("canvas"), a.canvas.width = a.W = a.curDom.width(), a.canvas.height = a.H = a.curDom.height(), a.curDom.append(a.canvas), a.ctx = a.canvas.getContext("2d"), setInterval(function () {
268                a.clearCanvas()
269            }, 100)
270        }, b.prototype.clearCanvas = function () {
271            var a = this;
272            a.ctx.clearRect(0, 0, a.W, a.H), a.draws()
273        }, b.prototype.draw = function (a, b) {
274            var c = this, d = c.ctx, e = c.ctx.createLinearGradient(a, b, a - c.dir, b + c.height);
275            e.addColorStop(0, "rgba(0,0,0,0)"), e.addColorStop(.5, "rgba(105,105,105,0.2)"), e.addColorStop(1, "rgba(255,255,255,0.8)"), d.strokeStyle = e, d.beginPath(), d.moveTo(a, b), d.lineTo(a - c.dir, b + c.height), d.lineWidth = 2, d.stroke(), d.closePath()
276        }, b.prototype.draws = function () {
277            var b, a = this;
278            for (b = 1; b <= a.count; b++) a.draw(Math.random() * a.W, Math.random() * a.H)
279        }, a.fn.extend({
280            canvasRain: function (c) {
281                var d = new b;
282                d.curDom = a(this), c && (c.dir && (d.dir = c.dir), c.height && (d.height = c.height), c.count && (d.count = c.count)), d.init()
283            }
284        })
285    })(jQuery);
286    //气泡
287    (function ($) {
288        $.fn.canvasAirBubble = function (options) {
289            var curDom = $(this), width = curDom.width(), height = curDom.height(), canvas, ctx, target,
290                animateHeader = true, circles = [], settings = $.extend({
291                    color: 'rgba(255,255,255,.4)',
292                    radius: 20,
293                    densety: 0.3,
294                    clearOffset: 0.2
295                }, options);
296            initContainer();
297
298            function initContainer() {
299                target = {x: 0, y: height};
300                initCanvas();
301                canvas = document.getElementById('canvas');
302                canvas.width = width;
303                canvas.height = height;
304                ctx = canvas.getContext('2d');
305                for (var x = 0; x < width * settings.densety; x++) {
306                    var c = new Circle();
307                    circles.push(c)
308                }
309                animate()
310            }
311
312            function initCanvas() {
313                var canvasElement = document.createElement('canvas');
314                canvasElement.id = 'canvas';
315                curDom.append(canvasElement)
316            }
317
318            function animate() {
319                if (animateHeader) {
320                    ctx.clearRect(0, 0, width, height);
321                    for (var i in circles) {
322                        circles[i].draw()
323                    }
324                }
325                requestAnimationFrame(animate)
326            }
327
328            function randomColor() {
329                return "rgba(" + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.random().toPrecision(2) + ")"
330            }
331
332            function Circle() {
333                var self = this;
334                (function () {
335                    self.pos = {};
336                    init()
337                })();
338
339                function init() {
340                    self.pos.x = Math.random() * width;
341                    self.pos.y = height + Math.random() * 100;
342                    self.alpha = 0.1 + Math.random() * settings.clearOffset;
343                    self.scale = 0.1 + Math.random() * 0.3;
344                    self.speed = Math.random();
345                    if (settings.color == 'random') {
346                        self.color = randomColor()
347                    } else {
348                        self.color = settings.color
349                    }
350                }
351
352                this.draw = function () {
353                    if (self.alpha <= 0) {
354                        init()
355                    }
356                    self.pos.y -= self.speed;
357                    self.alpha -= 0.0005;
358                    ctx.beginPath();
359                    ctx.arc(self.pos.x, self.pos.y, self.scale * settings.radius, 0, 2 * Math.PI, false);
360                    ctx.fillStyle = self.color;
361                    ctx.fill();
362                    ctx.closePath()
363                }
364            }
365        }
366    })(jQuery);
367}
368/**************** 前台页面公用的js方法 *******************/
369/*Banner3D的插件*/
370;(function($) {
371    function Banner3D(curDom) {
372        var that = this;
373        that.curDom = curDom;
374        that.curDomType = that.curDom.hasClass('customModuleRowGroup') ? 'rowGroup' : 'banner';
375        that.effectType = that.curDom.attr('data-effect-type');
376        that.autoTime = (that.curDomType === 'rowGroup' && is_action) ? null : that.curDom.attr('data-auto-time') * 1000;
377        that.autoTimeFun = null;
378        that.durationTime = that.curDom.attr('data-duration-time') * 1000;
379        that.canvasType = that.curDom.attr('data-canvas-type');
380        that.piclistArea = that.curDomType === 'rowGroup' ? that.curDom.find(".rowGroup-box") : that.curDom.find(".piclist-area");
381        that.piclistBox = that.curDomType === 'rowGroup' ? that.curDom.find(".rowGroup-box-inner") : that.curDom.find(".piclist-box");
382        that.btnArea = that.curDom.children(".ctrl-btn-area");
383        that.sidebarArea = that.curDom.children(".ctrl-sidebar-area");
384        that.smallpicObj = {
385            'area': that.curDom.children(".smallpic-area")
386        };
387        that.liArray = that.curDomType === 'rowGroup' ? that.curDom.find(".customModuleRow") : that.piclistBox.find(".list-item");
388        that.sumLi = that.liArray.length;
389        that.curLiIndex = null;
390        that.curLi = null;
391        that.defaultLi = that.curDom.attr('data-showsum') || 0;
392        that.effectKey = 0;
393        that.targetIndex = 0;
394    }
395    Banner3D.prototype.init = function() {
396        var that = this,
397            curClass = 'cur';
398        that.liArray.css({
399            'animation-duration': that.durationTime + 'ms'
400        });
401        that.liArray.eq(that.defaultLi).addClass(curClass);
402        that.liArray.each(function(i, dom) {
403            dom = $(dom);
404            dom.data('loaded', 0).attr('data-loaded', 0);
405            if (dom.hasClass(curClass)) {
406                that.curLiIndex = that.targetIndex = i;
407                that.curLi = dom;
408                that.sidebarArea.length && that.sidebarArea.find('em').eq(i).addClass('cur');
409                that.smallpicObj.area.length && that.smallpicObj.area.find('em').eq(i).addClass('cur');
410                that.loadImg();
411            }
412        });
413        that.btnArea.length && that.btnArea.on({
414            click: function() {
415                var atcion = $(this).attr('data-action');
416                that.effectKey = atcion == 'next' ? 1 : 0;
417                that.initFun(that.curLiIndex + (atcion == 'next' ? +1 : -1));
418            }
419        }, '.btn');
420        that.sidebarArea.length && that.sidebarArea.on({
421            click: function() {
422                var $this = $(this);
423                that.autoTime = null;
424                that.autoTimeFun && clearTimeout(that.autoTimeFun);
425                if (!$this.hasClass('cur')) {
426                    var index = $this.index();
427                    that.effectKey = index > that.curLiIndex ? 1 : 0;
428                    that.initFun(index);
429                }
430            }
431        }, 'em');
432        that.curDom.on({
433            'mouseenter': function() {
434                that.autoTime = null;
435                clearTimeout(that.autoTimeFun);
436            },
437            'mouseleave': function() {
438                that.autoTime = (that.curDomType === 'rowGroup' && is_action) ? null : that.curDom.attr('data-auto-time') * 1000;
439                that.autoPlay();
440            }
441        });
442        // 焦点图特出处理
443        if (that.curDomType === 'banner') {
444            if (that.smallpicObj.area.length) {
445                that.smallpicObj.area.on({
446                    click: function() {
447                        var $this = $(this);
448                        that.autoTime = null;
449                        that.autoTimeFun && clearTimeout(that.autoTimeFun);
450                        if (!$this.hasClass('cur')) {
451                            var index = $this.index();
452                            that.effectKey = index > that.curLiIndex ? 1 : 0;
453                            that.initFun(index);
454                        }
455                    }
456                }, 'em');
457                that.smallpicAnimation();
458            }
459            wsf.banner3D.canvasLoad(that.curDom);
460        }
461        that.autoPlay();
462    };
463    Banner3D.prototype.loadImg = function() {
464        var that = this;
465        if(that.curLi.length){
466            if(that.curLi.attr('data-loaded') * 1 !== 1){
467                that.curLi.attr('data-loaded', 1);
468                if (that.curDomType === 'rowGroup') {
469                    that.curLi.find('.ev-module-edit,.customModule').each(function(i, dom) {
470                        wsf.f.upJsFun($(dom));
471                    });
472                } else {
473                    var img = new Image(),
474                        picItem = that.curLi.find('.pic-item');
475                    picItem.addClass('loading-pic');
476                    if (picItem.data('title')) {
477                        picItem.attr('title', picItem.data('title'));
478                    }
479                    img.onload = function() {
480                        picItem.css('background-image', 'url(' + picItem.data('imgurl') + ')');
481                        img = null;
482                        picItem.removeClass('loading-pic');
483                    };
484                    img.src = picItem.data('imgurl');
485                }
486            }
487            if (that.curDomType === 'rowGroup') {
488                setTimeout(function(){
489                    that.curLi.find('.ev-module-edit,.customModule').each(function(i, dom) {
490                        dom = $(dom);
491                        var curDomEditBox = dom;
492                        if (dom.hasClass('ev-module-edit')) {
493                            curDomEditBox = dom.find('div.ev-module-edit-box:first')
494                        }
495                        if (curDomEditBox.data('animate-name')) {
496                            wsf.f.annimationLoadMo(curDomEditBox);
497                        }
498                        wsf.f.imgLazyLoading(dom);
499                    });
500                    that.liArray.each(function(i, rowDom) {
501                        rowDom = $(rowDom);
502                        if (!rowDom.is(that.curLi)) {
503                            rowDom.find('.ev-module-edit,.customModule').each(function(i, dom) {
504                                dom = $(dom);
505                                var curDomEditBox = dom;
506                                if (dom.hasClass('ev-module-edit')) {
507                                    curDomEditBox = dom.find('div.ev-module-edit-box:first');
508                                }
509                                if (curDomEditBox.data('animate-name')) {
510                                    curDomEditBox.attr('data-loadanimate', 0);
511                                    curDomEditBox.addClass('load-animate');
512                                }
513                            });
514                        }
515                    });
516                },that.durationTime);
517            }
518        }
519    };
520    Banner3D.prototype.smallpicAnimation = function() {
521        var that = this;
522        if (!that.smallpicObj.inner) {
523            that.smallpicObj.areaW = that.smallpicObj.area.width();
524            that.smallpicObj.areaH = that.smallpicObj.area.height();
525            that.smallpicObj.inner = that.smallpicObj.area.find('.smallpic-inner');
526            that.smallpicObj.inner.data('translateX', 0);
527            that.smallpicObj.emArray = that.smallpicObj.inner.find('em');
528            if ($.inArray(that.smallpicObj.area.attr('data-skin') * 1, [151, 152]) == -1) {
529                that.smallpicObj.innerW = (function() {
530                    var w = that.smallpicObj.areaW,
531                        w_ = 0;
532                    that.smallpicObj.emArray.each(function(i, dom) {
533                        dom = $(dom);
534                        w_ += dom.width();
535                    });
536                    return Math.max(w, w_);
537                })();
538                that.smallpicObj.inner.width(that.smallpicObj.innerW);
539            }
540        }
541        if ($.inArray(that.smallpicObj.area.attr('data-skin') * 1, [151, 152]) == -1) {
542            if (that.smallpicObj.areaW < that.smallpicObj.innerW) {
543                (function() {
544                    var cz = that.smallpicObj.innerW - that.smallpicObj.areaW,
545                        curEm = that.smallpicObj.emArray.eq(that.targetIndex),
546                        left = curEm.position().left,
547                        x = 0;
548                    if (left < 0 || left + curEm.width() > that.smallpicObj.areaW) {
549                        x = that.smallpicObj.inner.data('translateX') + (left < 0 ? Math.abs(left) 
549: -(curEm.width() + left - that.smallpicObj.areaW));
550                        left < 0 ? (x > 0 && (x = 0)) : ((Math.abs(x) > that.smallpicObj.innerW - that.smallpicObj.areaW) && (x = -(that.smallpicObj.innerW - that.smallpicObj.areaW)));
551                        that.smallpicObj.inner.data('translateX', x);
552                        that.smallpicObj.inner.css({
553                            'transform': 'translateX(' + x + 'px)'
554                        });
555                    }
556                })();
557            }
558        }
559    };
560    Banner3D.prototype.initFun = function(targetIndex) {
561        var that = this;
562        if(is_action && that.curDomType === 'rowGroup'){
563          that.liArray = that.curDom.find(".customModuleRow");
564          that.sumLi = that.liArray.length;
565          that.effectType = that.curDom.attr('data-effect-type');
566          that.targetIndex = that.curLiIndex = that.curDom.find(".customModuleRow.cur").index();
567        }
568        // that.autoTime != null && that.curDom.attr('data-auto-time') * 1000;
569        if (that.durationTime != that.curDom.attr('data-duration-time') * 1000) {
570            that.durationTime = that.curDom.attr('data-duration-time') * 1000;
571            that.liArray.css({
572                'animation-duration': that.durationTime + 'ms'
573            });
574        }
575        if (that.targetIndex == that.curLiIndex && that.sumLi > 1) {
576            that.targetIndex = ((targetIndex == that.sumLi && '0') || (targetIndex < 0 && (that.sumLi - 1)) || targetIndex) * 1;
577            that.curLi = $(that.liArray[that.targetIndex]);
578            if ($.browser.msie && $.inArray($.browser.version, ['6.0', '7.0', '8.0', '9.0', '10.0']) != -1) {
579                that.IEanimationFun((that.effectType == 0 && Math.floor(Math.random() * 3 + 1)) || that.effectType * 1);
580            } else {
581                that.animationFun((that.effectType == 0 && Math.floor(Math.random() * 8 + 1)) || that.effectType * 1);
582            }
583          that.loadImg();
584        }
585    };
586    Banner3D.prototype.effectJson = {
587        1: [
588            ['bannerEffect-1-1-out', 'bannerEffect-1-1-in'],
589            ['bannerEffect-1-2-out', 'bannerEffect-1-2-in']
590        ],
591        2: [
592            ['bannerEffect-2-1-out', 'bannerEffect-2-1-in'],
593            ['bannerEffect-2-2-out', 'bannerEffect-2-2-in']
594        ],
595        3: [
596            ['bannerEffect-3-out', 'bannerEffect-3-in'],
597            ['bannerEffect-3-out', 'bannerEffect-3-in']
598        ],
599        4: [
600            ['bannerEffect-4-1-out', 'bannerEffect-4-1-in'],
601            ['bannerEffect-4-2-out', 'bannerEffect-4-2-in']
602        ],
603        5: [
604            ['bannerEffect-5-1-out', 'bannerEffect-5-1-in'],
605            ['bannerEffect-5-2-out', 'bannerEffect-5-2-in']
606        ],
607        6: [
608            ['bannerEffect-6-1-out', 'bannerEffect-6-1-in'],
609            ['bannerEffect-6-2-out', 'bannerEffect-6-2-in']
610        ],
611        7: [
612            ['bannerEffect-7-1-out', 'bannerEffect-7-1-in'],
613            ['bannerEffect-7-2-out', 'bannerEffect-7-2-in']
614        ],
615        8: [
616            ['bannerEffect-8-1-out', 'bannerEffect-8-1-in'],
617            ['bannerEffect-8-2-out', 'bannerEffect-8-2-in']
618        ]
619    };
620    Banner3D.prototype.animationFun = function(types) {
621        var that = this,
622            effectKey = that.effectKey,
623            liArray = that.liArray,
624            effectJson = that.effectJson;
625        that.sidebarArea.length && that.sidebarArea.find('em').removeClass('cur').eq(that.targetIndex).addClass('cur');
626        that.smallpicObj.area.length && (that.smallpicObj.area.find('em').removeClass('cur').eq(that.targetIndex).addClass('cur'), that.smallpicAnimation());
627        that.piclistArea.attr('class', (that.curDomType === 'rowGroup' ? 'rowGroup-box' : 'piclist-area') + ' bannerEffect-' + types);
628        switch (types) {
629            case 6:
630                liArray.css({
631                    '-webkit-transform-origin': '50% 50% -' + (that.piclistArea.width() / 2) + 'px',
632                    '-moz-transform-origin': '50% 50% -' + (that.piclistArea.width() / 2) + 'px',
633                    '-ms-transform-origin': '50% 50% -' + (that.piclistArea.width() / 2) + 'px',
634                    '-o-transform-origin': '50% 50% -' + (that.piclistArea.width() / 2) + 'px',
635                    'transform-origin': '50% 50% -' + (that.piclistArea.width() / 2) + 'px'
636                });
637                break;
638            case 7:
639                liArray.css({
640                    '-webkit-transform-origin': '50% 50% -' + (that.piclistArea.height() / 2) + 'px',
641                    '-moz-transform-origin': '50% 50% -' + (that.piclistArea.height() / 2) + 'px',
642                    '-ms-transform-origin': '50% 50% -' + (that.piclistArea.height() / 2) + 'px',
643                    '-o-transform-origin': '50% 50% -' + (that.piclistArea.height() / 2) + 'px',
644                    'transform-origin': '50% 50% -' + (that.piclistArea.height() / 2) + 'px'
645                });
646                break;
647            default:
648                liArray.css({
649                    '-webkit-transform-origin': '50% 50%',
650                    '-moz-transform-origin': '50% 50%',
651                    '-ms-transform-origin': '50% 50%',
652                    '-o-transform-origin': '50% 50%',
653                    'transform-origin': '50% 50%'
654                });
655                break;
656        }
657        switch (types) {
658            case 1:
659            case 2:
660            case 3:
661            case 6:
662            case 7:
663            case 8:
664                liArray.eq(that.curLiIndex).addClass(effectJson[types][effectKey][0]);
665                liArray.eq(that.targetIndex).addClass('cur ' + effectJson[types][effectKey][1]);
666                setTimeout(function() {
667                    that.curDomType !== 'rowGroup' && (function() {
668                        var curVideo = liArray.eq(that.curLiIndex).find('video'),
669                            nextVideo = liArray.eq(that.targetIndex).find('video');
670                        curVideo.length && curVideo.attr('src') != 'none' && curVideo[0].pause();
671                        nextVideo.length && nextVideo.attr('src') != 'none' && nextVideo[0].play();
672
673                    })();
674                    liArray.eq(that.curLiIndex).removeClass('cur ' + effectJson[types][effectKey][0]);
675                    liArray.eq(that.targetIndex).removeClass(effectJson[types][effectKey][1]);
676                    that.curLiIndex = that.targetIndex;
677                    that.autoPlay();
678                }, that.durationTime - 20);
679                break;
680            case 4:
681            case 5:
682                liArray.eq(that.curLiIndex).addClass(effectJson[types][effectKey][0]);
683                setTimeout(function() {
684                    liArray.eq(that.curLiIndex).removeClass('cur ' + effectJson[types][effectKey][0]);
685                    liArray.eq(that.targetIndex).addClass('cur ' + effectJson[types][effectKey][1]);
686                    setTimeout(function() {
687                        (function() {
688                            var curVideo = liArray.eq(that.curLiIndex).find('video'),
689                                nextVideo = liArray.eq(that.targetIndex).find('video');
690                            curVideo.length && curVideo.attr('src') != 'none' && curVideo[0].pause();
691                            nextVideo.length && nextVideo.attr('src') != 'none' && nextVideo[0].play();
692
693                        })();
694                        liArray.eq(that.targetIndex).removeClass(effectJson[types][effectKey][1]);
695                        that.curLiIndex = that.targetIndex;
696                        that.autoPlay();
697                    }, that.durationTime);
698                }, that.durationTime - 20);
699                break;
700        }
701    };
702    Banner3D.prototype.IEanimationFun = function(types) {
703        var that = this,
704            aKey = null,
705            effectKey = that.effectKey,
706            liArray = that.liArray,
707            effectJson = that.effectJson;
708        that.sidebarArea.length && that.sidebarArea.find('em').removeClass('cur').eq(that.targetIndex).addClass('cur');
709        that.smallpicObj.area.length && that.smallpicObj.area.find('em').removeClass('cur').eq(that.targetIndex).addClass('cur');
710        that.piclistArea.attr('class', (that.curDomType === 'rowGroup' ? 'rowGroup-box' : 'piclist-area') + ' bannerEffect-' + types);
711        switch (types) {
712            case 1:
713                liArray.eq(that.curLiIndex).animate({
714                    'opacity': 0
715                }, that.durationTime, function() {
716                    $(this).removeClass('cur').css('opacity', '');
717                    that.curLiIndex = that.targetIndex;
718                    that.autoPlay();
719                });
720                liArray.eq(that.targetIndex).addClass('cur').css('opacity', 0).animate({
721                    'opacity': 1
722                }, that.durationTime);
723                break;
724            case 2:
725                aKey = that.effectKey == 1 ? ['-100%', '100%'] : ['100%', '-100%'];
726                liArray.eq(that.curLiIndex).animate({
727                    'left': aKey[0]
728                }, that.durationTime, function() {
729                    $(this).removeClass('cur').css('left', 0);
730                    that.curLiIndex = that.targetIndex;
731                    that.autoPlay();
732                });
733                liArray.eq(that.targetIndex).addClass('cur').css('left', aKey[1]).animate({
734                    'left': 0
735                }, that.durationTime);
736                break;
737            case 3:
738                aKey = that.effectKey == 1 ? ['-100%', '100%'] : ['100%', '-100%'];
739                liArray.eq(that.curLiIndex).animate({
740                    'top': aKey[0]
741                }, that.durationTime, function() {
742                    $(this).removeClass('cur').css('top', 0);
743                    that.curLiIndex = that.targetIndex;
744                    that.autoPlay();
745                });
746                liArray.eq(that.targetIndex).addClass('cur').css('top', aKey[1]).animate({
747                    'top': 0
748                }, that.durationTime);
749                break;
750        }
751    };
752    Banner3D.prototype.autoPlay = function() {
753        var that = this;
754        if (that.autoTime) {
755            that.autoTimeFun = setTimeout(function() {
756                that.effectKey = 1;
757                that.initFun(that.curLiIndex + 1);
758                // that.curLi = that.liArray.eq(that.curLiIndex + 1);
759            }, that.autoTime);
760        }
761    };
762    $.extend({
763        banner3D: function(curDom) {
764            curDom[0]['banner3D'] = new Banner3D(curDom);
765            curDom[0].banner3D.init();
766        }
767    });
768})(jQuery);
769/*
770 *   jquery focusImg
771 *   焦点图js功能
772 */
773(function ($) {
774    $.fn.extend({
775        focusImg: function (options) {
776            return this.each(function () {
777                var Opts = {
778                    uistyle: "style-1",
779                    fnclass: "inOut",
780                    evtype: "mouseenter",
781                    usertime: 6
782                };
783                Opts = $.extend(Opts, options);
784
785                var full = $(this),
786                    fWidth = full.parent().width(),
787                    fHeight = full.parent().height(),
788                    uistyle = Opts.uistyle,
789                    fnclass = Opts.fnclass,
790                    pUl = full.children("ul"),
791                    pLi = pUl.find("li"),
792                    bNav = $("<div></div>"),
793                    times = null,
794                    an = true,
795                    y = 0,
796                    change = function (e) { //图片地址更换
797                        var curli = e,
798                            bigpic = curli.attr("bigpic"),
799                            bcolor = curli.attr("bcolor");
800                        curli.css({
801                            "background-color": bcolor,
802                            "background-image": "url(" + bigpic + ")"
803                        });
804                        curli.attr("change", "true");
805                    },
806                    eventfn = function (obj, fobj) { //事件模式
807                        obj.find(fobj).each(function (e) {
808                            $(this).bind(Opts.evtype, function () {
809                                eval(fnclass + "(e)");
810                            });
811                        });
812                    };
813                switch (Opts.fnclass) {
814                    case 'inOut':
815                        (function () {
816                            pUl.addClass('banner-pic-1').css({
817                                "height": fHeight
818                            });
819                            pLi.each(function () {
820                                $(this).css({
821                                    "height": fHeight
822                                });
823                            });
824                        })();
825                        break;
826                    case 'LMove':
827                        (function () {
828                            full.css({
829                                "height": fHeight + "px"
830                            });
831                            pUl.addClass('banner-pic-2').css({
832                                "width": pLi.length * fWidth + "px",
833                                "height": fHeight + "px"
834                            });
835                            pLi.each(function () {
836                                $(this).css({
837                                    "width": fWidth + "px",
838                                    "height": fHeight
839                                });
840                            });
841                        })();
842                        break;
843                    case 'TMove':
844                        (function () {
845                            full.css({
846                                "height": fHeight + "px"
847                            });
848                            pUl.addClass('banner-pic-3').css({
849                                "height": pLi.length * fHeight + "px"
850                            });
851                            pLi.each(function () {
852                                $(this).css({
853                                    "height": fHeight
854                                });
855                            });
856                        })();
857                        break;
858                }
859                switch (Opts.uistyle) {
860                    case "style-1":
861                        if (pLi.length > 1) {
862                            var ban = $("<div class='b-nav'></div>");
863                            pLi.each(function (e) {
864                                ban.append("<span></span>");
865                            });
866                            full.append(bNav.attr("class", "banner-nav-1").html(ban));
867                            eventfn(ban, "span");
868                        }
869                        break;
870                    case "style-2":
871                        if (pLi.length > 1) {
872                            var ban = $("<div class='b-nav'></div>");
873                            pLi.each(function (e) {
874                                ban.append("<span>" + (e + 1) + "</span>");
875                            });
876                            full.append(bNav.attr("class", "banner-nav-2").html(ban));
877                            eventfn(ban, "span");
878                        }
879                        break;
880                    case "style-3":
881                        var ban = $("<div class='b-nav'></div>");
882                        pLi.each(function () {
883                            var smallurl = $(this).attr("smallpic") ? $(this).attr("smallpic") : $(this).attr("bigpic");
884                            var s = $("<span></span>").html("<img src=" + smallurl + " />");
885                            ban.append(s);
886                        });
887                        full.append(bNav.attr("class", "banner-nav-3").html(ban));
888                        eventfn(ban, "span");
889                        break;
890                }
891                var inOut = function (e) {
892                    var curli = pLi.eq(e);
893                    if (curli.attr("change") == "false") {
894                        change(curli);
895                    }
896                    var ospan = bNav.find("span.cur");
897                    var o = ospan.index();
898                    if (e != o) {
899                        if (an) {
900                            an = false;
901                            ospan.removeClass("cur");
902                            bNav.find("span:eq(" + e + ")").addClass("cur");
903                            pLi.eq(o).css({
904                                "z-index": 3
905                            }).animate({
906                                "opacity": 0
907                            }, 1000, function () {
908                                an = true;
909                                $(this).css({
910                                    "opacity": 1,
911                                    "z-index": 1
912                                });
913                            });
914                            curli.css({
915                                "display": "block",
916                                "z-index": 2
917                            });
918                            y = y + 1;
919                            if (y >= pLi.length) {
920                                y = 0;
921                            }
922                        }
923                    }
924                };
925                var LMove = function (e) {
926                    var fullW = full.parent().width(),
927                        fullH = full.parent().height();
928                    var curli = pLi.eq(e);
929                    if (curli.attr("change") == "false") {
930                        change(curli);
931                    }
932                    var ospan = bNav.find("span.cur");
933                    var o = ospan.index();
934                    if (an) {
935                        an = false;
936                        ospan.removeClass("cur");
937                        bNav.find("span:eq(" + e + ")").addClass("cur");
938                        pUl.animate({
939                            "left": "-" + e * fullW
940                        }, 200, function () {
941                            an = true;
942                            y = y + 1;
943                            if (y >= pLi.length) {
944                                y = 0;
945                            }
946                        });
947                    }
948                };
949                var TMove = function (e) {
950                    var fullH = full.height();
951                    var curli = pLi.eq(e);
952                    if (curli.attr("change") == "false") {
953                        change(curli);
954                    }
955                    var ospan = bNav.find("span.cur");
956                    var o = ospan.index();
957                    if (an) {
958                        an = false;
959                        ospan.removeClass("cur");
960                        bNav.find("span:eq(" + e + ")").addClass("cur");
961                        pUl.animate({
962                            "top": "-" + e * fullH
963                        }, 200, function () {
964                            an = true;
965                            y = y + 1;
966                            if (y >= pLi.length) {
967                                y = 0;
968                            }
969                        });
970                    }
971                };
972                times = setInterval(function () {
973                    eval(Opts.fnclass + "(y)");
974                }, (Opts.usertime) * 1000);
975                full.mouseenter(function () {
976                    clearInterval(times);
977                });
978                full.mouseleave(function () {
979                    times = setInterval(function () {
980                        eval(Opts.fnclass + "(y)");
981                    }, (Opts.usertime) * 1000);
982                });
983                eval(Opts.fnclass + "(y)");
984            });
985        }
986    });
987})(jQuery);
988/*生成二维码得方法*/
989(function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;d<a.length&&0==a[d];)d++;this.num=Array(a.length-d+c);for(var b=0;b<a.length-d;b++)this.num[b]=a[b+d]}function p(a,c){this.totalCount=a;this.dataCount=c}function t(){this.buffer=[];this.length=0}u.prototype={getLength:function(){return this.data.length},
990    write:function(a){for(var c=0;c<this.data.length;c++)a.put(this.data.charCodeAt(c),8)}};o.prototype={addData:function(a){this.dataList.push(new u(a));this.dataCache=null},isDark:function(a,c){if(0>a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>
vendor: 16,350 bytes, lines 990-1094
990this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e<c.length;e++)b+=c[e].dataCount;
991    for(e=0;e<this.dataList.length;e++)c=this.dataList[e],d.put(c.mode,4),d.put(c.getLength(),j.getLengthInBits(c.mode,a)),c.write(d);if(d.getLengthInBits()<=8*b)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17;this.modules=Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[d][b]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-
992    7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(a,c);7<=this.typeNumber&&this.setupTypeNumber(a);null==this.dataCache&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,c){for(var d=-1;7>=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]=
993    0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c<this.modules.length;c++)for(var d=1*c,b=0;b<this.modules[c].length;b++){var e=1*b;this.modules[c][b]&&(a.beginFill(0,100),a.moveTo(e,d),a.lineTo(e+1,d),a.lineTo(e+1,d+1),a.lineTo(e,d+1),a.endFill())}return a},
994    setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(a=8;a<this.moduleCount-8;a++)null==this.modules[6][a]&&(this.modules[6][a]=0==a%2)},setupPositionAdjustPattern:function(){for(var a=j.getPatternPosition(this.typeNumber),c=0;c<a.length;c++)for(var d=0;d<a.length;d++){var b=a[c],e=a[d];if(null==this.modules[b][e])for(var f=-2;2>=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c=
995        j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount-
996    b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0<i;i-=2)for(6==i&&i--;;){for(var g=0;2>g;g++)if(null==this.modules[b][i-g]){var n=!1;f<a.length&&(n=1==(a[f]>>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a,
997    c),b=new t,e=0;e<d.length;e++){var f=d[e];b.put(f.mode,4);b.put(f.getLength(),j.getLengthInBits(f.mode,a));f.write(b)}for(e=a=0;e<c.length;e++)a+=c[e].dataCount;if(b.getLengthInBits()>8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d=
998    0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g<c.length;g++){var n=c[g].dataCount,h=c[g].totalCount-n,b=Math.max(b,n),e=Math.max(e,h);f[g]=Array(n);for(var k=0;k<f[g].length;k++)f[g][k]=255&a.buffer[k+d];d+=n;k=j.getErrorCorrectPolynomial(h);n=(new q(f[g],k.getLength()-1)).mod(k);i[g]=Array(k.getLength()-1);for(k=0;k<i[g].length;k++)h=k+n.getLength()-i[g].length,i[g][k]=0<=h?n.get(h):0}for(k=g=0;k<c.length;k++)g+=c[k].totalCount;d=Array(g);for(k=n=0;k<b;k++)for(g=0;g<c.length;g++)k<f[g].length&&
999(d[n++]=f[g][k]);for(k=0;k<e;k++)for(g=0;g<c.length;g++)k<i[g].length&&(d[n++]=i[g][k]);return d};s=4;for(var j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,
1000    78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var c=a<<10;0<=j.getBCHDigit(c)-j.getBCHDigit(j.G15);)c^=j.G15<<j.getBCHDigit(c)-j.getBCHDigit(j.G15);return(a<<10|c)^j.G15_MASK},getBCHTypeNumber:function(a){for(var c=a<<12;0<=j.getBCHDigit(c)-
1001j.getBCHDigit(j.G18);)c^=j.G18<<j.getBCHDigit(c)-j.getBCHDigit(j.G18);return a<<12|c},getBCHDigit:function(a){for(var c=0;0!=a;)c++,a>>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+
1002    a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;d<a;d++)c=c.multiply(new q([1,l.gexp(d)],0));return c},getLengthInBits:function(a,c){if(1<=c&&10>c)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+
1003    a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b<c;b++)for(var e=0;e<c;e++){for(var f=0,i=a.isDark(b,e),g=-1;1>=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5<f&&(d+=3+f-5)}for(b=0;b<c-1;b++)for(e=0;e<c-1;e++)if(f=0,a.isDark(b,e)&&f++,a.isDark(b+1,e)&&f++,a.isDark(b,e+1)&&f++,a.isDark(b+1,e+1)&&f++,0==f||4==f)d+=3;for(b=0;b<c;b++)for(e=0;e<c-6;e++)a.isDark(b,e)&&!a.isDark(b,e+1)&&a.isDark(b,e+
1004    2)&&a.isDark(b,e+3)&&a.isDark(b,e+4)&&!a.isDark(b,e+5)&&a.isDark(b,e+6)&&(d+=40);for(e=0;e<c;e++)for(b=0;b<c-6;b++)a.isDark(b,e)&&!a.isDark(b+1,e)&&a.isDark(b+2,e)&&a.isDark(b+3,e)&&a.isDark(b+4,e)&&!a.isDark(b+5,e)&&a.isDark(b+6,e)&&(d+=40);for(e=f=0;e<c;e++)for(b=0;b<c;b++)a.isDark(b,e)&&f++;a=Math.abs(100*f/c/c-50)/5;return d+10*a}},l={glog:function(a){if(1>a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256),
1005    LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<<m;for(m=8;256>m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var b=0;b<a.getLength();b++)c[d+b]^=l.gexp(l.glog(this.get(d))+l.glog(a.get(b)));return new q(c,0)},mod:function(a){if(0>
1006    this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b<this.getLength();b++)d[b]=this.get(b);for(b=0;b<a.getLength();b++)d[b]^=l.gexp(l.glog(a.get(b))+c);return(new q(d,0)).mod(a)}};p.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],
1007    [4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,
1008        116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,
1009        43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,
1010        3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,
1011        55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
1012        45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
1013(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
1014    correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
1015    j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
1016    d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;jQuery(a).appendTo(this)})}})(jQuery);
1017/*
1018模块移动函数
1019主要是拖拽版的单模块内容移动效果
1020*/
1021(function ($) {
1022    $.fn.extend({
1023        "moveModule": function (options) {
1024            return this.each(function () {
1025                var defaultO = {
1026                    axis: "top",
1027                    speed: "slow",
1028                    type: "flow",
1029                    hand: false
1030                };
1031                var O = $.extend(defaultO, options);
1032                var speed = 100,
1033                    moveSpeedPx = 1;
1034                switch(O.type){
1035                    case 'flow':
1036                        switch (O.speed) {
1037                            case "slowly":
1038                                speed = 30;
1039                                moveSpeedPx = 1;
1040                                break;
1041                            case "slow":
1042                                speed = 20;
1043                                moveSpeedPx = 1;
1044                                break;
1045                            case "normal":
1046                                speed = 10;
1047                                moveSpeedPx = 2;
1048                                break;
1049                            case "quick":
1050                                speed = 3;
1051                                moveSpeedPx = 2;
1052                                break;
1053                            case "quickly":
1054                                speed = 3;
1055                                moveSpeedPx = 5;
1056                                break;
1057                        }
1058                        break;
1059                    case 'single':
1060                        switch (O.speed) {
1061                            case "slowly":
1062                                speed = 5000;
1063                                break;
1064                            case "slow":
1065                                speed = 4000;
1066                                break;
1067                            case "normal":
1068                                speed = 3000;
1069                                break;
1070                            case "quick":
1071                                speed = 2000;
1072                                break;
1073                            case "quickly":
1074                                speed = 1000;
1075                                break;
1076                        }
1077                        break;
1078                }
1079                var _this = $(this),
1080                    movepx = 0,
1081                    times = null,
1082                    thisPar = _this.parent(),
1083                    thisParH = thisPar.height(),
1084                    thisParW = thisPar.width(),
1085                    firstChild = _this.children().first(),
1086                    thisW = null,
1087                    thisH = null;
1088                if (O.axis == "top" || O.axis == "bottom") {
1089                    thisH = _this.height();
1090                } else if (O.axis == "left" || O.axis == "right") {
1091                    if (_this.hasClass('pic-text-list-module')) {
1092                        _this.addClass('pic-text-list-module-moveL');
1093                        // if(_this.hasClass('pic-text-list-module-1')){
1094                        var liw = firstChild.find("li").width();
1095                        firstChild.find("li").width(liw);
1096                        // firstChild.find("li").width(thisParW);
1097                        // }
1098                        var li_w = 0;
1099                        firstChild.find("li").each(function () {
1100                            li_w += $(this).outerWidth();
1101                        });
1102                        firstChild.width(li_w);
1103                    }
1104                    thisW = firstChild.width();
1105                    _this.width(firstChild.width() * 2 + 10);
1106                }
1107                var clone = $(firstChild.clone());
1108                //向上
1109                if (O.axis == "top") {
1110                    movepx = 0;
1111                    _this.append(clone);
1112                    times = setTimeout(moveT, speed);
1113                    _this.bind("mouseleave", function () {
1114                        times = setTimeout(moveT, speed);
1115                    });
1116                    _this.bind("mouseenter", function () {
1117                        clearTimeout(times);
1118                    });
1119                }
1120                //向下
1121                if (O.axis == "bottom") {
1122                    movepx = -(thisH + (thisH - thisParH));
1123                    _this.css({
1124                        "margin-top": -thisH
1125                    }).append(clone);
1126                    times = setTimeout(moveB, speed);
1127                    _this.bind("mouseleave", function () {
1128                        times = setTimeout(moveB, speed);
1129                    });
1130                    _this.bind("mouseenter", function () {
1131                        clearTimeout(times);
1132                    });
1133                }
1134                //向左
1135                if (O.axis == "left") {
1136                    movepx = 0;
1137                    _this.css({
1138                        "margin-left": 0
1139                    }).append(clone);
1140                    // times = setInterval(moveL, speed);
1141                    times = setTimeout(moveL, speed);
1142                    _this.bind("mouseleave", function () {
1143                        times = setTimeout(moveL, speed);
1144                    });
1145                    _this.bind("mouseenter", function () {
1146                        clearTimeout(times);
1147                    });
1148                }
1149                //向右
1150                if (O.axis == "right") {
1151                    movepx = -(thisW);
1152                    _this.css({
1153                        "margin-left": movepx
1154                    }).append(clone);
1155                    times = setTimeout(moveR, speed);
1156                    _this.bind("mouseleave", function () {
1157                        times = setTimeout(moveR, speed);
1158                    });
1159                    _this.bind("mouseenter", function () {
1160                        clearTimeout(times);
1161                    });
1162                }
1163
1164                //下移动函数
1165                function moveB() {
1166                    clearTimeout(times);
1167                    if (thisH != firstChild.height()) {
1168                        thisH = firstChild.height();
1169                    }
1170                    var mt = parseInt(_this.css("margin-top"));
1171                    var itemH = firstChild.children().outerHeight();
1172                    if (O.type == "flow") {
1173                        if (mt < 0) {
1174                            _this.css("margin-top", movepx);
1175                            movepx+=moveSpeedPx;
1176                        } else {
1177                            movepx = -thisH;
1178                            _this.css("margin-top", movepx);
1179                        }
1180                    } else if (O.type == "single") {
1181                        if (mt < 0) {
1182                            _this.animate({
1183                                "margin-top": mt + itemH
1184                            }, 500);
1185                        } else {
1186                            _this.css("margin-top", -thisH);
1187                            _this.animate({
1188                                "margin-top": -(thisH - itemH)
1189                            }, 500);
1190                        }
1191                    }
1192                    times = setTimeout(moveB, speed);
1193                }
1194
1195                //上移动函数
1196                function moveT() {
1197                    clearTimeout(times);
1198                    if (thisH != firstChild.height()) {
1199                        thisH = firstChild.height();
1200                    }
1201                    var itemH = firstChild.children().outerHeight();
1202                    var mt = Math.abs(parseInt(_this.css("margin-top")));
1203                    if (O.type == "single") {
1204                        if (mt < thisH) {
1205                            _this.animate({
1206                                "margin-top": -(mt + itemH)
1207                            }, 500);
1208                        } else {
1209                            _this.css("margin-top", 0);
1210                            _this.animate({
1211                                "margin-top": -(itemH)
1212                            }, 500);
1213                        }
1214                    } else if (O.type == "flow") {
1215                        if (mt < thisH) {
1216                            _this.css("margin-top", -movepx);
1217                            movepx+=moveSpeedPx;
1218                        } else {
1219                            movepx = 0;
1220                            _this.css("margin-top", -movepx);
1221                        }
1222                    }
1223                    times = setTimeout(moveT, speed);
1224                }
1225
1226                //左移动
1227                function moveL() {
1228                    clearTimeout(times);
1229                    if (thisParW != _this.parent().width()) {
1230                        if (_this.hasClass("proListmodule_1")) {
1231                            thisParW = _this.parent().width();
1232                            firstChild.children().width(thisParW);
1233                            clone.remove();
1234                            clone = $(firstChild.clone());
1235                            _this.css({
1236                                "margin-left": 0
1237                            }).append(clone);
1238                            thisW = firstChild.width();
1239                            _this.width(firstChild.width() * 2);
1240                        }
1241                    }
1242                    var itemW = firstChild.children().outerWidth();
1243                    var ml = Math.abs(parseInt(_this.css("margin-left")));
1244                    if (O.type == "single") {
1245                        if (ml < thisW) {
1246                            _this.animate({
1247                                "margin-left": -(ml + itemW)
1248                            }, 500);
1249                        } else {
1250                            _this.css("margin-left", 0);
1251                            _this.animate({
1252                                "margin-left": -(itemW)
1253                            }, 500);
1254                        }
1255                    } else if (O.type == "flow") {
1256                        if (ml < thisW) {
1257                            _this.css("margin-left", -movepx);
1258                            if(O.speed)
1259                            movepx+=moveSpeedPx;
1260                        } else {
1261                            movepx = moveSpeedPx*2;
1262                            _this.css("margin-left", -movepx);
1263                        }
1264                    }
1265                    times = setTimeout(moveL, speed);
1266                }
1267
1268                //右移动
1269                function moveR() {
1270                    clearTimeout(times);
1271                    if (thisParW != _this.parent().width()) {
1272                        if (_this.hasClass("pic-text-list-module-1") || _this.hasClass("pic-text-list-module-2")) {
1273                            thisParW = _this.parent().width();
1274                            firstChild.children().width(thisParW);
1275                            clone.remove();
1276                            clone = $(firstChild.clone());
1277                            _this.css({
1278                                "margin-left": -firstChild.width()
1279                            }).append(clone);
1280                            thisW = firstChild.width();
1281                            _this.width(firstChild.width() * 2);
1282                        }
1283                    }
1284                    var itemW = firstChild.children().outerWidth();
1285                    var ml = parseInt(_this.css("margin-left"));
1286                    if (O.type == "single") {
1287                        if (ml < 0) {
1288                            _this.animate({
1289                                "margin-left": ml + itemW
1290                            }, 500);
1291                        } else {
1292                            _this.css("margin-left", -thisW);
1293                            _this.animate({
1294                                "margin-left": -(thisW - itemW)
1295                            }, 500);
1296                        }
1297                    } else if (O.type == "flow") {
1298                        if (ml < 0) {
1299                            _this.css("margin-left", movepx);
1300                            movepx+=moveSpeedPx;
1301                        } else {
1302                            movepx = -thisW+(moveSpeedPx*2);
1303                            _this.css("margin-left", movepx);
1304                        }
1305                    }
1306                    times = setTimeout(moveR, speed);
1307                }
1308
1309            });
1310        }
1311    });
1312})(jQuery);
1313/*
1314* 模块中的页码jquery插件
1315* */
1316(function($) {
1317    function Page(options) {
1318        this.config = {
1319            skin: 'skin-1',
1320            dataTotal: 5,
1321            pageDataNum: 5,
1322            curPage: 1,
1323            pagepageGroups: 1,
1324            skip: false,
1325            hash: false,
1326            callBack: null
1327        };
1328        this.config = $.extend(this.config, options);
1329        this.render(true);
1330    }
1331    //分页视图
1332    Page.prototype.view = function() {
1333        var that = this,
1334            conf = that.config,
1335            view = [],
1336            dict = {},
1337            hostNameHref,
1338            hash = location.hash,
1339            reg,
1340            search = location.search;
1341        if(search){
1342            if(search.indexOf('?p_m_page') === 0){
1343                reg = /\?p_m_page=(\d+)-(\d+)/g;
1344            }else if(search.indexOf('&p_m_page') > 0){
1345                reg = /&p_m_page=(\d+)-(\d+)/g;
1346            }
1347            search = search.replace(reg, '');
1348        }
1349
1350        hostNameHref = location.pathname + search + (search ? '&' : '?');
1351        conf.prev = $weisiteLa.pagePrev;
1352        conf.next = $weisiteLa.pageNext;
1353
1354        if (conf.pageSum <= 1) {
1355            return '';
1356        }
1357        if (conf.pageGroups > conf.pageSum) {
1358            conf.pageGroups = conf.pageSum;
1359        }
1360
1361        //计算当前组
1362        dict.index = Math.ceil((conf.curPage + ((conf.pageGroups > 1 && conf.pageGroups !== conf.pageSum) ? 1 : 0)) / (conf.pageGroups === 0 ? 1 : conf.pageGroups));
1363        //当前页非首页,则输出上一页
1364        if (conf.curPage > 1) {
1365            view.push('<a href="' + hostNameHref + 'p_m_page=' + conf.mId + '-' + (conf.curPage - 1) + '#Mo_' + conf.mId + '" class="page-prev" data-page="' + (conf.curPage - 1) + '">' + conf.prev + '</a>');
1366        } else {
1367            view.push('<span class="page-prev disabled">' + conf.prev + '</span>');
1368        }
1369        //当前组非首组,则输出首页
1370        if (dict.index > 1 && conf.pageGroups !== 0) {
1371            view.push('<a href="' + hostNameHref + 'p_m_page=' + conf.mId + '-1#Mo_' + conf.mId + '"  class="page-noitem" data-page="1">1</a><b class="page-ellipsis">&#x2026;</b>');
1372        }
1373        //输出当前页组
1374        dict.poor = Math.floor((conf.pageGroups - 1) / 2);
1375        dict.start = dict.index > 1 ? conf.curPage - dict.poor : 1;
1376        dict.end = dict.index > 1 ? (function() {
1377            var max = conf.curPage + (conf.pageGroups - dict.poor - 1);
1378            return max > conf.pageSum ? conf.pageSum : max;
1379        }()) : conf.pageGroups;
1380        if (dict.end - dict.start < conf.pageGroups - 1) { //最后一组状态
1381            dict.start = dict.end - conf.pageGroups + 1;
1382        }
1383        for (; dict.start <= dict.end; dict.start++) {
1384            if (dict.start === conf.curPage) {
1385                view.push('<strong class="page-curPageent page-noitem">' + dict.start + '</strong>');
1386            } else {
1387                view.push('<a href="' + hostNameHref + 'p_m_page=' + conf.mId + '-' + dict.start + '#Mo_' + conf.mId + '" class="page-noitem" data-page="' + dict.start + '">' + dict.start + '</a>');
1388            }
1389        }
1390
1391        //总页数大于连续分页数,且当前组最大页小于总页,输出尾页
1392        if (conf.pageSum > conf.pageGroups && dict.end < conf.pageSum && conf.pageGroups !== 0) {
1393            view.push('<b class="page-ellipsis">&#x2026;</b><a href="javascript:;" class="page-noitem"  data-page="' + conf.pageSum + '">' + conf.pageSum + '</a>');
1394        }
1395        //当前页不为尾页时,输出下一页
1396        dict.flow = !conf.prev && conf.pageGroups === 0;
1397        if (conf.curPage !== conf.pageSum || dict.flow) {
1398            view.push((function() {
1399                return (dict.flow && conf.curPage === conf.pageSum) ?
1400                    '<span class="layui-laypage-nomore" title="&#x5DF2;&#x6CA1;&#x6709;&#x66F4;&#x591A;">' + conf.next + '</span>' :
1401                    '<a href="' + hostNameHref + 'p_m_page=' + conf.mId + '-' + (conf.curPage + 1) + '#Mo_' + conf.mId + '"  class="page-next" data-page="' + (conf.curPage + 1) + '">' + conf.next + '</a>';
1402            }()));
1403        } else {
1404            view.push('<span class="page-next disabled">' + conf.next + '</span>');
1405        }
1406        view.push('<small class="page-sum">'+$weisiteLa.pageTotal.split("$")[0]+'<em>' + conf.pageSum + '</em>'+$weisiteLa.pageTotal.split("$")[1]+'</small>');
1407        return '<div class="inner page-' + (conf.skin ? (function(skin) {
1408            return /^#/.test(skin) ? 'molv' : skin;
1409        }(conf.skin)) : 'default') + '" id="layui-laypage-' + that.config.item + '">' + view.join('') + function() {
1410            return conf.skip ?
1411                '<div class="page-form">'+$weisiteLa.pageGo.split("$")[0]+'<input class="page-num-input" type="number" min="1" max="' + conf.pageSum + '" value="' + conf.curPage + '">
1411'+$weisiteLa.pageGo.split("$")[1]+'<em class="page-enter-btn"><s>'+$weisiteLa.pageEnter+'</s></em></div>' : '';
1412        }() + '</div>';
1413    };
1414
1415    //跳页
1416    Page.prototype.callBack = function(elem) {
1417        if (!elem) return;
1418        var that = this,
1419            conf = that.config;
1420        !elem.data('bindevent') && elem.on({
1421            click: function() {
1422                var $this = $(this),
1423                    curPage = null;
1424                switch (true) {
1425                    case ($this.hasClass('page-noitem') || $this.hasClass('page-prev') || $this.hasClass('page-next')):
1426                        curPage = $this.attr('data-page') | 0;
1427                        conf.curPage = curPage;
1428                        that.render();
1429                        break;
1430                    case $this.hasClass('page-enter-btn'):
1431                        curPage = elem.find('input.page-num-input').val().replace(/\s|\D/g, '') | 0;
1432                        curPage > conf.pageSum && (curPage = conf.pageSum);
1433                        if (curPage && curPage <= conf.pageSum) {
1434                            conf.curPage = curPage;
1435                            that.render();
1436                        }
1437                        break;
1438                }
1439                return false;
1440            }
1441        }, 'a,em').data('click', 1);
1442    };
1443    //渲染分页
1444    Page.prototype.render = function(load) {
1445        var that = this,
1446            conf = that.config,
1447            view = that.view();
1448        conf.eleDom.html(view);
1449        conf.eleDom.data('click') && conf.callBack && conf.callBack(conf, load);
1450        !conf.eleDom.data('click') && that.callBack(conf.eleDom);
1451        if (conf.hash && !load) {
1452            location.hash = '!' + conf.hash + '=' + conf.curPage;
1453        }
1454    };
1455    $.fn.extend({
1456        pagination: function(options) {
1457            options.eleDom = $(this);
1458            options.pageSum = Math.ceil(options.dataTotal / options.pageDataNum);
1459            options.curPage > options.pageSum && (options.curPage = options.pageSum);
1460            var page = new Page(options);
1461        }
1462    });
1463})(jQuery);
1464/*
1465* 关于滚动数字jquery countUp插件
1466* */
1467(function ($) {
1468    //自执行方法,用来兼容requestAnimationFrame方法
1469    (function () {
1470        var lastTime = 0;
1471        var vendors = ['webkit', 'moz', 'ms', 'o'];
1472        for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
1473            window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
1474            window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
1475        }
1476        if (!window.requestAnimationFrame) {
1477            window.requestAnimationFrame = function (callback, element) {
1478                var currTime = new Date().getTime();
1479                var timeToCall = Math.max(0, 16 - (currTime - lastTime));
1480                var id = window.setTimeout(function () {
1481                    callback(currTime + timeToCall);
1482                }, timeToCall);
1483                lastTime = currTime + timeToCall;
1484                return id;
1485            };
1486        }
1487        if (!window.cancelAnimationFrame) {
1488            window.cancelAnimationFrame = function (id) {
1489                clearTimeout(id);
1490            };
1491        }
1492    }());
1493    /*定义CountUp对象*/
1494    function CountUp(j_) {
1495        var self = this;
1496        // default options
1497        self.options = $.extend({
1498            target: null,
1499            startVal: 0,
1500            endVal: 100,
1501            decimals: 0,
1502            duration: 2,
1503            grouping: true, // 1,000,000 vs 1000000  是否开启千进制分组
1504            separator: ',', // character to use as a separator
1505            decimal: '.', // character to use as a decimal
1506            easingFn: 'easeOut', // optional custom easing function, default is Robert Penner's easeOutExpo
1507            prefix: '', // optional text before the result
1508            suffix: '', // optional text after the result
1509            numerals: [], // optionally pass an array of custom numerals for 0-9,
1510            startCallback: null,
1511            runCallback: null,
1512            endCallback: null
1513        }, j_);
1514    }
1515    CountUp.prototype = {
1516        constructor: CountUp,
1517        version: '1.0.0',
1518        formatNumber: function (num) {
1519            var self = this,
1520                j = self.options,
1521                neg = (num < 0),
1522                x, x1, x2, x3, i, len;
1523            num = Math.abs(num).toFixed(j.decimals);
1524            num += '';
1525            x = num.split('.');
1526            x1 = x[0];
1527            x2 = x.length > 1 ? j.decimal + x[1] : '';
1528            if (j.grouping) {
1529                x3 = '';
1530                for (i = 0, len = x1.length; i < len; ++i) {
1531                    if (i !== 0 && ((i % 3) === 0)) {
1532                        x3 = j.separator + x3;
1533                    }
1534                    x3 = x1[len - i - 1] + x3;
1535                }
1536                x1 = x3;
1537            }
1538            // optional numeral substitution
1539            if (j.numerals.length) {
1540                x1 = x1.replace(/[0-9]/g, function (w) {
1541                    return j.numerals[+w];
1542                });
1543                x2 = x2.replace(/[0-9]/g, function (w) {
1544                    return j.numerals[+w];
1545                });
1546            }
1547            return (neg ? '-' : '') + j.prefix + x1 + x2 + j.suffix;
1548        },
1549        // Robert Penner's easeOutExpo
1550        easeOut: function (t, b, c, d) {
1551            return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
1552        },
1553        ensureNumber: function (n) {
1554            return (typeof n === 'number' && !isNaN(n));
1555        },
1556        initialize: function () {
1557            var self = this,
1558                j = self.options;
1559            if (self.initialized) {
1560                return true
1561            }
1562            self.error = '';
1563            if (!j.target.length) {
1564                self.error = '[CountUp] target is null or undefined';
1565                return false;
1566            }
1567            if (self.ensureNumber(j.startVal) && self.ensureNumber(j.endVal)) {
1568                j.decimals = Math.max(0, j.decimals || 0);
1569                self.dec = Math.pow(10, j.decimals);
1570                j.duration = j.duration * 1000 || 2000;
1571                self.countDown = (j.startVal > j.endVal);
1572                self.frameVal = j.startVal;
1573                return self.initialized = true;
1574            } else {
1575                self.error = '[CountUp] startVal (' + j.startVal + ') or endVal (' + j.endVal + ') is not a number';
1576                return false;
1577            }
1578        },
1579        // Print value to target
1580        printValue: function (value) {
1581            var self = this,
1582                j = self.options;
1583            j.runCallback && j.runCallback(value);
1584            result = self.formatNumber(value);
1585            if (j.target[0].tagName.toLocaleLowerCase() === 'input') {
1586                j.target.val(result);
1587            } else {
1588                j.target.html(result);
1589            }
1590        },
1591        count: function (timestamp) {
1592            var self = this,
1593                j = self.options;
1594            if (!self.startTime) {
1595                self.startTime = timestamp;
1596            }
1597            self.timestamp = timestamp;
1598            var progress = timestamp - self.startTime;
1599            self.remaining = j.duration - progress;
1600            // to ease or not to ease
1601            if (j.easingFn) {
1602                if (self.countDown) {
1603                    self.frameVal = j.startVal - self[j.easingFn](progress, 0, j.startVal - j.endVal, j.duration);
1604                } else {
1605                    self.frameVal = self[j.easingFn](progress, j.startVal, j.endVal - j.startVal, j.duration);
1606                }
1607            } else {
1608                if (self.countDown) {
1609                    self.frameVal = j.startVal - ((j.startVal - j.endVal) * (progress / j.duration));
1610                } else {
1611                    self.frameVal = j.startVal + (j.endVal - j.startVal) * (progress / j.duration);
1612                }
1613            }
1614
1615            // don't go past endVal since progress can exceed duration in the last frame
1616            if (self.countDown) {
1617                self.frameVal = (self.frameVal < j.endVal) ? j.endVal : self.frameVal;
1618            } else {
1619                self.frameVal = (self.frameVal > j.endVal) ? j.endVal : self.frameVal;
1620            }
1621
1622            // decimal
1623            self.frameVal = Math.round(self.frameVal * self.dec) / self.dec;
1624
1625            // format and print value
1626            self.printValue(self.frameVal);
1627
1628            // whether to continue
1629            if (progress < j.duration) {
1630                self.rAF = requestAnimationFrame(function () {
1631                    self.count(arguments[0]);
1632                });
1633            } else {
1634                j.endCallback && j.endCallback();
1635            }
1636        },
1637        // start your animation
1638        start: function () {
1639            var self = this,
1640                j = self.options;
1641            if (!self.initialize()) {
1642                return;
1643            }
1644            j.startCallback && j.startCallback();
1645            self.rAF = requestAnimationFrame(function () {
1646                self.count(arguments[0]);
1647            });
1648        },
1649        // toggles pause/resume animation
1650        pauseResume: function () {
1651            var self = this,
1652                j = self.options;
1653            if (!self.paused) {
1654                self.paused = true;
1655                cancelAnimationFrame(self.rAF);
1656            } else {
1657                self.paused = false;
1658                delete self.startTime;
1659                j.duration = self.remaining;
1660                j.startVal = self.frameVal;
1661                requestAnimationFrame(function () {
1662                    self.count(arguments[0]);
1663                });
1664            }
1665        },
1666        // reset to startVal so animation can be run again
1667        reset: function () {
1668            var self = this,
1669                j = self.options;
1670            self.paused = false;
1671            delete self.startTime;
1672            self.initialized = false;
1673            if (self.initialize()) {
1674                cancelAnimationFrame(self.rAF);
1675                self.printValue(j.startVal);
1676            }
1677        },
1678        // pass a new endVal and start animation
1679        update: function (newEndVal) {
1680            var self = this,
1681                j = self.options;
1682            if (!self.initialize()){
1683                return;
1684            }
1685            if (!self.ensureNumber(newEndVal)) {
1686                self.error = '[CountUp] update() - new endVal is not a number: ' + newEndVal;
1687                return;
1688            }
1689            self.error = '';
1690            if (newEndVal === self.frameVal){
1691                return;
1692            }
1693            cancelAnimationFrame(self.rAF);
1694            self.paused = false;
1695            delete self.startTime;
1696            j.startVal = self.frameVal;
1697            j.endVal = newEndVal;
1698            self.countDown = (j.startVal > j.endVal);
1699            self.rAF = requestAnimationFrame(function () {
1700                self.count(arguments[0]);
1701            });
1702        }
1703    };
1704    $.fn.extend({
1705        countUp: function (j) {
1706            if (j.target.length) {
1707                this.data('countup', new CountUp(j));
1708            } else {
1709                console.log('没找到对象');
1710            }
1711        }
1712    });
1713}(jQuery));
1714
1715// swf定义一个网站全局的对象,用来存储前台网站的各个方法。是webSiteFunction
1716wsf = {};
1717wsf.pDom = {};
1718wsf.f = { //功能性函数
1719    s_j: function (st) { //字符串转换成json
1720        var j;
1721        if (!!st) {
1722            j = "{" + st + "}";
1723            j = eval('(' + j + ')');
1724            return j;
1725        } else {
1726            j = {};
1727            return j;
1728        }
1729    },
1730    j_s: function (j) { //将json转换成字符串
1731        var x = [];
1732        for (var i in j) {
1733            x.push(i + ":" + j[i]);
1734        }
1735        return x.join(",");
1736    },
1737    addLoadingWait: function (o) { //添加loadingWait
1738        o = o ? o : $('body');
1739        var w = o.width(),
1740            h = o.height();
1741        var loading = $('<div class="loading-wait" style="width:' + w + 'px; height:' + h + 'px;"></div>');
1742        o.append(loading);
1743    },
1744    alertWindow: function (text, icon, times) {
1745        var icons = ['warn', 'error', 'right', 'load'];
1746        icons = isNaN(parseInt(icon)) ? icon : icons[icon];
1747        return window.$.popup({
1748            // addTarget: parWin.Ev.pubVar.winDocum.find("body"),
1749            type: 1,
1750            animate: {
1751                type: 1,
1752                target: 1
1753            },
1754            head: {
1755                yes: 0
1756            },
1757            opBut: {
1758                yes: 0
1759            },
1760            autoClose: {
1761                yes: times === 'infinite' ? 0 : 1,
1762                time: times ? times : 1.5
1763            },
1764            but: {
1765                yes: 0
1766            },
1767            con: {
1768                text: [1, text],
1769                img: [1, icons]
1770            }
1771        });
1772    },
1773    confirmWindow: function (text, icon, efun, rfun) {
1774        return $.popup({
1775            type: 2,
1776            animate: {
1777                type: 1
1778            },
1779            cName: "evPopupWhite",
1780            area: {
1781                w: 300
1782            },
1783            con: {
1784                text: [1, text],
1785                img: [1, icon]
1786            },
1787            but: {
1788                yes: 1,
1789                button: {
1790                    but_1: {
1791                        text: $weisiteLa.QueDing,
1792                        fun: function () {
1793                            efun && efun();
1794                        }
1795                    },
1796                    but_2: {
1797                        text: $weisiteLa.QuXiao,
1798                        fun: function () {
1799                            rfun && rfun();
1800                        }
1801                    }
1802                }
1803            }
1804        });
1805    },
1806    openWin: function (tit, url, w, h) {
1807        w = w ? w : 600;
1808        h = h ? h : 500;
1809        var popups = $.popup({
1810            cName: "evPopupOpacity",
1811            type: 5,
1812            area: {
1813                w: w,
1814                h: h
1815            },
1816            head: {
1817                text: tit
1818            },
1819            animate: {
1820                type: 1
1821            },
1822            con: {
1823                src: url
1824            }
1825        });
1826        return {
1827            w: $("#popupIframe_" + popups),
1828            n: popups
1829        };
1830    },
1831    showWXCode: function (src) {
1832        var popups = $.popup({
1833            cName: "evPopupWhite",
1834            type: 4,
1835            area: {
1836                w: 'auto',
1837                h: 'auto'
1838            },
1839            head: {
1840                yes: 0
1841            },
1842            animate: {
1843                type: 1
1844            },
1845            con: {
1846                html: '<div class="show-wx-code">
1846<div class="wx-code-img"><img src="'+src+'" /></div><p>微信扫一扫</p></div>'
1847            }
1848        });
1849        /*return {
1850            w: $("#popupIframe_" + popups),
1851            n: popups
1852        };*/
1853    },
1854    reg: {
1855        phoneTelDigit: function (v) {
1856            var reg = /((^(\+86|86)?[0]?1[3578]\d{9})|(^\d{3,4}\-\d{7,8})|(^\d{3,4}\-\d{7,8})\-\d{1,4})$/;
1857            var z = reg.test(v);
1858            return z;
1859        }
1860    },
1861    tip: {
1862        tipDom: null,
1863        addTip: function(j){
1864            if(!j.getDom.data('tip')){
1865                j.getDom.data('tip',1);
1866                var that = this,
1867                    getOffset = j.getDom.offset(),
1868                    getWidth = j.getDom.outerWidth(),
1869                    getHeigght = j.getDom.outerHeight(),
1870                    movetop = null,
1871                    top = null, movetop = null;
1872                that.tipDom = $('<div class="tip" id="tip"><em class="arrow"></em></div>');
1873                j.img && that.tipDom.append('<div class="tip-img"><img src="'+j.img+'" /></div>');
1874                j.text && that.tipDom.append('<p class="tip-text">' + j.text + '</p>');
1875                j.html && that.tipDom.append(j.html);
1876                wsf.pDom.bodyDom.append(that.tipDom);
1877                that.tipDom.css({
1878                    display: 'block',
1879                    opacity: 0,
1880                    left: getOffset.left - (that.tipDom.outerWidth() - getWidth) / 2 + 'px'
1881                });
1882                if(getOffset.top - $(document).scrollTop() > that.tipDom.outerHeight()){
1883                    top = getOffset.top - that.tipDom.outerHeight();
1884                    movetop = -30;
1885                    that.tipDom.removeClass('bottom').addClass('top');
1886                }else{
1887                    top = getOffset.top + getHeigght;
1888                    movetop = 30;
1889                    that.tipDom.removeClass('top').addClass('bottom');
1890                }
1891                that.tipDom.css({
1892                    top: (top + movetop) + 'px'
1893                }).animate({
1894                    top: top + 'px',
1895                    opacity: 1
1896                });
1897            }
1898        },
1899        delTip: function(j){
1900            var that = this;
1901            that.tipDom && that.tipDom.remove();
1902            j.getDom.removeData('tip');
1903        }
1904    },
1905    upJsFun: function (curDom) {
1906        var getDom = null;
1907        switch(true){
1908            case curDom.hasClass('customModule'):
1909                getDom = curDom.find('.MoBodyC > div');
1910                break;
1911            case curDom.hasClass('ev-module-edit'):
1912                getDom = curDom.find('.ev-module-edit-box > div');
1913                break;
1914        }
1915        if(getDom && getDom.length){
1916            switch(true){
1917                // newMo
1918                case getDom.hasClass('ev-pic'):
1919                case getDom.hasClass('ev-icon-pic'):
1920                    wsf.f.imgLazyLoading(curDom);
1921                    break;
1922                case getDom.hasClass('ev-banner-module'):
1923                    wsf.banner3D.init(getDom);
1924                    break;
1925                case getDom.hasClass('ev-albums-module'):
1926                        wsf.textListModule(getDom);
1927                        wsf.albums(getDom);
1928                        wsf.f.imgLazyLoading(curDom);
1929                    break;
1930                case getDom.hasClass('ev-search-module'):
1931                    wsf.evSearch.load(getDom);
1932                    break;
1933                // oldmo
1934                case getDom.hasClass('text-list-module'):
1935                    setTimeout(function () {
1936                        wsf.textListModule(getDom);
1937                        wsf.moveModule(getDom);
1938                        wsf.f.imgLazyLoading(curDom);
1939                    }, 100);
1940                    break;
1941                case getDom.hasClass('pic-text-module'):
1942                    wsf.f.imgLazyLoading(curDom);
1943                    break;
1944                case getDom.hasClass('focus-pic-module'):
1945                    wsf.focusPicModule(curDom.find('.mo').attr('id'));
1946                    break;
1947                case getDom.hasClass('pic-text-list-module'):
1948                    setTimeout(function () {
1949                        wsf.textListModule(getDom);
1950                        wsf.moveModule(getDom);
1951                        wsf.sysDoc(curDom.find('.ev-sys-doc-module'));
1952                        wsf.f.imgLazyLoading(curDom);
1953                    }, 100);
1954                    break;
1955                case getDom.hasClass('form-module'):
1956                    if(arguments[1]){
1957                        wsf.formModule.submit_verify(curDom.find('form'), arguments[1]);
1958                        wsf.formModule.defaultValVerify(getDom);
1959                    }
1960                    break;
1961                case getDom.hasClass('video-module'):
1962                    setTimeout(function () {
1963                        wsf.videoModule(getDom);
1964                    }, 100);
1965                    break;
1966                case getDom.hasClass('catalogList'):
1967                    setTimeout(function () {
1968                        wsf.catalogList(getDom);
1969                    }, 100);
1970                    break;
1971                case getDom.hasClass('menu-catalog-module'):
1972                    setTimeout(function () {
1973                        wsf.menuCatalogModule(getDom);
1974                        wsf.f.imgLazyLoading(curDom);
1975                    }, 100);
1976                    break;
1977                case getDom.hasClass('pic-module'):
1978                    wsf.f.imgLazyLoading(curDom);
1979                    break;
1980            }
1981        }
1982    },
1983    annimationLoadMo: function (dom) {
1984        if (dom.attr('data-loadanimate') != 1) {
1985            dom.data('loadanimate', 1);
1986            var v = {
1987                'dom': dom,
1988                'st': dom.attr('style') || '',
1989                'aName': dom.data('animate-name'),
1990                'aDelay': dom.data('animate-delay'),
1991                'aDuration': dom.data('animate-duration')
1992            };
1993            if (v.aName) {
1994                v.dom.addClass('animated ' + v.aName).css({
1995                    'animation-delay': v.aDelay,
1996                    'animation-duration': v.aDuration
1997                });
1998                setTimeout(function () {
1999                    v.dom.removeClass('load-animate');
2000                }, v.aDelay.slice(0, v.aDelay.length - 1) * 1000 + 30);
2001                setTimeout(function () {
2002                    v.dom.attr('style', v.st).removeClass('animated ' + v.aName);
2003                    dom.hasClass('ev-module-edit-box') && wsf.f.progressLoading(dom);
2004                    // 关于视频的加载
2005                    dom.hasClass('customModule') && (function(){
2006                        var videoModule = dom.find('div.video-module');
2007                        if(videoModule.length){
2008                            wsf.videoModule(videoModule);
2009                        }
2010                    })();
2011                    wsf.f.imgLazyLoading(v.dom);
2012                    v.dom.find('.ev-module-edit-box,.customModule').each(function (i, dom) {
2013                        dom = $(dom);
2014                        dom.hasClass('ev-module-edit-box') && wsf.f.progressLoading(dom);
2015                        // 关于视频的加载
2016                        dom.hasClass('customModule') && (function(){
2017                            var videoModule = dom.find('div.video-module');
2018                            if(videoModule.length){
2019                                wsf.videoModule(videoModule);
2020                            }
2021                        })();
2022                        wsf.f.annimationLoadMo(dom);
2023                    });
2024                }, v.aDelay.slice(0, v.aDelay.length - 1) * 1000 + v.aDuration.slice(0, v.aDuration.length - 1) * 1000 + 1);
2025            }
2026        }
2027    },
2028    imgLazyLoading: function(curDom){
2029        curDom.find('.lazy-loading').each(function(i, dom){
2030            dom = $(dom);
2031            var oImage = new Image();
2032            oImage.onload = function () {
2033                dom.attr('src', this.src).addClass('lazy-loading-animate');
2034                setTimeout(function(){
2035                    dom.removeClass('lazy-loading lazy-loading-animate');
2036                }, 1000);
2037            };
2038            oImage.src = dom.attr('data-original-src');
2039        });
2040    },
2041    progressLoading: function(curDom){
2042        var progress = curDom.find('div.ev-progress-module');
2043        progress.length && wsf.progress.load(progress.eq(0));
2044    },
2045    positionShow: function (curDom, pos) {
2046        // 计算模块的九个位置
2047        var domW = curDom.width(),
2048            domH = curDom.height(),
2049            posArray = [
2050                [0, 'auto', 'auto', 0, 0, 0],
2051                [0, 'auto', 'auto', '50%', 0, '-' + domW/2 + 'px'],
2052                [0, 0, 'auto', 'auto', 0,  '-' + domW],
2053                ['50%', 'auto', 'auto', 0, '-' + domH/2 + 'px', 0],
2054                ['50%', 'auto', 'auto', '50%', '-' + domH/2 + 'px',  '-' + domW/2 + 'px'],
2055                ['50%', 0, 'auto', 'auto', '-' + domH/2 + 'px', 0],
2056                ['auto', 'auto', 0, 0, 0, 0],
2057                ['auto', 'auto', 0, '50%', 0, '-' + domW/2 + 'px'],
2058                ['auto', 0, 0, 'auto', 0, 0]
2059            ];
2060        curDom.css({
2061            'top': posArray[pos][0],
2062            'right': posArray[pos][1],
2063            'bottom': posArray[pos][2],
2064            'left': posArray[pos][3],
2065            'margin-top': posArray[pos][4],
2066            'margin-left': posArray[pos][5]
2067        });
2068    },
2069    mCScrollbar: function (obj, j) {
2070        if (!obj.data('cscroll')) {
2071            var j_ = {
2072                scrollInertia: 50,
2073                scrollbarPosition: 'outside',
2074                theme: "dark-3",
2075                autoHideScrollbar: false,
2076                mouseWheel: {preventDefault: true},
2077                scrollButtons: {
2078                    enable: false
2079                },
2080                callbacks: {
2081                    onScrollStart: function(){
2082
2083                    },
2084                    onScroll: function(){
2085                        var $this = $(this);
2086                        if(this.mcs.topPct === 100){
2087                            $.scrollify.next();
2088                        }else if(this.mcs.topPct === 0){
2089                            $.scrollify.previous();
2090                        }
2091                    },
2092                    onTotalScroll: function(){
2093                        $.scrollify.next();
2094                    },
2095                    onTotalScrollBack:function(){
2096                        $.scrollify.previous();
2097                    }
2098                }
2099            };
2100            if (j) {
2101                j_ = $.extend(j_, j);
2102            }
2103            obj.mCustomScrollbar(j_);
2104            obj.data('cscroll', 1);
2105        } else {
2106            obj.mCustomScrollbar("update");
2107        }
2108    }
2109};
2110//分享
2111wsf.share = {
2112    shareLayerDom :null,
2113    wechatCode : null,
2114    setwin: function (w, d) {
2115        var iWidth = w; //弹出窗口的宽度;
2116        var iHeight = d; //弹出窗口的高度;
2117        var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置;
2118        var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
2119        return {
2120            iTop: iTop,
2121            iLeft: iLeft
2122        }
2123    },
2124    openWindow: function(getData){
2125        var that = this;
2126        window.open(getData.url,
2127            "newwindow",
2128            "width=" + getData.width + ",height=" + getData.height + ", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no,top=" + that.setwin(getData.width, getData.height).iTop + ",left=" + that.setwin(getData.width, getData.height).iLeft
2129        );
2130    },
2131    bindEvent: function(){
2132        var that = this;
2133        wsf.pDom.bodyDom.on({
2134            'mouseenter.share': function(){
2135                var $this = $(this);
2136                if($this.hasClass('evIcon')){
2137                    var type = $this.data('type'),
2138                        data = $this.closest('.share-list').data();
2139                    switch (type) {
2140                        case 'wechat':
2141                            if(!$this.data('mouseenter')){
2142                                $this.data('mouseenter',1);
2143                                var hostName = location.protocol + '//' + GData.wapDomain,
2144                                    geturl = (data.url && ((data.url).indexOf('vip_') != -1)) ? (data.url).replace(/vip_/, 'wap_') : data.url,
2145                                    div = $('<div class="twoCode"><div class="code-canvas"></div></div>');
2146                                div.find('.code-canvas').qrcode({
2147                                    'text': geturl.indexOf('http') != -1 ? geturl : (hostName + geturl),
2148                                    width: 75,
2149                                    height: 75
2150                                });
2151                                div.append('<p>打开微信扫一扫</p>');
2152                                wsf.f.tip.addTip({getDom: $this.closest('li'), html: div});
2153                            }
2154                            break;
2155                    }
2156                }
2157            },
2158            'mouseleave.share': function(){
2159                var $this = $(this);
2160                if($this.hasClass('evIcon')) {
2161                    var type = $this.data('type');
2162                    switch (type) {
2163                        case 'wechat':
2164                            if($this.data('mouseenter')){
2165                                wsf.f.tip.delTip({getDom:$this.closest('li')});
2166                                $this.removeData('mouseenter');
2167                            }
2168                            break;
2169                    }
2170                }
2171            },
2172            'click.share': function(){
2173                var $this = $(this);
2174                var type = $this.data('type'),
2175                    data = $this.closest('.share-list').data(),
2176                    url = encodeURIComponent(data.url ? (data.url.indexOf('http') != -1 ? data.url : (location.origin + data.url)) : location.href),
2177                    title = encodeURIComponent(data.title || document.title),
2178                    summary = encodeURIComponent(data.summary || $('meta[name="keywords"]').attr('content')),
2179                    pic = encodeURIComponent(data.pic || '');
2180                switch(type){
2181                    case 'weibo':
2182                        that.openWindow({
2183                            url : 'http://service.weibo.com/share/share.php?url='+url+'&title='+title+'&count='+summary+'&pic='+pic+'&searchPic=true',
2184                            width: 650,
2185                            height: 534
2186                        });
2187                        break;
2188                    case 'qzone':
2189                        that.openWindow({
2190                            url : 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+url+'&title='+title+'&site='+url+'&summary='+summary+'&desc='+title+'&pics='+pic,
2191                            width: 650,
2192                            height: 534
2193                        });
2194                        break;
2195                    case 'qq':
2196                        that.openWindow({
2197                            url : 'http://connect.qq.com/widget/shareqq/index.html?url='+url+'&title='+title+'&site='+url+'&summary='+summary+'&desc='+title+'&pics='+pic,
2198                            width: 800,
2199                            height: 680
2200                        });
2201                        break;
2202                    case 'douban':
2203                        that.openWindow({
2204                            url : 'http://www.douban.com/recommend/?url='+url+'&title='+title+'&sel='+summary,
2205                            width: 800,
2206                            height: 680
2207                        });
2208                        break;
2209                    case 'baidu':
2210                        that.openWindow({
2211                            url : 'http://tieba.baidu.com/f/commit/share/openShareApi?url='+url+'&title='+title+'&desc='+summary+'&comment=&pic='+pic,
2212                            width: 630,
2213                            height: 640
2214                        });
2215                        break;
2216                }
2217            }
2218        }, '.share-list .evIcon');
2219    },
2220    createShareLayer : function(clickDom){
2221        var that = this;
2222        that.body = $('body');
2223        if(!that.body.data('sharelayer')){
2224            var listArray = [
2225                ['weibo-3', 'wechat-1', 'qq-9', 'qzone-1', 'baidu-3', 'douban-2'],
2226                [['微博', 'weibo'], ['微信', 'wechat'], ['QQ好友', 'qq'], ['QQ空间', 'qzone'], ['百度', 'baidu'], ['豆瓣', 'douban']]
2227            ],liArray = [];
2228            $.each(listArray[0], function(i, v){
2229                var txtarr = listArray[1][i];
2230                liArray.push('<li class="' + txtarr[1] + '-li"><em class="evIcon evIcon-' + v + '" data-type="' + txtarr[1] + '"></em><b class="icon-name">' + txtarr[0] + '</b></li>');
2231            });
2232            that.shareLayerDom = $('<div class="share-layer" id="shareLayer"><div class="share-layer-inner"><em class="share-layer-arrow em-1"></em><em class="share-layer-arrow em-2"></em><ul class="share-list">' + liArray.join(' ') + '</ul></div></div>');
2233            that.body.data('sharelayer',1).append(that.shareLayerDom);
2234            that.body.on('click.hideshare',function(){
2235                that.shareLayerDom.length && that.shareLayerDom.hide();
2236            });
2237        }
2238        that.shareLayerDom.length && (function(){
2239            var t = clickDom.offset().top,
2240                l = clickDom.offset().left,
2241                shareList = that.shareLayerDom.find('.share-list'),
2242                parentLi = clickDom.closest('li');
2243            if(parentLi.length){
2244                shareList.data({
2245                    'title': parentLi.find('.pic-title a').text() || '',
2246                    'pic': parentLi.find('.pic img').length ? parentLi.find('.pic img').attr('src') : '',
2247                    'url':parentLi.find('.pic-title a').attr('href') || '',
2248                    'summary':parentLi.find('.pic-intro').text() || ''
2249                });
2250            }
2251            that.shareLayerDom.css({
2252                display: 'block',
2253                left: l - (that.shareLayerDom.width() / 2) + clickDom.width()/2 + 'px',
2254                top: t + clickDom.height() + 'px'
2255            });
2256        })();
2257    }
2258};
2259
2260wsf.concern = function(){
2261    $('body').on({
2262        'mouseenter.concern': function(){
2263            var $this = $(this),
2264                type = $this.attr('data-type');
2265            switch(type){
2266                case 'qq':
2267                case 'wechat':
2268                    var concernList = $this.closest('.concern-list'),
2269                        src = concernList.attr('data-' + type);
2270                    if(src){
2271                        img = new Image();
2272                        img.onload = function(){
2273                            wsf.f.tip.addTip({getDom: $this.closest('li'), html: '<div class="twoCode"><div class="code-img"><img src="'+src+'" /></div></div>'});
2274                        };
2275                        img.src = src;
2276                    }
2277                    break;
2278            }
2279        },
2280        'mouseleave.concern': function(){
2281            var $this = $(this);
2282            wsf.f.tip.delTip({getDom:$this.closest('li')});
2283        },
2284        'click.concern':function(){
2285            var $this = $(this),
2286                concernList = $this.closest('.concern-list'),
2287                type = $this.attr('data-type'),
2288                url = null;
2289            switch(type){
2290                case 'weibo':
2291                case 'qzone':
2292                case 'baidu':
2293                    url = concernList.attr('data-' + type);
2294                    url && window.open(concernList.attr('data-' + type), '_blank');
2295                    break;
2296            }
2297        }
2298    }, '.concern-list .evIcon');
2299};
2300wsf.banner3D = {
2301    init: function (obj) {
2302        if (obj) {
2303            $.banner3D(obj);
2304        } else {
2305            //
2306            $('div.ev-banner-module, .customModuleRowGroup').each(function (i, dom) {
2307                dom = $(dom);
2308                dom.is(':visible') && $.banner3D(dom);
2309            });
2310        }
2311    },
2312    canvasLoad: function (curDom) {
2313        canvasArea = curDom.find('.canvas-area');
2314        // canvas动画
2315        switch (curDom.attr('data-canvas-type') * 1) {
2316            case 0:
2317                canvasArea.empty();
2318                break;
2319            case 1:
2320                canvasArea.empty();
2321                canvasArea.canvasRain({
2322                    dir: 4,
2323                    height: 20,
2324                    count: 50
2325                });
2326                break;
2327            case 2:
2328                canvasArea.empty();
2329                canvasArea.html('<canvas speed="1" interaction="false" size="2" count="80" opacity="0.00001" start-color="rgba(253,252,251,.9)" end-color="rgba(251,252,253,0.3)" wind-power="0" image="false"></canvas><canvas speed="3" interaction="true" size="6" count="30" start-color="rgba(253,252,251,.9)" end-color="rgba(251,252,253,0.3)" opacity="0.00001" wind-power="2" image="false"></canvas><canvas speed="3" interaction="true" size="12" count="20" wind-power="-5" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEfCAMAAADMTQtEAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i
232977u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QjY0QUU3MkFEOUNEMTFFNEJFNkRGNjEwRkUwMkZEMTIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QjY0QUU3MkJEOUNEMTFFNEJFNkRGNjEwRkUwMkZEMTIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCNjRBRTcyOEQ5Q0QxMUU0QkU2REY2MTBGRTAyRkQxMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCNjRBRTcyOUQ5Q0QxMUU0QkU2REY2MTBGRTAyRkQxMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PufmcIAAAAAJUExURf7+/v////////Ps+pcAAAADdFJOU//
2329/ANfKDUEAABuGSURBVHja7F0Be+s2DgP8/3/03drEAkhKchI5dbb0u9veq+Y2YSSKBEEQ2+lf/Odr+zd84XRTgcD//8+vsQ7Y6ufr///6F2wvnH8Ecf/fx1sLbziD/xzC38P4NdbQVj92+jEVP/8g4lRb7Q4LPz7ra6zJIbz9419xEM80FsjdVL+e/mus4c768Vi7m+fXWP24Yd9bd7t9jdX92aB7rK/PGt6GvOU69z32NdbwGN79Ff4FGeK5xmqX4W/g8PVZs8wQ9+P48fnO2cbab8LiMvy4jXZyIs17OMqMav18/2us4LVYxln8PId/PvjXoiyq0+IHAqinw8q/Xn7HHfSA/oZfX2NVwemvcfZv4eb++TVWgB9uhxC3nSSeDPgaKySJnh2Shgp+jRW8/C2G+DmH5P3PNwDnaywPt/YvbvKX2y35NVZxIf7iDrc4FW2/fY0VI3mo55Kt9b0Ne2DNLbyiXI/fOCsHD92vd7/jF34nzrFMFTzcoy38Zdxw2+IXMlb23A19uGc+NzTwzB1UZ6o3H8CLGOt+2UkyePdY97rYC6/4+IvovbCn673nGOuWDN69eYO0uC+c66/K6ojA3M99UqcdQy1T7N/Qb+HswlL6BdivYDy3t07ZWVKzvzmJhi23hVP3VUEHoxBUbpn8JYy1B5xsUSiBsHDuGYzW2pFt3rc6L2Es+5KPsnmwEI2udF89pmHb4i2Lv9LO2sHk/QbkHjjEN7jUB1TZgS3c0Mir+KybH+V++bQ7O15Fv7tu3e1SGwtXNRa4bys2o7F9w9/GSprb3Sb5t8jC3WrX8FloIdXuUNVejNHPMq9FuU3C/pWF28u7QiJNqHcyZIYpxtoToJU+oLjubAFPpYhnRYb3mL3dgJCER0piiJnRig+K9+skxRPAC3j2+U0D2DMdA7Qs1F5YE+N+8u3S3WOYe1yKi8RZOehK+OjtbdjCGmtRf8duLEoZoO2xi4J/N+pyAN4tpH7FWLot2yUCAT12uEOcw3ZZY/0msm2fsTGSWsb2AiREzx/0aFOd590ZXAWimdzqtwOxxRIGnwMw7wbwrXUnDGQU5I4Ubdc21rYTHCAf8P2vz+0sMhF0xCg/ZUpSU69XNvG7jQUrigkSgedNxWyslghu1Di0QLmuaiy7+to/bh/6C+fafBAhETGVIAa8hgy921gK2eBeQ3yW8CCAj+xMw4da3nULr146Gdu7zyEagblhEs993juyb7nNfvXBouGcLV7GWAL7STG10SWp6Fb/cIyLsa24bRiC5+/NW71c/8b57kmbwhCZDmPnPovv2wlT1gT16Nm2ejFHOM9YrRcFlOpOsdB5E1QorN4VtSm04tUwxwX51InG2jMLhFw/LQw80rjOeA/aQqC5R55hf21XNdZOUha28h4S2kLnA2f1RB/pU2SUGf5fUtU90WeRrWi/F6eQF4aAmD1Rba2KkdOn7OCqt6F8sArG+0Lv024sEn2i2Frmmpi/q07v1Xba829DCv4e7sjJviqeQEZ+lCFgLHujDpiTfNZc5+0stGuv/UGKBV2sknpj2hPFXUCBi+/Rg5EM93JcyyOfZrKeeRvuMXTghujCIDnOT5TMGEvKd5Y94wLbdfE01HjizlIeFhpDhCOCVqyc+RPFftgvVtw5ASRaeiDte5Sr5ckA9dx0R2LPdv8rThPbNTF+ovBxniZTK1624FjE9cA/SkmF7vHbx5xiBTl18QnUcSl1nUoWEGa0swieQx/e1jRg7CO2iNQ9VVuA7ExZYIFkUBFERgi2s3BtiGYvJGhJGHtJQYvuKjJi1fjqSmi5H0gD2sX7pYXrw8pyUTbe8h5nwBegJDg2jQh2ChYMUMbvR6OesOgRvb6xtDbcfJqkROrUdaGEKPYDKnzMRp0L9w3BF6DlvzKWyT1ghwjGCyirWJZQUZ9AmUJ9mrFadAgrFE8W0Ik3/L+X8lovO9g+xlieokibCucLPTGN5tkEL+v+/u2TjLVjTIFxCsj9xWKBeyDPGM8JngO+Xpu4jLE2K7GaCtJ9Yc9kIry39wAVSbtCYKf0b/zNMXRjeR+wwFJ5Qdji8T60rGYHFz7cWMo9gNfwM4/ZFkCDfEL2nbCg9SqD+BuHVVTDygA9s4UKdm1cCFXoDzWWdM0gEHK7fqa5c7NJ2zTBitSKN7C0ZR3vPn/SwoZ41x0AMZybve1NTV5O3ffp2v2F91rKYBf7xoG3Q6XF3J5RzQP3fmFhRVfCuxrK5ZhoL2sHBBxXQQRH1200W7iqsUh3KkYW9mjhocq6bSvrtsZ04aLGojaL6l+gYwcMMz7Mx4Pt0YYJYrpwSZ9Fa/GVPWW3lqOYx10wBZWGsByg3YzlwhWNpQS1hLqNFnh4b2kgy0ykCcysC9+GVHJRVO2GvI20cHhv7QkPUrus5EnlwuWMlYggAmBKksu8cHhvqaAnNcgvaiQrc2qc4NoZIDivmd5A8GLhkb0lBcG20To78KrG0q0iiUfBC2JeOF7NIxxs7+U0BFf2+a81luZkkNtb2yhaDGAL938e3sLGuuphxWuFSbD2FIoLAUyfABnehGkYPHRrCWzVpAfOz0OWlyKkiDW67BDBv+N3olRr2UgNb9Diwmr/rlU/Ydt2rrRG729PHEqngVDCfsfeWr2zkqZDn5VtcZa1n892lYUN1ojNj9pZDDpQXUyBjT0VfPXIWFInhZWe8VKp+Y8cvCp0i9sa4FsBuRu857yZ4Nvq7L213MGHbKS3syi8MlAjzC5EQN+xNLqlnM7P2VkurbIju/WJVe7H7AnSQPXG0241+918H2GszbATpkC0CMmM3UIlzlRYhjYStlk+jAv8IGN5AbV2QRROgwLoQvAPzko6OU2IS84wVieDDxjrCb+p3KAWog+A5503609o1MSQMCeIBsXCHxirHalHjKV+qNtXKXBn0z030jvErQstFDHUILdi4e3GUoJBZ8N1eekcgpR28+8FwNBt94N6MQxJpF8Mt/uvWPgLY+WyuhyYivUvHRT9q1xbDiksXOtFVMquBKOU5pJ915v3OstcmKcvLKwl9b8q2DQvM4gvYe7JPFZgirqPCrG/hBbu2BYzjzAH1Bl7/I2hx3o3otchGNHnoK8TIWONQiwiVbpIq2QYj2Q5doNZJYWZs6FkgrizhOY4+lSjknD8GFy1E+kG1CjLHkbYsm/E4JX6ynjnlYMCqL03k4RYtkzatHuIDi8H3v05RPotfQSgFlnXActzYxVn35hVVS49ZReECkZvAd5OAHVQ1YVctPmuDCUQfk9VGEjN2I0anDwCNAmZgZ1VWcYWYCA1gyhI8ZHoQou9FhdZJbEqd1bltEqqkHWwzQDo/YcXFaLU5ES4ykWnAzFEpyDWyanDSliVxm4rlkffgEKVQaOneS2LVXsqDbuRnji9d4QCUuJEAR/jMsqRgbRRIRo5WdtTwIyv28I0h+y0aGn3GIX+XgJbdTOsZdpYpUcMP2woKlb5ztokrA7GVax49Gu1u7DKmVJ5Pju8Tm9AIo6vc/FItIA037JxiYNnKjqzhSI6pFxBRr2zRPpMYqDw4i2myLEh8m24amfJFa1xnyXGoDdZUe/0fIKmuZnE4QOOckfKULx2KYuRgedF877hsYmKoSimFncyTC8hvY+xcjE12+304I5oxsPiF1GqqoBYYawAqznS622hQTkVhYKxNktMLIWu/oA4pm7BjZ1uprarIstmlbEQrnLZvL6/PADLYjjWyVbDo0ZSGOQi7MvUAFk8OZeN1BevYit7ZdSyfRjvQtNWlf1EGEuLnsgOTVxBPp6esaZod9mNb34TD9OZDhjL5BT0jJk8UAyOIw4jfd8oL3tRA5nMv+nSHoRgW1ckCauuLZFGLB28ikhYzm/ic1Q2A4uWI0YkQUBfRX8HAdlgYdxUKGWg1VRJbF5mojGnZZ8oCBz+6DsLsrOYulByN3N9E7C/5WbKigyzo7iMCA/1AajuwiTDKlNGVGlOS9KqagwNd+EjqLqf+WAziNeuHVGgKi9sDIOlWjS9HWjLMXy0CNPfKZN1hKgVEBeBWPmUsQLE3i/hnYCVQn8/qr3VjmRu5dIrsVjQrvgouKkLnRJsaQv4pzpE+NV
23295LcOzYiHFKU80VnYLRccLLUrPsHhc6NZ+OsYamNm5AVxLoIS+OssJ9eZKB9T2SLHg6VCkYWVNyTpz7MW18zJXLPAsLVhU6JDSVbTfqsVJKt8UFlBWR1ks5LejTww3zWDDLI7dY8Gi80EiRlmxFzVHBmYzgFmPVqlWWW0aA7Q1Xd2jKH+ceq6u7ux5KYSvLbQD17squinSBmKFcQpMiwAqdENSDK85UznlAyHvS6UwYdSpCpHPeiwW4PS0OLKyOPDG5Osyd4MDHWIWfYj0SfT0iLEKDUwhz5LeAC09fl6bGUxSUnqoP1FchrDckD39Tg7mMDzZsjk0FmKetdlYG3je7f2r7up1oRuDFk9UpxoFB6SOxjpdn4TSORcZS6+3RFy0Xvo8elVCWfFd448lPWFRHCNfDewDe4KYDPbxo+A8JrYyDDAcBhtZaPrcxbdnmHx4ApaNNpQo9YmXAMxIN5I+dHiNsYQllcFjhJFotE5f1QQ+GBUyPOGc5Ba79tXLj/r38ZPPGgvsALisGmis/z02ZR7RTslPtHBLmLzGmzQF00y3qz6nkNavOYZURMuLgIpvtY/G44sgFjx3pcUThrKY/iu9Uh7376DUm4szfNnBSzyUQGLpigjeNS44DXDitVB1ENjg5xiWRYJf41v2Q3wm1mV8DU8Yy9IWD2ViYlOtMKk/TY9i+UTH68W+gVDZ7CNeQRugaK4dFRi7lRV/4yncS3OULIallfGP4Ur1E0DZDyyvwkfv3IZMilxIp9iRb1HtpOFxY2lJBwkSCANDt+7OCpIq43kuNpTecNq6jqUVfD9YegyRj5kTTioQrfuhYpQ8VxwkuENiXXcBN2Ur2BTbERTceQKDugSjkqSpfjNE0vZEWAw/6pCx7A5ipVgogk6JsCEbTvWTre1069aqO09Mq60dImmgwg4irENDZ7CNwMjKYRkDnXXID6XJOo9vFCgidH5NZ3N4p0rQ/Et0RSduOfHT4/pO9DUaPVUR+2zIYiXbawtuIrAz90vr1eUTQ1ykt7+yPWyBgckY8ofHglJmFq1W8wvrV5UE0hherGIu5/qjemIGHzOodeUhIWRYsJTEFrofzxR1iIXxgfRcrYOmI5xsPlx+qfpBuJLGPK0MAzMiC75YqPhe497OCfjHkUPtOdwEg6KIHj1N8s7d4olj1uL4SNYvn4dT6weIOMpoRm+AXkIoNFeDDV/CHkDGBYOyjsiICDdDB8+ZbokvMEMooylTjxpryuHpzwLYmPR8bdJvXnDtySlowcAXY/hReYGFo8VsdPkjFC+RrmVP16I3/ptUUWD5k6sFdxeOtbZYcyYwWAhPyxMvlMI6Tqk35IsD1mz0WyXIXixgLCJCLxTAEenOwv4i08IyY+2BUy8KxzCzUvXt3ugNq2GTQ2ULWvO6l3MPLPyK6fnC2Dk+yrS8e66tm6z1iWOMPTkdGjtC6NAZA4kqvUEv7ykXwIeUbB6mpQ6VGiaURIoeSicDq95ObJlVBDVMMmRo139wYbWxUvQV3f/w8pUXiV6W6MiowFo7DpSLYShT6YcXXuQ6POTOOD34iW1Um7xImVTlQSVhTULr1YU3GYsmBT3fWV0osFfvi7W1Dirz2kLufDQPjEWmosDJPLCzurEmQfRcv20EBVS6C3z0iVD1cLeCVduK2lzKfpne+8G61daaoYAe2Ndb2PjoE/sLQ74ksWZfGW2ZI/ELw2L6MjWdZoAQrhajPWwhJcrTJ+qF2/lcYizVJB3O0qXf+nXsOmqcG7mf288rETy86uJWGSslFEO9HpNr6J/p7rOk03YYFYJYzXxMT3R/VGfh57ViVczANLeyzywCZpT/A6gVOmxnlcaNr5GVMPbBhSXGohO6RxPmaeX9R42l7s7ZNRGvLRAEL7PQwTNEyZti4Z+thUUeC8mNdtiJ1sL6QIKwOU+8D9TpsNqKALZ3VlnvpjT0xd/RgkcsCRtUdmKv0PTfL0ZKCyMCMubw77Ga4aDyiD4BDAs8lrXxNsJAb2eNSyh9I6JLYahfDzs7yzVt4AsIGLcOP1+xs7zSPmqbV8xl1IWKAw5+djdnEmy1EGSCEmkVFsYv2Vnak4JRJmPzQ9FJhtC7DY2QNeN5AUVtMi2AsSNKOXTelbXGZ4UxjV0OuzFreplylwlibdzjnVVkXUbrSb0drVOZDC2Sqsy/4hiyJKzX7fcqflAl0INGFO0VnQnkAegw1VyZiT4qtw5T9q28xmcVChroUIhRgaSmiFHr5sbzMttZkdRlKiUxD8rtDCTzEwviLJMNhU/tGnhojMlDqLh+JbWnLosAhbFytGrgdTnkSJ5YEZQyzJkF0OF/WBeJR2qu4VWQv+gzakbFOlTpqSwALPlCrChB8qPWJNJR+aUU3yZQCZxK0V8SIZSyZ20+4kgfo8ZrfQJeLB1UonRpYYmxJHaXxvtAX98cA0fw+YWUSL77m7G2QchbSw5Sfwe3+lXVCdZKWJnWWRN3CaypgBbg0/YgVSsWkb9BayjuQGUWdndTjVC+l4U3FCxsgA6RCs/Bv9+N5VPoYqk6cNJNc2lgrG4lICnDhmLtu4xVUKSCsP0WRNtSWQWlFH6UJu1LgYcRM4XPcrZpPIeHpm+tK4WJ/y6Ukbcs04RA5u4spCyuwlhDplVrZNsPTzyAA3PdFhZZDW2MLYOxDYo2U2yw0Fye/dd1eQnWY0vWXIzk4aWv403GqkEl9ICiBxYsyUalfyTUNWtOeQiRmz9xorGAtNmM6nB04d5naEXWImz3Ab/Hh2Hx8BOnTSgva5cotlHUFCwWkL7NslgdJmMdn7Z88InzxrmrFlCYC1kuiHMqejI22pzJrZc3ChTJgwJjJ/KznrCWayKlKVapI6l6QimBlWK/Z3I8wuN7/OtEY21as3QNKZ2UWTT4MT1hUwPgWrzq7BTKWz8H60xjtdqXC+LJKPZORavzRNuV7m/gnD7OGBfXNNbm+YxOoMHwLVl82p6gwXqqRwP/HZ+4s0Jvt8qMtTc/rDvYE5oashhgG9XM8GHGMjRZy3GzsUvVE2GmPVwVtFjYLmqs/vvOTU7H2peqBnvQxFecJ54XrmusmYRR7A2Zi4iEJ5j5FMgtX6pEeFVjdamPQevvgVmgNmxVenpN9BuKyoaF7ZrGcpZDVkswMOpwcB2eiHzlqFYUF3hVY1n+6jwVRCQBh5WY7AkU4zOt9BYW3jyy78HaoWuQ3kptrn1nGfJBa3kpXWE+RBhbFnhhY9X01a0YkVALaEzxah9nJd5przCqEsE5s8qx6BAi6qbRZMY1WJKO9GNeni5YLry5UHHlWJXkIsbSzY8Il1QyPOBMgyB8ErRm17UDBN5qrNAzCibUAF5qtmT3EIqpo1rBCSf6ysaiDw0isvbmLrrCvHA/P6MgHnk667sNtcxYPhQlCgRDezqKEKJ5uHGahDDOe9s+0Fhh+IkOkjaQlwnjYtRkLpFDE/OfqHB9gLEiwcrGQSchi7igcEGIr+g8oVbr+mhjBeVBV2JNA//CeFoLZhWDhzI9TEb2w421x/Ghu56lEiFKGXQd4c7UUbF6AN9fg39Moq4df4RY6q+eyAuTueefZawEJPfGhNPVOcsnKrrIkeG4n2SsJDRc1i8Lyab8BKV15SG1is8xFoE8QqukatOnWaQnYPizi0rxk4zVnxCK0BvQUUXMyn4oIlrBEt2NrRxrdb6xeucLSXh7KjvjHTORBLFFTCGOZ+O7IokXdhasguqBt08YqE+O0ozA+gkkCoTCyEBsSuIljWWFBCeOVkMVxsrsgdiBzigZsyNgA+GPqJr+lbGkhFKzruJQFPabmRnFIHszdYIOTVReBM9OhZ40FrT+LnNlAKfTIkTn0VhIQ3lHQ17cmIi8JOCUauGrxmJI35hePazwXvbU6btODBh2cTNXj9EoIykEX8RYMH0+rWzqZFdhgnaE7A163nfp5EphENZEWLiWscI1H1tRdGwx++MrWUDRnEghto0KndFmCxc1VruU0o0mHCr0NChTN8aoiEXXh4cPDpzqkPyZsSIeoDx9mZtswVSnLVpnEIxkRFwRwUthYFi4ZOhQEFzaJglBRl1i8ClNgzDJd08cg4uh7uR10h0gD+4ydeWQvFRx6SC8iBEw8vjJNNbtgsYSQ6DovxehPHBAyg9SCpxhijpmV/VsZQHXNJb3ahkmQCcUdzVXghp/X94ICBBN+oAwa8
2329y/Ap4Vhg3GLuQwym4UiEyvE+0wTpfBwalkf20sKd8jzbewOs4giBqgG9Ynq+MO3owALtN1sAwNhZI/8NRcdTIOyowI6gcZyyjEJmiX74HHkxGVYkaYY4Qz08BTjBX4WKXAsl9Zj8Zzeu58aOnbz+GC27CgjDKPvHkKmrPwDdogdTrCsN5Yhsu4W6EPUyKeqWEl7CfrPH6MsVSTTdtFgDi9EU82HtGEuu89rSLf8FY3/woGjzDWBtx8EyS0/ZVfsxP9TFEec5GoC4B/Piu6UYb19gpb8CWnKI1L2rGpAMjpZ/J5PCuyhtpIrmLo7fNYgCbiISfw7hMWYz6vgWdFSFk+9RmK9+QdkkXmjJPrINF1jNUZvpXRzyXWKmTTbF9DGwzxbJ5wlrHyKIM8IalQqnsxlMta0z6ZOybzVzGWNh7lsa1tYRVmmccsilZ/mq0Qc60/NVZkGVQ6AzsIsS3aWlHQrgmwmVyzLFzEWFWdvrjs1/WKVJxvF9kOFfHr9O40BktHrlaz6jNesxNSVDpaS4tXOYaqPB+1GVsOdBI9L4jGxlkK53KPnvRZYahbNhbO4RS7PhsSU+LA+Mv3HkPEgamItxfOgsOLiWup9RNet7zCMYSexDJx5Bn7CkFCJM9a5Yn83Mc/gfAJFoftrAY3BpVzldpP4mXXieAPjEjeTrIVXJQ4TMtorvQyuSGsz7ccu3eKsQSQ93HkGV29irE2mw9YV03PCq9sMi16pPHr4VnnSFSNjWUtmorPXNhYDaV5W3XFh2Za3+z7thZeePnb+760tc50Nt9abH1zTfdpY2kO9XuBPKpr898xlmD7bSYc+Aa23ycaa3MNDM+p8Sbf+UHGSnFwwW/6GsvvQ5mRiTdHMJ9jrC3louwJaHyNtaUZZCoh+ZYC/gcZa0vKiiKo/JbY9JOMtSEPLgrT67/G0tA0B1+Tief/WWNtWQldO39OD+U/y1gl+MGg+/M1Vn0qrTHsfM2CzzZWuwpPUlP+9xgLLr3I7zGc+ixXNv8aa+zg1V74GqtrLJgc8XdnzXEIqD7Z11iDrQUTMv1G8MNk0UZXfBPp2dbSzqevsSZuS7g0X2MdyXku3btzvTvxi8Ff7j75muD41/8EGABcagrVPWmXtgAAAABJRU5ErkJggg=="></canvas>');
2330                canvasArea.find('canvas').attr({
2331                    'height': canvasArea.height()
2332                }).canvasSnow();
2333                break;
2334            case 3:
2335                canvasArea.empty();
2336                canvasArea.canvasFireworks({
2337                    width: canvasArea.width(),
2338                    height: canvasArea.height()
2339                });
2340                break;
2341            case 4:
2342                canvasArea.empty();
2343                canvasArea.canvasMeteor({
2344                    width: canvasArea.width() < 810 ? 810 : canvasArea.width(),
2345                    height: canvasArea.height() || 100
2346                });
2347                break;
2348            case 5:
2349                canvasArea.empty();
2350                canvasArea.canvasAirBubble({
2351                    radius: 45,
2352                    densety: .1,
2353                    color: 'rgba(255,255,255, .4)',
2354                    //color: 'random',
2355                    clearOffset: .3
2356                });
2357                break;
2358        }
2359    }
2360};
2361wsf.rowvideo = function () {
2362    var rowvideobg = $('div.rowvideobg');
2363    rowvideobg.each(function (i, dom) {
2364        dom = $(dom);
2365        var video = dom.find('video');
2366        video.length && (function () {
2367            setTimeout(function(){
2368                var vow = video.width(),
2369                    voh = video.height(),
2370                    vnh = null,
2371                    vnw = null,
2372                    vph = video.parent().height(),
2373                    vpw = video.parent().width();
2374                if (vow == vpw) {
2375                    if (voh < vph) {
2376                        video.css({height: '100%', width: 'auto'});
2377                        vnw = video.width();
2378                        vnw > vpw && video.css({left: -(vnw - vpw) / 2 + 'px'});
2379                    }
2380                    voh > vph && video.css({top: -(voh - vph) / 2 + 'px'});
2381                }
2382            }, 10);
2383        })();
2384    });
2385};
2386// 动画加载效果
2387wsf.loadAnimate = {
2388    getDom: [],
2389    getLoadImg: [],
2390    getProgress: [],
2391    loadFun: function(){
2392        var that = this;
2393        $("div.load-animate[data-animate-name][data-animate-delay][data-animate-duration]").each(function (i, dom) {
2394            dom = $(dom);
2395            var tag = true,
2396                evContainer = dom.closest('.ev-container');
2397            if (dom.is(':visible')) {
2398                if (evContainer.length) {
2399                    if (evContainer.hasClass('ev-tab-container-two') && !evContainer.hasClass('ev-tab-active')) {
2400                        tag = false;
2401                    }
2402                }
2403            } else {
2404                tag = false;
2405            }
2406            tag && that.getDom.push({
2407                'dom': dom,
2408                'st': dom.attr('style') || '',
2409                'oTop': dom.offset().top,
2410                'loaded': false,
2411                'aName': dom.data('animate-name'),
2412                'aDelay': dom.data('animate-delay'),
2413                'aDuration': dom.data('animate-duration')
2414            });
2415        });
2416        $("img.lazy-loading").each(function (i, dom) {
2417            dom = $(dom);
2418            var tag = true,
2419                evContainer = dom.closest('.ev-container'),
2420                row = dom.closest('.customModuleRow');
2421            if (evContainer.length) {
2422                if (evContainer.hasClass('ev-tab-container-two') && !evContainer.hasClass('ev-tab-active')) {
2423                    tag = false;
2424                }
2425            }
2426            if(row.length){
2427                if (row.is(':hidden')) {
2428                    tag = false;
2429                }
2430            }
2431            tag && that.getLoadImg.push({
2432                'dom': dom,
2433                'st': dom.attr('style') || '',
2434                'oTop': (function () {
2435                    var picTextListModule = dom.closest('.pic-text-list-module'),
2436                        top = dom.offset().top;
2437                    if (picTextListModule.length && picTextListModule.attr('data-move') * 1 === 1 && (picTextListModule.attr('data-axis') === 'top' || picTextListModule.attr('data-axis') === 'bottom')) {
2438                        top = picTextListModule.parent().offset().top;
2439                    }
2440                    return top;
2441                })(),
2442                'loaded': false,
2443                'src': dom.data('original-src')
2444            });
2445        });
2446    },
2447    showAnimateMo: function(s, h){
2448        var that = this,
2449            animateTag = (s !== undefined && h != undefined);
2450        if (that.getDom.length > 0) {
2451            $.map(that.getDom, function (v, i) {
2452                if(animateTag){
2453                    if (!v.loaded && (s + h > v.oTop) && (v.oTop + v.dom.height() > s ||  (v.dom.data('fixed') || v.dom.parent().data('fixed')) * 1 === 1)) {
2454                        if ($.browser && $.browser.msie && $.browser.msie < 9) {
2455                            v.dom.removeClass('load-animate');
2456                            v.loaded = true;
2457                        } else {
2458                            wsf.f.annimationLoadMo(v.dom);
2459                            v.loaded = true;
2460                            if (v.dom.parent().hasClass('ev-tab-container-two')) {
2461                                v.dom.attr('data-loadanimate', 1).data('loadanimate', 1);
2462                            }
2463                        }
2464                    }
2465                }else{
2466                    wsf.f.annimationLoadMo(v.dom);
2467                    v.loaded = true;
2468                }
2469            });
2470        }
2471        if (that.getLoadImg.length > 0) {
2472            $.map(that.getLoadImg, function (v, i) {
2473                if(animateTag){
2474                    if (!v.loaded && (s + h > v.oTop) && (v.oTop + v.dom.height() > s || v.dom.closest('div[data-fixed="1"]').data('fixed'))) {
2475                        wsf.f.imgLazyLoading(v.dom.parent());
2476                        v.loaded = true;
2477                    }
2478                }else{
2479                    wsf.f.imgLazyLoading(v.dom.parent());
2480                    v.loaded = true;
2481                }
2482            });
2483        }
2484
2485    }
2486}
2487//滚动的时候的固定定位模块方法
2488wsf.scrollFixed = {
2489    'judge': function () {
2490        var that = this;
2491        that.fixedDomJson = {
2492            'wrap': $("#wrapper"),
2493            'alone': {},
2494            'group': {}
2495        };
2496        (function () {
2497            var domArray = [$('#top_area'), $('#web_nav'), $('#header')],
2498                i = 0;
2499            while (i < domArray.length) {
2500                if (domArray[i].length) {
2501                    var dom = domArray[i];
2502                    if (dom.attr('data-fixed') === '1') {
2503                        that.fixedDomJson.alone[dom.attr('id')] = {
2504                            'dom': dom,
2505                            'iDom': dom.children(["class*='Inner'"]).eq(0),
2506                            'iDomS': dom.children(["class*='Inner'"]).eq(0).attr('style'),
2507                            'fixed': dom.attr('data-fixed'),
2508                            'fixedX': dom.attr('data-fixedx') == '-1' ? dom.offset().top : dom.attr('data-fixedx'),
2509                            'oLeft': dom.offset().left,
2510                            'oTop': dom.offset().top,
2511                            'position': dom.css('position'),
2512                            'width': dom.width(),
2513                            'height': dom.height()
2514                        };
2515                    }
2516                }
2517                i++;
2518            }
2519        })();
2520        $('div.headPublicModuleRow').find('.ev-module-edit,.customModule').each(function (i, dom) {
2521            dom = $(dom);
2522            var id = dom.attr('id');
2523            if (dom.hasClass('customModule')) {
2524                id = dom.find('.Mo').attr('id');
2525            }
2526            if (dom.attr('data-fixed') === '1') {
2527                that.fixedDomJson.group[id] = {
2528                    'dom': dom,
2529                    'fixed': dom.attr('data-fixed'),
2530                    'fixedX': dom.attr('data-fixedx') == '-1' ? dom.offset().top : dom.attr('data-fixedx'),
2531                    'oLeft': dom.offset().left,
2532                    'oTop': dom.offset().top,
2533                    'pLeft': dom.position().left,
2534                    'pTop': dom.position().top
2535                };
2536            }
2537        });
2538        $('#absolute_module_wrap').find('.absolute-module').each(function (i, dom) {
2539            dom = $(dom);
2540            if (dom.attr('data-fixed') === '1') {
2541                that.fixedDomJson.group[dom.attr('id')] = {
2542                    'dom': dom,
2543                    'fixed': dom.attr('data-fixed'),
2544                    'fixedX': dom.attr('data-fixedx') == '-1' ? dom.offset().top : dom.attr('data-fixedx'),
2545                    'oLeft': dom.offset().left,
2546                    'oTop': dom.offset().top,
2547                    'pLeft': dom.position().left,
2548                    'pTop': dom.position().top
2549                };
2550            }
2551        });
2552    },
2553    'fun': function (x) {
2554        var alone = this.fixedDomJson.alone,
2555            group = this.fixedDomJson.group,
2556            wrap = this.fixedDomJson.wrap,
2557            padtop = 0;
2558        $.each(alone, function (i, v) {
2559            if (v.fixed) {
2560                if (x >= v.fixedX) {
2561                    v.dom.height(v.height);
2562                    if (v.dom.is($('#web_nav')) && (v.width < v.iDom.width())) {
2563                        v.iDom.css({
2564                            'width': '100%',
2565                            'left': 0
2566                        });
2567                    } else {
2568                        v.iDom.css({
2569                            'width': v.width,
2570                            'left': v.left
2571                        });
2572                    }
2573                    v.iDom.addClass('scrollFixed').css({
2574                        'position': 'fixed',
2575                        top: (v.oTop - v.fixedX) <= 0 ? 0 : (v.oTo
2575p - v.fixedX)
2576                    });
2577                } else {
2578                    v.iDom.removeClass('scrollFixed').attr('style', v.iDomS || '');
2579                }
2580            }
2581        });
2582        $.each(group, function (i, v) {
2583            if (v.fixed) {
2584                if (x >= v.fixedX) {
2585                    v.dom.css({
2586                        position: 'fixed',
2587                        left: v.oLeft,
2588                        top: (v.oTop - v.fixedX) < 0 ? 0 : (v.oTop - v.fixedX)
2589                    });
2590                } else {
2591                    v.dom.css({
2592                        position: 'absolute',
2593                        left: v.pLeft,
2594                        top: v.pTop
2595                    });
2596                }
2597            }
2598        });
2599    }
2600};
2601//给window对象绑定事件
2602wsf.wScroll = function (a) {
2603        var curWin = isParentWindow ? window.top : window,
2604            curWinDom = $(curWin),
2605            eventList = curWinDom.data('events') || $._data(curWin, 'events');
2606        if (isParentWindow || curWin === window) {
2607            if (eventList && eventList['scroll']) {
2608                $.each(eventList['scroll'], function (i, v) {
2609                    if (v.namespace === 'moCount') {
2610                        curWinDom.off('scroll.moCount');
2611                        return false;
2612                    }
2613                });
2614            }
2615        }
2616        if (isParentWindow) {
2617            var adminWrapper = $('#adminWrapper', curWin.document);
2618            curWinDom.on({
2619                'scroll.moCount': function () {
2620                    var st = curWinDom.scrollTop(),
2621                        h = curWinDom.height() - parseInt(adminWrapper.css('padding-top'));
2622                    wsf.loadAnimate.showAnimateMo(st, h);
2623                    wsf.progress.showProgress(st, h);
2624                }
2625            });
2626            var defst = curWinDom.scrollTop(),
2627                defh = curWinDom.height() - parseInt(adminWrapper.css('padding-top'));
2628            wsf.loadAnimate.showAnimateMo(defst, defh);
2629            wsf.progress.showProgress(defst, defh);
2630        } else {
2631            curWinDom.on({
2632                'scroll.moCount': function (event) {
2633                    var st = curWinDom.scrollTop(),
2634                        h = curWinDom[0].innerHeight;
2635                    wsf.loadAnimate.showAnimateMo(st, h);
2636                    wsf.progress.showProgress(st, h);
2637                    wsf.fixedRow.showFixedDom(st, h);
2638                    wsf.scrollFixed.fun(st);
2639                },
2640                'resize.moCount': function () {
2641                    wsf.fullRow.countMoPosition();
2642                    // wsf.fullRow.evRFSwidthmodule.length && wsf.f.positionShow(wsf.fullRow.evRFSwidthmodule, wsf.fullRow.evRFSwidthmodule.attr('data-position') - 1);
2643                }
2644            });
2645            var defst = curWinDom.scrollTop(),
2646                defh = curWinDom.height();
2647            wsf.loadAnimate.showAnimateMo(defst, defh);
2648            wsf.fixedRow.showFixedDom(defst, defh);
2649            wsf.progress.showProgress(defst, defh);
2650        }
2651};
2652// 站点导航的方法,主要作用是显示和隐藏子导航菜单。
2653
2654wsf.nav = function () {
2655    var webNav = $('#web_nav'),
2656        navInner = webNav.find('.navInner'),
2657        fullSubNavBox = $('#fullSubNavBox'),
2658        documents = $(document),
2659        leaveJson = {
2660            curSubRow: null,
2661            hideTime: null,
2662            curItem: null,
2663            startTimeFn: function(){
2664                var that = this;
2665                that.hideTime = setTimeout(function(){
2666                    leaveJson.hideFun();
2667                }, 200);
2668            },
2669            endTimeFn: function(){
2670                var that = this;
2671                clearTimeout(that.hideTime);
2672            },
2673            hideFun: function(){
2674                var that = this;
2675                that.curItem && that.curItem.removeClass('NItemH');
2676                if(that.curSubRow && that.curSubRow.length){
2677                    that.curSubRow.removeClass('customModuleRowBlock animated').addClass('customModuleRowNone');
2678                    that.curSubRow = null;
2679                }
2680            },
2681            showFun: function(an){
2682                var that = this;
2683                if(that.curSubRow && that.curSubRow.length){
2684                    if(!that.curSubRow.data('ajaxload')){
2685                        that.curSubRow.find('.ev-module-edit,.customModule').each(function (i, dom) {
2686                            dom = $(dom);
2687                            wsf.f.upJsFun(dom);
2688                            if(dom.hasClass('customModule')){
2689                                wsf.f.annimationLoadMo(dom);
2690                            }else{
2691                                var curDomEditBox = dom.find('div.ev-module-edit-box:first');
2692                                if(curDomEditBox.data('animate-name')){
2693                                    wsf.f.annimationLoadMo(curDomEditBox);
2694                                }
2695                            }
2696                            wsf.f.imgLazyLoading(dom);
2697                        });
2698                        that.curSubRow.data('ajaxload', 1);
2699                        wsf.queryMJsEffect(MJsData);
2700                    }
2701                    that.curSubRow.removeClass('customModuleRowNone').addClass('customModuleRowBlock');
2702                    that.curItem && that.curItem.addClass('NItemH');
2703                    if(an){
2704                        setTimeout(function(){
2705                            that.curSubRow.addClass('animated');
2706                        });
2707                    }else{
2708                        that.curSubRow.addClass('animated');
2709                    }
2710                }
2711            }
2712        },
2713        NSubShowFun = function(curItem){
2714            var sub = curItem.find("div.NSub");
2715                if (sub.length) {
2716                    var l = curItem.offset().left,
2717                        pl = sub.width() + l;
2718                    if (pl > documents.width()) {
2719                        sub.css({
2720                            left: 'auto',
2721                            right: 0
2722                        });
2723                    }
2724                    curItem.addClass('NItemSub');
2725                }
2726        };
2727    $("#nav").on({
2728        mouseenter: function (event) {
2729            var $this = $(this),
2730                subLayout = webNav.attr('data-sublayout') * 1,
2731                animated = true;
2732            if (!$this.hasClass('NItemCur') && !$this.hasClass("NItemH")) {
2733                $this.addClass("NItemH");
2734            }
2735            switch(subLayout){
2736                case 2:
2737                    !is_action && (function(){
2738                        var thisSubId = $this.data('subid');
2739                        if(leaveJson.curSubRow){
2740                            animated = false;
2741                            clearTimeout(leaveJson.hideTime);
2742                            leaveJson.hideFun();
2743                            leaveJson.hideTime = null;
2744                        }
2745                        if(thisSubId){
2746                            var curSubRow = leaveJson.curSubRow = $('#row_' + thisSubId);
2747                            leaveJson.curItem = $this;
2748                            if(!curSubRow.hasClass('customModuleRowBlock')){
2749                                if(navInner.css('position') === 'fixed'){
2750                                    curSubRow.css({'position': 'fixed', top: $this.offset().top - $(document).scrollTop() + $this.height()});
2751                                }else{
2752                                    curSubRow.css({'position': 'absolute', 'top': $this.offset().top + $this.height()});
2753                                }
2754                                leaveJson.showFun(animated);
2755                            }
2756                        }else if($this.hasClass('NLast')){
2757                            NSubShowFun($this);
2758                        }
2759                    })();
2760                    break;
2761                default:
2762                    NSubShowFun($this);
2763                    break;
2764            }
2765        },
2766        mouseleave: function () {
2767            var $this = $(this),
2768                subLayout = webNav.attr('data-sublayout') * 1;
2769            switch(subLayout){
2770                case 2:
2771                    !is_action && $this.data('subid') && leaveJson.startTimeFn();
2772                    if($this.hasClass('NLast')){
2773                        $this.removeClass("NItemH NItemSub");
2774                    }else if(!$this.data('subid') || is_action){
2775                        $this.removeClass("NItemH");
2776                    }
2777                    break;
2778                default:
2779                    $this.removeClass("NItemSub NItemH");
2780                    break;
2781            }
2782
2783        }
2784    }, '.NItem');
2785    // 给全屏子菜单绑定事件
2786    if(!is_action && fullSubNavBox.length){
2787        // 移除空的子菜单行
2788        fullSubNavBox.children('.customModuleRow').each(function(i, dom){
2789            dom = $(dom);
2790            var tag = false;
2791            if(dom.find('.ev-module-edit,.customModule').length){
2792                tag = true;
2793            }
2794            if(!tag){
2795                dom.remove();
2796            }
2797        });
2798        // 给子菜单行绑定事件
2799        fullSubNavBox.on({
2800            mouseenter: function(){
2801                if(leaveJson.curSubRow){
2802                    leaveJson.endTimeFn();
2803                }
2804            },
2805            mouseleave: function(){
2806                if(leaveJson.curSubRow && !leaveJson.curSubRow.hasClass('curEditRow')){
2807                    leaveJson.startTimeFn();
2808                }
2809            }
2810        }, '.customModuleRow');
2811    }
2812};
2813// 站点搜索框方法,主要作用是显示和隐藏默认文字。
2814wsf.search = function () {
2815    var searchModule = $("form.search-form");
2816    if (searchModule.length) {
2817        searchModule.each(function (i, formDom) {
2818            formDom = $(formDom);
2819            var formDomId = formDom.attr('id'),
2820                parentSearch = formDom.closest('.search');
2821            formDom.on('focus blur keydown', '.keyWord .input', function (event) {
2822                var curDom = $(this),
2823                    curDomVal = curDom.val(),
2824                    curDomDefaultVal = curDom.attr('data-defaultv');
2825                switch (event.type) {
2826                    case 'focusin':
2827                        curDomVal == curDomDefaultVal && curDom.val('');
2828                        break;
2829                    case 'focusout':
2830                        (curDomVal == curDomDefaultVal || !curDomVal) && curDom.val(curDomDefaultVal);
2831                        break;
2832                    case 'keydown':
2833                        event.keyCode === 13 && formDom.find('.keyBtn').trigger('click');
2834                        break;
2835                }
2836            });
2837            formDom.on({
2838                click: function () {
2839                    var keyWord = formDom.find('.keyWord .input'),
2840                        curDomVal = keyWord.val(),
2841                        curDomDefaultVal = keyWord.attr('data-defaultv');
2842                    if (!curDomVal || (curDomVal == curDomDefaultVal && !(keyWord.attr('data-isdefaultsearch') * 1))) {
2843                        wsf.f.alertWindow(parentSearch.attr('data-tishi'), 0);
2844                        keyWord.trigger('focus');
2845                        return false;
2846                    }
2847                    if (parentSearch.attr('data-search-type') == 2) {
2848                        formDom.submit();
2849                    } else {
2850                        window.location.href = formDom.attr("action") + "&keyWord=" + keyWord.val();
2851                    }
2852                }
2853            }, '.keyBtn');
2854            switch (formDomId) {
2855                case 'pageMySearch':
2856                    formDom.on({
2857                        change: function () {
2858                            formDom.find('.keyBtn').trigger('click');
2859                        }
2860                    }, 'select[name="navtype"]');
2861                    break;
2862            }
2863        });
2864    }
2865};
2866/*网站的logo search shopCart 位置计算*/
2867wsf.hoffL = function () {
2868    var j = 0;
2869    var p = function (obj, t) {
2870        if (t == 'n') {
2871            if (obj.attr('data-l')) {
2872                j = wsf.f.s_j(obj.attr('data-l'));
2873            }
2874        } else {
2875            if (obj.attr('data-s')) {
2876                j = wsf.f.s_j(obj.attr('data-s'));
2877            }
2878        }
2879    };
2880    var webNav = $('#web_nav');
2881    var hcL = Math.floor(($("body").width() - userSiteWidth) / 2);
2882    if (webNav.length) {
2883        p(webNav, 'n');
2884        if (j.p == 1 || j.p == 3) {
2885            webNav.css({
2886                'left': j.l + hcL
2887            });
2888        }
2889    }
2890};
2891/*固定定位行fixedRow*/
2892wsf.fixedRow = {
2893    fixedDom: null,
2894    getDom: function () {
2895        var that = this;
2896        that.fixedDom = $('div.fixedPublicModuleRow');
2897        if(that.fixedDom.length){
2898            wsf.pDom.htmlDom.on({
2899                click: function(){
2900                    row = $(this).closest('.fixedPublicModuleRow'),
2901                        id = row.attr('id');
2902                    if(row.attr('data-close')){
2903                        var chId = parseInt(wsf.pDom.bodyDom.data("chid"));
2904                        if (!chId) {
2905                            return false;
2906                        }
2907                        var positionRChIdList = {},
2908                            positionRChIds = readCookie(user_name+'_positionRChIds');
2909                        if (positionRChIds) {
2910                            positionRChIdList = JSON.parse(positionRChIds);
2911                        }
2912                        positionRChIdList[chId] = new Date().getTime();
2913                        writeCookie(user_name+'_positionRChIds', JSON.stringify(positionRChIdList), 1000*24);
2914                    }
2915                    row.remove();
2916                    $('#fixedPublicModuleRowEmpty').remove();
2917                    that.fixedDom = null;
2918                }
2919            },'.fixedPublicModuleRow .rowCloseBtn');
2920        }
2921    },
2922    showFixedDom: function(s, h){
2923        var that = this;
2924        if(that.fixedDom && that.fixedDom.length){
2925            that.fixedDom.each(function(i, dom){
2926                dom = $(dom);
2927                dom.attr('data-fixedtop') * 1 <= s ? dom.show() : dom.hide();
2928            });
2929        }
2930    }
2931};
2932//跑马灯模块方法
2933wsf.moveModule = function (obj) {
2934    obj ? (obj.attr('data-move') * 1 == 1 && obj.moveModule({
2935        "axis": obj.attr('data-axis'),
2936        "speed": obj.attr('data-speed'),
2937        "type": obj.attr('data-type')
2938    })) : $('div.pic-text-list-module,div.text-list-module').each(function (i, dom) {
2939        dom = $(dom);
2940        dom.is(':visible') && dom.attr('data-move') * 1 == 1 && dom.moveModule({
2941            "axis": dom.attr('data-axis'),
2942            "speed": dom.attr('data-speed'),
2943            "type": dom.attr('data-type')
2944        });
2945    });
2946};
2947/*
2948fixedShopcar
2949主要用来显示前台的浮动购物车,和里边的一些方法
2950 */
2951wsf.fixedShopcar = function () {
2952    var fixedShopcar = $("#fixedShopcar"),
2953        shopcarAlert = fixedShopcar.find("div.shopcar-alert"),
2954        listBody = fixedShopcar.find("dd.shopcar-list-body"),
2955        listUl = listBody.find(".shopcar-list-ul");
2956    listBody.cScroll({
2957        w: 10,
2958        tbB: false
2959    });
2960    fixedShopcar.on({
2961        click: function () {
2962            var that = $(this);
2963            if (that.data("alertShow") == 1) {
2964                that.removeData("alertShow");
2965                shopcarAlert.css({
2966                    'visibility': 'hidden'
2967                });
2968            } else {
2969                that.data("alertShow", 1);
2970                shopcarAlert.css({
2971                    'visibility': 'visible'
2972                });
2973            }
2974        }
2975    }, ".shopcar-icon");
2976    fixedShopcar.on({
2977        click: function () {
2978            fixedShopcar.find(".shopcar-icon").removeData("alertShow");
2979            shopcarAlert.css({
2980                'visibility': 'hidden'
2981            });
2982        }
2983    }, ".shopcar-alert-close");
2984    listUl.on({
2985        click: function () {
2986            var par = $(this).parent().parent();
2987            par.animate({
2988                height: 0,
2989                opacity: 0
2990            }, 500, function () {
2991                $(this).remove();
2992                if (listUl.height() > listBody.height()) {
2993                    listBody.cScroll({
2994                        w: 10,
2995                        tbB: false
2996                    });
2997                } else {
2998                    listBody.cScroll({
2999                        w: 10,
3000                        tbB: false
3001                    });
3002                    listBody.find(".c-scrollbar").hide();
3003                }
3004            });
3005        }
3006    }, "span.span-option a");
3007};
3008/*
3009	focus-pic-module
3010	createDate:2015/04/02
3011	模块内焦点图函数,主要是模块中的焦点图切换方法
3012*/
3013wsf.focusPicModule = function (id) {
3014    var objArray = id ? $('#' + id).find('div.focus-pic-module') : $("div.focus-pic-module");
3015    objArray.each(function () {
3016        var obj = $(this);
3017        var h = obj.parent().height(),
3018            w = obj.parent().width(),
3019            dd = obj.find("dd"),
3020            dl = obj.find("dl"),
3021            type = obj.data("type"),
3022            dir = obj.data("dir"),
3023            sum = dd.length,
3024            curi = 0,
3025            ni = curi + 1,
3026            times, move, fun;
3027        dl.css({
3028            "width": w + "px",
3029            "height": h + "px",
3030            "overflow": "hidden"
3031        });
3032        dd.css({
3033            "width": w + "px",
3034            "height": h + "px"
3035        });
3036        //判断设置的方向
3037        (function () {
3038            var scss;
3039            switch (dir) {
3040                case 1: //left
3041                    scss = {
3042                        left: (w + 10) + "px",
3043                        top: 0
3044                    };
3045                    break;
3046                case 2: //right
3047                    scss = {
3048                        left: -(w + 10) + "px",
3049                        top: 0
3050                    };
3051                    break;
3052                case 3: //top
3053                    scss = {
3054                        top: (h + 10) + "px",
3055                        left: 0
3056                    };
3057                    break;
3058                case 4: //bottom
3059                    scss = {
3060                        top: -(h + 10) + "px",
3061                        left: 0
3062                    };
3063                    break;
3064            }
3065            dd.each(function () {
3066                var that = $(this);
3067                if (that.index() != curi) {
3068                    that.css(scss);
3069                } else {
3070                    that.css({
3071                        left: 0,
3072                        top: 0
3073                    });
3074                }
3075            });
3076        })();
3077        //判断设置的类型
3078        if (sum > 1) {
3079            (function () {
3080                switch (type) {
3081                    case 1:
3082                    case 2:
3083                        var controls = $('<div class="focus-controls-list"></div>');
3084                        for (var s = 0; s < sum; s++) {
3085                            var span;
3086                            if (type == 1) {
3087                                span = $('<span>' + (s + 1) + '</span>');
3088                                if (s === curi) {
3089                                    span = $('<span class="cur">' + (s + 1) + '</span>');
3090                                }
3091                            } else if (type == 2) {
3092                                span = $('<span></span>');
3093                                if (s === curi) {
3094                                    span = $('<span class="cur"></span>');
3095                                }
3096                            }
3097                            controls.append(span);
3098                        }
3099                        obj.append(controls);
3100                        fun = function (i) {
3101                            obj.find(".focus-controls-list span:eq(" + i + ")").addClass("cur").siblings().removeClass("cur");
3102                        };
3103                        obj.on({
3104                            click: function () {
3105                                var indexs = $(this).index();
3106                                if (indexs != curi) {
3107                                    if (!obj.data("move")) {
3108                                        move(indexs);
3109                                    }
3110                                }
3111                            }
3112                        }
3112, ".focus-controls-list span");
3113                        break;
3114                    case 3:
3115                        var nextBtn = $('<span class="focus-pic-next"></span>'),
3116                            prevBtn = $('<span class="focus-pic-prev"></span>');
3117                        obj.append(nextBtn, prevBtn);
3118                        obj.on({
3119                            mouseenter: function () {
3120                                var this_ = $(this);
3121                                if (!this_.data("type3btn")) {
3122                                    obj.find(".focus-pic-next,.focus-pic-prev").css({
3123                                        visibility: 'visible'
3124                                    });
3125                                    this_.data("type3btn", 1);
3126                                }
3127                            },
3128                            mouseleave: function () {
3129                                var this_ = $(this);
3130                                if (this_.data("type3btn") == 1) {
3131                                    obj.find(".focus-pic-next,.focus-pic-prev").css({
3132                                        visibility: 'hidden'
3133                                    });
3134                                    this_.removeData("type3btn");
3135                                }
3136                            }
3137                        });
3138                        fun = function (i) {
3139                            obj.find(".focus-pic-next").data("num", i + 1);
3140                            obj.find(".focus-pic-prev").data("num", i - 1);
3141                        };
3142                        fun(curi);
3143                        obj.find(".focus-pic-next").on("click", function () {
3144                            if (!obj.data("move")) {
3145                                move($(this).data('num'), 1);
3146                            }
3147                        });
3148                        obj.find(".focus-pic-prev").on('click', function () {
3149                            if (!obj.data("move")) {
3150                                move($(this).data('num'), 2);
3151                            }
3152                        });
3153                        break;
3154                }
3155            })();
3156            //移动函数
3157            move = function (c, dir_) {
3158                var oldDir = dir;
3159                dir = dir_ || dir;
3160                if (c == sum) {
3161                    c = 0;
3162                }
3163                if (c < 0) {
3164                    c = sum - 1;
3165                }
3166                obj.data("move", 1);
3167                var chNum = function () {
3168                    curi = c;
3169                    ni = c + 1;
3170                    obj.data("move", 0);
3171                };
3172                if (dir == 1) {
3173                    $(dd[c]).animate({
3174                        left: 0
3175                    }, 1000, function () {
3176                        chNum();
3177                    });
3178                    $(dd[curi]).animate({
3179                        left: -w
3180                    }, 1000, function () {
3181                        $(this).css({
3182                            left: (w + 10) + "px"
3183                        });
3184                        dir = oldDir;
3185                    });
3186                }
3187                if (dir == 2) {
3188                    $(dd[c]).animate({
3189                        left: 0
3190                    }, 1000, function () {
3191                        chNum();
3192                    });
3193                    $(dd[curi]).animate({
3194                        left: w
3195                    }, 1000, function () {
3196                        $(this).css({
3197                            left: -(w + 10) + "px"
3198                        });
3199                        dir = oldDir;
3200                    });
3201                }
3202                if (dir == 3) {
3203                    $(dd[c]).animate({
3204                        top: 0
3205                    }, 1000, function () {
3206                        chNum();
3207                    });
3208                    $(dd[curi]).animate({
3209                        top: -(h + 10)
3210                    }, 1000, function () {
3211                        $(this).css({
3212                            top: (h + 10) + "px"
3213                        });
3214                    });
3215                }
3216                if (dir == 4) {
3217                    $(dd[c]).animate({
3218                        top: 0
3219                    }, 1000, function () {
3220                        chNum();
3221                    });
3222                    $(dd[curi]).animate({
3223                        top: h + 10
3224                    }, 1000, function () {
3225                        $(this).css({
3226                            top: -(h + 10) + "px"
3227                        });
3228                    });
3229                }
3230                fun(c);
3231            };
3232            var setTime = function () {
3233                times = setInterval(function () {
3234                    move(ni);
3235                }, 5000);
3236            };
3237            obj.on({
3238                mouseenter: function () {
3239                    clearInterval(times);
3240                },
3241                mouseleave: function () {
3242                    setTime();
3243                }
3244            });
3245            setTime();
3246        }
3247    });
3248};
3249/*
3250	pic-text-list-module
3251	createDate:2015/07/20
3252	changeDate:2016/12/20==>为了解决编辑状态下dom更新后不能用的问题。
3253	文本列表,图文信息列表模块的方法
3254*/
3255wsf.textListModule = function (obj) {
3256    var fun = function (t) {
3257        if (!t.data('bindevent')) {
3258            t.on({
3259                mouseenter: function () {
3260                    $(this).addClass("liHover");
3261                },
3262                mouseleave: function () {
3263                    $(this).removeClass("liHover");
3264                }
3265            }, 'li');
3266            (t.hasClass('text-list-module') || t.hasClass('pic-text-list-module')) && (function(){
3267                var page = t.siblings('.page:first'),
3268                    mId = t.closest('div.Mo').attr('id').substr(3);
3269                if(page.length && page.data('page')){
3270                    var data = page.data();
3271                    page.pagination({
3272                        skin: data.skin, //皮肤
3273                        mId: mId,
3274                        dataTotal: data.total,//数据总数
3275                        pageDataNum: data.pagedatanum,//每页数据数
3276                        curPage: data.curpage,//当前页
3277                        pageGroups: data.pagegroups,//显示页码的个数
3278                        callBack: function(config){
3279                            $.ajax({
3280                                'url': '/ajax_tj.php?username='+user_name+'&module_id='+mId+'&page='+config.curPage+'&is_page=1',
3281                                type: "POST",
3282                                async: false,
3283                                cache: false,
3284                                dataType: 'json',
3285                                success: function (data) {
3286                                    if(data.success){
3287                                        if(t.hasClass('pic-text-list-module')){
3288                                            t.find('ul').html(data.html);
3289                                            wsf.interactFun_(t);
3290                                        }else if(t.hasClass('text-list-module')){
3291                                            t.find('ol').html(data.html);
3292                                        }
3293                                        wsf.pDom.htmlDom.animate({scrollTop: Math.min(wsf.pDom.htmlDom.scrollTop(), t.closest('.customModuleRow').offset().top)});
3294                                        wsf.pDom.bodyDom.animate({scrollTop: Math.min(wsf.pDom.bodyDom.scrollTop(), t.closest('.customModuleRow').offset().top)});
3295                                        t.find('.lazy-loading').each(function(i, dom){
3296                                            dom = $(dom);
3297                                            var oImage = new Image();
3298                                            oImage.onload = function () {
3299                                                dom.attr('src', this.src
3299).addClass('lazy-loading-animate');
3300                                                setTimeout(function(){
3301                                                    dom.removeClass('lazy-loading lazy-loading-animate');
3302                                                }, 1000);
3303                                            };
3304                                            oImage.src = dom.attr('data-original-src');
3305                                        });
3306                                    }
3307                                    if(data.docIds){
3308                                        GData.docSysIds = data.docIds;
3309                                        GData.SMAlbumSysIds = GData.SMAlbumIds='';
3310                                        wsf.albumsDataLoad();
3311                                    }
3312                                }
3313                            });
3314                        }
3315                    });
3316                }
3317            }());
3318            t.hasClass('ev-albums-module') && t.on({
3319                mouseenter: function () {
3320                    $(this).addClass("hover");
3321                },
3322                mouseleave: function () {
3323                    $(this).removeClass("hover");
3324                }
3325            }, '.image-inner');
3326            t.data('bindevent', 1);
3327        }
3328    };
3329    obj ? fun(obj) : $("div.text-list-module,div.pic-text-list-module,div.ev-albums-module").each(function () {
3330        fun($(this));
3331    });
3332};
3333/*列表页25的js效果*/
3334wsf.picTextList_changePic = function () {
3335    /* 更换图片效果 */
3336    $('div.b-listpage-pic-text-list-3').on({
3337        click: function () {
3338            var t = $(this),
3339                src = t.find('img').attr('src'),
3340                lip = t.parents('li'),
3341                picimg = lip.find(".pics img");
3342            picimg.attr('src', src);
3343            t.addClass('pl-list-dd-cur').siblings().removeClass('pl-list-dd-cur');
3344        }
3345    }, '.pl-small-pic-list .pl-list-dd');
3346    /*显示隐藏收藏*/
3347    $('div.b-listpage-pic-text-list-3').on({
3348        mouseenter: function () {
3349            var t = $(this),
3350                plCollect = t.find(".pl-collect");
3351            plCollect.animate({
3352                right: 0
3353            }, 100);
3354        },
3355        mouseleave: function () {
3356            var t = $(this),
3357                plCollect = t.find(".pl-collect");
3358            plCollect.animate({
3359                right: -100
3360            }, 100);
3361        }
3362    }, '.pics');
3363
3364    $('div.b-listpage-pic-text-list-3, .collect_p').on({
3365        click: function (ev) {
3366            var t = $(this),
3367                div = t.children('div');
3368
3369            var timestamp = Date.parse(new Date());
3370            var url = '/dom/user_collect_add.php?timestamp=' + timestamp;
3371            var is_detail = t.data("detail");
3372            var data = {
3373                'title': t.data("name"),
3374                'type': t.data("type"),
3375                'doc_id': t.data("id"),
3376                'channel_id': t.data("chid"),
3377                'username': user_name,
3378                'wap': 0
3379            };
3380            $.ajax({
3381                'url': url,
3382                type: "POST",
3383                async: false,
3384                cache: false,
3385                data: data,
3386                success: function (data) {
3387                    if (data == 1) {
3388                        //`div.attr('class','no-collect').find("b").text('收藏');
3389                        div.attr('class', 'yes-collect').find("b").text($weisiteLa.YiShouCang);
3390                        wsf.f.alertWindow($weisiteLa.ShouCangChengGongGeRenZhongXinKan, 2);
3391                    } else if (data == 2) {
3392                        wsf.f.alertWindow($weisiteLa.ShouCangShiBaiMeiDengLuChongXinShouCang, 0);
3393                        window.location.href = "/dom/denglu.php?username=" + user_name;
3394                        return false;
3395                    } else if (data == 3) {
3396                        if (is_detail) {
3397                            div.attr('class', 'no-collect').find("b").text($weisiteLa.ShouCang);
3398                            wsf.f.alertWindow($weisiteLa.QuXiaoShouCangChengGong, 0);
3399                        } else {
3400                            div.attr('class', 'yes-collect').find("b").text($weisiteLa.YiShouCang);
3401                            wsf.f.alertWindow($weisiteLa.ShouCangGuoGeRenZhongXinKan, 0);
3402                        }
3403                        return false;
3404                    } else if (data == 4) {
3405                        wsf.f.alertWindow($weisiteLa.CanShuCuoWu, 0);
3406                        return false;
3407                    }
3408                }
3409            });
3410            return false;
3411        }
3412    }, '.pl-collect');
3413};
3414/* 交互动画的json对象 */
3415wsf.interactJ = {
3416    a_1: {
3417        typeJ: {
3418            t_1: 'int-onlyimg-larger',
3419            t_2: 'int-onlyimg-small',
3420            t_3: 'int-onlyimg-move-left',
3421            t_4: 'int-onlyimg-move-right',
3422            t_5: 'int-onlyimg-move-top',
3423            t_6: 'int-onlyimg-move-down',
3424            t_7: 'int-onlyimg-rotate-left',
3425            t_8: 'int-onlyimg-rotate-right'
3426        },
3427        aClass: 'int-dom',
3428        addDom: function (obj, j) {
3429            obj.addClass(this.aClass + ' ' + this.typeJ['t_' + j.t]);
3430        }
3431    },
3432    a_2: {
3433        typeJ: {
3434            t_1: 'int-bigglass-fade',
3435            t_2: 'int-bigglass-magnify',
3436            t_3: 'int-bigglass-shrink',
3437            t_4: 'int-bigglass-slide-left',
3438            t_5: 'int-bigglass-slide-right',
3439            t_6: 'int-bigglass-slide-up',
3440            t_7: 'int-bigglass-slide-down'
3441        },
3442        aClass: 'int-dom',
3443        addDom: function (obj, j) {
3444            obj.addClass(this.aClass + ' ' + this.typeJ['t_' + j.t]);
3445            if (this.typeJ['t_' + j.t]) {
3446                var domhtml = '<div class="int-add-dom"><div class="bgzz"></div><div class="figcaption"><img src="/images/VNew/magnifying_glass_img.png" /></div></div>';
3447                obj.append(domhtml);
3448            }
3449        }
3450    },
3451    a_3: {
3452        typeJ: {
3453            t_1: 'int-changeimg-fade',
3454            t_2: 'int-changeimg-magnify',
3455            t_3: 'int-changeimg-shrink',
3456            t_4: 'int-changeimg-slide-left',
3457            t_5: 'int-changeimg-slide-right',
3458            t_6: 'int-changeimg-slide-up',
3459            t_7: 'int-changeimg-slide-down',
3460            t_8: 'int-changeimg-slide-leftup',
3461            t_9: 'int-changeimg-slide-rightup',
3462            t_10: 'int-changeimg-slide-leftdown',
3463            t_11: 'int-changeimg-slide-rightdown',
3464            t_12: 'int-changeimg-push-left',
3465            t_13: 'int-changeimg-push-right',
3466            t_14: 'int-changeimg-push-up',
3467            t_15: 'int-changeimg-push-down',
3468            t_16: 'int-changeimg-hinge-left',
3469            t_17: 'int-changeimg-hinge-right',
3470            t_18: 'int-changeimg-hinge-up',
3471            t_19: 'int-changeimg-hinge-down',
3472            t_20: 'int-changeimg-flip-horiz',
3473            t_21: 'int-changeimg-flip-vert',
3474            t_22: 'int-changeimg-flip-diag-l',
3475            t_23: 'int-changeimg-flip-diag-r',
3476            t_24: 'int-changeimg-shutter-out-horiz',
3477            t_25: 'int-changeimg-shutter-out-vert',
3478            t_26: 'int-changeimg-shutter-out-diag-l',
3479            t_27: 'int-changeimg-shutter-out-diag-r'
3480        },
3481        aClass: 'int-dom',
3482        addDom: function (obj, j) {
3483            obj.addClass(this.aClass + ' ' + this.typeJ['t_' + j.t]);
3484            if (this.typeJ['t_' + j.t]) {
3485                var nImgUrl = obj.data('nimgurl');
3486                var domhtml = '<div class="int-add-dom"><div class="bgzz"></div><div class="figcaption"><img src="' + nImgUrl + '" /></div></div>';
3487                obj.append(domhtml);
3488            }
3489        }
3490    },
3491    a_4: {
3492        typeJ: {
3493            t_1: 'int-showAttr-fade',
3494            t_2: 'int-showAttr-magnify',
3495            t_3: 'int-showAttr-shrink',
3496            t_4: 'int-showAttr-slide-left',
3497            t_5: 'int-showAttr-slide-right',
3498            t_6: 'int-showAttr-slide-up',
3499            t_7: 'int-showAttr-slide-down',
3500            t_8: 'int-showAttr-slide-leftup',
3501            t_9: 'int-showAttr-slide-rightup',
3502            t_10: 'int-showAttr-slide-leftdown',
3503            t_11: 'int-showAttr-slide-rightdown',
3504            t_12: 'int-showAttr-hinge-left',
3505            t_13: 'int-showAttr-hinge-right',
3506            t_14: 'int-showAttr-hinge-up',
3507            t_15: 'int-showAttr-hinge-down',
3508            t_16: 'int-showAttr-shutter-out-horiz',
3509            t_17: 'int-showAttr-shutter-out-vert',
3510            t_18: 'int-showAttr-shutter-out-diag-l',
3511            t_19: 'int-showAttr-shutter-out-diag-r'
3512        },
3513        aClass: 'int-dom',
3514        addDom: function (obj, j) {
3515            obj.addClass(this.aClass + ' ' + this.typeJ['t_' + j.t]);
3516            if (this.typeJ['t_' + j.t]) {
3517                var ntitle = obj.data('ntitle'),
3518                    nintro = obj.data('nintro'),
3519                    picH = obj.height();
3520                ntitle = ntitle ? ntitle : '这是标题';
3521                nintro = nintro ? nintro : '这是介绍';
3522                var domhtml = $('<div class="int-add-dom"><div class="bgzz"></div><div class="figcaption"><div class="show-attr"><h3>' + ntitle + '</h3><p>' + nintro + '</p></div></div></div>');
3523                obj.append(domhtml);
3524                var showAttr = domhtml.find('.figcaption'),
3525                    attrH = showAttr.height(),
3526                    attrT = (picH - attrH) / 2;
3527                showAttr.css({
3528                    top: attrT + 'px'
3529                });
3530            }
3531        }
3532    },
3533    a_5: {
3534        typeJ: {
3535            t_1: 'int-showTitle-fade',
3536            t_2: 'int-showTitle-magnify',
3537            t_3: 'int-showTitle-shrink',
3538            t_4: 'int-showTitle-slide-left',
3539            t_5: 'int-showTitle-slide-right',
3540            t_6: 'int-showTitle-slide-up',
3541            t_7: 'int-showTitle-slide-down',
3542            t_8: 'int-showTitle-slide-leftup',
3543            t_9: 'int-showTitle-slide-rightup',
3544            t_10: 'int-showTitle-slide-leftdown',
3545            t_11: 'int-showTitle-slide-rightdown',
3546            t_12: 'int-showTitle-shutter-out-horiz',
3547            t_13: 'int-showTitle-shutter-out-vert'
3548        },
3549        aClass: 'int-dom',
3550        addDom: function (obj, j) {
3551            obj.addClass(this.aClass + ' ' + this.typeJ['t_' + j.t]);
3552            if (this.typeJ['t_' + j.t]) {
3553                var ntitle = obj.data('ntitle');
3554                ntitle = ntitle ? ntitle : '这是标题';
3555                var domhtml = '<div class="int-add-dom"><div class="bgzz"></div><div class="figcaption"><div class="show-attr"><h3>' + ntitle + '</h3></div></div></div>';
3556                obj.append(domhtml);
3557            }
3558        }
3559    }
3560};
3561/* 交互动画的方法 */
3562wsf.interactFun = function () {
3563    var picTextListModule = $("div.pic-text-list-module"),
3564        picTextModule = $("div.pic-text-module"),
3565        picModule = $('div.pic-module'),
3566        evPicModule = $('div.ev-pic');
3567    /* 图文信息,橱窗的图片交互 */
3568    picTextListModule.each(function () {
3569        var that = $(this),
3570            interact = that.data('interact');
3571        interact = interact ? wsf.f.s_j(interact) : interact;
3572        if (interact) {
3573            if (wsf.interactJ['a_' + interact.a]) {
3574                that.find("li").each(function () {
3575                    var t = $(this),
3576                        pic = t.find('.pic');
3577                    wsf.interactJ['a_' + interact.a].addDom(pic, interact);
3578                });
3579            }
3580        }
3581    });
3582    /* 图文混排的图片交互 */
3583    picTextModule.each(function () {
3584        var that = $(this),
3585            interact = that.data('interact');
3586        interact = interact ? wsf.f.s_j(interact) : interact;
3587        if (interact) {
3588            if (wsf.interactJ['a_' + interact.a]) {
3589                var pic = that.find('.pic');
3590                wsf.interactJ['a_' + interact.a].addDom(pic, interact);
3591            }
3592        }
3593    });
3594    /* 单张图片交互 */
3595    picModule.each(function () {
3596        var that = $(this),
3597            interact = that.data('interact');
3598        interact = interact ? wsf.f.s_j(interact) : interact;
3599        if (interact) {
3600            if (wsf.interactJ['a_' + interact.a]) {
3601                var pic = that.find('.pic');
3602                wsf.interactJ['a_' + interact.a].addDom(pic, interact);
3603            }
3604        }
3605    });
3606
3607};
3608/* 交互动画类型4的属性居中方法 */
3609wsf.interactFun_ = function (obj) {
3610    var fun = function (t) {
3611        t = $(t);
3612        var figcaption = t.find('.figcaption'),
3613            top_ = ((t.parent().parent().hasClass('pic-module') ? t.closest('.MoBodyC').height() : t.height()) - figcaption.height()) / 2;
3614        figcaption.css({
3615            top: top_ + 'px'
3616        });
3617    };
3618    if(obj && obj.length){
3619        obj.find('.pic[class*="int-showAttr-"]').each(function (i, d) {
3620            fun(d);
3621        });
3622    }else{
3623        $('.pic[class*="int-showAttr-"]').each(function (i, d) {
3624            fun(d);
3625        });
3626        $('.ev-pic[class*="int-showAttr-"]').each(function (i, d) {
3627            fun(d);
3628        });
3629    }
3630};
3631/*
3632	catalogList
3633	树形分类目录,主要用于模块的分类目录js,包括上下移动
3634 */
3635wsf.catalogList = function (obj_) {
3636    var catalogH = function (obj) {
3637            var oneDl = obj.children("dl.oneClassList");
3638            if (obj.height() < oneDl.height() || parseInt(oneDl.css("margin-top"), 10) < 0) {
3639                obj.find("big.but").show();
3640            } else {
3641                obj.find("big.but").hide();
3642            }
3643        },
3644        move = function (obj, dir) {
3645            var oneDl = obj.find("dl.oneClassList"),
3646                t_h = obj.height(),
3647                dl_t = Math.abs(parseInt(oneDl.css("margin-top"), 10)),
3648                dl_sh = oneDl.height() - dl_t,
3649                judge;
3650
3651            if (dir == 'up') {
3652                judge = (dl_sh - t_h) > 0 ? true : false;
3653            } else if (dir == 'down') {
3654                judge = dl_t > 0 ? true : false;
3655                t_h = -t_h;
3656            }
3657
3658            if (judge) {
3659                if (oneDl.data('moving') != 1) {
3660                    oneDl.data('moving', 1);
3661                    oneDl.animate({
3662                        marginTop: -(dl_t + t_h / 3)
3663                    }, 500, function () {
3664                        oneDl.removeData('moving', 1);
3665                    });
3666                }
3667            }
3668        },
3669        fun = function (t) {
3670            if (!t.data('bindevent')) {
3671                if (!t.hasClass('sidebarLists')) {
3672                    t.css({
3673                        height: t.parent().height() + "px",
3674                        width: t.parent().width() + "px"
3675                    });
3676                }
3677                //给类别绑定展开闭合子类事件
3678                t.on({
3679                    click: function () {
3680                        var this_ = $(this),
3681                            pDt = this_.closest('dt'),
3682                            num;
3683                        if (pDt.hasClass('oneClassT')) {
3684                            num = 'one';
3685                        } else if (pDt.hasClass('twoClassT')) {
3686                            num = 'two';
3687                        } else if (pDt.hasClass('threeClassT')) {
3688                            num = 'three';
3689                        }
3690                        if (this_.hasClass('open')) {
3691                            pDt.removeClass(num + 'ClassTopen').next("dd").removeClass(num + 'ClassCopen');
3692                            this_.removeClass("open");
3693                        } else {
3694                            pDt.addClass(num + 'ClassTopen').next("dd").addClass(num + 'ClassCopen');
3695                            this_.addClass("open");
3696                        }
3697                        if (!t.hasClass('sidebarLists')) {
3698                            catalogH(t);
3699                        }
3700                        return false;
3701                    }
3702                }, "dt code");
3703                t.on({
3704                    click: function (ev) {
3705                        var tagname = ev.target.tagName.toLocaleLowerCase(),
3706                            $this = $(this);
3707                        if (tagname != 'code') {
3708                            if (tagname == 'a') {
3709                                if ($this.attr('href') != '#' && $this.attr('href') != '###') {
3710                                    return true;
3711                                } else {
3712                                    $(this).closest('dt').find('code').trigger('click');
3713                                    return false;
3714                                }
3715                            } else {
3716                                $(this).closest('dt').find('code').trigger('click');
3717                            }
3718                        }
3719                    }
3720                }, 'dt *');
3721                t.on({
3722                    mouseenter: function () {
3723                        var pDt = $(this);
3724                        if (pDt.hasClass('oneClassT')) {
3725                            num = 'one';
3726                        } else if (pDt.hasClass('twoClassT')) {
3727                            num = 'two';
3728                        } else if (pDt.hasClass('threeClassT')) {
3729                            num = 'three';
3730                        }
3731                        pDt.addClass(num + 'ClassThover');
3732                    },
3733                    mouseleave: function () {
3734                        var pDt = $(this);
3735                        if (pDt.hasClass('oneClassT')) {
3736                            num = 'one';
3737                        } else if (pDt.hasClass('twoClassT')) {
3738                            num = 'two';
3739                        } else if (pDt.hasClass('threeClassT')) {
3740                            num = 'three';
3741                        }
3742                        pDt.removeClass(num + 'ClassThover');
3743                    }
3744                }, "dt");
3745                if (!t.hasClass('sidebarLists')) {
3746                    // 给上下按钮绑定事件
3747                    t.on({
3748                        click: function () {
3749                            if ($(this).hasClass('upBut')) {
3750                                move(t, 'down');
3751                            } else if ($(this).hasClass('downBut')) {
3752                                move(t, 'up');
3753                            }
3754                        }
3755                    }, "big.but");
3756
3757                    // 给元素本身绑定事件
3758                    t.on({
3759                        mouseenter: function () {
3760                            var this_ = $(this),
3761                                dl = this_.find("dl.oneClassList"),
3762                                dl_h = dl.height(),
3763                                t_h = this_.height();
3764                            if (dl_h > t_h || parseInt(dl.css("margin-top"), 10) < 0) {
3765                                this_.find("big.but").show();
3766                            }
3767                        },
3768                        mouseleave: function () {
3769                            $(this).find("big.but").hide();
3770                        }
3771                    });
3772                }
3773                t.data('bindevent', 1);
3774            }
3775        };
3776    if (obj_) {
3777        fun(obj_);
3778    } else {
3779        $("div.catalogList").each(function () {
3780            fun($(this));
3781        });
3782    }
3783};
3784/*
3785	menu-catalog-module
3786	抽屉型分类目录主要用来展示更多分类
3787*/
3788wsf.menuCatalogModule = function (obj_) {
3789    var fun = function (that) {
3790        if (!that.data('bindevent')) {
3791            var menuCatalog = that,
3792                Mo = menuCatalog.parents("div.Mo"),
3793                MoId = Mo.attr("id"),
3794                catalog = $("#menuCatalogMore_" + MoId.substr(3)),
3795                leveObj, hideTimeFun,
3796                moreInner = catalog.find(".catalog-more-inner"),
3797                gap = catalog.find("big.gap"),
3798                hideCatalog = function () {
3799                    hideTimeFun = setTimeout(function () {
3800                        leveObj.removeClass('one-class-hover').data('h', 0);
3801                        catalog.css("width", 0).data('visible', 
38010);
3802                    }, 500);
3803                };
3804            catalog.on({
3805                mouseenter: function () {
3806                    clearTimeout(hideTimeFun);
3807                },
3808                mouseleave: function () {
3809                    hideCatalog();
3810                }
3811            });
3812            menuCatalog.on({
3813                mouseenter: function () {
3814
3815                },
3816                mouseleave: function () {
3817                    hideCatalog();
3818                }
3819            });
3820            menuCatalog.on({
3821                mouseenter: function () {
3822                    var tObj = $(this);
3823                    clearTimeout(hideTimeFun);
3824                    leveObj = tObj.parent();
3825                    if (!leveObj.data('h')) {
3826                        leveObj.addClass("one-class-hover").data('h', 1).siblings('dd.one-class-hover').removeClass('one-class-hover').data('h', 0);
3827                        var indexs = leveObj.index(),
3828                            that_t = leveObj.position().top,
3829                            that_h = leveObj.outerHeight(),
3830                            inner_mt = parseInt(tObj.css("margin-top")),
3831                            inner_tbw = parseInt(tObj.css("borderTopWidth")),
3832                            inner_bbw = parseInt(tObj.css("borderBottomWidth")),
3833                            inner_h = tObj.innerHeight(),
3834                            l = menuCatalog.offset().left,
3835                            t = menuCatalog.offset().top,
3836                            gap_h = inner_h,
3837                            gap_t = that_t + inner_tbw + inner_mt,
3838                            moreList = catalog.find(".catalog-more-list:eq(" + indexs + ")");
3839                        l = l + menuCatalog.width() - 2;
3840                        gap.css({
3841                            height: gap_h + "px",
3842                            top: gap_t + "px"
3843                        });
3844                        moreList.siblings().hide();
3845                        if (moreList.find("dl").length >= 1) {
3846                            moreList.show();
3847                            catalog.css({
3848                                visibility: 'visible'
3849                            });
3850                        } else {
3851                            catalog.css({
3852                                visibility: 'hidden'
3853                            });
3854                        }
3855                        moreInner.css({
3856                            minHeight: gap_h + "px",
3857                            marginTop: that_t + inner_mt + 'px'
3858                        });
3859                        catalog.css({
3860                            left: l + "px",
3861                            top: t + "px"
3862                        });
3863                        if (!catalog.data('visible')) {
3864                            catalog.animate({
3865                                width: moreInner.outerWidth()
3866                            }, 200, function () {
3867                                catalog.css({
3868                                    width: "auto"
3869                                });
3870                            });
3871                            catalog.data('visible', 1);
3872                        }
3873                    }
3874                },
3875                mouseleave: function () {
3876                    //$(this).removeClass("one-class-hover");
3877                }
3878            }, ".one-class-inner");
3879            menuCatalog.data('bindevent', 1);
3880        }
3881    };
3882    if (obj_) {
3883        fun(obj_);
3884    } else {
3885        $("div.menu-catalog-module").each(function () {
3886            fun($(this));
3887        });
3888    }
3889};
3890/*
3891	tableModule
3892	createDate:2015/05/11
3893	用来给表格添加class
3894*/
3895wsf.tableModule = function () {
3896    var tableModule = $('div.tableModule');
3897    tableModule.each(function () {
3898        $(this).find('tr:first').addClass('trHead');
3899    });
3900};
3901/*
3902	tab-switch-module
3903	createDate:2015/03/24
3904	模块标签项切换功能,现在主要用在最终页的标签切换
3905*/
3906wsf.tabSwitchModule = function () {
3907    var tabSwitch = $("div.tab-switch-module");
3908    if(tabSwitch.length){
3909        tabSwitch.each(function(i, dom){
3910            dom = $(dom);
3911            var tabT = dom.find("div.tab-switch-t").filter(':first'),
3912            tabCItem = dom.find("div.tab-switch-c .tab-c-item");
3913            tabT.on({
3914                click: function () {
3915                    if (tabT.data('noswitch') != 1) {
3916                        var that = $(this),
3917                            indexs = that.index();
3918                        that.find("span").addClass("active");
3919                        that.siblings("li").find("span").removeClass("active");
3920                        tabCItem.each(function (i, itemDom) {
3921                            itemDom = $(itemDom);
3922                            i === indexs ? itemDom.addClass("tab-c-item-active") : itemDom.removeClass("tab-c-item-active");
3923                        });
3924                    }
3925                }
3926            }, "li");
3927        });
3928    }
3929};
3930/*
3931	form-module
3932	createDate:2017/09/20
3933	表单模块方法
3934*/
3935wsf.formModule = {
3936    defaultValVerify: function (formModule) {
3937        formModule = formModule || $('div.form-module');
3938        formModule.each(function (i, dom) {
3939            dom = $(dom);
3940            dom.on('blur focus', 'input[type="text"],textarea', function (event) {
3941                if(!('placeholder' in document.createElement('input'))){
3942                    var $this = $(this),
3943                        defaultVal = $this.attr('data-defaultval'),
3944                        changeVal = $this.val();
3945                    switch (event.type) {
3946                        case 'focusout':
3947                            (!changeVal || changeVal == defaultVal) && $this.val(defaultVal);
3948                            break;
3949                        case 'focusin':
3950                            (changeVal == defaultVal) && $this.val('');
3951                            break;
3952                    }
3953                }
3954            });
3955            dom.on({
3956                click:function(){
3957
3958                }
3959            },'input[type="submit"]');
3960        });
3961    },
3962    submit_verify: function (formModule, j) {
3963        formModule = formModule || $('div.form-module from');
3964        formModule.find('input[type="button"]').removeAttr('onclick');
3965        formModule.validationEngine('attach', {
3966            promptPosition: 'bottomLeft'
3967        });
3968        var formId = formModule.attr('id'),
3969            moId = formModule.closest('.Mo').attr('id'),
3970            message = null;
3971        if(j){
3972            $.each(j, function(i, v){
3973                if(v['MId'] == formId.substring(10)){
3974                    message = v;
3975                }
3976            });
3977        }
3978        formModule.on({
3979            click: function(){
3980                if(message.msg){
3981                    alert(decodeHtmlEntity(message.msg));
3982                }else{
3983                    var $this = $(this);
3984                    if(formModule.validationEngine("validate")){
3985                        // 判断是否显示图案验证 0表示显示,1表示不显示
3986                        if(!(message.showVerification*1)){
3987                            if(!tncode_div){
3988                                tncode.init('MessageBut',1);
3989                                tncode_div =true;
3990                            }else{
3991                                tncode.show();
3992                            }
3993                            $TN.onsuccess(function(){
3994                                formModule.append('<input type="hidden" name="tn_r" value="'+tncode._mark_offset+'">');
3995                                formModule.find('input[name="isSubmit"]').val(1);
3996                                formModule.submit();
3997                                $this.closest('.form-button').html('<font style="color:red;font-size:14px;">' + message.SubmitMsg + '...</font>');
3998                            });
3999                        }else{
4000                            formModule.find('input[name="isSubmit"]').val(1);
4001                            formModule.submit();
4002                        }
4003                    }
4004                }
4005            }
4006        }, 'input[type="button"]');
4007    }
4008};
4009// 自由编辑模块
4010wsf.customEditModule = function () {
4011    var customEditModule = $('div.custom-edit-module').each(function () {
4012        var t = $(this),
4013            tp = t.parent();
4014        t.css({
4015            height: tp.height()
4016        });
4017    });
4018};
4019/*
4020	video-module
4021	createDate:2017/11/01
4022	视频模块的方法
4023*/
4024wsf.videoModule = function (obj) {
4025    var fun = function (dom) {
4026        new chplayer({
4027            container: '#' + dom.attr('id'),
4028            variable: 'player',
4029            autoplay: !!dom.attr('data-autoplay'),
4030            volume: !!dom.attr('data-autoplay') ? 0 : 1,
4031            poster: dom.attr('data-pic'), //封面图片地址
4032            video: dom.attr('data-url')
4033        });
4034    };
4035    obj ? fun(obj) : $("div.video-module").each(function (i, dom) {
4036        dom = $(dom);
4037        if(dom.css('visibility') !== 'hidden'){
4038            fun(dom);
4039        }
4040    });
4041};
4042
4043/**
4044 * baidu map init
4045 *
4046 * @param id
4047 * @param x
4048 * @param y
4049 * @param content
4050 */
4051wsf.baiduInit = function (id, x, y, content) {
4052    var map;
4053    var marker;
4054    map = new BMap.Map("container_" + id);
4055    if (user_name == 'samui') {
4056        x = 99.997234;
4057        y = 9.501727;
4058        var point = new BMap.Point(x, y);
4059        map.centerAndZoom(point, 14);
4060    } else {
4061        var point = new BMap.Point(x, y);
4062        map.centerAndZoom(point, 15);
4063    }
4064
4065    map.disableDoubleClickZoom();
4066    var navCtrl = new BMap.NavigationControl({
4067        type: BMAP_NAVIGATION_CONTROL_ZOOM
4068    });
4069    map.addControl(navCtrl);
4070    marker = new BMap.Marker(point);
4071    map.addOverlay(marker);
4072    var kh_content = content;
4073    kh_content = $.trim(kh_content);
4074    if (kh_content) {
4075        var args = {
4076            width: 100,
4077            height: 60,
4078            title: "",
4079            enableAutoPan: false
4080        };
4081        var infoWindow = new BMap.InfoWindow(kh_content, args);
4082        marker.openInfoWindow(infoWindow);
4083    }
4084    map.addEventListener("click", function (e) {
4085        if (kh_content) {
4086            var args = {
4087                width: 100,
4088                height: 60,
4089                title: "",
4090                enableAutoPan: false
4091            };
4092            var infoWindow = new BMap.InfoWindow(kh_content, args);
4093            marker.openInfoWindow(infoWindow);
4094        }
4095    });
4096};
4097
4098/**
4099 * chart init
4100 *
4101 * @param type
4102 * @param id
4103 * @param start
4104 * @param end
4105 * @param step
4106 */
4107wsf.chartInit = function (type, id, start, end, step, data) {
4108    var chartDiv = $('#chartDiv' + id);
4109    if(chartDiv.is(':visible') && !chartDiv.data('loaddata')){
4110        chartDiv.html('');
4111        var chart = {};
4112        type = parseInt(type);
4113        if (type === 3) {
4114            chart = new dhtmlXChart({
4115                view: "line",
4116                container: "chartDiv" + id,
4117                value: "#value#",
4118                item: {
4119                    borderColor: "#1293f8",
4120                    color: "#ffffff"
4121                },
4122                line: {
4123                    color: "#1293f8",
4124                    width: 3
4125                },
4126                xAxis: {
4127                    template: "#title#"
4128                },
4129                offset: 0,
4130                yAxis: {
4131                    start: start,
4132                    end: end,
4133                    step: step,
4134                    template: function (obj) {
4135                        return obj;
4136                    }
4137                }
4138            });
4139        } else if (type === 2) {
4140            chart = new dhtmlXChart({
4141                view: "pie",
4142                container: "chartDiv" + id,
4143                value: "#value#",
4144                label: "#title#",
4145                pieInnerText: "#value#",
4146                shadow: 0,
4147                legend: {
4148                    width: 75,
4149                    align: "right",
4150                    valign: "middle",
4151                    template: "#title#"
4152                }
4153            });
4154        } else {
4155            chart = new dhtmlXChart({
4156                view: "bar",
4157                container: "chartDiv" + id,
4158                value: "#value#",
4159                radius: 0,
4160                border: true,
4161                xAxis: {
4162                    template: "#title#"
4163                },
4164                yAxis: {
4165                    start: start,
4166                    end: end,
4167                    step: step,
4168                    template: function (obj) {
4169                        return obj;
4170                    }
4171                }
4172            });
4173        }
4174        chart.parse(data, "json");
4175        chartDiv.data('loaddata',1);
4176    }
4177};
4178
4179/*
4180	row-classify-module
4181	createDate:2015/08/16
4182	横向产品分类列表模块的方法
4183*/
4184wsf.classifyModule = function () {
4185    var classifyModule = $("div.classify-module");
4186    if(classifyModule.length){
4187        var classList = ['classify-hover','pic-classify-hover'];
4188        classifyModule.on({
4189            'mouseenter mouseleave': function (ev) {
4190                var $this = $(this),curClass = '';
4191                switch(true){
4192                    case $this.hasClass('big-classify'):
4193                    case $this.hasClass('small-classify'):
4194                        curClass = classList[0];
4195                        break;
4196                    case $this.hasClass('small-pic-classify'):
4197                        curClass = classList[1];
4198                        break;
4199                }
4200                ev.type === 'mouseenter' ? $this.addClass(curClass) : $this.removeClass(curClass);
4201            }
4202        }, ".big-classify,.small-classify,.small-pic-classify");
4203        classifyModule.on('click', '.open-close-btn', function(){
4204            var $this = $(this),
4205                action = $this.data('action');
4206            if(action === 'open'){
4207                $this.closest('.small-classify-wrap').addClass('open-state');
4208                $this.data('action', 'close');
4209            }else{
4210                $this.closest('.small-classify-wrap').removeClass('open-state');
4211                $this.data('action', 'open');
4212            }
4213
4214        });
4215    }
4216};
4217/*选择列表*/
4218wsf.selectState = function () {
4219    $("#filterSort").on({
4220        mouseenter: function () {
4221            $(this).addClass("select-state-hover");
4222        },
4223        mouseleave: function () {
4224            $(this).removeClass('select-state-hover');
4225        }
4226    }, ".select-state");
4227};
4228/*
4229    manual-move-module
4230    createDate:2017/08/16
4231    手动移动模块
4232*/
4233wsf.manualMoveModule = function (obj) {
4234    var manual;
4235    manual = obj ? obj : $("div.manual-move-module");
4236    manual.each(function () {
4237        var t = $(this),
4238            li = t.find('li'),
4239            liNum = li.length,
4240            liW = li.outerWidth(),
4241            ulP = t.find(".pic-text-list-module");
4242        li.width(liW);
4243        ulP.width(liW * liNum).height(li.outerHeight());
4244    });
4245    manual.on({
4246        click: function () {
4247            var t = $(this),
4248                id = t.data('id'),
4249                obj = t.parent();
4250            moveFun(id, obj);
4251        }
4252    }, 'em.prev-move,em.next-move');
4253    manual.on({
4254        mouseenter: function () {
4255            var t = $(this);
4256            t.find('em.prev-move,em.next-move').css('visibility', 'visible');
4257        },
4258        mouseleave: function () {
4259            var t = $(this);
4260            t.find('em.prev-move,em.next-move').css('visibility', 'hidden');
4261        }
4262    });
4263    var moveFun = function (dir, obj) {
4264        var curManual = obj,
4265            list = curManual.find('.manual-move-body'),
4266            ulP = curManual.find(".pic-text-list-module"),
4267            li = ulP.find('li'),
4268            liNum = li.length,
4269            liWidth = li.outerWidth(),
4270            showNum = Math.floor((list.width()) / liWidth),
4271            ulPW = ulP.width(),
4272            ulPLeft = Math.abs(parseInt(ulP.css('margin-left'))),
4273            move = showNum * liWidth,
4274            newMove = ulPW - (ulPLeft + move),
4275            nowMove;
4276        if (curManual.data('move') == 1) return false;
4277        curManual.data('move', 1);
4278        if (dir == 'next') {
4279            if (newMove > 0 && newMove > move) {
4280                nowMove = move;
4281            } else {
4282                nowMove = newMove;
4283            }
4284            if (ulPW > move) {
4285                ulP.animate({
4286                    "marginLeft": "-=" + nowMove
4287                }, 500, function () {
4288                    curManual.removeData('move');
4289                });
4290            }
4291        } else {
4292            nowMove = ulPLeft > move ? move : ulPLeft;
4293            ulP.animate({
4294                "marginLeft": "+=" + nowMove
4295            }, 500, function () {
4296                curManual.removeData('move');
4297            });
4298        }
4299    };
4300};
4301/*
4302    absolute-menu-catalog
4303    createDate:2016/08/16
4304    商城分类模块
4305*/
4306wsf.absoluteModuleWrapBind = function () {
4307    var absMoInner = $("#absolute_module_inner");
4308    absMoInner.on({
4309        mouseenter: function () {
4310            var t = $(this);
4311            if (t.hasClass('absolute-menu-catalog')) {
4312                wsf.absoluteMenuCatalog();
4313            }
4314        }
4315    }, '.absolute-module');
4316};
4317wsf.absoluteMenuCatalog = function () {
4318    var menuCatalog = $('div.absolute-menu-catalog');
4319    if (menuCatalog.length > 0) {
4320        menuCatalog.each(function () {
4321            var t = $(this);
4322            if (!t.data('bindevent')) {
4323                var open = t.data('open'),
4324                    amc = t.find('.a-m-c'),
4325                    mch = t.find('.m-c-h'),
4326                    mcb = t.find('.m-c-b'),
4327                    mcm = t.find('.m-c-m'),
4328                    gap = mcm.find('.gap');
4329                t.on({
4330                    mouseleave: function () {
4331                        if (!open) {
4332                            amc.removeClass('a-m-c-open');
4333                            mch.removeClass('m-c-h-open');
4334                        }
4335                        if (mcm.data('open')) {
4336                            mcm.data('open', 0).css({
4337                                display: 'none'
4338                            });
4339                        }
4340                        mcb.find('.o-l-e').each(function () {
4341                            var ot = $(this);
4342                            if (ot.data('open')) {
4343                                ot.removeClass('o-l-e-open').data('open', 0);
4344                                var tNimg = ot.find('.o-l-h-n img');
4345                                tNimg.attr('src', tNimg.data('src'));
4346                            }
4347                        });
4348                    }
4349                });
4350                t.on({
4351                    mouseenter: function () {
4352                        if (!open) {
4353                            amc.addClass('a-m-c-open');
4354                            mch.addClass('m-c-h-open');
4355                        }
4356                    }
4357                }, '.m-c-h-i');
4358                t.on({
4359                    mouseenter: function () {
4360                        var that = $(this),
4361                            o_openId = that.data('id'),
4362                            tagOpen = 0;
4363                        if (!that.data('open')) {
4364                            /*更换小图标地址*/
4365                            that.addClass('o-l-e-open').data('open', 1);
4366                            var tNimg = that.find('.o-l-h-n img'),
4367                                thatSib = that.siblings('.o-l-e-open'),
4368                                sibNimg = thatSib.find('.o-l-h-n img');
4369                            tNimg.attr('src', tNimg.data('hsrc'));
4370                            thatSib.removeClass('o-l-e-open').data('open', 0);
4371                            sibNimg.attr('src', sibNimg.data('src'));
4372                            var oleiBTW = parseInt(that.find('.o-l-e-i').css('borderTopWidth')),
4373                                tHeight = that.find('.o-l-e-i').height(),
4374                                mcmiBTW = parseInt(mcm.find('.m-c-m-i').css('borderTopWidth')),
4375                                tTop = that.position().top - mch.height();
4376                            oleiBTW = (isNaN(oleiBTW) ? 0 : oleiBTW);
4377                            mcmiBTW = (isNaN(mcmiBTW) ? 0 : mcmiBTW);
4378                            gap.css({
4379                                height: tHeight + 'px',
4380                                top: (tTop + oleiBTW) + 'px'
4381                            });
4382                            if (t.data('mcmfixed')) {
4383                                mcm.find('.m-c-m-i').css({
4384                                    'margin-top': (tTop - mcmiBTW) + 'px'
4385                                });
4386                            }
4387                            mcm.find('.m-c-m-e').each(function () {
4388                                var iThis = $(this),
4389                                    m_openId = iThis.data('id');
4390                                if (m_openId == o_openId) {
4391                                    iThis.addClass('m-c-m-e-open');
4392                                    tagOpen = 1;
4393                                } else {
4394                                    iThis.removeClass('m-c-m-e-open');
4395                                }
4396                            });
4397                            if (tagOpen == 1) {
4398                                if (mcm.data('open') != 1) {
4399                                    mcm.css({
4400                                        display: 'block',
4401                                        visibility: 'hidden'
4402                                    });
4403                                    var macT = mch.height(),
4404                                        mcmW = mcm.width(),
4405                                        mcbiBRW = parseInt(mcb.find('.m-c-b-i').css('border-right-width')),
4406                                        mcmiBRW = parseInt(mcm.find('.m-c-m-i').css('border-left-width')),
4407                                        mcmL = mcb.width() - (isNaN(mcbiBRW) ? 0 : mcbiBRW) - (isNaN(mcmiBRW) ? 0 : mcmiBRW);
4408                                    mcm.css({
4409                                        visibility: 'visible',
4410                                        width: 0,
4411                                        left: mcmL + 'px',
4412                                        top: macT + 'px'
4413                                    });
4414                                    mcm.animate({
4415                                        width: mcmW
4416                                    }, 200).data('open', 1);
4417                                }
4418                            } else {
4419                                mcm.css({
4420                                    display: 'none'
4421                                }).data('open', 0);
4422                            }
4423                        }
4424                    }
4425                }, '.o-l-e');
4426                t.data('bindevent', 1);
4427            }
4428        });
4429    }
4430};
4431/*
4432	ev-tab-container
4433	createDate:2017/09/24
4434	新模块标签项切换功能
4435*/
4436wsf.evTabContent = {
4437    swtichFun: function (targetDom) {
4438        var that = this,
4439            CModulePA = targetDom.closest('.CModulePA'),
4440            evModuleEditBox = targetDom.find('.ev-module-edit-box:first');
4441        if (!evModuleEditBox.hasClass('ev-tab-active')) {
4442            var groupmark = targetDom.attr('data-groupmark'),
4443                tabmark = targetDom.attr('data-tabmark');
4444            evModuleEditBox.addClass('ev-tab-active');
4445            CModulePA.children('.ev-module-edit.ev-tab-container-one').not(targetDom).each(function (i, curDom) {
4446                curDom = $(curDom);
4447                curDom.attr('data-groupmark') === groupmark && curDom.find('.ev-module-edit-box:first').removeClass('ev-tab-active');
4448            });
4449            CModulePA.children('.ev-tab-container-two').each(function (i, curDom) {
4450                curDom = $(curDom);
4451                if (curDom.attr('data-groupmark') === groupmark) {
4452                    curDom.hasClass('ev-tab-active') && curDom.addClass('none').removeClass('ev-tab-active');
4453                    if (curDom.attr('data-tabmark') === tabmark) {
4454                        curDom.removeClass('none').addClass('ev-tab-active');
4455                        var dom = curDom.find('.ev-module-edit-box:first');
4456                        if (dom.data('animate-name')) {
4457                            wsf.f.annimationLoadMo(dom);
4458                        }else{
4459                            dom.find('.ev-module-edit-box,.customModule').each(function (i, dom) {
4460                                dom = $(dom);
4461                                if(dom.hasClass('ev-module-edit-box')){
4462                                    wsf.f.progressLoading(dom);
4463                                }
4464                                // 关于视频的加载
4465                                dom.hasClass('customModule') && (function(){
4466                                    var videoModule = dom.find('div.video-module');
4467                                    if(videoModule.length){
4468                                        wsf.videoModule(videoModule);
4469                                    }
4470                                })();
4471                                if(dom.data('animate-name')){
4472                                    wsf.f.annimationLoadMo(dom);
4473                                }else{
4474                                    wsf.f.imgLazyLoading(dom);
4475                                }
4476                            });
4477                        }
4478                    }
4479                }
4480            });
4481        }
4482    },
4483    loadBind: function(){
4484        var that = this;
4485        wsf.pDom.bodyDom.on({
4486            'mouseenter.tabSwitch': function () {
4487                var $this = $(this);
4488                if ($this.attr('data-trigger') === 'mouseenter') {
4489                    that.swtichFun($this);
4490                }
4491            },
4492            'click.tabSwitch': function () {
4493                var $this = $(this);
4494                if ($this.attr('data-trigger') === 'click') {
4495                    that.swtichFun($this);
4496                }
4497            },
4498            'mouseleave.tabSwitch': function () {
4499                var $this = $(this);
4500                if ($this.attr('data-trigger') === 'mouseenter') {
4501                    // that.swtichFun($this, 'leave');
4502                }
4503            }
4504        }, '.ev-tab-container-one');
4505    }
4506};
4507/*弹出层行的js*/
4508wsf.evAlertRow = {
4509    rowDom: null,
4510    writeStyle: function (cSId, styleArray) {
4511        var cSh = "";
4512        $.each(styleArray, function(i, v){
4513            $.each(v, function(key, v_){
4514                v_ = v_.replace(/\\\'/g, "'");
4515                cSh += v_;
4516            });
4517        });
4518        $("head").append("<style type='text/css' id=alert_" + cSId + ">" + cSh + "</style>");
4519    },
4520    alertJson: {},
4521    upMocon: function(curAlertDom, data){
4522        curAlertDom.find('.ev-module-edit,.customModule').each(function (i, dom) {
4523            dom = $(dom);
4524            var id = null, z = null;
4525            if (dom.hasClass('customModule')) {
4526                //收藏点赞绑定事件功能
4527                id = dom.children('.Mo').attr('id');
4528                z = wsf.f.s_j(dom.attr('data-attr')).z;
4529                var moduleData = wsf.f.s_j(dom.attr('data-attr'));
4530                (function () {
4531                    if (moduleData.mt == 21) {
4532                        CatalogMore = 1;
4533                        var menuCatalogMoreModule = $('#menuCatalogMoreModule');
4534                        !menuCatalogMoreModule.length && (menuCatalogMoreModule = $('<div id="menuCatalogMoreModule" class="menu-catalog-more-module"></div>').appendTo($('body')));
4535                        menuCatalogMoreModule.append(data.typeOtherHtml);
4536                    }
4537                    if(moduleData.mt == 8){
4538                        userUserLoginInfo();
4539                    }
4540                })();
4541                if(moduleData.mt == 7){
4542                    wsf.f.upJsFun(dom, data.MFormData);
4543                }else{
4544                    wsf.f.upJsFun(dom);
4545                }
4546            } else {
4547                wsf.f.upJsFun(dom);
4548            }
4549            if (data.jsData) {
4550                wsf.queryMJsEffect(data.jsData);
4551            }
4552        });
4553    },
4554    showAlert: function (alertId, openType) {//显示弹窗函数
4555        var that = this,
4556            jsonCurDom = null,
4557            url = null,
4558            parWin = window.parent || null;
4559        that.rowDom.is(':hidden') && that.rowDom.show();
4560        jsonCurDom = that.alertJson[alertId],
4561            setTimFun = function(jsonCurDom){//延迟动画加载函数
4562                setTimeout(function () {
4563                    var curDom = jsonCurDom[0],
4564                        curDomEditBox = curDom.find('div.ev-module-edit-box:first'),
4565                        aDelay = 0,aDuration = 0, timeout;
4566                    that.rowDom.is(':hidden') && that.rowDom.show();
4567                    jsonCurDom[0].removeClass('none');
4568                    that.rowDom.append(jsonCurDom[1].removeClass('none'));
4569                    if (curDomEditBox.data('animate-name')) {
4570                        wsf.f.annimationLoadMo(curDomEditBox);
4571                    }else{
4572                        curDomEditBox.find('.ev-module-edit,.customModule').each(function (i, dom) {
4573                            dom = $(dom);
4574                            wsf.f.upJsFun(dom);
4575                            if(dom.hasClass('customModule')){
4576                                wsf.f.annimationLoadMo(dom);
4577                            }else{
4578                                var curDomEditBox = dom.find('div.ev-module-edit-box:first');
4579                                if(curDomEditBox.data('animate-name')){
4580                                    wsf.f.annimationLoadMo(curDomEditBox);
4581                                }
4582                            }
4583                            wsf.f.imgLazyLoading(dom);
4584                        });
4585                    }
4586                }, openType === 'load' ? jsonCurDom[0].attr('data-opendelay') * 1000 : 0);
4587            };
4588        if (!jsonCurDom) {
4589            $.get('/Ajax/TJIndex.php?type=8&username=' + user_name + '&tab_id=' + alertId + '&ch_id=' + GData.allChId + (is_action ? '&is_design=1' : ''), function (data) {
4590                if(data.success * 1){
4591                    var loadFun = function(){
4592                        jsonCurDom = that.alertJson[alertId] = [$(data.html.replace(/\\'/g,"'")), $('<div class="none alertBg alertBg-' + alertId + '" id="alertBg_' + alertId + '"></div>')];
4593                        that.rowDom.find('.CModulePA').append(jsonCurDom[0]);
4594                        //回显点赞,收藏方法
4595                        if(data.docSysIds || data.SMAlbumSysIds || data.SMAlbumIds){
4596                            GData.docSysIds = GData.SMAlbumSysIds = GData.SMAlbumIds = '';
4597                            data.docSysIds  && (GData.docSysIds = data.docSysIds);
4598                            data.SMAlbumSysIds && (GData.SMAlbumSysIds = data.SMAlbumSysIds);
4599                            data.SMAlbumIds  && (GData.SMAlbumIds = data.SMAlbumIds);
4600                            wsf.albumsDataLoad();
4601                        }
4602                        if(jsonCurDom[0].attr('data-positiontype') * 1){
4603                            wsf.f.positionShow(jsonCu
4603rDom[0], jsonCurDom[0].attr('data-position') - 1);
4604                        }else{
4605                            jsonCurDom[0].css({
4606                                left: Math.floor(jsonCurDom[0].attr('data-lshifting') * 1 + (wsf.pDom.bodyDom.width() - userSiteWidth) / 2) + 'px',
4607                                top: jsonCurDom[0].attr('data-tshifting') + 'px'
4608                            });
4609                        }
4610                        that.upMocon(jsonCurDom[0], data);
4611                        setTimFun(jsonCurDom);
4612                        if(!is_action){
4613                            wsf.evAlertRow.writeStyle(alertId, [data.Mstyle, data.SMstyle]);
4614                        }
4615                    };
4616                    if(data.MShowStyleList[13] || data.MShowStyleList[12] || data.MShowStyleList[9] || data.MShowStyleList[7]){
4617                        var whenArray = [];
4618                        if(data.MShowStyleList[12] && typeof(BMap) === 'undefined'){
4619                            whenArray.push($.getScript('//api.map.baidu.com/getscript?v=2.0&ak=l3M8jnzdfgKoAB0uG2YAFIaoyHukxQ7a&services=&t=20180823194355'));
4620                        }
4621                        if(data.MShowStyleList[13] && typeof(dhtmlXChart) === 'undefined'){
4622                            whenArray.push($.getScript(ALIYUN_OSS_DOMAIN + 'plugins/public/dhtmlxChart/dhtmlxchart.min.js'));
4623                        }
4624                        if(data.MShowStyleList[9] && typeof(chplayer) === 'undefined'){
4625                            whenArray.push($.ajax({
4626                                dataType:'script',
4627                                scriptCharset:'utf-8',
4628                                url:ALIYUN_OSS_DOMAIN + 'plugins/public/js/chplayer/chplayer.min.js'
4629                            }));
4630                        }
4631                        if(data.MShowStyleList[7]){
4632                            if(typeof(tncode) === 'undefined'){
4633                                !$('#sliding_css_src').length && $( "<link/>", {
4634                                    rel: "stylesheet",
4635                                    type: "text/css",
4636                                    id: 'sliding_css_src',
4637                                    href: ALIYUN_OSS_DOMAIN + "plugins/public/js/slidingVerification/sliding_verification_style.css"
4638                                }).appendTo( "head" );
4639                                whenArray.push($.getScript(ALIYUN_OSS_DOMAIN + 'plugins/public/js/slidingVerification/sliding_tn_code.js'));
4640                            }
4641                            if(typeof(jQuery.validationEngine) === 'undefined'){
4642                                !$('#from_module_form_css').length && $( "<link/>", {
4643                                    rel: "stylesheet",
4644                                    type: "text/css",
4645                                    id: 'from_module_form_css',
4646                                    href: ALIYUN_OSS_DOMAIN + "plugins/public/js/from/form.min.css"
4647                                }).appendTo( "head" );
4648                                whenArray.push($.getScript(ALIYUN_OSS_DOMAIN + 'plugins/public/js/from/form.min.js'));
4649                            }
4650                        }
4651                        if(whenArray.length){
4652                            $.when.apply(this, whenArray).done(function(){
4653                                loadFun();
4654                            });
4655                        }else{
4656                            loadFun();
4657                        }
4658                    }else{
4659                        loadFun();
4660                    }
4661                }else{
4662                    // wsf.f.alertWindow(data.error, 'error', 3);
4663                }
4664            }, 'json');
4665        }else{
4666            setTimFun(jsonCurDom);
4667        }
4668    },
4669    loadBind: function () {
4670        var that = this;
4671        that.rowDom = $('div.alertPublicModuleRow:first');
4672        wsf.pDom.bodyDom.on({
4673            click: function () {
4674                var $this                = $(this),
4675                    evAlertContainer     = $this.closest('.ev-alert-container'),
4676                    alertPublicModuleRow = $this.closest('.alertPublicModuleRow'),
4677                    tabStrId             = evAlertContainer.attr('id').substr(5),
4678                    closetype            = parseInt(evAlertContainer.attr('data-closetype')),
4679                    opentype             = parseInt(evAlertContainer.attr('data-opentype'));
4680
4681                if (evAlertContainer.attr('data-new') * 1 === 1) {
4682                    // DF.pub.Fun.addAlertContainer.editName();
4683                } else {
4684                    if (opentype === 0 && closetype === 1 && !is_action) {
4685                        var alertTabList = {},
4686                            alertTabCookieInfo = readCookie(user_name+'_tjAlertTabList');
4687
4688                        if (alertTabCookieInfo) {
4689                            alertTabList = JSON.parse(alertTabCookieInfo);
4690                        }
4691
4692                        alertTabList[tabStrId] = new Date().getTime();
4693                        writeCookie(user_name+'_tjAlertTabList', JSON.stringify(alertTabList), 1000*24);
4694                    }
4695
4696                    evAlertContainer.addClass('none');
4697                    evAlertContainer.find('.ev-module-edit-box').each(function(i, dom){
4698                        dom = $(dom);
4699                        if(dom.attr('data-animate-name')){
4700                            dom.addClass('load-animate');
4701                            dom.removeData('loadanimate');
4702                        }
4703                    })
4704                    alertPublicModuleRow.children('#alertBg_' + tabStrId).addClass('none');
4705                    is_action && evAlertContainer.removeClass('curEditModuleSize');
4706                    if (!evAlertContainer.siblings('.ev-alert-container:not(.none)').length) {
4707                        alertPublicModuleRow.removeClass('editShowAlertRow');
4708                    }
4709                }
4710                if(is_action){
4711                    wsf.pDom.bodyDom.trigger('click');
4712                    parWin.Ev.admin.tj.v.editShowAlert = null;
4713                }
4714                evAlertContainer.find('.video-module').each(function(i, dom){
4715                    var video = $(dom).find('video');
4716                    video.length && video[0].pause();
4717                });
4718                !is_action && evAlertContainer.find('.online-video-module').each(function(i, dom){
4719                    dom = $(dom);
4720                    var iframe = dom.find('iframe');
4721                    if(iframe.length){
4722                        iframe.attr('data-src', iframe.attr('src'));
4723                        iframe.removeAttr('src');
4724                        dom.attr('data-removesrc',1);
4725                    }
4726                });
4727            }
4728        }, '.alert-close-btn');
4729        if (!is_action && GData.tabAlertStrMs) {
4730            $.each(GData.tabAlertStrMs.split(','), function (i, v) {
4731                that.showAlert(v, 'load');
4732            });
4733        }
4734    }
4735};
4736/*进度变换*/
4737wsf.progress = {
4738    judge: function(){
4739        var that = this;
4740        that.defDomJson = [];
4741        $('div.ev-progress-module').each(function(i, dom){
4742            dom = $(dom);
4743            if(!dom.closest('.load-animate').length){
4744                that.defDomJson.push({
4745                    'dom': dom,
4746                    'oTop': dom.offset().top,
4747                    'loaded': false
4748                });
4749            }
4750        });
4751    },
4752    showProgress: function(t, h){
4753        var that = this;
4754        $.each(that.defDomJson, function (i, v) {
4755            if (!v.loaded) {
4756                if ((t + h * 0.9) >= v.oTop) {
4757                    that.load(v.dom);
4758                    v.loaded = true;
4759                }
4760            }
4761        });
4762    },
4763    numberSkin: {
4764        skin2:{type:'img', url:'img'},
4765        skin2:{type:'span', cname:'img'}
4766    },
4767    barFun: {
4768        type1:function(){
4769            return null;
4770        },
4771        type2: function (dom) {
4772            var bar = dom.find('.bar'),
4773                maxVal = dom.attr('data-maxval') * 1;
4774            return function (v) {
4775                bar.css({width: (v / maxVal) * 100 + '%'});
4776            };
4777        },
4778        type3: function (dom) {
4779            var bar = dom.find('.bar'),
4780                maxVal = dom.attr('data-maxval') * 1;
4781            return function (v) {
4782                bar.css({width: (v / maxVal) * 100 + '%'});
4783            };
4784        },
4785        type4: function (dom) {
4786            var bar = dom.find('.bar'),
4787                maxVal = dom.attr('data-maxval') * 1;
4788            return function (v) {
4789                bar.css({height: (v / maxVal) * 100 + '%'});
4790            };
4791        },
4792        type5: function (dom) {
4793            var bar = dom.find('.bar'),
4794                maxVal = dom.attr('data-maxval') * 1;
4795            return function (v) {
4796                bar.css({height: (v / maxVal) * 100 + '%'});
4797            };
4798        }
4799    },
4800    progressArr:{},
4801    load: function (progress) {
4802        var that = this,
4803            smallType = (function(){
4804                var barClass = progress.find('div:first-child').attr('class'),
4805                    x = 0,
4806                    arr = ['p-num','p-bar-2','p-bar-3','p-bar-4','p-bar-5'];
4807                $.each(arr, function(i, v){
4808                    if(barClass.indexOf(v) !== -1){
4809                        x = i + 1;
4810                        return false;
4811                    }
4812                });
4813                return x;
4814            }()),
4815            j = {
4816                target: progress.find('.num-e'),
4817                startVal: progress.attr('data-startval') * 1,
4818                endVal: progress.attr('data-endval') * 1,
4819                decimals: progress.attr('data-decimals') * 1,
4820                duration: progress.attr('data-duration') * 1,
4821                grouping: !!(progress.attr('data-grouping') * 1),
4822                easingFn: 'easeOut',
4823                separator: ',',
4824                decimal: '.',
4825                prefix: '',
4826                suffix: '',
4827                numerals: [],
4828                runCallback: that.barFun['type' + smallType](progress),
4829                startCallback: function () {},
4830                endCallback: function () {}
4831            };
4832        ($.inArray(smallType, [2, 3, 4, 5]) !== -1) && progress.find('.num-m').text(progress.attr('data-maxval'));
4833        progress.countUp(j);
4834        progress.data('countup').start();
4835    }
4836};
4837
4838/*
4839    show-big-pic
4840    createDate:2017/09/24
4841    产品最终页的图片效果
4842*/
4843wsf.innerPreview = function (id) {
4844    var preview = $(id),
4845        bigPics = preview.find(".show-big-pic"),
4846        bigPic = bigPics.find(".pic"),
4847        bigPicW = parseInt(bigPic.width()),
4848        bigPicH = parseInt(bigPic.height()),
4849        smallListArea = preview.find(".small-pic-list-area"),
4850        sList = smallListArea.find(".small-pic-list"),
4851        sListW = sList.width(),
4852        sListUl = sList.find("ul"),
4853        ulW = 0,
4854        spic = null,
4855        zoom = null;
4856    sListUl.find("li").each(function () {
4857        ulW += $(this).width();
4858    });
4859    sListUl.width(ulW).attr('data-left', 0);
4860    // 左右按钮绑定事件
4861    smallListArea.on({
4862        click: function () {
4863            var $this = $(this),
4864                action = $(this).data('action'),
4865                curleft = sListUl.attr('data-left') * 1,
4866                moveleft = null;
4867            if (!$this.data('click') && ulW > sListW) {
4868                $this.data('click', 1);
4869                switch (action) {
4870                    case 'left':
4871                        curleft != 0 && (function () {
4872                            if (curleft - sListW != 0) {
4873                                moveleft = Math.min(Math.max(curleft - sListW, curleft), sListW);
4874                            } else {
4875                                moveleft = sListW;
4876                            }
4877                            moveleft = -moveleft;
4878                        })();
4879                        break;
4880                    case 'right':
4881                        (function () {
4882                            moveleft = Math.min(ulW - curleft - sListW, sListW);
4883                        })();
4884                        break;
4885                }
4886                sListUl.animate({
4887                    marginLeft: -(curleft + moveleft)
4888                }, 600, function () {
4889                    sListUl.attr('data-left', (curleft + moveleft));
4890                    $this.data('click', 0);
4891                });
4892            }
4893        }
4894    }, '.move-btn');
4895    // 小图li绑定事件
4896    smallListArea.on({
4897        mouseenter: function () {
4898            var $this = $(this);
4899            $this.addClass("liCur").siblings('.liCur').removeClass('liCur');
4900            var sImgUrl = $this.find("img").attr('data-imgsrc'),
4901                bigPicsImg = bigPics.find("img"),
4902                oImg = new Image();
4903            sImgUrl = sImgUrl.indexOf('?') != '-1' ? sImgUrl.substr(0, sImgUrl.indexOf('?')) : sImgUrl;
4904            bigPicsImg.attr('src', '/images/VNew/loading-wait-bg.gif').attr('data-imgsrc', sImgUrl);
4905            oImg.onload = function () {
4906                bigPicsImg.attr({
4907                    "src": oImg.src
4908                });
4909            }
4910            oImg.src = sImgUrl + '?x-oss-process=image/resize,m_lfit,limit_1,w_' + parseInt(bigPicW) + ',h_' + parseInt(bigPicH);
4911        }
4912    }, 'li');
4913    // 初始化方法
4914    smallListArea.find('li').each(function (i, dom) {
4915        dom = $(dom);
4916        var pic = dom.find('.pic'),
4917            getImage = pic.find('img'),
4918            sImgUrl = getImage.attr('data-imgsrc'),
4919            oImage = new Image();
4920        sImgUrl = sImgUrl.indexOf('?') != '-1' ? sImgUrl.substr(0, sImgUrl.indexOf('?')) : sImgUrl;
4921        getImage.attr('data-imgsrc', sImgUrl);
4922        oImage.onload = function () {
4923            getImage.attr('src', this.src);
4924        };
4925        oImage.src = sImgUrl + '?x-oss-process=image/resize,m_lfit,limit_1,w_' + pic.width().toFixed(0) + ',h_' + pic.height().toFixed(0);
4926        i == 0 && dom.trigger('mouseenter');
4927    });
4928    if (!bigPics.data('desabledZoom')) {
4929        bigPics.on({
4930            mouseenter: function (event) {
4931                if(!bigPics.data('videoplay')){
4932                    var $this = $(this),
4933                        getImgSrc = $this.find("img").attr('data-imgsrc');
4934                    if ($this.data("hover") != 1) {
4935                        $this.data("hover", 1);
4936                        zoom = $('<div class="zoom"></div>');
4937                        $this.find('.pics').append(zoom);
4938                        spic = $('<div class="zoomPic"><img src="' + getImgSrc + '" /></div>');
4939                        spic.css({
4940                            "left": (preview.width() + 10) + "px",
4941                            "top": "0px"
4942                        });
4943                        spic.appendTo(preview);
4944                    }
4945                    var l = event.clientX,
4946                        t = event.clientY + $(document).scrollTop();
4947                    fun(l, t);
4948                }
4949            },
4950            mousemove: function (event) {
4951                zoom && fun(event.clientX, event.clientY + $(document).scrollTop());
4952            },
4953            mouseleave: function () {
4954                var $this = $(this);
4955                $this.removeData("hover");
4956                zoom.remove();
4957                spic.remove();
4958                zoom = spic = null;
4959            }
4960        });
4961        var fun = function (l, t) {
4962            var zoomW = (zoom.outerWidth() || zoom.width());
4963            zoomH = (zoom.outerHeight() || zoom.height());
4964            l = l - bigPic.offset().left - zoomW / 2;
4965            t = t - bigPic.offset().top - zoomH / 2;
4966            if (l < 0) {
4967                l = 0;
4968            } else if (l > bigPic.outerWidth() - zoomW) {
4969                l = bigPic.outerWidth() - zoomW;
4970            }
4971            if (t < 0) {
4972                t = 0;
4973            } else if (t > bigPic.outerHeight() - zoomH) {
4974                t = bigPic.outerHeight() - zoomH;
4975            }
4976            zoom.css({
4977                "left": l + "px",
4978                "top": t + "px"
4979            });
4980            var lx = l / (bigPic.outerWidth() - zoomW);
4981            var tx = t / (bigPic.outerHeight() - zoomH);
4982            var img = spic.children("img");
4983            img.css({
4984                "left": -lx * (img.outerWidth() - spic.outerWidth()) + "px",
4985                "top": -tx * (img.outerHeight() - spic.outerHeight()) + "px"
4986            });
4987        };
4988    }
4989    bigPics.on({
4990        click: function(e){
4991            var clickDom = $(e.target),
4992                mp4VideoDiv = bigPics.find('.mp4-video-div');
4993            switch(true){
4994                case clickDom.hasClass('mp4-play'):
4995                    bigPics.trigger('mouseleave');
4996                    mp4VideoDiv.show().find('#prodectVideo').css({
4997                        width: bigPics.width() + 'px',
4998                        height: bigPics.height() + 'px'
4999                    });
5000                    new chplayer({
5001                        container: '#prodectVideo',
5002                        variable: 'player',
5003                        autoplay: true,
5004                        poster: mp4VideoDiv.attr('data-pic'), //封面图片地址
5005                        video: mp4VideoDiv.attr('data-url')
5006                    });
5007                    bigPics.data('videoplay',1).find('.mp4-close').show();
5008                    clickDom.hide();
5009                    break;
5010                case clickDom.hasClass('mp4-close'):
5011                    mp4VideoDiv.hide().find('#prodectVideo').html('');
5012                    clickDom.hide();
5013                    bigPics.removeData('videoplay').find('.mp4-play').show();
5014                    bigPics.trigger('mouseenter');
5015                    break;
5016            }
5017        }
5018    },'.mp4-play,.mp4-close');
5019};
5020/*
5021    pWapBuyArea
5022    createDate:2017/09/24
5023    产品最终页的手机扫码购买功能
5024*/
5025wsf.innerWapBuy = function () {
5026    var pWapBuyArea = $("#pWapBuyArea");
5027    if (pWapBuyArea.length) {
5028        var pPriceList = $("#pPriceList"),
5029            t;
5030        if (pPriceList.length) {
5031            t = pPriceList.position().top;
5032        } else {
5033            t = 32;
5034        }
5035        pWapBuyArea.css({
5036            top: t + 'px'
5037        });
5038        pWapBuyArea.on({
5039            mouseenter: function () {
5040                $(this).addClass('p-wap-buy-area-hover');
5041            },
5042            mouseleave: function () {
5043                $(this).removeClass('p-wap-buy-area-hover');
5044            }
5045        });
5046    }
5047};
5048/*产品选号*/
5049wsf.tel_select = function(pro_id, v_id){
5050    if(v_id){
5051        var v = $('#'+v_id).val() || '';
5052    }
5053    wsf.f.openWin('选号', '/dom/phone_select.php?username=' + user_name + '&pid='+pro_id+'&v='+v, 850, 500);
5054};
5055/*注册登录协议窗口*/
5056wsf.agreement_alert = function(url, title){
5057    wsf.f.openWin(title, url, 850, 500);
5058};
5059/*
5060    pCouponList
5061    createDate:2018/07/16
5062    优惠券领取弹窗
5063*/
5064wsf.pShowGetCoupon = function(){
5065    var pCouponList = $('#pCouponList');
5066    if (pCouponList.length) {
5067        pCouponList.on('click', '.get-coupon-b', function () {
5068            var zzUserid = readCookie('zz_userid');
5069
5070            if (!zzUserid) {
5071                pc_login_alert();
5072                return true;
5073            }
5074
5075            var id = parseInt($(this).data("id"));
5076            if (!id || !pro_id) {
5077                wsf.f.alertWindow("参数有误!");
5078                return true;
5079            }
5080
5081            var jiFenObj = $("#pCouponList");
5082            var payJiFen = parseInt($(this).data("payjifen"));
5083            var interactionJiFen = parseInt($(this).data("interactionjifen"));
5084            var payJiFenCount = parseInt(jiFenObj.attr("data-payjifen"));
5085            var payJifFenName = jiFenObj.attr("data-payjifenname");
5086            var interactionJiFenCount = parseInt(jiFenObj.attr("data-interactionjifen"));
5087            var interactionJifFenName = jiFenObj.attr("data-interactionjifenname");
5088
5089            var checkPay = 1;
5090            var checkInteraction = 1;
5091
5092            if (payJiFen && payJiFen > payJiFenCount) {
5093                checkPay = 0;
5094            }
5095            if (interactionJiFen && interactionJiFen > interactionJiFenCount) {
5096                checkInteraction = 0;
5097            }
5098
5099            if (checkInteraction === 0 || checkPay === 0) {
5100                var errorMsg = '领取优惠卷需要';
5101                if (payJiFen) {
5102                    errorMsg += payJifFenName + payJiFen + '积分,<br />';
5103                }
5104                if (interactionJiFen) {
5105                    errorMsg += interactionJifFenName + interactionJiFen + '积分,';
5106                }
5107
5108                if (checkInteraction === 0 && checkPay === 0) {
5109                    errorMsg += "您的"+payJifFenName+'积分和'+interactionJifFenName+'不足,';
5110                } else if (checkInteraction === 0) {
5111                    errorMsg += "您的"+interactionJifFenName+'不足,<br />';
5112                } else if (checkPay === 0) {
5113                    errorMsg += "您的"+payJifFenName+'积分不足,';
5114                }
5115                errorMsg += '暂不能参加该活动,非常抱歉!';
5116
5117                wsf.f.alertWindow(errorMsg, 'error');
5118                return true;
5119            }
5120
5121            var yes = function ()
5122            {
5123                $.getJSON("/Ajax/Product.php?type=11&claim_type=1&username=" + user_name + "&pid=" + pro_id + "&coupon_id=" + id, function (data) {
5124                    var pdom = null,
5125                        idom = '<i class="icon fail-icon"></i>',
5126                        htmls;
5127
5128                    data.status = parseInt(data.status);
5129                    if (parseInt(data.success) === 0  && data.status === 0) {
5130                        wsf.f.alertWindow(data.error);
5131                        return true;
5132                    }
5133
5134                    switch (data.status * 1) {
5135                        case 0:
5136                            pdom = '<div class="coupon-text">恭喜,您已成功领取<span class="red">满' + CURRENCY_SIGN + data.over_price + '减' + CURRENCY_SIGN + data.ticket_price + '</span>优惠券。</div><div class="coupon-time">使用时间:' + data.start_time + '-' + data.end_time + '</div>';
5137                            idom = '<i class="icon success-icon"></i>';
5138
5139                            if (payJiFen) {
5140                                jiFenObj.attr("data-payjifen", payJiFenCount - payJiFen);
5141                            }
5142                            if (interactionJiFen) {
5143                                jiFenObj.attr("data-interactionjifen", interactionJiFenCount - interactionJiFen);
5144                            }
5145
5146                            break;
5147                        case 1:
5148                            pdom = '<div class="coupon-text">您所属的会员不能领取</div>';
5149                            break;
5150                        case 2:
5151                            pdom = '<div class="coupon-text">已全部领取</div>';
5152                            break;
5153                        case 3:
5154                            pdom = '<div class="coupon-text">您已经领取</div>';
5155                            break;
5156                    }
5157                    htmls = '<div class="get-coupon-alert"><div class="coupon-alert-inner">' + idom + pdom + '<div class="coupon-href"><a href="/dom/Coupon/Coupon.php?username=' + user_name + '&channel_id=' + data.couponChId + '"> 查看更多优惠券</a><i></i><a href="/dom/my_coupon.php?username=' + user_name + '&ls_cur=8">我的优惠券</a></div><div class="coupon-btn"><a class="enter-btn" href="javascript:;">确定</a></div></div></div>';
5158                    var winNumber = $.popup({
5159                        cName: 'evPopupWhite',
5160                        head: {yes: 0},
5161                        type: 4,
5162                        con: {
5163                            html: htmls
5164                        }
5165                    });
5166                    $('#evPopup_' + winNumber).on('click', '.enter-btn', function () {
5167                        $.popupClose(winNumber);
5168                    });
5169                });
5170            }
5171
5172            if (payJiFen || interactionJiFen) {
5173                var msg = '领取优惠卷,需消耗';
5174                if (payJiFen) {
5175                    msg += payJifFenName +'<br />'+ payJiFen + '积分,';
5176                }
5177                if (interactionJiFen) {
5178                    msg += interactionJifFenName + interactionJiFen + '积分,';
5179                }
5180                msg += '确定领取吗?';
5181
5182                $.popup({
5183                    type: 2,
5184                    animate: {
5185                        type: 1
5186                    },
5187                    cName: "evPopupWhite",
5188                    area: {
5189                        w: 300
5190                    },
5191                    con: {
5192                        text: [1, msg],
5193                        img: [1, 'warn']
5194                    },
5195                    but: {
5196                        yes: 1,
5197                        button: {
5198                            but_1: {
5199                                text: $weisiteLa.QuXiao,
5200                                fun: function () {
5201
5202                                }
5203                            },
5204                            but_2: {
5205                                text: $weisiteLa.QueDing,
5206                                fun: yes
5207                            }
5208                        }
5209                    }
5210                });
5211            } else {
5212                yes();
5213            }
5214        });
5215        pCouponList.on({
5216            'mouseenter': function () {
5217                var $this = $(this),
5218                    classifyModule = null;
5219                if ($this.find('.small-classify-wrap-more').length) {
5220                    classifyModule = $this.find('.classify-module');
5221                    classifyModule.addClass('classify-module-show');
5222                    $this.data('show', 1);
5223                }
5224            },
5225            'mouseleave': function () {
5226                var $this = $(this);
5227                if ($this.data('show')) {
5228                    $this.find('.classify-module').removeClass('classify-module-show');
5229                }
5230            }
5231        });
5232    }
5233};
5234// 产品最终页中的联系方式相关的js
5235wsf.pContactList = function(){
5236    var pContactList = $('#pContactList');
5237    if(pContactList.length){
5238        pContactList.on('click', '.wechat-classify-wrap', function(){
5239            var $this = $(this),
5240                dataImg = $this.attr('data-img'),
5241                htmls = '<div class="show-contact-wechat"><div class="wechat-pic"><img src="' + dataImg + '" /></div><p>微信扫一扫,添加客服</p></div>';
5242            $.popup({
5243                cName:'evPopupWhite',
5244                head : {yes: 0},
5245                type : 4,
5246                con : {
5247                    html : htmls
5248                }
5249            });
5250
5251        });
5252    }
5253}
5254
5255// 产品最终页中的联系方式相关的js
5256wsf.productPrevNextPosition = function(){
5257    var productPrevBtn = $('#productPrevBtn'),
5258        productNextBtn = $('#productPrevBtn');
5259    if(productPrevBtn.length || productNextBtn.length){
5260        var bodyW = $('body').width(),
5261            headH = $('#main_container').offset().top();
5262        userSiteWidth;
5263        productPrevBtn.css({
5264
5265        })
5266    }
5267}
5268/*
5269    createDate:2017/09/24
5270    预售js方法(人数列表显示更多)
5271*/
5272wsf.presellPeopleListFun = function () {
5273    var presellPeopleList = $("#presellPeopleList");
5274    presellPeopleList.on('click', 'small', function () {
5275        var $this = $(this);
5276        if (!$this.hasClass('switch-on')) {
5277            $this.addClass('switch-on');
5278            presellPeopleList.find('.classify-wrap-hide').show();
5279        } else {
5280            $this.removeClass('switch-on');
5281            presellPeopleList.find('.classify-wrap-hide').hide();
5282        }
5283    });
5284};
5285/*
5286    createDate:2017/09/24
5287    倒计时函数
5288*/
5289wsf.countDown = function (j) {
5290    j.type = j.type || 1;
5291    var r = function (t) {
5292            var a = t.split(' '),
5293                ymd = a[0],
5294                hms = a[1],
5295                str = ymd.split('-'),
5296                fix = hms.split(':'),
5297                year = str[0] - 0,
5298                month = str[1] - 0 - 1,
5299                day = str[2] - 0,
5300                hour = fix[0] - 0,
5301                minute = fix[1] - 0,
5302                second = fix[2] - 0,
5303                time = (new Date(year, month, day, hour, minute, second)).getTime();
5304            return parseInt(time / 1000);
5305        },
5306        o = j.o,
5307        st = r(j.st),
5308        et = r(j.et),
5309        nts = j.nt ? r(j.nt) : (new Date().getTime() / 1000),
5310        underway = function (sType) {
5311            var d, h, mi, s, now = nts,
5312                c = (sType === 'b' ? st : et) - now,
5313                html_;
5314            nts = nts + 1;
5315            if (c > 0) {
5316                d = Math.floor(c / (60 * 60 * 24));
5317                h = Math.floor((c - d * 24 * 60 * 60) / 3600);
5318                mi = Math.floor((c - d * 24 * 60 * 60 - h * 3600) / 60);
5319                s = Math.floor(c - d * 24 * 60 * 60 - h * 3600 - mi * 60);
5320                h = h < 10 ? '0' + h : h;
5321                mi = mi < 10 ? '0' + mi : mi;
5322                s = s < 10 ? '0' + s : s;
5323                switch(j.type){
5324                    case 1:
5325                        html_ = '<span class="count-time"><i>' + d + '</i><em>天</em><i>' + h + '</i><em>时</em><i>' + mi + '</i><em>分</em><i>' + s + '</i><em>秒</em></span>';
5326                        break;
5327                    case 2:
5328                        html_ = '<span class="count-time"><i>' + h + '</i><em>:</em><i>' + mi + '</i><em>:</em><i>' + s + '</i></span>';
5329                        break;
5330                }
5331                o.html(html_);
5332                setTimeout(function () {
5333                    underway(sType);
5334                }, 1000);
5335            } else {
5336                if (sType === 'b') {
5337                    underway('n');
5338                    typeof j.nfun === 'function' && j.nfun();
5339                } else {
5340                    typeof j.efun === 'function' && j.efun();
5341                }
5342            }
5343        };
5344    // 判断状态
5345    if ((st - nts) > 0) {
5346        typeof j.sfun == 'function' && j.sfun();
5347        underway('b')
5348    } else if ((nts - et) > 0) {
5349        typeof j.efun == 'function' && j.efun();
5350    } else {
5351        underway('n');
5352        typeof j.nfun == 'function' && j.nfun();
5353    }
5354};
5355/*全屏行方法*/
5356wsf.fullRow = {
5357    fullRowXY: null,
5358    afterRender: null,
5359    win: window,
5360    curFullRow: null,
5361    evRFSwidthmodule: null,
5362    headFullXY: null,
5363    scrollbars: null,
5364    loadFun: function(){
5365        var that = this,
5366            btnliItemArr = null,
5367            btnliItem = null,
5368            section = '#add_container>.customModuleRow,#add_container>.customModuleRowGroup',
5369            footPublicModuleRow,
5370            footer;
5371        if(that.evRFSwidthmodule.length){
5372            btnliItem = that.evRFSwidthmodule.find('.btnli-item');
5373            that.evRFSwidthmodule.on({
5374                "click": function(){
5375                    var $this = $(this),
5376                        tagRow = $this.attr('data-target-row');
5377                    if(!$this.hasClass('active')){
5378                        $.scrollify.move('#' + tagRow);
5379                    }
5380                }
5381            }, '.btnli-item');
5382        }
5383        if(that.headFullXY.height() > 10){
5384            section += ', #headFullXY';
5385        }
5386        if((footer = $('#footer')).length && (footer.height() > 0)){
5387            section += ', #footer';
5388        }
5389        if((footPublicModuleRow = $('.footPublicModuleRow')).length && (footPublicModuleRow.height() > 0)){
5390            section += ', .footPublicModuleRow';
5391        }
5392        if(that.scrollbars === null){
5393            that.scrollbars = false;
5394        }
5395        $.scrollify({
5396            section : section,
5397            sectionName : "full-name",
5398            // interstitialSection: '#header',
5399            scrollSpeed: 1100,
5400            offset : 0,
5401            scrollbars: false,
5402            setHeights: false,
5403            overflowScroll: true,
5404            updateHash: true,
5405            touchScroll:true,
5406            before:function(x, rowArr) {
5407                btnliItem && btnliItem.each(function(i, dom){
5408                    dom = $(dom);
5409                    if(dom.attr('data-target-row') === rowArr[x].attr('data-full-name')){
5410                        dom.addClass('active');
5411                    }else{
5412                        dom.removeClass('active');
5413                    }
5414                });
5415            },
5416            after:function(x, rowArr) {
5417                /* var curRow = $(rowArr[x]);
5418                if(curRow.data('cscroll')){
5419                    switch(curRow[0].mcs.topPct*1){
5420                        case 0:
5421                            curRow.mCustomScrollbar('scrollTo', {
5422                                y: "2"
5423                            });
5424                            break;
5425                        case 100:
5426                            curRow.mCustomScrollbar('scrollTo', {
5427                                y: Math.abs(curRow[0].mcs.topPct) - 2 + ''
5428                            });
5429                            break;
5430                    }
5431                }
5432                curRow.find('.load-animate').each(function(i, dom){
5433                    wsf.f.annimationLoadMo($(dom));
5434                }) */
5435            },
5436            afterResize:function() {},
5437            afterRender:function() {
5438                that.afterRender = true;
5439                if(that.evRFSwidthmodule.length){
5440                    that.evRFSwidthmodule.find('.btnli-item:first').addClass('active');
5441                }
5442            }
5443        });
5444    },
5445    addBtnliItem: function(){
5446        var btnliItemArr = [];
5447        $("#headFullXY, #main_container .customModuleRow, #footer").each(function(i, dom){
5448            dom = $(dom);
5449            dom.attr('data-full-name', dom.attr('id')).data('fullName', dom.attr('id'));
5450            var text = '通栏';
5451            switch(dom.attr('id')){
5452                case 'headFullXY':
5453                    if(dom.height() < 1){
5454                        return true;
5455                    }
5456                    text = '头部'
5457                    break;
5458                case 'footer':
5459                    text = '底部'
5460                    break;
5461                default:
5462                    text = '通栏'+ i;
5463                    break;
5464            }
5465            btnliItemArr.push('<li class="btnli-item" data-target-row="' + dom.attr('id') + '"><span class="btnli-item-inner"><b class="btnli-item-text">' + text + '</b><em class="btnli-item-bg"></em></span></li>')
5466        });
5467        return btnliItemArr;
5468    },
5469    countMoPosition: function () {
5470        var that = this;
5471        that.win != window.top && (that.win = window.top);
5472        that.win = $(that.win);
5473        if(!that.fullRowXY){
5474            $('div.customModuleRowFullXY').each(function(i, dom){
5475                dom = $(dom);
5476                !that.fullRowXY && (that.fullRowXY = {});
5477                that.fullRowXY[dom.attr('id')] = {
5478                    rowDom: dom,
5479                    originH: dom.find('.CModulePA').height()
5480                }
5481            });
5482            that.headFullXY = $('#headFullXY');
5483            that.evRFSwidthmodule = that.headFullXY.find('.ev-RFSwidth-module');
5484            if(that.evRFSwidthmodule.length){
5485                that.evRFSwidthmodule = that.evRFSwidthmodule.closest('.ev-module-edit');
5486                !is_action && that.evRFSwidthmodule.css('position','fixed');
5487                var btnliItemArr = that.addBtnliItem();
5488                btnliItemArr.length && that.evRFSwidthmodule.find('ul').html(btnliItemArr.join(''));
5489            }
5490        }
5491        var winH = Math.max(that.win[0].innerHeight, 500);
5492        if (that.fullRowXY !== null) {
5493            var k_ = 0;
5494            $.each(that.fullRowXY, function (k, val) {
5495                var rowOriginHeight = val.originH * 1;
5496                val['offsetTop'] = val.rowDom.offset().top;
5497                if (rowOriginHeight < winH) {
5498                    val.rowDom.find('.CModulePA').height(winH).children('.ev-module-edit, .customModule').each(function (i, moDom) {
5499                        moDom = $(moDom);
5500                        var moDomH = moDom.height();
5501                        if(!moDom.closest('.ev-container-wap').length && !moDom.data('sizeH')){
5502                            /* var moOriginTop = moDom.position().top,
5503                                newTop = (moOriginTop / (rowOriginHeight - moDomH)) * (winH - moDomH);
5504                            moDom.css('top', newTop + 'px'); */
5505                            moDom.css('top', (moDom.position().top / rowOriginHeight)*100+'%');
5506                            moDom.data('sizeH', 1);
5507                        }
5508                    });
5509                }
5510                if (k_ === 0 && rowOriginHeight > (winH + 10)){
5511                    // that.scrollbars != null  && $.scrollify.setOptions({scrollbars: true});
5512                    that.scrollbars = true;
5513                }
5514                k_++;
5515                // 这是添加行的滚动条,暂时不用了
5516                /*if (rowOriginHeight > (winH + 10)) {
5517                    if(!is_action){
5518                        val.rowDom.css({
5519                            'overflow': 'hidden',
5520                            'height': winH + 'px'
5521                        });
5522                        wsf.f.mCScrollbar(val.rowDom);
5523                    }
5524                } */
5525            });
5526            // 这是添加顶部的滚动条,暂时不用了
5527            /* if(!is_action){
5528                if(that.headFullXY.length && (that.headFullXY.height() > (winH + 10))){
5529                    that.headFullXY.css({
5530                        'overflow': 'hidden',
5531                        'height': winH + 'px'
5532                    });
5533                    wsf.f.mCScrollbar(that.headFullXY);
5534                }
5535            } */
5536            !is_action && !that.afterRender && that.loadFun();
5537        }else{
5538            !is_action && that.evRFSwidthmodule.remove();
5539        }
5540        if(that.evRFSwidthmodule.length && !is_action){
5541            if(that.evRFSwidthmodule.attr('data-position') * 1){
5542                wsf.f.positionShow(that.evRFSwidthmodule, that.evRFSwidthmodule.attr('data-position') - 1);
5543            }else{
5544                that.evRFSwidthmodule.css({
5545                    left: Math.floor(that.evRFSwidthmodule.attr('data-lshifting') * 1 + ($('body').width() - userSiteWidth) / 2) + 'px',
5546                    top: that.evRFSwidthmodule.attr('data-tshifting') + 'px'
5547                });
5548            }
5549        }
5550    }
5551};
5552/*
5553    createDate:2017/09/24
5554    旧手动左右滚动产品效果――类
5555*/
5556wsf.flow_pro_ = function (n, t) {
5557    var ContN = $(n).parent(),
5558        $list_ul = ContN.find("ul"),
5559        $list_ul_par = $list_ul.parent(),
5560        $list_li_num = $list_ul.find("li").length,
5561        $list_li_Lborder = parseInt($list_ul.find("li").css("border-left-width")),
5562        $list_li_Rborder = parseInt($list_ul.find("li").css("border-right-width")),
5563        $list_li_Lpadd = parseInt($list_ul.find("li").css("padding-left")),
5564        $list_li_Rpadd = parseInt($list_ul.find("li").css("padding-left")),
5565        $list_li_Rmargin = parseInt($list_ul.find("li").css('margin-right')),
5566        $list_li_Lmargin = parseInt($list_ul.find("li").css('margin-left'));
5567    $list_li_Lborder = isNaN($list_li_Lborder) ? 0 : $list_li_Lborder;
5568    $list_li_Rborder = isNaN($list_li_Rborder) ? 0 : $list_li_Rborder;
5569    $list_li_Rmargin = isNaN($list_li_Rmargin) ? 0 : $list_li_Rmargin;
5570    $list_li_Lmargin = isNaN($list_li_Lmargin) ? 0 : $list_li_Lmargin;
5571    var $list_li_width = $list_ul.find("li").width() + $list_li_Lborder + $list_li_Rborder + $list_li_Lmargin + $list_li_Rmargin + $list_li_Lpadd + $list_li_Rpadd,
5572        $show_num = Math.floor(($list_ul_par.width()) / $list_li_width),
5573        $ul_width = $list_li_width * $list_li_num,
5574        $list_ul_left = Math.abs($list_ul.position().left),
5575        $page = Math.ceil($list_li_num / $show_num),
5576        $move = $show_num * $list_li_width,
5577        $newMove = $ul_width - ($list_ul_left + $move);
5578    if (t == 1) {
5579        if ($newMove > 0) {
5580            if ($newMove > $move) {
5581                if ($list_ul.is(':animated') === false) {
5582                    $list_ul.animate({
5583                        "left": "-=" + $move
5584                    }, 500);
5585                    $(n).parent().find(".left-but").addClass("left-but-off");
5586                }
5587            } else {
5588                if ($list_ul.is(':animated') === false) {
5589                    $list_ul.animate({
5590                        "left": "-=" + $newMove
5591                    }, 500);
5592                    $(n).parent().find(".right-but").addClass("right-but-off");
5593                    $(n).parent().find(".left-but").addClass("left-but-off");
5594                }
5595            }
5596        }
5597    } else {
5598        if ($list_ul_left > 0) {
5599            if ($list_ul_left > $move) {
5600                if ($list_ul.is(':animated') === false) {
5601                    $list_ul.stop().animate({
5602                        "left": "+=" + $move
5603                    }, 500);
5604                    $(n).parent().find(".right-but").removeClass("right-but-off");
5605                }
5606            } else {
5607                if ($list_ul.is(':animated') === false) {
5608                    $list_ul.stop().animate({
5609                        "left": "+=" + $list_ul_left
5610                    }, 500);
5611                    $(n).parent().find(".left-but").removeClass("left-but-off");
5612                    $(n).parent().find(".right-but").removeClass("right-but-off");
5613                }
5614            }
5615        }
5616    }
5617};
5618wsf.flow_pro = function () {
5619    $(".right-but").click(function () {
5620        wsf.flow_pro_(this, 1);
5621    });
5622    $(".left-but").click(function () {
5623        wsf.flow_pro_(this, 2);
5624    });
5625};
5626/*
5627    createDate:2017/09/24
5628    在线客服
5629*/
5630wsf.onlineService = function () {
5631    var onService_panel = $("#onService_panel");
5632    onService_panel.on({
5633        mouseenter: function () {
5634            onService_panel.animate({
5635                right: 0
5636            });
5637            $(this).hide();
5638        }
5639    }, "#onlineOpen");
5640    onService_panel.on({
5641        click: function () {
5642            onService_panel.animate({
5643                right: -102
5644            });
5645            onService_panel.find(".online_tab").fadeOut(100);
5646            onService_panel.find("#onlineOpen").show();
5647        }
5648    }, "#onlineClose");
5649
5650    $(".online_icon").click(function () {
5651        $(".online_tab").fadeOut(100);
5652        var onclickId = $(this).attr("id");
5653        var findparent_tab;
5654        switch (onclickId) {
5655            case "online_tel_icon":
5656                findparent_tab = $("#onlineTelTab");
5657                break;
5658            case "online_qq_icon":
5659                findparent_tab = $("#onlineQQTab");
5660                break;
5661            case "online_message_icon":
5662                findparent_tab = $("#onlineMessageTab");
5663                break;
5664        }
5665        findparent_tab.fadeIn(100);
5666    });
5667    $("#onService_panel .tab_close").click(function () {
5668        $(this).parents(".online_tab").hide();
5669    });
5670
5671    function checkLen(obj, maxs) {
5672        var maxChars = maxs; //最多字符数
5673        if (obj.value.length > maxChars) {
5674            obj.value = obj.value.substring(0, maxChars);
5675        }
5676        var curr = maxChars - obj.value.length;
5677        $(obj).parents("dl").find(".text_length b").text(curr.toString());
5678    }
5679};
5680wsf.ev_kf_zc_1 = function () {
5681    var ev_kf_zc_1 = $('#ev_kf_zc_1');
5682    ev_kf_zc_1.length && (ev_kf_zc_1.css('margin-top', -ev_kf_zc_1.height() / 2 + 'px'), ev_kf_zc_1.on('click', '.ev_kf_zc_close', function () {
5683        ev_kf_zc_1.hide();
5684    }));
5685};
5686/*网站宽度加载*/
5687wsf.loadWidth = function () {
5688    var windowWidth = wsf.pDom.winDom.width();
5689    if (windowWidth < userSiteWidth) {
5690        if(userSiteWidth >= 1920 && windowWidth > 1900){
5691            wsf.pDom.htmlDom.css({'overflow-x':'hidden'});
5692        }
5693        wsf.pDom.bodyDom.width(userSiteWidth);
5694        wsf.pDom.htmlDom.width(userSiteWidth);
5695    } else {
5696        wsf.pDom.bodyDom.width('auto');
5697        wsf.pDom.htmlDom.width('auto');
5698    }
5699};
5700wsf.windowResize = function () {
5701    wsf.pDom.winDom.on({
5702        resize: function () {
5703            wsf.loadWidth();
5704        }
5705    });
5706};
5707wsf.moduleBind = function () {
5708    $("div.customModule").on({
5709        mouseenter: function () {
5710            var t = $(this),
5711                dataType = wsf.f.s_j(t.attr('data-attr')),
5712                childDiv = t.find('.MoBodyC > div');
5713            if (!childDiv.data('bindevent') && !childDiv.hasClass('editMoConBut')) {
5714                switch (dataType.mt) {
5715                    case 5:
5716                    case 6:
5717                    case 1:
5718                    case 2:
5719                        wsf.textListModule(childDiv);
5720                        break;
5721                    case 19:
5722                        wsf.catalogList(childDiv);
5723                        break;
5724                    case 21:
5725                        wsf.menuCatalogModule(childDiv);
5726                        break;
5727                }
5728            }
5729        }
5730    });
5731};
5732
5733wsf.queryMJsEffect = function (jsData) {
5734    for (var MId in jsData) {
5735        var showStyle = parseInt(jsData[MId].showStyle);
5736        switch (showStyle) {
5737            case 13:
5738                (function(MId){
5739                    setTimeout(function(){
5740                        wsf.chartInit(jsData[MId].type, MId, jsData[MId].start, jsData[MId].end, jsData[MId].step, jsData[MId].data);
5741                    }, 200);
5742                })(MId);
5743                break;
5744            case 12:
5745                (function(MId){
5746                    setTimeout(function(){
5747                        wsf.baiduInit(MId, jsData[MId].x, jsData[MId].y, jsData[MId].content);
5748                    }, 200);
5749                })(MId);
5750                break;
5751        }
5752    }
5753};
5754wsf.tj_zhuce = function () {
5755    window.location.href = "/dom/zhuce.php?username=" + user_name;
5756};
5757/*
5758    createDate:2017/09/24
5759    图册模块
5760*/
5761wsf.albums = function (evAlbumsModule) {
5762    var evAlbumsModule = evAlbumsModule || $('div.ev-albums-module');
5763    if (evAlbumsModule.length) {
5764        var albumsCollect = function (obj, allObj) {
5765                if (!(obj.attr('data-click') * 1)) {
5766                    allObj.attr('data-click', 1);
5767                    var t = obj.parent(),
5768                        number = t.find('.number'),
5769                        numberTxt = number.text() * 1,
5770                        timestamp = Date.parse(new Date()),
5771                        url = '/dom/user_collect_add.php?timestamp=' + timestamp,
5772                        is_detail = t.data("detail"),
5773                        data = {
5774                            'title': t.data("name"),
5775                            'type': t.data("type"),
5776                            'doc_id': t.data("id"),
5777                            'ch_id': t.data("chid"),
5778                            'href': t.data("href"),
5779                            'username': user_name,
5780                            'wap': 0
5781                        };
5782                    $.ajax({
5783                        'url': url,
5784                        type: "POST",
5785                        async: false,
5786                        cache: false,
5787                        data: data,
5788                        success: function (data) {
5789                            allObj.attr('data-click', 0);
5790
5791                            data = parseInt(data);
5792                            if (data === 1) {
5793                                allObj.each(function () {
5794                                    $(this).hide().siblings('.evIcon').show();
5795
5796                                    var tmpT = $(this).parent(),
5797                                        tmpNumber = tmpT.find('.number');
5798
5799                                    numberTxt === 0 && tmpNumber.show();
5800                                    tmpNumber.text(numberTxt + 1);
5801                                });
5802                                wsf.f.alertWindow($weisiteLa.ShouCangChengGongGeRenZhongXinKan, 2);
5803                            } else if (data === 2) {
5804                                wsf.f.confirmWindow($weisiteLa.QingXianDengLuHouShouCang, 'warn', function () {
5805                                    window.location.href = "/dom/denglu.php?username=" + user_name;
5806                                });
5807                                return false;
5808                            } else if (data === 3) {
5809                                allObj.each(function () {
5810                                    $(this).hide().siblings('.evIcon').show();
5811
5812                                    var tmpT = $(this).parent(),
5813                                        tmpNumber = tmpT.find('.number');
5814
5815                                    tmpNumber.text(numberTxt - 1);
5816                                    numberTxt === 1 && tmpNumber.hide();
5817                                });
5818
5819                                return false;
5820                            } else if (data === 4) {
5821                                wsf.f.alertWindow($weisiteLa.CanShuCuoWu, 1);
5822                                return false;
5823                            }
5824                        }
5825                    });
5826                } else {
5827                    wsf.f.alertWindow($weisiteLa.ZhengZaiQingQiuQingShaoDeng, 0);
5828                }
5829                return false;
5830            },
5831            userAlbumLike = function (obj, allObj) {
5832                if (!(obj.attr('data-click') * 1)) {
5833                    allObj.attr('data-click', 1);
5834                    //点赞公用
5835                    // recordId  文章id
5836                    // type  ch type
5837                    // style   属性class
5838                    // operate   like
5839                    // part   1
5840                    // html '{n}'
5841                    // style, operate, location
5842                    //没有登录通过cookie验证是否点赞
5843                    var parentDom = obj.parent(),
5844                        recordId = parentDom.data("id"),
5845                        type = parentDom.data("type"),
5846                        operate = parentDom.data("operate"),
5847                        zz_userid = readCookie('zz_userid'),
5848                        number = parentDom.find('.number');
5849                    if (!zz_userid && operate == 'like') {
5850                        var userLikeRecord = readCookie('user_like_record');
5851                        var tmpStr = type + '*' + recordId;
5852                        //已赞过
5853                        if (userLikeRecord.indexOf(tmpStr) != -1) {
5854                            wsf.f.alertWindow($weisiteLa.YiZanGuo, 1);
5855                            return false;
5856                        }
5857                        //每日限制100次
5858                        var tmpArr = userLikeRecord.split('#');
5859                        if (tmpArr.length >= 100) {
5860                            wsf.f.alertWindow($weisiteLa.MeiRiZuiDuoDianZan, 1);
5861                            return false;
5862                        }
5863                    }
5864                    $.ajax({
5865                        type: 'POST',
5866                        dataType: 'json',
5867                        url: '/Public/UserOperate.php',
5868                        data: {
5869                            username: user_name,
5870                            rid: recordId,
5871                            opt: operate,
5872                            type: type,
5873                            part: 1,
5874                            is_pc: 1,
5875                            t: Date.parse(new Date())
5876                        },
5877                        success: function (data) {
5878                            if (data.errorcode > 0) {
5879                                wsf.f.alertWindow(data.errormsg + '!', 1);
5880                            } else {
5881                                allObj.attr('data-click', 0);
5882
5883                                allObj.each(function () {
5884                                    var tmpT = $(this).parent(),
5885                                        tmpNumber = tmpT.find('.number');
5886
5887                                    data.num == 0 ? tmpNumber.hide() : tmpNumber.show();
5888                                    tmpNumber.text(data.num);
5889                                    $(this).hide().siblings('.evIcon').show();
5890                                    if (operate == 'like') {
5891                                        tmpT.data('operate', "unLike");
5892                                    } else if (operate == 'unLike') {
5893                                        tmpT.data('operate', "like");
5894                                    }
5895                                });
5896                            }
5897                        }
5898                    });
5899                } else {
5900                    wsf.f.alertWindow($weisiteLa.ZhengZaiQingQiuQingShaoDeng, 0);
5901                }
5902            };
5903        evAlbumsModule.each(function (i, dom) {
5904            dom = $(dom);
5905            dom.find('.pic-social').on({
5906                click: function () {
5907                    var $this = $(this);
5908                    if (($this.attr('data-default') * 1) === 1) {
5909                        wsf.f.alertWindow($weisiteLa.ShiLiTuBuNengCaoZuo, 0);
5910                    } else {
5911                        var chType = parseInt($this.parent().parent().attr("data-type"));
5912                        var id = parseInt($this.parent().parent().attr("data-id"));
5913
5914                        var allObj = null;
5915
5916                        if ($this.parent().hasClass('like-btn')) {
5917                            if (chType === 18) {
5918                                allObj = $this.hasClass('evIcon-hand-1') ? $(".SMALbumSysButLike" + id) : $(".SMALbumSysButLikeCur" + id);
5919                            } else {
5920                                allObj = $this;
5921                            }
5922
5923                            userAlbumLike($this, allObj);
5924                        } else {
5925                            if (chType === 18) {
5926                                allObj = $this.hasClass('evIcon-heart-2') ? $(".SMALbumSysButCollect" + id) : $(".SMALbumSysButCollectCur" + id);
5927                            } else {
5928                                allObj = $this;
5929                            }
5930                            albumsCollect($this, allObj);
5931                        }
5932                    }
5933                    return false;
5934                }
5935            }, '.evIcon');
5936            switch (dom.attr('data-opentype') * 1) {
5937                case 0:
5938                    dom.on({
5939                        click: function () {
5940                            var $this = $(this);
5941                            $this.attr('data-target') * 1 === 0 ? window.location.assign($this.attr('data-url')) : window.open($this.attr('data-url'), '_blank');
5942                        }
5943                    }, '.div-item');
5944                    break;
5945                case 1:
5946                    dom.find('ul').lightGallery({
5947                        'galleryId': 'lightgallery_' + i,
5948                        // 'startClass': 'lg-slide',
5949                        'mode': 'lg-slide-circular',
5950                        'backdropDuration': 300,
5951                        'thumbnail': true,
5952                        'pager': false,
5953                        'share': false,
5954                        'download': false,
5955                        'loop': true,
5956                        'dynamic': false,
5957                        'selector': 'div.div-item',
5958                        'selectorSort': 'data-id',
5959                        'exThumbImage': 'data-original-src',
5960                        'exThumbElement': 'img'
5961                    });
5962                    break;
5963            }
5964        });
5965    }
5966};
5967/*
5968    createDate:2018/05/24
5969    系统调用中的点赞收藏功能
5970*/
5971wsf.sysDoc = function (targetDom) {
5972    var docSysM = targetDom || $('div.ev-sys-doc-module');
5973    if (docSysM.length) {
5974        var collect = function (obj, allObj) {
5975                if (!(obj.attr('data-click') * 1)) {
5976                    allObj.attr('data-click', 1);
5977                    var t = obj.parent(),
5978                        number = t.find('.number'),
5979                        numberTxt = number.text() * 1,
5980                        timestamp = Date.parse(new Date()),
5981                        url = '/dom/user_collect_add.php?timestamp=' + timestamp,
5982                        is_detail = t.data("detail"),
5983                        data = {
5984                            'title': t.data("name"),
5985                            'type': t.data("type"),
5986                            'doc_id': t.data("id"),
5987                            'channel_id': t.data("chid"),
5988                            'username': user_name,
5989                            'wap': 0
5990                        };
5991                    $.ajax({
5992                        'url': url,
5993                        type: "POST",
5994                        async: false,
5995                        cache: false,
5996                        data: data,
5997                        success: function (data) {
5998                            allObj.attr('data-click', 0);
5999
6000                            data = parseInt(data);
6001                            if (data === 1) {
6002                                allObj.each(function () {
6003                                    $(this).hide().siblings('.evIcon').show();
6004
6005                                    var tmpT = $(this).parent(),
6006                                        tmpNumber = tmpT.find('.number');
6007
6008                                    numberTxt === 0 && tmpNumber.show();
6009                                    tmpNumber.text(numberTxt + 1);
6010                                });
6011                                wsf.f.alertWindow($weisiteLa.ShouCangChengGongGeRenZhongXinKan, 2);
6012                            } else if (data === 2) {
6013                                wsf.f.confirmWindow($weisiteLa.QingXianDengLuHouShouCang, 'warn', function () {
6014                                    window.location.href = "/dom/denglu.php?username=" + user_name;
6015                                });
6016                                return false;
6017                            } else if (data === 3) {
6018                                allObj.each(function () {
6019                                    $(this).hide().siblings('.evIcon').show();
6020
6021                                    var tmpT = $(this).parent(),
6022                                        tmpNumber = tmpT.find('.number');
6023
6024                                    tmpNumber.text(numberTxt - 1);
6025                                    numberTxt === 1 && tmpNumber.hide();
6026                                });
6027
6028                                return false;
6029                            } else if (data === 4) {
6030                                wsf.f.alertWindow($weisiteLa.CanShuCuoWu, 1);
6031                                return false;
6032                            }
6033                        }
6034                    });
6035                } else {
6036                    wsf.f.alertWindow($weisiteLa.ZhengZaiQingQiuQingShaoDeng, 0);
6037                }
6038                return false;
6039            },
6040            like = function (obj, allObj) {
6041                if (!(obj.attr('data-click') * 1)) {
6042                    allObj.attr('data-click', 1);
6043                    //没有登录通过cookie验证是否点赞
6044                    var parentDom = obj.parent(),
6045                        recordId = parentDom.data("id"),
6046                        type = parentDom.data("type"),
6047                        operate = parentDom.data("operate"),
6048                        zz_userid = readCookie('zz_userid'),
6049                        number = parentDom.find('.number');
6050                    if (!zz_userid && operate == 'like') {
6051                        var userLikeRecord = readCookie('user_like_record');
6052                        var tmpStr = type + '*' + recordId;
6053                        //已赞过
6054                        if (userLikeRecord.indexOf(tmpStr) != -1) {
6055                            wsf.f.alertWindow($weisiteLa.YiZanGuo, 1);
6056                            return false;
6057                        }
6058                        //每日限制100次
6059                        var tmpArr = userLikeRecord.split('#');
6060                        if (tmpArr.length >= 100) {
6061                            wsf.f.alertWindow($weisiteLa.MeiRiZuiDuoDianZan, 1);
6062                            return false;
6063                        }
6064                    }
6065                    $.ajax({
6066                        type: 'POST',
6067                        dataType: 'json',
6068                        url: '/Public/UserOperate.php',
6069                        data: {
6070                            username: user_name,
6071                            rid: recordId,
6072                            opt: operate,
6073                            type: type,
6074                            part: 1,
6075                            is_pc: 1,
6076                            t: Date.parse(new Date())
6077                        },
6078                        success: function (data) {
6079                            if (data.errorcode > 0) {
6080                                wsf.f.alertWindow(data.errormsg + '!', 1);
6081                            } else {
6082                                allObj.attr('data-click', 0);
6083
6084                                allObj.each(function () {
6085                                    var tmpT = $(this).parent(),
6086                                        tmpNumber = tmpT.find('.number');
6087
6088                                    data.num == 0 ? tmpNumber.hide() : tmpNumber.show();
6089                                    tmpNumber.text(data.num);
6090                                    $(this).hide().siblings('.evIcon').show();
6091                                    if (operate == 'like') {
6092                                        tmpT.data('operate', "unLike");
6093                                    } else if (operate == 'unLike') {
6094                                        tmpT.data('operate', "like");
6095                                    }
6096                                });
6097                            }
6098                        }
6099                    });
6100                } else {
6101                    wsf.f.alertWindow($weisiteLa.ZhengZaiQingQiuQingShaoDeng, 0);
6102                }
6103            };
6104        docSysM.each(function (i, dom) {
6105            dom = $(dom);
6106            if(!dom.data('iconclick')){
6107                dom.on({
6108                    click: function () {
6109                        var $this = $(this),
6110                            type = $this.data('type');
6111                        switch(type){
6112                            case 'share':
6113                                wsf.share.createShareLayer($this);
6114                                return false;
6115                                break;
6116                            case 'like':case 'collect':
6117                            if (($this.attr('data-default') * 1) === 1) {
6118                                wsf.f.alertWindow($weisiteLa.ShiLiTuBuNengCaoZuo, 0);
6119                            } else {
6120                                var id = parseInt($this.parent().parent().attr("data-id"));
6121
6122                                var allObj = null;
6123
6124                                if ($this.parent().hasClass('int-link')) {
6125                                    allObj = $this.hasClass('evIcon-hand-1') ? $(".MSysDocButLike" + id) : $(".MSysDocButLikeCur" + id);
6126                                    like($this, allObj);
6127                                } else {
6128                                    allObj = $this.hasClass('evIcon-heart-2') ? $(".MSysDocButCollect" + id) : $(".MSysDocButCollectCur" + id);
6129                                    collect($this, allObj);
6130                                }
6131                            }
6132                            return false;
6133                            break;
6134                        }
6135                    }
6136                }, '.pic-interact .evIcon');
6137                dom.data('iconclick',1);
6138            }
6139        });
6140    }
6141};
6142/*
6143    createDate:2017/09/24
6144    图册模块中点赞收藏功能
6145*/
6146wsf.albumsDataLoad = function (type) {
6147    if (!GData.SMAlbumIds && !GData.SMAlbumSysIds && !GData.docSysIds) {
6148        return false;
6149    }
6150
6151    type = parseInt(type);
6152
6153    $.post("/Ajax/TJIndex.php?username=" + user_name, {
6154        type     : 7,
6155        ids      : GData.SMAlbumIds,
6156        sysIds   : GData.SMAlbumSysIds,
6157        docSysIds: GData.docSysIds
6158    }, function (data) {
6159        data.success * 1 && ((data.list && data.list.length) || (data.sysList && data.sysList.length)  || (data.docSysList && data.docSysList.length)) && (function () {
6160            var list = data.list;
6161            $.each(list, function (i, v) {
6162                var curSocial = $('#SMALbum' + v.id);
6163                if (curSocial.length) {
6164                    var collectCnt = v.collectCnt * 1, likeCnt = v.likeCnt * 1;
6165                    collectCnt !== 0 && curSocial.find('.collect-btn .number').text(collectCnt);
6166                    likeCnt !== 0 && curSocial.find('.like-btn .number').text(likeCnt);
6167                    curSocial.find('.collect-btn .evIcon[data-action="' + (v.isCollect * 1 ? 'del' : 'add') + '"]').show().siblings('.evIcon').hide();
6168                    curSocial.find('.like-btn .evIcon[data-action="' + (v.isLike * 1 ? 'del' : 'add') + '"]').show().siblings('.evIcon').hide();
6169                    curSocial.find('.like-btn').attr('data-operate', (v.isLike * 1 ? 'unLike' : 'like'));
6170                    curSocial.find('.evIcon').attr('data-click', 0);
6171                }
6172            });
6173
6174            var sysList = data.sysList;
6175            $.each(sysList, function (i, v) {
6176                var curSocial = $('.SMALbumSys' + v.id);
6177                if (curSocial.length) {
6178                    var collectCnt = v.collectCnt * 1, likeCnt = v.likeCnt * 1;
6179                    collectCnt !== 0 && curSocial.find('.collect-btn .number').text(collectCnt);
6180                    likeCnt !== 0 && curSocial.find('.like-btn .number').text(likeCnt);
6181                    curSocial.find('.collect-btn .evIcon[data-action="' + (v.isCollect * 1 ? 'del' : 'add') + '"]').show().siblings('.evIcon').hide();
6182                    curSocial.find('.like-btn .evIcon[data-action="' + (v.isLike * 1 ? 'del' : 'add') + '"]').show().siblings('.evIcon').hide();
6183                    curSocial.find('.like-btn').attr('data-operate', (v.isLike * 1 ? 'unLike' : 'like'));
6184                    curSocial.find('.evIcon').attr('data-click', 0);
6185                }
6186            });
6187
6188            var docSysList = data.docSysList;
6189            $.each(docSysList, function (i, v) {
6190                var curSocial = $('.MDocSys' + v.id);
6191                if (curSocial.length) {
6192                    var collectCnt = v.collectCnt * 1, likeCnt = v.likeCnt * 1, readCount = v.readCount * 1, replyCount = v.replyCount * 1;
6193                    collectCnt !== 0 && curSocial.find('.int-collect .number').text(collectCnt);
6194                    likeCnt !== 0 && curSocial.find('.int-link .number').text(likeCnt);
6195                    readCount !== 0 && curSocial.find('.int-read .number').text(readCount);
6196                    replyCount !== 0 && curSocial.find('.int-comment .number').text(replyCount);
6197                    curSocial.find('.int-collect .evIcon[data-action="' + (v.isCollect * 1 ? 'del' : 'add') + '"]').show().siblings('.evIcon').hide();
6198                    curSocial.find('.int-link .evIcon[data-action="' + (v.isLike * 1 ? 'del' : 'add') + '"]').show().siblings('.evIcon').hide();
6199                    curSocial.find('.int-link').attr('data-operate', (v.isLike * 1 ? 'unLike' : 'like'));
6200                    curSocial.find('.evIcon').attr('data-click', 0);
6201                }
6202            });
6203        })();
6204    }, "json");
6205
6206    return true;
6207};
6208/*模块搜索*/
6209wsf.evSearch = {
6210    load : function(obj){
6211        this.fun(obj || $("div.ev-search-module"));
6212    },
6213    fun : function(obj){
6214        obj.each(function(i, dom){
6215            dom = $(dom);
6216            var evForm = dom.find('.s-f'),
6217                keyWord = dom.find('input.key-word');
6218            dom.on({
6219                click: function(ev){
6220                    var targetDom = $(ev.target),
6221                        $this = $(this),
6222                        actions = '';
6223                    switch(true){
6224                        case targetDom.hasClass('s-w-t'):
6225                        case targetDom.hasClass('s-w-s'):
6226                        case targetDom.hasClass('s-w-i'):
6227                            $this.toggleClass('s-c-active');
6228                            break;
6229                        case targetDom.hasClass('w-l-e-t'):
6230                        case targetDom.hasClass('w-l-e-i'):
6231                        case targetDom.hasClass('w-l-e'):
6232                            $this.removeClass('s-c-active');
6233                            $this.find('.s-w-t').text(targetDom.text());
6234                            var wle = targetDom.closest('.w-l-e')
6235                            $this.attr({'data-type': wle.attr('data-type'), 'data-url': wle.attr('data-url')});
6236                            break;
6237                        case targetDom.hasClass('s-b-icon'):
6238                        case targetDom.hasClass('s-b-t'):
6239                        case targetDom.hasClass('s-b-i'):
6240                            if(is_action){return false}
6241                            if(!keyWord.val() || (!(keyWord.attr('data-keywordtype') * 1) && (keyWord.val() == keyWord.attr('data-defaultv')))){
6242                                wsf.f.alertWindow(dom.attr('data-tishi'), 0);
6243                                keyWord.trigger('focus');
6244                                return false;
6245                            }
6246                            switch(dom.attr('data-type') * 1){
6247                                case 2:
6248                                    evForm.attr('action', dom.attr('data-url'));
6249                                    break;
6250                                default:
6251                                    // evForm.attr('action', evForm.find('.s-c').attr('data-url').replace('###', evForm.find('input.key-word').val()));
6252                                    actions =  evForm.find('.s-c').attr('data-url').replace('###', evForm.find('input.key-word').val());
6253                                    break;
6254                            }
6255                            window.location.href = actions;
6256                            // evForm.submit();
6257                            break;
6258                    }
6259                }
6260            },'.s-c, .s-b');
6261            dom.on('focus blur keydown','input.key-word', function(event){
6262                var curDom = $(this),
6263                    curDomVal = curDom.val(),
6264                    curDomDefaultVal = curDom.attr('data-defaultv');
6265                switch (event.type) {
6266                    case 'focusin':
6267                        !(curDom.attr('data-keywordtype') * 1) && (curDomVal == curDomDefaultVal) && (curDom.val(''), evForm.find('.s-k').removeClass('s-k-place'));
6268                        (curDom.attr('data-keywordtype') * 1) && evForm.find('.s-k').removeClass('s-k-place');
6269                        break;
6270                    case 'focusout':
6271                        (curDomVal == curDomDefaultVal || !curDomVal) && (curDom.val(curDomDefaultVal), evForm.find('.s-k').addClass('s-k-place'));
6272                        break;
6273                    case 'keydown':
6274                        event.keyCode === 13 && evForm.find('.s-b-i').trigger('click');
6275                        break;
6276                }
6277            });
6278        });
6279    }
6280};
6281
6282/* 跳转行锚点位置的方法 */
6283wsf.jumpRowAnchor = function(){
6284    setTimeout(function() {
6285        if(window === window.top){
6286            if(window.location.hash.indexOf('#row_') !== -1){
6287                var header = $('#header'),
6288                    top_area = $('#top_area'),
6289                    win = $(window),
6290                    top_num = win.scrollTop();
6291                if(header.length && header.data('fixed')*1 === 1){
6292                    top_num -= header.height();
6293                }
6294                if(top_area.length && top_area.data('fixed')*1 === 1){
6295                    top_num -= top_area.height();
6296                }
6297                win.scrollTop(Math.max(top_num, 0));
6298            }
6299        }
6300    }, 10);
6301}
6302// 行组切换效果
6303wsf.rowGroup = function(obj){
6304    var rowGroupDom = obj ? obj : $('.customModuleRowGroup');
6305    rowGroupDom.on('click', '.ctrl-sidebar-area em', function(){
6306        var $this = $(this),
6307            showTarget = $this.attr('data-target'),
6308            rowGroup = null;
6309        if(!$this.hasClass('cur')){
6310            $this.addClass('cur').siblings('.cur').removeClass('cur');
6311            rowArray = $this.closest('.customModuleRowGroup').find('.customModuleRow');
6312            if(rowArray.length > 1){
6313                rowArray.each(function(i, dom){
6314                    dom = $(dom);
6315                    if(dom.attr('id') === showTarget){
6316                        dom.addClass('customModuleRowBlock').removeClass('customModuleRowNone');
6317                    }else{
6318                        dom.hasClass('customModuleRowBlock') && dom.removeClass('customModuleRowBlock').addClass('customModuleRowNone');
6319                    }
6320                })
6321            }
6322
6323        }
6324    });
6325};
6326// 背景音乐图标
6327wsf.webSiteBgMusic = function(){
6328    var webSiteBgMusic = $('#webSiteBgMusic');
6329    if(webSiteBgMusic.length){
6330        var bgMusicBtn = $('<i class="evIcon evIcon-qqyinyue" id="webSiteBgMusicBtn"><i>'),
6331            audio = webSiteBgMusic[0];
6332        wsf.pDom.htmlDom.append(bgMusicBtn);
6333        audio.play();
6334        if(audio.paused){
6335            bgMusicBtn.addClass('paused').attr('title',"播放背景音乐");
6336        }else{
6337            bgMusicBtn.removeClass('paused').addClass('play').attr('title',"暂停背景音乐");
6338        }
6339        /* var audioAutoPlay = setInterval(function(){
6340            if(audio.paused){
6341                audio.play();
6342            }else{
6343                bgMusicBtn.removeClass('paused').addClass('play').attr('title',"暂停背景音乐");
6344                clearInterval(audioAutoPlay);
6345            }
6346        }, 1000); */
6347        // playFun();
6348        bgMusicBtn.on('click', function(){
6349            // playFun('click');
6350            if(audio.paused){
6351                bgMusicBtn.removeClass('paused').addClass('play').attr('title',"暂停背景音乐");
6352                audio.play();
6353            }else{
6354                bgMusicBtn.addClass('paused').attr('title',"播放背景音乐");
6355                audio.pause();
6356            }
6357        })
6358    }
6359};
6360// 百度编辑器中的embed代码替换成video代码
6361wsf.embedToVideo = function(){
6362    var editor_content_air = $('.editor_content_air');
6363    editor_content_air.each(function(i, dom){
6364        dom = $(dom);
6365        var embeds = dom.find('embed');
6366        embeds.each(function(i, embed){
6367            embed = $(embed);
6368            var url = embed.attr('src');
6369            if(url.indexOf('.mp4') !== -1){
6370                embed.before('<video controls="true" src="'+ embed.attr('src') +'" style="width:'+ embed.attr('width') +'px; height:'+ embed.attr('height') +'px"></video>');
6371                embed.remove();
6372            }
6373        });
6374    });
6375};
6376/*页面加载完后要执行加载的函数*/
6377$(function () {
6378    //获得当前window对象
6379    wsf.pDom.winDom = $(window);
6380    //获得当前html对象
6381    wsf.pDom.htmlDom = $('html');
6382    //获得当前body对象
6383    wsf.pDom.bodyDom = $('body');
6384    //给页面中的wsf事件的a链接去掉打开目标属性target
6385    wsf.pDom.bodyDom.find('a[href*="javascript:wsf"]').each(function (i, dom) {
6386        $(dom).removeAttr('target');
6387    });
6388    //给页面中的wsf事件的a链接绑定事件
6389    wsf.pDom.bodyDom.on('click', 'a', function () {
6390        var $this = $(this),
6391            href= $this.attr('href');
6392        if(href && href.indexOf('javascript:wsf') === -1){
6393            if(href.indexOf('showAlert_') != -1){
6394                wsf.evAlertRow.showAlert(href.substr(10));
6395                return false;
6396            }
6397            if(href.indexOf('showWXCode_') != -1){
6398                wsf.f.showWXCode(href.substr(11));
6399                return false;
6400            }
6401
6402        }
6403    });
6404    //图册焦点图收藏点赞功能方法
6405    wsf.albumsDataLoad();
6406    //页面主导航的事件方法
6407    wsf.nav();
6408    //页面中搜索模块的方法
6409    wsf.search();
6410    //页面模块焦点图方法
6411    wsf.focusPicModule();
6412    //页面文字列表模块
6413    wsf.textListModule();
6414    //设置滚动模块的事件
6415    wsf.moveModule();
6416    //模块树形结构分类事件
6417    wsf.catalogList();
6418    //模块抽屉分类事件
6419    wsf.menuCatalogModule();
6420    //详情页标签切换方法
6421    wsf.tabSwitchModule();
6422    // wsf.tableModule();
6423    //通栏产品分类的事件
6424    wsf.classifyModule();
6425    wsf.selectState();
6426    wsf.customEditModule();
6427    wsf.manualMoveModule();
6428    wsf.innerWapBuy();
6429    wsf.picTextList_changePic();
6430    wsf.formModule.defaultValVerify();
6431    wsf.evTabContent.loadBind();
6432    wsf.evSearch.load();
6433    wsf.videoModule();
6434    wsf.banner3D.init();
6435    if (!is_action) {
6436        wsf.loadWidth();
6437        wsf.absoluteMenuCatalog();
6438        wsf.windowResize();
6439        wsf.albums();
6440        wsf.sysDoc();
6441        // wsf.rowVideo();
6442        wsf.share.bindEvent();
6443        wsf.concern();
6444        wsf.pShowGetCoupon();
6445        wsf.pContactList();
6446        wsf.fixedRow.getDom();
6447        wsf.scrollFixed.judge();
6448        wsf.jumpRowAnchor();
6449        // wsf.fullRow.loadFun();
6450    } else {
6451        // wsf.moduleBind();
6452        wsf.absoluteModuleWrapBind();
6453    }
6454    wsf.queryMJsEffect(MJsData);
6455    // 页面加载完执行弹窗方法
6456    wsf.evAlertRow.loadBind();
6457    wsf.progress.judge();
6458    // 页面加载完执行动画加载方法
6459    wsf.loadAnimate.loadFun();
6460    wsf.interactFun_();
6461    wsf.ev_kf_zc_1();
6462    wsf.wScroll();
6463    // wsf.rowGroup();
6464    wsf.webSiteBgMusic();
6465    // 页面加载完替换百度编辑器中的embed的flash播放器
6466    wsf.embedToVideo();
6467});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.