- var expiry = new Date();
- expiry.setYear(expiry.getFullYear() + 10);
- $.cookie("_osm_location", cookieContent(map), { expires: expiry });
+ Cookies.remove("_osm_location");
+ Cookies.set("_osm_location", OSM.locationCookie(map), { secure: true, expires: expiry, path: "/" });
+ });
+
+ if (Cookies.get("_osm_welcome") !== "hide") {
+ $(".welcome").addClass("visible");
+ }
+
+ $(".welcome .close").on("click", function () {
+ $(".welcome").removeClass("visible");
+ Cookies.set("_osm_welcome", "hide", { secure: true, expires: expiry, path: "/" });
+ });
+
+ var bannerExpiry = new Date();
+ bannerExpiry.setYear(bannerExpiry.getFullYear() + 1);
+
+ $("#banner .close-wrap").on("click", function (e) {
+ var cookieId = e.target.id;
+ $("#banner").hide();
+ e.preventDefault();
+ if (cookieId) {
+ Cookies.set(cookieId, "hide", { secure: true, expires: bannerExpiry, path: "/" });
+ }