/* mGlobal.lib.min.js */ /*! chrysler-mobile - v0.1.0 - 2014-02-03, 3:04 PM EST */ /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license //@ sourceMappingURL=jquery.min.map */ ! function(a, b) { function c(a) { var b = a.length, c = ib.type(a); return ib.isWindow(a) ? !1 : 1 === a.nodeType && b ? !0 : "array" === c || "function" !== c && (0 === b || "number" == typeof b && b > 0 && b - 1 in a) } function d(a) { var b = xb[a] = {}; return ib.each(a.match(kb) || [], function(a, c) { b[c] = !0 }), b } function e(a, c, d, e) { if (ib.acceptData(a)) { var f, g, h = ib.expando, i = "string" == typeof c, j = a.nodeType, k = j ? ib.cache : a, l = j ? a[h] : a[h] && h; if (l && k[l] && (e || k[l].data) || !i || d !== b) return l || (j ? a[h] = l = _.pop() || ib.guid++ : l = h), k[l] || (k[l] = {}, j || (k[l].toJSON = ib.noop)), ("object" == typeof c || "function" == typeof c) && (e ? k[l] = ib.extend(k[l], c) : k[l].data = ib.extend(k[l].data, c)), f = k[l], e || (f.data || (f.data = {}), f = f.data), d !== b && (f[ib.camelCase(c)] = d), i ? (g = f[c], null == g && (g = f[ib.camelCase(c)])) : g = f, g } } function f(a, b, c) { if (ib.acceptData(a)) { var d, e, f, g = a.nodeType, i = g ? ib.cache : a, j = g ? a[ib.expando] : ib.expando; if (i[j]) { if (b && (f = c ? i[j] : i[j].data)) { ib.isArray(b) ? b = b.concat(ib.map(b, ib.camelCase)) : b in f ? b = [b] : (b = ib.camelCase(b), b = b in f ? [b] : b.split(" ")); for (d = 0, e = b.length; e > d; d++) delete f[b[d]]; if (!(c ? h : ib.isEmptyObject)(f)) return }(c || (delete i[j].data, h(i[j]))) && (g ? ib.cleanData([a], !0) : ib.support.deleteExpando || i != i.window ? delete i[j] : i[j] = null) } } } function g(a, c, d) { if (d === b && 1 === a.nodeType) { var e = "data-" + c.replace(zb, "-$1").toLowerCase(); if (d = a.getAttribute(e), "string" == typeof d) { try { d = "true" === d ? !0 : "false" === d ? !1 : "null" === d ? null : +d + "" === d ? +d : yb.test(d) ? ib.parseJSON(d) : d } catch (f) {} ib.data(a, c, d) } else d = b } return d } function h(a) { var b; for (b in a) if (("data" !== b || !ib.isEmptyObject(a[b])) && "toJSON" !== b) return !1; return !0 } function i() { return !0 } function j() { return !1 } function k(a, b) { do a = a[b]; while (a && 1 !== a.nodeType); return a } function l(a, b, c) { if (b = b || 0, ib.isFunction(b)) return ib.grep(a, function(a, d) { var e = !!b.call(a, d, a); return e === c }); if (b.nodeType) return ib.grep(a, function(a) { return a === b === c }); if ("string" == typeof b) { var d = ib.grep(a, function(a) { return 1 === a.nodeType }); if (Rb.test(b)) return ib.filter(b, d, !c); b = ib.filter(b, d) } return ib.grep(a, function(a) { return ib.inArray(a, b) >= 0 === c }) } function m(a) { var b = Ub.split("|"), c = a.createDocumentFragment(); if (c.createElement) for (; b.length;) c.createElement(b.pop()); return c } function n(a, b) { return a.getElementsByTagName(b)[0] || a.appendChild(a.ownerDocument.createElement(b)) } function o(a) { var b = a.getAttributeNode("type"); return a.type = (b && b.specified) + "/" + a.type, a } function p(a) { var b = ec.exec(a.type); return b ? a.type = b[1] : a.removeAttribute("type"), a } function q(a, b) { for (var c, d = 0; null != (c = a[d]); d++) ib._data(c, "globalEval", !b || ib._data(b[d], "globalEval")) } function r(a, b) { if (1 === b.nodeType && ib.hasData(a)) { var c, d, e, f = ib._data(a), g = ib._data(b, f), h = f.events; if (h) { delete g.handle, g.events = {}; for (c in h) for (d = 0, e = h[c].length; e > d; d++) ib.event.add(b, c, h[c][d]) } g.data && (g.data = ib.extend({}, g.data)) } } function s(a, b) { var c, d, e; if (1 === b.nodeType) { if (c = b.nodeName.toLowerCase(), !ib.support.noCloneEvent && b[ib.expando]) { e = ib._data(b); for (d in e.events) ib.removeEvent(b, d, e.handle); b.removeAttribute(ib.expando) } "script" === c && b.text !== a.text ? (o(b).text = a.text, p(b)) : "object" === c ? (b.parentNode && (b.outerHTML = a.outerHTML), ib.support.html5Clone && a.innerHTML && !ib.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : "input" === c && bc.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : "option" === c ? b.defaultSelected = b.selected = a.defaultSelected : ("input" === c || "textarea" === c) && (b.defaultValue = a.defaultValue) } } function t(a, c) { var d, e, f = 0, g = typeof a.getElementsByTagName !== V ? a.getElementsByTagName(c || "*") : typeof a.querySelectorAll !== V ? a.querySelectorAll(c || "*") : b; if (!g) for (g = [], d = a.childNodes || a; null != (e = d[f]); f++) !c || ib.nodeName(e, c) ? g.push(e) : ib.merge(g, t(e, c)); return c === b || c && ib.nodeName(a, c) ? ib.merge([a], g) : g } function u(a) { bc.test(a.type) && (a.defaultChecked = a.checked) } function v(a, b) { if (b in a) return b; for (var c = b.charAt(0).toUpperCase() + b.slice(1), d = b, e = yc.length; e--;) if (b = yc[e] + c, b in a) return b; return d } function w(a, b) { return a = b || a, "none" === ib.css(a, "display") || !ib.contains(a.ownerDocument, a) } function x(a, b) { for (var c, d, e, f = [], g = 0, h = a.length; h > g; g++) d = a[g], d.style && (f[g] = ib._data(d, "olddisplay"), c = d.style.display, b ? (f[g] || "none" !== c || (d.style.display = ""), "" === d.style.display && w(d) && (f[g] = ib._data(d, "olddisplay", B(d.nodeName)))) : f[g] || (e = w(d), (c && "none" !== c || !e) && ib._data(d, "olddisplay", e ? c : ib.css(d, "display")))); for (g = 0; h > g; g++) d = a[g], d.style && (b && "none" !== d.style.display && "" !== d.style.display || (d.style.display = b ? f[g] || "" : "none")); return a } function y(a, b, c) { var d = rc.exec(b); return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b } function z(a, b, c, d, e) { for (var f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, g = 0; 4 > f; f += 2) "margin" === c && (g += ib.css(a, c + xc[f], !0, e)), d ? ("content" === c && (g -= ib.css(a, "padding" + xc[f], !0, e)), "margin" !== c && (g -= ib.css(a, "border" + xc[f] + "Width", !0, e))) : (g += ib.css(a, "padding" + xc[f], !0, e), "padding" !== c && (g += ib.css(a, "border" + xc[f] + "Width", !0, e))); return g } function A(a, b, c) { var d = !0, e = "width" === b ? a.offsetWidth : a.offsetHeight, f = kc(a), g = ib.support.boxSizing && "border-box" === ib.css(a, "boxSizing", !1, f); if (0 >= e || null == e) { if (e = lc(a, b, f), (0 > e || null == e) && (e = a.style[b]), sc.test(e)) return e; d = g && (ib.support.boxSizingReliable || e === a.style[b]), e = parseFloat(e) || 0 } return e + z(a, b, c || (g ? "border" : "content"), d, f) + "px" } function B(a) { var b = W, c = uc[a]; return c || (c = C(a, b), "none" !== c && c || (jc = (jc || ib("' }; b.st.video = a.extend({}, b._a7, b.st.video); b.ev.on("rsBeforeSizeSet", function() { b._b7 && setTimeout(function() { var d = b._r1, d = d.hasClass("rsVideoContainer") ? d : d.find(".rsVideoContainer"); b._c7 && b._c7.css({ width: d.width(), height: d.height() }) }, 32) }); var c = b._a.mozilla; b.ev.on("rsAfterParseNode", function(d, i, h) { d = a(i); if (h.videoURL) { b.st.video.disableCSS3inFF && c && (b._e = b._f = !1); i = a('
'); var f = a('
'); d.hasClass("rsImg") ? h.content = i.append(d).append(f) : h.content.find(".rsImg").wrap(i).after(f) } }); b.ev.on("rsAfterSlideChange", function() { b.stopVideo() }) }, toggleVideo: function() { return this._b7 ? this.stopVideo() : this.playVideo() }, playVideo: function() { var g = this; var i; var h = { height: 360, width: 640, autoPlay: g.currSlide.autoPlay }; g.st.video.ytContainer = "vidContainer" + Math.floor((Math.random() * 100) + 1); g.st.video.youTubeCode = '
'; if (!g._b7) { var k = g.currSlide; if (!k.videoURL) { return !1 } g._d7 = k; var f = g._e7 = k.content, k = k.videoURL, l, j; k.match(/youtu\.be/i) || k.match(/youtube\.com/i) ? (j = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/, (j = k.match(j)) && 11 == j[7].length && (l = j[7]), void 0 !== l && (g._c7 = g.st.video.youTubeCode)) : k.match(/vimeo\.com/i) && (j = /(www\.)?vimeo.com\/(\d+)($|\/)/, (j = k.match(j)) && (l = j[2]), void 0 !== l && (g._c7 = g.st.video.vimeoCode.replace("%id%", l))); g.videoObj = a(g._c7); g.ev.trigger("rsOnCreateVideoElement", [k]); g.videoObj.length && (g._c7 = a('
'), g._c7.find(".rsPreloader").after(g.videoObj), f = f.hasClass("rsVideoContainer") ? f : f.find(".rsVideoContainer"), g._c7.css({ width: f.width(), height: f.height() }).find(".rsCloseVideoBtn").off("click.rsv").on("click.rsv", function(c) { g.stopVideo(); c.preventDefault(); c.stopPropagation(); return !1 }), f.append(g._c7), g.isIPAD && f.addClass("rsIOSVideo"), g._f7(!1), setTimeout(function() { g._c7.addClass("rsVideoActive") }, 10), g.ev.trigger("rsVideoPlay"), g._b7 = !0); i = new YouTubePlayer(l, g.st.video.ytContainer, h); return !0 } return !1 }, stopVideo: function() { var b = this; return b._b7 ? (b.isIPAD && b.slider.find(".rsCloseVideoBtn").remove(), b._f7(!0), setTimeout(function() { b.ev.trigger("rsOnDestroyVideoElement", [b.videoObj]); var e = b._c7.find("iframe"); if (e.length) { try { e.attr("src", "") } catch (c) {} } b._c7.remove(); b._c7 = null }, 16), b.ev.trigger("rsVideoStop"), b._b7 = !1, !0) : !1 }, _f7: function(f, g) { var e = [], h = this.st.video; h.autoHideArrows && (this._c2 && (e.push(this._c2, this._d2), this._e2 = !f), this._v5 && e.push(this._v5)); h.autoHideControlNav && this._k5 && e.push(this._k5); h.autoHideBlocks && this._d7.animBlocks && e.push(this._d7.animBlocks); h.autoHideCaption && this.globalCaption && e.push(this.globalCaption); this.slider[f ? "removeClass" : "addClass"]("rsVideoPlaying"); if (e.length) { for (h = 0; h < e.length; h++) { f ? e[h].removeClass("rsHidden") : e[h].addClass("rsHidden") } } } }); a.rsModules.video = a.rsProto._z6 })(jQuery); (function(a) { a.rsProto._g7 = function() { var b = this; b.st.visibleNearby && b.st.visibleNearby.enabled && (b._h7 = { enabled: !0, centerArea: 0.6, center: !0, breakpoint: 0, breakpointCenterArea: 0.8, hiddenOverflow: !0, navigateByCenterClick: !1 }, b.st.visibleNearby = a.extend({}, b._h7, b.st.visibleNearby), b.ev.one("rsAfterPropsSetup", function() { b._i7 = b._e1.css("overflow", "visible").wrap('
').parent(); b.st.visibleNearby.hiddenOverflow || b._i7.css("overflow", "visible"); b._o1 = b.st.controlsInside ? b._i7 : b.slider }), b.ev.on("rsAfterSizePropSet", function() { var d, e = b.st.visibleNearby; d = e.breakpoint && b.width < e.breakpoint ? e.breakpointCenterArea : e.centerArea; b._h ? (b._b4 *= d, b._i7.css({ height: b._c4, width: b._b4 / d }), b._d = b._b4 * (1 - d) / 2 / d) : (b._c4 *= d, b._i7.css({ height: b._c4 / d, width: b._b4 }), b._d = b._c4 * (1 - d) / 2 / d); e.navigateByCenterClick || (b._q = b._h ? b._b4 : b._c4); e.center && b._e1.css("margin-" + (b._h ? "left" : "top"), b._d) })) }; a.rsModules.visibleNearby = a.rsProto._g7 })(jQuery); /*! handlebars v1.3.0 Copyright (C) 2011 by Yehuda Katz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @license */ var Handlebars = function() { var a = function() { "use strict"; function a(a) { this.string = a } var b; return a.prototype.toString = function() { return "" + this.string }, b = a }(), b = function(a) { "use strict"; function b(a) { return h[a] || "&" } function c(a, b) { for (var c in b) Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]) } function d(a) { return a instanceof g ? a.toString() : a || 0 === a ? (a = "" + a, j.test(a) ? a.replace(i, b) : a) : "" } function e(a) { return a || 0 === a ? m(a) && 0 === a.length ? !0 : !1 : !0 } var f = {}, g = a, h = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "`": "`" }, i = /[&<>"'`]/g, j = /[&<>"'`]/; f.extend = c; var k = Object.prototype.toString; f.toString = k; var l = function(a) { return "function" == typeof a }; l(/x/) && (l = function(a) { return "function" == typeof a && "[object Function]" === k.call(a) }); var l; f.isFunction = l; var m = Array.isArray || function(a) { return a && "object" == typeof a ? "[object Array]" === k.call(a) : !1 }; return f.isArray = m, f.escapeExpression = d, f.isEmpty = e, f }(a), c = function() { "use strict"; function a(a, b) { var d; b && b.firstLine && (d = b.firstLine, a += " - " + d + ":" + b.firstColumn); for (var e = Error.prototype.constructor.call(this, a), f = 0; f < c.length; f++) this[c[f]] = e[c[f]]; d && (this.lineNumber = d, this.column = b.firstColumn) } var b, c = ["description", "fileName", "lineNumber", "message", "name", "number", "stack"]; return a.prototype = new Error, b = a }(), d = function(a, b) { "use strict"; function c(a, b) { this.helpers = a || {}, this.partials = b || {}, d(this) } function d(a) { a.registerHelper("helperMissing", function(a) { if (2 === arguments.length) return void 0; throw new h("Missing helper: '" + a + "'") }), a.registerHelper("blockHelperMissing", function(b, c) { var d = c.inverse || function() {}, e = c.fn; return m(b) && (b = b.call(this)), b === !0 ? e(this) : b === !1 || null == b ? d(this) : l(b) ? b.length > 0 ? a.helpers.each(b, c) : d(this) : e(b) }), a.registerHelper("each", function(a, b) { var c, d = b.fn, e = b.inverse, f = 0, g = ""; if (m(a) && (a = a.call(this)), b.data && (c = q(b.data)), a && "object" == typeof a) if (l(a)) for (var h = a.length; h > f; f++) c && (c.index = f, c.first = 0 === f, c.last = f === a.length - 1), g += d(a[f], { data: c }); else for (var i in a) a.hasOwnProperty(i) && (c && (c.key = i, c.index = f, c.first = 0 === f), g += d(a[i], { data: c }), f++); return 0 === f && (g = e(this)), g }), a.registerHelper("if", function(a, b) { return m(a) && (a = a.call(this)), !b.hash.includeZero && !a || g.isEmpty(a) ? b.inverse(this) : b.fn(this) }), a.registerHelper("unless", function(b, c) { return a.helpers["if"].call(this, b, { fn: c.inverse, inverse: c.fn, hash: c.hash }) }), a.registerHelper("with", function(a, b) { return m(a) && (a = a.call(this)), g.isEmpty(a) ? void 0 : b.fn(a) }), a.registerHelper("log", function(b, c) { var d = c.data && null != c.data.level ? parseInt(c.data.level, 10) : 1; a.log(d, b) }) } function e(a, b) { p.log(a, b) } var f = {}, g = a, h = b, i = "1.3.0"; f.VERSION = i; var j = 4; f.COMPILER_REVISION = j; var k = { 1: "<= 1.0.rc.2", 2: "== 1.0.0-rc.3", 3: "== 1.0.0-rc.4", 4: ">= 1.0.0" }; f.REVISION_CHANGES = k; var l = g.isArray, m = g.isFunction, n = g.toString, o = "[object Object]"; f.HandlebarsEnvironment = c, c.prototype = { constructor: c, logger: p, log: e, registerHelper: function(a, b, c) { if (n.call(a) === o) { if (c || b) throw new h("Arg not supported with multiple helpers"); g.extend(this.helpers, a) } else c && (b.not = c), this.helpers[a] = b }, registerPartial: function(a, b) { n.call(a) === o ? g.extend(this.partials, a) : this.partials[a] = b } }; var p = { methodMap: { 0: "debug", 1: "info", 2: "warn", 3: "error" }, DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3, log: function(a, b) { if (p.level <= a) { var c = p.methodMap[a]; "undefined" != typeof console && console[c] && console[c].call(console, b) } } }; f.logger = p, f.log = e; var q = function(a) { var b = {}; return g.extend(b, a), b }; return f.createFrame = q, f }(b, c), e = function(a, b, c) { "use strict"; function d(a) { var b = a && a[0] || 1, c = m; if (b !== c) { if (c > b) { var d = n[c], e = n[b]; throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + d + ") or downgrade your runtime to an older version (" + e + ").") } throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + a[1] + ").") } } function e(a, b) { if (!b) throw new l("No environment passed to template"); var c = function(a, c, d, e, f, g) { var h = b.VM.invokePartial.apply(this, arguments); if (null != h) return h; if (b.compile) { var i = { helpers: e, partials: f, data: g }; return f[c] = b.compile(a, { data: void 0 !== g }, b), f[c](d, i) } throw new l("The partial " + c + " could not be compiled when running in runtime-only mode") }, d = { escapeExpression: k.escapeExpression, invokePartial: c, programs: [], program: function(a, b, c) { var d = this.programs[a]; return c ? d = g(a, b, c) : d || (d = this.programs[a] = g(a, b)), d }, merge: function(a, b) { var c = a || b; return a && b && a !== b && (c = {}, k.extend(c, b), k.extend(c, a)), c }, programWithDepth: b.VM.programWithDepth, noop: b.VM.noop, compilerInfo: null }; return function(c, e) { e = e || {}; var f, g, h = e.partial ? e : b; e.partial || (f = e.helpers, g = e.partials); var i = a.call(d, h, c, f, g, e.data); return e.partial || b.VM.checkRevision(d.compilerInfo), i } } function f(a, b, c) { var d = Array.prototype.slice.call(arguments, 3), e = function(a, e) { return e = e || {}, b.apply(this, [a, e.data || c].concat(d)) }; return e.program = a, e.depth = d.length, e } function g(a, b, c) { var d = function(a, d) { return d = d || {}, b(a, d.data || c) }; return d.program = a, d.depth = 0, d } function h(a, b, c, d, e, f) { var g = { partial: !0, helpers: d, partials: e, data: f }; if (void 0 === a) throw new l("The partial " + b + " could not be found"); return a instanceof Function ? a(c, g) : void 0 } function i() { return "" } var j = {}, k = a, l = b, m = c.COMPILER_REVISION, n = c.REVISION_CHANGES; return j.checkRevision = d, j.template = e, j.programWithDepth = f, j.program = g, j.invokePartial = h, j.noop = i, j }(b, c, d), f = function(a, b, c, d, e) { "use strict"; var f, g = a, h = b, i = c, j = d, k = e, l = function() { var a = new g.HandlebarsEnvironment; return j.extend(a, g), a.SafeString = h, a.Exception = i, a.Utils = j, a.VM = k, a.template = function(b) { return k.template(b, a) }, a }, m = l(); return m.create = l, f = m }(d, a, c, b, e); return f }(); /*! chrysler-mobile - v0.1.0 - 2014-02-03, 3:04 PM EST */ /*! * jQuery Cookie Plugin v1.3.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ ! function(a) { "function" == typeof define && define.amd ? define(["jquery"], a) : a(jQuery) }(function(a) { function b(a) { return a } function c(a) { return decodeURIComponent(a.replace(e, " ")) } function d(a) { 0 === a.indexOf('"') && (a = a.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")); try { return f.json ? JSON.parse(a) : a } catch (b) {} } var e = /\+/g, f = a.cookie = function(e, g, h) { if (void 0 !== g) { if (h = a.extend({}, f.defaults, h), "number" == typeof h.expires) { var i = h.expires, j = h.expires = new Date; j.setDate(j.getDate() + i) } return g = f.json ? JSON.stringify(g) : String(g), document.cookie = [f.raw ? e : encodeURIComponent(e), "=", f.raw ? g : encodeURIComponent(g), h.expires ? "; expires=" + h.expires.toUTCString() : "", h.path ? "; path=" + h.path : "", h.domain ? "; domain=" + h.domain : "", h.secure ? "; secure" : ""].join("") } for (var k = f.raw ? b : c, l = document.cookie.split("; "), m = e ? void 0 : {}, n = 0, o = l.length; o > n; n++) { var p = l[n].split("="), q = k(p.shift()), r = k(p.join("=")); if (e && e === q) { m = d(r); break } e || (m[q] = d(r)) } return m }; f.defaults = {}, a.removeCookie = function(b, c) { return void 0 !== a.cookie(b) ? (a.cookie(b, "", a.extend({}, c, { expires: -1 })), !0) : !1 } }); /*! chrysler-mobile - v0.1.0 - 2014-02-03, 3:04 PM EST */ ! function(a) { a.extend(a.fn, { validate: function(b) { if (!this.length) return void(b && b.debug && window.console && console.warn("nothing selected, can't validate, returning nothing")); var c = a.data(this[0], "validator"); return c ? c : (c = new a.validator(b, this[0]), a.data(this[0], "validator", c), c.settings.onsubmit && (this.find("input, button").filter(".cancel").click(function() { c.cancelSubmit = !0 }), c.settings.submitHandler && this.find("input, button").filter(":submit").click(function() { c.submitButton = this }), this.submit(function(b) { function d() { if (c.settings.submitHandler) { if (c.submitButton) var b = a("").attr("name", c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm); return c.settings.submitHandler.call(c, c.currentForm), c.submitButton && b.remove(), !1 } return !0 } return c.settings.debug && b.preventDefault(), c.cancelSubmit ? (c.cancelSubmit = !1, d()) : c.form() ? c.pendingRequest ? (c.formSubmitted = !0, !1) : d() : (c.focusInvalid(), !1) })), c) }, valid: function() { if (a(this[0]).is("form")) return this.validate().form(); var b = !0, c = a(this[0].form).validate(); return this.each(function() { b &= c.element(this) }), b }, removeAttrs: function(b) { var c = {}, d = this; return a.each(b.split(/\s/), function(a, b) { c[b] = d.attr(b), d.removeAttr(b) }), c }, rules: function(b, c) { var d = this[0]; if (b) { var e = a.data(d.form, "validator").settings, f = e.rules, g = a.validator.staticRules(d); switch (b) { case "add": a.extend(g, a.validator.normalizeRule(c)), f[d.name] = g, c.messages && (e.messages[d.name] = a.extend(e.messages[d.name], c.messages)); break; case "remove": if (!c) return delete f[d.name], g; var h = {}; return a.each(c.split(/\s/), function(a, b) { h[b] = g[b], delete g[b] }), h } } var i = a.validator.normalizeRules(a.extend({}, a.validator.metadataRules(d), a.validator.classRules(d), a.validator.attributeRules(d), a.validator.staticRules(d)), d); if (i.required) { var j = i.required; delete i.required, i = a.extend({ required: j }, i) } return i } }), a.extend(a.expr[":"], { blank: function(b) { return !a.trim("" + b.value) }, filled: function(b) { return !!a.trim("" + b.value) }, unchecked: function(a) { return !a.checked } }), a.validator = function(b, c) { this.settings = a.extend(!0, {}, a.validator.defaults, b), this.currentForm = c, this.init() }, a.validator.format = function(b, c) { return 1 == arguments.length ? function() { var c = a.makeArray(arguments); return c.unshift(b), a.validator.format.apply(this, c) } : (arguments.length > 2 && c.constructor != Array && (c = a.makeArray(arguments).slice(1)), c.constructor != Array && (c = [c]), a.each(c, function(a, c) { b = b.replace(new RegExp("\\{" + a + "\\}", "g"), c) }), b) }, a.extend(a.validator, { defaults: { messages: {}, groups: {}, rules: {}, errorClass: "error", validClass: "valid", errorElement: "label", focusInvalid: !0, errorContainer: a([]), errorLabelContainer: a([]), onsubmit: !0, ignore: [], ignoreTitle: !1, onfocusin: function(a) { this.lastActive = a, this.settings.focusCleanup && !this.blockFocusCleanup && (this.settings.unhighlight && this.settings.unhighlight.call(this, a, this.settings.errorClass, this.settings.validClass), this.errorsFor(a).hide()) }, onfocusout: function(a) { this.checkable(a) || !(a.name in this.submitted) && this.optional(a) || this.element(a) }, onkeyup: function(a) { (a.name in this.submitted || a == this.lastElement) && this.element(a) }, onclick: function(a) { a.name in this.submitted ? this.element(a) : a.parentNode.name in this.submitted && this.element(a.parentNode) }, highlight: function(b, c, d) { a(b).addClass(c).removeClass(d) }, unhighlight: function(b, c, d) { a(b).removeClass(c).addClass(d) } }, setDefaults: function(b) { a.extend(a.validator.defaults, b) }, messages: { required: "This field is required.", remote: "Please fix this field.", email: "Please enter a valid email address.", url: "Please enter a valid URL.", date: "Please enter a valid date.", dateISO: "Please enter a valid date (ISO).", number: "Please enter a valid number.", digits: "Please enter only digits.", creditcard: "Please enter a valid credit card number.", equalTo: "Please enter the same value again.", accept: "Please enter a value with a valid extension.", maxlength: a.validator.format("Please enter no more than {0} characters."), minlength: a.validator.format("Please enter at least {0} characters."), rangelength: a.validator.format("Please enter a value between {0} and {1} characters long."), range: a.validator.format("Please enter a value between {0} and {1}."), max: a.validator.format("Please enter a value less than or equal to {0}."), min: a.validator.format("Please enter a value greater than or equal to {0}.") }, autoCreateRanges: !1, prototype: { init: function() { function b(b) { var c = a.data(this[0].form, "validator"), d = "on" + b.type.replace(/^validate/, ""); c.settings[d] && c.settings[d].call(c, this[0]) } this.labelContainer = a(this.settings.errorLabelContainer), this.errorContext = this.labelContainer.length && this.labelContainer || a(this.currentForm), this.containers = a(this.settings.errorContainer).add(this.settings.errorLabelContainer), this.submitted = {}, this.valueCache = {}, this.pendingRequest = 0, this.pending = {}, this.invalid = {}, this.reset(); var c = this.groups = {}; a.each(this.settings.groups, function(b, d) { a.each(d.split(/\s/), function(a, d) { c[d] = b }) }); var d = this.settings.rules; a.each(d, function(b, c) { d[b] = a.validator.normalizeRule(c) }), a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", b).validateDelegate(":radio, :checkbox, select, option", "click", b), this.settings.invalidHandler && a(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler) }, form: function() { return this.checkForm(), a.extend(this.submitted, this.errorMap), this.invalid = a.extend({}, this.errorMap), this.valid() || a(this.currentForm).triggerHandler("invalid-form", [this]), this.showErrors(), this.valid() }, checkForm: function() { this.prepareForm(); for (var a = 0, b = this.currentElements = this.elements(); b[a]; a++) this.check(b[a]); return this.valid() }, element: function(b) { b = this.clean(b), this.lastElement = b, this.prepareElement(b), this.currentElements = a(b); var c = this.check(b); return c ? delete this.invalid[b.name] : this.invalid[b.name] = !0, this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers)), this.showErrors(), c }, showErrors: function(b) { if (b) { a.extend(this.errorMap, b), this.errorList = []; for (var c in b) this.errorList.push({ message: b[c], element: this.findByName(c)[0] }); this.successList = a.grep(this.successList, function(a) { return !(a.name in b) }) } this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors() }, resetForm: function() { a.fn.resetForm && a(this.currentForm).resetForm(), this.submitted = {}, this.prepareForm(), this.hideErrors(), this.elements().removeClass(this.settings.errorClass) }, numberOfInvalids: function() { return this.objectLength(this.invalid) }, objectLength: function(a) { var b = 0; for (var c in a) b++; return b }, hideErrors: function() { this.addWrapper(this.toHide).hide() }, valid: function() { return 0 == this.size() }, size: function() { return this.errorList.length }, focusInvalid: function() { if (this.settings.focusInvalid) try { a(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin") } catch (b) {} }, findLastActive: function() { var b = this.lastActive; return b && 1 == a.grep(this.errorList, function(a) { return a.element.name == b.name }).length && b }, elements: function() { var b = this, c = {}; return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function() { return !this.name && b.settings.debug && window.console && console.error("%o has no name assigned", this), this.name in c || !b.objectLength(a(this).rules()) ? !1 : (c[this.name] = !0, !0) }) }, clean: function(b) { return a(b)[0] }, errors: function() { return a(this.settings.errorElement + "." + this.settings.errorClass, this.errorContext) }, reset: function() { this.successList = [], this.errorList = [], this.errorMap = {}, this.toShow = a([]), this.toHide = a([]), this.currentElements = a([]) }, prepareForm: function() { this.reset(), this.toHide = this.errors().add(this.containers) }, prepareElement: function(a) { this.reset(), this.toHide = this.errorsFor(a) }, check: function(b) { b = this.clean(b), this.checkable(b) && (b = this.findByName(b.name)[0]); var c = a(b).rules(), d = !1; for (method in c) { var e = { method: method, parameters: c[method] }; try { var f = a.validator.methods[method].call(this, b.value.replace(/\r/g, ""), b, e.parameters); if ("dependency-mismatch" == f) { d = !0; continue } if (d = !1, "pending" == f) return void(this.toHide = this.toHide.not(this.errorsFor(b))); if (!f) return this.formatAndAdd(b, e), !1 } catch (g) { throw this.settings.debug && window.console && console.log("exception occured when checking element " + b.id + ", check the '" + e.method + "' method", g), g } } return d ? void 0 : (this.objectLength(c) && this.successList.push(b), !0) }, customMetaMessage: function(b, c) { if (a.metadata) { var d = this.settings.meta ? a(b).metadata()[this.settings.meta] : a(b).metadata(); return d && d.messages && d.messages[c] } }, customMessage: function(a, b) { var c = this.settings.messages[a]; return c && (c.constructor == String ? c : c[b]) }, findDefined: function() { for (var a = 0; a < arguments.length; a++) if (void 0 !== arguments[a]) return arguments[a]; return void 0 }, defaultMessage: function(b, c) { return this.findDefined(this.customMessage(b.name, c), this.customMetaMessage(b, c), !this.settings.ignoreTitle && b.title || void 0, a.validator.messages[c], "Warning: No message defined for " + b.name + "") }, formatAndAdd: function(a, b) { var c = this.defaultMessage(a, b.method), d = /\$?\{(\d+)\}/g; "function" == typeof c ? c = c.call(this, b.parameters, a) : d.test(c) && (c = jQuery.format(c.replace(d, "{$1}"), b.parameters)), this.errorList.push({ message: c, element: a }), this.errorMap[a.name] = c, this.submitted[a.name] = c }, addWrapper: function(a) { return this.settings.wrapper && (a = a.add(a.parent(this.settings.wrapper))), a }, defaultShowErrors: function() { for (var a = 0; this.errorList[a]; a++) { var b = this.errorList[a]; this.settings.highlight && this.settings.highlight.call(this, b.element, this.settings.errorClass, this.settings.validClass), this.showLabel(b.element, b.message) } if (this.errorList.length && (this.toShow = this.toShow.add(this.containers)), this.settings.success) for (var a = 0; this.successList[a]; a++) this.showLabel(this.successList[a]); if (this.settings.unhighlight) for (var a = 0, c = this.validElements(); c[a]; a++) this.settings.unhighlight.call(this, c[a], this.settings.errorClass, this.settings.validClass); this.toHide = this.toHide.not(this.toShow), this.hideErrors(), this.addWrapper(this.toShow).show() }, validElements: function() { return this.currentElements.not(this.invalidElements()) }, invalidElements: function() { return a(this.errorList).map(function() { return this.element }) }, showLabel: function(b, c) { var d = this.errorsFor(b); d.length ? (d.removeClass().addClass(this.settings.errorClass), d.attr("generated") && d.html(c)) : (d = a("<" + this.settings.errorElement + "/>").attr({ "for": this.idOrName(b), generated: !0 }).addClass(this.settings.errorClass).html(c || ""), this.settings.wrapper && (d = d.hide().show().wrap("<" + this.settings.wrapper + "/>").parent()), this.labelContainer.append(d).length || (this.settings.errorPlacement ? this.settings.errorPlacement(d, a(b)) : d.insertAfter(b))), !c && this.settings.success && (d.text(""), "string" == typeof this.settings.success ? d.addClass(this.settings.success) : this.settings.success(d)), this.toShow = this.toShow.add(d) }, errorsFor: function(b) { var c = this.idOrName(b); return this.errors().filter(function() { return a(this).attr("for") == c }) }, idOrName: function(a) { return this.groups[a.name] || (this.checkable(a) ? a.name : a.id || a.name) }, checkable: function(a) { return /radio|checkbox/i.test(a.type) }, findByName: function(b) { var c = this.currentForm; return a(document.getElementsByName(b)).map(function(a, d) { return d.form == c && d.name == b && d || null }) }, getLength: function(b, c) { switch (c.nodeName.toLowerCase()) { case "select": return a("option:selected", c).length; case "input": if (this.checkable(c)) return this.findByName(c.name).filter(":checked").length } return b.length }, depend: function(a, b) { return this.dependTypes[typeof a] ? this.dependTypes[typeof a](a, b) : !0 }, dependTypes: { "boolean": function(a) { return a }, string: function(b, c) { return !!a(b, c.form).length }, "function": function(a, b) { return a(b) } }, optional: function(b) { return !a.validator.methods.required.call(this, a.trim(b.value), b) && "dependency-mismatch" }, startRequest: function(a) { this.pending[a.name] || (this.pendingRequest++, this.pending[a.name] = !0) }, stopRequest: function(b, c) { this.pendingRequest--, this.pendingRequest < 0 && (this.pendingRequest = 0), delete this.pending[b.name], c && 0 == this.pendingRequest && this.formSubmitted && this.form() ? (a(this.currentForm).submit(), this.formSubmitted = !1) : !c && 0 == this.pendingRequest && this.formSubmitted && (a(this.currentForm).triggerHandler("invalid-form", [this]), this.formSubmitted = !1) }, previousValue: function(b) { return a.data(b, "previousValue") || a.data(b, "previousValue", { old: null, valid: !0, message: this.defaultMessage(b, "remote") }) } }, classRuleSettings: { required: { required: !0 }, email: { email: !0 }, url: { url: !0 }, date: { date: !0 }, dateISO: { dateISO: !0 }, dateDE: { dateDE: !0 }, number: { number: !0 }, numberDE: { numberDE: !0 }, digits: { digits: !0 }, creditcard: { creditcard: !0 } }, addClassRules: function(b, c) { b.constructor == String ? this.classRuleSettings[b] = c : a.extend(this.classRuleSettings, b) }, classRules: function(b) { var c = {}, d = a(b).attr("class"); return d && a.each(d.split(" "), function() { this in a.validator.classRuleSettings && a.extend(c, a.validator.classRuleSettings[this]) }), c }, attributeRules: function(b) { var c = {}, d = a(b); for (method in a.validator.methods) { var e = d.attr(method); e && (c[method] = e) } return c.maxlength && /-1|2147483647|524288/.test(c.maxlength) && delete c.maxlength, c }, metadataRules: function(b) { if (!a.metadata) return {}; var c = a.data(b.form, "validator").settings.meta; return c ? a(b).metadata()[c] : a(b).metadata() }, staticRules: function(b) { var c = {}, d = a.data(b.form, "validator"); return d.settings.rules && (c = a.validator.normalizeRule(d.settings.rules[b.name]) || {}), c }, normalizeRules: function(b, c) { return a.each(b, function(d, e) { if (e === !1) return void delete b[d]; if (e.param || e.depends) { var f = !0; switch (typeof e.depends) { case "string": f = !!a(e.depends, c.form).length; break; case "function": f = e.depends.call(c, c) } f ? b[d] = void 0 !== e.param ? e.param : !0 : delete b[d] } }), a.each(b, function(d, e) { b[d] = a.isFunction(e) ? e(c) : e }), a.each(["minlength", "maxlength", "min", "max"], function() { b[this] && (b[this] = Number(b[this])) }), a.each(["rangelength", "range"], function() { b[this] && (b[this] = [Number(b[this][0]), Number(b[this][1])]) }), a.validator.autoCreateRanges && (b.min && b.max && (b.range = [b.min, b.max], delete b.min, delete b.max), b.minlength && b.maxlength && (b.rangelength = [b.minlength, b.maxlength], delete b.minlength, delete b.maxlength)), b.messages && delete b.messages, b }, normalizeRule: function(b) { if ("string" == typeof b) { var c = {}; a.each(b.split(/\s/), function() { c[this] = !0 }), b = c } return b }, addMethod: function(b, c, d) { a.validator.methods[b] = c, a.validator.messages[b] = void 0 != d ? d : a.validator.messages[b], c.length < 3 && a.validator.addClassRules(b, a.validator.normalizeRule(b)) }, methods: { required: function(b, c, d) { if (!this.depend(d, c)) return "dependency-mismatch"; switch (c.nodeName.toLowerCase()) { case "select": var e = a(c).val(); return e && e.length > 0; case "input": if (this.checkable(c)) return this.getLength(b, c) > 0; default: return a.trim(b).length > 0 } }, remote: function(b, c, d) { if (this.optional(c)) return "dependency-mismatch"; var e = this.previousValue(c); if (this.settings.messages[c.name] || (this.settings.messages[c.name] = {}), e.originalMessage = this.settings.messages[c.name].remote, this.settings.messages[c.name].remote = e.message, d = "string" == typeof d && { url: d } || d, e.old !== b) { e.old = b; var f = this; this.startRequest(c); var g = {}; return g[c.name] = b, a.ajax(a.extend(!0, { url: d, mode: "abort", port: "validate" + c.name, dataType: "json", data: g, success: function(d) { f.settings.messages[c.name].remote = e.originalMessage; var g = d === !0; if (g) { var h = f.formSubmitted; f.prepareElement(c), f.formSubmitted = h, f.successList.push(c), f.showErrors() } else { var i = {}, j = e.message = d || f.defaultMessage(c, "remote"); i[c.name] = a.isFunction(j) ? j(b) : j, f.showErrors(i) } e.valid = g, f.stopRequest(c, g) } }, d)), "pending" } return this.pending[c.name] ? "pending" : e.valid }, minlength: function(b, c, d) { return this.optional(c) || this.getLength(a.trim(b), c) >= d }, maxlength: function(b, c, d) { return this.optional(c) || this.getLength(a.trim(b), c) <= d }, rangelength: function(b, c, d) { var e = this.getLength(a.trim(b), c); return this.optional(c) || e >= d[0] && e <= d[1] }, min: function(a, b, c) { return this.optional(b) || a >= c }, max: function(a, b, c) { return this.optional(b) || c >= a }, range: function(a, b, c) { return this.optional(b) || a >= c[0] && a <= c[1] }, email: function(a, b) { return this.optional(b) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a) }, url: function(a, b) { return this.optional(b) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a) }, date: function(a, b) { return this.optional(b) || !/Invalid|NaN/.test(new Date(a)) }, dateISO: function(a, b) { return this.optional(b) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a) }, number: function(a, b) { return this.optional(b) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a) }, digits: function(a, b) { return this.optional(b) || /^\d+$/.test(a) }, creditcard: function(a, b) { if (this.optional(b)) return "dependency-mismatch"; if (/[^0-9-]+/.test(a)) return !1; var c = 0, d = 0, e = !1; a = a.replace(/\D/g, ""); for (var f = a.length - 1; f >= 0; f--) { var g = a.charAt(f), d = parseInt(g, 10); e && (d *= 2) > 9 && (d -= 9), c += d, e = !e } return c % 10 == 0 }, accept: function(a, b, c) { return c = "string" == typeof c ? c.replace(/,/g, "|") : "png|jpe?g|gif", this.optional(b) || a.match(new RegExp(".(" + c + ")$", "i")) }, equalTo: function(b, c, d) { var e = a(d).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() { a(c).valid() }); return b == e.val() } } }), a.format = a.validator.format }(jQuery), function(a) { var b = a.ajax, c = {}; a.ajax = function(d) { d = a.extend(d, a.extend({}, a.ajaxSettings, d)); var e = d.port; return "abort" == d.mode ? (c[e] && c[e].abort(), c[e] = b.apply(this, arguments)) : b.apply(this, arguments) } }(jQuery), function(a) { jQuery.event.special.focusin || jQuery.event.special.focusout || !document.addEventListener || a.each({ focus: "focusin", blur: "focusout" }, function(b, c) { function d(b) { return b = a.event.fix(b), b.type = c, a.event.handle.call(this, b) } a.event.special[c] = { setup: function() { this.addEventListener(b, d, !0) }, teardown: function() { this.removeEventListener(b, d, !0) }, handler: function(b) { return arguments[0] = a.event.fix(b), arguments[0].type = c, a.event.handle.apply(this, arguments) } } }), a.extend(a.fn, { validateDelegate: function(b, c, d) { return this.bind(c, function(c) { var e = a(c.target); return e.is(b) ? d.apply(e, arguments) : void 0 }) } }) }(jQuery); /*! chrysler-mobile - v0.1.0 - 2014-02-03, 3:04 PM EST */ ! function(a) { function b(b) { return !b || void 0 != b.allowPageScroll || void 0 == b.swipe && void 0 == b.swipeStatus || (b.allowPageScroll = h), b || (b = {}), b = a.extend({}, a.fn.swipe.defaults, b), this.each(function() { var d = a(this), e = d.data(u); e || (e = new c(this, b), d.data(u, e)) }) } function c(b, c) { function v(a) { a = a.originalEvent; var b, d = p ? a.touches[0] : a; return K = l, p ? L = a.touches.length : a.preventDefault(), distance = 0, direction = null, duration = 0, p && L != c.fingers ? y(a) : (M.x = N.x = d.pageX, M.y = N.y = d.pageY, P = H(), c.swipeStatus && (b = z(a, K))), b === !1 ? (K = o, z(a, K), b) : (J.bind(r, w), void J.bind(s, x)) } function w(a) { if (a = a.originalEvent, K != n && K != o) { var b, d = p ? a.touches[0] : a; if (N.x = d.pageX, N.y = d.pageY, Q = H(), direction = G(), p && (L = a.touches.length), K = m, C(a, direction), L != c.fingers && p) K = o, z(a, K); else if (distance = E(), duration = D(), c.swipeStatus && (b = z(a, K, direction, distance, duration)), !c.triggerOnTouchEnd) { var e = !B(); A() === !0 ? (K = n, b = z(a, K)) : e && (K = o, z(a, K)) } b === !1 && (K = o, z(a, K)) } } function x(a) { if (a = a.originalEvent, a.preventDefault(), Q = H(), distance = E(), direction = G(), duration = D(), c.triggerOnTouchEnd || 0 == c.triggerOnTouchEnd && K == m) if (K = n, L != c.fingers && p || 0 == N.x) K = o, z(a, K); else { var b = !B(); A() !== !0 && null !== A() || b ? (b || A() === !1) && (K = o, z(a, K)) : z(a, K) } else K == m && (K = o, z(a, K)); J.unbind(r, w, !1), J.unbind(s, x, !1) } function y() { L = 0, M.x = 0, M.y = 0, N.x = 0, N.y = 0, O.x = 0, O.y = 0, Q = 0, P = 0 } function z(a, b) { var h; if (c.swipeStatus && (h = c.swipeStatus.call(J, a, b, direction || null, distance || 0, duration || 0)), b == o && (!c.click || 1 != L && p || !isNaN(distance) && 0 != distance || (h = c.click.call(J, a, a.target))), b == n) switch (c.swipe && (h = c.swipe.call(J, a, direction, distance, duration)), direction) { case d: c.swipeLeft && (h = c.swipeLeft.call(J, a, direction, distance, duration)); break; case e: c.swipeRight && (h = c.swipeRight.call(J, a, direction, distance, duration)); break; case f: c.swipeUp && (h = c.swipeUp.call(J, a, direction, distance, duration)); break; case g: c.swipeDown && (h = c.swipeDown.call(J, a, direction, distance, duration)) } return (b == o || b == n) && y(a), void 0 !== h ? h : void 0 } function A() { return null !== c.threshold ? distance >= c.threshold : null } function B() { var a; return a = c.maxTimeThreshold ? duration >= c.maxTimeThreshold ? !1 : !0 : !0 } function C(a, b) { if (c.allowPageScroll == h) a.preventDefault(); else { var l = c.allowPageScroll == k; switch (b) { case d: (c.swipeLeft && l || !l && c.allowPageScroll != i) && a.preventDefault(); break; case e: (c.swipeRight && l || !l && c.allowPageScroll != i) && a.preventDefault(); break; case f: (c.swipeUp && l || !l && c.allowPageScroll != j) && a.preventDefault(); break; case g: (c.swipeDown && l || !l && c.allowPageScroll != j) && a.preventDefault() } } } function D() { return Q - P } function E() { return Math.round(Math.sqrt(Math.pow(N.x - M.x, 2) + Math.pow(N.y - M.y, 2))) } function F() { var a = M.x - N.x, b = N.y - M.y, c = Math.atan2(b, a), d = Math.round(180 * c / Math.PI); return 0 > d && (d = 360 - Math.abs(d)), d } function G() { var a = F(); return 45 >= a && a >= 0 ? d : 360 >= a && a >= 315 ? d : a >= 135 && 225 >= a ? e : a > 45 && 135 > a ? g : f } function H() { var a = new Date; return a.getTime() } function I() { J.unbind(q, v), J.unbind(t, y), J.unbind(r, w), J.unbind(s, x) } var J = a(b), K = "start", L = 0, M = { x: 0, y: 0 }, N = { x: 0, y: 0 }, O = { x: 0, y: 0 }, P = 0, Q = 0; try { J.bind(q, v), J.bind(t, y) } catch (R) { a.error("events not supported " + q + "," + t + " on jQuery.swipe") } this.enable = function() { return J.bind(q, v), J.bind(t, y), J }, this.disable = function() { return I(), J }, this.destroy = function() { return I(), J.data(u, null), J } } var d = "left", e = "right", f = "up", g = "down", h = "none", i = "horizontal", j = "vertical", k = "auto", l = "start", m = "move", n = "end", o = "cancel", p = "ontouchstart" in window, q = p ? "touchstart" : "mousedown", r = p ? "touchmove" : "mousemove", s = p ? "touchend" : "mouseup", t = "touchcancel", u = "TouchSwipe", v = { fingers: 1, threshold: 75, maxTimeThreshold: null, swipe: null, swipeLeft: null, swipeRight: null, swipeUp: null, swipeDown: null, swipeStatus: null, click: null, triggerOnTouchEnd: !0, allowPageScroll: "auto" }; a.fn.swipe = function(c) { $this = a(this); var d = $this.data(u); if (d && "string" == typeof c) { if (d[c]) return d[c].apply(this, Array.prototype.slice.call(arguments, 1)); a.error("Method " + c + " does not exist on jQuery.swipe") } else if (!(d || "object" != typeof c && c)) return b.apply(this, arguments) }, a.fn.swipe.defaults = v, a.fn.swipe.phases = { PHASE_START: l, PHASE_MOVE: m, PHASE_END: n, PHASE_CANCEL: o }, a.fn.swipe.directions = { LEFT: d, RIGHT: e, UP: f, DOWN: g }, a.fn.swipe.pageScroll = { NONE: h, HORIZONTAL: i, VERTICAL: j, AUTO: k } }(jQuery), eval(function(a, b, c, d, e, f) { if (e = function(a) { return (b > a ? "" : e(parseInt(a / b))) + ((a %= b) > 35 ? String.fromCharCode(a + 29) : a.toString(36)) }, !"".replace(/^/, String)) { for (; c--;) f[e(c)] = d[c] || e(c); d = [function(a) { return f[a] }], e = function() { return "\\w+" }, c = 1 } for (; c--;) d[c] && (a = a.replace(new RegExp("\\b" + e(c) + "\\b", "g"), d[c])); return a }("(H($){8($.1P.1J)J;$.1P.1J=H(y,z){8(1g.V==0){1e(M,'5s 4q 6u 1m \"'+1g.3U+'\".');J 1g}8(1g.V>1){J 1g.1K(H(){$(1g).1J(y,z)})}F A=1g,$19=1g[0];8(A.1r('4r')){F B=A.1D('34','3v');A.X('34',['5t',M])}Q{F B=O}A.3V=H(o,b,c){o=3W($19,o);F e=['G','1n','T','17','1a','1b'];1m(F a=0,l=e.V;a0)?':P':'*'}8(7[7.d['S']]=='T'){7[7.d['S']]=3w(h,7,'26')}8(3Y(7[7.d['S']])&&!7.2J){7[7.d['S']]=3Z(36($1A.3a(),7,'35'),7[7.d['S']]);C.4t=M}8(7[7.d['1l']]=='T'){7[7.d['1l']]=3w(h,7,'2K')}8(!7.G[7.d['S']]){8(7.2J){1e(M,'5w a '+7.d['S']+' 1m 6v G!');7.G[7.d['S']]=3w(h,7,'26')}Q{7.G[7.d['S']]=(4v(h,7,'26'))?'1d':h[7.d['26']](M)}}8(!7.G[7.d['1l']]){7.G[7.d['1l']]=(4v(h,7,'2K'))?'1d':h[7.d['2K']](M)}8(!7[7.d['1l']]){7[7.d['1l']]=7.G[7.d['1l']]}8(!7.G.P&&!7.2J){8(7.G[7.d['S']]=='1d'){7.G.12.1d=M}8(!7.G.12.1d){8(K 7[7.d['S']]=='13'){7.G.P=1L.3x(7[7.d['S']]/7.G[7.d['S']])}Q{F i=36($1A.3a(),7,'35');7.G.P=1L.3x(i/7.G[7.d['S']]);7[7.d['S']]=7.G.P*7.G[7.d['S']];8(!7.G.12.2l)7.1B=O}8(7.G.P=='6w'||7.G.P<1){1e(M,'28 a 4w 13 3y P G: 5w 41 \"1d\".');7.G.12.1d=M}}}8(!7[7.d['S']]){7[7.d['S']]='1d';8(!7.2J&&7.G.1v=='*'&&!7.G.12.1d&&7.G[7.d['S']]!='1d'){7[7.d['S']]=7.G.P*7.G[7.d['S']];7.1B=O}}8(7.G.12.1d){7.3z=(7[7.d['S']]=='1d')?36($1A.3a(),7,'35'):7[7.d['S']];8(7.1B===O){7[7.d['S']]='1d'}7.G.P=2P(h,7,0)}Q 8(7.G.1v!='*'){7.G.12.42=7.G.P;7.G.P=3A(h,7,0)}8(K 7.1B=='1y'){7.1B=(7[7.d['S']]=='1d')?O:'4x'}7.G.P=2Q(7.G.P,7,7.G.12.2l,$19);7.G.12.2m=7.G.P;7.1u=O;8(7.2J){8(!7.G.12.2N)7.G.12.2N=7.G.P;8(!7.G.12.27)7.G.12.27=7.G.P;7.1B=O;7.1i=[0,0,0,0];F j=$1A.1W(':P');8(j)$1A.3b();F k=3Z(36($1A.3a(),7,'35'),7[7.d['S']]);8(K 7[7.d['S']]=='13'&&k<7[7.d['S']]){k=7[7.d['S']]}8(j)$1A.3c();F m=4y(1L.2v(k/7.G[7.d['S']]),7.G.12);8(m>h.V){m=h.V}F n=1L.3x(k/m),4z=7[7.d['1l']],5x=3Y(4z);h.1K(H(){F a=$(1g),4A=n-5y(a,7,'6x');a[7.d['S']](4A);8(5x){a[7.d['1l']](3Z(4A,4z))}});7.G.P=m;7.G[7.d['S']]=n;7[7.d['S']]=m*n}Q{7.1i=5z(7.1i);8(7.1B=='2L')7.1B='1t';8(7.1B=='4B')7.1B='2M';1x(7.1B){W'4x':W'1t':W'2M':8(7[7.d['S']]!='1d'){F p=43(3d(h,7),7);7.1u=M;7.1i[7.d[1]]=p[1];7.1i[7.d[3]]=p[0]}18;2w:7.1B=O;7.1u=(7.1i[0]==0&&7.1i[1]==0&&7.1i[2]==0&&7.1i[3]==0)?O:M;18}}8(K 7.2n=='1s'&&7.2n)7.2n='6y'+A.6z('6A');8(K 7.G.3e!='13')7.G.3e=7.G.P;8(K 7.1n.1j!='13')7.1n.1j=5A;8(K 7.1n.G=='1y')7.1n.G=(7.G.12.1d||7.G.1v!='*')?'P':7.G.P;7.T=3B($19,7.T,'T');7.17=3B($19,7.17);7.1a=3B($19,7.1a);7.1b=3B($19,7.1b,'1b');7.T=$.25(M,{},7.1n,7.T);7.17=$.25(M,{},7.1n,7.17);7.1a=$.25(M,{},7.1n,7.1a);7.1b=$.25(M,{},7.1n,7.1b);8(K 7.1b.44!='1s')7.1b.44=O;8(K 7.1b.3f!='H'&&7.1b.3f!==O)7.1b.3f=$.1P.1J.5B;8(K 7.T.1H!='1s')7.T.1H=M;8(K 7.T.4C!='13')7.T.4C=0;8(K 7.T.45=='1y')7.T.45=M;8(K 7.T.4D!='1s')7.T.4D=M;8(K 7.T.3g!='13')7.T.3g=(7.T.1j<10)?6B:7.T.1j*5;8(7.29){7.29=4E(7.29)}8(I.1e){1e(I,'3h S: '+7.S);1e(I,'3h 1l: '+7.1l);8(7.3z)1e(I,'6C '+7.d['S']+': '+7.3z);1e(I,'5C 6D: '+7.G.S);1e(I,'5C 6E: '+7.G.1l);1e(I,'46 3y G P: '+7.G.P);8(7.T.1H)1e(I,'46 3y G 4F 6F: '+7.T.G);8(7.17.Y)1e(I,'46 3y G 4F 4G: '+7.17.G);8(7.1a.Y)1e(I,'46 3y G 4F 5D: '+7.1a.G)}};A.5E=H(){A.1r('4r',M);F a={'4H':A.16('4H'),'4I':A.16('4I'),'3C':A.16('3C'),'2L':A.16('2L'),'2M':A.16('2M'),'4B':A.16('4B'),'1t':A.16('1t'),'S':A.16('S'),'1l':A.16('1l'),'4J':A.16('4J'),'1E':A.16('1E'),'3X':A.16('3X'),'4K':A.16('4K')};1x(a.3C){W'4L':F b='4L';18;W'5F':F b='5F';18;2w:F b='6G'}$1A.16(a).16({'6H':'2O','3C':b});A.1r('5G',a).16({'4H':'1t','4I':'47','3C':'4L','2L':0,'1t':0,'4J':0,'1E':0,'3X':0,'4K':0});8(7.1u){A.Z().1K(H(){F m=2o($(1g).16(7.d['1E']));8(2p(m))m=0;$(1g).1r('1R',m)})}};A.5H=H(){A.4M();A.14(L('4N',I),H(e,a){e.1h();8(!C.1Z){8(7.T.Y){7.T.Y.2R(2q('48',I))}}C.1Z=M;8(7.T.1H){7.T.1H=O;A.X(L('2S',I),a)}J M});A.14(L('4O',I),H(e){e.1h();8(C.1S){3D(R)}J M});A.14(L('2S',I),H(e,a,b){e.1h();1F=3i(1F);8(a&&C.1S){R.1Z=M;F c=2x()-R.2T;R.1j-=c;8(R.1p)R.1p.1j-=c;8(R.1Q)R.1Q.1j-=c;3D(R,O)}8(!C.1X&&!C.1S){8(b)1F.3E+=2x()-1F.2T}8(!C.1X){8(7.T.Y){7.T.Y.2R(2q('5I',I))}}C.1X=M;8(7.T.5J){F d=7.T.3g-1F.3E,3F=3G-1L.2v(d*3G/7.T.3g);7.T.5J.1z($19,3F,d)}J M});A.14(L('1H',I),H(e,b,c,d){e.1h();1F=3i(1F);F v=[b,c,d],t=['1k','13','1s'],a=2U(v,t);F b=a[0],c=a[1],d=a[2];8(b!='17'&&b!='1a')b=C.2k;8(K c!='13')c=0;8(K d!='1s')d=O;8(d){C.1Z=O;7.T.1H=M}8(!7.T.1H){e.20();J 1e(I,'3h 48: 28 2V.')}8(C.1X){8(7.T.Y){7.T.Y.2y(2q('48',I));7.T.Y.2y(2q('5I',I))}}C.1X=O;1F.2T=2x();F f=7.T.3g+c;3H=f-1F.3E;3F=3G-1L.2v(3H*3G/f);1F.T=6I(H(){8(7.T.5K){7.T.5K.1z($19,3F,3H)}8(C.1S){A.X(L('1H',I),b)}Q{A.X(L(b,I),7.T)}},3H);8(7.T.5L){7.T.5L.1z($19,3F,3H)}J M});A.14(L('2W',I),H(e){e.1h();8(R.1Z){R.1Z=O;C.1X=O;C.1S=M;R.2T=2x();2a(R)}Q{A.X(L('1H',I))}J M});A.14(L('17',I)+' '+L('1a',I),H(e,b,f,g){e.1h();8(C.1Z||A.1W(':2O')){e.20();J 1e(I,'3h 48 6J 2O: 28 2V.')}8(7.G.3e>=N.U){e.20();J 1e(I,'28 5M G ('+N.U+', '+7.G.3e+' 5N): 28 2V.')}F v=[b,f,g],t=['1o','13/1k','H'],a=2U(v,t);F b=a[0],f=a[1],g=a[2];F h=e.4P.1c(I.3j.3I.V);8(K b!='1o'||b==2b)b=7[h];8(K g=='H')b.21=g;8(K f!='13'){8(7.G.1v!='*'){f='P'}Q{F i=[f,b.G,7[h].G];1m(F a=0,l=i.V;a0){8(C.1S){8(b.3k)A.X(L('3k',I),[h,[b,f,g]]);e.20();J 1e(I,'3h 6M 2V.')}}8(b.4Q&&!b.4Q.1z($19)){e.20();J 1e(I,'6N \"4Q\" 6O O.')}1F.3E=0;A.X('34',['5P'+h,[b,f]]);8(7.29){F s=7.29,c=[b,f];1m(F j=0,l=s.V;j=N.U){N.11-=N.U}8(!7.1M){8(N.11==0&&f.4c)f.4c.1z($19);8(!7.3l)2X(7,N.11,I)}A.Z().1c(N.U-g,N.U).6Q(A);8(N.U<7.G.P+g){A.Z().1c(0,(7.G.P+g)-N.U).4d(M).3J(A)}F h=A.Z(),2r=5T(h,7,g),1T=5U(h,7),2c=h.1O(g-1),2d=2r.2Y(),2z=1T.2Y();8(7.1u)1N(h,7);8(7.1B){F p=43(1T,7),k=p[0],2s=p[1]}Q{F k=0,2s=0}F l=(k<0)?7.1i[7.d[3]]:0;8(f.1I=='5V'&&7.G.P=0){1N(2d,7,7.1i[7.d[1]])}1N(2c,7,7.1i[7.d[3]])}8(7.1B){7.1i[7.d[1]]=2s;7.1i[7.d[3]]=k}F o={},1w=f.1j;8(f.1I=='47')1w=0;Q 8(1w=='T')1w=7.1n.1j/7.1n.G*g;Q 8(1w<=0)1w=0;Q 8(1w<10)1w=n/1w;R=23(1w,f.1G);8(7[7.d['S']]=='1d'||7[7.d['1l']]=='1d'){R.1f.1q([$1A,2e])}8(7.1u){F q=7.1i[7.d[3]];8(2z.4S(2c).V){F r={};r[7.d['1E']]=2c.1r('1R');8(k<0)2c.16(r);Q R.1f.1q([2c,r])}8(2z.4S(2d).V){F s={};s[7.d['1E']]=2d.1r('1R');R.1f.1q([2d,s])}8(2s>=0){F t={};t[7.d['1E']]=2z.1r('1R')+7.1i[7.d[1]];R.1f.1q([2z,t])}}Q{F q=0}o[7.d['1t']]=q;F u=[2r,1T,2e,1w];8(f.2f)f.2f.3K($19,u);1Y.2f=3L(1Y.2f,$19,u);1x(f.1I){W'2B':W'2g':W'2C':W'2h':R.1p=23(R.1j,R.1G);R.1Q=23(R.1j,R.1G);R.1j=0;18}1x(f.1I){W'2g':W'2C':W'2h':F v=A.4d().3J($1A);18}1x(f.1I){W'2h':v.Z().1c(0,g).1U();W'2g':W'2C':v.Z().1c(7.G.P).1U();18}1x(f.1I){W'2B':R.1p.1f.1q([A,{'2i':0}]);18;W'2g':v.16({'2i':0});R.1p.1f.1q([A,{'S':'+=0'},H(){v.1U()}]);R.1Q.1f.1q([v,{'2i':1}]);18;W'2C':R=4T(R,A,v,7,M);18;W'2h':R=4U(R,A,v,7,M,g);18}F w=H(){F b=7.G.P+g-N.U;8(b>0){A.Z().1c(N.U).1U();2r=$(A.Z().1c(N.U-(7.G.P-b)).4h().5W(A.Z().1c(0,b).4h()))}8(m){m.1K(H(){F a=$(1g);8(!a.1r('4f'))a.3c()})}8(7.1u){F c=A.Z().1O(7.G.P+g-1);c.16(7.d['1E'],c.1r('1R'))}R.1f=[];8(R.1p)R.1p=23(R.4V,R.1G);F d=H(){1x(f.1I){W'2B':W'2g':A.16('1v','');18}R.1Q=23(0,2b);C.1S=O;F a=[2r,1T,2e];8(f.21)f.21.3K($19,a);1Y.21=3L(1Y.21,$19,a);8(1V.V){A.X(L(1V[0][0],I),1V[0][1]);1V.5X()}8(!C.1X)A.X(L('1H',I))};1x(f.1I){W'2B':R.1p.1f.1q([A,{'2i':1},d]);2a(R.1p);18;W'2h':R.1p.1f.1q([A,{'S':'+=0'},d]);2a(R.1p);18;2w:d();18}};R.1f.1q([A,o,w]);C.1S=M;A.16(7.d['1t'],-(n-l));1F=3i(1F);2a(R);4W(7.2n,A.1D(L('3v',I)));A.X(L('2D',I),[O,2e]);J M});A.14(L('6R',I),H(e,f,g){e.1h();F h=A.Z();8(!7.1M){8(N.11==7.G.P){8(7.3l){A.X(L('17',I),N.U-1)}J e.20()}}8(7.1u)1N(h,7);8(K g!='13'){8(7.G.1v!='*'){F i=(K f.G=='13')?f.G:4R(A,7);g=5Y(h,7,0,i)}Q{g=7.G.P}g=4b(g,7,f.G,$19)}F j=(N.11==0)?N.U:N.11;8(!7.1M){8(7.G.12.1d){F k=2P(h,7,g),i=4a(h,7,j-1)}Q{F k=7.G.P,i=7.G.P}8(g+k>j){g=j-i}}7.G.12.2m=7.G.P;8(7.G.12.1d){F k=4X(h,7,g,j);22(7.G.P-g>=k&&g=0){q+=7.1i[7.d[1]]}2z.16(7.d['1E'],q);8(2c.4S(2d).V){F r={};r[7.d['1E']]=2d.1r('1R');R.1f.1q([2d,r])}F s=2c.1r('1R');8(l>=0){s+=7.1i[7.d[3]]}F t={};t[7.d['1E']]=s;R.1f.1q([2c,t])}o[7.d['1t']]=-n;8(l<0){o[7.d['1t']]+=l}F u=[2r,1T,2e,1w];8(f.2f)f.2f.3K($19,u);1Y.2f=3L(1Y.2f,$19,u);1x(f.1I){W'2B':W'2g':W'2C':W'2h':R.1p=23(R.1j,R.1G);R.1Q=23(R.1j,R.1G);R.1j=0;18}1x(f.1I){W'2g':W'2C':W'2h':F v=A.4d().3J($1A);18}1x(f.1I){W'2h':v.Z().1c(7.G.12.2m).1U();18;W'2g':W'2C':v.Z().1c(0,g).1U();v.Z().1c(7.G.P).1U();18}1x(f.1I){W'2B':R.1p.1f.1q([A,{'2i':0}]);18;W'2g':v.16({'2i':0});R.1p.1f.1q([A,{'S':'+=0'},H(){v.1U()}]);R.1Q.1f.1q([v,{'2i':1}]);18;W'2C':R=4T(R,A,v,7,O);18;W'2h':R=4U(R,A,v,7,O,g);18}F w=H(){F b=7.G.P+g-N.U,5Z=(7.1u)?7.1i[7.d[3]]:0;A.16(7.d['1t'],5Z);8(b>0){A.Z().1c(N.U).1U()}F c=A.Z().1c(0,g).3J(A).2Y();8(b>0){1T=3d(h,7)}8(m){m.1K(H(){F a=$(1g);8(!a.1r('4f'))a.3c()})}8(7.1u){8(N.U<7.G.P+g){F d=A.Z().1O(7.G.P-1);d.16(7.d['1E'],d.1r('1R')+7.1i[7.d[3]])}c.16(7.d['1E'],c.1r('1R'))}R.1f=[];8(R.1p)R.1p=23(R.4V,R.1G);F e=H(){1x(f.1I){W'2B':W'2g':A.16('1v','');18}R.1Q=23(0,2b);C.1S=O;F a=[2r,1T,2e];8(f.21)f.21.3K($19,a);1Y.21=3L(1Y.21,$19,a);8(1V.V){A.X(L(1V[0][0],I),1V[0][1]);1V.5X()}8(!C.1X)A.X(L('1H',I))};1x(f.1I){W'2B':R.1p.1f.1q([A,{'2i':1},e]);2a(R.1p);18;W'2h':R.1p.1f.1q([A,{'S':'+=0'},e]);2a(R.1p);18;2w:e();18}};R.1f.1q([A,o,w]);C.1S=M;1F=3i(1F);2a(R);4W(7.2n,A.1D(L('3v',I)));A.X(L('2D',I),[O,2e]);J M});A.14(L('2Z',I),H(e,b,c,d,f,g,h){e.1h();F v=[b,c,d,f,g,h],t=['1k/13/1o','13','1s','1o','1k','H'],a=2U(v,t);F f=a[3],g=a[4],h=a[5];b=3n(a[0],a[1],a[2],N,A);8(b==0)J;8(K f!='1o')f=O;8(C.1S){8(K f!='1o'||f.1j>0)J O}8(g!='17'&&g!='1a'){8(7.1M){8(b<=N.U/2)g='1a';Q g='17'}Q{8(N.11==0||N.11>b)g='1a';Q g='17'}}8(g=='17')b=N.U-b;A.X(L(g,I),[f,b,h]);J M});A.14(L('6S',I),H(e,a,b){e.1h();F c=A.1D(L('3M',I));J A.1D(L('51',I),[c-1,a,'17',b])});A.14(L('6T',I),H(e,a,b){e.1h();F c=A.1D(L('3M',I));J A.1D(L('51',I),[c+1,a,'1a',b])});A.14(L('51',I),H(e,a,b,c,d){e.1h();8(K a!='13')a=A.1D(L('3M',I));F f=7.1b.G||7.G.P,27=1L.2v(N.U/f)-1;8(a<0)a=27;8(a>27)a=0;J A.1D(L('2Z',I),[a*f,0,M,b,c,d])});A.14(L('60',I),H(e,s){e.1h();8(s)s=3n(s,0,M,N,A);Q s=0;s+=N.11;8(s!=0){22(s>N.U)s-=N.U;A.6U(A.Z().1c(s,N.U))}J M});A.14(L('29',I),H(e,s){e.1h();8(s)s=4E(s);Q 8(7.29)s=7.29;Q J 1e(I,'5s 6V 41 29.');F n=A.1D(L('3v',I)),x=M;1m(F j=0,l=s.V;j=N.U)N.11-=N.U;F h=A.Z().1O(c);8(h.V){h[3N](b)}Q{A.62(b)}N.U=A.Z().V;F i=A.1D('52');3O(7,N.U,I);2X(7,N.11,I);A.X(L('53',I));A.X(L('2D',I),[M,i]);J M});A.14(L('63',I),H(e,c,d,f){e.1h();F v=[c,d,f],t=['1k/13/1o','1s','13'],a=2U(v,t);c=a[0];d=a[1];f=a[2];F g=O;8(c 64 $&&c.V>1){h=$();c.1K(H(i,a){F b=A.X(L('63',I),[$(1g),d,f]);8(b)h=h.6X(b)});J h}8(K c=='1y'||c=='4i'){h=A.Z().2Y()}Q{c=3n(c,f,d,N,A);F h=A.Z().1O(c);8(h.V){8(cc)d=c;8(K a=='H')a.1z($19,d);J d});A.14(L('70',I),H(e,a){e.1h();$i=3d(A.Z(),7);8(K a=='H')a.1z($19,$i);J $i});A.14(L('1c',I),H(e,f,l,b){e.1h();8(N.U==0)J O;F v=[f,l,b],t=['13','13','H'],a=2U(v,t);f=(K a[0]=='13')?a[0]:0;l=(K a[1]=='13')?a[1]:N.U;b=a[2];f+=N.11;l+=N.11;22(f>N.U){f-=N.U}22(l>N.U){l-=N.U}22(f<0){f+=N.U}22(l<0){l+=N.U}F c=A.Z();8(l>f){F d=c.1c(f,l)}Q{F d=$(c.1c(f,N.U).4h().5W(c.1c(0,l).4h()))}8(K b=='H')b.1z($19,d);J d});A.14(L('1X',I)+' '+L('1Z',I)+' '+L('1S',I),H(e,a){e.1h();F b=e.4P.1c(I.3j.3I.V);8(K a=='H')a.1z($19,C[b]);J C[b]});A.14(L('5Q',I),H(e,a,b,c){e.1h();F d=O;8(K a=='H'){a.1z($19,7)}Q 8(K a=='1o'){2u=$.25(M,{},2u,a);8(b!==O)d=M;Q 7=$.25(M,{},7,a)}Q 8(K a!='1y'){8(K b=='H'){F f=4j('7.'+a);8(K f=='1y')f='';b.1z($19,f)}Q 8(K b!='1y'){8(K c!=='1s')c=M;4j('2u.'+a+' = b');8(c!==O)d=M;Q 4j('7.'+a+' = b')}Q{J 4j('7.'+a)}}8(d){1N(A.Z(),7);A.3V(2u);A.54();F g=3P(A,7,O);A.X(L('2D',I),[M,g])}J 7});A.14(L('53',I),H(e,a,b){e.1h();8(K a=='1y'||a.V==0)a=$('71');Q 8(K a=='1k')a=$(a);8(K a!='1o')J 1e(I,'28 a 4w 1o.');8(K b!='1k'||b.V==0)b='a.65';a.72(b).1K(H(){F h=1g.66||'';8(h.V>0&&A.Z().68($(h))!=-1){$(1g).24('55').55(H(e){e.2j();A.X(L('2Z',I),h)})}});J M});A.14(L('2D',I),H(e,b,c){e.1h();8(!7.1b.1C)J;8(b){F d=7.1b.G||7.G.P,l=1L.2v(N.U/d);8(7.1b.3f){7.1b.1C.Z().1U();7.1b.1C.1K(H(){1m(F a=0;aN.11){8(7.G.12.1d){F b=4a(a,7,N.11)-N.11}Q 8(7.G.1v!='*'){F b=6a(a,7,N.11)-N.11}Q{b=7.G.P-N.11}1e(I,'73 74-1M: 75 '+b+' G 4G.');A.X('17',b)}7.G.P=2Q(3Q,7,7.G.12.2l,$19);J 3P(A,7)});A.14(L('5t',I),H(e,a){e.1h();1F=3i(1F);A.1r('4r',O);A.X(L('4O',I));8(a){A.X(L('60',I))}8(7.1u){1N(A.Z(),7)}A.16(A.1r('5G'));A.4M();A.56();$1A.76(A);J M});A.14('34',H(e,n,o){e.1h();J A.1D(L(n,I),o)})};A.4M=H(){A.24(L('',I));A.24(L('',I,O))};A.54=H(){A.56();3O(7,N.U,I);2X(7,N.11,I);8(7.T.2t){F c=3q(7.T.2t);$1A.14(L('4k',I,O),H(){A.X(L('2S',I),c)}).14(L('4l',I,O),H(){A.X(L('2W',I))})}8(7.T.Y){7.T.Y.14(L(7.T.3p,I,O),H(e){e.2j();F a=O,c=2b;8(C.1X){a='1H'}Q 8(7.T.45){a='2S';c=3q(7.T.45)}8(a){A.X(L(a,I),c)}})}8(7.17.Y){7.17.Y.14(L(7.17.3p,I,O),H(e){e.2j();A.X(L('17',I))});8(7.17.2t){F c=3q(7.17.2t);7.17.Y.14(L('4k',I,O),H(){A.X(L('2S',I),c)}).14(L('4l',I,O),H(){A.X(L('2W',I))})}}8(7.1a.Y){7.1a.Y.14(L(7.1a.3p,I,O),H(e){e.2j();A.X(L('1a',I))});8(7.1a.2t){F c=3q(7.1a.2t);7.1a.Y.14(L('4k',I,O),H(){A.X(L('2S',I),c)}).14(L('4l',I,O),H(){A.X(L('2W',I))})}}8($.1P.2E){8(7.17.2E){8(!C.57){C.57=M;$1A.2E(H(e,a){8(a>0){e.2j();F b=59(7.17.2E);A.X(L('17',I),b)}})}}8(7.1a.2E){8(!C.5a){C.5a=M;$1A.2E(H(e,a){8(a<0){e.2j();F b=59(7.1a.2E);A.X(L('1a',I),b)}})}}}8($.1P.3R){F d=(7.17.5b)?H(){A.X(L('17',I))}:2b,3S=(7.1a.5b)?H(){A.X(L('1a',I))}:2b;8(3S||3S){8(!C.3R){C.3R=M;F f={'77':30,'78':30,'79':M};1x(7.2k){W'4u':W'6b':f.7a=d;f.7b=3S;18;2w:f.7c=3S;f.7d=d}$1A.3R(f)}}}8(7.1b.1C){8(7.1b.2t){F c=3q(7.1b.2t);7.1b.1C.14(L('4k',I,O),H(){A.X(L('2S',I),c)}).14(L('4l',I,O),H(){A.X(L('2W',I))})}}8(7.17.2F||7.1a.2F){$(3T).14(L('6c',I,O,M,M),H(e){F k=e.6d;8(k==7.1a.2F){e.2j();A.X(L('1a',I))}8(k==7.17.2F){e.2j();A.X(L('17',I))}})}8(7.1b.44){$(3T).14(L('6c',I,O,M,M),H(e){F k=e.6d;8(k>=49&&k<58){k=(k-49)*7.G.P;8(k<=N.U){e.2j();A.X(L('2Z',I),[k,0,M,7.1b])}}})}8(7.T.1H){A.X(L('1H',I),7.T.4C)}8(C.4t){F g=$(3r),5c=g.S(),5d=g.1l();g.14(L('7e',I,O,M,M),H(e){8(g.S()!=5c||g.1l()!=5d){A.X(L('4O',I));8(7.T.4D&&!C.1X){A.X(L('1H',I))}1N(A.Z(),7);A.3V(2u);F a=3P(A,7,O);A.X(L('2D',I),[M,a]);5c=g.S();5d=g.1l()}})}};A.56=H(){F a=L('',I),3s=L('',I,O);5e=L('',I,O,M,M);$(3T).24(5e);$(3r).24(5e);$1A.24(3s);8(7.T.Y)7.T.Y.24(3s);8(7.17.Y)7.17.Y.24(3s);8(7.1a.Y)7.1a.Y.24(3s);8(7.1b.1C){7.1b.1C.24(3s);8(7.1b.3f){7.1b.1C.Z().1U()}}3O(7,'3b',I);2X(7,'2y',I)};F C={'2k':'1a','1X':M,'1S':O,'1Z':O,'5a':O,'57':O,'3R':O},N={'U':A.Z().V,'11':0},1F={'7f':2b,'T':2b,'3k':2b,'2T':2x(),'3E':0},R={'1Z':O,'1j':0,'2T':0,'1G':'','1f':[]},1Y={'2f':[],'21':[]},1V=[],I=$.25(M,{},$.1P.1J.6e,z),7={},2u=y,$1A=A.7g('<'+I.5f.4q+' 7h=\"'+I.5f.6f+'\" />').3a();I.3U=A.3U;I.4m=$.1P.1J.4m++;A.3V(2u,M,B);A.5E();A.5H();A.54();8(31(7.G.2I)){F D=7.G.2I}Q{F D=[];8(7.G.2I!=0){D.1q(7.G.2I)}}8(7.2n){D.7i(6g(7.2n))}8(D.V>0){1m(F a=0,l=D.V;a<6l>'+a+''};H 23(d,e){J{1f:[],1j:d,4V:d,1G:e,2T:2x()}}H 2a(s){8(K s.1p=='1o'){2a(s.1p)}1m(F a=0,l=s.1f.V;a=t){1e(c,'28 5M G: 7r 7s ('+t+' G, '+o.G.3e+' 5N).');F f='3b'}Q{F f='3c'}F s=(f=='3c')?'2y':'2R',h=2q('2O',c);8(o.T.Y)o.T.Y[f]()[s](h);8(o.17.Y)o.17.Y[f]()[s](h);8(o.1a.Y)o.1a.Y[f]()[s](h);8(o.1b.1C)o.1b.1C[f]()[s](h)}H 2X(o,f,c){8(o.1M||o.3l)J;F a=(f=='2y'||f=='2R')?f:O,4o=2q('7t',c);8(o.T.Y&&a){o.T.Y[a](4o)}8(o.17.Y){F b=a||(f==0)?'2R':'2y';o.17.Y[b](4o)}8(o.1a.Y){F b=a||(f==o.G.P)?'2R':'2y';o.1a.Y[b](4o)}}H 3W(a,b){8(K b=='H')b=b.1z(a);8(K b=='1y')b={};J b}H 3B(a,b,c){8(K c!='1k')c='';b=3W(a,b);8(K b=='1k'){F d=5k(b);8(d==-1)b=$(b);Q b=d}8(c=='1b'){8(K b=='1s')b={'44':b};8(K b.3o!='1y')b={'1C':b};8(K b.1C=='H')b.1C=b.1C.1z(a);8(K b.1C=='1k')b.1C=$(b.1C);8(K b.G!='13')b.G=O}Q 8(c=='T'){8(K b.3o!='1y')b={'Y':b};8(K b=='1s')b={'1H':b};8(K b=='13')b={'3g':b};8(K b.Y=='H')b.Y=b.Y.1z(a);8(K b.Y=='1k')b.Y=$(b.Y)}Q{8(K b.3o!='1y')b={'Y':b};8(K b=='13')b={'2F':b};8(K b.Y=='H')b.Y=b.Y.1z(a);8(K b.Y=='1k')b.Y=$(b.Y);8(K b.2F=='1k')b.2F=5k(b.2F)}J b}H 3n(a,b,c,d,e){8(K a=='1k'){8(2p(a))a=$(a);Q a=2o(a)}8(K a=='1o'){8(K a.3o=='1y')a=$(a);a=e.Z().68(a);8(a==-1)a=0;8(K c!='1s')c=O}Q{8(K c!='1s')c=M}8(2p(a))a=0;Q a=2o(a);8(2p(b))b=0;Q b=2o(b);8(c){a+=d.11}a+=b;8(d.U>0){22(a>=d.U){a-=d.U}22(a<0){a+=d.U}}J a}H 4a(i,o,s){F t=0,x=0;1m(F a=s;a>=0;a--){F j=i.1O(a);t+=(j.1W(':P'))?j[o.d['26']](M):0;8(t>o.3z)J x;8(a==0)a=i.V;x++}}H 6a(i,o,s){J 5l(i,o.G.1v,o.G.12.42,s)}H 5R(i,o,s,m){J 5l(i,o.G.1v,m,s)}H 5l(i,f,m,s){F t=0,x=0;1m(F a=s,l=i.V;a>=0;a--){x++;8(x==l)J x;F j=i.1O(a);8(j.1W(f)){t++;8(t==m)J x}8(a==0)a=l}}H 4R(a,o){J o.G.12.42||a.Z().1c(0,o.G.P).1v(o.G.1v).V}H 2P(i,o,s){F t=0,x=0;1m(F a=s,l=i.V-1;a<=l;a++){F j=i.1O(a);t+=(j.1W(':P'))?j[o.d['26']](M):0;8(t>o.3z)J x;x++;8(x==l+1)J x;8(a==l)a=-1}}H 4X(i,o,s,l){F v=2P(i,o,s);8(!o.1M){8(s+v>l)v=l-s}J v}H 3A(i,o,s){J 5m(i,o.G.1v,o.G.12.42,s,o.1M)}H 5Y(i,o,s,m){J 5m(i,o.G.1v,m+1,s,o.1M)-1}H 5m(i,f,m,s,c){F t=0,x=0;1m(F a=s,l=i.V-1;a<=l;a++){x++;8(x==l)J x;F j=i.1O(a);8(j.1W(f)){t++;8(t==m)J x}8(a==l)a=-1}}H 3d(i,o){J i.1c(0,o.G.P)}H 5T(i,o,n){J i.1c(n,o.G.12.2m+n)}H 5U(i,o){J i.1c(0,o.G.P)}H 4Y(i,o){J i.1c(0,o.G.12.2m)}H 4Z(i,o,n){J i.1c(n,o.G.P+n)}H 1N(i,o,m){F x=(K m=='1s')?m:O;8(K m!='13')m=0;i.1K(H(){F j=$(1g);F t=2o(j.16(o.d['1E']));8(2p(t))t=0;j.1r('6o',t);j.16(o.d['1E'],((x)?j.1r('6o'):m+j.1r('1R')))})}H 3P(a,o,p){F b=a.3a(),$i=a.Z(),$v=3d($i,o),4p=4g(2A($v,o,M),o,p);b.16(4p);8(o.1u){F p=o.1i,r=p[o.d[1]];8(o.1B){8(r<0)r=0}F c=$v.2Y();c.16(o.d['1E'],c.1r('1R')+r);a.16(o.d['2L'],p[o.d[0]]);a.16(o.d['1t'],p[o.d[3]])}a.16(o.d['S'],4p[o.d['S']]+(3m($i,o,'S')*2));a.16(o.d['1l'],5n($i,o,'1l'));J 4p}H 2A(i,o,a){F b=3m(i,o,'S',a),6p=5n(i,o,'1l',a);J[b,6p]}H 5n(i,o,a,b){8(K b!='1s')b=O;8(K o[o.d[a]]=='13'&&b)J o[o.d[a]];8(K o.G[o.d[a]]=='13')J o.G[o.d[a]];F c=(a.5o().32('S')>-1)?'26':'2K';J 3w(i,o,c)}H 3w(i,o,b){F s=0;1m(F a=0,l=i.V;a-1)?['7u','7v']:['7w','7x'];1m(F a=0,l=5p.V;a-1)?'26':'2K',s=0;1m(F a=0,l=i.V;a-1&&K e[b]=='1y'){e[b]=c[a];18}}}J e}H 5z(p){8(K p=='1y')J[0,0,0,0];8(K p=='13')J[p,p,p,p];Q 8(K p=='1k')p=p.3u('7A').6s('').3u('7B').6s('').3u(' ');8(!31(p)){J[0,0,0,0]}1m(F i=0;i<4;i++){p[i]=2o(p[i])}1x(p.V){W 0:J[0,0,0,0];W 1:J[p[0],p[0],p[0],p[0]];W 2:J[p[0],p[1],p[0],p[1]];W 3:J[p[0],p[1],p[2],p[1]];2w:J[p[0],p[1],p[2],p[3]]}}H 43(a,o){F x=(K o[o.d['S']]=='13')?1L.2v(o[o.d['S']]-3m(a,o,'S')):0;1x(o.1B){W'1t':J[0,x];W'2M':J[x,0];W'4x':2w:J[1L.2v(x/2),1L.3x(x/2)]}}H 4b(x,o,a,b){F v=x;8(K a=='H'){v=a.1z(b,v)}Q 8(K a=='1k'){F p=a.3u('+'),m=a.3u('-');8(m.V>p.V){F c=M,5q=m[0],2H=m[1]}Q{F c=O,5q=p[0],2H=p[1]}1x(5q){W'7C':v=(x%2==1)?x-1:x;18;W'7D':v=(x%2==0)?x-1:x;18;2w:v=x;18}2H=2o(2H);8(!2p(2H)){8(c)2H=-2H;v+=2H}}8(K v!='13')v=1;8(v<1)v=1;J v}H 2Q(x,o,a,b){J 4y(4b(x,o,a,b),o.G.12)}H 4y(v,i){8(K i.2N=='13'&&vi.27)v=i.27;8(v<1)v=1;J v}H 4E(s){8(!31(s))s=[[s]];8(!31(s[0]))s=[s];1m(F j=0,l=s.V;j-1)?M:O,r=(p.32('2W')>-1)?M:O}Q{F i=r=O}J[i,r]}H 59(a){J(K a=='13')?a:2b}H 31(a){J K(a)=='1o'&&(a 64 7H)}H 2x(){J 7I 7J().2x()}H 1e(d,m){8(K d=='1o'){F s=' ('+d.3U+')';d=d.1e}Q{F s=''}8(!d)J O;8(K m=='1k')m='1J'+s+': '+m;Q m=['1J'+s+':',m];8(3r.5r&&3r.5r.6t)3r.5r.6t(m);J O}$.1P.65=H(o,c){J 1g.1J(o,c)};$.25($.1G,{'7K':H(t){F a=t*t;J t*(-a*t+4*a-6*t+4)},'7L':H(t){J t*(4*t*t-9*t+6)},'7M':H(t){F a=t*t;J t*(33*a*a-7N*a*t+7O*a-67*t+15)}})})(7P);", 62, 486, "|||||||opts|if|||||||||||||||||||||||||||||||||var|items|function|conf|return|typeof|cf_e|true|itms|false|visible|else|scrl|width|auto|total|length|case|trigger|button|children||first|visibleConf|number|bind||css|prev|break|tt0|next|pagination|slice|variable|debug|anims|this|stopPropagation|padding|duration|string|height|for|scroll|object|pre|push|data|boolean|left|usePadding|filter|a_dur|switch|undefined|call|wrp|align|container|triggerHandler|marginRight|tmrs|easing|play|fx|carouFredSel|each|Math|circular|sz_resetMargin|eq|fn|post|cfs_origCssMargin|isScrolling|c_new|remove|queu|is|isPaused|clbk|isStopped|stopImmediatePropagation|onAfter|while|sc_setScroll|unbind|extend|outerWidth|max|Not|synchronise|sc_startScroll|null|l_cur|l_old|w_siz|onBefore|crossfade|uncover|opacity|preventDefault|direction|adjust|old|cookie|parseInt|isNaN|cf_c|c_old|pR|pauseOnHover|opts_orig|ceil|default|getTime|removeClass|l_new|ms_getSizes|fade|cover|updatePageStatus|mousewheel|key|css_o|adj|start|responsive|outerHeight|top|right|min|hidden|gn_getVisibleItemsNext|cf_getItemsAdjust|addClass|pause|startTime|cf_sortParams|scrolling|resume|nv_enableNavi|last|slideTo||is_array|indexOf||_cfs_triggerEvent|innerWidth|ms_getTrueInnerSize||||parent|hide|show|gi_getCurrentItems|minimum|anchorBuilder|pauseDuration|Carousel|sc_clearTimers|events|queue|infinite|ms_getTotalSize|gn_getItemIndex|jquery|event|bt_pauseOnHoverConfig|window|ns2|ani_o|split|currentPosition|ms_getTrueLargestSize|floor|of|maxDimention|gn_getVisibleItemsNextFilter|go_getNaviObject|position|sc_stopScroll|timePassed|perc|100|dur2|prefix|appendTo|apply|sc_callCallbacks|currentPage|before|nv_showNavi|sz_setSizes|vI|touchwipe|wN|document|selector|_cfs_init|go_getObject|marginBottom|ms_isPercentage|ms_getPercentage||to|org|cf_getAlignPadding|keys|pauseOnEvent|Number|none|stopped||gn_getVisibleItemsPrev|cf_getAdjust|onEnd|clone|orgW|isHidden|cf_mapWrapperSizes|get|end|eval|mouseenter|mouseleave|serialNumber|cur_l|di|sz|element|cfs_isCarousel|defaults|upDateOnWindowResize|up|ms_hasVariableSizes|valid|center|cf_getItemAdjustMinMax|seco|nw|bottom|delay|pauseOnResize|cf_getSynchArr|scrolled|backward|textAlign|float|marginTop|marginLeft|absolute|_cfs_unbind_events|stop|finish|type|conditions|gn_getVisibleOrg|not|fx_cover|fx_uncover|orgDuration|cf_setCookie|gn_getVisibleItemsNextTestCircular|gi_getOldItemsNext|gi_getNewItemsNext||slideToPage|updateSizes|linkAnchors|_cfs_bind_buttons|click|_cfs_unbind_buttons|mousewheelPrev||bt_mousesheelNumber|mousewheelNext|wipe|_windowWidth|_windowHeight|ns3|wrapper|continue|classnames|new_w|old_w|cf_getKeyCode|gn_getItemsPrevFilter|gn_getItemsNextFilter|ms_getLargestSize|toLowerCase|arr|sta|console|No|destroy|innerHeight|dx|Set|secp|ms_getPaddingBorderMargin|cf_getPadding|500|pageAnchorBuilder|Item|forward|_cfs_build|fixed|cfs_origCss|_cfs_bind_events|paused|onPausePause|onPauseEnd|onPauseStart|enough|needed|page|slide_|configuration|gn_getScrollItemsPrevFilter|Scrolling|gi_getOldItemsPrev|gi_getNewItemsPrev|directscroll|concat|shift|gn_getScrollItemsNextFilter|new_m|jumpToStart|after|append|removeItem|instanceof|caroufredsel|hash||index|selected|gn_getVisibleItemsPrevFilter|down|keyup|keyCode|configs|classname|cf_readCookie|random|itm|onCreate|namespace|span|animate|complete|cfs_tempCssMargin|s2|l1|l2|join|log|found|the|Infinity|Width|caroufredsel_cookie_|attr|id|2500|Available|widths|heights|automatically|relative|overflow|setTimeout|or|Page|resumed|currently|Callback|returned|slide_prev|prependTo|slide_next|prevPage|nextPage|prepend|carousel|insertItem|add|detach|round|currentVisible|body|find|Preventing|non|sliding|replaceWith|min_move_x|min_move_y|preventDefaultEvents|wipeUp|wipeDown|wipeLeft|wipeRight|resize|timer|wrap|class|unshift|location|swing|cfs|div|caroufredsel_wrapper|href|clearTimeout|fx_fade|hiding|navigation|disabled|paddingLeft|paddingRight|paddingTop|paddingBottom|outer|inner|px|em|even|odd|path|charAt|immediate|Array|new|Date|quadratic|cubic|elastic|106|126|jQuery".split("|"), 0, {})); /*! chrysler-mobile - v0.1.0 - 2014-02-03, 3:04 PM EST */ var _cloneObject = function(a) { if (null === a || "object" != typeof a) return a; if (a.constructor == Array) return a.clone(); var b = a.constructor(); for (var c in a) b[c] = _cloneObject(a[c]); return b }; Array.prototype.clone = function() { for (var a = this.slice(0), b = 0; b < a.length; b++) a[b] = _cloneObject(a[b]); return a }, String.isNullOrWhiteSpace = function(a) { return !a || !/\S/.test(a) }, Array.prototype.removeAt = function(a) { this.splice(a, 1) }; var LazyLoader = new function() { function _loadElements(a) { for (var b = 0; b < a.length; b++) _this.loadContent(a[b]) } function _init() { for (var tags = document.getElementsByTagName("*"), lazyElements_view = new Array, lazyElements_load = new Array, lazyElements_custom = new Array, i = 0; i < tags.length; i++)(tags[i].getAttribute("data-src") && "IMG" == tags[i].tagName || tags[i].getAttribute("data-uri")) && ("pageload" == tags[i].getAttribute("data-trigger") ? (tags[i].className = (tags[i].className + " " + this.preloaderClass).trim(), lazyElements_load.push(tags[i])) : tags[i].getAttribute("data-trigger") && "inview" != tags[i].getAttribute("data-trigger") ? "none" != tags[i].getAttribute("data-trigger") && lazyElements_custom.push(tags[i]) : lazyElements_view.push(tags[i])); LazyLoader.loaded = 1, _loadElements(lazyElements_load); for (var i = 0; i < lazyElements_custom.length; i++) { var elem = eval(lazyElements_custom[i].getAttribute("data-trigger")); elem && jQuery(elem).one(lazyElements_custom[i].getAttribute("data-event"), function() { _this.loadContent.apply(_this, [lazyElements_custom[i]]) }) } } function _loadImage(a, b, c, d) { for (var e = new Array, f = 4; f < arguments.length; f++) e.push(arguments[f]); var g = function(b, e) { "function" == typeof c && (d && (e.push(b), e.push(a)), e.length > 0 ? c.apply(d, e) : c.call(a, b)) }; a.onload = function() { g(!0, e) }, a.onabort = a.onerror = function() { g(!1, e) }, a.src = b } function _loadInView(a) { for (var b = 0; b < a.length; b++) jQuery(a[b]).offset().top - jQuery(window).height() - jQuery(window).scrollTop() && (_this.loadContent(a[b]), a.removeAt(b), b--) } function _loadLink(a, b, c, d) { var e = document.createElement("link"); e.href = a, e.media = b || "screen", e.rel = c || "stylesheet", e.type = d || "text/css", e.setAttribute("data-isloading", "true"), document.getElementsByTagName("head")[0].appendChild(e), _executeCallback(e, "href") } function _loadScript(a, b) { var c = document.createElement("script"); c.type = b || "text/javascript", c.src = a, c.setAttribute("data-isloading", "true"), document.getElementsByTagName("head")[0].appendChild(c), _executeCallback(c, "src") } function _loadHtml(a) { jQuery.ajax({ url: a, success: function(b) { _releaseQueue({ uri: a, response: b }, "uri") } }) } function _executeCallback(a, b) { var c = new Object; c[b] = a.getAttribute(b), c.element = a, a.readyState ? a.onreadystatechange = function() { ("loaded" == a.readyState || "complete" == a.readyState) && (a.onreadystatechange = null, _releaseQueue(c, b)) } : a.onload = function() { _releaseQueue(c, b) } } function _releaseQueue(a, b) { a.element && a.element.removeAttribute("data-isloading"); for (var c = 0; c < _callbackQueue.length; c++) { for (var d = 0; d < _callbackQueue[c].dependencies.length; d++) if (_callbackQueue[c].dependencies[d] == a[b]) { a.response && (_callbackQueue[c].args || (_callbackQueue[c].args = new Array), _callbackQueue[c].args.push(a.response)), _callbackQueue[c].dependencies.removeAt(d); break } 0 == _callbackQueue[c].dependencies.length && ("function" == typeof _callbackQueue[c].callback && _callbackQueue[c].callback.call(_callbackQueue[c].scope, _callbackQueue[c].args), _callbackQueue.removeAt(c), c--) } } this.loaded = 0, this.preloaderClass = "lazy-preloader", this.loadImage = function() { var a = new Array; a.push(new Image); for (var b = 0; b < arguments.length; b++) a.push(arguments[b]); _loadImage.apply(this, a) }, this.loadImageCollection = function(a, b) { for (var c = new Array, d = 0, e = 0; e < a.length; e++) this.loadImage(a[e], function(c, e, f, g) { c[e] = g, d++, d == a.length && "function" == typeof b && b(c) }, window, c, e) }, this.loadContent = function(element, callback) { -1 == (" " + element.className + " ").indexOf(" " + this.preloaderClass + " ") && (element.className = (element.className + " " + this.preloaderClass).trim()); var _callback = function(flag, img) { img.className = (" " + img.className + " ").replace(" " + this.preloaderClass + " ", " ").trim(), img.getAttribute("data-callback") ? (eval(img.getAttribute("data-callback") + "(" + img.getAttribute("data-args") + ")"), img.removeAttribute("data-callback"), img.removeAttribute("data-args")) : "function" == typeof callback && callback() }; "IMG" == element.tagName ? _loadImage(element, element.getAttribute("data-src"), _callback, this) : jQuery.ajax({ url: element.getAttribute("data-uri"), success: function(a) { _callback(!0, element); var b = document.createElement("div"); b.innerHTML = a, element.parentNode.replaceChild(b.firstChild, element) } }), element.removeAttribute("data-src"), element.removeAttribute("data-trigger") }, this.loadLink = function(a, b, c, d, e, f) { "function" == typeof b && (f = c, e = b, b = null), this.requires([{ href: a, media: b, rel: c, type: d }], e, f) }, this.loadLinkCollection = function(a, b, c) { for (var d = new Array, e = 0; e < a.length; e++) d.push({ href: a[e] }); this.requires(d, b, c) }, this.loadScript = function(a, b, c, d) { "function" == typeof b && (d = c, c = b, b = null), this.requires([{ src: a, type: b }], c, d) }, this.loadScriptCollection = function(a, b, c) { for (var d = new Array, e = 0; e < a.length; e++) d.push({ src: a[e] }); this.requires(d, b, c) }, this.requires = function(a, b, c) { function d(b, c) { var d; g.test(a[i][c]) || (a[i][c] = window.location.protocol + "//" + window.location.host + a[i][c]), h.dependencies.push(a[i][c]); for (var e = 0; e < b.length; e++) if (d = b[e].getAttribute(c), g.test(d) || (d = window.location.protocol + "//" + window.location.host + d), d == a[i][c]) { b[e].getAttribute("data-isloading") || h.dependencies.pop(), a.removeAt(i), i--; break } } var e = document.getElementsByTagName("script"), f = document.getElementsByTagName("link"), g = new RegExp(/^(https?|ftp|file):\/\/.+$/), h = new Object; a = a.clone(), h.callback = b, h.scope = c, h.dependencies = new Array; for (var i = 0; i < a.length; i++) String.isNullOrWhiteSpace(a[i].src) ? String.isNullOrWhiteSpace(a[i].href) ? String.isNullOrWhiteSpace(a[i].uri) || h.dependencies.push(a[i].uri) : d(f, "href") : d(e, "src"); if (a.length > 0 || h.dependencies.length > 0) { _callbackQueue.push(h); for (var i = 0; i < a.length; i++) a[i].src ? _loadScript(a[i].src) : a[i].href ? _loadLink(a[i].href) : a[i].uri && _loadHtml(a[i].uri) } else h.callback() }, this.toString = function() { return "[object LazyLoader]" }; var _this = this, _callbackQueue = new Array; this.init = _init; var _this = this }; var mGlobalConfig = { errorTimeOut: 5000, onlyHwyMPG: false, heroCarousel: { arrowsNav: false, loop: true, keyboardNavEnabled: true, controlsInside: false, imageScalePadding: 0, imageScaleMode: "fit", arrowsNavAutoHide: false, autoScaleSlider: true, autoScaleSliderWidth: 640, autoScaleSliderHeight: 690, minSlideOffset: 1, slidesSpacing: 1, controlNavigation: "bullets", thumbsFitInViewport: false, navigateByClick: false, startSlideId: 0, transitionType: "move", globalCaption: false, autoPlay: { enabled: false, pauseOnHover: true, delay: 6000 }, deeplinking: { enabled: true, change: true, prefix: "hero-" } }, galleryModule: { royalSlider: { arrowsNav: false, globalCaption: true, loop: false, keyboardNavEnabled: true, controlsInside: false, imageAlignCenter: true, imageScalePadding: 0, minSlideOffset: 1, slidesSpacing: 1, imageScaleMode: "fit", autoScaleSlider: true, autoScaleSliderWidth: 640, autoScaleSliderHeight: 490, controlNavigation: "thumbnails", navigateByClick: false, startSlideId: 0, autoPlay: false, transitionType: "move", thumbs: { spacing: 4, fitInViewport: false, orientation: "horizontal" }, fullscreen: { enabled: false, nativeFS: false }, deeplinking: { enabled: false, change: false } }, fullScreenRoyalSlider: { updateSliderSize: true, arrowsNav: true, controlNavigation: "arrows", globalCaption: true, loop: false, keyboardNavEnabled: true, controlsInside: false, imageScalePadding: 0, minSlideOffset: 1, slidesSpacing: 1, navigateByClick: false, startSlideId: 0, autoPlay: false, transitionType: "move", }, handlerbars: { galleryCarouselTemplateUrl: "/crossbrand/kr/mobile/javascript/components/galleryModuleCarousel.tmpl.js", galleryTabTemplateUrl: "/crossbrand/kr/mobile/javascript/components/galleryModuleTabs.tmpl.js", galleryCarouselFSTemplateUrl: "/crossbrand/kr/mobile/javascript/components/galleryModuleCarouselFS.tmpl.js", galleryCarouselFSTemplate: "galleryModuleCarouselFS.tmpl" }, galleryData: { Url: "/kr/mobile/data/" } }, vehicleGallery: { royalSlider: { updateSliderSize: false, arrowsNav: false, globalCaption: true, loop: false, keyboardNavEnabled: true, controlsInside: false, imageAlignCenter: true, imageScalePadding: 0, minSlideOffset: 1, slidesSpacing: 1, numImagesToPreload: 1, imageScaleMode: "fit", autoScaleSlider: true, autoScaleSliderWidth: 640, autoScaleSliderHeight: 400, controlNavigation: "thumbnails", navigateByClick: false, startSlideId: 0, autoPlay: false, transitionType: "move", thumbs: { spacing: 7, fitInViewport: false, orientation: "horizontal" } } }, chooseVehicle: { handlerbars: { templateUrl: "/crossbrand/kr/mobile/javascript/components/chooseVehicle.tmpl.js", vehicleTemplate: "chooseVehicle.tmpl", tileTemplateUrl: "/crossbrand/kr/mobile/javascript/components/chooseVehicleTile.tmpl.js", vehicleTemplateTile: "chooseVehicleTile.tmpl", }, imgWidth: 280, imgHeight: 140, imgType: "jpg", bmo: "Build My Own" }, colorizer: { royalSlider: { arrowsNav: false, globalCaption: true, loop: true, keyboardNavEnabled: false, controlsInside: false, autoScaleSlider: false, controlNavigation: "thumbnails", navigateByClick: false, startSlideId: 0, autoPlay: false, transitionType: "fade", imageScaleMode: "none", imageAlignCenter: "false", imgHeight: 120, thumbs: { spacing: 10, arrows: true, fitInViewport: false, orientation: "horizontal", appendSpan: true }, fullscreen: { enabled: false }, deeplinking: { enabled: false, change: false } }, handlerbars: { templateUrl: "/crossbrand/kr/mobile/javascript/components/colorizer.tmpl.js", colorizerTemplate: "colorizer.tmpl" }, colorizerData: { Url: "/hostb/assets/data/compare/colors/", imgBaseUrl: "/iof/?IMG=EAL_IMAGES/" } }, colorizrGalleryModule: { royalSlider: { arrowsNav: false, globalCaption: true, loop: true, keyboardNavEnabled: true, controlsInside: false, imageAlignCenter: true, imageScalePadding: 0, minSlideOffset: 1, slidesSpacing: 1, imageScaleMode: "fit", autoScaleSlider: true, autoScaleSliderWidth: 640, autoScaleSliderHeight: 490, controlNavigation: "thumbnails", navigateByClick: false, startSlideId: 0, autoPlay: false, transitionType: "move", thumbs: { spacing: 4, fitInViewport: false, orientation: "horizontal" }, fullscreen: { enabled: false, nativeFS: false }, deeplinking: { enabled: false, change: false } }, fullScreenRoyalSlider: { updateSliderSize: true, arrowsNav: true, controlNavigation: "arrows", globalCaption: true, loop: false, keyboardNavEnabled: true, controlsInside: false, imageScalePadding: 0, minSlideOffset: 1, slidesSpacing: 1, navigateByClick: false, startSlideId: 0, autoPlay: false, transitionType: "move", }, handlerbars: { galleryCarouselTemplateUrl: "/crossbrand/kr/mobile/javascript/components/galleryModuleCarousel.tmpl.js", galleryTabTemplateUrl: "/crossbrand/kr/mobile/javascript/components/galleryModuleTabs.tmpl.js", galleryCarouselFSTemplateUrl: "/crossbrand/kr/mobile/javascript/components/galleryModuleCarouselFS.tmpl.js", galleryCarouselFSTemplate: "galleryModuleCarouselFS.tmpl" }, galleryData: { Url: "/kr/mobile/data/" }, colorizer: { royalSlider: { arrowsNav: true, globalCaption: true, loop: true, keyboardNavEnabled: false, controlsInside: false, autoScaleSlider: false, controlNavigation: "thumbnails", navigateByClick: false, startSlideId: 0, autoPlay: false, transitionType: "fade", imageScaleMode: "none", imageAlignCenter: "false", imgHeight: 120, thumbs: { spacing: 10, arrows: true, fitInViewport: false, orientation: "horizontal", appendSpan: true }, fullscreen: { enabled: false }, deeplinking: { enabled: false, change: false } }, handlerbars: { templateUrl: "/crossbrand/kr/mobile/javascript/components/colorizer.tmpl.js", colorizerTemplate: "colorizer.tmpl" }, colorizerData: { Url: "/hostb/assets/data/compare/colors/", imgBaseUrl: "/iof/?IMG=EAL_IMAGES/" } } }, uConnectOverlay: { uconnectCarousel: { controlNavigation: "thumbnails", autoScaleSlider: true, autoScaleSliderWidth: 320, loop: false, imageAlignCenter: true, navigateByClick: false, numImagesToPreload: 2, arrowsNav: true, imgWidth: 320, arrowsNavAutoHide: false, arrowsNavHideOnTouch: false, keyboardNavEnabled: true, fadeinLoadedSlide: true, globalCaption: false, globalCaptionInside: false, thumbs: { drag: true, touch: true, spacing: 7, arrows: true, fitInViewport: false, orientation: "horizontal", appendSpan: true }, fullscreen: { enabled: false, nativeFS: false }, deeplinking: { enabled: false, change: false } }, handlerbars: { systemTemplate: "/crossbrand/kr/mobile/javascript/components/uConnectSystems.tmpl.js", carouselTemplate: "/crossbrand/kr/mobile/javascript/components/uConnectModule.tmpl.js", accessTemplate: "/crossbrand/kr/mobile/javascript/components/uConnectAccess.tmpl.js" }, specData: { Url: "/crossbrand/uconnectsystems/data/" } }, chooseModels: { handlerbars: { templateUrl: "/crossbrand/kr/mobile/javascript/components/chooseModels.tmpl.js", chooseModelTemplate: "chooseModels.tmpl" }, imgWidth: 560, imgHeight: 280, imgType: "jpg" }, specs: { handlerbars: { tabUrl: "/crossbrand/kr/mobile/javascript/components/tabs.tmpl.js", tabUrlTemplate: "tabs.tmpl", collapsibleTemplateUrl: "/crossbrand/kr/mobile/javascript/components/specs.tmpl.js", collapsibleTemplate: "specs.tmpl" }, specData: { Url: "/hostb/assets/data/compare/" } }, viewFeatutredOffers: { handlerbars: { offerUrl: "/crossbrand/kr/mobile/javascript/components/viewFeaturedOffers.tmpl.js", offerUrlTemplate: "viewFeaturedOffers.tmpl", } }, dodgeIncentivesOffers: { handlerbars: { offerUrl: "/crossbrand/kr/mobile/javascript/components/dodgeIncentives.tmpl.js", offerUrlTemplate: "dodgeIncentives.tmpl", } }, appURLs: { bmo: { lid: "build_my_own", check_myc: true, check_ccode: true, external: true, targetLocation_myc: "/hostc/bmo/ + myc + /models.do", targetLocation_ccode: "/hostc/bmo/ + ccode + / + llp + /configurator.do", checkForSpecialEditions: false, isApp: 1, appID: "bmo" }, sni: { lid: "available_near_you", targetLocation: "/kr/mobile/apps/sni/", isApp: 1, appID: "sni" }, fad: { lid: "find_a_dealer", targetLocation: "/kr/mobile/dealer_locator/", collapsibleTemplateUrl: "/crossbrand/kr/mobile/javascript/components/fadInventoryList.tmpl.js", collapsibleTemplate: "fadInventoryList.tmpl", isApp: 1, appID: "dealer" }, pe: { lid: "payment_calculator", targetLocation: "/kr/mobile/apps/pe/", isApp: 1, appID: "pe" }, offers: { lid: "view_all_offers", targetLocation: "/kr/mobile/apps/offers/", isApp: 1, appID: "incentives" }, incentives: { lid: "view_all_offers", targetLocation: "/kr/mobile/apps/offers/", isApp: 1, appID: "incentives" }, back: { vehicle: true, year: true, lid: "back_to_vehicle", targetLocation: "/kr/mobile/vehicles/" }, compare: { lid: "compare_models", targetLocation: "/kr/mobile/model-compare/", isApp: 1, appID: "compare" } }, trackSeparately: { inContextApp: ["searchInventory", "dealerLocator", "dealerInventory", "advertisedOffers", "vehicleOffers", "paymentCalculator", "vinDetails"], inDataPage: ["search", "home", "vlp", "model", "selector"], inDataURL: ["/get_connected/thankyou.html", "/get_connected/error.html", "/kr/mobile/vehicles/2015/renegade/compare/", "/kr/mobile/vehicles/2015/compass/altitude_4x2/", "/kr/mobile/vehicles/2015/compass/high_altitude_4x2/", "/kr/mobile/vehicles/2015/patriot/altitude_4x2/", "/kr/mobile/vehicles/2015/grand-cherokee/altitude_4x2/", "/kr/mobile/vehicles/2015/patriot/high_altitude_4x2/", "/kr/mobile/vehicles/2015/wrangler/rubicon_hard_rock_4x4/", "/kr/mobile/vehicles/2015/wrangler-unlimited/rubicon_hard_rock_4x4/", "/kr/mobile/vehicles/2015/wrangler/willys_wheeler_4x4/", "/kr/mobile/vehicles/2015/wrangler-unlimited/willys_wheeler_4x4", "/kr/mobile/vehicles/2015/wrangler/wrangler_freedom_edition_4x4/", "/kr/mobile/vehicles/2015/wrangler/wrangler_x_4x4/", "/kr/mobile/vehicles/2015/wrangler-unlimited/wrangler_unlimited_x_4x4/", "/kr/mobile/vehicles/2015/wrangler-unlimited/wrangler_unlimited_freedom_edition_4x4/"] } }; /* brand.min.js */ var brandConfig = { year: "2015", onlyHwyMPG: true, trackSeparately: { inDataURL: ["/kr/mobile/JFC/includes/galleryFS.html"] }, limitedEditionVehicles: { "2015": { vehicles: [{ vehicle: "compass", trims: ["altitude", "high_altitude"] }, { vehicle: "grand_cherokee", trims: ["altitude"] }] }, "2016": { vehicles: [{ vehicle: "cherokee", trims: ["75th_anniversary_edition", "altitude"] }, { vehicle: "compass", trims: ["75th_anniversary_edition"] }, { vehicle: "patriot", trims: ["75th_anniversary_edition"] }, { vehicle: "renegade", trims: ["75th_anniversary_edition", "justice"] }, { vehicle: "grand_cherokee", trims: ["75th_anniversary_edition", "limited_75th_anniversary_edition", "high_altitude"] }, { vehicle: "wrangler", trims: ["75th_anniversary_edition", "backcountry", "black_bear", "freedom_edition", "rubicon_hard_rock", "willys_wheeler"] }, { vehicle: "wrangler_unlimited", trims: ["75th_anniversary_edition", "backcountry", "black_bear", "freedom_edition", "rubicon_hard_rock", "willys_wheeler"] }] } }, filterByVehiclesDropdown: [{ year: "2015", models: [{ model: "Compass", myccode: "CUJ201502", lid: "sort_by_compass" }, { model: "Grand Cherokee", myccode: "CUJ201503", lid: "sort_by_grand_cherokee" }] }, { year: "2016", models: [{ model: "Patriot", myccode: "CUJ201605", lid: "sort_by_patriot" }, { model: "Renegade", myccode: "CUJ201609", lid: "sort_by_renegade" }, { model: "Compass", myccode: "CUJ201602", lid: "sort_by_compass" }, { model: "Cherokee", myccode: "CUJ201608", lid: "sort_by_cherokee" }, { model: "Grand Cherokee", myccode: "CUJ201603", lid: "sort_by_grand_cherokee" }, { model: "Wrangler", myccode: "CUJ201606", lid: "sort_by_wrangler" }, { model: "Wrangler Unlimited", myccode: "CUJ201607", lid: "sort_by_wrangler_unlimited" }] }], updateVehicle: { model_years: { "2015": { grand_cherokee: { models: { laredo_4x2: { mpg: { hwy: "30" } }, grand_cherokee_high_altitude_4x2: { isLimitedEdition: "1", mpg: { hwy: "30", disclaimer: "EPA estimated 30 hwy mpg with 3.0L EcoDiesel engine and eight-speed automatic transmission, 4x2. Actual mileage may vary." } } } } }, "2016": { wrangler: { models: { wrangler_willys_wheeler_4x4: { trim_display: "Willys Wheeler Edition" }, wrangler_backcountry_4x4: { trim_display: "Backcountry Edition" }, wrangler_rubicon_hard_rock_4x4: { trim_display: "Rubicon Hard Rock Edition" } } }, wrangler_unlimited: { models: { wrangler_unlimited_willys_wheeler_4x4: { trim_display: "Willys Wheeler Edition" }, wrangler_unlimited_backcountry_4x4: { trim_display: "Backcountry Edition" }, wrangler_unlimited_rubicon_hard_rock_4x4: { trim_display: "Rubicon Hard Rock Edition" } } }, renegade: { models: { renegade_trailhawk_4x4: { d: "RENEGADE TRAILHAWK 4X4 ®" } } } } } }, addVehicle: { model_years: {} }, heroCarousel: { autoPlay: { enabled: false } }, chooseVehicle: { fitlerValues: ["4x2", "4x4"], wrangler_filters: { filters: ["4x4", "Limited Edition"], filter1: ["sport", "sport_s", "sahara", "rubicon"], filter2: ["freedom_edition", "moab_edition", "rubicon_10th_anniversary_edition"], } }, jacksonHoleVehSlider: { royalSlider: { numImagesToPreload: 15, loop: false, keyboardNavEnabled: true, controlsInside: false, imageScaleMode: "none", imageScalePadding: "0", arrowsNav: true, autoScaleSlider: false, controlNavigation: "none", thumbsFitInViewport: false, navigateByClick: false, startSlideId: 0, autoPlay: false, transitionType: "move", globalCaption: true, deeplinking: { enabled: false, change: false } }, handlerbars: { templateUrl: "/crossbrand/kr/mobile/javascript/components/jacksonHoleVehSlider.tmpl.js", vehicleTemplate: "jacksonHoleVehSlider.tmpl" }, imgWidth: 560, imgHeight: 280, imgType: "jpg", bmo: "Build My Own" }, model_as_vlp: { model_years: { "2015": { grand_cherokee: { srt: "srt_4x4" }, data: { srt_4x4: { bmo: "Build & Price", msrp: "64,595", myc: "CUJ201503", currency: "$", ccode: "CUJ201503WKJX74A", fullDisplay: "2015 Grand Cherokee SRT짰", image_src: "/iof/?IMG=EAL_IMAGES/2015\\images\\CC\\CC15_WKJX74_2TL_PRM_APA_XXX_XXX_XXX.png", img: "/iof/?IMG=EAL_IMAGES/2015\\images\\CC\\CC15_WKJX74_2TL_PRM_APA_XXX_XXX_XXX.jpg&HEIGHT=280&WIDTH=560&AUTOTRIM=1&NOIMG=not_found_Chrysler.gif", year: "2015", model: "grand_cherokee", trim: "grand-cherokee/srt", trim_display: "SRT짰", llp: "2TL", display: "SRT짰 4X4" } } }, "2016": { grand_cherokee: { srt: "grand_cherokee_srt_4x4" } } } }, specialEditionOverrides: [{ trim: "wrangler", currentDrive: "4x4", filterName: "wrangler_filters", exclusions: [], checkForFilterValues: true, year: "" }], removeTrim: [], keep4x2: ["wrangler"], nameReplacements: [{ oldText: "SPORT S", newText: "Sport S" }], dtmSrc: "4a5e62a0846a373ad2163d1a3f4de4048ba9534f", isJeepLimitedEdition: false }; $(document).on("pageshow", function() { try { var a = $.cookie("CT_Akamai").split("country_code=")[1].slice(0, 2); if (a !== "US") { $("nav#menuPanel a.ui-link-inherit[href*='/kr/mobile/JFC/'], .partnershipJFC a").each(function() { $(this).attr("href", "http://m.juventus.jeep.com/kr/mobile/global/") }); $("nav#menuPanel a.ui-link-inherit[href*='/kr/mobile/wsl/'], .partnership a.gc-button[href*='/kr/mobile/wsl/']").each(function() { $(this).attr("href", "/kr/mobile/wsl/global/kr/") }); $("#wsl-menu a.ui-link[href$='/kr/mobile/wsl/']").each(function() { $(this).attr("href", "/kr/mobile/wsl/global/kr/") }); $("#wsl-menu a.ui-link[href$='/kr/mobile/wsl/leaderboard/']").each(function() { $(this).attr("href", "/kr/mobile/wsl/leaderboard/global/kr/") }); $("#wsl-menu a.ui-link[href$='/kr/mobile/wsl/calendar/']").each(function() { $(this).attr("href", "/kr/mobile/wsl/calendar/global/kr/") }); if (window.location.pathname === "/kr/mobile/JFC/") { window.location = "http://m.juventus.jeep.com/kr/mobile/global/" } else { if (window.location.pathname === "/kr/mobile/JFC/global/kr/") { window.location = "http://m.juventus.jeep.com/kr/mobile/global/" } else { if (window.location.pathname === "/kr/mobile/wsl/") { window.location = "/kr/mobile/wsl/global/kr/" } else { if (window.location.pathname === "/kr/mobile/wsl/leaderboard/") { window.location = "/kr/mobile/wsl/leaderboard/global/kr/" } else { if (window.location.pathname === "/kr/mobile/wsl/calendar/") { window.location = "/kr/mobile/wsl/calendar/global/kr/" } } } } } } else { if (window.location.pathname === "/kr/mobile/JFC/global/kr/") { window.location = "http://m.juventus.jeep.com/kr/mobile/global/" } } } catch (b) {} }); $.extend(true, mGlobalConfig, brandConfig); /*! chrysler-mobile - v0.1.0 - 2015-01-08, 6:39 PM GMT+0530 */ var marketConfig = { market: "en_US", searchURL: "http://www.", showOffers: !0, currency: "$", showInventory: !0, enableHostCalls: !0, showZipCode: !0, enableCloudfrontTracking: !0, enableMpel: !0, trackingGID: { dodge: { www: "100363", testing: "100356" }, chrysler: { www: "100364", testing: "100357" }, jeep: { www: "100365", testing: "100355" }, ramtrucks: { www: "100367", testing: "100362" }, fiatusa: { www: "100577", testing: "100578" } }, chooseVehicle: { MPGLabel: "MPG", buildPrice: { visible: !0, label: "Build & Price" }, findDealer: { visible: !1, url: "#", label: "Find A Dealer" } }, chooseModels: { buildPrice: { visible: !0, label: "Build & Price" }, findDealer: { visible: !1, url: "#", label: "Find A Dealer", lpos: "fad" } }, colorizer: { colorizerData: { Url: "/hostb/assets/data/compare/colors/", imgBaseUrl: "", swatchExtn: "", vehicleImgExtn: "" } }, colorizrGalleryModule: { colorizer: { colorizerData: { Url: "/hostb/assets/data/compare/colors/", imgBaseUrl: "", swatchExtn: "", vehicleImgExtn: "" } } }, specs: { specData: { Url: "/hostb/assets/data/compare/" } } }, mGlobalConfig = void 0 !== mGlobalConfig ? mGlobalConfig : {}; $.extend(!0, mGlobalConfig, marketConfig); var MP = { Version: "1.0.23", Domains: { es: "es-m.jeep.com" }, SrcLang: "en", UrlLang: "mp_js_current_lang", SrcUrl: decodeURIComponent("mp_js_orgin_url"), init: function() { if (MP.UrlLang.indexOf("p_js_") === 1) { MP.SrcUrl = window.top.document.location.href; MP.UrlLang = MP.SrcLang } }, getCookie: function(b) { var c = document.cookie.indexOf(b + "="); if (c < 0) { return null } c = c + b.length + 1; var a = document.cookie.indexOf(";", c); if (a < 0) { a = document.cookie.length } while (document.cookie.charAt(c) === " ") { c++ } return decodeURIComponent(document.cookie.substring(c, a)) }, setCookie: function(b, e, f, d) { var c = b + "=" + encodeURIComponent(e); if (f) { c += "; path=" + f } if (d) { c += "; domain=" + d } var a = new Date(); a.setTime(a.getTime() + 1000 * 60 * 60 * 24 * 365); c += "; expires=" + a.toUTCString(); document.cookie = c }, switchLanguage: function(b) { var a = document.createElement("SCRIPT"); if (b !== MP.SrcLang) { a.src = location.protocol + "//" + MP.Domains[b] + "/" + MP.SrcLang + b + "/?1023749632;" + encodeURIComponent(MP.SrcUrl); document.body.appendChild(a) } else { if (b === MP.SrcLang && MP.UrlLang !== MP.SrcLang) { a.src = location.protocol + "//" + MP.Domains[MP.UrlLang] + "/" + MP.SrcLang + MP.UrlLang + "/?1023749634;" + encodeURIComponent(location.href); document.body.appendChild(a) } } /*if(typeof DATALAYER!=="undefined"){$(document).on("click","#mp_dialog a#mp_cnti",function(c){DATALAYER.linkTrack(this,{lid:$(this).text(),lpos:"global-footer-mobile"});$(document).off("click","#mp_dialog a#mp_cnti");$(document).off("click","#mp_dialog a#mp_canl");$(document).off("click","#mpsbclose a")});$(document).on("click","#mp_dialog a#mp_canl",function(c){DATALAYER.linkTrack(this,{lid:$(this).text(),lpos:"global-footer-mobile"});$(document).off("click","#mp_dialog a#mp_cnti");$(document).off("click","#mp_dialog a#mp_canl");$(document).off("click","#mpsbclose a")});$(document).on("click","#mpsbclose a",function(c){DATALAYER.linkTrack(this,{lid:"close",lpos:"global-footer-mobile"});$(document).off("click","#mp_dialog a#mp_cnti");$(document).off("click","#mp_dialog a#mp_canl");$(document).off("click","#mpsbclose a")})}*/ return false }, switchToLang: function(a) { window.top.location.href = a } }; var vehicleData = { brand: "Jeep", model_years: { "2015": { grand_cherokee: { vehTagLine: "Unrivaled. The 2014 Jeep® Grand Cherokee sets extraordinary standards for performance, luxury and attention to detail.", }, cherokee: { vehTagLine: "Go. Run. Act. Find. Dare. Stay restless in the All-New 2014 Jeep짰 Cherokee. Fuel economy, connectivity and performance combined.", }, compass: { vehTagLine: "Take life to new heights. The 2014 Jeep® Compass pushes new possibilities with up to 30 hwy mpg[1].", }, patriot: { vehTagLine: "The gateway to adventure. A classic and affordable compact SUV, the 2014 Jeep® Patriot is the best priced SUV in America[2]", }, wrangler: { vehTagLine: "Tough. Authentic. Legendary. The 2014 Jeep® Wrangler has the unmatched power and capability[3] to make your run to the mountain one to remember.", }, wrangler_unlimited: { vehTagLine: "Tough. Authentic. Legendary. The 2014 Jeep® Wrangler Unlimited is built to make every day behind the wheel a thrilling adventure.", } }, "2016": { grand_cherokee: { vehTagLine: "Unrivaled. The 2014 Jeep® Grand Cherokee sets extraordinary standards for performance, luxury and attention to detail.", }, cherokee: { vehTagLine: "Go. Run. Act. Find. Dare. Stay restless in the All-New 2014 Jeep짰 Cherokee. Fuel economy, connectivity and performance combined.", }, compass: { vehTagLine: "Take life to new heights. The 2014 Jeep® Compass pushes new possibilities with up to 30 hwy mpg[1].", }, patriot: { vehTagLine: "The gateway to adventure. A classic and affordable compact SUV, the 2014 Jeep® Patriot is the best priced SUV in America[2]", }, wrangler: { vehTagLine: "Tough. Authentic. Legendary. The 2014 Jeep® Wrangler has the unmatched power and capability[3] to make your run to the mountain one to remember.", }, wrangler_unlimited: { vehTagLine: "Tough. Authentic. Legendary. The 2014 Jeep® Wrangler Unlimited is built to make every day behind the wheel a thrilling adventure.", } } } }; $(document).off("pageshow", ".vehicle_home_cherokee").on("pageshow", ".vehicle_home_cherokee", function(a) { context.year = "2014"; context.vehicle = "cherokee"; context.section = "landing"; $("#features").on("touchstart", ".ui-collapsible-heading", function(c) { var b = $(this); mGlobal.common.accordionTracking(b, "features_content_mobile") }) }); $(document).on("pageshow", function(b) { if ($(".ui-page-active").find(".jackson-hole").length !== 0) { context.vehicle = ""; context.pageName = "jackson-hole"; context.pageType = "lifestyle"; var c = mGlobalConfig.jacksonHoleVehSlider; c.pageName = $.mobile.activePage.attr("data-page"), jacksonHoleVehSliderElement = $(b.target).find(":jqmData(component='jacksonVehList')"); mGlobal.jacksonHoleVehSlider.init(c, jacksonHoleVehSliderElement); $("#drives-us-gallery").royalSlider({ keyboardNavEnabled: true, arrowsNavAutoHide: false, autoScaleSlider: true, autoScaleSliderWidth: 400, autoScaleSliderheight: 400, loop: true, navigateByClick: false, controlsInside: true }); context.year = "" } if ($(".ui-page-active").find(".renegade-life-wrapper").length !== 0) { context.vehicle = "renegade"; context.pageName = "renegade-life"; context.pageType = "lifestyle"; context.year = "" } if ($.mobile.activePage.attr("data-url").indexOf("mobile/renegade-life/kaleidoscope/") !== -1) { context.vehicle = "renegade"; context.pageName = "renegade-life/kaleidoscope"; context.pageType = "lifestyle"; context.year = "" } if ($.mobile.activePage.attr("data-url").indexOf("mobile/renegade-life/side-streets/") !== -1) { var a = $.mobile.activePage.attr("data-url").replace(/-/g, "_").split("/"); context.vehicle = "renegade"; context.pageName = "renegade-life/side-streets/" + a[a.length - 2]; context.pageType = "lifestyle"; context.year = "2015" } if ($(".ui-page-active").find(".sb15-wrapper").length !== 0) { context.pageName = "renegade-world-commercial"; context.pageType = "lifestyle"; context.year = "" } if ($(".ui-page-active").find(".JFC").length !== 0) { context.pageName = "jeep-and-juventus"; context.pageType = "lifestyle" } if ($(".ui-page-active").find(".wslVehList").length !== 0) { context.year = "" } if ($(".ui-page-active").find(".outside-container").length !== 0) { context.vehicle = "renegade"; context.pageName = "renegade-life/beyond-adventure/rex-pemberton/landing"; context.pageType = "lifestyle"; context.year = "" } if ($(".ui-page-active").find(".steve-fisher").length !== 0) { context.vehicle = "renegade"; context.pageName = "renegade-life/beyond-adventure/steve-fisher/landing"; context.pageType = "lifestyle"; context.year = "" } if ($(".ui-page-active").find(".x-ambassadors").length !== 0) { context.vehicle = "renegade"; context.pageName = "renegade-life/x-ambassador"; context.pageType = "lifestyle"; context.year = "2015" } if (context.ccode === "CUJ201503WKJX74A") { $.mobile.activePage.find(".vehicleInfo .hwyMPG span:first-child").html("0-60 MPH"); $.mobile.activePage.find(".vehicleInfo .hwyMPG span.value").html("4.8"); $.mobile.activePage.find(".vehicleInfo .hwyMPG span:last-child").html("seconds ") } $('a[data-lid="75th:download-75th-ebrochure"]').off("click").on("click", function(d) { d.preventDefault(); window.location.href = "/assets/pdf/eBrochure_Jeep_75_Anniversary.pdf" }) }); $(document).off("pageshow", ".vehicle_cherokee_gallery").on("pageshow", ".vehicle_cherokee_gallery", function(b) { var a = mGlobalConfig.vehicleGallery.royalSlider; $(".vehicleGalleryCarousel").royalSlider(a); setTimeout(function() { $(".vehicleGalleryCarousel").royalSlider("updateSliderSize", true) }, 10) }); $(document).ready(function() { mGlobal.updateDisclaimers.init() }); /*! chrysler-mobile - v0.1.0 - 2014-03-03, 1:27 PM EST */ $(document).on("pageinit", function() { if (MpElDs = { "es.jeep.com": "es", "www.jeep.com": "en", "test.jeep.com": "en", "es-m.jeep.com": "es", "m.jeep.com": "en", "test-m.jeep.com": "en", "uat-m.jeep.com": "en" }, !new RegExp("MP_LANG=" + MpElDs[location.host]).test(document.cookie)) { MpElD = "//es.jeep.com", MpElD = -1 != location.host.toString().indexOf("m.jeep") ? "//es-m.jeep.com" : "//es.jeep.com", MpL = navigator.browserLanguage, MpL || (MpL = navigator.language); var a = document.createElement("script"); a.type = "text/javascript", a.src = MpElD + "/mpel.js?href=" + encodeURIComponent(location.href) + "&ref=" + encodeURIComponent(document.referrer) + "&lang=" + MpL; var b = document.getElementsByTagName("script")[0]; b.parentNode.insertBefore(a, b) } }); /*jeep buzz include*/ $(document).off("pageshow", ".page-buzzmodels").on("pageshow", ".page-buzzmodels", function(f) { try { context.vehicle = ""; context.currentDrive = ""; mobile.updateVehContext(); mGlobal.common.setContextByURL(); mGlobalConfig.appURLs.sni.lid = "available_near_you"; mGlobal.ctaUpdate.inventoryCount($(f.target).find(":jqmData(component='inventoryCount')")); var j = $(".domestic_component .searchInventory-cta-button").parent(); $(".domestic_component .bmo-cta").parent().insertAfter(j); mGlobal.ctaUpdate.bmo($(f.target).find(":jqmData(component='ctaBMO')")); mGlobal.viewFeaturedOffers.init($(f.target).find(":jqmData(component='viewFeaturedOffers')")); var k = $(f.target).find(":jqmData(component='vehicleInfo')"); $(".view-model-list").hide(); mGlobal.ctaUpdate.backTo($(f.target).find(":jqmData(component='ctaBack')")); $(".buzzmodels-spec-cta").attr({ href: "/kr/mobile/models/?year=" + context.year + "&vehicle=" + context.vehicle + "&model=" + context.model, "data-lpos": context.year + "_" + context.vehicle + "_" + context.model + "_content_mobile", "data-lid": "specs" }); $(".buzzModel > .bmo-cta").find(".ui-btn-text").text("Build & Price"); $(".domestic_component .bmo-cta").insertAfter(".domestic_component .searchInventory-cta-button"); var c = mGlobalConfig.colorizrGalleryModule; $(f.target).find(":jqmData(component='galleryModule')").colorizrGalleryModule(c); $(".galleryModule").royalSlider("updateSliderSize", true); var i = $(f.target).find(":jqmData(component='featureModelsTabModule')"); if (i.length) { mGlobal.featureModelsTabModule.init(i); var d = $(f.target).find(":jqmData(component='additionalFeatures')"); mGlobal.additionalFeatures.init(mGlobalConfig, d); d.find(".featureList li a").has("img").parent().addClass("hasImg"); var a = $(".ui-navbar ul.ui-grid-a li"); a.find('[data-tab="models"]').hide(); a.find('[data-tab="features"]').parent().css({ width: "100%" }) } var h = { specialEdition: context.specialEditionPage }; mGlobal.vehicleInfo.init(h, k); $.mobile.activePage.find("#menuPanel a[href='/kr/mobile/model-compare/']").attr("href", "/kr/mobile/model-compare/?year=" + context.year + "&vehicle=" + context.vehicle); jQuery(".newSlider").royalSlider({ loop: true, autoScaleSliderWidth: 640, autoScaleSliderHeight: 120, navigateByClick: false, navigateByCenterClick: false }); var b = $(".newSlider").data("royalSlider"); context.prevPage = $.mobile.activePage.data("url"); $.cookie("PrevPage", context.prevPage, { expires: 365, path: "/" }) } catch (g) { console.log("buzzModels: " + g) } }); /* mGlobal.common.min.js */ var context = context || { brand: Vehicles.getBrand(), brandDivision: Vehicles.getDivision(), ccode: "", ccode_i: "", llp: "", model: "", myc: "", myc_i: "", trim: "", vehicle: "", year: mGlobalConfig.year, zip: "", pageType: "", pageName: "", searchList: true, searchEvents: false, prevPage: "", specialEditionPage: false, thumbID: null, activeTab: "exterior", activeGalleryTab: null, activeGalleryTabIndex: null, switchPos: "slide_view" }; var mGlobal = mGlobal || {}; mGlobal.nameCleaner = function(b) { if (typeof b == "undefined") { return "nameCleaner_undefined_paramter" } else { b = unescape(b).toString(); return b.replace(/[^a-zA-Z0-9,\s,+,\-,_,\/,|]/g, "").replace(/-/g, "_").replace(/[\s+]/g, "_").replace(/[__]+/g, "_").replace(/_$/g, "").replace("ñ", "n").toLowerCase() } }; mGlobal.common = mGlobal.common || {}; mGlobal.common = (function(g) { function p(M) { var P = g.cookie("CT_Akamai"), N = []; if (P) { N = P.split(",") } for (var L = 0; L < N.length; L++) { var O = N[L].split("="); if (O[0] == M && O[1]) { return O[1] } } return false } function j() { if (!g.cookie("zipcode") && p("network_type") != "mobile") { var L = p("zip"); if (L && L.length >= 5) { g.cookie("zipcode", L.substr(0, 5), { expires: 365, path: "/" }) } } } var z = { $chooseVehicle: ".chooseVehicleWrap", $vehicleInfo: ".vehicleInfo", $vehicleCta: ".vehicleCta", $shoppingTools: ".shopping-tools", $uiBtn: ".ui-btn", $uiBtnGroup: ".buttonGroup .ui-btn", $footerDisclaimers: "#footerDisclaimers", $dataSource: ".dataSource", $menu: "nav", $searchResult: "ul#siteSearch.ui-listview", $externalLink: "a[data-external-url]", $menuPanelLink: "#menuPanel a", $leaveSiteAlert: "#leaveSiteAlert .continue", $fullSite: "a.full-site-link", $searchIcon: ".icon-search", $footerNav: ".footerNav" }, o, k; function F(L) { if (mGlobalConfig.market !== "en_US") { g(".domestic_component").hide() } J(L); l(); C(L); x(L); h(); if (g("a[data-lid='apply_for_credit']").length > 0) { a() } } function u() { d() } function a() { var L; if (g.cookie("zipcode")) { L = g("a[data-lid='apply_for_credit']").attr("data-external-url").replace("{Customer_Zip_Code}", g.cookie("zipcode")) } else { L = g("a[data-lid='apply_for_credit']").attr("data-external-url").replace("{Customer_Zip_Code}", false) } g("a[data-lid='apply_for_credit']").attr("data-external-url", L) } function l() { var M = g.mobile.activePage; g(window).on("throttledresize", function() { A() }); var L = g("header").find(".icon-nav"); g("nav").one("panelbeforeopen", function(N, O) { g("nav").on("swipeleft swiperight", function(P) { g(".ui-panel-position-left").panel({ animate: false }).panel("close"); g("header").find(".icon-close").removeClass("icon-close") }) }); g(document).one("pageshow", function(N) { g(".ui-page-active").find("nav").find('li[data-role="collapsible"]').find("h3").on("click", function() { if (g(this).closest(".ui-page").hasClass("ui-page-active")) { var Q = g(this).hasClass("ui-collapsible-heading-collapsed"); var O = Q ? "collapse" : "expand"; var P = g(this).parent().attr("data-lid") + "_" + O; /*DATALAYER.linkTrack(this,{lpos:"menu_global_header_mobile",lid:P})*/ } }) }); g(document).on("pageshow", function(S) { g("nav").off("panelopen").on("panelopen", function() { g("ul.siteSearch.ui-listview").html(""); g("a.seeMatches").hide(); L.addClass("icon-close"); /*DATALAYER.linkTrack(this,{lpos:"global_header_mobile",lid:g(this).data("lid")+"_open",vars:{eVar75:g(this).data("lid")+"_open"}});*/ setMenuHeight(); var U = g(document).scrollTop(); g(this).find(".ui-panel-inner").scrollTop(0); g(".ui-page-active").find(".ui-panel-content-wrap-open").css("overflow", "hidden"); g(".ui-page-active").find(".ui-panel-content-wrap-open").height(g(window).height() - g(".ui-page-active header").height()); g(".ui-page-active").find(".ui-panel-content-wrap-open").scrollTop(U) }).off("panelclose").on("panelclose", function(V) { g("ul.siteSearch.ui-listview").html(""); g("a.seeMatches").hide(); L.removeClass("icon-close"); /*if(g.mobile.activePage.find(V.target).length&&g(this).data("forceClose")!==true){DATALAYER.linkTrack(this,{lpos:"global_header_mobile",lid:g(this).data("lid")+"_close",vars:{eVar75:g(this).data("lid")+"_close"}})}g(this).data("forceClose",false);*/ var U = g(".ui-panel-content-wrap-closed").scrollTop(); g(".ui-page-active").find(".ui-panel-content-wrap-closed").height("auto"); g(".ui-page-active").find(".ui-panel-content-wrap-closed").css("overflow", "auto"); g(document).scrollTop(U) }); var Q = "locate_panel_mobile"; if (g.mobile.activePage.hasClass("page-home")) { Q = Q + "_bhp" } else { if (g.mobile.activePage.hasClass("page-vlp")) { Q = Q + "_vlp" } else { if (g.mobile.activePage.hasClass("shoppingTools")) {} } } var N = false; g("section#locatePanel").off("panelopen").on("panelopen", function() { g(".ui-header .icon-map").addClass("icon-close"); mGlobal.locatePanel.init(); /*DATALAYER.linkTrack(this,{lpos:"global_header_mobile",lid:"locate_expand",vars:{eVar75:"locate_expand"}});*/ N = true }); g("section#locatePanel").off("panelclose").on("panelclose", function(U) { g(".ui-header .icon-map").removeClass("icon-close"); /*if(N){DATALAYER.linkTrack(this,{lpos:"global_header_mobile",lid:"locate_collapse",vars:{eVar75:"locate_collapse"}})}*/ }); var O = (window.location.pathname.indexOf("/kr/mobile/models/") > -1) ? "/kr/moble/vehicles/" + context.year + "/" + context.vehicle + "/" + context.model : window.location.pathname + window.location.search; var T = true; var P = []; if (O.substr(O.length - 10, O.length) === "index.html") { O = O.slice(0, -10) } else { if (O.substr(O.length - 10, O.length) === "home.html") { O = O.slice(0, -9) } else { if (O.match("/vehicles/")) { P = O.split("/") } } } var R = g(g(S)[0].target).find("nav"); R.find("li[data-role=collapsible]").each(function() { g(this).trigger("collapse") }); R.find("a").each(function() { var U = g(this).attr("href"), V = U.split("/"); if (U.substr(U.length - 10, U.length) === "index.html") { U = U.slice(0, -10) } else { if (U.substr(U.length - 10, U.length) === "home.html") { U = U.slice(0, -9) } } if ((P.length >= 5 && V.length >= 5 && P[3] === "vehicles" && P[3] === V[3] && P[4] === V[4] && P[5] === V[5] && P[6] === V[6]) || (U === O && U !== "" && U !== "#")) { g(this).addClass("active").closest("li").addClass("active-link"); if (g(this).parent().hasClass("ui-btn-text")) { g(this).closest("li").closest("li").trigger("expand"); T = false } } }); R.off("click").on("click", 'a[data-lid="special_editions"]', function(U) { g.cookie("yearSelected", "Special Edition") }); if (T) { g(R.find("li[data-lid=vehicles]")).trigger("expand") } }) } function c(L) { w(); g(".main-nav").on("tap, click", " a.active", function() { g(".ui-panel-position-left").data("forceClose", true).panel("close") }); g(window).on("orientationchange", function(M) { setMenuHeight(); if (M.orientation === "landscape") { g(".ui-header").hide(); g(".ui-panel-fixed").hide(); setTimeout(function() { g(".ui-header").show(); g(".ui-panel-fixed").show() }, 300) } }); q(); g(document).off("change").on("change", "#select-ltd-vehicle", function(N, P) { var M = g("#select-ltd-vehicle option:selected").data("sort"); var O = g("#select-ltd-vehicle option:selected").data("lid"); g.mobile.loading("show"); if (M == "all") { g(this).parents("section.chooseVehicle").find(".chooseVehicleItem").show() } else { g(this).parents("section.chooseVehicle").find(".chooseVehicleItem").hide(); g(this).parents("section.chooseVehicle").find(".chooseVehicleItem[data-myc=" + M + "]").show() } g.mobile.loading("hide") }); g(document).off("click.stdEdition").on("click.stdEdition", ".toggleSelector ul.chooseVehicleNav li.stdEdition a", function(M) { M.preventDefault(); mGlobalConfig.isJeepLimitedEdition = false; n(M, "standard_models") }); g(document).off("click.ltdEdition").on("click.ltdEdition", ".toggleSelector ul.chooseVehicleNav li.ltdEdition a", function(M) { M.preventDefault(); mGlobalConfig.isJeepLimitedEdition = true; n(M, "limited_editions") }) } function n(N, M) { g.mobile.loading("show"); var L = mGlobalConfig.chooseVehicle; L.pageName = g.mobile.activePage.attr("data-page"), k = g(N.target).find(":jqmData(component='chooseVehicle')"); g(N.target).newVehicleSelector(L, k); g.mobile.loading("hide") } function A() { var L = window.innerHeight - 1; g(".main-nav").css("max-height", L + "px") } function y() { if (event.orientation === "landscape") { g(".ui-header").hide(); g(".ui-panel-fixed").hide(); setTimeout(function() { g(".ui-header").show(); g(".ui-panel-fixed").show() }, 300) } } function w() { g(document).on("touchstart", "a", function() { g(this).addClass("touchActive") }); g(document).on("touchmove touchend touchcancel", "a", function() { g(this).removeClass("touchActive") }) } function d() {} function x(L) { g("footer").off("click").on("click", L.$footerDisclaimers, function() { g("footer .disclaimer-text").toggle() }) } function C(L) { g(L.$chooseVehicle + "," + L.$vehicleInfo + "," + L.$vehicleCta).off("click").on("click", L.$uiBtnGroup, function(W) { var P = g(this), Q = P.find("button").attr("data-app"), T = "", Y = P.parents(L.$dataSource), R = g(Y).attr("data-myc") || context.myc, V = g(Y).attr("data-ccode") || context.ccode, M = g(Y).attr("data-llp") || context.llp, Z = "", O = 0, N = context; if (P.find("button").attr("data-context")) { N = JSON.parse(P.find("button").attr("data-context")) } modelName = g(Y).find(".modelName").text().split(" ").slice(1), modelNameLpos = context.year + "_" + modelName, lpos = decodeURI(encodeURI(modelNameLpos.toLowerCase()).replace("%C2%AE", "")).replace(/[^a-zA-Z0-9_-]/g, "_"), lid = "", chooseVehicleDrive = g(".chooseVehicleNav .active:visible").text(); if (context.model) { if (context.myc === "CUX201501" || context.myc === "CUX201502" || context.myc === "CUX201504" || context.myc === "CUX201505" || context.myc === "CUX201405" || context.myc === "CUC201501" || context.myc === "CUC201401") { lpos = lpos.replace(/(_)\d+\w/ig, "") } lpos += "_" + context.model } if (g.mobile.activePage.data("page") === "home") { if (Q === "bmo") { lpos = context.year + "_" + Vehicles.getFamilyFromMYC(R) } } if (g.mobile.activePage.data("page") === "buzzmodels") { if (Q === "back") { lpos = "content" } } if (g.mobile.activePage.data("page") === "vlp") { if (chooseVehicleDrive.length) { lpos += "_" + chooseVehicleDrive } } if (g.mobile.activePage.data("page") === "model") { if (mGlobalConfig.appURLs[Q] === "offers") { lpos += "_content_mobile" } } if (g.mobile.activePage.data("page") === "model-compare") { if (Q === "sni") { lpos = context.year + "_" + context.vehicle } } if (g(this).attr("data-lid")) { lid = g(this).attr("data-lid"); lpos = g(this).attr("data-lpos") } if (R) { context.vehicle = Vehicles.getFamilyFromMYC(R) } if (V) { context.trim = Vehicles.getTrimFromCcode(V); context.model = Vehicles.getModelFromCcode(V); context.ccode = V; context.ccode_i = V.replace(/\bCU/, "IU") } if (mGlobalConfig.appURLs[Q]) { O = mGlobalConfig.appURLs[Q].isApp; T = mGlobalConfig.appURLs[Q].appID; Q = mGlobalConfig.appURLs[Q]; lid = Q.lid; if (g.mobile.activePage.data("page") === "model-compare" && Q.targetLocation && Q.targetLocation.indexOf("sni") !== -1) { lid = "models_" + Q.lid } if (Q.check_ccode && V) { Z = Q.targetLocation_ccode.replace(" + ccode + ", V).replace(" + llp + ", M); lpos += "_" + context.model } else { if (Q.check_myc && R) { Z = Q.targetLocation_myc.replace(" + myc + ", R) } } if (O) { mGlobal.app.bridge(T, N, false) } else { if (Q.external) { window.location = Z } else { if (Q.year && Q.vehicle) { context.trim = ""; context.ccode = ""; g.mobile.changePage(Q.targetLocation + context.year + "/" + context.vehicle.replace(/_/g, "-") + "/") } else { var S = "?year=" + context.year + "&vehicle=" + context.vehicle + "&model=" + context.model; (context.ccode) ? g.mobile.changePage(Q.targetLocation + S): g.mobile.changePage(Q.targetLocation) } } } } else { var U = P.find("button"), X = U.attr("data-url"); context.vehicle = U.parents(".buttonGroup").attr("data-vehicle"); lid = P.find(".ui-btn-text").text().toLowerCase().replace(/ /g, "_"); if (X !== undefined) { g.mobile.changePage(X) } } if (lpos.match("_&_") !== null) { lpos = lpos.replace("_&_", "_") } if (lid.indexOf("build_my_own") > -1 || lid.indexOf("build_your") > -1 || lid.indexOf("_vehicles_near_you") > -1 || lid.indexOf("models_near_you") > -1 || lid.indexOf("available_near_you") > -1 || lid.indexOf("build_price") > -1 || lid.indexOf("build_&_price") > -1) { if (context.brand === "chrysler") { if (context.myc === "CUC201508" || context.myc === "CUC201408") { lpos = (context.model === "") ? context.year + "_" + context.vehicle : context.year + "_" + context.brand } else { if (context.myc === "CUC201509" || context.myc === "CUC201409") { lpos = context.year + "_" + context.brand + "_" + context.vehicle } else { lpos = (context.model === "") ? context.year + "_" + context.brand + "_" + context.vehicle : context.year + "_" + context.brand } } } else { if (context.brand === "dodge") { lpos = (context.year === "2015") ? context.year : context.year + "_" + context.vehicle } else { if (context.brand === "ramtrucks" || context.brand === "fiat") { lpos = (context.model === "") ? context.year + "_" + context.vehicle : context.year } else { if (context.brand === "jeep") { if (context.myc === "CUJ201509" || context.ccode === "CUJ201506JKJL72G" || context.ccode === "CUJ201506JKJP72F" || context.ccode === "CUJ201507JKJM74F" || context.ccode === "CUJ201507JKJP74G" || context.ccode === "CUJ201505MKJM74C" || context.ccode === "CUJ201502MKJM49C") { lpos = context.year } else { lpos = context.year + "_" + context.vehicle } } else { lpos = context.year + "_" + context.vehicle } } } } if (context.model) { if (context.myc === "CUX201501" || context.myc === "CUX201401" || context.myc === "CUX201502" || context.myc === "CUX201402" || context.myc === "CUX201504" || context.myc === "CUX201404" || context.myc === "CUX201505" || context.myc === "CUX201405" || context.myc === "CUC201501" || context.myc === "CUC201401") { lpos = lpos.replace(/(_)\d+\w/ig, "") } lpos += "_" + context.model } } if (g(this).parents(".featureModelsTabModule").find(".ui-btn-active").data("tab") === "features") { lpos += "_features" } else { if (g(this).parents(".featureModelsTabModule").find(".ui-btn-active").data("tab") === "models") { lpos += "_models" } else { if (!!g(this).parents(".view-featured-offers").length) { lpos = "content" } else { if (!!g(this).parents("div.vehicleCta").prevAll("div.specModuleWrap").length) { lpos = "content" } else { if (lid === "build_my_own" || lid === "models_available_near_you") { if (!g.mobile.activePage.is(".page-home") && !g.mobile.activePage.is(".page-selector")) { lpos += "_content" } if (context.myc === "CUJ201602") { lpos = "content" } } else { if (!!g(this).parents(".competitive-compare").length) { lpos += "_content" } } } } } } if (context.pageName.indexOf("jfc") > -1) { lpos = "2015_renegade_content"; if (lid === "build_my_own") { lid = "build_your_renegade" } } W.stopPropagation(); if (!g(this).hasClass("explore_cta")) /*{DATALAYER.linkTrack(this,{lpos:lpos+"_mobile",lid:lid})}*/ context.trim = ""; context.model = "" }); g(".chooseVehicleWrap .chooseVehicleItem h3").off("click").on("click", function(Q) { var O = g(this).parent("a").attr("href"), T = O.split("/"), U = T[0], N = T[1], P = T[2], S = T[3], R = T[4], M = T[5]; /*DATALAYER.linkTrack(this,{lpos:"choose_vehicle_mobile",lid:R+"_"+context.brand+"_"+M+"_text"})*/ }); g(".chooseVehicleWrap .chooseVehicleItem a.ui-link img").off("click").on("click", function(Q) { var O = g(this).parent().attr("href"), T = O.split("/"), U = T[0], N = T[1], P = T[2], S = T[3], R = T[4], M = T[5]; /*DATALAYER.linkTrack(this,{lpos:"choose_vehicle_mobile",lid:R+"_"+context.brand+"_"+M+"_image"})*/ }); g('.chooseVehicleWrap .chooseVehicleItem a[data-role="button"]').off("click").on("click", function(Q) { var O = g(this).parent().parent().find("a").attr("href"), T = O.split("/"), U = T[0], N = T[1], P = T[2], S = T[3], R = T[4], M = T[5]; /*DATALAYER.linkTrack(this,{lpos:R+"_"+M+"_mobile",lid:"explore"})*/ }) } function h() { g("nav").on("tap", 'a[data-lid="build_and_price"]', function(O) { var P = mGlobalConfig.appURLs.bmo, M, N, L; if (P.checkForSpecialEditions && context.specialEditionPage) { M = context.myc } else { if (context.vehicle) { M = Vehicles.getModelYearCode(context) } } if (context.model) { N = Vehicles.getCcode(context); L = Vehicles.getLLP(context); O.preventDefault(); window.location = P.targetLocation_ccode.replace(" + ccode + ", N).replace(" + llp + ", L) } else { if (M) { O.preventDefault(); window.location = P.targetLocation_myc.replace(" + myc + ", M) } } }) } function J(L) { g(L.$searchResult).on("click", "a", function() { var N = g(this).attr("data-lid"), M = g(this).attr("data-lpos"); /*DATALAYER.linkTrack(this,{lpos:M+"_mobile",lid:N})*/ }); g(document).on("click", L.$externalLink, function(N) { if (N.handled !== true) { var M = g(this).attr("data-external-url"); g(L.$leaveSiteAlert).attr("href", M); N.handled = true } }); g(document).on("click", L.$menuPanelLink, function(O) { var M; var N = ["/kr/mobile/apps/gaq.html", "/kr/mobile/webselfservice/index.html"]; if (O.handled !== true) { if (N.indexOf(g(this).attr("href")) > -1) { if (location.protocol === "http:") { M = g(this).prop("href").replace("http://", "https://"); g(this).prop("href", M); g(this).data("ajax", false) } } else { if (location.protocol === "https:") { M = g(this).prop("href").replace("https://", "http://"); g(this).prop("href", M); g(this).data("ajax", false) } } O.handled = true } }); g(document).on("click", L.$leaveSiteAlert, function(N) { if (N.handled !== true) { var M = g(this).attr("href"); window.open(M); N.handled = true } }); /*g(document).on("click",L.$fullSite,function(M){if(M.handled!==true){g(this).attr("href",document.location.protocol+"//"+document.location.hostname.replace(/.*m\./,"www.")+"/bridge/mobile.html");M.handled=true}})*/ } function q() { g(document).on("pageshow", g.mobile.activePage, function() { var S = g.mobile.activePage, R = S.find("h2.page-title").parent().data("app"), Q = S.data("role"), N = S.data("page"), O = S.data("url"), P = S.data("donottrack"); if (O.indexOf("/kr/mobile/model-compare/") > -1 || S.attr("data-page") === "buzzmodels") { P = 1 } g(".ui-footer .disclaimer-text").css("display", "none"); if (R !== "paymentCalculator") { mGlobal.updateDisclaimers.init() } if (!P) { var L = mGlobalConfig.trackSeparately; if (L && L.inContextApp && L.inContextApp.length) { for (i = L.inContextApp.length - 1; i >= 0; i--) { if (R === L.inContextApp[i]) { P = true } } } if (L && L.inDataPage && L.inDataPage.length && !P) { for (i = L.inDataPage.length - 1; i >= 0; i--) { if (N === L.inDataPage[i]) { P = true } } } if (L && L.inDataURL && L.inDataURL.length) { for (i = L.inDataURL.length - 1; i >= 0; i--) { if (O === L.inDataURL[i]) { P = true } } } if (!P) { mobile.tracking.pageTrack() } } var M = /vlp/.test(S.attr("data-page")); if (!M) { g(".page-vlp").remove() } mGlobal.siteSearch.init(); LazyLoader.init() }); g(document).on("pagebeforechange", function(M, N) { var L = N.options; if (g(".ui-page-active").data("page") === "home") { context.vehicle = "" } if (L.changeHash !== false && L.role !== "popup") { context.section = ""; context.subsection = "" } if (L.reverse === true) { if (L.fromPage && L.fromPage.attr("data-page") !== L.pageContainer.prevObject.attr("data-page")) { context.section = ""; context.subsection = "" } } g(".ui-page-active").find(".ui-panel-content-wrap").height("auto"); g(".ui-page-active").find(".ui-panel-content-wrap").css("overflow", "auto"); g("header").find(".icon-nav").removeClass("icon-close") }); g(document).off("pageshow", "div:not(.page-vlp, .page-vlp-fullscreen, .page-buzzmodels)").on("pageshow", "div:not(.page-vlp, .page-vlp-fullscreen, .page-buzzmodels)", function(L) { context.gallery = ""; if (typeof(context.year) !== "undefined" && typeof(context.vehicle) !== "undefined" && context.year !== "" && context.vehicle !== "") { var M = "/kr/mobile/model-compare/?year=" + context.year + "&vehicle=" + context.vehicle; g.mobile.activePage.find("#menuPanel a[href='/kr/mobile/model-compare/']").attr("href", M) } }); g(document).on("pageshow", ".page-home", function(P) { mGlobal.common.setContextByURL(); mGlobalConfig.isJeepLimitedEdition = false; var Q = g.mobile.activePage.find(".sunset"); if (Q.length) { Q.on("click", ".viewinventory_button", function(R) { R.preventDefault(); var S = g(this).data("vehicle"); g.mobile.changePage(g(this).attr("href"), { data: "vehicle=" + S }) }) } var L = mGlobalConfig.heroCarousel, O = g(P.target).find(":jqmData(component='heroCarousel')"); setTimeout(function() { O.royalSlider(L); var T = O.data("royalSlider"); if (T) { var S = "", R = ""; if (T.numSlides === 1) { g(".rsBullets").hide() } T.ev.off("rsAfterContentSet").on("rsAfterContentSet", function(Z, aa) { var Y = jQuery(".rsContainer .rsSlide"); for (var W = 0; W < Y.length; W++) { var X = g(Y).eq(W).find("img").attr("src"); var U = g(Y).eq(W).find("a"); var V = g(Y).eq(W).find(".rsPlayBtn"); if (!!X) { X = X.replace(/.*\/([\w-_\.]+)/i, "$1"); X = X.replace("_", "-").split(".")[0]; if (U.size()) { g(U).attr("data-lpos", "hero-banner"); g(U).attr("data-lid", X) } if (V.size()) { g(V).attr("data-lpos", "hero-banner"); g(V).attr("data-lid", X) } } } if (aa.content.find("a.altTooltip").length) { mGlobal.updateDisclaimers.init() } }); T.ev.off("rsAfterSlideChange").on("rsAfterSlideChange", function(V, U) { var W = ""; if (T.dragSuccess !== true) { W = "banner_" + (T.currSlideId + 1) } else { W = "swipe_banner_" + (T.currSlideId + 1) } /*DATALAYER.linkTrack(this,{lpos:"hero_carousel_mobile",lid:W,vars:{eVar68:"swipe",eVar75:W},mediaEvents:[{name:"event113",value:DATALAYER.getMediaEvent("brand")},{name:"event143",value:DATALAYER.getMediaEvent("vehicle")}],events:"event31"})*/ }) } /*T.ev.on("rsVideoPlay",function(){DATALAYER.linkTrack(this,{lpos:"hero_carousel_mobile",lid:"video_"+(T.currSlideId+1)+"_play"})});T.ev.on("rsVideoStop",function(){DATALAYER.linkTrack(this,{lpos:"hero_carousel_mobile",lid:"video_"+(T.currSlideId+1)+"_close"})});*/ T.ev.on("rsSlideClick", function(W, U) { var V = g(W.target.currSlide.holder).find(".rsVideoContainer").length; var X = g(W.target.currSlide.holder).find(".ui-link[href]").length; if (!V && X) {} }) }, 10); g(".heroSlider").royalSlider("updateSliderSize", true); var M = mGlobalConfig.chooseVehicle; M.pageName = g.mobile.activePage.attr("data-page"), k = g(P.target).find(":jqmData(component='chooseVehicle')"); g(".chooseVehicle").newVehicleSelector(M, k); context.specialEditionPage = false; var N = g(P.target).find(":jqmData(component='featureModelsTabModule')"); if (N.length) { mGlobal.featureModelsTabModule.init(N) } mobile.tracking.pageTrack() }); g(document).on("pagehide", ".page-vlp, .page-home, .page-buzzmodels", function(L) { g(L.target).remove() }); g(document).on("pageshow", ".page-vlp", function(R) { Vehicles.inventory = 0; try { context.vehicle = ""; context.currentDrive = ""; context.specialEditionPage = false; mobile.updateVehContext(); mGlobal.common.setContextByURL(); mGlobalConfig.appURLs.sni.lid = "available_near_you"; mGlobal.ctaUpdate.bmo(g(R.target).find(":jqmData(component='ctaBMO')")); mGlobal.viewFeaturedOffers.init(g(R.target).find(":jqmData(component='viewFeaturedOffers')")); mGlobal.ctaUpdate.yearToggle(g(R.target).find(":jqmData(component='yearToggle')")); var V = g(R.target).find(":jqmData(component='vehicleInfo')"); var N = V.hasClass("specialEdition"); if (N) { context.specialEditionPage = true } var M = mGlobalConfig.colorizrGalleryModule; g(R.target).find(":jqmData(component='galleryModule')").colorizrGalleryModule(M); g(".galleryModule").royalSlider("updateSliderSize", true); var U = g(R.target).find(":jqmData(component='featureModelsTabModule')"); if (U.length) { mGlobal.featureModelsTabModule.init(U); var O = g(R.target).find(":jqmData(component='additionalFeatures')"); mGlobal.additionalFeatures.init(mGlobalConfig, O); O.find(".featureList li a").has("img").parent().addClass("hasImg") } var T = { specialEdition: context.specialEditionPage }; mGlobal.vehicleInfo.init(T, V); g.mobile.activePage.find("#menuPanel a[href='/kr/mobile/model-compare/']").attr("href", "/kr/mobile/model-compare/?year=" + context.year + "&vehicle=" + context.vehicle); jQuery(".newSlider").royalSlider({ loop: true, autoScaleSliderWidth: 640, autoScaleSliderHeight: 120, navigateByClick: false, navigateByCenterClick: false }); var L = g(".newSlider").data("royalSlider"); if (L) { var Q = "", P = ""; if (L.numSlides <= 1) { g(".rsBullets").hide().css("display", "none") } L.ev.off("rsBeforeMove").on("rsBeforeMove", function(X, W) { if (!isNaN(W)) { Q = "award_" + W; P = "content_mobile" } else { Q = "swipe_" + W; P = "content_mobile" } /*DATALAYER.linkTrack(this,{lpos:P,lid:Q,vars:{eVar68:"swipe",eVar75:Q},events:"event31"})*/ }) } context.prevPage = g.mobile.activePage.data("url"); g.cookie("PrevPage", context.prevPage, { expires: 365, path: "/" }) } catch (S) { console.log("vlp: " + S) } }); g(document).off("pageshow", ".page-selector").on("pageshow", ".page-selector", function(M) { context.vehicle = ""; context.year = ""; mGlobal.common.setContextByURL(); if (mobile.getParameterByName("models") === "limitedEdition" && context.brand === "jeep") { mGlobalConfig.isJeepLimitedEdition = true } else { mGlobalConfig.isJeepLimitedEdition = false } var L = mGlobalConfig.chooseVehicle; L.pageName = g.mobile.activePage.attr("data-page"), k = g(M.target).find(":jqmData(component='chooseVehicle')"); g(".chooseVehicle").newVehicleSelector(L, k); context.pageType = "vehicles"; switch (K("app")) { case "bmo": context.pageName = "build-my-own:vehicle-selector"; context.pageType = "shopping-tools"; break; case "incentives": context.pageName = "offers-incentives:vehicle-selector"; context.pageType = "shopping-tools"; break; case "compare": context.pageName = "model-compare:vehicle-selector"; context.pageType = "shopping-tools"; break; case "sni": context.pageName = "search-new-inventory:vehicle-selector"; context.pageType = "shopping-tools"; break; case "pe": context.pageName = "payment-calculator:vehicle-selector"; context.pageType = "shopping-tools"; break } mobile.tracking.pageTrack() }); g(document).off("pageshow", ".page-model").on("pageshow", ".page-model", function(N) { var M = location.search.split("&")[1].replace("vehicle=", ""); var L = location.search.split("&")[2].replace("model=", ""); if (mGlobalConfig.sundownRedirectURLList !== undefined && mGlobalConfig.sundownRedirectURLList[location.search] !== undefined) { window.location = mGlobalConfig.sundownRedirectURLList[location.search]; return false } else { if (mGlobalConfig.sundownRedirectURLList !== undefined && location.search.indexOf("?year=2014") === 0 && (mGlobalConfig.sundownRedirectURLList[M] || mGlobalConfig.sundownRedirectURLList[L])) { window.location.search = location.search.replace("year=2014", "year=2015"); return false } } mGlobal.common.setContextByURL(); mGlobalConfig.appURLs.sni.lid = "models_available_near_you"; LazyLoader.requires([{ src: "/crossbrand/kr/mobile/javascript/components/mGlobal.colorizer.js" }, { src: "/crossbrand/kr/mobile/javascript/components/mGlobal.modelCompare.js" }, { src: "/crossbrand/kr/mobile/javascript/components/mGlobal.specsModule.js" }], function() { mGlobal.locationServicesModule.init(); g(N.target).find(":jqmData(component='colorizer')").colorizer(mGlobalConfig.colorizer); var P = {}, O = g(N.target).find(":jqmData(component='vehicleInfo')"); mGlobal.vehicleInfo.init(P, O); var Q = g(N.target).find(":jqmData(component='additionalFeatures')"); mGlobal.additionalFeatures.init(mGlobalConfig, Q); g(".ui-page-active .featureList li a").has("img").parent().addClass("hasImg"); context.prevPage = g.mobile.activePage.data("url"); g(N.target).find(".specModuleWrap").specs(mGlobalConfig.specs) }); if (mGlobalConfig.market === "en_US") { mGlobal.ctaUpdate.inventoryCount(g(N.target).find(":jqmData(component='inventoryCount')")) } mGlobal.ctaUpdate.bmo(g(N.target).find(":jqmData(component='ctaBMO')")); mGlobal.ctaUpdate.backTo(g(N.target).find(":jqmData(component='ctaBack')")); mGlobal.viewFeaturedOffers.init(g(N.target).find(":jqmData(component='viewFeaturedOffers')")); mGlobal.viewModelList.init(g(N.target).find(":jqmData(component='viewModelList')")) }); g(document).off("pageshow", ".page-contact").on("pageshow", ".page-contact", function(L) { LazyLoader.loadScript("/crossbrand/kr/mobile/javascript/components/mGlobal.contactForm.js", function() { var M = {}, N = g(L.target).find(":jqmData(component='contentForm')"); mGlobal.contactForm.init(M, N) }) }); g(document).off("pageshow", "#mobile_apps").on("pageshow", "#mobile_apps", function(L) { context.pageType = "mobile_apps" }); g(document).off("pageshow", "div[id^=mobile_apps\\/]").on("pageshow", "div[id^=mobile_apps\\/]", function(M) { var L = g(this).attr("id"); L = L.split("/"); if (L[1] === "the200app") { L[1] = "200app" } context.pageType = "mobile_apps"; context.pageName = L[1] }); g(document).off("pageshow", ".page-error").on("pageshow", ".page-error", function(L) { context.pageType = "error-page" }); g(document).off("pageshow", "div:not(.shoppingTools)").on("pageshow", "div:not(.shoppingTools)", function(L) { g.cookie("UrlReferer", "0", { expires: 365, path: "/" }) }); g(document).off("pageshow", ".shoppingTools").on("pageshow", ".shoppingTools", function(M) { var L = [{ src: "/crossbrand/kr/mobile/javascript/apps/v2/mkt_code_funcs.js" }]; context.pageType = "shopping-tools"; context.pageName = g("div[data-app]:last").data("app") === null ? "" : g("div[data-app]:last").data("app"); if (context.pageName == "searchInventory") { L.push({ src: "/assets/data/vehicles/inventory.js" }); g.mobile.ajaxEnabled = false } else { Vehicles.inventory = 0 } if (mobile.getParameterByName("year") !== undefined) { context.year = mobile.getParameterByName("year") } if (mobile.getParameterByName("vehicle") !== undefined) { context.vehicle = mobile.getParameterByName("vehicle") } if (mobile.getParameterByName("model") !== undefined) { context.model = mobile.getParameterByName("model") } if (g.mobile.activePage.data().url.indexOf("get_connected/thankyou.html") > -1) { context.pageName = "sign-up-for-updates:complete" } switch (context.pageName) { case "modelCompare": context.pageName = "model-compare"; break; case "searchInventory": context.pageName = "search-new-inventory:get-started"; if (context.year && context.vehicle && g.cookie("zipcode")) { window.preventTrack = true; context.pageName = "search-new-inventory" } break; case "dealerLocator": context.pageName = "dealer-locator:get-started"; if (g.cookie("zipcode") !== null) { window.preventTrack = true; context.pageName = "dealer-locator" } break; case "dealerInventory": context.pageName = "dealer-locator:dealer-inventory"; window.preventTrack = true; break; case "paymentCalculator": context.pageName = "payment-calculator:get-started"; if (context.year && context.vehicle && g.cookie("zipcode")) { window.preventTrack = true; context.pageName = "payment-calculator" } break; case "advertisedOffers": context.pageName = "incentives:get-started"; if (g.cookie("zipcode") !== null) { context.pageName = "incentives" } break; case "vehicleOffers": context.pageName = "incentives"; break } if (context.brand === "dodge" && context.specialEditionPage) { context.vehicle = (context.vehicle).split("_")[0]; context.prevPage = g.mobile.activePage.data("url"); g.cookie("PrevPage", context.prevPage, { expires: 365, path: "/" }) } if (g.mobile.activePage.data("url").indexOf("model-compare") !== -1) { g.mobile.activePage.data("page", "model-compare") } LazyLoader.requires(L, function() { var P = g(this).find("#locationServicesV2").parent().data("app"); if (mobile.getParameterByName("vehicle_ids") !== undefined) { var O = (mobile.getParameterByName("vehicle_ids")).split(","); var N = ""; for (i; i < O.length; i++) { N += (i == 0) ? (O[i]).split("_").join("-") : ":" + (O[i]).split("_").join("-") } s.prop31 = N } mobile.updateVehContext(); mGlobal.locationServicesV2.init(P) }) }); g(document).off("pageshow", ".page-vlp-fullscreen").on("pageshow", ".page-vlp-fullscreen", function(O) { var N = mGlobalConfig.galleryModule, L = N.fullScreenRoyalSlider, M = "#vlp-fullscreen-items"; g.cachedScript(N.handlerbars.galleryCarouselFSTemplateUrl).done(function(P, V) { if (V === "success") { var Q = Handlebars.templates[N.handlerbars.galleryCarouselFSTemplate]; g(M).html(Q(galleryFSData)); g(".galleryModuleFS").royalSlider(L); g(".page-vlp-fullscreen").on("pageshow", function(W, X) { g(".galleryModuleFS").royalSlider("updateSliderSize", true) }); g(".galleryShowCaption").click(function() { g(this).parent().toggleClass("captionShowing") }); var U = g(".galleryModuleFS").data("royalSlider"); U.goTo(context.thumbID - 1); g(".galleryModuleWrapFS .galleryCounter").html(U.currSlideId + 1 + " of " + U.numSlides); U.ev.on("rsAfterSlideChange", function(W) { g(".galleryModuleWrapFS .galleryCounter").html(U.currSlideId + 1 + " of " + U.numSlides) }); var T, S, R = U.currSlideId + 1; g(".galleryModuleFS").find(".rsArrow, .rsNavItem").click(function() { T = true; mGlobal.updateDisclaimers.init() }); U.ev.on("rsBeforeMove", function(X, W) { S = W }); U.ev.on("rsAfterSlideChange", function(W) { if ((U.currSlideId + 1) === R) { return } if (S !== undefined) { if (!isNaN(S)) { if ((U.currSlideId + 1) > R) { S = "next" } else { S = "prev" } } /*DATALAYER.linkTrack(this,{lpos:"swipe_fullscreen_gallery_mobile",lid:"swipe_"+S,vars:{eVar68:"swipe",eVar75:"swipe_"+S},mediaEvents:[{name:"event113",value:DATALAYER.getMediaEvent("brand")},{name:"event143",value:DATALAYER.getMediaEvent("vehicle")}],events:"event31,event70"})*/ } T = false; if (isNaN(S)) { if (S === "next") { R++; trackPathOverride = "/" + context.brand + "/kr/mobile/" + context.year + "/"; if (typeof context.buzzmodel === "boolean") { if (context.buzzmodel) { trackPathOverride += "limited_editions/" } } trackPathOverride += context.vehicle + "/gallery/" + context.activeGalleryTab + "/large_" + R; setTimeout(function() { pageTrack(trackPathOverride, true) }, 1000) } else { if (S === "prev") { R--; trackPathOverride = "/" + context.brand + "/kr/mobile/" + context.year + "/"; if (typeof context.buzzmodel === "boolean") { if (context.buzzmodel) { trackPathOverride += "limited_editions/" } } trackPathOverride += context.vehicle + "/gallery/" + context.activeGalleryTab + "/large_" + R; setTimeout(function() { pageTrack(trackPathOverride, true) }, 1000) } } context.thumbID = R } else { trackPathOverride = "/" + context.brand + "/kr/mobile/" + context.year + "/" + context.vehicle + "/gallery/" + context.activeGalleryTab + "/large_" + (U.currSlideId + 1); setTimeout(function() { pageTrack(trackPathOverride, true) }, 1000); context.thumbID = (U.currSlideId + 1) } }) } }) }); g(window).off("load", g.mobile.activePage).on("load", g.mobile.activePage, function() { g(window).trigger("hashchange") }) } function K(M) { M = M.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var L = "[\\?&]" + M + "=([^&#]*)"; var O = new RegExp(L); var N = O.exec(window.location.search); if (N === null) { return "" } else { return decodeURIComponent(N[1].replace(/\+/g, " ")) } } function I(ag) { var N = {}, O = ag, ac = Vehicles.getAvailableYears(), P = [], Q = 0, M = 0, V = {}; for (var ae = 0; ae < ac.length; ae++) { var X = ac[ae]; var ai = Vehicles.getAvailableVehicles({ year: ac[ae] }); for (var ad = 0; ad < ai.length; ad++) { var U = ai[ad]; var ak = { year: X, vehicle: U }; var ao = X + "_" + U; if (O.app || !O.suppress || !O.suppress.length || O.suppress.indexOf(ao) == -1) { if (P.indexOf(ai[ad]) === -1) { M = P.length; P.push(ak.vehicle) } else { M = P.indexOf(ai[ad]) } V[M] = { fullDisplay: t(Vehicles.getDescription(ak)) || null, msrp: (Vehicles.getMSRP(ak)).slice(1) || null, currency: mGlobalConfig.currency, cityMPG: Vehicles.getMPG(ak, "city") || null, hwyMPG: Vehicles.getMPG(ak) || null, mpgDisclaimer: Vehicles.getMPG(ak, "disclaimer") || null, trim: U, highestModel: Vehicles.getHighestModel(ak), img: Vehicles.getImg({ year: X, vehicle: U, model: Vehicles.getHighestModel(ak) }, O.imgType, O.imgHeight, O.imgWidth) || null, myc: Vehicles.getModelYearCode(ak) || null, capacityName: Vehicles.model_years[X][U].capacityName || null, capacityValue: Vehicles.model_years[X][U].capacityValue || null, capacityDisclaimer: Vehicles.model_years[X][U].capacityDisclaimer || null, specialDisclaimer: Vehicles.model_years[X][U].specialDisclaimer || null, vehTagLine: null, bmo: (O.buildPrice && O.buildPrice.visible) ? O.buildPrice.label : null, fadLink: (O.findDealer && O.findDealer.visible) ? O.findDealer.url : null, fadLabel: (O.findDealer && O.findDealer.visible) ? O.findDealer.label : null } } } } var Y = g(".chooseVehicleWrap").closest('div[data-role="content"]'), Z = brandConfig.commercialLineup, S = ["dart", "charger", "journey"], R = {}; if (context.brand === "dodge" && Y.is(".sunset")) { for (var am in V) { for (var al in S) { if (S[al] === V[am]["trim"]) { R[al] = V[am] } } } V = R; /*DATALAYER.set({pageType:"vehicles",pageName:"sunset",vehicle:"avenger"})*/ } if (context.brand === "ramtrucks" && Y.is(".commercial")) { for (var W in V) { for (var T in Z) { if (Z[T] === V[W]["trim"]) { R[T] = V[W] } } } var L, an; g.each(Z, function(ap, aq) { L = context; L.vehicle = aq; L.year = "2015"; an = Vehicles.getImg(L); if (R[ap]["trim"] === aq) { R[ap]["img"] = an } return (ap !== 2) }); V = R } if (brandConfig.model_as_vlp !== undefined) { V = g.extend({}, V, brandConfig.model_as_vlp.data) } var aa = (mGlobalConfig.vehicleLineup !== undefined && mGlobalConfig.vehicleLineup.sortOrder.length > 1) ? mGlobalConfig.vehicleLineup.sortOrder : []; var aj = {}; if (aa.length === 0) { return V } for (var ah = 0; ah < aa.length; ah++) { var ab = aa[ah]; for (var af in V) { if (ab === V[af].trim) { aj[ah] = V[af] } } } V = aj; return V } function v(M, O, L, N) { try { if (typeof(L) != "undefined" || L != "") { M += "&HEIGHT=" + L } if (typeof(N) != "undefined" || N != "") { M += "&WIDTH=" + N } M += "&AUTOTRIM=1&NOIMG=not_found_Chrysler.gif"; if (typeof(O) == "undefined" || !O) { return M } else { if (O == "png" || O == "gif" || O == "bmp" || O == "jpg") { return M.replace(/(\.jpg|\.png)/i, "." + O) } else { return "/shared/images/blank.gif" } } } catch (P) { return "/shared/images/blank.gif" } } function E(ae) { var L = ae, O = Vehicles.getAvailableTrims(context), W = mGlobalConfig.fullDisplayCustomTrim, N = {}, U = context.year, Q = context.vehicle, af, ac, ab, P, T = [], Y = []; var R = mGlobalConfig.specialEditionOverrides; if (R) { for (ac = R.length - 1; ac >= 0; ac--) { if (context.vehicle.indexOf(R[ac].trim) > -1 && (R[ac].checkForFilterValues && L.filterValues || context.year === R[ac].year)) { var S = false; if (R[ac].exclusions.length) { for (i2 = R[ac].exclusions.length - 1; i2 >= 0; i2--) { if (context.vehicle.indexOf(R[ac].exclusions[i2])) { S = true } } } if (!S && L.currentDrive === R[ac].currentDrive) { O = L[R[ac].filterName].filter1 } else { if (!S) { O = L[R[ac].filterName].filter2 } } } } } var V = mGlobalConfig.keep4x2; var M = false; if (V) { for (ac = V.length - 1; ac >= 0; ac--) { if (context.vehicle.indexOf(V[ac])) { M = true } } } var aa = g.mobile.activePage.attr("data-page"); if (Vehicles.getAvailableCabs(context).length && typeof ModelCompare !== "undefined" && (aa != "vlp")) { O.length = 0; g.each(Vehicles.model_years[context.year][context.vehicle].models, function(ag, ah) { if (ah.variation_id === context.variation_id) { T.push(ah); Y.push(ag) } }); g.each(T, function(ah, ag) { O.push(ag.trim) }) } for (var X = 0; X < O.length; X++) { af = { vehicle: Q, year: U, trim: O[X] }; if (isFinite(context.drive)) { af.drive = context.drive } if (Y.length) { af.model = Y[X] } else { af.model = Vehicles.getBaseModel(af) } try { N[X] = { fullDisplay: t(Vehicles.getDescription({ vehicle: Q, year: U }) + " " + (Vehicles.getTrimDisplay(af))) || null, ccode: Vehicles.getCcode(af) || null, msrp: (Vehicles.getMSRP(af)).slice(1) || null, cityMPG: Vehicles.getMPG(af, "city") || null, hwyMPG: Vehicles.getMPG(af) || null, mpgDisclaimer: Vehicles.getMPG({ vehicle: Q, year: U, model: af.model }, "disclaimer") || null, llp: Vehicles.getLLP(af) || null, trim: O[X], img: Vehicles.getImg({ year: U, vehicle: Q, trim: O[X] }, L.imgType, L.imgHeight, L.imgWidth) || null, capacityName: Vehicles.model_years[U][Q].capacityName || null, capacityValue: Vehicles.model_years[U][Q].models[af.model].capacityValue || Vehicles.model_years[U][Q].capacityValue || null, capacityDisclaimer: Vehicles.model_years[U][Q].capacityDisclaimer || null, specialDisclaimer: Vehicles.model_years[U][Q].specialDisclaimer || null }; if (W) { for (var Z = 0; Z < W.length; Z++) { if (context.vehicle === W[Z].contextVehicle && N[X]["ccode"] === W[Z].ccode) { N[X]["fullDisplay"] = t(Vehicles.getDescription({ vehicle: Q, year: U }) + "C " + (context.brand === W[Z].contextBrand && context.vehicle === W[Z].vehicle ? O[X].replace("_", " ") : Vehicles.getTrimDisplay(af))) || null } if (context.brand === W[Z].contextBrand && context.vehicle === W[Z].vehicle && W[Z].replaceUnderscores) { N[X]["fullDisplay"] = t(Vehicles.getDescription({ vehicle: Q, year: U }) + " " + O[X].replace("_", " ")) } } } } catch (ad) { console.log("getTrims: " + ad) } } return N } function t(M) { var N = M || ""; var L = mGlobalConfig.nameReplacements; if (L.length && N !== "") { for (i = L.length - 1; i >= 0; i--) { N = N.replace(L[i].oldText, L[i].newText) } } return N.replace(/_/, " ") } function r(L) { return L.toLowerCase().replace(/\b./g, function(M) { return M.toUpperCase() }) } function D(P, L) { var O = L.length, N = []; for (var M = 0; M < O; M++) { if (L[M].match(P)) { N.push(L[M]) } } return N } function H() { var L = g.mobile.activePage.attr("data-url").replace(window.location.search, ""), N = L.replace(/-/g, "_").split("/"), M = g.mobile.activePage.attr("data-page"); if (M === "home") { context.year = ""; context.vehicle = ""; context.model = ""; context.trim = ""; context.pageType = "homepage"; context.pageName = ""; mobile.updateVehContext(); delete context.drive; context.section = ""; context.subsection = "" } else { if (M === "vlp") { //20170123 if (N[4] == 'renegade' || N[4] == 'wrangler' || N[4] == 'cherokee' || N[4] == 'grand_cherokee') { context.year = '2017'; context.vehicle = N[4]; context.trim = (N[5] === "" || N[5] === "index.html") ? "" : N[5]; context.model = (N[5] === "" || N[5] === "index.html") ? "" : brandConfig.model_as_vlp.model_years[context.year][context.vehicle][context.trim]; }else { context.year = N[4]; context.vehicle = N[5]; context.trim = (N[6] === "" || N[6] === "index.html" || N[6] === "index2.html") ? "" : N[6]; context.model = (N[6] === "" || N[6] === "index.html" || N[6] === "index2.html") ? "" : brandConfig.model_as_vlp.model_years[context.year][context.vehicle][context.trim]; } context.pageType = "vehiclePage"; context.pageName = "landing"; delete context.drive; mobile.updateVehContext(); context.section = (context.gallery && context.gallery !== "") ? context.gallery : "landing"; context.subsection = ""; context.gallery = "" } else { if (M === "buzzmodels") { context.year = N[4]; context.vehicle = N[5]; context.model = N[6]; context.trim = Vehicles.getTrim(context); context.pageType = "vehiclePage"; context.pageName = "landing"; delete context.drive; mobile.updateVehContext(); context.section = (context.gallery && context.gallery !== "") ? context.gallery : "landing"; context.subsection = ""; context.gallery = ""; context.buzzmodel = true } else { if (M === "model" || M === "spec") { context.year = mGlobal.common.getParameterByName("year"); context.vehicle = mGlobal.common.getParameterByName("vehicle"); context.model = mGlobal.common.getParameterByName("model"); context.pageType = "vehiclePage"; context.pageName = "landing"; context.model = mGlobal.common.getParameterByName("model"); context.trim = Vehicles.getTrim(context); delete context.drive; mobile.updateVehContext(); if (M === "model") { context.section = "landing" } else { context.section = "details" } context.subsection = "" } else { if (M === "selector") { context.pageName = "vehicle-selector"; context.year = "" } } } } } } function m(O) { var M = {}, N, L = []; for (N in O) { if (O.hasOwnProperty(N)) { L.push(N) } } L.sort(function(Q, P) { return Q - P }); for (N = 0; N < L.length; N++) { M[L[N]] = O[L[N]] } return M } function b(M, L) { if (M.fullDisplay < L.fullDisplay) { return -1 } if (M.fullDisplay > L.fullDisplay) { return 1 } return 0 } function e(R, P, T, S) { var M = g(R).next("div.ui-collapsible-content").attr("aria-hidden"); var L = R, Q = "", O = g(R).find(".ui-btn-text").clone().children().remove().end().text().toLowerCase().replace(/&/g, "").replace(/ /g, "_").replace(/,/g, "").replace(/__/g, "_"); if (!O) { O = P } if (navigator.userAgent.search("iPhone") > -1) { if (M === "false") { Q = O + "_collapse"; if (S && S === "section") { context.section = O } else { context.subsection = O } } else { Q = O + "_expand"; if (S && S === "section") { context.section = "landing" } context.subsection = "" } } else { if (M === "true") { Q = O + "_expand"; if (S && S === "section") { context.section = O } else { context.subsection = O } } else { Q = O + "_collapse"; if (S && S === "section") { context.section = "landing" } context.subsection = "" } } function N(W) { if (DTM.ufaClickObj.hasOwnProperty(W)) { return [{ name: DTM.ufaClickObj[W].brand /*,value:DATALAYER.getMediaEvent("brand")*/ }, { name: DTM.ufaClickObj[W].vehicle /*,value:DATALAYER.getMediaEvent("vehicle")*/ }] } else { return [] } } var V = ""; if (DTM.ufaClickObj.hasOwnProperty(O)) { V = "," + (DTM.ufaClickObj[O].counter) } var U = { lpos: P, lid: Q, vars: { eVar75: P + ":" + Q, eVar68: "click" }, events: "event70" + V }; if (Q.indexOf("expand") != -1) { U.mediaEvents = N(O) } /*DATALAYER.linkTrack(true,U)*/ } Handlebars.registerHelper("ifCond", function(N, M, L) { if (N || M) { return L.fn(this) } return L.inverse(this) }); Handlebars.registerHelper("ifEqual", function(N, M, L) { if (N === M) { return L.fn(this) } return L.inverse(this) }); Handlebars.registerHelper("ifNotZero", function(N, M, L) { if ((N !== "0") && (M !== "0") && (N !== 0) && (M !== 0)) { return L.fn(this) } return L.inverse(this) }); Handlebars.registerHelper("hasEmptyCaptions", function(M, L) { if (M.length === 0) { return L.fn(this) } else { return L.inverse(this) } }); Handlebars.registerHelper("safe_string", function(L) { return new Handlebars.SafeString(L) }); jQuery.cachedScript = function(M, L) { L = g.extend(L || {}, { dataType: "script", cache: true, url: M }); return jQuery.ajax(L) }; function G(L) { this._options = g.extend({}, z, L); c(this._options); j() } function B(L) { this._options = g.extend({}, z, L); F(this._options) } function f(L) { this._options = g.extend({}, z, L); u(this._options) } return { initOnPage: B, trackJQMPanels: f, init: G, getParameterByName: K, getVehicles: I, getTrims: E, capitalize: r, searchStringInArray: D, sortObject: m, accordionTracking: e, setContextByURL: H, formatDisplay: t } })(jQuery); $(document).one("pageinit", function(a) { var b = mGlobalConfig; mGlobal.common.init(b); var c = mGlobalConfig.updateVehicle; if (c) { $.extend(true, Vehicles, c) } mobile.tracking.bindLinkTrack() }); $(document).on("pageinit", function(b) { var c = mGlobalConfig; mGlobal.common.initOnPage(c); $(".priceMPG div .value").append("t"); var a = setTimeout(function() { $(".priceMPG div i").remove() }, 2500) }); $(document).on("pageinit", function(a) { var b = mGlobalConfig; mGlobal.common.trackJQMPanels(b) }); function setMenuHeight() { $("nav").children(".ui-panel-inner").css("max-height", window.innerHeight - 1 + "px") } $.fn.animationComplete = function(b) { if ($.support.cssTransitions) { var a = "WebKitTransitionEvent" in window ? "webkitAnimationEnd" : "animationend"; return $(this).one(a, b) } else { setTimeout(b, 0); return $(this) } }; /* mGlobal.app **/ var mGlobal = mGlobal || {}; mGlobal.app = (function(d) { var c = "/kr/mobile/vehicles/selector.html"; var a = function() { if (window.cllc && cllc.context) { return cllc.context.get() } return context }; var b = function(g) { var f = ""; switch (g) { case "offers": case "incentives": f = "/kr/mobile/apps/offers/"; break; case "pe": f = "/kr/mobile/apps/pe/"; break; case "sni": f = "/kr/mobile/apps/sni/"; break; case "dealer": case "fad": f = "/kr/mobile/apps/dealer_locator/"; break; case "compare": f = "/kr/mobile/model-compare/"; break; case "sufu": f = "/kr/mobile/get_connected/"; break; case "bmo": f = "/hostc/bmo/"; break; case "vhp": f = "/kr/mobile/vehicles/"; break } return f }; var e = function(k, i) { var h = b(k); if (k == "bmo") { if (i.year && i.vehicle) { var f = Vehicles.getModelYearCode(i); h = "/hostc/bmo/" + f + "/models.do"; if (i.model) { var j = Vehicles.getCcode(i), g = Vehicles.getLLP(i); h += "?ccode=" + j + "&llp=" + g } } else { h = c + "?app=bmo" } } else { if (k == "incentives") { h = b(k); if (i.year && i.vehicle) { if (i.model) { h += "offers.html?ccode=" + Vehicles.getCcode(i) } else { h += "?modelYearCode=" + Vehicles.getModelYearCode(i) } } else { h = c + "?app=incentives" } } else { if (k == "vhp") { h += i.year + "/" + i.vehicle.replace(/_/g, "-") + "/" } else { h = b(k); if (k != "dealer") { if (i.year && i.vehicle) { h += "?year=" + i.year + "&vehicle=" + i.vehicle; if (i.trim) { h += "&trim=" + i.trim } if (i.model) { h += "&model=" + i.model } } else { h = c + "?app=" + k } } } } } window.location = h }; return { getContext: a, bridge: e } })(jQuery); $(document).on("click", "a[href^='#app-']", function(c) { c.preventDefault(); var a = $(this), d = a.attr("href").substr(5), b = {}; if (a.attr("data-context")) { b = JSON.parse(a.attr("data-context")) } else { b = mGlobal.app.getContext() } if (b.ccode) { b.year = b.ccode.substr(3, 4); b.vehicle = Vehicles.getFamilyFromMYC(b.ccode.substr(0, 9)); b.model = Vehicles.getModelFromCcode(b.ccode) } mGlobal.app.bridge(d, b) }); var mGlobal = mGlobal || {}; mGlobal.chooseVehicle2 = mGlobal.chooseVehicle2 || {}; mGlobal.chooseVehicle2 = (function(e) { var f = {}; var g = { height: 140, width: 280, resp: "jpg", bkgnd: "white" }; var d = "newVehicleSelector", c = { currentYear: mGlobalConfig.year, availableYears: Vehicles.getAvailableYears(), $chooseVehicle: ".chooseVehicle", $chooseVehicleHeader: ".chooseVehicleHeader", $pageTitle: ".chooseVehicleHeader h3", $vehicleTitle: ".chooseVehicleItem h3", $cityMPG: ".chooseVehicle .cityMPG", $activePage: null }; var a = { isScriptLoaded: false, isOffersAvailable: mGlobalConfig.showOffers, init: function(i, j) { var k = mobile.getParameterByName("app"); var h = this; if (context.brand === "chrysler" || context.brand == "jeep") { a.isOffersAvailable = false } h.element = j; h.settings = e.extend({}, c, i); e(".chooseVehicleNav, .chooseVehicle").html(""); h.attachEvents(this.settings, this.element); if (k && k == "sni") { LazyLoader.loadScript("/assets/data/vehicles/inventory.js", function() { h.loadTemplateFile(h.settings, h.element, k) }) } else { h.loadTemplateFile(h.settings, h.element, k) } }, attachEvents: function() { var h = this; c.$activePage = e.mobile.activePage }, loadTemplateFile: function(i, k, j) { var h = this; e.cachedScript(i.handlerbars.templateUrl).done(function(l, m) { if (m === "success") { e.cachedScript(i.handlerbars.tileTemplateUrl).done(function(n, o) { if (o === "success") { if (mGlobalConfig.isJeepLimitedEdition) { h.getVehicleList(i); h.defineHandlers(); h.loadTemplate(i) } else { h.getVehicleList(i, j); h.getLeaseData(); h.sortData(i, k) } } }) } }) }, getDefaultYear: function(k, j) { var i = Vehicles.getAvailableYears({ vehicle: k }); var l = i[i.length - 1]; var h = l + "_" + k; if (i.length > 1 && brandConfig.chooseVehicle && brandConfig.chooseVehicle.suppress && brandConfig.chooseVehicle.suppress.indexOf(h) != -1) { l = i[i.length - 2] } if (j) { if (pickerConfig.defaultYear && pickerConfig.defaultYear[j] && pickerConfig.defaultYear[j][k]) { l = pickerConfig.defaultYear[j][k] } else { if (pickerConfig.defaultYear["default"] && pickerConfig.defaultYear["default"][k]) { l = pickerConfig.defaultYear["default"][k] } } } return l.toString() }, getVehicles: function(L, t) { var s = Vehicles.getAvailableVehicles(), k = {}, l = L, o = [], p = 0, j = 0, w = {}, u, H, C, n, m = {}; for (var J = 0; J < s.length; J++) { u = s[J]; H = Vehicles.getAvailableYears({ vehicle: u }); C = this.getDefaultYear(u, t); var O = { year: C, vehicle: u }; var R = C + "_" + u; if (l.app || !l.suppress || !l.suppress.length || l.suppress.indexOf(R) == -1) { w[j] = this.getVehicleData(O); w[j].years = Vehicles.getAvailableYears({ vehicle: O.vehicle }).sort(); j++ } } if (!t && brandConfig.model_as_vlp) { for (var v in brandConfig.model_as_vlp.model_years) { if (Vehicles.getAvailableYears().indexOf(v) != -1) { for (var B in brandConfig.model_as_vlp.model_years[v]) { if (Vehicles.getAvailableVehicles({ year: v }).indexOf(B) != -1) { for (var I in brandConfig.model_as_vlp.model_years[v][B]) { if (Vehicles.getAvailableTrims({ year: v, vehicle: B }).indexOf(I) != -1) { var Q = { year: v, vehicle: B, trim: I }; m[I] = this.getVehicleData(Q) } } } } } } for (var M in m) { w[j] = m[M]; j++ } } var E = e(".chooseVehicleWrap").closest('div[data-role="content"]'), D = brandConfig.commercialLineup, q = {}; if (context.brand === "ramtrucks" && E.is(".commercial")) { for (var A in w) { for (var r in D) { if (D[r] === w[A]["trim"]) { q[r] = w[A] } } } var h, P; e.each(D, function(i, x) { h = context; h.vehicle = x; h.year = "2015"; P = Vehicles.getImg(h, g); if (q[i]["trim"] === x) { q[i]["img"] = P } return (i !== 2) }); w = q } var F = (mGlobalConfig.vehicleLineup !== undefined && mGlobalConfig.vehicleLineup.sortOrder.length > 1) ? mGlobalConfig.vehicleLineup.sortOrder : []; var N = {}; if (F.length === 0) { return w } for (var M = 0; M < F.length; M++) { var G = F[M]; for (var K in w) { if (G === w[K].trim) { N[M] = w[K] } } } w = N; return w }, getVehicleList: function(i, j) { var h = this; this.vehicleList = {}; var j = mobile.getParameterByName("app"); if (mGlobalConfig.isJeepLimitedEdition) { this.vehicleList = this.getLimitedEditions(i) } else { this.vehicleList = this.getVehicles(i, j) } }, getLimitedEditions: function(v) { var l = {}, p = 0; var u = Vehicles.getAvailableYears(), q = [], o = []; for (var r in brandConfig.limitedEditionVehicles) { if (u.indexOf(r) != -1) { var t = brandConfig.limitedEditionVehicles[r].vehicles; q = Vehicles.getAvailableVehicles({ year: r }); for (var n = 0; n < t.length; n++) { var h = t[n].vehicle; if (q.indexOf(h) != -1) { o = Vehicles.getAvailableTrims({ year: r, vehicle: h }); for (var m = 0; m < t[n].trims.length; m++) { var k = t[n].trims[m]; if (o.indexOf(k) != -1) { var s = { year: r, vehicle: h, trim: k }; s.model = Vehicles.getBaseModel(s); l[p] = { bmo: (v.buildPrice && v.buildPrice.visible) ? v.buildPrice.label : null, fadLink: (v.findDealer && v.findDealer.visible) ? v.findDealer.url : null, fadLabel: (v.findDealer && v.findDealer.visible) ? v.findDealer.label : null, ccode: Vehicles.getCcode(s), currency: mGlobalConfig.currency, llp: Vehicles.getLLP(s), msrp: (Vehicles.getMSRP(s)).slice(1) || null, myc: Vehicles.getModelYearCode(s), trim: Vehicles.getTrim(s), img: Vehicles.getImg({ year: r, vehicle: h, model: Vehicles.getHighestModel(s) }, g) || null }; p++ } } } } } } return l }, getLeaseData: function() { var i = this; var h = {}; e.ajaxSetup(h); if (i.isOffersAvailable) { this.leaseData = e.getJSON("/assets/data/incentives/offers.json") } }, getIncentiveImage: function(h) { return Vehicles.getImg({ year: h.year, vehicle: h.vehicle, model: h.model }, g) }, sortData: function(i, j) { var h = this; h.defineHandlers(); function n(q, p) { if (q.type === "generic") { return 0 } else { return 1 } } function m(q, p) { if (p.type === "lease") { return 1 } else { if (q.type === "cash" && (p.type === "lease" || p.type === "apr")) { return 1 } else { if (p.type === "apr" && q.type === "cash") { return 1 } else { return -1 } } } } if (h.isOffersAvailable) { e.when(this.vehicleList, this.leaseData).done(function(D, C) { h.leaseData = C; var w = C[0], u, z, x, H; f.data = w; for (var B in w) { f[B] = {}; for (var y in w[B]) { var r = w[B][y]; var s = r["default"] || Object.keys(w[B][y]["models"])[0]; var A = h.getIncentiveImage({ year: B, vehicle: y, model: s }); if (A.indexOf("blank") != -1) { A = h.getIncentiveImage({ year: B, vehicle: y }) } H = r.models[s].offers; H = H.filter(n); H = H.sort(m); if (H.length) { var p = H[0]; var q = H[0].type; p[q] = true; f[B][y] = { offer: p, img: A } } } } for (var E in D) { u = D[E].myc; z = u.substr(3, 4); x = Vehicles.getFamilyFromMYC(u); if (D[E].ccode) { var t = { year: z, vehicle: x, model: Vehicles.getModelFromCcode(D[E].ccode) }; if (w[z] && w[z][x] && w[z][x].models[t.model] && w[z][x].models[t.model].offers.length) { H = w[z][x].models[t.model].offers.sort(m); var p = H[0]; var F = p.type; D[E].offers = p; D[E].offers[F] = true; D[E].leaseImg = Vehicles.getImg(t, g) } } else { if (f[z] && f[z][x]) { D[E].offers = f[z][x].offer; if (f[z][x].offer.type == "lease") { D[E].leaseImg = f[z][x].img } } } } var G = e.map(D, function(I, v) { return I }); h.mappedData = window.mappedOffers = G; h.loadTemplate(i) }) } else { var l = a; var k = l.vehicleList; var o = e.map(k, function(q, p) { return q }); h.mappedData = window.mappedOffers = o; h.loadTemplate(i) } }, loadTemplate: function(q) { var o = this; var p = ""; p = q.handlerbars.vehicleTemplate; var j = q.handlerbars.vehicleTemplateTile; if (mGlobalConfig.isJeepLimitedEdition) { o.mappedData = this.vehicleList; o.mappedData.sortData = mGlobalConfig.filterByVehiclesDropdown } o.mappedData.brand = context.brand; Object.defineProperty(o.mappedData, "brand", { enumerable: false }); var m = Handlebars.templates[p]; var l = Handlebars.templates[j]; var r = { data: o.mappedData }; if (mobile.getParameterByName("app")) { for (var n in r.data) { r.data[n].app = mobile.getParameterByName("app") } r.app = mobile.getParameterByName("app") } if (m) { Handlebars.registerPartial("subtemplate", l); e(q.$chooseVehicle).html(m(r)).trigger("create") } if (mGlobalConfig.isJeepLimitedEdition) { console.log(e(".chooseVehicleItem").length + ":before"); var k = e(".chooseVehicleItem"); var h = {}; e(k).each(function() { var s = e(this).data("ccode"); if (h[s]) { e(this).remove() } else { h[s] = true } }); console.log(e(".chooseVehicleItem").length + ":after") } mGlobal.updateDisclaimers.init(); var i; if (mobile.getParameterByName("app")) { if (mobile.getParameterByName("app") === "bmo") { i = "Build & Price" } else { if (mobile.getParameterByName("app") === "incentives") { i = "Incentives & Offers" } else { if (mobile.getParameterByName("app") === "compare") { i = "Model Compare" } else { if (mobile.getParameterByName("app") === "sni") { i = "Search New Inventory" } else { if (mobile.getParameterByName("app") === "pe") { i = "Payment Calculator" } } } } } c.$activePage.find(".chooseVehicleWrap h2").text(i).css("display", "block"); c.$activePage.find(".chooseVehicleItem .buttonGroup a").css("display", "none"); c.$activePage.find(".chooseVehicleItem .buttonGroup .ui-btn").css("float", "none") } e(".myToggle ul li a").off("click").on("click", function(s) { o.myToggleClick(s) }); e(".myToggle").each(function() { if (e(this).find("ul").children("li").length > 2) { e(this).find("ul li").eq(0).css("border-right", "1px solid #BCBCBC") } }); e.mobile.activePage.find(".chooseVehicleItem .explore_cta").off("click").on("click", function(u) { var s = e(this).attr("data-lpos").replace(/®/, "_reg").replace(/(<([^>]+)>)/ig, "").replace(/®|짰/, ""); var t = e(this).attr("data-lid"); /*DATALAYER.linkTrack(this,{lpos:s,lid:t})*/ }) }, defineHandlers: function() { var p, j, i, o, m, l, h, k, n; Handlebars.registerHelper("yearToggle", function(r, q) { var t = q.fn, s = q.inverse; return r.length > 1 ? t() : s() }); Handlebars.registerHelper("getYear", function(q) { return q.substr(3, 4) }); Handlebars.registerHelper("activeClass", function(r, q) { k = q.substr(3, 4); n = (r === k) ? "active" : ""; return n }); Handlebars.registerHelper("checkmyccode", function(r, s, q) { if (r || s) { return q.fn(this) } else { return q.inverse(this) } }); Handlebars.registerHelper("ifactive", function(r, q) { if (mGlobalConfig.isJeepLimitedEdition) { return q.fn(this) } else { return q.inverse(this) } }); Handlebars.registerHelper("ifToggles", function(r, q) { if (r === "jeep" && window.location.search.indexOf("app") !== 1) { return q.fn(this) } else { return q.inverse(this) } }); Handlebars.registerHelper("fetchOffers", function(q) { e.grep(q, function(s, r) { if (s.type === "apr") { p = s.amount } }); return p }); Handlebars.registerHelper("adjustUrl", function(q) { q = q; if (q.indexOf("_") !== -1) { q = q.replace(/_/ig, "-") } else {} return q }); Handlebars.registerHelper("customParam", function(s, q) { var t = { year: s.substr(3, 4), vehicle: Vehicles.getFamilyFromMYC(s) }; if (mGlobalConfig.isJeepLimitedEdition) { t.trim = q; t.model = Vehicles.getBaseModel(t) } var r = Vehicles.getImg(t, g); return r }); Handlebars.registerHelper("titleUpdate", function(r, q) { var s = { year: r.substr(3, 4), vehicle: Vehicles.getFamilyFromMYC(r) }; if (s.vehicle != q) { s.trim = q } var t = Vehicles.getDescription(s); if (context.brand === "jeep" && !s.trim) { t = t.replace(/^\d+[^\s]+/gi, context.brand); t = t.charAt(0).toUpperCase() + t.slice(1) } else { t = t.replace(/^\d+[^\s]+/gi, "") } t = t.replace(/2015|2016/ig, ""); return t }); Handlebars.registerHelper("tileLinkTrack", function(r, q) { if (!r && r.length != 9) { return "" } var s = r.substr(3, 4), t = Vehicles.getFamilyFromMYC(r); if (mGlobalConfig.isJeepLimitedEdition) { return s + "-" + t + "-" + q + "-" + mobile } if (context.brand === "fiatusa" || context.brand === "ramtrucks") { m = s + "-" + t } else { m = s + "-" + context.brand + "-" + t } return m }); Handlebars.registerHelper("lposdata", function(r, q) { var s = r.substr(3, 4), t = Vehicles.getFamilyFromMYC(r); if (mGlobalConfig.isJeepLimitedEdition) { l = s + "-" + t + "-" + q } else { l = s + "-" + t } l += "-mobile"; return l }); Handlebars.registerHelper("paramUrl", function(q) { return Vehicles.getYearFromMYC(q) }); Handlebars.registerHelper("getContext", function(q) { return '{"year":' + Vehicles.getYearFromMYC(q) + ',"vehicle":"' + Vehicles.getFamilyFromMYC(q) + '"}' }); Handlebars.registerHelper("getUrl", function(q, s, r) { if (s) { return "#app-" + s } else { if (r) { if (mGlobalConfig.isJeepLimitedEdition) { return "/kr/mobile/vehicles/" + q.substr(3, 4) + "/" + Vehicles.getFamilyFromMYC(q).replace(/_/g, "-") + "/" + Vehicles.getModelFromCcode(r) } else { return "/kr/mobile/vehicles/" + q.substr(3, 4) + "/" + Vehicles.getFamilyFromMYC(q).replace(/_/g, "-") + "/" + Vehicles.getTrimFromCcode(r) } } else { return "/kr/mobile/vehicles/" + q.substr(3, 4) + "/" + Vehicles.getFamilyFromMYC(q).replace(/_/g, "-") + "/" } } }) }, myToggleClick: function(h) { var u = this; var v = e(h.target), p = v.closest("li"), j = v.parent("li").data("myc"), t = v.text(), m = Vehicles.getFamilyFromMYC(j), q = "active", l = {}, s; l = { year: t, vehicle: m }; s = p.closest(".chooseVehicleItem"); if (p.attr("class") !== q) { p.attr("class", q).siblings("li").removeClass(q); u.updateVehicleData(l, s); u.updateBtnCxt(t, m, s) } var o = p.parent("ul").children().size(), n = p.parent().children(), i = p.index(), k = "border-right", r = "1px solid #BCBCBC"; if (o > 2) { n.css(k, ""); if (i === 0) { n.eq(1).css(k, r) } else { if (i === 2) { n.eq(0).css(k, r) } } } }, updateBtnCxt: function(i, k, j) { var l = j.find(".buttons button"); var h = { year: i, vehicle: k }; l.attr("data-context", JSON.stringify(h)); l.attr("data-lpos", i + "-mobile") }, updateVehicleData: function(m, l) { var i = this.settings; var h = this.getVehicleData(m); l.find("a[data-context]").remove(); var j = i.handlerbars.vehicleTemplateTile; var k = Handlebars.templates[j]; l.find("div.myToggle").after(k(h)).trigger("create"); mGlobal.updateDisclaimers.init(100) }, getVehicleData: function(n) { var i = this; var j = this.settings, l = n.year, m = n.vehicle, h = {}, k = Vehicles.getHighestModel(n); h = { fullDisplay: mGlobal.common.formatDisplay(Vehicles.getDescription(n)) || null, msrp: (Vehicles.getMSRP(n)).slice(1) || null, currency: mGlobalConfig.currency, cityMPG: Vehicles.getMPG(n, "city") || null, hwyMPG: Vehicles.getMPG(n) || null, mpgDisclaimer: Vehicles.getMPG(n, "disclaimer") || null, trim: n.trim || m, highestModel: k, img: Vehicles.getImg({ year: l, vehicle: m, model: k }, g) || null, myc: Vehicles.getModelYearCode(n) || null, capacityName: Vehicles.model_years[l][m].capacityName || null, capacityValue: Vehicles.model_years[l][m].capacityValue || null, capacityDisclaimer: Vehicles.model_years[l][m].capacityDisclaimer || null, specialDisclaimer: Vehicles.model_years[l][m].specialDisclaimer || null, vehTagLine: null, bmo: (j.buildPrice && j.buildPrice.visible) ? j.buildPrice.label : null, fadLink: (j.findDealer && j.findDealer.visible) ? j.findDealer.url : null, fadLabel: (j.findDealer && j.findDealer.visible) ? j.findDealer.label : null, }; if (n.trim) { n.model = Vehicles.getBaseModel(n); h.ccode = Vehicles.getCcode(n) } if (f[l] && f[l][m]) { h.offers = f[l][m].offer; if (f[l][m].offer.type == "lease") { h.leaseImg = f[l][m].img } } if (mobile.getParameterByName("app")) { h.app = mobile.getParameterByName("app") } return h } }; function b(h, i) { this.options = h; this.element = i; a.init(this.options, this.element) } e.fn[d] = function(h, i) { return this.each(function() { if (!e.data(this, d)) { e.data(this, d, new b(h, i)) } }) } })(jQuery); var mGlobal = mGlobal || {}; mGlobal.locatePanel = (function(g) { if (window.cllc && cllc.context) { context = cllc.context.get(); context.brand = cllc.config.brand; context.zip = cllc.context.get("zipcode"); cllc.context.addListener("zipcode", function(o, s) { context.zip = s; if (s != undefined && s && (s != o)) { g("#locateZipCode").val(s) } }) } var b = function(o) { return /^[0-9]{5}$/.test(o) }; var f = function(o) { if (window.cllc) { cllc.context.set("zipcode", o) } else { g.cookie("zipcode", o, { expires: 365, path: "/" }) } }; var n = function() { if (window.cllc) { return cllc.context.get("zipcode") } return g.cookie("zipcode") }; var c = g({}); g.each({ on: "subscribe", trigger: "publish", off: "unsubscribe" }, function(o, s) { g[s] = function() { c[o].apply(c, arguments) } }); var h = {}; var k = {}; var d = { useStaticMaps: false, staticMapsAPI: "//maps.googleapis.com/maps/api/staticmap", googleMapsClientID: "gme-chryslergroupllc", googleMapsZoom: 13, googleMapsType: "roadmap", googleMapsSize: "222x160", mapURIScheme: "//maps.google.com/maps?q=" }, m = { locateWrapper: ".ui-page-active #locatePanelWrap", noLocationDiv: ".ui-page-active .locationUnknown", zipCntr: ".ui-page-active .zipBloc", locateCxtBtn: ".ui-page-active .locateCxtBtn", dealerArea: ".ui-page-active .dealerArea", errMsgCntr: ".ui-page-active .errorMsg", geoLocBtn: ".ui-page-active #geoLocatePanelButton", zipSearchBtn: ".ui-page-active #locateZipSearch", zipInput: ".ui-page-active #locateZipCode" }, r = function(t) { var s = this, o, v = /app/igm; this.options = g.extend({}, d, t); this.dealerData; this.inventoryData, this.timer; this.zip; this.V2 = mGlobal.locationServicesV2; this.brandName = ((context.brand === "chrysler") ? "Chrysler" : (context.brand === "fiatusa") ? "FIAT®" : ""); switch (context.brand) { case "ramtrucks": this.brandFilter = "&isRamTrucks=Y"; this.divisionDescription = "&divisionDescription=Dodge Truck"; break; case "fiatusa": this.brandFilter = "&isFiat=Y"; this.divisionDescription = "&divisionDescription=FIAT"; break; case "dodge": this.brandFilter = "&isDodge=Y"; this.divisionDescription = "&divisionDescription=DODGE"; break; case "chrysler": this.brandFilter = "&isChrysler=Y"; this.divisionDescription = "&divisionDescription=CHRYSLER"; break; case "jeep": this.brandFilter = "&isJeep=Y"; this.divisionDescription = "&divisionDescription=JEEP"; break } this.subscriptions(); if (n()) { s.zip = n(); o = window.location.href; o = v.test(o); if (s.inventoryData && context.vehicle === "") { g.mobile.activePage.find("#locatePanel .inventoryArea").hide(); s.fetchDealerData() } else { if (!s.dealerData) { s.fetchDealerData() } else { if (context.vehicle === "" && o) { s.fetchDealerData() } else { if (context.vehicle !== "") { s.fetchInventoryData() } else { if (s.dealerData) { s.renderResults(n()) } } } } } } else { g(m.noLocationDiv).show(); g.mobile.activePage.find("#locatePanel .cxtArea").hide(); g(m.dealerArea).hide() } this.attachEvents(); var u = "locate_panel_mobile"; if (g.mobile.activePage.hasClass("page-home")) { u = u + "_bhp" } else { if (g.mobile.activePage.hasClass("page-vlp")) { u = u + "_vlp" } else { if (g.mobile.activePage.hasClass("shoppingTools")) {} } } g("#locatePanel a").each(function() { g(this).attr("data-lpos", u) }) }, a = function() { g.subscribe("locate/home-panel", g.proxy(this.fetchDealerData, this)); g.subscribe("locate/vlp-panel", g.proxy(this.fetchInventoryData, this)) }, l = function() { switch (context.brand) { case "ramtrucks": this.brandFilter = "&isRamTrucks=Y"; break; case "fiatusa": this.brandFilter = "&isFiat=Y"; break; case "dodge": this.brandFilter = "&isDodge=Y"; break; case "chrysler": this.brandFilter = "&isChrysler=Y"; break; case "jeep": this.brandFilter = "&isJeep=Y"; break } g.mobile.loading("show"); var s = this, t = "/hostd/getlocatedealers.json", o; var u = "inventoryType=N&zipCode=" + this.zip + this.brandFilter + this.divisionDescription + "&sortByCode=Distance"; if (context.brand === "fiatusa") { u += "&zipDistance=50" } else { u += "&zipDistance=25" } o = g.getJSON(t, u).promise(); o.then(function(w, x, v) { if (w[0].data.totalDealerCount > 0) { g(m.noLocationDiv).hide(); s.dealerData = w; if (n()) { if (context.vehicle === "") { s.renderResults() } else { s.fetchInventoryData() } } } else { g.mobile.loading("hide"); g(m.noLocationDiv).show(); g.mobile.activePage.find("#locatePanel .cxtArea").hide(); g(m.dealerArea).hide(); g.mobile.activePage.find("#locationCache .inventoryArea").hide(); g.mobile.activePage.find("#locatePanel .zipCntr").append('

No dealers found. Please double check your ZIP Code and try again.

') } }, function(v) {}) }, e = function() { var w, s, y = "", t = "", z; var A = this; var u = "/hostd/getsearchinventory.json?src=sape&inventoryType=N&sortOrder=ASC"; if (!context.model) { var v = context.myc_i; t += "&modelYearCode=" + v; t += "&zipCode=" + A.zip } else { if (context.model !== "") { var x = "&ccode=" + context.ccode_i; var o = "&llp=" + context.llp; t += "&zipCode=" + A.zip + A.brandFilter + A.divisionDescription + x + o } } if (context.brand === "fiatusa") { t += "&zipDistance=50" } else { t += "&zipDistance=25" } t += "&sortByCode=Distance"; if (context.myc_i) { z = g.getJSON(u + t, function(C) { if (C[0].data.totalVehicleCount > 0) { A.inventoryData = C[0].data.inventoryVehicles; w = A.inventoryData[0] || {}; if (A.dealerData === undefined) { A.fetchDealerData() } else { s = A.dealerData[0].data.dealers; for (var B = 0; B < s.length; B++) { if (s[B].dealerCode === w.dealerCode) { y = s[B].name; A.inventoryDealer = s[B]; break } } } A.renderResults() } else { g.mobile.activePage.find("#locationPanel .inventoryArea").hide(); A.renderResults() } }) } else { g.mobile.activePage.find("#locationPanel .inventoryArea").hide(); A.renderResults() } }, i = function(I) { var D = this; var s = 0, C, u, y, J, z, w; if (D.dealerData) { C = D.dealerData[0].data.dealers } else { D.fetchDealerData(); return } var t = ["zoom=" + encodeURIComponent(this.options.googleMapsZoom), "size=" + encodeURIComponent(this.options.googleMapsSize), "maptype=" + encodeURIComponent(this.options.googleMapsType), "scale=" + (window.devicePixelRatio ? window.devicePixelRatio : 1)]; g.mobile.activePage.find(".dealer_name").html("").append(" miles away"); g.mobile.activePage.find(".currentZip").html(this.zip); g.mobile.activePage.find(".dealer_count").html((D.dealerData ? D.dealerData[0].data.totalDealerCount : 0)); y = context.brand; if (context.brand === "fiatusa") { y = "fiat" } g.mobile.activePage.find(".dealer_bloc .brand_name").html(y.charAt(0).toUpperCase() + y.substr(1)); g.mobile.activePage.find(".dealer_bloc .dealer_name").prepend(C[0].name); g.each(C, function(N) { s += C[N].inventoryCount }); g.mobile.activePage.find(".brandCount").html(s); g.mobile.activePage.find(".dealer_bloc .miles_away").prepend(C[0].zipDistance); g.mobile.activePage.find(".dealer_bloc .dealer_info a").attr("href", "/kr/mobile/apps/dealer_locator/").attr("data-ajax", "false").attr("data-lid", "view_dealership_info_" + g.trim(C[0].name).toLowerCase().replace(/\s/igm, "_")); g.mobile.activePage.find("#locatePanel .cxtArea").hide(); g.mobile.loading("hide"); g(m.noLocationDiv).hide(); if (context.vehicle === "" || context.myc === "" || D.inventoryData === undefined) { g(m.dealerArea).show(); g.mobile.activePage.find("#locatePanel .cxtArea").show(); g.mobile.activePage.find("#locatePanel .inventoryArea").hide(); g.mobile.activePage.find("#locatePanel .dealerArea .dealer_near a").data("lid", "dealers_near_you_" + (D.dealerData ? D.dealerData[0].data.totalDealerCount : 0)); g.mobile.activePage.find("#locatePanel .dealerArea .dealer_near a").attr("data-lid", "dealers_near_you_" + (D.dealerData ? D.dealerData[0].data.totalDealerCount : 0)) } else { if (D.inventoryData !== undefined) { g(m.dealerArea).hide(); g.mobile.activePage.find("#locatePanel .cxtArea").show(); g.mobile.activePage.find("#locatePanel .inventoryArea").show(); u = D.inventoryData[0]; w = D.inventoryDealer; g.mobile.activePage.find(".inventory_bloc .dealer_name").prepend(w.name); g.mobile.activePage.find(".inventory_bloc .miles_away").html(w.zipDistance + " miles away"); g.mobile.activePage.find(".inventory_bloc .dealer_info a").attr("href", "/kr/mobile/apps/dealer_locator/").attr("data-ajax", "false"); g.mobile.activePage.find(".vehicleCount").html(Object.keys(D.inventoryData).length + " "); g.mobile.activePage.find(".inventory_bloc .dealer_info a").attr("data-lid", "view_dealership_info_" + g.trim(w.name).toLowerCase().replace(/\s/igm, "_")); if (!context.model) { g.mobile.activePage.find(".vehicles").html(u.modelDescription) } else { g.mobile.activePage.find(".vehicles").html(u.modelDescription + " " + u.description) } g.mobile.activePage.find(".vehicle_name").html(u.yearDescription + " " + D.brandName + " " + u.description); J = u.MSRP; var E = (J + "").split("."), v = E[0], G = v.length, x = "", F = G - 1; while (F >= 0) { x = v.charAt(F) + x; if ((G - F) % 3 === 0 && F > 0) { x = "," + x }--F } if (E.length > 1) { x += "." + E[1] } J = "MSRP $" + x; g.mobile.activePage.find(".lMSRP").html(J); if (u.extImage.indexOf("COSY") != -1) { var A = (location.hostname == "m." + Vehicles.getBrand() + ".com"); var z = ""; if (!A) { z = "//preview." + Vehicles.getBrand() + ".com" } z += "/mediaserver/iris?" + u.extImage.replace("&", "&"); z += "&pov=fronthero&HEIGHT=140&WIDTH=280&bkgnd=white&resp=jpg&cut="; z = "" } else { z = "" } g.mobile.activePage.find(".vehicle_img").html(z); g.mobile.activePage.find(".inventory_bloc .vehicle_info a").attr("href", "/kr/mobile/apps/sni/details.html?vin=" + u.vin + "&dealerCode=" + u.dealerCode); var M = u.yearDescription + "_"; var o = (context.brand === "ramtrucks") ? "" : (context.brand === "fiatusa") ? "" : (context.brand === "chrysler") ? "" : context.brand; var H = u.description.toLowerCase().replace(/\s/, "_"); M += o + "_" + H; M += "_details"; g.mobile.activePage.find(".vehicle_info a").attr("data-lid", M); g.mobile.activePage.find(".veh_near a").attr("data-lid", "vehicles_near_you_" + u.yearDescription + "_" + u.modelDescription); var B = t.slice(); B.push("center=" + encodeURIComponent(w.address1.trim() + "," + w.city.trim() + "," + w.state.trim() + "," + w.zip)); B.push("markers=" + encodeURIComponent("color:red|" + w.latitude + "," + w.longitude)); g.mobile.activePage.find("a#nearest_vehicle_map").attr("data-external-url", this.options.mapURIScheme + encodeURIComponent(w.address1.trim() + "," + w.city.trim() + "," + w.state.trim() + "," + w.zip)); if (this.options.useStaticMaps) { g.mobile.activePage.find("a#nearest_vehicle_map > img").attr("src", this.options.staticMapsAPI + "?" + B.join("&")) } else { D.nearestInventoryDealer = w } g.mobile.activePage.find("#locatePanel .inventoryArea .dealer_near a").data("lid", "dealers_near_you_" + (D.dealerData ? D.dealerData[0].data.totalDealerCount : 0)); g.mobile.activePage.find("#locatePanel .inventoryArea .dealer_near a").attr("data-lid", "dealers_near_you_" + (D.dealerData ? D.dealerData[0].data.totalDealerCount : 0)) } } var L = t.slice(); L.push("center=" + encodeURIComponent(C[0].address1.trim() + "," + C[0].city.trim() + "," + C[0].state.trim() + "," + C[0].zip)); L.push("markers=" + encodeURIComponent("color:red|" + C[0].latitude + "," + C[0].longitude)); g.mobile.activePage.find("a#nearest_dealer_map").attr("data-external-url", this.options.mapURIScheme + encodeURIComponent(C[0].address1.trim() + "," + C[0].city.trim() + "," + C[0].state.trim() + "," + C[0].zip)); if (this.options.useStaticMaps) { g.mobile.activePage.find("a#nearest_dealer_map > img").attr("src", this.options.staticMapsAPI + "?" + L.join("&")) } else { D.nearestDealer = C[0] } if (!this.options.useStaticMaps) { if (typeof google === "object" && typeof google.maps === "object") { D.drawGoogleMaps() } else { var K = document.createElement("script"); K.type = "text/javascript"; K.src = "//maps.googleapis.com/maps/api/js?v=3.exp&client=" + D.options.googleMapsClientID + "&channel=m." + context.brand + ".com&sensor=true&callback=mGlobal.locatePanel.drawGoogleMaps"; document.body.appendChild(K) } } g.mobile.activePage.find(".ui-popup-container a:eq(1)").on("click", function() { g.mobile.activePage.find(".ui-popup-container").popup("close") }) }, q = function() { var A = mGlobal.locatePanel, x = "vehicle-map-canvas", B = "dealer-map-canvas"; if (A.nearestInventoryDealer && A.nearestInventoryDealer.name) { if (g.mobile.activePage.find("#" + x).length === 0) { g.mobile.activePage.find("a#nearest_vehicle_map > img").remove(); g.mobile.activePage.find("a#nearest_vehicle_map").append('
') } var s = new google.maps.LatLng(A.nearestInventoryDealer.latitude, A.nearestInventoryDealer.longitude); var o = { center: s, zoom: this.options.googleMapsZoom, disableDefaultUI: true, draggable: false }; var t = new google.maps.Map(document.getElementById(x), o); var v = new google.maps.Marker({ position: s, map: t, title: A.nearestInventoryDealer.name }); A.nearestInventoryDealer = {} } if (A.nearestDealer && A.nearestDealer.name) { if (g.mobile.activePage.find("#" + B).length === 0) { g.mobile.activePage.find("a#nearest_dealer_map > img").remove(); g.mobile.activePage.find("a#nearest_dealer_map").append('
') } var y = new google.maps.LatLng(A.nearestDealer.latitude, A.nearestDealer.longitude); var u = { center: y, zoom: this.options.googleMapsZoom, disableDefaultUI: true, draggable: false }; var w = new google.maps.Map(document.getElementById(B), u); var z = new google.maps.Marker({ position: y, map: w, title: A.nearestDealer.name }); A.nearestDealer = {} } }, p = function() { var o = mGlobal.locatePanel, s, t; g.mobile.activePage.find("#locateZipSearch").on("click", function(x, w, u) { x.preventDefault(); if (w) { s = w } else { s = g(m.zipInput).val() } if (b(s)) { f(s); o.zip = s; t = g(m.locateWrapper).parent().data("app"); g.publish("locate/home-panel"); if (context.vehicle !== "" && context.pageType === "vehiclePage") { mGlobal.chooseModels.init(mGlobalConfig.chooseModels, g.mobile.activePage.find(".modelList")) } if (context.pageType === "comparePage" && typeof(mGlobal.comapreRenegadeUpdateInventoryCount) === "function") { mGlobal.comapreRenegadeUpdateInventoryCount() } try { mGlobal.featureModelsTabModule.init(g(":jqmData(component='featureModelsTabModule')")) } catch (v) { console.log("couldn't update the vehicleCta") } } else { j.Show("Please enter a valid 5-digit ZIP code."); return } }); g(m.locateWrapper).find("#geoLocatePanelButton").on("click", function(v) { v.preventDefault(); if (typeof google === "object" && typeof google.maps === "object") { mGlobal.locationServicesV2.geoLocation.init() } else { var u = document.createElement("script"); u.type = "text/javascript"; u.src = "//maps.googleapis.com/maps/api/js?v=3.exp&client=" + o.options.googleMapsClientID + "&channel=m." + context.brand + ".com&sensor=true&callback=mGlobal.locationServicesV2.geoLocation.init"; document.body.appendChild(u) } }); g.mobile.activePage.find("#locatePanel .locateCxtBtn").on("click", function() { g.mobile.activePage.find("#locatePanel .cxtArea").hide(); g.mobile.activePage.find("#locatePanel .dealerArea").hide(); g.mobile.activePage.find("#locatePanel .inventoryArea").hide(); g.mobile.activePage.find("#locateZipCode").focus(); g.mobile.activePage.find("#locateZipCode").val(n()); g(m.noLocationDiv).show() }) }, j = { Hide: function() { g(m.errMsgCntr).html("").fadeOut() }, Show: function(o) { g(m.errMsgCntr).html(o).fadeIn() } }; return { init: r, subscriptions: a, attachEvents: p, fetchDealerData: l, fetchInventoryData: e, renderResults: i, drawGoogleMaps: q, errMsg: j } }(jQuery)); var mGlobal = mGlobal || {}; mGlobal.jacksonHoleVehSlider = mGlobal.jacksonHoleVehSlider || {}; mGlobal.jacksonHoleVehSlider = (function(g) { var e = { currentYear: mGlobalConfig.year, availableYears: Vehicles.getAvailableYears(), $jacksonHoleVehList: ".jacksonVehList" }; function d(i, j) { var k = g.mobile.activePage; g(k).find(i.$jacksonHoleVehList).off("vmousedown").on("vmousedown", "a", function(p) { var r = "", l = g(this).parent().attr("data-myc"), q, n; if (l) { q = Vehicles.getFamilyFromMYC(l); n = Vehicles.getYearFromMYC(l) } r = "/kr/mobile/vehicles/" + n + "/" + q.replace(/_/g, "-") + "/"; g(this).attr("href", r); var m = "content_mobile"; var o = n + "_" + q; linkTrack(m, o) }); g(k).find(i.$jacksonHoleVehList).off("click").on("click", "a", function(p) { var r = "", l = g(this).parent().attr("data-myc"), o = "", n = "content_mobile", q, m; if (l) { q = Vehicles.getFamilyFromMYC(l); m = Vehicles.getYearFromMYC(l); o += m + "_" + q } linkTrack(n, o); r = "/kr/mobile/vehicles/" + m + "/" + q.replace(/_/g, "-") + "/"; g.mobile.changePage(r) }) } function c(i, j) { context.year = i.currentYear; g.cachedScript(i.handlerbars.templateUrl).done(function(k, l) { if (l === "success") { b(i, j) } }) } function b(k, l) { var n = {}; if (l.data("royalSlider")) { l.data("royalSlider").destroy() } var j = (mGlobalConfig.addVehicle !== undefined) ? mGlobalConfig.addVehicle.model_years[k.currentYear] : false; n.vehicleList = mGlobal.common.getVehicles(k); delete n.vehicleList.srt_4x4; g.extend(n.vehicleList, j); var i = k.handlerbars.vehicleTemplate; var m = Handlebars.templates[i]; if (m) { g(k.$jacksonHoleVehList).html(m(n)).trigger("create") } setTimeout(function() { l.royalSlider(k.royalSlider); var s = g(".jacksonVehList").data("royalSlider"), o = -1; if (s) { var r = "", p = "", q = ""; if (s.numSlides === 1) { g(".rsBullets").hide() } g(".rsArrowLeft").click(function() { p = "prev" }); g(".rsArrowRight").click(function() { p = "next" }); g(".jacksonVehList").on("swipeleft", function(t) { if (!g(".jacksonVehList .rsArrowRight").hasClass("rsArrowDisabled")) { r = "swipe_next"; linkTrack("content_mobile", r); /*DATALAYER.linkTrack(this,{lpos:"content_mobile",lid:r,vars:{eVar68:"swipe",eVar70:"content_mobile",eVar75:r},events:"event31"})*/ } }); g(".jacksonVehList").on("swiperight", function(t) { if (!g(".jacksonVehList .rsArrowLeft").hasClass("rsArrowDisabled")) { r = "swipe_prev"; linkTrack("content_mobile", r); /*DATALAYER.linkTrack(this,{lpos:"content_mobile",lid:r,vars:{eVar68:"swipe",eVar70:"content_mobile",eVar75:r},events:"event31"})*/ } }); s.ev.off("rsAfterSlideChange").on("rsAfterSlideChange", function(u, t) { var v = ""; if (s.dragSuccess !== true) { v = p; if (s.currSlideId !== s.numSlides) { linkTrack("content_mobile", v); /*DATALAYER.linkTrack(this,{lpos:"content_mobile",lid:v,vars:{eVar68:"swipe",eVar70:"content_mobile",eVar75:v},events:"event31"})*/ } } }) } }, 50) } function a(k, j, i) { var l = k; i.currentYear = context.year = l; i.royalSlider.startSlideId = 0; b(i, j) } function f(j, k) { var l = ".ui-btn", i = ".buttonGroup .ui-btn"; g(j.$jacksonHoleVehList).off("click").on("click", i, function(r) { var m = g(this), o = m.find("button").attr("data-app"), p = m.parents(".jacksonVehListItem").attr("data-myc") || context.myc, u = ""; if (p) { var t = Vehicles.getYearFromMYC(p); var n = Vehicles.getFamilyFromMYC(p); context.vehicle = n; context.cCode = p; context.year = t } var s = m.find("button").attr("data-lid"); var q = t + "_" + n + "_mobile"; linkTrack(q, s); o = mGlobalConfig.appURLs[o]; if (o) { if (o.check_myc && p) { u = o.targetLocation_myc.replace(" + myc + ", p) } if (o.external) { window.location = u } else { g.mobile.changePage(o.targetLocation); g(this).attr("href", u) } } else { u = "/kr/mobile/vehicles/" + context.year + "/" + (context.vehicle).replace(/_/g, "-") + "/"; g.mobile.changePage(u); g(this).attr("href", u) } }) } function h(i, j) { this.element = j; this.settings = g.extend({}, e, i); this.settings.currentYear = g.cookie("yearSelected", { path: "/" }) || this.settings.currentYear; c(this.settings, this.element); d(this.settings, this.element); f(this.settings, this.element) } return { init: h, } })(jQuery); var mGlobal = mGlobal || {}; mGlobal.vehicleInfo = mGlobal.vehicleInfo || {}; mGlobal.vehicleInfo = (function(c) { var b = { $vehicleInfo: ".vehicleInfo", $title: ".vehicleInfo h1", $subHead: ".vehicleInfo h2.subHead", $availableTxt: ".vehicleInfo .priceMPG p.splEdTxt", $priceMPG: ".vehicleInfo .priceMPG", $price: ".vehicleInfo .priceMPG .price", $currency: ".vehicleInfo .priceMPG .value sup", $msrp: ".vehicleInfo .price .value i, .vehicleInfo .price .value em", $cityMPG: ".vehicleInfo .cityMPG", $hwyMPG: ".vehicleInfo .hwyMPG", $cityMPGValue: ".vehicleInfo .cityMPG .value", $hwyMPGValue: ".vehicleInfo .hwyMPG .value", $vehicleImg: "#vehicleImg", $imgWidth: 300, $imgHeight: 150, $imgType: "jpg" }; function a(t, j) { var l = c.mobile.activePage.find(".priceMPG").length; if (l) { var r = {}, i = ""; if (mGlobalConfig.chooseVehicle.MPGLabel !== "MPG") { c(t.$hwyMPG).html(c(t.$hwyMPG).html().replace("MPG", mGlobalConfig.chooseVehicle.MPGLabel)); c(t.$cityMPG).html(c(t.$cityMPG).html().replace("MPG", mGlobalConfig.chooseVehicle.MPGLabel)) } if (mGlobalConfig.currency !== "$") { c(t.$currency).html(mGlobalConfig.currency) } if (context.brand === "fiatusa" && (context.myc === "CUX201504" || context.myc === "CUX201404")) { c(t.$hwyMPG).html(c(t.$hwyMPG).html().replace(/MPG(e)?/gi, "MPGe")); c(t.$cityMPG).html(c(t.$cityMPG).html().replace(/MPG(e)?/gi, "MPGe")) } c(t.$hwyMPG).html(c(t.$hwyMPG).html().replace(/(MPG|UP TO MPG)/i, "UP TO MPG")); c(t.$cityMPG).html(c(t.$cityMPG).html().replace(/(MPG|UP TO MPG)/i, "UP TO MPG")) } if (context.brand === "dodge" && t.specialEdition) { i = (context.vehicle).split("_")[0]; if (i === "grand") { i = "grand_caravan" } r = { family: i, vehicle: context.vehicle, vehicleDetails: mGlobalConfig.specialEdition[i][context.vehicle] }; context.myc = r.vehicleDetails.myc; context.vehicle = i; c(t.$title).html(mGlobal.common.formatDisplay(r.vehicleDetails.fullDisplay)); c(t.$subHead).html(mGlobal.common.formatDisplay(r.vehicleDetails.subHead)); c(t.$availableTxt).html(mGlobal.common.formatDisplay(r.vehicleDetails.availableText)); c(t.$price + " span:eq(0)").html(r.vehicleDetails.packageText); c(t.$price + " span:eq(1) em").html(r.vehicleDetails.packagePrice); c(t.$price + " span:eq(2) em").html(r.vehicleDetails.msrp); c(t.$cityMPGValue).html(r.vehicleDetails.cityMPG); c(t.$hwyMPGValue).html(r.vehicleDetails.hwyMPG); c(t.$cityMPG + "," + t.$hwyMPG).find(".tooltip").attr("title", r.vehicleDetails.mpgDisclaimer); return } var n = "", p = "", e = Vehicles.getMPG(context, "city"), q = Vehicles.getMPG(context), g = context.brand, o = context.year, f = context.vehicle, k = context.model, h = Vehicles.getTrim({ year: o, vehicle: f, model: k }); if (c.mobile.activePage.hasClass("page-vlp") && !context.model) { p = Vehicles.getDescription({ year: o, vehicle: f }).replace(context.year + " ", "") } else { if (c.mobile.activePage.hasClass("page-vlp") && context.model) { p = Vehicles.getDescription({ year: o, vehicle: f }).replace(context.year + " ", ""); p += " " + Vehicles.getTrimDisplay(context) } else { p = Vehicles.getDescription({ year: o, vehicle: f }); if (k) { if (context.ccode === "CUC201509UFCL41A" || context.ccode === "CUC201509UFCS41A") { p += "" + Vehicles.getTrimDisplay({ year: o, vehicle: f, model: k }) } else { p += " " + Vehicles.getTrimDisplay({ year: o, vehicle: f, model: k }) } } } } p = p.replace(/_/g, " "); if (f === "fiat_500e" || f === "fiat_500c") { c(t.$title).addClass("noTxtTransform") } c(t.$title).html(mGlobal.common.formatDisplay(p)); if (l) { c(t.$msrp).html(Vehicles.getMSRP(context).slice(1)); c(t.$cityMPGValue).html(e); c(t.$hwyMPGValue).html(q); c(t.$cityMPG + "," + t.$hwyMPG).find(".tooltip").attr("title", Vehicles.getMPG(context, "disclaimer")); if (!e) { c(t.$cityMPG).remove() } if (!q) { c(t.$hwyMPG).remove() } if (g === "ramtrucks" && (!e || !q || e === "0" || q === "0")) { var s = ""; c(t.$priceMPG).find(".mpg").remove(); if (k && Vehicles.model_years[o][f].models[k].capacityValue !== undefined) { s = '
' + Vehicles.model_years[o][f].capacityName + '+' + Vehicles.model_years[o][f].models[k].capacityValue + "lbs
" } else { s = '
' + Vehicles.model_years[o][f].capacityName + '+' + Vehicles.model_years[o][f].capacityValue + "lbs
" } c(t.$priceMPG).append(s) } if (mGlobalConfig.onlyHwyMPG) { c(t.$cityMPG).remove() } } j.attr("data-myc", Vehicles.getModelYearCode(context)); if (c(t.$vehicleImg).length > 0) { var m = Vehicles.getImg({ year: o, vehicle: f, trim: h }, t.$imgType, t.$imgHeight, t.$imgWidth) || null; c(t.$vehicleImg).attr("src", m) } } function d(e, f) { if (context.vehicle === "blacktop_special_edition") { return } this.element = f; this.settings = c.extend({}, b, e); a(this.settings, this.element) } return { init: d } })(jQuery); var galleryFSData = galleryFSData || {}; (function(g) { var f = "colorizrGalleryModule", e, d = { url: "/2013/compass/index.html", $galleryTabs: ".galleryTabs", $galleryExpanLink: "a.galleryExpand", $vlpFullScreenItems: "#vlp-fullscreen-items", $rsGCaption: ".rsGCaption", $galleryTabTemplate: "galleryModuleTabs.tmpl", $galleryCarouselTemplate: "galleryModuleCarousel.tmpl", $galleryModule: ".galleryModule", $galleryModuleWrap: ".galleryModuleWrap", $galleryCarouselFSTemplate: "galleryModuleCarouselFS.tmpl", $colorizer: ".colorizer", disclaimerTxt: " model shown. Not all colors shown are available on all models.", customDisclaimerTxt: "Not all colors shown are available on all models.", fireThumbMediaEvent: true, fireColorMediaEvent: true }, b = { "0": "exterior", "1": "interior", "2": "videos", "3": "colors", "4": "info_icon", "5": "close_icon", "6": "info_icon" }; var a = { exteriorData: [], interiorData: [], videoData: [], colorData: [], isScriptLoaded: false, isColorDataLoaded: false, carouselTemplate: "", _index: (context.activeGalleryTabIndex !== null) ? context.activeGalleryTabIndex : 0, _data: {}, _currSlideId: 0, tracking_id: 0, attachEvents: function(i) { e = this; e.element = g(i.element); var h = e.element.parent(d.$galleryModuleWrap); context.thumbID = (context.thumbID !== null) ? context.thumbID : 1; h.on("click", ".galleryTabs li", function(m) { mGlobal.updateDisclaimers.init(); if (!g(this).children("a").hasClass("active")) { g(e.options.$galleryTabs + " li a").removeClass("active"); g(this).find("a").addClass("active"); if (!!e.element.data("royalSlider")) { e.element.data("royalSlider").destroy() } context.thumbID = 1; var k = g(this).find("a").html(); var l = k.split(" "); var j = l[0]; if (k.indexOf("Exterior") > -1) { e._index = 0 } else { if (k.indexOf("Interior") > -1) { e._index = 1 } else { if (k.indexOf("Videos") > -1) { e._index = 2 } else { if (k.indexOf("Colors") > -1) { e._index = 3 } } } } context.activeGalleryTab = b[e._index]; context.activeGalleryTabIndex = e._index; if (e._index !== 3 && e.element.hasClass("colorizer")) { e.element.removeClass("colorizer").addClass("galleryModule") } e.showHideCaption(); e.createThumbnails(e._index) } }); h.on("click", "#rsGIcon", function(j) { h.toggleClass("showCaptions"); mGlobal.updateDisclaimers.init(); if (h.hasClass("showCaptions")) { e.tracking(4) } else { e.tracking(6) } e.showHideCaption() }); h.on("click", ".rsTmb img", function(j) { h.find(d.$galleryModule).removeClass("showCaptions"); if (!g(j.target).parent().hasClass("rsTmb")) { e.tracking(5) } mGlobal.updateDisclaimers.init() }); /*h.on("click",".rsThumbsArrowRight",function(j){DATALAYER.linkTrack(this,{lpos:"gallery_mobile",lid:b[e._index]+"_thumb_next",events:"event31"})});h.on("click",".rsThumbsArrowLeft",function(j){DATALAYER.linkTrack(this,{lpos:"gallery_mobile",lid:b[e._index]+"_thumb_prev",events:"event31"})});*/ h.on("click", "a.galleryExpand", function(j) { j.preventDefault(); g.mobile.changePage(j.currentTarget.href); context.gallery = (context.gallery !== "") ? context.gallery : "gallery/" + context.activeGalleryTab + "/thumb_1"; var k = "/" + context.year + "/" + context.vehicle + "/" + (context.gallery).replace("thumb", "large"); if (context.brand === "fiatusa") { mobile.tracking.pageTrack(k) } }); if ((/iphone|ipad|ipod/gi).test(navigator.appVersion)) { g(".royalSlider").addClass("ios") } }, showHideCaption: function() { setTimeout(function() { if (g(".galleryTabs").find("a[data-lid='video']").hasClass("active")) { g(e.options.$galleryExpanLink).hide() } }, 2000); if (e._index === 2 || e._index === 3 || g(d.$galleryModuleWrap).hasClass("showCaptions")) { g(e.options.$galleryExpanLink).hide() } else { g(e.options.$galleryExpanLink).show() } }, dataProcess: function(n) { var l = n.options, h, o = "", m = "", i = {}; if (context.prevPage.indexOf("/" + context.vehicle.replace("_", "-") + "/") === -1) { context.activeGalleryTab = "exterior"; context.activeGalleryTabIndex = 0; context.thumbID = 1; this._currSlideId = 0; this._index = 0; context.gallery = context.section = "landing" } this.element = g(n.element); this.options = n.options; g("body").data("_currSlideId", e._currSlideId); if (context.year === "2015" && context.vehicle === "300") { context.myc = "CUC201501" } var k = context.myc; if (!k) { k = context.year + "_" + context.brand + "_" + context.vehicle } if ((context.myc !== "" || k === "2015_jeep_renegade") && !context.model) { g.get(l.galleryData.Url + k + ".js", function(p) { e.getData(p, k) }, "json") } else { if (!!context.model) { if (g.mobile.activePage.data().page == "buzzmodels") { g.get("/hostb/assets/data/compare/colors/" + context.ccode + ".json", function() {}, "json").done(function(q) { i = q; for (var p = 0; p < q.exterior.length; p++) { i.exterior[p].code = context.ccode } g.get(l.galleryData.Url + context.ccode + ".js", function(r) { e.getData(r, context.ccode, i) }, "json") }) } else { g.get(l.galleryData.Url + context.ccode + ".js", function(p) { e.getData(p, context.ccode, i) }, "json") } } else { var j = setTimeout(function() { gallerySliderData.getJSONData("/kr/mobile/js/jackson-hole/galleryData.js") }, 300) } } }, getData: function(l, j, i) { var k = l[j].Gallery, h = 0; this.exteriorData = k.Exterior; this.interiorData = k.Interior; this.videoData = k.Video; if (g.mobile.activePage.data().page == "buzzmodels") { k.Color.exterior = i.exterior; this.colorData = (typeof k.Color === "undefined") ? [] : k.Color.exterior } else { this.colorData = (typeof k.Color === "undefined") ? [] : k.Color.exterior } if (this.exteriorData.length !== 0) { h++ } if (this.interiorData.length !== 0) { h++ } if (this.videoData.length !== 0) { h++ } if (this.colorData.length !== 0) { this.colorData = e.sortColorData(this.colorData); h++ } this.createThumbnails(); this.createTabs() }, sortColorData: function(h) { h = e.filterColorData(h); return h }, sortDataWithMSRP: function(h) { return h.sort(function(k, j) { var i = Vehicles.getMSRP({ year: context.year, vehicle: context.vehicle, model: Vehicles.getModelFromCcode(k.code) }, true); var l = Vehicles.getMSRP({ year: context.year, vehicle: context.vehicle, model: Vehicles.getModelFromCcode(j.code) }, true); return l - i }) }, filterColorData: function(l) { var k = []; for (var j = 0; j < l.length; j++) { var h = Vehicles.getModelFromCcode(l[j].code); if (h) { h; k.push(l[j]) } else { j++ } } return k }, createTabs: function() { var m = this.exteriorData.length, k = this.interiorData.length, i = this.videoData.length, l = this.colorData.length; var j = {}, h = []; if (m > 0) { h.push({ section: "Exterior", lid: "exterior", brandEvent: "event113", vehicleEvent: "event143", count: m }) } if (k > 0) { h.push({ section: "Interior", lid: "interior", brandEvent: "event113", vehicleEvent: "event143", count: k }) } if (i > 0) { h.push({ section: "Videos", lid: "video", brandEvent: "event113", vehicleEvent: "event143", count: i }) } if (l > 0) { h.push({ section: "Colors", lid: "colors", brandEvent: "event126", vehicleEvent: "event156", count: l }) } j.tabList = h; g.cachedScript(e.options.handlerbars.galleryTabTemplateUrl).done(function(n, p) { if (p === "success") { var o = Handlebars.templates[e.options.$galleryTabTemplate]; g(e.options.$galleryTabs).html(o(j)); if (g.cookie("OldVan") == "true" || window.location.search.split("/")[3] == "gallery") { context.activeGalleryTabIndex = 2; e.showHideCaption() } g.cookie("OldVan", "false"); g(e.options.$galleryTabs + " li:eq(" + context.activeGalleryTabIndex + ") a").addClass("active"); g(e.options.$galleryTabs + " li a").each(function(q, s) { var r = (typeof g(s).attr("data-brand-event") == "undefined") ? "" : g(s).attr("data-brand-event"); var t = (r.indexOf("event126") != -1) ? (g(s).attr("data-lid").indexOf("360") != -1) ? "event72,event71" : "event71" : "event31"; g(s).attr("data-adobe-events", t) }); context.activeGalleryTab = b[context.activeGalleryTabIndex] } }) }, createThumbnails: function(h) { if (g.cookie("OldVan") == "true" || window.location.search.split("/")[3] == "gallery") { context.activeGalleryTabIndex = 2; e.showHideCaption() } g.cookie("OldVan", "false"); h = (h !== undefined) ? h : (context.activeGalleryTabIndex !== null) ? context.activeGalleryTabIndex : 0; context.activeGalleryTabIndex = h; if (context.prevPage.indexOf("/" + context.vehicle.replace("_", "-") + "/") === -1) { context.gallery = context.section = "landing" } else { context.gallery = context.section = "gallery/" + b[context.activeGalleryTabIndex] + "/thumb_" + context.thumbID } switch (h) { case 0: delete e._data.swatchVehicleList; e._data.vehicleList = this.exteriorData; break; case 1: delete e._data.swatchVehicleList; e._data.vehicleList = this.interiorData; break; case 2: delete e._data.swatchVehicleList; e._data.vehicleList = this.videoData; break; case 3: delete e._data.vehicleList; if (this.colorData[0].swatch.indexOf("") === -1) { e._data.swatchVehicleList = e.replaceString(this.colorData) } else { e._data.swatchVehicleList = this.colorData } break } if (h !== 2 || h !== 3) { galleryFSData = e._data } if (h === 3) { g.cachedScript(e.options.colorizer.handlerbars.templateUrl).done(function(i, k) { if (k === "success") { var j = Handlebars.templates[e.options.colorizer.handlerbars.colorizerTemplate]; g(e.options.$galleryModule).removeClass("galleryModule").addClass("colorizer").html(j(e._data)).trigger("create"); setTimeout(function() { g(e.element).royalSlider(e.options.colorizer.royalSlider); var n = e.element.data("royalSlider"), p = "", m = "", o = false, l = false, q = n.currSlideId; n.slides[0].holder.on("rsAfterContentSet", function() { g(".rsGCaption").append("" + e.colorData[0]["code"] + "") }); n.ev.off("rsBeforeMove").on("rsBeforeMove", function(t, r) { var s = ""; r = (r < 0) ? e.colorData.length - 1 : r; r = (r === e.colorData.length) ? 0 : r; if (r !== "prev" && r !== "next") { s = g(e.options.$galleryTabs).find(".active").html().toLowerCase(); s = s.replace(/[(\d+\)\s]/g, ""); p = "colors_thumb_" + e.colorData[r].desc.replace(/[\W]+/gi, "_").replace(/[_]+/gi, "_"); m = "gallery_mobile" } else { s = g(e.options.$galleryTabs).find(".active").html().toLowerCase(); s = s.replace(/[(\d+\)\s]/g, ""); p = s + "_" + r; m = "gallery_mobile" } setTimeout(function() { g(".rsGCaption").append("" + e.colorData[(!isNaN(r)) ? r : n.currSlideId]["code"] + "") }, 300) }); e.element.off("click").on("click", ".rsArrow, .rsNavItem", function(r) { if (g(r.currentTarget).is(".rsNavItem")) { l = true } else { o = true } }); n.ev.off("rsAfterSlideChange").on("rsAfterSlideChange", function(s) { var r; if (o) { p = p; r = "click" } else { if (l) { p = p.replace("_color", ""); r = "click" } else { p = "colors_" + ((q < n.currSlideId) ? "next" : "prev") + "_swipe"; m = "gallery_mobile"; r = "swipe" } } var t = { lpos: m, lid: p, vars: { eVar68: r, eVar75: m + ":" + p }, mediaEvents: [{ name: "event126" /*,value:DATALAYER.getMediaEvent("brand")*/ }, { name: "event156" /*,value:DATALAYER.getMediaEvent("vehicle")*/ }], events: "event70,event71" }; /*DATALAYER.linkTrack(this,t);*/ o = false; l = false; q = n.currSlideId }) }, 50) } context.activeGalleryTab = "exterior"; context.activeGalleryTabIndex = h = 0; context.thumbID = 1; this._currSlideId = 0; this._index = 0; context.gallery = context.section = "" }); return } else { if (!this.isScriptLoaded) { g.cachedScript(e.options.handlerbars.galleryCarouselTemplateUrl).done(function(i, j) { if (j === "success") { e.carouselTemplate = Handlebars.templates[e.options.$galleryCarouselTemplate]; e.thumbnailProcess(e._data, h) } }); this.isScriptLoaded = true } else { e.thumbnailProcess(e._data, h) } } }, replaceString: function(h) { g.each(h, function(i, j) { j.swatch = e.options.colorizer.colorizerData.imgBaseUrl + j.swatch.replace(/[\\]+/g, "/") + e.options.colorizer.colorizerData.swatchExtn; j.vehicle = e.options.colorizer.colorizerData.imgBaseUrl + j.vehicle.replace(/[\\]+/g, "/") + e.options.colorizer.colorizerData.vehicleImgExtn; if (context.model) { j.code = "" } else { if (context.vehicle === "ram_promaster_window_van" || context.vehicle === "ram_promaster_chassis_cab" || context.vehicle === "ram_promaster_cutaway") { j.code = d.customDisclaimerTxt } else { j.code = e.replaceDisclaimerStr(j.code, d.disclaimerTxt) } } }); return h }, replaceDisclaimerStr: function(k, m) { var j = "", n = { year: context.year, vehicle: context.vehicle, model: Vehicles.getModelFromCcode(k) }, i = Vehicles.getTrim(n); delete n.model; n.trim = i; j = Vehicles.getTrimDisplay(n); var h = Vehicles.getMSRP(n); m = " model shown. MSRP starting at " + h + ". Not all colors shown are available on all models."; var l = m; return (j + l) }, thumbnailProcess: function(k, h) { var j = true; g(this.options.$galleryModule).html(this.carouselTemplate(k)).trigger("create"); if (h === 2 && h === 3) { j = false } var i = { fullscreen: { enabled: j }, startSlideId: (function() { return (context.thumbID !== null) ? (context.thumbID - 1) : 0 }()) }; g.extend(true, e.options.royalSlider, i); setTimeout(function() { g(e.element).royalSlider(e.options.royalSlider); e.carouselEvents() }, 50); setTimeout(function() { g(".galleryModuleWrap").addClass("initialized") }, 1500) }, tracking: function(h) { var i = b[h]; var j = (h == 3) ? "event71" : "event31"; /*DATALAYER.linkTrack(this,{lpos:"gallery_mobile",lid:i,events:j});*/ context.section = "gallery/" + i; context.gallery = context.section; if (h < 3) { mobile.tracking.pageTrack() } }, carouselEvents: function() { var i = g.mobile.activePage.find(this.options.$galleryModule); var h = i.data("royalSlider"); g("body").data("_currSlideId", (context.thumbID - 1)); h.ev.on("rsVideoStop", function() { g(e.options.$rsGCaption).removeClass("hide"); /*DATALAYER.linkTrack(this,{lpos:"gallery_mobile",lid:"video_"+(e._currSlideId+1)+"_close"})*/ }); h.ev.on("rsOnCreateVideoElement", function() { g(e.options.$rsGCaption).addClass("hide"); /*DATALAYER.linkTrack(this,{lpos:"gallery_mobile",lid:"video_"+(e._currSlideId+1)+"_play"})*/ }); h.ev.off("rsAfterSlideChange").on("rsAfterSlideChange", function(j, q) { this.stopVideo(); e._currSlideId = h.currSlideId; g("body").data("_currSlideId", e._currSlideId); var o = b[e._index] + "_banner_" + (e._currSlideId + 1), n = "", r = b[e._index]; if (h.dragSuccess !== true) { o = "thumb_" + (h.currSlideId + 1); n = "gallery_mobile"; context.section = "gallery/" + r + "/" + o; context.gallery = context.section; /*var k={lpos:n,lid:r+"_"+o,vars:{eVar68:"click",eVar75:n+":"+r+"_"+o},mediaEvents:[{name:"event113",value:DATALAYER.getMediaEvent("brand")},{name:"event143",value:DATALAYER.getMediaEvent("vehicle")}],events:"event70,event31"};DATALAYER.linkTrack(this,k);*/ mobile.tracking.pageTrack("/vehicles/" + context.year + "/" + context.vehicle) } else { var l = (q === "next") ? h.currSlideId + 1 : h.currSlideId, p = (q === "prev") ? h.currSlideId - 1 : h.currSlideId; context.section = "gallery/" + r + "/thumb_" + l; context.gallery = context.section; o = r + "_thumb_" + (l + 1); n = "gallery_mobile"; if (h.currSlideId > e.tracking_id) { o = r + "_next" } else { o = r + "_prev" } var k = { lpos: n, lid: o, vars: { eVar68: "swipe", eVar75: n + ":" + o }, mediaEvents: [{ name: "event113" /*,value:DATALAYER.getMediaEvent("brand")*/ }, { name: "event143" /*,value:DATALAYER.getMediaEvent("vehicle")*/ }], events: "event70,event31" }; /*DATALAYER.linkTrack(this,k);*/ /* */ var m = "/" + context.brand + "/kr/mobile/vehicles/" + context.year + "/" + context.vehicle + "/gallery/" + r + "/thumb_" + (l + 1) + "/"; /* */ pageTrack(m, true) } context.thumbID = h.currSlideId + 1; e.tracking_id = h.currSlideId; mGlobal.updateDisclaimers.init() }) } }; function c(i, h) { this.element = i; this.options = g.extend({}, d, h); this.options.royalSlider.startSlideId = (function() { return (context !== undefined && context.thumbID !== null) ? (context.thumbID - 1) : 0 }()); this.init() } c.prototype.init = function() { a.attachEvents(this); a.dataProcess(this) }; g.fn[f] = function(h) { return this.each(function() { if (!g.data(this, f)) { g.data(this, f, new c(this, h)) } }) } })(jQuery); $(document).on("pageshow", function() { if ($.mobile.activePage.attr("data-url") == "uconnectSystems") { var a = window.location.search.substring(1).split("&"); var b = a[1], c = a[2]; context.pageType = "vehiclePage"; context.pageName = "interior:uconnect"; context.year = b; context.vehicle = c } }); $(document).one("pageshow", ".uconnect-systems", function(a) { (function() { $.ajax({ url: "/crossbrand/uconnectsystems/data/systemCompatibility.json", dataType: "json", success: function(b) { mGlobal.uConnectOverlay.init(b) }, error: function(b) { console.log("Unable to Load System Compatibility Info Reason:" + b.statusText) } }) })() }); mGlobal.uConnectOverlay = (function(d, f, h, e, b) { var a, j = { brand: "", vehicle: "", year: "", systems: "", activeSystem: "", activeSlide: "", activeTab: "" }, c = { systemInfo: [] }, k = mGlobalConfig.uConnectOverlay; var g = { init: function(n) { var l = f.location.search.substring(1).split("&"); var m; j.brand = l[0] || context.brand, j.year = l[1] || context.year, j.vehicle = l[2] || context.vehicle, j.systems = n[j.brand][j.year][j.vehicle]; if (j.brand === "ram") { m = "/kr/mobile/vehicles/" + j.year + "/ram-" + j.vehicle + "/" } else { if (j.brand === "fiat") { m = "/kr/mobile/vehicles/" + j.year + "/fiat-" + j.vehicle + "/" } else { m = "/kr/mobile/vehicles/" + j.year + "/" + j.vehicle.replace(/_/g, "-") + "/" } } a = { $headerTitle: d(".uconnect-header h5"), $exitOverlay: d(".module-exit"), $backButton: d(".module-back"), $vehicleInfo: d(".vehicle-info"), $container: d(".uconnect-container"), $systemsWrapper: d(".systems-wrapper"), $moduleWrapper: d(".module-wrapper"), $uconnectAccess: d(".uconnect-access"), $disclaimers: d(".uconnect-footer"), $mobileApp: d(".mobile-app") }; g.loadJSON(j.systems); g.initListeners(); g.disclaimerEvents(); g.exitOverlay(a.$exitOverlay, m); g.setVehicleName(a.$vehicleInfo.find("span"), j.vehicle) }, initListeners: function() { var l = function(p, o) { p.royalSlider(o); if (!d(p).is(":visible")) { p.show() } }; var m = function(o, s, p) { var r, q; if (o === "detail") { r = "uconnect-detail-overlay-mobile"; q = "system-" } else { r = "uconnect-app-overlay-mobile"; q = "app-" } /*s.on("click",".rsThumb",function(){DATALAYER.linkTrack(this,{lpos:r,lid:this.firstChild.dataset.lid})});s.on("click",".rsThumbsArrowLeft",function(){DATALAYER.linkTrack(this,{lpos:r,lid:q+"icon-prev"})});s.on("click",".rsThumbsArrowRight",function(){DATALAYER.linkTrack(this,{lpos:r,lid:q+"icon-next"})});s.on("click",".rsArrowRight",function(){DATALAYER.linkTrack(this,{lpos:r,lid:q+"next"})});s.on("click",".rsArrowLeft",function(){DATALAYER.linkTrack(this,{lpos:r,lid:q+"prev"})})*/ }; var n = function(o) { a.$backButton.toggle(); a.$headerTitle.html(o) }; a.$systemsWrapper.on("click", ".module-link", function() { var r = d(this), p, o; var s = function(t) { t.ev.on("rsAfterSlideChange", function(v) { var u = t.currSlide.content.data("screen"); d(".screen-content").hide(); d('.module-wrapper [data-system-id="' + j.currentSystem + '"] .screen-content[data-screen="' + u + '"]').show(); mGlobal.updateDisclaimers.init(); setTimeout(function() { if (d(".dynamicDisclaimer p").length) { d(".uconnect-footer").fadeIn() } else { d(".uconnect-footer").fadeOut() } }, 5000); g.disclaimerEvents() }) }; var q = function(t) { t.ev.on("rsDragRelease", function(u) { var v; if (u.target.className == "rsImg rsMainSlideImage") { v = "screen-swipe" } else { v = "function-dot-swipe" } /*DATALAYER.linkTrack(this,{lpos:"uconnect-detail-overlay-mobile",lid:v})*/ }) }; j.activeSystem = o = r.data("system-id"); d(".module-wrapper .module-content").css("display", "none"); d(".module-wrapper .uconnect-footer").css("display", "none"); d.mobile.changePage("#moduleWrapper", { transition: "slide", reverse: true, changeHash: false }); d(h).off("pageshow", "#moduleWrapper").on("pageshow", "#moduleWrapper", function(u) { j.currentSystem = o; p = d('.system-carousel[data-system="' + o + '"]'); n("Uconnect " + o + " System"); d('.module-wrapper [data-system-id="' + o + '"]').fadeIn(); var w = d(".subscreens"); w.collapsible({}); /*w.on("expand",function(){DATALAYER.linkTrack(this,{lpos:"uconnect-detail-overlay-mobile",lid:this.dataset.subscreen+"-expand"});mGlobal.updateDisclaimers.init();g.disclaimerEvents()});w.on("collapse",function(){DATALAYER.linkTrack(this,{lpos:"uconnect-detail-overlay-mobile",lid:this.dataset.subscreen+"-collapse"})});*/ d(".uconnect-footer").fadeIn(); mGlobal.updateDisclaimers.init(); setTimeout(function() { if (d(".dynamicDisclaimer p").length) { d(".uconnect-footer").fadeIn() } else { d(".uconnect-footer").fadeOut() } }, 5000); g.disclaimerEvents(); if (p.length) { var v, t; l(p, k.uconnectCarousel); v = p.data("royalSlider"); v.updateSliderSize(true); s(v); q(v); t = v.currSlide.content.data("index"); d('.module-wrapper [data-system-id="' + o + '"] .screen-content[data-index="' + t + '"]').show(); m("detail", p, v); d(".swipe-icon").fadeIn(); setTimeout(function() { d(".swipe-icon").fadeOut() }, 2000) } else { d('.module-wrapper [data-system-id="' + o + '"] .screen-content').show() } }) }); a.$uconnectAccess.on("click", ".mobile-app-cta", function() { d.mobile.changePage("#mobileApp", { transition: "slide", reverse: true, changeHash: false }); d(h).off("pageshow", "#mobileApp").on("pageshow", "#mobileApp", function(q) { var o = d(".access-carousel"), p; a.$backButton.show(); a.$headerTitle.html("Uconnect Access Mobile App"); l(o, k.uconnectCarousel); p = o.data("royalSlider"); p.updateSliderSize(true); o.fadeIn(); d(".uconnect-footer").fadeIn(); d('.slide-info p[data-index="' + p.currSlideId + '"]').show(); p.ev.on("rsAfterSlideChange", function(r) { var s = p.currSlideId; d(".slide-info p").hide(); d('.slide-info p[data-index="' + s + '"]').show(); mGlobal.updateDisclaimers.init(); g.disclaimerEvents() }); m("app", o, p) }) }); d(".vehicle-health-cta").on("click", function() { d.mobile.changePage("#vehicleHealth", { transition: "slide", reverse: true, changeHash: false }); d(h).off("pageshow", "#vehicleHealth").on("pageshow", "#vehicleHealth", { transition: "slideup", changeHash: false }, function(o) { n("Vehicle Health Report") }) }); d(h).off("pagehide", "#moduleWrapper, #vehicleHealth, #mobileApp").on("pagehide", "#moduleWrapper, #vehicleHealth, #mobileApp", function(o) { n("Uconnect Systems") }) }, accessAppInit: function(o, n) { var m = {}; var l = function(q, p, r) { d.cachedScript(q).done(function(s, u) { var t; if (u === "success") { t = Handlebars.templates[p]; r.append(t(m)) } else { r.append("
Unable to process Template
") } }) }; d.ajax({ url: "/crossbrand/uconnectsystems/data/uConnectAccess.json", dataType: "json", success: function(p) { m.templateData = {}; m.templateData = p[o][n]; l(k.handlerbars.accessTemplate, "uConnectAccess.tmpl", a.$mobileApp) }, error: function(p) { console.log("Unable to load uConnectAccess.json Data; Reason:" + p.statusText) } }) }, disclaimerEvents: function() { d(".uconnect-footer").off("click").on("click", "#footerDisclaimers", function() { d(".disclaimer-text").toggle(); d.mobile.silentScroll(d(this).position().top - 100) }) }, setVehicleName: function(l, m) { if (context.brand === "jeep") { l.append(m.replace(/_/g, " ").replace(/srt/g, "SRT")) } else { if (context.brand === "chrysler") { if (m === "town_country") { m = "town & country" } l.append(m.replace(/_/g, " ").toUpperCase()) } else { if (context.brand === "ramtrucks") { if (m === "promaster") { m = " ram promaster®" } if (m === "promaster_city") { m = "ram promaster city®" } l.append(m.replace(/_/g, " ").toUpperCase()) } else { if (context.brand === "fiatusa") { if (m === "500l") { m = "FIAT® 500L" } else { m = "FIAT® " + m } l.append(m.replace(/_/g, " ")) } else { l.append(m.replace(/_/g, " ").toUpperCase()) } } } } }, exitOverlay: function(m, l) { m.attr("href", l); m.attr("data-lpos", "uconnect-selection-overlay-mobile") }, loadJSON: function(p) { var n = function(r, q, s, t) { d.cachedScript(r).done(function(u, w) { var v; if (w === "success") { v = Handlebars.templates[q]; s.append(v(c)); t && t() } else { s.append("
Unable to process Data
") } }) }; var o = function(q) { if (q.length) { a.$uconnectAccess.fadeIn(); g.accessAppInit(j.brand, j.vehicle) } }; if (p.length) { var l = p.pop(), m = "/crossbrand/uconnectsystems/data/" + l + ".json"; d.ajax({ url: m, dataType: "json", success: function(q) { c.systemInfo.push(q); g.loadJSON(p) }, error: function(q) { console.log("unable to load " + l + ".json Data; Reason:" + q.statusText); g.loadJSON(p) } }) } else { n(k.handlerbars.systemTemplate, "uConnectSystems.tmpl", a.$systemsWrapper, function() { var r = d(".view-featured-offers"); var q = c.systemInfo; r.each(function(t) { var v = q[t].trims[j.brand][j.vehicle.replace(/_/g, "-")]; if (v !== b) { var s = d(this).find(".standard-on ul"), u = d(this).find(".available-on ul"); if (v.standard.length > 0) { for (i = 0; i < v.standard.length; i++) { s.append(d("
  • ").html(v.standard[i])) } } else { s.parent().hide() } if (v.available.length > 0) { for (i = 0; i < v.available.length; i++) { u.append(d("
  • ").html(v.available[i])) } } else { u.parent().hide() } } }); r.collapsible({}).show(); /*r.on("expand",function(){DATALAYER.linkTrack(this,{lpos:"uconnect-selection-overlay-mobile",lid:this.parentNode.dataset.system+"-view-trims-expand"})});r.on("collapse",function(){DATALAYER.linkTrack(this,{lpos:"uconnect-selection-overlay-mobile",lid:this.parentNode.dataset.system+"-view-trims-collapse"})});*/ o(d(".mobile-compatible")); mGlobal.updateDisclaimers.init(); a.$disclaimers.fadeIn() }); n(k.handlerbars.carouselTemplate, "uConnectModule.tmpl", a.$moduleWrapper) } }, getDetails: function() { return j } }; return { init: g.init, get: g.getDetails } })(jQuery, window, document, context); Handlebars.registerHelper("removeUnderscore", function(a) { return a.replace(/_/g, " ") }); Handlebars.registerHelper("detectVehicle", function(a) { return context.vehicle }); /** new vlp gallery **/ $(document).on("pageshow", ".page-vlp", function(a) { LazyLoader.loadLink("/crossbrand/kr/mobile/css/gallery/xbmod-gallery-carousel.css", function() {}); LazyLoader.loadLink("/kr/mobile/css/gallery/vlp-gallery.css", function() {}); LazyLoader.requires([{ src: "/crossbrand/kr/mobile/javascript/components/mGlobal.touchSwipe.min.js" }, { src: "/crossbrand/kr/mobile/javascript/components/mGlobal.xbmodGallery.js" }], function() { MainTabs.Module.buildTabControls(); var b = $.mobile.activePage.find("#vlp-gallery-video")[0], c = $.mobile.activePage.find("#vlp-gallery-exterior")[0], d = $.mobile.activePage.find("#vlp-gallery-interior")[0]; if (document.body.contains(c)) { xbmod.Gallery(document.querySelector("#vlp-gallery-exterior .gallery").querySelectorAll("div"), { container: "#vlp-gallery-exterior .gallery", carousel: true }) } if (document.body.contains(d)) { xbmod.Gallery(document.querySelector("#vlp-gallery-interior .gallery").querySelectorAll("div"), { container: "#vlp-gallery-interior .gallery", carousel: true }) } if (document.body.contains(b)) { xbmod.Gallery(document.querySelector("#vlp-gallery-video .gallery").querySelectorAll("div"), { container: "#vlp-gallery-video .gallery", carousel: true, videoPlayer: true }) } else {} $.mobile.activePage.find(".gallery-container").show() }); mGlobal.common.setContextByURL() }); var mGlobal = mGlobal || {}; mGlobal.siteSearch = mGlobal.siteSearch || {}; mGlobal.siteSearch = (function(b) { var a = 0; searchTerms = { list: [], vehicleList: function() { var c = (Vehicles.inventory ? Vehicles.active_years : Vehicles.getAvailableYears()); b.each(c, function(e) { var d = Vehicles.getAvailableVehicles({ year: c[e] }); b.each(d, function(g) { var h = Vehicles.getDescription({ year: c[e], vehicle: d[g] }), f = Vehicles.getAvailableTrims({ year: c[e], vehicle: d[g] }); if (f) { searchTerms.list.push({ term: h, type: "vhp", key: c[e] + "-" + d[g] }); b.each(f, function(j) { var i = Vehicles.getBaseModel({ year: c[e], vehicle: d[g], trim: f[j] }); var l = h + " " + Vehicles.getTrimDisplay({ year: c[e], vehicle: d[g], trim: f[j], model: i }); searchTerms.list.push({ term: l, type: "mhp", key: c[e] + "-" + d[g] + "-" + i }) }) } }) }) }, externalTermsList: function() { b.ajax({ url: "/kr/mobile/data/terms.json", dataType: "json" }).then(function(c) { b.each(c, function(d) { searchTerms.list.push(c[d]) }) }) } }; searchPage = { init: function(c) { if (c) { b("ul#pageSearch.ui-listview").html(""); b("ul#pageSearch").on("listviewbeforefilter", function(g, f) { var d = b(f.input).val(), h = ".ui-page-active ul#pageSearch.ui-listview"; b(h).html(""); if (b(".ui-page-active input.ui-input-text").val() == mobile.getParameterByName("q")) { setTimeout(function() { loadAndShowTerms.init(d, h, "", true) }, 1000) } else { loadAndShowTerms.init(d, h, "", true) } }); b(".ui-page-active input.ui-input-text").val(c).trigger("change"); b(".searchPanel input.ui-input-text").val("") } else { b(".ui-page-active input.ui-input-text").val("").trigger("change") } b(".ui-page-active.page-search .ui-content a.ui-input-clear").off("click").on("click", function(d) { d.preventDefault(); b(".ui-page-active input.ui-input-text").val("").trigger("change") }); autoComplete.init() } }; loadAndShowTerms = { init: function(d, f, c, e) { b("a.seeMatches").hide(); b(".searchPanel").removeClass("all-result-active"); if (d && d.length >= 2) { b.mobile.loading("show"); b(f).html("").listview("refresh").trigger("updatelayout"); autoComplete.showResults(d, f, c, e); b.mobile.loading("hide"); b("a.seeMatches").attr("href", "").attr("href", "/kr/mobile/search.html?q=" + d) } } }; autoComplete = { init: function() { b("ul.siteSearch").on("listviewbeforefilter", function(f, d) { var c = b(d.input).val(), g = "ul.siteSearch.ui-listview"; b(g).html(""); loadAndShowTerms.init(c, g, 5, false) }) }, generateURLs: function(d, c) { var e = c.split("-"); if (d === "app") { return "/kr/mobile/apps/" + c + "/" } else { if (d === "notapp") { return "/kr/mobile/apps/" + c + ".html" } else { if (d === "appbmo") { return "/kr/mobile/vehicles/selector.html?app=bmo" } else { if (d === "vhp") { return "/kr/mobile/vehicles/" + e[0] + "/" + e[1].replace("_", "-") + "/" } else { if (window.brandConfig && typeof brandConfig.model_as_vlp !== "undefined" && typeof brandConfig.model_as_vlp[e[1]] !== "undefined") { if (e[2] === brandConfig.model_as_vlp[e[1]][Vehicles.getTrim({ vehicle: e[1], year: e[0], model: e[2] })]) { return "/kr/mobile/vehicles/" + e[0] + "/" + e[1].replace("_", "-") + "/" + Vehicles.getTrim({ vehicle: e[1], year: e[0], model: e[2] }) + "/" } } else { if (d === "mhp") { return "/kr/mobile/models/?year=" + e[0] + "&vehicle=" + e[1] + "&model=" + e[2] } else { return false } } } } } } }, showResults: function(h, d, i, k) { var g = "", e, f = 0; b.each(searchTerms.list, function(n) { var l = new RegExp(h, "gi"), m = ""; if (i && f >= i) { return false } if (l.test(searchTerms.list[n].term)) { if (searchTerms.list[n].url) { m = searchTerms.list[n].url } else { m = autoComplete.generateURLs(searchTerms.list[n].type, searchTerms.list[n].key) } if (!searchTerms.list[n].external && !searchTerms.list[n].ajaxDisabled) { g += '
  • 짰", "").replace(" ", "_") + '" href="' + m + '">' + searchTerms.list[n].term + "
  • " } else { g += '
  • 짰", "").replace(" ", "_") + '" href="' + m + '">' + searchTerms.list[n].term + "
  • " } f++ } }); if (i && f >= i) { b("a.seeMatches").show(); b(".searchPanel").addClass("all-result-active") } else { b("a.seeMatches").hide(); b(".searchPanel").removeClass("all-result-active") } b(d).html(""); b(d).html(g).listview("refresh").trigger("updatelayout"); var c = ""; if (k) { e = '
  • ' + b(d).find("li").length + ' results for "' + h + '"

  • '; b(d).prepend(e).listview("refresh"); c = "" } if ((b(d).find("li").length === 0 && !k) || (b(d).find("li").length === 1 && k)) { var j = '
  • There are no results for "' + h + '".Please check your search terms and try again.

  • Try your search on the full site: visit ' + context.brand + '.com

  • Still need help? contact us

  • '; b(d).html("").html(j).listview("refresh").trigger("updatelayout"); b("a.seeMatches").hide(); b(".searchPanel").removeClass("all-result-active"); c = "/no_results"; context.section = "no_results/" + h; /*DATALAYER.pageTrack("no-results")*/ } else { context.section = h; /*DATALAYER.pageTrack("with-results")*/ } }, }, events = function() { var c = b.mobile.activePage; c.find("header a.icon-search").off("click").on("click", function() { var d = c.find(".searchPanel").hasClass("ui-panel-closed"); if (d) { c.find("ul.siteSearch.ui-listview").html("").listview("refresh").trigger("updatelayout"); c.find(".searchPanel input.ui-input-text").val("").trigger("change"); c.find(".searchPanel a.seeMatches").hide(); c.find(".searchPanel").removeClass("all-result-active") } }); c.find("a.seeMatches").off("click").on("click", function(h) { var d = (!!b(this).parents("nav#menuPanel").length), g = "see_all_matches", f = "search_panel_mobile"; if (d) { f = "menu_global_header_mobile" } if (h.handled !== true) { h.preventDefault(); window.location = b(this).attr("href"); h.handled = true; return false } }); c.find(".searchPanel a.ui-input-clear").off("click").on("click", function(h) { h.preventDefault(); var d = (!!b(this).parents("nav#menuPanel").length), g = "search_submit", f = "search_panel_mobile"; if (d) { f = "menu_global_header_mobile" } window.location = c.find(".searchPanel a.seeMatches").attr("href"); return false }); c.find(".searchPanel input.ui-input-text").keypress(function(g) { var d, f = (!!b(this).parents("nav#menuPanel").length); if (g.keyCode === 13) { if (f) { d = c.find("nav#menuPanel .searchPanel a.ui-input-clear") } else { d = c.find("footer.ui-footer .searchPanel a.ui-input-clear") } d.trigger("click") } }); c.find("ul.siteSearch.ui-listview").off("click").on("click", function() { c.find(".ui-panel-position-right").data("forceClose", true).panel("close") }) }, init = function(d) { b("a.seeMatches").hide(); b(".searchPanel").removeClass("all-result-active"); events(); searchTerms.list = []; searchTerms.vehicleList(); searchTerms.externalTermsList(); if (b.mobile.activePage.hasClass("page-search")) { var c = mobile.getParameterByName("q"); if (c !== "") { searchPage.init(c) } } else { autoComplete.init() } }; return { init: init, events: events, } }(jQuery)); var mGlobal = mGlobal || {}; mGlobal.featureModelsTabModule = mGlobal.featureModelsTabModule || {}; mGlobal.featureModelsTabModule = (function(d) { var c = { container: ".featureModelsTabModule", element: "a", navBar: ".ui-navbar", navBarContent: ".navbarContent", tabContent: ".tabContent", currentOpenTab: "models", cookiedVehicle: "", modelListisEmpty: null }; function b(h) { c.modelListisEmpty = d.mobile.activePage.find(".modelList .ui-collapsible-set").children().length; var g = d.mobile.activePage.attr("data-page"); if (g === "buzzmodels") { if (!d(h.find(c.navBar + " " + c.element + ".features")).hasClass("ui-btn-active")) { h.find(c.navBar + " " + c.element).removeClass("ui-btn-active"); h.find(c.navBar + " " + c.element + ".features").addClass("ui-btn-active") } if (!d(h.find(c.tabContent + ".features")).hasClass("active")) { h.find(c.tabContent).removeClass("active"); d(h.find(c.tabContent + ".features")).addClass("active") } } if (context.trim !== "" && typeof context.trim !== "undefined") { h.find(c.navBar + " " + c.element).removeClass("ui-btn-active"); h.find(c.navBar + " " + c.element + ".features").addClass("ui-btn-active"); h.find(c.tabContent).removeClass("active"); d(h.find(c.tabContent + ".features")).addClass("active") } d(".modelList div h3 a").on("click", a); h.on("vmousedown", c.navBar + " " + c.element, function(k, j) { var l = this; var i = d(l).attr("data-tab"); if (d(l).hasClass("ui-btn-active")) { return } if (d(l).hasClass("models") && c.modelListisEmpty === 0) { d.mobile.loading("show"); mGlobal.chooseModels.init(mGlobalConfig.chooseModels, h.find(".modelList")) } c.modelListisEmpty = d.mobile.activePage.find(".modelList .ui-collapsible-set").children().length; if (i === "models" && c.modelListisEmpty <= 0) { d.mobile.loading("show"); mGlobal.chooseModels.init(mGlobalConfig.chooseModels, h.find(".modelList")) } h.find(c.navBar + " " + c.element).removeClass("ui-btn-active"); d(h.find(c.navBar + " " + c.element + "." + i)).addClass("ui-btn-active"); d(l).parents(c.navBar).siblings(c.navBarContent).find(c.tabContent).removeClass("active"); d(l).parents(c.navBar).siblings(c.navBarContent).find("." + i).addClass("active"); if (!j) { if (i == "features") { f() } else { /*DATALAYER.linkTrack(this,{lpos:"content_mobile",lid:i+"_select"})*/ } } c.currentOpenTab = i }); d("ul.ui-grid-a li", h).on("click", function() { mGlobal.updateDisclaimers.init(16) }) } function a(j) { var g = "features_mobile", i = "model_selector", h = d(this).parent().next("div.ui-collapsible-content").attr("aria-hidden"); if (h === "false") { i += "_collapse" } else { i += "_expand" } /*DATALAYER.linkTrack(true,{lpos:g,lid:i})*/ } function f() { var m = d(".additionalFeatures > div > div:not(.ui-collapsible-collapsed)"); if (d(m).size() >= 1) { var h = d(m).find("h3 > a .ui-btn-text").clone().children().remove().end().text().toLowerCase().replace(/&/g, "").replace(/ /g, "_").replace(/,/g, "").replace(/__/g, "_"); var l = "features_select"; var j = "content_mobile"; function g(n) { if (DTM.ufaClickObj.hasOwnProperty(n)) { return [{ name: DTM.ufaClickObj[n].brand /*,value:DATALAYER.getMediaEvent("brand")*/ }, { name: DTM.ufaClickObj[n].vehicle /*,value:DATALAYER.getMediaEvent("vehicle")*/ }] } else { return [] } } var k = ""; if (DTM.ufaClickObj.hasOwnProperty(h)) { k = "," + (DTM.ufaClickObj[h].counter) } var i = { lpos: j, lid: l, vars: { eVar75: j + ":" + l, eVar68: "click" }, events: "event70" + k }; i.mediaEvents = g(h); /*DATALAYER.linkTrack(true,i)*/ } } function e(g) { var h = !d.mobile.activePage.find(".modelList .ui-collapsible-set").html(); if (h && context.year && context.vehicle) { d.mobile.loading("show"); mGlobal.chooseModels.init(mGlobalConfig.chooseModels, g.find(".modelList")) } b(g) } return { init: e, trackOpenFeature: f } })(jQuery); var mGlobal = mGlobal || {}; mGlobal.additionalFeatures = mGlobal.additionalFeatures || {}; mGlobal.additionalFeatures = (function(c) { var b = { $additionalFeatures: ".additionalFeatures", $featureList: ".featureList", $imageFullScreen: "#imageFullScreen", lidValue: "" }, a, h, d, e, f; function g(j, k) { a = c.mobile.activePage, h = a.find(j.$featureList), d = a.find(j.$additionalFeatures), f = a.find(j.$imageFullScreen); h.off("click").on("click", "a", function(n) { if (!c(this).hasClass("uconnect-cta")) { n.preventDefault(); c.mobile.loading("show"); var o, p, m, r = c(this).next().text(), t = c(this).parents(".ui-collapsible").find(".ui-btn-text"), s = t.children().text(), q = c(this).attr("data-video-id"); j.lidValue = mGlobal.nameCleaner(t.text().replace(s, "")); j.currentIndex = Number(c(n.target).parents("li:first").index() + 1); j.contentType = "_fullscreen"; j.contentEvent = "_open"; if (q !== "" && q !== undefined) { var l = ''; c(l).insertAfter(f.find("img")); f.find("img").hide(); f.find("iframe").on("load", function() { f.popup("open"); c.mobile.loading("hide") }); j.contentType = "_video"; j.contentEvent = "_play" } else { o = c(this).find("img").attr("data-largeImg"), p = c(this).find("img").attr("data-largeImgAlt"), m = f.find("img").attr("src"); if (m !== o) { f.find("img").css("visibility", "hidden") } else { f.popup("open"); c.mobile.loading("hide") } f.find("img").attr({ src: o, alt: p }).on("load", function() { c(this).css("visibility", "visible"); f.popup("open"); c.mobile.loading("hide") }) } /*DATALAYER.linkTrack(this,{lpos:"features_mobile",lid:j.lidValue+"_"+j.currentIndex+j.contentType+j.contentEvent,vars:{eVar75:"features_mobile"},events:"event31"});*/ context.subsection = mGlobal.nameCleaner(r) } }); f.off("click").on("click", "a", function(l) { if (/[\/]gucci/.test(c.mobile.activePage.attr("data-url")) || context.specialEditionPage) { l.preventDefault() } }); f.off("popupafterclose").on("popupafterclose", function(l, m) { context.subsection = ""; if (f.find("iframe").length !== -1) { f.find("iframe").remove(); f.find("img").attr("style", "") } /*DATALAYER.linkTrack(this,{lpos:"features_mobile",lid:j.lidValue+"_"+j.currentIndex+j.contentType+"_close",vars:{eVar75:"features_mobile"},events:"event31"})*/ }); c(window).off("orientationchange").on("orientationchange", function(l) { f.fadeOut(1).fadeIn(1500) }); c(".additionalFeatures div h3 a").off("click").on("click", function(o) { var n = c(this); var l = window.innerWidth > window.innerHeight ? 0 : 50; c(".additionalFeatures").find(".ui-collapsible-content").addClass("ui-collapsible-content-collapsed"); var m = c(o.target).offset().top; c.mobile.silentScroll(m - l); mGlobal.common.accordionTracking(n.parent(), "features_mobile", "true", "section") }); c(window).off("hashchange").on("hashchange", function(m) { var l = location.hash.replace("#", ""); if (location.hash.indexOf("ui-state=dialog") === -1 && location.hash !== "") { c.grep(d.find("h3.ui-collapsible-heading"), function(p, n) { var o = c.trim(c(p).text().toLowerCase()).replace(/\s/g, "_"); if (o.indexOf(l) !== -1 && o.indexOf("expand") !== -1) { return setTimeout(function() { c(p).trigger("click") }, 1) } }) } }) } function i(j, k) { this.element = k; this.settings = c.extend({}, b, j); g(this.settings, this.element) } return { init: i } })(jQuery); var mGlobal = mGlobal || {}; mGlobal.chooseModels = mGlobal.chooseModels || {}; mGlobal.chooseModels = (function(g) { var e = { $chooseModelList: ".modelList .ui-collapsible-set", chooseOption: ".modelList .chooseVehicleNav", modelListHeading: ".modelList .ui-collapsible-heading", modelLocServiceDiv: ".modelLocService", btnTextSpan: ".button-text", uiCollapsibleContent: ".ui-collapsible-content", availableTxt: " Available near you", notAvailableTxt: "Search inventory available near you", spanCountElem: ".count" }, c, q = false, h = {}; function k(t, v, w) { c = g.mobile.activePage; var r = "", s = c.find(t.chooseOption); if (t.filterValues && context.vehicle !== "ram_promaster_city_wagon" && context.vehicle !== "ram_promaster_city_tradesman" && context.vehicle !== "ram_cv" && context.vehicle !== "ram_promaster" && context.vehicle !== "ram_promaster_window_van" && context.vehicle !== "ram_promaster_chassis_cab" && context.vehicle !== "ram_promaster_cutaway") { for (var u = 0; u < t.filterValues.length; u++) { r += '
  • ' + t.filterValues[u] + "
  • " } s.html(r).promise().done(function() { s.find("a").eq(0).addClass("active"); s.off("click", "a").on("click", "a", function() { var x = g(this).text(); if (x === "4x4") { context.drive = 1 } else { context.drive = 0 } t.currentDrive = x; s.find("a").removeClass("active"); context.currentDrive = x; g(this).addClass("active"); b(t, v, w) }) }) } } function a(r, s, t) { LazyLoader.loadScript(r.handlerbars.templateUrl, function() { b(r, s, t) }) } function i(s) { var t = {}, r = Vehicles.getModelYearCode(context); if (q) { t.modelList = h[r].trimData[context.drive] } else { t.modelList = h[r].trimData } return t } function m(s, x, w, t) { var r = Vehicles.getModelYearCode(context), v = r.replace(/\bCU/, "IU"), y = (context.brand === "fiatusa") ? 200 : 25, u = g.cookie("zipcode"); if (mGlobalConfig.market === "en_US") { if (h[r] && h[r].inventoryData) { p(s, x, w, h[r].inventoryData, t) } else { g.getJSON("/hostd/getsearchinventory.json?src=sape&inventoryType=N&sortOrder=ASC&modelYearCode=" + v + "&zipCode=" + u + "&zipDistance=" + y, function(z) { h[r] = h[r] || {}; h[r].inventoryData = z[0].data.inventoryVehicles }).done(function() { p(s, x, w, h[r].inventoryData, t) }) } } else { p(s, x, w, _inventoryData, t) } } function p(u, y, w, x, v) { var s = 0; for (var r = 0; r < y.modelList.length; r++) { if (typeof x !== "undefined" && x.length) { for (var t = 0; t < x.length; t++) { if ((y.modelList[r].ccode.replace(/\bCU/, "IU")) === (x[t].CCode)) { s += 1 } } y.modelList[r].inventoryCount = s; s = 0 } if (y.modelList[r].ccode === "CUC201509UFCS41A") { y.modelList[r].fullDisplay = context.year + " " + context.brand + " 200c" } else { if (y.modelList[r].ccode === "CUC201509UFCL41A") { y.modelList[r].fullDisplay = context.year + " " + context.brand + " 200s" } } if (context.myc === "CUX201503") { y.modelList[r].fullDisplay = y.modelList[r].fullDisplay.replace("ABARTH Abarth", "ABARTH") } if (context.brand === "ramtrucks") { if (y.modelList[r] && y.modelList[r].fullDisplay) { y.modelList[r].fullDisplay = y.modelList[r].fullDisplay.replace(/(Window Van )/, "").replace(/(Chassis Cab )/, "").replace(/(Cutaway )/, "") } } y.modelList[r].checkInventory = (mGlobalConfig.market === "en_US") || null } y.currentYear = context.year; y.currentVehicle = context.vehicle; y.currentVehicleX = context.vehicle.replace("_", "-"); y.brand = context.brand; y.currentVehicleX = context.vehicle.replace(/_/g, "-"); y.currency = mGlobalConfig.currency; y.bmo = (u.buildPrice.visible) ? u.buildPrice.label : null; y.fadLpos = u.findDealer.lpos; y.fadLink = u.findDealer.url; y.fadLabel = u.findDealer.label; y.filterValue = mGlobalConfig.chooseModels.filterValue; if (w) { g(u.$chooseModelList).html(w(y)).trigger("create").promise().done(function() { if (context.myc === "CUX201502" || context.myc === "CUX201504") { g(u.$chooseModelList).find(".modelName").addClass("noTxtTransform") } mGlobal.common.initOnPage(mGlobalConfig); var z = f()["region_code"]; if (context.brand === "ramtrucks") { if (z && z == "TX") { g('.modelList .dataSource.ui-collapsible.ui-collapsible-inset[data-ccode="CUT201613DS6H61G"]').show(); g('.modelList .dataSource.ui-collapsible.ui-collapsible-inset[data-ccode="CUT201613DS1H61G"]').show(); g('.modelList .dataSource.ui-collapsible.ui-collapsible-inset[data-ccode="CUT201613DS1H61F"]').hide(); g('.modelList .dataSource.ui-collapsible.ui-collapsible-inset[data-ccode="CUT201613DS6H61F"]').hide() } else { g('.modelList .dataSource.ui-collapsible.ui-collapsible-inset[data-ccode="CUT201613DS6H61G"]').hide(); g('.modelList .dataSource.ui-collapsible.ui-collapsible-inset[data-ccode="CUT201613DS1H61G"]').hide(); g('.modelList .dataSource.ui-collapsible.ui-collapsible-inset[data-ccode="CUT201613DS1H61F"]').show(); g('.modelList .dataSource.ui-collapsible.ui-collapsible-inset[data-ccode="CUT201613DS6H61F"]').show() } } }); g.mobile.loading("hide"); v.find("div.dataSource:eq(0)").data("state", "expanded"); mGlobal.updateDisclaimers.init() } } function f() { var v = g.cookie("CT_Akamai"), s = [], t = {}, u, r, w; if (v) { s = v.split(","); r = s.length; for (u = 0; u < r; u++) { w = []; w = s[u].split("="); t[w[0]] = w[1] } } return t } function j() { Handlebars.registerHelper("modelTitle", function() { if (context.brand === "ramtrucks") { return brandConfig.UpdateVLPModelTabTrimNames(this) } else { var r = Vehicles.getDescription({ year: this.ccode.substring(3, 7), vehicle: context.vehicle, model: Vehicles.getModelFromCcode(this.ccode) }).replace(/(\s[4x2|4x4]{3})|(\sawd)|(\sfwd)|(\srwd)/i, ""); return r } }) } function d() { g(document).on("collapse expand", "div.modelList .dataSource", function(t) { var u = g(this); var s = t.type; if (s == "collapse" && u.data("state") == "expanded") { u.data("state", "collapsed") } else { if (s == "expand" && u.data("state") != "expanded") { u.data("state", "expanded") } } }); var r = function(u) { var s = u.parent("h3").attr("data-lpos"); var t = u.parent().next().attr("aria-hidden"); setTimeout(function() { var v = u.closest(".dataSource").data("state"); /*if(typeof s!="undefined"&&v!=null){DATALAYER.linkTrack(true,{lpos:s,lid:v})}*/ }, 500) }; if (navigator.userAgent.match(/iPhone/i)) { g(document).on("touchstart", ".ui-collapsible-heading a", function(s) { r(g(this)) }) } else { g(document).on("tap", ".ui-collapsible-heading a", function(s) { r(g(this)) }) } /*g(document).on("tap","div.modelList a.compare-model-btn",function(s){DATALAYER.linkTrack(true,{lpos:g(this).attr("data-lpos"),lid:g(this).attr("data-lid")})});*/ g(document).on("click", "div.modelList .modelIMGLink, div.modelList .models-spec-button", function(t) { var s = g(this).attr("data-lpos").replace(/(_\w+)+?\1/, "$1"); /*DATALAYER.linkTrack(true,{lpos:s,lid:g(this).attr("data-lid")})*/ }) } function b(r, s, u) { var v = i(r), t = Handlebars.templates[r.handlerbars.chooseModelTemplate]; m(r, v, t, s) } function o(u) { var r = Vehicles.getTrim(u); var t = Vehicles.getTrimDisplay(u); var s = Vehicles.getBaseModel(u); var v = { resp: "jpg", height: 280, width: 560, bkgnd: "white" }; return { fullDisplay: Vehicles.getDescription({ year: u.year, vehicle: u.vehicle }) + " " + t, ccode: Vehicles.getCcode(u), variation: Vehicles.getTrimDisplay(u), msrp: Vehicles.getMSRP(u).replace("$", ""), img: Vehicles.getImg(u, v), llp: Vehicles.getLLP(u), trim: r, trimX: r, trimY: s } } function l(w) { var s = Vehicles.getModelYearCode(context), v = []; if (!s || s.length != 9) { return false } var s = Vehicles.getModelYearCode(context); if (h[s] && h[s].trimData) { w() } else { var t = []; var u = { year: context.year, vehicle: context.vehicle }; var r = Vehicles.getAvailableTrims(u); g.getJSON("/hostd/vehicleservice/getvehicleverbiage.json?modelYearCode=" + s, function(C) { var F = C[0].data.vehicles; for (var A = 0; A < F.length; A++) { var x = F[A].variation; t[x] = []; for (var z = 0; z < 3; z++) { t[x].push({ feature: F[A].verbiageList[z].value }) } } for (var D = 0; D < r.length; D++) { delete u.drive; u.trim = r[D]; var y = Vehicles.getTrimDisplay(u); var E; if (q) { var G = Vehicles.getAvailableDrives(u); for (var A = 0; A < G.length; A++) { var B = G[A].id; u.drive = B; v[B] = v[B] || []; E = o(u); E.whybuy = t[y]; v[B].push(E) } } else { E = o(u); E.whybuy = t[y]; v.push(E) } } h[s] = h[s] || {}; h[s].trimData = v; w() }) } } function n(r, s) { j(); if (r.filterValues && r.filterValues.length) { context.drive = 0; q = true } else { q = false } this.element = s; this.settings = g.extend({}, e, r); var u = this; var t = g.cookie("zipcode"); l(function() { a(u.settings, u.element, t); k(u.settings, u.element, t) }) } d(); return { init: n } })(jQuery); /*! chrysler-mobile - v0.1.0 - 2014-07-16, 8:34 PM EDT */ /*! chrysler-mobile - v0.1.0 - 2014-12-15, 2:11 PM GMT+0530 */ var mGlobal = mGlobal || {}; mGlobal.locationServicesModule = mGlobal.locationServicesModule || {}, mGlobal.locationServicesModule = function(a) { var b = { locServWrapper: ".ui-page-active #locationServices", geoLocCntr: ".ui-page-active .noLocation", stockCntr: ".ui-page-active .stockAvailable", zipCntr: ".ui-page-active .zipBox", dealers: ".ui-page-active #stockDealers", errMsgCntr: ".ui-page-active .errorMsg", zipUpdateCntr: ".ui-page-active .changeZip .zip", msgCntr: ".ui-page-active .message", noResultsCntr: ".ui-page-active .noResults", geoLocBtn: ".ui-page-active #geoLocateButton", zipSearhBtn: ".ui-page-active #zipSearch", zipChBtn: ".ui-page-active .changeZipButton", viewBtns: ".ui-page-active .stockOptions", zipInput: ".ui-page-active #zipCode", loader: ".ui-page-active .loading" }, c = { init: function() { a(b.geoLocBtn).off("click").on("click", function(a) { if (a.preventDefault(), linkTrack("available_near_you_mobile", "use_current_location"), "object" == typeof google && "object" == typeof google.maps) mGlobal.locationServicesModule.geoLocation.init(); else { var b = document.createElement("script"); b.type = "text/javascript", b.src = "//maps.googleapis.com/maps/api/js?v=3.exp&sensor=true&callback=mGlobal.locationServicesModule.geoLocation.init", document.body.appendChild(b) } }), a(b.zipSearhBtn).off("click").on("click", function(c) { c.preventDefault(), linkTrack("available_near_you_mobile", "zip_submit"); var d = a(b.zipInput).val(); e.valid(d) ? g.init(d) : errorMsg.Show("Please enter a valid 5-digit ZIP code.") }), a(b.zipChBtn).off("click").on("click", function(c) { c.preventDefault(), linkTrack("available_near_you_mobile", "change_zip"), a(b.stockCntr).hide(), a(b.noResultsCntr).hide(), a(b.msgCntr).html("See all available in your area"), a(b.geoLocCntr).show() }), a(b.locServWrapper).off("tap").on("tap", ".ui-collapsible-heading", function() { var b = a(this); mGlobal.common.accordionTracking(b, "available_near_you_mobile", !1) }) } }, d = { Hide: function() { a(b.errMsgCntr).html("").fadeOut() }, Show: function(c) { a(b.errMsgCntr).html(c).fadeIn() } }, e = { exists: function() { var c = a.cookie("zipcode") || context.zip || mobile.getParameterByName("zip"); return c && /\d{5}/.test(c) ? (a(b.zipInput).val(c), a(b.zipUpdateCntr).html(c)) : c = !1, c }, valid: function(a) { return "" !== a && /\d{5}/.test(a) ? !0 : !1 }, save: function(c) { context.zip = c, a(b.zipInput).val(c), a(b.zipUpdateCntr).html(c), a.cookie("zipcode", context.zip, { expires: 365, path: "/" }), mobile.updateZipCookie(c) } }, f = { init: function() { d.Hide(), a(b.loader).fadeIn(), navigator.geolocation ? navigator.geolocation.getCurrentPosition(f.success, f.errors, { enableHighAccuracy: !0, timeout: 15e3, maximumAge: 0 }) : d.Show("Error: Geolocate not supported by this device") }, success: function(c) { d.Hide(); var h = (c.coords.latitude, c.coords.longitude, new google.maps.Geocoder), i = new google.maps.LatLng(c.coords.latitude, c.coords.longitude); h.geocode({ location: i }, function(c, d) { if ("OK" === d) { var h = c[0], i = h.address_components, j = i.length, k = i[j - 1].short_name; a(b.loader).hide(), e.save(k), g.init(k) } else f.errors() }) }, errors: function(c) { d.Hide(); var e; switch (c) { case c.PERMISSION_DENIED: e = "You must activate location services within your web browser setting to use this feature."; break; default: e = "There was a problem getting your location. To continue please enter your ZIP code in the field above." } a(b.loader).hide(), d.Show(e) } }, g = { dealerData: [], dealerList: [], init: function(c) { d.Hide(), a(b.loader).fadeIn(), context && mobile.updateVehContext(); var f = (context.brand.replace(/^(.)|\s(.)/g, function(a) { return a.toUpperCase() }), context.ccode_i + "_" + context.llp), h = "/hostd/getlocatedealers.json", i = "ccode=" + context.ccode_i + "&llp=" + context.llp + "&zipCode=" + c + "&zipDistance=300&"; a.ajax({ url: h, data: i, type: "GET", dataType: "json", success: function(a) { e.save(c), g.dealerData = a[0].data.dealers, g.getInventory(f, c, g.makeTemplate) }, error: function(c) { d.Show("Network Error: " + c.message), a(b.stockCntr).hide(), a(b.loader).hide() } }).done(function() {}) }, getDealerName: function(a) { for (var b = 0; b < g.dealerData.length; b++) if (g.dealerData[b].dealerCode === a) return { name: g.dealerData[b].name, totalInventoryCount: g.dealerData[b].inventoryCount }; return "" }, getInventory: function(b, c, d) { a.getJSON("/hostd/getsearchinventory.json?src=sape&inventoryType=N&sortOrder=ASC&ccode=" + b + "&zipCode=" + c + "&zipDistance=300", function(a) { _inventory = a[0].data.inventoryVehicles; var b = _inventory.length; _inventory = _inventory.sort(function(a, b) { return a.zipDistance - b.zipDistance }); for (var c = "", e = 0, f = "", h = "", i = "", j = 0; j < _inventory.length; j++) if (_inventory[j].dealerCode !== c) { i = _inventory[j].extImage, b ? (f = i && i.length > 4 ? "/iof/?IMG=EAL_IMAGES//" + i.replace(/[\\]+/g, "//") + "&HEIGHT=120&WIDTH=180&AUTOTRIM=1" : "/crossbrand/kr/mobile/images/no_image.jpg", h = _inventory[j].vin) : (f = "/crossbrand/kr/mobile/images/no_image.jpg", h = "na"); var k = g.getDealerName(_inventory[j].dealerCode), l = k.name, m = k.totalInventoryCount; g.dealerList.push({ dealerName: l, distance: _inventory[j].zipDistance, dealerCode: _inventory[j].dealerCode, vehicleVIN: h, inventoryCount: m, vehicleThumb: f }), e = 0, c = _inventory[j].dealerCode } else c = _inventory[j].dealerCode, e++; d(g.dealerList) }) }, sortDealers: function(a, b) { var c = a; c.length === b && (c.sort(function(a, b) { return 0 === a.inventoryCount && 0 === b.inventoryCount ? parseInt(a.distance) > parseInt(b.distance) ? 1 : -1 : 0 !== a.inventoryCount && 0 === b.inventoryCount ? -1 : 0 === a.inventoryCount && 0 !== b.inventoryCount ? 1 : 0 !== a.inventoryCount && 0 !== b.inventoryCount ? a.distance - b.distance : 0 }), g.makeTemplate(_inventory)) }, makeTemplate: function(c) { d.Hide(); var e = {}, f = 0, g = [], h = "mGlobal.locationServices.tmpl", i = "/crossbrand/kr/mobile/javascript/components/mGlobal.locationServices.tmpl.js"; if (a.each(c, function(a) { 2 > a && c[a].inventoryCount > 0 && g.push({ dealerName: c[a].dealerName, inventoryCount: c[a].inventoryCount, distance: c[a].distance, vehicleVIN: c[a].vehicleVIN, dealerCode: c[a].dealerCode, vehicleThumb: c[a].vehicleThumb, contextYear: context.year, contextVehicle: context.vehicle.replace(/[_]+/g, " ").replace(/^(.)|\s(.)/g, function(a) { return a.toUpperCase() }), contextModel: context.model.replace(/[_]+/g, " ").replace(/^(.)|\s(.)/g, function(a) { return a.toUpperCase() }) }) }), e.dealerList = g, a.cachedScript(i).done(function(c, d) { if ("success" === d) { var f = Handlebars.templates[h], g = f(e); a(b.dealers).html(g).trigger("create"), a(b.viewBtns).off("click").on("click", "a", function(b) { b.preventDefault(), linkTrack("available_near_you_mobile", a(this).data("lid")), a.mobile.changePage(a(this).attr("href")) }) } }), a.each(e.dealerList, function(a) { f += e.dealerList[a].inventoryCount }), 0 === f) { a(b.geoLocCntr).hide(), a(b.loader).fadeOut(), a(b.stockCntr).hide(), a(b.msgCntr).html("No models available near you"), a(b.noResultsCntr).show(); var j = context.brand.replace(/^(.)|\s(.)/g, function(a) { return a.toUpperCase() }) + " " + context.vehicle.replace(/[_]+/g, " ").replace(/^(.)|\s(.)/g, function(a) { return a.toUpperCase() }); a(b.noResultsCntr).find(".sniInfo span.veh").html(j) } else 1 === f ? (a(b.geoLocCntr).hide(), a(b.loader).fadeOut(), a(b.stockCntr).show(), a(b.msgCntr).html(f + " model available near you")) : (a(b.geoLocCntr).hide(), a(b.loader).fadeOut(), a(b.stockCntr).show(), a(b.msgCntr).html(f + " models available near you")) } }, h = function() { if (a(b.locServWrapper).trigger("collapse"), d.Hide(), c.init(), a(b.noResultsCntr).hide(), e.exists()) { var f = e.exists(); g.init(f), e.save(f) } else a(b.zipInput).val(""), a(b.msgCntr).html("See all available in your area"), a(b.stockCntr).hide(), a(b.geoLocCntr).show() }; return { init: h, zipCode: e, geoLocation: f } }(jQuery); /*! chrysler-mobile - v0.1.0 - 2014-02-03, 3:04 PM EST */ "undefined" == typeof console && (window.console = { log: function() {} }), function(a) { function b(b, c, d, e) { var f = { data: e || (c ? c.data : {}), _wrap: c ? c._wrap : null, tmpl: null, parent: c || null, nodes: [], calls: j, nest: k, wrap: l, html: m, update: n }; return b && a.extend(f, b, { nodes: [], parent: c }), d && (f.tmpl = d, f._ctnt = f._ctnt || f.tmpl(a, f), f.key = ++v, (x.length ? t : s)[v] = f), f } function c(b, e, f) { var g, h = f ? a.map(f, function(a) { return "string" == typeof a ? b.key ? a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + q + '="' + b.key + '" $2') : a : c(a, b, a._ctnt) }) : b; return e ? h : (h = h.join(""), h.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function(b, c, e, f) { g = a(e).get(), i(g), c && (g = d(c).concat(g)), f && (g = g.concat(d(f))) }), g ? g : d(h)) } function d(b) { var c = document.createElement("div"); return c.innerHTML = b, a.makeArray(c.childNodes) } function e(b) { return new Function("jQuery", "$item", "var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('" + a.trim(b).replace(/([\\'])/g, "\\$1").replace(/[\r\t\n]/g, " ").replace(/\$\{([^\}]*)\}/g, "{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g, function(b, c, d, e, f, h, i) { var j, k, l, m = a.tmpl.tag[d]; if (!m) throw "Template command not found: " + d; return j = m._default || [], h && !/\w$/.test(f) && (f += h, h = ""), f ? (f = g(f), i = i ? "," + g(i) + ")" : h ? ")" : "", k = h ? f.indexOf(".") > -1 ? f + h : "(" + f + ").call($item" + i : f, l = h ? k : "(typeof(" + f + ")==='function'?(" + f + ").call($item):(" + f + "))") : l = k = j.$1 || "null", e = g(e), "');" + m[c ? "close" : "open"].split("$notnull_1").join(f ? "typeof(" + f + ")!=='undefined' && (" + f + ")!=null" : "true").split("$1a").join(l).split("$1").join(k).split("$2").join(e ? e.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g, function(a, b, c, d) { return d = d ? "," + d + ")" : c ? ")" : "", d ? "(" + b + ").call($item" + d : a }) : j.$2 || "") + "_.push('" }) + "');}return _;") } function f(b, d) { b._wrap = c(b, !0, a.isArray(d) ? d : [r.test(d) ? d : a(d).html()]).join("") } function g(a) { return a ? a.replace(/\\'/g, "'").replace(/\\\\/g, "\\") : null } function h(a) { var b = document.createElement("div"); return b.appendChild(a.cloneNode(!0)), b.innerHTML } function i(c) { function d(c) { function d(a) { a += j, g = k[a] = k[a] || b(g, s[g.parent.key + j] || g.parent, null, !0) } var e, f, g, h, i = c; if (h = c.getAttribute(q)) { for (; i.parentNode && 1 === (i = i.parentNode).nodeType && !(e = i.getAttribute(q));); e !== h && (i = i.parentNode ? 11 === i.nodeType ? 0 : i.getAttribute(q) || 0 : 0, (g = s[h]) || (g = t[h], g = b(g, s[i] || t[i], null, !0), g.key = ++v, s[v] = g), w && d(h)), c.removeAttribute(q) } else w && (g = a.data(c, "tmplItem")) && (d(g.key), s[g.key] = g, i = a.data(c.parentNode, "tmplItem"), i = i ? i.key : 0); if (g) { for (f = g; f && f.key != i;) f.nodes.push(c), f = f.parent; delete g._ctnt, delete g._wrap, a.data(c, "tmplItem", g) } } var e, f, g, h, i, j = "_" + w, k = {}; for (g = 0, h = c.length; h > g; g++) if (1 === (e = c[g]).nodeType) { for (f = e.getElementsByTagName("*"), i = f.length - 1; i >= 0; i--) d(f[i]); d(e) } } function j(a, b, c, d) { return a ? void x.push({ _: a, tmpl: b, item: this, data: c, options: d }) : x.pop() } function k(b, c, d) { return a.tmpl(a.template(b), c, d, this) } function l(b, c) { var d = b.options || {}; return d.wrapped = c, a.tmpl(a.template(b.tmpl), b.data, d, b.item) } function m(b, c) { var d = this._wrap; return a.map(a(a.isArray(d) ? d.join("") : d).filter(b || "*"), function(a) { return c ? a.innerText || a.textContent : a.outerHTML || h(a) }) } function n() { var b = this.nodes; a.tmpl(null, null, null, this).insertBefore(b[0]), a(b).remove() } var o, p = a.fn.domManip, q = "_tmplitem", r = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /, s = {}, t = {}, u = { key: 0, data: {} }, v = 0, w = 0, x = []; a.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function(b, c) { a.fn[b] = function(d) { var e, f, g, h, i = [], j = a(d), k = 1 === this.length && this[0].parentNode; if (o = s || {}, k && 11 === k.nodeType && 1 === k.childNodes.length && 1 === j.length) j[c](this[0]), i = this; else { for (f = 0, g = j.length; g > f; f++) w = f, e = (f > 0 ? this.clone(!0) : this).get(), a.fn[c].apply(a(j[f]), e), i = i.concat(e); w = 0, i = this.pushStack(i, b, j.selector) } return h = o, o = null, a.tmpl.complete(h), i } }), a.fn.extend({ tmpl: function(b, c, d) { return a.tmpl(this[0], b, c, d) }, tmplItem: function() { return a.tmplItem(this[0]) }, template: function(b) { return a.template(b, this[0]) }, domManip: function(b, c, d) { if (b[0] && b[0].nodeType) { for (var e, f = a.makeArray(arguments), g = b.length, h = 0; g > h && !(e = a.data(b[h++], "tmplItem"));); g > 1 && (f[0] = [a.makeArray(b)]), e && w && (f[2] = function(b) { a.tmpl.afterManip(this, b, d) }), p.apply(this, f) } else p.apply(this, arguments); return w = 0, !o && a.tmpl.complete(s), this } }), a.extend({ tmpl: function(d, e, g, h) { var i, j = !h; if (j) h = u, d = a.template[d] || a.template(null, d), t = {}; else if (!d) return d = h.tmpl, s[h.key] = h, h.nodes = [], h.wrapped && f(h, h.wrapped), a(c(h, null, h.tmpl(a, h))); return d ? ("function" == typeof e && (e = e.call(h || {})), g && g.wrapped && f(g, g.wrapped), i = a.isArray(e) ? a.map(e, function(a) { return a ? b(g, h, d, a) : null }) : [b(g, h, d, e)], j ? a(c(h, null, i)) : i) : [] }, tmplItem: function(b) { var c; for (b instanceof a && (b = b[0]); b && 1 === b.nodeType && !(c = a.data(b, "tmplItem")) && (b = b.parentNode);); return c || u }, template: function(b, c) { return c ? ("string" == typeof c ? c = e(c) : c instanceof a && (c = c[0] || {}), c.nodeType && (c = a.data(c, "tmpl") || a.data(c, "tmpl", e(c.innerHTML))), "string" == typeof b ? a.template[b] = c : c) : b ? "string" != typeof b ? a.template(null, b) : a.template[b] || a.template(null, r.test(b) ? b : a(b)) : null }, encode: function(a) { return ("" + a).split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'") } }), a.extend(a.tmpl, { tag: { tmpl: { _default: { $2: "null" }, open: "if($notnull_1){_=_.concat($item.nest($1,$2));}" }, wrap: { _default: { $2: "null" }, open: "$item.calls(_,$1,$2);_=[];", close: "call=$item.calls();_=call._.concat($item.wrap(call,_));" }, each: { _default: { $2: "$index, $value" }, open: "if($notnull_1){$.each($1a,function($2){with(this){", close: "}});}" }, "if": { open: "if(($notnull_1) && $1a){", close: "}" }, "else": { _default: { $1: "true" }, open: "}else if(($notnull_1) && $1a){" }, html: { open: "if($notnull_1){_.push($1a);}" }, "=": { _default: { $1: "$data" }, open: "if($notnull_1){_.push($.encode($1a));}" }, "!": { open: "" } }, complete: function() { s = {} }, afterManip: function(b, c, d) { var e = 11 === c.nodeType ? a.makeArray(c.childNodes) : 1 === c.nodeType ? [c] : []; d.call(b, c), i(e), w++ } }) }(jQuery), jQuery.cookie = function(a, b, c) { if (arguments.length > 1 && "[object Object]" !== String(b)) { if (c = jQuery.extend({}, c), (null === b || void 0 === b) && (c.expires = -1), "number" == typeof c.expires) { var d = c.expires, e = c.expires = new Date; e.setDate(e.getDate() + d) } return b = String(b), document.cookie = [encodeURIComponent(a), "=", c.raw ? b : encodeURIComponent(b), c.expires ? "; expires=" + c.expires.toUTCString() : "", c.path ? "; path=" + c.path : "", c.domain ? "; domain=" + c.domain : "", c.secure ? "; secure" : ""].join("") } c = b || {}; var f, g = c.raw ? function(a) { return a } : decodeURIComponent; return (f = new RegExp("(?:^|; )" + encodeURIComponent(a) + "=([^;]*)").exec(document.cookie)) ? g(f[1]) : null }, function(a) { a.fn.changeButtonText = function(b) { return this.each(function() { if ($this = a(this), $this.is("a")) return void a("span.ui-btn-text", $this).text(b); if ($this.is("input")) { $this.val(b); var c = $this.closest(".ui-btn"); return void a("span.ui-btn-text", c).text(b) } }) }, a.fn.appendButtonText = function(b) { return this.each(function() { if ($this = a(this), $this.is("a")) return void a("span.ui-btn-text", $this).append(b); if ($this.is("input")) { $this.val(b); var c = $this.closest(".ui-btn"); return void a("span.ui-btn-text", c).append(b) } }) } }(jQuery), function(a) { a.updateSelectBox = function(b) { a(b).parent().find(".ui-btn-text").text(a(b).find("option:selected").text()) } }(jQuery), function(a) { a.hideSelectBox = function(b) { a(b).addClass("hide").closest(".ui-field-contain").addClass("hide") } }(jQuery), function(a) { a.showSelectBox = function(b) { a(b).removeClass("hide").closest(".ui-field-contain").removeClass("hide") } }(jQuery), function(a) { a.findIndex = function(a, b) { for (var c = "", d = 0; d < b.length; d++) b[d] == a && (c = d); return c } }(jQuery), function(a) { a.titleCase = function(a) { if ("string" != typeof a || !a) return null; var b = a; return b = b.replace(/_/g, " "), a = b.replace(/([\w&`'''"".@:\/\{\(\[<>_]+-? *)/g, function(a, b, c, d) { return c > 0 && ":" !== d.charAt(c - 2) && a.search(/^(a(nd?|s|t)?|b(ut|y)|en|for|i[fn]|o[fnr]|t(he|o)|vs?\.?|via)[ \-]/i) > -1 ? a.toLowerCase() : d.substring(c - 1, c + 1).search(/['"_{(\[]/) > -1 ? a.charAt(0) + a.charAt(1).toUpperCase() + a.substr(2) : a.substr(1).search(/[A-Z]+|&|[\w]+[._][\w]+/) > -1 || d.substring(c - 1, c + 1).search(/[\])}]/) > -1 ? a : a.charAt(0).toUpperCase() + a.substr(1) }) } }(jQuery); mobile = { getParameterByName: function(c, a) { var d; if (!a || a.length === 0) { d = window.location.href } else { d = a } var b = new RegExp(c + "=([^&|#]*)").exec(d); if (b !== null) { return b && decodeURIComponent(b[1].replace(/\+/g, " ")) } }, trimSpaces: function(b) { var a; a = b.replace(/^\s*/, "").replace(/\s*$/, ""); a = a.replace(/\s{2,}/, " "); return a }, convertPhone: function(a) { var d = a.replace(/ /g, ""), b = d.length, c = (b < 10 ? false : true); if (d !== "" && d !== null) { d = (c ? d.substr(0, 3) + "-" + d.substr(3, 3) + "-" + d.substr(6, 4) : d.substr(0, 3) + "-" + d.substr(3, 4)) } return d }, mktcodesCookie: function() { try { return $.cookie("mktcodes") } catch (a) { return "empty" } }, checkGetCampaign: function() { var a = ["pid", "adid", "spid", "pref", "sid", "channel", "bid", "ccid", "buytype", "stid", "TR", "tarid", "cid"]; var b = ["sid", "channel", "KWID", "KWNM"]; var c = ["pid", "adid", "spid", "skip", "skip", "pref", "sid", "channel", "bid", "KWID", "KWNM", "ccid", "buytype", "stid", "TR", "tarid", "skip", "skip", "skip", "cid"]; if (/channel/gi.test(location.search)) { if (/KWID/gi.test(location.search)) { return mobile.extractCampaignQueryString(b) } else { return mobile.extractCampaignQueryString(a) } } else { if (mobile.mktcodesCookie !== "empty") { return mobile.extractCampaignFromCookie(c) } else { return "empty" } } }, extractCampaignQueryString: function(a) { var c = 0; var e = a.length; var b = ""; var d = ""; for (c; c < e; c++) { b = mobile.getParameterByName(a[c]); if (typeof b !== "undefined") { d += ((d.length === 0) ? "?" : "&") + a[c] + "=" + b } } return (d.length !== 0) ? encodeURIComponent(d) : "empty" }, extractCampaignFromCookie: function(a) { var f = mobile.mktcodesCookie(); if (f !== null) { var e = f.split("|"); var c = 0; var g = a.length; var b = ""; var d = ""; for (c; c < g; c++) { b = e[c + 1]; if (/[\w,\d]/gi.test(b) && a[c] !== "skip") { d += ((d.length === 0) ? "?" : "&") + a[c] + "=" + b } } return (d.length !== 0) ? encodeURIComponent(d) : "empty" } else { return "empty" } }, updateURL: function() { var a = "?", b = []; if (context.year) { b.push("year=" + context.year) } if (context.vehicle) { b.push("vehicle=" + context.vehicle) } if (context.trim) { b.push("trim=" + context.trim) } if (context.model) { b.push("model=" + context.model) } a += b.join("&"); if (typeof($.mobile) === "object") { $.mobile.changePage(a, { reloadPage: false }) } }, updateZipCookie: function(a) { if (!!a && a !== "") { context.zip = a; $.cookie("zipcode", context.zip, { expires: 365, path: "/" }) } }, updateVehContext: function() { try { if (context.vehicle) { context.myc = Vehicles.getModelYearCode(context); context.myc_i = Vehicles.getInventoryCode(context) } else { context.myc = ""; context.myc_i = "" } if (context.model) { context.llp = Vehicles.getLLP(context); context.ccode = Vehicles.getCcode(context); context.ccode_i = Vehicles.getInventoryCode(context) } else { context.llp = ""; context.ccode = ""; context.ccode_i = "" } } catch (b) { var a = b; b.model = context.model; mobile.log(b) } }, addCommas: function(b) { b += ""; x = b.split("."); x1 = x[0]; x2 = x.length > 1 ? "." + x[1] : ""; var a = /(\d+)(\d{3})/; while (a.test(x1)) { x1 = x1.replace(a, "$1,$2") } return x1 + x2 }, updateContextBtns: function(a) { var c = $("#" + a).find(".context"), b = Vehicles.getDescription(context); if (context.zip) { c.find(".zip").html("ZIP Code: " + context.zip) } if (context.vehicle && context.year) { c.find(".vehicle").html("Vehicle: " + b); if (context.zip) { c.find(".vehicle").addClass("row-alt") } } if (c.find("a").length <= 0) { c.prepend('Change Vehicle
    ').show().trigger("create") } }, getWhyBuys: function() { $.mobile.showPageLoadingMsg(); var a = $(this).attr("data-url"); if (context.ccode === null) { return } $.ajax({ type: "GET", url: "/hostd/vehicleservice/getvehicleverbiage.xml?ccode=" + context.ccode, dataType: "xml", async: false, cache: false, success: function(b) { var d = $(b).find("chrysler").find("data").find("vehicle").find("verbiage"), c = $(".why_buys"); c.html(""); if (d.length > 0) { d.each(function(e) { c.append("
  • " + $(this).attr("value").replace(/(<|<)br\s*\/?(>|>)/gi, " ").replace(/®/g, '®') + "
  • ") }) } else { $(".claim-awards.section").hide() } mGlobal.updateDisclaimers.init(); mobile.hidePageLoadingMsg(true) } }) }, vehObj: { getModels: function(j, i, b) { i = i || context.year; j = j || context.vehicle; var f = (!b) ? Vehicles.getAvailableModels({ vehicle: j, year: context.year }) : b, a = {}; for (var c = 0; c < f.length; c++) { var d = { vehicle: j, model: f[c], year: context.year }; a[c] = { name: Vehicles.getDisplay(d) || null, display: Vehicles.getDescription(d) || null, value: f[c] || null, ccode: Vehicles.getCcode(d) || null, llp: Vehicles.getLLP(d) || null, msrp: Vehicles.getMSRP(d) || null, trim: Vehicles.getTrim(d) || null }; if (a[c].value !== null) { var h = a[c].value; try { cabRegEx = /[^_]*_cab/i.exec(h); a[c].cab = cabRegEx[0] } catch (g) { a[c].cab = null } try { driveRegEx = /\dx\d/i.exec(h); a[c].drive = driveRegEx[0] } catch (g) { a[c].drive = null } } } return a } }, populateDropDowns: function(a) { if (a.vehicle) { $(a.vehicle).html(mobile.populateVehicleDropDown()).bind("change", function(h, i) { var g = $(this).find("option:selected"), f = $.mobile.activePage.find(".page-searchInventory").length > 0, e = (g.attr("data-vehicle") === "ram_1500") ? true : false; if (g.attr("data-vehicle") !== context.vehicle) { context.model = ""; context.trim = "" } context.year = g.attr("data-year"); context.vehicle = g.attr("data-vehicle"); context.engine = ""; context.engineCode = ""; mobile.updateVehContext(); if (a.model) { if (context.vehicle) { b(); if (f && e) { d(); $(a.model).selectmenu("disable"); $(".engine-field").show() } else { $(".engine-field").hide() } } else { $(a.model).selectmenu("disable").find("option:first").attr("selected", true).end().selectmenu("refresh"); context.trim = ""; context.model = "" } } $(this).selectmenu().selectmenu("refresh"); $(".vehicleSelector .engineError").hide() }) } if (a.model && context.vehicle) { b() } function d() { var f = $("#engine"), e = '', h = engines.getTypes(context); if (h) { for (var g = 0; g < h.length; g++) { e += '" } } else { console.log("No Engine Data for ", context.year, " ", context.vehicle) } f.html(e).selectmenu().selectmenu("enable").selectmenu("refresh").off("change").on("change", function() { var j = $(this).find("option:selected"), o = context.model ? context.model : false; context.engine = j.val(); context.engineCode = engines.getCodes(context); b(true); var r = $("#model").find("option"), k = engines.getCcodes(context.engine); for (var l = 0; l < r.length; l++) { var m = $(r[l]); if (context.engine !== "all") { if ($.inArray(m.data("ccode"), k) === -1 && m.val() !== "") { m.remove() } } } if (o !== false) { var p = $('#model option[value="' + o + '"]'), q = $(".vehicleSelector .engineError"), n = "The EcoDiesel engine is not available for the " + Vehicles.getDescription(context) + "."; if (p.length) { p.attr("selected", true); $("#model").parent().find(".ui-btn-text").text(p.text()); q.hide() } else { if (q.length) { q.html(n).show() } else { $(".vehicleSelector").append('

    ' + n + "

    ") } context.model = ""; mobile.updateVehContext() } } else { $(".vehicleSelector .engineError").hide() } $.updateSelectBox("#engine") }); $("#model").on("change", function() { if (context.vehicle === "ram_1500") { context.engineCode = engines.getCodes(context) } }) } function b(e) { $(a.model).html(mobile.populateModelDropDown(e)).selectmenu().selectmenu("enable").bind("change", function() { var f = $(this).find("option:selected"); context.model = f.val(); context.trim = (f.attr("data-trim") !== "") ? f.attr("data-trim") : ""; mobile.updateVehContext(); $.updateSelectBox(this); $(".vehicleSelector .engineError").hide() }); $.updateSelectBox(a.model) } if (a.zip) { var c = $("#" + a.zip); if (context.zip) { c.val(context.zip) } c.live("blur", function() { var e = $(this), f = e.val(); if (f.length < 5 || isNaN(f) || f.length > 5) { c.val("").focus() } else { context.zip = f } }) } }, dropDownMenuContext: function(d, a, b) { if (context.vehicle && context.year) { var c = $.mobile.activePage; d = c.find("#vehicle"); a = c.find("#model"); d.find("option[value=" + context.year + "_" + context.vehicle + "]").attr("selected", true).end().selectmenu().selectmenu("refresh"); a.html(mobile.populateModelDropDown()).selectmenu().selectmenu("enable"); if (context.model) { a.find("option[value=" + context.model + "]").attr("selected", true) } d.trigger("change", { trigger: true }); $.updateSelectBox(d); $.updateSelectBox(a) } if (context.zip && b) { $("#" + b).attr("value", context.zip) } }, populateVehicleDropDown: function() { var b = '', g = (Vehicles.getAvailableYears()).sort().reverse(); for (var d = 0; d < g.length; d++) { var e = g[d], c = Vehicles.getAvailableVehicles({ year: e }); b += '"; for (var f = 0; f < c.length; f++) { var a = c[f]; b += '" } } return b }, populateModelDropDown: function(c) { if (!context.vehicle) { return } var a = '', d = mobile.vehObj.getModels(); for (var b in d) { a += '" } return a }, hidePageLoadingMsg: function(b) { var a = ["home", "vehicle_selector", "model_selector", "gaq", "satd", "quick_finder", "pe"]; if ($.inArray(b, a) !== -1 || b === true) { $.mobile.hidePageLoadingMsg() } else { setTimeout(function() { $.mobile.hidePageLoadingMsg() }, 2000) } }, validateVIN: function(a) { function h(i) { return (typeof(i) === "number" || typeof(i) === "string") && i !== "" && !isNaN(i) } var g = /^[^\Wioq]{17}$/, e = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2], f = { a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, j: 1, k: 2, l: 3, m: 4, n: 5, p: 7, r: 9, s: 2, t: 3, u: 4, v: 5, w: 6, x: 7, y: 8, z: 9 }; a = a.toLowerCase(); if (!a.match(g)) { return false } var d = 0; for (var c = 0; c < a.length; c++) { if (!h(a.charAt(c))) { d += f[a.charAt(c)] * e[c] } else { d += parseInt(a.charAt(c)) * e[c] } } var b = d % 11; if (b === 10) { b = "x" } return (b === a.charAt(8)) }, silentScroll: function(a) { $.mobile.silentScroll(a); $(document).trigger("scrollstop") }, log: function() { return } }; var mGlobal = mGlobal || {}; mGlobal.locationServicesV2 = mGlobal.locationServicesV2 || {}; mGlobal.locationServicesV2 = (function(e) { var f = { locServWrapper: ".ui-page-active #locationServicesV2", geoLocCntr: ".ui-page-active .noLocation", zipCntr: ".ui-page-active .zipBox", errMsgCntr: ".ui-page-active .errorMsg", zipUpdateCntr: ".ui-page-active .changeZip .zip", vehSelectorCntr: ".ui-page-active .vehicleSelector", changeOptBtn: ".ui-page-active .context-btn", geoLocBtn: ".ui-page-active #geoLocateButton", zipSearhBtn: ".ui-page-active #zipSearch", zipSearhBtnClick: "ready", zipInput: ".ui-page-active #zipCode", vehDD: ".ui-page-active #vehicle" }, h = { init: function() { e(f.geoLocBtn).off("click").on("click", function(k) { k.preventDefault(); linkTrack("shopping_tools_change_options_mobile", "use_current_location"); if (typeof google === "object" && typeof google.maps === "object") { mGlobal.locationServicesV2.geoLocation.init() } else { var j = document.createElement("script"); j.type = "text/javascript"; j.src = "//maps.googleapis.com/maps/api/js?v=3.exp&client=gme-chryslergroupllc&channel=m." + context.brand + ".com&sensor=true&callback=mGlobal.locationServicesV2.geoLocation.init"; document.body.appendChild(j) } }); e(f.zipSearhBtn).off("click").on("click", function(n, j) { var m = false; if (f.zipSearhBtnClick === "ready") { f.zipSearhBtnClick = "busy"; if (context.pageName === "search-new-inventory:get-started" && (context.brand === "jeep" || context.brand === "fiatusa")) { d.sniRedirect(context) } n.preventDefault(); if (j !== false) { linkTrack("shopping_tools_change_options_mobile", "submit") } var k = e(f.zipInput).val(), o = e("div[data-app]:last").data("app"); if (a.valid(k) && k !== "") { a.save(k); mobile.updateVehContext(); var l = (o === "searchInventory" && (context.year === "2014" && context.vehicle === "ram_1500")); /*if(o==="advertisedOffers"&&context.pageName==="incentives:get-started"){DATALAYER.pageTrack("incentive-offers-mobile")}*/ if (context.vehicle === "" && b.vehicleContext(o)) { m = true; g.Show("Please select a Vehicle."); e(f.vehSelectorCntr).removeClass("disable").addClass("enable"); f.zipSearhBtnClick = "ready" } else { if (context.engine === "" && l) { m = true; g.Show("Please select an engine."); e(f.vehSelectorCntr).removeClass("disable").addClass("enable") } else { m = false; e(f.locServWrapper).hide(); b.init(o) } } } else { g.Show("Please enter a valid 5-digit ZIP code."); m = true; f.zipSearhBtnClick = "ready" } } }); e(f.zipInput).on("keydown", function(k) { var j = e(document.activeElement).parent().next(); if ((k.keyCode === 13) && (j.is(f.zipSearhBtn))) { e(j).trigger("click"); e(j).blur(); k.stopPropagation() } }) } }, g = { Hide: function() { e(f.errMsgCntr).html("").fadeOut() }, Show: function(j) { e(f.errMsgCntr).html(j).fadeIn() } }, b = { vehicleContext: function(k) { var j = ["searchInventory", "paymentCalculator", "modelCompare"]; if (e.inArray(k, j) >= 0) { return true } else { return false } }, init: function(m) { var j = { shoppingTools: ["dealerLocator", "dealerInventory", "searchInventory", "advertisedOffers", "vehicleOffers", "paymentCalculator", "vinDetails", "modelCompare"] }, k = { dealerLocator: { files: [{ src: "/crossbrand/kr/mobile/javascript/components/mGlobal.dealerLocator.js" }] }, dealerInventory: { files: [{ src: "/crossbrand/kr/mobile/javascript/components/mGlobal.dealerInventory.js" }] }, searchInventory: { files: [{ src: "/crossbrand/kr/mobile/javascript/components/mGlobal.searchInventory.js" }] }, advertisedOffers: { files: [{ src: "/crossbrand/kr/mobile/javascript/components/mGlobal.incentives.js" }] }, vehicleOffers: { files: [{ src: "/crossbrand/kr/mobile/javascript/components/mGlobal.offers.js" }] }, paymentCalculator: { files: [{ src: "/hostc/bmo/resources/js/net/autodata/chrysler/pe/PaymentCalculator.js" }, { src: "/crossbrand/kr/mobile/javascript/components/mGlobal.calcPayment.js" }, { src: "/crossbrand/kr/mobile/javascript/apps/v2/pe.m.functions.js" }] }, vinDetails: { files: [{ src: "/hostc/bmo/resources/js/net/autodata/chrysler/pe/PaymentCalculator.js" }, { src: "/crossbrand/kr/mobile/javascript/components/mGlobal.calcPayment.js" }, { src: "/crossbrand/kr/mobile/javascript/components/mGlobal.vin.js" }] }, modelCompare: { files: [{ src: "/crossbrand/kr/mobile/javascript/components/model_compare.js" }] } }; if (e.inArray(m, j.shoppingTools) >= 0) { g.Hide(); try { mobile.updateVehContext() } catch (l) { console.log("LS V2: ", l) } f.zipSearhBtnClick = "ready"; LazyLoader.requires(k[m].files, function() { mobile[m].init() }) } } }, a = { exists: function() { var j = mobile.getParameterByName("zip") || e.cookie("zipcode") || context.zip; if (j && /\d{5}/.test(j)) { e(f.zipInput).val(j) } else { j = false } return j }, valid: function(j) { if (j !== "" && /\d{5}/.test(j)) { return true } else { return false } }, save: function(j) { context.zip = j; e(f.zipInput).val(j); e.cookie("zipcode", context.zip, { expires: 365, path: "/" }); mobile.updateZipCookie(j) } }, c = { init: function() { g.Hide(); e.mobile.loading("show"); if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(c.success, c.errors, { enableHighAccuracy: true, timeout: 15000, maximumAge: 0 }) } else { g.Show("Error: Geolocate not supported by this device") } }, success: function(j) { g.Hide(); var n = j.coords.latitude, k = j.coords.longitude, l = new google.maps.Geocoder(), m = new google.maps.LatLng(j.coords.latitude, j.coords.longitude); l.geocode({ location: m }, function(s, q) { if (q === "OK") { var r = s[0], v = r.address_components, w = v.length, o = ""; for (var t = 0; t < w; t++) { var u = v[t].types; for (var p = 0; p < u.length; p++) { if (u[p] == "postal_code") { o = v[t].short_name; break } } } a.save(o); e.mobile.loading("hide"); if (context.pageName === "search-new-inventory:get-started" && (context.brand === "jeep" || context.brand === "fiatusa")) { d.sniRedirect(context) } e(f.zipSearhBtn).trigger("click", false); e(".ui-page-active #locateZipSearch").trigger("click", o, false) } else { c.errors() } }) }, errors: function(j) { g.Hide(); var k; switch (j) { case j.PERMISSION_DENIED: k = "You must activate location services within your web browser setting to use this feature."; break; default: k = "There was a problem getting your location. To continue please enter your ZIP code in the field above."; break } e.mobile.loading("hide"); g.Show(k) } }, d = { sniRedirect: function(j) {} }, i = function(l) { var k = l || e("div[data-app]:last").data("app"), j = { vehicle: e.mobile.activePage.find("#vehicle"), model: e.mobile.activePage.find("#model") }; mobile.populateDropDowns(j); mobile.dropDownMenuContext("vehicle", "model"); g.Hide(); h.init(); if (b.vehicleContext(k)) { if (a.exists() && (context.vehicle !== "") || mGlobalConfig.market !== "en_US") { e(f.locServWrapper).hide(); a.save(a.exists()); g.Hide(); e(f.vehSelectorCntr).removeClass("enable").addClass("disable"); b.init(k) } else { e(".context").hide(); if (k === "searchInventory") { mobile.tracking.pageTrack("/inventory_search/get_started/index.html", " ") } if (k === "paymentCalculator") { mobile.tracking.pageTrack("payment_calculator/get_started") } e(f.vehSelectorCntr).removeClass("disable").addClass("enable"); e(f.locServWrapper).show(); return } } else { if (a.exists()) { a.save(a.exists()); e(f.locServWrapper).hide(); g.Hide(); e(f.vehSelectorCntr).removeClass("enable").addClass("disable"); b.init(k) } else { e(".context").hide(); e(f.vehSelectorCntr).removeClass("enable").addClass("disable"); e(f.locServWrapper).show(); if (k === "dealerLocator") { mobile.tracking.pageTrack("/dealer_locator/get_started/index.html", " ") } if (k === "advertisedOffers") { mobile.tracking.pageTrack("/advertised_offers/get_started/index.html", " ") } return } } }; return { init: i, zipCode: a, errMsg: g, attachEvents: h, geoLocation: c, shoppingTools: b, selectorCache: f } }(jQuery)); $(document).on("pageshow", function() { $.cookie("mdr_desktop_site", "true", { path: "/hostb/crossbrand/leadbroker/leadbrokercontroller/", domain: "." + Vehicles.getBrand() + ".com" }); var d = $.mobile.activePage.attr("data-url"); if (/(gaq|gaq-form|satd|satd-form)\.html/.test(d)) { var l = $("div.gaq_satd_apps"); mobile.populateDropDowns($.mobile.activePage.find("#vehicle"), $.mobile.activePage.find("#model")); mobile.dropDownMenuContext("vehicle", "model"); var j = mobile.getParameterByName("year"), e = mobile.getParameterByName("vehicle"), p = mobile.getParameterByName("model"), a = ""; if (j && e) { a = Vehicles.getDescription({ year: j, vehicle: e }); a = a.replace("&", ""); l.find("#vehicle_name").val(a.replace("", "")); if (p) { var q = Vehicles.getTrimDisplay({ year: j, vehicle: e, model: p }); q = q.replace("&", ""); l.find("#model_name").val(q.replace("짰", "")) } } /*if($("#gaq").length>0){$(".form-select-input #vehicle, .form-select-input #model").on("change",function(){DATALAYER.linkTrack(window.location,{lid:$(this).find(":selected").text(),lpos:"content"})});$("#gaq_page #form-submit-btn").click(function(){DATALAYER.linkTrack(window.location,{lid:"submit",lpos:"content"})})}*/ l.find("#vehicle").bind("change", function() { var v = $(this).val(); var t = v.substr(0, 4); var s = v.substr(5); var u = Vehicles.getDescription({ year: t, vehicle: s }); u = u.replace("&", ""); l.find("#vehicle_name").val(u.replace("", "")); l.find("#model_name").val("") }).end().find("#model").bind("change", function() { var s = $(this).val(); var v = $("#vehicle").val(); var u = v.substr(0, 4); var w = v.substr(5); var t = Vehicles.getTrimDisplay({ year: u, vehicle: w, model: s }).replace("짰", ""); t = t.replace("&", ""); l.find("#model_name").val(t) }); function o() { var s = location.hostname; if (/es-m\./.test(location.hostname)) { if (/sdtest/.test(location.pathname)) { s += "/sdtest-m" } else { if (/sduat/.test(location.pathname)) { s += "/sduat-m" } } } else { if (/(test|uat)-/.test(location.hostname)) { s = location.hostname.replace(/(test|uat)-m/, "$1") } else { if (/^m\./.test(document.location.hostname)) { s = document.location.hostname.replace(/m\./, "www.") } } } return s } function k() { var s = location.hostname; if (/es-m\./.test(location.hostname)) { if (/sdtest/.test(location.pathname)) { s += "/sdtest-m" } else { if (/sduat/.test(location.pathname)) { s += "/sduat-m" } } } return s } var m = window.location.href; var h = ""; context.pageType = "shopping-tools"; if (m.indexOf("gaq") !== -1) { h = "gaq"; context.pageName = "get-a-quote:start" } else { if (m.indexOf("satd") !== -1) { h = "satd"; context.pageName = "schedule-a-test-drive:start" } } var b = "/kr/mobile/apps/thankyou.html?form="; var n = "/kr/mobile/apps/error.html"; if (/(gaq-form|satd-form)\.html/.test(d)) { b = "/kr/mobile/apps/thank-you.html?form="; n = "/kr/mobile/apps/error-1.html" } l.find("form").attr("action", "https://" + o() + "/hostb/crossbrand/leadbroker/leadbrokercontroller/").find("#thankyou_page").val("http://" + k() + b + h).end().find("#error_page").val("http://" + k() + n); var g = $("#gaq_page"); if (g.length < 1) { g = $("#satd_page") } if (g.length > 0) { g.submit(function() { console.log($("#thankyou_page").val()); $("#thankyou_page").val($("#thankyou_page").val() + "&setZip=" + $("#zipcode").val()) }) } l.find("form").append(''); var i = /es-m\./.test(location.hostname) ? "070" : ""; l.find("form").append(''); if (context.year && context.vehicle) { a = Vehicles.getDescription({ year: context.year, vehicle: context.vehicle }); a = a.replace("&", ""); l.find("#vehicle_name").val(a.replace("", "")) } if (!!context.dealer && !!context.dealer.id) { l.find("#dealerId").val(context.dealer.id) } $.validator.addMethod("zipReg", function(t, s) { return this.optional(s) || (/^[0-9]{5}$/i).test(t) }); $.validator.addMethod("phoneReg", function(t, s) { return this.optional(s) || (/^[0-9]{10}$/i).test(t) }); $.validator.addMethod("twoCharLimit", function(t, s) { return this.optional(s) || (/^[-.a-zA-Z\s]{2,}$/i).test(t) }); $.validator.addMethod("specialChar", function(t, s) { return this.optional(s) || /^[-.a-zA-Z\s]+$/i.test(t) }); $.validator.addMethod("emailReg", function(t, s) { return this.optional(s) || (/^(?!no)(?!chrysler)(?!dodge)(?!jeep)(?!ram)(?!ramtrucks)(?!fiat)(?!fiatusa)(?!refuse)(?!decline)(?!email)\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(t) }); $.mobile.activePage.find("form#gaq_page, form#satd_page").validate({ messages: { zipcode: { zipReg: "Please verify the zip code" }, first_name: { twoCharLimit: "Please enter valid character" }, last_name: { twoCharLimit: "Please enter valid character" }, phoneNumber: { phoneReg: "Please enter valid phone number" }, email: { emailReg: "Please enter valid email" } }, rules: { zipcode: { required: true, zipReg: true }, first_name: { required: true, twoCharLimit: true }, last_name: { required: true, twoCharLimit: true }, phoneNumber: { phoneReg: true }, email: { required: true, emailReg: true } }, errorPlacement: function(s, t) { if (t.is("select")) { s.insertAfter(t.closest(".ui-select")) } else { s.insertAfter(t) } } }); if ($.mobile.activePage.context === undefined) { $.mobile.activePage.find("#gaq_page, #satd_page").on("change", "select", function() { linkTrack("content_mobile", this.id) }) } $.mobile.activePage.find("#gaq_page, #satd_page").on("click", "#form-submit-btn", function() { linkTrack("content_mobile", "submit") }); var r = /es-m\./.test(location.hostname) ? "es" : "en"; var c = "/" + context.brand + "/" + r + "/" + h + "/index.html"; var f = { a_1: context.brand, a_2: r, a_3: context.year, a_4: context.vehicle, a_5: "", a_6: l.find("form").find('input[name="action_name"]').attr("value"), a_7: "", a_8: l.find("form").find('input[name="ref"]').attr("value") } } }); $(document).delegate("body", "pageinit", function() { if (navigator.userAgent.match(/iPhone/i)) { $("input, select").on("focus", function() { $("header").css({ position: "absolute" }); $("header").css("top", "0px") }); $("input, select").on("blur", function() { $("header").css({ position: "fixed" }); setTimeout(function() { window.scrollTo(document.body.scrollLeft, document.body.scrollTop) }, 0) }) } }); function serviceResponse(a) { if (a.success && a.success == "success") { var c = (document.sufu.success_pg.value ? document.sufu.success_pg.value : "/kr/mobile/get_connected/thankyou.html"); window.location = c } else { var b = (document.sufu.error_pg.value ? document.sufu.error_pg.value : "/kr/mobile/get_connected/error.html"); window.location = b } } $(document).on("pageinit", function() { if (context && $("div#get_connected").length > 0) { context.pageName = "sign-up-for-updates:start"; context.pageType = "shopping-tools"; if (context.year && context.vehicle) { var b = ('input[data-vehicle="' + context.year + "_" + context.vehicle + '"]'); $("div#get_connected").find(b).attr("checked", true).checkboxradio("refresh") } $("#get_connected form .add_vehicles_div fieldset input").click(function() { var c = $(this).parent().text(); c = c.replace(" Dodge", ""); c = c.replace(" FIAT짰", ""); c = c.replace(" CHRYSLER", ""); c = c.replace(" JEEP짰", ""); if (c.indexOf("RAM") > -1) { c = context.year + c; c = c.replace("RAM", "") } if ($(this).prop("checked")) { c += "-check" } else { c += "-uncheck" } /*DATALAYER.linkTrack(window.location,{lid:c,lpos:"content"})*/ }); /*$("#get_connected form .form-select-input select").on("change",function(c){DATALAYER.linkTrack(window.location,{lid:$(this).find(":selected").text(),lpos:"content"})})*/ } $.validator.addMethod("zipReg", function(d, c) { return this.optional(c) || (/^[0-9]{5}$/i).test(d) }); $.validator.addMethod("phoneReg", function(d, c) { return this.optional(c) || (/^[0-9]{10}$/i).test(d) }); $.validator.addMethod("specialChar", function(d, c) { return this.optional(c) || /^[-.a-zA-Z\s]+$/i.test(d) }); $.validator.addMethod("emailReg", function(d, c) { return this.optional(c) || (/^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(d) }); var a = $("form#sufu_form"); if (a.length > 0) { a.validate({ messages: { A27$3$first_name: { required: "Your first name is required", specialChar: "Please enter valid character" }, A28$3$last_name: { required: "Your last name should have minimum 2 characters", specialChar: "Please enter valid character" }, A36$2$email: { required: "Your email address is required", emailReg: "Please enter valid email" }, A34$3$zipcode: { required: "Enter a valid ZIP code", zipReg: "Please verify the zip code" }, A80$1$product_of_interest: { required: "You must select a vehicle" } }, rules: { A27$3$first_name: { required: true, specialChar: true }, A28$3$last_name: { required: true, specialChar: true }, A36$2$email: { required: true, emailReg: true }, A80$1$product_of_interest: { required: true, minlength: 1 }, A34$3$zipcode: { required: true, zipReg: true } }, errorPlacement: function(c, d) { if (d.is("select")) { c.insertAfter(d.closest(".ui-select")) } else { if (d.attr("type") === "checkbox") { c.insertAfter(d.closest("#list_items")) } else { c.insertAfter(d) } } }, submitHandler: function(d) { var i = jQuery("#sufu_form"), j = location.hostname, f = (/-m/.test(j)) ? j.replace(/-m/, "") : j.replace(/m/, "www"), g = jQuery("#zipcode").val(); d = document.sufu; f = f.replace(/^es/, "www"); var h = []; var k = []; $(".add_vehicles_div .ui-checkbox-on").each(function() { h.push($(this).text()) }); $(".add_vehicles_div .ui-checkbox-on + input").each(function() { k.push($(this).data("vehicle")) }); h.join(","); k.join(","); var c = "https://www.chryslerbrochures.com"; if ((/test-m/.test(j))) { c = "https://test.chryslerbrochures.com" } if ((/uat-m/.test(j))) { c = "https://uat.chryslerbrochures.com" } c += "/gabws/GABControllerServlet?action=FORMBASE&serviceType=json"; var e = $(d).serialize(); $.getScript(c + "&" + e, function(l) {}) } }); $("#get_connected").on("change", "select#purchasing", function() { linkTrack("content_mobile", "purchasing_time") }); $("#submit_btn").on("click", function(c) { c.preventDefault(); a.submit() }); $(".add_vehicles_div").on("change", " .ui-checkbox", function(c) { setTimeout(function() { var d = $(".add_vehicles_div .ui-checkbox-on").length; if (d === 3) { $(".add_vehicles_div .ui-checkbox-off").find(".ui-btn-text").css("opacity", "0.5"); $(".add_vehicles_div .ui-checkbox-off ~ input").attr("disabled", "disabled") } else { if (d === 2) { $(".add_vehicles_div .ui-checkbox-off").find(".ui-btn-text").css("opacity", "1"); $(".add_vehicles_div .ui-checkbox-off ~ input").removeAttr("disabled") } } }, 100) }); a.on("click", "#personal_button", function() { $("#business_type").hide(); $("#business").attr("disabled", "disabled") }); a.on("click", "#business_button", function() { $("#business_type").show(); $("#business").removeAttr("disabled") }) } }); if (location.protocol === "https:") { $.mobile.ajaxEnabled = false }; $(function() { if ($("#gallery_carousel").length > 0) { $("#gallery_carousel").carouFredSel({ prev: "#prev", next: "#next", width: "100%", scroll: { items: 1 }, auto: false, responsive: true, pagination: "#pager", wipe: true, circular: true, items: { width: null, height: "auto", visible: "1+", } }); $("#gallery_carousel").parent().swipe({ swipeLeft: function() { $("#gallery_carousel").trigger("next"); linkTrack("swipe_gallery_mobile", "next") }, swipeRight: function() { $("#gallery_carousel").trigger("prev"); linkTrack("swipe_gallery_mobile", "prev") } }); $("#pager.pager").on("click", "a", function() { var c = $(this).index() + 1; linkTrack("gallery_mobile", "button_" + c) }); var a = true; if (a && $(".caroufredsel_wrapper")) { var b = $(".list_carousel").height() - 35 + "px"; $(".caroufredsel_wrapper").height(b); $("#gallery_carousel").height(b); $(".list_carousel ul li img").eq(0).load(function() { $(".caroufredsel_wrapper").height($(this).height()) }); a = false } } }); var mGlobal = mGlobal || {}; mGlobal.updateDisclaimers = mGlobal.updateDisclaimers || {}; mGlobal.updateDisclaimers = (function(a) { function c() { var l = (context.brand !== "jeep") ? "sup.tooltip:not('.cityMPG sup.tooltip')" : "sup.tooltip:not('.cityMPG sup.tooltip'):visible"; var g = ".altTooltip", t = ".dynamicDisclaimer", f = ".cityMPG", p = ".hwyMPG", d = ".priceMPG", e = a.mobile.activePage, v = a(e).find(l).length, o = a(e).find(g).length, n = {}, k; a(t).html(""); for (var s = 0; s < v; s++) { k = a(e).find(l + ":eq(" + s + ")"); var x = k.parents().hasClass("hwyMPG"), m = k.attr("title"), r = s + 1; if (x) { k.parents(d).find(f + " sup.tooltip").html("[" + r + "]") } k.html("[" + r + "]"); n[r] = m } var y = mGlobal.common.sortObject(n); a.each(y, function(j, z) { if (z) { var i = "

    [" + j + "] " + z + "

    "; a(t).append(i) } }); if (o) { for (var q = 0; q < o; q++) { k = a(e).find(g + ":eq(" + q + ")"); var h = k.attr("data-title"), w = k.attr("data-disclaimer"), u = "

    [" + w + "] " + h + "

    "; a(t).append(u) } } } function b(d) { var e = d || 4000; setTimeout(function() { c() }, e) } a(document).on("pageshow", function() { b() }); return { init: b, update: c } })(jQuery); mGlobal.ctaUpdate = mGlobal.ctaUpdate || {}; mGlobal.ctaUpdate = (function(f) { var g = context.brand; function b() { return Vehicles.getFamilyFromMYC(context.myc).replace(/_/g, " ") } function a(l) { var n = Vehicles.getBaseModel(context), h = Vehicles.getLLP(context), o = Vehicles.getCcode(context), p = Vehicles.getInventoryCode(context), k = (p.length < 16) ? "modelYearCode=" + p : "ccode=" + p + "_" + h, i = 0, j = "", m = (context.brand === "fiatusa") ? 50 : 25; if (!f.cookie("zipcode")) { l.find(".ui-btn-text").find(".button-text").html("Search inventory available near you") } else { f.getJSON("/hostd/getsearchinventory.json?src=sape&inventoryType=N&sortOrder=ASC&" + k + "&zipCode=" + f.cookie("zipcode") + "&zipDistance=" + m, function(q) { _inventory = q[0].data.inventoryVehicles; i = q[0].data.totalVehicleCount; l.find(".ui-btn-text").find(".count").html(i); if (context.model) { if (context.myc === "CUX201504" || context.myc === "CUX201502") { j = Vehicles.getTrimDisplay(context).toUpperCase() } else { j = Vehicles.getTrimDisplay(context) } } else { if (context.myc === "CUX201504" || context.myc === "CUX201502") { j = Vehicles.getDisplay(context).toUpperCase() } else { j = Vehicles.getDisplay(context) } } if (i > 1) { l.find(".ui-btn-text").find(".button-text").html(j + " Models near you") } else { if (i === 1) { l.find(".ui-btn-text").find(".button-text").html(j + " Model near you") } else { l.find(".ui-btn-text").find(".button-text").html("Search inventory available near you") } } }) } } function d(h) { if (h.length) { if (context.myc === "CUX201504" || context.myc === "CUX201502") { h.find(".ui-btn-text").addClass("noTxtTransform").html("BUILD YOUR " + Vehicles.getDisplay(context)) } else { if (f.mobile.activePage.data().page === "vlp" && context.trim !== "") { h.find(".ui-btn-text").html("Build Your " + b() + " " + Vehicles.getTrimDisplay(context)) } else { if (context.myc === "CUT201400" || (f.mobile.activePage.data("page") === "model" && context.myc === "CUT201405" || context.myc === "CUT201403" || context.myc === "CUT201402" || context.myc === "CUT201401")) { h.find(".ui-btn-text").html("Build Your " + b() + "®") } else { if (context.myc === "CUT201500" || context.myc === "CUT201502" || context.myc === "CUT201503" || context.myc === "CUT201501" || context.myc === "CUT201602") { h.find(".ui-btn-text").html("Build Your ram promaster®") } else { if (context.myc === "CUT201506") { h.find(".ui-btn-text").html("Build Your Ram Promaster City Tradesman®") } else { if (context.myc === "CUT201504") { h.find(".ui-btn-text").html("Build Your Ram Promaster City Wagon") } else { if (context.myc === "CUC201508" || context.myc === "CUC201608") { h.find(".ui-btn-text").html("Build Your town & country") } else { h.find(".ui-btn-text").html("Build Your " + b()) } } } } } } } } } function c(h) { if (h.length) { if (context.myc === "CUT201500" || context.myc === "CUT201501" || context.myc === "CUT201502" || context.myc === "CUT201503") { h.find(".ui-btn-text").html("BACK TO ram promaster®") } else { if (context.myc === "CUX201502") { h.find(".ui-btn-text").addClass("noTxtTransform").html("BACK TO " + Vehicles.getDisplay(context)) } else { if (context.myc === "CUC201508" || context.myc === "CUC201608") { h.find(".ui-btn-text").html("BACK TO town & country") } else { h.find(".ui-btn-text").html("Back To " + b()) } } } } } function e(m) { m.off("click", "a").on("click", "a", function(i) { i.preventDefault(); context.gallery = context.section = ""; if (context.trim) { f.mobile.changePage("/kr/mobile/vehicles/" + f(this).text() + "/" + context.vehicle.replace(/_/g, "-") + "/" + context.trim + "/") } else { f.mobile.changePage("/kr/mobile/vehicles/" + f(this).text() + "/" + context.vehicle.replace(/_/g, "-") + "/") } /*DATALAYER.linkTrack(this,{lid:f(this).text(),lpos:"content_mobile"})*/ }); var j = Vehicles.getAvailableYears(context); var n = context.vehicle, l, h; for (var k = 0; k < j.length; k++) { l = j[k]; h = l + "_" + n; if (!brandConfig.chooseVehicle || !brandConfig.chooseVehicle.suppress || brandConfig.chooseVehicle.suppress.indexOf(h) == -1) { if (j[k] === context.year) { f(m).find("span").text(j[k]).addClass("active") } else { f(m).find("a").eq(k).text(parseInt(j[k])) } } } } return { inventoryCount: (mGlobalConfig.market === "en_US") ? a : null, bmo: d, backTo: c, yearToggle: e } })(jQuery); var mGlobal = mGlobal || {}; mGlobal.viewFeaturedOffers = mGlobal.viewFeaturedOffers || {}; mGlobal.viewFeaturedOffers = (function(e) { var b = { template: "/crossbrand/kr/mobile/javascript/components/viewLocalOffers.tmpl.js" }; function f(h) { e(h).on("expand", function(i) { if (mGlobalConfig.showOffers) { c(h) } e(this).find("h4 .ui-btn-text").text("Close Featured Offers") }); e(h).on("collapse", function(i) { e(this).find("h4 .ui-btn-text").text("View Featured Offers") }); e(".view-featured-offers h4 a").off("click").on("click", function(l) { var i = "features_mobile", k = "view_featured_offers", j = e(this).parent().next("div.ui-collapsible-content").attr("aria-hidden"); if (j === "false") { k += "_collapse"; /*DATALAYER.linkTrack(true,{lpos:i,lid:k,vars:{eVar75:i+":"+k,eVar68:"click"},events:"event70"})*/ } else { k += "_expand"; /*DATALAYER.linkTrack(true,{lpos:i,lid:k,vars:{eVar75:i+":"+k,eVar68:"click"},events:"event70,event51",mediaEvents:[{name:"event129",value:DATALAYER.getMediaEvent("brand")},{name:"event159",value:DATALAYER.getMediaEvent("vehicle")}]})*/ } }) } function a(h, i) { if (h.length == 0) { e(i).find(".view-featured-offers-content").append("There are no locally available
    offers currently in your area.

    See your local dealer for available offers.
    ") } else { e.cachedScript("/crossbrand/kr/mobile/javascript/components/viewLocalOffers.tmpl.js").done(function(j, l) { if (l === "success") { var k = Handlebars.templates["viewLocalOffers.tmpl"]; e(i).find(".view-featured-offers-content").html(k({ offers: h })); e(i).find(".view-featured-offers-content .seprator").css({ top: "-9px", margin: "0 auto", position: "relative", backgroundColor: "#f5f5f5", width: "20px", height: "20px", padding: "0 5px" }); e(i).find(".view-featured-offers-content").prepend('
    Offers for ' + context.zip + ' Change 
    '); /*e(i).find("#zip_change").on("click",function(m){if(typeof DATALAYER!=="undefined"){DATALAYER.linkTrack(this,{events:"event70",lpos:context.year+":"+context.vehicle+"-landing",lid:"mobile-pricing-bar:change-zip-code"})}g(e(i))});*/ setTimeout(function() { mGlobal.updateDisclaimers.init() }, 1) } }) } } function g(h) { e(h).find(".view-featured-offers-content").html('

    Enter your local zip code for lease and purchase offers:

     
    '); e(h).find("#locateZipSearch2").one("click", function(k) { var i = e(h).find("#locateZipCode2").val(); var j = "" !== i && /\d{5}/.test(i) ? !0 : !1; if (j) { context.zip = i; e.cookie("zipcode", context.zip, { expires: 365, path: "/" }); c(e(".view-featured-offers")); e(h).find(".errorMsg").hide(); e(h).find(".errorMsg").html(""); e(h).find("#locateZipCode2").val("") } else { e(h).find(".errorMsg").show(); e(h).find(".errorMsg").html("Please enter a valid zip code.") } /*if(typeof DATALAYER!=="undefined"){DATALAYER.linkTrack(this,{events:"event70",lpos:context.year+":"+context.vehicle+"-landing",lid:"mobile-change-zip-modal:submit"})}*/ }); e(h).find("#geoLocateOfferPanelButton").one("click", function(i) { window.navigator.geolocation.getCurrentPosition(function(j) { var k = "http://api.geonames.org/findNearbyPostalCodesJSON?lat=" + j.coords.latitude + "&lng=" + j.coords.longitude + "&style=SHORT&maxRows=1&username=bvb09"; e.getJSON(k, function(l) { console.log(l); if (l.postalCodes && l.postalCodes[0].countryCode == "US") { context.zip = l.postalCodes[0].postalCode; e.cookie("zipcode", context.zip, { expires: 365, path: "/" }); c(e(".view-featured-offers")) } else { console.log("error") } }) }); /*if(typeof DATALAYER!=="undefined"){DATALAYER.linkTrack(this,{events:"event70",lpos:context.year+":"+context.vehicle+"-landing",lid:"mobile-change-zip-modal:user-current-location"})}*/ }) } function d(n, j, m) { var o = new Object(); var l = 0; var i = 0; for (z = 0; z < n.result.data.offerTypes[m].offers.length; z++) { if (n.result.data.offerTypes[m].offers[z].offerDetails.amount != null) { if (parseInt(n.result.data.offerTypes[m].offers[z].offerDetails.amount.replace(",", "")) > l) { l = parseInt(n.result.data.offerTypes[m].offers[z].offerDetails.amount.replace(",", "")); i = z } } } o.amount = n.result.data.offerTypes[m].offers[i].offerDetails.amount; var k = "Offer applies to "; for (var h = 0; h < n.result.data.offerTypes[m].offers[i].vehicles.length; h++) { k += n.result.data.offerTypes[m].offers[i].vehicles[h].year + " " + n.result.data.offerTypes[m].offers[i].vehicles[h].description; if (h != n.result.data.offerTypes[m].offers[i].vehicles.length - 1) { k += ", " } else { k += ". " } } o.disclaimer = k + n.result.data.offerTypes[m].offers[i].disclaimer; o.duration = n.result.data.offerTypes[m].offers[i].offerDetails.term; o.rate = n.result.data.offerTypes[m].offers[i].offerDetails.rate; o.cashAmount = n.result.data.offerTypes[m].offers[i].offerDetails.amount; o.type = "apr"; j.push(o) } function c(k) { var l = e(k).find(".ui-collapsible-content"), h, j, i = ""; if (context.zip == null || context.zip.length == 0) { context.zip = e.cookie("zipcode") } if (context.zip.length > 1) { if (context.ccode.length > 1) { i = "/hostd/incentives/getoffers.json?ccode=" + context.ccode + "&zip=" + context.zip } else { i = "/hostd/incentives/getoffers.json?modelYearCode=" + context.myc + "&zip=" + context.zip } e.getJSON(i, function(s) { j = []; var y = 0; var n = true; var m = "subv_apr"; var o = true; var v = true; var B = 0; for (var t = s.result.data.offerTypes.length - 1; t >= 0; t--) { if (s.result.data.offerTypes[t].type == "cash_allowance") { n = false } if (s.result.data.offerTypes[t].type == "subv_apr" || s.result.data.offerTypes[t].type == "subv_apr_combo") { o = !o } if (s.result.data.offerTypes[t].type == "lease_promo") { for (y = 0; y < s.result.data.offerTypes[t].offers.length; y++) { if (s.result.data.offerTypes[t].offers[y].vehicles[0].advertised == "Y") { v = false; B = y; break } } } } for (t = s.result.data.offerTypes.length - 1; t >= 0; t--) { if (s.result.data.offerTypes[t].type == "lease_promo") { var r = new Object(); var u = 0; if (v) { for (y = 0; y < s.result.data.offerTypes[t].offers.length; y++) { if (y == 0) { u = parseInt(s.result.data.offerTypes[t].offers[y].offerDetails.monthlyPayment.replace(",", "")); B = y } if (parseInt(s.result.data.offerTypes[t].offers[y].offerDetails.monthlyPayment.replace(",", "")) < u) { u = parseInt(s.result.data.offerTypes[t].offers[y].offerDetails.monthlyPayment.replace(",", "")); B = y } } } r.amount = s.result.data.offerTypes[t].offers[B].offerDetails.monthlyPayment; r.disclaimer = s.result.data.offerTypes[t].offers[B].disclaimer; r.dueAtSigning = s.result.data.offerTypes[t].offers[B].offerDetails.totalDueAtSigning; r.duration = s.result.data.offerTypes[t].offers[B].offerDetails.numberOfPayment; r.securityDeposit = parseInt(s.result.data.offerTypes[t].offers[B].offerDetails.securityDeposit) ? s.result.data.offerTypes[t].offers[B].offerDetails.securityDeposit : "No"; r.type = "lease"; r.vehicleName = s.result.data.offerTypes[t].offers[B].vehicles[0].description; j.push(r) } if (o) { if (s.result.data.offerTypes[t].type == m) { d(s, j, t) } } else { if (s.result.data.offerTypes[t].type == "subv_apr") { d(s, j, t) } } if (s.result.data.offerTypes[t].type == "cash_allowance") { var r = new Object(); var p = 0; var w = 0; for (y = 0; y < s.result.data.offerTypes[t].offers.length; y++) { if (parseInt(s.result.data.offerTypes[t].offers[y].offerDetails.amount.replace(",", "")) > p) { p = parseInt(s.result.data.offerTypes[t].offers[y].offerDetails.amount.replace(",", "")); w = y } } r.amount = s.result.data.offerTypes[t].offers[w].offerDetails.amount; var q = "Offer applies to "; for (var A = 0; A < s.result.data.offerTypes[t].offers[w].vehicles.length; A++) { q += s.result.data.offerTypes[t].offers[w].vehicles[A].year + " " + s.result.data.offerTypes[t].offers[w].vehicles[A].description; if (A != s.result.data.offerTypes[t].offers[w].vehicles.length - 1) { q += ", " } else { q += ". " } } r.disclaimer = q + s.result.data.offerTypes[t].offers[w].disclaimer; r.type = "cash"; r.cash_type = "Cash Allowance"; j.push(r) } else { if (s.result.data.offerTypes[t].type == "misc_cash" && n) { var r = new Object(); var p = 0; var w = 0; for (y = 0; y < s.result.data.offerTypes[t].offers.length; y++) { if (parseInt(s.result.data.offerTypes[t].offers[y].offerDetails.amount.replace(",", "")) > p) { p = parseInt(s.result.data.offerTypes[t].offers[y].offerDetails.amount.replace(",", "")); w = y } } r.amount = s.result.data.offerTypes[t].offers[w].offerDetails.amount; var q = "Offer applies to "; for (var A = 0; A < s.result.data.offerTypes[t].offers[w].vehicles.length; A++) { q += s.result.data.offerTypes[t].offers[w].vehicles[A].year + " " + s.result.data.offerTypes[t].offers[w].vehicles[A].description; if (A != s.result.data.offerTypes[t].offers[w].vehicles.length - 1) { q += ", " } else { q += ". " } } r.disclaimer = q + s.result.data.offerTypes[t].offers[w].disclaimer; r.type = "cash"; r.cash_type = "Misc Cash"; j.push(r) } } j.year = context.year } e(l).find(".view-featured-offers-content").html(""); a(j, l) }) } else { g(e(l)) } } return { init: f } })(jQuery); mGlobal.viewModelList = mGlobal.viewModelList || {}; mGlobal.viewModelList = (function(c) { function b(e) { var g = c.mobile.activePage, d = g.find(e), f = Vehicles.getDisplay({ year: context.year, vehicle: context.vehicle }); if (context.myc === "CUT201400" || context.myc === "CUT201403" || context.myc === "CUT201402" || context.myc === "CUT201401") { f += "®" } d.find("h4 .ui-btn-text").html(f + " Models"); d.off("expand.model").on("expand.model", function(h) { a(e); /*DATALAYER.linkTrack(this,{lpos:"content_mobile",lid:"model_selector_"+h.type})*/ }); d.off("collapse.model").on("collapse.model", function(i, j) { var h = (j) ? j.linkTrack : true; /*if(h){DATALAYER.linkTrack(this,{lpos:"content_mobile",lid:"model_selector_"+i.type})}*/ }) } function a(h) { var f = mGlobal.common.getTrims(context), j = "", l = c.mobile.activePage.find(".model-list"), e = "", k = "", d = mGlobalConfig.currency; for (var g in f) { j = "/kr/mobile/models/?year=" + context.year + "&vehicle=" + context.vehicle + "&model=" + Vehicles.getModelFromCcode(f[g].ccode); k = Vehicles.getTrimDisplay({ year: context.year, vehicle: context.vehicle, model: Vehicles.getModelFromCcode(f[g].ccode) }); e += "
  • "; if (f[g].ccode === context.ccode) { e += " " + k + "MSRP* Starting at " + d + "" + f[g].msrp + "" } else { e += " " + k + "MSRP* Starting at " + d + "" + f[g].msrp + "" } e += "
  • " } e += '
  • '; c(h).find(".model-list").html("
      " + e + "
    ").promise().done(function() { c(l).find("li > a").off("click").on("click", function() { linkTrack("content_mobile", "model_selector_" + context.vehicle + "_" + c(this).find(".trim").text()); /*DATALAYER.linkTrack(this,{lpos:"content_mobile",lid:"model_selector_"+context.vehicle+"_"+c(this).find(".trim").text()})*/ }); c(l).find("li a.compare-model-btn").off("click").on("click", function(i) { i.preventDefault(); i.stopPropagation(); linkTrack("content_mobile", "model_selector_compare_models"); /*DATALAYER.linkTrack(this,{lpos:"content_mobile",lid:"model_selector_compare_models"});*/ c.mobile.changePage(c(this).attr("href")) }) }) } return { init: b, modelList: a, } })(jQuery); /*! chrysler-mobile - v0.1.0 - 2015-02-16, 3:23 PM EST */ var mGlobal = mGlobal || {}; mGlobal.videoPlayer = mGlobal.videoPlayer || {}, mGlobal.videoPlayer = function(a) { function b(b) { d = a.mobile.activePage, $activePageVideoLink = d.find(b.$videoLink), e = d.find(b.$imageFullScreen), $activePageVideoLink.off("click").on("click", function(c) { var d = "vidContainer" + Math.floor(100 * Math.random() + 1); if (c.preventDefault(), c.stopPropagation(), a(this).attr("data-lid") && a(this).attr("data-lpos")) { var f = a(this).attr("data-lid"), h = a(this).attr("data-lpos"); linkTrack(h, f) /*,DATALAYER.linkTrack(this,{lid:f,lpos:h})*/ } a.mobile.loading("show"); var i = a(this).attr("data-video-id"); if (b.contentType = "_fullscreen", b.contentEvent = "_open", "" !== i && void 0 !== i) { var j = '
    '; a(j).insertAfter(e.find(".preLoader")); var k = new YouTubePlayer(i, d, g); k.onready = function() { e.popup("open"), a.mobile.loading("hide") }, b.contentType = "_video", b.contentEvent = "_play" } e.off("popupafterclose").on("popupafterclose", function() { context.subsection = "", -1 !== e.find("iframe").length && (k.stop(), a("#" + d).remove()) }), a(window).off("orientationchange").on("orientationchange", function() { e.fadeOut(1).fadeIn(1500) }) }) } function c(c, d) { this.element = d, this.settings = a.extend({}, f, c), b(this.settings, this.element) } var d, e, f = { $videoLink: ".video-link", $imageFullScreen: "#imageFullScreen" }, g = { height: 200, width: 284, showRelatedVideos: !1, autoPlay: !1 }; return { init: c } }(jQuery); mobile = mobile || {}; mobile.tracking = { pageTrack: function(b, a) { console.warn("remove call to mobile.tracking.pagetrack") }, bindLinkTrack: function(a) { console.warn("remove call to mobile.tracking.bindLinkTrack") }, getPageName: function(e) { var d = (e) ? e : $.mobile.activePage; var b = null; var c = (!!d.attr("data-url")) ? d.attr("data-url").split("?")[0] : ""; if (!d.attr("id") && !!c && c !== "") { var a = mobile.getParameterByName("ui-page", c); if (c.indexOf("/kr/mobile/") !== -1) { c = c.split("/kr/mobile/")[1] } if (c.indexOf("apps") === 0 && c.indexOf("apps/") !== -1 && c.indexOf("/index.html") !== -1) { c = c.split("apps/")[1]; c = c.split("/index.html")[0]; if (c === "offers") { c = "current_offers" } } else { c = c.split(".html")[0] } b = (a) ? c + "/" + a : (c) ? c : "" } return b }, siteAction: function(b, a) { console.warn("remove call to mobile.tracking.siteAction") }, videoTracking: function(a) { console.warn("remove call to mobile.tracking.videoTracking") } }; mobile.cadreon = { loadTT20: function() { console.warn("remove call to mobile.cadreon") }, gateway: { dodge: "//d1cerpgff739r9.cloudfront.net/tt-c653bc8a541ddc7ae0d5dc6a8be096d6a1a2668339293adb6806895774d874b6.js", chrysler: "//d1cerpgff739r9.cloudfront.net/tt-5b8c105f057738fd09a0034de133930355995078a75fb4403f29adf69f50c8e2.js", jeep: "//d1cerpgff739r9.cloudfront.net/tt-afd338e7a80b3367d0b8a424e95878203910cb9c160ce45782873581c25ad9d5.js", ramtrucks: "//d1cerpgff739r9.cloudfront.net/tt-7136e7101fe54e18c7c9f86622b88de1fabf20ac536919bc167806dd1f34ee1f.js", fiatusa: "//d1cerpgff739r9.cloudfront.net/tt-5bb2417ff3cf91da1d2ff0dc74c65c87d5a83c5d124ea5c28f294bc1cc5ca07a.js" } }; function nr_tag() {} var cas = { dlp: "", init: function() { console.warn("cas.init is deprecated. this was called from\n" + cas.init.caller) }, utils: { getFileName: function() { console.warn("cas.utils is deprecated. this was called from\n" + cas.utils.getFileName.caller) }, cutFileName: function() { console.warn("cas.utils is deprecated. this was called from\n" + cas.utils.cutFileName.caller) }, nameCleaner: function() { console.warn("cas.utils.nameCleaner is deprecated. this was called from\n" + cas.utils.nameCleaner.caller) }, setPageTrackAttributes: function() { console.warn("cas.utils.setPageTrackAttributes is deprecated. this was called from\n" + cas.utils.setPageTrackAttributes.caller) }, checkLanguage: function() { console.warn("cas.utils.checkLanguage is deprecated. this was called from\n" + cas.utils.checkLanguage.caller) } }, actions: { setPageTrackVariables: function() { console.warn("cas.actions.setPageTrackVariables is deprecated. this was called from\n" + cas.actions.setPageTrackVariables.caller) }, attrInjection: function() { console.warn("cas.actions.attrInjection is deprecated. this was called from\n" + cas.actions.attrInjection.caller) } } }; var linkTrack = function() { console.warn("linkTrack is deprecated. this was called from\n" + linkTrack.caller) }; var siteAction = function() { console.warn("siteAction is deprecated. this was called from\n" + siteAction.caller) }; var mediaTrack = function() { console.warn("mediaTrack is deprecated. this was called from\n" + mediaTrack.caller) }; var pageTrack = function() { console.warn("pageTrack is deprecated. this was called from\n" + pageTrack.caller) }; var DTM = (function(e) { var b = 0; function f() { return !window.cllc } function h(k) { window.preventTrack = false; e(document).one("s_ready", function(l) { if (typeof(k) != "undefined") { c(k) } }); var j = "//assets.adobedtm.com/e2b27ccc0e522eb7c0afb12eb12ee852c39ccceb/satelliteLib-"; if (f()) { j += brandConfig.dtmSrc } else { j += cllc.config.dtmTag } if (/test|uat|preview/.test(location.hostname)) { j += "-staging" } j += ".js"; if (window._satellite && window.s) { a() } e.ajax({ cache: true, dataType: "script", url: j }).done(function() { _satellite.pageBottom() }) } function g(j) { if (typeof(j) == "object") { if (f()) { if (window.s && !window.preventTrack) { c(j); s.t() } else { h(j) } } else { s.t(j) } } else { s.t() } } function d(j) { _satellite.track(j) } function c(l) { for (var k in l) { if (k == "mediaEvent") { for (var j in l[k]) { s.events += "," + j + ":" + _satellite.getVar(l[k][j][0]) + _satellite.getVar(l[k][j][1]) } } else { window.s[k] = l[k] } } } function a() { var j, k; for (j = 0; j < s.va_g.length; j++) { k = s.va_g[j]; if (k.substring(0, 4) == "prop" || k.substring(0, 4) == "eVar" || k.substring(0, 4) == "hier" || k.substring(0, 4) == "list" || k == "channel" || k == "events" || k == "eventList" || k == "products" || k == "productList" || k == "purchaseID" || k == "transactionID" || k == "state" || k == "zip" || k == "campaign" || k == "pageName" || k == "pageURL") { s[k] = void 0 } } } var i = { gallery: { brand: "event113", vehicle: "event143", counter: "event31" }, interior: { brand: "event114", vehicle: "event144", counter: "event33" }, exterior: { brand: "event115", vehicle: "event145", counter: "event34" }, capability: { brand: "event116", vehicle: "event146", counter: "event73" }, safety_and_security: { brand: "event117", vehicle: "event147", counter: "event74" }, safety_security: { brand: "event117", vehicle: "event147", counter: "event74" }, technology: { brand: "event118", vehicle: "event148", counter: "event500" }, performance: { brand: "event119", vehicle: "event149", counter: "event501" }, fuel_efficiency: { brand: "event120", vehicle: "event150", counter: "event502" }, packages: { brand: "event121", vehicle: "event151", counter: "event503" }, warranty: { brand: "event122", vehicle: "event152", counter: "event504" }, durability: { brand: "event123", vehicle: "event153", counter: "event505" }, explore: { brand: "event125", vehicle: "event155", counter: "event506" }, highlights: { brand: "event130", vehicle: "event160", counter: "event507" }, ratings_and_reviews: { brand: "event131", vehicle: "event161", counter: "event508" } }; return { directRule: d, pageTrack: g, runCount: b, ufaClickObj: i, load: h } })(jQuery); DTM.media = (function(e) { var g = false, b = {}; function a() { e("video, audio").each(function(k, l) { var j = e(l); if (!j.attr("data-tracking-id")) { j.attr("data-tracking-id", j.prop("tagName") + k) } var h = j.attr("data-tracking-id"); b[h] = {}; b[h]["mediaEnd"] = false; c(l) }) } function c(h) { e(h).on("play pause paused seeked ended", d) } function d(i) { var h = i.target.getAttribute("data-tracking-id"); if (i.type == "play") { if (i.target.currentTime == 0 || b[h]["mediaEnd"]) { s.Media.open(h, i.target.duration, "My Media Player"); s.Media.play(h, i.target.currentTime) } else { s.Media.play(h, i.target.currentTime) } b[h]["mediaEnd"] = false } if (i.type == "pause") { s.Media.stop(h, i.target.currentTime) } if (i.type == "seeked") { if (i.target.currentTime !== 0 && !b[h]["mediaEnd"]) { s.Media.play(h, i.target.currentTime); s.Media.stop(h, i.target.currentTime) } } if (i.type == "ended") { b[h]["mediaEnd"] = true; s.Media.stop(h, i.target.duration) } } function f() { a() } return { init: f, track: c } })(jQuery); //var DATALAYER=(function($){function _log(error){if((typeof window.console!=="undefined"&&typeof window.console.log!=="undefined")&&console.debug){console.debug(error)}return false}function _formatString(string){if(typeof string==="string"){return string.toLowerCase().replace(/ |_/g,"-").replace("ñ","n").replace(/&|&/g,"and").replace(/-{2,}/g,"-").replace(/\//g,":").replace(/:{2,}/g,":").replace(/[:-]+$/g,"").replace(":en:",":us:").replace(/[^a-z0-9:-]/gi,"")}}function _extendObject(oldObj,newObj){for(var i in newObj){oldObj[i]=newObj[i]}}function _getCookie(cookieName){var cookieVal="";if(typeof cllc!=="undefined"&&typeof cllc.context.get(cookieName)!=="undefined"){cookieVal=cllc.context.get(cookieName)}else{var re=new RegExp(cookieName+"=([^;]+)");var value=re.exec(document.cookie);cookieVal=(value!==null)?(value[1]):""}return cookieVal}function _detectDevice(){var device;if(screen.width<800&&location.hostname.split(".")[0].indexOf("m")>-1){device="mobile"}else{device="desktop"}return device}function _getMediaEvent(type){var sKey=_satellite.getVar("serial_key");if(type=="vehicle"){return sKey+_satellite.getVar("vehicleMediaCode")}else{return sKey+_satellite.getVar("brandMediaCode")}}function _getLinkTrackingObject(element){var trackObj={vars:{},mediaEvents:[],},lid="",lpos="",linkType="o",elmEvars=null,elmProps=null,events="",brandEvent="",vehicleEvent="";if(element.getAttribute){if(element.getAttribute("data-lid")){lid=element.getAttribute("data-lid");lpos=element.getAttribute("data-lpos")||"content";trackObj.lid=lid;trackObj.lpos=lpos;trackObj.vars={eVar68:"click"}}if(element.getAttribute("data-adobe-events")){events+=element.getAttribute("data-adobe-events")}if(events.indexOf("event70")==-1){if(events.length){events+=","}events+="event70"}if(element.getAttribute("data-brand-event")&&_getMediaEvent("brand")){brandEvent=element.getAttribute("data-brand-event");trackObj.mediaEvents.push({name:brandEvent,value:_getMediaEvent("brand")})}if(element.getAttribute("data-vehicle-event")&&_getMediaEvent("vehicle")){vehicleEvent=element.getAttribute("data-vehicle-event");trackObj.mediaEvents.push({name:vehicleEvent,value:_getMediaEvent("vehicle")})}trackObj.events=events;if(element.getAttribute("data-adobe-evars")){elmEvars=element.getAttribute("data-adobe-evars")}if(element.getAttribute("data-adobe-props")){elmProps=element.getAttribute("data-adobe-props")}if(element.getAttribute("data-adobe-linkname")){trackObj.linkName=element.getAttribute("data-adobe-linkname")}if(element.getAttribute("data-adobe-linktype")){linkType=element.getAttribute("data-adobe-linktype")}if(linkType=="d"||/download/i.test(element.innerHTML)||/download/i.test(lid)){if(!(/download_brochure/i.test(lid))){linkType="d";trackObj.linkName=trackObj.linkName||element.getAttribute("download")||element.getAttribute("href");if(!/wallpaper/i.test(trackObj.linkName)){var brochureBrand=(brand=="ramtrucks")?"ram":(brand=="fiatusa")?"fiat":brand;if((lid).indexOf(brochureBrand)!=-1){var brochureModel=_formatString(lid.split(brochureBrand+"_")[1].split("download")[0].replace(/accessories/g,"").replace(/catalog/g,""));var brochureModelYear=_formatString((lid).split(brochureBrand)[0]);trackObj.lpos="brochure";_extendObject(trackObj.vars,{eVar5:brochureModel,prop1:brochureModel,eVar48:brochureModelYear,prop48:brochureModelYear})}}}}if(element.getAttribute("href")&&element.getAttribute("href").indexOf("exit")>-1){linkType="e"}trackObj.linkType=linkType}if(elmEvars!==null){elmEvars=JSON.parse(elmEvars);_extendObject(trackObj.vars,elmEvars)}if(elmProps!==null){elmProps=JSON.parse(elmProps);_extendObject(trackObj.vars,elmProps)}return trackObj}var location=document.location;var hostName=location.hostname;var url=location.href,hash=location.hash,pathName=location.pathname,environment=hostName.split(".")[0].toLowerCase(),language=(hostName.indexOf("es.")>=0||hostName.indexOf("es-")>=0)?"es":"en",brand=(window.cllc?cllc.config.brand:context.brand),brandID="",version="interwoven 7.3",country="us";var _pageInfo=new Array({environment:environment,cmsVersion:version,device:"",language:language,brand:brand,brandID:brandID,country:country,pageType:"",model:"",pageName:"",vehicle:"",trim:"",year:"",component:{}});function _setPageInfo(){var _context={};if(typeof cllc!=="undefined"&&cllc.context.get()){_context=cllc.context.get()}else{_context=context}for(var info in _pageInfo[0]){if(_context[info]!==undefined||_context[info]===""){_pageInfo[0][info]=_formatString(_context[info])}}if(_pageInfo[0].brand==="fiatusa"){_pageInfo[0].brand="fiat"}if(_pageInfo[0].pageType==="app"){_pageInfo[0].pageType="shopping-tools"}if(_pageInfo[0].pageType==="vehiclepage"){_pageInfo[0].pageType="vehicles"}try{if(_context.vehicle){_pageInfo[0]["vehicleFamilyCode"]=Vehicles.getFamilyCode({vehicle:_context.vehicle})}}catch(e){console.log(e)}return _pageInfo[0]}function _getValue(property){if(typeof property==="string"){return _pageInfo[0][property]}else{if(!arguments.length){return _pageInfo[0]}else{_log(typeof property+" not allowed!")}}}function _updateDigitalData(name,value,callback){var strSplit=(name).split("."),strJn="",newObj={},spl=strSplit.length;for(var i=0;i-1||cllc.config.domain==="buyfiat")){return true}}}function _getRegion(){if(_ifDrlp()){return"tier2"}else{return"tier1"}}function _getPageSize(){return"long"}function _getPrimaryCategory(){var pCat;pCat=(data.pageType?":"+data.pageType:"");if(_ifDrlp()){pCat=":drlp"+pCat}return pCat}function _getPageName(){var pName;if(data.pageType==="shopping-tools"){pName=":"+data.pageType+":"+data.pageName}else{if(data.pageType==="vehicles"){if(!!data.vehicle&&data.pageName!=="se-models"){pName=":"+data.year+":"+data.vehicle+":"+data.pageName;if(!!data.trim&&data.trim.length>0){pName=":"+data.year+":"+data.vehicle+":"+data.trim+":"+data.pageName}}else{pName=":"+data.pageType+":"+data.pageName}}else{if(data.pageType==="homepage"){pName=":"+data.pageType}else{if(data.pageName!==""){pName=":"+(data.pageType?data.pageType+":"+data.pageName:data.pageName)}else{pName=":"+data.pageType}}}}if(_ifDrlp()){pName=":drlp"+pName}return pName}function _subCategoryData1(){var subCatData1;if(data.pageType==="shopping-tools"){subCatData1=":"+data.pageType+":"+data.pageName.split(":")[0]}else{if(data.pageType==="vehicles"&&data.pageName==="se-models"){subCatData1=":"+data.pageType+":"+data.pageName}else{if(data.pageType==="vehicles"&&data.trim===""&&data.pageName!=="vehicle-selector"){subCatData1=":"+data.pageType+":"+data.vehicle}else{if(data.pageType==="vehicles"&&data.trim.length>0&&(data.pageName===""||data.pageName==="landing")){subCatData1=":"+data.pageType+":"+data.vehicle}else{if(data.pageType==="vehicles"&&data.trim.length>0){subCatData1=":"+data.pageType+":"+data.vehicle+":"+data.trim}else{if(data.pageType==="lifestyle"&&data.pageName.split(":")[0]==="renegade-life"){subCatData1=":"+data.pageType+":renegade-life"}else{if(data.pageName!==""){subCatData1=":"+(data.pageType?data.pageType+":"+data.pageName:data.pageName)}else{subCatData1=":"+data.pageType}}}}}}}if(_ifDrlp()){subCatData1=":drlp"+subCatData1}return subCatData1}function _subCategoryData2(){var subCatData2;if(data.pageType==="shopping-tools"){subCatData2=":"+data.pageType+":"+data.pageName}else{if(data.pageType==="vehicles"){if(data.pageName==="se-models"){subCatData2=":"+data.pageType+":"+data.pageName}else{if(data.trim===""&&data.pageName!=="vehicle-selector"){subCatData2=":"+data.pageType+":"+data.vehicle}else{if(data.trim.length>0){if((data.pageName===""||data.pageName==="landing")){subCatData2=":"+data.pageType+":"+data.vehicle+":"+data.trim}else{subCatData2=":"+data.pageType+":"+data.vehicle+":"+data.trim+":"+data.pageName}}else{if(data.pageName!==""){subCatData2=":"+(data.pageType?data.pageType+":"+data.pageName:data.pageName)}}}}}else{if(data.pageName!==""){subCatData2=":"+(data.pageType?data.pageType+":"+data.pageName:data.pageName)}else{subCatData2=":"+data.pageType}}}if(_ifDrlp()){subCatData2=":drlp"+subCatData2}return subCatData2}function _getPageType(){var pType;if(data.pageName==="vehicle-selector"){pType=data.pageName}else{if(data.pageType==="shopping-tools"){if(data.pageName.indexOf(":vehicle-selector")>-1){pType=data.pageName.split(":")[1]}else{if(data.pageName.indexOf(":vehicle-selector")===-1){pType=data.pageName.split(":")[0]}}}else{if(data.pageType==="vehicles"){if(data.pageName=="landing"){if(data.trim!==""&&data.vehicle!==""){pType="mlp"}else{if(data.trim===""&&data.vehicle!==""){pType="vlp"}}}else{pType=data.pageName.split(":")[0]}}else{pType=data.pageType}}}return pType}function _getErrorCode(){var eCode;if(data.pageType==="error-page"){eCode=404}if(typeof eCode!=="undefined"){return"page:"+eCode}else{return""}}var brand=(_detectDevice()=="mobile")?"m-"+data.brand:data.brand;window.digitalData={page:{pageInfo:{pageName:brand+":"+data.country+_getPageName(),geoRegion:"brand:"+brand+":"+data.country+":"+_getRegion(),device:data.device,language:data.language,version:data.cmsVersion,sysEnv:_detectDevice(),size:_getPageSize(),vehicleBrand:brand,vehicleModel:_formatString(data.vehicle),vehicleMediaCode:data.vehicleFamilyCode,vehicleTrim:_formatString(data.trim),vehicleDetailedTrim:_formatString(data.model),vehicleModelYear:_formatString(data.year),zipCode:_getCookie("zipcode"),errorCode:_getErrorCode()},category:{primaryCategory:brand+":"+data.country+_getPrimaryCategory(),subCategory1:brand+":"+data.country+_subCategoryData1(),subCategory2:brand+":"+data.country+_subCategoryData2(),pageType:_getPageType()},component:data.component}}}function _buildTTString(str){var ttUrl="http://"+location.hostname+"/?";var ttParams=_satellite.getVar("totalTagParams");totaltag(ttUrl+ttParams)}function _pageTrack(argument){var arg=argument||"";if(window._satellite&&window.s){s.clearVars("events");s.clearVars("eVars");s.clearVars("props");if(typeof arg==="string"&&arg!==""){_satellite.track(arg)}else{s.t(arg)}}}function _linkTrack(element,obj){if(!element||!element.getAttribute||element.tagName!="A"){element=true}var linkType=null;if(window.s){var linkTrackVarsArray=[],events=obj.events||"event70",eVars=obj.vars||{},concatValue=obj.linkName||_formatString(obj.lpos+":"+obj.lid);events+=(events.indexOf("event70")==-1)?",event70":"";if(!obj.hasOwnProperty("linkType")){linkType="o"}else{linkType=obj.linkType}if(!window.cllc||!cllc.context.get()||_detectDevice=="mobile"){eVars.prop53=eVars.prop53||"mdot";eVars.prop42=_satellite.getVar("orientation")}if(!eVars.eVar75){eVars.eVar75=_formatString(obj.lpos+":"+obj.lid)}s.linkTrackEvents="None";s.linkTrackVars="None";linkTrackVarsArray.push("events","eVar37","prop57","prop51","eVar66");var trackEvents=events;if(obj.mediaEvents&&obj.mediaEvents.length){for(var i=0;iwindow.innerHeight?"landscape":"portrait";digitalData.page.pageInfo.orientation=a;if(!window.preventTrack){DTM.load()}});$(window).on("orientationchange",function(a){if(a.orientation==="landscape"){s.prop42="landscape"}else{s.prop42="portrait"}DTM.pageTrack()});