﻿function validateEmail(email) {
    var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
    return email.match(re);
}
function InitializeShortList() { loadFavouriteProperties(); $("[name='ShortListIcon']").each(function () { var a = $(this).attr("data-propertyId"); var b = this; var c = false; $(ShortListed).each(function () { if (this.PropertyID == a) { c = true } }); if (c) { $(this).attr("data-isshortlisted", c); $(this).attr("src", __contentpath + "/img/la-star-icon.jpg").next("a").html("Remove from Shortlist") } else { $(this).attr("data-isshortlisted", c); $(this).attr("src", __contentpath + "/img/la-star-iconNotFavorite.jpg").next("a").html("Shortlist") } }).next("a").click(function () { var a = this; var b = $(this).prev("img").attr("data-propertyId"); var c = $(this).prev("img").attr("data-location"); var d = $(this).prev("img").attr("data-isshortlisted"); var e = d == "true" ? "/Utility/RemoveFromWebFavourite" : "/Utility/AddToWebFavourite"; $.ajax({ url: e, data: { PropertyId: b, LocationId: c, GUID: $.cookie("webFavouriteKey") }, success: function (b) { loadFavouriteProperties(); $(a).attr("data-isshortlisted", d == "true" ? "false" : "true"); if (d == "false") { $(a).html("Remove from Shortlist").prev("img").attr("data-isshortlisted", "true").attr("src", __contentpath + "/img/la-star-icon.jpg") } else { $(a).html("Shortlist").prev("img").attr("data-isshortlisted", "false").attr("src", __contentpath + "/img/la-star-iconNotFavorite.jpg") } } }) }) } function InitializeSearchBox() { $("input[name='searchterm']").autocomplete({ minLength: 2, source: function (a, b) { var c = a.term.substring(0, 2); if (c in cache) { b($.ui.autocomplete.filter(cache[c], a.term)); return } var d = "/Home/Locations?prefix=" + c; lastXhr = $.getJSON(d, function (d, e, f) { cache[c] = d; if (f === lastXhr) { b($.ui.autocomplete.filter(cache[c], a.term)) } }) } }); var a = "Search your destination..."; $("input[name='searchterm']").each(function () { if ($(this).val() == a || $(this).val() == "") { $(this).val(a).css("color", "#CCC").blur(function () { if ($(this).val() == "") { $(this).val(a).css("color", "#CCC") } }).focus(function () { if ($(this).val() == a) { $(this).val("").css("color", "#333") } }) } else { $(this).css("color", "#333").blur(function () { if ($(this).val() == "") { $(this).val(a).css("color", "#CCC") } }).focus(function () { if ($(this).val() == a) { $(this).val("").css("color", "#333") } }) } var b = this; var c = $(this).parents("form:first").get(0); $("#btnSearch", c).click(function () { if ($(b).val() != a) { c.submit() } }) }) } function makeEnterKeyActivateSearch(a, b) { var c; if (a && a.which) c = a.which; else if (window.event) { a = window.event; c = a.keyCode } if (c == 13) { if (document.getElementById("searchterm") != null && document.getElementById("btnSearch") != null && document.getElementById(b) != null) { document.getElementById("searchterm").value = document.getElementById(b).value; document.getElementById("btnSearch").click() } } } function toggleTabBarPlusMinusSign(a, b, c) { if (document.getElementById(a) != null && document.getElementById(b) != null && document.getElementById(c) != null) { if (document.getElementById(b).style.display != "none") document.getElementById(c).innerHTML = "+"; else document.getElementById(c).innerHTML = "-" } } function toggleTabBar(a, b, c, d, e) { if (document.getElementById(a) != null && document.getElementById(b) != null && document.getElementById(c) != null) { if (document.getElementById(b).style.display != "none") document.getElementById(c).src = __contentpath + "/img/" + d; else document.getElementById(c).src = __contentpath + "/img/" + e } } function removeFromWebFavourite(a) { $.ajax({ url: "/Utility/RemoveFromWebFavourite", data: { PropertyId: a, GUID: $.cookie("webFavouriteKey") }, success: function (b) { loadFavouriteProperties(); if (document.getElementById("divPropertyID_" + a + "_AddToWebFavourite") != null) document.getElementById("divPropertyID_" + a + "_AddToWebFavourite").style.display = ""; if (document.getElementById("divPropertyID_" + a + "_RemoveFromWebFavourite") != null) document.getElementById("divPropertyID_" + a + "_RemoveFromWebFavourite").style.display = "none" } }) } function addToWebFavourite(a, b) { $.ajax({ url: "/Utility/AddToWebFavourite", data: { PropertyId: a, LocationId: b, GUID: $.cookie("webFavouriteKey") }, success: function (b) { loadFavouriteProperties(); if (document.getElementById("divPropertyID_" + a + "_RemoveFromWebFavourite") != null) document.getElementById("divPropertyID_" + a + "_RemoveFromWebFavourite").style.display = ""; if (document.getElementById("divPropertyID_" + a + "_AddToWebFavourite") != null) document.getElementById("divPropertyID_" + a + "_AddToWebFavourite").style.display = "none" } }) } function loadFavouriteProperties() { if ($.cookie("webFavouriteKey") == null) { $.cookie("webFavouriteKey", guidGenerator(), { path: "/", expires: 365 }) } $.ajax({ url: "/Utility/LoadWebFavourite", data: { GUID: $.cookie("webFavouriteKey") }, async: false, success: function (a) { ShortListed = a; if (a && a.length > 0) { $("#hasFavourite").show().parent("a").attr("href", "/Favourite-Properties/?GUID=" + $.cookie("webFavouriteKey")) } else { $("#hasFavourite").hide() } } }) } function ShowMessage(a) { $("#dialogInformation #InformationMessage").html(a); $("#dialogInformation").dialog(); setTimeout(function () { $("#dialogInformation").dialog("close") }, 3e3) } function guidGenerator() { var a = function () { return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1) }; return a() + a() + "-" + a() + "-" + a() + "-" + a() + "-" + a() + a() + a() } var ShortListed = {}; $.fn.ajaxSubmit = function (a) { var b = this.parents("form:first"); $(this).click(function () { var c = $(this); $(".ajax-notifier").css({ display: "block" }); c.attr("disabled", "disabled"); var d = $(b).serialize(); var e = b.attr("action"); if ($(b).valid()) { $.ajax({ type: "POST", url: e, data: d, success: function (b) { if (a) { $(a).html(b) } else { ShowMessage(b) } $(".ajax-notifier").css({ display: "none" }); c.removeAttr("disabled") }, error: function (a, b, d) { $(".ajax-notifier").css({ display: "none" }); c.removeAttr("disabled"); return false } }) } else { c.removeAttr("disabled") } return false }) }; $.ajaxSetup({ cache: false }); $(document).ajaxError(function (a, b, c, d) { var e = b.responseText; var f = e.substring(e.indexOf("<title>") + 7, e.indexOf("</title>")); if (f != "") { $.jGrowl("We are sorry. An error has occured", { header: "Warning!", life: 5e3, position: "bottom-right" }) } }); var cache = {}, lastXhr; var __hasBeenInitialized = false; (function (a) { a.fn.Navigate = function () { a(".navigation").scrollable({ vertical: true, mousewheel: true, keyboard: true }).navigator(".navi") } })(jQuery); $(document).ready(function () { InitializeSearchBox(); InitializeShortList() }); jQuery.cookie = function (a, b, c) { if (arguments.length > 1 && String(b) !== "[object Object]") { c = jQuery.extend({}, c); if (b === null || b === undefined) { c.expires = -1 } if (typeof c.expires === "number") { var d = c.expires, e = c.expires = new Date; e.setDate(e.getDate() + d) } b = String(b); return 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.jGrowl = function (b, c) { if (a("#jGrowl").size() == 0) a('<div id="jGrowl"></div>').addClass(c && c.position ? c.position : a.jGrowl.defaults.position).appendTo("body"); a("#jGrowl").jGrowl(b, c) }; a.fn.jGrowl = function (b, c) { if (a.isFunction(this.each)) { var d = arguments; return this.each(function () { var e = this; if (a(this).data("jGrowl.instance") == undefined) { a(this).data("jGrowl.instance", a.extend(new a.fn.jGrowl, { notifications: [], element: null, interval: null })); a(this).data("jGrowl.instance").startup(this) } if (a.isFunction(a(this).data("jGrowl.instance")[b])) { a(this).data("jGrowl.instance")[b].apply(a(this).data("jGrowl.instance"), a.makeArray(d).slice(1)) } else { a(this).data("jGrowl.instance").create(b, c) } }) } }; a.extend(a.fn.jGrowl.prototype, { defaults: { pool: 0, header: "", group: "", sticky: false, position: "top-right", glue: "after", theme: "default", themeState: "highlight", corners: "10px", check: 250, life: 3e3, closeDuration: "normal", openDuration: "normal", easing: "swing", closer: true, closeTemplate: "×", closerTemplate: "<div>[ close all ]</div>", log: function (a, b, c) { }, beforeOpen: function (a, b, c) { }, afterOpen: function (a, b, c) { }, open: function (a, b, c) { }, beforeClose: function (a, b, c) { }, close: function (a, b, c) { }, animateOpen: { opacity: "show" }, animateClose: { opacity: "hide"} }, notifications: [], element: null, interval: null, create: function (b, c) { var c = a.extend({}, this.defaults, c); if (typeof c.speed !== "undefined") { c.openDuration = c.speed; c.closeDuration = c.speed } this.notifications.push({ message: b, options: c }); c.log.apply(this.element, [this.element, b, c]) }, render: function (b) { var c = this; var d = b.message; var e = b.options; var b = a('<div class="jGrowl-notification ' + e.themeState + " ui-corner-all" + (e.group != undefined && e.group != "" ? " " + e.group : "") + '">' + '<div class="jGrowl-close">' + e.closeTemplate + "</div>" + '<div class="jGrowl-header">' + e.header + "</div>" + '<div class="jGrowl-message">' + d + "</div></div>").data("jGrowl", e).addClass(e.theme).children("div.jGrowl-close").bind("click.jGrowl", function () { a(this).parent().trigger("jGrowl.close") }).parent(); a(b).bind("mouseover.jGrowl", function () { a("div.jGrowl-notification", c.element).data("jGrowl.pause", true) }).bind("mouseout.jGrowl", function () { a("div.jGrowl-notification", c.element).data("jGrowl.pause", false) }).bind("jGrowl.beforeOpen", function () { if (e.beforeOpen.apply(b, [b, d, e, c.element]) != false) { a(this).trigger("jGrowl.open") } }).bind("jGrowl.open", function () { if (e.open.apply(b, [b, d, e, c.element]) != false) { if (e.glue == "after") { a("div.jGrowl-notification:last", c.element).after(b) } else { a("div.jGrowl-notification:first", c.element).before(b) } a(this).animate(e.animateOpen, e.openDuration, e.easing, function () { if (a.browser.msie && (parseInt(a(this).css("opacity"), 10) === 1 || parseInt(a(this).css("opacity"), 10) === 0)) this.style.removeAttribute("filter"); a(this).data("jGrowl").created = new Date; a(this).trigger("jGrowl.afterOpen") }) } }).bind("jGrowl.afterOpen", function () { e.afterOpen.apply(b, [b, d, e, c.element]) }).bind("jGrowl.beforeClose", function () { if (e.beforeClose.apply(b, [b, d, e, c.element]) != false) a(this).trigger("jGrowl.close") }).bind("jGrowl.close", function () { a(this).data("jGrowl.pause", true); a(this).animate(e.animateClose, e.closeDuration, e.easing, function () { a(this).remove(); var f = e.close.apply(b, [b, d, e, c.element]); if (a.isFunction(f)) f.apply(b, [b, d, e, c.element]) }) }).trigger("jGrowl.beforeOpen"); if (e.corners != "" && a.fn.corner != undefined) a(b).corner(e.corners); if (a("div.jGrowl-notification:parent", c.element).size() > 1 && a("div.jGrowl-closer", c.element).size() == 0 && this.defaults.closer != false) { a(this.defaults.closerTemplate).addClass("jGrowl-closer ui-state-highlight ui-corner-all").addClass(this.defaults.theme).appendTo(c.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing).bind("click.jGrowl", function () { a(this).siblings().trigger("jGrowl.beforeClose"); if (a.isFunction(c.defaults.closer)) { c.defaults.closer.apply(a(this).parent()[0], [a(this).parent()[0]]) } }) } }, update: function () { a(this.element).find("div.jGrowl-notification:parent").each(function () { if (a(this).data("jGrowl") != undefined && a(this).data("jGrowl").created != undefined && a(this).data("jGrowl").created.getTime() + parseInt(a(this).data("jGrowl").life) < (new Date).getTime() && a(this).data("jGrowl").sticky != true && (a(this).data("jGrowl.pause") == undefined || a(this).data("jGrowl.pause") != true)) { a(this).trigger("jGrowl.beforeClose") } }); if (this.notifications.length > 0 && (this.defaults.pool == 0 || a(this.element).find("div.jGrowl-notification:parent").size() < this.defaults.pool)) this.render(this.notifications.shift()); if (a(this.element).find("div.jGrowl-notification:parent").size() < 2) { a(this.element).find("div.jGrowl-closer").animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function () { a(this).remove() }) } }, startup: function (b) { this.element = a(b).addClass("jGrowl").append('<div class="jGrowl-notification"></div>'); this.interval = setInterval(function () { a(b).data("jGrowl.instance").update() }, parseInt(this.defaults.check)); if (a.browser.msie && parseInt(a.browser.version) < 7 && !window["XMLHttpRequest"]) { a(this.element).addClass("ie6") } }, shutdown: function () { a(this.element).removeClass("jGrowl").find("div.jGrowl-notification").remove(); clearInterval(this.interval) }, close: function () { a(this.element).find("div.jGrowl-notification").each(function () { a(this).trigger("jGrowl.beforeClose") }) } }); a.jGrowl.defaults = a.fn.jGrowl.prototype.defaults })(jQuery); (function (a) { a.fn.slides = function (b) { b = a.extend({}, a.fn.slides.option, b); return this.each(function () { function z() { if (b.pause) { clearTimeout(c.data("pause")); clearInterval(c.data("interval")); v = setTimeout(function () { clearTimeout(c.data("pause")); w = setInterval(function () { x("next", j) }, b.play); c.data("interval", w) }, b.pause); c.data("pause", v) } else { y() } } function y() { clearInterval(c.data("interval")) } function x(h, i, j) { if (!q && p) { q = true; b.animationStart(o + 1); switch (h) { case "next": m = o; l = o + 1; l = e === l ? 0 : l; s = f * 2; h = -f * 2; o = l; break; case "prev": m = o; l = o - 1; l = l === -1 ? e - 1 : l; s = 0; h = 0; o = l; break; case "pagination": l = parseInt(j, 10); m = a("." + b.paginationClass + " li.current a", c).attr("href").match("[^#/]+$"); if (l > m) { s = f * 2; h = -f * 2 } else { s = 0; h = 0 } o = l; break } if (i === "fade") { if (b.crossfade) { d.children(":eq(" + l + ")", c).css({ zIndex: 10 }).fadeIn(b.fadeSpeed, b.fadeEasing, function () { if (b.autoHeight) { d.animate({ height: d.children(":eq(" + l + ")", c).outerHeight() }, b.autoHeightSpeed, function () { d.children(":eq(" + m + ")", c).css({ display: "none", zIndex: 0 }); d.children(":eq(" + l + ")", c).css({ zIndex: 0 }); b.animationComplete(l + 1); q = false }) } else { d.children(":eq(" + m + ")", c).css({ display: "none", zIndex: 0 }); d.children(":eq(" + l + ")", c).css({ zIndex: 0 }); b.animationComplete(l + 1); q = false } }) } else { d.children(":eq(" + m + ")", c).fadeOut(b.fadeSpeed, b.fadeEasing, function () { if (b.autoHeight) { d.animate({ height: d.children(":eq(" + l + ")", c).outerHeight() }, b.autoHeightSpeed, function () { d.children(":eq(" + l + ")", c).fadeIn(b.fadeSpeed, b.fadeEasing) }) } else { d.children(":eq(" + l + ")", c).fadeIn(b.fadeSpeed, b.fadeEasing, function () { if (a.browser.msie) { a(this).get(0).style.removeAttribute("filter") } }) } b.animationComplete(l + 1); q = false }) } } else { d.children(":eq(" + l + ")").css({ left: s, display: "block" }); if (b.autoHeight) { d.animate({ left: h, height: d.children(":eq(" + l + ")").outerHeight() }, b.slideSpeed, b.slideEasing, function () { d.css({ left: -f }); d.children(":eq(" + l + ")").css({ left: f, zIndex: 5 }); d.children(":eq(" + m + ")").css({ left: f, display: "none", zIndex: 0 }); b.animationComplete(l + 1); q = false }) } else { d.animate({ left: h }, b.slideSpeed, b.slideEasing, function () { d.css({ left: -f }); d.children(":eq(" + l + ")").css({ left: f, zIndex: 5 }); d.children(":eq(" + m + ")").css({ left: f, display: "none", zIndex: 0 }); b.animationComplete(l + 1); q = false }) } } if (b.pagination) { a("." + b.paginationClass + " li.current", c).removeClass("current"); a("." + b.paginationClass + " li:eq(" + l + ")", c).addClass("current") } } } a("." + b.container, a(this)).children().wrapAll('<div class="slides_control"/>'); var c = a(this), d = a(".slides_control", c), e = d.children().size(), f = d.children().outerWidth(), h = d.children().outerHeight(), i = b.start - 1, j = b.effect.indexOf(",") < 0 ? b.effect : b.effect.replace(" ", "").split(",")[0], k = b.effect.indexOf(",") < 0 ? j : b.effect.replace(" ", "").split(",")[1], l = 0, m = 0, n = 0, o = 0, p, q, r, s, t, u, v, w; if (e < 2) { return } if (i < 0) { i = 0 } if (i > e) { i = e - 1 } if (b.start) { o = i } if (b.randomize) { d.randomize() } a("." + b.container, c).css({ overflow: "hidden", position: "relative" }); d.children().css({ position: "absolute", top: 0, left: d.children().outerWidth(), zIndex: 0, display: "none" }); d.css({ position: "relative", width: f * 3, height: h, left: -f }); a("." + b.container, c).css({ display: "block" }); if (b.autoHeight) { d.children().css({ height: "auto" }); d.animate({ height: d.children(":eq(" + i + ")").outerHeight() }, b.autoHeightSpeed) } if (b.preload && d.find("img").length) { a("." + b.container, c).css({ background: "url(" + b.preloadImage + ") no-repeat 50% 50%" }); var A = d.find("img:eq(" + i + ")").attr("src") + "?" + (new Date).getTime(); if (a("img", c).parent().attr("class") != "slides_control") { u = d.children(":eq(0)")[0].tagName.toLowerCase() } else { u = d.find("img:eq(" + i + ")") } d.find("img:eq(" + i + ")").attr("src", A).load(function () { d.find(u + ":eq(" + i + ")").fadeIn(b.fadeSpeed, b.fadeEasing, function () { a(this).css({ zIndex: 5 }); a("." + b.container, c).css({ background: "" }); p = true; b.slidesLoaded() }) }) } else { d.children(":eq(" + i + ")").fadeIn(b.fadeSpeed, b.fadeEasing, function () { p = true; b.slidesLoaded() }) } if (b.bigTarget) { d.children().css({ cursor: "pointer" }); d.children().click(function () { x("next", j); return false }) } if (b.hoverPause && b.play) { d.bind("mouseover", function () { y() }); d.bind("mouseleave", function () { z() }) } if (b.generateNextPrev) { a("." + b.container, c).after('<a href="#" class="' + b.prev + '">Prev</a>'); a("." + b.prev, c).after('<a href="#" class="' + b.next + '">Next</a>') } a("." + b.next, c).click(function (a) { a.preventDefault(); if (b.play) { z() } x("next", j) }); a("." + b.prev, c).click(function (a) { a.preventDefault(); if (b.play) { z() } x("prev", j) }); if (b.generatePagination) { c.append("<ul class=" + b.paginationClass + "></ul>"); d.children().each(function () { a("." + b.paginationClass, c).append('<li><a href="#' + n + '">' + (n + 1) + "</a></li>"); n++ }) } else { a("." + b.paginationClass + " li a", c).each(function () { a(this).attr("href", "#" + n); n++ }) } a("." + b.paginationClass + " li:eq(" + i + ")", c).addClass("current"); a("." + b.paginationClass + " li a", c).click(function () { if (b.play) { z() } r = a(this).attr("href").match("[^#/]+$"); if (o != r) { x("pagination", k, r) } return false }); a("a.link", c).click(function () { if (b.play) { z() } r = a(this).attr("href").match("[^#/]+$") - 1; if (o != r) { x("pagination", k, r) } return false }); if (b.play) { w = setInterval(function () { x("next", j) }, b.play); c.data("interval", w) } }) }; a.fn.slides.option = { preload: false, preloadImage: "/img/loading.gif", container: "slides_container", generateNextPrev: false, next: "next", prev: "prev", pagination: true, generatePagination: true, paginationClass: "pagination", fadeSpeed: 350, fadeEasing: "", slideSpeed: 350, slideEasing: "", start: 1, effect: "slide", crossfade: false, randomize: false, play: 0, pause: 0, hoverPause: false, autoHeight: false, autoHeightSpeed: 350, bigTarget: false, animationStart: function () { }, animationComplete: function () { }, slidesLoaded: function () { } }; a.fn.randomize = function (b) { function c() { return Math.round(Math.random()) - .5 } return a(this).each(function () { var d = a(this); var e = d.children(); var f = e.length; if (f > 1) { e.hide(); var g = []; for (i = 0; i < f; i++) { g[g.length] = i } g = g.sort(c); a.each(g, function (a, c) { var f = e.eq(c); var g = f.clone(true); g.show().appendTo(d); if (b !== undefined) { b(f, g) } f.remove() }) } }) } })(jQuery); jQuery.easing["jswing"] = jQuery.easing["swing"]; jQuery.extend(jQuery.easing, { def: "easeOutQuad", swing: function (a, b, c, d, e) { return jQuery.easing[jQuery.easing.def](a, b, c, d, e) }, easeInQuad: function (a, b, c, d, e) { return d * (b /= e) * b + c }, easeOutQuad: function (a, b, c, d, e) { return -d * (b /= e) * (b - 2) + c }, easeInOutQuad: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b + c; return -d / 2 * (--b * (b - 2) - 1) + c }, easeInCubic: function (a, b, c, d, e) { return d * (b /= e) * b * b + c }, easeOutCubic: function (a, b, c, d, e) { return d * ((b = b / e - 1) * b * b + 1) + c }, easeInOutCubic: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b * b + c; return d / 2 * ((b -= 2) * b * b + 2) + c }, easeInQuart: function (a, b, c, d, e) { return d * (b /= e) * b * b * b + c }, easeOutQuart: function (a, b, c, d, e) { return -d * ((b = b / e - 1) * b * b * b - 1) + c }, easeInOutQuart: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b * b * b + c; return -d / 2 * ((b -= 2) * b * b * b - 2) + c }, easeInQuint: function (a, b, c, d, e) { return d * (b /= e) * b * b * b * b + c }, easeOutQuint: function (a, b, c, d, e) { return d * ((b = b / e - 1) * b * b * b * b + 1) + c }, easeInOutQuint: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return d / 2 * b * b * b * b * b + c; return d / 2 * ((b -= 2) * b * b * b * b + 2) + c }, easeInSine: function (a, b, c, d, e) { return -d * Math.cos(b / e * (Math.PI / 2)) + d + c }, easeOutSine: function (a, b, c, d, e) { return d * Math.sin(b / e * (Math.PI / 2)) + c }, easeInOutSine: function (a, b, c, d, e) { return -d / 2 * (Math.cos(Math.PI * b / e) - 1) + c }, easeInExpo: function (a, b, c, d, e) { return b == 0 ? c : d * Math.pow(2, 10 * (b / e - 1)) + c }, easeOutExpo: function (a, b, c, d, e) { return b == e ? c + d : d * (-Math.pow(2, -10 * b / e) + 1) + c }, easeInOutExpo: function (a, b, c, d, e) { if (b == 0) return c; if (b == e) return c + d; if ((b /= e / 2) < 1) return d / 2 * Math.pow(2, 10 * (b - 1)) + c; return d / 2 * (-Math.pow(2, -10 * --b) + 2) + c }, easeInCirc: function (a, b, c, d, e) { return -d * (Math.sqrt(1 - (b /= e) * b) - 1) + c }, easeOutCirc: function (a, b, c, d, e) { return d * Math.sqrt(1 - (b = b / e - 1) * b) + c }, easeInOutCirc: function (a, b, c, d, e) { if ((b /= e / 2) < 1) return -d / 2 * (Math.sqrt(1 - b * b) - 1) + c; return d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c }, easeInElastic: function (a, b, c, d, e) { var f = 1.70158; var g = 0; var h = d; if (b == 0) return c; if ((b /= e) == 1) return c + d; if (!g) g = e * .3; if (h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return -(h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g)) + c }, easeOutElastic: function (a, b, c, d, e) { var f = 1.70158; var g = 0; var h = d; if (b == 0) return c; if ((b /= e) == 1) return c + d; if (!g) g = e * .3; if (h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return h * Math.pow(2, -10 * b) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c }, easeInOutElastic: function (a, b, c, d, e) { var f = 1.70158; var g = 0; var h = d; if (b == 0) return c; if ((b /= e / 2) == 2) return c + d; if (!g) g = e * .3 * 1.5; if (h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); if (b < 1) return -.5 * h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + c; return h * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) * .5 + d + c }, easeInBack: function (a, b, c, d, e, f) { if (f == undefined) f = 1.70158; return d * (b /= e) * b * ((f + 1) * b - f) + c }, easeOutBack: function (a, b, c, d, e, f) { if (f == undefined) f = 1.70158; return d * ((b = b / e - 1) * b * ((f + 1) * b + f) + 1) + c }, easeInOutBack: function (a, b, c, d, e, f) { if (f == undefined) f = 1.70158; if ((b /= e / 2) < 1) return d / 2 * b * b * (((f *= 1.525) + 1) * b - f) + c; return d / 2 * ((b -= 2) * b * (((f *= 1.525) + 1) * b + f) + 2) + c }, easeInBounce: function (a, b, c, d, e) { return d - jQuery.easing.easeOutBounce(a, e - b, 0, d, e) + c }, easeOutBounce: function (a, b, c, d, e) { if ((b /= e) < 1 / 2.75) { return d * 7.5625 * b * b + c } else if (b < 2 / 2.75) { return d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c } else if (b < 2.5 / 2.75) { return d * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c } else { return d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c } }, easeInOutBounce: function (a, b, c, d, e) { if (b < e / 2) return jQuery.easing.easeInBounce(a, b * 2, 0, d, e) * .5 + c; return jQuery.easing.easeOutBounce(a, b * 2 - e, 0, d, e) * .5 + d * .5 + c } })
