function Swipe(n, t) { "use strict"; function d() { var s, h; for (f = u.children, tt = f.length, f.length < 2 && (t.continuous = !1), a.transitions && t.continuous && f.length < 2 && (u.appendChild(f[0].cloneNode(!0)), u.appendChild(u.children[1].cloneNode(!0)), f = u.children), l = new Array(f.length), r = n.getBoundingClientRect().width || n.offsetWidth, u.style.width = f.length * r + "px", s = f.length; s--;) h = f[s], h.style.width = r + "px", h.setAttribute("data-index", s), a.transitions && (h.style.left = s * -r + "px", o(s, i > s ? -r: i < s ? r: 0, 0)); t.continuous && a.transitions && (o(e(i - 1), -r, 0), o(e(i + 1), r, 0)), a.transitions || (u.style.left = i * -r + "px"), n.style.visibility = "visible" } function ft() { t.continuous ? w(i - 1) : i && w(i - 1) } function it() { t.continuous ? w(i + 1) : i < f.length - 1 && w(i + 1) } function e(n) { return (f.length + n % f.length) % f.length } function w(n, u) { var s, v, h; if (i != n) { if (a.transitions) { for (s = Math.abs(i - n) / (i - n), t.continuous && (v = s, s = -l[e(n)] / r, s !== v && (n = -s * f.length + n)), h = Math.abs(i - n) - 1; h--;) o(e((n > i ? n: i) - h - 1), r * s, 0); n = e(n), o(i, r * s, u || c), o(n, 0, u || c), t.continuous && o(e(n - s), -(r * s), 0) } else n = e(n), et(i * -r, n * -r, u || c); i = n, k(t.callback && t.callback(i, f[i])) } } function o(n, t, i) { v(n, t, i), l[n] = t } function v(n, t, i) { var u = f[n], r = u && u.style; r && (r.webkitTransitionDuration = r.MozTransitionDuration = r.msTransitionDuration = r.OTransitionDuration = r.transitionDuration = i + "ms", r.webkitTransform = "translate(" + t + "px,0)translateZ(0)", r.msTransform = r.MozTransform = r.OTransform = "translateX(" + t + "px)") } function et(n, r, e) { if (!e) { u.style.left = r + "px"; return } var o = +new Date, s = setInterval(function() { var h = +new Date - o; if (h > e) { u.style.left = r + "px", y && nt(), t.transitionEnd && t.transitionEnd.call(event, i, f[i]), clearInterval(s); return } u.style.left = (r - n) * (Math.floor(h / e * 100) / 100) + n + "px" }, 4) } function nt() { rt = setTimeout(it, y) } function b() { y = 0, clearTimeout(rt) } var ut = function() {}, k = function(n) { setTimeout(n || ut, 0) }, a = { addEventListener: !!window.addEventListener, touch: "ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch, transitions: function(n) { var t = ["transitionProperty", "WebkitTransition", "MozTransition", "OTransition", "msTransition"], i; for (i in t) if (n.style[t[i]] !== undefined) return ! 0; return ! 1 } (document.createElement("swipe")) }, u, f, l, r, tt, i, c, y, rt; if (n) { u = n.children[0], t = t || {}, i = parseInt(t.startSlide, 10) || 0, c = t.speed || 300, t.continuous = t.continuous !== undefined ? t.continuous: !0, y = t.auto || 0; var g = {}, s = {}, p, h = { handleEvent: function(n) { switch (n.type) { case "touchstart": this.start(n); break; case "touchmove": this.move(n); break; case "touchend": k(this.end(n)); break; case "webkitTransitionEnd": case "msTransitionEnd": case "oTransitionEnd": case "otransitionend": case "transitionend": k(this.transitionEnd(n)); break; case "resize": k(d.call()) } t.stopPropagation && n.stopPropagation() }, start: function(n) { var t = n.touches[0]; g = { x: t.pageX, y: t.pageY, time: +new Date }, p = undefined, s = {}, u.addEventListener("touchmove", this, !1), u.addEventListener("touchend", this, !1) }, move: function(n) { if (! (n.touches.length > 1) && (!n.scale || n.scale === 1)) { t.disableScroll && n.preventDefault(); var u = n.touches[0]; s = { x: u.pageX - g.x, y: u.pageY - g.y }, typeof p == "undefined" && (p = !!(p || Math.abs(s.x) < Math.abs(s.y))), p || (n.preventDefault(), b(), t.continuous ? (v(e(i - 1), s.x + l[e(i - 1)], 0), v(i, s.x + l[i], 0), v(e(i + 1), s.x + l[e(i + 1)], 0)) : (s.x = s.x / (!i && s.x > 0 || i == f.length - 1 && s.x < 0 ? Math.abs(s.x) / r + 1 : 1), v(i - 1, s.x + l[i - 1], 0), v(i, s.x + l[i], 0), v(i + 1, s.x + l[i + 1], 0))) } }, end: function() { var y = +new Date - g.time, w = Number(y) < 250 && Math.abs(s.x) > 20 || Math.abs(s.x) > r / 2, a = !i && s.x > 0 || i == f.length - 1 && s.x < 0, v; t.continuous && (a = !1), v = s.x < 0, p || (w && !a ? (v ? (t.continuous ? (o(e(i - 1), -r, 0), o(e(i + 2), r, 0)) : o(i - 1, -r, 0), o(i, l[i] - r, c), o(e(i + 1), l[e(i + 1)] - r, c), i = e(i + 1)) : (t.continuous ? (o(e(i + 1), r, 0), o(e(i - 2), -r, 0)) : o(i + 1, r, 0), o(i, l[i] + r, c), o(e(i - 1), l[e(i - 1)] + r, c), i = e(i - 1)), t.callback && t.callback(i, f[i])) : t.continuous ? (o(e(i - 1), -r, c), o(i, 0, c), o(e(i + 1), r, c)) : (o(i - 1, -r, c), o(i, 0, c), o(i + 1, r, c))), u.removeEventListener("touchmove", h, !1), u.removeEventListener("touchend", h, !1) }, transitionEnd: function(n) { parseInt(n.target.getAttribute("data-index"), 10) == i && (y && nt(), t.transitionEnd && t.transitionEnd.call(n, i, f[i])) } }; return d(), y && nt(), a.addEventListener ? (a.touch && u.addEventListener("touchstart", h, !1), a.transitions && (u.addEventListener("webkitTransitionEnd", h, !1), u.addEventListener("msTransitionEnd", h, !1), u.addEventListener("oTransitionEnd", h, !1), u.addEventListener("otransitionend", h, !1), u.addEventListener("transitionend", h, !1)), window.addEventListener("resize", h, !1)) : window.onresize = function() { d() }, { setup: function() { d() }, slide: function(n, t) { b(), w(n, t) }, prev: function() { b(), ft() }, next: function() { b(), it() }, getPos: function() { return i }, getNumSlides: function() { return tt }, kill: function() { var n, t; for (b(), u.style.width = "auto", u.style.left = 0, n = f.length; n--;) t = f[n], t.style.width = "100%", t.style.left = 0, a.transitions && v(n, 0, 0); a.addEventListener ? (u.removeEventListener("touchstart", h, !1), u.removeEventListener("webkitTransitionEnd", h, !1), u.removeEventListener("msTransitionEnd", h, !1), u.removeEventListener("oTransitionEnd", h, !1), u.removeEventListener("otransitionend", h, !1), u.removeEventListener("transitionend", h, !1), window.removeEventListener("resize", h, !1)) : window.onresize = null } } } } var hassendlo, intervallo; (function(n) { typeof define == "function" && define.amd ? define(["jquery"], n) : n(jQuery) })(function(n) { function i(n) { return t.raw ? n: encodeURIComponent(n) } function f(n) { return t.raw ? n: decodeURIComponent(n) } function e(n) { return i(t.json ? JSON.stringify(n) : String(n)) } function o(n) { n.indexOf('"') === 0 && (n = n.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")); try { n = decodeURIComponent(n.replace(u, " ")) } catch(i) { return } try { return t.json ? JSON.parse(n) : n } catch(i) {} } function r(i, r) { var u = t.raw ? i: o(i); return n.isFunction(r) ? r(u) : u } var u = /\+/g, t = n.cookie = function(u, o, s) { var y, a, h, v, c, p; if (o !== undefined && !n.isFunction(o)) return s = n.extend({}, t.defaults, s), typeof s.expires == "number" && (y = s.expires, a = s.expires = new Date, a.setDate(a.getDate() + y)), document.cookie = [i(u), "=", e(o), s.expires ? "; expires=" + s.expires.toUTCString() : "", s.path ? "; path=" + s.path: "", s.domain ? "; domain=" + s.domain: "", s.secure ? "; secure": ""].join(""); for (h = u ? undefined: {}, v = document.cookie ? document.cookie.split("; ") : [], c = 0, p = v.length; c < p; c++) { var w = v[c].split("="), b = f(w.shift()), l = w.join("="); if (u && u === b) { h = r(l, o); break } u || (l = r(l)) === undefined || (h[b] = l) } return h }; t.defaults = {}, n.removeCookie = function(t, i) { return n.cookie(t) !== undefined ? (n.cookie(t, "", n.extend({}, i, { expires: -1 })), !0) : !1 } }), hassendlo = !1, $(document).ready(function() { var n, t; $("#srcoll-cars img").lazyload({ effect: "fadeIn", threshold: 300 }), $(".buycar-guide img").lazyload({ effect: "fadeIn", threshold: 50 }), n = $("#brandList ul li:gt(11)"), n.hide(), t = $("#showMore"), t.toggle(function() { n.show(), $(this).find("a").removeClass("hide").addClass("show").text("收起全部品牌") }, function() { n.hide(), $(this).find("a").removeClass("show").addClass("hide").text("查看全部品牌") }), $(".select-city").change(function() { var n = $(this).val(); window.open(n, "_self") }), $(".select-box select").change(function() { var n = $(this).val(), t, i; n != 0 && (t = n.substring(0, 1), i = $("#CityPinYin").val(), n = i != "" ? "/" + i + "/list/" + n + "?st=" + t: "/list/" + n + "?st=" + t, window.open(n, "_self")) }) }), ! function(n, t, i, r) { var u = n(t); n.fn.lazyload = function(f) { function s() { var t = 0; o.each(function() { var i = n(this); if ((!e.skip_invisible || i.is(":visible")) && !n.abovethetop(this, e) && !n.leftofbegin(this, e)) if (n.belowthefold(this, e) || n.rightoffold(this, e)) { if (++t > e.failure_limit) return ! 1 } else i.trigger("appear"), t = 0 }) } var h, o = this, e = { threshold: 0, failure_limit: 0, event: "scroll", effect: "show", container: t, data_attribute: "original", skip_invisible: !0, appear: null, load: null, placeholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" }; return f && (r !== f.failurelimit && (f.failure_limit = f.failurelimit, delete f.failurelimit), r !== f.effectspeed && (f.effect_speed = f.effectspeed, delete f.effectspeed), n.extend(e, f)), h = e.container === r || e.container === t ? u: n(e.container), 0 === e.event.indexOf("scroll") && h.bind(e.event, function() { return s() }), this.each(function() { var i = this, t = n(i); i.loaded = !1, (t.attr("src") === r || t.attr("src") === !1) && t.is("img") && t.attr("src", e.placeholder), t.one("appear", function() { if (!this.loaded) { if (e.appear) { var r = o.length; e.appear.call(i, r, e) } n("").bind("load", function() { var r = t.attr("data-" + e.data_attribute), u, f; t.hide(), t.is("img") ? t.attr("src", r) : t.css("background-image", "url('" + r + "')"), t[e.effect](e.effect_speed), i.loaded = !0, u = n.grep(o, function(n) { return ! n.loaded }), (o = n(u), e.load) && (f = o.length, e.load.call(i, f, e)) }).attr("src", t.attr("data-" + e.data_attribute)) } }), 0 !== e.event.indexOf("scroll") && t.bind(e.event, function() { i.loaded || t.trigger("appear") }) }), u.bind("resize", function() { s() }), /(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion) && u.bind("pageshow", function(t) { t.originalEvent && t.originalEvent.persisted && o.each(function() { n(this).trigger("appear") }) }), n(i).ready(function() { s() }), this }, n.belowthefold = function(i, f) { var e; return e = f.container === r || f.container === t ? (t.innerHeight ? t.innerHeight: u.height()) + u.scrollTop() : n(f.container).offset().top + n(f.container).height(), e <= n(i).offset().top - f.threshold }, n.rightoffold = function(i, f) { var e; return e = f.container === r || f.container === t ? u.width() + u.scrollLeft() : n(f.container).offset().left + n(f.container).width(), e <= n(i).offset().left - f.threshold }, n.abovethetop = function(i, f) { var e; return e = f.container === r || f.container === t ? u.scrollTop() : n(f.container).offset().top, e >= n(i).offset().top + f.threshold + n(i).height() }, n.leftofbegin = function(i, f) { var e; return e = f.container === r || f.container === t ? u.scrollLeft() : n(f.container).offset().left, e >= n(i).offset().left + f.threshold + n(i).width() }, n.inviewport = function(t, i) { return ! (n.rightoffold(t, i) || n.leftofbegin(t, i) || n.belowthefold(t, i) || n.abovethetop(t, i)) }, n.extend(n.expr[":"], { "below-the-fold": function(t) { return n.belowthefold(t, { threshold: 0 }) }, "above-the-top": function(t) { return ! n.belowthefold(t, { threshold: 0 }) }, "right-of-screen": function(t) { return n.rightoffold(t, { threshold: 0 }) }, "left-of-screen": function(t) { return ! n.rightoffold(t, { threshold: 0 }) }, "in-viewport": function(t) { return n.inviewport(t, { threshold: 0 }) }, "above-the-fold": function(t) { return ! n.belowthefold(t, { threshold: 0 }) }, "right-of-fold": function(t) { return n.rightoffold(t, { threshold: 0 }) }, "left-of-fold": function(t) { return ! n.rightoffold(t, { threshold: 0 }) } }) } (jQuery, window, document), (window.jQuery || window.Zepto) && function(n) { n.fn.Swipe = function(t) { return this.each(function() { n(this).data("Swipe", new Swipe(n(this)[0], t)) }) } } (window.jQuery || window.Zepto)