UNPKG

744 kBJavaScriptView Raw
1webpackJsonp([2,5],{4:function(t,n,e){e("ByD6"),e("d0dT"),t.exports=e("A/mh")},"A/mh":function(t,n,e){e("P+fo")(e("z2tB"))},ByD6:function(t,n,e){e("P+fo")(e("EJ/w"))},"EJ/w":function(t,n){t.exports='/*!\n * jQuery JavaScript Library v2.2.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:23Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === "object" && typeof module.exports === "object" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require("jquery")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( "jQuery requires a window with a document" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can\'t be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through "use strict" call chains. (#13335)\n//"use strict";\nvar arr = [];\n\nvar document = window.document;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = "2.2.4",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor \'enhanced\'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: "",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array\'s method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === "boolean" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== "object" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we\'re merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don\'t bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: "jQuery" + ( version + Math.random() ).replace( /\\D/g, "" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === "function";\n\t},\n\n\tisArray: Array.isArray,\n\n\tisWindow: function( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|"")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals ("0x...")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Not plain objects:\n\t\t// - Any object or value whose internal [[Class]] property is not "[object Object]"\n\t\t// - DOM nodes\n\t\t// - window\n\t\tif ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Not own constructor property must be Object\n\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj, "constructor" ) &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + "";\n\t\t}\n\n\t\t// Support: Android<4.0, iOS<6 (functionish RegExp)\n\t\treturn typeof obj === "object" || typeof obj === "function" ?\n\t\t\tclass2type[ toString.call( obj ) ] || "object" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code ) {\n\t\tvar script,\n\t\t\tindirect = eval;\n\n\t\tcode = jQuery.trim( code );\n\n\t\tif ( code ) {\n\n\t\t\t// If the code includes a valid, prologue position\n\t\t\t// strict mode pragma, execute code by injecting a\n\t\t\t// script tag into the document.\n\t\t\tif ( code.indexOf( "use strict" ) === 1 ) {\n\t\t\t\tscript = document.createElement( "script" );\n\t\t\t\tscript.text = code;\n\t\t\t\tdocument.head.appendChild( script ).parentNode.removeChild( script );\n\t\t\t} else {\n\n\t\t\t\t// Otherwise, avoid the DOM node creation, insertion\n\t\t\t\t// and removal by using an indirect global eval\n\n\t\t\t\tindirect( code );\n\t\t\t}\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Support: IE9-11+\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t"" :\n\t\t\t( text + "" ).replace( rtrim, "" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === "string" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar tmp, args, proxy;\n\n\t\tif ( typeof context === "string" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: Date.now,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === "function" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),\nfunction( i, name ) {\n\tclass2type[ "[object " + name + "]" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn\'t used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && "length" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === "function" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === "array" || length === 0 ||\n\t\ttypeof length === "number" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = "sizzle" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it\'s faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = "[\\\\x20\\\\t\\\\r\\\\n\\\\f]",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = "(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = "\\\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +\n\t\t// Operator (capture 2)\n\t\t"*([*^$|!~]?=)" + whitespace +\n\t\t// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"\n\t\t"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|(" + identifier + "))|)" + whitespace +\n\t\t"*\\\\]",\n\n\tpseudos = ":(" + identifier + ")(?:\\\\((" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t"(\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|" +\n\t\t// 2. simple (capture 6)\n\t\t"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|" + attributes + ")*)|" +\n\t\t// 3. anything else (capture 2)\n\t\t".*" +\n\t\t")\\\\)|)",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + "+", "g" ),\n\trtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)" + whitespace + "+$", "g" ),\n\n\trcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),\n\trcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),\n\n\trattributeQuotes = new RegExp( "=" + whitespace + "*([^\\\\]\'\\"]*?)" + whitespace + "*\\\\]", "g" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( "^" + identifier + "$" ),\n\n\tmatchExpr = {\n\t\t"ID": new RegExp( "^#(" + identifier + ")" ),\n\t\t"CLASS": new RegExp( "^\\\\.(" + identifier + ")" ),\n\t\t"TAG": new RegExp( "^(" + identifier + "|[*])" ),\n\t\t"ATTR": new RegExp( "^" + attributes ),\n\t\t"PSEUDO": new RegExp( "^" + pseudos ),\n\t\t"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(" + whitespace +\n\t\t\t"*(even|odd|(([+-]|)(\\\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +\n\t\t\t"*(\\\\d+)|))" + whitespace + "*\\\\)|)", "i" ),\n\t\t"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(" +\n\t\t\twhitespace + "*((?:-\\\\d)?\\\\d*)" + whitespace + "*\\\\)|)(?=[^-]|$)", "i" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /\'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( "\\\\\\\\([\\\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = "0x" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +"0x"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a "Permission Denied"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can\'t trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== "string" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a "get*By*" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don\'t exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + " " ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== "object" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( "id" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, "\\\\$&" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( "id", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? "#" + nid : "[id=\'" + nid + "\']";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + " " + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( "," );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( "id" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, "$1" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + " " ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + " " ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement("div");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split("|"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === "input" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === "input" || name === "button") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== "undefined" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn\'t yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== "HTML" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( "unload", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( "onunload", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = "i";\n\t\treturn !div.getAttribute("className");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName("*") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment("") );\n\t\treturn !div.getElementsByTagName("*").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don\'t pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find["ID"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== "undefined" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter["ID"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute("id") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find["ID"];\n\n\t\tExpr.filter["ID"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== "undefined" &&\n\t\t\t\t\telem.getAttributeNode("id");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find["TAG"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== "undefined" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don\'t have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === "*" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE\'s treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = "<a id=\'" + expando + "\'></a>" +\n\t\t\t\t"<select id=\'" + expando + "-\\r\\\\\' msallowcapture=\'\'>" +\n\t\t\t\t"<option selected=\'\'></option></select>";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but "safe" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll("[msallowcapture^=\'\']").length ) {\n\t\t\t\trbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\'\'|\\"\\")" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and "value" are not treated correctly\n\t\t\tif ( !div.querySelectorAll("[selected]").length ) {\n\t\t\t\trbuggyQSA.push( "\\\\[" + whitespace + "*(?:value|" + booleans + ")" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {\n\t\t\t\trbuggyQSA.push("~=");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(":checked").length ) {\n\t\t\t\trbuggyQSA.push(":checked");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {\n\t\t\t\trbuggyQSA.push(".#.+[+~]");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement("input");\n\t\t\tinput.setAttribute( "type", "hidden" );\n\t\t\tdiv.appendChild( input ).setAttribute( "name", "D" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll("[name=d]").length ) {\n\t\t\t\trbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(":enabled").length ) {\n\t\t\t\trbuggyQSA.push( ":enabled", ":disabled" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll("*,:x");\n\t\t\trbuggyQSA.push(",.*:");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it\'s possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, "div" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, "[s!=\'\']:x" );\n\t\t\trbuggyMatches.push( "!=", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, "=\'$1\']" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + " " ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9\'s matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don\'t get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( "Syntax error, unrecognized expression: " + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = "",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === "string" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t">": { dir: "parentNode", first: true },\n\t\t" ": { dir: "parentNode" },\n\t\t"+": { dir: "previousSibling", first: true },\n\t\t"~": { dir: "previousSibling" }\n\t},\n\n\tpreFilter: {\n\t\t"ATTR": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === "~=" ) {\n\t\t\t\tmatch[3] = " " + match[3] + " ";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t"CHILD": function( match ) {\n\t\t\t/* matches from matchExpr["CHILD"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === "nth" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t"PSEUDO": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr["CHILD"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || "";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t"TAG": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === "*" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t"CLASS": function( className ) {\n\t\t\tvar pattern = classCache[ className + " " ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );\n\t\t\t\t});\n\t\t},\n\n\t\t"ATTR": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === "!=";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += "";\n\n\t\t\t\treturn operator === "=" ? result === check :\n\t\t\t\t\toperator === "!=" ? result !== check :\n\t\t\t\t\toperator === "^=" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === "*=" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === "$=" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t"CHILD": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== "nth",\n\t\t\t\tforward = type.slice( -4 ) !== "last",\n\t\t\t\tofType = what === "of-type";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? "nextSibling" : "previousSibling",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven\'t yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === "only" && !start && "nextSibling";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t"PSEUDO": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( "unsupported pseudo: " + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, "", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t"not": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, "$1" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don\'t keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t"has": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t"contains": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// "Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element\'s language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by "-".\n\t\t// The matching of C against the element\'s language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name."\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t"lang": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || "") ) {\n\t\t\t\tSizzle.error( "unsupported lang: " + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t"target": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t"root": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t"focus": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t"enabled": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t"disabled": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t"checked": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);\n\t\t},\n\n\t\t"selected": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t"empty": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t"parent": function( elem ) {\n\t\t\treturn !Expr.pseudos["empty"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t"header": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t"input": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t"button": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === "input" && elem.type === "button" || name === "button";\n\t\t},\n\n\t\t"text": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === "input" &&\n\t\t\t\telem.type === "text" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"\n\t\t\t\t( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t"first": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t"last": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t"even": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t"odd": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos["nth"] = Expr.pseudos["eq"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + " " ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don\'t consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, " " )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we\'re just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = "";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === "parentNode",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can\'t set arbitrary data on XML nodes, so they don\'t benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we\'re done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[" "],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })\n\t\t\t\t\t).replace( rtrim, "$1" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = "0",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find["TAG"]( "*", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn\'t visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a "00" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + " " ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle\'s compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === "function" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split("").sort( sortOrder ).join("") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren\'t passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement("div") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property "interpolation"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = "<a href=\'#\'></a>";\n\treturn div.firstChild.getAttribute("href") === "#" ;\n}) ) {\n\taddHandle( "type|href|height|width", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute("value")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = "<input/>";\n\tdiv.firstChild.setAttribute( "value", "" );\n\treturn div.firstChild.getAttribute( "value" ) === "";\n}) ) {\n\taddHandle( "value", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === "input" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute("disabled") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ ":" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === "string" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = ":not(" + expr + ")";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tlen = this.length,\n\t\t\tret = [],\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== "string" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + " " + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $("p:first").is("p:last") won\'t return true for a doc with two "p".\n\t\t\ttypeof selector === "string" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(""), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === "string" ) {\n\t\t\tif ( selector[ 0 ] === "<" &&\n\t\t\t\tselector[ selector.length - 1 ] === ">" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Support: Blackberry 4.6\n\t\t\t\t\t// gEBID returns nodes no longer in the document (#6963)\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don\'t pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === "string" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, "parentNode" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, "parentNode", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, "nextSibling" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, "previousSibling" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, "nextSibling" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, "previousSibling" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, "nextSibling", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, "previousSibling", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn elem.contentDocument || jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== "Until" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === "string" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * "fired" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest "memorized"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === "string" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn\'t re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we\'re done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we\'re done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = "";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = "";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tlist = memory = "";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],\n\t\t\t\t[ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],\n\t\t\t\t[ "notify", "progress", jQuery.Callbacks( "memory" ) ]\n\t\t\t],\n\t\t\tstate = "pending",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + "With" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + "With" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// Add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we\'re not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we\'re already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( "ready" );\n\t\t\tjQuery( document ).off( "ready" );\n\t\t}\n\t}\n} );\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\tdocument.removeEventListener( "DOMContentLoaded", completed );\n\twindow.removeEventListener( "load", completed );\n\tjQuery.ready();\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE9-10 only\n\t\t// Older IE sometimes signals "interactive" too soon\n\t\tif ( document.readyState === "complete" ||\n\t\t\t( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t} else {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( "DOMContentLoaded", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( "load", completed );\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it\'s a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === "object" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlen ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\t/* jshint -W018 */\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tregister: function( owner, initial ) {\n\t\tvar value = initial || {};\n\n\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t// use plain assignment\n\t\tif ( owner.nodeType ) {\n\t\t\towner[ this.expando ] = value;\n\n\t\t// Otherwise secure it in a non-enumerable, non-writable property\n\t\t// configurability must be true to allow the property to be\n\t\t// deleted with the delete operator\n\t\t} else {\n\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\tvalue: value,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t} );\n\t\t}\n\t\treturn owner[ this.expando ];\n\t},\n\tcache: function( owner ) {\n\n\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t// but we should not, see #8335.\n\t\t// Always return an empty object.\n\t\tif ( !acceptData( owner ) ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\tif ( typeof data === "string" ) {\n\t\t\tcache[ data ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ prop ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\t\t\towner[ this.expando ] && owner[ this.expando ][ key ];\n\t},\n\taccess: function( owner, key, value ) {\n\t\tvar stored;\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the "read" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === "string" ) && value === undefined ) ) {\n\n\t\t\tstored = this.get( owner, key );\n\n\t\t\treturn stored !== undefined ?\n\t\t\t\tstored : this.get( owner, jQuery.camelCase( key ) );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the "set" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i, name, camel,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === undefined ) {\n\t\t\tthis.register( owner );\n\n\t\t} else {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( jQuery.isArray( key ) ) {\n\n\t\t\t\t// If "name" is an array of keys...\n\t\t\t\t// When data is initially created, via ("key", "val") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = key.concat( key.map( jQuery.camelCase ) );\n\t\t\t} else {\n\t\t\t\tcamel = jQuery.camelCase( key );\n\n\t\t\t\t// Try the string as a key before any manipulation\n\t\t\t\tif ( key in cache ) {\n\t\t\t\t\tname = [ key, camel ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\t\tname = camel;\n\t\t\t\t\tname = name in cache ?\n\t\t\t\t\t\t[ name ] : ( name.match( rnotwhite ) || [] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ti = name.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ name[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there\'s no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <= 35-45+\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module\'s maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support "private" and "user" data.\n//\t4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === "string" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === "true" ? true :\n\t\t\t\t\tdata === "false" ? false :\n\t\t\t\t\tdata === "null" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn\'t change the string\n\t\t\t\t\t+data + "" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn\'t changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( "data-" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, "hasDataAttrs", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === "object" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data, camelKey;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key as-is\n\t\t\t\tdata = dataUser.get( elem, key ) ||\n\n\t\t\t\t\t// Try to find dashed key if it exists (gh-2779)\n\t\t\t\t\t// This is for 2.2.x only\n\t\t\t\t\tdataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );\n\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\tcamelKey = jQuery.camelCase( key );\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key camelized\n\t\t\t\tdata = dataUser.get( elem, camelKey );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to "discover" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, camelKey, undefined );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn\'t exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tcamelKey = jQuery.camelCase( key );\n\t\t\tthis.each( function() {\n\n\t\t\t\t// First, attempt to store a copy or reference of any\n\t\t\t\t// data that might\'ve been store with a camelCased key.\n\t\t\t\tvar data = dataUser.get( this, camelKey );\n\n\t\t\t\t// For HTML5 data-* attribute interop, we have to\n\t\t\t\t// store property names with dashes in a camelCase form.\n\t\t\t\t// This might not apply to all properties...*\n\t\t\t\tdataUser.set( this, camelKey, value );\n\n\t\t\t\t// *... In the case of properties that might _actually_\n\t\t\t\t// have dashes, we need to also store a copy of that\n\t\t\t\t// unchanged property.\n\t\t\t\tif ( key.indexOf( "-" ) > -1 && data !== undefined ) {\n\t\t\t\t\tdataUser.set( this, key, value );\n\t\t\t\t}\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || "fx" ) + "queue";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || "fx";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === "inprogress" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === "fx" ) {\n\t\t\t\tqueue.unshift( "inprogress" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + "queueHooks";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( "once memory" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + "queue", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== "string" ) {\n\t\t\tdata = type;\n\t\t\ttype = "fx";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === "fx" && queue[ 0 ] !== "inprogress" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || "fx", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== "string" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || "fx";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + "queueHooks" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );\n\n\nvar cssExpand = [ "Top", "Right", "Bottom", "Left" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, "display" ) === "none" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, "" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don\'t accidentally see scale as unchanged below\n\t\t\tscale = scale || ".5";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we\'ve just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// Support: IE9\n\toption: [ 1, "<select multiple=\'multiple\'>", "</select>" ],\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, "<table>", "</table>" ],\n\tcol: [ 2, "<table><colgroup>", "</colgroup></table>" ],\n\ttr: [ 2, "<table><tbody>", "</tbody></table>" ],\n\ttd: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],\n\n\t_default: [ 0, "", "" ]\n};\n\n// Support: IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE9-11+\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret = typeof context.getElementsByTagName !== "undefined" ?\n\t\t\tcontext.getElementsByTagName( tag || "*" ) :\n\t\t\ttypeof context.querySelectorAll !== "undefined" ?\n\t\t\t\tcontext.querySelectorAll( tag || "*" ) :\n\t\t\t[];\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], ret ) :\n\t\tret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t"globalEval",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], "globalEval" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, contains, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( jQuery.type( elem ) === "object" ) {\n\n\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( "div" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = "";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = "";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), "script" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || "" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( "div" ) ),\n\t\tinput = document.createElement( "input" );\n\n\t// Support: Android 4.0-4.3, Safari<=5.1\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( "type", "radio" );\n\tinput.setAttribute( "checked", "checked" );\n\tinput.setAttribute( "name", "t" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari<=5.1, Android<4.2\n\t// Older WebKit doesn\'t clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<=11+\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = "<textarea>x</textarea>";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n} )();\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === "object" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== "string" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === "string" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards\' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Don\'t attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element\'s event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || "" ).match( rnotwhite ) || [ "" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( "." )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we\'re the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element\'s handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || "" ).match( rnotwhite ) || [ "" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( "(^|\\\\.)" + namespaces.join( "\\\\.(?:.*\\\\.|)" ) + "(\\\\.|$)" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === "**" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it\'s no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, "handle events" );\n\t\t}\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don\'t block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don\'t check non-elements (#13208)\n\t\t\t\t// Don\'t process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don\'t conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + " ";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +\n\t\t"metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: "char charCode key keyCode".split( " " ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +\n\t\t\t"screenX screenY toElement" ).split( " " ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar eventDoc, doc, body,\n\t\t\t\tbutton = original.button;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop || body && body.scrollTop || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop || body && body.clientTop || 0 );\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don\'t use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: Cordova 2.5 (WebKit) (#13255)\n\t\t// All events should have a target; Cordova deviceready doesn\'t\n\t\tif ( !event.target ) {\n\t\t\tevent.target = document;\n\t\t}\n\n\t\t// Support: Safari 6.0+, Chrome<28\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\tthis.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: "focusin"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: "focusout"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don\'t fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, "a" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn\'t alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This "if" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the \'new\' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android<4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn\'t have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: "mouseover",\n\tmouseleave: "mouseout",\n\tpointerenter: "pointerover",\n\tpointerleave: "pointerout"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + "." + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === "object" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === "function" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked="checked" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\n\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, "table" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?\n\n\t\telem.getElementsByTagName( "tbody" )[ 0 ] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( "type" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.access( src );\n\t\tpdataCur = dataPriv.set( dest, pdataOld );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdelete pdataCur.handle;\n\t\t\tpdataCur.events = {};\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === "input" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === "input" || nodeName === "textarea" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can\'t cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === "string" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, "script" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, "script" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || "" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, "globalEval" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won\'t run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, "script" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, "<$1></$2>" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, "script" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, "script" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove\'s overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <= 35-45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <= 35-45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\n\t// Keep domManip exposed until 3.0 (gh-2225)\n\tdomManip: domManip,\n\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = "";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === "string" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: "append",\n\tprependTo: "prepend",\n\tinsertBefore: "before",\n\tinsertAfter: "after",\n\treplaceAll: "replaceWith"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: QtWebKit\n\t\t\t// .get() because push.apply(_, arraylike) throws\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\n\n\nvar iframe,\n\telemdisplay = {\n\n\t\t// Support: Firefox\n\t\t// We have to pre-define these values for FF (#10227)\n\t\tHTML: "block",\n\t\tBODY: "block"\n\t};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\tdisplay = jQuery.css( elem[ 0 ], "display" );\n\n\t// We don\'t have any data stored on the element,\n\t// so use "detach" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === "none" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe || jQuery( "<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>" ) )\n\t\t\t\t.appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don\'t choke on reuse\n\t\t\tdoc = iframe[ 0 ].contentDocument;\n\n\t\t\t// Support: IE\n\t\t\tdoc.write();\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\nvar rmargin = ( /^margin/ );\n\nvar rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE<=11+, Firefox<=30+ (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar documentElement = document.documentElement;\n\n\n\n( function() {\n\tvar pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( "div" ),\n\t\tdiv = document.createElement( "div" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE9-11+\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = "content-box";\n\tdiv.cloneNode( true ).style.backgroundClip = "";\n\tsupport.clearCloneStyle = div.style.backgroundClip === "content-box";\n\n\tcontainer.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +\n\t\t"padding:0;margin-top:1px;position:absolute";\n\tcontainer.appendChild( div );\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they\'re executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" +\n\t\t\t"position:relative;display:block;" +\n\t\t\t"margin:auto;border:1px;padding:1px;" +\n\t\t\t"top:1%;width:50%";\n\t\tdiv.innerHTML = "";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== "1%";\n\t\treliableMarginLeftVal = divStyle.marginLeft === "2px";\n\t\tboxSizingReliableVal = divStyle.width === "4px";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn\'t\n\t\tdiv.style.marginRight = "50%";\n\t\tpixelMarginRightVal = divStyle.marginRight === "4px";\n\n\t\tdocumentElement.removeChild( container );\n\t}\n\n\tjQuery.extend( support, {\n\t\tpixelPosition: function() {\n\n\t\t\t// This test is executed only once but we still do memoizing\n\t\t\t// since we can use the boxSizingReliable pre-computing.\n\t\t\t// No need to check if the test was already performed, though.\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\tboxSizingReliable: function() {\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelMarginRight: function() {\n\n\t\t\t// Support: Android 4.0-4.3\n\t\t\t// We\'re checking for boxSizingReliableVal here instead of pixelMarginRightVal\n\t\t\t// since that compresses better and they\'re computed together anyway.\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelMarginRightVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\n\t\t\t// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\treliableMarginRight: function() {\n\n\t\t\t// Support: Android 2.3\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\n\t\t\t// gets computed margin-right based on width of container. (#3333)\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\t// This support function is only executed once so no memoizing is needed.\n\t\t\tvar ret,\n\t\t\t\tmarginDiv = div.appendChild( document.createElement( "div" ) );\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border; padding\n\t\t\tmarginDiv.style.cssText = div.style.cssText =\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t"-webkit-box-sizing:content-box;box-sizing:content-box;" +\n\t\t\t\t"display:block;margin:0;border:0;padding:0";\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = "0";\n\t\t\tdiv.style.width = "1px";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );\n\n\t\t\tdocumentElement.removeChild( container );\n\t\t\tdiv.removeChild( marginDiv );\n\n\t\t\treturn ret;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;\n\n\t// Support: Opera 12.1x only\n\t// Fall back to style even without computed\n\t// computed is undefined for elems on document fragments\n\tif ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\tret = jQuery.style( elem, name );\n\t}\n\n\t// Support: IE9\n\t// getPropertyValue is only needed for .css(\'filter\') (#12537)\n\tif ( computed ) {\n\n\t\t// A tribute to the "awesome hack by Dean Edwards"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// http://dev.w3.org/csswg/cssom/#resolved-values\n\t\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE9-11+\n\t\t// IE returns zIndex value as an integer.\n\t\tret + "" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we\'ll check on the first run if it\'s really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it\'s not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except "table", "table-cell", or "table-caption"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\n\tcssShow = { position: "absolute", visibility: "hidden", display: "block" },\n\tcssNormalTransform = {\n\t\tletterSpacing: "0",\n\t\tfontWeight: "400"\n\t},\n\n\tcssPrefixes = [ "Webkit", "O", "Moz", "ms" ],\n\temptyStyle = document.createElement( "div" ).style;\n\n// Return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined "subtract", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? "border" : "content" ) ?\n\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === "width" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin, so add it if we want it\n\t\tif ( extra === "margin" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === "content" ) {\n\t\t\t\tval -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// At this point, extra isn\'t border nor margin, so remove border\n\t\t\tif ( extra !== "margin" ) {\n\t\t\t\tval -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// At this point, extra isn\'t content, so add padding\n\t\t\tval += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );\n\n\t\t\t// At this point, extra isn\'t content nor padding, so add border\n\t\t\tif ( extra !== "padding" ) {\n\t\t\t\tval += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === "width" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";\n\n\t// Some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test( val ) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox &&\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\n\n\t\t// Normalize "", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// Use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? "border" : "content" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + "px";\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = dataPriv.get( elem, "olddisplay" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === "none" ) {\n\t\t\t\telem.style.display = "";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === "" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] = dataPriv.access(\n\t\t\t\t\telem,\n\t\t\t\t\t"olddisplay",\n\t\t\t\t\tdefaultDisplay( elem.nodeName )\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\thidden = isHidden( elem );\n\n\t\t\tif ( display !== "none" || !hidden ) {\n\t\t\t\tdataPriv.set(\n\t\t\t\t\telem,\n\t\t\t\t\t"olddisplay",\n\t\t\t\t\thidden ? display : jQuery.css( elem, "display" )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === "none" || elem.style.display === "" ) {\n\t\t\telem.style.display = show ? values[ index ] || "" : "none";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, "opacity" );\n\t\t\t\t\treturn ret === "" ? "1" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don\'t automatically add "px" to these possibly-unitless properties\n\tcssNumber: {\n\t\t"animationIterationCount": true,\n\t\t"columnCount": true,\n\t\t"fillOpacity": true,\n\t\t"flexGrow": true,\n\t\t"flexShrink": true,\n\t\t"fontWeight": true,\n\t\t"lineHeight": true,\n\t\t"opacity": true,\n\t\t"order": true,\n\t\t"orphans": true,\n\t\t"widows": true,\n\t\t"zIndex": true,\n\t\t"zoom": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t"float": "cssFloat"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don\'t set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we\'re working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we\'re setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert "+=" or "-=" to relative numbers (#7345)\n\t\t\tif ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = "number";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren\'t set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\tif ( type === "number" ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// background-* props affect original clone\'s values\n\t\t\tif ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {\n\t\t\t\tstyle[ name ] = "inherit";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( "set" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tstyle[ name ] = value;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && "get" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we\'re working with the right name\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && "get" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert "normal" to computed value\n\t\tif ( val === "normal" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === "" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ "height", "width" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, "display" ) ) &&\n\t\t\t\t\telem.offsetWidth === 0 ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = extra && getStyles( elem ),\n\t\t\t\tsubtract = extra && augmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tjQuery.css( elem, "boxSizing", false, styles ) === "border-box",\n\t\t\t\t\tstyles\n\t\t\t\t);\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || "px" ) !== "px" ) {\n\n\t\t\t\telem.style[ name ] = value;\n\t\t\t\tvalue = jQuery.css( elem, name );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, "marginLeft" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + "px";\n\t\t}\n\t}\n);\n\n// Support: Android 2.3\njQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn swap( elem, { "display": "inline-block" },\n\t\t\t\tcurCSS, [ elem, "marginRight" ] );\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: "",\n\tpadding: "",\n\tborder: "Width"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === "string" ? value.split( " " ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === "boolean" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as "10px" are parsed to Float;\n\t\t\t// complex values such as "rotate(1rad)" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, "" );\n\n\t\t\t// Empty strings, null, undefined and "auto" are converted to 0.\n\t\t\treturn !result || result === "auto" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE9\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: "swing"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = jQuery.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ "margin" + which ] = attrs[ "padding" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We\'re done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = dataPriv.get( elem, "fxshow" );\n\n\t// Handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, "fx" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, "fx" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Height/width overflow pass\n\tif ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {\n\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE9-10 do not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tdisplay = jQuery.css( elem, "display" );\n\n\t\t// Test default display if display is currently "none"\n\t\tcheckDisplay = display === "none" ?\n\t\t\tdataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;\n\n\t\tif ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {\n\t\t\tstyle.display = "inline-block";\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = "hidden";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === "toggle";\n\t\t\tif ( value === ( hidden ? "hide" : "show" ) ) {\n\n\t\t\t\t// If there is dataShow left over from a stopped hide or show\n\t\t\t\t// and we are going to proceed with show, we should pretend to be hidden\n\t\t\t\tif ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\n\t\t// Any non-fx value stops us from restoring the original display value\n\t\t} else {\n\t\t\tdisplay = undefined;\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( "hidden" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = dataPriv.access( elem, "fxshow", {} );\n\t\t}\n\n\t\t// Store state if its toggle - enables .stop().toggle() to "reverse"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done( function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t} );\n\t\t}\n\t\tanim.done( function() {\n\t\t\tvar prop;\n\n\t\t\tdataPriv.remove( elem, "fxshow" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t} );\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === "width" || prop === "height" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t// If this is a noop like .hide().hide(), restore an overwritten display value\n\t} else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) {\n\t\tstyle.display = display;\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && "expand" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won\'t overwrite existing keys.\n\t\t\t// Reusing \'index\' because we have the correct "name"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don\'t match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Archaic crash bug won\'t allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( jQuery.isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tjQuery.proxy( result.stop, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\ttweeners: {\n\t\t"*": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ "*" ];\n\t\t} else {\n\t\t\tprops = props.match( rnotwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ?\n\t\topt.duration : opt.duration in jQuery.fx.speeds ?\n\t\t\tjQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// Normalize opt.queue - true/undefined/null -> "fx"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = "fx";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( "opacity", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won\'t be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, "finish" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== "string" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || "fx", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + "queueHooks",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn\'t forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || "fx";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + "queue" ],\n\t\t\t\thooks = data[ type + "queueHooks" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === "boolean" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( "show" ),\n\tslideUp: genFx( "hide" ),\n\tslideToggle: genFx( "toggle" ),\n\tfadeIn: { opacity: "show" },\n\tfadeOut: { opacity: "hide" },\n\tfadeToggle: { opacity: "toggle" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tif ( timer() ) {\n\t\tjQuery.fx.start();\n\t} else {\n\t\tjQuery.timers.pop();\n\t}\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\twindow.clearInterval( timerId );\n\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || "fx";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( "input" ),\n\t\tselect = document.createElement( "select" ),\n\t\topt = select.appendChild( document.createElement( "option" ) );\n\n\tinput.type = "checkbox";\n\n\t// Support: iOS<=5.1, Android<=4.2+\n\t// Default value for a checkbox should be "on"\n\tsupport.checkOn = input.value !== "";\n\n\t// Support: IE<=11+\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: Android<=2.3\n\t// Options inside disabled selects are incorrectly marked as disabled\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE<=11+\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( "input" );\n\tinput.value = "t";\n\tinput.type = "radio";\n\tsupport.radioValue = input.value === "t";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don\'t get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === "undefined" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && "set" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + "" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === "radio" &&\n\t\t\t\t\tjQuery.nodeName( elem, "input" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( "type", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle;\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ name ];\n\t\t\tattrHandle[ name ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tname.toLowerCase() :\n\t\t\t\tnull;\n\t\t\tattrHandle[ name ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don\'t get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && "set" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// elem.tabIndex doesn\'t always return the\n\t\t\t\t// correct value when it hasn\'t been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, "tabindex" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\t\trclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t"for": "htmlFor",\n\t\t"class": "className"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t"tabIndex",\n\t"readOnly",\n\t"maxLength",\n\t"cellSpacing",\n\t"cellPadding",\n\t"rowSpan",\n\t"colSpan",\n\t"useMap",\n\t"frameBorder",\n\t"contentEditable"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\nvar rclass = /[\\t\\r\\n\\f]/g;\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( "class" ) || "";\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof value === "string" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( " " + curValue + " " ).replace( rclass, " " );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( " " + clazz + " " ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + " ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( "class", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( "class", "" );\n\t\t}\n\n\t\tif ( typeof value === "string" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( " " + curValue + " " ).replace( rclass, " " );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( " " + clazz + " " ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( " " + clazz + " ", " " );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( "class", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === "boolean" && type === "string" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( type === "string" ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = value.match( rnotwhite ) || [];\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === "boolean" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, "__className__", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we\'re passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( "class",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t"" :\n\t\t\t\t\t\tdataPriv.get( this, "__className__" ) || ""\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = " " + selector + " ";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( " " + getClass( elem ) + " " ).replace( rclass, " " )\n\t\t\t\t\t.indexOf( className ) > -1\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g,\n\trspaces = /[\\x20\\t\\r\\n\\f]+/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t"get" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, "value" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === "string" ?\n\n\t\t\t\t\t// Handle most common string cases\n\t\t\t\t\tret.replace( rreturn, "" ) :\n\n\t\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? "" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as ""; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = "";\n\n\t\t\t} else if ( typeof val === "number" ) {\n\t\t\t\tval += "";\n\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? "" : value + "";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, "value" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE10-11+\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tjQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === "select-one" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// IE8-9 doesn\'t update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don\'t return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( support.optDisabled ?\n\t\t\t\t\t\t\t\t!option.disabled : option.getAttribute( "disabled" ) === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don\'t need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ "radio", "checkbox" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( "value" ) === null ? "on" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, "type" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don\'t do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we\'re not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( "." ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( "." );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( ":" ) < 0 && "on" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === "object" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( "." );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( "(^|\\\\.)" + namespaces.join( "\\\\.(?:.*\\\\.|)" ) + "(\\\\.|$)" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, "handle" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Don\'t do default actions on window, that\'s where global variables be (#6170)\n\t\t\t\tif ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don\'t re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\telem[ type ]();\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\njQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +\n\t"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +\n\t"change select submit keydown keypress keyup error contextmenu" ).split( " " ),\n\tfunction( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n} );\n\njQuery.fn.extend( {\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\n\n\n\nsupport.focusin = "onfocusin" in window;\n\n\n// Support: Firefox\n// Firefox doesn\'t have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome, Safari\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = jQuery.now();\n\nvar rquery = ( /\\?/ );\n\n\n\n// Support: Android 2.3\n// Workaround failure to string-cast null input\njQuery.parseJSON = function( data ) {\n\treturn JSON.parse( data + "" );\n};\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== "string" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE9\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {\n\t\tjQuery.error( "Invalid XML: " + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol "*" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to "*" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol "*" can be used\n\t * 3) selection will start with transport dataType and THEN go to "*" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = "*/".concat( "*" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( "a" );\n\toriginAnchor.href = location.href;\n\n// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to "*"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== "string" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = "*";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === "+" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || "*";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === "string" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );\n}\n\n// A special extend for ajax options\n// that takes "flat" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === "*" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );\n\t\t}\n\t}\n\n\t// Check if we\'re dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There\'s only work to do if current dataType is non-auto\n\t\t\tif ( current === "*" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== "*" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + " " + current ] || converters[ "* " + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( " " );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + " " + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ "* " + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: "parsererror",\n\t\t\t\t\t\t\t\terror: conv ? e : "No conversion from " + prev + " to " + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: "success", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: "GET",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: "application/x-www-form-urlencoded; charset=UTF-8",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t"*": allTypes,\n\t\t\ttext: "text/plain",\n\t\t\thtml: "text/html",\n\t\t\txml: "application/xml, text/xml",\n\t\t\tjson: "application/json, text/javascript"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: "responseXML",\n\t\t\ttext: "responseText",\n\t\t\tjson: "responseJSON"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall "*") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t"* text": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t"text html": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t"text json": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t"text xml": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn\'t be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn\'t be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === "object" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( "once memory" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = "canceled",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )\n\t\t\t.replace( rprotocol, location.protocol + "//" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];\n\n\t\t// A cross-domain request is in order when the origin doesn\'t match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( "a" );\n\n\t\t\t// Support: IE8-11+\n\t\t\t// IE throws exception if url is malformed, e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE8-11+\n\t\t\t\t// Anchor\'s host property isn\'t correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + "//" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== "string" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don\'t fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( "ajaxStart" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we\'re toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );\n\n\t\t\t\t// #9682: remove data so that it\'s not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a \'_\' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, "$1_=" + nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( "Content-Type", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t"Accept",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :\n\t\t\t\ts.accepts[ "*" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = "abort";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, "No Transport" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( "timeout" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is "done" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || "";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( "Last-Modified" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( "etag" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === "HEAD" ) {\n\t\t\t\t\tstatusText = "nocontent";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = "notmodified";\n\n\t\t\t\t// If we have data, let\'s convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = "error";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + "";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( "ajaxStop" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, "json" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, "script" );\n\t}\n} );\n\njQuery.each( [ "get", "post" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: "GET",\n\t\tdataType: "script",\n\t\tasync: false,\n\t\tglobal: false,\n\t\t"throws": true\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapAll( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( this[ 0 ] ) {\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each( function() {\n\t\t\tif ( !jQuery.nodeName( this, "body" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t} ).end();\n\t}\n} );\n\n\njQuery.expr.filters.hidden = function( elem ) {\n\treturn !jQuery.expr.filters.visible( elem );\n};\njQuery.expr.filters.visible = function( elem ) {\n\n\t// Support: Opera <= 12.12\n\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\t// Use OR instead of AND as the element is not visible if either is true\n\t// See tickets #10406 and #13132\n\treturn elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;\n};\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && jQuery.type( obj ) === "object" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the "old" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( "&" ).replace( r20, "+" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for "elements" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, "elements" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( ":disabled" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( ":disabled" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, "\\r\\n" ) };\n\t\t\t\t\t} ) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, "\\r\\n" ) };\n\t\t} ).get();\n\t}\n} );\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE9\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won\'t change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {\n\t\t\t\t\theaders[ "X-Requested-With" ] = "XMLHttpRequest";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === "abort" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === "error" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE9\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== "number" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, "error" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || "text" ) !== "text" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== "string" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = callback( "error" );\n\n\t\t\t\t// Support: IE9\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( "abort" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn\'t been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: "text/javascript, application/javascript, " +\n\t\t\t"application/ecmascript, application/x-ecmascript"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t"text script": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache\'s special case and crossDomain\njQuery.ajaxPrefilter( "script", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = "GET";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( "script", function( s ) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( "<script>" ).prop( {\n\t\t\t\t\tcharset: s.scriptCharset,\n\t\t\t\t\tsrc: s.url\n\t\t\t\t} ).on(\n\t\t\t\t\t"load error",\n\t\t\t\t\tcallback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === "error" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: "callback",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t"url" :\n\t\t\ttypeof s.data === "string" &&\n\t\t\t\t( s.contentType || "" )\n\t\t\t\t\t.indexOf( "application/x-www-form-urlencoded" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && "data"\n\t\t);\n\n\t// Handle iff the expected data type is "jsonp" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ "script json" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + " was not called" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = "json";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn\'t exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn\'t screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn "script";\n\t}\n} );\n\n\n\n\n// Argument "data" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( !data || typeof data !== "string" ) {\n\t\treturn null;\n\t}\n\tif ( typeof context === "boolean" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\tcontext = context || document;\n\n\tvar parsed = rsingleTag.exec( data ),\n\t\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n// Keep a copy of the old load method\nvar _load = jQuery.fn.load;\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== "string" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( " " );\n\n\tif ( off > -1 ) {\n\t\tselector = jQuery.trim( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it\'s a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it\'s the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === "object" ) {\n\t\ttype = "POST";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If "type" variable is undefined, then "GET" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || "GET",\n\t\t\tdataType: "html",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE \'Permission Denied\' errors\n\t\t\t\tjQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets "data", "status", "jqXHR"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets "jqXHR", "status", "error"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [\n\t"ajaxStart",\n\t"ajaxStop",\n\t"ajaxComplete",\n\t"ajaxError",\n\t"ajaxSuccess",\n\t"ajaxSend"\n], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.expr.filters.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\n/**\n * Gets a window from an element\n */\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, "position" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === "static" ) {\n\t\t\telem.style.position = "relative";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, "top" );\n\t\tcurCSSLeft = jQuery.css( elem, "left" );\n\t\tcalculatePosition = ( position === "absolute" || position === "fixed" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( "using" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\toffset: function( options ) {\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar docElem, win,\n\t\t\telem = this[ 0 ],\n\t\t\tbox = { top: 0, left: 0 },\n\t\t\tdoc = elem && elem.ownerDocument;\n\n\t\tif ( !doc ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure it\'s not a disconnected DOM node\n\t\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box;\n\t\t}\n\n\t\tbox = elem.getBoundingClientRect();\n\t\twin = getWindow( doc );\n\t\treturn {\n\t\t\ttop: box.top + win.pageYOffset - docElem.clientTop,\n\t\t\tleft: box.left + win.pageXOffset - docElem.clientLeft\n\t\t};\n\t},\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n\t\t// because it is its only offset parent\n\t\tif ( jQuery.css( elem, "position" ) === "fixed" ) {\n\n\t\t\t// Assume getBoundingClientRect is there when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t// documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {\n\tvar top = "pageYOffset" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari<7-8+, Chrome<37-44+\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ "top", "left" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + "px" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: "height", Width: "width" }, function( name, type ) {\n\tjQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },\n\t\tfunction( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn\'t a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ "client" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ "scroll" + name ], doc[ "scroll" + name ],\n\t\t\t\t\t\telem.body[ "offset" + name ], doc[ "offset" + name ],\n\t\t\t\t\t\tdoc[ "client" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t} );\n} );\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, "**" ) :\n\t\t\tthis.off( types, selector || "**", fn );\n\t},\n\tsize: function() {\n\t\treturn this.length;\n\t}\n} );\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === "function" && define.amd ) {\n\tdefine( "jquery", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( !noGlobal ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\nreturn jQuery;\n}));\n'},"P+fo":function(t,n){t.exports=function(t){"undefined"!=typeof execScript?execScript(t):eval.call(null,t)}},d0dT:function(t,n,e){e("P+fo")(e("ffwb"))},ffwb:function(t,n){t.exports="/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n 'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n return function() {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n var log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n var baseP = base.prototype,\n childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node == parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n\n var i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n}\n\nInput.prototype = {\n /**\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler: function() { },\n\n /**\n * bind the events\n */\n init: function() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n\n /**\n * unbind the events\n */\n destroy: function() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n var target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input,\n deltaTime = input.timeStamp - last.timeStamp,\n velocity, velocityX, velocityY, direction;\n\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n var pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0, y = 0, i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n\n this.pressed = false; // mousedown state\n\n Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n});\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n\n Input.apply(this, arguments);\n\n this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n\n Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n\n Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i,\n targetTouches,\n changedTouches = toArray(ev.changedTouches),\n changedTargetTouches = [],\n target = this.target;\n\n // get target touches from touches\n targetTouches = allTouches.filter(function(touch) {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n Input.apply(this, arguments);\n\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n\n this.primaryTouch = null;\n this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n /**\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n }\n\n // when we're in a touch event, record touches to de-dupe synthetic mouse event\n if (isTouch) {\n recordTouches.call(this, inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n return;\n }\n\n this.callback(manager, inputEvent, inputData);\n },\n\n /**\n * remove the event listeners\n */\n destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n});\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction setLastTouch(eventData) {\n var touch = eventData.changedPointers[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {x: touch.clientX, y: touch.clientY};\n this.lastTouches.push(lastTouch);\n var lts = this.lastTouches;\n var removeLastTouch = function() {\n var i = lts.indexOf(lastTouch);\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n}\n\nTouchAction.prototype = {\n /**\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set: function(value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n },\n\n /**\n * just re-set the touchAction value\n */\n update: function() {\n this.set(this.manager.options.touchAction);\n },\n\n /**\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute: function() {\n var actions = [];\n each(this.manager.recognizers, function(recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n },\n\n /**\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults: function(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n //do not prevent defaults if this is a tap gesture\n\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n },\n\n /**\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc: function(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n var touchMap = {};\n var cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n this.options = assign({}, this.defaults, options || {});\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.options.enable = ifUndefined(this.options.enable, true);\n\n this.state = STATE_POSSIBLE;\n\n this.simultaneous = {};\n this.requireFail = [];\n}\n\nRecognizer.prototype = {\n /**\n * @virtual\n * @type {Object}\n */\n defaults: {},\n\n /**\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set: function(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n },\n\n /**\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n },\n\n /**\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n\n /**\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n },\n\n /**\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n },\n\n /**\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures: function() {\n return this.requireFail.length > 0;\n },\n\n /**\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith: function(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n\n /**\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit: function(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n },\n\n /**\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit: function(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n },\n\n /**\n * can we emit?\n * @returns {boolean}\n */\n canEmit: function() {\n var i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n },\n\n /**\n * update the recognizer\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n },\n\n /**\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {Const} STATE\n */\n process: function(inputData) { }, // jshint ignore:line\n\n /**\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction: function() { },\n\n /**\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n if (direction == DIRECTION_DOWN) {\n return 'down';\n } else if (direction == DIRECTION_UP) {\n return 'up';\n } else if (direction == DIRECTION_LEFT) {\n return 'left';\n } else if (direction == DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof AttrRecognizer\n */\n defaults: {\n /**\n * @type {Number}\n * @default 1\n */\n pointers: 1\n },\n\n /**\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest: function(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n\n /**\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process: function(input) {\n var state = this.state;\n var eventType = input.eventType;\n\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n\n this.pX = null;\n this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PanRecognizer\n */\n defaults: {\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n\n getTouchAction: function() {\n var direction = this.options.direction;\n var actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n },\n\n directionTest: function(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n\n attrTest: function(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n },\n\n emit: function(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'pinch',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n\n emit: function(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n Recognizer.apply(this, arguments);\n\n this._timer = null;\n this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PressRecognizer\n */\n defaults: {\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9 // a minimal movement is ok, but keep it low\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_AUTO];\n },\n\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(this.options.event + 'up', input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof RotateRecognizer\n */\n defaults: {\n event: 'rotate',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof SwipeRecognizer\n */\n defaults: {\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n\n getTouchAction: function() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n\n attrTest: function(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return this._super.attrTest.call(this, input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers == this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n\n emit: function(input) {\n var direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n Recognizer.apply(this, arguments);\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_MANIPULATION];\n },\n\n process: function(input) {\n var options = this.options;\n\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n var tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n },\n\n failTimeout: function() {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function() {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n /**\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {enable: false}],\n [PinchRecognizer, {enable: false}, ['rotate']],\n [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n [TapRecognizer],\n [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n [PressRecognizer]\n ],\n\n /**\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: 'none',\n\n /**\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: 'none',\n\n /**\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: 'none',\n\n /**\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: 'none',\n\n /**\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: 'none',\n\n /**\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: 'rgba(0,0,0,0)'\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n this.options = assign({}, Hammer.defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, function(item) {\n var recognizer = this.add(new (item[0])(item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n}\n\nManager.prototype = {\n /**\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n set: function(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n },\n\n /**\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n stop: function(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n\n /**\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n var session = this.session;\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n var recognizer;\n var recognizers = this.recognizers;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n var curRecognizer = session.curRecognizer;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n curRecognizer = session.curRecognizer = null;\n }\n\n var i = 0;\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n curRecognizer = session.curRecognizer = recognizer;\n }\n i++;\n }\n },\n\n /**\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n get: function(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event == recognizer) {\n return recognizers[i];\n }\n }\n return null;\n },\n\n /**\n * add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n add: function(recognizer) {\n if (invokeArrayArg(recognizer, 'add', this)) {\n return this;\n }\n\n // remove existing\n var existing = this.get(recognizer.options.event);\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n },\n\n /**\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n remove: function(recognizer) {\n if (invokeArrayArg(recognizer, 'remove', this)) {\n return this;\n }\n\n recognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, recognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n },\n\n /**\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n on: function(events, handler) {\n if (events === undefined) {\n return;\n }\n if (handler === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n\n /**\n * unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n off: function(events, handler) {\n if (events === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n },\n\n /**\n * emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n emit: function(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n var handlers = this.handlers[event] && this.handlers[event].slice();\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function() {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n },\n\n /**\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n destroy: function() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n if (!element.style) {\n return;\n }\n var prop;\n each(manager.options.cssProps, function(value, name) {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || '';\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent('Event');\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n assign: assign,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n// style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (typeof define === 'function' && define.amd) {\n define(function() {\n return Hammer;\n });\n} else if (typeof module != 'undefined' && module.exports) {\n module.exports = Hammer;\n} else {\n window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n"},z2tB:function(t,n){t.exports="/*!\n * Materialize v0.100.1 (http://materializecss.com)\n * Copyright 2014-2017 Materialize\n * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)\n */\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// Check for jQuery.\nif (typeof jQuery === 'undefined') {\n var jQuery;\n // Check if require is a defined function.\n if (typeof require === 'function') {\n jQuery = $ = require('jquery');\n // Else use the dollar sign alias.\n } else {\n jQuery = $;\n }\n}\n; /*\n * jQuery Easing v1.4.0 - http://gsgd.co.uk/sandbox/jquery/easing/\n * Open source under the BSD License.\n * Copyright © 2008 George McGinley Smith\n * All rights reserved.\n * https://raw.github.com/gdsmith/jquery-easing/master/LICENSE\n */\n\n(function (factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['jquery'], function ($) {\n return factory($);\n });\n } else if (typeof module === \"object\" && typeof module.exports === \"object\") {\n exports = factory(require('jquery'));\n } else {\n factory(jQuery);\n }\n})(function ($) {\n\n // Preserve the original jQuery \"swing\" easing as \"jswing\"\n $.easing['jswing'] = $.easing['swing'];\n\n var pow = Math.pow,\n sqrt = Math.sqrt,\n sin = Math.sin,\n cos = Math.cos,\n PI = Math.PI,\n c1 = 1.70158,\n c2 = c1 * 1.525,\n c3 = c1 + 1,\n c4 = 2 * PI / 3,\n c5 = 2 * PI / 4.5;\n\n // x is the fraction of animation progress, in the range 0..1\n function bounceOut(x) {\n var n1 = 7.5625,\n d1 = 2.75;\n if (x < 1 / d1) {\n return n1 * x * x;\n } else if (x < 2 / d1) {\n return n1 * (x -= 1.5 / d1) * x + .75;\n } else if (x < 2.5 / d1) {\n return n1 * (x -= 2.25 / d1) * x + .9375;\n } else {\n return n1 * (x -= 2.625 / d1) * x + .984375;\n }\n }\n\n $.extend($.easing, {\n def: 'easeOutQuad',\n swing: function (x) {\n return $.easing[$.easing.def](x);\n },\n easeInQuad: function (x) {\n return x * x;\n },\n easeOutQuad: function (x) {\n return 1 - (1 - x) * (1 - x);\n },\n easeInOutQuad: function (x) {\n return x < 0.5 ? 2 * x * x : 1 - pow(-2 * x + 2, 2) / 2;\n },\n easeInCubic: function (x) {\n return x * x * x;\n },\n easeOutCubic: function (x) {\n return 1 - pow(1 - x, 3);\n },\n easeInOutCubic: function (x) {\n return x < 0.5 ? 4 * x * x * x : 1 - pow(-2 * x + 2, 3) / 2;\n },\n easeInQuart: function (x) {\n return x * x * x * x;\n },\n easeOutQuart: function (x) {\n return 1 - pow(1 - x, 4);\n },\n easeInOutQuart: function (x) {\n return x < 0.5 ? 8 * x * x * x * x : 1 - pow(-2 * x + 2, 4) / 2;\n },\n easeInQuint: function (x) {\n return x * x * x * x * x;\n },\n easeOutQuint: function (x) {\n return 1 - pow(1 - x, 5);\n },\n easeInOutQuint: function (x) {\n return x < 0.5 ? 16 * x * x * x * x * x : 1 - pow(-2 * x + 2, 5) / 2;\n },\n easeInSine: function (x) {\n return 1 - cos(x * PI / 2);\n },\n easeOutSine: function (x) {\n return sin(x * PI / 2);\n },\n easeInOutSine: function (x) {\n return -(cos(PI * x) - 1) / 2;\n },\n easeInExpo: function (x) {\n return x === 0 ? 0 : pow(2, 10 * x - 10);\n },\n easeOutExpo: function (x) {\n return x === 1 ? 1 : 1 - pow(2, -10 * x);\n },\n easeInOutExpo: function (x) {\n return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? pow(2, 20 * x - 10) / 2 : (2 - pow(2, -20 * x + 10)) / 2;\n },\n easeInCirc: function (x) {\n return 1 - sqrt(1 - pow(x, 2));\n },\n easeOutCirc: function (x) {\n return sqrt(1 - pow(x - 1, 2));\n },\n easeInOutCirc: function (x) {\n return x < 0.5 ? (1 - sqrt(1 - pow(2 * x, 2))) / 2 : (sqrt(1 - pow(-2 * x + 2, 2)) + 1) / 2;\n },\n easeInElastic: function (x) {\n return x === 0 ? 0 : x === 1 ? 1 : -pow(2, 10 * x - 10) * sin((x * 10 - 10.75) * c4);\n },\n easeOutElastic: function (x) {\n return x === 0 ? 0 : x === 1 ? 1 : pow(2, -10 * x) * sin((x * 10 - 0.75) * c4) + 1;\n },\n easeInOutElastic: function (x) {\n return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(pow(2, 20 * x - 10) * sin((20 * x - 11.125) * c5)) / 2 : pow(2, -20 * x + 10) * sin((20 * x - 11.125) * c5) / 2 + 1;\n },\n easeInBack: function (x) {\n return c3 * x * x * x - c1 * x * x;\n },\n easeOutBack: function (x) {\n return 1 + c3 * pow(x - 1, 3) + c1 * pow(x - 1, 2);\n },\n easeInOutBack: function (x) {\n return x < 0.5 ? pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2;\n },\n easeInBounce: function (x) {\n return 1 - bounceOut(1 - x);\n },\n easeOutBounce: bounceOut,\n easeInOutBounce: function (x) {\n return x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2;\n }\n });\n});; // Custom Easing\njQuery.extend(jQuery.easing, {\n easeInOutMaterial: function (x, t, b, c, d) {\n if ((t /= d / 2) < 1) return c / 2 * t * t + b;\n return c / 4 * ((t -= 2) * t * t + 2) + b;\n }\n});; /*! VelocityJS.org (1.2.3). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */\n/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */\n/*! Note that this has been modified by Materialize to confirm that Velocity is not already being imported. */\njQuery.Velocity ? console.log(\"Velocity is already loaded. You may be needlessly importing Velocity again; note that Materialize includes Velocity.\") : (!function (e) {\n function t(e) {\n var t = e.length,\n a = r.type(e);return \"function\" === a || r.isWindow(e) ? !1 : 1 === e.nodeType && t ? !0 : \"array\" === a || 0 === t || \"number\" == typeof t && t > 0 && t - 1 in e;\n }if (!e.jQuery) {\n var r = function (e, t) {\n return new r.fn.init(e, t);\n };r.isWindow = function (e) {\n return null != e && e == e.window;\n }, r.type = function (e) {\n return null == e ? e + \"\" : \"object\" == typeof e || \"function\" == typeof e ? n[i.call(e)] || \"object\" : typeof e;\n }, r.isArray = Array.isArray || function (e) {\n return \"array\" === r.type(e);\n }, r.isPlainObject = function (e) {\n var t;if (!e || \"object\" !== r.type(e) || e.nodeType || r.isWindow(e)) return !1;try {\n if (e.constructor && !o.call(e, \"constructor\") && !o.call(e.constructor.prototype, \"isPrototypeOf\")) return !1;\n } catch (a) {\n return !1;\n }for (t in e) {}return void 0 === t || o.call(e, t);\n }, r.each = function (e, r, a) {\n var n,\n o = 0,\n i = e.length,\n s = t(e);if (a) {\n if (s) for (; i > o && (n = r.apply(e[o], a), n !== !1); o++) {} else for (o in e) {\n if (n = r.apply(e[o], a), n === !1) break;\n }\n } else if (s) for (; i > o && (n = r.call(e[o], o, e[o]), n !== !1); o++) {} else for (o in e) {\n if (n = r.call(e[o], o, e[o]), n === !1) break;\n }return e;\n }, r.data = function (e, t, n) {\n if (void 0 === n) {\n var o = e[r.expando],\n i = o && a[o];if (void 0 === t) return i;if (i && t in i) return i[t];\n } else if (void 0 !== t) {\n var o = e[r.expando] || (e[r.expando] = ++r.uuid);return a[o] = a[o] || {}, a[o][t] = n, n;\n }\n }, r.removeData = function (e, t) {\n var n = e[r.expando],\n o = n && a[n];o && r.each(t, function (e, t) {\n delete o[t];\n });\n }, r.extend = function () {\n var e,\n t,\n a,\n n,\n o,\n i,\n s = arguments[0] || {},\n l = 1,\n u = arguments.length,\n c = !1;for (\"boolean\" == typeof s && (c = s, s = arguments[l] || {}, l++), \"object\" != typeof s && \"function\" !== r.type(s) && (s = {}), l === u && (s = this, l--); u > l; l++) {\n if (null != (o = arguments[l])) for (n in o) {\n e = s[n], a = o[n], s !== a && (c && a && (r.isPlainObject(a) || (t = r.isArray(a))) ? (t ? (t = !1, i = e && r.isArray(e) ? e : []) : i = e && r.isPlainObject(e) ? e : {}, s[n] = r.extend(c, i, a)) : void 0 !== a && (s[n] = a));\n }\n }return s;\n }, r.queue = function (e, a, n) {\n function o(e, r) {\n var a = r || [];return null != e && (t(Object(e)) ? !function (e, t) {\n for (var r = +t.length, a = 0, n = e.length; r > a;) {\n e[n++] = t[a++];\n }if (r !== r) for (; void 0 !== t[a];) {\n e[n++] = t[a++];\n }return e.length = n, e;\n }(a, \"string\" == typeof e ? [e] : e) : [].push.call(a, e)), a;\n }if (e) {\n a = (a || \"fx\") + \"queue\";var i = r.data(e, a);return n ? (!i || r.isArray(n) ? i = r.data(e, a, o(n)) : i.push(n), i) : i || [];\n }\n }, r.dequeue = function (e, t) {\n r.each(e.nodeType ? [e] : e, function (e, a) {\n t = t || \"fx\";var n = r.queue(a, t),\n o = n.shift();\"inprogress\" === o && (o = n.shift()), o && (\"fx\" === t && n.unshift(\"inprogress\"), o.call(a, function () {\n r.dequeue(a, t);\n }));\n });\n }, r.fn = r.prototype = { init: function (e) {\n if (e.nodeType) return this[0] = e, this;throw new Error(\"Not a DOM node.\");\n }, offset: function () {\n var t = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 };return { top: t.top + (e.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0), left: t.left + (e.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0) };\n }, position: function () {\n function e() {\n for (var e = this.offsetParent || document; e && \"html\" === !e.nodeType.toLowerCase && \"static\" === e.style.position;) {\n e = e.offsetParent;\n }return e || document;\n }var t = this[0],\n e = e.apply(t),\n a = this.offset(),\n n = /^(?:body|html)$/i.test(e.nodeName) ? { top: 0, left: 0 } : r(e).offset();return a.top -= parseFloat(t.style.marginTop) || 0, a.left -= parseFloat(t.style.marginLeft) || 0, e.style && (n.top += parseFloat(e.style.borderTopWidth) || 0, n.left += parseFloat(e.style.borderLeftWidth) || 0), { top: a.top - n.top, left: a.left - n.left };\n } };var a = {};r.expando = \"velocity\" + new Date().getTime(), r.uuid = 0;for (var n = {}, o = n.hasOwnProperty, i = n.toString, s = \"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), l = 0; l < s.length; l++) {\n n[\"[object \" + s[l] + \"]\"] = s[l].toLowerCase();\n }r.fn.init.prototype = r.fn, e.Velocity = { Utilities: r };\n }\n}(window), function (e) {\n \"object\" == typeof module && \"object\" == typeof module.exports ? module.exports = e() : \"function\" == typeof define && define.amd ? define(e) : e();\n}(function () {\n return function (e, t, r, a) {\n function n(e) {\n for (var t = -1, r = e ? e.length : 0, a = []; ++t < r;) {\n var n = e[t];n && a.push(n);\n }return a;\n }function o(e) {\n return m.isWrapped(e) ? e = [].slice.call(e) : m.isNode(e) && (e = [e]), e;\n }function i(e) {\n var t = f.data(e, \"velocity\");return null === t ? a : t;\n }function s(e) {\n return function (t) {\n return Math.round(t * e) * (1 / e);\n };\n }function l(e, r, a, n) {\n function o(e, t) {\n return 1 - 3 * t + 3 * e;\n }function i(e, t) {\n return 3 * t - 6 * e;\n }function s(e) {\n return 3 * e;\n }function l(e, t, r) {\n return ((o(t, r) * e + i(t, r)) * e + s(t)) * e;\n }function u(e, t, r) {\n return 3 * o(t, r) * e * e + 2 * i(t, r) * e + s(t);\n }function c(t, r) {\n for (var n = 0; m > n; ++n) {\n var o = u(r, e, a);if (0 === o) return r;var i = l(r, e, a) - t;r -= i / o;\n }return r;\n }function p() {\n for (var t = 0; b > t; ++t) {\n w[t] = l(t * x, e, a);\n }\n }function f(t, r, n) {\n var o,\n i,\n s = 0;do {\n i = r + (n - r) / 2, o = l(i, e, a) - t, o > 0 ? n = i : r = i;\n } while (Math.abs(o) > h && ++s < v);return i;\n }function d(t) {\n for (var r = 0, n = 1, o = b - 1; n != o && w[n] <= t; ++n) {\n r += x;\n }--n;var i = (t - w[n]) / (w[n + 1] - w[n]),\n s = r + i * x,\n l = u(s, e, a);return l >= y ? c(t, s) : 0 == l ? s : f(t, r, r + x);\n }function g() {\n V = !0, (e != r || a != n) && p();\n }var m = 4,\n y = .001,\n h = 1e-7,\n v = 10,\n b = 11,\n x = 1 / (b - 1),\n S = \"Float32Array\" in t;if (4 !== arguments.length) return !1;for (var P = 0; 4 > P; ++P) {\n if (\"number\" != typeof arguments[P] || isNaN(arguments[P]) || !isFinite(arguments[P])) return !1;\n }e = Math.min(e, 1), a = Math.min(a, 1), e = Math.max(e, 0), a = Math.max(a, 0);var w = S ? new Float32Array(b) : new Array(b),\n V = !1,\n C = function (t) {\n return V || g(), e === r && a === n ? t : 0 === t ? 0 : 1 === t ? 1 : l(d(t), r, n);\n };C.getControlPoints = function () {\n return [{ x: e, y: r }, { x: a, y: n }];\n };var T = \"generateBezier(\" + [e, r, a, n] + \")\";return C.toString = function () {\n return T;\n }, C;\n }function u(e, t) {\n var r = e;return m.isString(e) ? b.Easings[e] || (r = !1) : r = m.isArray(e) && 1 === e.length ? s.apply(null, e) : m.isArray(e) && 2 === e.length ? x.apply(null, e.concat([t])) : m.isArray(e) && 4 === e.length ? l.apply(null, e) : !1, r === !1 && (r = b.Easings[b.defaults.easing] ? b.defaults.easing : v), r;\n }function c(e) {\n if (e) {\n var t = new Date().getTime(),\n r = b.State.calls.length;r > 1e4 && (b.State.calls = n(b.State.calls));for (var o = 0; r > o; o++) {\n if (b.State.calls[o]) {\n var s = b.State.calls[o],\n l = s[0],\n u = s[2],\n d = s[3],\n g = !!d,\n y = null;d || (d = b.State.calls[o][3] = t - 16);for (var h = Math.min((t - d) / u.duration, 1), v = 0, x = l.length; x > v; v++) {\n var P = l[v],\n V = P.element;if (i(V)) {\n var C = !1;if (u.display !== a && null !== u.display && \"none\" !== u.display) {\n if (\"flex\" === u.display) {\n var T = [\"-webkit-box\", \"-moz-box\", \"-ms-flexbox\", \"-webkit-flex\"];f.each(T, function (e, t) {\n S.setPropertyValue(V, \"display\", t);\n });\n }S.setPropertyValue(V, \"display\", u.display);\n }u.visibility !== a && \"hidden\" !== u.visibility && S.setPropertyValue(V, \"visibility\", u.visibility);for (var k in P) {\n if (\"element\" !== k) {\n var A,\n F = P[k],\n j = m.isString(F.easing) ? b.Easings[F.easing] : F.easing;if (1 === h) A = F.endValue;else {\n var E = F.endValue - F.startValue;if (A = F.startValue + E * j(h, u, E), !g && A === F.currentValue) continue;\n }if (F.currentValue = A, \"tween\" === k) y = A;else {\n if (S.Hooks.registered[k]) {\n var H = S.Hooks.getRoot(k),\n N = i(V).rootPropertyValueCache[H];N && (F.rootPropertyValue = N);\n }var L = S.setPropertyValue(V, k, F.currentValue + (0 === parseFloat(A) ? \"\" : F.unitType), F.rootPropertyValue, F.scrollData);S.Hooks.registered[k] && (i(V).rootPropertyValueCache[H] = S.Normalizations.registered[H] ? S.Normalizations.registered[H](\"extract\", null, L[1]) : L[1]), \"transform\" === L[0] && (C = !0);\n }\n }\n }u.mobileHA && i(V).transformCache.translate3d === a && (i(V).transformCache.translate3d = \"(0px, 0px, 0px)\", C = !0), C && S.flushTransformCache(V);\n }\n }u.display !== a && \"none\" !== u.display && (b.State.calls[o][2].display = !1), u.visibility !== a && \"hidden\" !== u.visibility && (b.State.calls[o][2].visibility = !1), u.progress && u.progress.call(s[1], s[1], h, Math.max(0, d + u.duration - t), d, y), 1 === h && p(o);\n }\n }\n }b.State.isTicking && w(c);\n }function p(e, t) {\n if (!b.State.calls[e]) return !1;for (var r = b.State.calls[e][0], n = b.State.calls[e][1], o = b.State.calls[e][2], s = b.State.calls[e][4], l = !1, u = 0, c = r.length; c > u; u++) {\n var p = r[u].element;if (t || o.loop || (\"none\" === o.display && S.setPropertyValue(p, \"display\", o.display), \"hidden\" === o.visibility && S.setPropertyValue(p, \"visibility\", o.visibility)), o.loop !== !0 && (f.queue(p)[1] === a || !/\\.velocityQueueEntryFlag/i.test(f.queue(p)[1])) && i(p)) {\n i(p).isAnimating = !1, i(p).rootPropertyValueCache = {};var d = !1;f.each(S.Lists.transforms3D, function (e, t) {\n var r = /^scale/.test(t) ? 1 : 0,\n n = i(p).transformCache[t];i(p).transformCache[t] !== a && new RegExp(\"^\\\\(\" + r + \"[^.]\").test(n) && (d = !0, delete i(p).transformCache[t]);\n }), o.mobileHA && (d = !0, delete i(p).transformCache.translate3d), d && S.flushTransformCache(p), S.Values.removeClass(p, \"velocity-animating\");\n }if (!t && o.complete && !o.loop && u === c - 1) try {\n o.complete.call(n, n);\n } catch (g) {\n setTimeout(function () {\n throw g;\n }, 1);\n }s && o.loop !== !0 && s(n), i(p) && o.loop === !0 && !t && (f.each(i(p).tweensContainer, function (e, t) {\n /^rotate/.test(e) && 360 === parseFloat(t.endValue) && (t.endValue = 0, t.startValue = 360), /^backgroundPosition/.test(e) && 100 === parseFloat(t.endValue) && \"%\" === t.unitType && (t.endValue = 0, t.startValue = 100);\n }), b(p, \"reverse\", { loop: !0, delay: o.delay })), o.queue !== !1 && f.dequeue(p, o.queue);\n }b.State.calls[e] = !1;for (var m = 0, y = b.State.calls.length; y > m; m++) {\n if (b.State.calls[m] !== !1) {\n l = !0;break;\n }\n }l === !1 && (b.State.isTicking = !1, delete b.State.calls, b.State.calls = []);\n }var f,\n d = function () {\n if (r.documentMode) return r.documentMode;for (var e = 7; e > 4; e--) {\n var t = r.createElement(\"div\");if (t.innerHTML = \"\x3c!--[if IE \" + e + \"]><span></span><![endif]--\x3e\", t.getElementsByTagName(\"span\").length) return t = null, e;\n }return a;\n }(),\n g = function () {\n var e = 0;return t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || function (t) {\n var r,\n a = new Date().getTime();return r = Math.max(0, 16 - (a - e)), e = a + r, setTimeout(function () {\n t(a + r);\n }, r);\n };\n }(),\n m = { isString: function (e) {\n return \"string\" == typeof e;\n }, isArray: Array.isArray || function (e) {\n return \"[object Array]\" === Object.prototype.toString.call(e);\n }, isFunction: function (e) {\n return \"[object Function]\" === Object.prototype.toString.call(e);\n }, isNode: function (e) {\n return e && e.nodeType;\n }, isNodeList: function (e) {\n return \"object\" == typeof e && /^\\[object (HTMLCollection|NodeList|Object)\\]$/.test(Object.prototype.toString.call(e)) && e.length !== a && (0 === e.length || \"object\" == typeof e[0] && e[0].nodeType > 0);\n }, isWrapped: function (e) {\n return e && (e.jquery || t.Zepto && t.Zepto.zepto.isZ(e));\n }, isSVG: function (e) {\n return t.SVGElement && e instanceof t.SVGElement;\n }, isEmptyObject: function (e) {\n for (var t in e) {\n return !1;\n }return !0;\n } },\n y = !1;if (e.fn && e.fn.jquery ? (f = e, y = !0) : f = t.Velocity.Utilities, 8 >= d && !y) throw new Error(\"Velocity: IE8 and below require jQuery to be loaded before Velocity.\");if (7 >= d) return void (jQuery.fn.velocity = jQuery.fn.animate);var h = 400,\n v = \"swing\",\n b = { State: { isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), isAndroid: /Android/i.test(navigator.userAgent), isGingerbread: /Android 2\\.3\\.[3-7]/i.test(navigator.userAgent), isChrome: t.chrome, isFirefox: /Firefox/i.test(navigator.userAgent), prefixElement: r.createElement(\"div\"), prefixMatches: {}, scrollAnchor: null, scrollPropertyLeft: null, scrollPropertyTop: null, isTicking: !1, calls: [] }, CSS: {}, Utilities: f, Redirects: {}, Easings: {}, Promise: t.Promise, defaults: { queue: \"\", duration: h, easing: v, begin: a, complete: a, progress: a, display: a, visibility: a, loop: !1, delay: !1, mobileHA: !0, _cacheValues: !0 }, init: function (e) {\n f.data(e, \"velocity\", { isSVG: m.isSVG(e), isAnimating: !1, computedStyle: null, tweensContainer: null, rootPropertyValueCache: {}, transformCache: {} });\n }, hook: null, mock: !1, version: { major: 1, minor: 2, patch: 2 }, debug: !1 };t.pageYOffset !== a ? (b.State.scrollAnchor = t, b.State.scrollPropertyLeft = \"pageXOffset\", b.State.scrollPropertyTop = \"pageYOffset\") : (b.State.scrollAnchor = r.documentElement || r.body.parentNode || r.body, b.State.scrollPropertyLeft = \"scrollLeft\", b.State.scrollPropertyTop = \"scrollTop\");var x = function () {\n function e(e) {\n return -e.tension * e.x - e.friction * e.v;\n }function t(t, r, a) {\n var n = { x: t.x + a.dx * r, v: t.v + a.dv * r, tension: t.tension, friction: t.friction };return { dx: n.v, dv: e(n) };\n }function r(r, a) {\n var n = { dx: r.v, dv: e(r) },\n o = t(r, .5 * a, n),\n i = t(r, .5 * a, o),\n s = t(r, a, i),\n l = 1 / 6 * (n.dx + 2 * (o.dx + i.dx) + s.dx),\n u = 1 / 6 * (n.dv + 2 * (o.dv + i.dv) + s.dv);return r.x = r.x + l * a, r.v = r.v + u * a, r;\n }return function a(e, t, n) {\n var o,\n i,\n s,\n l = { x: -1, v: 0, tension: null, friction: null },\n u = [0],\n c = 0,\n p = 1e-4,\n f = .016;for (e = parseFloat(e) || 500, t = parseFloat(t) || 20, n = n || null, l.tension = e, l.friction = t, o = null !== n, o ? (c = a(e, t), i = c / n * f) : i = f; s = r(s || l, i), u.push(1 + s.x), c += 16, Math.abs(s.x) > p && Math.abs(s.v) > p;) {}return o ? function (e) {\n return u[e * (u.length - 1) | 0];\n } : c;\n };\n }();b.Easings = { linear: function (e) {\n return e;\n }, swing: function (e) {\n return .5 - Math.cos(e * Math.PI) / 2;\n }, spring: function (e) {\n return 1 - Math.cos(4.5 * e * Math.PI) * Math.exp(6 * -e);\n } }, f.each([[\"ease\", [.25, .1, .25, 1]], [\"ease-in\", [.42, 0, 1, 1]], [\"ease-out\", [0, 0, .58, 1]], [\"ease-in-out\", [.42, 0, .58, 1]], [\"easeInSine\", [.47, 0, .745, .715]], [\"easeOutSine\", [.39, .575, .565, 1]], [\"easeInOutSine\", [.445, .05, .55, .95]], [\"easeInQuad\", [.55, .085, .68, .53]], [\"easeOutQuad\", [.25, .46, .45, .94]], [\"easeInOutQuad\", [.455, .03, .515, .955]], [\"easeInCubic\", [.55, .055, .675, .19]], [\"easeOutCubic\", [.215, .61, .355, 1]], [\"easeInOutCubic\", [.645, .045, .355, 1]], [\"easeInQuart\", [.895, .03, .685, .22]], [\"easeOutQuart\", [.165, .84, .44, 1]], [\"easeInOutQuart\", [.77, 0, .175, 1]], [\"easeInQuint\", [.755, .05, .855, .06]], [\"easeOutQuint\", [.23, 1, .32, 1]], [\"easeInOutQuint\", [.86, 0, .07, 1]], [\"easeInExpo\", [.95, .05, .795, .035]], [\"easeOutExpo\", [.19, 1, .22, 1]], [\"easeInOutExpo\", [1, 0, 0, 1]], [\"easeInCirc\", [.6, .04, .98, .335]], [\"easeOutCirc\", [.075, .82, .165, 1]], [\"easeInOutCirc\", [.785, .135, .15, .86]]], function (e, t) {\n b.Easings[t[0]] = l.apply(null, t[1]);\n });var S = b.CSS = { RegEx: { isHex: /^#([A-f\\d]{3}){1,2}$/i, valueUnwrap: /^[A-z]+\\((.*)\\)$/i, wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/, valueSplit: /([A-z]+\\(.+\\))|(([A-z0-9#-.]+?)(?=\\s|$))/gi }, Lists: { colors: [\"fill\", \"stroke\", \"stopColor\", \"color\", \"backgroundColor\", \"borderColor\", \"borderTopColor\", \"borderRightColor\", \"borderBottomColor\", \"borderLeftColor\", \"outlineColor\"], transformsBase: [\"translateX\", \"translateY\", \"scale\", \"scaleX\", \"scaleY\", \"skewX\", \"skewY\", \"rotateZ\"], transforms3D: [\"transformPerspective\", \"translateZ\", \"scaleZ\", \"rotateX\", \"rotateY\"] }, Hooks: { templates: { textShadow: [\"Color X Y Blur\", \"black 0px 0px 0px\"], boxShadow: [\"Color X Y Blur Spread\", \"black 0px 0px 0px 0px\"], clip: [\"Top Right Bottom Left\", \"0px 0px 0px 0px\"], backgroundPosition: [\"X Y\", \"0% 0%\"], transformOrigin: [\"X Y Z\", \"50% 50% 0px\"], perspectiveOrigin: [\"X Y\", \"50% 50%\"] }, registered: {}, register: function () {\n for (var e = 0; e < S.Lists.colors.length; e++) {\n var t = \"color\" === S.Lists.colors[e] ? \"0 0 0 1\" : \"255 255 255 1\";S.Hooks.templates[S.Lists.colors[e]] = [\"Red Green Blue Alpha\", t];\n }var r, a, n;if (d) for (r in S.Hooks.templates) {\n a = S.Hooks.templates[r], n = a[0].split(\" \");var o = a[1].match(S.RegEx.valueSplit);\"Color\" === n[0] && (n.push(n.shift()), o.push(o.shift()), S.Hooks.templates[r] = [n.join(\" \"), o.join(\" \")]);\n }for (r in S.Hooks.templates) {\n a = S.Hooks.templates[r], n = a[0].split(\" \");for (var e in n) {\n var i = r + n[e],\n s = e;S.Hooks.registered[i] = [r, s];\n }\n }\n }, getRoot: function (e) {\n var t = S.Hooks.registered[e];return t ? t[0] : e;\n }, cleanRootPropertyValue: function (e, t) {\n return S.RegEx.valueUnwrap.test(t) && (t = t.match(S.RegEx.valueUnwrap)[1]), S.Values.isCSSNullValue(t) && (t = S.Hooks.templates[e][1]), t;\n }, extractValue: function (e, t) {\n var r = S.Hooks.registered[e];if (r) {\n var a = r[0],\n n = r[1];return t = S.Hooks.cleanRootPropertyValue(a, t), t.toString().match(S.RegEx.valueSplit)[n];\n }return t;\n }, injectValue: function (e, t, r) {\n var a = S.Hooks.registered[e];if (a) {\n var n,\n o,\n i = a[0],\n s = a[1];return r = S.Hooks.cleanRootPropertyValue(i, r), n = r.toString().match(S.RegEx.valueSplit), n[s] = t, o = n.join(\" \");\n }return r;\n } }, Normalizations: { registered: { clip: function (e, t, r) {\n switch (e) {case \"name\":\n return \"clip\";case \"extract\":\n var a;return S.RegEx.wrappedValueAlreadyExtracted.test(r) ? a = r : (a = r.toString().match(S.RegEx.valueUnwrap), a = a ? a[1].replace(/,(\\s+)?/g, \" \") : r), a;case \"inject\":\n return \"rect(\" + r + \")\";}\n }, blur: function (e, t, r) {\n switch (e) {case \"name\":\n return b.State.isFirefox ? \"filter\" : \"-webkit-filter\";case \"extract\":\n var a = parseFloat(r);if (!a && 0 !== a) {\n var n = r.toString().match(/blur\\(([0-9]+[A-z]+)\\)/i);a = n ? n[1] : 0;\n }return a;case \"inject\":\n return parseFloat(r) ? \"blur(\" + r + \")\" : \"none\";}\n }, opacity: function (e, t, r) {\n if (8 >= d) switch (e) {case \"name\":\n return \"filter\";case \"extract\":\n var a = r.toString().match(/alpha\\(opacity=(.*)\\)/i);return r = a ? a[1] / 100 : 1;case \"inject\":\n return t.style.zoom = 1, parseFloat(r) >= 1 ? \"\" : \"alpha(opacity=\" + parseInt(100 * parseFloat(r), 10) + \")\";} else switch (e) {case \"name\":\n return \"opacity\";case \"extract\":\n return r;case \"inject\":\n return r;}\n } }, register: function () {\n 9 >= d || b.State.isGingerbread || (S.Lists.transformsBase = S.Lists.transformsBase.concat(S.Lists.transforms3D));for (var e = 0; e < S.Lists.transformsBase.length; e++) {\n !function () {\n var t = S.Lists.transformsBase[e];S.Normalizations.registered[t] = function (e, r, n) {\n switch (e) {case \"name\":\n return \"transform\";case \"extract\":\n return i(r) === a || i(r).transformCache[t] === a ? /^scale/i.test(t) ? 1 : 0 : i(r).transformCache[t].replace(/[()]/g, \"\");case \"inject\":\n var o = !1;switch (t.substr(0, t.length - 1)) {case \"translate\":\n o = !/(%|px|em|rem|vw|vh|\\d)$/i.test(n);break;case \"scal\":case \"scale\":\n b.State.isAndroid && i(r).transformCache[t] === a && 1 > n && (n = 1), o = !/(\\d)$/i.test(n);break;case \"skew\":\n o = !/(deg|\\d)$/i.test(n);break;case \"rotate\":\n o = !/(deg|\\d)$/i.test(n);}return o || (i(r).transformCache[t] = \"(\" + n + \")\"), i(r).transformCache[t];}\n };\n }();\n }for (var e = 0; e < S.Lists.colors.length; e++) {\n !function () {\n var t = S.Lists.colors[e];S.Normalizations.registered[t] = function (e, r, n) {\n switch (e) {case \"name\":\n return t;case \"extract\":\n var o;if (S.RegEx.wrappedValueAlreadyExtracted.test(n)) o = n;else {\n var i,\n s = { black: \"rgb(0, 0, 0)\", blue: \"rgb(0, 0, 255)\", gray: \"rgb(128, 128, 128)\", green: \"rgb(0, 128, 0)\", red: \"rgb(255, 0, 0)\", white: \"rgb(255, 255, 255)\" };/^[A-z]+$/i.test(n) ? i = s[n] !== a ? s[n] : s.black : S.RegEx.isHex.test(n) ? i = \"rgb(\" + S.Values.hexToRgb(n).join(\" \") + \")\" : /^rgba?\\(/i.test(n) || (i = s.black), o = (i || n).toString().match(S.RegEx.valueUnwrap)[1].replace(/,(\\s+)?/g, \" \");\n }return 8 >= d || 3 !== o.split(\" \").length || (o += \" 1\"), o;case \"inject\":\n return 8 >= d ? 4 === n.split(\" \").length && (n = n.split(/\\s+/).slice(0, 3).join(\" \")) : 3 === n.split(\" \").length && (n += \" 1\"), (8 >= d ? \"rgb\" : \"rgba\") + \"(\" + n.replace(/\\s+/g, \",\").replace(/\\.(\\d)+(?=,)/g, \"\") + \")\";}\n };\n }();\n }\n } }, Names: { camelCase: function (e) {\n return e.replace(/-(\\w)/g, function (e, t) {\n return t.toUpperCase();\n });\n }, SVGAttribute: function (e) {\n var t = \"width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2\";return (d || b.State.isAndroid && !b.State.isChrome) && (t += \"|transform\"), new RegExp(\"^(\" + t + \")$\", \"i\").test(e);\n }, prefixCheck: function (e) {\n if (b.State.prefixMatches[e]) return [b.State.prefixMatches[e], !0];for (var t = [\"\", \"Webkit\", \"Moz\", \"ms\", \"O\"], r = 0, a = t.length; a > r; r++) {\n var n;if (n = 0 === r ? e : t[r] + e.replace(/^\\w/, function (e) {\n return e.toUpperCase();\n }), m.isString(b.State.prefixElement.style[n])) return b.State.prefixMatches[e] = n, [n, !0];\n }return [e, !1];\n } }, Values: { hexToRgb: function (e) {\n var t,\n r = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,\n a = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;return e = e.replace(r, function (e, t, r, a) {\n return t + t + r + r + a + a;\n }), t = a.exec(e), t ? [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)] : [0, 0, 0];\n }, isCSSNullValue: function (e) {\n return 0 == e || /^(none|auto|transparent|(rgba\\(0, ?0, ?0, ?0\\)))$/i.test(e);\n }, getUnitType: function (e) {\n return (/^(rotate|skew)/i.test(e) ? \"deg\" : /(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e) ? \"\" : \"px\"\n );\n }, getDisplayType: function (e) {\n var t = e && e.tagName.toString().toLowerCase();return (/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t) ? \"inline\" : /^(li)$/i.test(t) ? \"list-item\" : /^(tr)$/i.test(t) ? \"table-row\" : /^(table)$/i.test(t) ? \"table\" : /^(tbody)$/i.test(t) ? \"table-row-group\" : \"block\"\n );\n }, addClass: function (e, t) {\n e.classList ? e.classList.add(t) : e.className += (e.className.length ? \" \" : \"\") + t;\n }, removeClass: function (e, t) {\n e.classList ? e.classList.remove(t) : e.className = e.className.toString().replace(new RegExp(\"(^|\\\\s)\" + t.split(\" \").join(\"|\") + \"(\\\\s|$)\", \"gi\"), \" \");\n } }, getPropertyValue: function (e, r, n, o) {\n function s(e, r) {\n function n() {\n u && S.setPropertyValue(e, \"display\", \"none\");\n }var l = 0;if (8 >= d) l = f.css(e, r);else {\n var u = !1;if (/^(width|height)$/.test(r) && 0 === S.getPropertyValue(e, \"display\") && (u = !0, S.setPropertyValue(e, \"display\", S.Values.getDisplayType(e))), !o) {\n if (\"height\" === r && \"border-box\" !== S.getPropertyValue(e, \"boxSizing\").toString().toLowerCase()) {\n var c = e.offsetHeight - (parseFloat(S.getPropertyValue(e, \"borderTopWidth\")) || 0) - (parseFloat(S.getPropertyValue(e, \"borderBottomWidth\")) || 0) - (parseFloat(S.getPropertyValue(e, \"paddingTop\")) || 0) - (parseFloat(S.getPropertyValue(e, \"paddingBottom\")) || 0);return n(), c;\n }if (\"width\" === r && \"border-box\" !== S.getPropertyValue(e, \"boxSizing\").toString().toLowerCase()) {\n var p = e.offsetWidth - (parseFloat(S.getPropertyValue(e, \"borderLeftWidth\")) || 0) - (parseFloat(S.getPropertyValue(e, \"borderRightWidth\")) || 0) - (parseFloat(S.getPropertyValue(e, \"paddingLeft\")) || 0) - (parseFloat(S.getPropertyValue(e, \"paddingRight\")) || 0);return n(), p;\n }\n }var g;g = i(e) === a ? t.getComputedStyle(e, null) : i(e).computedStyle ? i(e).computedStyle : i(e).computedStyle = t.getComputedStyle(e, null), \"borderColor\" === r && (r = \"borderTopColor\"), l = 9 === d && \"filter\" === r ? g.getPropertyValue(r) : g[r], (\"\" === l || null === l) && (l = e.style[r]), n();\n }if (\"auto\" === l && /^(top|right|bottom|left)$/i.test(r)) {\n var m = s(e, \"position\");(\"fixed\" === m || \"absolute\" === m && /top|left/i.test(r)) && (l = f(e).position()[r] + \"px\");\n }return l;\n }var l;if (S.Hooks.registered[r]) {\n var u = r,\n c = S.Hooks.getRoot(u);n === a && (n = S.getPropertyValue(e, S.Names.prefixCheck(c)[0])), S.Normalizations.registered[c] && (n = S.Normalizations.registered[c](\"extract\", e, n)), l = S.Hooks.extractValue(u, n);\n } else if (S.Normalizations.registered[r]) {\n var p, g;p = S.Normalizations.registered[r](\"name\", e), \"transform\" !== p && (g = s(e, S.Names.prefixCheck(p)[0]), S.Values.isCSSNullValue(g) && S.Hooks.templates[r] && (g = S.Hooks.templates[r][1])), l = S.Normalizations.registered[r](\"extract\", e, g);\n }if (!/^[\\d-]/.test(l)) if (i(e) && i(e).isSVG && S.Names.SVGAttribute(r)) {\n if (/^(height|width)$/i.test(r)) try {\n l = e.getBBox()[r];\n } catch (m) {\n l = 0;\n } else l = e.getAttribute(r);\n } else l = s(e, S.Names.prefixCheck(r)[0]);return S.Values.isCSSNullValue(l) && (l = 0), b.debug >= 2 && console.log(\"Get \" + r + \": \" + l), l;\n }, setPropertyValue: function (e, r, a, n, o) {\n var s = r;if (\"scroll\" === r) o.container ? o.container[\"scroll\" + o.direction] = a : \"Left\" === o.direction ? t.scrollTo(a, o.alternateValue) : t.scrollTo(o.alternateValue, a);else if (S.Normalizations.registered[r] && \"transform\" === S.Normalizations.registered[r](\"name\", e)) S.Normalizations.registered[r](\"inject\", e, a), s = \"transform\", a = i(e).transformCache[r];else {\n if (S.Hooks.registered[r]) {\n var l = r,\n u = S.Hooks.getRoot(r);n = n || S.getPropertyValue(e, u), a = S.Hooks.injectValue(l, a, n), r = u;\n }if (S.Normalizations.registered[r] && (a = S.Normalizations.registered[r](\"inject\", e, a), r = S.Normalizations.registered[r](\"name\", e)), s = S.Names.prefixCheck(r)[0], 8 >= d) try {\n e.style[s] = a;\n } catch (c) {\n b.debug && console.log(\"Browser does not support [\" + a + \"] for [\" + s + \"]\");\n } else i(e) && i(e).isSVG && S.Names.SVGAttribute(r) ? e.setAttribute(r, a) : e.style[s] = a;b.debug >= 2 && console.log(\"Set \" + r + \" (\" + s + \"): \" + a);\n }return [s, a];\n }, flushTransformCache: function (e) {\n function t(t) {\n return parseFloat(S.getPropertyValue(e, t));\n }var r = \"\";if ((d || b.State.isAndroid && !b.State.isChrome) && i(e).isSVG) {\n var a = { translate: [t(\"translateX\"), t(\"translateY\")], skewX: [t(\"skewX\")], skewY: [t(\"skewY\")], scale: 1 !== t(\"scale\") ? [t(\"scale\"), t(\"scale\")] : [t(\"scaleX\"), t(\"scaleY\")], rotate: [t(\"rotateZ\"), 0, 0] };f.each(i(e).transformCache, function (e) {\n /^translate/i.test(e) ? e = \"translate\" : /^scale/i.test(e) ? e = \"scale\" : /^rotate/i.test(e) && (e = \"rotate\"), a[e] && (r += e + \"(\" + a[e].join(\" \") + \") \", delete a[e]);\n });\n } else {\n var n, o;f.each(i(e).transformCache, function (t) {\n return n = i(e).transformCache[t], \"transformPerspective\" === t ? (o = n, !0) : (9 === d && \"rotateZ\" === t && (t = \"rotate\"), void (r += t + n + \" \"));\n }), o && (r = \"perspective\" + o + \" \" + r);\n }S.setPropertyValue(e, \"transform\", r);\n } };S.Hooks.register(), S.Normalizations.register(), b.hook = function (e, t, r) {\n var n = a;return e = o(e), f.each(e, function (e, o) {\n if (i(o) === a && b.init(o), r === a) n === a && (n = b.CSS.getPropertyValue(o, t));else {\n var s = b.CSS.setPropertyValue(o, t, r);\"transform\" === s[0] && b.CSS.flushTransformCache(o), n = s;\n }\n }), n;\n };var P = function () {\n function e() {\n return s ? k.promise || null : l;\n }function n() {\n function e(e) {\n function p(e, t) {\n var r = a,\n n = a,\n i = a;return m.isArray(e) ? (r = e[0], !m.isArray(e[1]) && /^[\\d-]/.test(e[1]) || m.isFunction(e[1]) || S.RegEx.isHex.test(e[1]) ? i = e[1] : (m.isString(e[1]) && !S.RegEx.isHex.test(e[1]) || m.isArray(e[1])) && (n = t ? e[1] : u(e[1], s.duration), e[2] !== a && (i = e[2]))) : r = e, t || (n = n || s.easing), m.isFunction(r) && (r = r.call(o, V, w)), m.isFunction(i) && (i = i.call(o, V, w)), [r || 0, n, i];\n }function d(e, t) {\n var r, a;return a = (t || \"0\").toString().toLowerCase().replace(/[%A-z]+$/, function (e) {\n return r = e, \"\";\n }), r || (r = S.Values.getUnitType(e)), [a, r];\n }function h() {\n var e = { myParent: o.parentNode || r.body, position: S.getPropertyValue(o, \"position\"), fontSize: S.getPropertyValue(o, \"fontSize\") },\n a = e.position === L.lastPosition && e.myParent === L.lastParent,\n n = e.fontSize === L.lastFontSize;L.lastParent = e.myParent, L.lastPosition = e.position, L.lastFontSize = e.fontSize;var s = 100,\n l = {};if (n && a) l.emToPx = L.lastEmToPx, l.percentToPxWidth = L.lastPercentToPxWidth, l.percentToPxHeight = L.lastPercentToPxHeight;else {\n var u = i(o).isSVG ? r.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\") : r.createElement(\"div\");b.init(u), e.myParent.appendChild(u), f.each([\"overflow\", \"overflowX\", \"overflowY\"], function (e, t) {\n b.CSS.setPropertyValue(u, t, \"hidden\");\n }), b.CSS.setPropertyValue(u, \"position\", e.position), b.CSS.setPropertyValue(u, \"fontSize\", e.fontSize), b.CSS.setPropertyValue(u, \"boxSizing\", \"content-box\"), f.each([\"minWidth\", \"maxWidth\", \"width\", \"minHeight\", \"maxHeight\", \"height\"], function (e, t) {\n b.CSS.setPropertyValue(u, t, s + \"%\");\n }), b.CSS.setPropertyValue(u, \"paddingLeft\", s + \"em\"), l.percentToPxWidth = L.lastPercentToPxWidth = (parseFloat(S.getPropertyValue(u, \"width\", null, !0)) || 1) / s, l.percentToPxHeight = L.lastPercentToPxHeight = (parseFloat(S.getPropertyValue(u, \"height\", null, !0)) || 1) / s, l.emToPx = L.lastEmToPx = (parseFloat(S.getPropertyValue(u, \"paddingLeft\")) || 1) / s, e.myParent.removeChild(u);\n }return null === L.remToPx && (L.remToPx = parseFloat(S.getPropertyValue(r.body, \"fontSize\")) || 16), null === L.vwToPx && (L.vwToPx = parseFloat(t.innerWidth) / 100, L.vhToPx = parseFloat(t.innerHeight) / 100), l.remToPx = L.remToPx, l.vwToPx = L.vwToPx, l.vhToPx = L.vhToPx, b.debug >= 1 && console.log(\"Unit ratios: \" + JSON.stringify(l), o), l;\n }if (s.begin && 0 === V) try {\n s.begin.call(g, g);\n } catch (x) {\n setTimeout(function () {\n throw x;\n }, 1);\n }if (\"scroll\" === A) {\n var P,\n C,\n T,\n F = /^x$/i.test(s.axis) ? \"Left\" : \"Top\",\n j = parseFloat(s.offset) || 0;s.container ? m.isWrapped(s.container) || m.isNode(s.container) ? (s.container = s.container[0] || s.container, P = s.container[\"scroll\" + F], T = P + f(o).position()[F.toLowerCase()] + j) : s.container = null : (P = b.State.scrollAnchor[b.State[\"scrollProperty\" + F]], C = b.State.scrollAnchor[b.State[\"scrollProperty\" + (\"Left\" === F ? \"Top\" : \"Left\")]], T = f(o).offset()[F.toLowerCase()] + j), l = { scroll: { rootPropertyValue: !1, startValue: P, currentValue: P, endValue: T, unitType: \"\", easing: s.easing, scrollData: { container: s.container, direction: F, alternateValue: C } }, element: o }, b.debug && console.log(\"tweensContainer (scroll): \", l.scroll, o);\n } else if (\"reverse\" === A) {\n if (!i(o).tweensContainer) return void f.dequeue(o, s.queue);\"none\" === i(o).opts.display && (i(o).opts.display = \"auto\"), \"hidden\" === i(o).opts.visibility && (i(o).opts.visibility = \"visible\"), i(o).opts.loop = !1, i(o).opts.begin = null, i(o).opts.complete = null, v.easing || delete s.easing, v.duration || delete s.duration, s = f.extend({}, i(o).opts, s);var E = f.extend(!0, {}, i(o).tweensContainer);for (var H in E) {\n if (\"element\" !== H) {\n var N = E[H].startValue;E[H].startValue = E[H].currentValue = E[H].endValue, E[H].endValue = N, m.isEmptyObject(v) || (E[H].easing = s.easing), b.debug && console.log(\"reverse tweensContainer (\" + H + \"): \" + JSON.stringify(E[H]), o);\n }\n }l = E;\n } else if (\"start\" === A) {\n var E;i(o).tweensContainer && i(o).isAnimating === !0 && (E = i(o).tweensContainer), f.each(y, function (e, t) {\n if (RegExp(\"^\" + S.Lists.colors.join(\"$|^\") + \"$\").test(e)) {\n var r = p(t, !0),\n n = r[0],\n o = r[1],\n i = r[2];if (S.RegEx.isHex.test(n)) {\n for (var s = [\"Red\", \"Green\", \"Blue\"], l = S.Values.hexToRgb(n), u = i ? S.Values.hexToRgb(i) : a, c = 0; c < s.length; c++) {\n var f = [l[c]];o && f.push(o), u !== a && f.push(u[c]), y[e + s[c]] = f;\n }delete y[e];\n }\n }\n });for (var z in y) {\n var O = p(y[z]),\n q = O[0],\n $ = O[1],\n M = O[2];z = S.Names.camelCase(z);var I = S.Hooks.getRoot(z),\n B = !1;if (i(o).isSVG || \"tween\" === I || S.Names.prefixCheck(I)[1] !== !1 || S.Normalizations.registered[I] !== a) {\n (s.display !== a && null !== s.display && \"none\" !== s.display || s.visibility !== a && \"hidden\" !== s.visibility) && /opacity|filter/.test(z) && !M && 0 !== q && (M = 0), s._cacheValues && E && E[z] ? (M === a && (M = E[z].endValue + E[z].unitType), B = i(o).rootPropertyValueCache[I]) : S.Hooks.registered[z] ? M === a ? (B = S.getPropertyValue(o, I), M = S.getPropertyValue(o, z, B)) : B = S.Hooks.templates[I][1] : M === a && (M = S.getPropertyValue(o, z));var W,\n G,\n Y,\n D = !1;if (W = d(z, M), M = W[0], Y = W[1], W = d(z, q), q = W[0].replace(/^([+-\\/*])=/, function (e, t) {\n return D = t, \"\";\n }), G = W[1], M = parseFloat(M) || 0, q = parseFloat(q) || 0, \"%\" === G && (/^(fontSize|lineHeight)$/.test(z) ? (q /= 100, G = \"em\") : /^scale/.test(z) ? (q /= 100, G = \"\") : /(Red|Green|Blue)$/i.test(z) && (q = q / 100 * 255, G = \"\")), /[\\/*]/.test(D)) G = Y;else if (Y !== G && 0 !== M) if (0 === q) G = Y;else {\n n = n || h();var Q = /margin|padding|left|right|width|text|word|letter/i.test(z) || /X$/.test(z) || \"x\" === z ? \"x\" : \"y\";switch (Y) {case \"%\":\n M *= \"x\" === Q ? n.percentToPxWidth : n.percentToPxHeight;break;case \"px\":\n break;default:\n M *= n[Y + \"ToPx\"];}switch (G) {case \"%\":\n M *= 1 / (\"x\" === Q ? n.percentToPxWidth : n.percentToPxHeight);break;case \"px\":\n break;default:\n M *= 1 / n[G + \"ToPx\"];}\n }switch (D) {case \"+\":\n q = M + q;break;case \"-\":\n q = M - q;break;case \"*\":\n q = M * q;break;case \"/\":\n q = M / q;}l[z] = { rootPropertyValue: B, startValue: M, currentValue: M, endValue: q, unitType: G, easing: $ }, b.debug && console.log(\"tweensContainer (\" + z + \"): \" + JSON.stringify(l[z]), o);\n } else b.debug && console.log(\"Skipping [\" + I + \"] due to a lack of browser support.\");\n }l.element = o;\n }l.element && (S.Values.addClass(o, \"velocity-animating\"), R.push(l), \"\" === s.queue && (i(o).tweensContainer = l, i(o).opts = s), i(o).isAnimating = !0, V === w - 1 ? (b.State.calls.push([R, g, s, null, k.resolver]), b.State.isTicking === !1 && (b.State.isTicking = !0, c())) : V++);\n }var n,\n o = this,\n s = f.extend({}, b.defaults, v),\n l = {};switch (i(o) === a && b.init(o), parseFloat(s.delay) && s.queue !== !1 && f.queue(o, s.queue, function (e) {\n b.velocityQueueEntryFlag = !0, i(o).delayTimer = { setTimeout: setTimeout(e, parseFloat(s.delay)), next: e };\n }), s.duration.toString().toLowerCase()) {case \"fast\":\n s.duration = 200;break;case \"normal\":\n s.duration = h;break;case \"slow\":\n s.duration = 600;break;default:\n s.duration = parseFloat(s.duration) || 1;}b.mock !== !1 && (b.mock === !0 ? s.duration = s.delay = 1 : (s.duration *= parseFloat(b.mock) || 1, s.delay *= parseFloat(b.mock) || 1)), s.easing = u(s.easing, s.duration), s.begin && !m.isFunction(s.begin) && (s.begin = null), s.progress && !m.isFunction(s.progress) && (s.progress = null), s.complete && !m.isFunction(s.complete) && (s.complete = null), s.display !== a && null !== s.display && (s.display = s.display.toString().toLowerCase(), \"auto\" === s.display && (s.display = b.CSS.Values.getDisplayType(o))), s.visibility !== a && null !== s.visibility && (s.visibility = s.visibility.toString().toLowerCase()), s.mobileHA = s.mobileHA && b.State.isMobile && !b.State.isGingerbread, s.queue === !1 ? s.delay ? setTimeout(e, s.delay) : e() : f.queue(o, s.queue, function (t, r) {\n return r === !0 ? (k.promise && k.resolver(g), !0) : (b.velocityQueueEntryFlag = !0, void e(t));\n }), \"\" !== s.queue && \"fx\" !== s.queue || \"inprogress\" === f.queue(o)[0] || f.dequeue(o);\n }var s,\n l,\n d,\n g,\n y,\n v,\n x = arguments[0] && (arguments[0].p || f.isPlainObject(arguments[0].properties) && !arguments[0].properties.names || m.isString(arguments[0].properties));if (m.isWrapped(this) ? (s = !1, d = 0, g = this, l = this) : (s = !0, d = 1, g = x ? arguments[0].elements || arguments[0].e : arguments[0]), g = o(g)) {\n x ? (y = arguments[0].properties || arguments[0].p, v = arguments[0].options || arguments[0].o) : (y = arguments[d], v = arguments[d + 1]);var w = g.length,\n V = 0;if (!/^(stop|finish)$/i.test(y) && !f.isPlainObject(v)) {\n var C = d + 1;v = {};for (var T = C; T < arguments.length; T++) {\n m.isArray(arguments[T]) || !/^(fast|normal|slow)$/i.test(arguments[T]) && !/^\\d/.test(arguments[T]) ? m.isString(arguments[T]) || m.isArray(arguments[T]) ? v.easing = arguments[T] : m.isFunction(arguments[T]) && (v.complete = arguments[T]) : v.duration = arguments[T];\n }\n }var k = { promise: null, resolver: null, rejecter: null };s && b.Promise && (k.promise = new b.Promise(function (e, t) {\n k.resolver = e, k.rejecter = t;\n }));var A;switch (y) {case \"scroll\":\n A = \"scroll\";break;case \"reverse\":\n A = \"reverse\";break;case \"finish\":case \"stop\":\n f.each(g, function (e, t) {\n i(t) && i(t).delayTimer && (clearTimeout(i(t).delayTimer.setTimeout), i(t).delayTimer.next && i(t).delayTimer.next(), delete i(t).delayTimer);\n });var F = [];return f.each(b.State.calls, function (e, t) {\n t && f.each(t[1], function (r, n) {\n var o = v === a ? \"\" : v;return o === !0 || t[2].queue === o || v === a && t[2].queue === !1 ? void f.each(g, function (r, a) {\n a === n && ((v === !0 || m.isString(v)) && (f.each(f.queue(a, m.isString(v) ? v : \"\"), function (e, t) {\n m.isFunction(t) && t(null, !0);\n }), f.queue(a, m.isString(v) ? v : \"\", [])), \"stop\" === y ? (i(a) && i(a).tweensContainer && o !== !1 && f.each(i(a).tweensContainer, function (e, t) {\n t.endValue = t.currentValue;\n }), F.push(e)) : \"finish\" === y && (t[2].duration = 1));\n }) : !0;\n });\n }), \"stop\" === y && (f.each(F, function (e, t) {\n p(t, !0);\n }), k.promise && k.resolver(g)), e();default:\n if (!f.isPlainObject(y) || m.isEmptyObject(y)) {\n if (m.isString(y) && b.Redirects[y]) {\n var j = f.extend({}, v),\n E = j.duration,\n H = j.delay || 0;return j.backwards === !0 && (g = f.extend(!0, [], g).reverse()), f.each(g, function (e, t) {\n parseFloat(j.stagger) ? j.delay = H + parseFloat(j.stagger) * e : m.isFunction(j.stagger) && (j.delay = H + j.stagger.call(t, e, w)), j.drag && (j.duration = parseFloat(E) || (/^(callout|transition)/.test(y) ? 1e3 : h), j.duration = Math.max(j.duration * (j.backwards ? 1 - e / w : (e + 1) / w), .75 * j.duration, 200)), b.Redirects[y].call(t, t, j || {}, e, w, g, k.promise ? k : a);\n }), e();\n }var N = \"Velocity: First argument (\" + y + \") was not a property map, a known action, or a registered redirect. Aborting.\";return k.promise ? k.rejecter(new Error(N)) : console.log(N), e();\n }A = \"start\";}var L = { lastParent: null, lastPosition: null, lastFontSize: null, lastPercentToPxWidth: null, lastPercentToPxHeight: null, lastEmToPx: null, remToPx: null, vwToPx: null, vhToPx: null },\n R = [];f.each(g, function (e, t) {\n m.isNode(t) && n.call(t);\n });var z,\n j = f.extend({}, b.defaults, v);if (j.loop = parseInt(j.loop), z = 2 * j.loop - 1, j.loop) for (var O = 0; z > O; O++) {\n var q = { delay: j.delay, progress: j.progress };O === z - 1 && (q.display = j.display, q.visibility = j.visibility, q.complete = j.complete), P(g, \"reverse\", q);\n }return e();\n }\n };b = f.extend(P, b), b.animate = P;var w = t.requestAnimationFrame || g;return b.State.isMobile || r.hidden === a || r.addEventListener(\"visibilitychange\", function () {\n r.hidden ? (w = function (e) {\n return setTimeout(function () {\n e(!0);\n }, 16);\n }, c()) : w = t.requestAnimationFrame || g;\n }), e.Velocity = b, e !== t && (e.fn.velocity = P, e.fn.velocity.defaults = b.defaults), f.each([\"Down\", \"Up\"], function (e, t) {\n b.Redirects[\"slide\" + t] = function (e, r, n, o, i, s) {\n var l = f.extend({}, r),\n u = l.begin,\n c = l.complete,\n p = { height: \"\", marginTop: \"\", marginBottom: \"\", paddingTop: \"\", paddingBottom: \"\" },\n d = {};l.display === a && (l.display = \"Down\" === t ? \"inline\" === b.CSS.Values.getDisplayType(e) ? \"inline-block\" : \"block\" : \"none\"), l.begin = function () {\n u && u.call(i, i);for (var r in p) {\n d[r] = e.style[r];var a = b.CSS.getPropertyValue(e, r);p[r] = \"Down\" === t ? [a, 0] : [0, a];\n }d.overflow = e.style.overflow, e.style.overflow = \"hidden\";\n }, l.complete = function () {\n for (var t in d) {\n e.style[t] = d[t];\n }c && c.call(i, i), s && s.resolver(i);\n }, b(e, p, l);\n };\n }), f.each([\"In\", \"Out\"], function (e, t) {\n b.Redirects[\"fade\" + t] = function (e, r, n, o, i, s) {\n var l = f.extend({}, r),\n u = { opacity: \"In\" === t ? 1 : 0 },\n c = l.complete;l.complete = n !== o - 1 ? l.begin = null : function () {\n c && c.call(i, i), s && s.resolver(i);\n }, l.display === a && (l.display = \"In\" === t ? \"auto\" : \"none\"), b(this, u, l);\n };\n }), b;\n }(window.jQuery || window.Zepto || window, window, document);\n}));\n;!function (a, b, c, d) {\n \"use strict\";\n function k(a, b, c) {\n return setTimeout(q(a, c), b);\n }function l(a, b, c) {\n return Array.isArray(a) ? (m(a, c[b], c), !0) : !1;\n }function m(a, b, c) {\n var e;if (a) if (a.forEach) a.forEach(b, c);else if (a.length !== d) for (e = 0; e < a.length;) {\n b.call(c, a[e], e, a), e++;\n } else for (e in a) {\n a.hasOwnProperty(e) && b.call(c, a[e], e, a);\n }\n }function n(a, b, c) {\n for (var e = Object.keys(b), f = 0; f < e.length;) {\n (!c || c && a[e[f]] === d) && (a[e[f]] = b[e[f]]), f++;\n }return a;\n }function o(a, b) {\n return n(a, b, !0);\n }function p(a, b, c) {\n var e,\n d = b.prototype;e = a.prototype = Object.create(d), e.constructor = a, e._super = d, c && n(e, c);\n }function q(a, b) {\n return function () {\n return a.apply(b, arguments);\n };\n }function r(a, b) {\n return typeof a == g ? a.apply(b ? b[0] || d : d, b) : a;\n }function s(a, b) {\n return a === d ? b : a;\n }function t(a, b, c) {\n m(x(b), function (b) {\n a.addEventListener(b, c, !1);\n });\n }function u(a, b, c) {\n m(x(b), function (b) {\n a.removeEventListener(b, c, !1);\n });\n }function v(a, b) {\n for (; a;) {\n if (a == b) return !0;a = a.parentNode;\n }return !1;\n }function w(a, b) {\n return a.indexOf(b) > -1;\n }function x(a) {\n return a.trim().split(/\\s+/g);\n }function y(a, b, c) {\n if (a.indexOf && !c) return a.indexOf(b);for (var d = 0; d < a.length;) {\n if (c && a[d][c] == b || !c && a[d] === b) return d;d++;\n }return -1;\n }function z(a) {\n return Array.prototype.slice.call(a, 0);\n }function A(a, b, c) {\n for (var d = [], e = [], f = 0; f < a.length;) {\n var g = b ? a[f][b] : a[f];y(e, g) < 0 && d.push(a[f]), e[f] = g, f++;\n }return c && (d = b ? d.sort(function (a, c) {\n return a[b] > c[b];\n }) : d.sort()), d;\n }function B(a, b) {\n for (var c, f, g = b[0].toUpperCase() + b.slice(1), h = 0; h < e.length;) {\n if (c = e[h], f = c ? c + g : b, f in a) return f;h++;\n }return d;\n }function D() {\n return C++;\n }function E(a) {\n var b = a.ownerDocument;return b.defaultView || b.parentWindow;\n }function ab(a, b) {\n var c = this;this.manager = a, this.callback = b, this.element = a.element, this.target = a.options.inputTarget, this.domHandler = function (b) {\n r(a.options.enable, [a]) && c.handler(b);\n }, this.init();\n }function bb(a) {\n var b,\n c = a.options.inputClass;return b = c ? c : H ? wb : I ? Eb : G ? Gb : rb, new b(a, cb);\n }function cb(a, b, c) {\n var d = c.pointers.length,\n e = c.changedPointers.length,\n f = b & O && 0 === d - e,\n g = b & (Q | R) && 0 === d - e;c.isFirst = !!f, c.isFinal = !!g, f && (a.session = {}), c.eventType = b, db(a, c), a.emit(\"hammer.input\", c), a.recognize(c), a.session.prevInput = c;\n }function db(a, b) {\n var c = a.session,\n d = b.pointers,\n e = d.length;c.firstInput || (c.firstInput = gb(b)), e > 1 && !c.firstMultiple ? c.firstMultiple = gb(b) : 1 === e && (c.firstMultiple = !1);var f = c.firstInput,\n g = c.firstMultiple,\n h = g ? g.center : f.center,\n i = b.center = hb(d);b.timeStamp = j(), b.deltaTime = b.timeStamp - f.timeStamp, b.angle = lb(h, i), b.distance = kb(h, i), eb(c, b), b.offsetDirection = jb(b.deltaX, b.deltaY), b.scale = g ? nb(g.pointers, d) : 1, b.rotation = g ? mb(g.pointers, d) : 0, fb(c, b);var k = a.element;v(b.srcEvent.target, k) && (k = b.srcEvent.target), b.target = k;\n }function eb(a, b) {\n var c = b.center,\n d = a.offsetDelta || {},\n e = a.prevDelta || {},\n f = a.prevInput || {};(b.eventType === O || f.eventType === Q) && (e = a.prevDelta = { x: f.deltaX || 0, y: f.deltaY || 0 }, d = a.offsetDelta = { x: c.x, y: c.y }), b.deltaX = e.x + (c.x - d.x), b.deltaY = e.y + (c.y - d.y);\n }function fb(a, b) {\n var f,\n g,\n h,\n j,\n c = a.lastInterval || b,\n e = b.timeStamp - c.timeStamp;if (b.eventType != R && (e > N || c.velocity === d)) {\n var k = c.deltaX - b.deltaX,\n l = c.deltaY - b.deltaY,\n m = ib(e, k, l);g = m.x, h = m.y, f = i(m.x) > i(m.y) ? m.x : m.y, j = jb(k, l), a.lastInterval = b;\n } else f = c.velocity, g = c.velocityX, h = c.velocityY, j = c.direction;b.velocity = f, b.velocityX = g, b.velocityY = h, b.direction = j;\n }function gb(a) {\n for (var b = [], c = 0; c < a.pointers.length;) {\n b[c] = { clientX: h(a.pointers[c].clientX), clientY: h(a.pointers[c].clientY) }, c++;\n }return { timeStamp: j(), pointers: b, center: hb(b), deltaX: a.deltaX, deltaY: a.deltaY };\n }function hb(a) {\n var b = a.length;if (1 === b) return { x: h(a[0].clientX), y: h(a[0].clientY) };for (var c = 0, d = 0, e = 0; b > e;) {\n c += a[e].clientX, d += a[e].clientY, e++;\n }return { x: h(c / b), y: h(d / b) };\n }function ib(a, b, c) {\n return { x: b / a || 0, y: c / a || 0 };\n }function jb(a, b) {\n return a === b ? S : i(a) >= i(b) ? a > 0 ? T : U : b > 0 ? V : W;\n }function kb(a, b, c) {\n c || (c = $);var d = b[c[0]] - a[c[0]],\n e = b[c[1]] - a[c[1]];return Math.sqrt(d * d + e * e);\n }function lb(a, b, c) {\n c || (c = $);var d = b[c[0]] - a[c[0]],\n e = b[c[1]] - a[c[1]];return 180 * Math.atan2(e, d) / Math.PI;\n }function mb(a, b) {\n return lb(b[1], b[0], _) - lb(a[1], a[0], _);\n }function nb(a, b) {\n return kb(b[0], b[1], _) / kb(a[0], a[1], _);\n }function rb() {\n this.evEl = pb, this.evWin = qb, this.allow = !0, this.pressed = !1, ab.apply(this, arguments);\n }function wb() {\n this.evEl = ub, this.evWin = vb, ab.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];\n }function Ab() {\n this.evTarget = yb, this.evWin = zb, this.started = !1, ab.apply(this, arguments);\n }function Bb(a, b) {\n var c = z(a.touches),\n d = z(a.changedTouches);return b & (Q | R) && (c = A(c.concat(d), \"identifier\", !0)), [c, d];\n }function Eb() {\n this.evTarget = Db, this.targetIds = {}, ab.apply(this, arguments);\n }function Fb(a, b) {\n var c = z(a.touches),\n d = this.targetIds;if (b & (O | P) && 1 === c.length) return d[c[0].identifier] = !0, [c, c];var e,\n f,\n g = z(a.changedTouches),\n h = [],\n i = this.target;if (f = c.filter(function (a) {\n return v(a.target, i);\n }), b === O) for (e = 0; e < f.length;) {\n d[f[e].identifier] = !0, e++;\n }for (e = 0; e < g.length;) {\n d[g[e].identifier] && h.push(g[e]), b & (Q | R) && delete d[g[e].identifier], e++;\n }return h.length ? [A(f.concat(h), \"identifier\", !0), h] : void 0;\n }function Gb() {\n ab.apply(this, arguments);var a = q(this.handler, this);this.touch = new Eb(this.manager, a), this.mouse = new rb(this.manager, a);\n }function Pb(a, b) {\n this.manager = a, this.set(b);\n }function Qb(a) {\n if (w(a, Mb)) return Mb;var b = w(a, Nb),\n c = w(a, Ob);return b && c ? Nb + \" \" + Ob : b || c ? b ? Nb : Ob : w(a, Lb) ? Lb : Kb;\n }function Yb(a) {\n this.id = D(), this.manager = null, this.options = o(a || {}, this.defaults), this.options.enable = s(this.options.enable, !0), this.state = Rb, this.simultaneous = {}, this.requireFail = [];\n }function Zb(a) {\n return a & Wb ? \"cancel\" : a & Ub ? \"end\" : a & Tb ? \"move\" : a & Sb ? \"start\" : \"\";\n }function $b(a) {\n return a == W ? \"down\" : a == V ? \"up\" : a == T ? \"left\" : a == U ? \"right\" : \"\";\n }function _b(a, b) {\n var c = b.manager;return c ? c.get(a) : a;\n }function ac() {\n Yb.apply(this, arguments);\n }function bc() {\n ac.apply(this, arguments), this.pX = null, this.pY = null;\n }function cc() {\n ac.apply(this, arguments);\n }function dc() {\n Yb.apply(this, arguments), this._timer = null, this._input = null;\n }function ec() {\n ac.apply(this, arguments);\n }function fc() {\n ac.apply(this, arguments);\n }function gc() {\n Yb.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;\n }function hc(a, b) {\n return b = b || {}, b.recognizers = s(b.recognizers, hc.defaults.preset), new kc(a, b);\n }function kc(a, b) {\n b = b || {}, this.options = o(b, hc.defaults), this.options.inputTarget = this.options.inputTarget || a, this.handlers = {}, this.session = {}, this.recognizers = [], this.element = a, this.input = bb(this), this.touchAction = new Pb(this, this.options.touchAction), lc(this, !0), m(b.recognizers, function (a) {\n var b = this.add(new a[0](a[1]));a[2] && b.recognizeWith(a[2]), a[3] && b.requireFailure(a[3]);\n }, this);\n }function lc(a, b) {\n var c = a.element;m(a.options.cssProps, function (a, d) {\n c.style[B(c.style, d)] = b ? a : \"\";\n });\n }function mc(a, c) {\n var d = b.createEvent(\"Event\");d.initEvent(a, !0, !0), d.gesture = c, c.target.dispatchEvent(d);\n }var e = [\"\", \"webkit\", \"moz\", \"MS\", \"ms\", \"o\"],\n f = b.createElement(\"div\"),\n g = \"function\",\n h = Math.round,\n i = Math.abs,\n j = Date.now,\n C = 1,\n F = /mobile|tablet|ip(ad|hone|od)|android/i,\n G = \"ontouchstart\" in a,\n H = B(a, \"PointerEvent\") !== d,\n I = G && F.test(navigator.userAgent),\n J = \"touch\",\n K = \"pen\",\n L = \"mouse\",\n M = \"kinect\",\n N = 25,\n O = 1,\n P = 2,\n Q = 4,\n R = 8,\n S = 1,\n T = 2,\n U = 4,\n V = 8,\n W = 16,\n X = T | U,\n Y = V | W,\n Z = X | Y,\n $ = [\"x\", \"y\"],\n _ = [\"clientX\", \"clientY\"];ab.prototype = { handler: function () {}, init: function () {\n this.evEl && t(this.element, this.evEl, this.domHandler), this.evTarget && t(this.target, this.evTarget, this.domHandler), this.evWin && t(E(this.element), this.evWin, this.domHandler);\n }, destroy: function () {\n this.evEl && u(this.element, this.evEl, this.domHandler), this.evTarget && u(this.target, this.evTarget, this.domHandler), this.evWin && u(E(this.element), this.evWin, this.domHandler);\n } };var ob = { mousedown: O, mousemove: P, mouseup: Q },\n pb = \"mousedown\",\n qb = \"mousemove mouseup\";p(rb, ab, { handler: function (a) {\n var b = ob[a.type];b & O && 0 === a.button && (this.pressed = !0), b & P && 1 !== a.which && (b = Q), this.pressed && this.allow && (b & Q && (this.pressed = !1), this.callback(this.manager, b, { pointers: [a], changedPointers: [a], pointerType: L, srcEvent: a }));\n } });var sb = { pointerdown: O, pointermove: P, pointerup: Q, pointercancel: R, pointerout: R },\n tb = { 2: J, 3: K, 4: L, 5: M },\n ub = \"pointerdown\",\n vb = \"pointermove pointerup pointercancel\";a.MSPointerEvent && (ub = \"MSPointerDown\", vb = \"MSPointerMove MSPointerUp MSPointerCancel\"), p(wb, ab, { handler: function (a) {\n var b = this.store,\n c = !1,\n d = a.type.toLowerCase().replace(\"ms\", \"\"),\n e = sb[d],\n f = tb[a.pointerType] || a.pointerType,\n g = f == J,\n h = y(b, a.pointerId, \"pointerId\");e & O && (0 === a.button || g) ? 0 > h && (b.push(a), h = b.length - 1) : e & (Q | R) && (c = !0), 0 > h || (b[h] = a, this.callback(this.manager, e, { pointers: b, changedPointers: [a], pointerType: f, srcEvent: a }), c && b.splice(h, 1));\n } });var xb = { touchstart: O, touchmove: P, touchend: Q, touchcancel: R },\n yb = \"touchstart\",\n zb = \"touchstart touchmove touchend touchcancel\";p(Ab, ab, { handler: function (a) {\n var b = xb[a.type];if (b === O && (this.started = !0), this.started) {\n var c = Bb.call(this, a, b);b & (Q | R) && 0 === c[0].length - c[1].length && (this.started = !1), this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: J, srcEvent: a });\n }\n } });var Cb = { touchstart: O, touchmove: P, touchend: Q, touchcancel: R },\n Db = \"touchstart touchmove touchend touchcancel\";p(Eb, ab, { handler: function (a) {\n var b = Cb[a.type],\n c = Fb.call(this, a, b);c && this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: J, srcEvent: a });\n } }), p(Gb, ab, { handler: function (a, b, c) {\n var d = c.pointerType == J,\n e = c.pointerType == L;if (d) this.mouse.allow = !1;else if (e && !this.mouse.allow) return;b & (Q | R) && (this.mouse.allow = !0), this.callback(a, b, c);\n }, destroy: function () {\n this.touch.destroy(), this.mouse.destroy();\n } });var Hb = B(f.style, \"touchAction\"),\n Ib = Hb !== d,\n Jb = \"compute\",\n Kb = \"auto\",\n Lb = \"manipulation\",\n Mb = \"none\",\n Nb = \"pan-x\",\n Ob = \"pan-y\";Pb.prototype = { set: function (a) {\n a == Jb && (a = this.compute()), Ib && (this.manager.element.style[Hb] = a), this.actions = a.toLowerCase().trim();\n }, update: function () {\n this.set(this.manager.options.touchAction);\n }, compute: function () {\n var a = [];return m(this.manager.recognizers, function (b) {\n r(b.options.enable, [b]) && (a = a.concat(b.getTouchAction()));\n }), Qb(a.join(\" \"));\n }, preventDefaults: function (a) {\n if (!Ib) {\n var b = a.srcEvent,\n c = a.offsetDirection;if (this.manager.session.prevented) return b.preventDefault(), void 0;var d = this.actions,\n e = w(d, Mb),\n f = w(d, Ob),\n g = w(d, Nb);return e || f && c & X || g && c & Y ? this.preventSrc(b) : void 0;\n }\n }, preventSrc: function (a) {\n this.manager.session.prevented = !0, a.preventDefault();\n } };var Rb = 1,\n Sb = 2,\n Tb = 4,\n Ub = 8,\n Vb = Ub,\n Wb = 16,\n Xb = 32;Yb.prototype = { defaults: {}, set: function (a) {\n return n(this.options, a), this.manager && this.manager.touchAction.update(), this;\n }, recognizeWith: function (a) {\n if (l(a, \"recognizeWith\", this)) return this;var b = this.simultaneous;return a = _b(a, this), b[a.id] || (b[a.id] = a, a.recognizeWith(this)), this;\n }, dropRecognizeWith: function (a) {\n return l(a, \"dropRecognizeWith\", this) ? this : (a = _b(a, this), delete this.simultaneous[a.id], this);\n }, requireFailure: function (a) {\n if (l(a, \"requireFailure\", this)) return this;var b = this.requireFail;return a = _b(a, this), -1 === y(b, a) && (b.push(a), a.requireFailure(this)), this;\n }, dropRequireFailure: function (a) {\n if (l(a, \"dropRequireFailure\", this)) return this;a = _b(a, this);var b = y(this.requireFail, a);return b > -1 && this.requireFail.splice(b, 1), this;\n }, hasRequireFailures: function () {\n return this.requireFail.length > 0;\n }, canRecognizeWith: function (a) {\n return !!this.simultaneous[a.id];\n }, emit: function (a) {\n function d(d) {\n b.manager.emit(b.options.event + (d ? Zb(c) : \"\"), a);\n }var b = this,\n c = this.state;Ub > c && d(!0), d(), c >= Ub && d(!0);\n }, tryEmit: function (a) {\n return this.canEmit() ? this.emit(a) : (this.state = Xb, void 0);\n }, canEmit: function () {\n for (var a = 0; a < this.requireFail.length;) {\n if (!(this.requireFail[a].state & (Xb | Rb))) return !1;a++;\n }return !0;\n }, recognize: function (a) {\n var b = n({}, a);return r(this.options.enable, [this, b]) ? (this.state & (Vb | Wb | Xb) && (this.state = Rb), this.state = this.process(b), this.state & (Sb | Tb | Ub | Wb) && this.tryEmit(b), void 0) : (this.reset(), this.state = Xb, void 0);\n }, process: function () {}, getTouchAction: function () {}, reset: function () {} }, p(ac, Yb, { defaults: { pointers: 1 }, attrTest: function (a) {\n var b = this.options.pointers;return 0 === b || a.pointers.length === b;\n }, process: function (a) {\n var b = this.state,\n c = a.eventType,\n d = b & (Sb | Tb),\n e = this.attrTest(a);return d && (c & R || !e) ? b | Wb : d || e ? c & Q ? b | Ub : b & Sb ? b | Tb : Sb : Xb;\n } }), p(bc, ac, { defaults: { event: \"pan\", threshold: 10, pointers: 1, direction: Z }, getTouchAction: function () {\n var a = this.options.direction,\n b = [];return a & X && b.push(Ob), a & Y && b.push(Nb), b;\n }, directionTest: function (a) {\n var b = this.options,\n c = !0,\n d = a.distance,\n e = a.direction,\n f = a.deltaX,\n g = a.deltaY;return e & b.direction || (b.direction & X ? (e = 0 === f ? S : 0 > f ? T : U, c = f != this.pX, d = Math.abs(a.deltaX)) : (e = 0 === g ? S : 0 > g ? V : W, c = g != this.pY, d = Math.abs(a.deltaY))), a.direction = e, c && d > b.threshold && e & b.direction;\n }, attrTest: function (a) {\n return ac.prototype.attrTest.call(this, a) && (this.state & Sb || !(this.state & Sb) && this.directionTest(a));\n }, emit: function (a) {\n this.pX = a.deltaX, this.pY = a.deltaY;var b = $b(a.direction);b && this.manager.emit(this.options.event + b, a), this._super.emit.call(this, a);\n } }), p(cc, ac, { defaults: { event: \"pinch\", threshold: 0, pointers: 2 }, getTouchAction: function () {\n return [Mb];\n }, attrTest: function (a) {\n return this._super.attrTest.call(this, a) && (Math.abs(a.scale - 1) > this.options.threshold || this.state & Sb);\n }, emit: function (a) {\n if (this._super.emit.call(this, a), 1 !== a.scale) {\n var b = a.scale < 1 ? \"in\" : \"out\";this.manager.emit(this.options.event + b, a);\n }\n } }), p(dc, Yb, { defaults: { event: \"press\", pointers: 1, time: 500, threshold: 5 }, getTouchAction: function () {\n return [Kb];\n }, process: function (a) {\n var b = this.options,\n c = a.pointers.length === b.pointers,\n d = a.distance < b.threshold,\n e = a.deltaTime > b.time;if (this._input = a, !d || !c || a.eventType & (Q | R) && !e) this.reset();else if (a.eventType & O) this.reset(), this._timer = k(function () {\n this.state = Vb, this.tryEmit();\n }, b.time, this);else if (a.eventType & Q) return Vb;return Xb;\n }, reset: function () {\n clearTimeout(this._timer);\n }, emit: function (a) {\n this.state === Vb && (a && a.eventType & Q ? this.manager.emit(this.options.event + \"up\", a) : (this._input.timeStamp = j(), this.manager.emit(this.options.event, this._input)));\n } }), p(ec, ac, { defaults: { event: \"rotate\", threshold: 0, pointers: 2 }, getTouchAction: function () {\n return [Mb];\n }, attrTest: function (a) {\n return this._super.attrTest.call(this, a) && (Math.abs(a.rotation) > this.options.threshold || this.state & Sb);\n } }), p(fc, ac, { defaults: { event: \"swipe\", threshold: 10, velocity: .65, direction: X | Y, pointers: 1 }, getTouchAction: function () {\n return bc.prototype.getTouchAction.call(this);\n }, attrTest: function (a) {\n var c,\n b = this.options.direction;return b & (X | Y) ? c = a.velocity : b & X ? c = a.velocityX : b & Y && (c = a.velocityY), this._super.attrTest.call(this, a) && b & a.direction && a.distance > this.options.threshold && i(c) > this.options.velocity && a.eventType & Q;\n }, emit: function (a) {\n var b = $b(a.direction);b && this.manager.emit(this.options.event + b, a), this.manager.emit(this.options.event, a);\n } }), p(gc, Yb, { defaults: { event: \"tap\", pointers: 1, taps: 1, interval: 300, time: 250, threshold: 2, posThreshold: 10 }, getTouchAction: function () {\n return [Lb];\n }, process: function (a) {\n var b = this.options,\n c = a.pointers.length === b.pointers,\n d = a.distance < b.threshold,\n e = a.deltaTime < b.time;if (this.reset(), a.eventType & O && 0 === this.count) return this.failTimeout();if (d && e && c) {\n if (a.eventType != Q) return this.failTimeout();var f = this.pTime ? a.timeStamp - this.pTime < b.interval : !0,\n g = !this.pCenter || kb(this.pCenter, a.center) < b.posThreshold;this.pTime = a.timeStamp, this.pCenter = a.center, g && f ? this.count += 1 : this.count = 1, this._input = a;var h = this.count % b.taps;if (0 === h) return this.hasRequireFailures() ? (this._timer = k(function () {\n this.state = Vb, this.tryEmit();\n }, b.interval, this), Sb) : Vb;\n }return Xb;\n }, failTimeout: function () {\n return this._timer = k(function () {\n this.state = Xb;\n }, this.options.interval, this), Xb;\n }, reset: function () {\n clearTimeout(this._timer);\n }, emit: function () {\n this.state == Vb && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));\n } }), hc.VERSION = \"2.0.4\", hc.defaults = { domEvents: !1, touchAction: Jb, enable: !0, inputTarget: null, inputClass: null, preset: [[ec, { enable: !1 }], [cc, { enable: !1 }, [\"rotate\"]], [fc, { direction: X }], [bc, { direction: X }, [\"swipe\"]], [gc], [gc, { event: \"doubletap\", taps: 2 }, [\"tap\"]], [dc]], cssProps: { userSelect: \"default\", touchSelect: \"none\", touchCallout: \"none\", contentZooming: \"none\", userDrag: \"none\", tapHighlightColor: \"rgba(0,0,0,0)\" } };var ic = 1,\n jc = 2;kc.prototype = { set: function (a) {\n return n(this.options, a), a.touchAction && this.touchAction.update(), a.inputTarget && (this.input.destroy(), this.input.target = a.inputTarget, this.input.init()), this;\n }, stop: function (a) {\n this.session.stopped = a ? jc : ic;\n }, recognize: function (a) {\n var b = this.session;if (!b.stopped) {\n this.touchAction.preventDefaults(a);var c,\n d = this.recognizers,\n e = b.curRecognizer;(!e || e && e.state & Vb) && (e = b.curRecognizer = null);for (var f = 0; f < d.length;) {\n c = d[f], b.stopped === jc || e && c != e && !c.canRecognizeWith(e) ? c.reset() : c.recognize(a), !e && c.state & (Sb | Tb | Ub) && (e = b.curRecognizer = c), f++;\n }\n }\n }, get: function (a) {\n if (a instanceof Yb) return a;for (var b = this.recognizers, c = 0; c < b.length; c++) {\n if (b[c].options.event == a) return b[c];\n }return null;\n }, add: function (a) {\n if (l(a, \"add\", this)) return this;var b = this.get(a.options.event);return b && this.remove(b), this.recognizers.push(a), a.manager = this, this.touchAction.update(), a;\n }, remove: function (a) {\n if (l(a, \"remove\", this)) return this;var b = this.recognizers;return a = this.get(a), b.splice(y(b, a), 1), this.touchAction.update(), this;\n }, on: function (a, b) {\n var c = this.handlers;return m(x(a), function (a) {\n c[a] = c[a] || [], c[a].push(b);\n }), this;\n }, off: function (a, b) {\n var c = this.handlers;return m(x(a), function (a) {\n b ? c[a].splice(y(c[a], b), 1) : delete c[a];\n }), this;\n }, emit: function (a, b) {\n this.options.domEvents && mc(a, b);var c = this.handlers[a] && this.handlers[a].slice();if (c && c.length) {\n b.type = a, b.preventDefault = function () {\n b.srcEvent.preventDefault();\n };for (var d = 0; d < c.length;) {\n c[d](b), d++;\n }\n }\n }, destroy: function () {\n this.element && lc(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;\n } }, n(hc, { INPUT_START: O, INPUT_MOVE: P, INPUT_END: Q, INPUT_CANCEL: R, STATE_POSSIBLE: Rb, STATE_BEGAN: Sb, STATE_CHANGED: Tb, STATE_ENDED: Ub, STATE_RECOGNIZED: Vb, STATE_CANCELLED: Wb, STATE_FAILED: Xb, DIRECTION_NONE: S, DIRECTION_LEFT: T, DIRECTION_RIGHT: U, DIRECTION_UP: V, DIRECTION_DOWN: W, DIRECTION_HORIZONTAL: X, DIRECTION_VERTICAL: Y, DIRECTION_ALL: Z, Manager: kc, Input: ab, TouchAction: Pb, TouchInput: Eb, MouseInput: rb, PointerEventInput: wb, TouchMouseInput: Gb, SingleTouchInput: Ab, Recognizer: Yb, AttrRecognizer: ac, Tap: gc, Pan: bc, Swipe: fc, Pinch: cc, Rotate: ec, Press: dc, on: t, off: u, each: m, merge: o, extend: n, inherit: p, bindFn: q, prefixed: B }), typeof define == g && define.amd ? define(function () {\n return hc;\n }) : \"undefined\" != typeof module && module.exports ? module.exports = hc : a[c] = hc;\n}(window, document, \"Hammer\");;(function (factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery', 'hammerjs'], factory);\n } else if (typeof exports === 'object') {\n factory(require('jquery'), require('hammerjs'));\n } else {\n factory(jQuery, Hammer);\n }\n})(function ($, Hammer) {\n function hammerify(el, options) {\n var $el = $(el);\n if (!$el.data(\"hammer\")) {\n $el.data(\"hammer\", new Hammer($el[0], options));\n }\n }\n\n $.fn.hammer = function (options) {\n return this.each(function () {\n hammerify(this, options);\n });\n };\n\n // extend the emit method to also trigger jQuery events\n Hammer.Manager.prototype.emit = function (originalEmit) {\n return function (type, data) {\n originalEmit.call(this, type, data);\n $(this.element).trigger({\n type: type,\n gesture: data\n });\n };\n }(Hammer.Manager.prototype.emit);\n});\n; // Required for Meteor package, the use of window prevents export by Meteor\n(function (window) {\n if (window.Package) {\n Materialize = {};\n } else {\n window.Materialize = {};\n }\n})(window);\n\n/*\n * raf.js\n * https://github.com/ngryman/raf.js\n *\n * original requestAnimationFrame polyfill by Erik Möller\n * inspired from paul_irish gist and post\n *\n * Copyright (c) 2013 ngryman\n * Licensed under the MIT license.\n */\n(function (window) {\n var lastTime = 0,\n vendors = ['webkit', 'moz'],\n requestAnimationFrame = window.requestAnimationFrame,\n cancelAnimationFrame = window.cancelAnimationFrame,\n i = vendors.length;\n\n // try to un-prefix existing raf\n while (--i >= 0 && !requestAnimationFrame) {\n requestAnimationFrame = window[vendors[i] + 'RequestAnimationFrame'];\n cancelAnimationFrame = window[vendors[i] + 'CancelRequestAnimationFrame'];\n }\n\n // polyfill with setTimeout fallback\n // heavily inspired from @darius gist mod: https://gist.github.com/paulirish/1579671#comment-837945\n if (!requestAnimationFrame || !cancelAnimationFrame) {\n requestAnimationFrame = function (callback) {\n var now = +Date.now(),\n nextTime = Math.max(lastTime + 16, now);\n return setTimeout(function () {\n callback(lastTime = nextTime);\n }, nextTime - now);\n };\n\n cancelAnimationFrame = clearTimeout;\n }\n\n // export to window\n window.requestAnimationFrame = requestAnimationFrame;\n window.cancelAnimationFrame = cancelAnimationFrame;\n})(window);\n\n/**\n * Generate approximated selector string for a jQuery object\n * @param {jQuery} obj jQuery object to be parsed\n * @returns {string}\n */\nMaterialize.objectSelectorString = function (obj) {\n var tagStr = obj.prop('tagName') || '';\n var idStr = obj.attr('id') || '';\n var classStr = obj.attr('class') || '';\n return (tagStr + idStr + classStr).replace(/\\s/g, '');\n};\n\n// Unique Random ID\nMaterialize.guid = function () {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n return function () {\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n };\n}();\n\n/**\n * Escapes hash from special characters\n * @param {string} hash String returned from this.hash\n * @returns {string}\n */\nMaterialize.escapeHash = function (hash) {\n return hash.replace(/(:|\\.|\\[|\\]|,|=)/g, \"\\\\$1\");\n};\n\nMaterialize.elementOrParentIsFixed = function (element) {\n var $element = $(element);\n var $checkElements = $element.add($element.parents());\n var isFixed = false;\n $checkElements.each(function () {\n if ($(this).css(\"position\") === \"fixed\") {\n isFixed = true;\n return false;\n }\n });\n return isFixed;\n};\n\n/**\n * Get time in ms\n * @license https://raw.github.com/jashkenas/underscore/master/LICENSE\n * @type {function}\n * @return {number}\n */\nvar getTime = Date.now || function () {\n return new Date().getTime();\n};\n\n/**\n * Returns a function, that, when invoked, will only be triggered at most once\n * during a given window of time. Normally, the throttled function will run\n * as much as it can, without ever going more than once per `wait` duration;\n * but if you'd like to disable the execution on the leading edge, pass\n * `{leading: false}`. To disable execution on the trailing edge, ditto.\n * @license https://raw.github.com/jashkenas/underscore/master/LICENSE\n * @param {function} func\n * @param {number} wait\n * @param {Object=} options\n * @returns {Function}\n */\nMaterialize.throttle = function (func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n options || (options = {});\n var later = function () {\n previous = options.leading === false ? 0 : getTime();\n timeout = null;\n result = func.apply(context, args);\n context = args = null;\n };\n return function () {\n var now = getTime();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n};\n\n// Velocity has conflicts when loaded with jQuery, this will check for it\n// First, check if in noConflict mode\nvar Vel;\nif (jQuery) {\n Vel = jQuery.Velocity;\n} else if ($) {\n Vel = $.Velocity;\n} else {\n Vel = Velocity;\n}\n;(function ($) {\n $.fn.collapsible = function (options, methodParam) {\n var defaults = {\n accordion: undefined,\n onOpen: undefined,\n onClose: undefined\n };\n\n var methodName = options;\n options = $.extend(defaults, options);\n\n return this.each(function () {\n\n var $this = $(this);\n\n var $panel_headers = $(this).find('> li > .collapsible-header');\n\n var collapsible_type = $this.data(\"collapsible\");\n\n /****************\n Helper Functions\n ****************/\n\n // Accordion Open\n function accordionOpen(object) {\n $panel_headers = $this.find('> li > .collapsible-header');\n if (object.hasClass('active')) {\n object.parent().addClass('active');\n } else {\n object.parent().removeClass('active');\n }\n if (object.parent().hasClass('active')) {\n object.siblings('.collapsible-body').stop(true, false).slideDown({ duration: 350, easing: \"easeOutQuart\", queue: false, complete: function () {\n $(this).css('height', '');\n } });\n } else {\n object.siblings('.collapsible-body').stop(true, false).slideUp({ duration: 350, easing: \"easeOutQuart\", queue: false, complete: function () {\n $(this).css('height', '');\n } });\n }\n\n $panel_headers.not(object).removeClass('active').parent().removeClass('active');\n\n // Close previously open accordion elements.\n $panel_headers.not(object).parent().children('.collapsible-body').stop(true, false).each(function () {\n if ($(this).is(':visible')) {\n $(this).slideUp({\n duration: 350,\n easing: \"easeOutQuart\",\n queue: false,\n complete: function () {\n $(this).css('height', '');\n execCallbacks($(this).siblings('.collapsible-header'));\n }\n });\n }\n });\n }\n\n // Expandable Open\n function expandableOpen(object) {\n if (object.hasClass('active')) {\n object.parent().addClass('active');\n } else {\n object.parent().removeClass('active');\n }\n if (object.parent().hasClass('active')) {\n object.siblings('.collapsible-body').stop(true, false).slideDown({ duration: 350, easing: \"easeOutQuart\", queue: false, complete: function () {\n $(this).css('height', '');\n } });\n } else {\n object.siblings('.collapsible-body').stop(true, false).slideUp({ duration: 350, easing: \"easeOutQuart\", queue: false, complete: function () {\n $(this).css('height', '');\n } });\n }\n }\n\n // Open collapsible. object: .collapsible-header\n function collapsibleOpen(object, noToggle) {\n if (!noToggle) {\n object.toggleClass('active');\n }\n\n if (options.accordion || collapsible_type === \"accordion\" || collapsible_type === undefined) {\n // Handle Accordion\n accordionOpen(object);\n } else {\n // Handle Expandables\n expandableOpen(object);\n }\n\n execCallbacks(object);\n }\n\n // Handle callbacks\n function execCallbacks(object) {\n if (object.hasClass('active')) {\n if (typeof options.onOpen === \"function\") {\n options.onOpen.call(this, object.parent());\n }\n } else {\n if (typeof options.onClose === \"function\") {\n options.onClose.call(this, object.parent());\n }\n }\n }\n\n /**\n * Check if object is children of panel header\n * @param {Object} object Jquery object\n * @return {Boolean} true if it is children\n */\n function isChildrenOfPanelHeader(object) {\n\n var panelHeader = getPanelHeader(object);\n\n return panelHeader.length > 0;\n }\n\n /**\n * Get panel header from a children element\n * @param {Object} object Jquery object\n * @return {Object} panel header object\n */\n function getPanelHeader(object) {\n\n return object.closest('li > .collapsible-header');\n }\n\n // Turn off any existing event handlers\n function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }\n\n /***** End Helper Functions *****/\n\n // Methods\n if (methodName === 'destroy') {\n removeEventHandlers();\n return;\n } else if (methodParam >= 0 && methodParam < $panel_headers.length) {\n var $curr_header = $panel_headers.eq(methodParam);\n if ($curr_header.length && (methodName === 'open' || methodName === 'close' && $curr_header.hasClass('active'))) {\n collapsibleOpen($curr_header);\n }\n return;\n }\n\n removeEventHandlers();\n\n // Add click handler to only direct collapsible header children\n $this.on('click.collapse', '> li > .collapsible-header', function (e) {\n var element = $(e.target);\n\n if (isChildrenOfPanelHeader(element)) {\n element = getPanelHeader(element);\n }\n\n collapsibleOpen(element);\n });\n\n // Open first active\n if (options.accordion || collapsible_type === \"accordion\" || collapsible_type === undefined) {\n // Handle Accordion\n collapsibleOpen($panel_headers.filter('.active').first(), true);\n } else {\n // Handle Expandables\n $panel_headers.filter('.active').each(function () {\n collapsibleOpen($(this), true);\n });\n }\n });\n };\n\n $(document).ready(function () {\n $('.collapsible').collapsible();\n });\n})(jQuery);;(function ($) {\n\n // Add posibility to scroll to selected option\n // usefull for select for example\n $.fn.scrollTo = function (elem) {\n $(this).scrollTop($(this).scrollTop() - $(this).offset().top + $(elem).offset().top);\n return this;\n };\n\n $.fn.dropdown = function (options) {\n var defaults = {\n inDuration: 300,\n outDuration: 225,\n constrainWidth: true, // Constrains width of dropdown to the activator\n hover: false,\n gutter: 0, // Spacing from edge\n belowOrigin: false,\n alignment: 'left',\n stopPropagation: false\n };\n\n // Open dropdown.\n if (options === \"open\") {\n this.each(function () {\n $(this).trigger('open');\n });\n return false;\n }\n\n // Close dropdown.\n if (options === \"close\") {\n this.each(function () {\n $(this).trigger('close');\n });\n return false;\n }\n\n this.each(function () {\n var origin = $(this);\n var curr_options = $.extend({}, defaults, options);\n var isFocused = false;\n\n // Dropdown menu\n var activates = $(\"#\" + origin.attr('data-activates'));\n\n function updateOptions() {\n if (origin.data('induration') !== undefined) curr_options.inDuration = origin.data('induration');\n if (origin.data('outduration') !== undefined) curr_options.outDuration = origin.data('outduration');\n if (origin.data('constrainwidth') !== undefined) curr_options.constrainWidth = origin.data('constrainwidth');\n if (origin.data('hover') !== undefined) curr_options.hover = origin.data('hover');\n if (origin.data('gutter') !== undefined) curr_options.gutter = origin.data('gutter');\n if (origin.data('beloworigin') !== undefined) curr_options.belowOrigin = origin.data('beloworigin');\n if (origin.data('alignment') !== undefined) curr_options.alignment = origin.data('alignment');\n if (origin.data('stoppropagation') !== undefined) curr_options.stopPropagation = origin.data('stoppropagation');\n }\n\n updateOptions();\n\n // Attach dropdown to its activator\n origin.after(activates);\n\n /*\n Helper function to position and resize dropdown.\n Used in hover and click handler.\n */\n function placeDropdown(eventType) {\n // Check for simultaneous focus and click events.\n if (eventType === 'focus') {\n isFocused = true;\n }\n\n // Check html data attributes\n updateOptions();\n\n // Set Dropdown state\n activates.addClass('active');\n origin.addClass('active');\n\n var originWidth = origin[0].getBoundingClientRect().width;\n\n // Constrain width\n if (curr_options.constrainWidth === true) {\n activates.css('width', originWidth);\n } else {\n activates.css('white-space', 'nowrap');\n }\n\n // Offscreen detection\n var windowHeight = window.innerHeight;\n var originHeight = origin.innerHeight();\n var offsetLeft = origin.offset().left;\n var offsetTop = origin.offset().top - $(window).scrollTop();\n var currAlignment = curr_options.alignment;\n var gutterSpacing = 0;\n var leftPosition = 0;\n\n // Below Origin\n var verticalOffset = 0;\n if (curr_options.belowOrigin === true) {\n verticalOffset = originHeight;\n }\n\n // Check for scrolling positioned container.\n var scrollYOffset = 0;\n var scrollXOffset = 0;\n var wrapper = origin.parent();\n if (!wrapper.is('body')) {\n if (wrapper[0].scrollHeight > wrapper[0].clientHeight) {\n scrollYOffset = wrapper[0].scrollTop;\n }\n if (wrapper[0].scrollWidth > wrapper[0].clientWidth) {\n scrollXOffset = wrapper[0].scrollLeft;\n }\n }\n\n if (offsetLeft + activates.innerWidth() > $(window).width()) {\n // Dropdown goes past screen on right, force right alignment\n currAlignment = 'right';\n } else if (offsetLeft - activates.innerWidth() + origin.innerWidth() < 0) {\n // Dropdown goes past screen on left, force left alignment\n currAlignment = 'left';\n }\n // Vertical bottom offscreen detection\n if (offsetTop + activates.innerHeight() > windowHeight) {\n // If going upwards still goes offscreen, just crop height of dropdown.\n if (offsetTop + originHeight - activates.innerHeight() < 0) {\n var adjustedHeight = windowHeight - offsetTop - verticalOffset;\n activates.css('max-height', adjustedHeight);\n } else {\n // Flow upwards.\n if (!verticalOffset) {\n verticalOffset += originHeight;\n }\n verticalOffset -= activates.innerHeight();\n }\n }\n\n // Handle edge alignment\n if (currAlignment === 'left') {\n gutterSpacing = curr_options.gutter;\n leftPosition = origin.position().left + gutterSpacing;\n } else if (currAlignment === 'right') {\n // Material icons fix\n activates.stop(true, true).css({\n opacity: 0,\n left: 0\n });\n\n var offsetRight = origin.position().left + originWidth - activates.width();\n gutterSpacing = -curr_options.gutter;\n leftPosition = offsetRight + gutterSpacing;\n }\n\n // Position dropdown\n activates.css({\n position: 'absolute',\n top: origin.position().top + verticalOffset + scrollYOffset,\n left: leftPosition + scrollXOffset\n });\n\n // Show dropdown\n activates.slideDown({\n queue: false,\n duration: curr_options.inDuration,\n easing: 'easeOutCubic',\n complete: function () {\n $(this).css('height', '');\n }\n }).animate({ opacity: 1 }, { queue: false, duration: curr_options.inDuration, easing: 'easeOutSine' });\n\n // Add click close handler to document\n setTimeout(function () {\n $(document).on('click.' + activates.attr('id'), function (e) {\n hideDropdown();\n $(document).off('click.' + activates.attr('id'));\n });\n }, 0);\n }\n\n function hideDropdown() {\n // Check for simultaneous focus and click events.\n isFocused = false;\n activates.fadeOut(curr_options.outDuration);\n activates.removeClass('active');\n origin.removeClass('active');\n $(document).off('click.' + activates.attr('id'));\n setTimeout(function () {\n activates.css('max-height', '');\n }, curr_options.outDuration);\n }\n\n // Hover\n if (curr_options.hover) {\n var open = false;\n origin.off('click.' + origin.attr('id'));\n // Hover handler to show dropdown\n origin.on('mouseenter', function (e) {\n // Mouse over\n if (open === false) {\n placeDropdown();\n open = true;\n }\n });\n origin.on('mouseleave', function (e) {\n // If hover on origin then to something other than dropdown content, then close\n var toEl = e.toElement || e.relatedTarget; // added browser compatibility for target element\n if (!$(toEl).closest('.dropdown-content').is(activates)) {\n activates.stop(true, true);\n hideDropdown();\n open = false;\n }\n });\n\n activates.on('mouseleave', function (e) {\n // Mouse out\n var toEl = e.toElement || e.relatedTarget;\n if (!$(toEl).closest('.dropdown-button').is(origin)) {\n activates.stop(true, true);\n hideDropdown();\n open = false;\n }\n });\n\n // Click\n } else {\n // Click handler to show dropdown\n origin.off('click.' + origin.attr('id'));\n origin.on('click.' + origin.attr('id'), function (e) {\n if (!isFocused) {\n if (origin[0] == e.currentTarget && !origin.hasClass('active') && $(e.target).closest('.dropdown-content').length === 0) {\n e.preventDefault(); // Prevents button click from moving window\n if (curr_options.stopPropagation) {\n e.stopPropagation();\n }\n placeDropdown('click');\n }\n // If origin is clicked and menu is open, close menu\n else if (origin.hasClass('active')) {\n hideDropdown();\n $(document).off('click.' + activates.attr('id'));\n }\n }\n });\n } // End else\n\n // Listen to open and close event - useful for select component\n origin.on('open', function (e, eventType) {\n placeDropdown(eventType);\n });\n origin.on('close', hideDropdown);\n });\n }; // End dropdown plugin\n\n $(document).ready(function () {\n $('.dropdown-button').dropdown();\n });\n})(jQuery);\n;(function ($) {\n 'use strict';\n\n var _defaults = {\n opacity: 0.5,\n inDuration: 250,\n outDuration: 250,\n ready: undefined,\n complete: undefined,\n dismissible: true,\n startingTop: '4%',\n endingTop: '10%'\n };\n\n /**\n * @class\n *\n */\n\n var Modal = function () {\n /**\n * Construct Modal instance and set up overlay\n * @constructor\n * @param {jQuery} $el\n * @param {Object} options\n */\n function Modal($el, options) {\n _classCallCheck(this, Modal);\n\n // If exists, destroy and reinitialize\n if (!!$el[0].M_Modal) {\n $el[0].M_Modal.destroy();\n }\n\n /**\n * The jQuery element\n * @type {jQuery}\n */\n this.$el = $el;\n\n /**\n * Options for the modal\n * @member Modal#options\n * @prop {Number} [opacity=0.5] - Opacity of the modal overlay\n * @prop {Number} [inDuration=250] - Length in ms of enter transition\n * @prop {Number} [outDuration=250] - Length in ms of exit transition\n * @prop {Function} ready - Callback function called when modal is finished entering\n * @prop {Function} complete - Callback function called when modal is finished exiting\n * @prop {Boolean} [dismissible=true] - Allow modal to be dismissed by keyboard or overlay click\n * @prop {String} [startingTop='4%'] - startingTop\n * @prop {String} [endingTop='10%'] - endingTop\n */\n this.options = $.extend({}, Modal.defaults, options);\n\n /**\n * Describes open/close state of modal\n * @type {Boolean}\n */\n this.isOpen = false;\n\n this.$el[0].M_Modal = this;\n this.id = $el.attr('id');\n this.openingTrigger = undefined;\n this.$overlay = $('<div class=\"modal-overlay\"></div>');\n\n Modal._increment++;\n Modal._count++;\n this.$overlay[0].style.zIndex = 1000 + Modal._increment * 2;\n this.$el[0].style.zIndex = 1000 + Modal._increment * 2 + 1;\n this.setupEventHandlers();\n }\n\n _createClass(Modal, [{\n key: 'getInstance',\n\n\n /**\n * Get Instance\n */\n value: function getInstance() {\n return this;\n }\n\n /**\n * Teardown component\n */\n\n }, {\n key: 'destroy',\n value: function destroy() {\n this.removeEventHandlers();\n this.$el[0].removeAttribute('style');\n if (!!this.$overlay[0].parentNode) {\n this.$overlay[0].parentNode.removeChild(this.$overlay[0]);\n }\n this.$el[0].M_Modal = undefined;\n Modal._count--;\n }\n\n /**\n * Setup Event Handlers\n */\n\n }, {\n key: 'setupEventHandlers',\n value: function setupEventHandlers() {\n this.handleOverlayClickBound = this.handleOverlayClick.bind(this);\n this.handleModalCloseClickBound = this.handleModalCloseClick.bind(this);\n\n if (Modal._count === 1) {\n document.addEventListener('click', this.handleTriggerClick);\n }\n this.$overlay[0].addEventListener('click', this.handleOverlayClickBound);\n this.$el[0].addEventListener('click', this.handleModalCloseClickBound);\n }\n\n /**\n * Remove Event Handlers\n */\n\n }, {\n key: 'removeEventHandlers',\n value: function removeEventHandlers() {\n if (Modal._count === 0) {\n document.removeEventListener('click', this.handleTriggerClick);\n }\n this.$overlay[0].removeEventListener('click', this.handleOverlayClickBound);\n this.$el[0].removeEventListener('click', this.handleModalCloseClickBound);\n }\n\n /**\n * Handle Trigger Click\n * @param {Event} e\n */\n\n }, {\n key: 'handleTriggerClick',\n value: function handleTriggerClick(e) {\n var $trigger = $(e.target).closest('.modal-trigger');\n if (e.target && $trigger.length) {\n var modalId = $trigger[0].getAttribute('href');\n if (modalId) {\n modalId = modalId.slice(1);\n } else {\n modalId = $trigger[0].getAttribute('data-target');\n }\n var modalInstance = document.getElementById(modalId).M_Modal;\n if (modalInstance) {\n modalInstance.open($trigger);\n }\n e.preventDefault();\n }\n }\n\n /**\n * Handle Overlay Click\n */\n\n }, {\n key: 'handleOverlayClick',\n value: function handleOverlayClick() {\n if (this.options.dismissible) {\n this.close();\n }\n }\n\n /**\n * Handle Modal Close Click\n * @param {Event} e\n */\n\n }, {\n key: 'handleModalCloseClick',\n value: function handleModalCloseClick(e) {\n var $closeTrigger = $(e.target).closest('.modal-close');\n if (e.target && $closeTrigger.length) {\n this.close();\n }\n }\n\n /**\n * Handle Keydown\n * @param {Event} e\n */\n\n }, {\n key: 'handleKeydown',\n value: function handleKeydown(e) {\n // ESC key\n if (e.keyCode === 27 && this.options.dismissible) {\n this.close();\n }\n }\n\n /**\n * Animate in modal\n */\n\n }, {\n key: 'animateIn',\n value: function animateIn() {\n var _this = this;\n\n // Set initial styles\n $.extend(this.$el[0].style, {\n display: 'block',\n opacity: 0\n });\n $.extend(this.$overlay[0].style, {\n display: 'block',\n opacity: 0\n });\n\n // Animate overlay\n Vel(this.$overlay[0], { opacity: this.options.opacity }, { duration: this.options.inDuration, queue: false, ease: 'easeOutCubic' });\n\n // Define modal animation options\n var enterVelocityOptions = {\n duration: this.options.inDuration,\n queue: false,\n ease: 'easeOutCubic',\n // Handle modal ready callback\n complete: function () {\n if (typeof _this.options.ready === 'function') {\n _this.options.ready.call(_this, _this.$el, _this.openingTrigger);\n }\n }\n };\n\n // Bottom sheet animation\n if (this.$el[0].classList.contains('bottom-sheet')) {\n Vel(this.$el[0], { bottom: 0, opacity: 1 }, enterVelocityOptions);\n\n // Normal modal animation\n } else {\n Vel.hook(this.$el[0], 'scaleX', 0.7);\n this.$el[0].style.top = this.options.startingTop;\n Vel(this.$el[0], { top: this.options.endingTop, opacity: 1, scaleX: 1 }, enterVelocityOptions);\n }\n }\n\n /**\n * Animate out modal\n */\n\n }, {\n key: 'animateOut',\n value: function animateOut() {\n var _this2 = this;\n\n // Animate overlay\n Vel(this.$overlay[0], { opacity: 0 }, { duration: this.options.outDuration, queue: false, ease: 'easeOutQuart' });\n\n // Define modal animation options\n var exitVelocityOptions = {\n duration: this.options.outDuration,\n queue: false,\n ease: 'easeOutCubic',\n // Handle modal ready callback\n complete: function () {\n _this2.$el[0].style.display = 'none';\n // Call complete callback\n if (typeof _this2.options.complete === 'function') {\n _this2.options.complete.call(_this2, _this2.$el);\n }\n _this2.$overlay[0].remove();\n }\n };\n\n // Bottom sheet animation\n if (this.$el[0].classList.contains('bottom-sheet')) {\n Vel(this.$el[0], { bottom: '-100%', opacity: 0 }, exitVelocityOptions);\n\n // Normal modal animation\n } else {\n Vel(this.$el[0], { top: this.options.startingTop, opacity: 0, scaleX: 0.7 }, exitVelocityOptions);\n }\n }\n\n /**\n * Open Modal\n * @param {jQuery} [$trigger]\n */\n\n }, {\n key: 'open',\n value: function open($trigger) {\n if (this.isOpen) {\n return;\n }\n\n this.isOpen = true;\n var body = document.body;\n body.style.overflow = 'hidden';\n this.$el[0].classList.add('open');\n body.appendChild(this.$overlay[0]);\n\n // Set opening trigger, undefined indicates modal was opened by javascript\n this.openingTrigger = !!$trigger ? $trigger : undefined;\n\n if (this.options.dismissible) {\n this.handleKeydownBound = this.handleKeydown.bind(this);\n document.addEventListener('keydown', this.handleKeydownBound);\n }\n\n this.animateIn();\n\n return this;\n }\n\n /**\n * Close Modal\n */\n\n }, {\n key: 'close',\n value: function close() {\n if (!this.isOpen) {\n return;\n }\n\n this.isOpen = false;\n this.$el[0].classList.remove('open');\n document.body.style.overflow = null;\n\n if (this.options.dismissible) {\n document.removeEventListener('keydown', this.handleKeydownBound);\n }\n\n this.animateOut();\n\n return this;\n }\n }], [{\n key: 'init',\n value: function init($els, options) {\n var arr = [];\n $els.each(function () {\n arr.push(new Modal($(this), options));\n });\n return arr;\n }\n }, {\n key: 'defaults',\n get: function () {\n return _defaults;\n }\n }]);\n\n return Modal;\n }();\n\n /**\n * @static\n * @memberof Modal\n */\n\n\n Modal._increment = 0;\n\n /**\n * @static\n * @memberof Modal\n */\n Modal._count = 0;\n\n window.Materialize.Modal = Modal;\n\n $.fn.modal = function (methodOrOptions) {\n // Call plugin method if valid method name is passed in\n if (Modal.prototype[methodOrOptions]) {\n // Getter methods\n if (methodOrOptions.slice(0, 3) === 'get') {\n return this.first()[0].M_Modal[methodOrOptions]();\n\n // Void methods\n } else {\n return this.each(function () {\n this.M_Modal[methodOrOptions]();\n });\n }\n\n // Initialize plugin if options or no argument is passed in\n } else if (typeof methodOrOptions === 'object' || !methodOrOptions) {\n Modal.init(this, arguments[0]);\n return this;\n\n // Return error if an unrecognized method name is passed in\n } else {\n $.error('Method ' + methodOrOptions + ' does not exist on jQuery.modal');\n }\n };\n})(jQuery);\n;(function ($) {\n\n $.fn.materialbox = function () {\n\n return this.each(function () {\n\n if ($(this).hasClass('initialized')) {\n return;\n }\n\n $(this).addClass('initialized');\n\n var overlayActive = false;\n var doneAnimating = true;\n var inDuration = 275;\n var outDuration = 200;\n var origin = $(this);\n var placeholder = $('<div></div>').addClass('material-placeholder');\n var originalWidth = 0;\n var originalHeight = 0;\n var ancestorsChanged;\n var ancestor;\n var originInlineStyles = origin.attr('style');\n origin.wrap(placeholder);\n\n // Start click handler\n origin.on('click', function () {\n var placeholder = origin.parent('.material-placeholder');\n var windowWidth = window.innerWidth;\n var windowHeight = window.innerHeight;\n var originalWidth = origin.width();\n var originalHeight = origin.height();\n\n // If already modal, return to original\n if (doneAnimating === false) {\n returnToOriginal();\n return false;\n } else if (overlayActive && doneAnimating === true) {\n returnToOriginal();\n return false;\n }\n\n // Set states\n doneAnimating = false;\n origin.addClass('active');\n overlayActive = true;\n\n // Set positioning for placeholder\n placeholder.css({\n width: placeholder[0].getBoundingClientRect().width,\n height: placeholder[0].getBoundingClientRect().height,\n position: 'relative',\n top: 0,\n left: 0\n });\n\n // Find ancestor with overflow: hidden; and remove it\n ancestorsChanged = undefined;\n ancestor = placeholder[0].parentNode;\n var count = 0;\n while (ancestor !== null && !$(ancestor).is(document)) {\n var curr = $(ancestor);\n if (curr.css('overflow') !== 'visible') {\n curr.css('overflow', 'visible');\n if (ancestorsChanged === undefined) {\n ancestorsChanged = curr;\n } else {\n ancestorsChanged = ancestorsChanged.add(curr);\n }\n }\n ancestor = ancestor.parentNode;\n }\n\n // Set css on origin\n origin.css({\n position: 'absolute',\n 'z-index': 1000,\n 'will-change': 'left, top, width, height'\n }).data('width', originalWidth).data('height', originalHeight);\n\n // Add overlay\n var overlay = $('<div id=\"materialbox-overlay\"></div>').css({\n opacity: 0\n }).click(function () {\n if (doneAnimating === true) returnToOriginal();\n });\n\n // Put before in origin image to preserve z-index layering.\n origin.before(overlay);\n\n // Set dimensions if needed\n var overlayOffset = overlay[0].getBoundingClientRect();\n overlay.css({\n width: windowWidth,\n height: windowHeight,\n left: -1 * overlayOffset.left,\n top: -1 * overlayOffset.top\n });\n\n // Animate Overlay\n overlay.velocity({ opacity: 1 }, { duration: inDuration, queue: false, easing: 'easeOutQuad' });\n\n // Add and animate caption if it exists\n if (origin.data('caption') !== \"\") {\n var $photo_caption = $('<div class=\"materialbox-caption\"></div>');\n $photo_caption.text(origin.data('caption'));\n $('body').append($photo_caption);\n $photo_caption.css({ \"display\": \"inline\" });\n $photo_caption.velocity({ opacity: 1 }, { duration: inDuration, queue: false, easing: 'easeOutQuad' });\n }\n\n // Resize Image\n var ratio = 0;\n var widthPercent = originalWidth / windowWidth;\n var heightPercent = originalHeight / windowHeight;\n var newWidth = 0;\n var newHeight = 0;\n\n if (widthPercent > heightPercent) {\n ratio = originalHeight / originalWidth;\n newWidth = windowWidth * 0.9;\n newHeight = windowWidth * 0.9 * ratio;\n } else {\n ratio = originalWidth / originalHeight;\n newWidth = windowHeight * 0.9 * ratio;\n newHeight = windowHeight * 0.9;\n }\n\n // Animate image + set z-index\n if (origin.hasClass('responsive-img')) {\n origin.velocity({ 'max-width': newWidth, 'width': originalWidth }, { duration: 0, queue: false,\n complete: function () {\n origin.css({ left: 0, top: 0 }).velocity({\n height: newHeight,\n width: newWidth,\n left: $(document).scrollLeft() + windowWidth / 2 - origin.parent('.material-placeholder').offset().left - newWidth / 2,\n top: $(document).scrollTop() + windowHeight / 2 - origin.parent('.material-placeholder').offset().top - newHeight / 2\n }, {\n duration: inDuration,\n queue: false,\n easing: 'easeOutQuad',\n complete: function () {\n doneAnimating = true;\n }\n });\n } // End Complete\n }); // End Velocity\n } else {\n origin.css('left', 0).css('top', 0).velocity({\n height: newHeight,\n width: newWidth,\n left: $(document).scrollLeft() + windowWidth / 2 - origin.parent('.material-placeholder').offset().left - newWidth / 2,\n top: $(document).scrollTop() + windowHeight / 2 - origin.parent('.material-placeholder').offset().top - newHeight / 2\n }, {\n duration: inDuration,\n queue: false,\n easing: 'easeOutQuad',\n complete: function () {\n doneAnimating = true;\n }\n }); // End Velocity\n }\n\n // Handle Exit triggers\n $(window).on('scroll.materialbox', function () {\n if (overlayActive) {\n returnToOriginal();\n }\n });\n\n $(window).on('resize.materialbox', function () {\n if (overlayActive) {\n returnToOriginal();\n }\n });\n\n $(document).on('keyup.materialbox', function (e) {\n // ESC key\n if (e.keyCode === 27 && doneAnimating === true && overlayActive) {\n returnToOriginal();\n }\n });\n }); // End click handler\n\n\n // This function returns the modaled image to the original spot\n function returnToOriginal() {\n\n doneAnimating = false;\n\n var placeholder = origin.parent('.material-placeholder');\n var windowWidth = window.innerWidth;\n var windowHeight = window.innerHeight;\n var originalWidth = origin.data('width');\n var originalHeight = origin.data('height');\n\n origin.velocity(\"stop\", true);\n $('#materialbox-overlay').velocity(\"stop\", true);\n $('.materialbox-caption').velocity(\"stop\", true);\n\n // disable exit handlers\n $(window).off('scroll.materialbox');\n $(document).off('keyup.materialbox');\n $(window).off('resize.materialbox');\n\n $('#materialbox-overlay').velocity({ opacity: 0 }, {\n duration: outDuration, // Delay prevents animation overlapping\n queue: false, easing: 'easeOutQuad',\n complete: function () {\n // Remove Overlay\n overlayActive = false;\n $(this).remove();\n }\n });\n\n // Resize Image\n origin.velocity({\n width: originalWidth,\n height: originalHeight,\n left: 0,\n top: 0\n }, {\n duration: outDuration,\n queue: false, easing: 'easeOutQuad',\n complete: function () {\n placeholder.css({\n height: '',\n width: '',\n position: '',\n top: '',\n left: ''\n });\n\n origin.removeAttr('style');\n origin.attr('style', originInlineStyles);\n\n // Remove class\n origin.removeClass('active');\n doneAnimating = true;\n\n // Remove overflow overrides on ancestors\n if (ancestorsChanged) {\n ancestorsChanged.css('overflow', '');\n }\n }\n });\n\n // Remove Caption + reset css settings on image\n $('.materialbox-caption').velocity({ opacity: 0 }, {\n duration: outDuration, // Delay prevents animation overlapping\n queue: false, easing: 'easeOutQuad',\n complete: function () {\n $(this).remove();\n }\n });\n }\n });\n };\n\n $(document).ready(function () {\n $('.materialboxed').materialbox();\n });\n})(jQuery);\n;(function ($) {\n\n $.fn.parallax = function () {\n var window_width = $(window).width();\n // Parallax Scripts\n return this.each(function (i) {\n var $this = $(this);\n $this.addClass('parallax');\n\n function updateParallax(initial) {\n var container_height;\n if (window_width < 601) {\n container_height = $this.height() > 0 ? $this.height() : $this.children(\"img\").height();\n } else {\n container_height = $this.height() > 0 ? $this.height() : 500;\n }\n var $img = $this.children(\"img\").first();\n var img_height = $img.height();\n var parallax_dist = img_height - container_height;\n var bottom = $this.offset().top + container_height;\n var top = $this.offset().top;\n var scrollTop = $(window).scrollTop();\n var windowHeight = window.innerHeight;\n var windowBottom = scrollTop + windowHeight;\n var percentScrolled = (windowBottom - top) / (container_height + windowHeight);\n var parallax = Math.round(parallax_dist * percentScrolled);\n\n if (initial) {\n $img.css('display', 'block');\n }\n if (bottom > scrollTop && top < scrollTop + windowHeight) {\n $img.css('transform', \"translate3D(-50%,\" + parallax + \"px, 0)\");\n }\n }\n\n // Wait for image load\n $this.children(\"img\").one(\"load\", function () {\n updateParallax(true);\n }).each(function () {\n if (this.complete) $(this).trigger(\"load\");\n });\n\n $(window).scroll(function () {\n window_width = $(window).width();\n updateParallax(false);\n });\n\n $(window).resize(function () {\n window_width = $(window).width();\n updateParallax(false);\n });\n });\n };\n})(jQuery);\n;(function ($) {\n\n var methods = {\n init: function (options) {\n var defaults = {\n onShow: null,\n swipeable: false,\n responsiveThreshold: Infinity // breakpoint for swipeable\n };\n options = $.extend(defaults, options);\n var namespace = Materialize.objectSelectorString($(this));\n\n return this.each(function (i) {\n\n var uniqueNamespace = namespace + i;\n\n // For each set of tabs, we want to keep track of\n // which tab is active and its associated content\n var $this = $(this),\n window_width = $(window).width();\n\n var $active,\n $content,\n $links = $this.find('li.tab a'),\n $tabs_width = $this.width(),\n $tabs_content = $(),\n $tabs_wrapper,\n $tab_width = Math.max($tabs_width, $this[0].scrollWidth) / $links.length,\n $indicator,\n index = prev_index = 0,\n clicked = false,\n clickedTimeout,\n transition = 300;\n\n // Finds right attribute for indicator based on active tab.\n // el: jQuery Object\n var calcRightPos = function (el) {\n return Math.ceil($tabs_width - el.position().left - el[0].getBoundingClientRect().width - $this.scrollLeft());\n };\n\n // Finds left attribute for indicator based on active tab.\n // el: jQuery Object\n var calcLeftPos = function (el) {\n return Math.floor(el.position().left + $this.scrollLeft());\n };\n\n // Animates Indicator to active tab.\n // prev_index: Number\n var animateIndicator = function (prev_index) {\n if (index - prev_index >= 0) {\n $indicator.velocity({ \"right\": calcRightPos($active) }, { duration: transition, queue: false, easing: 'easeOutQuad' });\n $indicator.velocity({ \"left\": calcLeftPos($active) }, { duration: transition, queue: false, easing: 'easeOutQuad', delay: 90 });\n } else {\n $indicator.velocity({ \"left\": calcLeftPos($active) }, { duration: transition, queue: false, easing: 'easeOutQuad' });\n $indicator.velocity({ \"right\": calcRightPos($active) }, { duration: transition, queue: false, easing: 'easeOutQuad', delay: 90 });\n }\n };\n\n // Change swipeable according to responsive threshold\n if (options.swipeable) {\n if (window_width > options.responsiveThreshold) {\n options.swipeable = false;\n }\n }\n\n // If the location.hash matches one of the links, use that as the active tab.\n $active = $($links.filter('[href=\"' + location.hash + '\"]'));\n\n // If no match is found, use the first link or any with class 'active' as the initial active tab.\n if ($active.length === 0) {\n $active = $(this).find('li.tab a.active').first();\n }\n if ($active.length === 0) {\n $active = $(this).find('li.tab a').first();\n }\n\n $active.addClass('active');\n index = $links.index($active);\n if (index < 0) {\n index = 0;\n }\n\n if ($active[0] !== undefined) {\n $content = $($active[0].hash);\n $content.addClass('active');\n }\n\n // append indicator then set indicator width to tab width\n if (!$this.find('.indicator').length) {\n $this.append('<li class=\"indicator\"></li>');\n }\n $indicator = $this.find('.indicator');\n\n // we make sure that the indicator is at the end of the tabs\n $this.append($indicator);\n\n if ($this.is(\":visible\")) {\n // $indicator.css({\"right\": $tabs_width - ((index + 1) * $tab_width)});\n // $indicator.css({\"left\": index * $tab_width});\n setTimeout(function () {\n $indicator.css({ \"right\": calcRightPos($active) });\n $indicator.css({ \"left\": calcLeftPos($active) });\n }, 0);\n }\n $(window).off('resize.tabs-' + uniqueNamespace).on('resize.tabs-' + uniqueNamespace, function () {\n $tabs_width = $this.width();\n $tab_width = Math.max($tabs_width, $this[0].scrollWidth) / $links.length;\n if (index < 0) {\n index = 0;\n }\n if ($tab_width !== 0 && $tabs_width !== 0) {\n $indicator.css({ \"right\": calcRightPos($active) });\n $indicator.css({ \"left\": calcLeftPos($active) });\n }\n });\n\n // Initialize Tabs Content.\n if (options.swipeable) {\n // TODO: Duplicate calls with swipeable? handle multiple div wrapping.\n $links.each(function () {\n var $curr_content = $(Materialize.escapeHash(this.hash));\n $curr_content.addClass('carousel-item');\n $tabs_content = $tabs_content.add($curr_content);\n });\n $tabs_wrapper = $tabs_content.wrapAll('<div class=\"tabs-content carousel\"></div>');\n $tabs_content.css('display', '');\n $('.tabs-content.carousel').carousel({\n fullWidth: true,\n noWrap: true,\n onCycleTo: function (item) {\n if (!clicked) {\n var prev_index = index;\n index = $tabs_wrapper.index(item);\n $active.removeClass('active');\n $active = $links.eq(index);\n $active.addClass('active');\n animateIndicator(prev_index);\n if (typeof options.onShow === \"function\") {\n options.onShow.call($this[0], $content);\n }\n }\n }\n });\n } else {\n // Hide the remaining content\n $links.not($active).each(function () {\n $(Materialize.escapeHash(this.hash)).hide();\n });\n }\n\n // Bind the click event handler\n $this.off('click.tabs').on('click.tabs', 'a', function (e) {\n if ($(this).parent().hasClass('disabled')) {\n e.preventDefault();\n return;\n }\n\n // Act as regular link if target attribute is specified.\n if (!!$(this).attr(\"target\")) {\n return;\n }\n\n clicked = true;\n $tabs_width = $this.width();\n $tab_width = Math.max($tabs_width, $this[0].scrollWidth) / $links.length;\n\n // Make the old tab inactive.\n $active.removeClass('active');\n var $oldContent = $content;\n\n // Update the variables with the new link and content\n $active = $(this);\n $content = $(Materialize.escapeHash(this.hash));\n $links = $this.find('li.tab a');\n var activeRect = $active.position();\n\n // Make the tab active.\n $active.addClass('active');\n prev_index = index;\n index = $links.index($(this));\n if (index < 0) {\n index = 0;\n }\n // Change url to current tab\n // window.location.hash = $active.attr('href');\n\n // Swap content\n if (options.swipeable) {\n if ($tabs_content.length) {\n $tabs_content.carousel('set', index, function () {\n if (typeof options.onShow === \"function\") {\n options.onShow.call($this[0], $content);\n }\n });\n }\n } else {\n if ($content !== undefined) {\n $content.show();\n $content.addClass('active');\n if (typeof options.onShow === \"function\") {\n options.onShow.call(this, $content);\n }\n }\n\n if ($oldContent !== undefined && !$oldContent.is($content)) {\n $oldContent.hide();\n $oldContent.removeClass('active');\n }\n }\n\n // Reset clicked state\n clickedTimeout = setTimeout(function () {\n clicked = false;\n }, transition);\n\n // Update indicator\n animateIndicator(prev_index);\n\n // Prevent the anchor's default click action\n e.preventDefault();\n });\n });\n },\n select_tab: function (id) {\n this.find('a[href=\"#' + id + '\"]').trigger('click');\n }\n };\n\n $.fn.tabs = function (methodOrOptions) {\n if (methods[methodOrOptions]) {\n return methods[methodOrOptions].apply(this, Array.prototype.slice.call(arguments, 1));\n } else if (typeof methodOrOptions === 'object' || !methodOrOptions) {\n // Default to \"init\"\n return methods.init.apply(this, arguments);\n } else {\n $.error('Method ' + methodOrOptions + ' does not exist on jQuery.tabs');\n }\n };\n\n $(document).ready(function () {\n $('ul.tabs').tabs();\n });\n})(jQuery);\n;(function ($) {\n $.fn.tooltip = function (options) {\n var timeout = null,\n margin = 5;\n\n // Defaults\n var defaults = {\n delay: 350,\n tooltip: '',\n position: 'bottom',\n html: false\n };\n\n // Remove tooltip from the activator\n if (options === \"remove\") {\n this.each(function () {\n $('#' + $(this).attr('data-tooltip-id')).remove();\n $(this).removeAttr('data-tooltip-id');\n $(this).off('mouseenter.tooltip mouseleave.tooltip');\n });\n return false;\n }\n\n options = $.extend(defaults, options);\n\n return this.each(function () {\n var tooltipId = Materialize.guid();\n var origin = $(this);\n\n // Destroy old tooltip\n if (origin.attr('data-tooltip-id')) {\n $('#' + origin.attr('data-tooltip-id')).remove();\n }\n\n origin.attr('data-tooltip-id', tooltipId);\n\n // Get attributes.\n var allowHtml, tooltipDelay, tooltipPosition, tooltipText, tooltipEl, backdrop;\n var setAttributes = function () {\n allowHtml = origin.attr('data-html') ? origin.attr('data-html') === 'true' : options.html;\n tooltipDelay = origin.attr('data-delay');\n tooltipDelay = tooltipDelay === undefined || tooltipDelay === '' ? options.delay : tooltipDelay;\n tooltipPosition = origin.attr('data-position');\n tooltipPosition = tooltipPosition === undefined || tooltipPosition === '' ? options.position : tooltipPosition;\n tooltipText = origin.attr('data-tooltip');\n tooltipText = tooltipText === undefined || tooltipText === '' ? options.tooltip : tooltipText;\n };\n setAttributes();\n\n var renderTooltipEl = function () {\n var tooltip = $('<div class=\"material-tooltip\"></div>');\n\n // Create Text span\n if (allowHtml) {\n tooltipText = $('<span></span>').html(tooltipText);\n } else {\n tooltipText = $('<span></span>').text(tooltipText);\n }\n\n // Create tooltip\n tooltip.append(tooltipText).appendTo($('body')).attr('id', tooltipId);\n\n // Create backdrop\n backdrop = $('<div class=\"backdrop\"></div>');\n backdrop.appendTo(tooltip);\n return tooltip;\n };\n tooltipEl = renderTooltipEl();\n\n // Destroy previously binded events\n origin.off('mouseenter.tooltip mouseleave.tooltip');\n // Mouse In\n var started = false,\n timeoutRef;\n origin.on({ 'mouseenter.tooltip': function (e) {\n var showTooltip = function () {\n setAttributes();\n started = true;\n tooltipEl.velocity('stop');\n backdrop.velocity('stop');\n tooltipEl.css({ visibility: 'visible', left: '0px', top: '0px' });\n\n // Tooltip positioning\n var originWidth = origin.outerWidth();\n var originHeight = origin.outerHeight();\n var tooltipHeight = tooltipEl.outerHeight();\n var tooltipWidth = tooltipEl.outerWidth();\n var tooltipVerticalMovement = '0px';\n var tooltipHorizontalMovement = '0px';\n var backdropOffsetWidth = backdrop[0].offsetWidth;\n var backdropOffsetHeight = backdrop[0].offsetHeight;\n var scaleXFactor = 8;\n var scaleYFactor = 8;\n var scaleFactor = 0;\n var targetTop, targetLeft, newCoordinates;\n\n if (tooltipPosition === \"top\") {\n // Top Position\n targetTop = origin.offset().top - tooltipHeight - margin;\n targetLeft = origin.offset().left + originWidth / 2 - tooltipWidth / 2;\n newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);\n tooltipVerticalMovement = '-10px';\n backdrop.css({\n bottom: 0,\n left: 0,\n borderRadius: '14px 14px 0 0',\n transformOrigin: '50% 100%',\n marginTop: tooltipHeight,\n marginLeft: tooltipWidth / 2 - backdropOffsetWidth / 2\n });\n }\n // Left Position\n else if (tooltipPosition === \"left\") {\n targetTop = origin.offset().top + originHeight / 2 - tooltipHeight / 2;\n targetLeft = origin.offset().left - tooltipWidth - margin;\n newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);\n\n tooltipHorizontalMovement = '-10px';\n backdrop.css({\n top: '-7px',\n right: 0,\n width: '14px',\n height: '14px',\n borderRadius: '14px 0 0 14px',\n transformOrigin: '95% 50%',\n marginTop: tooltipHeight / 2,\n marginLeft: tooltipWidth\n });\n }\n // Right Position\n else if (tooltipPosition === \"right\") {\n targetTop = origin.offset().top + originHeight / 2 - tooltipHeight / 2;\n targetLeft = origin.offset().left + originWidth + margin;\n newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);\n\n tooltipHorizontalMovement = '+10px';\n backdrop.css({\n top: '-7px',\n left: 0,\n width: '14px',\n height: '14px',\n borderRadius: '0 14px 14px 0',\n transformOrigin: '5% 50%',\n marginTop: tooltipHeight / 2,\n marginLeft: '0px'\n });\n } else {\n // Bottom Position\n targetTop = origin.offset().top + origin.outerHeight() + margin;\n targetLeft = origin.offset().left + originWidth / 2 - tooltipWidth / 2;\n newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);\n tooltipVerticalMovement = '+10px';\n backdrop.css({\n top: 0,\n left: 0,\n marginLeft: tooltipWidth / 2 - backdropOffsetWidth / 2\n });\n }\n\n // Set tooptip css placement\n tooltipEl.css({\n top: newCoordinates.y,\n left: newCoordinates.x\n });\n\n // Calculate Scale to fill\n scaleXFactor = Math.SQRT2 * tooltipWidth / parseInt(backdropOffsetWidth);\n scaleYFactor = Math.SQRT2 * tooltipHeight / parseInt(backdropOffsetHeight);\n scaleFactor = Math.max(scaleXFactor, scaleYFactor);\n\n tooltipEl.velocity({ translateY: tooltipVerticalMovement, translateX: tooltipHorizontalMovement }, { duration: 350, queue: false }).velocity({ opacity: 1 }, { duration: 300, delay: 50, queue: false });\n backdrop.css({ visibility: 'visible' }).velocity({ opacity: 1 }, { duration: 55, delay: 0, queue: false }).velocity({ scaleX: scaleFactor, scaleY: scaleFactor }, { duration: 300, delay: 0, queue: false, easing: 'easeInOutQuad' });\n };\n\n timeoutRef = setTimeout(showTooltip, tooltipDelay); // End Interval\n\n // Mouse Out\n },\n 'mouseleave.tooltip': function () {\n // Reset State\n started = false;\n clearTimeout(timeoutRef);\n\n // Animate back\n setTimeout(function () {\n if (started !== true) {\n tooltipEl.velocity({\n opacity: 0, translateY: 0, translateX: 0 }, { duration: 225, queue: false });\n backdrop.velocity({ opacity: 0, scaleX: 1, scaleY: 1 }, {\n duration: 225,\n queue: false,\n complete: function () {\n backdrop.css({ visibility: 'hidden' });\n tooltipEl.css({ visibility: 'hidden' });\n started = false;\n }\n });\n }\n }, 225);\n }\n });\n });\n };\n\n var repositionWithinScreen = function (x, y, width, height) {\n var newX = x;\n var newY = y;\n\n if (newX < 0) {\n newX = 4;\n } else if (newX + width > window.innerWidth) {\n newX -= newX + width - window.innerWidth;\n }\n\n if (newY < 0) {\n newY = 4;\n } else if (newY + height > window.innerHeight + $(window).scrollTop) {\n newY -= newY + height - window.innerHeight;\n }\n\n return { x: newX, y: newY };\n };\n\n $(document).ready(function () {\n $('.tooltipped').tooltip();\n });\n})(jQuery);\n; /*!\n * Waves v0.6.4\n * http://fian.my.id/Waves\n *\n * Copyright 2014 Alfiana E. Sibuea and other contributors\n * Released under the MIT license\n * https://github.com/fians/Waves/blob/master/LICENSE\n */\n\n;(function (window) {\n 'use strict';\n\n var Waves = Waves || {};\n var $$ = document.querySelectorAll.bind(document);\n\n // Find exact position of element\n function isWindow(obj) {\n return obj !== null && obj === obj.window;\n }\n\n function getWindow(elem) {\n return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n }\n\n function offset(elem) {\n var docElem,\n win,\n box = { top: 0, left: 0 },\n doc = elem && elem.ownerDocument;\n\n docElem = doc.documentElement;\n\n if (typeof elem.getBoundingClientRect !== typeof undefined) {\n box = elem.getBoundingClientRect();\n }\n win = getWindow(doc);\n return {\n top: box.top + win.pageYOffset - docElem.clientTop,\n left: box.left + win.pageXOffset - docElem.clientLeft\n };\n }\n\n function convertStyle(obj) {\n var style = '';\n\n for (var a in obj) {\n if (obj.hasOwnProperty(a)) {\n style += a + ':' + obj[a] + ';';\n }\n }\n\n return style;\n }\n\n var Effect = {\n\n // Effect delay\n duration: 750,\n\n show: function (e, element) {\n\n // Disable right click\n if (e.button === 2) {\n return false;\n }\n\n var el = element || this;\n\n // Create ripple\n var ripple = document.createElement('div');\n ripple.className = 'waves-ripple';\n el.appendChild(ripple);\n\n // Get click coordinate and element witdh\n var pos = offset(el);\n var relativeY = e.pageY - pos.top;\n var relativeX = e.pageX - pos.left;\n var scale = 'scale(' + el.clientWidth / 100 * 10 + ')';\n\n // Support for touch devices\n if ('touches' in e) {\n relativeY = e.touches[0].pageY - pos.top;\n relativeX = e.touches[0].pageX - pos.left;\n }\n\n // Attach data to element\n ripple.setAttribute('data-hold', Date.now());\n ripple.setAttribute('data-scale', scale);\n ripple.setAttribute('data-x', relativeX);\n ripple.setAttribute('data-y', relativeY);\n\n // Set ripple position\n var rippleStyle = {\n 'top': relativeY + 'px',\n 'left': relativeX + 'px'\n };\n\n ripple.className = ripple.className + ' waves-notransition';\n ripple.setAttribute('style', convertStyle(rippleStyle));\n ripple.className = ripple.className.replace('waves-notransition', '');\n\n // Scale the ripple\n rippleStyle['-webkit-transform'] = scale;\n rippleStyle['-moz-transform'] = scale;\n rippleStyle['-ms-transform'] = scale;\n rippleStyle['-o-transform'] = scale;\n rippleStyle.transform = scale;\n rippleStyle.opacity = '1';\n\n rippleStyle['-webkit-transition-duration'] = Effect.duration + 'ms';\n rippleStyle['-moz-transition-duration'] = Effect.duration + 'ms';\n rippleStyle['-o-transition-duration'] = Effect.duration + 'ms';\n rippleStyle['transition-duration'] = Effect.duration + 'ms';\n\n rippleStyle['-webkit-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';\n rippleStyle['-moz-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';\n rippleStyle['-o-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';\n rippleStyle['transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';\n\n ripple.setAttribute('style', convertStyle(rippleStyle));\n },\n\n hide: function (e) {\n TouchHandler.touchup(e);\n\n var el = this;\n var width = el.clientWidth * 1.4;\n\n // Get first ripple\n var ripple = null;\n var ripples = el.getElementsByClassName('waves-ripple');\n if (ripples.length > 0) {\n ripple = ripples[ripples.length - 1];\n } else {\n return false;\n }\n\n var relativeX = ripple.getAttribute('data-x');\n var relativeY = ripple.getAttribute('data-y');\n var scale = ripple.getAttribute('data-scale');\n\n // Get delay beetween mousedown and mouse leave\n var diff = Date.now() - Number(ripple.getAttribute('data-hold'));\n var delay = 350 - diff;\n\n if (delay < 0) {\n delay = 0;\n }\n\n // Fade out ripple after delay\n setTimeout(function () {\n var style = {\n 'top': relativeY + 'px',\n 'left': relativeX + 'px',\n 'opacity': '0',\n\n // Duration\n '-webkit-transition-duration': Effect.duration + 'ms',\n '-moz-transition-duration': Effect.duration + 'ms',\n '-o-transition-duration': Effect.duration + 'ms',\n 'transition-duration': Effect.duration + 'ms',\n '-webkit-transform': scale,\n '-moz-transform': scale,\n '-ms-transform': scale,\n '-o-transform': scale,\n 'transform': scale\n };\n\n ripple.setAttribute('style', convertStyle(style));\n\n setTimeout(function () {\n try {\n el.removeChild(ripple);\n } catch (e) {\n return false;\n }\n }, Effect.duration);\n }, delay);\n },\n\n // Little hack to make <input> can perform waves effect\n wrapInput: function (elements) {\n for (var a = 0; a < elements.length; a++) {\n var el = elements[a];\n\n if (el.tagName.toLowerCase() === 'input') {\n var parent = el.parentNode;\n\n // If input already have parent just pass through\n if (parent.tagName.toLowerCase() === 'i' && parent.className.indexOf('waves-effect') !== -1) {\n continue;\n }\n\n // Put element class and style to the specified parent\n var wrapper = document.createElement('i');\n wrapper.className = el.className + ' waves-input-wrapper';\n\n var elementStyle = el.getAttribute('style');\n\n if (!elementStyle) {\n elementStyle = '';\n }\n\n wrapper.setAttribute('style', elementStyle);\n\n el.className = 'waves-button-input';\n el.removeAttribute('style');\n\n // Put element as child\n parent.replaceChild(wrapper, el);\n wrapper.appendChild(el);\n }\n }\n }\n };\n\n /**\n * Disable mousedown event for 500ms during and after touch\n */\n var TouchHandler = {\n /* uses an integer rather than bool so there's no issues with\n * needing to clear timeouts if another touch event occurred\n * within the 500ms. Cannot mouseup between touchstart and\n * touchend, nor in the 500ms after touchend. */\n touches: 0,\n allowEvent: function (e) {\n var allow = true;\n\n if (e.type === 'touchstart') {\n TouchHandler.touches += 1; //push\n } else if (e.type === 'touchend' || e.type === 'touchcancel') {\n setTimeout(function () {\n if (TouchHandler.touches > 0) {\n TouchHandler.touches -= 1; //pop after 500ms\n }\n }, 500);\n } else if (e.type === 'mousedown' && TouchHandler.touches > 0) {\n allow = false;\n }\n\n return allow;\n },\n touchup: function (e) {\n TouchHandler.allowEvent(e);\n }\n };\n\n /**\n * Delegated click handler for .waves-effect element.\n * returns null when .waves-effect element not in \"click tree\"\n */\n function getWavesEffectElement(e) {\n if (TouchHandler.allowEvent(e) === false) {\n return null;\n }\n\n var element = null;\n var target = e.target || e.srcElement;\n\n while (target.parentNode !== null) {\n if (!(target instanceof SVGElement) && target.className.indexOf('waves-effect') !== -1) {\n element = target;\n break;\n }\n target = target.parentNode;\n }\n return element;\n }\n\n /**\n * Bubble the click and show effect if .waves-effect elem was found\n */\n function showEffect(e) {\n var element = getWavesEffectElement(e);\n\n if (element !== null) {\n Effect.show(e, element);\n\n if ('ontouchstart' in window) {\n element.addEventListener('touchend', Effect.hide, false);\n element.addEventListener('touchcancel', Effect.hide, false);\n }\n\n element.addEventListener('mouseup', Effect.hide, false);\n element.addEventListener('mouseleave', Effect.hide, false);\n element.addEventListener('dragend', Effect.hide, false);\n }\n }\n\n Waves.displayEffect = function (options) {\n options = options || {};\n\n if ('duration' in options) {\n Effect.duration = options.duration;\n }\n\n //Wrap input inside <i> tag\n Effect.wrapInput($$('.waves-effect'));\n\n if ('ontouchstart' in window) {\n document.body.addEventListener('touchstart', showEffect, false);\n }\n\n document.body.addEventListener('mousedown', showEffect, false);\n };\n\n /**\n * Attach Waves to an input element (or any element which doesn't\n * bubble mouseup/mousedown events).\n * Intended to be used with dynamically loaded forms/inputs, or\n * where the user doesn't want a delegated click handler.\n */\n Waves.attach = function (element) {\n //FUTURE: automatically add waves classes and allow users\n // to specify them with an options param? Eg. light/classic/button\n if (element.tagName.toLowerCase() === 'input') {\n Effect.wrapInput([element]);\n element = element.parentNode;\n }\n\n if ('ontouchstart' in window) {\n element.addEventListener('touchstart', showEffect, false);\n }\n\n element.addEventListener('mousedown', showEffect, false);\n };\n\n window.Waves = Waves;\n\n document.addEventListener('DOMContentLoaded', function () {\n Waves.displayEffect();\n }, false);\n})(window);\n;(function ($) {\n 'use strict';\n\n var _defaults = {\n displayLength: Infinity,\n inDuration: 300,\n outDuration: 375,\n className: undefined,\n completeCallback: undefined,\n activationPercent: 0.8\n };\n\n var Toast = function () {\n function Toast(message, displayLength, className, completeCallback) {\n _classCallCheck(this, Toast);\n\n if (!message) {\n return;\n }\n\n /**\n * Options for the toast\n * @member Toast#options\n */\n this.options = {\n displayLength: displayLength,\n className: className,\n completeCallback: completeCallback\n };\n\n this.options = $.extend({}, Toast.defaults, this.options);\n this.message = message;\n\n /**\n * Describes current pan state toast\n * @type {Boolean}\n */\n this.panning = false;\n\n /**\n * Time remaining until toast is removed\n */\n this.timeRemaining = this.options.displayLength;\n\n if (Toast._toasts.length === 0) {\n Toast._createContainer();\n }\n\n // Create new toast\n Toast._toasts.push(this);\n var toastElement = this.createToast();\n toastElement.M_Toast = this;\n this.el = toastElement;\n this._animateIn();\n this.setTimer();\n }\n\n _createClass(Toast, [{\n key: 'createToast',\n\n\n /**\n * Create toast and append it to toast container\n */\n value: function createToast() {\n var toast = document.createElement('div');\n toast.classList.add('toast');\n\n // Add custom classes onto toast\n if (this.options.className) {\n var classes = this.options.className.split(' ');\n var i = void 0,\n count = void 0;\n for (i = 0, count = classes.length; i < count; i++) {\n toast.classList.add(classes[i]);\n }\n }\n\n // Set content\n if (typeof HTMLElement === 'object' ? this.message instanceof HTMLElement : this.message && typeof this.message === 'object' && this.message !== null && this.message.nodeType === 1 && typeof this.message.nodeName === 'string') {\n toast.appendChild(this.message);\n\n // Check if it is jQuery object\n } else if (this.message instanceof jQuery) {\n $(toast).append(this.message);\n\n // Insert as text;\n } else {\n toast.innerHTML = this.message;\n }\n\n // Append toasft\n Toast._container.appendChild(toast);\n return toast;\n }\n\n /**\n * Animate in toast\n */\n\n }, {\n key: '_animateIn',\n value: function _animateIn() {\n // Animate toast in\n Vel(this.el, { top: 0, opacity: 1 }, {\n duration: 300,\n easing: 'easeOutCubic',\n queue: false\n });\n }\n\n /**\n * Create setInterval which automatically removes toast when timeRemaining >= 0\n * has been reached\n */\n\n }, {\n key: 'setTimer',\n value: function setTimer() {\n var _this3 = this;\n\n if (this.timeRemaining !== Infinity) {\n this.counterInterval = setInterval(function () {\n // If toast is not being dragged, decrease its time remaining\n if (!_this3.panning) {\n _this3.timeRemaining -= 20;\n }\n\n // Animate toast out\n if (_this3.timeRemaining <= 0) {\n _this3.remove();\n }\n }, 20);\n }\n }\n\n /**\n * Dismiss toast with animation\n */\n\n }, {\n key: 'remove',\n value: function remove() {\n var _this4 = this;\n\n window.clearInterval(this.counterInterval);\n var activationDistance = this.el.offsetWidth * this.options.activationPercent;\n\n if (this.wasSwiped) {\n this.el.style.transition = 'transform .05s, opacity .05s';\n this.el.style.transform = 'translateX(' + activationDistance + 'px)';\n this.el.style.opacity = 0;\n }\n\n Vel(this.el, { opacity: 0, marginTop: '-40px' }, {\n duration: this.options.outDuration,\n easing: 'easeOutExpo',\n queue: false,\n complete: function () {\n // Call the optional callback\n if (typeof _this4.options.completeCallback === 'function') {\n _this4.options.completeCallback();\n }\n // Remove toast from DOM\n _this4.el.parentNode.removeChild(_this4.el);\n Toast._toasts.splice(Toast._toasts.indexOf(_this4), 1);\n if (Toast._toasts.length === 0) {\n Toast._removeContainer();\n }\n }\n });\n }\n }], [{\n key: '_createContainer',\n\n\n /**\n * Append toast container and add event handlers\n */\n value: function _createContainer() {\n var container = document.createElement('div');\n container.setAttribute('id', 'toast-container');\n\n // Add event handler\n container.addEventListener('touchstart', Toast._onDragStart);\n container.addEventListener('touchmove', Toast._onDragMove);\n container.addEventListener('touchend', Toast._onDragEnd);\n\n container.addEventListener('mousedown', Toast._onDragStart);\n document.addEventListener('mousemove', Toast._onDragMove);\n document.addEventListener('mouseup', Toast._onDragEnd);\n\n document.body.appendChild(container);\n Toast._container = container;\n }\n\n /**\n * Remove toast container and event handlers\n */\n\n }, {\n key: '_removeContainer',\n value: function _removeContainer() {\n // Add event handler\n document.removeEventListener('mousemove', Toast._onDragMove);\n document.removeEventListener('mouseup', Toast._onDragEnd);\n\n Toast._container.parentNode.removeChild(Toast._container);\n Toast._container = null;\n }\n\n /**\n * Begin drag handler\n * @param {Event} e\n */\n\n }, {\n key: '_onDragStart',\n value: function _onDragStart(e) {\n if (e.target && $(e.target).closest('.toast').length) {\n var $toast = $(e.target).closest('.toast');\n var toast = $toast[0].M_Toast;\n toast.panning = true;\n Toast._draggedToast = toast;\n toast.el.classList.add('panning');\n toast.el.style.transition = null;\n toast.startingXPos = Toast._xPos(e);\n toast.time = Date.now();\n toast.xPos = Toast._xPos(e);\n }\n }\n\n /**\n * Drag move handler\n * @param {Event} e\n */\n\n }, {\n key: '_onDragMove',\n value: function _onDragMove(e) {\n if (!!Toast._draggedToast) {\n e.preventDefault();\n var toast = Toast._draggedToast;\n toast.deltaX = Math.abs(toast.xPos - Toast._xPos(e));\n toast.xPos = Toast._xPos(e);\n toast.velocityX = toast.deltaX / (Date.now() - toast.time);\n toast.time = Date.now();\n\n var totalDeltaX = toast.xPos - toast.startingXPos;\n var activationDistance = toast.el.offsetWidth * toast.options.activationPercent;\n toast.el.style.transform = 'translateX(' + totalDeltaX + 'px)';\n toast.el.style.opacity = 1 - Math.abs(totalDeltaX / activationDistance);\n }\n }\n\n /**\n * End drag handler\n * @param {Event} e\n */\n\n }, {\n key: '_onDragEnd',\n value: function _onDragEnd(e) {\n if (!!Toast._draggedToast) {\n var toast = Toast._draggedToast;\n toast.panning = false;\n toast.el.classList.remove('panning');\n\n var totalDeltaX = toast.xPos - toast.startingXPos;\n var activationDistance = toast.el.offsetWidth * toast.options.activationPercent;\n var shouldBeDismissed = Math.abs(totalDeltaX) > activationDistance || toast.velocityX > 1;\n\n // Remove toast\n if (shouldBeDismissed) {\n toast.wasSwiped = true;\n toast.remove();\n\n // Animate toast back to original position\n } else {\n toast.el.style.transition = 'transform .2s, opacity .2s';\n toast.el.style.transform = null;\n toast.el.style.opacity = null;\n }\n Toast._draggedToast = null;\n }\n }\n\n /**\n * Get x position of mouse or touch event\n * @param {Event} e\n */\n\n }, {\n key: '_xPos',\n value: function _xPos(e) {\n if (e.targetTouches && e.targetTouches.length >= 1) {\n return e.targetTouches[0].clientX;\n }\n // mouse event\n return e.clientX;\n }\n\n /**\n * Remove all toasts\n */\n\n }, {\n key: 'removeAll',\n value: function removeAll() {\n for (var toastIndex in Toast._toasts) {\n Toast._toasts[toastIndex].remove();\n }\n }\n }, {\n key: 'defaults',\n get: function () {\n return _defaults;\n }\n }]);\n\n return Toast;\n }();\n\n /**\n * @static\n * @memberof Toast\n * @type {Array.<Toast>}\n */\n\n\n Toast._toasts = [];\n\n /**\n * @static\n * @memberof Toast\n */\n Toast._container = null;\n\n /**\n * @static\n * @memberof Toast\n * @type {Toast}\n */\n Toast._draggedToast = null;\n\n window.Materialize.Toast = Toast;\n window.Materialize.toast = function (message, displayLength, className, completeCallback) {\n return new Toast(message, displayLength, className, completeCallback);\n };\n})(jQuery);\n;(function ($) {\n\n var methods = {\n init: function (options) {\n var defaults = {\n menuWidth: 300,\n edge: 'left',\n closeOnClick: false,\n draggable: true,\n onOpen: null,\n onClose: null\n };\n options = $.extend(defaults, options);\n\n $(this).each(function () {\n var $this = $(this);\n var menuId = $this.attr('data-activates');\n var menu = $(\"#\" + menuId);\n\n // Set to width\n if (options.menuWidth != 300) {\n menu.css('width', options.menuWidth);\n }\n\n // Add Touch Area\n var $dragTarget = $('.drag-target[data-sidenav=\"' + menuId + '\"]');\n if (options.draggable) {\n // Regenerate dragTarget\n if ($dragTarget.length) {\n $dragTarget.remove();\n }\n\n $dragTarget = $('<div class=\"drag-target\"></div>').attr('data-sidenav', menuId);\n $('body').append($dragTarget);\n } else {\n $dragTarget = $();\n }\n\n if (options.edge == 'left') {\n menu.css('transform', 'translateX(-100%)');\n $dragTarget.css({ 'left': 0 }); // Add Touch Area\n } else {\n menu.addClass('right-aligned') // Change text-alignment to right\n .css('transform', 'translateX(100%)');\n $dragTarget.css({ 'right': 0 }); // Add Touch Area\n }\n\n // If fixed sidenav, bring menu out\n if (menu.hasClass('fixed')) {\n if (window.innerWidth > 992) {\n menu.css('transform', 'translateX(0)');\n }\n }\n\n // Window resize to reset on large screens fixed\n if (menu.hasClass('fixed')) {\n $(window).resize(function () {\n if (window.innerWidth > 992) {\n // Close menu if window is resized bigger than 992 and user has fixed sidenav\n if ($('#sidenav-overlay').length !== 0 && menuOut) {\n removeMenu(true);\n } else {\n // menu.removeAttr('style');\n menu.css('transform', 'translateX(0%)');\n // menu.css('width', options.menuWidth);\n }\n } else if (menuOut === false) {\n if (options.edge === 'left') {\n menu.css('transform', 'translateX(-100%)');\n } else {\n menu.css('transform', 'translateX(100%)');\n }\n }\n });\n }\n\n // if closeOnClick, then add close event for all a tags in side sideNav\n if (options.closeOnClick === true) {\n menu.on(\"click.itemclick\", \"a:not(.collapsible-header)\", function () {\n if (!(window.innerWidth > 992 && menu.hasClass('fixed'))) {\n removeMenu();\n }\n });\n }\n\n var removeMenu = function (restoreNav) {\n panning = false;\n menuOut = false;\n // Reenable scrolling\n $('body').css({\n overflow: '',\n width: ''\n });\n\n $('#sidenav-overlay').velocity({ opacity: 0 }, { duration: 200,\n queue: false, easing: 'easeOutQuad',\n complete: function () {\n $(this).remove();\n } });\n if (options.edge === 'left') {\n // Reset phantom div\n $dragTarget.css({ width: '', right: '', left: '0' });\n menu.velocity({ 'translateX': '-100%' }, { duration: 200,\n queue: false,\n easing: 'easeOutCubic',\n complete: function () {\n if (restoreNav === true) {\n // Restore Fixed sidenav\n menu.removeAttr('style');\n menu.css('width', options.menuWidth);\n }\n }\n\n });\n } else {\n // Reset phantom div\n $dragTarget.css({ width: '', right: '0', left: '' });\n menu.velocity({ 'translateX': '100%' }, { duration: 200,\n queue: false,\n easing: 'easeOutCubic',\n complete: function () {\n if (restoreNav === true) {\n // Restore Fixed sidenav\n menu.removeAttr('style');\n menu.css('width', options.menuWidth);\n }\n }\n });\n }\n\n // Callback\n if (typeof options.onClose === 'function') {\n options.onClose.call(this, menu);\n }\n };\n\n // Touch Event\n var panning = false;\n var menuOut = false;\n\n if (options.draggable) {\n $dragTarget.on('click', function () {\n if (menuOut) {\n removeMenu();\n }\n });\n\n $dragTarget.hammer({\n prevent_default: false\n }).on('pan', function (e) {\n\n if (e.gesture.pointerType == \"touch\") {\n\n var direction = e.gesture.direction;\n var x = e.gesture.center.x;\n var y = e.gesture.center.y;\n var velocityX = e.gesture.velocityX;\n\n // Vertical scroll bugfix\n if (x === 0 && y === 0) {\n return;\n }\n\n // Disable Scrolling\n var $body = $('body');\n var $overlay = $('#sidenav-overlay');\n var oldWidth = $body.innerWidth();\n $body.css('overflow', 'hidden');\n $body.width(oldWidth);\n\n // If overlay does not exist, create one and if it is clicked, close menu\n if ($overlay.length === 0) {\n $overlay = $('<div id=\"sidenav-overlay\"></div>');\n $overlay.css('opacity', 0).click(function () {\n removeMenu();\n });\n\n // Run 'onOpen' when sidenav is opened via touch/swipe if applicable\n if (typeof options.onOpen === 'function') {\n options.onOpen.call(this, menu);\n }\n\n $('body').append($overlay);\n }\n\n // Keep within boundaries\n if (options.edge === 'left') {\n if (x > options.menuWidth) {\n x = options.menuWidth;\n } else if (x < 0) {\n x = 0;\n }\n }\n\n if (options.edge === 'left') {\n // Left Direction\n if (x < options.menuWidth / 2) {\n menuOut = false;\n }\n // Right Direction\n else if (x >= options.menuWidth / 2) {\n menuOut = true;\n }\n menu.css('transform', 'translateX(' + (x - options.menuWidth) + 'px)');\n } else {\n // Left Direction\n if (x < window.innerWidth - options.menuWidth / 2) {\n menuOut = true;\n }\n // Right Direction\n else if (x >= window.innerWidth - options.menuWidth / 2) {\n menuOut = false;\n }\n var rightPos = x - options.menuWidth / 2;\n if (rightPos < 0) {\n rightPos = 0;\n }\n\n menu.css('transform', 'translateX(' + rightPos + 'px)');\n }\n\n // Percentage overlay\n var overlayPerc;\n if (options.edge === 'left') {\n overlayPerc = x / options.menuWidth;\n $overlay.velocity({ opacity: overlayPerc }, { duration: 10, queue: false, easing: 'easeOutQuad' });\n } else {\n overlayPerc = Math.abs((x - window.innerWidth) / options.menuWidth);\n $overlay.velocity({ opacity: overlayPerc }, { duration: 10, queue: false, easing: 'easeOutQuad' });\n }\n }\n }).on('panend', function (e) {\n\n if (e.gesture.pointerType == \"touch\") {\n var $overlay = $('#sidenav-overlay');\n var velocityX = e.gesture.velocityX;\n var x = e.gesture.center.x;\n var leftPos = x - options.menuWidth;\n var rightPos = x - options.menuWidth / 2;\n if (leftPos > 0) {\n leftPos = 0;\n }\n if (rightPos < 0) {\n rightPos = 0;\n }\n panning = false;\n\n if (options.edge === 'left') {\n // If velocityX <= 0.3 then the user is flinging the menu closed so ignore menuOut\n if (menuOut && velocityX <= 0.3 || velocityX < -0.5) {\n // Return menu to open\n if (leftPos !== 0) {\n menu.velocity({ 'translateX': [0, leftPos] }, { duration: 300, queue: false, easing: 'easeOutQuad' });\n }\n\n $overlay.velocity({ opacity: 1 }, { duration: 50, queue: false, easing: 'easeOutQuad' });\n $dragTarget.css({ width: '50%', right: 0, left: '' });\n menuOut = true;\n } else if (!menuOut || velocityX > 0.3) {\n // Enable Scrolling\n $('body').css({\n overflow: '',\n width: ''\n });\n // Slide menu closed\n menu.velocity({ 'translateX': [-1 * options.menuWidth - 10, leftPos] }, { duration: 200, queue: false, easing: 'easeOutQuad' });\n $overlay.velocity({ opacity: 0 }, { duration: 200, queue: false, easing: 'easeOutQuad',\n complete: function () {\n // Run 'onClose' when sidenav is closed via touch/swipe if applicable\n if (typeof options.onClose === 'function') {\n options.onClose.call(this, menu);\n }\n\n $(this).remove();\n } });\n $dragTarget.css({ width: '10px', right: '', left: 0 });\n }\n } else {\n if (menuOut && velocityX >= -0.3 || velocityX > 0.5) {\n // Return menu to open\n if (rightPos !== 0) {\n menu.velocity({ 'translateX': [0, rightPos] }, { duration: 300, queue: false, easing: 'easeOutQuad' });\n }\n\n $overlay.velocity({ opacity: 1 }, { duration: 50, queue: false, easing: 'easeOutQuad' });\n $dragTarget.css({ width: '50%', right: '', left: 0 });\n menuOut = true;\n } else if (!menuOut || velocityX < -0.3) {\n // Enable Scrolling\n $('body').css({\n overflow: '',\n width: ''\n });\n\n // Slide menu closed\n menu.velocity({ 'translateX': [options.menuWidth + 10, rightPos] }, { duration: 200, queue: false, easing: 'easeOutQuad' });\n $overlay.velocity({ opacity: 0 }, { duration: 200, queue: false, easing: 'easeOutQuad',\n complete: function () {\n // Run 'onClose' when sidenav is closed via touch/swipe if applicable\n if (typeof options.onClose === 'function') {\n options.onClose.call(this, menu);\n }\n\n $(this).remove();\n } });\n $dragTarget.css({ width: '10px', right: 0, left: '' });\n }\n }\n }\n });\n }\n\n $this.off('click.sidenav').on('click.sidenav', function () {\n if (menuOut === true) {\n menuOut = false;\n panning = false;\n removeMenu();\n } else {\n\n // Disable Scrolling\n var $body = $('body');\n var $overlay = $('<div id=\"sidenav-overlay\"></div>');\n var oldWidth = $body.innerWidth();\n $body.css('overflow', 'hidden');\n $body.width(oldWidth);\n\n // Push current drag target on top of DOM tree\n $('body').append($dragTarget);\n\n if (options.edge === 'left') {\n $dragTarget.css({ width: '50%', right: 0, left: '' });\n menu.velocity({ 'translateX': [0, -1 * options.menuWidth] }, { duration: 300, queue: false, easing: 'easeOutQuad' });\n } else {\n $dragTarget.css({ width: '50%', right: '', left: 0 });\n menu.velocity({ 'translateX': [0, options.menuWidth] }, { duration: 300, queue: false, easing: 'easeOutQuad' });\n }\n\n // Overlay close on click\n $overlay.css('opacity', 0).click(function () {\n menuOut = false;\n panning = false;\n removeMenu();\n $overlay.velocity({ opacity: 0 }, { duration: 300, queue: false, easing: 'easeOutQuad',\n complete: function () {\n $(this).remove();\n }\n });\n });\n\n // Append body\n $('body').append($overlay);\n $overlay.velocity({ opacity: 1 }, { duration: 300, queue: false, easing: 'easeOutQuad',\n complete: function () {\n menuOut = true;\n panning = false;\n }\n });\n\n // Callback\n if (typeof options.onOpen === 'function') {\n options.onOpen.call(this, menu);\n }\n }\n\n return false;\n });\n });\n },\n destroy: function () {\n var $overlay = $('#sidenav-overlay');\n var $dragTarget = $('.drag-target[data-sidenav=\"' + $(this).attr('data-activates') + '\"]');\n $overlay.trigger('click');\n $dragTarget.remove();\n $(this).off('click');\n $overlay.remove();\n },\n show: function () {\n this.trigger('click');\n },\n hide: function () {\n $('#sidenav-overlay').trigger('click');\n }\n };\n\n $.fn.sideNav = function (methodOrOptions) {\n if (methods[methodOrOptions]) {\n return methods[methodOrOptions].apply(this, Array.prototype.slice.call(arguments, 1));\n } else if (typeof methodOrOptions === 'object' || !methodOrOptions) {\n // Default to \"init\"\n return methods.init.apply(this, arguments);\n } else {\n $.error('Method ' + methodOrOptions + ' does not exist on jQuery.sideNav');\n }\n }; // Plugin end\n})(jQuery);\n; /**\n * Extend jquery with a scrollspy plugin.\n * This watches the window scroll and fires events when elements are scrolled into viewport.\n *\n * throttle() and getTime() taken from Underscore.js\n * https://github.com/jashkenas/underscore\n *\n * @author Copyright 2013 John Smart\n * @license https://raw.github.com/thesmart/jquery-scrollspy/master/LICENSE\n * @see https://github.com/thesmart\n * @version 0.1.2\n */\n(function ($) {\n\n var jWindow = $(window);\n var elements = [];\n var elementsInView = [];\n var isSpying = false;\n var ticks = 0;\n var unique_id = 1;\n var offset = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n\n /**\n * Find elements that are within the boundary\n * @param {number} top\n * @param {number} right\n * @param {number} bottom\n * @param {number} left\n * @return {jQuery}\t\tA collection of elements\n */\n };function findElements(top, right, bottom, left) {\n var hits = $();\n $.each(elements, function (i, element) {\n if (element.height() > 0) {\n var elTop = element.offset().top,\n elLeft = element.offset().left,\n elRight = elLeft + element.width(),\n elBottom = elTop + element.height();\n\n var isIntersect = !(elLeft > right || elRight < left || elTop > bottom || elBottom < top);\n\n if (isIntersect) {\n hits.push(element);\n }\n }\n });\n\n return hits;\n }\n\n /**\n * Called when the user scrolls the window\n */\n function onScroll(scrollOffset) {\n // unique tick id\n ++ticks;\n\n // viewport rectangle\n var top = jWindow.scrollTop(),\n left = jWindow.scrollLeft(),\n right = left + jWindow.width(),\n bottom = top + jWindow.height();\n\n // determine which elements are in view\n var intersections = findElements(top + offset.top + scrollOffset || 200, right + offset.right, bottom + offset.bottom, left + offset.left);\n $.each(intersections, function (i, element) {\n\n var lastTick = element.data('scrollSpy:ticks');\n if (typeof lastTick != 'number') {\n // entered into view\n element.triggerHandler('scrollSpy:enter');\n }\n\n // update tick id\n element.data('scrollSpy:ticks', ticks);\n });\n\n // determine which elements are no longer in view\n $.each(elementsInView, function (i, element) {\n var lastTick = element.data('scrollSpy:ticks');\n if (typeof lastTick == 'number' && lastTick !== ticks) {\n // exited from view\n element.triggerHandler('scrollSpy:exit');\n element.data('scrollSpy:ticks', null);\n }\n });\n\n // remember elements in view for next tick\n elementsInView = intersections;\n }\n\n /**\n * Called when window is resized\n */\n function onWinSize() {\n jWindow.trigger('scrollSpy:winSize');\n }\n\n /**\n * Enables ScrollSpy using a selector\n * @param {jQuery|string} selector The elements collection, or a selector\n * @param {Object=} options\tOptional.\n throttle : number -> scrollspy throttling. Default: 100 ms\n offsetTop : number -> offset from top. Default: 0\n offsetRight : number -> offset from right. Default: 0\n offsetBottom : number -> offset from bottom. Default: 0\n offsetLeft : number -> offset from left. Default: 0\n \t\t\tactiveClass : string -> Class name to be added to the active link. Default: active\n * @returns {jQuery}\n */\n $.scrollSpy = function (selector, options) {\n var defaults = {\n throttle: 100,\n scrollOffset: 200, // offset - 200 allows elements near bottom of page to scroll\n activeClass: 'active',\n getActiveElement: function (id) {\n return 'a[href=\"#' + id + '\"]';\n }\n };\n options = $.extend(defaults, options);\n\n var visible = [];\n selector = $(selector);\n selector.each(function (i, element) {\n elements.push($(element));\n $(element).data(\"scrollSpy:id\", i);\n // Smooth scroll to section\n $('a[href=\"#' + $(element).attr('id') + '\"]').click(function (e) {\n e.preventDefault();\n var offset = $(Materialize.escapeHash(this.hash)).offset().top + 1;\n $('html, body').animate({ scrollTop: offset - options.scrollOffset }, { duration: 400, queue: false, easing: 'easeOutCubic' });\n });\n });\n\n offset.top = options.offsetTop || 0;\n offset.right = options.offsetRight || 0;\n offset.bottom = options.offsetBottom || 0;\n offset.left = options.offsetLeft || 0;\n\n var throttledScroll = Materialize.throttle(function () {\n onScroll(options.scrollOffset);\n }, options.throttle || 100);\n var readyScroll = function () {\n $(document).ready(throttledScroll);\n };\n\n if (!isSpying) {\n jWindow.on('scroll', readyScroll);\n jWindow.on('resize', readyScroll);\n isSpying = true;\n }\n\n // perform a scan once, after current execution context, and after dom is ready\n setTimeout(readyScroll, 0);\n\n selector.on('scrollSpy:enter', function () {\n visible = $.grep(visible, function (value) {\n return value.height() != 0;\n });\n\n var $this = $(this);\n\n if (visible[0]) {\n $(options.getActiveElement(visible[0].attr('id'))).removeClass(options.activeClass);\n if ($this.data('scrollSpy:id') < visible[0].data('scrollSpy:id')) {\n visible.unshift($(this));\n } else {\n visible.push($(this));\n }\n } else {\n visible.push($(this));\n }\n\n $(options.getActiveElement(visible[0].attr('id'))).addClass(options.activeClass);\n });\n selector.on('scrollSpy:exit', function () {\n visible = $.grep(visible, function (value) {\n return value.height() != 0;\n });\n\n if (visible[0]) {\n $(options.getActiveElement(visible[0].attr('id'))).removeClass(options.activeClass);\n var $this = $(this);\n visible = $.grep(visible, function (value) {\n return value.attr('id') != $this.attr('id');\n });\n if (visible[0]) {\n // Check if empty\n $(options.getActiveElement(visible[0].attr('id'))).addClass(options.activeClass);\n }\n }\n });\n\n return selector;\n };\n\n /**\n * Listen for window resize events\n * @param {Object=} options\t\t\t\t\t\tOptional. Set { throttle: number } to change throttling. Default: 100 ms\n * @returns {jQuery}\t\t$(window)\n */\n $.winSizeSpy = function (options) {\n $.winSizeSpy = function () {\n return jWindow;\n }; // lock from multiple calls\n options = options || {\n throttle: 100\n };\n return jWindow.on('resize', Materialize.throttle(onWinSize, options.throttle || 100));\n };\n\n /**\n * Enables ScrollSpy on a collection of elements\n * e.g. $('.scrollSpy').scrollSpy()\n * @param {Object=} options\tOptional.\n \t\t\t\t\t\t\t\t\t\tthrottle : number -> scrollspy throttling. Default: 100 ms\n \t\t\t\t\t\t\t\t\t\toffsetTop : number -> offset from top. Default: 0\n \t\t\t\t\t\t\t\t\t\toffsetRight : number -> offset from right. Default: 0\n \t\t\t\t\t\t\t\t\t\toffsetBottom : number -> offset from bottom. Default: 0\n \t\t\t\t\t\t\t\t\t\toffsetLeft : number -> offset from left. Default: 0\n * @returns {jQuery}\n */\n $.fn.scrollSpy = function (options) {\n return $.scrollSpy($(this), options);\n };\n})(jQuery);\n;(function ($) {\n $(document).ready(function () {\n\n // Function to update labels of text fields\n Materialize.updateTextFields = function () {\n var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea';\n $(input_selector).each(function (index, element) {\n var $this = $(this);\n if ($(element).val().length > 0 || $(element).is(':focus') || element.autofocus || $this.attr('placeholder') !== undefined) {\n $this.siblings('label').addClass('active');\n } else if ($(element)[0].validity) {\n $this.siblings('label').toggleClass('active', $(element)[0].validity.badInput === true);\n } else {\n $this.siblings('label').removeClass('active');\n }\n });\n };\n\n // Text based inputs\n var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea';\n\n // Add active if form auto complete\n $(document).on('change', input_selector, function () {\n if ($(this).val().length !== 0 || $(this).attr('placeholder') !== undefined) {\n $(this).siblings('label').addClass('active');\n }\n validate_field($(this));\n });\n\n // Add active if input element has been pre-populated on document ready\n $(document).ready(function () {\n Materialize.updateTextFields();\n });\n\n // HTML DOM FORM RESET handling\n $(document).on('reset', function (e) {\n var formReset = $(e.target);\n if (formReset.is('form')) {\n formReset.find(input_selector).removeClass('valid').removeClass('invalid');\n formReset.find(input_selector).each(function () {\n if ($(this).attr('value') === '') {\n $(this).siblings('label').removeClass('active');\n }\n });\n\n // Reset select\n formReset.find('select.initialized').each(function () {\n var reset_text = formReset.find('option[selected]').text();\n formReset.siblings('input.select-dropdown').val(reset_text);\n });\n }\n });\n\n // Add active when element has focus\n $(document).on('focus', input_selector, function () {\n $(this).siblings('label, .prefix').addClass('active');\n });\n\n $(document).on('blur', input_selector, function () {\n var $inputElement = $(this);\n var selector = \".prefix\";\n\n if ($inputElement.val().length === 0 && $inputElement[0].validity.badInput !== true && $inputElement.attr('placeholder') === undefined) {\n selector += \", label\";\n }\n\n $inputElement.siblings(selector).removeClass('active');\n\n validate_field($inputElement);\n });\n\n window.validate_field = function (object) {\n var hasLength = object.attr('data-length') !== undefined;\n var lenAttr = parseInt(object.attr('data-length'));\n var len = object.val().length;\n\n if (object.val().length === 0 && object[0].validity.badInput === false && !object.is(':required')) {\n if (object.hasClass('validate')) {\n object.removeClass('valid');\n object.removeClass('invalid');\n }\n } else {\n if (object.hasClass('validate')) {\n // Check for character counter attributes\n if (object.is(':valid') && hasLength && len <= lenAttr || object.is(':valid') && !hasLength) {\n object.removeClass('invalid');\n object.addClass('valid');\n } else {\n object.removeClass('valid');\n object.addClass('invalid');\n }\n }\n }\n };\n\n // Radio and Checkbox focus class\n var radio_checkbox = 'input[type=radio], input[type=checkbox]';\n $(document).on('keyup.radio', radio_checkbox, function (e) {\n // TAB, check if tabbing to radio or checkbox.\n if (e.which === 9) {\n $(this).addClass('tabbed');\n var $this = $(this);\n $this.one('blur', function (e) {\n\n $(this).removeClass('tabbed');\n });\n return;\n }\n });\n\n // Textarea Auto Resize\n var hiddenDiv = $('.hiddendiv').first();\n if (!hiddenDiv.length) {\n hiddenDiv = $('<div class=\"hiddendiv common\"></div>');\n $('body').append(hiddenDiv);\n }\n var text_area_selector = '.materialize-textarea';\n\n function textareaAutoResize($textarea) {\n // Set font properties of hiddenDiv\n\n var fontFamily = $textarea.css('font-family');\n var fontSize = $textarea.css('font-size');\n var lineHeight = $textarea.css('line-height');\n var padding = $textarea.css('padding');\n\n if (fontSize) {\n hiddenDiv.css('font-size', fontSize);\n }\n if (fontFamily) {\n hiddenDiv.css('font-family', fontFamily);\n }\n if (lineHeight) {\n hiddenDiv.css('line-height', lineHeight);\n }\n if (padding) {\n hiddenDiv.css('padding', padding);\n }\n\n // Set original-height, if none\n if (!$textarea.data('original-height')) {\n $textarea.data('original-height', $textarea.height());\n }\n\n if ($textarea.attr('wrap') === 'off') {\n hiddenDiv.css('overflow-wrap', 'normal').css('white-space', 'pre');\n }\n\n hiddenDiv.text($textarea.val() + '\\n');\n var content = hiddenDiv.html().replace(/\\n/g, '<br>');\n hiddenDiv.html(content);\n\n // When textarea is hidden, width goes crazy.\n // Approximate with half of window size\n\n if ($textarea.is(':visible')) {\n hiddenDiv.css('width', $textarea.width());\n } else {\n hiddenDiv.css('width', $(window).width() / 2);\n }\n\n /**\n * Resize if the new height is greater than the\n * original height of the textarea\n */\n if ($textarea.data('original-height') <= hiddenDiv.height()) {\n $textarea.css('height', hiddenDiv.height());\n } else if ($textarea.val().length < $textarea.data('previous-length')) {\n /**\n * In case the new height is less than original height, it\n * means the textarea has less text than before\n * So we set the height to the original one\n */\n $textarea.css('height', $textarea.data('original-height'));\n }\n $textarea.data('previous-length', $textarea.val().length);\n }\n\n $(text_area_selector).each(function () {\n var $textarea = $(this);\n /**\n * Instead of resizing textarea on document load,\n * store the original height and the original length\n */\n $textarea.data('original-height', $textarea.height());\n $textarea.data('previous-length', $textarea.val().length);\n });\n\n $('body').on('keyup keydown autoresize', text_area_selector, function () {\n textareaAutoResize($(this));\n });\n\n // File Input Path\n $(document).on('change', '.file-field input[type=\"file\"]', function () {\n var file_field = $(this).closest('.file-field');\n var path_input = file_field.find('input.file-path');\n var files = $(this)[0].files;\n var file_names = [];\n for (var i = 0; i < files.length; i++) {\n file_names.push(files[i].name);\n }\n path_input.val(file_names.join(\", \"));\n path_input.trigger('change');\n });\n\n /****************\n * Range Input *\n ****************/\n\n var range_type = 'input[type=range]';\n var range_mousedown = false;\n var left;\n\n $(range_type).each(function () {\n var thumb = $('<span class=\"thumb\"><span class=\"value\"></span></span>');\n $(this).after(thumb);\n });\n\n var showRangeBubble = function (thumb) {\n var paddingLeft = parseInt(thumb.parent().css('padding-left'));\n var marginLeft = -7 + paddingLeft + 'px';\n thumb.velocity({ height: \"30px\", width: \"30px\", top: \"-30px\", marginLeft: marginLeft }, { duration: 300, easing: 'easeOutExpo' });\n };\n\n var calcRangeOffset = function (range) {\n var width = range.width() - 15;\n var max = parseFloat(range.attr('max'));\n var min = parseFloat(range.attr('min'));\n var percent = (parseFloat(range.val()) - min) / (max - min);\n return percent * width;\n };\n\n var range_wrapper = '.range-field';\n $(document).on('change', range_type, function (e) {\n var thumb = $(this).siblings('.thumb');\n thumb.find('.value').html($(this).val());\n\n if (!thumb.hasClass('active')) {\n showRangeBubble(thumb);\n }\n\n var offsetLeft = calcRangeOffset($(this));\n thumb.addClass('active').css('left', offsetLeft);\n });\n\n $(document).on('mousedown touchstart', range_type, function (e) {\n var thumb = $(this).siblings('.thumb');\n\n // If thumb indicator does not exist yet, create it\n if (thumb.length <= 0) {\n thumb = $('<span class=\"thumb\"><span class=\"value\"></span></span>');\n $(this).after(thumb);\n }\n\n // Set indicator value\n thumb.find('.value').html($(this).val());\n\n range_mousedown = true;\n $(this).addClass('active');\n\n if (!thumb.hasClass('active')) {\n showRangeBubble(thumb);\n }\n\n if (e.type !== 'input') {\n var offsetLeft = calcRangeOffset($(this));\n thumb.addClass('active').css('left', offsetLeft);\n }\n });\n\n $(document).on('mouseup touchend', range_wrapper, function () {\n range_mousedown = false;\n $(this).removeClass('active');\n });\n\n $(document).on('input mousemove touchmove', range_wrapper, function (e) {\n var thumb = $(this).children('.thumb');\n var left;\n var input = $(this).find(range_type);\n\n if (range_mousedown) {\n if (!thumb.hasClass('active')) {\n showRangeBubble(thumb);\n }\n\n var offsetLeft = calcRangeOffset(input);\n thumb.addClass('active').css('left', offsetLeft);\n thumb.find('.value').html(thumb.siblings(range_type).val());\n }\n });\n\n $(document).on('mouseout touchleave', range_wrapper, function () {\n if (!range_mousedown) {\n\n var thumb = $(this).children('.thumb');\n var paddingLeft = parseInt($(this).css('padding-left'));\n var marginLeft = 7 + paddingLeft + 'px';\n\n if (thumb.hasClass('active')) {\n thumb.velocity({ height: '0', width: '0', top: '10px', marginLeft: marginLeft }, { duration: 100 });\n }\n thumb.removeClass('active');\n }\n });\n\n /**************************\n * Auto complete plugin *\n *************************/\n $.fn.autocomplete = function (options) {\n // Defaults\n var defaults = {\n data: {},\n limit: Infinity,\n onAutocomplete: null,\n minLength: 1\n };\n\n options = $.extend(defaults, options);\n\n return this.each(function () {\n var $input = $(this);\n var data = options.data,\n count = 0,\n activeIndex = -1,\n oldVal,\n $inputDiv = $input.closest('.input-field'); // Div to append on\n\n // Check if data isn't empty\n if (!$.isEmptyObject(data)) {\n var $autocomplete = $('<ul class=\"autocomplete-content dropdown-content\"></ul>');\n var $oldAutocomplete;\n\n // Append autocomplete element.\n // Prevent double structure init.\n if ($inputDiv.length) {\n $oldAutocomplete = $inputDiv.children('.autocomplete-content.dropdown-content').first();\n if (!$oldAutocomplete.length) {\n $inputDiv.append($autocomplete); // Set ul in body\n }\n } else {\n $oldAutocomplete = $input.next('.autocomplete-content.dropdown-content');\n if (!$oldAutocomplete.length) {\n $input.after($autocomplete);\n }\n }\n if ($oldAutocomplete.length) {\n $autocomplete = $oldAutocomplete;\n }\n\n // Highlight partial match.\n var highlight = function (string, $el) {\n var img = $el.find('img');\n var matchStart = $el.text().toLowerCase().indexOf(\"\" + string.toLowerCase() + \"\"),\n matchEnd = matchStart + string.length - 1,\n beforeMatch = $el.text().slice(0, matchStart),\n matchText = $el.text().slice(matchStart, matchEnd + 1),\n afterMatch = $el.text().slice(matchEnd + 1);\n $el.html(\"<span>\" + beforeMatch + \"<span class='highlight'>\" + matchText + \"</span>\" + afterMatch + \"</span>\");\n if (img.length) {\n $el.prepend(img);\n }\n };\n\n // Reset current element position\n var resetCurrentElement = function () {\n activeIndex = -1;\n $autocomplete.find('.active').removeClass('active');\n };\n\n // Remove autocomplete elements\n var removeAutocomplete = function () {\n $autocomplete.empty();\n resetCurrentElement();\n oldVal = undefined;\n };\n\n $input.off('blur.autocomplete').on('blur.autocomplete', function () {\n removeAutocomplete();\n });\n\n // Perform search\n $input.off('keyup.autocomplete focus.autocomplete').on('keyup.autocomplete focus.autocomplete', function (e) {\n // Reset count.\n count = 0;\n var val = $input.val().toLowerCase();\n\n // Don't capture enter or arrow key usage.\n if (e.which === 13 || e.which === 38 || e.which === 40) {\n return;\n }\n\n // Check if the input isn't empty\n if (oldVal !== val) {\n removeAutocomplete();\n\n if (val.length >= options.minLength) {\n for (var key in data) {\n if (data.hasOwnProperty(key) && key.toLowerCase().indexOf(val) !== -1) {\n // Break if past limit\n if (count >= options.limit) {\n break;\n }\n\n var autocompleteOption = $('<li></li>');\n if (!!data[key]) {\n autocompleteOption.append('<img src=\"' + data[key] + '\" class=\"right circle\"><span>' + key + '</span>');\n } else {\n autocompleteOption.append('<span>' + key + '</span>');\n }\n\n $autocomplete.append(autocompleteOption);\n highlight(val, autocompleteOption);\n count++;\n }\n }\n }\n }\n\n // Update oldVal\n oldVal = val;\n });\n\n $input.off('keydown.autocomplete').on('keydown.autocomplete', function (e) {\n // Arrow keys and enter key usage\n var keyCode = e.which,\n liElement,\n numItems = $autocomplete.children('li').length,\n $active = $autocomplete.children('.active').first();\n\n // select element on Enter\n if (keyCode === 13 && activeIndex >= 0) {\n liElement = $autocomplete.children('li').eq(activeIndex);\n if (liElement.length) {\n liElement.trigger('mousedown.autocomplete');\n e.preventDefault();\n }\n return;\n }\n\n // Capture up and down key\n if (keyCode === 38 || keyCode === 40) {\n e.preventDefault();\n\n if (keyCode === 38 && activeIndex > 0) {\n activeIndex--;\n }\n\n if (keyCode === 40 && activeIndex < numItems - 1) {\n activeIndex++;\n }\n\n $active.removeClass('active');\n if (activeIndex >= 0) {\n $autocomplete.children('li').eq(activeIndex).addClass('active');\n }\n }\n });\n\n // Set input value\n $autocomplete.off('mousedown.autocomplete touchstart.autocomplete').on('mousedown.autocomplete touchstart.autocomplete', 'li', function () {\n var text = $(this).text().trim();\n $input.val(text);\n $input.trigger('change');\n removeAutocomplete();\n\n // Handle onAutocomplete callback.\n if (typeof options.onAutocomplete === \"function\") {\n options.onAutocomplete.call(this, text);\n }\n });\n\n // Empty data\n } else {\n $input.off('keyup.autocomplete focus.autocomplete');\n }\n });\n };\n }); // End of $(document).ready\n\n /*******************\n * Select Plugin *\n ******************/\n $.fn.material_select = function (callback) {\n $(this).each(function () {\n var $select = $(this);\n\n if ($select.hasClass('browser-default')) {\n return; // Continue to next (return false breaks out of entire loop)\n }\n\n var multiple = $select.attr('multiple') ? true : false,\n lastID = $select.attr('data-select-id'); // Tear down structure if Select needs to be rebuilt\n\n if (lastID) {\n $select.parent().find('span.caret').remove();\n $select.parent().find('input').remove();\n\n $select.unwrap();\n $('ul#select-options-' + lastID).remove();\n }\n\n // If destroying the select, remove the selelct-id and reset it to it's uninitialized state.\n if (callback === 'destroy') {\n $select.removeAttr('data-select-id').removeClass('initialized');\n $(window).off('click.select');\n return;\n }\n\n var uniqueID = Materialize.guid();\n $select.attr('data-select-id', uniqueID);\n var wrapper = $('<div class=\"select-wrapper\"></div>');\n wrapper.addClass($select.attr('class'));\n if ($select.is(':disabled')) wrapper.addClass('disabled');\n var options = $('<ul id=\"select-options-' + uniqueID + '\" class=\"dropdown-content select-dropdown ' + (multiple ? 'multiple-select-dropdown' : '') + '\"></ul>'),\n selectChildren = $select.children('option, optgroup'),\n valuesSelected = [],\n optionsHover = false;\n\n var label = $select.find('option:selected').html() || $select.find('option:first').html() || \"\";\n\n // Function that renders and appends the option taking into\n // account type and possible image icon.\n var appendOptionWithIcon = function (select, option, type) {\n // Add disabled attr if disabled\n var disabledClass = option.is(':disabled') ? 'disabled ' : '';\n var optgroupClass = type === 'optgroup-option' ? 'optgroup-option ' : '';\n var multipleCheckbox = multiple ? '<input type=\"checkbox\"' + disabledClass + '/><label></label>' : '';\n\n // add icons\n var icon_url = option.data('icon');\n var classes = option.attr('class');\n if (!!icon_url) {\n var classString = '';\n if (!!classes) classString = ' class=\"' + classes + '\"';\n\n // Check for multiple type.\n options.append($('<li class=\"' + disabledClass + optgroupClass + '\"><img alt=\"\" src=\"' + icon_url + '\"' + classString + '><span>' + multipleCheckbox + option.html() + '</span></li>'));\n return true;\n }\n\n // Check for multiple type.\n options.append($('<li class=\"' + disabledClass + optgroupClass + '\"><span>' + multipleCheckbox + option.html() + '</span></li>'));\n };\n\n /* Create dropdown structure. */\n if (selectChildren.length) {\n selectChildren.each(function () {\n if ($(this).is('option')) {\n // Direct descendant option.\n if (multiple) {\n appendOptionWithIcon($select, $(this), 'multiple');\n } else {\n appendOptionWithIcon($select, $(this));\n }\n } else if ($(this).is('optgroup')) {\n // Optgroup.\n var selectOptions = $(this).children('option');\n options.append($('<li class=\"optgroup\"><span>' + $(this).attr('label') + '</span></li>'));\n\n selectOptions.each(function () {\n appendOptionWithIcon($select, $(this), 'optgroup-option');\n });\n }\n });\n }\n\n options.find('li:not(.optgroup)').each(function (i) {\n $(this).click(function (e) {\n // Check if option element is disabled\n if (!$(this).hasClass('disabled') && !$(this).hasClass('optgroup')) {\n var selected = true;\n\n if (multiple) {\n $('input[type=\"checkbox\"]', this).prop('checked', function (i, v) {\n return !v;\n });\n selected = toggleEntryFromArray(valuesSelected, i, $select);\n $newSelect.trigger('focus');\n } else {\n options.find('li').removeClass('active');\n $(this).toggleClass('active');\n $newSelect.val($(this).text());\n }\n\n activateOption(options, $(this));\n $select.find('option').eq(i).prop('selected', selected);\n // Trigger onchange() event\n $select.trigger('change');\n if (typeof callback !== 'undefined') callback();\n }\n\n e.stopPropagation();\n });\n });\n\n // Wrap Elements\n $select.wrap(wrapper);\n // Add Select Display Element\n var dropdownIcon = $('<span class=\"caret\">&#9660;</span>');\n\n // escape double quotes\n var sanitizedLabelHtml = label.replace(/\"/g, '&quot;');\n\n var $newSelect = $('<input type=\"text\" class=\"select-dropdown\" readonly=\"true\" ' + ($select.is(':disabled') ? 'disabled' : '') + ' data-activates=\"select-options-' + uniqueID + '\" value=\"' + sanitizedLabelHtml + '\"/>');\n $select.before($newSelect);\n $newSelect.before(dropdownIcon);\n\n $newSelect.after(options);\n // Check if section element is disabled\n if (!$select.is(':disabled')) {\n $newSelect.dropdown({ 'hover': false });\n }\n\n // Copy tabindex\n if ($select.attr('tabindex')) {\n $($newSelect[0]).attr('tabindex', $select.attr('tabindex'));\n }\n\n $select.addClass('initialized');\n\n $newSelect.on({\n 'focus': function () {\n if ($('ul.select-dropdown').not(options[0]).is(':visible')) {\n $('input.select-dropdown').trigger('close');\n $(window).off('click.select');\n }\n if (!options.is(':visible')) {\n $(this).trigger('open', ['focus']);\n var label = $(this).val();\n if (multiple && label.indexOf(',') >= 0) {\n label = label.split(',')[0];\n }\n\n var selectedOption = options.find('li').filter(function () {\n return $(this).text().toLowerCase() === label.toLowerCase();\n })[0];\n activateOption(options, selectedOption, true);\n\n $(window).off('click.select').on('click.select', function () {\n multiple && (optionsHover || $newSelect.trigger('close'));\n $(window).off('click.select');\n });\n }\n },\n 'click': function (e) {\n e.stopPropagation();\n }\n });\n\n $newSelect.on('blur', function () {\n if (!multiple) {\n $(this).trigger('close');\n $(window).off('click.select');\n }\n options.find('li.selected').removeClass('selected');\n });\n\n options.hover(function () {\n optionsHover = true;\n }, function () {\n optionsHover = false;\n });\n\n // Add initial multiple selections.\n if (multiple) {\n $select.find(\"option:selected:not(:disabled)\").each(function () {\n var index = $(this).index();\n\n toggleEntryFromArray(valuesSelected, index, $select);\n options.find(\"li\").eq(index).find(\":checkbox\").prop(\"checked\", true);\n });\n }\n\n /**\n * Make option as selected and scroll to selected position\n * @param {jQuery} collection Select options jQuery element\n * @param {Element} newOption element of the new option\n * @param {Boolean} firstActivation If on first activation of select\n */\n var activateOption = function (collection, newOption, firstActivation) {\n if (newOption) {\n collection.find('li.selected').removeClass('selected');\n var option = $(newOption);\n option.addClass('selected');\n if (!multiple || !!firstActivation) {\n options.scrollTo(option);\n }\n }\n };\n\n // Allow user to search by typing\n // this array is cleared after 1 second\n var filterQuery = [],\n onKeyDown = function (e) {\n // TAB - switch to another input\n if (e.which == 9) {\n $newSelect.trigger('close');\n return;\n }\n\n // ARROW DOWN WHEN SELECT IS CLOSED - open select options\n if (e.which == 40 && !options.is(':visible')) {\n $newSelect.trigger('open');\n return;\n }\n\n // ENTER WHEN SELECT IS CLOSED - submit form\n if (e.which == 13 && !options.is(':visible')) {\n return;\n }\n\n e.preventDefault();\n\n // CASE WHEN USER TYPE LETTERS\n var letter = String.fromCharCode(e.which).toLowerCase(),\n nonLetters = [9, 13, 27, 38, 40];\n if (letter && nonLetters.indexOf(e.which) === -1) {\n filterQuery.push(letter);\n\n var string = filterQuery.join(''),\n newOption = options.find('li').filter(function () {\n return $(this).text().toLowerCase().indexOf(string) === 0;\n })[0];\n\n if (newOption) {\n activateOption(options, newOption);\n }\n }\n\n // ENTER - select option and close when select options are opened\n if (e.which == 13) {\n var activeOption = options.find('li.selected:not(.disabled)')[0];\n if (activeOption) {\n $(activeOption).trigger('click');\n if (!multiple) {\n $newSelect.trigger('close');\n }\n }\n }\n\n // ARROW DOWN - move to next not disabled option\n if (e.which == 40) {\n if (options.find('li.selected').length) {\n newOption = options.find('li.selected').next('li:not(.disabled)')[0];\n } else {\n newOption = options.find('li:not(.disabled)')[0];\n }\n activateOption(options, newOption);\n }\n\n // ESC - close options\n if (e.which == 27) {\n $newSelect.trigger('close');\n }\n\n // ARROW UP - move to previous not disabled option\n if (e.which == 38) {\n newOption = options.find('li.selected').prev('li:not(.disabled)')[0];\n if (newOption) activateOption(options, newOption);\n }\n\n // Automaticaly clean filter query so user can search again by starting letters\n setTimeout(function () {\n filterQuery = [];\n }, 1000);\n };\n\n $newSelect.on('keydown', onKeyDown);\n });\n\n function toggleEntryFromArray(entriesArray, entryIndex, select) {\n var index = entriesArray.indexOf(entryIndex),\n notAdded = index === -1;\n\n if (notAdded) {\n entriesArray.push(entryIndex);\n } else {\n entriesArray.splice(index, 1);\n }\n\n select.siblings('ul.dropdown-content').find('li:not(.optgroup)').eq(entryIndex).toggleClass('active');\n\n // use notAdded instead of true (to detect if the option is selected or not)\n select.find('option').eq(entryIndex).prop('selected', notAdded);\n setValueToInput(entriesArray, select);\n\n return notAdded;\n }\n\n function setValueToInput(entriesArray, select) {\n var value = '';\n\n for (var i = 0, count = entriesArray.length; i < count; i++) {\n var text = select.find('option').eq(entriesArray[i]).text();\n\n i === 0 ? value += text : value += ', ' + text;\n }\n\n if (value === '') {\n value = select.find('option:disabled').eq(0).text();\n }\n\n select.siblings('input.select-dropdown').val(value);\n }\n };\n})(jQuery);\n;(function ($) {\n\n var methods = {\n\n init: function (options) {\n var defaults = {\n indicators: true,\n height: 400,\n transition: 500,\n interval: 6000\n };\n options = $.extend(defaults, options);\n\n return this.each(function () {\n\n // For each slider, we want to keep track of\n // which slide is active and its associated content\n var $this = $(this);\n var $slider = $this.find('ul.slides').first();\n var $slides = $slider.find('> li');\n var $active_index = $slider.find('.active').index();\n var $active, $indicators, $interval;\n if ($active_index != -1) {\n $active = $slides.eq($active_index);\n }\n\n // Transitions the caption depending on alignment\n function captionTransition(caption, duration) {\n if (caption.hasClass(\"center-align\")) {\n caption.velocity({ opacity: 0, translateY: -100 }, { duration: duration, queue: false });\n } else if (caption.hasClass(\"right-align\")) {\n caption.velocity({ opacity: 0, translateX: 100 }, { duration: duration, queue: false });\n } else if (caption.hasClass(\"left-align\")) {\n caption.velocity({ opacity: 0, translateX: -100 }, { duration: duration, queue: false });\n }\n }\n\n // This function will transition the slide to any index of the next slide\n function moveToSlide(index) {\n // Wrap around indices.\n if (index >= $slides.length) index = 0;else if (index < 0) index = $slides.length - 1;\n\n $active_index = $slider.find('.active').index();\n\n // Only do if index changes\n if ($active_index != index) {\n $active = $slides.eq($active_index);\n $caption = $active.find('.caption');\n\n $active.removeClass('active');\n $active.velocity({ opacity: 0 }, { duration: options.transition, queue: false, easing: 'easeOutQuad',\n complete: function () {\n $slides.not('.active').velocity({ opacity: 0, translateX: 0, translateY: 0 }, { duration: 0, queue: false });\n } });\n captionTransition($caption, options.transition);\n\n // Update indicators\n if (options.indicators) {\n $indicators.eq($active_index).removeClass('active');\n }\n\n $slides.eq(index).velocity({ opacity: 1 }, { duration: options.transition, queue: false, easing: 'easeOutQuad' });\n $slides.eq(index).find('.caption').velocity({ opacity: 1, translateX: 0, translateY: 0 }, { duration: options.transition, delay: options.transition, queue: false, easing: 'easeOutQuad' });\n $slides.eq(index).addClass('active');\n\n // Update indicators\n if (options.indicators) {\n $indicators.eq(index).addClass('active');\n }\n }\n }\n\n // Set height of slider\n // If fullscreen, do nothing\n if (!$this.hasClass('fullscreen')) {\n if (options.indicators) {\n // Add height if indicators are present\n $this.height(options.height + 40);\n } else {\n $this.height(options.height);\n }\n $slider.height(options.height);\n }\n\n // Set initial positions of captions\n $slides.find('.caption').each(function () {\n captionTransition($(this), 0);\n });\n\n // Move img src into background-image\n $slides.find('img').each(function () {\n var placeholderBase64 = 'data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n if ($(this).attr('src') !== placeholderBase64) {\n $(this).css('background-image', 'url(\"' + $(this).attr('src') + '\")');\n $(this).attr('src', placeholderBase64);\n }\n });\n\n // dynamically add indicators\n if (options.indicators) {\n $indicators = $('<ul class=\"indicators\"></ul>');\n $slides.each(function (index) {\n var $indicator = $('<li class=\"indicator-item\"></li>');\n\n // Handle clicks on indicators\n $indicator.click(function () {\n var $parent = $slider.parent();\n var curr_index = $parent.find($(this)).index();\n moveToSlide(curr_index);\n\n // reset interval\n clearInterval($interval);\n $interval = setInterval(function () {\n $active_index = $slider.find('.active').index();\n if ($slides.length == $active_index + 1) $active_index = 0; // loop to start\n else $active_index += 1;\n\n moveToSlide($active_index);\n }, options.transition + options.interval);\n });\n $indicators.append($indicator);\n });\n $this.append($indicators);\n $indicators = $this.find('ul.indicators').find('li.indicator-item');\n }\n\n if ($active) {\n $active.show();\n } else {\n $slides.first().addClass('active').velocity({ opacity: 1 }, { duration: options.transition, queue: false, easing: 'easeOutQuad' });\n\n $active_index = 0;\n $active = $slides.eq($active_index);\n\n // Update indicators\n if (options.indicators) {\n $indicators.eq($active_index).addClass('active');\n }\n }\n\n // Adjust height to current slide\n $active.find('img').each(function () {\n $active.find('.caption').velocity({ opacity: 1, translateX: 0, translateY: 0 }, { duration: options.transition, queue: false, easing: 'easeOutQuad' });\n });\n\n // auto scroll\n $interval = setInterval(function () {\n $active_index = $slider.find('.active').index();\n moveToSlide($active_index + 1);\n }, options.transition + options.interval);\n\n // HammerJS, Swipe navigation\n\n // Touch Event\n var panning = false;\n var swipeLeft = false;\n var swipeRight = false;\n\n $this.hammer({\n prevent_default: false\n }).on('pan', function (e) {\n if (e.gesture.pointerType === \"touch\") {\n\n // reset interval\n clearInterval($interval);\n\n var direction = e.gesture.direction;\n var x = e.gesture.deltaX;\n var velocityX = e.gesture.velocityX;\n var velocityY = e.gesture.velocityY;\n\n $curr_slide = $slider.find('.active');\n if (Math.abs(velocityX) > Math.abs(velocityY)) {\n $curr_slide.velocity({ translateX: x\n }, { duration: 50, queue: false, easing: 'easeOutQuad' });\n }\n\n // Swipe Left\n if (direction === 4 && (x > $this.innerWidth() / 2 || velocityX < -0.65)) {\n swipeRight = true;\n }\n // Swipe Right\n else if (direction === 2 && (x < -1 * $this.innerWidth() / 2 || velocityX > 0.65)) {\n swipeLeft = true;\n }\n\n // Make Slide Behind active slide visible\n var next_slide;\n if (swipeLeft) {\n next_slide = $curr_slide.next();\n if (next_slide.length === 0) {\n next_slide = $slides.first();\n }\n next_slide.velocity({ opacity: 1\n }, { duration: 300, queue: false, easing: 'easeOutQuad' });\n }\n if (swipeRight) {\n next_slide = $curr_slide.prev();\n if (next_slide.length === 0) {\n next_slide = $slides.last();\n }\n next_slide.velocity({ opacity: 1\n }, { duration: 300, queue: false, easing: 'easeOutQuad' });\n }\n }\n }).on('panend', function (e) {\n if (e.gesture.pointerType === \"touch\") {\n\n $curr_slide = $slider.find('.active');\n panning = false;\n curr_index = $slider.find('.active').index();\n\n if (!swipeRight && !swipeLeft || $slides.length <= 1) {\n // Return to original spot\n $curr_slide.velocity({ translateX: 0\n }, { duration: 300, queue: false, easing: 'easeOutQuad' });\n } else if (swipeLeft) {\n moveToSlide(curr_index + 1);\n $curr_slide.velocity({ translateX: -1 * $this.innerWidth() }, { duration: 300, queue: false, easing: 'easeOutQuad',\n complete: function () {\n $curr_slide.velocity({ opacity: 0, translateX: 0 }, { duration: 0, queue: false });\n } });\n } else if (swipeRight) {\n moveToSlide(curr_index - 1);\n $curr_slide.velocity({ translateX: $this.innerWidth() }, { duration: 300, queue: false, easing: 'easeOutQuad',\n complete: function () {\n $curr_slide.velocity({ opacity: 0, translateX: 0 }, { duration: 0, queue: false });\n } });\n }\n swipeLeft = false;\n swipeRight = false;\n\n // Restart interval\n clearInterval($interval);\n $interval = setInterval(function () {\n $active_index = $slider.find('.active').index();\n if ($slides.length == $active_index + 1) $active_index = 0; // loop to start\n else $active_index += 1;\n\n moveToSlide($active_index);\n }, options.transition + options.interval);\n }\n });\n\n $this.on('sliderPause', function () {\n clearInterval($interval);\n });\n\n $this.on('sliderStart', function () {\n clearInterval($interval);\n $interval = setInterval(function () {\n $active_index = $slider.find('.active').index();\n if ($slides.length == $active_index + 1) $active_index = 0; // loop to start\n else $active_index += 1;\n\n moveToSlide($active_index);\n }, options.transition + options.interval);\n });\n\n $this.on('sliderNext', function () {\n $active_index = $slider.find('.active').index();\n moveToSlide($active_index + 1);\n });\n\n $this.on('sliderPrev', function () {\n $active_index = $slider.find('.active').index();\n moveToSlide($active_index - 1);\n });\n });\n },\n pause: function () {\n $(this).trigger('sliderPause');\n },\n start: function () {\n $(this).trigger('sliderStart');\n },\n next: function () {\n $(this).trigger('sliderNext');\n },\n prev: function () {\n $(this).trigger('sliderPrev');\n }\n };\n\n $.fn.slider = function (methodOrOptions) {\n if (methods[methodOrOptions]) {\n return methods[methodOrOptions].apply(this, Array.prototype.slice.call(arguments, 1));\n } else if (typeof methodOrOptions === 'object' || !methodOrOptions) {\n // Default to \"init\"\n return methods.init.apply(this, arguments);\n } else {\n $.error('Method ' + methodOrOptions + ' does not exist on jQuery.tooltip');\n }\n }; // Plugin end\n})(jQuery);\n;(function ($) {\n $(document).ready(function () {\n\n $(document).on('click.card', '.card', function (e) {\n if ($(this).find('> .card-reveal').length) {\n var $card = $(e.target).closest('.card');\n if ($card.data('initialOverflow') === undefined) {\n $card.data('initialOverflow', $card.css('overflow') === undefined ? '' : $card.css('overflow'));\n }\n if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {\n // Make Reveal animate down and display none\n $(this).find('.card-reveal').velocity({ translateY: 0 }, {\n duration: 225,\n queue: false,\n easing: 'easeInOutQuad',\n complete: function () {\n $(this).css({ display: 'none' });\n $card.css('overflow', $card.data('initialOverflow'));\n }\n });\n } else if ($(e.target).is($('.card .activator')) || $(e.target).is($('.card .activator i'))) {\n $card.css('overflow', 'hidden');\n $(this).find('.card-reveal').css({ display: 'block' }).velocity(\"stop\", false).velocity({ translateY: '-100%' }, { duration: 300, queue: false, easing: 'easeInOutQuad' });\n }\n }\n });\n });\n})(jQuery);\n;(function ($) {\n var materialChipsDefaults = {\n data: [],\n placeholder: '',\n secondaryPlaceholder: '',\n autocompleteOptions: {}\n };\n\n $(document).ready(function () {\n // Handle removal of static chips.\n $(document).on('click', '.chip .close', function (e) {\n var $chips = $(this).closest('.chips');\n if ($chips.attr('data-initialized')) {\n return;\n }\n $(this).closest('.chip').remove();\n });\n });\n\n $.fn.material_chip = function (options) {\n var self = this;\n this.$el = $(this);\n this.$document = $(document);\n this.SELS = {\n CHIPS: '.chips',\n CHIP: '.chip',\n INPUT: 'input',\n DELETE: '.material-icons',\n SELECTED_CHIP: '.selected'\n };\n\n if ('data' === options) {\n return this.$el.data('chips');\n }\n\n var curr_options = $.extend({}, materialChipsDefaults, options);\n self.hasAutocomplete = !$.isEmptyObject(curr_options.autocompleteOptions.data);\n\n // Initialize\n this.init = function () {\n var i = 0;\n var chips;\n self.$el.each(function () {\n var $chips = $(this);\n var chipId = Materialize.guid();\n self.chipId = chipId;\n\n if (!curr_options.data || !(curr_options.data instanceof Array)) {\n curr_options.data = [];\n }\n $chips.data('chips', curr_options.data);\n $chips.attr('data-index', i);\n $chips.attr('data-initialized', true);\n\n if (!$chips.hasClass(self.SELS.CHIPS)) {\n $chips.addClass('chips');\n }\n\n self.chips($chips, chipId);\n i++;\n });\n };\n\n this.handleEvents = function () {\n var SELS = self.SELS;\n\n self.$document.off('click.chips-focus', SELS.CHIPS).on('click.chips-focus', SELS.CHIPS, function (e) {\n $(e.target).find(SELS.INPUT).focus();\n });\n\n self.$document.off('click.chips-select', SELS.CHIP).on('click.chips-select', SELS.CHIP, function (e) {\n var $chip = $(e.target);\n if ($chip.length) {\n var wasSelected = $chip.hasClass('selected');\n var $chips = $chip.closest(SELS.CHIPS);\n $(SELS.CHIP).removeClass('selected');\n\n if (!wasSelected) {\n self.selectChip($chip.index(), $chips);\n }\n }\n });\n\n self.$document.off('keydown.chips').on('keydown.chips', function (e) {\n if ($(e.target).is('input, textarea')) {\n return;\n }\n\n // delete\n var $chip = self.$document.find(SELS.CHIP + SELS.SELECTED_CHIP);\n var $chips = $chip.closest(SELS.CHIPS);\n var length = $chip.siblings(SELS.CHIP).length;\n var index;\n\n if (!$chip.length) {\n return;\n }\n\n if (e.which === 8 || e.which === 46) {\n e.preventDefault();\n\n index = $chip.index();\n self.deleteChip(index, $chips);\n\n var selectIndex = null;\n if (index + 1 < length) {\n selectIndex = index;\n } else if (index === length || index + 1 === length) {\n selectIndex = length - 1;\n }\n\n if (selectIndex < 0) selectIndex = null;\n\n if (null !== selectIndex) {\n self.selectChip(selectIndex, $chips);\n }\n if (!length) $chips.find('input').focus();\n\n // left\n } else if (e.which === 37) {\n index = $chip.index() - 1;\n if (index < 0) {\n return;\n }\n $(SELS.CHIP).removeClass('selected');\n self.selectChip(index, $chips);\n\n // right\n } else if (e.which === 39) {\n index = $chip.index() + 1;\n $(SELS.CHIP).removeClass('selected');\n if (index > length) {\n $chips.find('input').focus();\n return;\n }\n self.selectChip(index, $chips);\n }\n });\n\n self.$document.off('focusin.chips', SELS.CHIPS + ' ' + SELS.INPUT).on('focusin.chips', SELS.CHIPS + ' ' + SELS.INPUT, function (e) {\n var $currChips = $(e.target).closest(SELS.CHIPS);\n $currChips.addClass('focus');\n $currChips.siblings('label, .prefix').addClass('active');\n $(SELS.CHIP).removeClass('selected');\n });\n\n self.$document.off('focusout.chips', SELS.CHIPS + ' ' + SELS.INPUT).on('focusout.chips', SELS.CHIPS + ' ' + SELS.INPUT, function (e) {\n var $currChips = $(e.target).closest(SELS.CHIPS);\n $currChips.removeClass('focus');\n\n // Remove active if empty\n if ($currChips.data('chips') === undefined || !$currChips.data('chips').length) {\n $currChips.siblings('label').removeClass('active');\n }\n $currChips.siblings('.prefix').removeClass('active');\n });\n\n self.$document.off('keydown.chips-add', SELS.CHIPS + ' ' + SELS.INPUT).on('keydown.chips-add', SELS.CHIPS + ' ' + SELS.INPUT, function (e) {\n var $target = $(e.target);\n var $chips = $target.closest(SELS.CHIPS);\n var chipsLength = $chips.children(SELS.CHIP).length;\n\n // enter\n if (13 === e.which) {\n // Override enter if autocompleting.\n if (self.hasAutocomplete && $chips.find('.autocomplete-content.dropdown-content').length && $chips.find('.autocomplete-content.dropdown-content').children().length) {\n return;\n }\n\n e.preventDefault();\n self.addChip({ tag: $target.val() }, $chips);\n $target.val('');\n return;\n }\n\n // delete or left\n if ((8 === e.keyCode || 37 === e.keyCode) && '' === $target.val() && chipsLength) {\n e.preventDefault();\n self.selectChip(chipsLength - 1, $chips);\n $target.blur();\n return;\n }\n });\n\n // Click on delete icon in chip.\n self.$document.off('click.chips-delete', SELS.CHIPS + ' ' + SELS.DELETE).on('click.chips-delete', SELS.CHIPS + ' ' + SELS.DELETE, function (e) {\n var $target = $(e.target);\n var $chips = $target.closest(SELS.CHIPS);\n var $chip = $target.closest(SELS.CHIP);\n e.stopPropagation();\n self.deleteChip($chip.index(), $chips);\n $chips.find('input').focus();\n });\n };\n\n this.chips = function ($chips, chipId) {\n $chips.empty();\n $chips.data('chips').forEach(function (elem) {\n $chips.append(self.renderChip(elem));\n });\n $chips.append($('<input id=\"' + chipId + '\" class=\"input\" placeholder=\"\">'));\n self.setPlaceholder($chips);\n\n // Set for attribute for label\n var label = $chips.next('label');\n if (label.length) {\n label.attr('for', chipId);\n\n if ($chips.data('chips') !== undefined && $chips.data('chips').length) {\n label.addClass('active');\n }\n }\n\n // Setup autocomplete if needed.\n var input = $('#' + chipId);\n if (self.hasAutocomplete) {\n curr_options.autocompleteOptions.onAutocomplete = function (val) {\n self.addChip({ tag: val }, $chips);\n input.val('');\n input.focus();\n };\n input.autocomplete(curr_options.autocompleteOptions);\n }\n };\n\n /**\n * Render chip jQuery element.\n * @param {Object} elem\n * @return {jQuery}\n */\n this.renderChip = function (elem) {\n if (!elem.tag) return;\n\n var $renderedChip = $('<div class=\"chip\"></div>');\n $renderedChip.text(elem.tag);\n if (elem.image) {\n $renderedChip.prepend($('<img />').attr('src', elem.image));\n }\n $renderedChip.append($('<i class=\"material-icons close\">close</i>'));\n return $renderedChip;\n };\n\n this.setPlaceholder = function ($chips) {\n if ($chips.data('chips') !== undefined && !$chips.data('chips').length && curr_options.placeholder) {\n $chips.find('input').prop('placeholder', curr_options.placeholder);\n } else if (($chips.data('chips') === undefined || !!$chips.data('chips').length) && curr_options.secondaryPlaceholder) {\n $chips.find('input').prop('placeholder', curr_options.secondaryPlaceholder);\n }\n };\n\n this.isValid = function ($chips, elem) {\n var chips = $chips.data('chips');\n var exists = false;\n for (var i = 0; i < chips.length; i++) {\n if (chips[i].tag === elem.tag) {\n exists = true;\n return;\n }\n }\n return '' !== elem.tag && !exists;\n };\n\n this.addChip = function (elem, $chips) {\n if (!self.isValid($chips, elem)) {\n return;\n }\n var $renderedChip = self.renderChip(elem);\n var newData = [];\n var oldData = $chips.data('chips');\n for (var i = 0; i < oldData.length; i++) {\n newData.push(oldData[i]);\n }\n newData.push(elem);\n\n $chips.data('chips', newData);\n $renderedChip.insertBefore($chips.find('input'));\n $chips.trigger('chip.add', elem);\n self.setPlaceholder($chips);\n };\n\n this.deleteChip = function (chipIndex, $chips) {\n var chip = $chips.data('chips')[chipIndex];\n $chips.find('.chip').eq(chipIndex).remove();\n\n var newData = [];\n var oldData = $chips.data('chips');\n for (var i = 0; i < oldData.length; i++) {\n if (i !== chipIndex) {\n newData.push(oldData[i]);\n }\n }\n\n $chips.data('chips', newData);\n $chips.trigger('chip.delete', chip);\n self.setPlaceholder($chips);\n };\n\n this.selectChip = function (chipIndex, $chips) {\n var $chip = $chips.find('.chip').eq(chipIndex);\n if ($chip && false === $chip.hasClass('selected')) {\n $chip.addClass('selected');\n $chips.trigger('chip.select', $chips.data('chips')[chipIndex]);\n }\n };\n\n this.getChipsElement = function (index, $chips) {\n return $chips.eq(index);\n };\n\n // init\n this.init();\n\n this.handleEvents();\n };\n})(jQuery);\n;(function ($) {\n $.fn.pushpin = function (options) {\n // Defaults\n var defaults = {\n top: 0,\n bottom: Infinity,\n offset: 0\n };\n\n // Remove pushpin event and classes\n if (options === \"remove\") {\n this.each(function () {\n if (id = $(this).data('pushpin-id')) {\n $(window).off('scroll.' + id);\n $(this).removeData('pushpin-id').removeClass('pin-top pinned pin-bottom').removeAttr('style');\n }\n });\n return false;\n }\n\n options = $.extend(defaults, options);\n\n $index = 0;\n return this.each(function () {\n var $uniqueId = Materialize.guid(),\n $this = $(this),\n $original_offset = $(this).offset().top;\n\n function removePinClasses(object) {\n object.removeClass('pin-top');\n object.removeClass('pinned');\n object.removeClass('pin-bottom');\n }\n\n function updateElements(objects, scrolled) {\n objects.each(function () {\n // Add position fixed (because its between top and bottom)\n if (options.top <= scrolled && options.bottom >= scrolled && !$(this).hasClass('pinned')) {\n removePinClasses($(this));\n $(this).css('top', options.offset);\n $(this).addClass('pinned');\n }\n\n // Add pin-top (when scrolled position is above top)\n if (scrolled < options.top && !$(this).hasClass('pin-top')) {\n removePinClasses($(this));\n $(this).css('top', 0);\n $(this).addClass('pin-top');\n }\n\n // Add pin-bottom (when scrolled position is below bottom)\n if (scrolled > options.bottom && !$(this).hasClass('pin-bottom')) {\n removePinClasses($(this));\n $(this).addClass('pin-bottom');\n $(this).css('top', options.bottom - $original_offset);\n }\n });\n }\n\n $(this).data('pushpin-id', $uniqueId);\n updateElements($this, $(window).scrollTop());\n $(window).on('scroll.' + $uniqueId, function () {\n var $scrolled = $(window).scrollTop() + options.offset;\n updateElements($this, $scrolled);\n });\n });\n };\n})(jQuery);;(function ($) {\n $(document).ready(function () {\n\n // jQuery reverse\n $.fn.reverse = [].reverse;\n\n // Hover behaviour: make sure this doesn't work on .click-to-toggle FABs!\n $(document).on('mouseenter.fixedActionBtn', '.fixed-action-btn:not(.click-to-toggle):not(.toolbar)', function (e) {\n var $this = $(this);\n openFABMenu($this);\n });\n $(document).on('mouseleave.fixedActionBtn', '.fixed-action-btn:not(.click-to-toggle):not(.toolbar)', function (e) {\n var $this = $(this);\n closeFABMenu($this);\n });\n\n // Toggle-on-click behaviour.\n $(document).on('click.fabClickToggle', '.fixed-action-btn.click-to-toggle > a', function (e) {\n var $this = $(this);\n var $menu = $this.parent();\n if ($menu.hasClass('active')) {\n closeFABMenu($menu);\n } else {\n openFABMenu($menu);\n }\n });\n\n // Toolbar transition behaviour.\n $(document).on('click.fabToolbar', '.fixed-action-btn.toolbar > a', function (e) {\n var $this = $(this);\n var $menu = $this.parent();\n FABtoToolbar($menu);\n });\n });\n\n $.fn.extend({\n openFAB: function () {\n openFABMenu($(this));\n },\n closeFAB: function () {\n closeFABMenu($(this));\n },\n openToolbar: function () {\n FABtoToolbar($(this));\n },\n closeToolbar: function () {\n toolbarToFAB($(this));\n }\n });\n\n var openFABMenu = function (btn) {\n var $this = btn;\n if ($this.hasClass('active') === false) {\n\n // Get direction option\n var horizontal = $this.hasClass('horizontal');\n var offsetY, offsetX;\n\n if (horizontal === true) {\n offsetX = 40;\n } else {\n offsetY = 40;\n }\n\n $this.addClass('active');\n $this.find('ul .btn-floating').velocity({ scaleY: \".4\", scaleX: \".4\", translateY: offsetY + 'px', translateX: offsetX + 'px' }, { duration: 0 });\n\n var time = 0;\n $this.find('ul .btn-floating').reverse().each(function () {\n $(this).velocity({ opacity: \"1\", scaleX: \"1\", scaleY: \"1\", translateY: \"0\", translateX: '0' }, { duration: 80, delay: time });\n time += 40;\n });\n }\n };\n\n var closeFABMenu = function (btn) {\n var $this = btn;\n // Get direction option\n var horizontal = $this.hasClass('horizontal');\n var offsetY, offsetX;\n\n if (horizontal === true) {\n offsetX = 40;\n } else {\n offsetY = 40;\n }\n\n $this.removeClass('active');\n var time = 0;\n $this.find('ul .btn-floating').velocity(\"stop\", true);\n $this.find('ul .btn-floating').velocity({ opacity: \"0\", scaleX: \".4\", scaleY: \".4\", translateY: offsetY + 'px', translateX: offsetX + 'px' }, { duration: 80 });\n };\n\n /**\n * Transform FAB into toolbar\n * @param {Object} object jQuery object\n */\n var FABtoToolbar = function (btn) {\n if (btn.attr('data-open') === \"true\") {\n return;\n }\n\n var offsetX, offsetY, scaleFactor;\n var windowWidth = window.innerWidth;\n var windowHeight = window.innerHeight;\n var btnRect = btn[0].getBoundingClientRect();\n var anchor = btn.find('> a').first();\n var menu = btn.find('> ul').first();\n var backdrop = $('<div class=\"fab-backdrop\"></div>');\n var fabColor = anchor.css('background-color');\n anchor.append(backdrop);\n\n offsetX = btnRect.left - windowWidth / 2 + btnRect.width / 2;\n offsetY = windowHeight - btnRect.bottom;\n scaleFactor = windowWidth / backdrop.width();\n btn.attr('data-origin-bottom', btnRect.bottom);\n btn.attr('data-origin-left', btnRect.left);\n btn.attr('data-origin-width', btnRect.width);\n\n // Set initial state\n btn.addClass('active');\n btn.attr('data-open', true);\n btn.css({\n 'text-align': 'center',\n width: '100%',\n bottom: 0,\n left: 0,\n transform: 'translateX(' + offsetX + 'px)',\n transition: 'none'\n });\n anchor.css({\n transform: 'translateY(' + -offsetY + 'px)',\n transition: 'none'\n });\n backdrop.css({\n 'background-color': fabColor\n });\n\n setTimeout(function () {\n btn.css({\n transform: '',\n transition: 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s'\n });\n anchor.css({\n overflow: 'visible',\n transform: '',\n transition: 'transform .2s'\n });\n\n setTimeout(function () {\n btn.css({\n overflow: 'hidden',\n 'background-color': fabColor\n });\n backdrop.css({\n transform: 'scale(' + scaleFactor + ')',\n transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'\n });\n menu.find('> li > a').css({\n opacity: 1\n });\n\n // Scroll to close.\n $(window).on('scroll.fabToolbarClose', function () {\n toolbarToFAB(btn);\n $(window).off('scroll.fabToolbarClose');\n $(document).off('click.fabToolbarClose');\n });\n\n $(document).on('click.fabToolbarClose', function (e) {\n if (!$(e.target).closest(menu).length) {\n toolbarToFAB(btn);\n $(window).off('scroll.fabToolbarClose');\n $(document).off('click.fabToolbarClose');\n }\n });\n }, 100);\n }, 0);\n };\n\n /**\n * Transform toolbar back into FAB\n * @param {Object} object jQuery object\n */\n var toolbarToFAB = function (btn) {\n if (btn.attr('data-open') !== \"true\") {\n return;\n }\n\n var offsetX, offsetY, scaleFactor;\n var windowWidth = window.innerWidth;\n var windowHeight = window.innerHeight;\n var btnWidth = btn.attr('data-origin-width');\n var btnBottom = btn.attr('data-origin-bottom');\n var btnLeft = btn.attr('data-origin-left');\n var anchor = btn.find('> .btn-floating').first();\n var menu = btn.find('> ul').first();\n var backdrop = btn.find('.fab-backdrop');\n var fabColor = anchor.css('background-color');\n\n offsetX = btnLeft - windowWidth / 2 + btnWidth / 2;\n offsetY = windowHeight - btnBottom;\n scaleFactor = windowWidth / backdrop.width();\n\n // Hide backdrop\n btn.removeClass('active');\n btn.attr('data-open', false);\n btn.css({\n 'background-color': 'transparent',\n transition: 'none'\n });\n anchor.css({\n transition: 'none'\n });\n backdrop.css({\n transform: 'scale(0)',\n 'background-color': fabColor\n });\n menu.find('> li > a').css({\n opacity: ''\n });\n\n setTimeout(function () {\n backdrop.remove();\n\n // Set initial state.\n btn.css({\n 'text-align': '',\n width: '',\n bottom: '',\n left: '',\n overflow: '',\n 'background-color': '',\n transform: 'translate3d(' + -offsetX + 'px,0,0)'\n });\n anchor.css({\n overflow: '',\n transform: 'translate3d(0,' + offsetY + 'px,0)'\n });\n\n setTimeout(function () {\n btn.css({\n transform: 'translate3d(0,0,0)',\n transition: 'transform .2s'\n });\n anchor.css({\n transform: 'translate3d(0,0,0)',\n transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'\n });\n }, 20);\n }, 200);\n };\n})(jQuery);\n;(function ($) {\n // Image transition function\n Materialize.fadeInImage = function (selectorOrEl) {\n var element;\n if (typeof selectorOrEl === 'string') {\n element = $(selectorOrEl);\n } else if (typeof selectorOrEl === 'object') {\n element = selectorOrEl;\n } else {\n return;\n }\n element.css({ opacity: 0 });\n $(element).velocity({ opacity: 1 }, {\n duration: 650,\n queue: false,\n easing: 'easeOutSine'\n });\n $(element).velocity({ opacity: 1 }, {\n duration: 1300,\n queue: false,\n easing: 'swing',\n step: function (now, fx) {\n fx.start = 100;\n var grayscale_setting = now / 100;\n var brightness_setting = 150 - (100 - now) / 1.75;\n\n if (brightness_setting < 100) {\n brightness_setting = 100;\n }\n if (now >= 0) {\n $(this).css({\n \"-webkit-filter\": \"grayscale(\" + grayscale_setting + \")\" + \"brightness(\" + brightness_setting + \"%)\",\n \"filter\": \"grayscale(\" + grayscale_setting + \")\" + \"brightness(\" + brightness_setting + \"%)\"\n });\n }\n }\n });\n };\n\n // Horizontal staggered list\n Materialize.showStaggeredList = function (selectorOrEl) {\n var element;\n if (typeof selectorOrEl === 'string') {\n element = $(selectorOrEl);\n } else if (typeof selectorOrEl === 'object') {\n element = selectorOrEl;\n } else {\n return;\n }\n var time = 0;\n element.find('li').velocity({ translateX: \"-100px\" }, { duration: 0 });\n\n element.find('li').each(function () {\n $(this).velocity({ opacity: \"1\", translateX: \"0\" }, { duration: 800, delay: time, easing: [60, 10] });\n time += 120;\n });\n };\n\n $(document).ready(function () {\n // Hardcoded .staggered-list scrollFire\n // var staggeredListOptions = [];\n // $('ul.staggered-list').each(function (i) {\n\n // var label = 'scrollFire-' + i;\n // $(this).addClass(label);\n // staggeredListOptions.push(\n // {selector: 'ul.staggered-list.' + label,\n // offset: 200,\n // callback: 'showStaggeredList(\"ul.staggered-list.' + label + '\")'});\n // });\n // scrollFire(staggeredListOptions);\n\n // HammerJS, Swipe navigation\n\n // Touch Event\n var swipeLeft = false;\n var swipeRight = false;\n\n // Dismissible Collections\n $('.dismissable').each(function () {\n $(this).hammer({\n prevent_default: false\n }).on('pan', function (e) {\n if (e.gesture.pointerType === \"touch\") {\n var $this = $(this);\n var direction = e.gesture.direction;\n var x = e.gesture.deltaX;\n var velocityX = e.gesture.velocityX;\n\n $this.velocity({ translateX: x\n }, { duration: 50, queue: false, easing: 'easeOutQuad' });\n\n // Swipe Left\n if (direction === 4 && (x > $this.innerWidth() / 2 || velocityX < -0.75)) {\n swipeLeft = true;\n }\n\n // Swipe Right\n if (direction === 2 && (x < -1 * $this.innerWidth() / 2 || velocityX > 0.75)) {\n swipeRight = true;\n }\n }\n }).on('panend', function (e) {\n // Reset if collection is moved back into original position\n if (Math.abs(e.gesture.deltaX) < $(this).innerWidth() / 2) {\n swipeRight = false;\n swipeLeft = false;\n }\n\n if (e.gesture.pointerType === \"touch\") {\n var $this = $(this);\n if (swipeLeft || swipeRight) {\n var fullWidth;\n if (swipeLeft) {\n fullWidth = $this.innerWidth();\n } else {\n fullWidth = -1 * $this.innerWidth();\n }\n\n $this.velocity({ translateX: fullWidth\n }, { duration: 100, queue: false, easing: 'easeOutQuad', complete: function () {\n $this.css('border', 'none');\n $this.velocity({ height: 0, padding: 0\n }, { duration: 200, queue: false, easing: 'easeOutQuad', complete: function () {\n $this.remove();\n }\n });\n }\n });\n } else {\n $this.velocity({ translateX: 0\n }, { duration: 100, queue: false, easing: 'easeOutQuad' });\n }\n swipeLeft = false;\n swipeRight = false;\n }\n });\n });\n\n // time = 0\n // // Vertical Staggered list\n // $('ul.staggered-list.vertical li').velocity(\n // { translateY: \"100px\"},\n // { duration: 0 });\n\n // $('ul.staggered-list.vertical li').each(function() {\n // $(this).velocity(\n // { opacity: \"1\", translateY: \"0\"},\n // { duration: 800, delay: time, easing: [60, 25] });\n // time += 120;\n // });\n\n // // Fade in and Scale\n // $('.fade-in.scale').velocity(\n // { scaleX: .4, scaleY: .4, translateX: -600},\n // { duration: 0});\n // $('.fade-in').each(function() {\n // $(this).velocity(\n // { opacity: \"1\", scaleX: 1, scaleY: 1, translateX: 0},\n // { duration: 800, easing: [60, 10] });\n // });\n });\n})(jQuery);\n;(function ($) {\n\n var scrollFireEventsHandled = false;\n\n // Input: Array of JSON objects {selector, offset, callback}\n Materialize.scrollFire = function (options) {\n var onScroll = function () {\n var windowScroll = window.pageYOffset + window.innerHeight;\n\n for (var i = 0; i < options.length; i++) {\n // Get options from each line\n var value = options[i];\n var selector = value.selector,\n offset = value.offset,\n callback = value.callback;\n\n var currentElement = document.querySelector(selector);\n if (currentElement !== null) {\n var elementOffset = currentElement.getBoundingClientRect().top + window.pageYOffset;\n\n if (windowScroll > elementOffset + offset) {\n if (value.done !== true) {\n if (typeof callback === 'function') {\n callback.call(this, currentElement);\n } else if (typeof callback === 'string') {\n var callbackFunc = new Function(callback);\n callbackFunc(currentElement);\n }\n value.done = true;\n }\n }\n }\n }\n };\n\n var throttledScroll = Materialize.throttle(function () {\n onScroll();\n }, options.throttle || 100);\n\n if (!scrollFireEventsHandled) {\n window.addEventListener(\"scroll\", throttledScroll);\n window.addEventListener(\"resize\", throttledScroll);\n scrollFireEventsHandled = true;\n }\n\n // perform a scan once, after current execution context, and after dom is ready\n setTimeout(throttledScroll, 0);\n };\n})(jQuery);\n; /*!\n * pickadate.js v3.5.0, 2014/04/13\n * By Amsul, http://amsul.ca\n * Hosted on http://amsul.github.io/pickadate.js\n * Licensed under MIT\n */\n\n(function (factory) {\n\n Materialize.Picker = factory(jQuery);\n})(function ($) {\n\n var $window = $(window);\n var $document = $(document);\n var $html = $(document.documentElement);\n\n /**\n * The picker constructor that creates a blank picker.\n */\n function PickerConstructor(ELEMENT, NAME, COMPONENT, OPTIONS) {\n\n // If there’s no element, return the picker constructor.\n if (!ELEMENT) return PickerConstructor;\n\n var IS_DEFAULT_THEME = false,\n\n\n // The state of the picker.\n STATE = {\n id: ELEMENT.id || 'P' + Math.abs(~~(Math.random() * new Date()))\n },\n\n\n // Merge the defaults and options passed.\n SETTINGS = COMPONENT ? $.extend(true, {}, COMPONENT.defaults, OPTIONS) : OPTIONS || {},\n\n\n // Merge the default classes with the settings classes.\n CLASSES = $.extend({}, PickerConstructor.klasses(), SETTINGS.klass),\n\n\n // The element node wrapper into a jQuery object.\n $ELEMENT = $(ELEMENT),\n\n\n // Pseudo picker constructor.\n PickerInstance = function () {\n return this.start();\n },\n\n\n // The picker prototype.\n P = PickerInstance.prototype = {\n\n constructor: PickerInstance,\n\n $node: $ELEMENT,\n\n /**\n * Initialize everything\n */\n start: function () {\n\n // If it’s already started, do nothing.\n if (STATE && STATE.start) return P;\n\n // Update the picker states.\n STATE.methods = {};\n STATE.start = true;\n STATE.open = false;\n STATE.type = ELEMENT.type;\n\n // Confirm focus state, convert into text input to remove UA stylings,\n // and set as readonly to prevent keyboard popup.\n ELEMENT.autofocus = ELEMENT == getActiveElement();\n ELEMENT.readOnly = !SETTINGS.editable;\n ELEMENT.id = ELEMENT.id || STATE.id;\n if (ELEMENT.type != 'text') {\n ELEMENT.type = 'text';\n }\n\n // Create a new picker component with the settings.\n P.component = new COMPONENT(P, SETTINGS);\n\n // Create the picker root with a holder and then prepare it.\n P.$root = $(PickerConstructor._.node('div', createWrappedComponent(), CLASSES.picker, 'id=\"' + ELEMENT.id + '_root\" tabindex=\"0\"'));\n prepareElementRoot();\n\n // If there’s a format for the hidden input element, create the element.\n if (SETTINGS.formatSubmit) {\n prepareElementHidden();\n }\n\n // Prepare the input element.\n prepareElement();\n\n // Insert the root as specified in the settings.\n if (SETTINGS.container) $(SETTINGS.container).append(P.$root);else $ELEMENT.before(P.$root);\n\n // Bind the default component and settings events.\n P.on({\n start: P.component.onStart,\n render: P.component.onRender,\n stop: P.component.onStop,\n open: P.component.onOpen,\n close: P.component.onClose,\n set: P.component.onSet\n }).on({\n start: SETTINGS.onStart,\n render: SETTINGS.onRender,\n stop: SETTINGS.onStop,\n open: SETTINGS.onOpen,\n close: SETTINGS.onClose,\n set: SETTINGS.onSet\n });\n\n // Once we’re all set, check the theme in use.\n IS_DEFAULT_THEME = isUsingDefaultTheme(P.$root.children()[0]);\n\n // If the element has autofocus, open the picker.\n if (ELEMENT.autofocus) {\n P.open();\n }\n\n // Trigger queued the “start” and “render” events.\n return P.trigger('start').trigger('render');\n }, //start\n\n\n /**\n * Render a new picker\n */\n render: function (entireComponent) {\n\n // Insert a new component holder in the root or box.\n if (entireComponent) P.$root.html(createWrappedComponent());else P.$root.find('.' + CLASSES.box).html(P.component.nodes(STATE.open));\n\n // Trigger the queued “render” events.\n return P.trigger('render');\n }, //render\n\n\n /**\n * Destroy everything\n */\n stop: function () {\n\n // If it’s already stopped, do nothing.\n if (!STATE.start) return P;\n\n // Then close the picker.\n P.close();\n\n // Remove the hidden field.\n if (P._hidden) {\n P._hidden.parentNode.removeChild(P._hidden);\n }\n\n // Remove the root.\n P.$root.remove();\n\n // Remove the input class, remove the stored data, and unbind\n // the events (after a tick for IE - see `P.close`).\n $ELEMENT.removeClass(CLASSES.input).removeData(NAME);\n setTimeout(function () {\n $ELEMENT.off('.' + STATE.id);\n }, 0);\n\n // Restore the element state\n ELEMENT.type = STATE.type;\n ELEMENT.readOnly = false;\n\n // Trigger the queued “stop” events.\n P.trigger('stop');\n\n // Reset the picker states.\n STATE.methods = {};\n STATE.start = false;\n\n return P;\n }, //stop\n\n\n /**\n * Open up the picker\n */\n open: function (dontGiveFocus) {\n\n // If it’s already open, do nothing.\n if (STATE.open) return P;\n\n // Add the “active” class.\n $ELEMENT.addClass(CLASSES.active);\n aria(ELEMENT, 'expanded', true);\n\n // * A Firefox bug, when `html` has `overflow:hidden`, results in\n // killing transitions :(. So add the “opened” state on the next tick.\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=625289\n setTimeout(function () {\n\n // Add the “opened” class to the picker root.\n P.$root.addClass(CLASSES.opened);\n aria(P.$root[0], 'hidden', false);\n }, 0);\n\n // If we have to give focus, bind the element and doc events.\n if (dontGiveFocus !== false) {\n\n // Set it as open.\n STATE.open = true;\n\n // Prevent the page from scrolling.\n if (IS_DEFAULT_THEME) {\n $html.css('overflow', 'hidden').css('padding-right', '+=' + getScrollbarWidth());\n }\n\n // Pass focus to the root element’s jQuery object.\n // * Workaround for iOS8 to bring the picker’s root into view.\n P.$root.eq(0).focus();\n\n // Bind the document events.\n $document.on('click.' + STATE.id + ' focusin.' + STATE.id, function (event) {\n\n var target = event.target;\n\n // If the target of the event is not the element, close the picker picker.\n // * Don’t worry about clicks or focusins on the root because those don’t bubble up.\n // Also, for Firefox, a click on an `option` element bubbles up directly\n // to the doc. So make sure the target wasn't the doc.\n // * In Firefox stopPropagation() doesn’t prevent right-click events from bubbling,\n // which causes the picker to unexpectedly close when right-clicking it. So make\n // sure the event wasn’t a right-click.\n if (target != ELEMENT && target != document && event.which != 3) {\n\n // If the target was the holder that covers the screen,\n // keep the element focused to maintain tabindex.\n P.close(target === P.$root.children()[0]);\n }\n }).on('keydown.' + STATE.id, function (event) {\n\n var\n // Get the keycode.\n keycode = event.keyCode,\n\n\n // Translate that to a selection change.\n keycodeToMove = P.component.key[keycode],\n\n\n // Grab the target.\n target = event.target;\n\n // On escape, close the picker and give focus.\n if (keycode == 27) {\n P.close(true);\n }\n\n // Check if there is a key movement or “enter” keypress on the element.\n else if (target == P.$root[0] && (keycodeToMove || keycode == 13)) {\n\n // Prevent the default action to stop page movement.\n event.preventDefault();\n\n // Trigger the key movement action.\n if (keycodeToMove) {\n PickerConstructor._.trigger(P.component.key.go, P, [PickerConstructor._.trigger(keycodeToMove)]);\n }\n\n // On “enter”, if the highlighted item isn’t disabled, set the value and close.\n else if (!P.$root.find('.' + CLASSES.highlighted).hasClass(CLASSES.disabled)) {\n P.set('select', P.component.item.highlight);\n if (SETTINGS.closeOnSelect) {\n P.close(true);\n }\n }\n }\n\n // If the target is within the root and “enter” is pressed,\n // prevent the default action and trigger a click on the target instead.\n else if ($.contains(P.$root[0], target) && keycode == 13) {\n event.preventDefault();\n target.click();\n }\n });\n }\n\n // Trigger the queued “open” events.\n return P.trigger('open');\n }, //open\n\n\n /**\n * Close the picker\n */\n close: function (giveFocus) {\n\n // If we need to give focus, do it before changing states.\n if (giveFocus) {\n // ....ah yes! It would’ve been incomplete without a crazy workaround for IE :|\n // The focus is triggered *after* the close has completed - causing it\n // to open again. So unbind and rebind the event at the next tick.\n P.$root.off('focus.toOpen').eq(0).focus();\n setTimeout(function () {\n P.$root.on('focus.toOpen', handleFocusToOpenEvent);\n }, 0);\n }\n\n // Remove the “active” class.\n $ELEMENT.removeClass(CLASSES.active);\n aria(ELEMENT, 'expanded', false);\n\n // * A Firefox bug, when `html` has `overflow:hidden`, results in\n // killing transitions :(. So remove the “opened” state on the next tick.\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=625289\n setTimeout(function () {\n\n // Remove the “opened” and “focused” class from the picker root.\n P.$root.removeClass(CLASSES.opened + ' ' + CLASSES.focused);\n aria(P.$root[0], 'hidden', true);\n }, 0);\n\n // If it’s already closed, do nothing more.\n if (!STATE.open) return P;\n\n // Set it as closed.\n STATE.open = false;\n\n // Allow the page to scroll.\n if (IS_DEFAULT_THEME) {\n $html.css('overflow', '').css('padding-right', '-=' + getScrollbarWidth());\n }\n\n // Unbind the document events.\n $document.off('.' + STATE.id);\n\n // Trigger the queued “close” events.\n return P.trigger('close');\n }, //close\n\n\n /**\n * Clear the values\n */\n clear: function (options) {\n return P.set('clear', null, options);\n }, //clear\n\n\n /**\n * Set something\n */\n set: function (thing, value, options) {\n\n var thingItem,\n thingValue,\n thingIsObject = $.isPlainObject(thing),\n thingObject = thingIsObject ? thing : {};\n\n // Make sure we have usable options.\n options = thingIsObject && $.isPlainObject(value) ? value : options || {};\n\n if (thing) {\n\n // If the thing isn’t an object, make it one.\n if (!thingIsObject) {\n thingObject[thing] = value;\n }\n\n // Go through the things of items to set.\n for (thingItem in thingObject) {\n\n // Grab the value of the thing.\n thingValue = thingObject[thingItem];\n\n // First, if the item exists and there’s a value, set it.\n if (thingItem in P.component.item) {\n if (thingValue === undefined) thingValue = null;\n P.component.set(thingItem, thingValue, options);\n }\n\n // Then, check to update the element value and broadcast a change.\n if (thingItem == 'select' || thingItem == 'clear') {\n $ELEMENT.val(thingItem == 'clear' ? '' : P.get(thingItem, SETTINGS.format)).trigger('change');\n }\n }\n\n // Render a new picker.\n P.render();\n }\n\n // When the method isn’t muted, trigger queued “set” events and pass the `thingObject`.\n return options.muted ? P : P.trigger('set', thingObject);\n }, //set\n\n\n /**\n * Get something\n */\n get: function (thing, format) {\n\n // Make sure there’s something to get.\n thing = thing || 'value';\n\n // If a picker state exists, return that.\n if (STATE[thing] != null) {\n return STATE[thing];\n }\n\n // Return the submission value, if that.\n if (thing == 'valueSubmit') {\n if (P._hidden) {\n return P._hidden.value;\n }\n thing = 'value';\n }\n\n // Return the value, if that.\n if (thing == 'value') {\n return ELEMENT.value;\n }\n\n // Check if a component item exists, return that.\n if (thing in P.component.item) {\n if (typeof format == 'string') {\n var thingValue = P.component.get(thing);\n return thingValue ? PickerConstructor._.trigger(P.component.formats.toString, P.component, [format, thingValue]) : '';\n }\n return P.component.get(thing);\n }\n }, //get\n\n\n /**\n * Bind events on the things.\n */\n on: function (thing, method, internal) {\n\n var thingName,\n thingMethod,\n thingIsObject = $.isPlainObject(thing),\n thingObject = thingIsObject ? thing : {};\n\n if (thing) {\n\n // If the thing isn’t an object, make it one.\n if (!thingIsObject) {\n thingObject[thing] = method;\n }\n\n // Go through the things to bind to.\n for (thingName in thingObject) {\n\n // Grab the method of the thing.\n thingMethod = thingObject[thingName];\n\n // If it was an internal binding, prefix it.\n if (internal) {\n thingName = '_' + thingName;\n }\n\n // Make sure the thing methods collection exists.\n STATE.methods[thingName] = STATE.methods[thingName] || [];\n\n // Add the method to the relative method collection.\n STATE.methods[thingName].push(thingMethod);\n }\n }\n\n return P;\n }, //on\n\n\n /**\n * Unbind events on the things.\n */\n off: function () {\n var i,\n thingName,\n names = arguments;\n for (i = 0, namesCount = names.length; i < namesCount; i += 1) {\n thingName = names[i];\n if (thingName in STATE.methods) {\n delete STATE.methods[thingName];\n }\n }\n return P;\n },\n\n /**\n * Fire off method events.\n */\n trigger: function (name, data) {\n var _trigger = function (name) {\n var methodList = STATE.methods[name];\n if (methodList) {\n methodList.map(function (method) {\n PickerConstructor._.trigger(method, P, [data]);\n });\n }\n };\n _trigger('_' + name);\n _trigger(name);\n return P;\n } //trigger\n //PickerInstance.prototype\n\n\n /**\n * Wrap the picker holder components together.\n */\n };function createWrappedComponent() {\n\n // Create a picker wrapper holder\n return PickerConstructor._.node('div',\n\n // Create a picker wrapper node\n PickerConstructor._.node('div',\n\n // Create a picker frame\n PickerConstructor._.node('div',\n\n // Create a picker box node\n PickerConstructor._.node('div',\n\n // Create the components nodes.\n P.component.nodes(STATE.open),\n\n // The picker box class\n CLASSES.box),\n\n // Picker wrap class\n CLASSES.wrap),\n\n // Picker frame class\n CLASSES.frame),\n\n // Picker holder class\n CLASSES.holder); //endreturn\n } //createWrappedComponent\n\n\n /**\n * Prepare the input element with all bindings.\n */\n function prepareElement() {\n\n $ELEMENT.\n\n // Store the picker data by component name.\n data(NAME, P).\n\n // Add the “input” class name.\n addClass(CLASSES.input).\n\n // Remove the tabindex.\n attr('tabindex', -1).\n\n // If there’s a `data-value`, update the value of the element.\n val($ELEMENT.data('value') ? P.get('select', SETTINGS.format) : ELEMENT.value);\n\n // Only bind keydown events if the element isn’t editable.\n if (!SETTINGS.editable) {\n\n $ELEMENT.\n\n // On focus/click, focus onto the root to open it up.\n on('focus.' + STATE.id + ' click.' + STATE.id, function (event) {\n event.preventDefault();\n P.$root.eq(0).focus();\n }).\n\n // Handle keyboard event based on the picker being opened or not.\n on('keydown.' + STATE.id, handleKeydownEvent);\n }\n\n // Update the aria attributes.\n aria(ELEMENT, {\n haspopup: true,\n expanded: false,\n readonly: false,\n owns: ELEMENT.id + '_root'\n });\n }\n\n /**\n * Prepare the root picker element with all bindings.\n */\n function prepareElementRoot() {\n\n P.$root.on({\n\n // For iOS8.\n keydown: handleKeydownEvent,\n\n // When something within the root is focused, stop from bubbling\n // to the doc and remove the “focused” state from the root.\n focusin: function (event) {\n P.$root.removeClass(CLASSES.focused);\n event.stopPropagation();\n },\n\n // When something within the root holder is clicked, stop it\n // from bubbling to the doc.\n 'mousedown click': function (event) {\n\n var target = event.target;\n\n // Make sure the target isn’t the root holder so it can bubble up.\n if (target != P.$root.children()[0]) {\n\n event.stopPropagation();\n\n // * For mousedown events, cancel the default action in order to\n // prevent cases where focus is shifted onto external elements\n // when using things like jQuery mobile or MagnificPopup (ref: #249 & #120).\n // Also, for Firefox, don’t prevent action on the `option` element.\n if (event.type == 'mousedown' && !$(target).is('input, select, textarea, button, option')) {\n\n event.preventDefault();\n\n // Re-focus onto the root so that users can click away\n // from elements focused within the picker.\n P.$root.eq(0).focus();\n }\n }\n }\n }).\n\n // Add/remove the “target” class on focus and blur.\n on({\n focus: function () {\n $ELEMENT.addClass(CLASSES.target);\n },\n blur: function () {\n $ELEMENT.removeClass(CLASSES.target);\n }\n }).\n\n // Open the picker and adjust the root “focused” state\n on('focus.toOpen', handleFocusToOpenEvent).\n\n // If there’s a click on an actionable element, carry out the actions.\n on('click', '[data-pick], [data-nav], [data-clear], [data-close]', function () {\n\n var $target = $(this),\n targetData = $target.data(),\n targetDisabled = $target.hasClass(CLASSES.navDisabled) || $target.hasClass(CLASSES.disabled),\n\n\n // * For IE, non-focusable elements can be active elements as well\n // (http://stackoverflow.com/a/2684561).\n activeElement = getActiveElement();\n activeElement = activeElement && (activeElement.type || activeElement.href);\n\n // If it’s disabled or nothing inside is actively focused, re-focus the element.\n if (targetDisabled || activeElement && !$.contains(P.$root[0], activeElement)) {\n P.$root.eq(0).focus();\n }\n\n // If something is superficially changed, update the `highlight` based on the `nav`.\n if (!targetDisabled && targetData.nav) {\n P.set('highlight', P.component.item.highlight, { nav: targetData.nav });\n }\n\n // If something is picked, set `select` then close with focus.\n else if (!targetDisabled && 'pick' in targetData) {\n P.set('select', targetData.pick);\n if (SETTINGS.closeOnSelect) {\n P.close(true);\n }\n }\n\n // If a “clear” button is pressed, empty the values and close with focus.\n else if (targetData.clear) {\n P.clear();\n if (SETTINGS.closeOnSelect) {\n P.close(true);\n }\n } else if (targetData.close) {\n P.close(true);\n }\n }); //P.$root\n\n aria(P.$root[0], 'hidden', true);\n }\n\n /**\n * Prepare the hidden input element along with all bindings.\n */\n function prepareElementHidden() {\n\n var name;\n\n if (SETTINGS.hiddenName === true) {\n name = ELEMENT.name;\n ELEMENT.name = '';\n } else {\n name = [typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'];\n name = name[0] + ELEMENT.name + name[1];\n }\n\n P._hidden = $('<input ' + 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' + (\n\n // If the element has a value, set the hidden value as well.\n $ELEMENT.data('value') || ELEMENT.value ? ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' : '') + '>')[0];\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function () {\n P._hidden.value = ELEMENT.value ? P.get('select', SETTINGS.formatSubmit) : '';\n });\n\n // Insert the hidden input as specified in the settings.\n if (SETTINGS.container) $(SETTINGS.container).append(P._hidden);else $ELEMENT.before(P._hidden);\n }\n\n // For iOS8.\n function handleKeydownEvent(event) {\n\n var keycode = event.keyCode,\n\n\n // Check if one of the delete keys was pressed.\n isKeycodeDelete = /^(8|46)$/.test(keycode);\n\n // For some reason IE clears the input value on “escape”.\n if (keycode == 27) {\n P.close();\n return false;\n }\n\n // Check if `space` or `delete` was pressed or the picker is closed with a key movement.\n if (keycode == 32 || isKeycodeDelete || !STATE.open && P.component.key[keycode]) {\n\n // Prevent it from moving the page and bubbling to doc.\n event.preventDefault();\n event.stopPropagation();\n\n // If `delete` was pressed, clear the values and close the picker.\n // Otherwise open the picker.\n if (isKeycodeDelete) {\n P.clear().close();\n } else {\n P.open();\n }\n }\n }\n\n // Separated for IE\n function handleFocusToOpenEvent(event) {\n\n // Stop the event from propagating to the doc.\n event.stopPropagation();\n\n // If it’s a focus event, add the “focused” class to the root.\n if (event.type == 'focus') {\n P.$root.addClass(CLASSES.focused);\n }\n\n // And then finally open the picker.\n P.open();\n }\n\n // Return a new picker instance.\n return new PickerInstance();\n } //PickerConstructor\n\n\n /**\n * The default classes and prefix to use for the HTML classes.\n */\n PickerConstructor.klasses = function (prefix) {\n prefix = prefix || 'picker';\n return {\n\n picker: prefix,\n opened: prefix + '--opened',\n focused: prefix + '--focused',\n\n input: prefix + '__input',\n active: prefix + '__input--active',\n target: prefix + '__input--target',\n\n holder: prefix + '__holder',\n\n frame: prefix + '__frame',\n wrap: prefix + '__wrap',\n\n box: prefix + '__box'\n };\n }; //PickerConstructor.klasses\n\n\n /**\n * Check if the default theme is being used.\n */\n function isUsingDefaultTheme(element) {\n\n var theme,\n prop = 'position';\n\n // For IE.\n if (element.currentStyle) {\n theme = element.currentStyle[prop];\n }\n\n // For normal browsers.\n else if (window.getComputedStyle) {\n theme = getComputedStyle(element)[prop];\n }\n\n return theme == 'fixed';\n }\n\n /**\n * Get the width of the browser’s scrollbar.\n * Taken from: https://github.com/VodkaBears/Remodal/blob/master/src/jquery.remodal.js\n */\n function getScrollbarWidth() {\n\n if ($html.height() <= $window.height()) {\n return 0;\n }\n\n var $outer = $('<div style=\"visibility:hidden;width:100px\" />').appendTo('body');\n\n // Get the width without scrollbars.\n var widthWithoutScroll = $outer[0].offsetWidth;\n\n // Force adding scrollbars.\n $outer.css('overflow', 'scroll');\n\n // Add the inner div.\n var $inner = $('<div style=\"width:100%\" />').appendTo($outer);\n\n // Get the width with scrollbars.\n var widthWithScroll = $inner[0].offsetWidth;\n\n // Remove the divs.\n $outer.remove();\n\n // Return the difference between the widths.\n return widthWithoutScroll - widthWithScroll;\n }\n\n /**\n * PickerConstructor helper methods.\n */\n PickerConstructor._ = {\n\n /**\n * Create a group of nodes. Expects:\n * `\n {\n min: {Integer},\n max: {Integer},\n i: {Integer},\n node: {String},\n item: {Function}\n }\n * `\n */\n group: function (groupObject) {\n\n var\n // Scope for the looped object\n loopObjectScope,\n\n\n // Create the nodes list\n nodesList = '',\n\n\n // The counter starts from the `min`\n counter = PickerConstructor._.trigger(groupObject.min, groupObject);\n\n // Loop from the `min` to `max`, incrementing by `i`\n for (; counter <= PickerConstructor._.trigger(groupObject.max, groupObject, [counter]); counter += groupObject.i) {\n\n // Trigger the `item` function within scope of the object\n loopObjectScope = PickerConstructor._.trigger(groupObject.item, groupObject, [counter]);\n\n // Splice the subgroup and create nodes out of the sub nodes\n nodesList += PickerConstructor._.node(groupObject.node, loopObjectScope[0], // the node\n loopObjectScope[1], // the classes\n loopObjectScope[2] // the attributes\n );\n }\n\n // Return the list of nodes\n return nodesList;\n }, //group\n\n\n /**\n * Create a dom node string\n */\n node: function (wrapper, item, klass, attribute) {\n\n // If the item is false-y, just return an empty string\n if (!item) return '';\n\n // If the item is an array, do a join\n item = $.isArray(item) ? item.join('') : item;\n\n // Check for the class\n klass = klass ? ' class=\"' + klass + '\"' : '';\n\n // Check for any attributes\n attribute = attribute ? ' ' + attribute : '';\n\n // Return the wrapped item\n return '<' + wrapper + klass + attribute + '>' + item + '</' + wrapper + '>';\n }, //node\n\n\n /**\n * Lead numbers below 10 with a zero.\n */\n lead: function (number) {\n return (number < 10 ? '0' : '') + number;\n },\n\n /**\n * Trigger a function otherwise return the value.\n */\n trigger: function (callback, scope, args) {\n return typeof callback == 'function' ? callback.apply(scope, args || []) : callback;\n },\n\n /**\n * If the second character is a digit, length is 2 otherwise 1.\n */\n digits: function (string) {\n return (/\\d/.test(string[1]) ? 2 : 1\n );\n },\n\n /**\n * Tell if something is a date object.\n */\n isDate: function (value) {\n return {}.toString.call(value).indexOf('Date') > -1 && this.isInteger(value.getDate());\n },\n\n /**\n * Tell if something is an integer.\n */\n isInteger: function (value) {\n return {}.toString.call(value).indexOf('Number') > -1 && value % 1 === 0;\n },\n\n /**\n * Create ARIA attribute strings.\n */\n ariaAttr: ariaAttr //PickerConstructor._\n\n\n /**\n * Extend the picker with a component and defaults.\n */\n };PickerConstructor.extend = function (name, Component) {\n\n // Extend jQuery.\n $.fn[name] = function (options, action) {\n\n // Grab the component data.\n var componentData = this.data(name);\n\n // If the picker is requested, return the data object.\n if (options == 'picker') {\n return componentData;\n }\n\n // If the component data exists and `options` is a string, carry out the action.\n if (componentData && typeof options == 'string') {\n return PickerConstructor._.trigger(componentData[options], componentData, [action]);\n }\n\n // Otherwise go through each matched element and if the component\n // doesn’t exist, create a new picker using `this` element\n // and merging the defaults and options with a deep copy.\n return this.each(function () {\n var $this = $(this);\n if (!$this.data(name)) {\n new PickerConstructor(this, name, Component, options);\n }\n });\n };\n\n // Set the defaults.\n $.fn[name].defaults = Component.defaults;\n }; //PickerConstructor.extend\n\n\n function aria(element, attribute, value) {\n if ($.isPlainObject(attribute)) {\n for (var key in attribute) {\n ariaSet(element, key, attribute[key]);\n }\n } else {\n ariaSet(element, attribute, value);\n }\n }\n function ariaSet(element, attribute, value) {\n element.setAttribute((attribute == 'role' ? '' : 'aria-') + attribute, value);\n }\n function ariaAttr(attribute, data) {\n if (!$.isPlainObject(attribute)) {\n attribute = { attribute: data };\n }\n data = '';\n for (var key in attribute) {\n var attr = (key == 'role' ? '' : 'aria-') + key,\n attrVal = attribute[key];\n data += attrVal == null ? '' : attr + '=\"' + attribute[key] + '\"';\n }\n return data;\n }\n\n // IE8 bug throws an error for activeElements within iframes.\n function getActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }\n\n // Expose the picker constructor.\n return PickerConstructor;\n});\n; /*!\n * Date picker for pickadate.js v3.5.0\n * http://amsul.github.io/pickadate.js/date.htm\n */\n\n(function (factory) {\n factory(Materialize.Picker, jQuery);\n})(function (Picker, $) {\n\n /**\n * Globals and constants\n */\n var DAYS_IN_WEEK = 7,\n WEEKS_IN_CALENDAR = 6,\n _ = Picker._;\n\n /**\n * The date picker constructor\n */\n function DatePicker(picker, settings) {\n\n var calendar = this,\n element = picker.$node[0],\n elementValue = element.value,\n elementDataValue = picker.$node.data('value'),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function () {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle(picker.$root[0]).direction == 'rtl';\n };\n\n calendar.settings = settings;\n calendar.$node = picker.$node;\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n\n // The component's item object.\n };calendar.item = {};\n\n calendar.item.clear = null;\n calendar.item.disable = (settings.disable || []).slice(0);\n calendar.item.enable = -function (collectionDisabled) {\n return collectionDisabled[0] === true ? collectionDisabled.shift() : -1;\n }(calendar.item.disable);\n\n calendar.set('min', settings.min).set('max', settings.max).set('now');\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if (valueString) {\n calendar.set('select', valueString, { format: formatString });\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.set('select', null).set('highlight', calendar.item.now);\n }\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function () {\n return isRTL() ? -1 : 1;\n }, // Right\n 37: function () {\n return isRTL() ? 1 : -1;\n }, // Left\n go: function (timeChange) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date(highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange);\n calendar.set('highlight', targetDate, { interval: timeChange });\n this.render();\n }\n\n // Bind some picker events.\n };picker.on('render', function () {\n picker.$root.find('.' + settings.klass.selectMonth).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [picker.get('view').year, value, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectMonth).trigger('focus');\n }\n });\n picker.$root.find('.' + settings.klass.selectYear).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [value, picker.get('view').month, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectYear).trigger('focus');\n }\n });\n }, 1).on('open', function () {\n var includeToday = '';\n if (calendar.disabled(calendar.get('now'))) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')';\n }\n picker.$root.find('button' + includeToday + ', select').attr('disabled', false);\n }, 1).on('close', function () {\n picker.$root.find('button, select').attr('disabled', true);\n }, 1);\n } //DatePicker\n\n\n /**\n * Set a datepicker item object.\n */\n DatePicker.prototype.set = function (type, value, options) {\n\n var calendar = this,\n calendarItem = calendar.item;\n\n // If the value is `null` just set it immediately.\n if (value === null) {\n if (type == 'clear') type = 'select';\n calendarItem[type] = value;\n return calendar;\n }\n\n // Otherwise go through the queue of methods, and invoke the functions.\n // Update this as the time unit, and set the final value as this item.\n // * In the case of `enable`, keep the queue but set `disable` instead.\n // And in the case of `flip`, keep the queue but set `enable` instead.\n calendarItem[type == 'enable' ? 'disable' : type == 'flip' ? 'enable' : type] = calendar.queue[type].split(' ').map(function (method) {\n value = calendar[method](type, value, options);\n return value;\n }).pop();\n\n // Check if we need to cascade through more updates.\n if (type == 'select') {\n calendar.set('highlight', calendarItem.select, options);\n } else if (type == 'highlight') {\n calendar.set('view', calendarItem.highlight, options);\n } else if (type.match(/^(flip|min|max|disable|enable)$/)) {\n if (calendarItem.select && calendar.disabled(calendarItem.select)) {\n calendar.set('select', calendarItem.select, options);\n }\n if (calendarItem.highlight && calendar.disabled(calendarItem.highlight)) {\n calendar.set('highlight', calendarItem.highlight, options);\n }\n }\n\n return calendar;\n }; //DatePicker.prototype.set\n\n\n /**\n * Get a datepicker item object.\n */\n DatePicker.prototype.get = function (type) {\n return this.item[type];\n }; //DatePicker.prototype.get\n\n\n /**\n * Create a picker date object.\n */\n DatePicker.prototype.create = function (type, value, options) {\n\n var isInfiniteValue,\n calendar = this;\n\n // If there’s no value, use the type as the value.\n value = value === undefined ? type : value;\n\n // If it’s infinity, update the value.\n if (value == -Infinity || value == Infinity) {\n isInfiniteValue = value;\n }\n\n // If it’s an object, use the native date object.\n else if ($.isPlainObject(value) && _.isInteger(value.pick)) {\n value = value.obj;\n }\n\n // If it’s an array, convert it into a date and make sure\n // that it’s a valid date – otherwise default to today.\n else if ($.isArray(value)) {\n value = new Date(value[0], value[1], value[2]);\n value = _.isDate(value) ? value : calendar.create().obj;\n }\n\n // If it’s a number or date object, make a normalized date.\n else if (_.isInteger(value) || _.isDate(value)) {\n value = calendar.normalize(new Date(value), options);\n }\n\n // If it’s a literal true or any other case, set it to now.\n else /*if ( value === true )*/{\n value = calendar.now(type, value, options);\n }\n\n // Return the compiled object.\n return {\n year: isInfiniteValue || value.getFullYear(),\n month: isInfiniteValue || value.getMonth(),\n date: isInfiniteValue || value.getDate(),\n day: isInfiniteValue || value.getDay(),\n obj: isInfiniteValue || value,\n pick: isInfiniteValue || value.getTime()\n };\n }; //DatePicker.prototype.create\n\n\n /**\n * Create a range limit object using an array, date object,\n * literal “true”, or integer relative to another time.\n */\n DatePicker.prototype.createRange = function (from, to) {\n\n var calendar = this,\n createDate = function (date) {\n if (date === true || $.isArray(date) || _.isDate(date)) {\n return calendar.create(date);\n }\n return date;\n };\n\n // Create objects if possible.\n if (!_.isInteger(from)) {\n from = createDate(from);\n }\n if (!_.isInteger(to)) {\n to = createDate(to);\n }\n\n // Create relative dates.\n if (_.isInteger(from) && $.isPlainObject(to)) {\n from = [to.year, to.month, to.date + from];\n } else if (_.isInteger(to) && $.isPlainObject(from)) {\n to = [from.year, from.month, from.date + to];\n }\n\n return {\n from: createDate(from),\n to: createDate(to)\n };\n }; //DatePicker.prototype.createRange\n\n\n /**\n * Check if a date unit falls within a date range object.\n */\n DatePicker.prototype.withinRange = function (range, dateUnit) {\n range = this.createRange(range.from, range.to);\n return dateUnit.pick >= range.from.pick && dateUnit.pick <= range.to.pick;\n };\n\n /**\n * Check if two date range objects overlap.\n */\n DatePicker.prototype.overlapRanges = function (one, two) {\n\n var calendar = this;\n\n // Convert the ranges into comparable dates.\n one = calendar.createRange(one.from, one.to);\n two = calendar.createRange(two.from, two.to);\n\n return calendar.withinRange(one, two.from) || calendar.withinRange(one, two.to) || calendar.withinRange(two, one.from) || calendar.withinRange(two, one.to);\n };\n\n /**\n * Get the date today.\n */\n DatePicker.prototype.now = function (type, value, options) {\n value = new Date();\n if (options && options.rel) {\n value.setDate(value.getDate() + options.rel);\n }\n return this.normalize(value, options);\n };\n\n /**\n * Navigate to next/prev month.\n */\n DatePicker.prototype.navigate = function (type, value, options) {\n\n var targetDateObject,\n targetYear,\n targetMonth,\n targetDate,\n isTargetArray = $.isArray(value),\n isTargetObject = $.isPlainObject(value),\n viewsetObject = this.item.view; /*,\n safety = 100*/\n\n if (isTargetArray || isTargetObject) {\n\n if (isTargetObject) {\n targetYear = value.year;\n targetMonth = value.month;\n targetDate = value.date;\n } else {\n targetYear = +value[0];\n targetMonth = +value[1];\n targetDate = +value[2];\n }\n\n // If we’re navigating months but the view is in a different\n // month, navigate to the view’s year and month.\n if (options && options.nav && viewsetObject && viewsetObject.month !== targetMonth) {\n targetYear = viewsetObject.year;\n targetMonth = viewsetObject.month;\n }\n\n // Figure out the expected target year and month.\n targetDateObject = new Date(targetYear, targetMonth + (options && options.nav ? options.nav : 0), 1);\n targetYear = targetDateObject.getFullYear();\n targetMonth = targetDateObject.getMonth();\n\n // If the month we’re going to doesn’t have enough days,\n // keep decreasing the date until we reach the month’s last date.\n while ( /*safety &&*/new Date(targetYear, targetMonth, targetDate).getMonth() !== targetMonth) {\n targetDate -= 1;\n /*safety -= 1\n if ( !safety ) {\n throw 'Fell into an infinite loop while navigating to ' + new Date( targetYear, targetMonth, targetDate ) + '.'\n }*/\n }\n\n value = [targetYear, targetMonth, targetDate];\n }\n\n return value;\n }; //DatePicker.prototype.navigate\n\n\n /**\n * Normalize a date by setting the hours to midnight.\n */\n DatePicker.prototype.normalize = function (value /*, options*/) {\n value.setHours(0, 0, 0, 0);\n return value;\n };\n\n /**\n * Measure the range of dates.\n */\n DatePicker.prototype.measure = function (type, value /*, options*/) {\n\n var calendar = this;\n\n // If it’s anything false-y, remove the limits.\n if (!value) {\n value = type == 'min' ? -Infinity : Infinity;\n }\n\n // If it’s a string, parse it.\n else if (typeof value == 'string') {\n value = calendar.parse(type, value);\n }\n\n // If it's an integer, get a date relative to today.\n else if (_.isInteger(value)) {\n value = calendar.now(type, value, { rel: value });\n }\n\n return value;\n }; ///DatePicker.prototype.measure\n\n\n /**\n * Create a viewset object based on navigation.\n */\n DatePicker.prototype.viewset = function (type, dateObject /*, options*/) {\n return this.create([dateObject.year, dateObject.month, 1]);\n };\n\n /**\n * Validate a date as enabled and shift if needed.\n */\n DatePicker.prototype.validate = function (type, dateObject, options) {\n\n var calendar = this,\n\n\n // Keep a reference to the original date.\n originalDateObject = dateObject,\n\n\n // Make sure we have an interval.\n interval = options && options.interval ? options.interval : 1,\n\n\n // Check if the calendar enabled dates are inverted.\n isFlippedBase = calendar.item.enable === -1,\n\n\n // Check if we have any enabled dates after/before now.\n hasEnabledBeforeTarget,\n hasEnabledAfterTarget,\n\n\n // The min & max limits.\n minLimitObject = calendar.item.min,\n maxLimitObject = calendar.item.max,\n\n\n // Check if we’ve reached the limit during shifting.\n reachedMin,\n reachedMax,\n\n\n // Check if the calendar is inverted and at least one weekday is enabled.\n hasEnabledWeekdays = isFlippedBase && calendar.item.disable.filter(function (value) {\n\n // If there’s a date, check where it is relative to the target.\n if ($.isArray(value)) {\n var dateTime = calendar.create(value).pick;\n if (dateTime < dateObject.pick) hasEnabledBeforeTarget = true;else if (dateTime > dateObject.pick) hasEnabledAfterTarget = true;\n }\n\n // Return only integers for enabled weekdays.\n return _.isInteger(value);\n }).length; /*,\n safety = 100*/\n\n // Cases to validate for:\n // [1] Not inverted and date disabled.\n // [2] Inverted and some dates enabled.\n // [3] Not inverted and out of range.\n //\n // Cases to **not** validate for:\n // • Navigating months.\n // • Not inverted and date enabled.\n // • Inverted and all dates disabled.\n // • ..and anything else.\n if (!options || !options.nav) if (\n /* 1 */!isFlippedBase && calendar.disabled(dateObject) ||\n /* 2 */isFlippedBase && calendar.disabled(dateObject) && (hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget) ||\n /* 3 */!isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick)) {\n\n // When inverted, flip the direction if there aren’t any enabled weekdays\n // and there are no enabled dates in the direction of the interval.\n if (isFlippedBase && !hasEnabledWeekdays && (!hasEnabledAfterTarget && interval > 0 || !hasEnabledBeforeTarget && interval < 0)) {\n interval *= -1;\n }\n\n // Keep looping until we reach an enabled date.\n while ( /*safety &&*/calendar.disabled(dateObject)) {\n\n /*safety -= 1\n if ( !safety ) {\n throw 'Fell into an infinite loop while validating ' + dateObject.obj + '.'\n }*/\n\n // If we’ve looped into the next/prev month with a large interval, return to the original date and flatten the interval.\n if (Math.abs(interval) > 1 && (dateObject.month < originalDateObject.month || dateObject.month > originalDateObject.month)) {\n dateObject = originalDateObject;\n interval = interval > 0 ? 1 : -1;\n }\n\n // If we’ve reached the min/max limit, reverse the direction, flatten the interval and set it to the limit.\n if (dateObject.pick <= minLimitObject.pick) {\n reachedMin = true;\n interval = 1;\n dateObject = calendar.create([minLimitObject.year, minLimitObject.month, minLimitObject.date + (dateObject.pick === minLimitObject.pick ? 0 : -1)]);\n } else if (dateObject.pick >= maxLimitObject.pick) {\n reachedMax = true;\n interval = -1;\n dateObject = calendar.create([maxLimitObject.year, maxLimitObject.month, maxLimitObject.date + (dateObject.pick === maxLimitObject.pick ? 0 : 1)]);\n }\n\n // If we’ve reached both limits, just break out of the loop.\n if (reachedMin && reachedMax) {\n break;\n }\n\n // Finally, create the shifted date using the interval and keep looping.\n dateObject = calendar.create([dateObject.year, dateObject.month, dateObject.date + interval]);\n }\n } //endif\n\n\n // Return the date object settled on.\n return dateObject;\n }; //DatePicker.prototype.validate\n\n\n /**\n * Check if a date is disabled.\n */\n DatePicker.prototype.disabled = function (dateToVerify) {\n\n var calendar = this,\n\n\n // Filter through the disabled dates to check if this is one.\n isDisabledMatch = calendar.item.disable.filter(function (dateToDisable) {\n\n // If the date is a number, match the weekday with 0index and `firstDay` check.\n if (_.isInteger(dateToDisable)) {\n return dateToVerify.day === (calendar.settings.firstDay ? dateToDisable : dateToDisable - 1) % 7;\n }\n\n // If it’s an array or a native JS date, create and match the exact date.\n if ($.isArray(dateToDisable) || _.isDate(dateToDisable)) {\n return dateToVerify.pick === calendar.create(dateToDisable).pick;\n }\n\n // If it’s an object, match a date within the “from” and “to” range.\n if ($.isPlainObject(dateToDisable)) {\n return calendar.withinRange(dateToDisable, dateToVerify);\n }\n });\n\n // If this date matches a disabled date, confirm it’s not inverted.\n isDisabledMatch = isDisabledMatch.length && !isDisabledMatch.filter(function (dateToDisable) {\n return $.isArray(dateToDisable) && dateToDisable[3] == 'inverted' || $.isPlainObject(dateToDisable) && dateToDisable.inverted;\n }).length;\n\n // Check the calendar “enabled” flag and respectively flip the\n // disabled state. Then also check if it’s beyond the min/max limits.\n return calendar.item.enable === -1 ? !isDisabledMatch : isDisabledMatch || dateToVerify.pick < calendar.item.min.pick || dateToVerify.pick > calendar.item.max.pick;\n }; //DatePicker.prototype.disabled\n\n\n /**\n * Parse a string into a usable type.\n */\n DatePicker.prototype.parse = function (type, value, options) {\n\n var calendar = this,\n parsingObject = {};\n\n // If it’s already parsed, we’re good.\n if (!value || typeof value != 'string') {\n return value;\n }\n\n // We need a `.format` to parse the value with.\n if (!(options && options.format)) {\n options = options || {};\n options.format = calendar.settings.format;\n }\n\n // Convert the format into an array and then map through it.\n calendar.formats.toArray(options.format).map(function (label) {\n\n var\n // Grab the formatting label.\n formattingLabel = calendar.formats[label],\n\n\n // The format length is from the formatting label function or the\n // label length without the escaping exclamation (!) mark.\n formatLength = formattingLabel ? _.trigger(formattingLabel, calendar, [value, parsingObject]) : label.replace(/^!/, '').length;\n\n // If there's a format label, split the value up to the format length.\n // Then add it to the parsing object with appropriate label.\n if (formattingLabel) {\n parsingObject[label] = value.substr(0, formatLength);\n }\n\n // Update the value as the substring from format length to end.\n value = value.substr(formatLength);\n });\n\n // Compensate for month 0index.\n return [parsingObject.yyyy || parsingObject.yy, +(parsingObject.mm || parsingObject.m) - 1, parsingObject.dd || parsingObject.d];\n }; //DatePicker.prototype.parse\n\n\n /**\n * Various formats to display the object in.\n */\n DatePicker.prototype.formats = function () {\n\n // Return the length of the first word in a collection.\n function getWordLengthFromCollection(string, collection, dateObject) {\n\n // Grab the first word from the string.\n var word = string.match(/\\w+/)[0];\n\n // If there's no month index, add it to the date object\n if (!dateObject.mm && !dateObject.m) {\n dateObject.m = collection.indexOf(word) + 1;\n }\n\n // Return the length of the word.\n return word.length;\n }\n\n // Get the length of the first word in a string.\n function getFirstWordLength(string) {\n return string.match(/\\w+/)[0].length;\n }\n\n return {\n\n d: function (string, dateObject) {\n\n // If there's string, then get the digits length.\n // Otherwise return the selected date.\n return string ? _.digits(string) : dateObject.date;\n },\n dd: function (string, dateObject) {\n\n // If there's a string, then the length is always 2.\n // Otherwise return the selected date with a leading zero.\n return string ? 2 : _.lead(dateObject.date);\n },\n ddd: function (string, dateObject) {\n\n // If there's a string, then get the length of the first word.\n // Otherwise return the short selected weekday.\n return string ? getFirstWordLength(string) : this.settings.weekdaysShort[dateObject.day];\n },\n dddd: function (string, dateObject) {\n\n // If there's a string, then get the length of the first word.\n // Otherwise return the full selected weekday.\n return string ? getFirstWordLength(string) : this.settings.weekdaysFull[dateObject.day];\n },\n m: function (string, dateObject) {\n\n // If there's a string, then get the length of the digits\n // Otherwise return the selected month with 0index compensation.\n return string ? _.digits(string) : dateObject.month + 1;\n },\n mm: function (string, dateObject) {\n\n // If there's a string, then the length is always 2.\n // Otherwise return the selected month with 0index and leading zero.\n return string ? 2 : _.lead(dateObject.month + 1);\n },\n mmm: function (string, dateObject) {\n\n var collection = this.settings.monthsShort;\n\n // If there's a string, get length of the relevant month from the short\n // months collection. Otherwise return the selected month from that collection.\n return string ? getWordLengthFromCollection(string, collection, dateObject) : collection[dateObject.month];\n },\n mmmm: function (string, dateObject) {\n\n var collection = this.settings.monthsFull;\n\n // If there's a string, get length of the relevant month from the full\n // months collection. Otherwise return the selected month from that collection.\n return string ? getWordLengthFromCollection(string, collection, dateObject) : collection[dateObject.month];\n },\n yy: function (string, dateObject) {\n\n // If there's a string, then the length is always 2.\n // Otherwise return the selected year by slicing out the first 2 digits.\n return string ? 2 : ('' + dateObject.year).slice(2);\n },\n yyyy: function (string, dateObject) {\n\n // If there's a string, then the length is always 4.\n // Otherwise return the selected year.\n return string ? 4 : dateObject.year;\n },\n\n // Create an array by splitting the formatting string passed.\n toArray: function (formatString) {\n return formatString.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);\n },\n\n // Format an object into a string using the formatting options.\n toString: function (formatString, itemObject) {\n var calendar = this;\n return calendar.formats.toArray(formatString).map(function (label) {\n return _.trigger(calendar.formats[label], calendar, [0, itemObject]) || label.replace(/^!/, '');\n }).join('');\n }\n };\n }(); //DatePicker.prototype.formats\n\n\n /**\n * Check if two date units are the exact.\n */\n DatePicker.prototype.isDateExact = function (one, two) {\n\n var calendar = this;\n\n // When we’re working with weekdays, do a direct comparison.\n if (_.isInteger(one) && _.isInteger(two) || typeof one == 'boolean' && typeof two == 'boolean') {\n return one === two;\n }\n\n // When we’re working with date representations, compare the “pick” value.\n if ((_.isDate(one) || $.isArray(one)) && (_.isDate(two) || $.isArray(two))) {\n return calendar.create(one).pick === calendar.create(two).pick;\n }\n\n // When we’re working with range objects, compare the “from” and “to”.\n if ($.isPlainObject(one) && $.isPlainObject(two)) {\n return calendar.isDateExact(one.from, two.from) && calendar.isDateExact(one.to, two.to);\n }\n\n return false;\n };\n\n /**\n * Check if two date units overlap.\n */\n DatePicker.prototype.isDateOverlap = function (one, two) {\n\n var calendar = this,\n firstDay = calendar.settings.firstDay ? 1 : 0;\n\n // When we’re working with a weekday index, compare the days.\n if (_.isInteger(one) && (_.isDate(two) || $.isArray(two))) {\n one = one % 7 + firstDay;\n return one === calendar.create(two).day + 1;\n }\n if (_.isInteger(two) && (_.isDate(one) || $.isArray(one))) {\n two = two % 7 + firstDay;\n return two === calendar.create(one).day + 1;\n }\n\n // When we’re working with range objects, check if the ranges overlap.\n if ($.isPlainObject(one) && $.isPlainObject(two)) {\n return calendar.overlapRanges(one, two);\n }\n\n return false;\n };\n\n /**\n * Flip the “enabled” state.\n */\n DatePicker.prototype.flipEnable = function (val) {\n var itemObject = this.item;\n itemObject.enable = val || (itemObject.enable == -1 ? 1 : -1);\n };\n\n /**\n * Mark a collection of dates as “disabled”.\n */\n DatePicker.prototype.deactivate = function (type, datesToDisable) {\n\n var calendar = this,\n disabledItems = calendar.item.disable.slice(0);\n\n // If we’re flipping, that’s all we need to do.\n if (datesToDisable == 'flip') {\n calendar.flipEnable();\n } else if (datesToDisable === false) {\n calendar.flipEnable(1);\n disabledItems = [];\n } else if (datesToDisable === true) {\n calendar.flipEnable(-1);\n disabledItems = [];\n }\n\n // Otherwise go through the dates to disable.\n else {\n\n datesToDisable.map(function (unitToDisable) {\n\n var matchFound;\n\n // When we have disabled items, check for matches.\n // If something is matched, immediately break out.\n for (var index = 0; index < disabledItems.length; index += 1) {\n if (calendar.isDateExact(unitToDisable, disabledItems[index])) {\n matchFound = true;\n break;\n }\n }\n\n // If nothing was found, add the validated unit to the collection.\n if (!matchFound) {\n if (_.isInteger(unitToDisable) || _.isDate(unitToDisable) || $.isArray(unitToDisable) || $.isPlainObject(unitToDisable) && unitToDisable.from && unitToDisable.to) {\n disabledItems.push(unitToDisable);\n }\n }\n });\n }\n\n // Return the updated collection.\n return disabledItems;\n }; //DatePicker.prototype.deactivate\n\n\n /**\n * Mark a collection of dates as “enabled”.\n */\n DatePicker.prototype.activate = function (type, datesToEnable) {\n\n var calendar = this,\n disabledItems = calendar.item.disable,\n disabledItemsCount = disabledItems.length;\n\n // If we’re flipping, that’s all we need to do.\n if (datesToEnable == 'flip') {\n calendar.flipEnable();\n } else if (datesToEnable === true) {\n calendar.flipEnable(1);\n disabledItems = [];\n } else if (datesToEnable === false) {\n calendar.flipEnable(-1);\n disabledItems = [];\n }\n\n // Otherwise go through the disabled dates.\n else {\n\n datesToEnable.map(function (unitToEnable) {\n\n var matchFound, disabledUnit, index, isExactRange;\n\n // Go through the disabled items and try to find a match.\n for (index = 0; index < disabledItemsCount; index += 1) {\n\n disabledUnit = disabledItems[index];\n\n // When an exact match is found, remove it from the collection.\n if (calendar.isDateExact(disabledUnit, unitToEnable)) {\n matchFound = disabledItems[index] = null;\n isExactRange = true;\n break;\n }\n\n // When an overlapped match is found, add the “inverted” state to it.\n else if (calendar.isDateOverlap(disabledUnit, unitToEnable)) {\n if ($.isPlainObject(unitToEnable)) {\n unitToEnable.inverted = true;\n matchFound = unitToEnable;\n } else if ($.isArray(unitToEnable)) {\n matchFound = unitToEnable;\n if (!matchFound[3]) matchFound.push('inverted');\n } else if (_.isDate(unitToEnable)) {\n matchFound = [unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted'];\n }\n break;\n }\n }\n\n // If a match was found, remove a previous duplicate entry.\n if (matchFound) for (index = 0; index < disabledItemsCount; index += 1) {\n if (calendar.isDateExact(disabledItems[index], unitToEnable)) {\n disabledItems[index] = null;\n break;\n }\n }\n\n // In the event that we’re dealing with an exact range of dates,\n // make sure there are no “inverted” dates because of it.\n if (isExactRange) for (index = 0; index < disabledItemsCount; index += 1) {\n if (calendar.isDateOverlap(disabledItems[index], unitToEnable)) {\n disabledItems[index] = null;\n break;\n }\n }\n\n // If something is still matched, add it into the collection.\n if (matchFound) {\n disabledItems.push(matchFound);\n }\n });\n }\n\n // Return the updated collection.\n return disabledItems.filter(function (val) {\n return val != null;\n });\n }; //DatePicker.prototype.activate\n\n\n /**\n * Create a string for the nodes in the picker.\n */\n DatePicker.prototype.nodes = function (isOpen) {\n\n var calendar = this,\n settings = calendar.settings,\n calendarItem = calendar.item,\n nowObject = calendarItem.now,\n selectedObject = calendarItem.select,\n highlightedObject = calendarItem.highlight,\n viewsetObject = calendarItem.view,\n disabledCollection = calendarItem.disable,\n minLimitObject = calendarItem.min,\n maxLimitObject = calendarItem.max,\n\n\n // Create the calendar table head using a copy of weekday labels collection.\n // * We do a copy so we don't mutate the original array.\n tableHead = function (collection, fullCollection) {\n\n // If the first day should be Monday, move Sunday to the end.\n if (settings.firstDay) {\n collection.push(collection.shift());\n fullCollection.push(fullCollection.shift());\n }\n\n // Create and return the table head group.\n return _.node('thead', _.node('tr', _.group({\n min: 0,\n max: DAYS_IN_WEEK - 1,\n i: 1,\n node: 'th',\n item: function (counter) {\n return [collection[counter], settings.klass.weekdays, 'scope=col title=\"' + fullCollection[counter] + '\"'];\n }\n }))); //endreturn\n\n // Materialize modified\n }((settings.showWeekdaysFull ? settings.weekdaysFull : settings.weekdaysLetter).slice(0), settings.weekdaysFull.slice(0)),\n //tableHead\n\n\n // Create the nav for next/prev month.\n createMonthNav = function (next) {\n\n // Otherwise, return the created month tag.\n return _.node('div', ' ', settings.klass['nav' + (next ? 'Next' : 'Prev')] + (\n\n // If the focused month is outside the range, disabled the button.\n next && viewsetObject.year >= maxLimitObject.year && viewsetObject.month >= maxLimitObject.month || !next && viewsetObject.year <= minLimitObject.year && viewsetObject.month <= minLimitObject.month ? ' ' + settings.klass.navDisabled : ''), 'data-nav=' + (next || -1) + ' ' + _.ariaAttr({\n role: 'button',\n controls: calendar.$node[0].id + '_table'\n }) + ' ' + 'title=\"' + (next ? settings.labelMonthNext : settings.labelMonthPrev) + '\"'); //endreturn\n },\n //createMonthNav\n\n\n // Create the month label.\n //Materialize modified\n createMonthLabel = function (override) {\n\n var monthsCollection = settings.showMonthsShort ? settings.monthsShort : settings.monthsFull;\n\n // Materialize modified\n if (override == \"short_months\") {\n monthsCollection = settings.monthsShort;\n }\n\n // If there are months to select, add a dropdown menu.\n if (settings.selectMonths && override == undefined) {\n\n return _.node('select', _.group({\n min: 0,\n max: 11,\n i: 1,\n node: 'option',\n item: function (loopedMonth) {\n\n return [\n\n // The looped month and no classes.\n monthsCollection[loopedMonth], 0,\n\n // Set the value and selected index.\n 'value=' + loopedMonth + (viewsetObject.month == loopedMonth ? ' selected' : '') + (viewsetObject.year == minLimitObject.year && loopedMonth < minLimitObject.month || viewsetObject.year == maxLimitObject.year && loopedMonth > maxLimitObject.month ? ' disabled' : '')];\n }\n }), settings.klass.selectMonth + ' browser-default', (isOpen ? '' : 'disabled') + ' ' + _.ariaAttr({ controls: calendar.$node[0].id + '_table' }) + ' ' + 'title=\"' + settings.labelMonthSelect + '\"');\n }\n\n // Materialize modified\n if (override == \"short_months\") if (selectedObject != null) return monthsCollection[selectedObject.month];else return monthsCollection[viewsetObject.month];\n\n // If there's a need for a month selector\n return _.node('div', monthsCollection[viewsetObject.month], settings.klass.month);\n },\n //createMonthLabel\n\n\n // Create the year label.\n // Materialize modified\n createYearLabel = function (override) {\n\n var focusedYear = viewsetObject.year,\n\n\n // If years selector is set to a literal \"true\", set it to 5. Otherwise\n // divide in half to get half before and half after focused year.\n numberYears = settings.selectYears === true ? 5 : ~~(settings.selectYears / 2);\n\n // If there are years to select, add a dropdown menu.\n if (numberYears) {\n\n var minYear = minLimitObject.year,\n maxYear = maxLimitObject.year,\n lowestYear = focusedYear - numberYears,\n highestYear = focusedYear + numberYears;\n\n // If the min year is greater than the lowest year, increase the highest year\n // by the difference and set the lowest year to the min year.\n if (minYear > lowestYear) {\n highestYear += minYear - lowestYear;\n lowestYear = minYear;\n }\n\n // If the max year is less than the highest year, decrease the lowest year\n // by the lower of the two: available and needed years. Then set the\n // highest year to the max year.\n if (maxYear < highestYear) {\n\n var availableYears = lowestYear - minYear,\n neededYears = highestYear - maxYear;\n\n lowestYear -= availableYears > neededYears ? neededYears : availableYears;\n highestYear = maxYear;\n }\n\n if (settings.selectYears && override == undefined) {\n return _.node('select', _.group({\n min: lowestYear,\n max: highestYear,\n i: 1,\n node: 'option',\n item: function (loopedYear) {\n return [\n\n // The looped year and no classes.\n loopedYear, 0,\n\n // Set the value and selected index.\n 'value=' + loopedYear + (focusedYear == loopedYear ? ' selected' : '')];\n }\n }), settings.klass.selectYear + ' browser-default', (isOpen ? '' : 'disabled') + ' ' + _.ariaAttr({ controls: calendar.$node[0].id + '_table' }) + ' ' + 'title=\"' + settings.labelYearSelect + '\"');\n }\n }\n\n // Materialize modified\n if (override == \"raw\") return _.node('div', focusedYear);\n\n // Otherwise just return the year focused\n return _.node('div', focusedYear, settings.klass.year);\n }; //createYearLabel\n\n\n // Materialize modified\n createDayLabel = function () {\n if (selectedObject != null) return selectedObject.date;else return nowObject.date;\n };\n createWeekdayLabel = function () {\n var display_day;\n\n if (selectedObject != null) display_day = selectedObject.day;else display_day = nowObject.day;\n var weekday = settings.weekdaysShort[display_day];\n return weekday;\n };\n\n // Create and return the entire calendar.\n\n return _.node(\n // Date presentation View\n 'div', _.node(\n // Div for Year\n 'div', createYearLabel(\"raw\"), settings.klass.year_display) + _.node('span', createWeekdayLabel() + ', ', \"picker__weekday-display\") + _.node(\n // Div for short Month\n 'span', createMonthLabel(\"short_months\") + ' ', settings.klass.month_display) + _.node(\n // Div for Day\n 'span', createDayLabel(), settings.klass.day_display), settings.klass.date_display) +\n // Calendar container\n _.node('div', _.node('div', _.node('div', (settings.selectYears ? createMonthLabel() + createYearLabel() : createMonthLabel() + createYearLabel()) + createMonthNav() + createMonthNav(1), settings.klass.header) + _.node('table', tableHead + _.node('tbody', _.group({\n min: 0,\n max: WEEKS_IN_CALENDAR - 1,\n i: 1,\n node: 'tr',\n item: function (rowCounter) {\n\n // If Monday is the first day and the month starts on Sunday, shift the date back a week.\n var shiftDateBy = settings.firstDay && calendar.create([viewsetObject.year, viewsetObject.month, 1]).day === 0 ? -7 : 0;\n\n return [_.group({\n min: DAYS_IN_WEEK * rowCounter - viewsetObject.day + shiftDateBy + 1, // Add 1 for weekday 0index\n max: function () {\n return this.min + DAYS_IN_WEEK - 1;\n },\n i: 1,\n node: 'td',\n item: function (targetDate) {\n\n // Convert the time date from a relative date to a target date.\n targetDate = calendar.create([viewsetObject.year, viewsetObject.month, targetDate + (settings.firstDay ? 1 : 0)]);\n\n var isSelected = selectedObject && selectedObject.pick == targetDate.pick,\n isHighlighted = highlightedObject && highlightedObject.pick == targetDate.pick,\n isDisabled = disabledCollection && calendar.disabled(targetDate) || targetDate.pick < minLimitObject.pick || targetDate.pick > maxLimitObject.pick,\n formattedDate = _.trigger(calendar.formats.toString, calendar, [settings.format, targetDate]);\n\n return [_.node('div', targetDate.date, function (klasses) {\n\n // Add the `infocus` or `outfocus` classes based on month in view.\n klasses.push(viewsetObject.month == targetDate.month ? settings.klass.infocus : settings.klass.outfocus);\n\n // Add the `today` class if needed.\n if (nowObject.pick == targetDate.pick) {\n klasses.push(settings.klass.now);\n }\n\n // Add the `selected` class if something's selected and the time matches.\n if (isSelected) {\n klasses.push(settings.klass.selected);\n }\n\n // Add the `highlighted` class if something's highlighted and the time matches.\n if (isHighlighted) {\n klasses.push(settings.klass.highlighted);\n }\n\n // Add the `disabled` class if something's disabled and the object matches.\n if (isDisabled) {\n klasses.push(settings.klass.disabled);\n }\n\n return klasses.join(' ');\n }([settings.klass.day]), 'data-pick=' + targetDate.pick + ' ' + _.ariaAttr({\n role: 'gridcell',\n label: formattedDate,\n selected: isSelected && calendar.$node.val() === formattedDate ? true : null,\n activedescendant: isHighlighted ? true : null,\n disabled: isDisabled ? true : null\n }) + ' ' + (isDisabled ? '' : 'tabindex=\"0\"')), '', _.ariaAttr({ role: 'presentation' })]; //endreturn\n }\n })]; //endreturn\n }\n })), settings.klass.table, 'id=\"' + calendar.$node[0].id + '_table' + '\" ' + _.ariaAttr({\n role: 'grid',\n controls: calendar.$node[0].id,\n readonly: true\n })), settings.klass.calendar_container) // end calendar\n\n +\n\n // * For Firefox forms to submit, make sure to set the buttons’ `type` attributes as “button”.\n _.node('div', _.node('button', settings.today, \"btn-flat picker__today waves-effect\", 'type=button data-pick=' + nowObject.pick + (isOpen && !calendar.disabled(nowObject) ? '' : ' disabled') + ' ' + _.ariaAttr({ controls: calendar.$node[0].id })) + _.node('button', settings.clear, \"btn-flat picker__clear waves-effect\", 'type=button data-clear=1' + (isOpen ? '' : ' disabled') + ' ' + _.ariaAttr({ controls: calendar.$node[0].id })) + _.node('button', settings.close, \"btn-flat picker__close waves-effect\", 'type=button data-close=true ' + (isOpen ? '' : ' disabled') + ' ' + _.ariaAttr({ controls: calendar.$node[0].id })), settings.klass.footer), 'picker__container__wrapper'); //endreturn\n }; //DatePicker.prototype.nodes\n\n\n /**\n * The date picker defaults.\n */\n DatePicker.defaults = function (prefix) {\n\n return {\n\n // The title label to use for the month nav buttons\n labelMonthNext: 'Next month',\n labelMonthPrev: 'Previous month',\n\n // The title label to use for the dropdown selectors\n labelMonthSelect: 'Select a month',\n labelYearSelect: 'Select a year',\n\n // Months and weekdays\n monthsFull: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n weekdaysFull: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n\n // Materialize modified\n weekdaysLetter: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n\n // Today and clear\n today: 'Today',\n clear: 'Clear',\n close: 'Ok',\n\n // Picker close behavior (Prevent a change in behaviour for backwards compatibility)\n closeOnSelect: false,\n\n // The format to show on the `input` element\n format: 'd mmmm, yyyy',\n\n // Classes\n klass: {\n\n table: prefix + 'table',\n\n header: prefix + 'header',\n\n // Materialize Added klasses\n date_display: prefix + 'date-display',\n day_display: prefix + 'day-display',\n month_display: prefix + 'month-display',\n year_display: prefix + 'year-display',\n calendar_container: prefix + 'calendar-container',\n // end\n\n\n navPrev: prefix + 'nav--prev',\n navNext: prefix + 'nav--next',\n navDisabled: prefix + 'nav--disabled',\n\n month: prefix + 'month',\n year: prefix + 'year',\n\n selectMonth: prefix + 'select--month',\n selectYear: prefix + 'select--year',\n\n weekdays: prefix + 'weekday',\n\n day: prefix + 'day',\n disabled: prefix + 'day--disabled',\n selected: prefix + 'day--selected',\n highlighted: prefix + 'day--highlighted',\n now: prefix + 'day--today',\n infocus: prefix + 'day--infocus',\n outfocus: prefix + 'day--outfocus',\n\n footer: prefix + 'footer',\n\n buttonClear: prefix + 'button--clear',\n buttonToday: prefix + 'button--today',\n buttonClose: prefix + 'button--close'\n }\n };\n }(Picker.klasses().picker + '__');\n\n /**\n * Extend the picker to add the date picker.\n */\n Picker.extend('pickadate', DatePicker);\n});\n; /*!\n * ClockPicker v0.0.7 (http://weareoutman.github.io/clockpicker/)\n * Copyright 2014 Wang Shenwei.\n * Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)\n *\n * Further modified\n * Copyright 2015 Ching Yaw Hao.\n */\n\n(function () {\n var $ = window.jQuery,\n $win = $(window),\n $doc = $(document);\n\n // Can I use inline svg ?\n var svgNS = 'http://www.w3.org/2000/svg',\n svgSupported = 'SVGAngle' in window && function () {\n var supported,\n el = document.createElement('div');\n el.innerHTML = '<svg/>';\n supported = (el.firstChild && el.firstChild.namespaceURI) == svgNS;\n el.innerHTML = '';\n return supported;\n }();\n\n // Can I use transition ?\n var transitionSupported = function () {\n var style = document.createElement('div').style;\n return 'transition' in style || 'WebkitTransition' in style || 'MozTransition' in style || 'msTransition' in style || 'OTransition' in style;\n }();\n\n // Listen touch events in touch screen device, instead of mouse events in desktop.\n var touchSupported = 'ontouchstart' in window,\n mousedownEvent = 'mousedown' + (touchSupported ? ' touchstart' : ''),\n mousemoveEvent = 'mousemove.clockpicker' + (touchSupported ? ' touchmove.clockpicker' : ''),\n mouseupEvent = 'mouseup.clockpicker' + (touchSupported ? ' touchend.clockpicker' : '');\n\n // Vibrate the device if supported\n var vibrate = navigator.vibrate ? 'vibrate' : navigator.webkitVibrate ? 'webkitVibrate' : null;\n\n function createSvgElement(name) {\n return document.createElementNS(svgNS, name);\n }\n\n function leadingZero(num) {\n return (num < 10 ? '0' : '') + num;\n }\n\n // Get a unique id\n var idCounter = 0;\n function uniqueId(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n }\n\n // Clock size\n var dialRadius = 135,\n outerRadius = 105,\n\n // innerRadius = 80 on 12 hour clock\n innerRadius = 80,\n tickRadius = 20,\n diameter = dialRadius * 2,\n duration = transitionSupported ? 350 : 1;\n\n // Popover template\n var tpl = ['<div class=\"clockpicker picker\">', '<div class=\"picker__holder\">', '<div class=\"picker__frame\">', '<div class=\"picker__wrap\">', '<div class=\"picker__box\">', '<div class=\"picker__date-display\">', '<div class=\"clockpicker-display\">', '<div class=\"clockpicker-display-column\">', '<span class=\"clockpicker-span-hours text-primary\"></span>', ':', '<span class=\"clockpicker-span-minutes\"></span>', '</div>', '<div class=\"clockpicker-display-column clockpicker-display-am-pm\">', '<div class=\"clockpicker-span-am-pm\"></div>', '</div>', '</div>', '</div>', '<div class=\"picker__container__wrapper\">', '<div class=\"picker__calendar-container\">', '<div class=\"clockpicker-plate\">', '<div class=\"clockpicker-canvas\"></div>', '<div class=\"clockpicker-dial clockpicker-hours\"></div>', '<div class=\"clockpicker-dial clockpicker-minutes clockpicker-dial-out\"></div>', '</div>', '<div class=\"clockpicker-am-pm-block\">', '</div>', '</div>', '<div class=\"picker__footer\">', '</div>', '</div>', '</div>', '</div>', '</div>', '</div>', '</div>'].join('');\n\n // ClockPicker\n function ClockPicker(element, options) {\n var popover = $(tpl),\n plate = popover.find('.clockpicker-plate'),\n holder = popover.find('.picker__holder'),\n hoursView = popover.find('.clockpicker-hours'),\n minutesView = popover.find('.clockpicker-minutes'),\n amPmBlock = popover.find('.clockpicker-am-pm-block'),\n isInput = element.prop('tagName') === 'INPUT',\n input = isInput ? element : element.find('input'),\n label = $(\"label[for=\" + input.attr(\"id\") + \"]\"),\n self = this;\n\n this.id = uniqueId('cp');\n this.element = element;\n this.holder = holder;\n this.options = options;\n this.isAppended = false;\n this.isShown = false;\n this.currentView = 'hours';\n this.isInput = isInput;\n this.input = input;\n this.label = label;\n this.popover = popover;\n this.plate = plate;\n this.hoursView = hoursView;\n this.minutesView = minutesView;\n this.amPmBlock = amPmBlock;\n this.spanHours = popover.find('.clockpicker-span-hours');\n this.spanMinutes = popover.find('.clockpicker-span-minutes');\n this.spanAmPm = popover.find('.clockpicker-span-am-pm');\n this.footer = popover.find('.picker__footer');\n this.amOrPm = \"PM\";\n\n // Setup for for 12 hour clock if option is selected\n if (options.twelvehour) {\n if (!options.ampmclickable) {\n this.spanAmPm.empty();\n $('<div id=\"click-am\">AM</div>').appendTo(this.spanAmPm);\n $('<div id=\"click-pm\">PM</div>').appendTo(this.spanAmPm);\n } else {\n this.spanAmPm.empty();\n $('<div id=\"click-am\">AM</div>').on(\"click\", function () {\n self.spanAmPm.children('#click-am').addClass(\"text-primary\");\n self.spanAmPm.children('#click-pm').removeClass(\"text-primary\");\n self.amOrPm = \"AM\";\n }).appendTo(this.spanAmPm);\n $('<div id=\"click-pm\">PM</div>').on(\"click\", function () {\n self.spanAmPm.children('#click-pm').addClass(\"text-primary\");\n self.spanAmPm.children('#click-am').removeClass(\"text-primary\");\n self.amOrPm = 'PM';\n }).appendTo(this.spanAmPm);\n }\n }\n\n // Add buttons to footer\n $('<button type=\"button\" class=\"btn-flat picker__clear\" tabindex=\"' + (options.twelvehour ? '3' : '1') + '\">' + options.cleartext + '</button>').click($.proxy(this.clear, this)).appendTo(this.footer);\n $('<button type=\"button\" class=\"btn-flat picker__close\" tabindex=\"' + (options.twelvehour ? '3' : '1') + '\">' + options.canceltext + '</button>').click($.proxy(this.hide, this)).appendTo(this.footer);\n $('<button type=\"button\" class=\"btn-flat picker__close\" tabindex=\"' + (options.twelvehour ? '3' : '1') + '\">' + options.donetext + '</button>').click($.proxy(this.done, this)).appendTo(this.footer);\n\n this.spanHours.click($.proxy(this.toggleView, this, 'hours'));\n this.spanMinutes.click($.proxy(this.toggleView, this, 'minutes'));\n\n // Show or toggle\n input.on('focus.clockpicker click.clockpicker', $.proxy(this.show, this));\n\n // Build ticks\n var tickTpl = $('<div class=\"clockpicker-tick\"></div>'),\n i,\n tick,\n radian,\n radius;\n\n // Hours view\n if (options.twelvehour) {\n for (i = 1; i < 13; i += 1) {\n tick = tickTpl.clone();\n radian = i / 6 * Math.PI;\n radius = outerRadius;\n tick.css({\n left: dialRadius + Math.sin(radian) * radius - tickRadius,\n top: dialRadius - Math.cos(radian) * radius - tickRadius\n });\n tick.html(i === 0 ? '00' : i);\n hoursView.append(tick);\n tick.on(mousedownEvent, mousedown);\n }\n } else {\n for (i = 0; i < 24; i += 1) {\n tick = tickTpl.clone();\n radian = i / 6 * Math.PI;\n var inner = i > 0 && i < 13;\n radius = inner ? innerRadius : outerRadius;\n tick.css({\n left: dialRadius + Math.sin(radian) * radius - tickRadius,\n top: dialRadius - Math.cos(radian) * radius - tickRadius\n });\n tick.html(i === 0 ? '00' : i);\n hoursView.append(tick);\n tick.on(mousedownEvent, mousedown);\n }\n }\n\n // Minutes view\n for (i = 0; i < 60; i += 5) {\n tick = tickTpl.clone();\n radian = i / 30 * Math.PI;\n tick.css({\n left: dialRadius + Math.sin(radian) * outerRadius - tickRadius,\n top: dialRadius - Math.cos(radian) * outerRadius - tickRadius\n });\n tick.html(leadingZero(i));\n minutesView.append(tick);\n tick.on(mousedownEvent, mousedown);\n }\n\n // Clicking on minutes view space\n plate.on(mousedownEvent, function (e) {\n if ($(e.target).closest('.clockpicker-tick').length === 0) {\n mousedown(e, true);\n }\n });\n\n // Mousedown or touchstart\n function mousedown(e, space) {\n var offset = plate.offset(),\n isTouch = /^touch/.test(e.type),\n x0 = offset.left + dialRadius,\n y0 = offset.top + dialRadius,\n dx = (isTouch ? e.originalEvent.touches[0] : e).pageX - x0,\n dy = (isTouch ? e.originalEvent.touches[0] : e).pageY - y0,\n z = Math.sqrt(dx * dx + dy * dy),\n moved = false;\n\n // When clicking on minutes view space, check the mouse position\n if (space && (z < outerRadius - tickRadius || z > outerRadius + tickRadius)) {\n return;\n }\n e.preventDefault();\n\n // Set cursor style of body after 200ms\n var movingTimer = setTimeout(function () {\n self.popover.addClass('clockpicker-moving');\n }, 200);\n\n // Clock\n self.setHand(dx, dy, !space, true);\n\n // Mousemove on document\n $doc.off(mousemoveEvent).on(mousemoveEvent, function (e) {\n e.preventDefault();\n var isTouch = /^touch/.test(e.type),\n x = (isTouch ? e.originalEvent.touches[0] : e).pageX - x0,\n y = (isTouch ? e.originalEvent.touches[0] : e).pageY - y0;\n if (!moved && x === dx && y === dy) {\n // Clicking in chrome on windows will trigger a mousemove event\n return;\n }\n moved = true;\n self.setHand(x, y, false, true);\n });\n\n // Mouseup on document\n $doc.off(mouseupEvent).on(mouseupEvent, function (e) {\n $doc.off(mouseupEvent);\n e.preventDefault();\n var isTouch = /^touch/.test(e.type),\n x = (isTouch ? e.originalEvent.changedTouches[0] : e).pageX - x0,\n y = (isTouch ? e.originalEvent.changedTouches[0] : e).pageY - y0;\n if ((space || moved) && x === dx && y === dy) {\n self.setHand(x, y);\n }\n\n if (self.currentView === 'hours') {\n self.toggleView('minutes', duration / 2);\n } else if (options.autoclose) {\n self.minutesView.addClass('clockpicker-dial-out');\n setTimeout(function () {\n self.done();\n }, duration / 2);\n }\n plate.prepend(canvas);\n\n // Reset cursor style of body\n clearTimeout(movingTimer);\n self.popover.removeClass('clockpicker-moving');\n\n // Unbind mousemove event\n $doc.off(mousemoveEvent);\n });\n }\n\n if (svgSupported) {\n // Draw clock hands and others\n var canvas = popover.find('.clockpicker-canvas'),\n svg = createSvgElement('svg');\n svg.setAttribute('class', 'clockpicker-svg');\n svg.setAttribute('width', diameter);\n svg.setAttribute('height', diameter);\n var g = createSvgElement('g');\n g.setAttribute('transform', 'translate(' + dialRadius + ',' + dialRadius + ')');\n var bearing = createSvgElement('circle');\n bearing.setAttribute('class', 'clockpicker-canvas-bearing');\n bearing.setAttribute('cx', 0);\n bearing.setAttribute('cy', 0);\n bearing.setAttribute('r', 4);\n var hand = createSvgElement('line');\n hand.setAttribute('x1', 0);\n hand.setAttribute('y1', 0);\n var bg = createSvgElement('circle');\n bg.setAttribute('class', 'clockpicker-canvas-bg');\n bg.setAttribute('r', tickRadius);\n g.appendChild(hand);\n g.appendChild(bg);\n g.appendChild(bearing);\n svg.appendChild(g);\n canvas.append(svg);\n\n this.hand = hand;\n this.bg = bg;\n this.bearing = bearing;\n this.g = g;\n this.canvas = canvas;\n }\n\n raiseCallback(this.options.init);\n }\n\n function raiseCallback(callbackFunction) {\n if (callbackFunction && typeof callbackFunction === \"function\") callbackFunction();\n }\n\n // Default options\n ClockPicker.DEFAULTS = {\n 'default': '', // default time, 'now' or '13:14' e.g.\n fromnow: 0, // set default time to * milliseconds from now (using with default = 'now')\n donetext: 'Ok', // done button text\n cleartext: 'Clear',\n canceltext: 'Cancel',\n autoclose: false, // auto close when minute is selected\n ampmclickable: true, // set am/pm button on itself\n darktheme: false, // set to dark theme\n twelvehour: true, // change to 12 hour AM/PM clock from 24 hour\n vibrate: true // vibrate the device when dragging clock hand\n };\n\n // Show or hide popover\n ClockPicker.prototype.toggle = function () {\n this[this.isShown ? 'hide' : 'show']();\n };\n\n // Set popover position\n ClockPicker.prototype.locate = function () {\n var element = this.element,\n popover = this.popover,\n offset = element.offset(),\n width = element.outerWidth(),\n height = element.outerHeight(),\n align = this.options.align,\n self = this;\n\n popover.show();\n };\n\n // Show popover\n ClockPicker.prototype.show = function (e) {\n // Not show again\n if (this.isShown) {\n return;\n }\n raiseCallback(this.options.beforeShow);\n $(':input').each(function () {\n $(this).attr('tabindex', -1);\n });\n var self = this;\n // Initialize\n this.input.blur();\n this.popover.addClass('picker--opened');\n this.input.addClass('picker__input picker__input--active');\n $(document.body).css('overflow', 'hidden');\n // Get the time\n var value = ((this.input.prop('value') || this.options['default'] || '') + '').split(':');\n if (this.options.twelvehour && !(typeof value[1] === 'undefined')) {\n if (value[1].indexOf(\"AM\") > 0) {\n this.amOrPm = 'AM';\n } else {\n this.amOrPm = 'PM';\n }\n value[1] = value[1].replace(\"AM\", \"\").replace(\"PM\", \"\");\n }\n if (value[0] === 'now') {\n var now = new Date(+new Date() + this.options.fromnow);\n value = [now.getHours(), now.getMinutes()];\n if (this.options.twelvehour) {\n this.amOrPm = value[0] >= 12 && value[0] < 24 ? 'PM' : 'AM';\n }\n }\n this.hours = +value[0] || 0;\n this.minutes = +value[1] || 0;\n this.spanHours.html(this.hours);\n this.spanMinutes.html(leadingZero(this.minutes));\n if (!this.isAppended) {\n // Append popover to body\n this.popover.insertAfter(this.input);\n if (this.options.twelvehour) {\n if (this.amOrPm === 'PM') {\n this.spanAmPm.children('#click-pm').addClass(\"text-primary\");\n this.spanAmPm.children('#click-am').removeClass(\"text-primary\");\n } else {\n this.spanAmPm.children('#click-am').addClass(\"text-primary\");\n this.spanAmPm.children('#click-pm').removeClass(\"text-primary\");\n }\n }\n // Reset position when resize\n $win.on('resize.clockpicker' + this.id, function () {\n if (self.isShown) {\n self.locate();\n }\n });\n this.isAppended = true;\n }\n // Toggle to hours view\n this.toggleView('hours');\n // Set position\n this.locate();\n this.isShown = true;\n // Hide when clicking or tabbing on any element except the clock and input\n $doc.on('click.clockpicker.' + this.id + ' focusin.clockpicker.' + this.id, function (e) {\n var target = $(e.target);\n if (target.closest(self.popover.find('.picker__wrap')).length === 0 && target.closest(self.input).length === 0) {\n self.hide();\n }\n });\n // Hide when ESC is pressed\n $doc.on('keyup.clockpicker.' + this.id, function (e) {\n if (e.keyCode === 27) {\n self.hide();\n }\n });\n raiseCallback(this.options.afterShow);\n };\n // Hide popover\n ClockPicker.prototype.hide = function () {\n raiseCallback(this.options.beforeHide);\n this.input.removeClass('picker__input picker__input--active');\n this.popover.removeClass('picker--opened');\n $(document.body).css('overflow', 'visible');\n this.isShown = false;\n $(':input').each(function (index) {\n $(this).attr('tabindex', index + 1);\n });\n // Unbinding events on document\n $doc.off('click.clockpicker.' + this.id + ' focusin.clockpicker.' + this.id);\n $doc.off('keyup.clockpicker.' + this.id);\n this.popover.hide();\n raiseCallback(this.options.afterHide);\n };\n // Toggle to hours or minutes view\n ClockPicker.prototype.toggleView = function (view, delay) {\n var raiseAfterHourSelect = false;\n if (view === 'minutes' && $(this.hoursView).css(\"visibility\") === \"visible\") {\n raiseCallback(this.options.beforeHourSelect);\n raiseAfterHourSelect = true;\n }\n var isHours = view === 'hours',\n nextView = isHours ? this.hoursView : this.minutesView,\n hideView = isHours ? this.minutesView : this.hoursView;\n this.currentView = view;\n\n this.spanHours.toggleClass('text-primary', isHours);\n this.spanMinutes.toggleClass('text-primary', !isHours);\n\n // Let's make transitions\n hideView.addClass('clockpicker-dial-out');\n nextView.css('visibility', 'visible').removeClass('clockpicker-dial-out');\n\n // Reset clock hand\n this.resetClock(delay);\n\n // After transitions ended\n clearTimeout(this.toggleViewTimer);\n this.toggleViewTimer = setTimeout(function () {\n hideView.css('visibility', 'hidden');\n }, duration);\n\n if (raiseAfterHourSelect) {\n raiseCallback(this.options.afterHourSelect);\n }\n };\n\n // Reset clock hand\n ClockPicker.prototype.resetClock = function (delay) {\n var view = this.currentView,\n value = this[view],\n isHours = view === 'hours',\n unit = Math.PI / (isHours ? 6 : 30),\n radian = value * unit,\n radius = isHours && value > 0 && value < 13 ? innerRadius : outerRadius,\n x = Math.sin(radian) * radius,\n y = -Math.cos(radian) * radius,\n self = this;\n\n if (svgSupported && delay) {\n self.canvas.addClass('clockpicker-canvas-out');\n setTimeout(function () {\n self.canvas.removeClass('clockpicker-canvas-out');\n self.setHand(x, y);\n }, delay);\n } else this.setHand(x, y);\n };\n\n // Set clock hand to (x, y)\n ClockPicker.prototype.setHand = function (x, y, roundBy5, dragging) {\n var radian = Math.atan2(x, -y),\n isHours = this.currentView === 'hours',\n unit = Math.PI / (isHours || roundBy5 ? 6 : 30),\n z = Math.sqrt(x * x + y * y),\n options = this.options,\n inner = isHours && z < (outerRadius + innerRadius) / 2,\n radius = inner ? innerRadius : outerRadius,\n value;\n\n if (options.twelvehour) {\n radius = outerRadius;\n }\n\n // Radian should in range [0, 2PI]\n if (radian < 0) {\n radian = Math.PI * 2 + radian;\n }\n\n // Get the round value\n value = Math.round(radian / unit);\n\n // Get the round radian\n radian = value * unit;\n\n // Correct the hours or minutes\n if (options.twelvehour) {\n if (isHours) {\n if (value === 0) value = 12;\n } else {\n if (roundBy5) value *= 5;\n if (value === 60) value = 0;\n }\n } else {\n if (isHours) {\n if (value === 12) value = 0;\n value = inner ? value === 0 ? 12 : value : value === 0 ? 0 : value + 12;\n } else {\n if (roundBy5) value *= 5;\n if (value === 60) value = 0;\n }\n }\n\n // Once hours or minutes changed, vibrate the device\n if (this[this.currentView] !== value) {\n if (vibrate && this.options.vibrate) {\n // Do not vibrate too frequently\n if (!this.vibrateTimer) {\n navigator[vibrate](10);\n this.vibrateTimer = setTimeout($.proxy(function () {\n this.vibrateTimer = null;\n }, this), 100);\n }\n }\n }\n\n this[this.currentView] = value;\n if (isHours) {\n this['spanHours'].html(value);\n } else {\n this['spanMinutes'].html(leadingZero(value));\n }\n\n // If svg is not supported, just add an active class to the tick\n if (!svgSupported) {\n this[isHours ? 'hoursView' : 'minutesView'].find('.clockpicker-tick').each(function () {\n var tick = $(this);\n tick.toggleClass('active', value === +tick.html());\n });\n return;\n }\n\n // Set clock hand and others' position\n var cx1 = Math.sin(radian) * (radius - tickRadius),\n cy1 = -Math.cos(radian) * (radius - tickRadius),\n cx2 = Math.sin(radian) * radius,\n cy2 = -Math.cos(radian) * radius;\n this.hand.setAttribute('x2', cx1);\n this.hand.setAttribute('y2', cy1);\n this.bg.setAttribute('cx', cx2);\n this.bg.setAttribute('cy', cy2);\n };\n\n // Hours and minutes are selected\n ClockPicker.prototype.done = function () {\n raiseCallback(this.options.beforeDone);\n this.hide();\n this.label.addClass('active');\n\n var last = this.input.prop('value'),\n value = leadingZero(this.hours) + ':' + leadingZero(this.minutes);\n if (this.options.twelvehour) {\n value = value + this.amOrPm;\n }\n\n this.input.prop('value', value);\n if (value !== last) {\n this.input.triggerHandler('change');\n if (!this.isInput) {\n this.element.trigger('change');\n }\n }\n\n if (this.options.autoclose) this.input.trigger('blur');\n\n raiseCallback(this.options.afterDone);\n };\n\n // Clear input field\n ClockPicker.prototype.clear = function () {\n this.hide();\n this.label.removeClass('active');\n\n var last = this.input.prop('value'),\n value = '';\n\n this.input.prop('value', value);\n if (value !== last) {\n this.input.triggerHandler('change');\n if (!this.isInput) {\n this.element.trigger('change');\n }\n }\n\n if (this.options.autoclose) {\n this.input.trigger('blur');\n }\n };\n\n // Remove clockpicker from input\n ClockPicker.prototype.remove = function () {\n this.element.removeData('clockpicker');\n this.input.off('focus.clockpicker click.clockpicker');\n if (this.isShown) {\n this.hide();\n }\n if (this.isAppended) {\n $win.off('resize.clockpicker' + this.id);\n this.popover.remove();\n }\n };\n\n // Extends $.fn.clockpicker\n $.fn.pickatime = function (option) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.each(function () {\n var $this = $(this),\n data = $this.data('clockpicker');\n if (!data) {\n var options = $.extend({}, ClockPicker.DEFAULTS, $this.data(), typeof option == 'object' && option);\n $this.data('clockpicker', new ClockPicker($this, options));\n } else {\n // Manual operatsions. show, hide, remove, e.g.\n if (typeof data[option] === 'function') {\n data[option].apply(data, args);\n }\n }\n });\n };\n})();\n;(function ($) {\n\n $.fn.characterCounter = function () {\n return this.each(function () {\n var $input = $(this);\n var $counterElement = $input.parent().find('span[class=\"character-counter\"]');\n\n // character counter has already been added appended to the parent container\n if ($counterElement.length) {\n return;\n }\n\n var itHasLengthAttribute = $input.attr('data-length') !== undefined;\n\n if (itHasLengthAttribute) {\n $input.on('input', updateCounter);\n $input.on('focus', updateCounter);\n $input.on('blur', removeCounterElement);\n\n addCounterElement($input);\n }\n });\n };\n\n function updateCounter() {\n var maxLength = +$(this).attr('data-length'),\n actualLength = +$(this).val().length,\n isValidLength = actualLength <= maxLength;\n\n $(this).parent().find('span[class=\"character-counter\"]').html(actualLength + '/' + maxLength);\n\n addInputStyle(isValidLength, $(this));\n }\n\n function addCounterElement($input) {\n var $counterElement = $input.parent().find('span[class=\"character-counter\"]');\n\n if ($counterElement.length) {\n return;\n }\n\n $counterElement = $('<span/>').addClass('character-counter').css('float', 'right').css('font-size', '12px').css('height', 1);\n\n $input.parent().append($counterElement);\n }\n\n function removeCounterElement() {\n $(this).parent().find('span[class=\"character-counter\"]').html('');\n }\n\n function addInputStyle(isValidLength, $input) {\n var inputHasInvalidClass = $input.hasClass('invalid');\n if (isValidLength && inputHasInvalidClass) {\n $input.removeClass('invalid');\n } else if (!isValidLength && !inputHasInvalidClass) {\n $input.removeClass('valid');\n $input.addClass('invalid');\n }\n }\n\n $(document).ready(function () {\n $('input, textarea').characterCounter();\n });\n})(jQuery);\n;(function ($) {\n\n var methods = {\n\n init: function (options) {\n var defaults = {\n duration: 200, // ms\n dist: -100, // zoom scale TODO: make this more intuitive as an option\n shift: 0, // spacing for center image\n padding: 0, // Padding between non center items\n fullWidth: false, // Change to full width styles\n indicators: false, // Toggle indicators\n noWrap: false, // Don't wrap around and cycle through items.\n onCycleTo: null // Callback for when a new slide is cycled to.\n };\n options = $.extend(defaults, options);\n var namespace = Materialize.objectSelectorString($(this));\n\n return this.each(function (i) {\n\n var images, item_width, item_height, offset, center, pressed, dim, count, reference, referenceY, amplitude, target, velocity, scrolling, xform, frame, timestamp, ticker, dragged, vertical_dragged;\n var $indicators = $('<ul class=\"indicators\"></ul>');\n var scrollingTimeout = null;\n var oneTimeCallback = null;\n\n // Initialize\n var view = $(this);\n var hasMultipleSlides = view.find('.carousel-item').length > 1;\n var showIndicators = (view.attr('data-indicators') || options.indicators) && hasMultipleSlides;\n var noWrap = view.attr('data-no-wrap') || options.noWrap || !hasMultipleSlides;\n var uniqueNamespace = view.attr('data-namespace') || namespace + i;\n view.attr('data-namespace', uniqueNamespace);\n\n // Options\n var setCarouselHeight = function (imageOnly) {\n var firstSlide = view.find('.carousel-item.active').length ? view.find('.carousel-item.active').first() : view.find('.carousel-item').first();\n var firstImage = firstSlide.find('img').first();\n if (firstImage.length) {\n if (firstImage[0].complete) {\n // If image won't trigger the load event\n var imageHeight = firstImage.height();\n if (imageHeight > 0) {\n view.css('height', firstImage.height());\n } else {\n // If image still has no height, use the natural dimensions to calculate\n var naturalWidth = firstImage[0].naturalWidth;\n var naturalHeight = firstImage[0].naturalHeight;\n var adjustedHeight = view.width() / naturalWidth * naturalHeight;\n view.css('height', adjustedHeight);\n }\n } else {\n // Get height when image is loaded normally\n firstImage.on('load', function () {\n view.css('height', $(this).height());\n });\n }\n } else if (!imageOnly) {\n var slideHeight = firstSlide.height();\n view.css('height', slideHeight);\n }\n };\n\n if (options.fullWidth) {\n options.dist = 0;\n setCarouselHeight();\n\n // Offset fixed items when indicators.\n if (showIndicators) {\n view.find('.carousel-fixed-item').addClass('with-indicators');\n }\n }\n\n // Don't double initialize.\n if (view.hasClass('initialized')) {\n // Recalculate variables\n $(window).trigger('resize');\n\n // Redraw carousel.\n view.trigger('carouselNext', [0.000001]);\n return true;\n }\n\n view.addClass('initialized');\n pressed = false;\n offset = target = 0;\n images = [];\n item_width = view.find('.carousel-item').first().innerWidth();\n item_height = view.find('.carousel-item').first().innerHeight();\n dim = item_width * 2 + options.padding;\n\n view.find('.carousel-item').each(function (i) {\n images.push($(this)[0]);\n if (showIndicators) {\n var $indicator = $('<li class=\"indicator-item\"></li>');\n\n // Add active to first by default.\n if (i === 0) {\n $indicator.addClass('active');\n }\n\n // Handle clicks on indicators.\n $indicator.click(function (e) {\n e.stopPropagation();\n\n var index = $(this).index();\n cycleTo(index);\n });\n $indicators.append($indicator);\n }\n });\n\n if (showIndicators) {\n view.append($indicators);\n }\n count = images.length;\n\n function setupEvents() {\n if (typeof window.ontouchstart !== 'undefined') {\n view.on('touchstart.carousel', tap);\n view.on('touchmove.carousel', drag);\n view.on('touchend.carousel', release);\n }\n view.on('mousedown.carousel', tap);\n view.on('mousemove.carousel', drag);\n view.on('mouseup.carousel', release);\n view.on('mouseleave.carousel', release);\n view.on('click.carousel', click);\n }\n\n function xpos(e) {\n // touch event\n if (e.targetTouches && e.targetTouches.length >= 1) {\n return e.targetTouches[0].clientX;\n }\n\n // mouse event\n return e.clientX;\n }\n\n function ypos(e) {\n // touch event\n if (e.targetTouches && e.targetTouches.length >= 1) {\n return e.targetTouches[0].clientY;\n }\n\n // mouse event\n return e.clientY;\n }\n\n function wrap(x) {\n return x >= count ? x % count : x < 0 ? wrap(count + x % count) : x;\n }\n\n function scroll(x) {\n // Track scrolling state\n scrolling = true;\n if (!view.hasClass('scrolling')) {\n view.addClass('scrolling');\n }\n if (scrollingTimeout != null) {\n window.clearTimeout(scrollingTimeout);\n }\n scrollingTimeout = window.setTimeout(function () {\n scrolling = false;\n view.removeClass('scrolling');\n }, options.duration);\n\n // Start actual scroll\n var i, half, delta, dir, tween, el, alignment, xTranslation;\n var lastCenter = center;\n\n offset = typeof x === 'number' ? x : offset;\n center = Math.floor((offset + dim / 2) / dim);\n delta = offset - center * dim;\n dir = delta < 0 ? 1 : -1;\n tween = -dir * delta * 2 / dim;\n half = count >> 1;\n\n if (!options.fullWidth) {\n alignment = 'translateX(' + (view[0].clientWidth - item_width) / 2 + 'px) ';\n alignment += 'translateY(' + (view[0].clientHeight - item_height) / 2 + 'px)';\n } else {\n alignment = 'translateX(0)';\n }\n\n // Set indicator active\n if (showIndicators) {\n var diff = center % count;\n var activeIndicator = $indicators.find('.indicator-item.active');\n if (activeIndicator.index() !== diff) {\n activeIndicator.removeClass('active');\n $indicators.find('.indicator-item').eq(diff).addClass('active');\n }\n }\n\n // center\n // Don't show wrapped items.\n if (!noWrap || center >= 0 && center < count) {\n el = images[wrap(center)];\n\n // Add active class to center item.\n if (!$(el).hasClass('active')) {\n view.find('.carousel-item').removeClass('active');\n $(el).addClass('active');\n }\n el.style[xform] = alignment + ' translateX(' + -delta / 2 + 'px)' + ' translateX(' + dir * options.shift * tween * i + 'px)' + ' translateZ(' + options.dist * tween + 'px)';\n el.style.zIndex = 0;\n if (options.fullWidth) {\n tweenedOpacity = 1;\n } else {\n tweenedOpacity = 1 - 0.2 * tween;\n }\n el.style.opacity = tweenedOpacity;\n el.style.display = 'block';\n }\n\n for (i = 1; i <= half; ++i) {\n // right side\n if (options.fullWidth) {\n zTranslation = options.dist;\n tweenedOpacity = i === half && delta < 0 ? 1 - tween : 1;\n } else {\n zTranslation = options.dist * (i * 2 + tween * dir);\n tweenedOpacity = 1 - 0.2 * (i * 2 + tween * dir);\n }\n // Don't show wrapped items.\n if (!noWrap || center + i < count) {\n el = images[wrap(center + i)];\n el.style[xform] = alignment + ' translateX(' + (options.shift + (dim * i - delta) / 2) + 'px)' + ' translateZ(' + zTranslation + 'px)';\n el.style.zIndex = -i;\n el.style.opacity = tweenedOpacity;\n el.style.display = 'block';\n }\n\n // left side\n if (options.fullWidth) {\n zTranslation = options.dist;\n tweenedOpacity = i === half && delta > 0 ? 1 - tween : 1;\n } else {\n zTranslation = options.dist * (i * 2 - tween * dir);\n tweenedOpacity = 1 - 0.2 * (i * 2 - tween * dir);\n }\n // Don't show wrapped items.\n if (!noWrap || center - i >= 0) {\n el = images[wrap(center - i)];\n el.style[xform] = alignment + ' translateX(' + (-options.shift + (-dim * i - delta) / 2) + 'px)' + ' translateZ(' + zTranslation + 'px)';\n el.style.zIndex = -i;\n el.style.opacity = tweenedOpacity;\n el.style.display = 'block';\n }\n }\n\n // center\n // Don't show wrapped items.\n if (!noWrap || center >= 0 && center < count) {\n el = images[wrap(center)];\n el.style[xform] = alignment + ' translateX(' + -delta / 2 + 'px)' + ' translateX(' + dir * options.shift * tween + 'px)' + ' translateZ(' + options.dist * tween + 'px)';\n el.style.zIndex = 0;\n if (options.fullWidth) {\n tweenedOpacity = 1;\n } else {\n tweenedOpacity = 1 - 0.2 * tween;\n }\n el.style.opacity = tweenedOpacity;\n el.style.display = 'block';\n }\n\n // onCycleTo callback\n if (lastCenter !== center && typeof options.onCycleTo === \"function\") {\n var $curr_item = view.find('.carousel-item').eq(wrap(center));\n options.onCycleTo.call(this, $curr_item, dragged);\n }\n\n // One time callback\n if (typeof oneTimeCallback === \"function\") {\n oneTimeCallback.call(this, $curr_item, dragged);\n oneTimeCallback = null;\n }\n }\n\n function track() {\n var now, elapsed, delta, v;\n\n now = Date.now();\n elapsed = now - timestamp;\n timestamp = now;\n delta = offset - frame;\n frame = offset;\n\n v = 1000 * delta / (1 + elapsed);\n velocity = 0.8 * v + 0.2 * velocity;\n }\n\n function autoScroll() {\n var elapsed, delta;\n\n if (amplitude) {\n elapsed = Date.now() - timestamp;\n delta = amplitude * Math.exp(-elapsed / options.duration);\n if (delta > 2 || delta < -2) {\n scroll(target - delta);\n requestAnimationFrame(autoScroll);\n } else {\n scroll(target);\n }\n }\n }\n\n function click(e) {\n // Disable clicks if carousel was dragged.\n if (dragged) {\n e.preventDefault();\n e.stopPropagation();\n return false;\n } else if (!options.fullWidth) {\n var clickedIndex = $(e.target).closest('.carousel-item').index();\n var diff = wrap(center) - clickedIndex;\n\n // Disable clicks if carousel was shifted by click\n if (diff !== 0) {\n e.preventDefault();\n e.stopPropagation();\n }\n cycleTo(clickedIndex);\n }\n }\n\n function cycleTo(n) {\n var diff = center % count - n;\n\n // Account for wraparound.\n if (!noWrap) {\n if (diff < 0) {\n if (Math.abs(diff + count) < Math.abs(diff)) {\n diff += count;\n }\n } else if (diff > 0) {\n if (Math.abs(diff - count) < diff) {\n diff -= count;\n }\n }\n }\n\n // Call prev or next accordingly.\n if (diff < 0) {\n view.trigger('carouselNext', [Math.abs(diff)]);\n } else if (diff > 0) {\n view.trigger('carouselPrev', [diff]);\n }\n }\n\n function tap(e) {\n // Fixes firefox draggable image bug\n if (e.type === 'mousedown' && $(e.target).is('img')) {\n e.preventDefault();\n }\n pressed = true;\n dragged = false;\n vertical_dragged = false;\n reference = xpos(e);\n referenceY = ypos(e);\n\n velocity = amplitude = 0;\n frame = offset;\n timestamp = Date.now();\n clearInterval(ticker);\n ticker = setInterval(track, 100);\n }\n\n function drag(e) {\n var x, delta, deltaY;\n if (pressed) {\n x = xpos(e);\n y = ypos(e);\n delta = reference - x;\n deltaY = Math.abs(referenceY - y);\n if (deltaY < 30 && !vertical_dragged) {\n // If vertical scrolling don't allow dragging.\n if (delta > 2 || delta < -2) {\n dragged = true;\n reference = x;\n scroll(offset + delta);\n }\n } else if (dragged) {\n // If dragging don't allow vertical scroll.\n e.preventDefault();\n e.stopPropagation();\n return false;\n } else {\n // Vertical scrolling.\n vertical_dragged = true;\n }\n }\n\n if (dragged) {\n // If dragging don't allow vertical scroll.\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n\n function release(e) {\n if (pressed) {\n pressed = false;\n } else {\n return;\n }\n\n clearInterval(ticker);\n target = offset;\n if (velocity > 10 || velocity < -10) {\n amplitude = 0.9 * velocity;\n target = offset + amplitude;\n }\n target = Math.round(target / dim) * dim;\n\n // No wrap of items.\n if (noWrap) {\n if (target >= dim * (count - 1)) {\n target = dim * (count - 1);\n } else if (target < 0) {\n target = 0;\n }\n }\n amplitude = target - offset;\n timestamp = Date.now();\n requestAnimationFrame(autoScroll);\n\n if (dragged) {\n e.preventDefault();\n e.stopPropagation();\n }\n return false;\n }\n\n xform = 'transform';\n ['webkit', 'Moz', 'O', 'ms'].every(function (prefix) {\n var e = prefix + 'Transform';\n if (typeof document.body.style[e] !== 'undefined') {\n xform = e;\n return false;\n }\n return true;\n });\n\n var throttledResize = Materialize.throttle(function () {\n if (options.fullWidth) {\n item_width = view.find('.carousel-item').first().innerWidth();\n var imageHeight = view.find('.carousel-item.active').height();\n dim = item_width * 2 + options.padding;\n offset = center * 2 * item_width;\n target = offset;\n setCarouselHeight(true);\n } else {\n scroll();\n }\n }, 200);\n $(window).off('resize.carousel-' + uniqueNamespace).on('resize.carousel-' + uniqueNamespace, throttledResize);\n\n setupEvents();\n scroll(offset);\n\n $(this).on('carouselNext', function (e, n, callback) {\n if (n === undefined) {\n n = 1;\n }\n if (typeof callback === \"function\") {\n oneTimeCallback = callback;\n }\n\n target = dim * Math.round(offset / dim) + dim * n;\n if (offset !== target) {\n amplitude = target - offset;\n timestamp = Date.now();\n requestAnimationFrame(autoScroll);\n }\n });\n\n $(this).on('carouselPrev', function (e, n, callback) {\n if (n === undefined) {\n n = 1;\n }\n if (typeof callback === \"function\") {\n oneTimeCallback = callback;\n }\n\n target = dim * Math.round(offset / dim) - dim * n;\n if (offset !== target) {\n amplitude = target - offset;\n timestamp = Date.now();\n requestAnimationFrame(autoScroll);\n }\n });\n\n $(this).on('carouselSet', function (e, n, callback) {\n if (n === undefined) {\n n = 0;\n }\n if (typeof callback === \"function\") {\n oneTimeCallback = callback;\n }\n\n cycleTo(n);\n });\n });\n },\n next: function (n, callback) {\n $(this).trigger('carouselNext', [n, callback]);\n },\n prev: function (n, callback) {\n $(this).trigger('carouselPrev', [n, callback]);\n },\n set: function (n, callback) {\n $(this).trigger('carouselSet', [n, callback]);\n },\n destroy: function () {\n var uniqueNamespace = $(this).attr('data-namespace');\n $(this).removeAttr('data-namespace');\n $(this).removeClass('initialized');\n $(this).find('.indicators').remove();\n\n // Remove event handlers\n $(this).off('carouselNext carouselPrev carouselSet');\n $(window).off('resize.carousel-' + uniqueNamespace);\n if (typeof window.ontouchstart !== 'undefined') {\n $(this).off('touchstart.carousel touchmove.carousel touchend.carousel');\n }\n $(this).off('mousedown.carousel mousemove.carousel mouseup.carousel mouseleave.carousel click.carousel');\n }\n };\n\n $.fn.carousel = function (methodOrOptions) {\n if (methods[methodOrOptions]) {\n return methods[methodOrOptions].apply(this, Array.prototype.slice.call(arguments, 1));\n } else if (typeof methodOrOptions === 'object' || !methodOrOptions) {\n // Default to \"init\"\n return methods.init.apply(this, arguments);\n } else {\n $.error('Method ' + methodOrOptions + ' does not exist on jQuery.carousel');\n }\n }; // Plugin end\n})(jQuery);\n;(function ($) {\n\n var methods = {\n init: function (options) {\n return this.each(function () {\n var origin = $('#' + $(this).attr('data-activates'));\n var screen = $('body');\n\n // Creating tap target\n var tapTargetEl = $(this);\n var tapTargetWrapper = tapTargetEl.parent('.tap-target-wrapper');\n var tapTargetWave = tapTargetWrapper.find('.tap-target-wave');\n var tapTargetOriginEl = tapTargetWrapper.find('.tap-target-origin');\n var tapTargetContentEl = tapTargetEl.find('.tap-target-content');\n\n // Creating wrapper\n if (!tapTargetWrapper.length) {\n tapTargetWrapper = tapTargetEl.wrap($('<div class=\"tap-target-wrapper\"></div>')).parent();\n }\n\n // Creating content\n if (!tapTargetContentEl.length) {\n tapTargetContentEl = $('<div class=\"tap-target-content\"></div>');\n tapTargetEl.append(tapTargetContentEl);\n }\n\n // Creating foreground wave\n if (!tapTargetWave.length) {\n tapTargetWave = $('<div class=\"tap-target-wave\"></div>');\n\n // Creating origin\n if (!tapTargetOriginEl.length) {\n tapTargetOriginEl = origin.clone(true, true);\n tapTargetOriginEl.addClass('tap-target-origin');\n tapTargetOriginEl.removeAttr('id');\n tapTargetOriginEl.removeAttr('style');\n tapTargetWave.append(tapTargetOriginEl);\n }\n\n tapTargetWrapper.append(tapTargetWave);\n }\n\n // Open\n var openTapTarget = function () {\n if (tapTargetWrapper.is('.open')) {\n return;\n }\n\n // Adding open class\n tapTargetWrapper.addClass('open');\n\n setTimeout(function () {\n tapTargetOriginEl.off('click.tapTarget').on('click.tapTarget', function (e) {\n closeTapTarget();\n tapTargetOriginEl.off('click.tapTarget');\n });\n\n $(document).off('click.tapTarget').on('click.tapTarget', function (e) {\n closeTapTarget();\n $(document).off('click.tapTarget');\n });\n\n var throttledCalc = Materialize.throttle(function () {\n calculateTapTarget();\n }, 200);\n $(window).off('resize.tapTarget').on('resize.tapTarget', throttledCalc);\n }, 0);\n };\n\n // Close\n var closeTapTarget = function () {\n if (!tapTargetWrapper.is('.open')) {\n return;\n }\n\n tapTargetWrapper.removeClass('open');\n tapTargetOriginEl.off('click.tapTarget');\n $(document).off('click.tapTarget');\n $(window).off('resize.tapTarget');\n };\n\n // Pre calculate\n var calculateTapTarget = function () {\n // Element or parent is fixed position?\n var isFixed = origin.css('position') === 'fixed';\n if (!isFixed) {\n var parents = origin.parents();\n for (var i = 0; i < parents.length; i++) {\n isFixed = $(parents[i]).css('position') == 'fixed';\n if (isFixed) {\n break;\n }\n }\n }\n\n // Calculating origin\n var originWidth = origin.outerWidth();\n var originHeight = origin.outerHeight();\n var originTop = isFixed ? origin.offset().top - $(document).scrollTop() : origin.offset().top;\n var originLeft = isFixed ? origin.offset().left - $(document).scrollLeft() : origin.offset().left;\n\n // Calculating screen\n var windowWidth = $(window).width();\n var windowHeight = $(window).height();\n var centerX = windowWidth / 2;\n var centerY = windowHeight / 2;\n var isLeft = originLeft <= centerX;\n var isRight = originLeft > centerX;\n var isTop = originTop <= centerY;\n var isBottom = originTop > centerY;\n var isCenterX = originLeft >= windowWidth * 0.25 && originLeft <= windowWidth * 0.75;\n var isCenterY = originTop >= windowHeight * 0.25 && originTop <= windowHeight * 0.75;\n\n // Calculating tap target\n var tapTargetWidth = tapTargetEl.outerWidth();\n var tapTargetHeight = tapTargetEl.outerHeight();\n var tapTargetTop = originTop + originHeight / 2 - tapTargetHeight / 2;\n var tapTargetLeft = originLeft + originWidth / 2 - tapTargetWidth / 2;\n var tapTargetPosition = isFixed ? 'fixed' : 'absolute';\n\n // Calculating content\n var tapTargetTextWidth = isCenterX ? tapTargetWidth : tapTargetWidth / 2 + originWidth;\n var tapTargetTextHeight = tapTargetHeight / 2;\n var tapTargetTextTop = isTop ? tapTargetHeight / 2 : 0;\n var tapTargetTextBottom = 0;\n var tapTargetTextLeft = isLeft && !isCenterX ? tapTargetWidth / 2 - originWidth : 0;\n var tapTargetTextRight = 0;\n var tapTargetTextPadding = originWidth;\n var tapTargetTextAlign = isBottom ? 'bottom' : 'top';\n\n // Calculating wave\n var tapTargetWaveWidth = originWidth > originHeight ? originWidth * 2 : originWidth * 2;\n var tapTargetWaveHeight = tapTargetWaveWidth;\n var tapTargetWaveTop = tapTargetHeight / 2 - tapTargetWaveHeight / 2;\n var tapTargetWaveLeft = tapTargetWidth / 2 - tapTargetWaveWidth / 2;\n\n // Setting tap target\n var tapTargetWrapperCssObj = {};\n tapTargetWrapperCssObj.top = isTop ? tapTargetTop : '';\n tapTargetWrapperCssObj.right = isRight ? windowWidth - tapTargetLeft - tapTargetWidth : '';\n tapTargetWrapperCssObj.bottom = isBottom ? windowHeight - tapTargetTop - tapTargetHeight : '';\n tapTargetWrapperCssObj.left = isLeft ? tapTargetLeft : '';\n tapTargetWrapperCssObj.position = tapTargetPosition;\n tapTargetWrapper.css(tapTargetWrapperCssObj);\n\n // Setting content\n tapTargetContentEl.css({\n width: tapTargetTextWidth,\n height: tapTargetTextHeight,\n top: tapTargetTextTop,\n right: tapTargetTextRight,\n bottom: tapTargetTextBottom,\n left: tapTargetTextLeft,\n padding: tapTargetTextPadding,\n verticalAlign: tapTargetTextAlign\n });\n\n // Setting wave\n tapTargetWave.css({\n top: tapTargetWaveTop,\n left: tapTargetWaveLeft,\n width: tapTargetWaveWidth,\n height: tapTargetWaveHeight\n });\n };\n\n if (options == 'open') {\n calculateTapTarget();\n openTapTarget();\n }\n\n if (options == 'close') closeTapTarget();\n });\n },\n open: function () {},\n close: function () {}\n };\n\n $.fn.tapTarget = function (methodOrOptions) {\n if (methods[methodOrOptions] || typeof methodOrOptions === 'object') return methods.init.apply(this, arguments);\n\n $.error('Method ' + methodOrOptions + ' does not exist on jQuery.tap-target');\n };\n})(jQuery);\n"}},[4]);
\No newline at end of file