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 s = 1.70158, r = 0, o = n; if (0 == t) return a; if (1 == (t /= i)) return a + n; if (r || (r = .3 * i), o < Math.abs(n)) { o = n; var s = r / 4 } else var s = r / (2 * Math.PI) * Math.asin(n / o); return -(o * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * i - s) * (2 * Math.PI) / r)) + a }, easeOutElastic: function (e, t, a, n, i) { var s = 1.70158, r = 0, o = n; if (0 == t) return a; if (1 == (t /= i)) return a + n; if (r || (r = .3 * i), o < Math.abs(n)) { o = n; var s = r / 4 } else var s = r / (2 * Math.PI) * Math.asin(n / o); return o * Math.pow(2, -10 * t) * Math.sin((t * i - s) * (2 * Math.PI) / r) + n + a }, easeInOutElastic: function (e, t, a, n, i) { var s = 1.70158, r = 0, o = n; if (0 == t) return a; if (2 == (t /= i / 2)) return a + n; if (r || (r = i * (.3 * 1.5)), o < Math.abs(n)) { o = n; var s = r / 4 } else var s = r / (2 * Math.PI) * Math.asin(n / o); return t < 1 ? -.5 * (o * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * i - s) * (2 * Math.PI) / r)) + a : o * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * i - s) * (2 * Math.PI) / r) * .5 + n + a }, easeInBack: function (e, t, a, n, i, s) { return void 0 == s && (s = 1.70158), n * (t /= i) * t * ((s + 1) * t - s) + a }, easeOutBack: function (e, t, a, n, i, s) { return void 0 == s && (s = 1.70158), n * ((t = t / i - 1) * t * ((s + 1) * t + s) + 1) + a }, easeInOutBack: function (e, t, a, n, i, s) { return void 0 == s && (s = 1.70158), (t /= i / 2) < 1 ? n / 2 * (t * t * (((s *= 1.525) + 1) * t - s)) + a : n / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 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 : t < 2 / 2.75 ? n * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + a : t < 2.5 / 2.75 ? 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 t < i / 2 ? .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, 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] : m[e.which] ? m[e.which] : String.fromCharCode(e.which).toLowerCase() } function s(e) { e = e || {}; var t, a = !1; for (t in C) e[t] ? a = !0 : C[t] = 0; a || (I = !1) } function r(e, t, a, n, i, s) { var r, o, l = [], c = a.type; if (!w[e]) return []; for ("keyup" == c && u(e) && (t = [e]), r = 0; r < w[e].length; ++r) if (o = w[e][r], !(!n && o.seq && C[o.seq] != o.level || c != o.action || ("keypress" != c || a.metaKey || a.ctrlKey) && t.sort().join(",") !== o.modifiers.sort().join(","))) { var p = n && o.seq == n && o.level == s; (!n && o.combo == i || p) && w[e].splice(r, 1), l.push(o) } return l } function o(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) { T.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 && M === t ? M = !1 : T.handleKey(t, o(e), e)) } function u(e) { return "shift" == e || "ctrl" == e || "alt" == e || "meta" == e } function p(e, t, a, n) { function r(t) { return function () { I = t, ++C[e], clearTimeout(g), g = setTimeout(s, 1e3) } } function o(t) { l(a, t, e), "keyup" !== n && (M = i(t)), setTimeout(s, 10) } for (var c = C[e] = 0; c < t.length; ++c) { var u = c + 1 === t.length ? o : r(n || f(t[c + 1]).action); h(t[c], u, n, e, c) } } function f(e, t) { var a, n, i, s = []; 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], s.push("shift")), u(n) && s.push(n); if (a = n, i = t, !i) { if (!d) { d = {}; for (var r in v) 95 < r && 112 > r || v.hasOwnProperty(r) && (d[v[r]] = r) } i = d[a] ? "keydown" : "keypress" } return "keypress" == i && s.length && (i = "keydown"), { key: n, modifiers: s, action: i } } function h(e, t, a, n, i) { $[e + ":" + a] = t, e = e.replace(/\s+/g, " "); var s = e.split(" "); 1 < s.length ? p(e, s, t, a) : (a = f(e, a), w[a.key] = w[a.key] || [], r(a.key, a.modifiers, { type: a.action }, n, e, i), w[a.key][n ? "unshift" : "push"]({ callback: t, modifiers: a.modifiers, action: a.action, seq: n, level: i, combo: e })) } var d, g, 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" }, m = { 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 = {}, $ = {}, C = {}, M = !1, k = !1, I = !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 T = { bind: function (e, t, a) { e = e instanceof Array ? e : [e]; for (var n = 0; n < e.length; ++n) h(e[n], t, a); return this }, unbind: function (e, t) { return T.bind(e, function () { }, t) }, trigger: function (e, t) { return $[e + ":" + t] && $[e + ":" + t]({}, e), this }, reset: function () { return w = {}, $ = {}, this }, stopCallback: function (e, t) { return !(-1 < (" " + t.className + " ").indexOf(" mousetrap ")) && ("INPUT" == t.tagName || "SELECT" == t.tagName || "TEXTAREA" == t.tagName || t.isContentEditable) }, handleKey: function (e, t, a) { var n, i = r(e, t, a); t = {}; var o = 0, c = !1; for (n = 0; n < i.length; ++n) i[n].seq && (o = Math.max(o, i[n].level)); for (n = 0; n < i.length; ++n) i[n].seq ? i[n].level == o && (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 && k, a.type != I || u(e) || i || s(t), k = c && "keydown" == a.type } }; e.Mousetrap = T, "function" == typeof define && define.amd && define(T) }(window, document), function (e, t, a) { e.tapHandling = !1; var n = function (a) { return a.each(function () { function a(e) { t(e.target).trigger("tap", [e, t(e.target).attr("href")]), e.stopImmediatePropagation() } function n(e) { var t = e.originalEvent || e, a = t.touches || t.targetTouches; return a ? [a[0].pageX, a[0].pageY] : null } function i(e) { if (e.touches && e.touches.length > 1 || e.targetTouches && e.targetTouches.length > 1) return !1; var t = n(e); c = t[0], l = t[1] } function s(e) { if (!u) { var t = n(e); t && (Math.abs(l - t[1]) > f || Math.abs(c - t[0]) > f) && (u = !0) } } function r(t) { if (clearTimeout(o), o = setTimeout(function () { e.tapHandling = !1, u = !1 }, 1e3), !(t.which && t.which > 1 || t.shiftKey || t.altKey || t.metaKey || t.ctrlKey)) { if (t.preventDefault(), u || e.tapHandling && e.tapHandling !== t.type) return void (u = !1); e.tapHandling = t.type, a(t) } } var o, l, c, u, p = t(this), f = 10; p.bind("touchstart.tappy MSPointerDown.tappy", i).bind("touchmove.tappy MSPointerMove.tappy", s).bind("touchend.tappy MSPointerUp.tappy", r).bind("click.tappy", r) }) }, i = function (e) { return e.unbind(".tappy") }; if (t.event && t.event.special) t.event.special.tap = { add: function (e) { n(t(this)) }, remove: function (e) { i(t(this)) } }; else { var s = t.fn.bind, r = t.fn.unbind; t.fn.bind = function (e) { return /(^| )tap( |$)/.test(e) && n(this), s.apply(this, arguments) }, t.fn.unbind = function (e) { return /(^| )tap( |$)/.test(e) && i(this), r.apply(this, arguments) } } }(this, jQuery); var AmenitiesMap = { settings: { legendNav: $(".map-legend li a"), amensMap: $(".amenities-map") }, init: function () { var e = this.settings; AmenitiesMap.UIActions(e) }, UIActions: function (e) { $(".amenities-map li").hover(function () { $(this).addClass("on") }, function () { $(this).removeClass("on") }), e.legendNav.click(function (t) { if (t.preventDefault(), $(this).hasClass("active")) return !1; e.legendNav.removeClass("active"), $(this).addClass("active"); var a = $(this).attr("href").split("#")[1]; "all" === a ? e.amensMap.find("ul").fadeIn(500) : (e.amensMap.find("ul").fadeOut(500), e.amensMap.find("ul." + a).fadeIn(500)) }) } }, AvailableSpace = { settings: { tabBtn: $(".tab-nav a"), space: $(".avail-space h3"), floorplans: $(".floorplans img") }, init: function () { var e = this.settings; AvailableSpace.tabTap(e), AvailableSpace.spaceTap(e), AvailableSpace.onWindowResize(e), AvailableSpace.hoverSpace(e) }, tabTap: function (e) { e.tabBtn.click(function (t) { $(".avail-space li.on").removeClass("on").addClass("off").attr("style", " "), e.floorplans.removeClass("on") }) }, spaceTap: function (e) { e.space.click(function (t) { AvailableSpace.toggleSpace(e, $(this)) }) }, onWindowResize: function (e) { $(window).resize(function () { var e = $(".avail-space li.on").find("h3").outerHeight() + $(".avail-space li.on").find(".details").outerHeight(); $(".avail-space li.on").css("height", e) }) }, toggleSpace: function (e, t) { var a = t.parent(); if (e.floorplans.removeClass("on"), a.hasClass("on")) { var n = t.outerHeight() + 5; a.toggleClass("off on"), a.animate({ height: n }, 300, "easeInOutQuad") } else { var i = $(".avail-space li.on"), n = i.find("h3").outerHeight() + 5; i.animate({ height: n }, 300, "easeInOutQuad"), i.toggleClass("off on"); var s = t.outerHeight() + t.siblings().outerHeight(); a.css("height", n).animate({ height: s }, 300, "easeInOutQuad"), a.toggleClass("off on"), $(".tab.active .floorplans img." + t.parent().attr("class").split(" ")[0]).addClass("on") } }, hoverSpace: function (e) { e.space.hover(function () { $(".tab.active .floorplans img." + $(this).parent().attr("class").split(" ")[0]).addClass("hovered") }, function () { $(".tab.active .floorplans img." + $(this).parent().attr("class").split(" ")[0]).removeClass("hovered") }) } }, 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, t) { e.slides.each(function (e) { var t = -($(this).height() / 2), a = -($(this).width() / 2); $(this).css({ "margin-left": a, "margin-top": t }) }) }, dotCounter: function (e, t) { $(".dots").remove(); var 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"), s = 0; i.removeClass("active").eq(s).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 (s < n - 1) var r = s + 1; else var r = 0; else if (0 == s) var r = n - 1; else var r = s - 1; a.eq(s).fadeTo(500, 0), a.eq(r).fadeTo(500, 1), $(".gallery h3").html(a.eq(r).attr("alt")), s = r, e.current = s, i.removeClass("active").eq(s).addClass("active") }), i.click(function (e) { if (e.preventDefault(), $(this).hasClass("active")) return !1; var t = parseInt($(this).attr("href").split("#")[1]); a.eq(s).fadeTo(500, 0), a.eq(t).fadeTo(500, 1), s = t, i.removeClass("active").eq(s).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 (t) { e.btn.filter(".next").click() }), Mousetrap.bind("left", function (t) { e.btn.filter(".prev").click() }) } }, Availability = { settings: { launcher: $("a.launcherAvail"), availability: $(".availability"), close: $("a.closeAvail"), current: 0 }, init: function () { var e = this.settings; Availability.launchAvailability(e), Availability.closeAvailability(e) }, windowSizeChecker: function (e, t) { e.slides.each(function (e) { var t = -($(this).height() / 2), a = -($(this).width() / 2); $(this).css({ "margin-left": a, "margin-top": t }) }) }, launchAvailability: function (e) { e.launcher.click(function (t) { t.preventDefault(); var a = $(this).attr("href").split("#")[1]; e.availability.fadeIn(500), $("body").css("overflow", "hidden"), $("html").hasClass("ie") && window.scrollTo(0, 0), $(window).resize(function () { Availability.windowSizeChecker(e, a) }), $(window).resize() }) }, closeAvailability: function (e) { e.close.click(function (t) { t.preventDefault(), e.availability.fadeOut(500), e.btn.unbind(), $("body").css("overflow", "visible") }) } }, LocationMap = { settings: { subjectProp: "Property Name", subjectLoc: [34.0515967, -118.2591709], subjectMapsURL: "https://www.google.com/maps/place/515+S+Flower+St,+Los+Angeles,+CA+90071/@34.0515967,-118.2591709,17z/data=!3m1!4b1!4m5!3m4!1s0x80c2c7b3b745579b:0x843a8d9db4d0686c!8m2!3d34.0515967!4d-118.2569769", mapZoom: 13 }, init: function () { var e = this.settings; LocationMap.loadMap(e) }, loadMap: function (e) { var t = new google.maps.LatLng(e.subjectLoc[0], e.subjectLoc[1]), a = t, n = e.mapZoom, i = { center: a, zoom: n, panControl: !1, draggable: !0, scrollwheel: !1, streetViewControl: !1, mapTypeId: google.maps.MapTypeId.TERRAIN, mapTypeControlOptions: { mapTypeIds: [] }, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.TOP_RIGHT } }; e.map = new google.maps.Map(document.getElementById("map"), i), google.maps.event.addDomListener(window, "resize", function () { e.map.setCenter(a) }); var s = { url: "../assets/img/subject-marker.svg", scaledSize: new google.maps.Size(60, 80), anchor: new google.maps.Point(30, 80) }, r = new google.maps.Marker({ position: t, map: e.map, icon: s, optimized: !1, title: e.subjectProp, url: e.subjectMapsURL, animation: google.maps.Animation.DROP }); google.maps.event.addListener(r, "click", function () { window.open(r.url) }) } }, PageIntro = { settings: { sail: $(".modern .sail"), main: $(".modern .main-content"), hero: $(".modern .hero img").eq(0) }, init: function () { var e = this.settings; e.hero.animate({ "margin-left": "0", opacity: "1" }, 500), e.sail.animate({ left: "0", opacity: "1" }, 500), e.main.delay(300).animate({ left: "0", opacity: "1" }, 500), $(window).scroll(function () { x = .075 * $(window).scrollTop(), e.sail.css("left", -x) }) } }, PageSetUp = { settings: { pageName: $("body").attr("class") }, init: function () { var e = this.settings; SiteNav.init(), Gallery.init(), PageIntro.init(), Availability.init(), "page-home" == e.pageName || ("page-property" == e.pageName ? $(".buildings li").hover(function () { $(this).addClass("on") }, function () { $(this).removeClass("on") }) : "page-availability" == e.pageName ? (TabNav.init(), AvailableSpace.init()) : "page-location" == e.pageName ? (TabNav.init(), AmenitiesMap.init(), LocationMap.init()) : "page-amenities" == e.pageName ? TabNav.init() : "page-contact" == e.pageName && TabNav.init()) } }, SiteNav = { settings: { navTrigger: $("a.nav-trigger"), siteHeader: $(".site-header"), siteNav: $(".site-nav") }, init: function () { var e = this.settings; SiteNav.triggerMenu(e), SiteNav.shrinkHeader(e) }, triggerMenu: function (e) { e.navTrigger.bind("tap", function (t) { t.preventDefault(), e.navTrigger.add(e.siteNav).toggleClass("off on") }) }, shrinkHeader: function (e) { var t = e.siteHeader.height(); $(window).resize(function () { e.siteHeader.height() }), $(window).scroll(function () { if ($(window).scrollTop() > t) { if (e.siteHeader.hasClass("shrinked")) return !1; e.siteHeader.addClass("shrinked"), e.siteHeader.animate({ top: "0" }, 500) } else { if (!e.siteHeader.hasClass("shrinked")) return !1; e.siteHeader.removeClass("shrinked").attr("style", " ") } }) } }, SlideShow = { settings: { slides: $(".slideshow img"), timer: 5e3 }, init: function () { var e = this.settings; SlideShow.runGallery(e) }, runGallery: function (e) { var t = e.slides.length, a = 0; setInterval(function () { if (a < t - 1) var n = a + 1; else var n = 0; e.slides.eq(a).fadeTo(1e3, 0), e.slides.eq(n).fadeTo(1e3, 1), a = n }, e.timer) } }, TabNav = { settings: { tabBtn: $(".tab-nav a"), tabs: $(".tab") }, init: function () { var e = this.settings; TabNav.UIActions(e), "undefined" != typeof window.location.hash.split("#")[1] ? e.currentTab = window.location.hash.split("#")[1] : e.currentTab = e.tabBtn.eq(0).attr("href").split("#")[1], $(".tab-nav a." + e.currentTab).click() }, UIActions: function (e) { e.tabBtn.click(function (t) { if (t.preventDefault(), $(this).hasClass("active")) return !1; var a = $(this).attr("href"); return e.tabBtn.removeClass("active"), $(this).addClass("active"), $(".tab.active").removeClass("active"), $(a).addClass("active"), !!history.pushState && void history.pushState(null, null, a) }) } }; ! function () { PageSetUp.init(), $("footer p.copyright span").prepend("©" + (new Date).getFullYear() + " ") }(); PageSetUp = { settings: { body: $("body") }, init: function () { var t = this.settings; SiteNav.init(), t.body.hasClass("page-home") ? (Slideshow.init(8e3), Gallery.init()) : t.body.hasClass("page-property") ? Gallery.init() : t.body.hasClass("five-star") ? Gallery.init() : t.body.hasClass("page-area-amenities") ? Slideshow.init(5e3) : t.body.hasClass("page-location") && LocationMap.init() } }, SiteNav = { settings: { trigger: $(".site-header__nav-trigger"), body: $("body") }, init: function () { var t = this.settings; SiteNav.bindUIActions(t) }, bindUIActions: function (t) { t.trigger.bind("tap", function (e) { t.body.toggleClass("hide-nav show-nav") }) } }, Slideshow = { settings: { slideshow: $(".slideshow"), slider: $(".slideshow__slider"), slides: $(".slideshow__slide"), numSlides: $(".slideshow__slide").length, currentSlide: 0 }, init: function (t) { var e = this.settings; e.timeInterval = t, Slideshow.setUp(e), Slideshow.loadSlideNav(e), Slideshow.bindUIActions(e), Slideshow.counter(e) }, setUp: function (t) { var e = 100 * t.numSlides; t.slider.css("width", e + "%"), t.slideWidth = 100 / t.numSlides, t.slides.css("width", t.slideWidth + "%") }, loadSlideNav: function (t) { var e = '", t.slideshow.append(e), t.slideNav = $(".slideshow__nav a"), t.slideNav.eq(0).addClass("-active") }, bindUIActions: function (t) { t.slideNav.click(function (e) { return e.preventDefault(), !$(this).hasClass("-active") && (t.slideNav.removeClass("-active"), clearTimeout(t.timer), Slideshow.goToSlide(t, $(this).attr("href").split("#")[1]), $(this).addClass("-active"), Slideshow.counter(t), void 0) }) }, counter: function (t) { t.timer = setTimeout(function () { t.currentSlide == t.numSlides - 1 ? t.slideNav.eq(0).click() : t.slideNav.eq(parseInt(t.currentSlide) + 1).click() }, t.timeInterval) }, goToSlide: function (t, e) { var i = t.slideWidth * e; t.slides.removeClass("-active").eq(e).addClass("-active"), t.slider.css({ transform: "translateX(-" + i + "%)" }), t.slider.css({ transform: "translate3d(-" + i + "%, 0, 0)" }), t.currentSlide = e } }; ! function () { ! function (t) { t.className = t.className.replace("no-js", "js") }(document.documentElement), PageSetUp.init() }();