/* * rusherwang * rusherwang@tencent.com * 2014.1.22 * Github:http://github.com/powy1993/fullpage */ function FullPage(f) { function D(a, g, d, b) { this.cx = 3 * a; this.bx = 3 * (d - a) - this.cx; this.ax = 1 - this.cx - this.bx; this.cy = 3 * g; this.by = 3 * (b - g) - this.cy; this.ay = 1 - this.cy - this.by } var E = document.getElementById(f.id), c = E.children, u = c.length, Z = u, B = f.slideTime || 800, x = f.effect || {}, b = 0, z, P, k, r, s, L, F, G, T, H = [], Q = [], A = [], U = [], V, v, W = null, t = !1, M = !1, $, h, C, I, w, aa, X, ba, n, p, y, R, Y; if (c && 1 !== u) { f.mode && (M = -1 !== f.mode.indexOf("nav:"), U = f.mode.split(","), V = U.length); for (h = 0; h < u; h++) H.push(c[h].style), Q.push(+c[h].getAttribute("data-step") || 0), A.push(0); z = !!window.addEventListener; P = "ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch; (function() { var a = navigator.userAgent, g = a.indexOf("Android"), d; C = -1 !== a.indexOf("QQBrowser") ? 200 : 0; - 1 !== g && (d = a.substring(g + 7, g + 11).replace(" ", "")); return d || 0 })(); k = function(a) { switch (!0) { case "" === a.webkitTransition: return "webkit"; case "" === a.MozTransition: return "Moz"; case "" === a.msTransition: return "ms"; case "" === a.OTransition: return "O"; default: return "" } }(document.createElement("Chriswang").style); D.prototype = { epsilon: .01, sampleCurveX: function(a) { return ((this.ax * a + this.bx) * a + this.cx) * a }, sampleCurveY: function(a) { return ((this.ay * a + this.by) * a + this.cy) * a }, sampleCurveDerivativeX: function(a) { return (3 * this.ax * a + 2 * this.bx) * a + this.cx }, solveCurveX: function(a, g) { var d, b, e, c; e = a; for (b = 0; 8 > b; b++) { c = this.sampleCurveX(e) - a; if (Math.abs(c) < g) return e; d = this.sampleCurveDerivativeX(e); if (Math.abs(d) < g) break; e -= c / d } d = 0; b = 1; e = a; if (e < d) return d; if (e > b) return b; for (; d < b;) { c = this.sampleCurveX(e); if (Math.abs(c - a) < g) break; a > c ? d = e : b = e; e = .5 * (b - d) + d } return e }, solve: function(a, g) { return this.sampleCurveY(this.solveCurveX(a, g)) } }; I = function() { r = document.documentElement.clientWidth || window.innerWidth; s = document.documentElement.clientHeight || window.innerHeight; E.style.height = s + "px" }; h = function(a, g, b, c) { L = a; F = g; G = b; T = c }; if ("string" === typeof f.easing) switch (f.easing) { case "ease": h(.25, .1, .25, 1); break; case "linear": h(0, 0, 1, 1); break; case "ease-in": h(.42, 0, 1, 1); break; case "ease-out": h(0, 0, .58, 1); break; case "ease-in-out": h(.42, 0, .58, 1) } else h(f.easing[0], f.easing[1], f.easing[2], f.easing[3]); if ("" !== k) { for (; Z--;) H[Z][k + "TransitionTimingFunction"] = "cubic-bezier(" + L + "," + F + "," + G + "," + T + ")"; w = function(a, g, b, c, e) { a = a.style; g = "translate(" + g + "px," + b + "px) translateZ(0)"; e.scale && (g += 0 === c ? " scale(" + e.scale[0] + ")" : " scale(" + e.scale[1] + ")"); e.rotate && (g += 0 === c ? " rotate(" + e.rotate[0] + "deg)" : " rotate(" + e.rotate[1] + "deg)"); a[k + "TransformOrigin"] = "50% 50%"; a[k + "Transform"] = g } } else $ = new D(L, F, G, T), w = function(a, b, c, f) { var e = a.currentStyle, k = a.style, n = parseInt(k.left || e.left, 10), h = parseInt(k.top || e.top, 10), s = b - n, t = c - h, r = +new Date + f, p = 0, q = x.opacity, u; clearInterval(W); W = setInterval(function() { var a; + new Date > r ? (a = q ? "left:" + b + "px;top:" + c + "px;filter:alpha(opacity=" + 100 * q[1] + ");" : "left:" + b + "px;top:" + c + "px;", clearInterval(W)) : (u = r - new Date, p = u / f, p = $.solve(1 - p, D.prototype.epsilon), a = "left:" + (n + s * p) + "px;top:" + (h + t * p) + "px;", q && (a += "filter:alpha(opacity=" + ~~(100 * (q[1] * p - q[0] * (1 - p))) + ");")); k.cssText = a }, 13) }; aa = { transform: function(a, b, d) { var f = 0, e = "" !== k || "none" !== a.translate && a.translate ? C : -50; switch (a.translate) { case "Y": f = d > b ? s : -s; w(c[d], 0, f, 0, a); break; case "X": f = d > b ? r : -r; w(c[d], f, 0, 0, a); break; case "XY": f = { X: d > b ? r : -r, Y: d > b ? s : -s }; w(c[d], f.X, f.Y, 0, a); break; default: w(c[d], 0, 0, 0, a) } setTimeout(function() { w(c[d], 0, 0, B, a) }, e + 50) }, opacity: function(a, b, d) { var f = c[d].style; f.opacity = a[0]; setTimeout(function() { f.opacity = a[1] }, 70) } }; ba = z && P ? navigator.userAgent.indexOf("Firefox") ? function(a, b) { a.addEventListener("click", b, !1) } : function(a, b, c) { a.addEventListener("touchstart", b, !1); c && a.addEventListener("touchmove", function(a) { a.preventDefault() }, !1) } : function(a, b) { a.onclick = b }; n = function(a, b, c) { var f = a.className, e = []; if (-1 !== f.indexOf(b)) { e = f.split(" "); for (f = e.length; f--;) e[f] === b && (" " === c || "" === c ? e.splice(f, 1) : e[f] = c); e.length ? a.className = e.join(" ") : (a.removeAttribute("class"), a.removeAttribute("className")) } }; M && (R = function(a, b) { var c = v[b].className; n(v[a], "active", " "); v[b].className = "" === c ? "active" : c + " active" }); f.continuous && (p = function(a, b) { var c = u; if (b) if (a >= u) for (; c--;) A[c] = 0; else if (0 > a) for (; c--;) A[c] = Q[c]; return (u + a % u) % u }); X = function(a) { var f = A[b]; a = f + a; if (0 <= a && a <= Q[b]) { if (0 === a) return n(c[b], "step1", ""), A[b] = a, !1; if (1 === a && 0 === f) return c[b].className += " step1", A[b] = a, !1; n(c[b], "step" + f, "step" + a); A[b] = a; return !1 } return !0 }; y = function(a, g) { var d = C, h, e; if (!(f.beforeChange && "stop" === f.beforeChange(b, c[b]) || t || a === b)) { if (f.continuous) a = p(a, 1); else if (a >= u || 0 > a) return; t = !0; if (!g && !X(a - b)) return setTimeout(function() { t = !1 }, B); for (e in x) aa[e](x[e], b, a); d += "" === k ? 20 : 0; h = b; b = a; M && R(h, b); setTimeout(function() { c[a].className += " slide" }, d); setTimeout(function() { H[a][k + "TransitionDuration"] = B + "ms" }, 20); setTimeout(function() { n(c[h], "current", ""); n(c[b], "slide", "current"); f.callback && f.callback(b, c[b]); t = !1 }, B + C + 120) } }; I(); h = c[b].className; c[b].className = -1 !== h.indexOf("current") ? h : h + " current"; for (z ? window.addEventListener("resize", I, !1) : window.onresize = I; V--;)(function(a) { switch (!0) { case "wheel" === a: Y = function(a) { a = a || window.event; a.preventDefault ? a.preventDefault() : a.returnValue = !1; t || (a = -a.wheelDelta || a.detail, y(b + (0 > a ? -1 : 1))) }; z && document.addEventListener("DOMMouseScroll", Y, !1); window.onmousewheel = document.onmousewheel = Y; break; case "touch" === a: if (!z) break; (function() { var a = x.transform.scale[0], d = x.transform.scale[1] - a, h = x.transform.rotate[0], e = x.transform.rotate[1] - h, N = x.opacity[0], v = x.opacity[1] - N, w, y, z, C, I, q = {}, D = !1, L = -1 === navigator.userAgent.indexOf("Windows Phone") ? !1 : !0, l, m, F, J, S, G, K, O; K = !P && L ? window.navigator.msPointerEnabled ? { start: "MSPointerDown", move: "MSPointerMove", end: "MSPointerUp" } : { start: "pointerDown", move: "pointerMove", end: "pointerUp" } : { start: "touchstart", move: "touchmove", end: "touchend" }; document.body.ontouchmove = function(a) { a.preventDefault ? a.preventDefault() : a.returnValue = !1 }; "Y" === x.transform.translate ? (F = function() { var a = b - 1, e = b + 1; f.continuous && (a = p(a), e = p(e)); l = H[a]; m = H[e]; l && (l[k + "TransitionDuration"] = "0ms", l[k + "Transform"] = "translate(0,-" + s + "px) translateZ(0)", l[k + "TransformOrigin"] = "50% 100%", c[a].className += " swipe"); m && (m[k + "TransitionDuration"] = "0ms", m[k + "Transform"] = "translate(0," + s + "px) translateZ(0)", m[k + "TransformOrigin"] = "50% 0%", c[e].className += " swipe") }, G = function(b) { var c = Math.abs(b.y / s), f = " scale(" + ~~(100 * (a + d * c)) / 100 + ") rotate(" + ~~(h + e * c) + "deg)"; l && 0 < b.y && (l.opacity = ~~(100 * (N + v * c)) / 100, l[k + "Transform"] = "translate(0," + ~~(b.y - s) + "px) translateZ(0)" + f); m && 0 > b.y && (m.opacity = ~~(100 * (N + v * c)) / 100, m[k + "Transform"] = "translate(0," + ~~(s + b.y) + "px) translateZ(0)" + f) }, J = function(a, e) { var d = B >> 1, g = b + e; f.continuous && (g = p(g)); n(c[g], "swipe", "slide"); a.opacity = 1; a[k + "TransitionDuration"] = d + "ms"; a[k + "Transform"] = "translate(0," + e * s + "px) translateZ(0)"; setTimeout(function() { n(c[g], "slide", ""); setTimeout(function() { t = !1 }, 50) }, d) }, S = function(a, e) { var d = b + e, g = ~~(B / 1.5), h, l; f.continuous ? (d = p(d), h = c[p(b - e)], l = !0) : h = c[b - e]; h && n(h, "swipe", ""); !l && 0 > d || d > u - 1 ? setTimeout(function() { t = !1 }, 50) : (M && R(b, d), a.opacity = 1, n(c[d], "swipe", "slide"), a[k + "TransitionDuration"] = g + "ms", a[k + "Transform"] = "translate(0,0) translateZ(0)", setTimeout(function() { n(c[b], "current", ""); n(c[d], "slide", "current"); b = d; f.callback && f.callback(b, c[b]); setTimeout(function() { t = !1 }, 50) }, g)) }) : (F = function() { var a = b - 1, e = b + 1; f.continuous && (a = p(a), e = p(e)); l = H[a]; m = H[e]; l && (l[k + "TransitionDuration"] = "0ms", l[k + "Transform"] = "translate(-" + r + "px,0) translateZ(0)", l[k + "TransformOrigin"] = "100% 50%", c[a].className += " swipe"); m && (m[k + "TransitionDuration"] = "0ms", m[k + "Transform"] = "translate(" + r + "px,0) translateZ(0)", m[k + "TransformOrigin"] = "0 50%", c[e].className += " swipe") }, G = function(b) { var c = Math.abs(b.x / r), f = " scale(" + ~~(100 * (a + d * c)) / 100 + ") rotate(" + ~~(h + e * c) + "deg)"; l && 0 < b.x && (l.opacity = ~~(100 * (N + v * c)) / 100, l[k + "Transform"] = "translate(" + ~~(b.x - r) + "px,0) translateZ(0)" + f); m && 0 > b.x && (m.opacity = ~~(100 * (N + v * c)) / 100, m[k + "Transform"] = "translate(" + ~~(r + b.x) + "px,0) translateZ(0)" + f) }, J = function(a, e) { var d = B >> 1, g = b + e; f.continuous && (g = p(g)); n(c[g], "swipe", "slide"); a.opacity = 1; a[k + "TransitionDuration"] = d + "ms"; a[k + "Transform"] = "translate(" + e * r + "px,0) translateZ(0)"; setTimeout(function() { n(c[g], "slide", ""); setTimeout(function() { t = !1 }, 50) }, d) }, S = function(a, e) { var d = b + e, g = ~~(B / 1.5), h, l; f.continuous ? (d = p(d), h = c[p(b - e)], l = !0) : h = c[b - e]; h && n(h, "swipe", ""); !l && 0 > d || d > u - 1 ? setTimeout(function() { t = !1 }, 50) : (M && R(b, d), n(c[d], "swipe", "slide"), a.opacity = 1, a[k + "TransitionDuration"] = g + "ms", a[k + "Transform"] = "translate(0,0) translateZ(0)", setTimeout(function() { n(c[b], "current", ""); n(c[d], "slide", "current"); b = d; f.callback && f.callback(b, c[b]); setTimeout(function() { t = !1 }, 50) }, g)) }); w = function(a) { var c = a.touches ? a.touches[0] : a; a.preventDefault(); P && (1 < event.touches.length || event.scale && 1 !== event.scale) || (q = { x: c.pageX - z, y: c.pageY - C }, D ? (a = "X" === f.effect.transform.translate ? 0 > q.x ? 1 : -1 : 0 > q.y ? 1 : -1, 0 <= A[b] + a && A[b] + a <= Q[b] || O && G(q)) : (O = Math.abs(q.x) > Math.abs(q.y) ? "X" : "Y", O = O === f.effect.transform.translate ? !0 : !1, D = !0)) }; y = function(a) { var e = a.changedTouches ? a.changedTouches[0] : a; a = +new Date - I; var d; d = 0; var g = !1; q = { x: e.pageX - z, y: e.pageY - C }; e = Math.abs(q.x); d = Math.abs(q.y); switch (f.effect.transform.translate) { case "Y": g = 250 > +a && 30 < d || d > .3 * s; d = 0 < q.y ? -1 : 1; break; case "X": g = 250 > +a && 30 < e || e > .3 * r; d = 0 < q.x ? -1 : 1; break; default: g = 350 > +a && 50 < d + e || d > .3 * s || e > .3 * r, d = e > d ? 0 < q.x ? -1 : 1 : 0 < q.y ? -1 : 1 } g && O && X(d) && (!1 !== f.continuous || (l || -1 !== d) && (m || 1 !== d)) ? f.beforeChange && "stop" === f.beforeChange(b, c[b]) ? (l && J(l, -1), m && J(m, 1)) : -1 === d ? S(l, -1) : S(m, 1) : (l && J(l, -1), m && J(m, 1)); E.removeEventListener(K.move, w, !1); E.removeEventListener(K.end, y, !1) }; E.addEventListener(K.start, function(a) { a = a.touches ? a.touches[0] : a; if (!t) { t = !0; z = a.pageX; C = a.pageY; I = +new Date; if (f.onSwipeStart && "stop" === f.onSwipeStart(b, c[b])) return t = !1; q = {}; D = !1; F(); E.addEventListener(K.move, w, !1); E.addEventListener(K.end, y, !1) } }, !1) })(); break; case -1 !== a.indexOf("nav:"): (function() { var c = a.split(":")[1], c = document.getElementById(c), d, f; v = c.children; d = v.length; f = v[b].className; if (c && v) { for (; d--;) v[d].setAttribute("data-page", d); - 1 === f.indexOf("active") && (v[b].className = "" === f ? "active" : f + " active"); d = function(a) { var b; a = a || window.event; a = a.target || a.srcElement; for (b = a.tagName.toLowerCase(); "li" !== b;) { if ("ul" === b) return; a = a.parentNode; b = a.tagName.toLowerCase() } y(+a.getAttribute("data-page"), 1) }; ba(c, d, 1) } })() } })(U[V]); return { thisPage: function() { return b }, go: function(a) { y(a) }, next: function() { y(b + 1) }, prev: function() { y(b - 1) } } } }; $(function() { $(".page2-list-01 a").mouseenter(function() { $(".tihuan img").attr("src", "images/tihuan.png") }) $(".page2-list-02 a").mouseenter(function() { $(".tihuan img").attr("src", "images/tihuan2.png") }) $(".page2-list-03 a").mouseenter(function() { $(".tihuan img").attr("src", "images/tihuan3.png") }) $(".page2-list-04 a").mouseenter(function() { $(".tihuan img").attr("src", "images/tihuan5.png") }) $(".page2-list-05 a").mouseenter(function() { $(".tihuan img").attr("src", "images/tihuan4.png") }) $(".page2-list-06 a").mouseenter(function() { $(".tihuan img").attr("src", "images/tihuan6.png") }) }) ! function(a) { a.fn.extend({ YuxiSlider: function(b) { var c = { width: 640, height: 360, control: null, auto: !0, during: 3e3, speed: 800, mousewheel: !1, direkey: !1 }, d = a.extend(c, b); return a(this).each(function() { var b = a(this), c = a("ul", b), e = a("li", b), f = e.length, g = 0, h = null, i = '

'; b.append(i); var j = a("p.title a", b), k = a("em.curr-num", b), l = a("em.total-num", b), m = 0, n = {}, o = {}, p = { mobileDevice: navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i), init: function() { if (p.style(), p.mobileDevice) { var e = a(window).width(), g = d.width / d.height; d.width = e, d.height = e / g, b.css({ fontSize: a(window).width() / 640 * 1.285 + "rem" }) } b.add("img", b).width(d.width).height(d.height), c.width(f * d.width), p.description(), p.bindControl(), f > 2 && c.prepend(a("li", c).last()).css({ left: -d.width }), d.auto && p.auto() }, auto: function() { h = d.auto ? setInterval(function() { p.moving(!0) }, d.during) : null }, stop: function() { h && clearInterval(h) }, description: function() { k.text(g + 1), l.text(f), j.text(e.eq(g).find("img").attr("alt")).attr("href", e.eq(g).find("a").attr("href")).width(d.width - a("span.num", b).width() - 20) }, bindControl: function() { if (p.mobileDevice) { if (d.control && d.control.remove(), 2 >= f) return; c.get(0).addEventListener("touchstart", p.touchstart, !1), c.get(0).addEventListener("touchmove", p.touchmove, !1), c.get(0).addEventListener("touchend", p.touchend, !1) } else { b.hover(function() { d.auto && p.stop(), a(document).on("keydown", function(a) { a.preventDefault(), (39 === a.keyCode || 40 === a.keyCode) && p.moving(!0), (37 === a.keyCode || 38 === a.keyCode) && p.moving(!1) }) }, function() { a(document).unbind(), d.auto && p.auto() }); var e = void 0 !== document.mozHidden ? "DOMMouseScroll" : "mousewheel"; d.mousewheel && b.on(e, function(a) { a.preventDefault(), a.stopPropagation(); var c = a.originalEvent.wheelDelta ? a.originalEvent.wheelDelta : -a.originalEvent.detail, d = b.data("timeoutId"); d && clearInterval(d), b.data("timeoutId", setTimeout(function() { p.moving(0 > c ? !0 : !1), b.removeData("timeoutId") }, 100)) }), d.control && d.control.on("click", function() { p.moving(a(this).index() ? !0 : !1) }).hover(function() { d.auto && p.stop() }, function() { d.auto && p.auto() }) } }, moving: function(b) { if (1 != f) { var e = 0, h = !0; "boolean" == typeof b ? h = b : (h = b > 0 ? !1 : !0, e = b), g = h ? g >= f - 1 ? 0 : g + 1 : 0 >= g ? f - 1 : g - 1, p.description(), f > 2 ? (h ? c.append(a("li", c).first()).css({ left: 0 + e }) : c.prepend(a("li", c).last()).css({ left: -2 * d.width + e }), c.stop().animate({ left: [-d.width, "easeOutExpo"] }, d.speed)) : h ? c.stop().animate({ left: -d.width }, .6 * d.speed, function() { a(this).append(a("li", this).first()).css({ left: 0 }) }) : c.prepend(a("li", c).last()).css({ left: -d.width + e }).stop().animate({ left: 0 }, .6 * d.speed) } }, touchPos: function(a) { for (var c, d, e, b = a.changedTouches, f = {}, g = 0; g < b.length; g++) c = b[g], d = c.clientX, e = c.clientY; return f.x = d, f.y = e, f }, touchstart: function(a) { p.stop(), m = (new Date).getTime(), n = p.touchPos(a), o.left = c.offset().left }, touchmove: function(a) { a.preventDefault(); var b = p.touchPos(a).x - n.x; c.stop().css({ left: o.left + b }) }, touchend: function(a) { var b = p.touchPos(a).x - n.x, e = (new Date).getTime() - m; 0 !== Math.abs(b) && (350 >= e ? p.moving(b) : Math.abs(b) <= d.width / 2 ? c.stop().animate({ left: [o.left, "easeOutExpo"] }, d.speed / 2) : p.moving(b), d.auto && p.auto()) }, style: function() { b.css({ position: "relative", overflow: "hidden" }).fadeIn(450), e.css({ display: "inline", "float": "left" }), c.add(a(".bg", b)).add(a(".desc", b)).add(a(".num", b)).css({ position: "absolute" }), a(".bg", b).css({ background: "#000", filter: "alpha(opacity=50)", opacity: .5 }).add(a(".desc", b)).css({ width: "100%", height: "3em", bottom: 0, left: 0 }), a(".desc").css({ zIndex: 2 }), a("p.title", b).css({ "float": "left", height: "1em", padding: "1em .5em", fontFamily: "microsoft yahei" }), a("p.title a", b).css({ display: "block", color: "#fff", textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden" }), a("span.num", b).css({ right: ".5em", color: "#fff", fontStyle: "italic", fontFamily: 'Georgia, "Monotype Corsiva", Arial, sans-serif' }), a("em", b).css({ display: "inline-block", position: "relative" }), a("em.curr-num", b).css({ fontSize: "2.4em", height: "2em", lineHeight: "2em", color: "#cc191b", bottom: ".625em" }), a("em.total-num", b).css({ fontSize: "1.2em", height: "2em", lineHeight: "2em", top: ".6em" }), a("em.line", b).css({ width: "16px", height: "3em", background: "url(images/splash_white.png) center no-repeat" }) } }; p.init() }) } }) }(jQuery), $.extend($.easing, { easeOutExpo: function(a, b, c, d, e) { return b == e ? c + d : d * (-Math.pow(2, -10 * b / e) + 1) + c } });