require-jquery.js revision 861184ca9d9c609711c1bef519bffbe0d5de3f9d
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 0.26.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
/*jslint strict: false, plusplus: false */
/*global window: false, navigator: false, document: false, importScripts: false,
jQuery: false, clearInterval: false, setInterval: false, self: false,
setTimeout: false, opera: false */
(function () {
//Change this version number for each release.
var version = "0.26.0",
commentRegExp = /(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,
currDirRegExp = /^\.\//,
jsSuffixRegExp = /\.js$/,
ostring = Object.prototype.toString,
ap = Array.prototype,
aps = ap.slice,
apsp = ap.splice,
//PS3 indicates loaded and complete, but need to wait for complete
//to feature test w/o causing perf issues.
readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
/^complete$/ : /^(complete|loaded)$/,
defContextName = "_",
//Oh the tragedy, detecting opera. See the usage of isOpera for reason.
empty = {},
contexts = {},
globalDefQueue = [],
interactiveScript = null,
isDone = false,
checkLoadedDepth = 0,
useInteractive = false,
req, cfg = {}, currentlyAddingScript, s, head, baseElement, scripts, script,
src, subPath, mainScript, dataMain, i, scrollIntervalId, setReadyState, ctx,
jQueryCheck, checkLoadedTimeoutId;
function isFunction(it) {
}
function isArray(it) {
}
/**
* Simple function to mix in properties from source into target,
* but only if target does not already have a property of the same name.
* This is not robust in IE for transferring methods that match
* Object.prototype names, but the uses of mixin here seem unlikely to
* trigger a problem related to that.
*/
function mixin(target, source, force) {
for (var prop in source) {
if (!(prop in empty) && (!(prop in target) || force)) {
target[prop] = source[prop];
}
}
return req;
}
/**
* Constructs an error with a pointer to an URL with more information.
* @param {String} id the error ID that maps to an ID on a web page.
* @param {String} message human readable error.
* @param {Error} [err] the original error, if there is one.
*
* @returns {Error}
*/
function makeError(id, msg, err) {
var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
if (err) {
e.originalError = err;
}
return e;
}
/**
* Used to set up package paths from a packagePaths or packages config object.
* @param {Object} pkgs the object to store the new package config
* @param {Array} currentPackages an array of packages to configure
* @param {String} [dir] a prefix dir to use.
*/
function configurePackageDir(pkgs, currentPackages, dir) {
var i, location, pkgObj;
for (i = 0; (pkgObj = currentPackages[i]); i++) {
location = pkgObj.location;
//Add dir to the path, but avoid paths that start with a slash
//or have a colon (indicates a protocol)
if (dir && (!location || (location.indexOf("/") !== 0 && location.indexOf(":") === -1))) {
location = dir + "/" + (location || pkgObj.name);
}
//Create a brand new object on pkgs, since currentPackages can
//be passed in again, and config.pkgs is the internal transformed
//state for all package configs.
pkgs[pkgObj.name] = {
name: pkgObj.name,
location: location || pkgObj.name,
//Remove leading dot in main, so main paths are normalized,
//and remove any trailing .js, since different package
//envs have different conventions: some use a module name,
//some use a file name.
.replace(currDirRegExp, '')
.replace(jsSuffixRegExp, '')
};
}
}
/**
* ready callbacks, but jQuery 1.6 supports a holdReady() API instead.
* with using holdReady.
*/
function jQueryHoldReady($, shouldHold) {
if ($.holdReady) {
$.holdReady(shouldHold);
} else if (shouldHold) {
$.readyWait += 1;
} else {
$.ready(true);
}
}
//If a define is already in play via another AMD loader,
//do not overwrite.
return;
}
if (isFunction(requirejs)) {
//Do not overwrite and existing requirejs instance.
return;
} else {
cfg = requirejs;
requirejs = undefined;
}
}
//Allow for a require config object
//assume it is a config object.
cfg = require;
require = undefined;
}
/**
* Creates a new context for use in require and define calls.
* Handle most of the heavy lifting. Do not want to use an object
* with prototype here to avoid using "this" in require, in case it
* needs to be used in more super secure envs that do not want this.
* Also there should not be that many contexts in the page. Usually just
* one for the default context, but could be extra for multiversion cases
* or if a package needs a special context for a dependency that conflicts
* with the standard context.
*/
function newContext(contextName) {
var context, resume,
config = {
waitSeconds: 7,
baseUrl: s.baseUrl || "./",
paths: {},
pkgs: {},
catchError: {}
},
defQueue = [],
specified = {
},
urlMap = {},
defined = {},
loaded = {},
waiting = {},
waitAry = [],
waitIdCounter = 0,
managerCallbacks = {},
plugins = {},
pluginsQueue = {},
resumeDepth = 0,
normalizedWaiting = {};
/**
* Trims the . and .. from an array of path segments.
* It will keep a leading path segment if a .. will become
* the first path segment, to help with module name lookups,
* which act like paths, but can be remapped. But the end result,
* all paths that use this function should look normalized.
* NOTE: this method MODIFIES the input array.
* @param {Array} ary the array of path segments.
*/
function trimDots(ary) {
var i, part;
for (i = 0; (part = ary[i]); i++) {
if (part === ".") {
ary.splice(i, 1);
i -= 1;
} else if (part === "..") {
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
//End of the line. Keep at least one non-dot
//path segment at the front so it can be mapped
//correctly to disk. Otherwise, there is likely
//no path mapping for a path starting with '..'.
//This can still fail, but catches the most reasonable
//uses of ..
break;
} else if (i > 0) {
ary.splice(i - 1, 2);
i -= 2;
}
}
}
}
/**
* Given a relative module name, like ./something, normalize it to
* a real name that can be mapped to a path.
* @param {String} name the relative name
* @param {String} baseName a real name that the name arg is relative
* to.
* @returns {String} normalized name
*/
function normalize(name, baseName) {
var pkgName, pkgConfig;
//Adjust any relative paths.
if (name && name.charAt(0) === ".") {
//If have a base name, try to normalize against it,
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
if (config.pkgs[baseName]) {
//If the baseName is a package name, then just treat it as one
//name to concat the name with.
baseName = [baseName];
} else {
//Convert baseName to array, and lop off the last part,
//this normalization.
baseName = baseName.split("/");
baseName = baseName.slice(0, baseName.length - 1);
}
name = baseName.concat(name.split("/"));
trimDots(name);
//Some use of packages may use a . path to reference the
pkgConfig = config.pkgs[(pkgName = name[0])];
name = name.join("/");
if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
name = pkgName;
}
}
}
return name;
}
/**
* Creates a module mapping that includes plugin prefix, module
* name, and path. If parentModuleMap is provided it will
* also normalize the name via require.normalize()
*
* @param {String} name the module name
* @param {String} [parentModuleMap] parent module map
* for the module name, used to resolve relative names.
*
* @returns {Object}
*/
function makeModuleMap(name, parentModuleMap) {
var index = name ? name.indexOf("!") : -1,
prefix = null,
parentName = parentModuleMap ? parentModuleMap.name : null,
originalName = name,
normalizedName, url, pluginModule;
if (index !== -1) {
prefix = name.substring(0, index);
name = name.substring(index + 1, name.length);
}
if (prefix) {
prefix = normalize(prefix, parentName);
}
//Account for relative paths if there is a base name.
if (name) {
if (prefix) {
pluginModule = defined[prefix];
if (pluginModule) {
//Plugin is loaded, use its normalize method, otherwise,
//normalize name as usual.
if (pluginModule.normalize) {
normalizedName = pluginModule.normalize(name, function (name) {
return normalize(name, parentName);
});
} else {
normalizedName = normalize(name, parentName);
}
} else {
//Plugin is not loaded yet, so do not normalize
//the name, wait for plugin to load to see if
//it has a normalize method. To avoid possible
//ambiguity with relative names loaded from another
//plugin, use the parent's name as part of this name.
normalizedName = '__$p' + parentName + '@' + (name || '');
}
} else {
normalizedName = normalize(name, parentName);
}
url = urlMap[normalizedName];
if (!url) {
//Calculate url for the module, if it has a name.
if (req.toModuleUrl) {
//Special logic required for a particular engine,
//like Node.
url = req.toModuleUrl(context, normalizedName, parentModuleMap);
} else {
url = context.nameToUrl(normalizedName, null, parentModuleMap);
}
//Store the URL mapping for later.
urlMap[normalizedName] = url;
}
}
return {
prefix: prefix,
name: normalizedName,
parentMap: parentModuleMap,
url: url,
originalName: originalName,
fullName: prefix ? prefix + "!" + (normalizedName || '') : normalizedName
};
}
/**
* Determine if priority loading is done. If so clear the priorityWait
*/
function isPriorityDone() {
var priorityDone = true,
priorityWait = config.priorityWait,
priorityName, i;
if (priorityWait) {
for (i = 0; (priorityName = priorityWait[i]); i++) {
if (!loaded[priorityName]) {
priorityDone = false;
break;
}
}
if (priorityDone) {
delete config.priorityWait;
}
}
return priorityDone;
}
/**
* CommonJS dependency. Do this here to avoid creating a closure that
* is part of a loop.
*/
function makeSetExports(moduleObj) {
return function (exports) {
moduleObj.exports = exports;
};
}
function makeContextModuleFunc(func, relModuleMap, enableBuildCallback) {
return function () {
//A version of a require function that passes a moduleName
//value for items that may need to
//look up paths relative to the moduleName
var args = [].concat(aps.call(arguments, 0)), lastArg;
if (enableBuildCallback &&
isFunction((lastArg = args[args.length - 1]))) {
lastArg.__requireJsBuild = true;
}
args.push(relModuleMap);
return func.apply(null, args);
};
}
/**
* Helper function that creates a require function object to give to
* modules that ask for it as a dependency. It needs to be specific
* per module because of the implication of path mappings that may
* need to be relative to the module name.
*/
function makeRequire(relModuleMap, enableBuildCallback) {
var modRequire = makeContextModuleFunc(context.require, relModuleMap, enableBuildCallback);
mixin(modRequire, {
nameToUrl: makeContextModuleFunc(context.nameToUrl, relModuleMap),
toUrl: makeContextModuleFunc(context.toUrl, relModuleMap),
defined: makeContextModuleFunc(context.requireDefined, relModuleMap),
specified: makeContextModuleFunc(context.requireSpecified, relModuleMap),
ready: req.ready,
isBrowser: req.isBrowser
});
//Something used by node.
if (req.paths) {
modRequire.paths = req.paths;
}
return modRequire;
}
/**
* Used to update the normalized name for plugin-based dependencies
* after a plugin loads, since it can have its own normalization structure.
* @param {String} pluginName the normalized plugin module name.
*/
function updateNormalizedNames(pluginName) {
var oldFullName, oldModuleMap, moduleMap, fullName, callbacks,
i, j, k, depArray, existingCallbacks,
maps = normalizedWaiting[pluginName];
if (maps) {
for (i = 0; (oldModuleMap = maps[i]); i++) {
oldFullName = oldModuleMap.fullName;
moduleMap = makeModuleMap(oldModuleMap.originalName, oldModuleMap.parentMap);
fullName = moduleMap.fullName;
//Callbacks could be undefined if the same plugin!name was
//required twice in a row, so use empty array in that case.
callbacks = managerCallbacks[oldFullName] || [];
existingCallbacks = managerCallbacks[fullName];
if (fullName !== oldFullName) {
//Update the specified object, but only if it is already
//in there. In sync environments, it may not be yet.
if (oldFullName in specified) {
delete specified[oldFullName];
specified[fullName] = true;
}
//Update managerCallbacks to use the correct normalized name.
//If there are already callbacks for the normalized name,
//just add to them.
if (existingCallbacks) {
managerCallbacks[fullName] = existingCallbacks.concat(callbacks);
} else {
managerCallbacks[fullName] = callbacks;
}
delete managerCallbacks[oldFullName];
//In each manager callback, update the normalized name in the depArray.
for (j = 0; j < callbacks.length; j++) {
depArray = callbacks[j].depArray;
for (k = 0; k < depArray.length; k++) {
if (depArray[k] === oldFullName) {
depArray[k] = fullName;
}
}
}
}
}
}
delete normalizedWaiting[pluginName];
}
/*
* Queues a dependency for checking after the loader is out of a
* in the browser, where it may have many modules defined in it.
*
* depName will be fully qualified, no relative . or .. path.
*/
function queueDependency(dep) {
//Make sure to load any plugin and associate the dependency
//with that plugin.
var prefix = dep.prefix,
fullName = dep.fullName;
//Do not bother if the depName is already in transit
if (specified[fullName] || fullName in defined) {
return;
}
if (prefix && !plugins[prefix]) {
//Queue up loading of the dependency, track it
//via context.plugins. Mark it as a plugin so
//that the build system will know to treat it
//special.
plugins[prefix] = undefined;
//Remember this dep that needs to have normaliztion done
//after the plugin loads.
(normalizedWaiting[prefix] || (normalizedWaiting[prefix] = []))
.push(dep);
//Register an action to do once the plugin loads, to update
//all managerCallbacks to use a properly normalized module
//name.
(managerCallbacks[prefix] ||
(managerCallbacks[prefix] = [])).push({
onDep: function (name, value) {
if (name === prefix) {
updateNormalizedNames(prefix);
}
}
});
queueDependency(makeModuleMap(prefix));
}
context.paused.push(dep);
}
function execManager(manager) {
var i, ret, waitingCallbacks, err, errFile,
cb = manager.callback,
fullName = manager.fullName,
args = [],
ary = manager.depArray;
//Call the callback to define the module, if necessary.
if (cb && isFunction(cb)) {
//Pull out the defined dependencies and pass the ordered
//values to the callback.
if (ary) {
for (i = 0; i < ary.length; i++) {
args.push(manager.deps[ary[i]]);
}
}
if (config.catchError.define) {
try {
ret = req.execCb(fullName, manager.callback, args, defined[fullName]);
} catch (e) {
err = e;
}
} else {
ret = req.execCb(fullName, manager.callback, args, defined[fullName]);
}
if (fullName) {
//favor that over return value and exports. After that,
//favor a non-undefined return value over exports use.
if (manager.cjsModule && manager.cjsModule.exports !== undefined) {
ret = defined[fullName] = manager.cjsModule.exports;
} else if (ret === undefined && manager.usingExports) {
//exports already set the defined value.
ret = defined[fullName];
} else {
//Use the return value from the function.
defined[fullName] = ret;
}
}
} else if (fullName) {
//May just be an object definition for the module. Only
//worry about defining if have a module name.
ret = defined[fullName] = cb;
}
//Clean up waiting. Do this before error calls, and before
//calling back waitingCallbacks, so that bookkeeping is correct
//in the event of an error and error is reported in correct order,
//since the waitingCallbacks will likely have errors if the
//onError function does not throw.
if (waiting[manager.waitId]) {
delete waiting[manager.waitId];
manager.isDone = true;
context.waitCount -= 1;
if (context.waitCount === 0) {
//Clear the wait array used for cycles.
waitAry = [];
}
}
if (err) {
errFile = (fullName ? makeModuleMap(fullName).url : '') ||
err.fileName || err.sourceURL;
err = makeError('defineerror', 'Error evaluating ' +
'module "' + fullName + '" at location "' +
errFile + '":\n' +
err + '\nfileName:' + errFile +
'\nlineNumber: ' + (err.lineNumber || err.line), err);
err.moduleName = fullName;
return req.onError(err);
}
if (fullName) {
//If anything was waiting for this module to be defined,
//notify them now.
waitingCallbacks = managerCallbacks[fullName];
if (waitingCallbacks) {
for (i = 0; i < waitingCallbacks.length; i++) {
waitingCallbacks[i].onDep(fullName, ret);
}
delete managerCallbacks[fullName];
}
}
return undefined;
}
function main(inName, depArray, callback, relModuleMap) {
var moduleMap = makeModuleMap(inName, relModuleMap),
name = moduleMap.name,
fullName = moduleMap.fullName,
uniques = {},
manager = {
//Use a wait ID because some entries are anon
//async require calls.
waitId: name || reqWaitIdPrefix + (waitIdCounter++),
depCount: 0,
depMax: 0,
prefix: moduleMap.prefix,
name: name,
fullName: fullName,
deps: {},
depArray: depArray,
callback: callback,
onDep: function (depName, value) {
if (!(depName in manager.deps)) {
manager.deps[depName] = value;
manager.depCount += 1;
if (manager.depCount === manager.depMax) {
//All done, execute!
execManager(manager);
}
}
}
},
i, depArg, depName, cjsMod;
if (fullName) {
//If module already defined for context, or already loaded,
//then leave. Also leave if jQuery is registering but it does
//not match the desired version number in the config.
if (fullName in defined || loaded[fullName] === true ||
config.jQuery !== callback().fn.jquery)) {
return;
}
//as part of a layer, where onScriptLoad is not fired
//for those cases. Do this after the inline define and
//dependency tracing is done.
specified[fullName] = true;
loaded[fullName] = true;
//If module is jQuery set up delaying its dom ready listeners.
jQueryCheck(callback());
}
}
//Add the dependencies to the deps field, and register for callbacks
//on the dependencies.
for (i = 0; i < depArray.length; i++) {
depArg = depArray[i];
//There could be cases like in IE, where a trailing comma will
//introduce a null dependency, so only treat a real dependency
//value as a dependency.
if (depArg) {
//Split the dependency name into plugin and name parts
depArg = makeModuleMap(depArg, (name ? moduleMap : relModuleMap));
depName = depArg.fullName;
//Fix the name in depArray to be just the name, since
//that is how it will be called back later.
depArray[i] = depName;
//Fast path CommonJS standard dependencies.
manager.deps[depName] = makeRequire(moduleMap);
//CommonJS module spec 1.1
manager.deps[depName] = defined[fullName] = {};
manager.usingExports = true;
//CommonJS module spec 1.1
manager.cjsModule = cjsMod = manager.deps[depName] = {
id: name,
uri: name ? context.nameToUrl(name, null, relModuleMap) : undefined,
exports: defined[fullName]
};
cjsMod.setExports = makeSetExports(cjsMod);
} else if (depName in defined && !(depName in waiting)) {
//Module already defined, no need to wait for it.
manager.deps[depName] = defined[depName];
} else if (!uniques[depName]) {
//A dynamic dependency.
manager.depMax += 1;
queueDependency(depArg);
//Register to get notification when dependency loads.
(managerCallbacks[depName] ||
(managerCallbacks[depName] = [])).push(manager);
uniques[depName] = true;
}
}
}
//Do not bother tracking the manager if it is all done.
if (manager.depCount === manager.depMax) {
//All done, execute!
execManager(manager);
} else {
waiting[manager.waitId] = manager;
waitAry.push(manager);
context.waitCount += 1;
}
}
/**
* Convenience method to call main for a define call that was put on
* hold in the defQueue.
*/
function callDefMain(args) {
main.apply(null, args);
//Mark the module loaded. Must do it here in addition
//to doing it in define in case a script does
//not call define
loaded[args[0]] = true;
}
/**
* jQuery 1.4.3+ supports ways to hold off calling
* calling jQuery ready callbacks until all scripts are loaded. Be sure
* to track it if the capability exists.. Also, since jQuery 1.4.3 does
* not register as a module, need to do some global inference checking.
* Even if it does register as a module, not guaranteed to be the precise
* name of the global. If a jQuery is tracked for this context, then go
* ahead and register it as a module too, if not already in process.
*/
jQueryCheck = function (jqCandidate) {
if (!context.jQuery) {
if ($) {
//If a specific version of jQuery is wanted, make sure to only
//use this jQuery if it matches.
if (config.jQuery && $.fn.jquery !== config.jQuery) {
return;
}
context.jQuery = $;
//or in process. Note this could trigger an attempt at
//a second jQuery registration, but does no harm since
//the first one wins, and it is the same value anyway.
return jQuery;
}]);
//Ask jQuery to hold DOM ready callbacks.
if (context.scriptCount) {
jQueryHoldReady($, true);
context.jQueryIncremented = true;
}
}
}
}
};
function forceExec(manager, traced) {
if (manager.isDone) {
return undefined;
}
var fullName = manager.fullName,
depArray = manager.depArray,
depName, i;
if (fullName) {
if (traced[fullName]) {
return defined[fullName];
}
traced[fullName] = true;
}
//forceExec all of its dependencies.
for (i = 0; i < depArray.length; i++) {
//Some array members may be null, like if a trailing comma
//IE, so do the explicit [i] access and check if it has a value.
depName = depArray[i];
if (depName) {
if (!manager.deps[depName] && waiting[depName]) {
manager.onDep(depName, forceExec(waiting[depName], traced));
}
}
}
return fullName ? defined[fullName] : undefined;
}
/**
* Checks if all modules for a context are loaded, and if so, evaluates the
* new ones in right dependency order.
*
* @private
*/
function checkLoaded() {
var waitInterval = config.waitSeconds * 1000,
//It is possible to disable the wait interval by using waitSeconds of 0.
expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
noLoads = "", hasLoadedProp = false, stillLoading = false, prop,
err, manager;
//If there are items still in the paused queue processing wait.
//This is particularly important in the sync case where each paused
//item is processed right away but there may be more waiting.
if (context.pausedCount > 0) {
return undefined;
}
//Determine if priority loading is done. If so clear the priority. If
//not, then do not check
if (config.priorityWait) {
if (isPriorityDone()) {
//Call resume, since it could have
//some waiting dependencies to trace.
resume();
} else {
return undefined;
}
}
//See if anything is still in flight.
for (prop in loaded) {
if (!(prop in empty)) {
hasLoadedProp = true;
if (!loaded[prop]) {
if (expired) {
noLoads += prop + " ";
} else {
stillLoading = true;
break;
}
}
}
}
//Check for exit conditions.
if (!hasLoadedProp && !context.waitCount) {
//If the loaded object had no items, then the rest of
//the work below does not need to be done.
return undefined;
}
if (expired && noLoads) {
//If wait time expired, throw error of unloaded modules.
err.requireModules = noLoads;
return req.onError(err);
}
if (stillLoading || context.scriptCount) {
//Something is still waiting to load. Wait for it, but only
//if a timeout is not already in effect.
if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
checkLoadedTimeoutId = setTimeout(function () {
checkLoadedTimeoutId = 0;
checkLoaded();
}, 50);
}
return undefined;
}
//If still have items in the waiting cue, but all modules have
//been loaded, then it means there are some circular dependencies
//that need to be broken.
//However, as a waiting thing is fired, then it can add items to
//the waiting cue, and those items should not be fired yet, so
//make sure to redo the checkLoaded call after breaking a single
//cycle, if nothing else loaded then this logic will pick it up
//again.
if (context.waitCount) {
//Cycle through the waitAry, and call items in sequence.
for (i = 0; (manager = waitAry[i]); i++) {
forceExec(manager, {});
}
//Only allow this recursion to a certain depth. Only
//triggered by errors in calling a module in which its
//modules waiting on it cannot finish loading, or some circular
//dependencies that then may add more dependencies.
//The value of 5 is a bit arbitrary. Hopefully just one extra
//pass, or two for the case of circular dependencies generating
//more work that gets resolved in the sync node case.
if (checkLoadedDepth < 5) {
checkLoadedDepth += 1;
checkLoaded();
}
}
checkLoadedDepth = 0;
//Check for DOM ready, and nothing is waiting across contexts.
req.checkReadyState();
return undefined;
}
function callPlugin(pluginName, dep) {
var name = dep.name,
fullName = dep.fullName,
load;
//Do not bother if plugin is already defined or being loaded.
if (fullName in defined || fullName in loaded) {
return;
}
if (!plugins[pluginName]) {
plugins[pluginName] = defined[pluginName];
}
//Only set loaded to false for tracking if it has not already been set.
if (!loaded[fullName]) {
loaded[fullName] = false;
}
load = function (ret) {
//Allow the build process to register plugin-loaded dependencies.
if (req.onPluginLoad) {
req.onPluginLoad(context, pluginName, name, ret);
}
execManager({
prefix: dep.prefix,
name: dep.name,
fullName: dep.fullName,
callback: function () {
return ret;
}
});
loaded[fullName] = true;
};
//Allow plugins to load other code without having to know the
load.fromText = function (moduleName, text) {
/*jslint evil: true */
var hasInteractive = useInteractive;
//Indicate a the module is in process of loading.
context.loaded[moduleName] = false;
context.scriptCount += 1;
//Turn off interactive script matching for IE for any define
//calls in the text, then turn it back on at the end.
if (hasInteractive) {
useInteractive = false;
}
req.exec(text);
if (hasInteractive) {
useInteractive = true;
}
//Support anonymous modules.
context.completeLoad(moduleName);
};
//Use parentName here since the plugin's name is not reliable,
//could be some weird string with no path that actually wants to
//reference the parentName's path.
plugins[pluginName].load(name, makeRequire(dep.parentMap, true), load, config);
}
function loadPaused(dep) {
//Renormalize dependency if its name was waiting on a plugin
//to load, which as since loaded.
if (dep.prefix && dep.name && dep.name.indexOf('__$p') === 0 && defined[dep.prefix]) {
dep = makeModuleMap(dep.originalName, dep.parentMap);
}
var pluginName = dep.prefix,
fullName = dep.fullName,
urlFetched = context.urlFetched;
//Do not bother if the dependency has already been specified.
if (specified[fullName] || loaded[fullName]) {
return;
} else {
specified[fullName] = true;
}
if (pluginName) {
//If plugin not loaded, wait for it.
//set up callback list. if no list, then register
//managerCallback for that plugin.
if (defined[pluginName]) {
callPlugin(pluginName, dep);
} else {
if (!pluginsQueue[pluginName]) {
pluginsQueue[pluginName] = [];
(managerCallbacks[pluginName] ||
(managerCallbacks[pluginName] = [])).push({
onDep: function (name, value) {
if (name === pluginName) {
var i, oldModuleMap, ary = pluginsQueue[pluginName];
//Now update all queued plugin actions.
for (i = 0; i < ary.length; i++) {
oldModuleMap = ary[i];
//Update the moduleMap since the
//module name may be normalized
//differently now.
callPlugin(pluginName,
makeModuleMap(oldModuleMap.originalName, oldModuleMap.parentMap));
}
delete pluginsQueue[pluginName];
}
}
});
}
pluginsQueue[pluginName].push(dep);
}
} else {
if (!urlFetched[dep.url]) {
req.load(context, fullName, dep.url);
urlFetched[dep.url] = true;
}
}
}
/**
* Resumes tracing of dependencies and then checks if everything is loaded.
*/
resume = function () {
var args, i, p;
resumeDepth += 1;
if (context.scriptCount <= 0) {
//Synchronous envs will push the number below zero with the
//decrement above, be sure to set it back to zero for good measure.
//require() calls that also do not end up loading scripts could
//push the number negative too.
context.scriptCount = 0;
}
//Make sure any remaining defQueue items get properly processed.
while (defQueue.length) {
args = defQueue.shift();
if (args[0] === null) {
return req.onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
} else {
callDefMain(args);
}
}
//Skip the resume of paused dependencies
//if current context is in priority wait.
if (!config.priorityWait || isPriorityDone()) {
while (context.paused.length) {
p = context.paused;
context.pausedCount += p.length;
//Reset paused list
context.paused = [];
for (i = 0; (args = p[i]); i++) {
loadPaused(args);
}
//Move the start time for timeout forward.
context.startTime = (new Date()).getTime();
context.pausedCount -= p.length;
}
}
//Only check if loaded when resume depth is 1. It is likely that
//it is only greater than 1 in sync environments where a factory
//function also then calls the callback-style require. In those
//cases, the checkLoaded should not occur until the resume
//depth is back at the top level.
if (resumeDepth === 1) {
checkLoaded();
}
resumeDepth -= 1;
return undefined;
};
//Define the context object. Many of these fields are on here
//just to make debugging easier.
context = {
contextName: contextName,
config: config,
defQueue: defQueue,
waiting: waiting,
waitCount: 0,
specified: specified,
loaded: loaded,
urlMap: urlMap,
scriptCount: 0,
urlFetched: {},
defined: defined,
paused: [],
pausedCount: 0,
plugins: plugins,
managerCallbacks: managerCallbacks,
makeModuleMap: makeModuleMap,
normalize: normalize,
/**
* Set a configuration for the context.
* @param {Object} cfg config object to integrate.
*/
configure: function (cfg) {
var paths, prop, packages, pkgs, packagePaths, requireWait;
//Make sure the baseUrl ends in a slash.
if (cfg.baseUrl) {
if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== "/") {
cfg.baseUrl += "/";
}
}
//Save off the paths and packages since they require special processing,
//they are additive.
paths = config.paths;
packages = config.packages;
pkgs = config.pkgs;
//Mix in the config values, favoring the new values over
//existing ones in context.config.
mixin(config, cfg, true);
//Adjust paths if necessary.
if (cfg.paths) {
for (prop in cfg.paths) {
if (!(prop in empty)) {
paths[prop] = cfg.paths[prop];
}
}
config.paths = paths;
}
packagePaths = cfg.packagePaths;
if (packagePaths || cfg.packages) {
//Convert packagePaths into a packages config.
if (packagePaths) {
for (prop in packagePaths) {
if (!(prop in empty)) {
configurePackageDir(pkgs, packagePaths[prop], prop);
}
}
}
//Adjust packages if necessary.
if (cfg.packages) {
configurePackageDir(pkgs, cfg.packages);
}
//Done with modifications, assing packages back to context config
config.pkgs = pkgs;
}
//If priority loading is in effect, trigger the loads now
if (cfg.priority) {
//Hold on to requireWait value, and reset it after done
requireWait = context.requireWait;
//Allow tracing some require calls to allow the fetching
//of the priority config.
context.requireWait = false;
//But first, call resume to register any defined modules that may
//be in a data-main built file before the priority config
//call. Also grab any waiting define calls for this context.
context.takeGlobalQueue();
resume();
context.require(cfg.priority);
//Trigger a resume right away, for the case when
//the script with the priority load is done as part
//of a data-main call. In that case the normal resume
//call will not happen because the scriptCount will be
//at 1, since the script for data-main is being processed.
resume();
//Restore previous state.
context.requireWait = requireWait;
config.priorityWait = cfg.priority;
}
//If a deps array or a config callback is specified, then call
//require with those args. This is useful when require is defined as a
//config object before require.js is loaded.
if (cfg.deps || cfg.callback) {
context.require(cfg.deps || [], cfg.callback);
}
//Set up ready callback, if asked. Useful when require is defined as a
//config object before require.js is loaded.
if (cfg.ready) {
req.ready(cfg.ready);
}
},
requireDefined: function (moduleName, relModuleMap) {
return makeModuleMap(moduleName, relModuleMap).fullName in defined;
},
requireSpecified: function (moduleName, relModuleMap) {
return makeModuleMap(moduleName, relModuleMap).fullName in specified;
},
require: function (deps, callback, relModuleMap) {
var moduleName, fullName, moduleMap;
//Synchronous access to one module. If require.get is
//available (as in the Node adapter), prefer that.
//In this case deps is the moduleName and callback is
//the relModuleMap
if (req.get) {
return req.get(context, deps, callback);
}
//Just return the module wanted. In this scenario, the
//second arg (if passed) is just the relModuleMap.
moduleName = deps;
relModuleMap = callback;
//Normalize module name, if it contains . or ..
moduleMap = makeModuleMap(moduleName, relModuleMap);
fullName = moduleMap.fullName;
if (!(fullName in defined)) {
moduleMap.fullName +
contextName));
}
return defined[fullName];
}
main(null, deps, callback, relModuleMap);
//If the require call does not trigger anything new to load,
//then resume the dependency processing.
if (!context.requireWait) {
while (!context.scriptCount && context.paused.length) {
//For built layers, there can be some defined
//modules waiting for intake into the context,
//in particular module plugins. Take them.
context.takeGlobalQueue();
resume();
}
}
return context.require;
},
/**
* Internal method to transfer globalQueue items to this context's
* defQueue.
*/
takeGlobalQueue: function () {
//Push all the globalDefQueue items into the context's defQueue
if (globalDefQueue.length) {
//Array splice in the values since the context code has a
//local var ref to defQueue, so cannot just reassign the one
//on context.
apsp.apply(context.defQueue,
[context.defQueue.length - 1, 0].concat(globalDefQueue));
globalDefQueue = [];
}
},
/**
* Internal method used by environment adapters to complete a load event.
* A load event could be a script load or just a load pass from a synchronous
* load call.
* @param {String} moduleName the name of the module to potentially complete.
*/
completeLoad: function (moduleName) {
var args;
context.takeGlobalQueue();
while (defQueue.length) {
args = defQueue.shift();
if (args[0] === null) {
args[0] = moduleName;
break;
} else if (args[0] === moduleName) {
//Found matching define call for this script!
break;
} else {
//Some other named define call, most likely the result
//of a build layer that included many define calls.
callDefMain(args);
args = null;
}
}
if (args) {
callDefMain(args);
} else {
//A script that does not call define(), so just simulate
//the call for it. Special exception for jQuery dynamic load.
callDefMain([moduleName, [],
function () {
return jQuery;
} : null]);
}
//Mark the script as loaded. Note that this can be different from a
//moduleName that maps to a define call. This line is important
//for traditional browser scripts.
loaded[moduleName] = true;
//If a global jQuery is defined, check for it. Need to do it here
//instead of main() since stock jQuery does not register as
//a module via define.
jQueryCheck();
//Doing this scriptCount decrement branching because sync envs
//need to decrement after resume, otherwise it looks like
//loading is complete after the first dependency is fetched.
//For browsers, it works fine to decrement after, but it means
//the checkLoaded setTimeout 50 ms cost is taken. To avoid
//that cost, decrement beforehand.
if (req.isAsync) {
context.scriptCount -= 1;
}
resume();
if (!req.isAsync) {
context.scriptCount -= 1;
}
},
/**
* Converts a module name + .extension into an URL path.
* *Requires* the use of a module name. It does not support using
* plain URLs like nameToUrl.
*/
toUrl: function (moduleNamePlusExt, relModuleMap) {
var index = moduleNamePlusExt.lastIndexOf("."),
ext = null;
if (index !== -1) {
ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
}
return context.nameToUrl(moduleNamePlusExt, ext, relModuleMap);
},
/**
* Converts a module name to a file path. Supports cases where
* moduleName may actually be just an URL.
*/
nameToUrl: function (moduleName, ext, relModuleMap) {
var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
config = context.config;
//Normalize module name if have a base relative module name to work from.
moduleName = normalize(moduleName, relModuleMap && relModuleMap.fullName);
//If a colon is in the URL, it indicates a protocol is used and it is just
//an URL to a file, or if it starts with a slash or ends with .js, it is just a plain file.
//The slash is important for protocol-less URLs as well as full paths.
if (req.jsExtRegExp.test(moduleName)) {
//Just a plain path, not module name lookup, so just return it.
//Add extension if it is included. This is a bit wonky, only non-.js things pass
//an extension, this method probably needs to be reworked.
url = moduleName + (ext ? ext : "");
} else {
//A module that needs to be converted to a path.
paths = config.paths;
pkgs = config.pkgs;
syms = moduleName.split("/");
//For each module name segment, see if there is a path
//registered for it. Start with most specific name
//and work up from it.
for (i = syms.length; i > 0; i--) {
parentModule = syms.slice(0, i).join("/");
if (paths[parentModule]) {
syms.splice(0, i, paths[parentModule]);
break;
} else if ((pkg = pkgs[parentModule])) {
//If module name is just the package name, then looking
//for the main module.
if (moduleName === pkg.name) {
pkgPath = pkg.location + '/' + pkg.main;
} else {
pkgPath = pkg.location;
}
syms.splice(0, i, pkgPath);
break;
}
}
//Join the path parts together, then figure out if baseUrl is needed.
url = (url.charAt(0) === '/' || url.match(/^\w+:/) ? "" : config.baseUrl) + url;
}
return config.urlArgs ? url +
((url.indexOf('?') === -1 ? '?' : '&') +
config.urlArgs) : url;
}
};
//Make these visible on the context so can be called at the very
//end of the file to bootstrap
context.jQueryCheck = jQueryCheck;
context.resume = resume;
return context;
}
/**
* Main entry point.
*
* If the only argument to require is a string, then the module that
* is represented by that string is fetched for the appropriate context.
*
* If the first argument is an array, then it will be treated as an array
* of dependency string names to fetch. An optional function callback can
* be specified to execute when all of those dependencies are available.
*
* Make a local req variable to help Caja compliance (it assumes things
* on a require that are not standardized), and to give a short
* name for minification/local scope use.
*/
req = requirejs = function (deps, callback) {
//Find the right context, use default
var contextName = defContextName,
context, config;
// Determine if have config object in the call.
// deps is a config object
config = deps;
if (isArray(callback)) {
// Adjust args if there are dependencies
deps = callback;
callback = arguments[2];
} else {
deps = [];
}
}
if (config && config.context) {
contextName = config.context;
}
context = contexts[contextName] ||
(contexts[contextName] = newContext(contextName));
if (config) {
context.configure(config);
}
return context.require(deps, callback);
};
/**
* Support require.config() to make it easier to cooperate with other
* AMD loaders on globally agreed names.
*/
req.config = function (config) {
return req(config);
};
/**
* Export require as a global, but only if it does not already exist.
*/
require = req;
}
/**
* Global require.toUrl(), to match global require, mostly useful
*/
req.toUrl = function (moduleNamePlusExt) {
return contexts[defContextName].toUrl(moduleNamePlusExt);
};
req.version = version;
req.isArray = isArray;
req.isFunction = isFunction;
req.mixin = mixin;
//Used to filter out dependencies that are already paths.
req.jsExtRegExp = /^\/|:|\?|\.js$/;
s = req.s = {
contexts: contexts,
//Stores a list of URLs that should not get async script tag treatment.
skipAsync: {},
isPageLoaded: !isBrowser,
readyCalls: []
};
req.isAsync = req.isBrowser = isBrowser;
if (isBrowser) {
//If BASE tag is in play, using appendChild is a problem for IE6.
//When that browser dies, this can be removed. Details in this jQuery bug:
if (baseElement) {
head = s.head = baseElement.parentNode;
}
}
/**
* Any errors that require explicitly generates will be passed to this
* @param {Error} err the error object.
*/
req.onError = function (err) {
throw err;
};
/**
* Does the request to load a module for the browser case.
* Make this a separate function to allow other environments
* to override it.
*
* @param {Object} context the require context to find state.
* @param {String} moduleName the name of the module.
* @param {Object} url the URL to the module.
*/
req.load = function (context, moduleName, url) {
var loaded = context.loaded;
isDone = false;
//Only set loaded to false for tracking if it has not already been set.
if (!loaded[moduleName]) {
loaded[moduleName] = false;
}
context.scriptCount += 1;
req.attach(url, context, moduleName);
//If tracking a jQuery, then make sure its ready callbacks
//are put on hold to prevent its ready callbacks from
//triggering too soon.
if (context.jQuery && !context.jQueryIncremented) {
jQueryHoldReady(context.jQuery, true);
context.jQueryIncremented = true;
}
};
function getInteractiveScript() {
var scripts, i, script;
if (interactiveScript && interactiveScript.readyState === 'interactive') {
return interactiveScript;
}
scripts = document.getElementsByTagName('script');
for (i = scripts.length - 1; i > -1 && (script = scripts[i]); i--) {
if (script.readyState === 'interactive') {
return (interactiveScript = script);
}
}
return null;
}
/**
* The function that handles definitions of modules. Differs from
* require() in that a string for the module should be the first argument,
* and the function to execute after dependencies are loaded should
* return a value to define the module corresponding to the first argument's
* name.
*/
define = req.def = function (name, deps, callback) {
var node, context;
//Allow for anonymous functions
if (typeof name !== 'string') {
//Adjust args appropriately
callback = deps;
deps = name;
name = null;
}
//This module may not have dependencies
if (!req.isArray(deps)) {
callback = deps;
deps = [];
}
//If no name, and callback is a function, then figure out if it a
//CommonJS thing with dependencies.
if (!name && !deps.length && req.isFunction(callback)) {
//Remove comments from the callback string,
//look for require calls, and pull them into the dependencies,
//but only if there are function args.
if (callback.length) {
callback
.toString()
.replace(commentRegExp, "")
.replace(cjsRequireRegExp, function (match, dep) {
deps.push(dep);
});
//May be a CommonJS thing even without require calls, but still
//could use exports, and module. Avoid doing exports and module
//work though if it just needs require.
//REQUIRES the function to expect the CommonJS variables in the
//order listed below.
}
}
//If in IE 6-8 and hit an anonymous define() call, do the interactive
//work.
if (useInteractive) {
node = currentlyAddingScript || getInteractiveScript();
if (node) {
if (!name) {
}
}
}
//Always save off evaluating the def call until the script onload handler.
//This allows multiple modules to be in a file without prematurely
//tracing dependencies, and allows for anonymous module support,
//where the module name is not known until the script onload event
//occurs. If no context, use the global queue, and get it processed
//in the onscript load callback.
(context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
return undefined;
};
define.amd = {
multiversion: true,
plugins: true,
jQuery: true
};
/**
* Executes the text. Normally just uses eval, but can be modified
* to use a more environment specific call.
*/
req.exec = function (text) {
return eval(text);
};
/**
* Executes a module callack function. Broken out as a separate function
* solely to allow the build system to sequence the files in the built
* layer in the right sequence.
*
* @private
*/
req.execCb = function (name, callback, args, exports) {
return callback.apply(exports, args);
};
/**
* callback for script loads, used to check status of loading.
*
* @param {Event} evt the event from the browser for the script
* that was loaded.
*
* @private
*/
req.onScriptLoad = function (evt) {
//Using currentTarget instead of target for Firefox 2.0's sake. Not
//all old browsers will be supported, but this one was easy enough
//to support and still makes sense.
var node = evt.currentTarget || evt.srcElement, contextName, moduleName,
context;
//Reset interactive script so a script node is not held onto for
//to long.
interactiveScript = null;
//Pull out the name of the module and the context.
context = contexts[contextName];
contexts[contextName].completeLoad(moduleName);
//Clean up script binding. Favor detachEvent because of IE9
//issue, see attachEvent/addEventListener comment elsewhere
//in this file.
if (node.detachEvent && !isOpera) {
//Probably IE. If not it will throw an error, which will be
//useful to know.
} else {
}
}
};
/**
* Attaches the script represented by the URL to the current
* environment. Right now only supports browser loading,
* but can be redefined in other environments to do the right thing.
* @param {String} url the url of the script to attach.
* @param {Object} context the context that wants the script.
* @param {moduleName} the name of the module that is associated with the script.
* @param {Function} [callback] optional callback, defaults to require.onScriptLoad
* @param {String} [type] optional type, defaults to text/javascript
*/
req.attach = function (url, context, moduleName, callback, type) {
var node, loaded;
if (isBrowser) {
//In the browser so use a script tag
callback = callback || req.onScriptLoad;
node = context && context.config && context.config.xhtml ?
//Use async so Gecko does not block on executing the script if something
//like a long-polling comet tag is being run first. Gecko likes
//to evaluate scripts in DOM order, even for dynamic scripts.
//It will fetch them async, but only evaluate the contents in DOM
//order, so a long-polling script tag can delay execution of scripts
//after it. But telling Gecko we expect async gets us the behavior
//we want -- execute it whenever it is finished downloading. Only
//Helps Firefox 3.6+
//Allow some URLs to not be fetched async. Mostly helps the order!
//plugin
if (context) {
}
//Set up load listener. Test attachEvent first because IE9 has
//a subtle issue in its addEventListener and script onload firings
//that do not match the behavior of all other browsers with
//addEventListener support, which fire the onload event for a
//script right after the script execution. See:
//UNFORTUNATELY Opera implements attachEvent but does not follow the script
//script execution mode.
//Probably IE. IE (at least 6-8) do not fire
//script onload right after executing the script, so
//we cannot tie the anonymous define call to a name.
//However, IE reports the script as being in "interactive"
//readyState at the time of the define call.
useInteractive = true;
} else {
}
//For some cache cases in IE 6-8, the script executes before the end
//of the appendChild execution, so to tie an anonymous define
//call to the module name (which is stored on the node), hold on
//to a reference to this node, but clear after the DOM insertion.
if (baseElement) {
} else {
}
currentlyAddingScript = null;
return node;
} else if (isWebWorker) {
//In a web worker, use importScripts. This is not a very
//efficient use of importScripts, importScripts will block until
//its script is downloaded and evaluated. However, if web workers
//are in play, the expectation that a build has been done so that
//only one script needs to be loaded anyway. This may need to be
//reevaluated if other use cases become common.
loaded[moduleName] = false;
//Account for anonymous modules
}
return null;
};
//Look for a data-main script attribute, which could also adjust the baseUrl.
if (isBrowser) {
//Figure out baseUrl. Get it from the script tag with require.js in it.
//Set the "head" where we can append children by
//using the script's parent.
if (!head) {
}
//Look for a data-main attribute to set main script for the page
//to load. If it is there, the path to data main becomes the
//baseUrl, if it is not already set.
//Pull off the directory of data-main for use as the
//baseUrl.
//Set final config.
//Strip off any trailing .js since dataMain is now
//like a module name.
}
//Put the data-main script in the files to load.
break;
}
}
}
//Set baseUrl based on config.
//****** START page load functionality ****************
/**
* Sets the page as loaded and triggers check for all modules loaded.
*/
req.pageLoaded = function () {
if (!s.isPageLoaded) {
s.isPageLoaded = true;
if (scrollIntervalId) {
}
//Part of a fix for FF < 3.6 where readyState was not set to
//complete so libraries like jQuery that check for readyState
//after page load where not getting initialized correctly.
//Original approach suggested by Andrea Giammarchi:
//see other setReadyState reference for the rest of the fix.
if (setReadyState) {
}
}
};
//See if there is nothing waiting across contexts, and if not, trigger
//callReady.
req.checkReadyState = function () {
return;
}
}
}
s.isDone = true;
};
/**
* Internal function that calls back any ready functions. If you are
* integrating RequireJS with another library without require.ready support,
* you can define this method to call your page ready code instead.
*/
if (s.isPageLoaded && s.isDone) {
s.readyCalls = [];
callback();
}
}
//If jQuery with DOM ready delayed, release it now.
if (context.jQueryIncremented) {
context.jQueryIncremented = false;
}
}
}
}
};
/**
* Registers functions to call when the page is loaded
*/
if (s.isPageLoaded && s.isDone) {
callback();
} else {
}
return req;
};
if (isBrowser) {
if (document.addEventListener) {
//Standards. Hooray! Assumption here that if standards based,
//it knows about DOMContentLoaded.
//Part of FF < 3.6 readystate fix (see setReadyState refs for more info)
if (!document.readyState) {
setReadyState = true;
}
} else if (window.attachEvent) {
//DOMContentLoaded approximation, as found by Diego Perini:
scrollIntervalId = setInterval(function () {
try {
//From this ticket:
//In IE HTML Application (HTA), such as in a selenium test,
//javascript in the iframe can't see anything outside
//of it, so self===self.top is true, but the iframe is
//not the top window and doScroll will be available
//before document.body is set. Test document.body
//before trying the doScroll trick.
req.pageLoaded();
}
} catch (e) {}
}, 30);
}
}
//Check if document already complete, and if so, just trigger page load
//listeners. NOTE: does not work with Firefox before 3.6. To support
//those browsers, manually call require.pageLoaded().
req.pageLoaded();
}
}
//****** END page load functionality ****************
//Set up default context. If require was a configuration object, use that as base config.
//If modules are built into require.js, then need to make sure dependencies are
//traced. Use a setTimeout in the browser world, to allow all the modules to register
//themselves. In a non-browser env, assume that modules are not built into require.js,
//which seems odd to do on the server.
//Indicate that the script that includes require() is still loading,
//so that require()'d dependencies are not traced until the end of the
//file is parsed (approximated via the setTimeout call).
ctx.requireWait = true;
setTimeout(function () {
ctx.requireWait = false;
//Any modules included with the require.js file will be in the
//global queue, assign them to this context.
//make sure to hold onto it for readyWait triggering.
ctx.jQueryCheck();
if (!ctx.scriptCount) {
}
}, 0);
}
}());
/*!
* jQuery JavaScript Library v1.6.4
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Includes Sizzle.js
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Mon Sep 12 18:54:48 2011 -0400
*/
// Use the correct document accordingly with window argument (sandbox)
var jQuery = (function() {
// Define a local copy of jQuery
// The jQuery object is actually just the init constructor 'enhanced'
},
// Map over jQuery in case of overwrite
// Map over the $ in case of overwrite
// A central reference to the root jQuery(document)
// A simple way to check for HTML strings or ID strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
// Check if a string has a non-whitespace character in it
rnotwhite = /\S/,
// Used for trimming whitespace
trimLeft = /^\s+/,
trimRight = /\s+$/,
// Check for digits
rdigit = /\d/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
// JSON RegExp
rvalidchars = /^[\],:{}\s]*$/,
rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
// Useragent RegExp
// Matches dashed string for camelizing
// Used by jQuery.camelCase as callback to replace()
},
// Keep a UserAgent string for use with jQuery.browser
// For matching the engine and version of the browser
// The deferred used on DOM ready
// The ready event handler
// Save a reference to some core methods
// [[Class]] -> type pairs
class2type = {};
// Handle $(""), $(null), or $(undefined)
if ( !selector ) {
return this;
}
// Handle $(DOMElement)
this.length = 1;
return this;
}
// The body element only exists once, optimize finding it
this.length = 1;
return this;
}
// Handle HTML strings
if ( typeof selector === "string" ) {
// Are we dealing with HTML string or an ID?
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
// Assume that strings that start and end with <> are HTML and skip the regex check
} else {
}
// Verify a match, and that no context was specified for #id
// HANDLE: $(html) -> $(array)
if ( match[1] ) {
// If a single string is passed in and it's a single tag
// just do a createElement and skip the rest
if ( ret ) {
} else {
}
} else {
}
// HANDLE: $("#id")
} else {
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
// Handle the case where IE and Opera return items
// by name instead of ID
}
// Otherwise, we inject the element directly into the jQuery object
this.length = 1;
this[0] = elem;
}
return this;
}
// HANDLE: $(expr, $(...))
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
} else {
}
// HANDLE: $(function)
// Shortcut for document ready
}
}
},
// Start with an empty selector
selector: "",
// The current version of jQuery being used
jquery: "1.6.4",
// The default length of a jQuery object is 0
length: 0,
// The number of elements contained in the matched element set
size: function() {
return this.length;
},
toArray: function() {
},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
return num == null ?
// Return a 'clean' array
this.toArray() :
// Return just the object
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
// Build a new jQuery matched element set
var ret = this.constructor();
} else {
}
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
if ( name === "find" ) {
} else if ( name ) {
}
// Return the newly-formed element set
return ret;
},
// Execute a callback for every element in the matched set.
// (You can seed the arguments with an array of args, but this is
// only used internally.)
},
// Attach the listeners
// Add the callback
return this;
},
eq: function( i ) {
return i === -1 ?
this.slice( i ) :
this.slice( i, +i + 1 );
},
first: function() {
return this.eq( 0 );
},
last: function() {
return this.eq( -1 );
},
slice: function() {
},
}));
},
end: function() {
return this.prevObject || this.constructor(null);
},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
};
// Give the init function the jQuery prototype for later instantiation
i = 1,
deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
// skip the boolean and the target
i = 2;
}
// Handle case when target is a string or something (possible in deep copy)
target = {};
}
// extend jQuery itself if only one argument is passed
if ( length === i ) {
target = this;
--i;
}
for ( ; i < length; i++ ) {
// Extend the base object
// Prevent never-ending loop
continue;
}
// Recurse if we're merging plain objects or arrays
if ( copyIsArray ) {
copyIsArray = false;
} else {
}
// Never move original objects, clone them
// Don't bring in undefined values
}
}
}
}
// Return the modified object
return target;
};
noConflict: function( deep ) {
}
}
return jQuery;
},
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
// A counter to track how many items to wait for before
// the ready event fires. See #6781
readyWait: 1,
// Hold (or release) the ready event
if ( hold ) {
} else {
}
},
// Handle when the DOM is ready
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
}
// Remember that the DOM is ready
// If a normal DOM Ready event fired, decrement, and wait if need be
return;
}
// If there are functions bound, to execute
// Trigger any bound ready events
}
}
},
bindReady: function() {
if ( readyList ) {
return;
}
// Catch cases where $(document).ready() is called after the
// browser event has already occurred.
// Handle it asynchronously to allow scripts the opportunity to delay ready
}
// Mozilla, Opera and webkit nightlies currently support this event
if ( document.addEventListener ) {
// Use the handy event callback
// A fallback to window.onload, that will always work
// If IE event model is used
} else if ( document.attachEvent ) {
// ensure firing before onload,
// maybe late but safe also for iframes
// A fallback to window.onload, that will always work
// If IE and not a frame
// continually check to see if the document is ready
var toplevel = false;
try {
} catch(e) {}
}
}
},
// Since version 1.3, DOM methods and functions like alert
// aren't supported. They return false on IE (#2968).
isFunction: function( obj ) {
},
},
// A crude way of determining if an object is a window
},
},
return obj == null ?
String( obj ) :
},
isPlainObject: function( obj ) {
// Must be an Object.
// Because of IE, we also have to check the presence of the constructor property.
// Make sure that DOM nodes and window objects don't pass through, as well
return false;
}
try {
// Not own constructor property must be Object
if ( obj.constructor &&
return false;
}
} catch ( e ) {
// IE8,9 Will throw exceptions on certain host objects #9897
return false;
}
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
var key;
},
isEmptyObject: function( obj ) {
return false;
}
return true;
},
throw msg;
},
return null;
}
// Attempt to parse using the native JSON parser first
}
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
return (new Function( "return " + data ))();
}
},
// Cross-browser xml parsing
try {
} else { // IE
}
} catch( e ) {
}
}
return xml;
},
noop: function() {},
// Evaluates a script in a global context
// Workarounds based on findings by Jim Driscoll
globalEval: function( data ) {
// We use execScript on Internet Explorer
// We use an anonymous function so that context is window
// rather than jQuery in Firefox
} )( data );
}
},
// Convert dashed to camelCase; used by the css and data modules
// Microsoft forgot to hump their vendor prefix (#9572)
},
},
// args is for internal usage only
var name, i = 0,
if ( args ) {
if ( isObj ) {
break;
}
}
} else {
for ( ; i < length; ) {
break;
}
}
}
// A special, fast, case for the most common use of each
} else {
if ( isObj ) {
break;
}
}
} else {
for ( ; i < length; ) {
break;
}
}
}
}
return object;
},
// Use native String.trim function wherever possible
function( text ) {
return text == null ?
"" :
} :
// Otherwise use our own trimming functionality
function( text ) {
return text == null ?
"" :
},
// results is for internal usage only
if ( array != null ) {
// The window, strings (and functions) also have 'length'
// The extra typeof function check is to prevent crashes
// in Safari 2 (See: #3039)
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
} else {
}
}
return ret;
},
if ( !array ) {
return -1;
}
if ( indexOf ) {
}
return i;
}
}
return -1;
},
j = 0;
}
} else {
}
}
return first;
},
// Go through the array, only saving the items
// that pass the validator function
}
}
return ret;
},
// arg is for internal usage only
i = 0,
// jquery objects are treated as arrays
isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
// Go through the array, translating each of the items to their
if ( isArray ) {
for ( ; i < length; i++ ) {
if ( value != null ) {
}
}
// Go through every key on the object,
} else {
if ( value != null ) {
}
}
}
// Flatten any nested arrays
},
// A global GUID counter for objects
guid: 1,
// Bind a function to a context, optionally partially applying any
// arguments.
if ( typeof context === "string" ) {
}
// Quick check to determine if target is callable, in the spec
// this throws a TypeError, but we will just return undefined.
return undefined;
}
// Simulated bind
proxy = function() {
};
// Set the guid of unique handler to the same of original handler, so it can be removed
return proxy;
},
// Mutifunctional method to get and set values to a collection
// The value/s can optionally be executed if it's a function
// Setting many attributes
if ( typeof key === "object" ) {
for ( var k in key ) {
}
return elems;
}
// Setting one attribute
// Optionally, function values get executed if exec is true
for ( var i = 0; i < length; i++ ) {
}
return elems;
}
// Getting an attribute
},
now: function() {
return (new Date()).getTime();
},
// Use of jQuery.browser is frowned upon.
// More details: http://docs.jquery.com/Utilities/jQuery.browser
[];
},
sub: function() {
}
jQuerySub.superclass = this;
}
};
return jQuerySub;
},
browser: {}
});
// Populate the class2type map
jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
});
if ( browserMatch.browser ) {
}
// Deprecated, use jQuery.browser.webkit instead
}
// IE doesn't match non-breaking spaces with \s
}
// All jQuery objects should point back to these
// Cleanup functions for the document ready method
if ( document.addEventListener ) {
DOMContentLoaded = function() {
};
} else if ( document.attachEvent ) {
DOMContentLoaded = function() {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
}
};
}
// The DOM ready check for Internet Explorer
function doScrollCheck() {
return;
}
try {
// If IE is used, use the trick by Diego Perini
} catch(e) {
return;
}
// and execute any waiting functions
}
return jQuery;
})();
var // Promise methods
// Static reference to slice
sliceDeferred = [].slice;
// Create a simple deferred (one callbacks list)
_Deferred: function() {
var // callbacks list
callbacks = [],
// stored [ context , args ]
// to avoid firing when already doing so
// flag to know if the deferred has been cancelled
// the deferred itself
deferred = {
// done( f1, f2, ...)
done: function() {
if ( !cancelled ) {
i,
elem,
type,
if ( fired ) {
fired = 0;
}
if ( type === "array" ) {
} else if ( type === "function" ) {
}
}
if ( _fired ) {
}
}
return this;
},
// resolve with given context and args
// make sure args are available (#8421)
firing = 1;
try {
while( callbacks[ 0 ] ) {
}
}
finally {
firing = 0;
}
}
return this;
},
// resolve with this as context and given arguments
resolve: function() {
return this;
},
// Has this deferred been resolved?
isResolved: function() {
},
// Cancel
cancel: function() {
cancelled = 1;
callbacks = [];
return this;
}
};
return deferred;
},
// Full fledged deferred (two callbacks list)
// Add errorDeferred methods, then and promise
return this;
},
always: function() {
},
} else {
}
});
} else {
}
});
}).promise();
},
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
if ( obj == null ) {
if ( promise ) {
return promise;
}
}
var i = promiseMethods.length;
while( i-- ) {
}
return obj;
}
});
// Make sure only one callback list will be used
// Unexpose cancel
// Call given func if any
if ( func ) {
}
return deferred;
},
// Deferred helper
when: function( firstParam ) {
i = 0,
function resolveFunc( i ) {
return function( value ) {
if ( !( --count ) ) {
// Strange bug in FF4:
// Values changed onto the arguments object sometimes end up as undefined values
// outside the $.when method. Cloning the object into a fresh array solves the issue
}
};
}
if ( length > 1 ) {
for( ; i < length; i++ ) {
} else {
--count;
}
}
if ( !count ) {
}
} else if ( deferred !== firstParam ) {
}
}
});
all,
a,
opt,
body,
tds,
i,
// Preliminary tests
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
// Can't get basic test support
return {};
}
// First batch of supports tests
support = {
// IE strips leading whitespace when .innerHTML is used
// Make sure that tbody elements aren't automatically inserted
// IE will insert them into empty tables
// Make sure that link elements get serialized correctly by innerHTML
// This requires a wrapper element in IE
// Get the style information from getAttribute
// (IE uses .cssText instead)
// Make sure that URLs aren't manipulated
// (IE normalizes it by default)
// Make sure that element opacity exists
// (IE uses filter instead)
// Use a regex to work around a WebKit issue. See #5145
// Verify style float existence
// (IE uses styleFloat instead of cssFloat)
// Make sure that if no value is specified for a checkbox
// that it defaults to "on".
// (WebKit defaults to "" instead)
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
// Will be defined later
submitBubbles: true,
changeBubbles: true,
focusinBubbles: false,
deleteExpando: true,
noCloneEvent: true,
inlineBlockNeedsLayout: false,
shrinkWrapBlocks: false,
reliableMarginRight: true
};
// Make sure checked status is properly cloned
// Make sure that the options inside disabled selects aren't marked as disabled
// (WebKit marks them as disabled)
// Test to see if it's possible to delete an expando from an element
// Fails in Internet Explorer
try {
} catch( e ) {
support.deleteExpando = false;
}
// Cloning a node shouldn't copy over any
// bound event handlers (IE does this)
support.noCloneEvent = false;
});
}
// Check if a radio maintains it's value
// after being appended to the DOM
// WebKit doesn't clone checked state correctly in fragments
// Figure out if the W3C box model works as expected
// We use our own, invisible, body unless the body is already present
// in which case we use a div (#9239)
testElementStyle = {
visibility: "hidden",
width: 0,
height: 0,
border: 0,
margin: 0,
background: "none"
};
if ( body ) {
position: "absolute",
left: "-1000px",
top: "-1000px"
});
}
for ( i in testElementStyle ) {
}
// Check if a disconnected checkbox will retain its checked
// value of true after appended to the DOM (IE6/7)
// Check if natively block-level elements act like inline-block
// elements when setting their display to 'inline' and giving
// them layout
// (IE < 8 does this)
// Check if elements with layout shrink-wrap their children
// (IE 6 does this)
}
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
// Check if table cells still have offsetWidth/Height when they are set
// to display:none and there are still other visible table cells in a
// table row; if so, offsetWidth/Height are not reliable for use when
// determining if an element has been hidden directly using
// display:none (it is still safe to use offsets if a parent element is
// hidden; don safety goggles and see bug #4512 for more information).
// (only IE 8 fails this test)
// Check if empty table cells still have offsetWidth/Height
// (IE < 8 fail this test)
// Check if div with explicit width and no margin-right incorrectly
// gets computed margin-right based on width of container. For more
// info see bug #3333
// Fails in WebKit before Feb 2011 nightlies
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
}
// Remove the body element we added
// Technique from Juriy Zaytsev
// We only care about the case where non-standard event systems
// are used, namely in IE. Short-circuiting here helps us to
// avoid an eval call (in setAttribute) which can cause CSP
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
if ( div.attachEvent ) {
for( i in {
submit: 1,
change: 1,
focusin: 1
} ) {
eventName = "on" + i;
if ( !isSupported ) {
}
}
}
// Null connected elements to avoid leaks in IE
return support;
})();
// Keep track of boxModel
var rbrace = /^(?:\{.*\}|\[.*\])$/,
rmultiDash = /([A-Z])/g;
cache: {},
// Please use with caution
uuid: 0,
// Unique for each copy of jQuery on the page
// Non-digits removed to match rinlinejQuery
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData: {
"embed": true,
// Ban all objects except for Flash (which handle expandos)
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
"applet": true
},
},
return;
}
// We have to handle DOM nodes and JS objects differently because IE6-7
// can't GC object references properly across the DOM-JS boundary
// Only DOM nodes need the global jQuery cache; JS object data is
// attached directly to the object so GC can occur automatically
// Only defining an ID for JS objects if its cache already exists allows
// the code to shortcut on the same path as a DOM node with no cache
// Avoid doing any more work than we need to when trying to get data on an
// object that has no data at all
if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) {
return;
}
if ( !id ) {
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
if ( isNode ) {
} else {
}
}
// TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
// metadata on plain JS objects when the object is serialized using
// JSON.stringify
if ( !isNode ) {
}
}
// shallow copied over onto the existing cache
if ( pvt ) {
} else {
}
}
// Internal jQuery data is stored in a separate object inside the object's data
// cache in order to avoid key collisions between internal data and user-defined
// data
if ( pvt ) {
if ( !thisCache[ internalKey ] ) {
thisCache[ internalKey ] = {};
}
}
}
// TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
// not attempt to inspect the internal events object using jQuery.data, as this
// internal data object is undocumented and subject to change.
}
// Check for both converted-to-camel and non-converted data property names
// If a data property was specified
if ( getByName ) {
// First Try to find as-is property data
// Test for null|undefined property data
if ( ret == null ) {
// Try to find the camelCased property
}
} else {
}
return ret;
},
return;
}
var thisCache,
// Reference to internal data cache key
// See jQuery.data for more information
// See jQuery.data for more information
// If there is already no cache entry for this object, there is no
// purpose in continuing
return;
}
if ( name ) {
if ( thisCache ) {
// Support interoperable removal of hyphenated or camelcased keys
}
// If there is no data left in the cache, we want to continue
// and let the cache object itself get destroyed
if ( !isEmptyDataObject(thisCache) ) {
return;
}
}
}
// See jQuery.data for more information
if ( pvt ) {
// Don't destroy the parent cache unless the internal data object
// had been the only thing left in it
return;
}
}
// Browsers that fail expando deletion also refuse to delete expandos on
// the window, but it will allow it on all other JS objects; other browsers
// don't care
// Ensure that `cache` is not a window object #10080
} else {
}
// We destroyed the entire user cache at once because it's faster than
// iterating through each key, but we need to continue to persist internal
// data if it existed
if ( internalCache ) {
// TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
// metadata on plain JS objects when the object is serialized using
// JSON.stringify
if ( !isNode ) {
}
// Otherwise, we need to eliminate the expando on the node to avoid
// false lookups in the cache for entries that no longer exist
} else if ( isNode ) {
// IE does not allow us to delete expando properties from nodes,
// nor does it have a removeAttribute function on Document nodes;
// we must handle all of these cases
} else if ( elem.removeAttribute ) {
} else {
}
}
},
// For internal use only.
},
// A method for determining if a DOM node can handle the data expando
acceptData: function( elem ) {
if ( match ) {
}
}
return true;
}
});
var data = null;
if ( typeof key === "undefined" ) {
if ( this.length ) {
}
}
}
}
return data;
} else if ( typeof key === "object" ) {
return this.each(function() {
});
}
// Try to fetch any internally stored data first
}
data;
} else {
return this.each(function() {
});
}
},
removeData: function( key ) {
return this.each(function() {
});
}
});
// If nothing was found internally, try to fetch any
// data from the HTML5 data-* attribute
if ( typeof data === "string" ) {
try {
data === "false" ? false :
data === "null" ? null :
data;
} catch( e ) {}
// Make sure we set the data so it isn't changed later
} else {
}
}
return data;
}
// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
// property to be considered empty objects; this property always exists in
// order to make sure JSON.stringify does not expose internal metadata
function isEmptyDataObject( obj ) {
if ( name !== "toJSON" ) {
return false;
}
}
return true;
}
if ( defer &&
// Give room for hard-coded callbacks to fire first
setTimeout( function() {
}
}, 0 );
}
}
if ( elem ) {
}
},
if ( force !== true ) {
force = false;
}
if ( elem ) {
if ( count ) {
} else {
}
}
},
if ( elem ) {
// Speed up dequeue by getting out quickly if this is just a lookup
if ( data ) {
} else {
}
}
return q || [];
}
},
// If the fx queue is dequeued, always remove the progress sentinel
if ( fn === "inprogress" ) {
}
if ( fn ) {
// Add a progress sentinel to prevent the fx queue from being
// automatically dequeued
if ( type === "fx" ) {
}
});
}
}
}
});
if ( typeof type !== "string" ) {
type = "fx";
}
}
return this.each(function() {
}
});
},
return this.each(function() {
});
},
// Based off of the plugin by Clint Helfers, with permission.
var elem = this;
setTimeout(function() {
}, time );
});
},
clearQueue: function( type ) {
},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
if ( typeof type !== "string" ) {
}
elements = this,
count = 1,
tmp;
function resolve() {
if ( !( --count ) ) {
}
}
while( i-- ) {
count++;
}
}
resolve();
}
});
var rclass = /[\n\t\r]/g,
rspace = /\s+/,
rreturn = /\r/g,
rclickable = /^a(?:rea)?$/i,
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
},
removeAttr: function( name ) {
return this.each(function() {
});
},
},
removeProp: function( name ) {
return this.each(function() {
try {
delete this[ name ];
} catch( e ) {}
});
},
var classNames, i, l, elem,
return this.each(function( j ) {
});
}
for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
} else {
}
}
}
}
}
}
return this;
},
removeClass: function( value ) {
return this.each(function( j ) {
});
}
for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
if ( value ) {
}
} else {
}
}
}
}
return this;
},
return this.each(function( i ) {
});
}
return this.each(function() {
if ( type === "string" ) {
// toggle individual class names
var className,
i = 0,
while ( (className = classNames[ i++ ]) ) {
// check each className given, space seperated list
}
if ( this.className ) {
// store className if set
}
// toggle whole className
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
}
});
},
for ( var i = 0, l = this.length; i < l; i++ ) {
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
return true;
}
}
return false;
},
elem = this[0];
if ( elem ) {
return ret;
}
return typeof ret === "string" ?
// handle most common string cases
}
return undefined;
}
return this.each(function( i ) {
if ( this.nodeType !== 1 ) {
return;
}
if ( isFunction ) {
} else {
}
if ( val == null ) {
val = "";
} else if ( typeof val === "number" ) {
val += "";
});
}
// If set returns undefined, fall back to normal setting
}
});
}
});
valHooks: {
option: {
// attributes.value is undefined in Blackberry 4.7 but
// uses .value. See #6932
}
},
select: {
var value,
values = [],
// Nothing was selected
if ( index < 0 ) {
return null;
}
// Loop through all the selected options
// Don't return options that are disabled or in a disabled optgroup
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
// Get the specific value for the option
// We don't need an array for one selects
if ( one ) {
return value;
}
// Multi-Selects return an array
}
}
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
}
return values;
},
});
}
return values;
}
}
},
attrFn: {
val: true,
css: true,
html: true,
text: true,
data: true,
width: true,
height: true,
offset: true
},
attrFix: {
// Always normalize to ensure hook usage
tabindex: "tabIndex"
},
return undefined;
}
}
// Fallback to prop when attributes are not supported
if ( !("getAttribute" in elem) ) {
}
// Normalize the name if needed
if ( notxml ) {
if ( !hooks ) {
// Use boolHook for boolean attributes
// Use nodeHook if available( IE6/7 )
} else if ( nodeHook ) {
}
}
}
if ( value === null ) {
return undefined;
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
} else {
return value;
}
return ret;
} else {
// Non-existent attributes return null, we normalize to undefined
return ret === null ?
ret;
}
},
var propName;
// Set corresponding property to false for boolean attributes
}
}
},
attrHooks: {
type: {
// We can't allow the type property to be changed (since it causes problems in IE)
// Setting the type on a radio button after the value resets the value in IE6-9
// Reset value to it's default in case type is set after value
// This is for element creation
if ( val ) {
}
return value;
}
}
},
// Use the value property for back compat
// Use the nodeHook for button elements in IE6/7 (#1954)
value: {
}
null;
},
}
// Does not return so that setAttribute is also used
}
}
},
propFix: {
tabindex: "tabIndex",
readonly: "readOnly",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
rowspan: "rowSpan",
colspan: "colSpan",
usemap: "useMap",
frameborder: "frameBorder",
contenteditable: "contentEditable"
},
return undefined;
}
if ( notxml ) {
// Fix name and attach hooks
}
return ret;
} else {
}
} else {
return ret;
} else {
}
}
},
propHooks: {
tabIndex: {
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
0 :
}
}
}
});
// Add the tabindex propHook to attrHooks for back-compat
// Hook for boolean attributes
boolHook = {
// Align boolean attributes with corresponding properties
// Fall back to attribute presence where some booleans are not supported
var attrNode;
return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ?
name.toLowerCase() :
},
var propName;
if ( value === false ) {
// Remove boolean attributes when set to false
} else {
// value is true since we know at this point it's type boolean and not false
// Set boolean attributes to the same name and set the DOM property
// Only set the IDL specifically if it already exists on the element
}
}
return name;
}
};
// IE6/7 do not support getting/setting some attributes with get/setAttribute
// Use this for any attribute in IE6/7
// This fixes almost every IE6/7 issue
var ret;
// Return undefined if nodeValue is empty string
},
// Set the existing or create a new attribute node
if ( !ret ) {
}
}
};
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
// This is for removals
if ( value === "" ) {
return value;
}
}
});
});
}
// Some attributes require a special call on IE
}
});
});
}
// Return undefined in the case of empty string
// Normalize to lowercase since IE uppercases css property names
},
}
};
}
// Safari mis-reports the default selected property of an option
// Accessing the parent's selectedIndex property fixes it
if ( parent ) {
// Make sure that it also works with optgroups, see #5701
if ( parent.parentNode ) {
}
}
return null;
}
});
}
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
}
};
});
}
}
}
});
});
var rnamespaces = /\.(.*)$/,
rperiod = /\./g,
rspaces = / /g,
rescape = /[^\w\s.|`]/g,
};
/*
* A number of helper functions used for managing events.
* Many of the ideas behind this code originated from
* Dean Edwards' addEvent library.
*/
// Bind an event to an element
// Original by Dean Edwards
return;
}
if ( handler === false ) {
} else if ( !handler ) {
// Fixes bug #7229. Fix recommended by jdalton
return;
}
var handleObjIn, handleObj;
}
// Make sure that the function being executed has a unique ID
}
// Init the element's event structure
// If no elemData is found then we must be trying to bind to one of the
// banned noData elements
if ( !elemData ) {
return;
}
if ( !events ) {
}
if ( !eventHandle ) {
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
};
}
// Add elem as a property of the handle function
// This is to prevent a memory leak with non-native events in IE.
// Handle multiple events separated by a space
// jQuery(...).bind("mouseover mouseout", fn);
handleObj = handleObjIn ?
// Namespaced event handlers
} else {
namespaces = [];
}
}
// Get the current list of functions bound to this event
// Init the event handler queue
if ( !handlers ) {
// Check for a special event handler
// Only use addEventListener/attachEvent if the special
// events handler returns false
// Bind the global event handler to the element
if ( elem.addEventListener ) {
} else if ( elem.attachEvent ) {
}
}
}
}
}
// Add the function to the element's handler list
// Keep track of which events have been used, for event optimization
}
// Nullify elem to prevent memory leaks in IE
elem = null;
},
global: {},
// Detach an event or set of events from an element
// don't do events on text and comment nodes
return;
}
if ( handler === false ) {
}
return;
}
// types is actually an event object here
}
// Unbind all events for the element
}
return;
}
// Handle multiple events separated by a space
// jQuery(...).unbind("mouseover mouseout", fn);
handleObj = null;
namespaces = [];
if ( !all ) {
// Namespaced event handlers
namespace = new RegExp("(^|\\.)" +
}
if ( !eventType ) {
continue;
}
if ( !handler ) {
}
}
continue;
}
// remove the given handler for the given type
if ( pos == null ) {
}
}
}
if ( pos != null ) {
break;
}
}
}
// remove generic event handler if no more handlers exist
}
ret = null;
}
}
// Remove the expando if it's no longer used
if ( handle ) {
}
}
}
},
// Events that are safe to short-circuit if no handlers are attached.
// Native DOM events should not be added, they may have inline handlers.
customEvent: {
"getData": true,
"setData": true,
"changeData": true
},
// Event object or event type
namespaces = [],
// Exclusive events trigger only for the exact event (no namespaces)
exclusive = true;
}
// Namespaced trigger; create a regexp to match event type in handle()
namespaces.sort();
}
// No jQuery handlers for this event type, and it can't have inline handlers
return;
}
// Caller can pass in an Event, Object, or just an event type string
// jQuery.Event object
// Object literal
// Just the event type (string)
// triggerHandler() and global events don't bubble or run the default action
if ( onlyHandlers || !elem ) {
}
// Handle a global trigger
if ( !elem ) {
// TODO: Stop taunting the data cache; remove global events and always attach to document
// internalKey variable is just used to make it easier to find
// and potentially change this stuff later; currently it just
// points to jQuery.expando
internalCache = this[ internalKey ];
}
});
return;
}
// Don't do events on text and comment nodes
return;
}
// Clean up the event in case it is being reused
// Clone any incoming data and prepend the event, creating the handler arg list
// IE doesn't like method names with a colon (#3533, #8272)
// Fire event on the current element, then bubble up the DOM tree
do {
if ( handle ) {
}
// Trigger an inline bound script
if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
}
// Bubble up to document, then to window
// If nobody prevented the default action, do it now
if ( !event.isDefaultPrevented() ) {
var old,
// Call a native DOM method on the target with the same name name as the event.
// Can't use an .isFunction)() check here because IE6/7 fails that test.
try {
// Don't re-trigger an onFOO event when we call its FOO() method
if ( old ) {
}
}
} catch ( ieError ) {}
if ( old ) {
}
}
}
},
// Use the fix-ed Event rather than the (read-only) native event
event.currentTarget = this;
// Triggered event must 1) be non-exclusive and have no namespace, or
// 2) have namespace(s) a subset or equal to those in the bound event.
// Pass in a reference to the handler function itself
// So that we can later remove it
if ( ret === false ) {
}
}
if ( event.isImmediatePropagationStopped() ) {
break;
}
}
}
},
props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
return event;
}
// store a copy of the original event object
// and "clone" to set read-only properties
var originalEvent = event;
}
// Fix target property, if necessary
// Fixes #1925 where srcElement might not be defined either
}
// check if target is a textnode (safari)
}
// Add relatedTarget, if necessary
}
// Calculate pageX/Y if missing and clientX/Y available
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
}
// Add which for key events
}
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
}
// Add which for click: 1 === left; 2 === middle; 3 === right
// Note: button is not normalized, so don't use it
}
return event;
},
// Deprecated, use jQuery.guid instead
guid: 1E8,
// Deprecated, use jQuery.proxy instead
special: {
ready: {
// Make sure the ready event is setup
},
live: {
},
}
},
beforeunload: {
// We only want to do this special case on windows
this.onbeforeunload = eventHandle;
}
},
if ( this.onbeforeunload === eventHandle ) {
this.onbeforeunload = null;
}
}
}
}
};
if ( elem.removeEventListener ) {
}
} :
if ( elem.detachEvent ) {
}
};
// Allow instantiation without the 'new' keyword
if ( !this.preventDefault ) {
}
// Event object
this.originalEvent = src;
// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
// Event type
} else {
}
// Put explicitly provided properties onto the event object
if ( props ) {
}
// timeStamp is buggy for some events on Firefox(#3843)
// So we won't rely on the native value
// Mark it as fixed
};
function returnFalse() {
return false;
}
function returnTrue() {
return true;
}
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
preventDefault: function() {
this.isDefaultPrevented = returnTrue;
var e = this.originalEvent;
if ( !e ) {
return;
}
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
// otherwise set the returnValue property of the original event to false (IE)
} else {
e.returnValue = false;
}
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;
var e = this.originalEvent;
if ( !e ) {
return;
}
// if stopPropagation exists run it on the original event
if ( e.stopPropagation ) {
e.stopPropagation();
}
// otherwise set the cancelBubble property of the original event to true (IE)
e.cancelBubble = true;
},
stopImmediatePropagation: function() {
this.stopPropagation();
},
};
// Checks if an event happened on an element within another element
// Used in jQuery.event.special.mouseenter and mouseleave handlers
var withinElement = function( event ) {
// Check if mouse(over|out) are still within the same parent element
inside = false,
if ( related !== this ) {
if ( related ) {
}
if ( !inside ) {
}
}
},
// In case of event delegation, we only need to rename the event.type,
// liveHandler will take care of the rest.
};
// Create mouseenter and mouseleave events
mouseenter: "mouseover",
mouseleave: "mouseout"
},
}
};
});
// submit delegation
// Avoid triggering error on non-existent type attribute in IE VML (#7071)
}
});
if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
}
});
} else {
return false;
}
},
teardown: function( namespaces ) {
}
};
}
// change delegation, happens here so we have bind.
var changeFilters,
} else if ( type === "select-multiple" ) {
}).join("-") :
"";
}
return val;
},
testChange = function testChange( e ) {
return;
}
// the current data will be also retrieved by beforeactivate
}
return;
}
e.type = "change";
}
};
filters: {
click: function( e ) {
testChange.call( this, e );
}
},
// Change has to be called before submit
// Keydown will be called before keypress, which is used in submit-event delegation
keydown: function( e ) {
type === "select-multiple" ) {
testChange.call( this, e );
}
},
// Beforeactivate happens also before the previous element is blurred
// with this event you can't trigger a change event, but you can store
// information
beforeactivate: function( e ) {
}
},
if ( this.type === "file" ) {
return false;
}
for ( var type in changeFilters ) {
}
},
teardown: function( namespaces ) {
}
};
// Handle when the input is .focus()'d
}
// Piggyback on a donor event to simulate a different one.
// Fake originalEvent to avoid donor's stopPropagation, but if the
// simulated event prevents default then we do the same on the donor.
// Don't pass args or remember liveFired; they apply to the donor event.
event.originalEvent = {};
if ( event.isDefaultPrevented() ) {
}
}
// Create "bubbling" focus and blur events
var attaches = 0;
setup: function() {
if ( attaches++ === 0 ) {
}
},
teardown: function() {
if ( --attaches === 0 ) {
}
}
};
// Donor event is always a native one; fix it and switch its type.
e.originalEvent = {};
if ( e.isDefaultPrevented() ) {
}
}
});
}
var handler;
// Handle object literals
if ( typeof type === "object" ) {
}
return this;
}
}
if ( name === "one" ) {
};
} else {
}
} else {
for ( var i = 0, l = this.length; i < l; i++ ) {
}
}
return this;
};
});
// Handle object literals
}
} else {
for ( var i = 0, l = this.length; i < l; i++ ) {
}
}
return this;
},
},
return this.unbind( "live" );
} else {
}
},
return this.each(function() {
});
},
if ( this[0] ) {
}
},
// Save reference to arguments for access in closure
i = 0,
// Figure out which function to execute
// Make sure that clicks stop
// and execute the function
};
// link all the functions, so any of them can unbind this click handler
}
},
}
});
var liveMap = {
focus: "focusin",
blur: "focusout",
mouseenter: "mouseover",
mouseleave: "mouseout"
};
}
return this;
}
return this;
}
}
namespaces = "";
if ( match ) {
}
if ( type === "hover" ) {
continue;
}
} else {
}
if ( name === "live" ) {
// bind live handler
{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
}
} else {
// unbind live handler
}
}
return this;
};
});
function liveHandler( event ) {
elems = [],
selectors = [],
// Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
return;
}
}
} else {
}
}
if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
related = null;
// Those two events require additional checking
// Make sure not to accidentally match a child element with the same selector
}
}
}
}
}
}
break;
}
if ( ret === false ) {
stop = false;
}
if ( event.isImmediatePropagationStopped() ) {
break;
}
}
}
return stop;
}
return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
}
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
// Handle event binding
if ( fn == null ) {
data = null;
}
};
}
});
/*!
* Sizzle CSS Selector Engine
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
* More information: http://sizzlejs.com/
*/
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
done = 0,
toString = Object.prototype.toString,
hasDuplicate = false,
baseHasDuplicate = true,
rBackslash = /\\/g,
rNonWord = /\W/;
// Here we check if the JavaScript engine is using some sort of
// optimization where it does not always call our comparision
// function. If that is the case, discard the hasDuplicate value.
// Thus far that includes Google Chrome.
[0, 0].sort(function() {
baseHasDuplicate = false;
return 0;
});
var Sizzle = function( selector, context, results, seed ) {
results = results || [];
context = context || document;
var origContext = context;
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
if ( !selector || typeof selector !== "string" ) {
return results;
}
var m, set, checkSet, extra, ret, cur, pop, i,
prune = true,
contextXML = Sizzle.isXML( context ),
parts = [],
soFar = selector;
// Reset the position of the chunker regexp (start from head)
do {
chunker.exec( "" );
m = chunker.exec( soFar );
if ( m ) {
soFar = m[3];
parts.push( m[1] );
if ( m[2] ) {
extra = m[3];
break;
}
}
} while ( m );
if ( parts.length > 1 && origPOS.exec( selector ) ) {
if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
set = posProcess( parts[0] + parts[1], context );
} else {
set = Expr.relative[ parts[0] ] ?
[ context ] :
Sizzle( parts.shift(), context );
while ( parts.length ) {
selector = parts.shift();
if ( Expr.relative[ selector ] ) {
selector += parts.shift();
}
set = posProcess( selector, set );
}
}
} else {
// Take a shortcut and set the context if the root selector is an ID
}
if ( context ) {
Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
} else {
prune = false;
}
cur = "";
} else {
}
if ( pop == null ) {
}
}
} else {
}
}
if ( !checkSet ) {
}
if ( !checkSet ) {
}
if ( !prune ) {
for ( i = 0; checkSet[i] != null; i++ ) {
if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
}
}
} else {
for ( i = 0; checkSet[i] != null; i++ ) {
}
}
}
} else {
}
if ( extra ) {
}
return results;
};
if ( sortOrder ) {
if ( hasDuplicate ) {
}
}
}
}
return results;
};
};
};
var set;
if ( !expr ) {
return [];
}
var match,
if ( set != null ) {
break;
}
}
}
}
if ( !set ) {
[];
}
};
result = [],
anyFound = false;
continue;
}
result = [];
}
if ( !match ) {
} else if ( match === true ) {
continue;
}
}
if ( match ) {
if ( item ) {
if ( pass ) {
anyFound = true;
} else {
curLoop[i] = false;
}
} else if ( pass ) {
anyFound = true;
}
}
}
}
if ( !inplace ) {
}
if ( !anyFound ) {
return [];
}
break;
}
}
}
// Improper expression
if ( anyFound == null ) {
} else {
break;
}
}
}
return curLoop;
};
throw "Syntax error, unrecognized expression: " + msg;
};
match: {
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
},
leftMatch: {},
attrMap: {
"class": "className",
"for": "htmlFor"
},
attrHandle: {
href: function( elem ) {
return elem.getAttribute( "href" );
},
type: function( elem ) {
return elem.getAttribute( "type" );
}
},
relative: {
"+": function(checkSet, part){
var isPartStr = typeof part === "string",
isTag = isPartStr && !rNonWord.test( part ),
isPartStrNotTag = isPartStr && !isTag;
if ( isTag ) {
part = part.toLowerCase();
}
for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
if ( (elem = checkSet[i]) ) {
while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
elem || false :
elem === part;
}
}
if ( isPartStrNotTag ) {
Sizzle.filter( part, checkSet, true );
}
},
">": function( checkSet, part ) {
var elem,
isPartStr = typeof part === "string",
i = 0,
l = checkSet.length;
if ( isPartStr && !rNonWord.test( part ) ) {
part = part.toLowerCase();
for ( ; i < l; i++ ) {
elem = checkSet[i];
if ( elem ) {
var parent = elem.parentNode;
checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
}
}
} else {
for ( ; i < l; i++ ) {
elem = checkSet[i];
if ( elem ) {
checkSet[i] = isPartStr ?
elem.parentNode :
elem.parentNode === part;
}
}
if ( isPartStr ) {
Sizzle.filter( part, checkSet, true );
}
}
},
"": function(checkSet, part, isXML){
var nodeCheck,
doneName = done++,
checkFn = dirCheck;
if ( typeof part === "string" && !rNonWord.test( part ) ) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
}
checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
},
"~": function( checkSet, part, isXML ) {
var nodeCheck,
doneName = done++,
checkFn = dirCheck;
if ( typeof part === "string" && !rNonWord.test( part ) ) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
}
checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
}
},
find: {
ID: function( match, context, isXML ) {
if ( typeof context.getElementById !== "undefined" && !isXML ) {
var m = context.getElementById(match[1]);
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
return m && m.parentNode ? [m] : [];
}
},
NAME: function( match, context ) {
if ( typeof context.getElementsByName !== "undefined" ) {
var ret = [],
results = context.getElementsByName( match[1] );
for ( var i = 0, l = results.length; i < l; i++ ) {
if ( results[i].getAttribute("name") === match[1] ) {
ret.push( results[i] );
}
}
return ret.length === 0 ? null : ret;
}
},
TAG: function( match, context ) {
if ( typeof context.getElementsByTagName !== "undefined" ) {
return context.getElementsByTagName( match[1] );
}
}
},
preFilter: {
CLASS: function( match, curLoop, inplace, result, not, isXML ) {
match = " " + match[1].replace( rBackslash, "" ) + " ";
if ( isXML ) {
return match;
}
for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
if ( elem ) {
if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
if ( !inplace ) {
result.push( elem );
}
} else if ( inplace ) {
curLoop[i] = false;
}
}
}
return false;
},
ID: function( match ) {
return match[1].replace( rBackslash, "" );
},
TAG: function( match, curLoop ) {
return match[1].replace( rBackslash, "" ).toLowerCase();
},
CHILD: function( match ) {
if ( match[1] === "nth" ) {
if ( !match[2] ) {
Sizzle.error( match[0] );
}
match[2] = match[2].replace(/^\+|\s*/g, '');
var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
// calculate the numbers (first)n+(last) including if they are negative
match[2] = (test[1] + (test[2] || 1)) - 0;
match[3] = test[3] - 0;
}
else if ( match[2] ) {
Sizzle.error( match[0] );
}
// TODO: Move to normal caching system
match[0] = done++;
return match;
},
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1] = match[1].replace( rBackslash, "" );
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
// Handle if an un-quoted value was used
match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
if ( match[2] === "~=" ) {
match[4] = " " + match[4] + " ";
}
return match;
},
PSEUDO: function( match, curLoop, inplace, result, not ) {
if ( match[1] === "not" ) {
} else {
if ( !inplace ) {
}
return false;
}
return true;
}
return match;
},
return match;
}
},
filters: {
},
},
},
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
}
},
return !!elem.firstChild;
},
return !elem.firstChild;
},
},
},
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
},
},
},
},
},
},
},
},
},
},
}
},
setFilters: {
return i === 0;
},
},
return i % 2 === 0;
},
return i % 2 === 1;
},
},
},
},
}
},
filter: {
if ( filter ) {
} else if ( name === "contains" ) {
return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
} else if ( name === "not" ) {
return false;
}
}
return true;
} else {
}
},
switch ( type ) {
case "only":
case "first":
return false;
}
}
if ( type === "first" ) {
return true;
}
case "last":
return false;
}
}
return true;
case "nth":
return true;
}
var count = 0;
}
}
}
if ( first === 0 ) {
return diff === 0;
} else {
}
}
},
},
},
},
return result == null ?
type === "!=" :
type === "=" ?
type === "*=" ?
type === "~=" ?
!check ?
type === "!=" ?
type === "^=" ?
type === "$=" ?
type === "|=" ?
false;
},
if ( filter ) {
}
}
}
};
};
Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
}
if ( results ) {
return results;
}
return array;
};
// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
// Also verifies that the returned array holds DOM nodes
// (which is not the case in the Blackberry browser)
try {
// Provide a fallback method if it does not work
} catch( e ) {
var i = 0,
} else {
}
} else {
for ( ; array[i]; i++ ) {
}
}
}
return ret;
};
}
var sortOrder, siblingCheck;
sortOrder = function( a, b ) {
if ( a === b ) {
hasDuplicate = true;
return 0;
}
if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
}
};
} else {
sortOrder = function( a, b ) {
// The nodes are identical, we can exit early
if ( a === b ) {
hasDuplicate = true;
return 0;
// Fallback to using sourceIndex (in IE) if it's available on both nodes
} else if ( a.sourceIndex && b.sourceIndex ) {
return a.sourceIndex - b.sourceIndex;
}
ap = [],
bp = [],
aup = a.parentNode,
bup = b.parentNode,
// If the nodes are siblings (or identical) we can do a quick check
return siblingCheck( a, b );
// If no parents were found then the nodes are disconnected
} else if ( !aup ) {
return -1;
} else if ( !bup ) {
return 1;
}
// Otherwise they're somewhere else in the tree so we need
// to build up a full list of the parentNodes for comparison
while ( cur ) {
}
while ( cur ) {
}
// Start walking down the tree looking for a discrepancy
}
}
// We ended someplace up the tree so do a sibling check
return i === al ?
};
siblingCheck = function( a, b, ret ) {
if ( a === b ) {
return ret;
}
var cur = a.nextSibling;
while ( cur ) {
if ( cur === b ) {
return -1;
}
}
return 1;
};
}
// Utility function for retreiving the text value of an array of DOM nodes
for ( var i = 0; elems[i]; i++ ) {
// Get the text from text nodes and CDATA nodes
// Traverse everything else, except comment nodes
}
}
return ret;
};
// Check to see if the browser returns elements by name when
// querying by getElementById (and provide a workaround)
(function(){
// We're going to inject a fake input element with a specified name
// Inject it into the root element, check its status, and remove it quickly
// The workaround has to do additional checks after a getElementById
// Which slows things down for other browsers (hence the branching)
return m ?
m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
[m] :
[];
}
};
};
}
// release memory in IE
})();
(function(){
// Check to see if the browser returns only elements
// when doing getElementsByTagName("*")
// Create a fake element
// Make sure no comments are found
// Filter out possible comments
var tmp = [];
for ( var i = 0; results[i]; i++ ) {
}
}
}
return results;
};
}
// Check to see if an attribute returns normalized href attributes
};
}
// release memory in IE
div = null;
})();
if ( document.querySelectorAll ) {
(function(){
id = "__sizzle__";
// Safari can't handle uppercase or unicode characters when
// in quirks mode.
return;
}
// Only use querySelectorAll on non-XML documents
// (ID selectors don't work in non-HTML documents)
// See if we find a selector to speed up
// Speed-up: Sizzle("TAG")
if ( match[1] ) {
// Speed-up: Sizzle(".CLASS")
}
}
// Speed-up: Sizzle("body")
// The body element only exists once, optimize finding it
// Speed-up: Sizzle("#ID")
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
// Handle the case where IE and Opera return items
// by name instead of ID
}
} else {
}
}
try {
} catch(qsaError) {}
// qSA works strangely on Element-rooted queries
// We can work around this by specifying an extra ID on the root
// and working up from there (Thanks to Andrew Dupont for the technique)
// IE 8 doesn't work on object elements
var oldContext = context,
if ( !old ) {
} else {
}
if ( relativeHierarchySelector && hasParent ) {
context = context.parentNode;
}
try {
if ( !relativeHierarchySelector || hasParent ) {
return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
}
} catch(pseudoError) {
} finally {
if ( !old ) {
oldContext.removeAttribute( "id" );
}
}
}
}
return oldSizzle(query, context, extra, seed);
};
for ( var prop in oldSizzle ) {
Sizzle[ prop ] = oldSizzle[ prop ];
}
// release memory in IE
div = null;
})();
}
(function(){
var html = document.documentElement,
matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
if ( matches ) {
// on a disconnected node (IE 9 fails this)
pseudoWorks = false;
try {
// This should fail with an exception
// Gecko does not error, returns false instead
} catch( pseudoError ) {
pseudoWorks = true;
}
// Make sure that attribute selectors are quoted
if ( !Sizzle.isXML( node ) ) {
try {
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
var ret = matches.call( node, expr );
if ( ret || !disconnectedMatch ||
// As well, disconnected nodes are said to be in a document
// fragment in IE 9, so check for that
return ret;
}
}
} catch(e) {}
}
};
}
})();
(function(){
// Opera can't find a second classname (in 9.6)
// Also, make sure that getElementsByClassName actually exists
return;
}
// Safari caches class attributes, doesn't catch changes (in 3.2)
return;
}
}
};
// release memory in IE
div = null;
})();
if ( elem ) {
var match = false;
while ( elem ) {
break;
}
}
break;
}
}
}
}
}
if ( elem ) {
var match = false;
while ( elem ) {
break;
}
if ( !isXML ) {
}
if ( typeof cur !== "string" ) {
match = true;
break;
}
break;
}
}
}
}
}
}
};
return !!(a.compareDocumentPosition(b) & 16);
};
} else {
return false;
};
}
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
};
var match,
tmpSet = [],
later = "",
// Position selectors must be done after the filter
// And so must :not(positional) so we move all PSEUDOs to the end
}
}
};
// EXPOSE
})();
// Note: This RegExp should be improved, or likely pulled from Sizzle
rmultiselector = /,/,
isSimple = /^.[^:#\[\.,]*$/,
// methods guaranteed to produce a unique set when starting from a unique set
guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
var self = this,
i, l;
if ( typeof selector !== "string" ) {
return true;
}
}
});
}
length, n, r;
for ( i = 0, l = this.length; i < l; i++ ) {
if ( i > 0 ) {
// Make sure that the results are unique
for ( r = 0; r < length; r++ ) {
break;
}
}
}
}
}
return ret;
},
return this.filter(function() {
return true;
}
}
});
},
},
},
},
// Array
matches = {},
level = 1;
}
}
}
}
level++;
}
}
return ret;
}
// String
0;
for ( i = 0, l = this.length; i < l; i++ ) {
cur = this[i];
while ( cur ) {
break;
} else {
break;
}
}
}
}
},
// Determine the position of an element within
// the matched set of elements
// No argument, return index in parent
if ( !elem ) {
}
// index in selector
if ( typeof elem === "string" ) {
}
// Locate the position of the desired element
// If it receives a jQuery object, the first element is used
},
all :
},
andSelf: function() {
return this.add( this.prevObject );
}
});
// A painfully simple check to see if an element is disconnected
// from a document (should be improved, where feasible).
function isDisconnected( node ) {
}
},
},
},
},
},
},
},
},
},
},
},
}
// The variable 'args' was introduced in
// to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
}
}
}
};
});
if ( not ) {
}
},
var matched = [],
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
}
}
return matched;
},
var num = 0;
break;
}
}
return cur;
},
var r = [];
for ( ; n; n = n.nextSibling ) {
r.push( n );
}
}
return r;
}
});
// Implement the identical functionality for filter and not
// Can't pass null or undefined to indexOf in Firefox 4
// Set to 0 to skip string check
});
});
} else if ( typeof qualifier === "string" ) {
});
} else {
}
}
});
}
rleadingWhitespace = /^\s+/,
rtagName = /<([\w:]+)/,
rhtml = /<|&#?\w+;/,
// checked="checked" or checked
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
wrapMap = {
};
// IE can't serialize <link> and <script> tags normally
}
return this.each(function(i) {
});
}
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
}
},
return this.each(function(i) {
});
}
if ( this[0] ) {
// The elements to wrap the target around
if ( this[0].parentNode ) {
}
var elem = this;
}
return elem;
}).append( this );
}
return this;
},
return this.each(function(i) {
});
}
return this.each(function() {
} else {
}
});
},
return this.each(function() {
});
},
unwrap: function() {
}
}).end();
},
append: function() {
if ( this.nodeType === 1 ) {
this.appendChild( elem );
}
});
},
prepend: function() {
if ( this.nodeType === 1 ) {
}
});
},
before: function() {
});
}
},
after: function() {
});
return set;
}
},
// keepData is for internal use only--do not document
}
if ( elem.parentNode ) {
}
}
}
return this;
},
empty: function() {
// Remove element nodes and prevent memory leaks
}
// Remove any remaining nodes
while ( elem.firstChild ) {
}
}
return this;
},
return this.map( function () {
});
},
null;
// See if we can take a shortcut and just use innerHTML
try {
for ( var i = 0, l = this.length; i < l; i++ ) {
// Remove element nodes and prevent memory leaks
if ( this[i].nodeType === 1 ) {
}
}
// If using innerHTML throws an exception, use the fallback method
} catch(e) {
}
this.each(function(i){
});
} else {
}
return this;
},
replaceWith: function( value ) {
// Make sure that the elements are removed from the DOM before they are inserted
// this can help fix replacing a parent with child elements
return this.each(function(i) {
});
}
if ( typeof value !== "string" ) {
}
return this.each(function() {
var next = this.nextSibling,
parent = this.parentNode;
if ( next ) {
} else {
}
});
} else {
return this.length ?
this;
}
},
},
scripts = [];
// We can't cloneNode fragments that contain checked, in WebKit
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
return this.each(function() {
});
}
return this.each(function(i) {
});
}
if ( this[0] ) {
// If we're in a fragment, just use that instead of building a new one
if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
} else {
}
} else {
}
if ( first ) {
table ?
this[i],
// Make sure that we do not leak memory by inadvertently discarding
// the original fragment (which might have attached data) instead of
// using it; in addition, use the original fragment object for the last
// item instead of first because it can end up being emptied incorrectly
// in certain situations (Bug #8070).
// Fragments from the fragment cache must always be cloned and never used
// in place.
);
}
}
}
}
return this;
}
});
elem;
}
return;
}
// Switch to use the internal data object, if it exists, for the next
// stage of data copying
if ( events ) {
jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
}
}
}
}
}
var nodeName;
// We do not need to do anything for non-Elements
return;
}
// clearAttributes removes the attributes, which we don't want,
// but also removes the attachEvent events, which we *do* want
if ( dest.clearAttributes ) {
}
// mergeAttributes, in contrast, only merges back on the
// original attributes, not the events
if ( dest.mergeAttributes ) {
}
// IE6-8 fail to clone children inside object elements that use
// the proprietary classid attribute value (rather than the type
// attribute) to identify the type of content to display
if ( nodeName === "object" ) {
// IE6-8 fails to persist the checked state of a cloned checkbox
// or radio button. Worse, IE6-7 fail to give the cloned element
// a checked appearance if the defaultChecked value isn't also set
}
// IE6-7 get confused and end up setting the value of a cloned
}
// IE6-8 fails to return the selected option to the default selected
// state when cloning options
} else if ( nodeName === "option" ) {
// IE6-8 fails to set the defaultValue to the correct value when
// cloning other types of input fields
}
// Event data gets referenced instead of copied if the expando
// gets copied too
}
// nodes may contain either an explicit document object,
// a jQuery collection or context object.
// If nodes[0] contains a valid object to assign to doc
}
// Ensure that an attr object doesn't incorrectly stand in as a document object
// Chrome and Firefox seem to allow this to occur and will throw exception
// Fixes #8950
if ( !doc.createDocumentFragment ) {
}
// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
// Cloning options loses the selected state, so don't cache them
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
cacheable = true;
}
}
if ( !fragment ) {
}
if ( cacheable ) {
}
};
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
var ret = [],
return this;
} else {
}
}
};
});
if ( "getElementsByTagName" in elem ) {
} else if ( "querySelectorAll" in elem ) {
} else {
return [];
}
}
// Used in clean, fixes the defaultChecked property
function fixDefaultChecked( elem ) {
}
}
// Finds all inputs and passes them to fixDefaultChecked
function findInputs( elem ) {
} else if ( "getElementsByTagName" in elem ) {
}
}
i;
// IE copies events bound via attachEvent when using cloneNode.
// Calling detachEvent on the clone will also remove the events
// from the original. In order to get around this, we use some
// proprietary methods to clear the events. Thanks to MooTools
// guys for this hotness.
// Using Sizzle here is crazy slow, so we use getElementsByTagName
// instead
// Weird iteration because IE will replace the length property
// with an element if you are cloning the body and one of the
// elements on the page has a name or id of "length"
for ( i = 0; srcElements[i]; ++i ) {
// Ensure that the destination node is not null; Fixes #9587
if ( destElements[i] ) {
}
}
}
// Copy the events from the original to the clone
if ( dataAndEvents ) {
if ( deepDataAndEvents ) {
for ( i = 0; srcElements[i]; ++i ) {
}
}
}
srcElements = destElements = null;
// Return the cloned set
return clone;
},
var checkScriptType;
// !context.createElement fails in IE with an error but returns typeof 'object'
}
var ret = [], j;
if ( typeof elem === "number" ) {
elem += "";
}
if ( !elem ) {
continue;
}
// Convert html string into DOM nodes
if ( typeof elem === "string" ) {
} else {
// Fix "XHTML"-style tags in all browsers
// Trim whitespace, otherwise indexOf won't work as expected
// Go to html and back, then peel off extra wrappers
// Move to the right depth
while ( depth-- ) {
}
// Remove IE's autoinserted <tbody> from table fragments
// String was a <table>, *may* have spurious <tbody>
// String was a bare <thead> or <tfoot>
[];
}
}
}
// IE completely kills leading whitespace when innerHTML is used
}
}
}
// Resets defaultChecked for any radios and checkboxes
// about to be appended to the DOM in IE 6/7 (#8060)
var len;
for ( j = 0; j < len; j++ ) {
findInputs( elem[j] );
}
} else {
findInputs( elem );
}
}
} else {
}
}
if ( fragment ) {
checkScriptType = function( elem ) {
};
for ( i = 0; ret[i]; i++ ) {
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
} else {
}
}
}
}
return ret;
},
continue;
}
if ( id ) {
// This is a shortcut to avoid jQuery.event.remove's overhead
} else {
}
}
// Null the DOM reference to avoid IE6/7/8 leak (#7054)
}
}
if ( deleteExpando ) {
} else if ( elem.removeAttribute ) {
}
}
}
}
});
function evalScript( i, elem ) {
async: false,
dataType: "script"
});
} else {
jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
}
if ( elem.parentNode ) {
}
}
// fixed for IE9, see #8346
rnum = /^-?\d/,
// Setting 'undefined' is a no-op
return this;
}
});
};
// Add in style property hooks for overriding the default
// behavior of getting and setting a style property
cssHooks: {
opacity: {
if ( computed ) {
// We should always get a number back from opacity
} else {
}
}
}
},
// Exclude the following css properties to add px
cssNumber: {
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps: {
// normalize float css property
},
// Get and set the style property on a DOM Node
// Don't set styles on text and comment nodes
return;
}
// Make sure that we're working with the right name
// Check if we're setting a value
// convert relative number strings (+= or -=) to relative numbers. #7345
// Fixes bug #9237
type = "number";
}
// Make sure that NaN and null values aren't set. See: #7116
return;
}
// If a number was passed in, add 'px' to the (except for certain CSS properties)
value += "px";
}
// If a hook was provided, use that value, otherwise just set the specified value
// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
// Fixes bug #5509
try {
} catch(e) {}
}
} else {
// If a hook was provided get the non-computed value from there
return ret;
}
// Otherwise just get the value from the style object
}
},
// Make sure that we're working with the right name
// cssFloat needs a special treatment
if ( name === "cssFloat" ) {
name = "float";
}
// If a hook was provided get the computed value from there
return ret;
// Otherwise, if a way to get the computed value exists, use that
} else if ( curCSS ) {
}
},
var old = {};
// Remember the old values, and insert the new ones
}
// Revert the old values
}
}
});
// DEPRECATED, Use jQuery.css() instead
var val;
if ( computed ) {
} else {
});
}
return val;
}
},
// ignore negative width and height values #1599
if ( value >= 0 ) {
return value + "px";
}
} else {
return value;
}
}
};
});
// IE uses filters for opacity
return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
},
// IE has trouble with opacity if it does not have layout
// Force it by setting the zoom level
// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
// if "filter:" is present at all, clearType is disabled, we want to avoid this
// style.removeAttribute is IE Only, but so apparently is this code path...
// if there there is no filter style applied in a css rule, we are done
return;
}
}
// otherwise, set new filter values
}
};
}
jQuery(function() {
// This hook cannot be added until DOM ready because the support test
// for it is not run until after DOM ready
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// Work around by temporarily setting element display to inline-block
var ret;
if ( computed ) {
} else {
}
});
return ret;
}
};
}
});
return undefined;
}
}
}
return ret;
};
}
var left,
// From the awesome hack by Dean Edwards
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
// If we're not dealing with a regular pixel number
// but a number that has a weird ending, we need to convert it to pixels
// Remember the original values
// Put in the new values to get a computed value out
if ( rsLeft ) {
}
// Revert the changed values
if ( rsLeft ) {
}
}
};
}
// Start with offset property
if ( val > 0 ) {
if ( extra !== "border" ) {
if ( !extra ) {
}
if ( extra === "margin" ) {
} else {
}
});
}
return val + "px";
}
// Fall back to computed then uncomputed css if necessary
}
// Normalize "", auto, and prepare for extra
// Add padding, border, margin
if ( extra ) {
if ( extra !== "padding" ) {
}
if ( extra === "margin" ) {
}
});
}
return val + "px";
}
return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
};
};
}
var r20 = /%20/g,
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rhash = /#.*$/,
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
// #7653, #8125, #8152: local protocol detection
rprotocol = /^\/\//,
rquery = /\?/,
rspacesAjax = /\s+/,
rts = /([?&])_=[^&]*/,
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
// Keep a copy of the old load method
/* Prefilters
* 2) These are called:
* - BEFORE asking for a transport
* - AFTER param serialization (s.data is a string if s.processData is true)
* 3) key is the dataType
* 4) the catchall symbol "*" can be used
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
*/
prefilters = {},
/* Transports bindings
* 1) key is the dataType
* 2) the catchall symbol "*" can be used
* 3) selection will start with transport dataType and THEN go to "*" if needed
*/
transports = {},
// Document location
// Document location segments
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try {
} catch( e ) {
// Use the href attribute of an A element
// since IE will modify it given document.location
}
// Segment location into parts
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {
// dataTypeExpression is optional and defaults to "*"
return function( dataTypeExpression, func ) {
if ( typeof dataTypeExpression !== "string" ) {
dataTypeExpression = "*";
}
i = 0,
list,
// For each dataType in the dataTypeExpression
for(; i < length; i++ ) {
// We control if we're asked to add before
// any existing element
if ( placeBefore ) {
}
// then we add to the structure accordingly
}
}
};
}
// Base inspection function for prefilters and transports
i = 0,
// If we got redirected to another dataType
// we try there if executing only and not done already
if ( typeof selection === "string" ) {
} else {
}
}
}
// If we're only executing or nothing was selected
// we try the catchall dataType if not done already
}
// unnecessary when only executing (prefilters)
// but it'll be ignored by the caller in that case
return selection;
}
// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
}
}
if ( deep ) {
}
}
// Don't do a request if no elements are being requested
} else if ( !this.length ) {
return this;
}
if ( off >= 0 ) {
}
// Default to a GET request
var type = "GET";
// If the second parameter was provided
if ( params ) {
// If it's a function
// We assume that it's the callback
// Otherwise, build a param string
} else if ( typeof params === "object" ) {
type = "POST";
}
}
var self = this;
// Request the remote document
dataType: "html",
// Complete callback (responseText is used internally)
// Store the response as specified by the jqXHR object
// If successful, inject the HTML into all the matched elements
if ( jqXHR.isResolved() ) {
// #4825: Get the actual response in case
// a dataFilter is present in ajaxSettings
responseText = r;
});
// See if a selector was specified
// Create a dummy div to hold the results
jQuery("<div>")
// inject the contents of the document in, removing the scripts
// to avoid any 'Permission Denied' errors in IE
// Locate the specified elements
// If not, just inject the full result
responseText );
}
if ( callback ) {
}
}
});
return this;
},
serialize: function() {
},
serializeArray: function() {
return this.map(function(){
})
.filter(function(){
})
return val == null ?
null :
}) :
}).get();
}
});
// Attach a bunch of functions for handling common AJAX events
jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
return this.bind( o, f );
};
});
// shift arguments if data argument was omitted
}
});
};
});
},
},
// Creates a full fledged settings object into target
// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
if ( settings ) {
// Building a settings object
} else {
// Extending ajaxSettings
}
return target;
},
ajaxSettings: {
global: true,
type: "GET",
processData: true,
async: true,
/*
timeout: 0,
data: null,
dataType: null,
username: null,
password: null,
cache: null,
traditional: false,
headers: {},
*/
accepts: {
xml: "application/xml, text/xml",
json: "application/json, text/javascript",
"*": allTypes
},
contents: {
},
xml: "responseXML",
text: "responseText"
},
// List of data converters
// 1) key format is "source_type destination_type" (a single space in-between)
// 2) the catchall symbol "*" can be used for source_type
converters: {
// Convert anything to text
"* text": window.String,
// Text to html (true = no transformation)
"text html": true,
// Evaluate text as a json expression
// Parse text as xml
},
// For options that shouldn't be deep extended:
// you can add your own custom options here if
// and when you create one that shouldn't be
// deep extended (see ajaxExtend)
flatOptions: {
context: true,
url: true
}
},
// Main method
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
}
// Force options to be an object
var // Create the final options object
// Callbacks context
callbackContext = s.context || s,
// Context for global events
// It's the callbackContext if one was provided in the options
// and if it's a DOM node or a jQuery collection
globalEventContext = callbackContext !== s &&
// Deferreds
// Status-dependent callbacks
statusCode = s.statusCode || {},
// ifModified key
// Headers (they are sent all at once)
requestHeaders = {},
requestHeadersNames = {},
// Response headers
// transport
// timeout handle
// Cross-domain detection vars
// The jqXHR state
state = 0,
// To know if global events are to be dispatched
// Loop variable
i,
// Fake xhr
jqXHR = {
readyState: 0,
// Caches the header
if ( !state ) {
}
return this;
},
// Raw string
getAllResponseHeaders: function() {
},
// Builds headers hashtable if needed
getResponseHeader: function( key ) {
var match;
if ( state === 2 ) {
if ( !responseHeaders ) {
responseHeaders = {};
}
}
}
},
// Overrides response content-type header
overrideMimeType: function( type ) {
if ( !state ) {
}
return this;
},
// Cancel the request
abort: function( statusText ) {
if ( transport ) {
}
return this;
}
};
// Callback for when everything is done
// It is defined here because jslint complains if it is declared
// at the end of the function (which would be more logical and readable)
// Called once
if ( state === 2 ) {
return;
}
// State is "done" now
state = 2;
// Clear timeout if it exists
if ( timeoutTimer ) {
}
// Dereference transport for early garbage collection
// (no matter how long the jqXHR object will be used)
// Cache response headers
// Set readyState
var isSuccess,
etag;
// If successful, handle type chaining
if ( s.ifModified ) {
}
}
}
// If not modified
if ( status === 304 ) {
statusText = "notmodified";
isSuccess = true;
// If we have data
} else {
try {
statusText = "success";
isSuccess = true;
} catch(e) {
// We have a parsererror
statusText = "parsererror";
error = e;
}
}
} else {
// We extract error from statusText
// then normalize statusText and status for non-aborts
error = statusText;
if( !statusText || status ) {
statusText = "error";
if ( status < 0 ) {
status = 0;
}
}
}
// Set data for the fake xhr object
if ( isSuccess ) {
} else {
}
// Status-dependent callbacks
if ( fireGlobals ) {
}
// Complete
if ( fireGlobals ) {
// Handle the global AJAX counter
}
}
}
// Attach deferreds
// Status-dependent callbacks
if ( map ) {
var tmp;
if ( state < 2 ) {
}
} else {
}
}
return this;
};
// Remove hash character (#7531: and string promotion)
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
// We also use the url parameter if available
s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
// Extract dataTypes list
// Determine if a cross-domain request is in order
if ( s.crossDomain == null ) {
s.crossDomain = !!( parts &&
);
}
// Convert data if not already a string
}
// Apply prefilters
// If request was aborted inside a prefiler, stop there
if ( state === 2 ) {
return false;
}
// We can fire global events as of now if asked to
fireGlobals = s.global;
// Uppercase the type
// Determine if request has content
// Watch for a new set of requests
}
// More options handling for requests with no content
if ( !s.hasContent ) {
// If data is available, append data to url
if ( s.data ) {
// #9682: remove data so that it's not used in an eventual retry
delete s.data;
}
// Get ifModifiedKey before adding the anti-cache parameter
ifModifiedKey = s.url;
// Add anti-cache in url if needed
if ( s.cache === false ) {
// try replacing _= if it is there
// if nothing was replaced, add timestamp to the end
}
}
// Set the correct header, if data is being sent
}
if ( s.ifModified ) {
}
}
}
// Set the Accepts header for the server, depending on the dataType
"Accept",
s.accepts[ "*" ]
);
// Check for headers option
for ( i in s.headers ) {
}
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
// Abort if not done already
return false;
}
// Install callbacks on deferreds
jqXHR[ i ]( s[ i ] );
}
// Get transport
// If no transport, we auto-abort
if ( !transport ) {
} else {
// Send global event
if ( fireGlobals ) {
}
// Timeout
timeoutTimer = setTimeout( function(){
}, s.timeout );
}
try {
state = 1;
} catch (e) {
// Propagate exception as error if not done
if ( state < 2 ) {
done( -1, e );
// Simply rethrow otherwise
} else {
}
}
}
return jqXHR;
},
// Serialize an array of form elements or a set of
param: function( a, traditional ) {
var s = [],
// If value is a function, invoke it and return its value
};
// Set traditional to true for jQuery <= 1.3.2 behavior.
if ( traditional === undefined ) {
}
// If an array was passed in, assume that it is an array of form elements.
// Serialize the form elements
});
} else {
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
for ( var prefix in a ) {
}
}
// Return the resulting serialization
}
});
// Serialize array item.
// Treat each array item as a scalar.
} else {
// If array item is non-scalar (array or object), encode its
// numeric index to resolve deserialization ambiguity issues.
// Note that rack (as of 1.0.0) can't currently deserialize
// nested arrays properly, and attempting to do so may cause
// a server error. Possible fixes are to modify rack's
// deserialization algorithm or to provide an option or flag
// to force array serialization to be shallow.
buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
}
});
// Serialize object item.
}
} else {
// Serialize scalar item.
}
}
// This is still on the jQuery object... for now
// Want to move this to jQuery.ajax some day
// Counter for holding the number of active queries
active: 0,
// Last-Modified header cache for next request
lastModified: {},
etag: {}
});
/* Handles responses to an ajax request:
* - sets all responseXXX fields accordingly
* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
*/
ct,
type,
// Fill responseXXX fields
for( type in responseFields ) {
}
}
// Remove auto dataType and get content-type in the process
}
}
// Check if we're dealing with a known content-type
if ( ct ) {
break;
}
}
}
// Check to see if we have a response for the expected dataType
} else {
// Try convertible dataTypes
break;
}
if ( !firstDataType ) {
}
}
// Or just use first one
}
// If we found a dataType
// We add the dataType to the list if needed
// and return the corresponding response
if ( finalDataType ) {
}
return responses[ finalDataType ];
}
}
// Chain conversions given the request and the original response
function ajaxConvert( s, response ) {
// Apply the dataFilter if provided
if ( s.dataFilter ) {
}
converters = {},
i,
key,
tmp,
// Current and previous dataTypes
prev,
// Conversion expression
// Conversion function
conv,
// Conversion functions (transitive conversion)
// For each dataType in the chain
for( i = 1; i < length; i++ ) {
// Create converters map
// with lowercased keys
if ( i === 1 ) {
for( key in s.converters ) {
if( typeof key === "string" ) {
}
}
}
// Get the dataTypes
// If current is auto dataType, update it to prev
if( current === "*" ) {
// If no auto and dataTypes are actually different
// Get the converter
// If there is no direct converter, search transitively
if ( !conv ) {
for( conv1 in converters ) {
if ( conv2 ) {
if ( conv1 === true ) {
} else if ( conv2 === true ) {
}
break;
}
}
}
}
// If we found no converter, dispatch an error
}
// If found converter is not an equivalence
if ( conv !== true ) {
// Convert with 1 or 2 converters accordingly
}
}
}
return response;
}
jsre = /(\=)\?(&|$)|\?\?/i;
// Default jsonp settings
jsonp: "callback",
jsonpCallback: function() {
}
});
// Detect, normalize options and install callbacks for jsonp requests
( typeof s.data === "string" );
var responseContainer,
jsonpCallback = s.jsonpCallback =
if ( s.jsonp !== false ) {
if ( inspectData ) {
}
// Add callback manually
}
}
}
// Install callback
responseContainer = [ response ];
};
// Clean-up function
// Set callback back to previous value
// Call if it was a function and we have a response
}
});
// Use data converter to retrieve json after script execution
s.converters["script json"] = function() {
if ( !responseContainer ) {
}
return responseContainer[ 0 ];
};
// force json dataType
// Delegate to script
return "script";
}
});
// Install script dataType
accepts: {
},
contents: {
},
converters: {
"text script": function( text ) {
return text;
}
}
});
// Handle cache's special case and global
s.cache = false;
}
if ( s.crossDomain ) {
s.type = "GET";
s.global = false;
}
});
// Bind script tag hack transport
// This transport only deals with cross domain requests
if ( s.crossDomain ) {
var script,
return {
if ( s.scriptCharset ) {
}
// Attach handlers for all browsers
// Handle memory leak in IE
// Remove the script
}
// Dereference the script
// Callback if not abort
if ( !isAbort ) {
}
}
};
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
// This arises when a base node is used (#2709 and #4378).
},
abort: function() {
if ( script ) {
}
}
};
}
});
var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
// Abort all pending requests
for ( var key in xhrCallbacks ) {
}
} : false,
xhrId = 0,
// Functions to create xhrs
function createStandardXHR() {
try {
return new window.XMLHttpRequest();
} catch( e ) {}
}
function createActiveXHR() {
try {
} catch( e ) {}
}
// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
/* Microsoft failed to properly
* implement the XMLHttpRequest in IE7 (can't request local files),
* so we use the ActiveXObject when it is available
* we need a fallback.
*/
function() {
} :
// For all other browsers, use the standard XMLHttpRequest object
// Determine support properties
(function( xhr ) {
});
// Create transport if the browser can provide an xhr
jQuery.ajaxTransport(function( s ) {
// Cross domain only allowed if supported through XMLHttpRequest
var callback;
return {
// Get a new xhr
i;
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
if ( s.username ) {
} else {
}
// Apply custom fields if provided
if ( s.xhrFields ) {
for ( i in s.xhrFields ) {
}
}
// Override mime type if needed
}
// X-Requested-With header
// For cross-domain requests, seeing as conditions for a preflight are
// akin to a jigsaw puzzle, we simply never set it to be sure.
// (it can always be set on a per-request basis or even using ajaxSetup)
// For same-domain requests, won't change header if already provided.
}
try {
for ( i in headers ) {
}
} catch( _ ) {}
// Do send the request
// This may raise an exception which is actually
// Listener
var status,
xml;
// Firefox throws exceptions when accessing properties
// of an xhr when a network error occured
// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
try {
// Was never called and is aborted or complete
// Only called once
// Do not keep as active anymore
if ( handle ) {
if ( xhrOnUnloadAbort ) {
delete xhrCallbacks[ handle ];
}
}
// If it's an abort
if ( isAbort ) {
// Abort it manually if needed
}
} else {
responses = {};
// Construct response list
}
// Firefox throws an exception when accessing
// statusText for faulty cross-domain requests
try {
} catch( e ) {
// We normalize with Webkit giving an empty statusText
statusText = "";
}
// Filter status for non standard behaviors
// If the request is local and we have data: assume a success
// (success with no data won't get notified, that's the best we
// can do given current implementations)
// IE - #1450: sometimes returns 1223 when it should be 204
} else if ( status === 1223 ) {
status = 204;
}
}
}
} catch( firefoxAccessException ) {
if ( !isAbort ) {
}
}
// Call complete if needed
if ( responses ) {
}
};
// if we're in sync mode or it's in cache
// and has been retrieved directly (IE6 & IE7)
// we need to manually fire the callback
callback();
} else {
if ( xhrOnUnloadAbort ) {
// Create the active xhrs callbacks list if needed
// and attach the unload handler
if ( !xhrCallbacks ) {
xhrCallbacks = {};
}
// Add to list of active xhrs callbacks
}
}
},
abort: function() {
if ( callback ) {
}
}
};
}
});
}
var elemdisplay = {},
rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
fxAttrs = [
// height animations
[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
// width animations
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
// opacity animations
[ "opacity" ]
],
} else {
for ( var i = 0, j = this.length; i < j; i++ ) {
elem = this[i];
// Reset the inline display of this element to learn if it is
// being hidden by cascaded rules or not
}
// Set elements which have been overridden with display: none
// in a stylesheet to whatever the default browser style is
// for such an element
}
}
}
// Set the display of most of the elements in a second loop
// to avoid the constant reflow
for ( i = 0; i < j; i++ ) {
elem = this[i];
}
}
}
return this;
}
},
} else {
for ( var i = 0, j = this.length; i < j; i++ ) {
if ( this[i].style ) {
}
}
}
// Set the display of the elements in a second loop
// to avoid the constant reflow
for ( i = 0; i < j; i++ ) {
if ( this[i].style ) {
}
}
return this;
}
},
// Save the old toggle function
this.each(function() {
});
} else {
}
return this;
},
},
}
// Do not change referenced properties as per-property easing will be lost
// XXX 'this' does not always have a nodeName when running the
// test suite
}
display, e,
// will store per property easing and be used to determine when an animation is complete
opt.animatedProperties = {};
for ( p in prop ) {
// property name normalization
if ( p !== name ) {
delete prop[ p ];
}
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
} else {
opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
}
}
// Make sure that nothing sneaks out
// Record all 3 overflow attributes because IE does not
// change the overflow attribute when overflowX and
// overflowY are set to the same value
// animated
} else {
// inline-level elements accept inline-block;
// block-level elements need to be inline with layout
if ( display === "inline" ) {
} else {
}
}
}
}
}
}
for ( p in prop ) {
} else {
if ( parts ) {
// We need to compute starting value
if ( unit !== "px" ) {
}
// If a +=/-= token was provided, we're doing a relative animation
if ( parts[1] ) {
}
} else {
}
}
}
// For JS strict compliance
return true;
});
},
if ( clearQueue ) {
this.queue([]);
}
this.each(function() {
// clear marker counters if we know they won't be
if ( !gotoEnd ) {
}
while ( i-- ) {
if (gotoEnd) {
// force the next step to be the last
timers[i](true);
}
}
}
});
// start the next in the queue if the last step wasn't forced
if ( !gotoEnd ) {
this.dequeue();
}
return this;
}
});
// Animations created synchronously will run synchronously
function createFxNow() {
}
function clearFxNow() {
}
// Generate parameters to create a standard animation
var obj = {};
});
return obj;
}
// Generate shortcuts for custom animations
};
});
};
// Queueing
}
} else if ( noUnmark !== false ) {
}
};
return opt;
},
easing: {
},
}
},
timers: [],
}
});
// Simple function for setting a style value
update: function() {
}
},
// Get the current size
cur: function() {
}
var parsed,
// Empty strings, null, undefined and "auto" are converted to 0,
// complex values such as "rotate(1rad)" are returned as is,
// simple values such as "10px" are parsed to Float.
},
// Start an animation from one number to another
var self = this,
function t( gotoEnd ) {
}
}
},
// Simple 'show' function
show: function() {
// Remember where we started, so that we can go back to it later
// Begin the animation
// flash of content
// Start by showing the element
},
// Simple 'hide' function
hide: function() {
// Remember where we started, so that we can go back to it later
// Begin the animation
},
// Each step of an animation
var t = fxNow || createFxNow(),
done = true,
i, n;
this.update();
for ( i in options.animatedProperties ) {
if ( options.animatedProperties[i] !== true ) {
done = false;
}
}
if ( done ) {
// Reset the overflow
});
}
// Hide the element if the "hide" operation was done
}
// Reset the properties, if the item has been hidden or shown
for ( var p in options.animatedProperties ) {
}
}
// Execute the complete function
}
return false;
} else {
// classical easing cannot be used with an Infinity duration
this.now = t;
} else {
n = t - this.startTime;
// Perform the easing function, defaults to swing
this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
}
// Perform the next step of the animation
this.update();
}
return true;
}
};
tick: function() {
if ( !timers[i]() ) {
}
}
}
},
interval: 13,
stop: function() {
clearInterval( timerId );
timerId = null;
},
speeds: {
slow: 600,
fast: 200,
// Default speed
_default: 400
},
step: {
},
fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
} else {
}
}
}
});
}).length;
};
}
// Try to restore the default display value of an element
function defaultDisplay( nodeName ) {
if ( !elemdisplay[ nodeName ] ) {
// If the simple way fails,
// get element's real default display by attaching it to a temp iframe
// No iframe to use yet, so create it
if ( !iframe ) {
}
// Create a cacheable copy of the iframe document on first call.
// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
// document to it; WebKit & Firefox won't allow reusing the iframe document.
iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
}
}
// Store the correct default display
}
return elemdisplay[ nodeName ];
}
if ( options ) {
return this.each(function( i ) {
});
}
return null;
}
}
try {
} catch(e) {}
// Make sure we're not dealing with a disconnected DOM node
}
};
} else {
var elem = this[0];
if ( options ) {
return this.each(function( i ) {
});
}
return null;
}
}
var computedStyle,
break;
}
if ( elem === offsetParent ) {
if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
}
}
}
}
}
}
};
}
initialize: function() {
var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
// safari subtracts parent border width here which is 5px
},
bodyOffset: function( body ) {
}
},
if ( position === "static" ) {
}
calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
if ( calculatePosition ) {
} else {
}
}
}
}
if ( "using" in options ) {
} else {
}
}
};
position: function() {
if ( !this[0] ) {
return null;
}
var elem = this[0],
// Get *real* offsetParent
offsetParent = this.offsetParent(),
// Get correct offsets
// Subtract element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
// Add offsetParent borders
// Subtract the two offsets
return {
};
},
offsetParent: function() {
return this.map(function() {
while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
}
return offsetParent;
});
}
});
// Create scrollLeft and scrollTop methods
elem = this[ 0 ];
if ( !elem ) {
return null;
}
// Return the scroll offset
}
// Set the scroll offset
return this.each(function() {
if ( win ) {
);
} else {
}
});
};
});
elem :
false;
}
// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
// innerHeight and innerWidth
var elem = this[0];
null;
};
// outerHeight and outerWidth
var elem = this[0];
null;
};
// Get window width or height
var elem = this[0];
if ( !elem ) {
return size == null ? null : this;
}
return this.each(function( i ) {
});
}
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
// Get document width or height
return Math.max(
);
// Get or set width or height on the element
// Set the width or height on the element (default to pixels if value is unitless)
} else {
}
};
});
// Expose jQuery to the global object
})(window);
//Register jQuery as a module.
}