diff --git a/examples/tilejson.html b/examples/tilejson.html index 6c6c6a60..9866c2f2 100644 --- a/examples/tilejson.html +++ b/examples/tilejson.html @@ -1,16 +1,32 @@ + +
+ + - + + + + + - diff --git a/examples/vendor/backbone.js b/examples/vendor/backbone.js new file mode 100644 index 00000000..c9249656 --- /dev/null +++ b/examples/vendor/backbone.js @@ -0,0 +1,1894 @@ +// Backbone.js 1.2.3 + +// (c) 2010-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Backbone may be freely distributed under the MIT license. +// For all details and documentation: +// http://backbonejs.org + +(function(factory) { + + // Establish the root object, `window` (`self`) in the browser, or `global` on the server. + // We use `self` instead of `window` for `WebWorker` support. + var root = (typeof self == 'object' && self.self == self && self) || + (typeof global == 'object' && global.global == global && global); + + // Set up Backbone appropriately for the environment. Start with AMD. + if (typeof define === 'function' && define.amd) { + define(['underscore', 'jquery', 'exports'], function(_, $, exports) { + // Export global even in AMD case in case this script is loaded with + // others that may still expect a global Backbone. + root.Backbone = factory(root, exports, _, $); + }); + + // Next for Node.js or CommonJS. jQuery may not be needed as a module. + } else if (typeof exports !== 'undefined') { + var _ = require('underscore'), $; + try { $ = require('jquery'); } catch(e) {} + factory(root, exports, _, $); + + // Finally, as a browser global. + } else { + root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$)); + } + +}(function(root, Backbone, _, $) { + + // Initial Setup + // ------------- + + // Save the previous value of the `Backbone` variable, so that it can be + // restored later on, if `noConflict` is used. + var previousBackbone = root.Backbone; + + // Create a local reference to a common array method we'll want to use later. + var slice = Array.prototype.slice; + + // Current version of the library. Keep in sync with `package.json`. + Backbone.VERSION = '1.2.3'; + + // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns + // the `$` variable. + Backbone.$ = $; + + // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable + // to its previous owner. Returns a reference to this Backbone object. + Backbone.noConflict = function() { + root.Backbone = previousBackbone; + return this; + }; + + // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option + // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and + // set a `X-Http-Method-Override` header. + Backbone.emulateHTTP = false; + + // Turn on `emulateJSON` to support legacy servers that can't deal with direct + // `application/json` requests ... this will encode the body as + // `application/x-www-form-urlencoded` instead and will send the model in a + // form param named `model`. + Backbone.emulateJSON = false; + + // Proxy Backbone class methods to Underscore functions, wrapping the model's + // `attributes` object or collection's `models` array behind the scenes. + // + // collection.filter(function(model) { return model.get('age') > 10 }); + // collection.each(this.addView); + // + // `Function#apply` can be slow so we use the method's arg count, if we know it. + var addMethod = function(length, method, attribute) { + switch (length) { + case 1: return function() { + return _[method](this[attribute]); + }; + case 2: return function(value) { + return _[method](this[attribute], value); + }; + case 3: return function(iteratee, context) { + return _[method](this[attribute], cb(iteratee, this), context); + }; + case 4: return function(iteratee, defaultVal, context) { + return _[method](this[attribute], cb(iteratee, this), defaultVal, context); + }; + default: return function() { + var args = slice.call(arguments); + args.unshift(this[attribute]); + return _[method].apply(_, args); + }; + } + }; + var addUnderscoreMethods = function(Class, methods, attribute) { + _.each(methods, function(length, method) { + if (_[method]) Class.prototype[method] = addMethod(length, method, attribute); + }); + }; + + // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`. + var cb = function(iteratee, instance) { + if (_.isFunction(iteratee)) return iteratee; + if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee); + if (_.isString(iteratee)) return function(model) { return model.get(iteratee); }; + return iteratee; + }; + var modelMatcher = function(attrs) { + var matcher = _.matches(attrs); + return function(model) { + return matcher(model.attributes); + }; + }; + + // Backbone.Events + // --------------- + + // A module that can be mixed in to *any object* in order to provide it with + // a custom event channel. You may bind a callback to an event with `on` or + // remove with `off`; `trigger`-ing an event fires all callbacks in + // succession. + // + // var object = {}; + // _.extend(object, Backbone.Events); + // object.on('expand', function(){ alert('expanded'); }); + // object.trigger('expand'); + // + var Events = Backbone.Events = {}; + + // Regular expression used to split event strings. + var eventSplitter = /\s+/; + + // Iterates over the standard `event, callback` (as well as the fancy multiple + // space-separated events `"change blur", callback` and jQuery-style event + // maps `{event: callback}`). + var eventsApi = function(iteratee, events, name, callback, opts) { + var i = 0, names; + if (name && typeof name === 'object') { + // Handle event maps. + if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback; + for (names = _.keys(name); i < names.length ; i++) { + events = eventsApi(iteratee, events, names[i], name[names[i]], opts); + } + } else if (name && eventSplitter.test(name)) { + // Handle space separated event names by delegating them individually. + for (names = name.split(eventSplitter); i < names.length; i++) { + events = iteratee(events, names[i], callback, opts); + } + } else { + // Finally, standard events. + events = iteratee(events, name, callback, opts); + } + return events; + }; + + // Bind an event to a `callback` function. Passing `"all"` will bind + // the callback to all events fired. + Events.on = function(name, callback, context) { + return internalOn(this, name, callback, context); + }; + + // Guard the `listening` argument from the public API. + var internalOn = function(obj, name, callback, context, listening) { + obj._events = eventsApi(onApi, obj._events || {}, name, callback, { + context: context, + ctx: obj, + listening: listening + }); + + if (listening) { + var listeners = obj._listeners || (obj._listeners = {}); + listeners[listening.id] = listening; + } + + return obj; + }; + + // Inversion-of-control versions of `on`. Tell *this* object to listen to + // an event in another object... keeping track of what it's listening to + // for easier unbinding later. + Events.listenTo = function(obj, name, callback) { + if (!obj) return this; + var id = obj._listenId || (obj._listenId = _.uniqueId('l')); + var listeningTo = this._listeningTo || (this._listeningTo = {}); + var listening = listeningTo[id]; + + // This object is not listening to any other events on `obj` yet. + // Setup the necessary references to track the listening callbacks. + if (!listening) { + var thisId = this._listenId || (this._listenId = _.uniqueId('l')); + listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0}; + } + + // Bind callbacks on obj, and keep track of them on listening. + internalOn(obj, name, callback, this, listening); + return this; + }; + + // The reducing API that adds a callback to the `events` object. + var onApi = function(events, name, callback, options) { + if (callback) { + var handlers = events[name] || (events[name] = []); + var context = options.context, ctx = options.ctx, listening = options.listening; + if (listening) listening.count++; + + handlers.push({ callback: callback, context: context, ctx: context || ctx, listening: listening }); + } + return events; + }; + + // Remove one or many callbacks. If `context` is null, removes all + // callbacks with that function. If `callback` is null, removes all + // callbacks for the event. If `name` is null, removes all bound + // callbacks for all events. + Events.off = function(name, callback, context) { + if (!this._events) return this; + this._events = eventsApi(offApi, this._events, name, callback, { + context: context, + listeners: this._listeners + }); + return this; + }; + + // Tell this object to stop listening to either specific events ... or + // to every object it's currently listening to. + Events.stopListening = function(obj, name, callback) { + var listeningTo = this._listeningTo; + if (!listeningTo) return this; + + var ids = obj ? [obj._listenId] : _.keys(listeningTo); + + for (var i = 0; i < ids.length; i++) { + var listening = listeningTo[ids[i]]; + + // If listening doesn't exist, this object is not currently + // listening to obj. Break out early. + if (!listening) break; + + listening.obj.off(name, callback, this); + } + if (_.isEmpty(listeningTo)) this._listeningTo = void 0; + + return this; + }; + + // The reducing API that removes a callback from the `events` object. + var offApi = function(events, name, callback, options) { + if (!events) return; + + var i = 0, listening; + var context = options.context, listeners = options.listeners; + + // Delete all events listeners and "drop" events. + if (!name && !callback && !context) { + var ids = _.keys(listeners); + for (; i < ids.length; i++) { + listening = listeners[ids[i]]; + delete listeners[listening.id]; + delete listening.listeningTo[listening.objId]; + } + return; + } + + var names = name ? [name] : _.keys(events); + for (; i < names.length; i++) { + name = names[i]; + var handlers = events[name]; + + // Bail out if there are no events stored. + if (!handlers) break; + + // Replace events if there are any remaining. Otherwise, clean up. + var remaining = []; + for (var j = 0; j < handlers.length; j++) { + var handler = handlers[j]; + if ( + callback && callback !== handler.callback && + callback !== handler.callback._callback || + context && context !== handler.context + ) { + remaining.push(handler); + } else { + listening = handler.listening; + if (listening && --listening.count === 0) { + delete listeners[listening.id]; + delete listening.listeningTo[listening.objId]; + } + } + } + + // Update tail event if the list has any events. Otherwise, clean up. + if (remaining.length) { + events[name] = remaining; + } else { + delete events[name]; + } + } + if (_.size(events)) return events; + }; + + // Bind an event to only be triggered a single time. After the first time + // the callback is invoked, its listener will be removed. If multiple events + // are passed in using the space-separated syntax, the handler will fire + // once for each event, not once for a combination of all events. + Events.once = function(name, callback, context) { + // Map the event into a `{event: once}` object. + var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this)); + return this.on(events, void 0, context); + }; + + // Inversion-of-control versions of `once`. + Events.listenToOnce = function(obj, name, callback) { + // Map the event into a `{event: once}` object. + var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj)); + return this.listenTo(obj, events); + }; + + // Reduces the event callbacks into a map of `{event: onceWrapper}`. + // `offer` unbinds the `onceWrapper` after it has been called. + var onceMap = function(map, name, callback, offer) { + if (callback) { + var once = map[name] = _.once(function() { + offer(name, once); + callback.apply(this, arguments); + }); + once._callback = callback; + } + return map; + }; + + // Trigger one or many events, firing all bound callbacks. Callbacks are + // passed the same arguments as `trigger` is, apart from the event name + // (unless you're listening on `"all"`, which will cause your callback to + // receive the true name of the event as the first argument). + Events.trigger = function(name) { + if (!this._events) return this; + + var length = Math.max(0, arguments.length - 1); + var args = Array(length); + for (var i = 0; i < length; i++) args[i] = arguments[i + 1]; + + eventsApi(triggerApi, this._events, name, void 0, args); + return this; + }; + + // Handles triggering the appropriate event callbacks. + var triggerApi = function(objEvents, name, cb, args) { + if (objEvents) { + var events = objEvents[name]; + var allEvents = objEvents.all; + if (events && allEvents) allEvents = allEvents.slice(); + if (events) triggerEvents(events, args); + if (allEvents) triggerEvents(allEvents, [name].concat(args)); + } + return objEvents; + }; + + // A difficult-to-believe, but optimized internal dispatch function for + // triggering events. Tries to keep the usual cases speedy (most internal + // Backbone events have 3 arguments). + var triggerEvents = function(events, args) { + var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2]; + switch (args.length) { + case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return; + case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return; + case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return; + case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return; + default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return; + } + }; + + // Aliases for backwards compatibility. + Events.bind = Events.on; + Events.unbind = Events.off; + + // Allow the `Backbone` object to serve as a global event bus, for folks who + // want global "pubsub" in a convenient place. + _.extend(Backbone, Events); + + // Backbone.Model + // -------------- + + // Backbone **Models** are the basic data object in the framework -- + // frequently representing a row in a table in a database on your server. + // A discrete chunk of data and a bunch of useful, related methods for + // performing computations and transformations on that data. + + // Create a new model with the specified attributes. A client id (`cid`) + // is automatically generated and assigned for you. + var Model = Backbone.Model = function(attributes, options) { + var attrs = attributes || {}; + options || (options = {}); + this.cid = _.uniqueId(this.cidPrefix); + this.attributes = {}; + if (options.collection) this.collection = options.collection; + if (options.parse) attrs = this.parse(attrs, options) || {}; + attrs = _.defaults({}, attrs, _.result(this, 'defaults')); + this.set(attrs, options); + this.changed = {}; + this.initialize.apply(this, arguments); + }; + + // Attach all inheritable methods to the Model prototype. + _.extend(Model.prototype, Events, { + + // A hash of attributes whose current and previous value differ. + changed: null, + + // The value returned during the last failed validation. + validationError: null, + + // The default name for the JSON `id` attribute is `"id"`. MongoDB and + // CouchDB users may want to set this to `"_id"`. + idAttribute: 'id', + + // The prefix is used to create the client id which is used to identify models locally. + // You may want to override this if you're experiencing name clashes with model ids. + cidPrefix: 'c', + + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function(){}, + + // Return a copy of the model's `attributes` object. + toJSON: function(options) { + return _.clone(this.attributes); + }, + + // Proxy `Backbone.sync` by default -- but override this if you need + // custom syncing semantics for *this* particular model. + sync: function() { + return Backbone.sync.apply(this, arguments); + }, + + // Get the value of an attribute. + get: function(attr) { + return this.attributes[attr]; + }, + + // Get the HTML-escaped value of an attribute. + escape: function(attr) { + return _.escape(this.get(attr)); + }, + + // Returns `true` if the attribute contains a value that is not null + // or undefined. + has: function(attr) { + return this.get(attr) != null; + }, + + // Special-cased proxy to underscore's `_.matches` method. + matches: function(attrs) { + return !!_.iteratee(attrs, this)(this.attributes); + }, + + // Set a hash of model attributes on the object, firing `"change"`. This is + // the core primitive operation of a model, updating the data and notifying + // anyone who needs to know about the change in state. The heart of the beast. + set: function(key, val, options) { + if (key == null) return this; + + // Handle both `"key", value` and `{key: value}` -style arguments. + var attrs; + if (typeof key === 'object') { + attrs = key; + options = val; + } else { + (attrs = {})[key] = val; + } + + options || (options = {}); + + // Run validation. + if (!this._validate(attrs, options)) return false; + + // Extract attributes and options. + var unset = options.unset; + var silent = options.silent; + var changes = []; + var changing = this._changing; + this._changing = true; + + if (!changing) { + this._previousAttributes = _.clone(this.attributes); + this.changed = {}; + } + + var current = this.attributes; + var changed = this.changed; + var prev = this._previousAttributes; + + // For each `set` attribute, update or delete the current value. + for (var attr in attrs) { + val = attrs[attr]; + if (!_.isEqual(current[attr], val)) changes.push(attr); + if (!_.isEqual(prev[attr], val)) { + changed[attr] = val; + } else { + delete changed[attr]; + } + unset ? delete current[attr] : current[attr] = val; + } + + // Update the `id`. + this.id = this.get(this.idAttribute); + + // Trigger all relevant attribute changes. + if (!silent) { + if (changes.length) this._pending = options; + for (var i = 0; i < changes.length; i++) { + this.trigger('change:' + changes[i], this, current[changes[i]], options); + } + } + + // You might be wondering why there's a `while` loop here. Changes can + // be recursively nested within `"change"` events. + if (changing) return this; + if (!silent) { + while (this._pending) { + options = this._pending; + this._pending = false; + this.trigger('change', this, options); + } + } + this._pending = false; + this._changing = false; + return this; + }, + + // Remove an attribute from the model, firing `"change"`. `unset` is a noop + // if the attribute doesn't exist. + unset: function(attr, options) { + return this.set(attr, void 0, _.extend({}, options, {unset: true})); + }, + + // Clear all attributes on the model, firing `"change"`. + clear: function(options) { + var attrs = {}; + for (var key in this.attributes) attrs[key] = void 0; + return this.set(attrs, _.extend({}, options, {unset: true})); + }, + + // Determine if the model has changed since the last `"change"` event. + // If you specify an attribute name, determine if that attribute has changed. + hasChanged: function(attr) { + if (attr == null) return !_.isEmpty(this.changed); + return _.has(this.changed, attr); + }, + + // Return an object containing all the attributes that have changed, or + // false if there are no changed attributes. Useful for determining what + // parts of a view need to be updated and/or what attributes need to be + // persisted to the server. Unset attributes will be set to undefined. + // You can also pass an attributes object to diff against the model, + // determining if there *would be* a change. + changedAttributes: function(diff) { + if (!diff) return this.hasChanged() ? _.clone(this.changed) : false; + var old = this._changing ? this._previousAttributes : this.attributes; + var changed = {}; + for (var attr in diff) { + var val = diff[attr]; + if (_.isEqual(old[attr], val)) continue; + changed[attr] = val; + } + return _.size(changed) ? changed : false; + }, + + // Get the previous value of an attribute, recorded at the time the last + // `"change"` event was fired. + previous: function(attr) { + if (attr == null || !this._previousAttributes) return null; + return this._previousAttributes[attr]; + }, + + // Get all of the attributes of the model at the time of the previous + // `"change"` event. + previousAttributes: function() { + return _.clone(this._previousAttributes); + }, + + // Fetch the model from the server, merging the response with the model's + // local attributes. Any changed attributes will trigger a "change" event. + fetch: function(options) { + options = _.extend({parse: true}, options); + var model = this; + var success = options.success; + options.success = function(resp) { + var serverAttrs = options.parse ? model.parse(resp, options) : resp; + if (!model.set(serverAttrs, options)) return false; + if (success) success.call(options.context, model, resp, options); + model.trigger('sync', model, resp, options); + }; + wrapError(this, options); + return this.sync('read', this, options); + }, + + // Set a hash of model attributes, and sync the model to the server. + // If the server returns an attributes hash that differs, the model's + // state will be `set` again. + save: function(key, val, options) { + // Handle both `"key", value` and `{key: value}` -style arguments. + var attrs; + if (key == null || typeof key === 'object') { + attrs = key; + options = val; + } else { + (attrs = {})[key] = val; + } + + options = _.extend({validate: true, parse: true}, options); + var wait = options.wait; + + // If we're not waiting and attributes exist, save acts as + // `set(attr).save(null, opts)` with validation. Otherwise, check if + // the model will be valid when the attributes, if any, are set. + if (attrs && !wait) { + if (!this.set(attrs, options)) return false; + } else { + if (!this._validate(attrs, options)) return false; + } + + // After a successful server-side save, the client is (optionally) + // updated with the server-side state. + var model = this; + var success = options.success; + var attributes = this.attributes; + options.success = function(resp) { + // Ensure attributes are restored during synchronous saves. + model.attributes = attributes; + var serverAttrs = options.parse ? model.parse(resp, options) : resp; + if (wait) serverAttrs = _.extend({}, attrs, serverAttrs); + if (serverAttrs && !model.set(serverAttrs, options)) return false; + if (success) success.call(options.context, model, resp, options); + model.trigger('sync', model, resp, options); + }; + wrapError(this, options); + + // Set temporary attributes if `{wait: true}` to properly find new ids. + if (attrs && wait) this.attributes = _.extend({}, attributes, attrs); + + var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update'); + if (method === 'patch' && !options.attrs) options.attrs = attrs; + var xhr = this.sync(method, this, options); + + // Restore attributes. + this.attributes = attributes; + + return xhr; + }, + + // Destroy this model on the server if it was already persisted. + // Optimistically removes the model from its collection, if it has one. + // If `wait: true` is passed, waits for the server to respond before removal. + destroy: function(options) { + options = options ? _.clone(options) : {}; + var model = this; + var success = options.success; + var wait = options.wait; + + var destroy = function() { + model.stopListening(); + model.trigger('destroy', model, model.collection, options); + }; + + options.success = function(resp) { + if (wait) destroy(); + if (success) success.call(options.context, model, resp, options); + if (!model.isNew()) model.trigger('sync', model, resp, options); + }; + + var xhr = false; + if (this.isNew()) { + _.defer(options.success); + } else { + wrapError(this, options); + xhr = this.sync('delete', this, options); + } + if (!wait) destroy(); + return xhr; + }, + + // Default URL for the model's representation on the server -- if you're + // using Backbone's restful methods, override this to change the endpoint + // that will be called. + url: function() { + var base = + _.result(this, 'urlRoot') || + _.result(this.collection, 'url') || + urlError(); + if (this.isNew()) return base; + var id = this.get(this.idAttribute); + return base.replace(/[^\/]$/, '$&/') + encodeURIComponent(id); + }, + + // **parse** converts a response into the hash of attributes to be `set` on + // the model. The default implementation is just to pass the response along. + parse: function(resp, options) { + return resp; + }, + + // Create a new model with identical attributes to this one. + clone: function() { + return new this.constructor(this.attributes); + }, + + // A model is new if it has never been saved to the server, and lacks an id. + isNew: function() { + return !this.has(this.idAttribute); + }, + + // Check if the model is currently in a valid state. + isValid: function(options) { + return this._validate({}, _.defaults({validate: true}, options)); + }, + + // Run validation against the next complete set of model attributes, + // returning `true` if all is well. Otherwise, fire an `"invalid"` event. + _validate: function(attrs, options) { + if (!options.validate || !this.validate) return true; + attrs = _.extend({}, this.attributes, attrs); + var error = this.validationError = this.validate(attrs, options) || null; + if (!error) return true; + this.trigger('invalid', this, error, _.extend(options, {validationError: error})); + return false; + } + + }); + + // Underscore methods that we want to implement on the Model, mapped to the + // number of arguments they take. + var modelMethods = { keys: 1, values: 1, pairs: 1, invert: 1, pick: 0, + omit: 0, chain: 1, isEmpty: 1 }; + + // Mix in each Underscore method as a proxy to `Model#attributes`. + addUnderscoreMethods(Model, modelMethods, 'attributes'); + + // Backbone.Collection + // ------------------- + + // If models tend to represent a single row of data, a Backbone Collection is + // more analogous to a table full of data ... or a small slice or page of that + // table, or a collection of rows that belong together for a particular reason + // -- all of the messages in this particular folder, all of the documents + // belonging to this particular author, and so on. Collections maintain + // indexes of their models, both in order, and for lookup by `id`. + + // Create a new **Collection**, perhaps to contain a specific type of `model`. + // If a `comparator` is specified, the Collection will maintain + // its models in sort order, as they're added and removed. + var Collection = Backbone.Collection = function(models, options) { + options || (options = {}); + if (options.model) this.model = options.model; + if (options.comparator !== void 0) this.comparator = options.comparator; + this._reset(); + this.initialize.apply(this, arguments); + if (models) this.reset(models, _.extend({silent: true}, options)); + }; + + // Default options for `Collection#set`. + var setOptions = {add: true, remove: true, merge: true}; + var addOptions = {add: true, remove: false}; + + // Splices `insert` into `array` at index `at`. + var splice = function(array, insert, at) { + at = Math.min(Math.max(at, 0), array.length); + var tail = Array(array.length - at); + var length = insert.length; + for (var i = 0; i < tail.length; i++) tail[i] = array[i + at]; + for (i = 0; i < length; i++) array[i + at] = insert[i]; + for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i]; + }; + + // Define the Collection's inheritable methods. + _.extend(Collection.prototype, Events, { + + // The default model for a collection is just a **Backbone.Model**. + // This should be overridden in most cases. + model: Model, + + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function(){}, + + // The JSON representation of a Collection is an array of the + // models' attributes. + toJSON: function(options) { + return this.map(function(model) { return model.toJSON(options); }); + }, + + // Proxy `Backbone.sync` by default. + sync: function() { + return Backbone.sync.apply(this, arguments); + }, + + // Add a model, or list of models to the set. `models` may be Backbone + // Models or raw JavaScript objects to be converted to Models, or any + // combination of the two. + add: function(models, options) { + return this.set(models, _.extend({merge: false}, options, addOptions)); + }, + + // Remove a model, or a list of models from the set. + remove: function(models, options) { + options = _.extend({}, options); + var singular = !_.isArray(models); + models = singular ? [models] : _.clone(models); + var removed = this._removeModels(models, options); + if (!options.silent && removed) this.trigger('update', this, options); + return singular ? removed[0] : removed; + }, + + // Update a collection by `set`-ing a new list of models, adding new ones, + // removing models that are no longer present, and merging models that + // already exist in the collection, as necessary. Similar to **Model#set**, + // the core operation for updating the data contained by the collection. + set: function(models, options) { + if (models == null) return; + + options = _.defaults({}, options, setOptions); + if (options.parse && !this._isModel(models)) models = this.parse(models, options); + + var singular = !_.isArray(models); + models = singular ? [models] : models.slice(); + + var at = options.at; + if (at != null) at = +at; + if (at < 0) at += this.length + 1; + + var set = []; + var toAdd = []; + var toRemove = []; + var modelMap = {}; + + var add = options.add; + var merge = options.merge; + var remove = options.remove; + + var sort = false; + var sortable = this.comparator && (at == null) && options.sort !== false; + var sortAttr = _.isString(this.comparator) ? this.comparator : null; + + // Turn bare objects into model references, and prevent invalid models + // from being added. + var model; + for (var i = 0; i < models.length; i++) { + model = models[i]; + + // If a duplicate is found, prevent it from being added and + // optionally merge it into the existing model. + var existing = this.get(model); + if (existing) { + if (merge && model !== existing) { + var attrs = this._isModel(model) ? model.attributes : model; + if (options.parse) attrs = existing.parse(attrs, options); + existing.set(attrs, options); + if (sortable && !sort) sort = existing.hasChanged(sortAttr); + } + if (!modelMap[existing.cid]) { + modelMap[existing.cid] = true; + set.push(existing); + } + models[i] = existing; + + // If this is a new, valid model, push it to the `toAdd` list. + } else if (add) { + model = models[i] = this._prepareModel(model, options); + if (model) { + toAdd.push(model); + this._addReference(model, options); + modelMap[model.cid] = true; + set.push(model); + } + } + } + + // Remove stale models. + if (remove) { + for (i = 0; i < this.length; i++) { + model = this.models[i]; + if (!modelMap[model.cid]) toRemove.push(model); + } + if (toRemove.length) this._removeModels(toRemove, options); + } + + // See if sorting is needed, update `length` and splice in new models. + var orderChanged = false; + var replace = !sortable && add && remove; + if (set.length && replace) { + orderChanged = this.length != set.length || _.some(this.models, function(model, index) { + return model !== set[index]; + }); + this.models.length = 0; + splice(this.models, set, 0); + this.length = this.models.length; + } else if (toAdd.length) { + if (sortable) sort = true; + splice(this.models, toAdd, at == null ? this.length : at); + this.length = this.models.length; + } + + // Silently sort the collection if appropriate. + if (sort) this.sort({silent: true}); + + // Unless silenced, it's time to fire all appropriate add/sort events. + if (!options.silent) { + for (i = 0; i < toAdd.length; i++) { + if (at != null) options.index = at + i; + model = toAdd[i]; + model.trigger('add', model, this, options); + } + if (sort || orderChanged) this.trigger('sort', this, options); + if (toAdd.length || toRemove.length) this.trigger('update', this, options); + } + + // Return the added (or merged) model (or models). + return singular ? models[0] : models; + }, + + // When you have more items than you want to add or remove individually, + // you can reset the entire set with a new list of models, without firing + // any granular `add` or `remove` events. Fires `reset` when finished. + // Useful for bulk operations and optimizations. + reset: function(models, options) { + options = options ? _.clone(options) : {}; + for (var i = 0; i < this.models.length; i++) { + this._removeReference(this.models[i], options); + } + options.previousModels = this.models; + this._reset(); + models = this.add(models, _.extend({silent: true}, options)); + if (!options.silent) this.trigger('reset', this, options); + return models; + }, + + // Add a model to the end of the collection. + push: function(model, options) { + return this.add(model, _.extend({at: this.length}, options)); + }, + + // Remove a model from the end of the collection. + pop: function(options) { + var model = this.at(this.length - 1); + return this.remove(model, options); + }, + + // Add a model to the beginning of the collection. + unshift: function(model, options) { + return this.add(model, _.extend({at: 0}, options)); + }, + + // Remove a model from the beginning of the collection. + shift: function(options) { + var model = this.at(0); + return this.remove(model, options); + }, + + // Slice out a sub-array of models from the collection. + slice: function() { + return slice.apply(this.models, arguments); + }, + + // Get a model from the set by id. + get: function(obj) { + if (obj == null) return void 0; + var id = this.modelId(this._isModel(obj) ? obj.attributes : obj); + return this._byId[obj] || this._byId[id] || this._byId[obj.cid]; + }, + + // Get the model at the given index. + at: function(index) { + if (index < 0) index += this.length; + return this.models[index]; + }, + + // Return models with matching attributes. Useful for simple cases of + // `filter`. + where: function(attrs, first) { + return this[first ? 'find' : 'filter'](attrs); + }, + + // Return the first model with matching attributes. Useful for simple cases + // of `find`. + findWhere: function(attrs) { + return this.where(attrs, true); + }, + + // Force the collection to re-sort itself. You don't need to call this under + // normal circumstances, as the set will maintain sort order as each item + // is added. + sort: function(options) { + var comparator = this.comparator; + if (!comparator) throw new Error('Cannot sort a set without a comparator'); + options || (options = {}); + + var length = comparator.length; + if (_.isFunction(comparator)) comparator = _.bind(comparator, this); + + // Run sort based on type of `comparator`. + if (length === 1 || _.isString(comparator)) { + this.models = this.sortBy(comparator); + } else { + this.models.sort(comparator); + } + if (!options.silent) this.trigger('sort', this, options); + return this; + }, + + // Pluck an attribute from each model in the collection. + pluck: function(attr) { + return _.invoke(this.models, 'get', attr); + }, + + // Fetch the default set of models for this collection, resetting the + // collection when they arrive. If `reset: true` is passed, the response + // data will be passed through the `reset` method instead of `set`. + fetch: function(options) { + options = _.extend({parse: true}, options); + var success = options.success; + var collection = this; + options.success = function(resp) { + var method = options.reset ? 'reset' : 'set'; + collection[method](resp, options); + if (success) success.call(options.context, collection, resp, options); + collection.trigger('sync', collection, resp, options); + }; + wrapError(this, options); + return this.sync('read', this, options); + }, + + // Create a new instance of a model in this collection. Add the model to the + // collection immediately, unless `wait: true` is passed, in which case we + // wait for the server to agree. + create: function(model, options) { + options = options ? _.clone(options) : {}; + var wait = options.wait; + model = this._prepareModel(model, options); + if (!model) return false; + if (!wait) this.add(model, options); + var collection = this; + var success = options.success; + options.success = function(model, resp, callbackOpts) { + if (wait) collection.add(model, callbackOpts); + if (success) success.call(callbackOpts.context, model, resp, callbackOpts); + }; + model.save(null, options); + return model; + }, + + // **parse** converts a response into a list of models to be added to the + // collection. The default implementation is just to pass it through. + parse: function(resp, options) { + return resp; + }, + + // Create a new collection with an identical list of models as this one. + clone: function() { + return new this.constructor(this.models, { + model: this.model, + comparator: this.comparator + }); + }, + + // Define how to uniquely identify models in the collection. + modelId: function (attrs) { + return attrs[this.model.prototype.idAttribute || 'id']; + }, + + // Private method to reset all internal state. Called when the collection + // is first initialized or reset. + _reset: function() { + this.length = 0; + this.models = []; + this._byId = {}; + }, + + // Prepare a hash of attributes (or other model) to be added to this + // collection. + _prepareModel: function(attrs, options) { + if (this._isModel(attrs)) { + if (!attrs.collection) attrs.collection = this; + return attrs; + } + options = options ? _.clone(options) : {}; + options.collection = this; + var model = new this.model(attrs, options); + if (!model.validationError) return model; + this.trigger('invalid', this, model.validationError, options); + return false; + }, + + // Internal method called by both remove and set. + _removeModels: function(models, options) { + var removed = []; + for (var i = 0; i < models.length; i++) { + var model = this.get(models[i]); + if (!model) continue; + + var index = this.indexOf(model); + this.models.splice(index, 1); + this.length--; + + if (!options.silent) { + options.index = index; + model.trigger('remove', model, this, options); + } + + removed.push(model); + this._removeReference(model, options); + } + return removed.length ? removed : false; + }, + + // Method for checking whether an object should be considered a model for + // the purposes of adding to the collection. + _isModel: function (model) { + return model instanceof Model; + }, + + // Internal method to create a model's ties to a collection. + _addReference: function(model, options) { + this._byId[model.cid] = model; + var id = this.modelId(model.attributes); + if (id != null) this._byId[id] = model; + model.on('all', this._onModelEvent, this); + }, + + // Internal method to sever a model's ties to a collection. + _removeReference: function(model, options) { + delete this._byId[model.cid]; + var id = this.modelId(model.attributes); + if (id != null) delete this._byId[id]; + if (this === model.collection) delete model.collection; + model.off('all', this._onModelEvent, this); + }, + + // Internal method called every time a model in the set fires an event. + // Sets need to update their indexes when models change ids. All other + // events simply proxy through. "add" and "remove" events that originate + // in other collections are ignored. + _onModelEvent: function(event, model, collection, options) { + if ((event === 'add' || event === 'remove') && collection !== this) return; + if (event === 'destroy') this.remove(model, options); + if (event === 'change') { + var prevId = this.modelId(model.previousAttributes()); + var id = this.modelId(model.attributes); + if (prevId !== id) { + if (prevId != null) delete this._byId[prevId]; + if (id != null) this._byId[id] = model; + } + } + this.trigger.apply(this, arguments); + } + + }); + + // Underscore methods that we want to implement on the Collection. + // 90% of the core usefulness of Backbone Collections is actually implemented + // right here: + var collectionMethods = { forEach: 3, each: 3, map: 3, collect: 3, reduce: 4, + foldl: 4, inject: 4, reduceRight: 4, foldr: 4, find: 3, detect: 3, filter: 3, + select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3, + contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3, + head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3, + without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3, + isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3, + sortBy: 3, indexBy: 3}; + + // Mix in each Underscore method as a proxy to `Collection#models`. + addUnderscoreMethods(Collection, collectionMethods, 'models'); + + // Backbone.View + // ------------- + + // Backbone Views are almost more convention than they are actual code. A View + // is simply a JavaScript object that represents a logical chunk of UI in the + // DOM. This might be a single item, an entire list, a sidebar or panel, or + // even the surrounding frame which wraps your whole app. Defining a chunk of + // UI as a **View** allows you to define your DOM events declaratively, without + // having to worry about render order ... and makes it easy for the view to + // react to specific changes in the state of your models. + + // Creating a Backbone.View creates its initial element outside of the DOM, + // if an existing element is not provided... + var View = Backbone.View = function(options) { + this.cid = _.uniqueId('view'); + _.extend(this, _.pick(options, viewOptions)); + this._ensureElement(); + this.initialize.apply(this, arguments); + }; + + // Cached regex to split keys for `delegate`. + var delegateEventSplitter = /^(\S+)\s*(.*)$/; + + // List of view options to be set as properties. + var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events']; + + // Set up all inheritable **Backbone.View** properties and methods. + _.extend(View.prototype, Events, { + + // The default `tagName` of a View's element is `"div"`. + tagName: 'div', + + // jQuery delegate for element lookup, scoped to DOM elements within the + // current view. This should be preferred to global lookups where possible. + $: function(selector) { + return this.$el.find(selector); + }, + + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function(){}, + + // **render** is the core function that your view should override, in order + // to populate its element (`this.el`), with the appropriate HTML. The + // convention is for **render** to always return `this`. + render: function() { + return this; + }, + + // Remove this view by taking the element out of the DOM, and removing any + // applicable Backbone.Events listeners. + remove: function() { + this._removeElement(); + this.stopListening(); + return this; + }, + + // Remove this view's element from the document and all event listeners + // attached to it. Exposed for subclasses using an alternative DOM + // manipulation API. + _removeElement: function() { + this.$el.remove(); + }, + + // Change the view's element (`this.el` property) and re-delegate the + // view's events on the new element. + setElement: function(element) { + this.undelegateEvents(); + this._setElement(element); + this.delegateEvents(); + return this; + }, + + // Creates the `this.el` and `this.$el` references for this view using the + // given `el`. `el` can be a CSS selector or an HTML string, a jQuery + // context or an element. Subclasses can override this to utilize an + // alternative DOM manipulation API and are only required to set the + // `this.el` property. + _setElement: function(el) { + this.$el = el instanceof Backbone.$ ? el : Backbone.$(el); + this.el = this.$el[0]; + }, + + // Set callbacks, where `this.events` is a hash of + // + // *{"event selector": "callback"}* + // + // { + // 'mousedown .title': 'edit', + // 'click .button': 'save', + // 'click .open': function(e) { ... } + // } + // + // pairs. Callbacks will be bound to the view, with `this` set properly. + // Uses event delegation for efficiency. + // Omitting the selector binds the event to `this.el`. + delegateEvents: function(events) { + events || (events = _.result(this, 'events')); + if (!events) return this; + this.undelegateEvents(); + for (var key in events) { + var method = events[key]; + if (!_.isFunction(method)) method = this[method]; + if (!method) continue; + var match = key.match(delegateEventSplitter); + this.delegate(match[1], match[2], _.bind(method, this)); + } + return this; + }, + + // Add a single event listener to the view's element (or a child element + // using `selector`). This only works for delegate-able events: not `focus`, + // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer. + delegate: function(eventName, selector, listener) { + this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener); + return this; + }, + + // Clears all callbacks previously bound to the view by `delegateEvents`. + // You usually don't need to use this, but may wish to if you have multiple + // Backbone views attached to the same DOM element. + undelegateEvents: function() { + if (this.$el) this.$el.off('.delegateEvents' + this.cid); + return this; + }, + + // A finer-grained `undelegateEvents` for removing a single delegated event. + // `selector` and `listener` are both optional. + undelegate: function(eventName, selector, listener) { + this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener); + return this; + }, + + // Produces a DOM element to be assigned to your view. Exposed for + // subclasses using an alternative DOM manipulation API. + _createElement: function(tagName) { + return document.createElement(tagName); + }, + + // Ensure that the View has a DOM element to render into. + // If `this.el` is a string, pass it through `$()`, take the first + // matching element, and re-assign it to `el`. Otherwise, create + // an element from the `id`, `className` and `tagName` properties. + _ensureElement: function() { + if (!this.el) { + var attrs = _.extend({}, _.result(this, 'attributes')); + if (this.id) attrs.id = _.result(this, 'id'); + if (this.className) attrs['class'] = _.result(this, 'className'); + this.setElement(this._createElement(_.result(this, 'tagName'))); + this._setAttributes(attrs); + } else { + this.setElement(_.result(this, 'el')); + } + }, + + // Set attributes from a hash on this view's element. Exposed for + // subclasses using an alternative DOM manipulation API. + _setAttributes: function(attributes) { + this.$el.attr(attributes); + } + + }); + + // Backbone.sync + // ------------- + + // Override this function to change the manner in which Backbone persists + // models to the server. You will be passed the type of request, and the + // model in question. By default, makes a RESTful Ajax request + // to the model's `url()`. Some possible customizations could be: + // + // * Use `setTimeout` to batch rapid-fire updates into a single request. + // * Send up the models as XML instead of JSON. + // * Persist models via WebSockets instead of Ajax. + // + // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests + // as `POST`, with a `_method` parameter containing the true HTTP method, + // as well as all requests with the body as `application/x-www-form-urlencoded` + // instead of `application/json` with the model in a param named `model`. + // Useful when interfacing with server-side languages like **PHP** that make + // it difficult to read the body of `PUT` requests. + Backbone.sync = function(method, model, options) { + var type = methodMap[method]; + + // Default options, unless specified. + _.defaults(options || (options = {}), { + emulateHTTP: Backbone.emulateHTTP, + emulateJSON: Backbone.emulateJSON + }); + + // Default JSON-request options. + var params = {type: type, dataType: 'json'}; + + // Ensure that we have a URL. + if (!options.url) { + params.url = _.result(model, 'url') || urlError(); + } + + // Ensure that we have the appropriate request data. + if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) { + params.contentType = 'application/json'; + params.data = JSON.stringify(options.attrs || model.toJSON(options)); + } + + // For older servers, emulate JSON by encoding the request into an HTML-form. + if (options.emulateJSON) { + params.contentType = 'application/x-www-form-urlencoded'; + params.data = params.data ? {model: params.data} : {}; + } + + // For older servers, emulate HTTP by mimicking the HTTP method with `_method` + // And an `X-HTTP-Method-Override` header. + if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) { + params.type = 'POST'; + if (options.emulateJSON) params.data._method = type; + var beforeSend = options.beforeSend; + options.beforeSend = function(xhr) { + xhr.setRequestHeader('X-HTTP-Method-Override', type); + if (beforeSend) return beforeSend.apply(this, arguments); + }; + } + + // Don't process data on a non-GET request. + if (params.type !== 'GET' && !options.emulateJSON) { + params.processData = false; + } + + // Pass along `textStatus` and `errorThrown` from jQuery. + var error = options.error; + options.error = function(xhr, textStatus, errorThrown) { + options.textStatus = textStatus; + options.errorThrown = errorThrown; + if (error) error.call(options.context, xhr, textStatus, errorThrown); + }; + + // Make the request, allowing the user to override any Ajax options. + var xhr = options.xhr = Backbone.ajax(_.extend(params, options)); + model.trigger('request', model, xhr, options); + return xhr; + }; + + // Map from CRUD to HTTP for our default `Backbone.sync` implementation. + var methodMap = { + 'create': 'POST', + 'update': 'PUT', + 'patch': 'PATCH', + 'delete': 'DELETE', + 'read': 'GET' + }; + + // Set the default implementation of `Backbone.ajax` to proxy through to `$`. + // Override this if you'd like to use a different library. + Backbone.ajax = function() { + return Backbone.$.ajax.apply(Backbone.$, arguments); + }; + + // Backbone.Router + // --------------- + + // Routers map faux-URLs to actions, and fire events when routes are + // matched. Creating a new one sets its `routes` hash, if not set statically. + var Router = Backbone.Router = function(options) { + options || (options = {}); + if (options.routes) this.routes = options.routes; + this._bindRoutes(); + this.initialize.apply(this, arguments); + }; + + // Cached regular expressions for matching named param parts and splatted + // parts of route strings. + var optionalParam = /\((.*?)\)/g; + var namedParam = /(\(\?)?:\w+/g; + var splatParam = /\*\w+/g; + var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g; + + // Set up all inheritable **Backbone.Router** properties and methods. + _.extend(Router.prototype, Events, { + + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function(){}, + + // Manually bind a single named route to a callback. For example: + // + // this.route('search/:query/p:num', 'search', function(query, num) { + // ... + // }); + // + route: function(route, name, callback) { + if (!_.isRegExp(route)) route = this._routeToRegExp(route); + if (_.isFunction(name)) { + callback = name; + name = ''; + } + if (!callback) callback = this[name]; + var router = this; + Backbone.history.route(route, function(fragment) { + var args = router._extractParameters(route, fragment); + if (router.execute(callback, args, name) !== false) { + router.trigger.apply(router, ['route:' + name].concat(args)); + router.trigger('route', name, args); + Backbone.history.trigger('route', router, name, args); + } + }); + return this; + }, + + // Execute a route handler with the provided parameters. This is an + // excellent place to do pre-route setup or post-route cleanup. + execute: function(callback, args, name) { + if (callback) callback.apply(this, args); + }, + + // Simple proxy to `Backbone.history` to save a fragment into the history. + navigate: function(fragment, options) { + Backbone.history.navigate(fragment, options); + return this; + }, + + // Bind all defined routes to `Backbone.history`. We have to reverse the + // order of the routes here to support behavior where the most general + // routes can be defined at the bottom of the route map. + _bindRoutes: function() { + if (!this.routes) return; + this.routes = _.result(this, 'routes'); + var route, routes = _.keys(this.routes); + while ((route = routes.pop()) != null) { + this.route(route, this.routes[route]); + } + }, + + // Convert a route string into a regular expression, suitable for matching + // against the current location hash. + _routeToRegExp: function(route) { + route = route.replace(escapeRegExp, '\\$&') + .replace(optionalParam, '(?:$1)?') + .replace(namedParam, function(match, optional) { + return optional ? match : '([^/?]+)'; + }) + .replace(splatParam, '([^?]*?)'); + return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$'); + }, + + // Given a route, and a URL fragment that it matches, return the array of + // extracted decoded parameters. Empty or unmatched parameters will be + // treated as `null` to normalize cross-browser behavior. + _extractParameters: function(route, fragment) { + var params = route.exec(fragment).slice(1); + return _.map(params, function(param, i) { + // Don't decode the search params. + if (i === params.length - 1) return param || null; + return param ? decodeURIComponent(param) : null; + }); + } + + }); + + // Backbone.History + // ---------------- + + // Handles cross-browser history management, based on either + // [pushState](http://diveintohtml5.info/history.html) and real URLs, or + // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange) + // and URL fragments. If the browser supports neither (old IE, natch), + // falls back to polling. + var History = Backbone.History = function() { + this.handlers = []; + this.checkUrl = _.bind(this.checkUrl, this); + + // Ensure that `History` can be used outside of the browser. + if (typeof window !== 'undefined') { + this.location = window.location; + this.history = window.history; + } + }; + + // Cached regex for stripping a leading hash/slash and trailing space. + var routeStripper = /^[#\/]|\s+$/g; + + // Cached regex for stripping leading and trailing slashes. + var rootStripper = /^\/+|\/+$/g; + + // Cached regex for stripping urls of hash. + var pathStripper = /#.*$/; + + // Has the history handling already been started? + History.started = false; + + // Set up all inheritable **Backbone.History** properties and methods. + _.extend(History.prototype, Events, { + + // The default interval to poll for hash changes, if necessary, is + // twenty times a second. + interval: 50, + + // Are we at the app root? + atRoot: function() { + var path = this.location.pathname.replace(/[^\/]$/, '$&/'); + return path === this.root && !this.getSearch(); + }, + + // Does the pathname match the root? + matchRoot: function() { + var path = this.decodeFragment(this.location.pathname); + var root = path.slice(0, this.root.length - 1) + '/'; + return root === this.root; + }, + + // Unicode characters in `location.pathname` are percent encoded so they're + // decoded for comparison. `%25` should not be decoded since it may be part + // of an encoded parameter. + decodeFragment: function(fragment) { + return decodeURI(fragment.replace(/%25/g, '%2525')); + }, + + // In IE6, the hash fragment and search params are incorrect if the + // fragment contains `?`. + getSearch: function() { + var match = this.location.href.replace(/#.*/, '').match(/\?.+/); + return match ? match[0] : ''; + }, + + // Gets the true hash value. Cannot use location.hash directly due to bug + // in Firefox where location.hash will always be decoded. + getHash: function(window) { + var match = (window || this).location.href.match(/#(.*)$/); + return match ? match[1] : ''; + }, + + // Get the pathname and search params, without the root. + getPath: function() { + var path = this.decodeFragment( + this.location.pathname + this.getSearch() + ).slice(this.root.length - 1); + return path.charAt(0) === '/' ? path.slice(1) : path; + }, + + // Get the cross-browser normalized URL fragment from the path or hash. + getFragment: function(fragment) { + if (fragment == null) { + if (this._usePushState || !this._wantsHashChange) { + fragment = this.getPath(); + } else { + fragment = this.getHash(); + } + } + return fragment.replace(routeStripper, ''); + }, + + // Start the hash change handling, returning `true` if the current URL matches + // an existing route, and `false` otherwise. + start: function(options) { + if (History.started) throw new Error('Backbone.history has already been started'); + History.started = true; + + // Figure out the initial configuration. Do we need an iframe? + // Is pushState desired ... is it available? + this.options = _.extend({root: '/'}, this.options, options); + this.root = this.options.root; + this._wantsHashChange = this.options.hashChange !== false; + this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7); + this._useHashChange = this._wantsHashChange && this._hasHashChange; + this._wantsPushState = !!this.options.pushState; + this._hasPushState = !!(this.history && this.history.pushState); + this._usePushState = this._wantsPushState && this._hasPushState; + this.fragment = this.getFragment(); + + // Normalize root to always include a leading and trailing slash. + this.root = ('/' + this.root + '/').replace(rootStripper, '/'); + + // Transition from hashChange to pushState or vice versa if both are + // requested. + if (this._wantsHashChange && this._wantsPushState) { + + // If we've started off with a route from a `pushState`-enabled + // browser, but we're currently in a browser that doesn't support it... + if (!this._hasPushState && !this.atRoot()) { + var root = this.root.slice(0, -1) || '/'; + this.location.replace(root + '#' + this.getPath()); + // Return immediately as browser will do redirect to new url + return true; + + // Or if we've started out with a hash-based route, but we're currently + // in a browser where it could be `pushState`-based instead... + } else if (this._hasPushState && this.atRoot()) { + this.navigate(this.getHash(), {replace: true}); + } + + } + + // Proxy an iframe to handle location events if the browser doesn't + // support the `hashchange` event, HTML5 history, or the user wants + // `hashChange` but not `pushState`. + if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) { + this.iframe = document.createElement('iframe'); + this.iframe.src = 'javascript:0'; + this.iframe.style.display = 'none'; + this.iframe.tabIndex = -1; + var body = document.body; + // Using `appendChild` will throw on IE < 9 if the document is not ready. + var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow; + iWindow.document.open(); + iWindow.document.close(); + iWindow.location.hash = '#' + this.fragment; + } + + // Add a cross-platform `addEventListener` shim for older browsers. + var addEventListener = window.addEventListener || function (eventName, listener) { + return attachEvent('on' + eventName, listener); + }; + + // Depending on whether we're using pushState or hashes, and whether + // 'onhashchange' is supported, determine how we check the URL state. + if (this._usePushState) { + addEventListener('popstate', this.checkUrl, false); + } else if (this._useHashChange && !this.iframe) { + addEventListener('hashchange', this.checkUrl, false); + } else if (this._wantsHashChange) { + this._checkUrlInterval = setInterval(this.checkUrl, this.interval); + } + + if (!this.options.silent) return this.loadUrl(); + }, + + // Disable Backbone.history, perhaps temporarily. Not useful in a real app, + // but possibly useful for unit testing Routers. + stop: function() { + // Add a cross-platform `removeEventListener` shim for older browsers. + var removeEventListener = window.removeEventListener || function (eventName, listener) { + return detachEvent('on' + eventName, listener); + }; + + // Remove window listeners. + if (this._usePushState) { + removeEventListener('popstate', this.checkUrl, false); + } else if (this._useHashChange && !this.iframe) { + removeEventListener('hashchange', this.checkUrl, false); + } + + // Clean up the iframe if necessary. + if (this.iframe) { + document.body.removeChild(this.iframe); + this.iframe = null; + } + + // Some environments will throw when clearing an undefined interval. + if (this._checkUrlInterval) clearInterval(this._checkUrlInterval); + History.started = false; + }, + + // Add a route to be tested when the fragment changes. Routes added later + // may override previous routes. + route: function(route, callback) { + this.handlers.unshift({route: route, callback: callback}); + }, + + // Checks the current URL to see if it has changed, and if it has, + // calls `loadUrl`, normalizing across the hidden iframe. + checkUrl: function(e) { + var current = this.getFragment(); + + // If the user pressed the back button, the iframe's hash will have + // changed and we should use that for comparison. + if (current === this.fragment && this.iframe) { + current = this.getHash(this.iframe.contentWindow); + } + + if (current === this.fragment) return false; + if (this.iframe) this.navigate(current); + this.loadUrl(); + }, + + // Attempt to load the current URL fragment. If a route succeeds with a + // match, returns `true`. If no defined routes matches the fragment, + // returns `false`. + loadUrl: function(fragment) { + // If the root doesn't match, no routes can match either. + if (!this.matchRoot()) return false; + fragment = this.fragment = this.getFragment(fragment); + return _.some(this.handlers, function(handler) { + if (handler.route.test(fragment)) { + handler.callback(fragment); + return true; + } + }); + }, + + // Save a fragment into the hash history, or replace the URL state if the + // 'replace' option is passed. You are responsible for properly URL-encoding + // the fragment in advance. + // + // The options object can contain `trigger: true` if you wish to have the + // route callback be fired (not usually desirable), or `replace: true`, if + // you wish to modify the current URL without adding an entry to the history. + navigate: function(fragment, options) { + if (!History.started) return false; + if (!options || options === true) options = {trigger: !!options}; + + // Normalize the fragment. + fragment = this.getFragment(fragment || ''); + + // Don't include a trailing slash on the root. + var root = this.root; + if (fragment === '' || fragment.charAt(0) === '?') { + root = root.slice(0, -1) || '/'; + } + var url = root + fragment; + + // Strip the hash and decode for matching. + fragment = this.decodeFragment(fragment.replace(pathStripper, '')); + + if (this.fragment === fragment) return; + this.fragment = fragment; + + // If pushState is available, we use it to set the fragment as a real URL. + if (this._usePushState) { + this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url); + + // If hash changes haven't been explicitly disabled, update the hash + // fragment to store history. + } else if (this._wantsHashChange) { + this._updateHash(this.location, fragment, options.replace); + if (this.iframe && (fragment !== this.getHash(this.iframe.contentWindow))) { + var iWindow = this.iframe.contentWindow; + + // Opening and closing the iframe tricks IE7 and earlier to push a + // history entry on hash-tag change. When replace is true, we don't + // want this. + if (!options.replace) { + iWindow.document.open(); + iWindow.document.close(); + } + + this._updateHash(iWindow.location, fragment, options.replace); + } + + // If you've told us that you explicitly don't want fallback hashchange- + // based history, then `navigate` becomes a page refresh. + } else { + return this.location.assign(url); + } + if (options.trigger) return this.loadUrl(fragment); + }, + + // Update the hash location, either replacing the current entry, or adding + // a new one to the browser history. + _updateHash: function(location, fragment, replace) { + if (replace) { + var href = location.href.replace(/(javascript:|#).*$/, ''); + location.replace(href + '#' + fragment); + } else { + // Some browsers require that `hash` contains a leading #. + location.hash = '#' + fragment; + } + } + + }); + + // Create the default Backbone.history. + Backbone.history = new History; + + // Helpers + // ------- + + // Helper function to correctly set up the prototype chain for subclasses. + // Similar to `goog.inherits`, but uses a hash of prototype properties and + // class properties to be extended. + var extend = function(protoProps, staticProps) { + var parent = this; + var child; + + // The constructor function for the new subclass is either defined by you + // (the "constructor" property in your `extend` definition), or defaulted + // by us to simply call the parent constructor. + if (protoProps && _.has(protoProps, 'constructor')) { + child = protoProps.constructor; + } else { + child = function(){ return parent.apply(this, arguments); }; + } + + // Add static properties to the constructor function, if supplied. + _.extend(child, parent, staticProps); + + // Set the prototype chain to inherit from `parent`, without calling + // `parent` constructor function. + var Surrogate = function(){ this.constructor = child; }; + Surrogate.prototype = parent.prototype; + child.prototype = new Surrogate; + + // Add prototype properties (instance properties) to the subclass, + // if supplied. + if (protoProps) _.extend(child.prototype, protoProps); + + // Set a convenience property in case the parent's prototype is needed + // later. + child.__super__ = parent.prototype; + + return child; + }; + + // Set up inheritance for the model, collection, router, view and history. + Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend; + + // Throw an error when a URL is needed, and none is supplied. + var urlError = function() { + throw new Error('A "url" property or function must be specified'); + }; + + // Wrap an optional error callback with a fallback error event. + var wrapError = function(model, options) { + var error = options.error; + options.error = function(resp) { + if (error) error.call(options.context, model, resp, options); + model.trigger('error', model, resp, options); + }; + }; + + return Backbone; + +})); diff --git a/examples/vendor/cartodb.css b/examples/vendor/cartodb.css new file mode 100644 index 00000000..75e8d74b --- /dev/null +++ b/examples/vendor/cartodb.css @@ -0,0 +1,2 @@ +/* CartoDB.css minified version: 3.15.8 */ +a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}button{margin:0;padding:0;border:0;background:0 0;box-sizing:border-box;outline:0}dd,dt{display:inline-block}div.cartodb-popup.dark .jspContainer:after{background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,transparent),color-stop(100%,#000));background:-webkit-linear-gradient(top,transparent,#000);background:-moz-linear-gradient(top,transparent,#000);background:-o-linear-gradient(top,transparent,#000);background:linear-gradient(top,transparent,#000)}div.cartodb-popup.dark .jspContainer:before{background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#000),color-stop(100%,transparent));background:-webkit-linear-gradient(top,#000,transparent);background:-moz-linear-gradient(top,#000,transparent);background:-o-linear-gradient(top,#000,transparent);background:linear-gradient(top,#000,transparent)}div.cartodb-popup.dark{background:url(../img/dark.png) no-repeat -226px 0}div.cartodb-popup.dark div.cartodb-popup-content-wrapper{background:url(../img/dark.png) repeat-y -452px 0}div.cartodb-popup.dark div.cartodb-popup-tip-container{background:url(../img/dark.png) no-repeat 0 0}div.cartodb-popup.dark a.cartodb-popup-close-button{background:url(../img/dark.png) no-repeat 0 -23px}div.cartodb-popup.dark h4{color:#999}div.cartodb-popup.dark p{color:#FFF}div.cartodb-popup.dark a{color:#397DB9}div.cartodb-popup.dark p.empty{font-style:italic;color:#AAA}div.cartodb-popup.dark .jspDrag{background:#AAA;background:rgba(255,255,255,.5)}div.cartodb-popup.dark .jspDrag:hover{background:#DEDEDE;background:rgba(255,255,255,.8)}div.cartodb-popup.v2.dark{background:#000}div.cartodb-popup.v2.dark div.cartodb-popup-tip-container:after,div.cartodb-popup.v2.dark:before{border-top-color:#000}div.cartodb-popup.v2.dark a.cartodb-popup-close-button{background:#000}div.cartodb-popup.v2.dark a.cartodb-popup-close-button:after,div.cartodb-popup.v2.dark a.cartodb-popup-close-button:before{background:#fff}@media \0screen\,screen\9{div.cartodb-popup.v2.dark{border:4px solid #AAA}div.cartodb-popup.v2.dark div.cartodb-popup-tip-container{border-top:18px solid #000}div.cartodb-popup.v2.dark a.cartodb-popup-close-button{border:2px solid #AAA;color:#fff}div.cartodb-popup.v2.dark a.cartodb-popup-close-button:hover{border:2px solid #BBB}}div.cartodb-infowindow{position:absolute;z-index:12}div.cartodb-popup{position:relative;width:226px;height:auto;padding:7px 0 0;margin:0;background:url(../img/light.png) no-repeat -226px 0}div.cartodb-popup div.cartodb-popup-content-wrapper{width:190px;max-width:190px;padding:12px 19px;overflow-x:hidden;background:url(../img/light.png) repeat-y -452px 0}div.cartodb-popup div.cartodb-popup-content{display:block;width:190px;max-width:190px;min-height:5px;height:auto;max-height:185px;margin:0;padding:0;overflow-y:auto;overflow-x:hidden!important;outline:0;text-align:left}div.cartodb-popup .jspContainer:after,div.cartodb-popup .jspContainer:before{content:'';position:absolute;left:0;right:12px;display:block;height:10px;width:190px;z-index:5}div.cartodb-popup .jspContainer:after{bottom:0;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,rgba(255,255,255,0)),color-stop(100%,#fff));background:-webkit-linear-gradient(top,rgba(255,255,255,0),#fff);background:-moz-linear-gradient(top,rgba(255,255,255,0),#fff);background:-o-linear-gradient(top,rgba(255,255,255,0),#fff);background:linear-gradient(top,rgba(255,255,255,0),#fff);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#00ffffff', GradientType=0)}div.cartodb-popup .jspContainer:before{top:0;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#fff),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(top,#fff,rgba(255,255,255,0));background:-moz-linear-gradient(top,#fff,rgba(255,255,255,0));background:-o-linear-gradient(top,#fff,rgba(255,255,255,0));background:linear-gradient(top,#fff,rgba(255,255,255,0));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#00ffffff', GradientType=0)}div.cartodb-popup div.cartodb-popup-tip-container{width:226px;height:20px;background:url(../img/light.png) no-repeat 0 0}div.cartodb-popup a.cartodb-popup-close-button{position:absolute;top:-9px;right:-9px;width:26px;height:26px;padding:0;background:url(../img/light.png) no-repeat 0 -23px;text-indent:-9999px;font-size:0;line-height:0;opacity:1;-ms-filter:"alpha(Opacity=100)";filter:alpha(Opacity=1);filter:alpha(opacity=100);text-transform:uppercase;z-index:3}div.cartodb-popup.header.no_fields div.cartodb-popup-content{display:none}div.cartodb-popup.header.no_fields div.cartodb-popup-content-wrapper div.cartodb-edit-buttons{padding-top:5px;margin-top:0}div.cartodb-popup.header.no_fields div.cartodb-edit-buttons{border:0;padding-top:0}div.cartodb-popup .jspContainer{overflow:hidden;position:relative;outline:0}div.cartodb-popup .jspContainer *{outline:0}div.cartodb-popup .jspPane{position:absolute;padding:4px 0 0!important;z-index:1}div.cartodb-popup .jspVerticalBar{position:absolute;top:0;right:0;width:6px;height:100%;background:0 0;z-index:10}div.cartodb-popup .jspHorizontalBar{position:absolute;bottom:0;left:0;width:100%;height:6px;background:0 0}div.cartodb-popup .jspHorizontalBar *,div.cartodb-popup .jspVerticalBar *{margin:0;padding:0}div.cartodb-popup .jspCap{display:none}div.cartodb-popup .jspHorizontalBar .jspCap{float:left}div.cartodb-popup .jspTrack{position:relative;cursor:pointer;background:0 0}div.cartodb-popup .jspDrag{position:relative;top:0;left:0;cursor:pointer;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;background:#999;background:rgba(0,0,0,.16)}div.cartodb-popup .jspDrag:hover{background:#666;background:rgba(0,0,0,.5);cursor:pointer}div.cartodb-popup .jspHorizontalBar .jspDrag,div.cartodb-popup .jspHorizontalBar .jspTrack{float:left;height:100%}div.cartodb-popup .jspArrow{background:#50506d;text-indent:-20000px;display:block;cursor:pointer}div.cartodb-popup .jspArrow.jspDisabled{cursor:default;background:#80808d}div.cartodb-popup .jspVerticalBar .jspArrow{height:16px}div.cartodb-popup .jspHorizontalBar .jspArrow{width:16px;float:left;height:100%}div.cartodb-popup .jspVerticalBar .jspArrow:focus{outline:0}div.cartodb-popup .jspCorner{background:#eeeef4;float:left;height:100%}* html div.cartodb-popup .jspCorner{margin:0 -3px 0 0}div.cartodb-popup h1,div.cartodb-popup h2,div.cartodb-popup h3,div.cartodb-popup h4,div.cartodb-popup h5,div.cartodb-popup h6{display:block;width:190px;margin:0;padding:0;font-weight:700;font-family:"Helvetica Neue",Helvetica,Arial;color:#CCC;text-transform:uppercase;word-wrap:break-word;line-height:120%}div.cartodb-popup h1{font-size:24px}div.cartodb-popup h2{font-size:20px}div.cartodb-popup h3{font-size:15px}div.cartodb-popup h4{font-size:11px}div.cartodb-popup h5{font-size:10px}div.cartodb-popup h6{font-size:9px}div.cartodb-popup p{display:block;width:190px;max-width:190px;margin:0;padding:0 0 7px;font:400 13px Helvetica,Arial;word-wrap:break-word}div.cartodb-popup p.italic{font-style:italic}div.cartodb-popup p.loading{position:relative;display:block;width:170px;max-width:170px;margin:0;padding:0 0 0 30px;font:400 13px Helvetica,Arial;font-style:italic;word-wrap:break-word;line-height:21px}div.cartodb-popup p.error{position:relative;display:block;width:170px;max-width:170px;margin:0;padding:0;font:400 13px Helvetica,Arial;font-style:italic;word-wrap:break-word;line-height:18px}div.cartodb-popup p.empty{font-style:italic}div.cartodb-popup div.spinner{position:absolute!important;display:inline;top:0;left:0;margin:10px 0 0 10px}div.cartodb-popup.v2{width:226px;padding:0;margin:0 0 14px;-moz-box-shadow:0 0 0 4px rgba(0,0,0,.15);-webkit-box-shadow:0 0 0 4px rgba(0,0,0,.15);box-shadow:0 0 0 4px rgba(0,0,0,.15);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff}div.cartodb-popup.v2:before{content:'';position:absolute;bottom:-14px;left:0;width:0;height:0;margin-left:28px;border-left:0 solid transparent;border-right:14px solid transparent;border-top:14px solid #fff;z-index:2}div.cartodb-popup.v2 div.cartodb-popup-content-wrapper{width:auto;max-width:none;padding:12px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:0 0}div.cartodb-popup.v2 div.cartodb-popup-content{width:auto;max-width:none;display:block;background:0 0}div.cartodb-popup.v2 div.cartodb-popup-content h1,div.cartodb-popup.v2 div.cartodb-popup-content h2,div.cartodb-popup.v2 div.cartodb-popup-content h3,div.cartodb-popup.v2 div.cartodb-popup-content h4,div.cartodb-popup.v2 div.cartodb-popup-content h5,div.cartodb-popup.v2 div.cartodb-popup-content h6,div.cartodb-popup.v2 div.cartodb-popup-content p{width:auto;max-width:95%;display:block}div.cartodb-popup.v2 div.cartodb-popup-tip-container{position:absolute;bottom:-20px;left:-4px;width:20px;height:16px;margin-left:28px;background:0 0;overflow:hidden;z-index:0}div.cartodb-popup.v2 div.cartodb-popup-tip-container:before{content:'';position:absolute;width:20px;height:20px;left:0;top:-10px;margin-left:0;-ms-transform:skew(0,-45deg);-webkit-transform:skew(0,-45deg);transform:skew(0,-45deg);border-radius:0 0 0 10px;background:rgba(0,0,0,.15);z-index:0}div.cartodb-popup.v2.centered:before{content:'';position:absolute;width:0;height:0;left:-10px;bottom:-10px;margin-left:50%;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #fff;border-radius:0;-ms-transform:skew(0,0);-webkit-transform:skew(0,0);transform:skew(0,0);background:0 0;z-index:1}div.cartodb-popup.v2.centered p{width:160px;padding-bottom:0}div.cartodb-popup.v2.centered div.cartodb-popup-tip-container{left:-12px;width:24px;margin-left:50%}div.cartodb-popup.v2.centered div.cartodb-popup-tip-container:before{content:'';position:absolute;width:0;height:0;left:0;top:0;margin-left:0;border-left:12px solid transparent;border-right:12px solid transparent;border-top:12px solid rgba(0,0,0,.15);-ms-transform:skew(0,0);-webkit-transform:skew(0,0);transform:skew(0,0);background:0 0;z-index:0}div.cartodb-popup.v2 a.cartodb-popup-close-button{right:-12px;top:-12px;width:20px;height:20px;background:#fff;-webkit-border-radius:18px;-moz-border-radius:18px;border-radius:18px;box-shadow:0 0 0 3px rgba(0,0,0,.15)}div.cartodb-popup.v2 a.cartodb-popup-close-button:after,div.cartodb-popup.v2 a.cartodb-popup-close-button:before{content:'';position:absolute;top:9px;left:6px;width:8px;height:2px;background:#397DBA;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}div.cartodb-popup.v2 a.cartodb-popup-close-button:before{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg)}div.cartodb-popup.v2 a.cartodb-popup-close-button:after{-ms-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}div.cartodb-popup.v2 a.cartodb-popup-close-button:hover{box-shadow:0 0 0 3px rgba(0,0,0,.25)}@media \0screen\,screen\9{div.cartodb-popup.v2{border:4px solid #CCC}div.cartodb-popup.v2 div.cartodb-popup-tip-container{position:absolute;width:0;height:0;margin-left:28px;z-index:2;bottom:-18px;left:-4px;border-left:0 solid transparent;border-right:18px solid transparent;border-top:18px solid #fff}div.cartodb-popup.v2 a.cartodb-popup-close-button{right:-14px;top:-14px;width:18px;padding:0 0 0 2px;text-indent:0;font:700 11px Arial;font-weight:700;text-decoration:none;text-align:center;line-height:20px;border:2px solid #CCC}div.cartodb-popup.v2 a.cartodb-popup-close-button:after,div.cartodb-popup.v2 a.cartodb-popup-close-button:before{display:none}div.cartodb-popup.v2 a.cartodb-popup-close-button:hover{border:2px solid #999}}div.cartodb-popup.header.blue div.cartodb-popup-header{background:url(../img/headers.png) no-repeat 0 -40px}div.cartodb-popup.header.blue.header .cartodb-popup-header a{color:#fff}div.cartodb-popup.header.blue div.cartodb-popup-header h4{color:#1F4C7F}div.cartodb-popup.header.blue div.cartodb-popup-header span.separator{background:#225386}div.cartodb-popup.header.blue a.cartodb-popup-close-button{background:url(../img/headers.png) no-repeat -226px -40px}div.cartodb-popup.header.blue a.cartodb-popup-close-button:hover{background-position:-226px -66px}div.cartodb-popup.v2.header.blue div.cartodb-popup-header{background:0 0;background:-ms-linear-gradient(top,#4F9CD7,#2B68A8);background:-o-linear-gradient(right,#4F9CD7,#2B68A8);background:-webkit-linear-gradient(top,#4F9CD7,#2B68A8);background:-moz-linear-gradient(right,#4F9CD7,#2B68A8);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(startColorStr='#4F9CD7',endColorStr='#2B68A8',GradientType=0)"}div.cartodb-popup.v2.header.blue a.cartodb-popup-close-button{background:#fff}div.cartodb-popup.header{padding:0;background:0 0;box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;-o-box-shadow:none;border-bottom:0;border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-o-border-radius:0}div.cartodb-popup.header div.cartodb-popup-header{position:relative;width:188px;height:auto;max-height:62px;overflow:hidden;padding:17px 19px;background:url(../img/headers.png) no-repeat 0 -40px}div.cartodb-popup.header div.cartodb-popup-header h1{width:100%;margin:0;font:700 21px "Helvetica Neue",Helvetica,Arial;color:#FFF;line-height:23px;text-shadow:0 1px rgba(0,0,0,.5);word-wrap:break-word}div.cartodb-popup.header div.cartodb-popup-header h1 a{color:#fff;font-size:21px;word-wrap:break-word}div.cartodb-popup.header div.cartodb-popup-header h1 a:hover{text-decoration:underline}div.cartodb-popup.header div.cartodb-popup-header h1.loading{position:relative;display:block;width:auto;padding-right:0;padding-left:30px;font-size:14px;font-weight:400;line-height:19px}div.cartodb-popup.header div.cartodb-popup-header h1.error{position:relative;display:block;width:auto;padding-right:0;padding-left:0;font-size:14px;font-weight:400;font-style:italic;line-height:19px}div.cartodb-popup.header div.cartodb-popup-header h4{color:#1F4C7F}div.cartodb-popup.header div.cartodb-popup-header span.separator{position:absolute;bottom:0;left:4px;right:4px;height:1px;background:#225386}div.cartodb-popup.header div.cartodb-popup-content{max-height:150px}div.cartodb-popup.header a.cartodb-popup-close-button{background:url(../img/headers.png) no-repeat -226px -40px}div.cartodb-popup.header a.cartodb-popup-close-button:hover{background-position:-226px -66px}div.cartodb-popup.header.v2.header{-moz-box-shadow:0 0 0 4px rgba(0,0,0,.15);-webkit-box-shadow:0 0 0 4px rgba(0,0,0,.15);box-shadow:0 0 0 4px rgba(0,0,0,.15);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff}div.cartodb-popup.v2.header div.cartodb-popup-header{position:relative;width:auto;height:auto;max-height:62px;overflow:hidden;padding:17px 12px;background:0 0;background:-ms-linear-gradient(top,#4F9CD7,#2B68A8);background:-o-linear-gradient(right,#4F9CD7,#2B68A8);background:-webkit-linear-gradient(top,#4F9CD7,#2B68A8);background:-moz-linear-gradient(right,#4F9CD7,#2B68A8);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(startColorStr='#4F9CD7',endColorStr='#2B68A8',GradientType=0)";-webkit-border-top-left-radius:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-topleft:2px;-moz-border-radius-topright:2px;border-top-left-radius:2px;border-top-right-radius:2px}div.cartodb-popup.v2.header div.cartodb-popup-header:before{content:'';position:absolute;bottom:0;left:0;right:0;width:100%;height:1px;background:rgba(0,0,0,.1)}div.cartodb-popup.v2.header a.cartodb-popup-close-button{right:-12px;top:-12px;width:20px;height:20px;background:#fff;-webkit-border-radius:18px;-moz-border-radius:18px;border-radius:18px;box-shadow:0 0 0 3px rgba(0,0,0,.15)}div.cartodb-popup.v2.header a.cartodb-popup-close-button:after,div.cartodb-popup.v2.header a.cartodb-popup-close-button:before{content:'';position:absolute;top:9px;left:6px;width:8px;height:2px;background:#397DBA;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}div.cartodb-popup.v2.header a.cartodb-popup-close-button:before{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg)}div.cartodb-popup.v2.header a.cartodb-popup-close-button:after{-ms-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}div.cartodb-popup.v2.header a.cartodb-popup-close-button:hover{box-shadow:0 0 0 3px rgba(0,0,0,.25)}@media \0screen\,screen\9{div.cartodb-popup.header.v2{border-bottom:4px solid #CCC}div.cartodb-popup.v2.header div.cartodb-popup-header{background:#3B7FBD;-ms-filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#4F9CD7', endColorStr='#2B68A8', GradientType=0)}}div.cartodb-popup.header.green div.cartodb-popup-header{background:url(../img/headers.png) no-repeat -252px -40px}div.cartodb-popup.header.green div.cartodb-popup-header h4{color:#00916D}div.cartodb-popup.header.green div.cartodb-popup-header span.separator{background:#008E6A}div.cartodb-popup.header.green a.cartodb-popup-close-button{background:url(../img/headers.png) no-repeat -478px -40px}div.cartodb-popup.header.green a.cartodb-popup-close-button:hover{background-position:-478px -66px}div.cartodb-popup.v2.header.green div.cartodb-popup-header{background:0 0;background:-ms-linear-gradient(top,#0c9,#00B185);background:-o-linear-gradient(right,#0c9,#00B185);background:-webkit-linear-gradient(top,#0c9,#00B185);background:-moz-linear-gradient(right,#0c9,#00B185);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(startColorStr='#00CC99',endColorStr='#00B185',GradientType=0)"}div.cartodb-popup.v2.header.green a.cartodb-popup-close-button{background:#fff}div.cartodb-popup.v2.header.green a.cartodb-popup-close-button:after,div.cartodb-popup.v2.header.green a.cartodb-popup-close-button:before{background:#0C9}@media \0screen\,screen\9{div.cartodb-popup.v2.header.green a.cartodb-popup-close-button{color:#0C9}}div.cartodb-popup.header.orange div.cartodb-popup-header{background:url(../img/headers.png) no-repeat -756px -40px}div.cartodb-popup.header.orange div.cartodb-popup-header h4{color:#CC2929}div.cartodb-popup.header.orange div.cartodb-popup-header span.separator{background:#CC2929}div.cartodb-popup.header.orange a.cartodb-popup-close-button{background:url(../img/headers.png) no-repeat -982px -40px}div.cartodb-popup.header.orange a.cartodb-popup-close-button:hover{background-position:-982px -66px}div.cartodb-popup.v2.header.orange div.cartodb-popup-header{background:0 0;background:-ms-linear-gradient(top,#FF6825,#f33);background:-o-linear-gradient(right,#FF6825,#f33);background:-webkit-linear-gradient(top,#FF6825,#f33);background:-moz-linear-gradient(right,#FF6825,#f33);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(startColorStr='#FF6825',endColorStr='#FF3333',GradientType=0)"}div.cartodb-popup.v2.header.orange a.cartodb-popup-close-button{background:#fff}div.cartodb-popup.v2.header.orange a.cartodb-popup-close-button:after,div.cartodb-popup.v2.header.orange a.cartodb-popup-close-button:before{background:#CC2929}@media \0screen\,screen\9{div.cartodb-popup.v2.header.orange a.cartodb-popup-close-button{color:#CC2929}}div.cartodb-popup.header.with-image div.cartodb-popup-header{position:relative;background:url(../img/headers.png) no-repeat -1008px 0;height:138px;max-height:104px}div.cartodb-popup.header.with-image div.cartodb-popup-header .cover{display:block;position:absolute;overflow:hidden;width:218px;height:135px;top:4px;left:4px;border-radius:4px 4px 0 0}div.cartodb-popup.header.with-image div.cartodb-popup-header .cover .shadow{position:absolute;width:218px;height:55px;bottom:0;left:0;background:url(../img/shadow.png) no-repeat;z-index:100}div.cartodb-popup.header.with-image div.cartodb-popup-header .cover #spinner{position:absolute;top:67px;left:109px}div.cartodb-popup.header.with-image div.cartodb-popup-header .cover img{position:absolute;border-radius:4px 4px 0 0;display:none}div.cartodb-popup.header.with-image div.cartodb-popup-header .image_not_found{position:absolute;top:15px;left:15px;width:200px;display:none}div.cartodb-popup.header.with-image div.cartodb-popup-header .image_not_found a{display:-moz-inline-stack;display:inline-block;vertical-align:top;*vertical-align:auto;zoom:1;*display:inline;margin:3px 0 0 -2px;color:#888;font-size:13px;font-family:Helvetica,"Helvetica Neue",Arial,sans-serif;text-decoration:underline}div.cartodb-popup.header.with-image div.cartodb-popup-header .image_not_found a:hover{color:#888;text-decoration:underline}div.cartodb-popup.header.with-image div.cartodb-popup-header .cover .image_not_found i{display:-moz-inline-stack;display:inline-block;vertical-align:top;*vertical-align:auto;zoom:1;*display:inline;width:31px;height:22px;background:transparent url(../img/image_not_found.png)}div.cartodb-popup.header.with-image div.cartodb-popup-header h1{position:absolute;bottom:13px;left:18px;width:188px;z-index:150}div.cartodb-popup.header.with-image div.cartodb-popup-header h4{color:#CCC}div.cartodb-popup.header.with-image div.cartodb-popup-header span.separator{background:#CCC}div.cartodb-popup.header.with-image a.cartodb-popup-close-button{background:url(../img/headers.png) no-repeat -226px -40px}div.cartodb-popup.header.with-image a.cartodb-popup-close-button:hover{background-position:-226px -66px}div.cartodb-popup.header.with-image .cartodb-popup-header h1{display:none}div.cartodb-popup.header.with-image .cartodb-popup-header h1.order1{display:block}div.cartodb-popup.header.with-image .cartodb-popup-content-wrapper .order1{display:none}div.cartodb-popup.v2.header.with-image div.cartodb-popup-header{background:#2C2C2C;background:-ms-linear-gradient(top,#535353,#2C2C2C);background:-o-linear-gradient(right,#535353,#2C2C2C);background:-webkit-linear-gradient(top,#535353,#2C2C2C);background:-moz-linear-gradient(right,#535353,#2C2C2C);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(startColorStr='#535353',endColorStr='#2C2C2C',GradientType=0)"}div.cartodb-popup.v2.header.with-image div.cartodb-popup-header h1{width:85%}div.cartodb-popup.v2.header.with-image div.cartodb-popup-header span.separator{left:0;right:0;background:#CCC}div.cartodb-popup.v2.header.with-image a.cartodb-popup-close-button{background:#fff}div.cartodb-popup.v2.header.with-image div.cartodb-popup-header .cover{display:block;width:100%;height:138px;top:0;left:0;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;overflow:hidden}div.cartodb-popup.v2.header.with-image div.cartodb-popup-header .cover .shadow{width:100%;height:57px;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,transparent),color-stop(100%,rgba(0,0,0,.8)));background:-webkit-linear-gradient(top,transparent,rgba(0,0,0,.8));background:-moz-linear-gradient(top,transparent,rgba(0,0,0,.8));background:-o-linear-gradient(top,transparent,rgba(0,0,0,.8));background:linear-gradient(top,transparent,rgba(0,0,0,.8));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#000000', GradientType=0)}div.cartodb-popup.v2.header.with-image div.cartodb-popup-header .cover img{-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}div.cartodb-popup.header.yellow div.cartodb-popup-header{background:url(../img/headers.png) no-repeat -504px -40px}div.cartodb-popup.header.yellow div.cartodb-popup-header h4{color:#D8832A}div.cartodb-popup.header.yellow div.cartodb-popup-header span.separator{background:#CC7A29}div.cartodb-popup.header.yellow a.cartodb-popup-close-button{background:url(../img/headers.png) no-repeat -730px -40px}div.cartodb-popup.header.yellow a.cartodb-popup-close-button:hover{background-position:-730px -66px}div.cartodb-popup.v2.header.yellow div.cartodb-popup-header{background:0 0;background:-ms-linear-gradient(top,#FFBF0D,#f93);background:-o-linear-gradient(right,#FFBF0D,#f93);background:-webkit-linear-gradient(top,#FFBF0D,#f93);background:-moz-linear-gradient(right,#FFBF0D,#f93);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(startColorStr='#FFBF0D',endColorStr='#FF9933',GradientType=0)"}div.cartodb-popup.v2.header.yellow a.cartodb-popup-close-button{background:#fff}div.cartodb-popup.v2.header.yellow a.cartodb-popup-close-button:after,div.cartodb-popup.v2.header.yellow a.cartodb-popup-close-button:before{background:#CC7A29}@media \0screen\,screen\9{div.cartodb-popup.v2.header.yellow a.cartodb-popup-close-button{color:#CC7A29}}div.cartodb-popup h4{color:#CCC}div.cartodb-popup p{color:#333}div.cartodb-popup p.loading{color:#888}div.cartodb-popup p.error{color:#FF7F7F}div.cartodb-popup p.empty{color:#999}@-webkit-keyframes loading{to{opacity:1}}@-moz-keyframes loading{to{opacity:1}}@-ms-keyframes loading{to{opacity:1}}@keyframes loading{to{opacity:1}}@-webkit-keyframes pulse{to{opacity:1;-webkit-transform:scale(1)}}@-moz-keyframes pulse{to{opacity:1;-moz-transform:scale(1)}}@-ms-keyframes pulse{to{opacity:1;-ms-transform:scale(1)}}@keyframes pulse{to{opacity:1;transform:scale(1)}}div.cartodb-share{display:none;position:relative;float:right;margin:20px 20px 0 0;z-index:105}div.cartodb-share a{width:14px;height:14px;display:block;color:#397DB8;font-size:10px;font-weight:700;text-transform:uppercase;text-shadow:none;padding:7px;box-sizing:content-box;background:#fff url(../img/share.png) no-repeat 7px 8px;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999}div.cartodb-share a:hover{background:#fff url(../img/share.png) no-repeat -28px 8px}div.cartodb-share a:active,div.cartodb-share a:hover:active{background:#fff url(../img/share.png) no-repeat 7px 8px}.cartodb-fullscreen{display:none;position:relative;margin:11px 0 0 20px;float:left;clear:both;z-index:105}.cartodb-fullscreen a{display:block;width:14px;height:14px;padding:7px;box-sizing:content-box;background:#fff url(../img/fullscreen.png) no-repeat 7px 3px;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999}.cartodb-fullscreen a:active{background-position:7px 3px!important}.cartodb-fullscreen a:hover{background-position:-19px 5px}.cartodb-share-dialog{display:none}.cartodb-share-dialog .mamufas{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);cursor:default;z-index:1000001}.cartodb-share-dialog .modal{position:absolute;top:50%;left:50%;margin-left:-216px;margin-top:-107px;webkit-box-shadow:rgba(0,0,0,.15) 0 0 0 4px;-moz-box-shadow:rgba(0,0,0,.15) 0 0 0 4px;box-shadow:rgba(0,0,0,.15) 0 0 0 4px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;font-weight:700;font-family:"Segoe UI Bold","Helvetica Bold",Helvetica,Arial;color:#333;line-height:normal}.cartodb-share-dialog.small .modal{margin-left:-108px;margin-top:-165px}.cartodb-share-dialog.small .block .buttons{margin:0 0 10px}.cartodb-share-dialog.small .block .buttons ul{border:0;padding:0}.cartodb-share-dialog.small .block .content .embed_code{padding:0}.cartodb-share-dialog .modal a.close{position:absolute;top:-15px;right:-15px;width:30px;height:15px;padding:7px 0 8px;background:#fff;font:400 13px Helvetica,Arial;text-decoration:none;webkit-box-shadow:rgba(0,0,0,.15) 0 0 0 4px;-moz-box-shadow:rgba(0,0,0,.15) 0 0 0 4px;box-shadow:rgba(0,0,0,.15) 0 0 0 4px;-webkit-border-radius:50px;-moz-border-radius:50px;-ms-border-radius:50px;-o-border-radius:50px;border-radius:50px;line-height:14px;text-align:center;z-index:105}.cartodb-share-dialog .block{background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;webkit-box-shadow:rgba(0,0,0,.15) 0 0 4px 3px;-moz-box-shadow:rgba(0,0,0,.15) 0 0 4px 3px;box-shadow:rgba(0,0,0,.15) 0 0 4px 3px}.cartodb-share-dialog .block .buttons ul{margin:0;padding:0 24px 0 0;border-right:1px solid #E5E5E5}.cartodb-share-dialog .block .buttons li{list-style:none;margin:0 0 4px;padding:0}.cartodb-share-dialog .block .buttons li a{display:block;padding:10px 13px 11px 30px;width:121px;font-size:13px;font-weight:700;color:#fff;background:#3D8FCA;text-decoration:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}@media only screen and (min-device-width:320px) and (max-device-width:480px){div.cartodb-header h1{width:78%}div.cartodb-header>p{width:80%}}@media only screen and (min-device-width:768px) and (max-device-width:1024px){div.cartodb-header h1{width:78%}div.cartodb-header>p{width:80%}}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){div.cartodb-header h1{width:78%}div.cartodb-header>p{width:80%}div.cartodb-zoom a{background:url(../img/other@2x.png) no-repeat 0 0!important;background-size:113px 34px!important}div.cartodb-zoom a.zoom_in{background-position:-68px 9px!important}div.cartodb-zoom a.zoom_out{background-position:-94px 10px!important}div.cartodb-header div.social a.facebook{background:url(../img/other@2x.png) no-repeat 0 0!important;background-size:113px 34px!important}div.cartodb-header div.social a.twitter{background:url(../img/other@2x.png) no-repeat -26px 0!important;background-size:113px 34px!important}div.cartodb-searchbox span.loader{background:url(../img/loader@2x.gif) no-repeat center center #fff!important;background-size:16px 16px!important}div.cartodb-mobile .aside div.cartodb-searchbox span.loader{background:url(../img/dark_loader@2x.gif) no-repeat center center #292929!important;background-size:16px 16px!important}div.cartodb-tiles-loader div.loader{background:url(../img/loader@2x.gif) no-repeat center center #fff!important;background-size:16px 16px!important}div.cartodb-searchbox input.submit{background:url(../img/other@2x.png) no-repeat -56px 0!important;background-size:113px 34px!important}.cartodb-mobile .aside .cartodb-searchbox input.submit{background:url(../img/mobile_zoom.png) no-repeat 0 0!important}.cartodb-mobile div.cartodb-slides-controller div.slides-controller-content a.prev{background:url(../img/slide_left@2x.png) no-repeat;background-size:16px 15px}.cartodb-mobile div.cartodb-slides-controller div.slides-controller-content a.next{background:url(../img/slide_right@2x.png) no-repeat;background-size:16px 15px}}.cartodb-share-dialog .block .buttons li a.twitter{background:#3D8FCA url(../img/twitter.png) no-repeat 10px 50%}.cartodb-share-dialog .block .buttons li a.twitter:hover{background-color:#3272A0}.cartodb-share-dialog .block .buttons li a.facebook{background:#3B5998 url(../img/facebook.png) no-repeat 10px 50%}.cartodb-share-dialog .block .buttons li a.facebook:hover{background-color:#283C65}.cartodb-share-dialog .block .buttons li a.link{background:#f37f7b url(../img/link.png) no-repeat 10px 50%}.cartodb-share-dialog .block .buttons li a.link:hover{background-color:#DC6161}.cartodb-share-dialog .block a,.cartodb-share-dialog .block h3,.cartodb-share-dialog .block label,.cartodb-share-dialog .block p{letter-spacing:0}.cartodb-share-dialog .block div.head{position:relative;padding:5px 26px;border-bottom:1px solid #E5E5E5}.cartodb-share-dialog .block h3{margin:1em 0;font-size:15px;font-weight:700}.cartodb-share-dialog .block h4{font-size:13px;font-weight:700;color:#666;padding:0;margin:0;margin:0 0 9px}.cartodb-share-dialog .block .content .buttons,.cartodb-share-dialog .block .content .embed_code{display:inline-block;zoom:1;*display:inline;vertical-align:top}.cartodb-share-dialog .block .content .embed_code{padding-left:24px}.cartodb-share-dialog .block .content .embed_code textarea{resize:none;padding:5px;width:153px;height:104px;border:1px solid #C3C3C3;background:#F5F5F5;font-size:11px;color:#666;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.cartodb-share-dialog .block .content{padding:20px 26px 30px}.cartodb-mobile{width:100%;height:100%;z-index:100000000}.cartodb-mobile .cartodb-header{background:0 0;z-index:100000}.cartodb-mobile .cartodb-header .content{padding:0}.cartodb-mobile .cartodb-header .hgroup{position:relative;height:40px;padding:10px}.cartodb-mobile.with-fullscreen .cartodb-header .hgroup{position:relative;margin-left:60px;margin-right:70px}.cartodb-mobile.with-header .cartodb-header .content .hgroup .description,.cartodb-mobile.with-header .cartodb-header .content .hgroup .title{display:block}.cartodb-mobile .cartodb-header .content .description,.cartodb-mobile .cartodb-header .content .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cartodb-mobile .cartodb-header .content .button{height:58px;width:58px;background-color:rgba(0,0,0,.5);line-height:normal;z-index:99999}.cartodb-mobile.with-header .cartodb-header,.cartodb-mobile.with-slides .cartodb-header{background-color:rgba(0,0,0,.5)}.cartodb-mobile.with-fullscreen .cartodb-header .content .fullscreen{display:block}.cartodb-mobile.with-header .cartodb-header .content .fullscreen{background:0 0}.cartodb-mobile .cartodb-header .content .fullscreen{display:none;position:relative;top:0;left:0;float:left;width:60px;height:60px;margin:auto;padding:0;background:rgba(0,0,0,.5);cursor:pointer;z-index:10;-webkit-border-radius:0 0 5px;-moz-border-radius:0 0 5px;-ms-border-radius:0 0 5px;-o-border-radius:0 0 5px;border-radius:0 0 5px;-webkit-transform-style:"ease-in";-moz-transform-style:"ease-in";-ms-transform-style:"ease-in";-o-transform-style:"ease-in";transform-style:"ease-in";-webkit-transition-property:background;-moz-transition-property:background;-o-transition-property:background;transition-property:background;-webkit-transition-duration:150ms;-moz-transition-duration:150ms;-o-transition-duration:150ms;transition-duration:150ms}.cartodb-mobile.with-header .cartodb-header .content .fullscreen{border-right:1px solid rgba(255,255,255,.35);-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}.cartodb-mobile .cartodb-header .content .fullscreen:hover,.cartodb-mobile.with-header .cartodb-header .content .fullscreen:hover{background:rgba(0,0,0,.3)}.cartodb-mobile .cartodb-header .content .fullscreen:before{content:'';width:60px;height:60px;background:url(../img/fullscreen_mobile.png) no-repeat 50% 50%;background-size:28px 28px;position:absolute}.cartodb-mobile.with-layers .cartodb-header .content .toggle,.cartodb-mobile.with-search .cartodb-header .content .toggle{display:block}.cartodb-mobile .cartodb-header .content .toggle{display:none;position:relative;top:0;right:0;float:right;width:70px;height:60px;margin:auto;padding:0;background:rgba(0,0,0,.5);cursor:pointer;z-index:10;-webkit-border-radius:0 0 0 5px;-moz-border-radius:0 0 0 5px;-ms-border-radius:0 0 0 5px;-o-border-radius:0 0 0 5px;border-radius:0 0 0 5px;-webkit-transform-style:"ease-in";-moz-transform-style:"ease-in";-ms-transform-style:"ease-in";-o-transform-style:"ease-in";transform-style:"ease-in";-webkit-transition-property:background;-moz-transition-property:background;-o-transition-property:background;transition-property:background;-webkit-transition-duration:150ms;-moz-transition-duration:150ms;-o-transition-duration:150ms;transition-duration:150ms}.cartodb-mobile .cartodb-header .content .toggle:hover,.cartodb-mobile.with-header .cartodb-header .content .toggle:hover{background:rgba(0,0,0,.3)}.cartodb-mobile.with-header .cartodb-header .content .toggle{background:0 0;border-left:1px solid rgba(255,255,255,.35);-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}.cartodb-mobile .cartodb-header .content .toggle:before{content:'';width:70px;height:60px;background:url(../img/toggle_aside.png) no-repeat 50% 50%;background-size:30px 30px;position:absolute}.cartodb-mobile.with-zoom .cartodb-zoom{float:left;position:relative;z-index:100000}.cartodb-mobile .aside{position:absolute;width:250px;height:100%;top:0;right:-250px;background:#2D2D2D;cursor:default;z-index:1000010}.cartodb-mobile .aside .cartodb-searchbox{position:relative;display:none;float:none;margin:0;width:100%;height:auto;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:0 0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border:0;border-bottom:1px solid #505050;z-index:105}.cartodb-mobile .aside .cartodb-searchbox input.text{border:0;position:initial;top:initial;left:initial;height:39px;padding:10px 18px;width:185px;font-size:13px;color:#fff}.cartodb-mobile .aside .cartodb-searchbox input.text::-webkit-input-placeholder{font-style:italic}.cartodb-mobile .aside .cartodb-searchbox input.text:-moz-placeholder{font-style:italic}.cartodb-mobile .aside .cartodb-searchbox input.text::-moz-placeholder{font-style:italic}.cartodb-mobile .aside .cartodb-searchbox input.text:-ms-input-placeholder{font-style:italic}.cartodb-mobile .aside .cartodb-searchbox span.loader{left:initial;top:18px;right:14px;background:url(../img/dark_loader.gif) no-repeat center center}.cartodb-mobile .aside .cartodb-searchbox input.submit{right:18px;top:23px;width:14px;height:14px;left:initial;outline:0;cursor:pointer;background:url(../img/mobile_zoom.png) no-repeat 0 0}.cartodb-mobile .aside .layer-container{position:relative;height:100%}.cartodb-mobile .aside .scrollpane{width:100%;height:100%;overflow:hidden;outline:0}.cartodb-mobile .aside .scrollpane .jspContainer{overflow:hidden;position:relative}.cartodb-mobile .aside .scrollpane .jspPane{position:absolute}.cartodb-mobile .aside .scrollpane .jspVerticalBar{position:absolute;top:0;right:7px;width:5px;height:100%;background:0 0;z-index:20}.cartodb-mobile .aside .scrollpane .jspVerticalBar *{margin:0;padding:0}.cartodb-mobile .aside .scrollpane .jspCap{display:none}.cartodb-mobile .aside .scrollpane .jspTrack{background:0 0;position:relative}.cartodb-mobile .aside .scrollpane .jspDrag{background:rgba(187,187,187,.5);border-radius:5px;position:relative;top:0;left:0;cursor:pointer}.cartodb-mobile .aside .scrollpane .jspArrow{background:0 0;text-indent:-20000px;display:block;cursor:pointer}.cartodb-mobile .aside .scrollpane .jspVerticalBar .jspArrow{height:10px}.cartodb-mobile .aside .scrollpane .jspVerticalBar .jspArrow:focus{outline:0}.cartodb-mobile .aside .scrollpane .jspCorner{background:#eeeef4;float:left;height:100%}.cartodb-mobile .aside .layer-container>h3{padding:23px 20px;color:#999;font:700 12px Helvetica,Arial,sans-serif;text-transform:uppercase;background:#292929;border-bottom:1px solid #585858}.cartodb-mobile .aside .layer-container .layers{margin:0;padding:0 10px}.cartodb-mobile .aside .layer-container .layers>li{padding:5px 10px;color:#fff;list-style:none;border-bottom:1px solid #585858}.cartodb-mobile .aside .layer-container .layers>li:last-child,.cartodb-mobile .aside .layer-container .layers>li:last-child h3{border:0}.cartodb-mobile .aside .layer-container .layers>li a.toggle{width:21px;height:10px;background:#191919;position:relative;top:2px;float:right;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.cartodb-mobile .aside .layer-container .layers>li a.toggle.hide{display:none}.cartodb-mobile .aside .layer-container .layers>li.hidden a.toggle:before{left:0}.cartodb-mobile .aside .layer-container .layers>li a.toggle:before{position:absolute;content:'';top:1px;right:0;width:7px;height:7px;-webkit-border-radius:100px;-moz-border-radius:100px;-ms-border-radius:100px;-o-border-radius:100px;border-radius:100px;background:#fff}.cartodb-mobile .aside .layer-container .layers>li h3{font:700 12px Helvetica,Arial,sans-serif;text-transform:uppercase;padding:12px 0 13px}.cartodb-mobile .aside .layer-container .layers>li.has-toggle h3{cursor:pointer}.cartodb-mobile .aside .layer-container .layers>li.has-legend.hidden h3,.cartodb-mobile .aside .layer-container .layers>li.hidden h3{color:#666;border:0;padding:12px 0 13px}.cartodb-mobile .aside .layer-container .layers>li.hidden.has-legend div.cartodb-legend{display:none!important}.cartodb-mobile .aside .layer-container .layers>li.hidden.has-legend h3{margin-bottom:0}.cartodb-mobile .aside .layer-container .layers>li.has-legend h3{border-bottom:1px solid #585858}.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend{position:relative;border:0;webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:0 0;margin:10px 0 18px;padding:2px 0 0;bottom:auto;right:auto;cursor:text}.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend.bubble ul li.graph{border:0}.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend.bubble ul li.graph .bubbles{background:url(../img/dark_bubbles.png) no-repeat 0 0}.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend .graph{border:1px solid #1A1108}.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend ul li{height:auto;padding:0;font-size:12px;color:#fff;font-weight:400;font-family:Helvetica,Arial,sans-serif;text-transform:none;line-height:normal}.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend.intensity ul li.graph{height:22px}.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend ul li .bullet{margin-top:2px}.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend ul li.max,.cartodb-mobile .aside .layer-container .layers>li div.cartodb-legend ul li.min{font-size:10px}.cartodb-mobile div.cartodb-timeslider .slider-wrapper{position:absolute;top:17px}.cartodb-mobile div.cartodb-timeslider .slider{width:100%}.cartodb-mobile div.cartodb-timeslider{height:40px;margin-bottom:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border:1px solid #E5E5E5;border-left:0;border-right:0;border-top:1px solid rgba(0,0,0,.2);z-index:1000001}.cartodb-mobile div.cartodb-timeslider .slider-wrapper{display:block;width:100%;height:4px;padding:0}.cartodb-mobile div.cartodb-timeslider{width:100%!important}.cartodb-mobile div.cartodb-timeslider ul{width:100%;position:relative;clear:both;overflow:hidden}.cartodb-mobile div.cartodb-timeslider ul li{display:block;background:#fff;float:left}.cartodb-mobile div.cartodb-timeslider ul li.controls{width:50px}.cartodb-mobile div.cartodb-timeslider ul li.time{width:120px}.cartodb-mobile div.cartodb-timeslider ul li.last{position:absolute;left:180px;right:10px}.cartodb-mobile div.cartodb-timeslider ul li.controls a.button{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}.cartodb-mobile .cartodb-attribution{display:none;list-style:none;background:#fff;position:absolute;padding:9px 12px;margin:0;right:20px;bottom:20px;color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;z-index:10000001;font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif}.cartodb-mobile .cartodb-attribution a{color:#0078A8}.cartodb-mobile .cartodb-attribution li{padding:0;margin:3px;display:inline-block;zoom:1;*display:inline;vertical-align:top;color:#999}.cartodb-mobile .cartodb-attribution li a{text-transform:capitalize;color:#0078A8}.cartodb-mobile .backdrop{display:none;position:absolute;top:0;left:0;right:0;bottom:0;background:#000;filter:alpha(opacity=20);filter:alpha(Opacity=20);opacity:.2;z-index:10000000}.cartodb-mobile.with-torque .cartodb-attribution-button{bottom:59px}.cartodb-mobile .cartodb-attribution-button{display:none;width:20px;height:20px;position:absolute;right:20px;bottom:20px;color:#999;text-align:center;text-decoration:none;-webkit-border-radius:100px;-moz-border-radius:100px;-ms-border-radius:100px;-o-border-radius:100px;border-radius:100px;background:#fff url(../img/bg-attribution-button.png) no-repeat 49% 50%;font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif;z-index:10}.cartodb-mobile .cartodb-attribution-button:before{position:absolute;content:'';top:-3px;left:-3px;width:20px;height:20px;border:3px solid rgba(0,0,0,.3);-webkit-border-radius:100px;-moz-border-radius:100px;-ms-border-radius:100px;-o-border-radius:100px;border-radius:100px;-webkit-transform-style:"ease-in";-moz-transform-style:"ease-in";-ms-transform-style:"ease-in";-o-transform-style:"ease-in";transform-style:"ease-in";-webkit-transition-property:border;-moz-transition-property:border;-o-transition-property:border;transition-property:border;-webkit-transition-duration:150ms;-moz-transition-duration:150ms;-o-transition-duration:150ms;transition-duration:150ms}.cartodb-mobile .cartodb-attribution-button:hover:before{border:3px solid rgba(0,0,0,.7)}.cartodb-mobile .cartodb-slides-controller{position:absolute;bottom:0;top:auto;padding:0;line-height:0;z-index:9}.cartodb-mobile .cartodb-slides-controller .slides-controller-content{padding:20px 0}.cartodb-mobile .cartodb-slides-controller .slides-controller-content .prev{margin:0 20px 0 0}.cartodb-mobile .cartodb-slides-controller .slides-controller-content .next{margin:0 0 0 20px}.cartodb-mobile .cartodb-slides-controller .slides-controller-content .next:before,.cartodb-mobile .cartodb-slides-controller .slides-controller-content .prev:after,.cartodb-mobile .cartodb-slides-controller .slides-controller-content ul{display:none}div.cartodb-legend-stack{position:absolute;bottom:35px;right:20px;display:none;webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;background:#fff;z-index:105;cursor:text}div.cartodb-legend-stack div.cartodb-legend{position:relative;top:auto;right:auto;left:auto;bottom:auto;background:0 0;border:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border-bottom:1px solid #999;webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:text}div.cartodb-legend-stack div.cartodb-legend:last-child{border-bottom:0}div.cartodb-legend{position:absolute;bottom:35px;right:20px;padding:13px 15px 14px;font:400 13px Helvetica,Arial;color:#858585;text-align:left;webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;background:#fff;z-index:105}div.cartodb-legend .legend-title{margin:0 0 10px;text-align:left;color:#666;font-weight:700;font-size:11px;text-transform:uppercase}div.cartodb-legend ul{padding:0;margin:0;list-style:none}div.cartodb-legend ul li{padding:0;margin:0;font-size:10px;color:#666;font-weight:700;font-family:Helvetica,Arial;text-transform:uppercase;line-height:normal}div.cartodb-legend-stack div.cartodb-legend.none,div.cartodb-legend.none{display:none}div.map div.cartodb-legend-stack div.cartodb-legend.wrapper .cartodb-legend{padding:0;display:block}div.cartodb-legend.wrapper .cartodb-legend{display:block;padding:0}div.cartodb-legend.category ul li,div.cartodb-legend.color ul li,div.cartodb-legend.custom ul li{position:relative;margin:0 0 7px;font-size:10px;color:#666;font-weight:700;font-family:Helvetica,Arial;text-transform:uppercase;text-align:left;height:10px;line-height:10px;vertical-align:middle}div.cartodb-legend.category ul li.bkg,div.cartodb-legend.color ul li.bkg,div.cartodb-legend.custom ul li.bkg{height:20px;line-height:24px;margin:0 0 15px}div.cartodb-legend.category ul li.bkg .bullet,div.cartodb-legend.color ul li.bkg .bullet,div.cartodb-legend.custom ul li.bkg .bullet{height:20px;width:20px;border:1px solid rgba(0,0,0,.3);border:0;background-size:26px 26px!important;background-position:center center!important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}div.cartodb-legend.category ul li.bkg:last-child,div.cartodb-legend.color ul li.bkg:last-child,div.cartodb-legend.custom ul li.bkg:last-child{margin:0 0 5px}div.cartodb-legend.category ul li:last-child,div.cartodb-legend.color ul li:last-child,div.cartodb-legend.custom ul li:last-child{margin:0}div.cartodb-legend.category ul li .bullet,div.cartodb-legend.color ul li .bullet,div.cartodb-legend.custom ul li .bullet{float:left;margin:0 5px 0 0;width:3px;height:3px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;padding:2px;background:#fff;border:1px solid rgba(0,0,0,.2);z-index:1000}div.cartodb-legend.bubble{text-align:center}div.cartodb-legend.bubble ul{clear:both;overflow:hidden;display:-moz-inline-stack;display:inline-block}div.cartodb-legend.bubble ul li{position:relative;float:left;top:15px}div.cartodb-legend.bubble ul li.graph{top:0;width:120px;height:40px;margin:0 10px;background:#f1f1f1}div.cartodb-legend.bubble ul li.graph .bubbles{background:url(../img/bubbles.png) no-repeat 0 0;width:120px;height:40px}div.cartodb-legend.choropleth{padding:13px 15px 15px}div.cartodb-legend.choropleth ul{min-width:210px}div.cartodb-legend.choropleth li.min{float:left;margin:0 0 5px}div.cartodb-legend.choropleth li.max{float:right;margin:0 0 5px}div.cartodb-legend.choropleth li.graph div{width:10px;height:22px}div.cartodb-legend.choropleth li.graph .quartile{display:table-cell}div.cartodb-legend.choropleth li.graph.count_7 .quartile{width:30px}div.cartodb-legend.choropleth li.graph.count_5 .quartile{width:42px}div.cartodb-legend.choropleth li.graph.count_3 .quartile{width:70px}div.cartodb-legend.choropleth li.graph .colors{display:table-row}div.cartodb-legend.choropleth li.graph{clear:both;overflow:hidden;display:table;width:100%;height:22px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding;border:1px solid #b3b3b3}div.cartodb-legend.density{padding:13px 15px 15px}div.cartodb-legend.density ul{min-width:210px}div.cartodb-legend.density li.min{float:left;margin:0 0 5px}div.cartodb-legend.density li.max{float:right;margin:0 0 5px}div.cartodb-legend.density li.graph div{width:10px;height:22px}div.cartodb-legend.density li.graph .quartile{display:table-cell}div.cartodb-legend.density li.graph.count_7 .quartile{width:30px}div.cartodb-legend.density li.graph.count_5 .quartile{width:42px}div.cartodb-legend.density li.graph.count_3 .quartile{width:70px}div.cartodb-legend.density li.graph .colors{display:table-row}div.cartodb-legend.density li.graph{clear:both;overflow:hidden;display:table;width:100%;height:22px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding;border:1px solid #b3b3b3}div.cartodb-legend.intensity{padding:13px 15px 15px}div.cartodb-legend.intensity ul{min-width:210px}div.cartodb-legend.intensity li.min{float:left;margin:0 0 5px}div.cartodb-legend.intensity li.max{float:right;margin:0 0 5px}div.cartodb-legend.intensity li.graph{clear:both;width:100%;height:22px;background:#f1f1f1;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);-o-box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);-moz-box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);-ms-box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);box-shadow:inset 0 0 0 1px rgba(0,0,0,.2)}div.cartodb-zoom{position:relative;float:left;display:block;margin:20px 0 0 20px;width:28px;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;z-index:105}div.cartodb-zoom a{position:relative;display:block;width:28px;height:28px;padding:0;font:700 20px Arial;color:#999;text-align:center;text-decoration:none;text-indent:-9999px;line-height:0;font-size:0;background:url(../img/other.png) no-repeat 0 0}div.cartodb-zoom a.zoom_in{border-bottom:1px solid #E6E6E6;background-position:-68px 10px;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px}div.cartodb-zoom a.zoom_in:hover{background-position:-68px -14px;cursor:pointer}div.cartodb-zoom a.zoom_out{background-position:-94px 10px;-webkit-border-bottom-left-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-bottomright:4px;border-bottom-left-radius:4px;border-bottom-right-radius:4px}div.cartodb-zoom a.zoom_out:hover{background-position:-94px -14px;cursor:pointer}div.cartodb-zoom a.disabled{filter:alpha(opacity=20);filter:alpha(Opacity=20);opacity:.2}div.cartodb-zoom a.disabled:hover{cursor:default;color:#999}div.cartodb-zoom-info{position:absolute;display:block;top:100px;left:20px;margin:20px 0 0;width:28px;height:28px;font:400 13px Helvetica,Arial;color:#858585;text-align:center;line-height:28px;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;background:#fff;z-index:105}div.cartodb-tiles-loader{float:left;display:block;clear:both}div.cartodb-tiles-loader div.loader{position:relative;display:block;margin:15px 0 0 20px;width:28px;height:28px;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;background:url(../img/loader.gif) no-repeat center center #fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;z-index:105}div.cartodb-layer-selector-box{display:none;position:relative;float:right;margin:20px 20px 0 0;width:142px;height:29px;color:#CCC;font-size:13px;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;z-index:100000}div.cartodb-layer-selector-box a.layers{float:left;width:126px;padding:6px 8px;line-height:20px;color:#CCC;text-decoration:none;font-family:robotoregular,Helvetica,Arial,Sans-serif}div.cartodb-layer-selector-box a.layers:hover{color:#bbb}div.cartodb-layer-selector-box a.layers:hover .count{background:#ccc}div.cartodb-layer-selector-box a.layers .count{position:absolute;right:6px;top:6px;width:auto;padding:3px 6px;margin:0;font-size:10px;color:#fff;line-height:12px;background:#DDD;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}div.cartodb-layer-selector-box div.cartodb-dropdown{padding:0;margin:0}div.cartodb-layer-selector-box div.cartodb-dropdown ul{padding:0;margin:0;list-style:none;border:1px solid 999999}div.cartodb-layer-selector-box div.cartodb-dropdown ul li{border-bottom:1px solid #EDEDED;position:relative}div.cartodb-layer-selector-box div.cartodb-dropdown ul li:last-child{border-bottom:0}div.cartodb-layer-selector-box div.cartodb-dropdown ul li:hover{background:#fff}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.layer{display:-moz-inline-stack;display:inline-block;vertical-align:middle;width:104px;padding:13px 13px 15px;zoom:1;color:#666;font:400 13px "Helvetica Neue",Helvetica,Arial;text-decoration:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}div.cartodb-layer-selector-box div.cartodb-dropdown ul li:hover a.layer{text-decoration:underline;color:#545454}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch{position:absolute;top:13px;right:10px;text-indent:-9999px;vertical-align:middle;width:23px;height:12px;padding:0;-webkit-border-radius:12px;-moz-border-radius:12px;-ms-border-radius:12px;-o-border-radius:12px;border-radius:12px;-webkit-transform-style:"linear";-moz-transform-style:"linear";-ms-transform-style:"linear";-o-transform-style:"linear";transform-style:"linear";-webkit-transition-property:left;-moz-transition-property:left;-o-transition-property:left;transition-property:left;-webkit-transition-duration:180ms;-moz-transition-duration:180ms;-o-transition-duration:180ms;transition-duration:180ms;text-decoration:none;border:1px solid #44759E}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch:before{position:absolute;content:' ';top:0;left:0;width:100%;height:100%;-webkit-border-radius:12px;-moz-border-radius:12px;-ms-border-radius:12px;-o-border-radius:12px;border-radius:12px;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,rgba(0,0,0,.18)),color-stop(100%,transparent));background:-webkit-linear-gradient(rgba(0,0,0,.18),transparent);background:-moz-linear-gradient(rgba(0,0,0,.18),transparent);background:-o-linear-gradient(rgba(0,0,0,.18),transparent);background:linear-gradient(rgba(0,0,0,.18),transparent);z-index:0}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch span.handle{position:absolute;top:0;width:10px;height:10px;-webkit-border-radius:12px;-moz-border-radius:12px;-ms-border-radius:12px;-o-border-radius:12px;border-radius:12px;border:1px solid #44759e;background:#F2F2F2;z-index:2;-webkit-transform-style:"linear";-moz-transform-style:"linear";-ms-transform-style:"linear";-o-transform-style:"linear";transform-style:"linear";-webkit-transition-property:left;-moz-transition-property:left;-o-transition-property:left;transition-property:left;-webkit-transition-duration:180ms;-moz-transition-duration:180ms;-o-transition-duration:180ms;transition-duration:180ms}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch.enabled{border-color:#44759E;background:#56AFEF}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch.enabled span.handle{left:12px;border-color:#44759E}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch.disabled{opacity:1;-ms-filter:"alpha(Opacity=100)";filter:alpha(Opacity=1);filter:alpha(opacity=100);border-color:#CCC;background:#D8D8D8}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch span.handle{left:0;border-color:#999}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch:hover{cursor:pointer!important}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch.working{opacity:.5;-ms-filter:"alpha(Opacity=50)";filter:alpha(Opacity=.5);filter:alpha(opacity=50)}div.cartodb-layer-selector-box div.cartodb-dropdown ul li a.switch.working:hover{cursor:default!important}div.cartodb-searchbox{position:relative;display:none;float:right;margin:20px 20px 0 0;width:142px;height:29px;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;z-index:105}div.cartodb-searchbox span.loader{position:absolute;display:none;top:3px;left:3px;width:22px;height:22px;background:url(../img/loader.gif) no-repeat center center #fff;z-index:105}div.cartodb-searchbox input.text{position:absolute;top:6px;left:30px;width:103px;padding:0;margin:0;line-height:17px;border:0;background:0 0;border-bottom:1px dotted #CCC;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;font:400 14px Arial;color:#999;text-align:left;z-index:2}div.cartodb-searchbox input.text:focus{outline:0;border-color:#999;color:#666}div.cartodb-searchbox input.submit{position:absolute;left:8px;top:8px;width:12px;height:12px;text-indent:-9999px;font-size:0;line-height:0;text-transform:uppercase;border:0;background:url(../img/other.png) no-repeat -56px 0;z-index:1}div.cartodb-searchbox input.submit:hover{cursor:pointer}div.cartodb-infobox{padding:20px;position:absolute;display:inline-block;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;text-align:left;z-index:105}div.cartodb-dropdown{position:absolute;display:none;background:#fff;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;border:0;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 1px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 1px;-ms-box-shadow:rgba(0,0,0,.2) 0 0 4px 1px;-o-box-shadow:rgba(0,0,0,.2) 0 0 4px 1px;box-shadow:rgba(0,0,0,.2) 0 0 4px 1px;z-index:150}div.cartodb-dropdown.border{border:1px solid #999}div.cartodb-dropdown div.tail{position:absolute;top:-6px;right:10px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #999;z-index:0}div.cartodb-dropdown div.tail span.border{position:absolute;top:1px;left:-6px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;z-index:2}div#cartodb-gmaps-attribution{position:absolute;display:block;bottom:13px;right:0;height:10px;line-height:10px;padding:0 6px 4px;background:#fff;background:rgba(245,245,245,.7);font-family:Roboto,Arial,sans-serif!important;font-size:11px;font-weight:400;color:#444!important;white-space:nowrap;direction:ltr;text-align:right;background-position:initial initial;background-repeat:initial initial;border:0;z-index:10000}div#cartodb-gmaps-attribution a{color:#444;text-decoration:none}div.cartodb-timeslider{position:absolute;display:inline-block;height:40px;width:auto!important;margin-bottom:30px;padding:0;-webkit-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;-moz-box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;box-shadow:rgba(0,0,0,.2) 0 0 4px 2px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #999;text-align:left;z-index:105}div.cartodb-timeslider ul{display:block;height:40px;margin:0;padding:0;line-height:40px;list-style:none;cursor:default}div.cartodb-timeslider ul li{display:inline-block;zoom:1;*display:inline;vertical-align:top;height:40px;_height:40px;width:auto;line-height:40px;border-right:1px solid #E5E5E5}div.cartodb-timeslider ul li.last{border-right:0}div.cartodb-timeslider a.button{display:block;width:48px;height:40px;text-indent:-9999px;line-height:0;font-size:0;background:url(../img/slider.png) no-repeat -2px -55px}div.cartodb-timeslider a.button:hover{background-position:-42px -55px}div.cartodb-timeslider a.button.stop{background-position:-2px -4px}div.cartodb-timeslider a.button.stop:hover{background-position:-42px -4px}div.cartodb-timeslider p{width:120px;height:40px;margin:0;padding:0 5px 0 0;line-height:40px;font-size:13px;font-weight:700;font-family:Helvetica,Arial;text-align:center;color:#999}.cartodb-header{display:none;position:relative;width:100%;background-color:rgba(0,0,0,.5);font-family:'Helvetica Neue',Helvetica,sans-serif;line-height:normal;z-index:99999}.cartodb-header .content{padding:10px}.cartodb-header .content a{color:#fff}.cartodb-header .content a:hover{color:#ccc}.cartodb-header .content .title{display:none;margin:0 0 5px;line-height:normal;font-family:'Helvetica Neue',Helvetica,sans-serif;font-weight:700;font-size:15px;color:#fff}.cartodb-header .content .description{display:none;font-family:'Helvetica Neue',Helvetica,sans-serif;line-height:normal;color:#fff;font-size:13px}.cartodb-overlay.overlay-annotation,.cartodb-overlay.overlay-text{position:absolute;display:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;font-size:20px;line-height:normal;color:#fff;-ms-word-break:break-word;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;z-index:11}.cartodb-overlay.overlay-annotation .content,.cartodb-overlay.overlay-text .content{padding:10px}.cartodb-overlay.overlay-text .text{font-size:20px;line-height:normal;color:#fff;-ms-word-break:break-word;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.cartodb-overlay.overlay-annotation .text strong,.cartodb-overlay.overlay-text .text strong{font-weight:700}.cartodb-overlay.overlay-annotation .text em,.cartodb-overlay.overlay-text .text em{font-style:italic}.cartodb-overlay.overlay-annotation div.text a,.cartodb-overlay.overlay-text div.text a{color:inherit}.cartodb-overlay.overlay-annotation .text a:hover,.cartodb-overlay.overlay-text .text a:hover{color:inherit;filter:alpha(Opacity=80);opacity:.8}.cartodb-overlay.overlay-annotation{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.cartodb-overlay.overlay-annotation .content{padding:5px}.cartodb-overlay.overlay-annotation.align-right .stick .ball{left:auto;right:-6px}.cartodb-overlay.overlay-annotation .stick{position:absolute;top:50%;left:-50px;margin-top:-1px;width:50px;height:2px;background:#333}.cartodb-overlay.overlay-annotation .stick .ball{position:absolute;left:-6px;top:50%;margin-top:-3px;width:6px;height:6px;background:#333;-webkit-border-radius:200px;-moz-border-radius:200px;-ms-border-radius:200px;-o-border-radius:200px;border-radius:200px}.cartodb-overlay.image-overlay{display:none;position:absolute;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;z-index:11}.cartodb-overlay.image-overlay .content{padding:10px}.cartodb-overlay.image-overlay img{display:block}@font-face{font-family:'Droid Sans';font-style:normal;font-weight:400;src:local("Droid Sans"),local("DroidSans"),url(//themes.googleusercontent.com/static/fonts/droidsans/v4/s-BiyweUPV0v-yRb-cjciL3hpw3pgy2gAi-Ip7WPMi0.woff) format("woff")}@font-face{font-family:'Droid Sans';font-style:bold;font-weight:700;src:local("Droid Sans Bold"),local("DroidSans-Bold"),url(//themes.googleusercontent.com/static/fonts/droidsans/v4/EFpQQyG9GqCrobXxL-KRMXbFhgvWbfSbdVg11QabG8w.woff) format("woff")}@font-face{font-family:Vollkorn;font-style:normal;font-weight:400;src:local("Vollkorn Regular"),local("Vollkorn-Regular"),url(//themes.googleusercontent.com/static/fonts/vollkorn/v4/BCFBp4rt5gxxFrX6F12DKnYhjbSpvc47ee6xR_80Hnw.woff) format("woff")}@font-face{font-family:Vollkorn;font-style:normal;font-weight:400;src:local("Vollkorn Regular"),local("Vollkorn-Regular"),url(//themes.googleusercontent.com/static/fonts/vollkorn/v4/BCFBp4rt5gxxFrX6F12DKnYhjbSpvc47ee6xR_80Hnw.woff) format("woff")}@font-face{font-family:Vollkorn;font-style:bold;font-weight:700;src:local("Vollkorn Bold"),local("Vollkorn-Bold"),url(//themes.googleusercontent.com/static/fonts/vollkorn/v4/wMZpbUtcCo9GUabw9JODerrIa-7acMAeDBVuclsi6Gc.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:bold;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(//themes.googleusercontent.com/static/fonts/opensans/v8/cJZKeOuBrn4kERxqtaUH3bO3LdcAZYWl9Si6vvxL-qU.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:bold;font-weight:600;src:local("Open Sans Semibold"),local("OpenSans-Semibold"),url(//themes.googleusercontent.com/static/fonts/opensans/v8/MTP_ySUJH_bn48VBG8sNSqRDOzjiPcYnFooOUGCOsRk.woff) format("woff")}@font-face{font-family:'Roboto Slab';font-style:normal;font-weight:400;src:local("Roboto Slab Regular"),local("RobotoSlab-Regular"),url(//themes.googleusercontent.com/static/fonts/robotoslab/v3/y7lebkjgREBJK96VQi37ZrrIa-7acMAeDBVuclsi6Gc.woff) format("woff")}@font-face{font-family:'Roboto Slab';font-style:bold;font-weight:700;src:local("Roboto Slab Bold"),local("RobotoSlab-Bold"),url(//themes.googleusercontent.com/static/fonts/robotoslab/v3/dazS1PrQQuCxC3iOAJFEJRbnBKKEOwRKgsHDreGcocg.woff) format("woff")}@font-face{font-family:Lato;font-style:normal;font-weight:400;src:local("Lato Regular"),local("Lato-Regular"),url(//fonts.gstatic.com/s/lato/v11/8qcEw_nrk_5HEcCpYdJu8BTbgVql8nDJpwnrE27mub0.woff2) format("woff2");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-weight:400;src:local("Lato Regular"),local("Lato-Regular"),url(//fonts.gstatic.com/s/lato/v11/MDadn8DQ_3oT6kvnUq_2rxTbgVql8nDJpwnrE27mub0.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:Lato;font-style:normal;font-weight:700;src:local("Lato Bold"),local("Lato-Bold"),url(//fonts.gstatic.com/s/lato/v11/rZPI2gHXi8zxUjnybc2ZQFKPGs1ZzpMvnHX-7fPOuAc.woff2) format("woff2");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-weight:700;src:local("Lato Bold"),local("Lato-Bold"),url(//fonts.gstatic.com/s/lato/v11/MgNNr5y1C_tIEuLEmicLm1KPGs1ZzpMvnHX-7fPOuAc.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:Lato;font-style:italic;font-weight:400;src:local("Lato Italic"),local("Lato-Italic"),url(//fonts.gstatic.com/s/lato/v11/cT2GN3KRBUX69GVJ2b2hxn-_kf6ByYO6CLYdB4HQE-Y.woff2) format("woff2");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:italic;font-weight:400;src:local("Lato Italic"),local("Lato-Italic"),url(//fonts.gstatic.com/s/lato/v11/1KWMyx7m-L0fkQGwYhWwun-_kf6ByYO6CLYdB4HQE-Y.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:Lato;font-style:italic;font-weight:700;src:local("Lato Bold Italic"),local("Lato-BoldItalic"),url(//fonts.gstatic.com/s/lato/v11/AcvTq8Q0lyKKNxRlL28Rn4X0hVgzZQUfRDuZrPvH3D8.woff2) format("woff2");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:italic;font-weight:700;src:local("Lato Bold Italic"),local("Lato-BoldItalic"),url(//fonts.gstatic.com/s/lato/v11/HkF_qI1x_noxlxhrhMQYEIX0hVgzZQUfRDuZrPvH3D8.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:Graduate;font-style:normal;font-weight:400;src:local("Graduate"),local("Graduate-Regular"),url(//fonts.gstatic.com/s/graduate/v4/xBquLOzic3rRbJsTs3BiEBkAz4rYn47Zy2rvigWQf6w.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Old Standard TT';font-style:normal;font-weight:400;src:local("Old Standard TT Regular"),local("OldStandardTT-Regular"),url(//fonts.gstatic.com/s/oldstandardtt/v7/n6RTCDcIPWSE8UNBa4k-DLF-2NVkvf-rOuDmUqmzvVM.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Old Standard TT';font-style:normal;font-weight:700;src:local("Old Standard TT Bold"),local("OldStandardTT-Bold"),url(//fonts.gstatic.com/s/oldstandardtt/v7/5Ywdce7XEbTSbxs__4X1_C-wBZwrdXnFg8S-xRZijWL3rGVtsTkPsbDajuO5ueQw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Old Standard TT';font-style:italic;font-weight:400;src:local("Old Standard TT Italic"),local("OldStandardTT-Italic"),url(//fonts.gstatic.com/s/oldstandardtt/v7/QQT_AUSp4AV4dpJfIN7U5L2K6DRqiD5gep8WjK7yGlo.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Gravitas One';font-style:normal;font-weight:400;src:local("Gravitas One"),local("GravitasOne"),url(//fonts.gstatic.com/s/gravitasone/v6/nBHdBv6zVNU8MtP6w9FwTRVuXpl7XtNjpLlhhhGlVqc.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}.cartodb-overlay.overlay-annotation .content>.text,.cartodb-overlay.overlay-text .content>.text{font-family:'Helvetica Neue',Helvetica,sans-serif;font-weight:400}.cartodb-overlay.overlay-annotation .content>.text strong,.cartodb-overlay.overlay-text .content>.text strong{font-family:'Helvetica Neue',Helvetica,sans-serif;font-weight:700}.cartodb-overlay.overlay-annotation.droid .content>.text,.cartodb-overlay.overlay-text.droid .content>.text{font-family:'Droid Sans',serif;font-weight:400}.cartodb-overlay.overlay-annotation.droid .content>.text strong,.cartodb-overlay.overlay-text.droid .content>.text strong{font-family:'Droid Sans',Helvetica,sans-serif;font-weight:700}.cartodb-overlay.overlay-annotation.roboto .content>.text,.cartodb-overlay.overlay-text.roboto .content>.text{font-family:'Roboto Slab',serif;font-weight:400}.cartodb-overlay.overlay-annotation.roboto .content>.text strong,.cartodb-overlay.overlay-text.roboto .content>.text strong{font-family:'Roboto Slab',serif;font-weight:700}.cartodb-overlay.overlay-annotation.vollkorn .content>.text,.cartodb-overlay.overlay-text.vollkorn .content>.text{font-family:Vollkorn,serif;font-weight:400}.cartodb-overlay.overlay-annotation.vollkorn .content>.text strong,.cartodb-overlay.overlay-text.vollkorn .content>.text strong{font-family:Vollkorn,serif;font-weight:700}.cartodb-overlay.overlay-annotation.open_sans .content>.text,.cartodb-overlay.overlay-text.open_sans .content>.text{font-family:'Open Sans',sans-serif;font-weight:400}.cartodb-overlay.overlay-annotation.open_sans .content>.text strong,.cartodb-overlay.overlay-text.open_sans .content>.text strong{font-family:'Open Sans',sans-serif;font-weight:700}.cartodb-overlay.overlay-annotation.lato .content>.text,.cartodb-overlay.overlay-text.lato .content>.text{font-family:Lato,sans-serif;font-weight:400}.cartodb-overlay.overlay-annotation.lato .content>.text strong,.cartodb-overlay.overlay-text.lato .content>.text strong{font-family:Lato,sans-serif;font-weight:700}.cartodb-overlay.overlay-annotation.graduate .content>.text,.cartodb-overlay.overlay-annotation.graduate .content>.text strong,.cartodb-overlay.overlay-text.graduate .content>.text,.cartodb-overlay.overlay-text.graduate .content>.text strong{font-family:Graduate,sans-serif;font-weight:400}.cartodb-overlay.overlay-annotation.old_standard_tt .content>.text,.cartodb-overlay.overlay-text.old_standard_tt .content>.text{font-family:'Old Standard TT',sans-serif;font-weight:400}.cartodb-overlay.overlay-annotation.old_standard_tt .content>.text strong,.cartodb-overlay.overlay-text.old_standard_tt .content>.text strong{font-family:'Old Standard TT',sans-serif;font-weight:700}.cartodb-overlay.overlay-annotation.gravitas_one .content>.text,.cartodb-overlay.overlay-annotation.gravitas_one .content>.text strong,.cartodb-overlay.overlay-text.gravitas_one .content>.text,.cartodb-overlay.overlay-text.gravitas_one .content>.text strong{font-family:'Gravitas One',sans-serif;font-weight:400}.cartodb-header .cartodb-slides-controller{background:0 0}.cartodb-slides-controller{position:relative;width:100%;text-align:center;top:0;left:0;background:rgba(0,0,0,.5);line-height:0;z-index:1000000}.cartodb-slides-controller .slides-controller-content{margin:auto;padding:10px}.cartodb-slides-controller .slides-controller-content .next,.cartodb-slides-controller .slides-controller-content .prev{position:relative}.cartodb-slides-controller .slides-controller-content .prev{display:inline-block;*display:inline;vertical-align:middle;width:16px;height:15px;margin:0 30px 0 0;background:url(../img/slide_left.png) no-repeat;border-radius:100px;opacity:.5}.cartodb-slides-controller .slides-controller-content .next{display:inline-block;*display:inline;vertical-align:middle;margin:0 0 0 30px;width:16px;height:15px;background:url(../img/slide_right.png) no-repeat;border-radius:100px;opacity:.5}.cartodb-slides-controller .slides-controller-content .next:hover,.cartodb-slides-controller .slides-controller-content .prev:hover{opacity:.8}.cartodb-slides-controller .slides-controller-content .prev:after{content:'';position:absolute;top:-5px;left:31px;height:25px;width:2px;background:#fff;opacity:.5}.cartodb-slides-controller .slides-controller-content .next:before{content:'';position:absolute;top:-5px;left:-17px;height:25px;width:2px;background:#fff;opacity:.5}.cartodb-slides-controller .slides-controller-content .counter{color:#fff}.cartodb-slides-controller .slides-controller-content .counter,.cartodb-slides-controller .slides-controller-content ul{display:inline-block;*display:inline;text-align:center;padding:0}.cartodb-slides-controller .slides-controller-content .counter.loading{opacity:.2;animation:loading .35s infinite ease-out alternate;-ms-animation:loading .35s infinite ease-out alternate;-moz-animation:loading .35s infinite ease-out alternate;-webkit-animation:loading .35s infinite ease-out alternate}.cartodb-slides-controller .slides-controller-content ul li{display:inline-block;*display:inline;vertical-align:middle;margin:0 2px}.cartodb-slides-controller .slides-controller-content ul li a{width:10px;height:10px;display:block;background:#fff;border-radius:100px;opacity:.4}.cartodb-slides-controller .slides-controller-content ul li a.active{opacity:1}.cartodb-slides-controller .slides-controller-content ul li a.active.time{width:10px;height:10px;opacity:.5;transform:scale(0.5);-ms-transform:scale(0.5);-moz-transform:scale(0.5);-webkit-transform:scale(0.5);animation:pulse .35s infinite ease-out alternate;-ms-animation:pulse .35s infinite ease-out alternate;-moz-animation:pulse .35s infinite ease-out alternate;-webkit-animation:pulse .35s infinite ease-out alternate}div.cartodb-timeslider .slider-wrapper{display:inline-block;zoom:1;*display:inline;vertical-align:top;width:253px;height:4px;_height:4px;padding:18px 15px}div.cartodb-timeslider .slider{width:253px;height:4px}div.cartodb-timeslider .ui-helper-hidden{display:none}div.cartodb-timeslider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}div.cartodb-timeslider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}div.cartodb-timeslider .ui-helper-clearfix:after,div.cartodb-timeslider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}div.cartodb-timeslider .ui-helper-clearfix:after{clear:both}div.cartodb-timeslider .ui-helper-clearfix{min-height:0}div.cartodb-timeslider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}div.cartodb-timeslider .ui-front{z-index:100}div.cartodb-timeslider .ui-state-disabled{cursor:default!important}div.cartodb-timeslider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}div.cartodb-timeslider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}div.cartodb-timeslider .ui-slider{background-color:#E0E0E0;position:relative;text-align:left;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px}div.cartodb-timeslider .ui-slider .ui-slider-handle{position:absolute;z-index:102;width:9px;height:10px;cursor:default;background:url(../img/slider.png) no-repeat -98px -18px #fff;border:1px solid #555;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;outline:0}div.cartodb-timeslider .ui-slider .ui-slider-handle:hover{cursor:col-resize;background-position:-112px -18px}div.cartodb-timeslider .ui-slider .ui-slider-range{position:absolute;z-index:100;font-size:.7em;display:block;border:0;background-position:0 0;background-color:#397DBA;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px}div.cartodb-timeslider .ui-slider.ui-state-disabled .ui-slider-handle,div.cartodb-timeslider .ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}div.cartodb-timeslider .ui-slider-horizontal{height:4px;cursor:pointer}div.cartodb-timeslider .ui-slider-horizontal .ui-slider-handle{top:-4px;margin-left:-6px}div.cartodb-timeslider .ui-slider-horizontal .ui-slider-range{top:0;height:100%;cursor:pointer}div.cartodb-timeslider .ui-slider-horizontal .ui-slider-range-min{left:0}div.cartodb-timeslider .ui-slider-horizontal .ui-slider-range-max{right:0}div.cartodb-timeslider .ui-slider-vertical{width:.8em;height:100px}div.cartodb-timeslider .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}div.cartodb-timeslider .ui-slider-vertical .ui-slider-range{left:0;width:100%}div.cartodb-timeslider .ui-slider-vertical .ui-slider-range-min{bottom:0}div.cartodb-timeslider .ui-slider-vertical .ui-slider-range-max{top:0}@media only screen and (min-width:360px) and (max-width:500px){div.cartodb-timeslider .slider,div.cartodb-timeslider .slider-wrapper{width:130px}}@media only screen and (min-width:180px) and (max-width:360px){div.cartodb-timeslider .slider,div.cartodb-timeslider .slider-wrapper{width:90px}div.cartodb-timeslider p.value{width:90px;font-size:12px}}div.cartodb-tooltip-content-wrapper.dark{background:#000;background:rgba(0,0,0,.75);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#bf000000, endColorstr=#bf000000);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#bf000000, endColorstr=#bf000000)"}div.cartodb-tooltip-content-wrapper.dark h4{color:#999}div.cartodb-tooltip-content-wrapper.dark p{color:#FFF}div.cartodb-tooltip-content-wrapper.dark a{color:#397DB9}div.cartodb-tooltip{position:absolute;display:none;min-width:120px;max-width:180px;overflow-y:hidden;z-index:50}div.cartodb-tooltip-content-wrapper{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#E5FFFFFF, endColorstr=#E5FFFFFF);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#E5FFFFFF, endColorstr=#E5FFFFFF)";zoom:1}div.cartodb-tooltip-content{display:block;padding:8px 8px 8px 9px}div.cartodb-tooltip-content h4{display:block;margin:0 0 1px;text-transform:uppercase;font:400 10px "Helvetica Neue",Helvetica,Arial;color:#AAA;word-wrap:break-word}div.cartodb-tooltip-content p{display:block;margin:0 0 4px;padding:0 0 7px;font:400 12px "Helvetica Neue",Helvetica,Arial;color:#333;word-wrap:break-word}div.cartodb-tooltip-content p:last-child{padding:0;margin:0}div.cartodb-tooltip-content a{color:#0078A8}div.cartodb-tooltip>p{font-family:robotoregular,Helvetica,Arial,Sans-serif;font-size:15px;color:#333;text-align:center;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}.u-tSpace{margin-top:4px}.u-rSpace{margin-right:4px}.leaflet-image-layer,.leaflet-layer,.leaflet-map-pane,.leaflet-marker-icon,.leaflet-marker-pane,.leaflet-marker-shadow,.leaflet-overlay-pane,.leaflet-overlay-pane svg,.leaflet-popup-pane,.leaflet-shadow-pane,.leaflet-tile,.leaflet-tile-container,.leaflet-tile-pane,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden;-ms-touch-action:none}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container img{max-width:none!important}.leaflet-container img.leaflet-image-layer{max-width:15000px!important}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-tile-pane{z-index:2}.leaflet-objects-pane{z-index:3}.leaflet-overlay-pane{z-index:4}.leaflet-shadow-pane{z-index:5}.leaflet-marker-pane{z-index:6}.leaflet-popup-pane{z-index:7}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:7;pointer-events:auto}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup,.leaflet-fade-anim .leaflet-tile{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup,.leaflet-fade-anim .leaflet-tile-loaded{opacity:1}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-touching .leaflet-zoom-animated,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-clickable{cursor:pointer}.leaflet-container{cursor:-webkit-grab;cursor:-moz-grab}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-clickable,.leaflet-dragging .leaflet-container{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078A8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:0}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px "Lucida Console",Monaco,monospace;text-indent:1px}.leaflet-control-zoom-out{font-size:20px}.leaflet-touch .leaflet-control-zoom-in{font-size:22px}.leaflet-touch .leaflet-control-zoom-out{font-size:24px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(../../img/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(../../img/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:0;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;-moz-box-sizing:content-box;box-sizing:content-box;background:#fff;background:rgba(255,255,255,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:0;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{margin:0 auto;width:40px;height:20px;position:relative;overflow:hidden}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:700;background:0 0}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678, M12=.70710678, M21=-.70710678, M22=.70710678)}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.Widget-button{-webkit-transition:background,250ms;-khtml-transition:background,250ms;-moz-transition:background,250ms;-ms-transition:background,250ms;-o-transition:background,250ms;transition:background,250ms;display:inline-block;padding:0 26px;border-radius:4px;font-family:'Open Sans';line-height:40px}.Widget-link{font-size:10px;font-weight:500;text-transform:uppercase}.Widget-link:hover{text-decoration:underline}.Widget-button:hover,.Widget-link:hover{cursor:pointer}.Widget-canvas{position:absolute;top:0;right:0;bottom:0;width:352px;height:100%}@media only screen and (min-width:320px) and (max-width:760px){.Widget-canvas{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;position:relative;width:100%;height:auto;overflow-x:auto;overflow-y:visible}}.Widget-content{position:relative}.Tooltip{top:0;left:0;display:none;position:absolute;color:#fff;padding:5px;min-width:50px;box-sizing:border-box;text-align:center;border-radius:3px;background:#000;font-size:10px;pointer-events:none}.Chart.is-selectable .Handle,.Chart.is-selectable .HandleLine{opacity:1}.Widget{position:relative}.Widget-filter{opacity:0}.extent{opacity:0;fill-opacity:0;stroke:#3AA9E3;shape-rendering:crispEdges}.Bar{fill:#9DE0AD;transition:fill 200ms ease;shape-rendering:crispEdges}.Bar.is-highlighted{fill:#5BA45E;opacity:1}.Bar.is-selected{fill:#DDD;opacity:.7}.mini .Bar,.mini .Bar.is-highlighted{fill:#333}.mini .Bar.is-selected{fill:#DDD}.axis{font:10px sans-serif;shape-rendering:crispEdges}.axis path{display:none;shape-rendering:crispEdges}.axis line{fill:none;stroke-width:1;opacity:.2;stroke:#000;shape-rendering:crispEdges}.y{stroke:#EEE;stroke-width:1;shape-rendering:crispEdges}.l_bottom{stroke-width:1;opacity:.2;stroke:#000;shape-rendering:crispEdges}.Line{stroke-width:2;stroke:#3AA9E3}.Handle{opacity:0;stroke-width:2;stroke:#3AA9E3;fill:#FFF}.HandleLine{opacity:0;stroke-width:2;stroke:#3AA9E3}.Widget-filterButton.is-hidden{display:none}.Widget{width:352px;padding:22px 0 24px;box-sizing:border-box;border-bottom:2px solid transparent;font-family:'Open Sans'}.Widget-title{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;justify-content:flex-start;-ms-flex-pack:start;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;align-items:center;-ms-flex-align:center;width:100%;height:22px;margin:0 0 2px}.Widget-content,.Widget-footer,.Widget-header{margin-right:24px;margin-left:24px}.Widget-content{display:block;margin-top:12px}.Widget-content--noSidesMargin{margin:12px 0 0}@media only screen and (min-width:320px) and (max-width:760px){.Widget{width:280px;border-right:2px solid transparent;border-bottom:0}}.Widget-error{-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center;-ms-flex-pack:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;align-items:center;-ms-flex-align:center;opacity:0;filter:alpha(opacity=0);-webkit-transition:opacity,500ms;-khtml-transition:opacity,500ms;-moz-transition:opacity,500ms;-ms-transition:opacity,500ms;-o-transition:opacity,500ms;transition:opacity,500ms;display:none;position:absolute;top:0;right:0;bottom:0;left:0;border-top:2px solid transparent;z-index:11}.Widget-error.is-visible{opacity:1;filter:alpha(opacity=100)}.Widget-filter{width:100%;margin:5px 0}.Widget-filterButtons{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;justify-content:space-between;-ms-flex-pack:justify;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;align-items:center;-ms-flex-align:center}.Widget-filterButton{margin-right:8px}.Widget-filterButton:last-child{margin-right:0}.Widget-info{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;justify-content:flex-start;-ms-flex-pack:start;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;align-items:center;-ms-flex-align:center;width:100%}.Widget-infoItem{margin-right:12px}.Widget-infoItem:last-child{margin-right:0}@media only screen and (min-width:320px) and (max-width:760px){.Widget-info{-webkit-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;justify-content:space-between;-ms-flex-pack:justify}.Widget-infoItem{margin-right:0}}.Widget-contentSpaced{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;justify-content:space-between;-ms-flex-pack:justify;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;align-items:center;-ms-flex-align:center}.Widget-contentSpaced--topAligned{-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;align-items:flex-start;-ms-flex-align:flex-start}.Widget-contentSpaced--start{-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;justify-content:flex-start;-ms-flex-pack:start;text-align:left}.Widget-contentFull{width:100%}.Widget-listWrapper{position:relative}.Widget-listEdge{display:block;position:absolute;right:0;left:0;height:1px;z-index:2}.Widget-listEdgeShadow{position:absolute;right:0;left:0;width:100%;height:35px;z-index:0;pointer-events:none}.Widget-listEdgeBorder{position:absolute;right:24px;left:24px;height:1px;z-index:1}.Widget-listEdge--top,.Widget-listEdge--top .Widget-listEdgeShadow{top:0}.Widget-listEdge--bottom{bottom:0}.Widget-listEdge--bottom .Widget-listEdgeShadow{-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);bottom:0}.Widget-list{display:block;position:relative;max-height:232px;margin:0;overflow:hidden;z-index:1}.Widget-listItem{display:block}.Widget-listItemInner{margin:0 24px;padding:5px 0}.Widget-listItemInner--withBorders{padding:7px 0}.Widget-listItem--fake{position:relative;height:40px;margin:8px 24px;border-bottom:1px solid transparent}.Widget-listItem--fake:after,.Widget-listItem--fake:before{display:inline-block;position:relative;margin:0;padding:0;content:''}.Widget-listItem--fake:before{width:60px;height:8px}.Widget-listItem--fake:after{width:100%;height:2px}.Widget-listSubItem{display:inline-block}.Widget-listDot{margin-top:3px;margin-right:5px}.Widget-listButton{position:relative;width:100%;margin:0;padding:5px 24px;font-family:'Open Sans';font-weight:500}.Widget-listButton:hover{cursor:pointer}.Widget-listButton--withBorder{padding:7px 24px}.Widget-listButton--withBorder:after,.Widget-listButton--withBorder:before{position:absolute;right:24px;left:24px;height:1px;content:''}.Widget-listButton--withBorder:before{top:-1px}.Widget-listButton--withBorder:after{bottom:0}.Widget-listButton--withBorder:hover:after,.Widget-listButton--withBorder:hover:before{right:0;left:0}.Widget-inlineList{width:100%;padding:0}.Widget-inlineListItem{display:inline-block;width:32%;margin:5px 0 0;vertical-align:top}@media only screen and (min-width:320px) and (max-width:760px){.Widget-inlineListItem{width:47%}}.Widget-loader{-webkit-animation:loader-progress 1000ms linear 1;-khtml-animation:loader-progress 1000ms linear 1;-moz-animation:loader-progress 1000ms linear 1;-ms-animation:loader-progress 1000ms linear 1;-o-animation:loader-progress 1000ms linear 1;animation:loader-progress 1000ms linear 1;opacity:0;filter:alpha(opacity=0);-webkit-transition:opacity,1000ms;-khtml-transition:opacity,1000ms;-moz-transition:opacity,1000ms;-ms-transition:opacity,1000ms;-o-transition:opacity,1000ms;transition:opacity,1000ms;position:absolute;top:0;left:0;width:100%;height:2px;z-index:10}.Widget-loader.is-visible{-webkit-animation:loader-progress 2000ms linear infinite;-khtml-animation:loader-progress 2000ms linear infinite;-moz-animation:loader-progress 2000ms linear infinite;-ms-animation:loader-progress 2000ms linear infinite;-o-animation:loader-progress 2000ms linear infinite;animation:loader-progress 2000ms linear infinite;opacity:1;filter:alpha(opacity=100)}@-webkit-keyframes loader-progress{0%{width:0}100%{width:100%}}@-moz-keyframes loader-progress{0%{width:0}100%{width:100%}}@-ms-keyframes loader-progress{0%{width:0}100%{width:100%}}@-o-keyframes loader-progress{0%{width:0}100%{width:100%}}@keyframes loader-progress{0%{width:0}100%{width:100%}}.Widget-nav{width:100%;margin-top:12px}.Widget-navDots{height:8px}.Widget-dot--navigation{display:inline-block;vertical-align:top}.Widget-dot--navigation:hover{cursor:pointer}.Widget-navDotsItem.is-selected:hover{cursor:default}.Widget-navDotsItem.is-disabled{opacity:.5;filter:alpha(opacity=50)}.Widget-navArrows{width:45px;height:9px}.Widget-progressBar{position:relative;width:100%;height:4px;margin:3px 0;border-radius:4px}.Widget-progressState{position:absolute;top:0;left:0;max-width:100%;height:4px;border-radius:4px}.Widget-progressState--positive{left:0;border-top-right-radius:0;border-bottom-right-radius:0}.Widget-progressState--negative{right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0}.Widget-dot{display:inline-block;width:8px;min-width:8px;height:8px;border-radius:8px}.Widget-arrow{display:inline-block;position:relative;width:16px;height:10px}.Widget-arrow:hover{cursor:pointer}.Widget-arrow:after,.Widget-arrow:before{position:absolute;top:5px;width:10px;height:1px;content:''}.Widget-arrow.is-disabled{opacity:.5;filter:alpha(opacity=50)}.Widget-arrow.is-disabled:hover{cursor:default}.Widget-arrow--up:after{-webkit-transform:rotate(45deg);-khtml-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);right:0}.Widget-arrow--up:before{-webkit-transform:rotate(-45deg);-khtml-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);left:0}.Widget-arrow--down:after{-webkit-transform:rotate(-45deg);-khtml-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);right:0}.Widget-arrow--down:before{-webkit-transform:rotate(45deg);-khtml-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);left:0}.Widget-lens{display:inline-block;position:relative;width:16px;height:16px}.Widget-lens:after,.Widget-lens:before{position:absolute;content:''}.Widget-lens:after{top:0;left:0;width:8px;height:8px;border:1px solid transparent;border-radius:10px}.Widget-lens:before{-webkit-transform:rotate(45deg);-khtml-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);right:3px;bottom:5px;width:6px;height:1px}.Widget-lens:hover{cursor:pointer}.Widget-tag{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;align-items:center;-ms-flex-align:center;height:22px;margin:0 0 0 12px;padding:0 6px;border-radius:4px;vertical-align:middle}.Widget-tag--green{background:#EDF3DF}.Widget-tag--blue{background:#DFF2FC}.Widget-textBigger{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:26px;font-weight:500;line-height:41.6px}.Widget-textBig{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;font-size:16px;font-weight:500;line-height:20px}.Widget-textNormal{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:500;line-height:501}.Widget-textNormal--bold{font-weight:600}.Widget-textSmall{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;font-weight:500;line-height:13px}.Widget-textSmall--bold{font-weight:600}.Widget-textSmall--upper{text-transform:uppercase}.Widget-textSmaller{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;font-weight:500;line-height:13px}.Widget-textSmaller--bold{font-weight:600}.Widget-textSmaller--upper{text-transform:uppercase}.Widget-textSmaller--noEllip{text-overflow:inherit;white-space:inherit;overflow:inherit}.Widget--light{border-color:#f2f6f9;background:#fff}.Widget--light .Widget-textBig,.Widget--light .Widget-textNormal,.Widget--light .Widget-textSmall{color:#2e3c43}.Widget--light .Widget-textSmaller{color:#636d72}.Widget--light .Widget-textSmaller--dark{color:#2e3c43}.Widget--light .Widget-link{color:#3aa9e3}.Widget--light .Widget-link:hover{color:#227dbd}.Widget--light .Widget-progressBar{background:#eee}.Widget--light .Widget-progressState{background:#9de0ad}.Widget--light .Widget-progressState--positive{background:#8fb83f}.Widget--light .Widget-progressState--negative{background:#f15743}.Widget--light .Widget-dot{background:#9de0ad}.Widget--light .Widget-dot--navigation{background:#eee}.Widget--light .Widget-dot--navigation:hover{background:#aaa}.Widget--light .Widget-dot--navigation.is-selected{background:#636d72}.Widget--light .Widget-listEdgeBorder{background:#eee}.Widget--light .Widget-listEdgeShadow{background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(rgba(255,255,255,0)));background-image:-webkit-linear-gradient(top,#fff,rgba(255,255,255,0));background-image:-moz-linear-gradient(top,#fff,rgba(255,255,255,0));background-image:-ms-linear-gradient(top,#fff,rgba(255,255,255,0));background-image:-o-linear-gradient(top,#fff,rgba(255,255,255,0));background-image:linear-gradient(top,#fff,rgba(255,255,255,0));filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#fff', endColorStr='rgba(255,255,255,0)');background-color:transparent}.Widget--light .Widget-listItemInner--withBorders{border-bottom:1px solid #eee}.Widget--light .Widget-listItem--fake{border-color:#f9f9f9}.Widget--light .Widget-listItem--fake:after,.Widget--light .Widget-listItem--fake:before{background-color:#f9f9f9}.Widget--light .Widget-listButton:hover{background:#f2f6f9}.Widget--light .Widget-listButton--withBorder:before{background:0 0}.Widget--light .Widget-listButton--withBorder:after,.Widget--light .Widget-listButton--withBorder:hover:after,.Widget--light .Widget-listButton--withBorder:hover:before{background:#eee}.Widget--light .Widget-loader{background:#3aa9e3}.Widget--light .Widget-error{border-color:#f15743;background:rgba(242,246,249,.8)}.Widget--light .Widget-errorButton{background:#636d72}.Widget--light .Widget-errorButton .Widget-textSmall,.Widget--light .Widget-errorButton .Widget-textSmaller{color:#FFF}.Widget--light .Widget-errorButton:hover{background:#2e3c43}.Widget--light .Widget-arrow:after,.Widget--light .Widget-arrow:before{background-color:#3aa9e3}.Widget--light .Widget-arrow:hover:after,.Widget--light .Widget-arrow:hover:before{background-color:#227dbd}.Widget--light .Widget-lens:after{border-color:#3aa9e3}.Widget--light .Widget-lens:before{background:#3aa9e3}.Widget--light .Widget-lens:hover:after{border-color:#227dbd}.Widget--light .Widget-lens:hover:before{background:#227dbd}.Widget--light .is-disabled .Widget-textNormal,.Widget--light .is-disabled .Widget-textSmall,.Widget--light .is-disabled .Widget-textSmaller,.Widget--light .is-disabled .Widget-textSmaller--dark{color:#cbced0}.Widget--light .is-disabled .Widget-progressState{background:#cbced0!important} \ No newline at end of file diff --git a/examples/vendor/cartodb.uncompressed.js b/examples/vendor/cartodb.uncompressed.js new file mode 100644 index 00000000..929e23f1 --- /dev/null +++ b/examples/vendor/cartodb.uncompressed.js @@ -0,0 +1,55281 @@ +// cartodb.js version: 3.15.8 +// uncompressed version: cartodb.uncompressed.js +// sha: 3702ae15b7366d09fd91f350b93a99536c41a55f +(function() { + var define; // Undefine define (require.js), see https://github.com/CartoDB/cartodb.js/issues/543 + var root = this; + + if(!true) { + if(root.jQuery === undefined) { + throw "jQuery should be loaded before include cartodb.js"; + } + } + + // save current libraries + var __prev = { + jQuery: root.jQuery, + $: root.$, + L: root.L, + Mustache: root.Mustache, + Backbone: root.Backbone, + _: root._ + }; +/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){ +return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length