! function (e, t, a) { function n(e, t, a) { e.addEventListener ? e.addEventListener(t, a, !1) : e.attachEvent("on" + t, a) } function i(e) { if ("keypress" == e.type) { var t = String.fromCharCode(e.which); return e.shiftKey || (t = t.toLowerCase()), t } return v[e.which] ? v[e.which] : g[e.which] ? g[e.which] : String.fromCharCode(e.which).toLowerCase() } function o(e) { e = e || {}; var t, a = !1; for (t in k) e[t] ? a = !0 : k[t] = 0; a || (x = !1) } function s(e, t, a, n, i, o) { var s, r, l = [], c = a.type; if (!$[e]) return []; for ("keyup" == c && u(e) && (t = [e]), s = 0; s < $[e].length; ++s) if (r = $[e][s], !(!n && r.seq && k[r.seq] != r.level || c != r.action || ("keypress" != c || a.metaKey || a.ctrlKey) && t.sort().join(",") !== r.modifiers.sort().join(","))) { var d = n && r.seq == n && r.level == o; (!n && r.combo == i || d) && $[e].splice(s, 1), l.push(r) } return l } function r(e) { var t = []; return e.shiftKey && t.push("shift"), e.altKey && t.push("alt"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), t } function l(e, t, a, n) { A.stopCallback(t, t.target || t.srcElement, a, n) || !1 !== e(t, a) || (t.preventDefault ? t.preventDefault() : t.returnValue = !1, t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0) } function c(e) { "number" != typeof e.which && (e.which = e.keyCode); var t = i(e); t && ("keyup" == e.type && C === t ? C = !1 : A.handleKey(t, r(e), e)) } function u(e) { return "shift" == e || "ctrl" == e || "alt" == e || "meta" == e } function d(e, t, a, n) { function s(t) { return function () { x = t, ++k[e], clearTimeout(m), m = setTimeout(o, 1e3) } } function r(t) { l(a, t, e), "keyup" !== n && (C = i(t)), setTimeout(o, 10) } for (var c = k[e] = 0; c < t.length; ++c) { var u = c + 1 === t.length ? r : s(n || f(t[c + 1]).action); p(t[c], u, n, e, c) } } function f(e, t) { var a, n, i, o = []; for (a = "+" === e ? ["+"] : e.split("+"), i = 0; i < a.length; ++i) n = a[i], b[n] && (n = b[n]), t && "keypress" != t && y[n] && (n = y[n], o.push("shift")), u(n) && o.push(n); if (a = n, i = t, !i) { if (!h) { h = {}; for (var s in v) s > 95 && 112 > s || v.hasOwnProperty(s) && (h[v[s]] = s) } i = h[a] ? "keydown" : "keypress" } return "keypress" == i && o.length && (i = "keydown"), { key: n, modifiers: o, action: i } } function p(e, t, a, n, i) { w[e + ":" + a] = t, e = e.replace(/\s+/g, " "); var o = e.split(" "); 1 < o.length ? d(e, o, t, a) : (a = f(e, a), $[a.key] = $[a.key] || [], s(a.key, a.modifiers, { type: a.action }, n, e, i), $[a.key][n ? "unshift" : "push"]({ callback: t, modifiers: a.modifiers, action: a.action, seq: n, level: i, combo: e })) } var h, m, v = { 8: "backspace", 9: "tab", 13: "enter", 16: "shift", 17: "ctrl", 18: "alt", 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", 37: "left", 38: "up", 39: "right", 40: "down", 45: "ins", 46: "del", 91: "meta", 93: "meta", 224: "meta" }, g = { 106: "*", 107: "+", 109: "-", 110: ".", 111: "/", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'" }, y = { "~": "`", "!": "1", "@": "2", "#": "3", $: "4", "%": "5", "^": "6", "&": "7", "*": "8", "(": "9", ")": "0", _: "-", "+": "=", ":": ";", '"': "'", "<": ",", ">": ".", "?": "/", "|": "\\" }, b = { option: "alt", command: "meta", "return": "enter", escape: "esc", mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl" }, $ = {}, w = {}, k = {}, C = !1, T = !1, x = !1; for (a = 1; 20 > a; ++a) v[111 + a] = "f" + a; for (a = 0; 9 >= a; ++a) v[a + 96] = a; n(t, "keypress", c), n(t, "keydown", c), n(t, "keyup", c); var A = { bind: function (e, t, a) { e = e instanceof Array ? e : [e]; for (var n = 0; n < e.length; ++n) p(e[n], t, a); return this }, unbind: function (e, t) { return A.bind(e, function () { }, t) }, trigger: function (e, t) { return w[e + ":" + t] && w[e + ":" + t]({}, e), this }, reset: function () { return $ = {}, w = {}, this }, stopCallback: function (e, t) { return -1 < (" " + t.className + " ").indexOf(" mousetrap ") ? !1 : "INPUT" == t.tagName || "SELECT" == t.tagName || "TEXTAREA" == t.tagName || t.isContentEditable }, handleKey: function (e, t, a) { var n, i = s(e, t, a); t = {}; var r = 0, c = !1; for (n = 0; n < i.length; ++n) i[n].seq && (r = Math.max(r, i[n].level)); for (n = 0; n < i.length; ++n) i[n].seq ? i[n].level == r && (c = !0, t[i[n].seq] = 1, l(i[n].callback, a, i[n].combo, i[n].seq)) : c || l(i[n].callback, a, i[n].combo); i = "keypress" == a.type && T, a.type != x || u(e) || i || o(t), T = c && "keydown" == a.type } }; e.Mousetrap = A, "function" == typeof define && define.amd && define(A) }(window, document), function (e) { "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery) }(function (e, t) { function a(e) { function t() { n ? (a(), D(t), i = !0, n = !1) : i = !1 } var a = e, n = !1, i = !1; this.kick = function () { n = !0, i || t() }, this.end = function (e) { var t = a; e && (i ? (a = n ? function () { t(), e() } : e, n = !0) : e()) } } function n() { return !0 } function i() { return !1 } function o(e) { e.preventDefault() } function s(e) { F[e.target.tagName.toLowerCase()] || e.preventDefault() } function r(e) { return 1 === e.which && !e.ctrlKey && !e.altKey } function l(e, t) { var a, n; if (e.identifiedTouch) return e.identifiedTouch(t); for (a = -1, n = e.length; ++a < n;) if (e[a].identifier === t) return e[a] } function c(e, t) { var a = l(e.changedTouches, t.identifier); if (a && (a.pageX !== t.pageX || a.pageY !== t.pageY)) return a } function u(e) { var t; r(e) && (t = { target: e.target, startX: e.pageX, startY: e.pageY, timeStamp: e.timeStamp }, L(document, N.move, d, t), L(document, N.cancel, f, t)) } function d(e) { var t = e.data; y(e, t, e, p) } function f() { p() } function p() { Y(document, N.move, d), Y(document, N.cancel, p) } function h(e) { var t, a; F[e.target.tagName.toLowerCase()] || (t = e.changedTouches[0], a = { target: t.target, startX: t.pageX, startY: t.pageY, timeStamp: e.timeStamp, identifier: t.identifier }, L(document, Q.move + "." + t.identifier, m, a), L(document, Q.cancel + "." + t.identifier, v, a)) } function m(e) { var t = e.data, a = c(e, t); a && y(e, t, a, g) } function v(e) { var t = e.data, a = l(e.changedTouches, t.identifier); a && g(t.identifier) } function g(e) { Y(document, "." + e, m), Y(document, "." + e, v) } function y(e, t, a, n) { var i = a.pageX - t.startX, o = a.pageY - t.startY; q * q > i * i + o * o || w(e, t, a, i, o, n) } function b() { return this._handled = n, !1 } function $(e) { e._handled() } function w(e, t, a, n, i, o) { var s, r; t.target, s = e.targetTouches, r = e.timeStamp - t.timeStamp, t.type = "movestart", t.distX = n, t.distY = i, t.deltaX = n, t.deltaY = i, t.pageX = a.pageX, t.pageY = a.pageY, t.velocityX = n / r, t.velocityY = i / r, t.targetTouches = s, t.finger = s ? s.length : 1, t._handled = b, t._preventTouchmoveDefault = function () { e.preventDefault() }, X(t.target, t), o(t.identifier) } function k(e) { var t = e.data.event, a = e.data.timer; I(t, e, e.timeStamp, a) } function C(e) { var t = e.data.event, a = e.data.timer; T(), M(t, a, function () { setTimeout(function () { Y(t.target, "click", i) }, 0) }) } function T() { Y(document, N.move, k), Y(document, N.end, C) } function x(e) { var t = e.data.event, a = e.data.timer, n = c(e, t); n && (e.preventDefault(), t.targetTouches = e.targetTouches, I(t, n, e.timeStamp, a)) } function A(e) { var t = e.data.event, a = e.data.timer, n = l(e.changedTouches, t.identifier); n && (S(t), M(t, a)) } function S(e) { Y(document, "." + e.identifier, x), Y(document, "." + e.identifier, A) } function I(e, t, a, n) { var i = a - e.timeStamp; e.type = "move", e.distX = t.pageX - e.startX, e.distY = t.pageY - e.startY, e.deltaX = t.pageX - e.pageX, e.deltaY = t.pageY - e.pageY, e.velocityX = .3 * e.velocityX + .7 * e.deltaX / i, e.velocityY = .3 * e.velocityY + .7 * e.deltaY / i, e.pageX = t.pageX, e.pageY = t.pageY, n.kick() } function M(e, t, a) { t.end(function () { return e.type = "moveend", X(e.target, e), a && a() }) } function P() { return L(this, "movestart.move", $), !0 } function O() { return Y(this, "dragstart drag", o), Y(this, "mousedown touchstart", s), Y(this, "movestart", $), !0 } function E(e) { "move" !== e.namespace && "moveend" !== e.namespace && (L(this, "dragstart." + e.guid + " drag." + e.guid, o, t, e.selector), L(this, "mousedown." + e.guid, s, t, e.selector)) } function B(e) { "move" !== e.namespace && "moveend" !== e.namespace && (Y(this, "dragstart." + e.guid + " drag." + e.guid), Y(this, "mousedown." + e.guid)) } var q = 6, L = e.event.add, Y = e.event.remove, X = function (t, a, n) { e.event.trigger(a, n, t) }, D = function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e) { return window.setTimeout(function () { e() }, 25) } }(), F = { textarea: !0, input: !0, select: !0, button: !0 }, N = { move: "mousemove", cancel: "mouseup dragstart", end: "mouseup" }, Q = { move: "touchmove", cancel: "touchend", end: "touchend" }; e.event.special.movestart = { setup: P, teardown: O, add: E, remove: B, _default: function (e) { var n, o; e._handled() && (n = { target: e.target, startX: e.startX, startY: e.startY, pageX: e.pageX, pageY: e.pageY, distX: e.distX, distY: e.distY, deltaX: e.deltaX, deltaY: e.deltaY, velocityX: e.velocityX, velocityY: e.velocityY, timeStamp: e.timeStamp, identifier: e.identifier, targetTouches: e.targetTouches, finger: e.finger }, o = { event: n, timer: new a(function () { X(e.target, n) }) }, e.identifier === t ? (L(e.target, "click", i), L(document, N.move, k, o), L(document, N.end, C, o)) : (e._preventTouchmoveDefault(), L(document, Q.move + "." + e.identifier, x, o), L(document, Q.end + "." + e.identifier, A, o))) } }, e.event.special.move = { setup: function () { L(this, "movestart.move", e.noop) }, teardown: function () { Y(this, "movestart.move", e.noop) } }, e.event.special.moveend = { setup: function () { L(this, "movestart.moveend", e.noop) }, teardown: function () { Y(this, "movestart.moveend", e.noop) } }, L(document, "mousedown.move", u), L(document, "touchstart.move", h), "function" == typeof Array.prototype.indexOf && function (e) { for (var t = ["changedTouches", "targetTouches"], a = t.length; a--;) -1 === e.event.props.indexOf(t[a]) && e.event.props.push(t[a]) }(e) }), function (e) { "use strict"; function t(e, t, a) { return e.addEventListener ? e.addEventListener(t, a, !1) : e.attachEvent ? e.attachEvent("on" + t, a) : void 0 } function a(e, t) { var a, n; for (a = 0, n = e.length; n > a; a++) if (e[a] === t) return !0; return !1 } function n(e, t) { var a; e.createTextRange ? (a = e.createTextRange(), a.move("character", t), a.select()) : e.selectionStart && (e.focus(), e.setSelectionRange(t, t)) } function i(e, t) { try { return e.type = t, !0 } catch (a) { return !1 } } e.Placeholders = { Utils: { addEventListener: t, inArray: a, moveCaret: n, changeType: i } } }(this), function (e) { "use strict"; function t() { } function a() { try { return document.activeElement } catch (e) { } } function n(e, t) { var a, n, i = !!t && e.value !== t, o = e.value === e.getAttribute(B); return (i || o) && "true" === e.getAttribute(q) ? (e.removeAttribute(q), e.value = e.value.replace(e.getAttribute(B), ""), e.className = e.className.replace(E, ""), n = e.getAttribute(N), parseInt(n, 10) >= 0 && (e.setAttribute("maxLength", n), e.removeAttribute(N)), a = e.getAttribute(L), a && (e.type = a), !0) : !1 } function i(e) { var t, a, n = e.getAttribute(B); return "" === e.value && n ? (e.setAttribute(q, "true"), e.value = n, e.className += " " + O, a = e.getAttribute(N), a || (e.setAttribute(N, e.maxLength), e.removeAttribute("maxLength")), t = e.getAttribute(L), t ? e.type = "text" : "password" === e.type && G.changeType(e, "text") && e.setAttribute(L, "password"), !0) : !1 } function o(e, t) { var a, n, i, o, s, r, l; if (e && e.getAttribute(B)) t(e); else for (i = e ? e.getElementsByTagName("input") : m, o = e ? e.getElementsByTagName("textarea") : v, a = i ? i.length : 0, n = o ? o.length : 0, l = 0, r = a + n; r > l; l++) s = a > l ? i[l] : o[l - a], t(s) } function s(e) { o(e, n) } function r(e) { o(e, i) } function l(e) { return function () { g && e.value === e.getAttribute(B) && "true" === e.getAttribute(q) ? G.moveCaret(e, 0) : n(e) } } function c(e) { return function () { i(e) } } function u(e) { return function (t) { return b = e.value, "true" === e.getAttribute(q) && b === e.getAttribute(B) && G.inArray(M, t.keyCode) ? (t.preventDefault && t.preventDefault(), !1) : void 0 } } function d(e) { return function () { n(e, b), "" === e.value && (e.blur(), G.moveCaret(e, 0)) } } function f(e) { return function () { e === a() && e.value === e.getAttribute(B) && "true" === e.getAttribute(q) && G.moveCaret(e, 0) } } function p(e) { return function () { s(e) } } function h(e) { e.form && (T = e.form, "string" == typeof T && (T = document.getElementById(T)), T.getAttribute(Y) || (G.addEventListener(T, "submit", p(T)), T.setAttribute(Y, "true"))), G.addEventListener(e, "focus", l(e)), G.addEventListener(e, "blur", c(e)), g && (G.addEventListener(e, "keydown", u(e)), G.addEventListener(e, "keyup", d(e)), G.addEventListener(e, "click", f(e))), e.setAttribute(X, "true"), e.setAttribute(B, k), (g || e !== a()) && i(e) } var m, v, g, y, b, $, w, k, C, T, x, A, S, I = ["text", "search", "url", "tel", "email", "password", "number", "textarea"], M = [27, 33, 34, 35, 36, 37, 38, 39, 40, 8, 46], P = "#ccc", O = "placeholdersjs", E = RegExp("(?:^|\\s)" + O + "(?!\\S)"), B = "data-placeholder-value", q = "data-placeholder-active", L = "data-placeholder-type", Y = "data-placeholder-submit", X = "data-placeholder-bound", D = "data-placeholder-focus", F = "data-placeholder-live", N = "data-placeholder-maxlength", Q = document.createElement("input"), j = document.getElementsByTagName("head")[0], H = document.documentElement, R = e.Placeholders, G = R.Utils; if (R.nativeSupport = void 0 !== Q.placeholder, !R.nativeSupport) { for (m = document.getElementsByTagName("input"), v = document.getElementsByTagName("textarea"), g = "false" === H.getAttribute(D), y = "false" !== H.getAttribute(F), $ = document.createElement("style"), $.type = "text/css", w = document.createTextNode("." + O + " { color:" + P + "; }"), $.styleSheet ? $.styleSheet.cssText = w.nodeValue : $.appendChild(w), j.insertBefore($, j.firstChild), S = 0, A = m.length + v.length; A > S; S++) x = m.length > S ? m[S] : v[S - m.length], k = x.attributes.placeholder, k && (k = k.nodeValue, k && G.inArray(I, x.type) && h(x)); C = setInterval(function () { for (S = 0, A = m.length + v.length; A > S; S++) x = m.length > S ? m[S] : v[S - m.length], k = x.attributes.placeholder, k ? (k = k.nodeValue, k && G.inArray(I, x.type) && (x.getAttribute(X) || h(x), (k !== x.getAttribute(B) || "password" === x.type && !x.getAttribute(L)) && ("password" === x.type && !x.getAttribute(L) && G.changeType(x, "text") && x.setAttribute(L, "password"), x.value === x.getAttribute(B) && (x.value = k), x.setAttribute(B, k)))) : x.getAttribute(q) && (n(x), x.removeAttribute(B)); y || clearInterval(C) }, 100) } G.addEventListener(e, "beforeunload", function () { R.disable() }), R.disable = R.nativeSupport ? t : s, R.enable = R.nativeSupport ? t : r }(this), function (e) { e.fn.rwdImageMaps = function () { var t = this, a = function () { t.each(function () { if ("undefined" != typeof e(this).attr("usemap")) { var t = this, a = e(t); e("").load(function () { var t = "width", n = "height", i = a.attr(t), o = a.attr(n); if (!i || !o) { var s = new Image; s.src = a.attr("src"), i || (i = s.width), o || (o = s.height) } var r = a.width() / 100, l = a.height() / 100, c = a.attr("usemap").replace("#", ""), u = "coords"; e('map[name="' + c + '"]').find("area").each(function () { var t = e(this); t.data(u) || t.data(u, t.attr(u)); for (var a = t.data(u).split(","), n = new Array(a.length), s = 0; s < n.length; ++s) n[s] = 0 === s % 2 ? parseInt(100 * (a[s] / i) * r) : parseInt(100 * (a[s] / o) * l); t.attr(u, n.toString()) }) }).attr("src", a.attr("src")) } }) }; return e(window).resize(a).trigger("resize"), this } }(jQuery), /* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ jQuery.easing.jswing = jQuery.easing.swing, jQuery.extend(jQuery.easing, { def: "easeOutQuad", swing: function (e, t, a, n, i) { return jQuery.easing[jQuery.easing.def](e, t, a, n, i) }, easeInQuad: function (e, t, a, n, i) { return n * (t /= i) * t + a }, easeOutQuad: function (e, t, a, n, i) { return -n * (t /= i) * (t - 2) + a }, easeInOutQuad: function (e, t, a, n, i) { return (t /= i / 2) < 1 ? n / 2 * t * t + a : -n / 2 * (--t * (t - 2) - 1) + a }, easeInCubic: function (e, t, a, n, i) { return n * (t /= i) * t * t + a }, easeOutCubic: function (e, t, a, n, i) { return n * ((t = t / i - 1) * t * t + 1) + a }, easeInOutCubic: function (e, t, a, n, i) { return (t /= i / 2) < 1 ? n / 2 * t * t * t + a : n / 2 * ((t -= 2) * t * t + 2) + a }, easeInQuart: function (e, t, a, n, i) { return n * (t /= i) * t * t * t + a }, easeOutQuart: function (e, t, a, n, i) { return -n * ((t = t / i - 1) * t * t * t - 1) + a }, easeInOutQuart: function (e, t, a, n, i) { return (t /= i / 2) < 1 ? n / 2 * t * t * t * t + a : -n / 2 * ((t -= 2) * t * t * t - 2) + a }, easeInQuint: function (e, t, a, n, i) { return n * (t /= i) * t * t * t * t + a }, easeOutQuint: function (e, t, a, n, i) { return n * ((t = t / i - 1) * t * t * t * t + 1) + a }, easeInOutQuint: function (e, t, a, n, i) { return (t /= i / 2) < 1 ? n / 2 * t * t * t * t * t + a : n / 2 * ((t -= 2) * t * t * t * t + 2) + a }, easeInSine: function (e, t, a, n, i) { return -n * Math.cos(t / i * (Math.PI / 2)) + n + a }, easeOutSine: function (e, t, a, n, i) { return n * Math.sin(t / i * (Math.PI / 2)) + a }, easeInOutSine: function (e, t, a, n, i) { return -n / 2 * (Math.cos(Math.PI * t / i) - 1) + a }, easeInExpo: function (e, t, a, n, i) { return 0 == t ? a : n * Math.pow(2, 10 * (t / i - 1)) + a }, easeOutExpo: function (e, t, a, n, i) { return t == i ? a + n : n * (-Math.pow(2, -10 * t / i) + 1) + a }, easeInOutExpo: function (e, t, a, n, i) { return 0 == t ? a : t == i ? a + n : (t /= i / 2) < 1 ? n / 2 * Math.pow(2, 10 * (t - 1)) + a : n / 2 * (-Math.pow(2, -10 * --t) + 2) + a }, easeInCirc: function (e, t, a, n, i) { return -n * (Math.sqrt(1 - (t /= i) * t) - 1) + a }, easeOutCirc: function (e, t, a, n, i) { return n * Math.sqrt(1 - (t = t / i - 1) * t) + a }, easeInOutCirc: function (e, t, a, n, i) { return (t /= i / 2) < 1 ? -n / 2 * (Math.sqrt(1 - t * t) - 1) + a : n / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + a }, easeInElastic: function (e, t, a, n, i) { var o = 1.70158, s = 0, r = n; if (0 == t) return a; if (1 == (t /= i)) return a + n; if (s || (s = .3 * i), r < Math.abs(n)) { r = n; var o = s / 4 } else var o = s / (2 * Math.PI) * Math.asin(n / r); return -(r * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * i - o) * 2 * Math.PI / s)) + a }, easeOutElastic: function (e, t, a, n, i) { var o = 1.70158, s = 0, r = n; if (0 == t) return a; if (1 == (t /= i)) return a + n; if (s || (s = .3 * i), r < Math.abs(n)) { r = n; var o = s / 4 } else var o = s / (2 * Math.PI) * Math.asin(n / r); return r * Math.pow(2, -10 * t) * Math.sin((t * i - o) * 2 * Math.PI / s) + n + a }, easeInOutElastic: function (e, t, a, n, i) { var o = 1.70158, s = 0, r = n; if (0 == t) return a; if (2 == (t /= i / 2)) return a + n; if (s || (s = i * .3 * 1.5), r < Math.abs(n)) { r = n; var o = s / 4 } else var o = s / (2 * Math.PI) * Math.asin(n / r); return 1 > t ? -.5 * r * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * i - o) * 2 * Math.PI / s) + a : .5 * r * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * i - o) * 2 * Math.PI / s) + n + a }, easeInBack: function (e, t, a, n, i, o) { return void 0 == o && (o = 1.70158), n * (t /= i) * t * ((o + 1) * t - o) + a }, easeOutBack: function (e, t, a, n, i, o) { return void 0 == o && (o = 1.70158), n * ((t = t / i - 1) * t * ((o + 1) * t + o) + 1) + a }, easeInOutBack: function (e, t, a, n, i, o) { return void 0 == o && (o = 1.70158), (t /= i / 2) < 1 ? n / 2 * t * t * (((o *= 1.525) + 1) * t - o) + a : n / 2 * ((t -= 2) * t * (((o *= 1.525) + 1) * t + o) + 2) + a }, easeInBounce: function (e, t, a, n, i) { return n - jQuery.easing.easeOutBounce(e, i - t, 0, n, i) + a }, easeOutBounce: function (e, t, a, n, i) { return (t /= i) < 1 / 2.75 ? n * 7.5625 * t * t + a : 2 / 2.75 > t ? n * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + a : 2.5 / 2.75 > t ? n * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + a : n * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + a }, easeInOutBounce: function (e, t, a, n, i) { return i / 2 > t ? .5 * jQuery.easing.easeInBounce(e, 2 * t, 0, n, i) + a : .5 * jQuery.easing.easeOutBounce(e, 2 * t - i, 0, n, i) + .5 * n + a } }), function (e) { var t, a, n, o, s, r, l, c, u, d, f, p; if (a = !!document.createElement("canvas").getContext, t = function () { var e = document.createElement("div"); e.innerHTML = ''; var t = e.firstChild; return t.style.behavior = "url(#default#VML)", t ? "object" == typeof t.adj : !0 }(), !a && !t) return e.fn.maphilight = function () { return this }, void 0; if (a) { c = function (e) { return Math.max(0, Math.min(parseInt(e, 16), 255)) }, u = function (e, t) { return "rgba(" + c(e.substr(0, 2)) + "," + c(e.substr(2, 2)) + "," + c(e.substr(4, 2)) + "," + t + ")" }, n = function (t) { var a = e('').get(0); return a.width = t.width, a.height = t.height, a.getContext("2d").clearRect(0, 0, t.width, t.height), a }; var h = function (e, t, a, n, o) { if (n = n || 0, o = o || 0, e.beginPath(), "rect" == t) e.rect(a[0] + n, a[1] + o, a[2] - a[0], a[3] - a[1]); else if ("poly" == t) for (e.moveTo(a[0] + n, a[1] + o), i = 2; i < a.length; i += 2) e.lineTo(a[i], a[i + 1]); else "circ" == t && e.arc(a[0] + n, a[1] + o, a[2], 0, 2 * Math.PI, !1); e.closePath() }; o = function (t, a, n, i) { var o = t.getContext("2d"); if (i.shadow) { o.save(), "inside" == i.shadowPosition && (h(o, a, n), o.clip()); var s = 100 * t.width, r = 100 * t.height; h(o, a, n, s, r), o.shadowOffsetX = i.shadowX - s, o.shadowOffsetY = i.shadowY - r, o.shadowBlur = i.shadowRadius, o.shadowColor = u(i.shadowColor, i.shadowOpacity); var l = i.shadowFrom; l || (l = "outside" == i.shadowPosition ? "fill" : "stroke"), "stroke" == l ? (o.strokeStyle = "rgba(0,0,0,1)", o.stroke()) : "fill" == l && (o.fillStyle = "rgba(0,0,0,1)", o.fill()), o.restore(), "outside" == i.shadowPosition && (o.save(), h(o, a, n), o.globalCompositeOperation = "destination-out", o.fillStyle = "rgba(0,0,0,1);", o.fill(), o.restore()) } o.save(), h(o, a, n), i.fill && (o.fillStyle = u(i.fillColor, i.fillOpacity), o.fill()), i.stroke && (o.strokeStyle = u(i.strokeColor, i.strokeOpacity), o.lineWidth = i.strokeWidth, o.stroke()), o.restore(), i.fade && e(t).css("opacity", 0).animate({ opacity: 1 }, 100) }, s = function (e) { e.getContext("2d").clearRect(0, 0, e.width, e.height) } } else n = function (t) { return e('').get(0) }, o = function (t, a, n, i, o) { var s, r, l, c; s = '', r = i.stroke ? 'strokeweight="' + i.strokeWidth + '" stroked="t" strokecolor="#' + i.strokeColor + '"' : 'stroked="f"', l = '', "rect" == a ? c = e('') : "poly" == a ? c = e('') : "circ" == a && (c = e('')), c.get(0).innerHTML = s + l, e(t).append(c) }, s = function (t) { e(t).find("[name=highlighted]").remove() }; r = function (e) { var t, a = e.getAttribute("coords").split(","); for (t = 0; t < a.length; t++) a[t] = parseFloat(a[t]); return [e.getAttribute("shape").toLowerCase().substr(0, 4), a] }, f = function (t, a) { var n = e(t); return e.extend({}, a, e.metadata ? n.metadata() : !1, n.data("maphilight")) }, d = function (e) { return e.complete ? "undefined" != typeof e.naturalWidth && 0 === e.naturalWidth ? !1 : !0 : !1 }, l = {}; var m = !1; e.fn.maphilight = function (t) { if (t = e.extend({}, e.fn.maphilight.defaults, t), !a && !m) { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); var i = document.createStyleSheet(), c = ["shape", "rect", "oval", "circ", "fill", "stroke", "imagedata", "group", "textbox"]; e.each(c, function () { i.addRule("v\\:" + this, "behavior: url(#default#VML); antialias:true") }), m = !0 } return this.each(function () { var i, c, u, h, m, v, g; if (i = e(this), !d(this)) return window.setTimeout(function () { i.maphilight(t) }, 200); if (u = e.extend({}, t, e.metadata ? i.metadata() : !1, i.data("maphilight")), g = i.get(0).getAttribute("usemap"), g && (h = e('map[name="' + g.substr(1) + '"]'), i.is('img,input[type="image"]') && g && h.size() > 0)) { if (i.hasClass("maphilighted")) { console.log("has class maphilighted"); var y = i.parent(); i.insertBefore(y), y.remove(), e(h).unbind(".maphilight").find("area[coords]").unbind(".maphilight") } c = e("
").css({ display: "block", position: "relative", marginLeft: "auto", marginRight: "auto" }), u.wrapClass && (u.wrapClass === !0 ? c.addClass(e(this).attr("class")) : c.addClass(u.wrapClass)), p = i.css("marginLeft").replace("px", ""), i.before(c).css(l).remove(), c.append(i), m = n(this), e(m).css(l), v = function () { var t, n; n = f(this, u), n.neverOn || n.alwaysOn || (t = r(this), o(m, t[0], t[1], n, "highlighted"), a || e(m).append("")) }, e(h).trigger("alwaysOn.maphilight").find("area[coords]").bind("mouseover.maphilight", v).bind("mouseout.maphilight", function () { s(m) }), i.before(m), i.addClass("maphilighted") } }) }, e.fn.maphilight.defaults = { fill: !0, fillColor: "aac144", fillOpacity: .6, stroke: !0, strokeColor: "aac144", strokeOpacity: 1, strokeWidth: 2, fade: !0, alwaysOn: !1, neverOn: !1, groupBy: !1, wrapClass: !0, shadow: !1, shadowX: 0, shadowY: 0, shadowRadius: 6, shadowColor: "000000", shadowOpacity: .8, shadowPosition: "outside", shadowFrom: !1 } }(jQuery); var CAB = { settings: { stepNav: $(".steps li"), formParts: $(".form-part"), buttonEmail: $("button.email"), dialogBox: $(".dialog"), close: $("a.close"), buttonSend: $("button.send"), error: $("p.error"), confirm: $("p.confirm") }, init: function () { var e = this.settings; CAB.stepToggle(e), CAB.openDialog(e), CAB.dialogActions(e), CAB.closeDialog(e) }, stepToggle: function (e) { e.stepNav.click(function () { if ($(this).hasClass("active")) return !1; var t = $(this).index(); e.stepNav.removeClass("active"), $(this).addClass("active"), $(".form-part.active").removeClass("active"), e.formParts.eq(t).addClass("active") }) }, openDialog: function (e) { e.buttonEmail.click(function (t) { t.preventDefault(), e.dialogBox.fadeIn(500), $("body").css("overflow", "hidden") }) }, dialogActions: function (e) { e.buttonSend.click(function (t) { t.preventDefault(), /(.+)@(.+){2,}\.(.+){2,}/.test(e.dialogBox.find("input.to").val()) && /(.+)@(.+){2,}\.(.+){2,}/.test(e.dialogBox.find("input.from").val()) ? (e.error.fadeOut(500), e.confirm.fadeIn(500)) : (e.error.fadeIn(500), e.confirm.fadeOut(500)) }) }, closeDialog: function (e) { e.close.click(function (t) { t.preventDefault(), e.dialogBox.fadeOut(500, function () { $("p.error, p.confirm").css("display", "none"), $(".dialog form").find("input[type=text], textarea").val("") }), $("body").css("overflow", "auto") }) } }, Gallery = { settings: { launcher: $("a.launcher"), gallery: $(".gallery"), slides: $(".gallery .slides img"), btn: $(".gallery a.btn"), close: $("a.close"), current: 0 }, init: function () { var e = this.settings; Gallery.launchGallery(e), Gallery.closeGallery(e), Gallery.keyboardActions(e) }, windowSizeChecker: function (e) { e.slides.each(function () { var e = -($(this).height() / 2), t = -($(this).width() / 2); $(this).css({ "margin-left": t, "margin-top": e }) }) }, dotCounter: function (e, t) { $(".dots").remove(); var a = '
    '; $("#" + t + " img").each(function (e) { a += '
  • ' }), a += "
", e.gallery.find(".wrapper").append(a) }, launchGallery: function (e) { e.launcher.click(function (t) { t.preventDefault(); var a = $(this).attr("href").split("#")[1]; e.gallery.find("h3").remove(), Gallery.dotCounter(e, a), Gallery.runGallery(e, a), $("#" + a + " img").length < 2 ? e.btn.add(".dots").css("display", "none") : e.btn.add(".dots").attr("style", ""), "undefined" != typeof $("#" + a + " img").attr("alt") && e.gallery.append("

" + $("#" + a + " img").attr("alt") + "

"), e.gallery.fadeIn(500), $("body").css("overflow", "hidden"), $("html").hasClass("ie") && window.scrollTo(0, 0), $(window).resize(function () { Gallery.windowSizeChecker(e, a) }), $(window).resize() }) }, runGallery: function (e, t) { var a = $("#" + t + " img"), n = a.length, i = $(".wrapper .dots").find("li a"), o = 0; i.removeClass("active").eq(o).addClass("active"), $(".gallery .slides").css("display", "none"), $("#" + t).css("display", "block"), a.css("opacity", "0").eq(0).fadeTo(500, 1), e.btn.click(function (t) { if (t.preventDefault(), $(this).hasClass("next")) if (n - 1 > o) var s = o + 1; else var s = 0; else if (0 == o) var s = n - 1; else var s = o - 1; a.eq(o).fadeTo(500, 0), a.eq(s).fadeTo(500, 1), $(".gallery h3").html(a.eq(s).attr("alt")), o = s, e.current = o, i.removeClass("active").eq(o).addClass("active") }), i.click(function (e) { if (e.preventDefault(), $(this).hasClass("active")) return !1; var t = parseInt($(this).attr("href").split("#")[1]); a.eq(o).fadeTo(500, 0), a.eq(t).fadeTo(500, 1), o = t, i.removeClass("active").eq(o).addClass("active") }) }, closeGallery: function (e) { e.close.click(function (t) { t.preventDefault(), e.gallery.fadeOut(500), e.btn.unbind(), $("body").css("overflow", "visible") }) }, keyboardActions: function (e) { Mousetrap.bind("right", function () { e.btn.filter(".next").click() }), Mousetrap.bind("left", function () { e.btn.filter(".prev").click() }) } }, Property = { settings: { navBtn: $(".info-nav li a"), modules: $(".module") }, init: function () { var e = this.settings, t = window.location.hash.split("#")[1]; Property.bindUIActions(e), "undefined" != typeof t ? $(".info-nav li a." + t).click() : $(".info-nav li a").eq(0).click() }, bindUIActions: function (e) { e.navBtn.click(function (t) { return t.preventDefault(), $(this).hasClass("launcher") ? !1 : (Property.toggleModules(e, $(this), $(this).attr("href").split("#")[1]), void 0) }) }, toggleModules: function (e, t, a) { e.navBtn.removeClass("active"), t.addClass("active"), $(".property-modules .module.active").removeClass("active").fadeOut(300), $(".module." + a).delay(300).fadeIn(300).addClass("active") } }, SiteNav = { settings: { navTrigger: $("a.nav-trigger"), siteNav: $(".site-nav") }, init: function () { var e = this.settings; SiteNav.triggerMenu(e), $("html").hasClass("ie7") && e.navTrigger.append('') }, triggerMenu: function (e) { e.navTrigger.click(function (t) { t.preventDefault(), e.navTrigger.add(e.siteNav).toggleClass("off on") }) } }, LocationMaps = { settings: { mapNav: $(".map-toggle a"), maps: $(".map"), amensInfo: $(".map-nav.amens, .map-legend"), hoodsInfo: $(".map-nav.hoods"), amensNav: $(".map-nav.amens a"), hoodsNav: $(".map-nav.hoods a"), amensLayers: $(".amenities-map .layers img"), hoodsLayers: $(".accessibility-map .layers img"), legends: $(".map-legend ol") }, init: function () { var e = this.settings; e.mapNav.click(function (t) { t.preventDefault(), LocationMaps.mapToggle(e, $(this), $(this).attr("href").split("#")[1]) }), e.amensNav.click(function (t) { t.preventDefault(), LocationMaps.amensMapToggle(e, $(this), $(this).attr("href").split("#")[1]) }), e.hoodsNav.click(function (t) { t.preventDefault(), LocationMaps.hoodsMapToggle(e, $(this), $(this).attr("href").split("#")[1]) }) }, mapToggle: function (e, t, a) { e.mapNav.removeClass("active"), t.addClass("active"), e.maps.fadeOut(300), e.amensInfo.fadeOut(300), e.hoodsInfo.fadeOut(300), $("#" + a).delay(300).fadeIn(300), "amenities" === a ? e.amensInfo.fadeIn(300) : e.hoodsInfo.fadeIn(300) }, amensMapToggle: function (e, t, a) { e.amensNav.removeClass("active"), t.addClass("active"), e.amensLayers.fadeOut(500), e.legends.fadeOut(500), "all" == a ? $(".layers ." + a).fadeIn(500) : ($(".layers ." + a).fadeIn(500), $(".map-legend ol." + a).delay(500).fadeIn(500)) }, hoodsMapToggle: function (e, t, a) { e.hoodsNav.removeClass("active"), t.addClass("active"), e.hoodsLayers.add($(".marks li")).fadeOut(500), $(".layers ." + a).add($(".marks li." + a)).add($(".marks li.marker")).fadeIn(500) } }, Emergency = { settings: { emergencyBox: $(".emergency-alert") }, init: function () { var e = this.settings; return Emergency.closeDialog(e), $("body").hasClass("pageHome") ? !1 : ($("body").css("padding-top", e.emergencyBox.height()), $(window).resize(function () { $("body").css("padding-top", e.emergencyBox.height()) }), void 0) }, closeDialog: function (e) { e.emergencyBox.find(".close").click(function (t) { t.preventDefault(), e.emergencyBox.hide(), $("body").css("padding-top", "0") }) } }, FiveStar = { settings: { benefits: $(".benefits .column"), planes: $(".planes") }, init: function () { var e = this.settings; e.benefits.hover(function () { $(this).addClass("active") }, function () { $(this).removeClass("active") }), $(".planes img").css({ display: "block", opacity: "0" }), FiveStar.flyPlanes(e, "den-sf", { top: "37%", left: "9%" }, 5e3), setTimeout(function () { FiveStar.flyPlanes(e, "den-sf-2", { top: "37%", left: "9%" }, 5e3) }, 2500), setTimeout(function () { FiveStar.flyPlanes(e, "la-den", { top: "42%", left: "35.5%" }, 5e3) }, 4e3), setTimeout(function () { FiveStar.flyPlanes(e, "dal-oc", { top: "55%", left: "14%" }, 6e3) }, 1e3), setTimeout(function () { FiveStar.flyPlanes(e, "dal-oc-2", { top: "55%", left: "14%" }, 6e3) }, 4e3), setTimeout(function () { FiveStar.flyPlanes(e, "dal-den", { top: "42%", left: "35.5%" }, 5e3) }, 2e3), setTimeout(function () { FiveStar.flyPlanes(e, "hou-dal", { top: "64%", left: "49.2%" }, 3e3) }, 3e3), setTimeout(function () { FiveStar.flyPlanes(e, "den-min", { top: "21%", left: "55%" }, 5e3) }, 4e3), setTimeout(function () { FiveStar.flyPlanes(e, "den-chi", { top: "34%", left: "63%" }, 5e3) }, 5e3), setTimeout(function () { FiveStar.flyPlanes(e, "den-chi-2", { top: "34%", left: "63%" }, 5e3) }, 7500), setTimeout(function () { FiveStar.flyPlanes(e, "min-dal", { top: "64%", left: "49.2%" }, 6e3) }, 4e3), setTimeout(function () { FiveStar.flyPlanes(e, "min-dal-2", { top: "64%", left: "49.2%" }, 6e3) }, 7e3), setTimeout(function () { FiveStar.flyPlanes(e, "chi-dal", { top: "64%", left: "49.2%" }, 5e3) }, 3e3), setTimeout(function () { FiveStar.flyPlanes(e, "dal-atl", { top: "60%", left: "71%" }, 5e3) }, 2e3), setTimeout(function () { FiveStar.flyPlanes(e, "hou-atl", { top: "60%", left: "71%" }, 5e3) }, 1e3), setTimeout(function () { FiveStar.flyPlanes(e, "atl-chi", { top: "34%", left: "63%" }, 5e3) }, 4e3), setTimeout(function () { FiveStar.flyPlanes(e, "atl-chi-2", { top: "34%", left: "63%" }, 5e3) }, 6500), setTimeout(function () { FiveStar.flyPlanes(e, "la-sf", { top: "37%", left: "9%" }, 4e3) }, 1500), setTimeout(function () { FiveStar.flyPlanes(e, "atl-mia", { top: "84%", left: "78.7%" }, 4e3) }, 1e3), setTimeout(function () { FiveStar.flyPlanes(e, "atl-bos", { top: "25%", left: "87.5%" }, 6e3) }, 2e3), setTimeout(function () { FiveStar.flyPlanes(e, "chi-bos", { top: "25%", left: "87.5%" }, 5e3) }, 3e3) }, flyPlanes: function (e, t, a, n) { var i = "easeInOutQuad"; e.planes.find("." + t).addClass("active").animate(a, n, i, function () { $(this).attr("style", "").removeClass("active"), setTimeout(function () { FiveStar.flyPlanes(e, t, a, n) }, 100) }) } }, ScrollTo = { settings: {}, init: function () { this.settings, $(".scroll-prompt a").click(function (e) { ScrollTo.scrollToSection(e, $(this).attr("href").split("#")[1]) }) }, scrollToSection: function (e, t) { e.preventDefault(); var a = 100, n = $("#" + t).offset().top - a; $("body,html").animate({ scrollTop: n }, 500) } }, HomeIntro = { settings: {}, init: function () { this.settings, $(".sky-clouds").delay(500).fadeIn(750), $(".tower").delay(1e3).fadeIn(750), $(".light-rays").delay(1500).fadeIn(750), $(".text-box").delay(2e3).fadeIn(750) } }, PageSetUp = { settings: { pageName: $("body").attr("class") }, init: function () { this.settings, SiteNav.init(), HeaderShrinkage.init(), ScrollEventAnimations.init(), Gallery.init(), ScrollTo.init(), Emergency.init(), $("body").hasClass("pageHome") ? (HomeModules.init(), $(window).bind("load", function () { HomeIntro.init() })) : $("body").hasClass("pageAvailability") ? Availability.init() : $("body").hasClass("pageProperty") ? Property.init() : $("body").hasClass("pageFivestar") ? FiveStar.init() : $("body").hasClass("pageLocation") ? LocationMaps.init() : $("body").hasClass("pageCab") && CAB.init(), $("html").hasClass("ie7") && ($("a").append(''), $(".modules a span, .scroll-prompt a span, .main-content a span, .highlights p, .slide-box .icon-text p").append(''), $("footer p.bubble").append(''), $(".info-nav a").append(''), $(".ownership li").append('+'), $(".pageLocation .hero li").append(''), $(".pageLocation .map-nav li").append(''), $(".pageFivestar .text-box h3").append('')) } }, HomeModules = { settings: { modules: $(".module"), moduletrigger: $(".module h2 a"), slideBtn: $(".slide-nav a") }, init: function () { var e = this.settings; $(".slide-box ul li:first-child").addClass("active"), HomeModules.activateModule(e), HomeModules.slideActions(e) }, activateModule: function (e) { e.moduletrigger.click(function (t) { t.preventDefault(); var a = $(this).parents(".module"); a.hasClass("off") && e.modules.removeClass("on").addClass("off"), a.toggleClass("off on") }) }, slideActions: function (e) { e.slideBtn.click(function (e) { e.preventDefault(); var t = $(this).parents(".slide-box").find("ul li.active").index(), a = $(this).parents(".slide-box").find("ul li"), n = a.length; if ($(this).hasClass("next")) { if (n - 1 > t) var i = t + 1; else var i = 0; a.eq(t).animate({ left: "-100%" }, 500, function () { $(this).removeClass("active") }), a.eq(i).css("left", "100%").animate({ left: "0" }, 500, function () { $(this).addClass("active") }) } else { if (0 == t) var i = n - 1; else var i = t - 1; a.eq(t).animate({ left: "100%" }, 500, function () { $(this).removeClass("active") }), a.eq(i).css("left", "-100%").animate({ left: "0" }, 500, function () { $(this).addClass("active") }) } }) } }, Availability = { settings: { slideBtn: $(".slide-nav a"), knob: $(".knob-box"), wireframe: $(".wireframe"), floors: $(".wireframe area"), popup: $(".pop-up"), launcher: $("a.launcher"), iframe: $("#video iframe") }, init: function () { var e = this.settings; $(".slide-show ul li:first-child").addClass("active"), $(".wireframe img[usemap]").rwdImageMaps(), $(".wireframe img").maphilight({ fillColor: "69cef6", fillOpacity: 1, stroke: !0, strokeColor: "69cef6" }), Availability.slideActions(e), Availability.wireFrameReveal(e), Availability.wireframeActions(e), Availability.videoPopUp(e) }, slideActions: function (e) { e.slideBtn.click(function (e) { e.preventDefault(); var t = $(this).parents(".slide-show").find("ul li.active").index(), a = $(this).parents(".slide-show").find("ul li"), n = a.length; if ($(this).hasClass("next")) { if (n - 1 > t) var i = t + 1; else var i = 0; a.eq(t).animate({ left: "-100%" }, 500, function () { $(this).removeClass("active") }), a.eq(i).css("left", "100%").animate({ left: "0" }, 500, function () { $(this).addClass("active") }) } else { if (0 == t) var i = n - 1; else var i = t - 1; a.eq(t).animate({ left: "100%" }, 500, function () { $(this).removeClass("active") }), a.eq(i).css("left", "-100%").animate({ left: "0" }, 500, function () { $(this).addClass("active") }) } }) }, wireFrameReveal: function (e) { var t = e.knob.position().top; e.knob.on("movestart", function () { $(this).find(".knob").addClass("active"), $(".main-content").addClass("no-select") }), e.knob.on("move", function (a) { $(".prompt").fadeOut(500); var n = a.distY + t; n >= 0 && n <= $(".building").height() && (e.knob.css("top", n), e.wireframe.css("height", n)) }), e.knob.on("moveend", function () { t = e.knob.position().top, $(this).find(".knob").removeClass("active"), $(".main-content").removeClass("no-select") }) }, wireframeActions: function (e) { e.floors.hover(function () { Availability.loadPopUp(e, $(this).attr("ref"), $(this).attr("alt"), $(this).attr("href").split("#")[1]) }, function () { e.popup.fadeOut(250), e.floors.unbind(), setTimeout(function () { Availability.wireframeActions(e) }, 250) }), e.floors.click(function (e) { e.preventDefault() }) }, loadPopUp: function (e, t, a) { var n = "

" + t + "

"; n += "

" + a + "

", e.popup.html(n).css("top", "19.25%").delay(200).fadeIn(250) }, videoPopUp: function (e) { e.launcher.click(function (t) { t.preventDefault(); var a = $(this).attr("rel"); e.iframe.attr("src", a) }), $(".gallery a.close").click(function (t) { t.preventDefault(), e.iframe.attr("src", "") }) } }, HeaderShrinkage = { settings: { siteHeader: $(".site-header") }, init: function () { var e = this.settings; $(window).scroll(function () { if ($(window).width() >= 900) { var t = e.siteHeader.height(); $(window).scrollTop() > t ? e.siteHeader.addClass("shrinked") : e.siteHeader.removeClass("shrinked") } else e.siteHeader.removeClass("shrinked") }) } }, ScrollEventAnimations = { settings: { pageName: $("body").attr("class") }, init: function () { var e = this.settings; ScrollEventAnimations.headlineEvents(e), $("body").hasClass("pageHome") && (ScrollEventAnimations.homEvents(e), $(window).scroll()) }, homEvents: function () { $(window).scroll(function () { if ($(window).width() > 1024) { var e = $(window).scrollTop(); //$(".text-box, .tower").css("margin-top", .5 * e), $(".sky-clouds").css("margin-left", -(.15 * e)) } else $(".text-box").css("margin-top", "0") }), $(window).scroll(function () { $(".main-content section").each(function () { var e = $(this).offset().top - $("body").height() + $(this).height() / 3; $(window).scrollTop() >= e && ($(this).find("img").eq(1).animate({ margin: "0" }, 750), $(this).find("img").eq(0).delay(200).animate({ opacity: "1" }, 750), $(this).find("p").delay(200).animate({ opacity: "1" }, 750)) }) }) }, headlineEvents: function () { var e = $(".scroll-prompt a").css("opacity"); $(window).scroll(function () { var t = $(window).scrollTop(); //$(".scroll-prompt a").css("opacity", e - .005 * t + 4), $(window).width() > 1024 ? $(".headline").css("top", .4 * t) : $(".headline").css("top", "0") }) } }; // Copyright (C)2014 CBRE | Property Marketing Center ! function () { PageSetUp.init(), $("footer p.copyright span").prepend("©" + (new Date).getFullYear() + " ") }();;