- var expiry = new Date();
- expiry.setYear(expiry.getFullYear() + 10);
- $.cookie("_osm_location", cookieContent(map), { expires: expiry });
+ $.removeCookie('_osm_location');
+ $.cookie('_osm_location', OSM.locationCookie(map), { expires: expiry, path: '/' });
+ });
+
+ if ($.cookie('_osm_welcome') === 'hide') {
+ $('.welcome').hide();
+ }
+
+ $('.welcome .close-wrap').on('click', function() {
+ $('.welcome').hide();
+ $.cookie('_osm_welcome', 'hide', { 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) {
+ $.cookie(cookieId, 'hide', { expires: bannerExpiry, path: '/' });
+ }