webpackJsonp([2,3],{

/***/ 411:
/***/ function(module, exports) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
module.exports = function(src) {
	if (typeof execScript !== "undefined")
		execScript(src);
	else
		eval.call(null, src);
}


/***/ },

/***/ 415:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(411)(__webpack_require__(690))

/***/ },

/***/ 416:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(411)(__webpack_require__(697))

/***/ },

/***/ 690:
/***/ function(module, exports) {

module.exports = "/*!\n * jQuery JavaScript Library v3.1.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2016-09-22T22:30Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\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// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar document = window.document;\n\nvar getProto = Object.getPrototypeOf;\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 fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\n\n\n\tfunction DOMEval( code, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar script = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.1.1\",\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.0 only\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 = /-([a-z])/g,\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// 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\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\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\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// As of jQuery 3.0, isNumeric is limited to\n\t\t// strings and numbers (primitives or objects)\n\t\t// that can be coerced to finite numbers (gh-2662)\n\t\tvar type = jQuery.type( obj );\n\t\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t\t// subtraction forces infinities to NaN\n\t\t\t!isNaN( obj - parseFloat( obj ) );\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\n\t\t/* eslint-disable no-unused-vars */\n\t\t// See https://github.com/eslint/eslint/issues/6125\n\t\tvar name;\n\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 <=2.3 only (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\tDOMEval( code );\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Support: IE <=9 - 11, Edge 12 - 13\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.0 only\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\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\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\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\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: real iOS 8.2 only (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.3.3\n * https://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-08-08\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// 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// https://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-]|[^\\0-\\\\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\n\t// CSS escapes\n\t// 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// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\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\tdisabledAncestor = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && (\"form\" in elem || \"label\" in elem);\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\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, 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( rcssescape, fcssescape );\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\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = \"#\" + nid + \" \" + 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 element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement(\"fieldset\");\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\t\t// release memory in IE\n\t\tel = 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\ta.sourceIndex - b.sourceIndex;\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 :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tdisabledAncestor( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\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, subWindow,\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 ( preferredDoc !== document &&\n\t\t(subWindow = document.defaultView) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.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( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.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( el ) {\n\t\tel.appendChild( document.createComment(\"\") );\n\t\treturn !el.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 programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID filter and find\n\tif ( support.getById ) {\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\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\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\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( (elem = elems[i++]) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\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 https://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( el ) {\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// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).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// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.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 ( !el.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 ( !el.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 ( !el.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 sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\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\tel.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 ( el.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 ( el.querySelectorAll(\":enabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll(\":disabled\").length !== 2 ) {\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\tel.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( el ) {\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( el, \"*\" );\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( el, \"[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.escape = function( sel ) {\n\treturn (sel + \"\").replace( rcssescape, fcssescape );\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\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\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\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"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\treturn false;\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 ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( (oldCache = uniqueCache[ key ]) &&\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[ key ] = 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\treturn false;\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\tcontext.nodeType === 9 && documentIsHTML && Expr.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( el ) {\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement(\"fieldset\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.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( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.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( el ) {\n\treturn el.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;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\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 = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\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\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Simple selector that can be filtered directly, removing non-Elements\n\tif ( risSimple.test( qualifier ) ) {\n\t\treturn jQuery.filter( qualifier, elements, not );\n\t}\n\n\t// Complex selector, compare the two sets, removing non-Elements\n\tqualifier = jQuery.filter( qualifier, elements );\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\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\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\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\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : 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\t// Shortcut simple #id case for speed\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\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\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[ 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\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\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\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 rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], 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 && !firing ) {\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\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && jQuery.isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Support: Android 4.0 only\n\t\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\t\tresolve.call( undefined, value );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.call( undefined, value );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\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\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\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,\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\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( jQuery.isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\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 jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tjQuery.isFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tjQuery.isFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tjQuery.isFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\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// 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[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = 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(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\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( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the master Deferred\n\t\t\tmaster = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tmaster.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( master.state() === \"pending\" ||\n\t\t\t\tjQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn master.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), master.reject );\n\t\t}\n\n\t\treturn master.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\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\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\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\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? 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\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\tcache: function( owner ) {\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\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ jQuery.camelCase( 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[ jQuery.camelCase( 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\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\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\treturn this.get( owner, 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,\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\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 key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( jQuery.camelCase );\n\t\t\t} else {\n\t\t\t\tkey = jQuery.camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ 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://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\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 getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\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 = getData( data );\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: IE 11 only\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;\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// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\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, key );\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\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\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 isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tjQuery.contains( elem.ownerDocument, elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\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\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() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\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}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\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\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\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 ( isHiddenWithinTree( 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} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]+)/i );\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: IE <=9 only\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: IE <=9 only\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: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\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.0 only, PhantomJS 1 only\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.0 only, PhantomJS 1 only\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 only\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: Android <=4.1 only\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 only\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} )();\nvar documentElement = document.documentElement;\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: IE <=9 only\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// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, 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( rnothtmlwhite ) || [ \"\" ];\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( rnothtmlwhite ) || [ \"\" ];\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( nativeEvent ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tvar event = jQuery.event.fix( nativeEvent );\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\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\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\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, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && 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 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\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 ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ 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 ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\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\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: jQuery.isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\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 <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (#504, #13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\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// https://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// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\n\twhich: function( event ) {\n\t\tvar button = event.button;\n\n\t\t// Add which for key events\n\t\tif ( event.which == null && rkeyEvent.test( event.type ) ) {\n\t\t\treturn event.charCode != null ? event.charCode : event.keyCode;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\tif ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {\n\t\t\tif ( button & 1 ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif ( button & 2 ) {\n\t\t\t\treturn 3;\n\t\t\t}\n\n\t\t\tif ( button & 4 ) {\n\t\t\t\treturn 2;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn event.which;\n\t}\n}, jQuery.event.addProp );\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://bugs.chromium.org/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\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\n\t/* eslint-disable max-len */\n\n\t// See https://github.com/eslint/eslint/issues/3229\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,\n\n\t/* eslint-enable */\n\n\t// Support: IE <=10 - 11, Edge 12 - 13\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\nfunction manipulationTarget( elem, content ) {\n\tif ( jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn elem.getElementsByTagName( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\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.0 only, PhantomJS 1 only\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\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), doc );\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: https://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\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: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\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 only, 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\n\n\n( function() {\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\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdiv.style.cssText =\n\t\t\t\"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\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\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\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\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: IE <=9 - 11 only\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\tjQuery.extend( support, {\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelMarginRight: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelMarginRightVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\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\n\t// Support: IE <=9 only\n\t// getPropertyValue is only needed for .css('filter') (#12537)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\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// https://drafts.csswg.org/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: IE <=9 - 11 only\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\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"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,\n\t\tval = 0;\n\n\t// If we already have the right measurement, avoid augmentation\n\tif ( extra === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\ti = 4;\n\n\t// Otherwise initialize for horizontal or vertical properties\n\t} else {\n\t\ti = name === \"width\" ? 1 : 0;\n\t}\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 val,\n\t\tvalueIsBorderBox = true,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// Support: IE <=11 only\n\t// Running getBoundingClientRect on a disconnected node\n\t// in IE throws an error.\n\tif ( elem.getClientRects().length ) {\n\t\tval = elem.getBoundingClientRect()[ name ];\n\t}\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\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// 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\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\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// 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} );\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: IE <=9 only\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\nfunction raf() {\n\tif ( timerId ) {\n\t\twindow.requestAnimationFrame( raf );\n\t\tjQuery.fx.tick();\n\t}\n}\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\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\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// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( 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// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\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\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 13\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\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// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\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 only\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\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( rnothtmlwhite );\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\t// Go to the end state if fx are off or if document is hidden\n\tif ( jQuery.fx.off || document.hidden ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\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( isHiddenWithinTree ).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.requestAnimationFrame ?\n\t\t\twindow.requestAnimationFrame( raf ) :\n\t\t\twindow.setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\tif ( window.cancelAnimationFrame ) {\n\t\twindow.cancelAnimationFrame( timerId );\n\t} else {\n\t\twindow.clearInterval( timerId );\n\t}\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// https://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: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\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// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\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,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\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};\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\t\tlowercaseName = name.toLowerCase();\n\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[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = 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// Support: IE <=9 - 11 only\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// https://web.archive.org/web/20141116233347/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\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -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\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\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\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\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\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\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( rnothtmlwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\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 = stripAndCollapse( 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( rnothtmlwhite ) || [];\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 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\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 = stripAndCollapse( 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( rnothtmlwhite ) || [];\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( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\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\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\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == 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: IE <=10 - 11 only\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\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\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\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\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// Support: IE <=9 only\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!option.disabled &&\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\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\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\n\t\t\t\t\t/* eslint-enable no-cond-assign */\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 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 resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup 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 <=44\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 <=48 - 49, Safari <=9.0 - 9.1\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://bugs.chromium.org/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// 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: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\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\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, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = jQuery.isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\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( \"&\" );\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\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( jQuery.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\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( rnothtmlwhite ) || [];\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\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\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\": JSON.parse,\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// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\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// uncached part of the url\n\t\t\tuncached,\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// 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 ( completed ) {\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 completed ? 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\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || 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 ( completed == null ) {\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 ( completed ) {\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} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\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}\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 );\n\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 ) + \"\" )\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 = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\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: IE <=8 - 11, Edge 12 - 13\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// 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: IE <=8 - 11 only\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 ( completed ) {\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\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL += ( 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 or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce++ ) + uncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\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 || completed ) ) {\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\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\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 ( completed ) {\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\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\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// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\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\tcache: true,\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 ( this[ 0 ] ) {\n\t\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\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( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\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: IE <=9 only\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: IE <=9 only\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: IE <=9 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: IE 9 only\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// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\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// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\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 ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\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/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( 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.pseudos.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\n\t\t// Preserve chaining for setter\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, rect, doc,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\trect = elem.getBoundingClientRect();\n\n\t\t// Make sure element is not hidden (display: none)\n\t\tif ( rect.width || rect.height ) {\n\t\t\tdoc = elem.ownerDocument;\n\t\t\twin = getWindow( doc );\n\t\t\tdocElem = doc.documentElement;\n\n\t\t\treturn {\n\t\t\t\ttop: rect.top + win.pageYOffset - docElem.clientTop,\n\t\t\t\tleft: rect.left + win.pageXOffset - docElem.clientLeft\n\t\t\t};\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden elements (gh-2310)\n\t\treturn rect;\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 = {\n\t\t\t\ttop: parentOffset.top + jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true ),\n\t\t\t\tleft: parentOffset.left + jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true )\n\t\t\t};\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 - 9.1, Chrome <=37 - 49\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://bugs.chromium.org/p/chromium/issues/detail?id=589347\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// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.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 );\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} );\n\njQuery.parseJSON = JSON.parse;\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\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\n\n\n\n\nreturn jQuery;\n} );\n"

/***/ },

/***/ 697:
/***/ function(module, exports) {

module.exports = " /*\n * # Semantic UI - 2.2.4\n * https://github.com/Semantic-Org/Semantic-UI\n * http://www.semantic-ui.com/\n *\n * Copyright 2014 Contributors\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n/*!\n * # Semantic UI 2.2.4 - Site\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n$.site = $.fn.site = function(parameters) {\n  var\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n\n    settings        = ( $.isPlainObject(parameters) )\n      ? $.extend(true, {}, $.site.settings, parameters)\n      : $.extend({}, $.site.settings),\n\n    namespace       = settings.namespace,\n    error           = settings.error,\n\n    eventNamespace  = '.' + namespace,\n    moduleNamespace = 'module-' + namespace,\n\n    $document       = $(document),\n    $module         = $document,\n    element         = this,\n    instance        = $module.data(moduleNamespace),\n\n    module,\n    returnedValue\n  ;\n  module = {\n\n    initialize: function() {\n      module.instantiate();\n    },\n\n    instantiate: function() {\n      module.verbose('Storing instance of site', module);\n      instance = module;\n      $module\n        .data(moduleNamespace, module)\n      ;\n    },\n\n    normalize: function() {\n      module.fix.console();\n      module.fix.requestAnimationFrame();\n    },\n\n    fix: {\n      console: function() {\n        module.debug('Normalizing window.console');\n        if (console === undefined || console.log === undefined) {\n          module.verbose('Console not available, normalizing events');\n          module.disable.console();\n        }\n        if (typeof console.group == 'undefined' || typeof console.groupEnd == 'undefined' || typeof console.groupCollapsed == 'undefined') {\n          module.verbose('Console group not available, normalizing events');\n          window.console.group = function() {};\n          window.console.groupEnd = function() {};\n          window.console.groupCollapsed = function() {};\n        }\n        if (typeof console.markTimeline == 'undefined') {\n          module.verbose('Mark timeline not available, normalizing events');\n          window.console.markTimeline = function() {};\n        }\n      },\n      consoleClear: function() {\n        module.debug('Disabling programmatic console clearing');\n        window.console.clear = function() {};\n      },\n      requestAnimationFrame: function() {\n        module.debug('Normalizing requestAnimationFrame');\n        if(window.requestAnimationFrame === undefined) {\n          module.debug('RequestAnimationFrame not available, normalizing event');\n          window.requestAnimationFrame = window.requestAnimationFrame\n            || window.mozRequestAnimationFrame\n            || window.webkitRequestAnimationFrame\n            || window.msRequestAnimationFrame\n            || function(callback) { setTimeout(callback, 0); }\n          ;\n        }\n      }\n    },\n\n    moduleExists: function(name) {\n      return ($.fn[name] !== undefined && $.fn[name].settings !== undefined);\n    },\n\n    enabled: {\n      modules: function(modules) {\n        var\n          enabledModules = []\n        ;\n        modules = modules || settings.modules;\n        $.each(modules, function(index, name) {\n          if(module.moduleExists(name)) {\n            enabledModules.push(name);\n          }\n        });\n        return enabledModules;\n      }\n    },\n\n    disabled: {\n      modules: function(modules) {\n        var\n          disabledModules = []\n        ;\n        modules = modules || settings.modules;\n        $.each(modules, function(index, name) {\n          if(!module.moduleExists(name)) {\n            disabledModules.push(name);\n          }\n        });\n        return disabledModules;\n      }\n    },\n\n    change: {\n      setting: function(setting, value, modules, modifyExisting) {\n        modules = (typeof modules === 'string')\n          ? (modules === 'all')\n            ? settings.modules\n            : [modules]\n          : modules || settings.modules\n        ;\n        modifyExisting = (modifyExisting !== undefined)\n          ? modifyExisting\n          : true\n        ;\n        $.each(modules, function(index, name) {\n          var\n            namespace = (module.moduleExists(name))\n              ? $.fn[name].settings.namespace || false\n              : true,\n            $existingModules\n          ;\n          if(module.moduleExists(name)) {\n            module.verbose('Changing default setting', setting, value, name);\n            $.fn[name].settings[setting] = value;\n            if(modifyExisting && namespace) {\n              $existingModules = $(':data(module-' + namespace + ')');\n              if($existingModules.length > 0) {\n                module.verbose('Modifying existing settings', $existingModules);\n                $existingModules[name]('setting', setting, value);\n              }\n            }\n          }\n        });\n      },\n      settings: function(newSettings, modules, modifyExisting) {\n        modules = (typeof modules === 'string')\n          ? [modules]\n          : modules || settings.modules\n        ;\n        modifyExisting = (modifyExisting !== undefined)\n          ? modifyExisting\n          : true\n        ;\n        $.each(modules, function(index, name) {\n          var\n            $existingModules\n          ;\n          if(module.moduleExists(name)) {\n            module.verbose('Changing default setting', newSettings, name);\n            $.extend(true, $.fn[name].settings, newSettings);\n            if(modifyExisting && namespace) {\n              $existingModules = $(':data(module-' + namespace + ')');\n              if($existingModules.length > 0) {\n                module.verbose('Modifying existing settings', $existingModules);\n                $existingModules[name]('setting', newSettings);\n              }\n            }\n          }\n        });\n      }\n    },\n\n    enable: {\n      console: function() {\n        module.console(true);\n      },\n      debug: function(modules, modifyExisting) {\n        modules = modules || settings.modules;\n        module.debug('Enabling debug for modules', modules);\n        module.change.setting('debug', true, modules, modifyExisting);\n      },\n      verbose: function(modules, modifyExisting) {\n        modules = modules || settings.modules;\n        module.debug('Enabling verbose debug for modules', modules);\n        module.change.setting('verbose', true, modules, modifyExisting);\n      }\n    },\n    disable: {\n      console: function() {\n        module.console(false);\n      },\n      debug: function(modules, modifyExisting) {\n        modules = modules || settings.modules;\n        module.debug('Disabling debug for modules', modules);\n        module.change.setting('debug', false, modules, modifyExisting);\n      },\n      verbose: function(modules, modifyExisting) {\n        modules = modules || settings.modules;\n        module.debug('Disabling verbose debug for modules', modules);\n        module.change.setting('verbose', false, modules, modifyExisting);\n      }\n    },\n\n    console: function(enable) {\n      if(enable) {\n        if(instance.cache.console === undefined) {\n          module.error(error.console);\n          return;\n        }\n        module.debug('Restoring console function');\n        window.console = instance.cache.console;\n      }\n      else {\n        module.debug('Disabling console function');\n        instance.cache.console = window.console;\n        window.console = {\n          clear          : function(){},\n          error          : function(){},\n          group          : function(){},\n          groupCollapsed : function(){},\n          groupEnd       : function(){},\n          info           : function(){},\n          log            : function(){},\n          markTimeline   : function(){},\n          warn           : function(){}\n        };\n      }\n    },\n\n    destroy: function() {\n      module.verbose('Destroying previous site for', $module);\n      $module\n        .removeData(moduleNamespace)\n      ;\n    },\n\n    cache: {},\n\n    setting: function(name, value) {\n      if( $.isPlainObject(name) ) {\n        $.extend(true, settings, name);\n      }\n      else if(value !== undefined) {\n        settings[name] = value;\n      }\n      else {\n        return settings[name];\n      }\n    },\n    internal: function(name, value) {\n      if( $.isPlainObject(name) ) {\n        $.extend(true, module, name);\n      }\n      else if(value !== undefined) {\n        module[name] = value;\n      }\n      else {\n        return module[name];\n      }\n    },\n    debug: function() {\n      if(settings.debug) {\n        if(settings.performance) {\n          module.performance.log(arguments);\n        }\n        else {\n          module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n          module.debug.apply(console, arguments);\n        }\n      }\n    },\n    verbose: function() {\n      if(settings.verbose && settings.debug) {\n        if(settings.performance) {\n          module.performance.log(arguments);\n        }\n        else {\n          module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n          module.verbose.apply(console, arguments);\n        }\n      }\n    },\n    error: function() {\n      module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n      module.error.apply(console, arguments);\n    },\n    performance: {\n      log: function(message) {\n        var\n          currentTime,\n          executionTime,\n          previousTime\n        ;\n        if(settings.performance) {\n          currentTime   = new Date().getTime();\n          previousTime  = time || currentTime;\n          executionTime = currentTime - previousTime;\n          time          = currentTime;\n          performance.push({\n            'Element'        : element,\n            'Name'           : message[0],\n            'Arguments'      : [].slice.call(message, 1) || '',\n            'Execution Time' : executionTime\n          });\n        }\n        clearTimeout(module.performance.timer);\n        module.performance.timer = setTimeout(module.performance.display, 500);\n      },\n      display: function() {\n        var\n          title = settings.name + ':',\n          totalTime = 0\n        ;\n        time = false;\n        clearTimeout(module.performance.timer);\n        $.each(performance, function(index, data) {\n          totalTime += data['Execution Time'];\n        });\n        title += ' ' + totalTime + 'ms';\n        if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n          console.groupCollapsed(title);\n          if(console.table) {\n            console.table(performance);\n          }\n          else {\n            $.each(performance, function(index, data) {\n              console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n            });\n          }\n          console.groupEnd();\n        }\n        performance = [];\n      }\n    },\n    invoke: function(query, passedArguments, context) {\n      var\n        object = instance,\n        maxDepth,\n        found,\n        response\n      ;\n      passedArguments = passedArguments || queryArguments;\n      context         = element         || context;\n      if(typeof query == 'string' && object !== undefined) {\n        query    = query.split(/[\\. ]/);\n        maxDepth = query.length - 1;\n        $.each(query, function(depth, value) {\n          var camelCaseValue = (depth != maxDepth)\n            ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n            : query\n          ;\n          if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n            object = object[camelCaseValue];\n          }\n          else if( object[camelCaseValue] !== undefined ) {\n            found = object[camelCaseValue];\n            return false;\n          }\n          else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n            object = object[value];\n          }\n          else if( object[value] !== undefined ) {\n            found = object[value];\n            return false;\n          }\n          else {\n            module.error(error.method, query);\n            return false;\n          }\n        });\n      }\n      if ( $.isFunction( found ) ) {\n        response = found.apply(context, passedArguments);\n      }\n      else if(found !== undefined) {\n        response = found;\n      }\n      if($.isArray(returnedValue)) {\n        returnedValue.push(response);\n      }\n      else if(returnedValue !== undefined) {\n        returnedValue = [returnedValue, response];\n      }\n      else if(response !== undefined) {\n        returnedValue = response;\n      }\n      return found;\n    }\n  };\n\n  if(methodInvoked) {\n    if(instance === undefined) {\n      module.initialize();\n    }\n    module.invoke(query);\n  }\n  else {\n    if(instance !== undefined) {\n      module.destroy();\n    }\n    module.initialize();\n  }\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.site.settings = {\n\n  name        : 'Site',\n  namespace   : 'site',\n\n  error : {\n    console : 'Console cannot be restored, most likely it was overwritten outside of module',\n    method : 'The method you called is not defined.'\n  },\n\n  debug       : false,\n  verbose     : false,\n  performance : true,\n\n  modules: [\n    'accordion',\n    'api',\n    'checkbox',\n    'dimmer',\n    'dropdown',\n    'embed',\n    'form',\n    'modal',\n    'nag',\n    'popup',\n    'rating',\n    'shape',\n    'sidebar',\n    'state',\n    'sticky',\n    'tab',\n    'transition',\n    'visit',\n    'visibility'\n  ],\n\n  siteNamespace   : 'site',\n  namespaceStub   : {\n    cache     : {},\n    config    : {},\n    sections  : {},\n    section   : {},\n    utilities : {}\n  }\n\n};\n\n// allows for selection of elements with data attributes\n$.extend($.expr[ \":\" ], {\n  data: ($.expr.createPseudo)\n    ? $.expr.createPseudo(function(dataName) {\n        return function(elem) {\n          return !!$.data(elem, dataName);\n        };\n      })\n    : function(elem, i, match) {\n      // support: jQuery < 1.8\n      return !!$.data(elem, match[ 3 ]);\n    }\n});\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Form Validation\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.form = function(parameters) {\n  var\n    $allModules      = $(this),\n    moduleSelector   = $allModules.selector || '',\n\n    time             = new Date().getTime(),\n    performance      = [],\n\n    query            = arguments[0],\n    legacyParameters = arguments[1],\n    methodInvoked    = (typeof query == 'string'),\n    queryArguments   = [].slice.call(arguments, 1),\n    returnedValue\n  ;\n  $allModules\n    .each(function() {\n      var\n        $module     = $(this),\n        element     = this,\n\n        formErrors  = [],\n        keyHeldDown = false,\n\n        // set at run-time\n        $field,\n        $group,\n        $message,\n        $prompt,\n        $submit,\n        $clear,\n        $reset,\n\n        settings,\n        validation,\n\n        metadata,\n        selector,\n        className,\n        error,\n\n        namespace,\n        moduleNamespace,\n        eventNamespace,\n\n        instance,\n        module\n      ;\n\n      module      = {\n\n        initialize: function() {\n\n          // settings grabbed at run time\n          module.get.settings();\n          if(methodInvoked) {\n            if(instance === undefined) {\n              module.instantiate();\n            }\n            module.invoke(query);\n          }\n          else {\n            if(instance !== undefined) {\n              instance.invoke('destroy');\n            }\n            module.verbose('Initializing form validation', $module, settings);\n            module.bindEvents();\n            module.set.defaults();\n            module.instantiate();\n          }\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous module', instance);\n          module.removeEvents();\n          $module\n            .removeData(moduleNamespace)\n          ;\n        },\n\n        refresh: function() {\n          module.verbose('Refreshing selector cache');\n          $field      = $module.find(selector.field);\n          $group      = $module.find(selector.group);\n          $message    = $module.find(selector.message);\n          $prompt     = $module.find(selector.prompt);\n\n          $submit     = $module.find(selector.submit);\n          $clear      = $module.find(selector.clear);\n          $reset      = $module.find(selector.reset);\n        },\n\n        submit: function() {\n          module.verbose('Submitting form', $module);\n          $module\n            .submit()\n          ;\n        },\n\n        attachEvents: function(selector, action) {\n          action = action || 'submit';\n          $(selector)\n            .on('click' + eventNamespace, function(event) {\n              module[action]();\n              event.preventDefault();\n            })\n          ;\n        },\n\n        bindEvents: function() {\n          module.verbose('Attaching form events');\n          $module\n            .on('submit' + eventNamespace, module.validate.form)\n            .on('blur'   + eventNamespace, selector.field, module.event.field.blur)\n            .on('click'  + eventNamespace, selector.submit, module.submit)\n            .on('click'  + eventNamespace, selector.reset, module.reset)\n            .on('click'  + eventNamespace, selector.clear, module.clear)\n          ;\n          if(settings.keyboardShortcuts) {\n            $module\n              .on('keydown' + eventNamespace, selector.field, module.event.field.keydown)\n            ;\n          }\n          $field\n            .each(function() {\n              var\n                $input     = $(this),\n                type       = $input.prop('type'),\n                inputEvent = module.get.changeEvent(type, $input)\n              ;\n              $(this)\n                .on(inputEvent + eventNamespace, module.event.field.change)\n              ;\n            })\n          ;\n        },\n\n        clear: function() {\n          $field\n            .each(function () {\n              var\n                $field       = $(this),\n                $element     = $field.parent(),\n                $fieldGroup  = $field.closest($group),\n                $prompt      = $fieldGroup.find(selector.prompt),\n                defaultValue = $field.data(metadata.defaultValue) || '',\n                isCheckbox   = $element.is(selector.uiCheckbox),\n                isDropdown   = $element.is(selector.uiDropdown),\n                isErrored    = $fieldGroup.hasClass(className.error)\n              ;\n              if(isErrored) {\n                module.verbose('Resetting error on field', $fieldGroup);\n                $fieldGroup.removeClass(className.error);\n                $prompt.remove();\n              }\n              if(isDropdown) {\n                module.verbose('Resetting dropdown value', $element, defaultValue);\n                $element.dropdown('clear');\n              }\n              else if(isCheckbox) {\n                $field.prop('checked', false);\n              }\n              else {\n                module.verbose('Resetting field value', $field, defaultValue);\n                $field.val('');\n              }\n            })\n          ;\n        },\n\n        reset: function() {\n          $field\n            .each(function () {\n              var\n                $field       = $(this),\n                $element     = $field.parent(),\n                $fieldGroup  = $field.closest($group),\n                $prompt      = $fieldGroup.find(selector.prompt),\n                defaultValue = $field.data(metadata.defaultValue),\n                isCheckbox   = $element.is(selector.uiCheckbox),\n                isDropdown   = $element.is(selector.uiDropdown),\n                isErrored    = $fieldGroup.hasClass(className.error)\n              ;\n              if(defaultValue === undefined) {\n                return;\n              }\n              if(isErrored) {\n                module.verbose('Resetting error on field', $fieldGroup);\n                $fieldGroup.removeClass(className.error);\n                $prompt.remove();\n              }\n              if(isDropdown) {\n                module.verbose('Resetting dropdown value', $element, defaultValue);\n                $element.dropdown('restore defaults');\n              }\n              else if(isCheckbox) {\n                module.verbose('Resetting checkbox value', $element, defaultValue);\n                $field.prop('checked', defaultValue);\n              }\n              else {\n                module.verbose('Resetting field value', $field, defaultValue);\n                $field.val(defaultValue);\n              }\n            })\n          ;\n        },\n\n        is: {\n          bracketedRule: function(rule) {\n            return (rule.type && rule.type.match(settings.regExp.bracket));\n          },\n          empty: function($field) {\n            if(!$field || $field.length === 0) {\n              return true;\n            }\n            else if($field.is('input[type=\"checkbox\"]')) {\n              return !$field.is(':checked');\n            }\n            else {\n              return module.is.blank($field);\n            }\n          },\n          blank: function($field) {\n            return $.trim($field.val()) === '';\n          },\n          valid: function() {\n            var\n              allValid = true\n            ;\n            module.verbose('Checking if form is valid');\n            $.each(validation, function(fieldName, field) {\n              if( !( module.validate.field(field, fieldName) ) ) {\n                allValid = false;\n              }\n            });\n            return allValid;\n          }\n        },\n\n        removeEvents: function() {\n          $module\n            .off(eventNamespace)\n          ;\n          $field\n            .off(eventNamespace)\n          ;\n          $submit\n            .off(eventNamespace)\n          ;\n          $field\n            .off(eventNamespace)\n          ;\n        },\n\n        event: {\n          field: {\n            keydown: function(event) {\n              var\n                $field       = $(this),\n                key          = event.which,\n                isInput      = $field.is(selector.input),\n                isCheckbox   = $field.is(selector.checkbox),\n                isInDropdown = ($field.closest(selector.uiDropdown).length > 0),\n                keyCode      = {\n                  enter  : 13,\n                  escape : 27\n                }\n              ;\n              if( key == keyCode.escape) {\n                module.verbose('Escape key pressed blurring field');\n                $field\n                  .blur()\n                ;\n              }\n              if(!event.ctrlKey && key == keyCode.enter && isInput && !isInDropdown && !isCheckbox) {\n                if(!keyHeldDown) {\n                  $field\n                    .one('keyup' + eventNamespace, module.event.field.keyup)\n                  ;\n                  module.submit();\n                  module.debug('Enter pressed on input submitting form');\n                }\n                keyHeldDown = true;\n              }\n            },\n            keyup: function() {\n              keyHeldDown = false;\n            },\n            blur: function(event) {\n              var\n                $field          = $(this),\n                $fieldGroup     = $field.closest($group),\n                validationRules = module.get.validation($field)\n              ;\n              if( $fieldGroup.hasClass(className.error) ) {\n                module.debug('Revalidating field', $field, validationRules);\n                if(validationRules) {\n                  module.validate.field( validationRules );\n                }\n              }\n              else if(settings.on == 'blur' || settings.on == 'change') {\n                if(validationRules) {\n                  module.validate.field( validationRules );\n                }\n              }\n            },\n            change: function(event) {\n              var\n                $field      = $(this),\n                $fieldGroup = $field.closest($group),\n                validationRules = module.get.validation($field)\n              ;\n              if(settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) ) {\n                clearTimeout(module.timer);\n                module.timer = setTimeout(function() {\n                  module.debug('Revalidating field', $field,  module.get.validation($field));\n                  module.validate.field( validationRules );\n                }, settings.delay);\n              }\n            }\n          }\n\n        },\n\n        get: {\n          ancillaryValue: function(rule) {\n            if(!rule.type || (!rule.value && !module.is.bracketedRule(rule))) {\n              return false;\n            }\n            return (rule.value !== undefined)\n              ? rule.value\n              : rule.type.match(settings.regExp.bracket)[1] + ''\n            ;\n          },\n          ruleName: function(rule) {\n            if( module.is.bracketedRule(rule) ) {\n              return rule.type.replace(rule.type.match(settings.regExp.bracket)[0], '');\n            }\n            return rule.type;\n          },\n          changeEvent: function(type, $input) {\n            if(type == 'checkbox' || type == 'radio' || type == 'hidden' || $input.is('select')) {\n              return 'change';\n            }\n            else {\n              return module.get.inputEvent();\n            }\n          },\n          inputEvent: function() {\n            return (document.createElement('input').oninput !== undefined)\n              ? 'input'\n              : (document.createElement('input').onpropertychange !== undefined)\n                ? 'propertychange'\n                : 'keyup'\n            ;\n          },\n          prompt: function(rule, field) {\n            var\n              ruleName      = module.get.ruleName(rule),\n              ancillary     = module.get.ancillaryValue(rule),\n              prompt        = rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule,\n              requiresValue = (prompt.search('{value}') !== -1),\n              requiresName  = (prompt.search('{name}') !== -1),\n              $label,\n              $field,\n              name\n            ;\n            if(requiresName || requiresValue) {\n              $field = module.get.field(field.identifier);\n            }\n            if(requiresValue) {\n              prompt = prompt.replace('{value}', $field.val());\n            }\n            if(requiresName) {\n              $label = $field.closest(selector.group).find('label').eq(0);\n              name = ($label.length == 1)\n                ? $label.text()\n                : $field.prop('placeholder') || settings.text.unspecifiedField\n              ;\n              prompt = prompt.replace('{name}', name);\n            }\n            prompt = prompt.replace('{identifier}', field.identifier);\n            prompt = prompt.replace('{ruleValue}', ancillary);\n            if(!rule.prompt) {\n              module.verbose('Using default validation prompt for type', prompt, ruleName);\n            }\n            return prompt;\n          },\n          settings: function() {\n            if($.isPlainObject(parameters)) {\n              var\n                keys     = Object.keys(parameters),\n                isLegacySettings = (keys.length > 0)\n                  ? (parameters[keys[0]].identifier !== undefined && parameters[keys[0]].rules !== undefined)\n                  : false,\n                ruleKeys\n              ;\n              if(isLegacySettings) {\n                // 1.x (ducktyped)\n                settings   = $.extend(true, {}, $.fn.form.settings, legacyParameters);\n                validation = $.extend({}, $.fn.form.settings.defaults, parameters);\n                module.error(settings.error.oldSyntax, element);\n                module.verbose('Extending settings from legacy parameters', validation, settings);\n              }\n              else {\n                // 2.x\n                if(parameters.fields) {\n                  ruleKeys = Object.keys(parameters.fields);\n                  if( typeof parameters.fields[ruleKeys[0]] == 'string' || $.isArray(parameters.fields[ruleKeys[0]]) ) {\n                    $.each(parameters.fields, function(name, rules) {\n                      if(typeof rules == 'string') {\n                        rules = [rules];\n                      }\n                      parameters.fields[name] = {\n                        rules: []\n                      };\n                      $.each(rules, function(index, rule) {\n                        parameters.fields[name].rules.push({ type: rule });\n                      });\n                    });\n                  }\n                }\n\n                settings   = $.extend(true, {}, $.fn.form.settings, parameters);\n                validation = $.extend({}, $.fn.form.settings.defaults, settings.fields);\n                module.verbose('Extending settings', validation, settings);\n              }\n            }\n            else {\n              settings   = $.fn.form.settings;\n              validation = $.fn.form.settings.defaults;\n              module.verbose('Using default form validation', validation, settings);\n            }\n\n            // shorthand\n            namespace       = settings.namespace;\n            metadata        = settings.metadata;\n            selector        = settings.selector;\n            className       = settings.className;\n            error           = settings.error;\n            moduleNamespace = 'module-' + namespace;\n            eventNamespace  = '.' + namespace;\n\n            // grab instance\n            instance = $module.data(moduleNamespace);\n\n            // refresh selector cache\n            module.refresh();\n          },\n          field: function(identifier) {\n            module.verbose('Finding field with identifier', identifier);\n            if( $field.filter('#' + identifier).length > 0 ) {\n              return $field.filter('#' + identifier);\n            }\n            else if( $field.filter('[name=\"' + identifier +'\"]').length > 0 ) {\n              return $field.filter('[name=\"' + identifier +'\"]');\n            }\n            else if( $field.filter('[name=\"' + identifier +'[]\"]').length > 0 ) {\n              return $field.filter('[name=\"' + identifier +'[]\"]');\n            }\n            else if( $field.filter('[data-' + metadata.validate + '=\"'+ identifier +'\"]').length > 0 ) {\n              return $field.filter('[data-' + metadata.validate + '=\"'+ identifier +'\"]');\n            }\n            return $('<input/>');\n          },\n          fields: function(fields) {\n            var\n              $fields = $()\n            ;\n            $.each(fields, function(index, name) {\n              $fields = $fields.add( module.get.field(name) );\n            });\n            return $fields;\n          },\n          validation: function($field) {\n            var\n              fieldValidation,\n              identifier\n            ;\n            if(!validation) {\n              return false;\n            }\n            $.each(validation, function(fieldName, field) {\n              identifier = field.identifier || fieldName;\n              if( module.get.field(identifier)[0] == $field[0] ) {\n                field.identifier = identifier;\n                fieldValidation = field;\n              }\n            });\n            return fieldValidation || false;\n          },\n          value: function (field) {\n            var\n              fields = [],\n              results\n            ;\n            fields.push(field);\n            results = module.get.values.call(element, fields);\n            return results[field];\n          },\n          values: function (fields) {\n            var\n              $fields = $.isArray(fields)\n                ? module.get.fields(fields)\n                : $field,\n              values = {}\n            ;\n            $fields.each(function(index, field) {\n              var\n                $field     = $(field),\n                type       = $field.prop('type'),\n                name       = $field.prop('name'),\n                value      = $field.val(),\n                isCheckbox = $field.is(selector.checkbox),\n                isRadio    = $field.is(selector.radio),\n                isMultiple = (name.indexOf('[]') !== -1),\n                isChecked  = (isCheckbox)\n                  ? $field.is(':checked')\n                  : false\n              ;\n              if(name) {\n                if(isMultiple) {\n                  name = name.replace('[]', '');\n                  if(!values[name]) {\n                    values[name] = [];\n                  }\n                  if(isCheckbox) {\n                    if(isChecked) {\n                      values[name].push(value || true);\n                    }\n                    else {\n                      values[name].push(false);\n                    }\n                  }\n                  else {\n                    values[name].push(value);\n                  }\n                }\n                else {\n                  if(isRadio) {\n                    if(isChecked) {\n                      values[name] = value;\n                    }\n                  }\n                  else if(isCheckbox) {\n                    if(isChecked) {\n                      values[name] = value || true;\n                    }\n                    else {\n                      values[name] = false;\n                    }\n                  }\n                  else {\n                    values[name] = value;\n                  }\n                }\n              }\n            });\n            return values;\n          }\n        },\n\n        has: {\n\n          field: function(identifier) {\n            module.verbose('Checking for existence of a field with identifier', identifier);\n            if(typeof identifier !== 'string') {\n              module.error(error.identifier, identifier);\n            }\n            if( $field.filter('#' + identifier).length > 0 ) {\n              return true;\n            }\n            else if( $field.filter('[name=\"' + identifier +'\"]').length > 0 ) {\n              return true;\n            }\n            else if( $field.filter('[data-' + metadata.validate + '=\"'+ identifier +'\"]').length > 0 ) {\n              return true;\n            }\n            return false;\n          }\n\n        },\n\n        add: {\n          prompt: function(identifier, errors) {\n            var\n              $field       = module.get.field(identifier),\n              $fieldGroup  = $field.closest($group),\n              $prompt      = $fieldGroup.children(selector.prompt),\n              promptExists = ($prompt.length !== 0)\n            ;\n            errors = (typeof errors == 'string')\n              ? [errors]\n              : errors\n            ;\n            module.verbose('Adding field error state', identifier);\n            $fieldGroup\n              .addClass(className.error)\n            ;\n            if(settings.inline) {\n              if(!promptExists) {\n                $prompt = settings.templates.prompt(errors);\n                $prompt\n                  .appendTo($fieldGroup)\n                ;\n              }\n              $prompt\n                .html(errors[0])\n              ;\n              if(!promptExists) {\n                if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {\n                  module.verbose('Displaying error with css transition', settings.transition);\n                  $prompt.transition(settings.transition + ' in', settings.duration);\n                }\n                else {\n                  module.verbose('Displaying error with fallback javascript animation');\n                  $prompt\n                    .fadeIn(settings.duration)\n                  ;\n                }\n              }\n              else {\n                module.verbose('Inline errors are disabled, no inline error added', identifier);\n              }\n            }\n          },\n          errors: function(errors) {\n            module.debug('Adding form error messages', errors);\n            module.set.error();\n            $message\n              .html( settings.templates.error(errors) )\n            ;\n          }\n        },\n\n        remove: {\n          prompt: function(identifier) {\n            var\n              $field      = module.get.field(identifier),\n              $fieldGroup = $field.closest($group),\n              $prompt     = $fieldGroup.children(selector.prompt)\n            ;\n            $fieldGroup\n              .removeClass(className.error)\n            ;\n            if(settings.inline && $prompt.is(':visible')) {\n              module.verbose('Removing prompt for field', identifier);\n              if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {\n                $prompt.transition(settings.transition + ' out', settings.duration, function() {\n                  $prompt.remove();\n                });\n              }\n              else {\n                $prompt\n                  .fadeOut(settings.duration, function(){\n                    $prompt.remove();\n                  })\n                ;\n              }\n            }\n          }\n        },\n\n        set: {\n          success: function() {\n            $module\n              .removeClass(className.error)\n              .addClass(className.success)\n            ;\n          },\n          defaults: function () {\n            $field\n              .each(function () {\n                var\n                  $field     = $(this),\n                  isCheckbox = ($field.filter(selector.checkbox).length > 0),\n                  value      = (isCheckbox)\n                    ? $field.is(':checked')\n                    : $field.val()\n                ;\n                $field.data(metadata.defaultValue, value);\n              })\n            ;\n          },\n          error: function() {\n            $module\n              .removeClass(className.success)\n              .addClass(className.error)\n            ;\n          },\n          value: function (field, value) {\n            var\n              fields = {}\n            ;\n            fields[field] = value;\n            return module.set.values.call(element, fields);\n          },\n          values: function (fields) {\n            if($.isEmptyObject(fields)) {\n              return;\n            }\n            $.each(fields, function(key, value) {\n              var\n                $field      = module.get.field(key),\n                $element    = $field.parent(),\n                isMultiple  = $.isArray(value),\n                isCheckbox  = $element.is(selector.uiCheckbox),\n                isDropdown  = $element.is(selector.uiDropdown),\n                isRadio     = ($field.is(selector.radio) && isCheckbox),\n                fieldExists = ($field.length > 0),\n                $multipleField\n              ;\n              if(fieldExists) {\n                if(isMultiple && isCheckbox) {\n                  module.verbose('Selecting multiple', value, $field);\n                  $element.checkbox('uncheck');\n                  $.each(value, function(index, value) {\n                    $multipleField = $field.filter('[value=\"' + value + '\"]');\n                    $element       = $multipleField.parent();\n                    if($multipleField.length > 0) {\n                      $element.checkbox('check');\n                    }\n                  });\n                }\n                else if(isRadio) {\n                  module.verbose('Selecting radio value', value, $field);\n                  $field.filter('[value=\"' + value + '\"]')\n                    .parent(selector.uiCheckbox)\n                      .checkbox('check')\n                  ;\n                }\n                else if(isCheckbox) {\n                  module.verbose('Setting checkbox value', value, $element);\n                  if(value === true) {\n                    $element.checkbox('check');\n                  }\n                  else {\n                    $element.checkbox('uncheck');\n                  }\n                }\n                else if(isDropdown) {\n                  module.verbose('Setting dropdown value', value, $element);\n                  $element.dropdown('set selected', value);\n                }\n                else {\n                  module.verbose('Setting field value', value, $field);\n                  $field.val(value);\n                }\n              }\n            });\n          }\n        },\n\n        validate: {\n\n          form: function(event, ignoreCallbacks) {\n            var\n              values = module.get.values(),\n              apiRequest\n            ;\n\n            // input keydown event will fire submit repeatedly by browser default\n            if(keyHeldDown) {\n              return false;\n            }\n\n            // reset errors\n            formErrors = [];\n            if( module.is.valid() ) {\n              module.debug('Form has no validation errors, submitting');\n              module.set.success();\n              if(ignoreCallbacks !== true) {\n                return settings.onSuccess.call(element, event, values);\n              }\n            }\n            else {\n              module.debug('Form has errors');\n              module.set.error();\n              if(!settings.inline) {\n                module.add.errors(formErrors);\n              }\n              // prevent ajax submit\n              if($module.data('moduleApi') !== undefined) {\n                event.stopImmediatePropagation();\n              }\n              if(ignoreCallbacks !== true) {\n                return settings.onFailure.call(element, formErrors, values);\n              }\n            }\n          },\n\n          // takes a validation object and returns whether field passes validation\n          field: function(field, fieldName) {\n            var\n              identifier    = field.identifier || fieldName,\n              $field        = module.get.field(identifier),\n              $dependsField = (field.depends)\n                ? module.get.field(field.depends)\n                : false,\n              fieldValid  = true,\n              fieldErrors = []\n            ;\n            if(!field.identifier) {\n              module.debug('Using field name as identifier', identifier);\n              field.identifier = identifier;\n            }\n            if($field.prop('disabled')) {\n              module.debug('Field is disabled. Skipping', identifier);\n              fieldValid = true;\n            }\n            else if(field.optional && module.is.blank($field)){\n              module.debug('Field is optional and blank. Skipping', identifier);\n              fieldValid = true;\n            }\n            else if(field.depends && module.is.empty($dependsField)) {\n              module.debug('Field depends on another value that is not present or empty. Skipping', $dependsField);\n              fieldValid = true;\n            }\n            else if(field.rules !== undefined) {\n              $.each(field.rules, function(index, rule) {\n                if( module.has.field(identifier) && !( module.validate.rule(field, rule) ) ) {\n                  module.debug('Field is invalid', identifier, rule.type);\n                  fieldErrors.push(module.get.prompt(rule, field));\n                  fieldValid = false;\n                }\n              });\n            }\n            if(fieldValid) {\n              module.remove.prompt(identifier, fieldErrors);\n              settings.onValid.call($field);\n            }\n            else {\n              formErrors = formErrors.concat(fieldErrors);\n              module.add.prompt(identifier, fieldErrors);\n              settings.onInvalid.call($field, fieldErrors);\n              return false;\n            }\n            return true;\n          },\n\n          // takes validation rule and returns whether field passes rule\n          rule: function(field, rule) {\n            var\n              $field       = module.get.field(field.identifier),\n              type         = rule.type,\n              value        = $field.val(),\n              isValid      = true,\n              ancillary    = module.get.ancillaryValue(rule),\n              ruleName     = module.get.ruleName(rule),\n              ruleFunction = settings.rules[ruleName]\n            ;\n            if( !$.isFunction(ruleFunction) ) {\n              module.error(error.noRule, ruleName);\n              return;\n            }\n            // cast to string avoiding encoding special values\n            value = (value === undefined || value === '' || value === null)\n              ? ''\n              : $.trim(value + '')\n            ;\n            return ruleFunction.call($field, value, ancillary);\n          }\n        },\n\n        setting: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            settings[name] = value;\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if($allModules.length > 1) {\n              title += ' ' + '(' + $allModules.length + ')';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                return false;\n              }\n            });\n          }\n          if( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n      module.initialize();\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.form.settings = {\n\n  name              : 'Form',\n  namespace         : 'form',\n\n  debug             : false,\n  verbose           : false,\n  performance       : true,\n\n  fields            : false,\n\n  keyboardShortcuts : true,\n  on                : 'submit',\n  inline            : false,\n\n  delay             : 200,\n  revalidate        : true,\n\n  transition        : 'scale',\n  duration          : 200,\n\n  onValid           : function() {},\n  onInvalid         : function() {},\n  onSuccess         : function() { return true; },\n  onFailure         : function() { return false; },\n\n  metadata : {\n    defaultValue : 'default',\n    validate     : 'validate'\n  },\n\n  regExp: {\n    bracket : /\\[(.*)\\]/i,\n    decimal : /^\\d*(\\.)\\d+/,\n    email   : /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,\n    escape  : /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\n    flags   : /^\\/(.*)\\/(.*)?/,\n    integer : /^\\-?\\d+$/,\n    number  : /^\\-?\\d*(\\.\\d+)?$/,\n    url     : /(https?:\\/\\/(?:www\\.|(?!www))[^\\s\\.]+\\.[^\\s]{2,}|www\\.[^\\s]+\\.[^\\s]{2,})/i\n  },\n\n  text: {\n    unspecifiedRule  : 'Please enter a valid value',\n    unspecifiedField : 'This field'\n  },\n\n  prompt: {\n    empty                : '{name} must have a value',\n    checked              : '{name} must be checked',\n    email                : '{name} must be a valid e-mail',\n    url                  : '{name} must be a valid url',\n    regExp               : '{name} is not formatted correctly',\n    integer              : '{name} must be an integer',\n    decimal              : '{name} must be a decimal number',\n    number               : '{name} must be set to a number',\n    is                   : '{name} must be \"{ruleValue}\"',\n    isExactly            : '{name} must be exactly \"{ruleValue}\"',\n    not                  : '{name} cannot be set to \"{ruleValue}\"',\n    notExactly           : '{name} cannot be set to exactly \"{ruleValue}\"',\n    contain              : '{name} cannot contain \"{ruleValue}\"',\n    containExactly       : '{name} cannot contain exactly \"{ruleValue}\"',\n    doesntContain        : '{name} must contain  \"{ruleValue}\"',\n    doesntContainExactly : '{name} must contain exactly \"{ruleValue}\"',\n    minLength            : '{name} must be at least {ruleValue} characters',\n    length               : '{name} must be at least {ruleValue} characters',\n    exactLength          : '{name} must be exactly {ruleValue} characters',\n    maxLength            : '{name} cannot be longer than {ruleValue} characters',\n    match                : '{name} must match {ruleValue} field',\n    different            : '{name} must have a different value than {ruleValue} field',\n    creditCard           : '{name} must be a valid credit card number',\n    minCount             : '{name} must have at least {ruleValue} choices',\n    exactCount           : '{name} must have exactly {ruleValue} choices',\n    maxCount             : '{name} must have {ruleValue} or less choices'\n  },\n\n  selector : {\n    checkbox   : 'input[type=\"checkbox\"], input[type=\"radio\"]',\n    clear      : '.clear',\n    field      : 'input, textarea, select',\n    group      : '.field',\n    input      : 'input',\n    message    : '.error.message',\n    prompt     : '.prompt.label',\n    radio      : 'input[type=\"radio\"]',\n    reset      : '.reset:not([type=\"reset\"])',\n    submit     : '.submit:not([type=\"submit\"])',\n    uiCheckbox : '.ui.checkbox',\n    uiDropdown : '.ui.dropdown'\n  },\n\n  className : {\n    error   : 'error',\n    label   : 'ui prompt label',\n    pressed : 'down',\n    success : 'success'\n  },\n\n  error: {\n    identifier : 'You must specify a string identifier for each field',\n    method     : 'The method you called is not defined.',\n    noRule     : 'There is no rule matching the one you specified',\n    oldSyntax  : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.'\n  },\n\n  templates: {\n\n    // template that produces error message\n    error: function(errors) {\n      var\n        html = '<ul class=\"list\">'\n      ;\n      $.each(errors, function(index, value) {\n        html += '<li>' + value + '</li>';\n      });\n      html += '</ul>';\n      return $(html);\n    },\n\n    // template that produces label\n    prompt: function(errors) {\n      return $('<div/>')\n        .addClass('ui basic red pointing prompt label')\n        .html(errors[0])\n      ;\n    }\n  },\n\n  rules: {\n\n    // is not empty or blank string\n    empty: function(value) {\n      return !(value === undefined || '' === value || $.isArray(value) && value.length === 0);\n    },\n\n    // checkbox checked\n    checked: function() {\n      return ($(this).filter(':checked').length > 0);\n    },\n\n    // is most likely an email\n    email: function(value){\n      return $.fn.form.settings.regExp.email.test(value);\n    },\n\n    // value is most likely url\n    url: function(value) {\n      return $.fn.form.settings.regExp.url.test(value);\n    },\n\n    // matches specified regExp\n    regExp: function(value, regExp) {\n      if(regExp instanceof RegExp) {\n        return value.match(regExp);\n      }\n      var\n        regExpParts = regExp.match($.fn.form.settings.regExp.flags),\n        flags\n      ;\n      // regular expression specified as /baz/gi (flags)\n      if(regExpParts) {\n        regExp = (regExpParts.length >= 2)\n          ? regExpParts[1]\n          : regExp\n        ;\n        flags = (regExpParts.length >= 3)\n          ? regExpParts[2]\n          : ''\n        ;\n      }\n      return value.match( new RegExp(regExp, flags) );\n    },\n\n    // is valid integer or matches range\n    integer: function(value, range) {\n      var\n        intRegExp = $.fn.form.settings.regExp.integer,\n        min,\n        max,\n        parts\n      ;\n      if( !range || ['', '..'].indexOf(range) !== -1) {\n        // do nothing\n      }\n      else if(range.indexOf('..') == -1) {\n        if(intRegExp.test(range)) {\n          min = max = range - 0;\n        }\n      }\n      else {\n        parts = range.split('..', 2);\n        if(intRegExp.test(parts[0])) {\n          min = parts[0] - 0;\n        }\n        if(intRegExp.test(parts[1])) {\n          max = parts[1] - 0;\n        }\n      }\n      return (\n        intRegExp.test(value) &&\n        (min === undefined || value >= min) &&\n        (max === undefined || value <= max)\n      );\n    },\n\n    // is valid number (with decimal)\n    decimal: function(value) {\n      return $.fn.form.settings.regExp.decimal.test(value);\n    },\n\n    // is valid number\n    number: function(value) {\n      return $.fn.form.settings.regExp.number.test(value);\n    },\n\n    // is value (case insensitive)\n    is: function(value, text) {\n      text = (typeof text == 'string')\n        ? text.toLowerCase()\n        : text\n      ;\n      value = (typeof value == 'string')\n        ? value.toLowerCase()\n        : value\n      ;\n      return (value == text);\n    },\n\n    // is value\n    isExactly: function(value, text) {\n      return (value == text);\n    },\n\n    // value is not another value (case insensitive)\n    not: function(value, notValue) {\n      value = (typeof value == 'string')\n        ? value.toLowerCase()\n        : value\n      ;\n      notValue = (typeof notValue == 'string')\n        ? notValue.toLowerCase()\n        : notValue\n      ;\n      return (value != notValue);\n    },\n\n    // value is not another value (case sensitive)\n    notExactly: function(value, notValue) {\n      return (value != notValue);\n    },\n\n    // value contains text (insensitive)\n    contains: function(value, text) {\n      // escape regex characters\n      text = text.replace($.fn.form.settings.regExp.escape, \"\\\\$&\");\n      return (value.search( new RegExp(text, 'i') ) !== -1);\n    },\n\n    // value contains text (case sensitive)\n    containsExactly: function(value, text) {\n      // escape regex characters\n      text = text.replace($.fn.form.settings.regExp.escape, \"\\\\$&\");\n      return (value.search( new RegExp(text) ) !== -1);\n    },\n\n    // value contains text (insensitive)\n    doesntContain: function(value, text) {\n      // escape regex characters\n      text = text.replace($.fn.form.settings.regExp.escape, \"\\\\$&\");\n      return (value.search( new RegExp(text, 'i') ) === -1);\n    },\n\n    // value contains text (case sensitive)\n    doesntContainExactly: function(value, text) {\n      // escape regex characters\n      text = text.replace($.fn.form.settings.regExp.escape, \"\\\\$&\");\n      return (value.search( new RegExp(text) ) === -1);\n    },\n\n    // is at least string length\n    minLength: function(value, requiredLength) {\n      return (value !== undefined)\n        ? (value.length >= requiredLength)\n        : false\n      ;\n    },\n\n    // see rls notes for 2.0.6 (this is a duplicate of minLength)\n    length: function(value, requiredLength) {\n      return (value !== undefined)\n        ? (value.length >= requiredLength)\n        : false\n      ;\n    },\n\n    // is exactly length\n    exactLength: function(value, requiredLength) {\n      return (value !== undefined)\n        ? (value.length == requiredLength)\n        : false\n      ;\n    },\n\n    // is less than length\n    maxLength: function(value, maxLength) {\n      return (value !== undefined)\n        ? (value.length <= maxLength)\n        : false\n      ;\n    },\n\n    // matches another field\n    match: function(value, identifier) {\n      var\n        $form = $(this),\n        matchingValue\n      ;\n      if( $('[data-validate=\"'+ identifier +'\"]').length > 0 ) {\n        matchingValue = $('[data-validate=\"'+ identifier +'\"]').val();\n      }\n      else if($('#' + identifier).length > 0) {\n        matchingValue = $('#' + identifier).val();\n      }\n      else if($('[name=\"' + identifier +'\"]').length > 0) {\n        matchingValue = $('[name=\"' + identifier + '\"]').val();\n      }\n      else if( $('[name=\"' + identifier +'[]\"]').length > 0 ) {\n        matchingValue = $('[name=\"' + identifier +'[]\"]');\n      }\n      return (matchingValue !== undefined)\n        ? ( value.toString() == matchingValue.toString() )\n        : false\n      ;\n    },\n\n    // different than another field\n    different: function(value, identifier) {\n      // use either id or name of field\n      var\n        $form = $(this),\n        matchingValue\n      ;\n      if( $('[data-validate=\"'+ identifier +'\"]').length > 0 ) {\n        matchingValue = $('[data-validate=\"'+ identifier +'\"]').val();\n      }\n      else if($('#' + identifier).length > 0) {\n        matchingValue = $('#' + identifier).val();\n      }\n      else if($('[name=\"' + identifier +'\"]').length > 0) {\n        matchingValue = $('[name=\"' + identifier + '\"]').val();\n      }\n      else if( $('[name=\"' + identifier +'[]\"]').length > 0 ) {\n        matchingValue = $('[name=\"' + identifier +'[]\"]');\n      }\n      return (matchingValue !== undefined)\n        ? ( value.toString() !== matchingValue.toString() )\n        : false\n      ;\n    },\n\n    creditCard: function(cardNumber, cardTypes) {\n      var\n        cards = {\n          visa: {\n            pattern : /^4/,\n            length  : [16]\n          },\n          amex: {\n            pattern : /^3[47]/,\n            length  : [15]\n          },\n          mastercard: {\n            pattern : /^5[1-5]/,\n            length  : [16]\n          },\n          discover: {\n            pattern : /^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,\n            length  : [16]\n          },\n          unionPay: {\n            pattern : /^(62|88)/,\n            length  : [16, 17, 18, 19]\n          },\n          jcb: {\n            pattern : /^35(2[89]|[3-8][0-9])/,\n            length  : [16]\n          },\n          maestro: {\n            pattern : /^(5018|5020|5038|6304|6759|676[1-3])/,\n            length  : [12, 13, 14, 15, 16, 17, 18, 19]\n          },\n          dinersClub: {\n            pattern : /^(30[0-5]|^36)/,\n            length  : [14]\n          },\n          laser: {\n            pattern : /^(6304|670[69]|6771)/,\n            length  : [16, 17, 18, 19]\n          },\n          visaElectron: {\n            pattern : /^(4026|417500|4508|4844|491(3|7))/,\n            length  : [16]\n          }\n        },\n        valid         = {},\n        validCard     = false,\n        requiredTypes = (typeof cardTypes == 'string')\n          ? cardTypes.split(',')\n          : false,\n        unionPay,\n        validation\n      ;\n\n      if(typeof cardNumber !== 'string' || cardNumber.length === 0) {\n        return;\n      }\n\n      // verify card types\n      if(requiredTypes) {\n        $.each(requiredTypes, function(index, type){\n          // verify each card type\n          validation = cards[type];\n          if(validation) {\n            valid = {\n              length  : ($.inArray(cardNumber.length, validation.length) !== -1),\n              pattern : (cardNumber.search(validation.pattern) !== -1)\n            };\n            if(valid.length && valid.pattern) {\n              validCard = true;\n            }\n          }\n        });\n\n        if(!validCard) {\n          return false;\n        }\n      }\n\n      // skip luhn for UnionPay\n      unionPay = {\n        number  : ($.inArray(cardNumber.length, cards.unionPay.length) !== -1),\n        pattern : (cardNumber.search(cards.unionPay.pattern) !== -1)\n      };\n      if(unionPay.number && unionPay.pattern) {\n        return true;\n      }\n\n      // verify luhn, adapted from  <https://gist.github.com/2134376>\n      var\n        length        = cardNumber.length,\n        multiple      = 0,\n        producedValue = [\n          [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],\n          [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]\n        ],\n        sum           = 0\n      ;\n      while (length--) {\n        sum += producedValue[multiple][parseInt(cardNumber.charAt(length), 10)];\n        multiple ^= 1;\n      }\n      return (sum % 10 === 0 && sum > 0);\n    },\n\n    minCount: function(value, minCount) {\n      if(minCount == 0) {\n        return true;\n      }\n      if(minCount == 1) {\n        return (value !== '');\n      }\n      return (value.split(',').length >= minCount);\n    },\n\n    exactCount: function(value, exactCount) {\n      if(exactCount == 0) {\n        return (value === '');\n      }\n      if(exactCount == 1) {\n        return (value !== '' && value.search(',') === -1);\n      }\n      return (value.split(',').length == exactCount);\n    },\n\n    maxCount: function(value, maxCount) {\n      if(maxCount == 0) {\n        return false;\n      }\n      if(maxCount == 1) {\n        return (value.search(',') === -1);\n      }\n      return (value.split(',').length <= maxCount);\n    }\n  }\n\n};\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Accordion\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.accordion = function(parameters) {\n  var\n    $allModules     = $(this),\n\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n\n    requestAnimationFrame = window.requestAnimationFrame\n      || window.mozRequestAnimationFrame\n      || window.webkitRequestAnimationFrame\n      || window.msRequestAnimationFrame\n      || function(callback) { setTimeout(callback, 0); },\n\n    returnedValue\n  ;\n  $allModules\n    .each(function() {\n      var\n        settings        = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.accordion.settings, parameters)\n          : $.extend({}, $.fn.accordion.settings),\n\n        className       = settings.className,\n        namespace       = settings.namespace,\n        selector        = settings.selector,\n        error           = settings.error,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n        moduleSelector  = $allModules.selector || '',\n\n        $module  = $(this),\n        $title   = $module.find(selector.title),\n        $content = $module.find(selector.content),\n\n        element  = this,\n        instance = $module.data(moduleNamespace),\n        observer,\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.debug('Initializing', $module);\n          module.bind.events();\n          if(settings.observeChanges) {\n            module.observeChanges();\n          }\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.debug('Destroying previous instance', $module);\n          $module\n            .off(eventNamespace)\n            .removeData(moduleNamespace)\n          ;\n        },\n\n        refresh: function() {\n          $title   = $module.find(selector.title);\n          $content = $module.find(selector.content);\n        },\n\n        observeChanges: function() {\n          if('MutationObserver' in window) {\n            observer = new MutationObserver(function(mutations) {\n              module.debug('DOM tree modified, updating selector cache');\n              module.refresh();\n            });\n            observer.observe(element, {\n              childList : true,\n              subtree   : true\n            });\n            module.debug('Setting up mutation observer', observer);\n          }\n        },\n\n        bind: {\n          events: function() {\n            module.debug('Binding delegated events');\n            $module\n              .on(settings.on + eventNamespace, selector.trigger, module.event.click)\n            ;\n          }\n        },\n\n        event: {\n          click: function() {\n            module.toggle.call(this);\n          }\n        },\n\n        toggle: function(query) {\n          var\n            $activeTitle = (query !== undefined)\n              ? (typeof query === 'number')\n                ? $title.eq(query)\n                : $(query).closest(selector.title)\n              : $(this).closest(selector.title),\n            $activeContent = $activeTitle.next($content),\n            isAnimating = $activeContent.hasClass(className.animating),\n            isActive    = $activeContent.hasClass(className.active),\n            isOpen      = (isActive && !isAnimating),\n            isOpening   = (!isActive && isAnimating)\n          ;\n          module.debug('Toggling visibility of content', $activeTitle);\n          if(isOpen || isOpening) {\n            if(settings.collapsible) {\n              module.close.call($activeTitle);\n            }\n            else {\n              module.debug('Cannot close accordion content collapsing is disabled');\n            }\n          }\n          else {\n            module.open.call($activeTitle);\n          }\n        },\n\n        open: function(query) {\n          var\n            $activeTitle = (query !== undefined)\n              ? (typeof query === 'number')\n                ? $title.eq(query)\n                : $(query).closest(selector.title)\n              : $(this).closest(selector.title),\n            $activeContent = $activeTitle.next($content),\n            isAnimating = $activeContent.hasClass(className.animating),\n            isActive    = $activeContent.hasClass(className.active),\n            isOpen      = (isActive || isAnimating)\n          ;\n          if(isOpen) {\n            module.debug('Accordion already open, skipping', $activeContent);\n            return;\n          }\n          module.debug('Opening accordion content', $activeTitle);\n          settings.onOpening.call($activeContent);\n          if(settings.exclusive) {\n            module.closeOthers.call($activeTitle);\n          }\n          $activeTitle\n            .addClass(className.active)\n          ;\n          $activeContent\n            .stop(true, true)\n            .addClass(className.animating)\n          ;\n          if(settings.animateChildren) {\n            if($.fn.transition !== undefined && $module.transition('is supported')) {\n              $activeContent\n                .children()\n                  .transition({\n                    animation   : 'fade in',\n                    queue       : false,\n                    useFailSafe : true,\n                    debug       : settings.debug,\n                    verbose     : settings.verbose,\n                    duration    : settings.duration\n                  })\n              ;\n            }\n            else {\n              $activeContent\n                .children()\n                  .stop(true, true)\n                  .animate({\n                    opacity: 1\n                  }, settings.duration, module.resetOpacity)\n              ;\n            }\n          }\n          $activeContent\n            .slideDown(settings.duration, settings.easing, function() {\n              $activeContent\n                .removeClass(className.animating)\n                .addClass(className.active)\n              ;\n              module.reset.display.call(this);\n              settings.onOpen.call(this);\n              settings.onChange.call(this);\n            })\n          ;\n        },\n\n        close: function(query) {\n          var\n            $activeTitle = (query !== undefined)\n              ? (typeof query === 'number')\n                ? $title.eq(query)\n                : $(query).closest(selector.title)\n              : $(this).closest(selector.title),\n            $activeContent = $activeTitle.next($content),\n            isAnimating    = $activeContent.hasClass(className.animating),\n            isActive       = $activeContent.hasClass(className.active),\n            isOpening      = (!isActive && isAnimating),\n            isClosing      = (isActive && isAnimating)\n          ;\n          if((isActive || isOpening) && !isClosing) {\n            module.debug('Closing accordion content', $activeContent);\n            settings.onClosing.call($activeContent);\n            $activeTitle\n              .removeClass(className.active)\n            ;\n            $activeContent\n              .stop(true, true)\n              .addClass(className.animating)\n            ;\n            if(settings.animateChildren) {\n              if($.fn.transition !== undefined && $module.transition('is supported')) {\n                $activeContent\n                  .children()\n                    .transition({\n                      animation   : 'fade out',\n                      queue       : false,\n                      useFailSafe : true,\n                      debug       : settings.debug,\n                      verbose     : settings.verbose,\n                      duration    : settings.duration\n                    })\n                ;\n              }\n              else {\n                $activeContent\n                  .children()\n                    .stop(true, true)\n                    .animate({\n                      opacity: 0\n                    }, settings.duration, module.resetOpacity)\n                ;\n              }\n            }\n            $activeContent\n              .slideUp(settings.duration, settings.easing, function() {\n                $activeContent\n                  .removeClass(className.animating)\n                  .removeClass(className.active)\n                ;\n                module.reset.display.call(this);\n                settings.onClose.call(this);\n                settings.onChange.call(this);\n              })\n            ;\n          }\n        },\n\n        closeOthers: function(index) {\n          var\n            $activeTitle = (index !== undefined)\n              ? $title.eq(index)\n              : $(this).closest(selector.title),\n            $parentTitles    = $activeTitle.parents(selector.content).prev(selector.title),\n            $activeAccordion = $activeTitle.closest(selector.accordion),\n            activeSelector   = selector.title + '.' + className.active + ':visible',\n            activeContent    = selector.content + '.' + className.active + ':visible',\n            $openTitles,\n            $nestedTitles,\n            $openContents\n          ;\n          if(settings.closeNested) {\n            $openTitles   = $activeAccordion.find(activeSelector).not($parentTitles);\n            $openContents = $openTitles.next($content);\n          }\n          else {\n            $openTitles   = $activeAccordion.find(activeSelector).not($parentTitles);\n            $nestedTitles = $activeAccordion.find(activeContent).find(activeSelector).not($parentTitles);\n            $openTitles   = $openTitles.not($nestedTitles);\n            $openContents = $openTitles.next($content);\n          }\n          if( ($openTitles.length > 0) ) {\n            module.debug('Exclusive enabled, closing other content', $openTitles);\n            $openTitles\n              .removeClass(className.active)\n            ;\n            $openContents\n              .removeClass(className.animating)\n              .stop(true, true)\n            ;\n            if(settings.animateChildren) {\n              if($.fn.transition !== undefined && $module.transition('is supported')) {\n                $openContents\n                  .children()\n                    .transition({\n                      animation   : 'fade out',\n                      useFailSafe : true,\n                      debug       : settings.debug,\n                      verbose     : settings.verbose,\n                      duration    : settings.duration\n                    })\n                ;\n              }\n              else {\n                $openContents\n                  .children()\n                    .stop(true, true)\n                    .animate({\n                      opacity: 0\n                    }, settings.duration, module.resetOpacity)\n                ;\n              }\n            }\n            $openContents\n              .slideUp(settings.duration , settings.easing, function() {\n                $(this).removeClass(className.active);\n                module.reset.display.call(this);\n              })\n            ;\n          }\n        },\n\n        reset: {\n\n          display: function() {\n            module.verbose('Removing inline display from element', this);\n            $(this).css('display', '');\n            if( $(this).attr('style') === '') {\n              $(this)\n                .attr('style', '')\n                .removeAttr('style')\n              ;\n            }\n          },\n\n          opacity: function() {\n            module.verbose('Removing inline opacity from element', this);\n            $(this).css('opacity', '');\n            if( $(this).attr('style') === '') {\n              $(this)\n                .attr('style', '')\n                .removeAttr('style')\n              ;\n            }\n          },\n\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          module.debug('Changing internal', name, value);\n          if(value !== undefined) {\n            if( $.isPlainObject(name) ) {\n              $.extend(true, module, name);\n            }\n            else {\n              module[name] = value;\n            }\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.accordion.settings = {\n\n  name            : 'Accordion',\n  namespace       : 'accordion',\n\n  silent          : false,\n  debug           : false,\n  verbose         : false,\n  performance     : true,\n\n  on              : 'click', // event on title that opens accordion\n\n  observeChanges  : true,  // whether accordion should automatically refresh on DOM insertion\n\n  exclusive       : true,  // whether a single accordion content panel should be open at once\n  collapsible     : true,  // whether accordion content can be closed\n  closeNested     : false, // whether nested content should be closed when a panel is closed\n  animateChildren : true,  // whether children opacity should be animated\n\n  duration        : 350, // duration of animation\n  easing          : 'easeOutQuad', // easing equation for animation\n\n\n  onOpening       : function(){}, // callback before open animation\n  onOpen          : function(){}, // callback after open animation\n  onClosing       : function(){}, // callback before closing animation\n  onClose         : function(){}, // callback after closing animation\n  onChange        : function(){}, // callback after closing or opening animation\n\n  error: {\n    method : 'The method you called is not defined'\n  },\n\n  className   : {\n    active    : 'active',\n    animating : 'animating'\n  },\n\n  selector    : {\n    accordion : '.accordion',\n    title     : '.title',\n    trigger   : '.title',\n    content   : '.content'\n  }\n\n};\n\n// Adds easing\n$.extend( $.easing, {\n  easeOutQuad: function (x, t, b, c, d) {\n    return -c *(t/=d)*(t-2) + b;\n  }\n});\n\n})( jQuery, window, document );\n\n\n/*!\n * # Semantic UI 2.2.4 - Checkbox\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.checkbox = function(parameters) {\n  var\n    $allModules    = $(this),\n    moduleSelector = $allModules.selector || '',\n\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings        = $.extend(true, {}, $.fn.checkbox.settings, parameters),\n\n        className       = settings.className,\n        namespace       = settings.namespace,\n        selector        = settings.selector,\n        error           = settings.error,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        $module         = $(this),\n        $label          = $(this).children(selector.label),\n        $input          = $(this).children(selector.input),\n        input           = $input[0],\n\n        initialLoad     = false,\n        shortcutPressed = false,\n        instance        = $module.data(moduleNamespace),\n\n        observer,\n        element         = this,\n        module\n      ;\n\n      module      = {\n\n        initialize: function() {\n          module.verbose('Initializing checkbox', settings);\n\n          module.create.label();\n          module.bind.events();\n\n          module.set.tabbable();\n          module.hide.input();\n\n          module.observeChanges();\n          module.instantiate();\n          module.setup();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying module');\n          module.unbind.events();\n          module.show.input();\n          $module.removeData(moduleNamespace);\n        },\n\n        fix: {\n          reference: function() {\n            if( $module.is(selector.input) ) {\n              module.debug('Behavior called on <input> adjusting invoked element');\n              $module = $module.closest(selector.checkbox);\n              module.refresh();\n            }\n          }\n        },\n\n        setup: function() {\n          module.set.initialLoad();\n          if( module.is.indeterminate() ) {\n            module.debug('Initial value is indeterminate');\n            module.indeterminate();\n          }\n          else if( module.is.checked() ) {\n            module.debug('Initial value is checked');\n            module.check();\n          }\n          else {\n            module.debug('Initial value is unchecked');\n            module.uncheck();\n          }\n          module.remove.initialLoad();\n        },\n\n        refresh: function() {\n          $label = $module.children(selector.label);\n          $input = $module.children(selector.input);\n          input  = $input[0];\n        },\n\n        hide: {\n          input: function() {\n            module.verbose('Modifying <input> z-index to be unselectable');\n            $input.addClass(className.hidden);\n          }\n        },\n        show: {\n          input: function() {\n            module.verbose('Modifying <input> z-index to be selectable');\n            $input.removeClass(className.hidden);\n          }\n        },\n\n        observeChanges: function() {\n          if('MutationObserver' in window) {\n            observer = new MutationObserver(function(mutations) {\n              module.debug('DOM tree modified, updating selector cache');\n              module.refresh();\n            });\n            observer.observe(element, {\n              childList : true,\n              subtree   : true\n            });\n            module.debug('Setting up mutation observer', observer);\n          }\n        },\n\n        attachEvents: function(selector, event) {\n          var\n            $element = $(selector)\n          ;\n          event = $.isFunction(module[event])\n            ? module[event]\n            : module.toggle\n          ;\n          if($element.length > 0) {\n            module.debug('Attaching checkbox events to element', selector, event);\n            $element\n              .on('click' + eventNamespace, event)\n            ;\n          }\n          else {\n            module.error(error.notFound);\n          }\n        },\n\n        event: {\n          click: function(event) {\n            var\n              $target = $(event.target)\n            ;\n            if( $target.is(selector.input) ) {\n              module.verbose('Using default check action on initialized checkbox');\n              return;\n            }\n            if( $target.is(selector.link) ) {\n              module.debug('Clicking link inside checkbox, skipping toggle');\n              return;\n            }\n            module.toggle();\n            $input.focus();\n            event.preventDefault();\n          },\n          keydown: function(event) {\n            var\n              key     = event.which,\n              keyCode = {\n                enter  : 13,\n                space  : 32,\n                escape : 27\n              }\n            ;\n            if(key == keyCode.escape) {\n              module.verbose('Escape key pressed blurring field');\n              $input.blur();\n              shortcutPressed = true;\n            }\n            else if(!event.ctrlKey && ( key == keyCode.space || key == keyCode.enter) ) {\n              module.verbose('Enter/space key pressed, toggling checkbox');\n              module.toggle();\n              shortcutPressed = true;\n            }\n            else {\n              shortcutPressed = false;\n            }\n          },\n          keyup: function(event) {\n            if(shortcutPressed) {\n              event.preventDefault();\n            }\n          }\n        },\n\n        check: function() {\n          if( !module.should.allowCheck() ) {\n            return;\n          }\n          module.debug('Checking checkbox', $input);\n          module.set.checked();\n          if( !module.should.ignoreCallbacks() ) {\n            settings.onChecked.call(input);\n            settings.onChange.call(input);\n          }\n        },\n\n        uncheck: function() {\n          if( !module.should.allowUncheck() ) {\n            return;\n          }\n          module.debug('Unchecking checkbox');\n          module.set.unchecked();\n          if( !module.should.ignoreCallbacks() ) {\n            settings.onUnchecked.call(input);\n            settings.onChange.call(input);\n          }\n        },\n\n        indeterminate: function() {\n          if( module.should.allowIndeterminate() ) {\n            module.debug('Checkbox is already indeterminate');\n            return;\n          }\n          module.debug('Making checkbox indeterminate');\n          module.set.indeterminate();\n          if( !module.should.ignoreCallbacks() ) {\n            settings.onIndeterminate.call(input);\n            settings.onChange.call(input);\n          }\n        },\n\n        determinate: function() {\n          if( module.should.allowDeterminate() ) {\n            module.debug('Checkbox is already determinate');\n            return;\n          }\n          module.debug('Making checkbox determinate');\n          module.set.determinate();\n          if( !module.should.ignoreCallbacks() ) {\n            settings.onDeterminate.call(input);\n            settings.onChange.call(input);\n          }\n        },\n\n        enable: function() {\n          if( module.is.enabled() ) {\n            module.debug('Checkbox is already enabled');\n            return;\n          }\n          module.debug('Enabling checkbox');\n          module.set.enabled();\n          settings.onEnable.call(input);\n          // preserve legacy callbacks\n          settings.onEnabled.call(input);\n        },\n\n        disable: function() {\n          if( module.is.disabled() ) {\n            module.debug('Checkbox is already disabled');\n            return;\n          }\n          module.debug('Disabling checkbox');\n          module.set.disabled();\n          settings.onDisable.call(input);\n          // preserve legacy callbacks\n          settings.onDisabled.call(input);\n        },\n\n        get: {\n          radios: function() {\n            var\n              name = module.get.name()\n            ;\n            return $('input[name=\"' + name + '\"]').closest(selector.checkbox);\n          },\n          otherRadios: function() {\n            return module.get.radios().not($module);\n          },\n          name: function() {\n            return $input.attr('name');\n          }\n        },\n\n        is: {\n          initialLoad: function() {\n            return initialLoad;\n          },\n          radio: function() {\n            return ($input.hasClass(className.radio) || $input.attr('type') == 'radio');\n          },\n          indeterminate: function() {\n            return $input.prop('indeterminate') !== undefined && $input.prop('indeterminate');\n          },\n          checked: function() {\n            return $input.prop('checked') !== undefined && $input.prop('checked');\n          },\n          disabled: function() {\n            return $input.prop('disabled') !== undefined && $input.prop('disabled');\n          },\n          enabled: function() {\n            return !module.is.disabled();\n          },\n          determinate: function() {\n            return !module.is.indeterminate();\n          },\n          unchecked: function() {\n            return !module.is.checked();\n          }\n        },\n\n        should: {\n          allowCheck: function() {\n            if(module.is.determinate() && module.is.checked() && !module.should.forceCallbacks() ) {\n              module.debug('Should not allow check, checkbox is already checked');\n              return false;\n            }\n            if(settings.beforeChecked.apply(input) === false) {\n              module.debug('Should not allow check, beforeChecked cancelled');\n              return false;\n            }\n            return true;\n          },\n          allowUncheck: function() {\n            if(module.is.determinate() && module.is.unchecked() && !module.should.forceCallbacks() ) {\n              module.debug('Should not allow uncheck, checkbox is already unchecked');\n              return false;\n            }\n            if(settings.beforeUnchecked.apply(input) === false) {\n              module.debug('Should not allow uncheck, beforeUnchecked cancelled');\n              return false;\n            }\n            return true;\n          },\n          allowIndeterminate: function() {\n            if(module.is.indeterminate() && !module.should.forceCallbacks() ) {\n              module.debug('Should not allow indeterminate, checkbox is already indeterminate');\n              return false;\n            }\n            if(settings.beforeIndeterminate.apply(input) === false) {\n              module.debug('Should not allow indeterminate, beforeIndeterminate cancelled');\n              return false;\n            }\n            return true;\n          },\n          allowDeterminate: function() {\n            if(module.is.determinate() && !module.should.forceCallbacks() ) {\n              module.debug('Should not allow determinate, checkbox is already determinate');\n              return false;\n            }\n            if(settings.beforeDeterminate.apply(input) === false) {\n              module.debug('Should not allow determinate, beforeDeterminate cancelled');\n              return false;\n            }\n            return true;\n          },\n          forceCallbacks: function() {\n            return (module.is.initialLoad() && settings.fireOnInit);\n          },\n          ignoreCallbacks: function() {\n            return (initialLoad && !settings.fireOnInit);\n          }\n        },\n\n        can: {\n          change: function() {\n            return !( $module.hasClass(className.disabled) || $module.hasClass(className.readOnly) || $input.prop('disabled') || $input.prop('readonly') );\n          },\n          uncheck: function() {\n            return (typeof settings.uncheckable === 'boolean')\n              ? settings.uncheckable\n              : !module.is.radio()\n            ;\n          }\n        },\n\n        set: {\n          initialLoad: function() {\n            initialLoad = true;\n          },\n          checked: function() {\n            module.verbose('Setting class to checked');\n            $module\n              .removeClass(className.indeterminate)\n              .addClass(className.checked)\n            ;\n            if( module.is.radio() ) {\n              module.uncheckOthers();\n            }\n            if(!module.is.indeterminate() && module.is.checked()) {\n              module.debug('Input is already checked, skipping input property change');\n              return;\n            }\n            module.verbose('Setting state to checked', input);\n            $input\n              .prop('indeterminate', false)\n              .prop('checked', true)\n            ;\n            module.trigger.change();\n          },\n          unchecked: function() {\n            module.verbose('Removing checked class');\n            $module\n              .removeClass(className.indeterminate)\n              .removeClass(className.checked)\n            ;\n            if(!module.is.indeterminate() &&  module.is.unchecked() ) {\n              module.debug('Input is already unchecked');\n              return;\n            }\n            module.debug('Setting state to unchecked');\n            $input\n              .prop('indeterminate', false)\n              .prop('checked', false)\n            ;\n            module.trigger.change();\n          },\n          indeterminate: function() {\n            module.verbose('Setting class to indeterminate');\n            $module\n              .addClass(className.indeterminate)\n            ;\n            if( module.is.indeterminate() ) {\n              module.debug('Input is already indeterminate, skipping input property change');\n              return;\n            }\n            module.debug('Setting state to indeterminate');\n            $input\n              .prop('indeterminate', true)\n            ;\n            module.trigger.change();\n          },\n          determinate: function() {\n            module.verbose('Removing indeterminate class');\n            $module\n              .removeClass(className.indeterminate)\n            ;\n            if( module.is.determinate() ) {\n              module.debug('Input is already determinate, skipping input property change');\n              return;\n            }\n            module.debug('Setting state to determinate');\n            $input\n              .prop('indeterminate', false)\n            ;\n          },\n          disabled: function() {\n            module.verbose('Setting class to disabled');\n            $module\n              .addClass(className.disabled)\n            ;\n            if( module.is.disabled() ) {\n              module.debug('Input is already disabled, skipping input property change');\n              return;\n            }\n            module.debug('Setting state to disabled');\n            $input\n              .prop('disabled', 'disabled')\n            ;\n            module.trigger.change();\n          },\n          enabled: function() {\n            module.verbose('Removing disabled class');\n            $module.removeClass(className.disabled);\n            if( module.is.enabled() ) {\n              module.debug('Input is already enabled, skipping input property change');\n              return;\n            }\n            module.debug('Setting state to enabled');\n            $input\n              .prop('disabled', false)\n            ;\n            module.trigger.change();\n          },\n          tabbable: function() {\n            module.verbose('Adding tabindex to checkbox');\n            if( $input.attr('tabindex') === undefined) {\n              $input.attr('tabindex', 0);\n            }\n          }\n        },\n\n        remove: {\n          initialLoad: function() {\n            initialLoad = false;\n          }\n        },\n\n        trigger: {\n          change: function() {\n            var\n              events       = document.createEvent('HTMLEvents'),\n              inputElement = $input[0]\n            ;\n            if(inputElement) {\n              module.verbose('Triggering native change event');\n              events.initEvent('change', true, false);\n              inputElement.dispatchEvent(events);\n            }\n          }\n        },\n\n\n        create: {\n          label: function() {\n            if($input.prevAll(selector.label).length > 0) {\n              $input.prev(selector.label).detach().insertAfter($input);\n              module.debug('Moving existing label', $label);\n            }\n            else if( !module.has.label() ) {\n              $label = $('<label>').insertAfter($input);\n              module.debug('Creating label', $label);\n            }\n          }\n        },\n\n        has: {\n          label: function() {\n            return ($label.length > 0);\n          }\n        },\n\n        bind: {\n          events: function() {\n            module.verbose('Attaching checkbox events');\n            $module\n              .on('click'   + eventNamespace, module.event.click)\n              .on('keydown' + eventNamespace, selector.input, module.event.keydown)\n              .on('keyup'   + eventNamespace, selector.input, module.event.keyup)\n            ;\n          }\n        },\n\n        unbind: {\n          events: function() {\n            module.debug('Removing events');\n            $module\n              .off(eventNamespace)\n            ;\n          }\n        },\n\n        uncheckOthers: function() {\n          var\n            $radios = module.get.otherRadios()\n          ;\n          module.debug('Unchecking other radios', $radios);\n          $radios.removeClass(className.checked);\n        },\n\n        toggle: function() {\n          if( !module.can.change() ) {\n            if(!module.is.radio()) {\n              module.debug('Checkbox is read-only or disabled, ignoring toggle');\n            }\n            return;\n          }\n          if( module.is.indeterminate() || module.is.unchecked() ) {\n            module.debug('Currently unchecked');\n            module.check();\n          }\n          else if( module.is.checked() && module.can.uncheck() ) {\n            module.debug('Currently checked');\n            module.uncheck();\n          }\n        },\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.checkbox.settings = {\n\n  name                : 'Checkbox',\n  namespace           : 'checkbox',\n\n  silent              : false,\n  debug               : false,\n  verbose             : true,\n  performance         : true,\n\n  // delegated event context\n  uncheckable         : 'auto',\n  fireOnInit          : false,\n\n  onChange            : function(){},\n\n  beforeChecked       : function(){},\n  beforeUnchecked     : function(){},\n  beforeDeterminate   : function(){},\n  beforeIndeterminate : function(){},\n\n  onChecked           : function(){},\n  onUnchecked         : function(){},\n\n  onDeterminate       : function() {},\n  onIndeterminate     : function() {},\n\n  onEnable            : function(){},\n  onDisable           : function(){},\n\n  // preserve misspelled callbacks (will be removed in 3.0)\n  onEnabled           : function(){},\n  onDisabled          : function(){},\n\n  className       : {\n    checked       : 'checked',\n    indeterminate : 'indeterminate',\n    disabled      : 'disabled',\n    hidden        : 'hidden',\n    radio         : 'radio',\n    readOnly      : 'read-only'\n  },\n\n  error     : {\n    method       : 'The method you called is not defined'\n  },\n\n  selector : {\n    checkbox : '.ui.checkbox',\n    label    : 'label, .box',\n    input    : 'input[type=\"checkbox\"], input[type=\"radio\"]',\n    link     : 'a[href]'\n  }\n\n};\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Dimmer\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.dimmer = function(parameters) {\n  var\n    $allModules     = $(this),\n\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings        = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.dimmer.settings, parameters)\n          : $.extend({}, $.fn.dimmer.settings),\n\n        selector        = settings.selector,\n        namespace       = settings.namespace,\n        className       = settings.className,\n        error           = settings.error,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n        moduleSelector  = $allModules.selector || '',\n\n        clickEvent      = ('ontouchstart' in document.documentElement)\n          ? 'touchstart'\n          : 'click',\n\n        $module = $(this),\n        $dimmer,\n        $dimmable,\n\n        element   = this,\n        instance  = $module.data(moduleNamespace),\n        module\n      ;\n\n      module = {\n\n        preinitialize: function() {\n          if( module.is.dimmer() ) {\n\n            $dimmable = $module.parent();\n            $dimmer   = $module;\n          }\n          else {\n            $dimmable = $module;\n            if( module.has.dimmer() ) {\n              if(settings.dimmerName) {\n                $dimmer = $dimmable.find(selector.dimmer).filter('.' + settings.dimmerName);\n              }\n              else {\n                $dimmer = $dimmable.find(selector.dimmer);\n              }\n            }\n            else {\n              $dimmer = module.create();\n            }\n            module.set.variation();\n          }\n        },\n\n        initialize: function() {\n          module.debug('Initializing dimmer', settings);\n\n          module.bind.events();\n          module.set.dimmable();\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, instance)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous module', $dimmer);\n          module.unbind.events();\n          module.remove.variation();\n          $dimmable\n            .off(eventNamespace)\n          ;\n        },\n\n        bind: {\n          events: function() {\n            if(settings.on == 'hover') {\n              $dimmable\n                .on('mouseenter' + eventNamespace, module.show)\n                .on('mouseleave' + eventNamespace, module.hide)\n              ;\n            }\n            else if(settings.on == 'click') {\n              $dimmable\n                .on(clickEvent + eventNamespace, module.toggle)\n              ;\n            }\n            if( module.is.page() ) {\n              module.debug('Setting as a page dimmer', $dimmable);\n              module.set.pageDimmer();\n            }\n\n            if( module.is.closable() ) {\n              module.verbose('Adding dimmer close event', $dimmer);\n              $dimmable\n                .on(clickEvent + eventNamespace, selector.dimmer, module.event.click)\n              ;\n            }\n          }\n        },\n\n        unbind: {\n          events: function() {\n            $module\n              .removeData(moduleNamespace)\n            ;\n            $dimmable\n              .off(eventNamespace)\n            ;\n          }\n        },\n\n        event: {\n          click: function(event) {\n            module.verbose('Determining if event occured on dimmer', event);\n            if( $dimmer.find(event.target).length === 0 || $(event.target).is(selector.content) ) {\n              module.hide();\n              event.stopImmediatePropagation();\n            }\n          }\n        },\n\n        addContent: function(element) {\n          var\n            $content = $(element)\n          ;\n          module.debug('Add content to dimmer', $content);\n          if($content.parent()[0] !== $dimmer[0]) {\n            $content.detach().appendTo($dimmer);\n          }\n        },\n\n        create: function() {\n          var\n            $element = $( settings.template.dimmer() )\n          ;\n          if(settings.dimmerName) {\n            module.debug('Creating named dimmer', settings.dimmerName);\n            $element.addClass(settings.dimmerName);\n          }\n          $element\n            .appendTo($dimmable)\n          ;\n          return $element;\n        },\n\n        show: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          module.debug('Showing dimmer', $dimmer, settings);\n          if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) {\n            module.animate.show(callback);\n            settings.onShow.call(element);\n            settings.onChange.call(element);\n          }\n          else {\n            module.debug('Dimmer is already shown or disabled');\n          }\n        },\n\n        hide: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if( module.is.dimmed() || module.is.animating() ) {\n            module.debug('Hiding dimmer', $dimmer);\n            module.animate.hide(callback);\n            settings.onHide.call(element);\n            settings.onChange.call(element);\n          }\n          else {\n            module.debug('Dimmer is not visible');\n          }\n        },\n\n        toggle: function() {\n          module.verbose('Toggling dimmer visibility', $dimmer);\n          if( !module.is.dimmed() ) {\n            module.show();\n          }\n          else {\n            module.hide();\n          }\n        },\n\n        animate: {\n          show: function(callback) {\n            callback = $.isFunction(callback)\n              ? callback\n              : function(){}\n            ;\n            if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {\n              if(settings.opacity !== 'auto') {\n                module.set.opacity();\n              }\n              $dimmer\n                .transition({\n                  animation   : settings.transition + ' in',\n                  queue       : false,\n                  duration    : module.get.duration(),\n                  useFailSafe : true,\n                  onStart     : function() {\n                    module.set.dimmed();\n                  },\n                  onComplete  : function() {\n                    module.set.active();\n                    callback();\n                  }\n                })\n              ;\n            }\n            else {\n              module.verbose('Showing dimmer animation with javascript');\n              module.set.dimmed();\n              if(settings.opacity == 'auto') {\n                settings.opacity = 0.8;\n              }\n              $dimmer\n                .stop()\n                .css({\n                  opacity : 0,\n                  width   : '100%',\n                  height  : '100%'\n                })\n                .fadeTo(module.get.duration(), settings.opacity, function() {\n                  $dimmer.removeAttr('style');\n                  module.set.active();\n                  callback();\n                })\n              ;\n            }\n          },\n          hide: function(callback) {\n            callback = $.isFunction(callback)\n              ? callback\n              : function(){}\n            ;\n            if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {\n              module.verbose('Hiding dimmer with css');\n              $dimmer\n                .transition({\n                  animation   : settings.transition + ' out',\n                  queue       : false,\n                  duration    : module.get.duration(),\n                  useFailSafe : true,\n                  onStart     : function() {\n                    module.remove.dimmed();\n                  },\n                  onComplete  : function() {\n                    module.remove.active();\n                    callback();\n                  }\n                })\n              ;\n            }\n            else {\n              module.verbose('Hiding dimmer with javascript');\n              module.remove.dimmed();\n              $dimmer\n                .stop()\n                .fadeOut(module.get.duration(), function() {\n                  module.remove.active();\n                  $dimmer.removeAttr('style');\n                  callback();\n                })\n              ;\n            }\n          }\n        },\n\n        get: {\n          dimmer: function() {\n            return $dimmer;\n          },\n          duration: function() {\n            if(typeof settings.duration == 'object') {\n              if( module.is.active() ) {\n                return settings.duration.hide;\n              }\n              else {\n                return settings.duration.show;\n              }\n            }\n            return settings.duration;\n          }\n        },\n\n        has: {\n          dimmer: function() {\n            if(settings.dimmerName) {\n              return ($module.find(selector.dimmer).filter('.' + settings.dimmerName).length > 0);\n            }\n            else {\n              return ( $module.find(selector.dimmer).length > 0 );\n            }\n          }\n        },\n\n        is: {\n          active: function() {\n            return $dimmer.hasClass(className.active);\n          },\n          animating: function() {\n            return ( $dimmer.is(':animated') || $dimmer.hasClass(className.animating) );\n          },\n          closable: function() {\n            if(settings.closable == 'auto') {\n              if(settings.on == 'hover') {\n                return false;\n              }\n              return true;\n            }\n            return settings.closable;\n          },\n          dimmer: function() {\n            return $module.hasClass(className.dimmer);\n          },\n          dimmable: function() {\n            return $module.hasClass(className.dimmable);\n          },\n          dimmed: function() {\n            return $dimmable.hasClass(className.dimmed);\n          },\n          disabled: function() {\n            return $dimmable.hasClass(className.disabled);\n          },\n          enabled: function() {\n            return !module.is.disabled();\n          },\n          page: function () {\n            return $dimmable.is('body');\n          },\n          pageDimmer: function() {\n            return $dimmer.hasClass(className.pageDimmer);\n          }\n        },\n\n        can: {\n          show: function() {\n            return !$dimmer.hasClass(className.disabled);\n          }\n        },\n\n        set: {\n          opacity: function(opacity) {\n            var\n              color      = $dimmer.css('background-color'),\n              colorArray = color.split(','),\n              isRGB      = (colorArray && colorArray.length == 3),\n              isRGBA     = (colorArray && colorArray.length == 4)\n            ;\n            opacity    = settings.opacity === 0 ? 0 : settings.opacity || opacity;\n            if(isRGB || isRGBA) {\n              colorArray[3] = opacity + ')';\n              color         = colorArray.join(',');\n            }\n            else {\n              color = 'rgba(0, 0, 0, ' + opacity + ')';\n            }\n            module.debug('Setting opacity to', opacity);\n            $dimmer.css('background-color', color);\n          },\n          active: function() {\n            $dimmer.addClass(className.active);\n          },\n          dimmable: function() {\n            $dimmable.addClass(className.dimmable);\n          },\n          dimmed: function() {\n            $dimmable.addClass(className.dimmed);\n          },\n          pageDimmer: function() {\n            $dimmer.addClass(className.pageDimmer);\n          },\n          disabled: function() {\n            $dimmer.addClass(className.disabled);\n          },\n          variation: function(variation) {\n            variation = variation || settings.variation;\n            if(variation) {\n              $dimmer.addClass(variation);\n            }\n          }\n        },\n\n        remove: {\n          active: function() {\n            $dimmer\n              .removeClass(className.active)\n            ;\n          },\n          dimmed: function() {\n            $dimmable.removeClass(className.dimmed);\n          },\n          disabled: function() {\n            $dimmer.removeClass(className.disabled);\n          },\n          variation: function(variation) {\n            variation = variation || settings.variation;\n            if(variation) {\n              $dimmer.removeClass(variation);\n            }\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if($allModules.length > 1) {\n              title += ' ' + '(' + $allModules.length + ')';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      module.preinitialize();\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.dimmer.settings = {\n\n  name        : 'Dimmer',\n  namespace   : 'dimmer',\n\n  silent      : false,\n  debug       : false,\n  verbose     : false,\n  performance : true,\n\n  // name to distinguish between multiple dimmers in context\n  dimmerName  : false,\n\n  // whether to add a variation type\n  variation   : false,\n\n  // whether to bind close events\n  closable    : 'auto',\n\n  // whether to use css animations\n  useCSS      : true,\n\n  // css animation to use\n  transition  : 'fade',\n\n  // event to bind to\n  on          : false,\n\n  // overriding opacity value\n  opacity     : 'auto',\n\n  // transition durations\n  duration    : {\n    show : 500,\n    hide : 500\n  },\n\n  onChange    : function(){},\n  onShow      : function(){},\n  onHide      : function(){},\n\n  error   : {\n    method   : 'The method you called is not defined.'\n  },\n\n  className : {\n    active     : 'active',\n    animating  : 'animating',\n    dimmable   : 'dimmable',\n    dimmed     : 'dimmed',\n    dimmer     : 'dimmer',\n    disabled   : 'disabled',\n    hide       : 'hide',\n    pageDimmer : 'page',\n    show       : 'show'\n  },\n\n  selector: {\n    dimmer   : '> .ui.dimmer',\n    content  : '.ui.dimmer > .content, .ui.dimmer > .content > .center'\n  },\n\n  template: {\n    dimmer: function() {\n     return $('<div />').attr('class', 'ui dimmer');\n    }\n  }\n\n};\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Dropdown\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.dropdown = function(parameters) {\n  var\n    $allModules    = $(this),\n    $document      = $(document),\n\n    moduleSelector = $allModules.selector || '',\n\n    hasTouch       = ('ontouchstart' in document.documentElement),\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n    returnedValue\n  ;\n\n  $allModules\n    .each(function(elementIndex) {\n      var\n        settings          = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.dropdown.settings, parameters)\n          : $.extend({}, $.fn.dropdown.settings),\n\n        className       = settings.className,\n        message         = settings.message,\n        fields          = settings.fields,\n        keys            = settings.keys,\n        metadata        = settings.metadata,\n        namespace       = settings.namespace,\n        regExp          = settings.regExp,\n        selector        = settings.selector,\n        error           = settings.error,\n        templates       = settings.templates,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        $module         = $(this),\n        $context        = $(settings.context),\n        $text           = $module.find(selector.text),\n        $search         = $module.find(selector.search),\n        $sizer          = $module.find(selector.sizer),\n        $input          = $module.find(selector.input),\n        $icon           = $module.find(selector.icon),\n\n        $combo = ($module.prev().find(selector.text).length > 0)\n          ? $module.prev().find(selector.text)\n          : $module.prev(),\n\n        $menu           = $module.children(selector.menu),\n        $item           = $menu.find(selector.item),\n\n        activated       = false,\n        itemActivated   = false,\n        internalChange  = false,\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n\n        initialLoad,\n        pageLostFocus,\n        willRefocus,\n        elementNamespace,\n        id,\n        selectObserver,\n        menuObserver,\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.debug('Initializing dropdown', settings);\n\n          if( module.is.alreadySetup() ) {\n            module.setup.reference();\n          }\n          else {\n            module.setup.layout();\n            module.refreshData();\n\n            module.save.defaults();\n            module.restore.selected();\n\n            module.create.id();\n            module.bind.events();\n\n            module.observeChanges();\n            module.instantiate();\n          }\n\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of dropdown', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous dropdown', $module);\n          module.remove.tabbable();\n          $module\n            .off(eventNamespace)\n            .removeData(moduleNamespace)\n          ;\n          $menu\n            .off(eventNamespace)\n          ;\n          $document\n            .off(elementNamespace)\n          ;\n          module.disconnect.menuObserver();\n          module.disconnect.selectObserver();\n        },\n\n        observeChanges: function() {\n          if('MutationObserver' in window) {\n            selectObserver = new MutationObserver(module.event.select.mutation);\n            menuObserver   = new MutationObserver(module.event.menu.mutation);\n            module.debug('Setting up mutation observer', selectObserver, menuObserver);\n            module.observe.select();\n            module.observe.menu();\n          }\n        },\n\n        disconnect: {\n          menuObserver: function() {\n            if(menuObserver) {\n              menuObserver.disconnect();\n            }\n          },\n          selectObserver: function() {\n            if(selectObserver) {\n              selectObserver.disconnect();\n            }\n          }\n        },\n        observe: {\n          select: function() {\n            if(module.has.input()) {\n              selectObserver.observe($input[0], {\n                childList : true,\n                subtree   : true\n              });\n            }\n          },\n          menu: function() {\n            if(module.has.menu()) {\n              menuObserver.observe($menu[0], {\n                childList : true,\n                subtree   : true\n              });\n            }\n          }\n        },\n\n        create: {\n          id: function() {\n            id = (Math.random().toString(16) + '000000000').substr(2, 8);\n            elementNamespace = '.' + id;\n            module.verbose('Creating unique id for element', id);\n          },\n          userChoice: function(values) {\n            var\n              $userChoices,\n              $userChoice,\n              isUserValue,\n              html\n            ;\n            values = values || module.get.userValues();\n            if(!values) {\n              return false;\n            }\n            values = $.isArray(values)\n              ? values\n              : [values]\n            ;\n            $.each(values, function(index, value) {\n              if(module.get.item(value) === false) {\n                html         = settings.templates.addition( module.add.variables(message.addResult, value) );\n                $userChoice  = $('<div />')\n                  .html(html)\n                  .attr('data-' + metadata.value, value)\n                  .attr('data-' + metadata.text, value)\n                  .addClass(className.addition)\n                  .addClass(className.item)\n                ;\n                if(settings.hideAdditions) {\n                  $userChoice.addClass(className.hidden);\n                }\n                $userChoices = ($userChoices === undefined)\n                  ? $userChoice\n                  : $userChoices.add($userChoice)\n                ;\n                module.verbose('Creating user choices for value', value, $userChoice);\n              }\n            });\n            return $userChoices;\n          },\n          userLabels: function(value) {\n            var\n              userValues = module.get.userValues()\n            ;\n            if(userValues) {\n              module.debug('Adding user labels', userValues);\n              $.each(userValues, function(index, value) {\n                module.verbose('Adding custom user value');\n                module.add.label(value, value);\n              });\n            }\n          },\n          menu: function() {\n            $menu = $('<div />')\n              .addClass(className.menu)\n              .appendTo($module)\n            ;\n          },\n          sizer: function() {\n            $sizer = $('<span />')\n              .addClass(className.sizer)\n              .insertAfter($search)\n            ;\n          }\n        },\n\n        search: function(query) {\n          query = (query !== undefined)\n            ? query\n            : module.get.query()\n          ;\n          module.verbose('Searching for query', query);\n          if(module.has.minCharacters(query)) {\n            module.filter(query);\n          }\n          else {\n            module.hide();\n          }\n        },\n\n        select: {\n          firstUnfiltered: function() {\n            module.verbose('Selecting first non-filtered element');\n            module.remove.selectedItem();\n            $item\n              .not(selector.unselectable)\n              .not(selector.addition + selector.hidden)\n                .eq(0)\n                .addClass(className.selected)\n            ;\n          },\n          nextAvailable: function($selected) {\n            $selected = $selected.eq(0);\n            var\n              $nextAvailable = $selected.nextAll(selector.item).not(selector.unselectable).eq(0),\n              $prevAvailable = $selected.prevAll(selector.item).not(selector.unselectable).eq(0),\n              hasNext        = ($nextAvailable.length > 0)\n            ;\n            if(hasNext) {\n              module.verbose('Moving selection to', $nextAvailable);\n              $nextAvailable.addClass(className.selected);\n            }\n            else {\n              module.verbose('Moving selection to', $prevAvailable);\n              $prevAvailable.addClass(className.selected);\n            }\n          }\n        },\n\n        setup: {\n          api: function() {\n            var\n              apiSettings = {\n                debug   : settings.debug,\n                urlData : {\n                  value : module.get.value(),\n                  query : module.get.query()\n                },\n                on    : false\n              }\n            ;\n            module.verbose('First request, initializing API');\n            $module\n              .api(apiSettings)\n            ;\n          },\n          layout: function() {\n            if( $module.is('select') ) {\n              module.setup.select();\n              module.setup.returnedObject();\n            }\n            if( !module.has.menu() ) {\n              module.create.menu();\n            }\n            if( module.is.search() && !module.has.search() ) {\n              module.verbose('Adding search input');\n              $search = $('<input />')\n                .addClass(className.search)\n                .prop('autocomplete', 'off')\n                .insertBefore($text)\n              ;\n            }\n            if( module.is.multiple() && module.is.searchSelection() && !module.has.sizer()) {\n              module.create.sizer();\n            }\n            if(settings.allowTab) {\n              module.set.tabbable();\n            }\n          },\n          select: function() {\n            var\n              selectValues  = module.get.selectValues()\n            ;\n            module.debug('Dropdown initialized on a select', selectValues);\n            if( $module.is('select') ) {\n              $input = $module;\n            }\n            // see if select is placed correctly already\n            if($input.parent(selector.dropdown).length > 0) {\n              module.debug('UI dropdown already exists. Creating dropdown menu only');\n              $module = $input.closest(selector.dropdown);\n              if( !module.has.menu() ) {\n                module.create.menu();\n              }\n              $menu = $module.children(selector.menu);\n              module.setup.menu(selectValues);\n            }\n            else {\n              module.debug('Creating entire dropdown from select');\n              $module = $('<div />')\n                .attr('class', $input.attr('class') )\n                .addClass(className.selection)\n                .addClass(className.dropdown)\n                .html( templates.dropdown(selectValues) )\n                .insertBefore($input)\n              ;\n              if($input.hasClass(className.multiple) && $input.prop('multiple') === false) {\n                module.error(error.missingMultiple);\n                $input.prop('multiple', true);\n              }\n              if($input.is('[multiple]')) {\n                module.set.multiple();\n              }\n              if ($input.prop('disabled')) {\n                module.debug('Disabling dropdown');\n                $module.addClass(className.disabled);\n              }\n              $input\n                .removeAttr('class')\n                .detach()\n                .prependTo($module)\n              ;\n            }\n            module.refresh();\n          },\n          menu: function(values) {\n            $menu.html( templates.menu(values, fields));\n            $item = $menu.find(selector.item);\n          },\n          reference: function() {\n            module.debug('Dropdown behavior was called on select, replacing with closest dropdown');\n            // replace module reference\n            $module = $module.parent(selector.dropdown);\n            module.refresh();\n            module.setup.returnedObject();\n            // invoke method in context of current instance\n            if(methodInvoked) {\n              instance = module;\n              module.invoke(query);\n            }\n          },\n          returnedObject: function() {\n            var\n              $firstModules = $allModules.slice(0, elementIndex),\n              $lastModules = $allModules.slice(elementIndex + 1)\n            ;\n            // adjust all modules to use correct reference\n            $allModules = $firstModules.add($module).add($lastModules);\n          }\n        },\n\n        refresh: function() {\n          module.refreshSelectors();\n          module.refreshData();\n        },\n\n        refreshItems: function() {\n          $item = $menu.find(selector.item);\n        },\n\n        refreshSelectors: function() {\n          module.verbose('Refreshing selector cache');\n          $text   = $module.find(selector.text);\n          $search = $module.find(selector.search);\n          $input  = $module.find(selector.input);\n          $icon   = $module.find(selector.icon);\n          $combo  = ($module.prev().find(selector.text).length > 0)\n            ? $module.prev().find(selector.text)\n            : $module.prev()\n          ;\n          $menu    = $module.children(selector.menu);\n          $item    = $menu.find(selector.item);\n        },\n\n        refreshData: function() {\n          module.verbose('Refreshing cached metadata');\n          $item\n            .removeData(metadata.text)\n            .removeData(metadata.value)\n          ;\n        },\n\n        clearData: function() {\n          module.verbose('Clearing metadata');\n          $item\n            .removeData(metadata.text)\n            .removeData(metadata.value)\n          ;\n          $module\n            .removeData(metadata.defaultText)\n            .removeData(metadata.defaultValue)\n            .removeData(metadata.placeholderText)\n          ;\n        },\n\n        toggle: function() {\n          module.verbose('Toggling menu visibility');\n          if( !module.is.active() ) {\n            module.show();\n          }\n          else {\n            module.hide();\n          }\n        },\n\n        show: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if( module.can.show() && !module.is.active() ) {\n            module.debug('Showing dropdown');\n            if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) {\n              module.remove.message();\n            }\n            if(module.is.allFiltered()) {\n              return true;\n            }\n            if(settings.onShow.call(element) !== false) {\n              module.animate.show(function() {\n                if( module.can.click() ) {\n                  module.bind.intent();\n                }\n                if(module.has.menuSearch()) {\n                  module.focusSearch();\n                }\n                module.set.visible();\n                callback.call(element);\n              });\n            }\n          }\n        },\n\n        hide: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if( module.is.active() ) {\n            module.debug('Hiding dropdown');\n            if(settings.onHide.call(element) !== false) {\n              module.animate.hide(function() {\n                module.remove.visible();\n                callback.call(element);\n              });\n            }\n          }\n        },\n\n        hideOthers: function() {\n          module.verbose('Finding other dropdowns to hide');\n          $allModules\n            .not($module)\n              .has(selector.menu + '.' + className.visible)\n                .dropdown('hide')\n          ;\n        },\n\n        hideMenu: function() {\n          module.verbose('Hiding menu  instantaneously');\n          module.remove.active();\n          module.remove.visible();\n          $menu.transition('hide');\n        },\n\n        hideSubMenus: function() {\n          var\n            $subMenus = $menu.children(selector.item).find(selector.menu)\n          ;\n          module.verbose('Hiding sub menus', $subMenus);\n          $subMenus.transition('hide');\n        },\n\n        bind: {\n          events: function() {\n            if(hasTouch) {\n              module.bind.touchEvents();\n            }\n            module.bind.keyboardEvents();\n            module.bind.inputEvents();\n            module.bind.mouseEvents();\n          },\n          touchEvents: function() {\n            module.debug('Touch device detected binding additional touch events');\n            if( module.is.searchSelection() ) {\n              // do nothing special yet\n            }\n            else if( module.is.single() ) {\n              $module\n                .on('touchstart' + eventNamespace, module.event.test.toggle)\n              ;\n            }\n            $menu\n              .on('touchstart' + eventNamespace, selector.item, module.event.item.mouseenter)\n            ;\n          },\n          keyboardEvents: function() {\n            module.verbose('Binding keyboard events');\n            $module\n              .on('keydown' + eventNamespace, module.event.keydown)\n            ;\n            if( module.has.search() ) {\n              $module\n                .on(module.get.inputEvent() + eventNamespace, selector.search, module.event.input)\n              ;\n            }\n            if( module.is.multiple() ) {\n              $document\n                .on('keydown' + elementNamespace, module.event.document.keydown)\n              ;\n            }\n          },\n          inputEvents: function() {\n            module.verbose('Binding input change events');\n            $module\n              .on('change' + eventNamespace, selector.input, module.event.change)\n            ;\n          },\n          mouseEvents: function() {\n            module.verbose('Binding mouse events');\n            if(module.is.multiple()) {\n              $module\n                .on('click'   + eventNamespace, selector.label,  module.event.label.click)\n                .on('click'   + eventNamespace, selector.remove, module.event.remove.click)\n              ;\n            }\n            if( module.is.searchSelection() ) {\n              $module\n                .on('mousedown' + eventNamespace, module.event.mousedown)\n                .on('mouseup'   + eventNamespace, module.event.mouseup)\n                .on('mousedown' + eventNamespace, selector.menu,   module.event.menu.mousedown)\n                .on('mouseup'   + eventNamespace, selector.menu,   module.event.menu.mouseup)\n                .on('click'     + eventNamespace, selector.icon,   module.event.icon.click)\n                .on('focus'     + eventNamespace, selector.search, module.event.search.focus)\n                .on('click'     + eventNamespace, selector.search, module.event.search.focus)\n                .on('blur'      + eventNamespace, selector.search, module.event.search.blur)\n                .on('click'     + eventNamespace, selector.text,   module.event.text.focus)\n              ;\n              if(module.is.multiple()) {\n                $module\n                  .on('click' + eventNamespace, module.event.click)\n                ;\n              }\n            }\n            else {\n              if(settings.on == 'click') {\n                $module\n                  .on('click' + eventNamespace, selector.icon, module.event.icon.click)\n                  .on('click' + eventNamespace, module.event.test.toggle)\n                ;\n              }\n              else if(settings.on == 'hover') {\n                $module\n                  .on('mouseenter' + eventNamespace, module.delay.show)\n                  .on('mouseleave' + eventNamespace, module.delay.hide)\n                ;\n              }\n              else {\n                $module\n                  .on(settings.on + eventNamespace, module.toggle)\n                ;\n              }\n              $module\n                .on('mousedown' + eventNamespace, module.event.mousedown)\n                .on('mouseup'   + eventNamespace, module.event.mouseup)\n                .on('focus'     + eventNamespace, module.event.focus)\n                .on('blur'      + eventNamespace, module.event.blur)\n              ;\n            }\n            $menu\n              .on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter)\n              .on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave)\n              .on('click'      + eventNamespace, selector.item, module.event.item.click)\n            ;\n          },\n          intent: function() {\n            module.verbose('Binding hide intent event to document');\n            if(hasTouch) {\n              $document\n                .on('touchstart' + elementNamespace, module.event.test.touch)\n                .on('touchmove'  + elementNamespace, module.event.test.touch)\n              ;\n            }\n            $document\n              .on('click' + elementNamespace, module.event.test.hide)\n            ;\n          }\n        },\n\n        unbind: {\n          intent: function() {\n            module.verbose('Removing hide intent event from document');\n            if(hasTouch) {\n              $document\n                .off('touchstart' + elementNamespace)\n                .off('touchmove' + elementNamespace)\n              ;\n            }\n            $document\n              .off('click' + elementNamespace)\n            ;\n          }\n        },\n\n        filter: function(query) {\n          var\n            searchTerm = (query !== undefined)\n              ? query\n              : module.get.query(),\n            afterFiltered = function() {\n              if(module.is.multiple()) {\n                module.filterActive();\n              }\n              module.select.firstUnfiltered();\n              if( module.has.allResultsFiltered() ) {\n                if( settings.onNoResults.call(element, searchTerm) ) {\n                  if(settings.allowAdditions) {\n                    if(settings.hideAdditions) {\n                      module.verbose('User addition with no menu, setting empty style');\n                      module.set.empty();\n                      module.hideMenu();\n                    }\n                  }\n                  else {\n                    module.verbose('All items filtered, showing message', searchTerm);\n                    module.add.message(message.noResults);\n                  }\n                }\n                else {\n                  module.verbose('All items filtered, hiding dropdown', searchTerm);\n                  module.hideMenu();\n                }\n              }\n              else {\n                module.remove.empty();\n                module.remove.message();\n              }\n              if(settings.allowAdditions) {\n                module.add.userSuggestion(query);\n              }\n              if(module.is.searchSelection() && module.can.show() && module.is.focusedOnSearch() ) {\n                module.show();\n              }\n            }\n          ;\n          if(settings.useLabels && module.has.maxSelections()) {\n            return;\n          }\n          if(settings.apiSettings) {\n            if( module.can.useAPI() ) {\n              module.queryRemote(searchTerm, function() {\n                afterFiltered();\n              });\n            }\n            else {\n              module.error(error.noAPI);\n            }\n          }\n          else {\n            module.filterItems(searchTerm);\n            afterFiltered();\n          }\n        },\n\n        queryRemote: function(query, callback) {\n          var\n            apiSettings = {\n              errorDuration : false,\n              cache         : 'local',\n              throttle      : settings.throttle,\n              urlData       : {\n                query: query\n              },\n              onError: function() {\n                module.add.message(message.serverError);\n                callback();\n              },\n              onFailure: function() {\n                module.add.message(message.serverError);\n                callback();\n              },\n              onSuccess : function(response) {\n                module.remove.message();\n                module.setup.menu({\n                  values: response[fields.remoteValues]\n                });\n                callback();\n              }\n            }\n          ;\n          if( !$module.api('get request') ) {\n            module.setup.api();\n          }\n          apiSettings = $.extend(true, {}, apiSettings, settings.apiSettings);\n          $module\n            .api('setting', apiSettings)\n            .api('query')\n          ;\n        },\n\n        filterItems: function(query) {\n          var\n            searchTerm = (query !== undefined)\n              ? query\n              : module.get.query(),\n            results          =  null,\n            escapedTerm      = module.escape.regExp(searchTerm),\n            beginsWithRegExp = new RegExp('^' + escapedTerm, 'igm')\n          ;\n          // avoid loop if we're matching nothing\n          if( module.has.query() ) {\n            results = [];\n\n            module.verbose('Searching for matching values', searchTerm);\n            $item\n              .each(function(){\n                var\n                  $choice = $(this),\n                  text,\n                  value\n                ;\n                if(settings.match == 'both' || settings.match == 'text') {\n                  text = String(module.get.choiceText($choice, false));\n                  if(text.search(beginsWithRegExp) !== -1) {\n                    results.push(this);\n                    return true;\n                  }\n                  else if (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, text)) {\n                    results.push(this);\n                    return true;\n                  }\n                  else if (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, text)) {\n                    results.push(this);\n                    return true;\n                  }\n                }\n                if(settings.match == 'both' || settings.match == 'value') {\n                  value = String(module.get.choiceValue($choice, text));\n\n                  if(value.search(beginsWithRegExp) !== -1) {\n                    results.push(this);\n                    return true;\n                  }\n                  else if(settings.fullTextSearch && module.fuzzySearch(searchTerm, value)) {\n                    results.push(this);\n                    return true;\n                  }\n                }\n              })\n            ;\n          }\n          module.debug('Showing only matched items', searchTerm);\n          module.remove.filteredItem();\n          if(results) {\n            $item\n              .not(results)\n              .addClass(className.filtered)\n            ;\n          }\n        },\n\n        fuzzySearch: function(query, term) {\n          var\n            termLength  = term.length,\n            queryLength = query.length\n          ;\n          query = query.toLowerCase();\n          term  = term.toLowerCase();\n          if(queryLength > termLength) {\n            return false;\n          }\n          if(queryLength === termLength) {\n            return (query === term);\n          }\n          search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {\n            var\n              queryCharacter = query.charCodeAt(characterIndex)\n            ;\n            while(nextCharacterIndex < termLength) {\n              if(term.charCodeAt(nextCharacterIndex++) === queryCharacter) {\n                continue search;\n              }\n            }\n            return false;\n          }\n          return true;\n        },\n        exactSearch: function (query, term) {\n          query = query.toLowerCase();\n          term  = term.toLowerCase();\n          if(term.indexOf(query) > -1) {\n             return true;\n          }\n          return false;\n        },\n        filterActive: function() {\n          if(settings.useLabels) {\n            $item.filter('.' + className.active)\n              .addClass(className.filtered)\n            ;\n          }\n        },\n\n        focusSearch: function(skipHandler) {\n          if( module.has.search() && !module.is.focusedOnSearch() ) {\n            if(skipHandler) {\n              $module.off('focus' + eventNamespace, selector.search);\n              $search.focus();\n              $module.on('focus'  + eventNamespace, selector.search, module.event.search.focus);\n            }\n            else {\n              $search.focus();\n            }\n          }\n        },\n\n        forceSelection: function() {\n          var\n            $currentlySelected = $item.not(className.filtered).filter('.' + className.selected).eq(0),\n            $activeItem        = $item.not(className.filtered).filter('.' + className.active).eq(0),\n            $selectedItem      = ($currentlySelected.length > 0)\n              ? $currentlySelected\n              : $activeItem,\n            hasSelected = ($selectedItem.length > 0)\n          ;\n          if(hasSelected) {\n            module.debug('Forcing partial selection to selected item', $selectedItem);\n            module.event.item.click.call($selectedItem, {}, true);\n            return;\n          }\n          else {\n            if(settings.allowAdditions) {\n              module.set.selected(module.get.query());\n              module.remove.searchTerm();\n            }\n            else {\n              module.remove.searchTerm();\n            }\n          }\n        },\n\n        event: {\n          change: function() {\n            if(!internalChange) {\n              module.debug('Input changed, updating selection');\n              module.set.selected();\n            }\n          },\n          focus: function() {\n            if(settings.showOnFocus && !activated && module.is.hidden() && !pageLostFocus) {\n              module.show();\n            }\n          },\n          blur: function(event) {\n            pageLostFocus = (document.activeElement === this);\n            if(!activated && !pageLostFocus) {\n              module.remove.activeLabel();\n              module.hide();\n            }\n          },\n          mousedown: function() {\n            if(module.is.searchSelection()) {\n              // prevent menu hiding on immediate re-focus\n              willRefocus = true;\n            }\n            else {\n              // prevents focus callback from occurring on mousedown\n              activated = true;\n            }\n          },\n          mouseup: function() {\n            if(module.is.searchSelection()) {\n              // prevent menu hiding on immediate re-focus\n              willRefocus = false;\n            }\n            else {\n              activated = false;\n            }\n          },\n          click: function(event) {\n            var\n              $target = $(event.target)\n            ;\n            // focus search\n            if($target.is($module)) {\n              if(!module.is.focusedOnSearch()) {\n                module.focusSearch();\n              }\n              else {\n                module.show();\n              }\n            }\n          },\n          search: {\n            focus: function() {\n              activated = true;\n              if(module.is.multiple()) {\n                module.remove.activeLabel();\n              }\n              if(settings.showOnFocus) {\n                module.search();\n              }\n            },\n            blur: function(event) {\n              pageLostFocus = (document.activeElement === this);\n              if(!willRefocus) {\n                if(!itemActivated && !pageLostFocus) {\n                  if(settings.forceSelection) {\n                    module.forceSelection();\n                  }\n                  module.hide();\n                }\n              }\n              willRefocus = false;\n            }\n          },\n          icon: {\n            click: function(event) {\n              module.toggle();\n            }\n          },\n          text: {\n            focus: function(event) {\n              activated = true;\n              module.focusSearch();\n            }\n          },\n          input: function(event) {\n            if(module.is.multiple() || module.is.searchSelection()) {\n              module.set.filtered();\n            }\n            clearTimeout(module.timer);\n            module.timer = setTimeout(module.search, settings.delay.search);\n          },\n          label: {\n            click: function(event) {\n              var\n                $label        = $(this),\n                $labels       = $module.find(selector.label),\n                $activeLabels = $labels.filter('.' + className.active),\n                $nextActive   = $label.nextAll('.' + className.active),\n                $prevActive   = $label.prevAll('.' + className.active),\n                $range = ($nextActive.length > 0)\n                  ? $label.nextUntil($nextActive).add($activeLabels).add($label)\n                  : $label.prevUntil($prevActive).add($activeLabels).add($label)\n              ;\n              if(event.shiftKey) {\n                $activeLabels.removeClass(className.active);\n                $range.addClass(className.active);\n              }\n              else if(event.ctrlKey) {\n                $label.toggleClass(className.active);\n              }\n              else {\n                $activeLabels.removeClass(className.active);\n                $label.addClass(className.active);\n              }\n              settings.onLabelSelect.apply(this, $labels.filter('.' + className.active));\n            }\n          },\n          remove: {\n            click: function() {\n              var\n                $label = $(this).parent()\n              ;\n              if( $label.hasClass(className.active) ) {\n                // remove all selected labels\n                module.remove.activeLabels();\n              }\n              else {\n                // remove this label only\n                module.remove.activeLabels( $label );\n              }\n            }\n          },\n          test: {\n            toggle: function(event) {\n              var\n                toggleBehavior = (module.is.multiple())\n                  ? module.show\n                  : module.toggle\n              ;\n              if(module.is.bubbledLabelClick(event) || module.is.bubbledIconClick(event)) {\n                return;\n              }\n              if( module.determine.eventOnElement(event, toggleBehavior) ) {\n                event.preventDefault();\n              }\n            },\n            touch: function(event) {\n              module.determine.eventOnElement(event, function() {\n                if(event.type == 'touchstart') {\n                  module.timer = setTimeout(function() {\n                    module.hide();\n                  }, settings.delay.touch);\n                }\n                else if(event.type == 'touchmove') {\n                  clearTimeout(module.timer);\n                }\n              });\n              event.stopPropagation();\n            },\n            hide: function(event) {\n              module.determine.eventInModule(event, module.hide);\n            }\n          },\n          select: {\n            mutation: function(mutations) {\n              module.debug('<select> modified, recreating menu');\n              module.setup.select();\n            }\n          },\n          menu: {\n            mutation: function(mutations) {\n              var\n                mutation   = mutations[0],\n                $addedNode = mutation.addedNodes\n                  ? $(mutation.addedNodes[0])\n                  : $(false),\n                $removedNode = mutation.removedNodes\n                  ? $(mutation.removedNodes[0])\n                  : $(false),\n                $changedNodes  = $addedNode.add($removedNode),\n                isUserAddition = $changedNodes.is(selector.addition) || $changedNodes.closest(selector.addition).length > 0,\n                isMessage      = $changedNodes.is(selector.message)  || $changedNodes.closest(selector.message).length > 0\n              ;\n              if(isUserAddition || isMessage) {\n                module.debug('Updating item selector cache');\n                module.refreshItems();\n              }\n              else {\n                module.debug('Menu modified, updating selector cache');\n                module.refresh();\n              }\n            },\n            mousedown: function() {\n              itemActivated = true;\n            },\n            mouseup: function() {\n              itemActivated = false;\n            }\n          },\n          item: {\n            mouseenter: function(event) {\n              var\n                $target        = $(event.target),\n                $item          = $(this),\n                $subMenu       = $item.children(selector.menu),\n                $otherMenus    = $item.siblings(selector.item).children(selector.menu),\n                hasSubMenu     = ($subMenu.length > 0),\n                isBubbledEvent = ($subMenu.find($target).length > 0)\n              ;\n              if( !isBubbledEvent && hasSubMenu ) {\n                clearTimeout(module.itemTimer);\n                module.itemTimer = setTimeout(function() {\n                  module.verbose('Showing sub-menu', $subMenu);\n                  $.each($otherMenus, function() {\n                    module.animate.hide(false, $(this));\n                  });\n                  module.animate.show(false, $subMenu);\n                }, settings.delay.show);\n                event.preventDefault();\n              }\n            },\n            mouseleave: function(event) {\n              var\n                $subMenu = $(this).children(selector.menu)\n              ;\n              if($subMenu.length > 0) {\n                clearTimeout(module.itemTimer);\n                module.itemTimer = setTimeout(function() {\n                  module.verbose('Hiding sub-menu', $subMenu);\n                  module.animate.hide(false, $subMenu);\n                }, settings.delay.hide);\n              }\n            },\n            click: function (event, skipRefocus) {\n              var\n                $choice        = $(this),\n                $target        = (event)\n                  ? $(event.target)\n                  : $(''),\n                $subMenu       = $choice.find(selector.menu),\n                text           = module.get.choiceText($choice),\n                value          = module.get.choiceValue($choice, text),\n                hasSubMenu     = ($subMenu.length > 0),\n                isBubbledEvent = ($subMenu.find($target).length > 0)\n              ;\n              if(!isBubbledEvent && (!hasSubMenu || settings.allowCategorySelection)) {\n                if(module.is.searchSelection()) {\n                  if(settings.allowAdditions) {\n                    module.remove.userAddition();\n                  }\n                  module.remove.searchTerm();\n                  if(!module.is.focusedOnSearch() && !(skipRefocus == true)) {\n                    module.focusSearch(true);\n                  }\n                }\n                if(!settings.useLabels) {\n                  module.remove.filteredItem();\n                  module.set.scrollPosition($choice);\n                }\n                module.determine.selectAction.call(this, text, value);\n              }\n            }\n          },\n\n          document: {\n            // label selection should occur even when element has no focus\n            keydown: function(event) {\n              var\n                pressedKey    = event.which,\n                isShortcutKey = module.is.inObject(pressedKey, keys)\n              ;\n              if(isShortcutKey) {\n                var\n                  $label            = $module.find(selector.label),\n                  $activeLabel      = $label.filter('.' + className.active),\n                  activeValue       = $activeLabel.data(metadata.value),\n                  labelIndex        = $label.index($activeLabel),\n                  labelCount        = $label.length,\n                  hasActiveLabel    = ($activeLabel.length > 0),\n                  hasMultipleActive = ($activeLabel.length > 1),\n                  isFirstLabel      = (labelIndex === 0),\n                  isLastLabel       = (labelIndex + 1 == labelCount),\n                  isSearch          = module.is.searchSelection(),\n                  isFocusedOnSearch = module.is.focusedOnSearch(),\n                  isFocused         = module.is.focused(),\n                  caretAtStart      = (isFocusedOnSearch && module.get.caretPosition() === 0),\n                  $nextLabel\n                ;\n                if(isSearch && !hasActiveLabel && !isFocusedOnSearch) {\n                  return;\n                }\n\n                if(pressedKey == keys.leftArrow) {\n                  // activate previous label\n                  if((isFocused || caretAtStart) && !hasActiveLabel) {\n                    module.verbose('Selecting previous label');\n                    $label.last().addClass(className.active);\n                  }\n                  else if(hasActiveLabel) {\n                    if(!event.shiftKey) {\n                      module.verbose('Selecting previous label');\n                      $label.removeClass(className.active);\n                    }\n                    else {\n                      module.verbose('Adding previous label to selection');\n                    }\n                    if(isFirstLabel && !hasMultipleActive) {\n                      $activeLabel.addClass(className.active);\n                    }\n                    else {\n                      $activeLabel.prev(selector.siblingLabel)\n                        .addClass(className.active)\n                        .end()\n                      ;\n                    }\n                    event.preventDefault();\n                  }\n                }\n                else if(pressedKey == keys.rightArrow) {\n                  // activate first label\n                  if(isFocused && !hasActiveLabel) {\n                    $label.first().addClass(className.active);\n                  }\n                  // activate next label\n                  if(hasActiveLabel) {\n                    if(!event.shiftKey) {\n                      module.verbose('Selecting next label');\n                      $label.removeClass(className.active);\n                    }\n                    else {\n                      module.verbose('Adding next label to selection');\n                    }\n                    if(isLastLabel) {\n                      if(isSearch) {\n                        if(!isFocusedOnSearch) {\n                          module.focusSearch();\n                        }\n                        else {\n                          $label.removeClass(className.active);\n                        }\n                      }\n                      else if(hasMultipleActive) {\n                        $activeLabel.next(selector.siblingLabel).addClass(className.active);\n                      }\n                      else {\n                        $activeLabel.addClass(className.active);\n                      }\n                    }\n                    else {\n                      $activeLabel.next(selector.siblingLabel).addClass(className.active);\n                    }\n                    event.preventDefault();\n                  }\n                }\n                else if(pressedKey == keys.deleteKey || pressedKey == keys.backspace) {\n                  if(hasActiveLabel) {\n                    module.verbose('Removing active labels');\n                    if(isLastLabel) {\n                      if(isSearch && !isFocusedOnSearch) {\n                        module.focusSearch();\n                      }\n                    }\n                    $activeLabel.last().next(selector.siblingLabel).addClass(className.active);\n                    module.remove.activeLabels($activeLabel);\n                    event.preventDefault();\n                  }\n                  else if(caretAtStart && !hasActiveLabel && pressedKey == keys.backspace) {\n                    module.verbose('Removing last label on input backspace');\n                    $activeLabel = $label.last().addClass(className.active);\n                    module.remove.activeLabels($activeLabel);\n                  }\n                }\n                else {\n                  $activeLabel.removeClass(className.active);\n                }\n              }\n            }\n          },\n\n          keydown: function(event) {\n            var\n              pressedKey    = event.which,\n              isShortcutKey = module.is.inObject(pressedKey, keys)\n            ;\n            if(isShortcutKey) {\n              var\n                $currentlySelected = $item.not(selector.unselectable).filter('.' + className.selected).eq(0),\n                $activeItem        = $menu.children('.' + className.active).eq(0),\n                $selectedItem      = ($currentlySelected.length > 0)\n                  ? $currentlySelected\n                  : $activeItem,\n                $visibleItems = ($selectedItem.length > 0)\n                  ? $selectedItem.siblings(':not(.' + className.filtered +')').addBack()\n                  : $menu.children(':not(.' + className.filtered +')'),\n                $subMenu              = $selectedItem.children(selector.menu),\n                $parentMenu           = $selectedItem.closest(selector.menu),\n                inVisibleMenu         = ($parentMenu.hasClass(className.visible) || $parentMenu.hasClass(className.animating) || $parentMenu.parent(selector.menu).length > 0),\n                hasSubMenu            = ($subMenu.length> 0),\n                hasSelectedItem       = ($selectedItem.length > 0),\n                selectedIsSelectable  = ($selectedItem.not(selector.unselectable).length > 0),\n                delimiterPressed      = (pressedKey == keys.delimiter && settings.allowAdditions && module.is.multiple()),\n                isAdditionWithoutMenu = (settings.allowAdditions && settings.hideAdditions && (pressedKey == keys.enter || delimiterPressed) && selectedIsSelectable),\n                $nextItem,\n                isSubMenuItem,\n                newIndex\n              ;\n              // allow selection with menu closed\n              if(isAdditionWithoutMenu) {\n                module.verbose('Selecting item from keyboard shortcut', $selectedItem);\n                module.event.item.click.call($selectedItem, event);\n                if(module.is.searchSelection()) {\n                  module.remove.searchTerm();\n                }\n              }\n\n              // visible menu keyboard shortcuts\n              if( module.is.visible() ) {\n\n                // enter (select or open sub-menu)\n                if(pressedKey == keys.enter || delimiterPressed) {\n                  if(pressedKey == keys.enter && hasSelectedItem && hasSubMenu && !settings.allowCategorySelection) {\n                    module.verbose('Pressed enter on unselectable category, opening sub menu');\n                    pressedKey = keys.rightArrow;\n                  }\n                  else if(selectedIsSelectable) {\n                    module.verbose('Selecting item from keyboard shortcut', $selectedItem);\n                    module.event.item.click.call($selectedItem, event);\n                    if(module.is.searchSelection()) {\n                      module.remove.searchTerm();\n                    }\n                  }\n                  event.preventDefault();\n                }\n\n                // sub-menu actions\n                if(hasSelectedItem) {\n\n                  if(pressedKey == keys.leftArrow) {\n\n                    isSubMenuItem = ($parentMenu[0] !== $menu[0]);\n\n                    if(isSubMenuItem) {\n                      module.verbose('Left key pressed, closing sub-menu');\n                      module.animate.hide(false, $parentMenu);\n                      $selectedItem\n                        .removeClass(className.selected)\n                      ;\n                      $parentMenu\n                        .closest(selector.item)\n                          .addClass(className.selected)\n                      ;\n                      event.preventDefault();\n                    }\n                  }\n\n                  // right arrow (show sub-menu)\n                  if(pressedKey == keys.rightArrow) {\n                    if(hasSubMenu) {\n                      module.verbose('Right key pressed, opening sub-menu');\n                      module.animate.show(false, $subMenu);\n                      $selectedItem\n                        .removeClass(className.selected)\n                      ;\n                      $subMenu\n                        .find(selector.item).eq(0)\n                          .addClass(className.selected)\n                      ;\n                      event.preventDefault();\n                    }\n                  }\n                }\n\n                // up arrow (traverse menu up)\n                if(pressedKey == keys.upArrow) {\n                  $nextItem = (hasSelectedItem && inVisibleMenu)\n                    ? $selectedItem.prevAll(selector.item + ':not(' + selector.unselectable + ')').eq(0)\n                    : $item.eq(0)\n                  ;\n                  if($visibleItems.index( $nextItem ) < 0) {\n                    module.verbose('Up key pressed but reached top of current menu');\n                    event.preventDefault();\n                    return;\n                  }\n                  else {\n                    module.verbose('Up key pressed, changing active item');\n                    $selectedItem\n                      .removeClass(className.selected)\n                    ;\n                    $nextItem\n                      .addClass(className.selected)\n                    ;\n                    module.set.scrollPosition($nextItem);\n                    if(settings.selectOnKeydown && module.is.single()) {\n                      module.set.selectedItem($nextItem);\n                    }\n                  }\n                  event.preventDefault();\n                }\n\n                // down arrow (traverse menu down)\n                if(pressedKey == keys.downArrow) {\n                  $nextItem = (hasSelectedItem && inVisibleMenu)\n                    ? $nextItem = $selectedItem.nextAll(selector.item + ':not(' + selector.unselectable + ')').eq(0)\n                    : $item.eq(0)\n                  ;\n                  if($nextItem.length === 0) {\n                    module.verbose('Down key pressed but reached bottom of current menu');\n                    event.preventDefault();\n                    return;\n                  }\n                  else {\n                    module.verbose('Down key pressed, changing active item');\n                    $item\n                      .removeClass(className.selected)\n                    ;\n                    $nextItem\n                      .addClass(className.selected)\n                    ;\n                    module.set.scrollPosition($nextItem);\n                    if(settings.selectOnKeydown && module.is.single()) {\n                      module.set.selectedItem($nextItem);\n                    }\n                  }\n                  event.preventDefault();\n                }\n\n                // page down (show next page)\n                if(pressedKey == keys.pageUp) {\n                  module.scrollPage('up');\n                  event.preventDefault();\n                }\n                if(pressedKey == keys.pageDown) {\n                  module.scrollPage('down');\n                  event.preventDefault();\n                }\n\n                // escape (close menu)\n                if(pressedKey == keys.escape) {\n                  module.verbose('Escape key pressed, closing dropdown');\n                  module.hide();\n                }\n\n              }\n              else {\n                // delimiter key\n                if(delimiterPressed) {\n                  event.preventDefault();\n                }\n                // down arrow (open menu)\n                if(pressedKey == keys.downArrow && !module.is.visible()) {\n                  module.verbose('Down key pressed, showing dropdown');\n                  module.select.firstUnfiltered();\n                  module.show();\n                  event.preventDefault();\n                }\n              }\n            }\n            else {\n              if( !module.has.search() ) {\n                module.set.selectedLetter( String.fromCharCode(pressedKey) );\n              }\n            }\n          }\n        },\n\n        trigger: {\n          change: function() {\n            var\n              events       = document.createEvent('HTMLEvents'),\n              inputElement = $input[0]\n            ;\n            if(inputElement) {\n              module.verbose('Triggering native change event');\n              events.initEvent('change', true, false);\n              inputElement.dispatchEvent(events);\n            }\n          }\n        },\n\n        determine: {\n          selectAction: function(text, value) {\n            module.verbose('Determining action', settings.action);\n            if( $.isFunction( module.action[settings.action] ) ) {\n              module.verbose('Triggering preset action', settings.action, text, value);\n              module.action[ settings.action ].call(element, text, value, this);\n            }\n            else if( $.isFunction(settings.action) ) {\n              module.verbose('Triggering user action', settings.action, text, value);\n              settings.action.call(element, text, value, this);\n            }\n            else {\n              module.error(error.action, settings.action);\n            }\n          },\n          eventInModule: function(event, callback) {\n            var\n              $target    = $(event.target),\n              inDocument = ($target.closest(document.documentElement).length > 0),\n              inModule   = ($target.closest($module).length > 0)\n            ;\n            callback = $.isFunction(callback)\n              ? callback\n              : function(){}\n            ;\n            if(inDocument && !inModule) {\n              module.verbose('Triggering event', callback);\n              callback();\n              return true;\n            }\n            else {\n              module.verbose('Event occurred in dropdown, canceling callback');\n              return false;\n            }\n          },\n          eventOnElement: function(event, callback) {\n            var\n              $target      = $(event.target),\n              $label       = $target.closest(selector.siblingLabel),\n              inVisibleDOM = document.body.contains(event.target),\n              notOnLabel   = ($module.find($label).length === 0),\n              notInMenu    = ($target.closest($menu).length === 0)\n            ;\n            callback = $.isFunction(callback)\n              ? callback\n              : function(){}\n            ;\n            if(inVisibleDOM && notOnLabel && notInMenu) {\n              module.verbose('Triggering event', callback);\n              callback();\n              return true;\n            }\n            else {\n              module.verbose('Event occurred in dropdown menu, canceling callback');\n              return false;\n            }\n          }\n        },\n\n        action: {\n\n          nothing: function() {},\n\n          activate: function(text, value, element) {\n            value = (value !== undefined)\n              ? value\n              : text\n            ;\n            if( module.can.activate( $(element) ) ) {\n              module.set.selected(value, $(element));\n              if(module.is.multiple() && !module.is.allFiltered()) {\n                return;\n              }\n              else {\n                module.hideAndClear();\n              }\n            }\n          },\n\n          select: function(text, value, element) {\n            value = (value !== undefined)\n              ? value\n              : text\n            ;\n            if( module.can.activate( $(element) ) ) {\n              module.set.value(value, $(element));\n              if(module.is.multiple() && !module.is.allFiltered()) {\n                return;\n              }\n              else {\n                module.hideAndClear();\n              }\n            }\n          },\n\n          combo: function(text, value, element) {\n            value = (value !== undefined)\n              ? value\n              : text\n            ;\n            module.set.selected(value, $(element));\n            module.hideAndClear();\n          },\n\n          hide: function(text, value, element) {\n            module.set.value(value, text);\n            module.hideAndClear();\n          }\n\n        },\n\n        get: {\n          id: function() {\n            return id;\n          },\n          defaultText: function() {\n            return $module.data(metadata.defaultText);\n          },\n          defaultValue: function() {\n            return $module.data(metadata.defaultValue);\n          },\n          placeholderText: function() {\n            return $module.data(metadata.placeholderText) || '';\n          },\n          text: function() {\n            return $text.text();\n          },\n          query: function() {\n            return $.trim($search.val());\n          },\n          searchWidth: function(value) {\n            value = (value !== undefined)\n              ? value\n              : $search.val()\n            ;\n            $sizer.text(value);\n            // prevent rounding issues\n            return Math.ceil( $sizer.width() + 1);\n          },\n          selectionCount: function() {\n            var\n              values = module.get.values(),\n              count\n            ;\n            count = ( module.is.multiple() )\n              ? $.isArray(values)\n                ? values.length\n                : 0\n              : (module.get.value() !== '')\n                ? 1\n                : 0\n            ;\n            return count;\n          },\n          transition: function($subMenu) {\n            return (settings.transition == 'auto')\n              ? module.is.upward($subMenu)\n                ? 'slide up'\n                : 'slide down'\n              : settings.transition\n            ;\n          },\n          userValues: function() {\n            var\n              values = module.get.values()\n            ;\n            if(!values) {\n              return false;\n            }\n            values = $.isArray(values)\n              ? values\n              : [values]\n            ;\n            return $.grep(values, function(value) {\n              return (module.get.item(value) === false);\n            });\n          },\n          uniqueArray: function(array) {\n            return $.grep(array, function (value, index) {\n                return $.inArray(value, array) === index;\n            });\n          },\n          caretPosition: function() {\n            var\n              input = $search.get(0),\n              range,\n              rangeLength\n            ;\n            if('selectionStart' in input) {\n              return input.selectionStart;\n            }\n            else if (document.selection) {\n              input.focus();\n              range       = document.selection.createRange();\n              rangeLength = range.text.length;\n              range.moveStart('character', -input.value.length);\n              return range.text.length - rangeLength;\n            }\n          },\n          value: function() {\n            var\n              value = ($input.length > 0)\n                ? $input.val()\n                : $module.data(metadata.value),\n              isEmptyMultiselect = ($.isArray(value) && value.length === 1 && value[0] === '')\n            ;\n            // prevents placeholder element from being selected when multiple\n            return (value === undefined || isEmptyMultiselect)\n              ? ''\n              : value\n            ;\n          },\n          values: function() {\n            var\n              value = module.get.value()\n            ;\n            if(value === '') {\n              return '';\n            }\n            return ( !module.has.selectInput() && module.is.multiple() )\n              ? (typeof value == 'string') // delimited string\n                ? value.split(settings.delimiter)\n                : ''\n              : value\n            ;\n          },\n          remoteValues: function() {\n            var\n              values = module.get.values(),\n              remoteValues = false\n            ;\n            if(values) {\n              if(typeof values == 'string') {\n                values = [values];\n              }\n              $.each(values, function(index, value) {\n                var\n                  name = module.read.remoteData(value)\n                ;\n                module.verbose('Restoring value from session data', name, value);\n                if(name) {\n                  if(!remoteValues) {\n                    remoteValues = {};\n                  }\n                  remoteValues[value] = name;\n                }\n              });\n            }\n            return remoteValues;\n          },\n          choiceText: function($choice, preserveHTML) {\n            preserveHTML = (preserveHTML !== undefined)\n              ? preserveHTML\n              : settings.preserveHTML\n            ;\n            if($choice) {\n              if($choice.find(selector.menu).length > 0) {\n                module.verbose('Retrieving text of element with sub-menu');\n                $choice = $choice.clone();\n                $choice.find(selector.menu).remove();\n                $choice.find(selector.menuIcon).remove();\n              }\n              return ($choice.data(metadata.text) !== undefined)\n                ? $choice.data(metadata.text)\n                : (preserveHTML)\n                  ? $.trim($choice.html())\n                  : $.trim($choice.text())\n              ;\n            }\n          },\n          choiceValue: function($choice, choiceText) {\n            choiceText = choiceText || module.get.choiceText($choice);\n            if(!$choice) {\n              return false;\n            }\n            return ($choice.data(metadata.value) !== undefined)\n              ? String( $choice.data(metadata.value) )\n              : (typeof choiceText === 'string')\n                ? $.trim(choiceText.toLowerCase())\n                : String(choiceText)\n            ;\n          },\n          inputEvent: function() {\n            var\n              input = $search[0]\n            ;\n            if(input) {\n              return (input.oninput !== undefined)\n                ? 'input'\n                : (input.onpropertychange !== undefined)\n                  ? 'propertychange'\n                  : 'keyup'\n              ;\n            }\n            return false;\n          },\n          selectValues: function() {\n            var\n              select = {}\n            ;\n            select.values = [];\n            $module\n              .find('option')\n                .each(function() {\n                  var\n                    $option  = $(this),\n                    name     = $option.html(),\n                    disabled = $option.attr('disabled'),\n                    value    = ( $option.attr('value') !== undefined )\n                      ? $option.attr('value')\n                      : name\n                  ;\n                  if(settings.placeholder === 'auto' && value === '') {\n                    select.placeholder = name;\n                  }\n                  else {\n                    select.values.push({\n                      name     : name,\n                      value    : value,\n                      disabled : disabled\n                    });\n                  }\n                })\n            ;\n            if(settings.placeholder && settings.placeholder !== 'auto') {\n              module.debug('Setting placeholder value to', settings.placeholder);\n              select.placeholder = settings.placeholder;\n            }\n            if(settings.sortSelect) {\n              select.values.sort(function(a, b) {\n                return (a.name > b.name)\n                  ? 1\n                  : -1\n                ;\n              });\n              module.debug('Retrieved and sorted values from select', select);\n            }\n            else {\n              module.debug('Retrieved values from select', select);\n            }\n            return select;\n          },\n          activeItem: function() {\n            return $item.filter('.'  + className.active);\n          },\n          selectedItem: function() {\n            var\n              $selectedItem = $item.not(selector.unselectable).filter('.'  + className.selected)\n            ;\n            return ($selectedItem.length > 0)\n              ? $selectedItem\n              : $item.eq(0)\n            ;\n          },\n          itemWithAdditions: function(value) {\n            var\n              $items       = module.get.item(value),\n              $userItems   = module.create.userChoice(value),\n              hasUserItems = ($userItems && $userItems.length > 0)\n            ;\n            if(hasUserItems) {\n              $items = ($items.length > 0)\n                ? $items.add($userItems)\n                : $userItems\n              ;\n            }\n            return $items;\n          },\n          item: function(value, strict) {\n            var\n              $selectedItem = false,\n              shouldSearch,\n              isMultiple\n            ;\n            value = (value !== undefined)\n              ? value\n              : ( module.get.values() !== undefined)\n                ? module.get.values()\n                : module.get.text()\n            ;\n            shouldSearch = (isMultiple)\n              ? (value.length > 0)\n              : (value !== undefined && value !== null)\n            ;\n            isMultiple = (module.is.multiple() && $.isArray(value));\n            strict     = (value === '' || value === 0)\n              ? true\n              : strict || false\n            ;\n            if(shouldSearch) {\n              $item\n                .each(function() {\n                  var\n                    $choice       = $(this),\n                    optionText    = module.get.choiceText($choice),\n                    optionValue   = module.get.choiceValue($choice, optionText)\n                  ;\n                  // safe early exit\n                  if(optionValue === null || optionValue === undefined) {\n                    return;\n                  }\n                  if(isMultiple) {\n                    if($.inArray( String(optionValue), value) !== -1 || $.inArray(optionText, value) !== -1) {\n                      $selectedItem = ($selectedItem)\n                        ? $selectedItem.add($choice)\n                        : $choice\n                      ;\n                    }\n                  }\n                  else if(strict) {\n                    module.verbose('Ambiguous dropdown value using strict type check', $choice, value);\n                    if( optionValue === value || optionText === value) {\n                      $selectedItem = $choice;\n                      return true;\n                    }\n                  }\n                  else {\n                    if( String(optionValue) == String(value) || optionText == value) {\n                      module.verbose('Found select item by value', optionValue, value);\n                      $selectedItem = $choice;\n                      return true;\n                    }\n                  }\n                })\n              ;\n            }\n            return $selectedItem;\n          }\n        },\n\n        check: {\n          maxSelections: function(selectionCount) {\n            if(settings.maxSelections) {\n              selectionCount = (selectionCount !== undefined)\n                ? selectionCount\n                : module.get.selectionCount()\n              ;\n              if(selectionCount >= settings.maxSelections) {\n                module.debug('Maximum selection count reached');\n                if(settings.useLabels) {\n                  $item.addClass(className.filtered);\n                  module.add.message(message.maxSelections);\n                }\n                return true;\n              }\n              else {\n                module.verbose('No longer at maximum selection count');\n                module.remove.message();\n                module.remove.filteredItem();\n                if(module.is.searchSelection()) {\n                  module.filterItems();\n                }\n                return false;\n              }\n            }\n            return true;\n          }\n        },\n\n        restore: {\n          defaults: function() {\n            module.clear();\n            module.restore.defaultText();\n            module.restore.defaultValue();\n          },\n          defaultText: function() {\n            var\n              defaultText     = module.get.defaultText(),\n              placeholderText = module.get.placeholderText\n            ;\n            if(defaultText === placeholderText) {\n              module.debug('Restoring default placeholder text', defaultText);\n              module.set.placeholderText(defaultText);\n            }\n            else {\n              module.debug('Restoring default text', defaultText);\n              module.set.text(defaultText);\n            }\n          },\n          placeholderText: function() {\n            module.set.placeholderText();\n          },\n          defaultValue: function() {\n            var\n              defaultValue = module.get.defaultValue()\n            ;\n            if(defaultValue !== undefined) {\n              module.debug('Restoring default value', defaultValue);\n              if(defaultValue !== '') {\n                module.set.value(defaultValue);\n                module.set.selected();\n              }\n              else {\n                module.remove.activeItem();\n                module.remove.selectedItem();\n              }\n            }\n          },\n          labels: function() {\n            if(settings.allowAdditions) {\n              if(!settings.useLabels) {\n                module.error(error.labels);\n                settings.useLabels = true;\n              }\n              module.debug('Restoring selected values');\n              module.create.userLabels();\n            }\n            module.check.maxSelections();\n          },\n          selected: function() {\n            module.restore.values();\n            if(module.is.multiple()) {\n              module.debug('Restoring previously selected values and labels');\n              module.restore.labels();\n            }\n            else {\n              module.debug('Restoring previously selected values');\n            }\n          },\n          values: function() {\n            // prevents callbacks from occurring on initial load\n            module.set.initialLoad();\n            if(settings.apiSettings && settings.saveRemoteData && module.get.remoteValues()) {\n              module.restore.remoteValues();\n            }\n            else {\n              module.set.selected();\n            }\n            module.remove.initialLoad();\n          },\n          remoteValues: function() {\n            var\n              values = module.get.remoteValues()\n            ;\n            module.debug('Recreating selected from session data', values);\n            if(values) {\n              if( module.is.single() ) {\n                $.each(values, function(value, name) {\n                  module.set.text(name);\n                });\n              }\n              else {\n                $.each(values, function(value, name) {\n                  module.add.label(value, name);\n                });\n              }\n            }\n          }\n        },\n\n        read: {\n          remoteData: function(value) {\n            var\n              name\n            ;\n            if(window.Storage === undefined) {\n              module.error(error.noStorage);\n              return;\n            }\n            name = sessionStorage.getItem(value);\n            return (name !== undefined)\n              ? name\n              : false\n            ;\n          }\n        },\n\n        save: {\n          defaults: function() {\n            module.save.defaultText();\n            module.save.placeholderText();\n            module.save.defaultValue();\n          },\n          defaultValue: function() {\n            var\n              value = module.get.value()\n            ;\n            module.verbose('Saving default value as', value);\n            $module.data(metadata.defaultValue, value);\n          },\n          defaultText: function() {\n            var\n              text = module.get.text()\n            ;\n            module.verbose('Saving default text as', text);\n            $module.data(metadata.defaultText, text);\n          },\n          placeholderText: function() {\n            var\n              text\n            ;\n            if(settings.placeholder !== false && $text.hasClass(className.placeholder)) {\n              text = module.get.text();\n              module.verbose('Saving placeholder text as', text);\n              $module.data(metadata.placeholderText, text);\n            }\n          },\n          remoteData: function(name, value) {\n            if(window.Storage === undefined) {\n              module.error(error.noStorage);\n              return;\n            }\n            module.verbose('Saving remote data to session storage', value, name);\n            sessionStorage.setItem(value, name);\n          }\n        },\n\n        clear: function() {\n          if(module.is.multiple() && settings.useLabels) {\n            module.remove.labels();\n          }\n          else {\n            module.remove.activeItem();\n            module.remove.selectedItem();\n          }\n          module.set.placeholderText();\n          module.clearValue();\n        },\n\n        clearValue: function() {\n          module.set.value('');\n        },\n\n        scrollPage: function(direction, $selectedItem) {\n          var\n            $currentItem  = $selectedItem || module.get.selectedItem(),\n            $menu         = $currentItem.closest(selector.menu),\n            menuHeight    = $menu.outerHeight(),\n            currentScroll = $menu.scrollTop(),\n            itemHeight    = $item.eq(0).outerHeight(),\n            itemsPerPage  = Math.floor(menuHeight / itemHeight),\n            maxScroll     = $menu.prop('scrollHeight'),\n            newScroll     = (direction == 'up')\n              ? currentScroll - (itemHeight * itemsPerPage)\n              : currentScroll + (itemHeight * itemsPerPage),\n            $selectableItem = $item.not(selector.unselectable),\n            isWithinRange,\n            $nextSelectedItem,\n            elementIndex\n          ;\n          elementIndex      = (direction == 'up')\n            ? $selectableItem.index($currentItem) - itemsPerPage\n            : $selectableItem.index($currentItem) + itemsPerPage\n          ;\n          isWithinRange = (direction == 'up')\n            ? (elementIndex >= 0)\n            : (elementIndex < $selectableItem.length)\n          ;\n          $nextSelectedItem = (isWithinRange)\n            ? $selectableItem.eq(elementIndex)\n            : (direction == 'up')\n              ? $selectableItem.first()\n              : $selectableItem.last()\n          ;\n          if($nextSelectedItem.length > 0) {\n            module.debug('Scrolling page', direction, $nextSelectedItem);\n            $currentItem\n              .removeClass(className.selected)\n            ;\n            $nextSelectedItem\n              .addClass(className.selected)\n            ;\n            if(settings.selectOnKeydown && module.is.single()) {\n              module.set.selectedItem($nextSelectedItem);\n            }\n            $menu\n              .scrollTop(newScroll)\n            ;\n          }\n        },\n\n        set: {\n          filtered: function() {\n            var\n              isMultiple       = module.is.multiple(),\n              isSearch         = module.is.searchSelection(),\n              isSearchMultiple = (isMultiple && isSearch),\n              searchValue      = (isSearch)\n                ? module.get.query()\n                : '',\n              hasSearchValue   = (typeof searchValue === 'string' && searchValue.length > 0),\n              searchWidth      = module.get.searchWidth(),\n              valueIsSet       = searchValue !== ''\n            ;\n            if(isMultiple && hasSearchValue) {\n              module.verbose('Adjusting input width', searchWidth, settings.glyphWidth);\n              $search.css('width', searchWidth);\n            }\n            if(hasSearchValue || (isSearchMultiple && valueIsSet)) {\n              module.verbose('Hiding placeholder text');\n              $text.addClass(className.filtered);\n            }\n            else if(!isMultiple || (isSearchMultiple && !valueIsSet)) {\n              module.verbose('Showing placeholder text');\n              $text.removeClass(className.filtered);\n            }\n          },\n          empty: function() {\n            $module.addClass(className.empty);\n          },\n          loading: function() {\n            $module.addClass(className.loading);\n          },\n          placeholderText: function(text) {\n            text = text || module.get.placeholderText();\n            module.debug('Setting placeholder text', text);\n            module.set.text(text);\n            $text.addClass(className.placeholder);\n          },\n          tabbable: function() {\n            if( module.has.search() ) {\n              module.debug('Added tabindex to searchable dropdown');\n              $search\n                .val('')\n                .attr('tabindex', 0)\n              ;\n              $menu\n                .attr('tabindex', -1)\n              ;\n            }\n            else {\n              module.debug('Added tabindex to dropdown');\n              if( $module.attr('tabindex') === undefined) {\n                $module\n                  .attr('tabindex', 0)\n                ;\n                $menu\n                  .attr('tabindex', -1)\n                ;\n              }\n            }\n          },\n          initialLoad: function() {\n            module.verbose('Setting initial load');\n            initialLoad = true;\n          },\n          activeItem: function($item) {\n            if( settings.allowAdditions && $item.filter(selector.addition).length > 0 ) {\n              $item.addClass(className.filtered);\n            }\n            else {\n              $item.addClass(className.active);\n            }\n          },\n          partialSearch: function(text) {\n            var\n              length = module.get.query().length\n            ;\n            $search.val( text.substr(0 , length));\n          },\n          scrollPosition: function($item, forceScroll) {\n            var\n              edgeTolerance = 5,\n              $menu,\n              hasActive,\n              offset,\n              itemHeight,\n              itemOffset,\n              menuOffset,\n              menuScroll,\n              menuHeight,\n              abovePage,\n              belowPage\n            ;\n\n            $item       = $item || module.get.selectedItem();\n            $menu       = $item.closest(selector.menu);\n            hasActive   = ($item && $item.length > 0);\n            forceScroll = (forceScroll !== undefined)\n              ? forceScroll\n              : false\n            ;\n            if($item && $menu.length > 0 && hasActive) {\n              itemOffset = $item.position().top;\n\n              $menu.addClass(className.loading);\n              menuScroll = $menu.scrollTop();\n              menuOffset = $menu.offset().top;\n              itemOffset = $item.offset().top;\n              offset     = menuScroll - menuOffset + itemOffset;\n              if(!forceScroll) {\n                menuHeight = $menu.height();\n                belowPage  = menuScroll + menuHeight < (offset + edgeTolerance);\n                abovePage  = ((offset - edgeTolerance) < menuScroll);\n              }\n              module.debug('Scrolling to active item', offset);\n              if(forceScroll || abovePage || belowPage) {\n                $menu.scrollTop(offset);\n              }\n              $menu.removeClass(className.loading);\n            }\n          },\n          text: function(text) {\n            if(settings.action !== 'select') {\n              if(settings.action == 'combo') {\n                module.debug('Changing combo button text', text, $combo);\n                if(settings.preserveHTML) {\n                  $combo.html(text);\n                }\n                else {\n                  $combo.text(text);\n                }\n              }\n              else {\n                if(text !== module.get.placeholderText()) {\n                  $text.removeClass(className.placeholder);\n                }\n                module.debug('Changing text', text, $text);\n                $text\n                  .removeClass(className.filtered)\n                ;\n                if(settings.preserveHTML) {\n                  $text.html(text);\n                }\n                else {\n                  $text.text(text);\n                }\n              }\n            }\n          },\n          selectedItem: function($item) {\n            var\n              value = module.get.choiceValue($item),\n              text  = module.get.choiceText($item, false)\n            ;\n            module.debug('Setting user selection to item', $item);\n            module.remove.activeItem();\n            module.set.partialSearch(text);\n            module.set.activeItem($item);\n            module.set.selected(value, $item);\n            module.set.text(text);\n          },\n          selectedLetter: function(letter) {\n            var\n              $selectedItem         = $item.filter('.' + className.selected),\n              alreadySelectedLetter = $selectedItem.length > 0 && module.has.firstLetter($selectedItem, letter),\n              $nextValue            = false,\n              $nextItem\n            ;\n            // check next of same letter\n            if(alreadySelectedLetter) {\n              $nextItem = $selectedItem.nextAll($item).eq(0);\n              if( module.has.firstLetter($nextItem, letter) ) {\n                $nextValue  = $nextItem;\n              }\n            }\n            // check all values\n            if(!$nextValue) {\n              $item\n                .each(function(){\n                  if(module.has.firstLetter($(this), letter)) {\n                    $nextValue = $(this);\n                    return false;\n                  }\n                })\n              ;\n            }\n            // set next value\n            if($nextValue) {\n              module.verbose('Scrolling to next value with letter', letter);\n              module.set.scrollPosition($nextValue);\n              $selectedItem.removeClass(className.selected);\n              $nextValue.addClass(className.selected);\n              if(settings.selectOnKeydown && module.is.single()) {\n                module.set.selectedItem($nextValue);\n              }\n            }\n          },\n          direction: function($menu) {\n            if(settings.direction == 'auto') {\n              if(module.is.onScreen($menu)) {\n                module.remove.upward($menu);\n              }\n              else {\n                module.set.upward($menu);\n              }\n            }\n            else if(settings.direction == 'upward') {\n              module.set.upward($menu);\n            }\n          },\n          upward: function($menu) {\n            var $element = $menu || $module;\n            $element.addClass(className.upward);\n          },\n          value: function(value, text, $selected) {\n            var\n              escapedValue = module.escape.value(value),\n              hasInput     = ($input.length > 0),\n              isAddition   = !module.has.value(value),\n              currentValue = module.get.values(),\n              stringValue  = (value !== undefined)\n                ? String(value)\n                : value,\n              newValue\n            ;\n            if(hasInput) {\n              if(!settings.allowReselection && stringValue == currentValue) {\n                module.verbose('Skipping value update already same value', value, currentValue);\n                if(!module.is.initialLoad()) {\n                  return;\n                }\n              }\n\n              if( module.is.single() && module.has.selectInput() && module.can.extendSelect() ) {\n                module.debug('Adding user option', value);\n                module.add.optionValue(value);\n              }\n              module.debug('Updating input value', escapedValue, currentValue);\n              internalChange = true;\n              $input\n                .val(escapedValue)\n              ;\n              if(settings.fireOnInit === false && module.is.initialLoad()) {\n                module.debug('Input native change event ignored on initial load');\n              }\n              else {\n                module.trigger.change();\n              }\n              internalChange = false;\n            }\n            else {\n              module.verbose('Storing value in metadata', escapedValue, $input);\n              if(escapedValue !== currentValue) {\n                $module.data(metadata.value, stringValue);\n              }\n            }\n            if(settings.fireOnInit === false && module.is.initialLoad()) {\n              module.verbose('No callback on initial load', settings.onChange);\n            }\n            else {\n              settings.onChange.call(element, value, text, $selected);\n            }\n          },\n          active: function() {\n            $module\n              .addClass(className.active)\n            ;\n          },\n          multiple: function() {\n            $module.addClass(className.multiple);\n          },\n          visible: function() {\n            $module.addClass(className.visible);\n          },\n          exactly: function(value, $selectedItem) {\n            module.debug('Setting selected to exact values');\n            module.clear();\n            module.set.selected(value, $selectedItem);\n          },\n          selected: function(value, $selectedItem) {\n            var\n              isMultiple = module.is.multiple(),\n              $userSelectedItem\n            ;\n            $selectedItem = (settings.allowAdditions)\n              ? $selectedItem || module.get.itemWithAdditions(value)\n              : $selectedItem || module.get.item(value)\n            ;\n            if(!$selectedItem) {\n              return;\n            }\n            module.debug('Setting selected menu item to', $selectedItem);\n            if(module.is.multiple()) {\n              module.remove.searchWidth();\n            }\n            if(module.is.single()) {\n              module.remove.activeItem();\n              module.remove.selectedItem();\n            }\n            else if(settings.useLabels) {\n              module.remove.selectedItem();\n            }\n            // select each item\n            $selectedItem\n              .each(function() {\n                var\n                  $selected      = $(this),\n                  selectedText   = module.get.choiceText($selected),\n                  selectedValue  = module.get.choiceValue($selected, selectedText),\n\n                  isFiltered     = $selected.hasClass(className.filtered),\n                  isActive       = $selected.hasClass(className.active),\n                  isUserValue    = $selected.hasClass(className.addition),\n                  shouldAnimate  = (isMultiple && $selectedItem.length == 1)\n                ;\n                if(isMultiple) {\n                  if(!isActive || isUserValue) {\n                    if(settings.apiSettings && settings.saveRemoteData) {\n                      module.save.remoteData(selectedText, selectedValue);\n                    }\n                    if(settings.useLabels) {\n                      module.add.value(selectedValue, selectedText, $selected);\n                      module.add.label(selectedValue, selectedText, shouldAnimate);\n                      module.set.activeItem($selected);\n                      module.filterActive();\n                      module.select.nextAvailable($selectedItem);\n                    }\n                    else {\n                      module.add.value(selectedValue, selectedText, $selected);\n                      module.set.text(module.add.variables(message.count));\n                      module.set.activeItem($selected);\n                    }\n                  }\n                  else if(!isFiltered) {\n                    module.debug('Selected active value, removing label');\n                    module.remove.selected(selectedValue);\n                  }\n                }\n                else {\n                  if(settings.apiSettings && settings.saveRemoteData) {\n                    module.save.remoteData(selectedText, selectedValue);\n                  }\n                  module.set.text(selectedText);\n                  module.set.value(selectedValue, selectedText, $selected);\n                  $selected\n                    .addClass(className.active)\n                    .addClass(className.selected)\n                  ;\n                }\n              })\n            ;\n          }\n        },\n\n        add: {\n          label: function(value, text, shouldAnimate) {\n            var\n              $next  = module.is.searchSelection()\n                ? $search\n                : $text,\n              escapedValue = module.escape.value(value),\n              $label\n            ;\n            $label =  $('<a />')\n              .addClass(className.label)\n              .attr('data-value', escapedValue)\n              .html(templates.label(escapedValue, text))\n            ;\n            $label = settings.onLabelCreate.call($label, escapedValue, text);\n\n            if(module.has.label(value)) {\n              module.debug('Label already exists, skipping', escapedValue);\n              return;\n            }\n            if(settings.label.variation) {\n              $label.addClass(settings.label.variation);\n            }\n            if(shouldAnimate === true) {\n              module.debug('Animating in label', $label);\n              $label\n                .addClass(className.hidden)\n                .insertBefore($next)\n                .transition(settings.label.transition, settings.label.duration)\n              ;\n            }\n            else {\n              module.debug('Adding selection label', $label);\n              $label\n                .insertBefore($next)\n              ;\n            }\n          },\n          message: function(message) {\n            var\n              $message = $menu.children(selector.message),\n              html     = settings.templates.message(module.add.variables(message))\n            ;\n            if($message.length > 0) {\n              $message\n                .html(html)\n              ;\n            }\n            else {\n              $message = $('<div/>')\n                .html(html)\n                .addClass(className.message)\n                .appendTo($menu)\n              ;\n            }\n          },\n          optionValue: function(value) {\n            var\n              escapedValue = module.escape.value(value),\n              $option      = $input.find('option[value=\"' + escapedValue + '\"]'),\n              hasOption    = ($option.length > 0)\n            ;\n            if(hasOption) {\n              return;\n            }\n            // temporarily disconnect observer\n            module.disconnect.selectObserver();\n            if( module.is.single() ) {\n              module.verbose('Removing previous user addition');\n              $input.find('option.' + className.addition).remove();\n            }\n            $('<option/>')\n              .prop('value', escapedValue)\n              .addClass(className.addition)\n              .html(value)\n              .appendTo($input)\n            ;\n            module.verbose('Adding user addition as an <option>', value);\n            module.observe.select();\n          },\n          userSuggestion: function(value) {\n            var\n              $addition         = $menu.children(selector.addition),\n              $existingItem     = module.get.item(value),\n              alreadyHasValue   = $existingItem && $existingItem.not(selector.addition).length,\n              hasUserSuggestion = $addition.length > 0,\n              html\n            ;\n            if(settings.useLabels && module.has.maxSelections()) {\n              return;\n            }\n            if(value === '' || alreadyHasValue) {\n              $addition.remove();\n              return;\n            }\n            if(hasUserSuggestion) {\n              $addition\n                .data(metadata.value, value)\n                .data(metadata.text, value)\n                .attr('data-' + metadata.value, value)\n                .attr('data-' + metadata.text, value)\n                .removeClass(className.filtered)\n              ;\n              if(!settings.hideAdditions) {\n                html = settings.templates.addition( module.add.variables(message.addResult, value) );\n                $addition\n                  .html(html)\n                ;\n              }\n              module.verbose('Replacing user suggestion with new value', $addition);\n            }\n            else {\n              $addition = module.create.userChoice(value);\n              $addition\n                .prependTo($menu)\n              ;\n              module.verbose('Adding item choice to menu corresponding with user choice addition', $addition);\n            }\n            if(!settings.hideAdditions || module.is.allFiltered()) {\n              $addition\n                .addClass(className.selected)\n                .siblings()\n                .removeClass(className.selected)\n              ;\n            }\n            module.refreshItems();\n          },\n          variables: function(message, term) {\n            var\n              hasCount    = (message.search('{count}') !== -1),\n              hasMaxCount = (message.search('{maxCount}') !== -1),\n              hasTerm     = (message.search('{term}') !== -1),\n              values,\n              count,\n              query\n            ;\n            module.verbose('Adding templated variables to message', message);\n            if(hasCount) {\n              count  = module.get.selectionCount();\n              message = message.replace('{count}', count);\n            }\n            if(hasMaxCount) {\n              count  = module.get.selectionCount();\n              message = message.replace('{maxCount}', settings.maxSelections);\n            }\n            if(hasTerm) {\n              query   = term || module.get.query();\n              message = message.replace('{term}', query);\n            }\n            return message;\n          },\n          value: function(addedValue, addedText, $selectedItem) {\n            var\n              currentValue = module.get.values(),\n              newValue\n            ;\n            if(addedValue === '') {\n              module.debug('Cannot select blank values from multiselect');\n              return;\n            }\n            // extend current array\n            if($.isArray(currentValue)) {\n              newValue = currentValue.concat([addedValue]);\n              newValue = module.get.uniqueArray(newValue);\n            }\n            else {\n              newValue = [addedValue];\n            }\n            // add values\n            if( module.has.selectInput() ) {\n              if(module.can.extendSelect()) {\n                module.debug('Adding value to select', addedValue, newValue, $input);\n                module.add.optionValue(addedValue);\n              }\n            }\n            else {\n              newValue = newValue.join(settings.delimiter);\n              module.debug('Setting hidden input to delimited value', newValue, $input);\n            }\n\n            if(settings.fireOnInit === false && module.is.initialLoad()) {\n              module.verbose('Skipping onadd callback on initial load', settings.onAdd);\n            }\n            else {\n              settings.onAdd.call(element, addedValue, addedText, $selectedItem);\n            }\n            module.set.value(newValue, addedValue, addedText, $selectedItem);\n            module.check.maxSelections();\n          }\n        },\n\n        remove: {\n          active: function() {\n            $module.removeClass(className.active);\n          },\n          activeLabel: function() {\n            $module.find(selector.label).removeClass(className.active);\n          },\n          empty: function() {\n            $module.removeClass(className.empty);\n          },\n          loading: function() {\n            $module.removeClass(className.loading);\n          },\n          initialLoad: function() {\n            initialLoad = false;\n          },\n          upward: function($menu) {\n            var $element = $menu || $module;\n            $element.removeClass(className.upward);\n          },\n          visible: function() {\n            $module.removeClass(className.visible);\n          },\n          activeItem: function() {\n            $item.removeClass(className.active);\n          },\n          filteredItem: function() {\n            if(settings.useLabels && module.has.maxSelections() ) {\n              return;\n            }\n            if(settings.useLabels && module.is.multiple()) {\n              $item.not('.' + className.active).removeClass(className.filtered);\n            }\n            else {\n              $item.removeClass(className.filtered);\n            }\n            module.remove.empty();\n          },\n          optionValue: function(value) {\n            var\n              escapedValue = module.escape.value(value),\n              $option      = $input.find('option[value=\"' + escapedValue + '\"]'),\n              hasOption    = ($option.length > 0)\n            ;\n            if(!hasOption || !$option.hasClass(className.addition)) {\n              return;\n            }\n            // temporarily disconnect observer\n            if(selectObserver) {\n              selectObserver.disconnect();\n              module.verbose('Temporarily disconnecting mutation observer');\n            }\n            $option.remove();\n            module.verbose('Removing user addition as an <option>', escapedValue);\n            if(selectObserver) {\n              selectObserver.observe($input[0], {\n                childList : true,\n                subtree   : true\n              });\n            }\n          },\n          message: function() {\n            $menu.children(selector.message).remove();\n          },\n          searchWidth: function() {\n            $search.css('width', '');\n          },\n          searchTerm: function() {\n            module.verbose('Cleared search term');\n            $search.val('');\n            module.set.filtered();\n          },\n          userAddition: function() {\n            $item.filter(selector.addition).remove();\n          },\n          selected: function(value, $selectedItem) {\n            $selectedItem = (settings.allowAdditions)\n              ? $selectedItem || module.get.itemWithAdditions(value)\n              : $selectedItem || module.get.item(value)\n            ;\n\n            if(!$selectedItem) {\n              return false;\n            }\n\n            $selectedItem\n              .each(function() {\n                var\n                  $selected     = $(this),\n                  selectedText  = module.get.choiceText($selected),\n                  selectedValue = module.get.choiceValue($selected, selectedText)\n                ;\n                if(module.is.multiple()) {\n                  if(settings.useLabels) {\n                    module.remove.value(selectedValue, selectedText, $selected);\n                    module.remove.label(selectedValue);\n                  }\n                  else {\n                    module.remove.value(selectedValue, selectedText, $selected);\n                    if(module.get.selectionCount() === 0) {\n                      module.set.placeholderText();\n                    }\n                    else {\n                      module.set.text(module.add.variables(message.count));\n                    }\n                  }\n                }\n                else {\n                  module.remove.value(selectedValue, selectedText, $selected);\n                }\n                $selected\n                  .removeClass(className.filtered)\n                  .removeClass(className.active)\n                ;\n                if(settings.useLabels) {\n                  $selected.removeClass(className.selected);\n                }\n              })\n            ;\n          },\n          selectedItem: function() {\n            $item.removeClass(className.selected);\n          },\n          value: function(removedValue, removedText, $removedItem) {\n            var\n              values = module.get.values(),\n              newValue\n            ;\n            if( module.has.selectInput() ) {\n              module.verbose('Input is <select> removing selected option', removedValue);\n              newValue = module.remove.arrayValue(removedValue, values);\n              module.remove.optionValue(removedValue);\n            }\n            else {\n              module.verbose('Removing from delimited values', removedValue);\n              newValue = module.remove.arrayValue(removedValue, values);\n              newValue = newValue.join(settings.delimiter);\n            }\n            if(settings.fireOnInit === false && module.is.initialLoad()) {\n              module.verbose('No callback on initial load', settings.onRemove);\n            }\n            else {\n              settings.onRemove.call(element, removedValue, removedText, $removedItem);\n            }\n            module.set.value(newValue, removedText, $removedItem);\n            module.check.maxSelections();\n          },\n          arrayValue: function(removedValue, values) {\n            if( !$.isArray(values) ) {\n              values = [values];\n            }\n            values = $.grep(values, function(value){\n              return (removedValue != value);\n            });\n            module.verbose('Removed value from delimited string', removedValue, values);\n            return values;\n          },\n          label: function(value, shouldAnimate) {\n            var\n              $labels       = $module.find(selector.label),\n              $removedLabel = $labels.filter('[data-value=\"' + value +'\"]')\n            ;\n            module.verbose('Removing label', $removedLabel);\n            $removedLabel.remove();\n          },\n          activeLabels: function($activeLabels) {\n            $activeLabels = $activeLabels || $module.find(selector.label).filter('.' + className.active);\n            module.verbose('Removing active label selections', $activeLabels);\n            module.remove.labels($activeLabels);\n          },\n          labels: function($labels) {\n            $labels = $labels || $module.find(selector.label);\n            module.verbose('Removing labels', $labels);\n            $labels\n              .each(function(){\n                var\n                  $label      = $(this),\n                  value       = $label.data(metadata.value),\n                  stringValue = (value !== undefined)\n                    ? String(value)\n                    : value,\n                  isUserValue = module.is.userValue(stringValue)\n                ;\n                if(settings.onLabelRemove.call($label, value) === false) {\n                  module.debug('Label remove callback cancelled removal');\n                  return;\n                }\n                module.remove.message();\n                if(isUserValue) {\n                  module.remove.value(stringValue);\n                  module.remove.label(stringValue);\n                }\n                else {\n                  // selected will also remove label\n                  module.remove.selected(stringValue);\n                }\n              })\n            ;\n          },\n          tabbable: function() {\n            if( module.has.search() ) {\n              module.debug('Searchable dropdown initialized');\n              $search\n                .removeAttr('tabindex')\n              ;\n              $menu\n                .removeAttr('tabindex')\n              ;\n            }\n            else {\n              module.debug('Simple selection dropdown initialized');\n              $module\n                .removeAttr('tabindex')\n              ;\n              $menu\n                .removeAttr('tabindex')\n              ;\n            }\n          }\n        },\n\n        has: {\n          menuSearch: function() {\n            return (module.has.search() && $search.closest($menu).length > 0);\n          },\n          search: function() {\n            return ($search.length > 0);\n          },\n          sizer: function() {\n            return ($sizer.length > 0);\n          },\n          selectInput: function() {\n            return ( $input.is('select') );\n          },\n          minCharacters: function(searchTerm) {\n            if(settings.minCharacters) {\n              searchTerm = (searchTerm !== undefined)\n                ? String(searchTerm)\n                : String(module.get.query())\n              ;\n              return (searchTerm.length >= settings.minCharacters);\n            }\n            return true;\n          },\n          firstLetter: function($item, letter) {\n            var\n              text,\n              firstLetter\n            ;\n            if(!$item || $item.length === 0 || typeof letter !== 'string') {\n              return false;\n            }\n            text        = module.get.choiceText($item, false);\n            letter      = letter.toLowerCase();\n            firstLetter = String(text).charAt(0).toLowerCase();\n            return (letter == firstLetter);\n          },\n          input: function() {\n            return ($input.length > 0);\n          },\n          items: function() {\n            return ($item.length > 0);\n          },\n          menu: function() {\n            return ($menu.length > 0);\n          },\n          message: function() {\n            return ($menu.children(selector.message).length !== 0);\n          },\n          label: function(value) {\n            var\n              escapedValue = module.escape.value(value),\n              $labels      = $module.find(selector.label)\n            ;\n            return ($labels.filter('[data-value=\"' + escapedValue +'\"]').length > 0);\n          },\n          maxSelections: function() {\n            return (settings.maxSelections && module.get.selectionCount() >= settings.maxSelections);\n          },\n          allResultsFiltered: function() {\n            var\n              $normalResults = $item.not(selector.addition)\n            ;\n            return ($normalResults.filter(selector.unselectable).length === $normalResults.length);\n          },\n          userSuggestion: function() {\n            return ($menu.children(selector.addition).length > 0);\n          },\n          query: function() {\n            return (module.get.query() !== '');\n          },\n          value: function(value) {\n            var\n              values   = module.get.values(),\n              hasValue = $.isArray(values)\n               ? values && ($.inArray(value, values) !== -1)\n               : (values == value)\n            ;\n            return (hasValue)\n              ? true\n              : false\n            ;\n          }\n        },\n\n        is: {\n          active: function() {\n            return $module.hasClass(className.active);\n          },\n          bubbledLabelClick: function(event) {\n            return $(event.target).is('select, input') && $module.closest('label').length > 0;\n          },\n          bubbledIconClick: function(event) {\n            return $(event.target).closest($icon).length > 0;\n          },\n          alreadySetup: function() {\n            return ($module.is('select') && $module.parent(selector.dropdown).length > 0  && $module.prev().length === 0);\n          },\n          animating: function($subMenu) {\n            return ($subMenu)\n              ? $subMenu.transition && $subMenu.transition('is animating')\n              : $menu.transition    && $menu.transition('is animating')\n            ;\n          },\n          disabled: function() {\n            return $module.hasClass(className.disabled);\n          },\n          focused: function() {\n            return (document.activeElement === $module[0]);\n          },\n          focusedOnSearch: function() {\n            return (document.activeElement === $search[0]);\n          },\n          allFiltered: function() {\n            return( (module.is.multiple() || module.has.search()) && !(settings.hideAdditions == false && module.has.userSuggestion()) && !module.has.message() && module.has.allResultsFiltered() );\n          },\n          hidden: function($subMenu) {\n            return !module.is.visible($subMenu);\n          },\n          initialLoad: function() {\n            return initialLoad;\n          },\n          onScreen: function($subMenu) {\n            var\n              $currentMenu   = $subMenu || $menu,\n              canOpenDownward = true,\n              onScreen = {},\n              calculations\n            ;\n            $currentMenu.addClass(className.loading);\n            calculations = {\n              context: {\n                scrollTop : $context.scrollTop(),\n                height    : $context.outerHeight()\n              },\n              menu : {\n                offset: $currentMenu.offset(),\n                height: $currentMenu.outerHeight()\n              }\n            };\n            onScreen = {\n              above : (calculations.context.scrollTop) <= calculations.menu.offset.top - calculations.menu.height,\n              below : (calculations.context.scrollTop + calculations.context.height) >= calculations.menu.offset.top + calculations.menu.height\n            };\n            if(onScreen.below) {\n              module.verbose('Dropdown can fit in context downward', onScreen);\n              canOpenDownward = true;\n            }\n            else if(!onScreen.below && !onScreen.above) {\n              module.verbose('Dropdown cannot fit in either direction, favoring downward', onScreen);\n              canOpenDownward = true;\n            }\n            else {\n              module.verbose('Dropdown cannot fit below, opening upward', onScreen);\n              canOpenDownward = false;\n            }\n            $currentMenu.removeClass(className.loading);\n            return canOpenDownward;\n          },\n          inObject: function(needle, object) {\n            var\n              found = false\n            ;\n            $.each(object, function(index, property) {\n              if(property == needle) {\n                found = true;\n                return true;\n              }\n            });\n            return found;\n          },\n          multiple: function() {\n            return $module.hasClass(className.multiple);\n          },\n          single: function() {\n            return !module.is.multiple();\n          },\n          selectMutation: function(mutations) {\n            var\n              selectChanged = false\n            ;\n            $.each(mutations, function(index, mutation) {\n              if(mutation.target && $(mutation.target).is('select')) {\n                selectChanged = true;\n                return true;\n              }\n            });\n            return selectChanged;\n          },\n          search: function() {\n            return $module.hasClass(className.search);\n          },\n          searchSelection: function() {\n            return ( module.has.search() && $search.parent(selector.dropdown).length === 1 );\n          },\n          selection: function() {\n            return $module.hasClass(className.selection);\n          },\n          userValue: function(value) {\n            return ($.inArray(value, module.get.userValues()) !== -1);\n          },\n          upward: function($menu) {\n            var $element = $menu || $module;\n            return $element.hasClass(className.upward);\n          },\n          visible: function($subMenu) {\n            return ($subMenu)\n              ? $subMenu.hasClass(className.visible)\n              : $menu.hasClass(className.visible)\n            ;\n          }\n        },\n\n        can: {\n          activate: function($item) {\n            if(settings.useLabels) {\n              return true;\n            }\n            if(!module.has.maxSelections()) {\n              return true;\n            }\n            if(module.has.maxSelections() && $item.hasClass(className.active)) {\n              return true;\n            }\n            return false;\n          },\n          click: function() {\n            return (hasTouch || settings.on == 'click');\n          },\n          extendSelect: function() {\n            return settings.allowAdditions || settings.apiSettings;\n          },\n          show: function() {\n            return !module.is.disabled() && (module.has.items() || module.has.message());\n          },\n          useAPI: function() {\n            return $.fn.api !== undefined;\n          }\n        },\n\n        animate: {\n          show: function(callback, $subMenu) {\n            var\n              $currentMenu = $subMenu || $menu,\n              start = ($subMenu)\n                ? function() {}\n                : function() {\n                  module.hideSubMenus();\n                  module.hideOthers();\n                  module.set.active();\n                },\n              transition\n            ;\n            callback = $.isFunction(callback)\n              ? callback\n              : function(){}\n            ;\n            module.verbose('Doing menu show animation', $currentMenu);\n            module.set.direction($subMenu);\n            transition = module.get.transition($subMenu);\n            if( module.is.selection() ) {\n              module.set.scrollPosition(module.get.selectedItem(), true);\n            }\n            if( module.is.hidden($currentMenu) || module.is.animating($currentMenu) ) {\n              if(transition == 'none') {\n                start();\n                $currentMenu.transition('show');\n                callback.call(element);\n              }\n              else if($.fn.transition !== undefined && $module.transition('is supported')) {\n                $currentMenu\n                  .transition({\n                    animation  : transition + ' in',\n                    debug      : settings.debug,\n                    verbose    : settings.verbose,\n                    duration   : settings.duration,\n                    queue      : true,\n                    onStart    : start,\n                    onComplete : function() {\n                      callback.call(element);\n                    }\n                  })\n                ;\n              }\n              else {\n                module.error(error.noTransition, transition);\n              }\n            }\n          },\n          hide: function(callback, $subMenu) {\n            var\n              $currentMenu = $subMenu || $menu,\n              duration = ($subMenu)\n                ? (settings.duration * 0.9)\n                : settings.duration,\n              start = ($subMenu)\n                ? function() {}\n                : function() {\n                  if( module.can.click() ) {\n                    module.unbind.intent();\n                  }\n                  module.remove.active();\n                },\n              transition = module.get.transition($subMenu)\n            ;\n            callback = $.isFunction(callback)\n              ? callback\n              : function(){}\n            ;\n            if( module.is.visible($currentMenu) || module.is.animating($currentMenu) ) {\n              module.verbose('Doing menu hide animation', $currentMenu);\n\n              if(transition == 'none') {\n                start();\n                $currentMenu.transition('hide');\n                callback.call(element);\n              }\n              else if($.fn.transition !== undefined && $module.transition('is supported')) {\n                $currentMenu\n                  .transition({\n                    animation  : transition + ' out',\n                    duration   : settings.duration,\n                    debug      : settings.debug,\n                    verbose    : settings.verbose,\n                    queue      : true,\n                    onStart    : start,\n                    onComplete : function() {\n                      if(settings.direction == 'auto') {\n                        module.remove.upward($subMenu);\n                      }\n                      callback.call(element);\n                    }\n                  })\n                ;\n              }\n              else {\n                module.error(error.transition);\n              }\n            }\n          }\n        },\n\n        hideAndClear: function() {\n          module.remove.searchTerm();\n          if( module.has.maxSelections() ) {\n            return;\n          }\n          if(module.has.search()) {\n            module.hide(function() {\n              module.remove.filteredItem();\n            });\n          }\n          else {\n            module.hide();\n          }\n        },\n\n        delay: {\n          show: function() {\n            module.verbose('Delaying show event to ensure user intent');\n            clearTimeout(module.timer);\n            module.timer = setTimeout(module.show, settings.delay.show);\n          },\n          hide: function() {\n            module.verbose('Delaying hide event to ensure user intent');\n            clearTimeout(module.timer);\n            module.timer = setTimeout(module.hide, settings.delay.hide);\n          }\n        },\n\n        escape: {\n          value: function(value) {\n            var\n              multipleValues = $.isArray(value),\n              stringValue    = (typeof value === 'string'),\n              isUnparsable   = (!stringValue && !multipleValues),\n              hasQuotes      = (stringValue && value.search(regExp.quote) !== -1),\n              values         = []\n            ;\n            if(!module.has.selectInput() || isUnparsable || !hasQuotes) {\n              return value;\n            }\n            module.debug('Encoding quote values for use in select', value);\n            if(multipleValues) {\n              $.each(value, function(index, value){\n                values.push(value.replace(regExp.quote, '&quot;'));\n              });\n              return values;\n            }\n            return value.replace(regExp.quote, '&quot;');\n          },\n          regExp: function(text) {\n            text =  String(text);\n            return text.replace(regExp.escape, '\\\\$&');\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : $allModules\n  ;\n};\n\n$.fn.dropdown.settings = {\n\n  silent                 : false,\n  debug                  : false,\n  verbose                : false,\n  performance            : true,\n\n  on                     : 'click',    // what event should show menu action on item selection\n  action                 : 'activate', // action on item selection (nothing, activate, select, combo, hide, function(){})\n\n\n  apiSettings            : false,\n  selectOnKeydown        : true,       // Whether selection should occur automatically when keyboard shortcuts used\n  minCharacters          : 0,          // Minimum characters required to trigger API call\n  saveRemoteData         : true,       // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh\n  throttle               : 200,        // How long to wait after last user input to search remotely\n\n  context                : window,     // Context to use when determining if on screen\n  direction              : 'auto',     // Whether dropdown should always open in one direction\n  keepOnScreen           : true,       // Whether dropdown should check whether it is on screen before showing\n\n  match                  : 'both',     // what to match against with search selection (both, text, or label)\n  fullTextSearch         : false,      // search anywhere in value (set to 'exact' to require exact matches)\n\n  placeholder            : 'auto',     // whether to convert blank <select> values to placeholder text\n  preserveHTML           : true,       // preserve html when selecting value\n  sortSelect             : false,      // sort selection on init\n\n  forceSelection         : true,       // force a choice on blur with search selection\n\n  allowAdditions         : false,      // whether multiple select should allow user added values\n  hideAdditions          : true,      // whether or not to hide special message prompting a user they can enter a value\n\n  maxSelections          : false,      // When set to a number limits the number of selections to this count\n  useLabels              : true,       // whether multiple select should filter currently active selections from choices\n  delimiter              : ',',        // when multiselect uses normal <input> the values will be delimited with this character\n\n  showOnFocus            : true,       // show menu on focus\n  allowReselection       : false,      // whether current value should trigger callbacks when reselected\n  allowTab               : true,       // add tabindex to element\n  allowCategorySelection : false,      // allow elements with sub-menus to be selected\n\n  fireOnInit             : false,      // Whether callbacks should fire when initializing dropdown values\n\n  transition             : 'auto',     // auto transition will slide down or up based on direction\n  duration               : 200,        // duration of transition\n\n  glyphWidth             : 1.037,      // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width\n\n  // label settings on multi-select\n  label: {\n    transition : 'scale',\n    duration   : 200,\n    variation  : false\n  },\n\n  // delay before event\n  delay : {\n    hide   : 300,\n    show   : 200,\n    search : 20,\n    touch  : 50\n  },\n\n  /* Callbacks */\n  onChange      : function(value, text, $selected){},\n  onAdd         : function(value, text, $selected){},\n  onRemove      : function(value, text, $selected){},\n\n  onLabelSelect : function($selectedLabels){},\n  onLabelCreate : function(value, text) { return $(this); },\n  onLabelRemove : function(value) { return true; },\n  onNoResults   : function(searchTerm) { return true; },\n  onShow        : function(){},\n  onHide        : function(){},\n\n  /* Component */\n  name           : 'Dropdown',\n  namespace      : 'dropdown',\n\n  message: {\n    addResult     : 'Add <b>{term}</b>',\n    count         : '{count} selected',\n    maxSelections : 'Max {maxCount} selections',\n    noResults     : 'No results found.',\n    serverError   : 'There was an error contacting the server'\n  },\n\n  error : {\n    action          : 'You called a dropdown action that was not defined',\n    alreadySetup    : 'Once a select has been initialized behaviors must be called on the created ui dropdown',\n    labels          : 'Allowing user additions currently requires the use of labels.',\n    missingMultiple : '<select> requires multiple property to be set to correctly preserve multiple values',\n    method          : 'The method you called is not defined.',\n    noAPI           : 'The API module is required to load resources remotely',\n    noStorage       : 'Saving remote data requires session storage',\n    noTransition    : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>'\n  },\n\n  regExp : {\n    escape   : /[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\n    quote    : /\"/g\n  },\n\n  metadata : {\n    defaultText     : 'defaultText',\n    defaultValue    : 'defaultValue',\n    placeholderText : 'placeholder',\n    text            : 'text',\n    value           : 'value'\n  },\n\n  // property names for remote query\n  fields: {\n    remoteValues : 'results',  // grouping for api results\n    values       : 'values',   // grouping for all dropdown values\n    disabled     : 'disabled', // whether value should be disabled\n    name         : 'name',     // displayed dropdown text\n    value        : 'value',    // actual dropdown value\n    text         : 'text'      // displayed text when selected\n  },\n\n  keys : {\n    backspace  : 8,\n    delimiter  : 188, // comma\n    deleteKey  : 46,\n    enter      : 13,\n    escape     : 27,\n    pageUp     : 33,\n    pageDown   : 34,\n    leftArrow  : 37,\n    upArrow    : 38,\n    rightArrow : 39,\n    downArrow  : 40\n  },\n\n  selector : {\n    addition     : '.addition',\n    dropdown     : '.ui.dropdown',\n    hidden       : '.hidden',\n    icon         : '> .dropdown.icon',\n    input        : '> input[type=\"hidden\"], > select',\n    item         : '.item',\n    label        : '> .label',\n    remove       : '> .label > .delete.icon',\n    siblingLabel : '.label',\n    menu         : '.menu',\n    message      : '.message',\n    menuIcon     : '.dropdown.icon',\n    search       : 'input.search, .menu > .search > input, .menu input.search',\n    sizer        : '> input.sizer',\n    text         : '> .text:not(.icon)',\n    unselectable : '.disabled, .filtered'\n  },\n\n  className : {\n    active      : 'active',\n    addition    : 'addition',\n    animating   : 'animating',\n    disabled    : 'disabled',\n    empty       : 'empty',\n    dropdown    : 'ui dropdown',\n    filtered    : 'filtered',\n    hidden      : 'hidden transition',\n    item        : 'item',\n    label       : 'ui label',\n    loading     : 'loading',\n    menu        : 'menu',\n    message     : 'message',\n    multiple    : 'multiple',\n    placeholder : 'default',\n    sizer       : 'sizer',\n    search      : 'search',\n    selected    : 'selected',\n    selection   : 'selection',\n    upward      : 'upward',\n    visible     : 'visible'\n  }\n\n};\n\n/* Templates */\n$.fn.dropdown.settings.templates = {\n\n  // generates dropdown from select values\n  dropdown: function(select) {\n    var\n      placeholder = select.placeholder || false,\n      values      = select.values || {},\n      html        = ''\n    ;\n    html +=  '<i class=\"dropdown icon\"></i>';\n    if(select.placeholder) {\n      html += '<div class=\"default text\">' + placeholder + '</div>';\n    }\n    else {\n      html += '<div class=\"text\"></div>';\n    }\n    html += '<div class=\"menu\">';\n    $.each(select.values, function(index, option) {\n      html += (option.disabled)\n        ? '<div class=\"disabled item\" data-value=\"' + option.value + '\">' + option.name + '</div>'\n        : '<div class=\"item\" data-value=\"' + option.value + '\">' + option.name + '</div>'\n      ;\n    });\n    html += '</div>';\n    return html;\n  },\n\n  // generates just menu from select\n  menu: function(response, fields) {\n    var\n      values = response[fields.values] || {},\n      html   = ''\n    ;\n    $.each(values, function(index, option) {\n      var\n        maybeText = (option[fields.text])\n          ? 'data-text=\"' + option[fields.text] + '\"'\n          : '',\n        maybeDisabled = (option[fields.disabled])\n          ? 'disabled '\n          : ''\n      ;\n      html += '<div class=\"'+ maybeDisabled +'item\" data-value=\"' + option[fields.value] + '\"' + maybeText + '>'\n      html +=   option[fields.name];\n      html += '</div>';\n    });\n    return html;\n  },\n\n  // generates label for multiselect\n  label: function(value, text) {\n    return text + '<i class=\"delete icon\"></i>';\n  },\n\n\n  // generates messages like \"No results\"\n  message: function(message) {\n    return message;\n  },\n\n  // generates user addition to selection menu\n  addition: function(choice) {\n    return choice;\n  }\n\n};\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Embed\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.embed = function(parameters) {\n\n  var\n    $allModules     = $(this),\n\n    moduleSelector  = $allModules.selector || '',\n\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings        = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.embed.settings, parameters)\n          : $.extend({}, $.fn.embed.settings),\n\n        selector        = settings.selector,\n        className       = settings.className,\n        sources         = settings.sources,\n        error           = settings.error,\n        metadata        = settings.metadata,\n        namespace       = settings.namespace,\n        templates       = settings.templates,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        $window         = $(window),\n        $module         = $(this),\n        $placeholder    = $module.find(selector.placeholder),\n        $icon           = $module.find(selector.icon),\n        $embed          = $module.find(selector.embed),\n\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.debug('Initializing embed');\n          module.determine.autoplay();\n          module.create();\n          module.bind.events();\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous instance of embed');\n          module.reset();\n          $module\n            .removeData(moduleNamespace)\n            .off(eventNamespace)\n          ;\n        },\n\n        refresh: function() {\n          module.verbose('Refreshing selector cache');\n          $placeholder = $module.find(selector.placeholder);\n          $icon        = $module.find(selector.icon);\n          $embed       = $module.find(selector.embed);\n        },\n\n        bind: {\n          events: function() {\n            if( module.has.placeholder() ) {\n              module.debug('Adding placeholder events');\n              $module\n                .on('click' + eventNamespace, selector.placeholder, module.createAndShow)\n                .on('click' + eventNamespace, selector.icon, module.createAndShow)\n              ;\n            }\n          }\n        },\n\n        create: function() {\n          var\n            placeholder = module.get.placeholder()\n          ;\n          if(placeholder) {\n            module.createPlaceholder();\n          }\n          else {\n            module.createAndShow();\n          }\n        },\n\n        createPlaceholder: function(placeholder) {\n          var\n            icon  = module.get.icon(),\n            url   = module.get.url(),\n            embed = module.generate.embed(url)\n          ;\n          placeholder = placeholder || module.get.placeholder();\n          $module.html( templates.placeholder(placeholder, icon) );\n          module.debug('Creating placeholder for embed', placeholder, icon);\n        },\n\n        createEmbed: function(url) {\n          module.refresh();\n          url = url || module.get.url();\n          $embed = $('<div/>')\n            .addClass(className.embed)\n            .html( module.generate.embed(url) )\n            .appendTo($module)\n          ;\n          settings.onCreate.call(element, url);\n          module.debug('Creating embed object', $embed);\n        },\n\n        changeEmbed: function(url) {\n          $embed\n            .html( module.generate.embed(url) )\n          ;\n        },\n\n        createAndShow: function() {\n          module.createEmbed();\n          module.show();\n        },\n\n        // sets new embed\n        change: function(source, id, url) {\n          module.debug('Changing video to ', source, id, url);\n          $module\n            .data(metadata.source, source)\n            .data(metadata.id, id)\n          ;\n          if(url) {\n            $module.data(metadata.url, url);\n          }\n          else {\n            $module.removeData(metadata.url);\n          }\n          if(module.has.embed()) {\n            module.changeEmbed();\n          }\n          else {\n            module.create();\n          }\n        },\n\n        // clears embed\n        reset: function() {\n          module.debug('Clearing embed and showing placeholder');\n          module.remove.active();\n          module.remove.embed();\n          module.showPlaceholder();\n          settings.onReset.call(element);\n        },\n\n        // shows current embed\n        show: function() {\n          module.debug('Showing embed');\n          module.set.active();\n          settings.onDisplay.call(element);\n        },\n\n        hide: function() {\n          module.debug('Hiding embed');\n          module.showPlaceholder();\n        },\n\n        showPlaceholder: function() {\n          module.debug('Showing placeholder image');\n          module.remove.active();\n          settings.onPlaceholderDisplay.call(element);\n        },\n\n        get: {\n          id: function() {\n            return settings.id || $module.data(metadata.id);\n          },\n          placeholder: function() {\n            return settings.placeholder || $module.data(metadata.placeholder);\n          },\n          icon: function() {\n            return (settings.icon)\n              ? settings.icon\n              : ($module.data(metadata.icon) !== undefined)\n                ? $module.data(metadata.icon)\n                : module.determine.icon()\n            ;\n          },\n          source: function(url) {\n            return (settings.source)\n              ? settings.source\n              : ($module.data(metadata.source) !== undefined)\n                ? $module.data(metadata.source)\n                : module.determine.source()\n            ;\n          },\n          type: function() {\n            var source = module.get.source();\n            return (sources[source] !== undefined)\n              ? sources[source].type\n              : false\n            ;\n          },\n          url: function() {\n            return (settings.url)\n              ? settings.url\n              : ($module.data(metadata.url) !== undefined)\n                ? $module.data(metadata.url)\n                : module.determine.url()\n            ;\n          }\n        },\n\n        determine: {\n          autoplay: function() {\n            if(module.should.autoplay()) {\n              settings.autoplay = true;\n            }\n          },\n          source: function(url) {\n            var\n              matchedSource = false\n            ;\n            url = url || module.get.url();\n            if(url) {\n              $.each(sources, function(name, source) {\n                if(url.search(source.domain) !== -1) {\n                  matchedSource = name;\n                  return false;\n                }\n              });\n            }\n            return matchedSource;\n          },\n          icon: function() {\n            var\n              source = module.get.source()\n            ;\n            return (sources[source] !== undefined)\n              ? sources[source].icon\n              : false\n            ;\n          },\n          url: function() {\n            var\n              id     = settings.id     || $module.data(metadata.id),\n              source = settings.source || $module.data(metadata.source),\n              url\n            ;\n            url = (sources[source] !== undefined)\n              ? sources[source].url.replace('{id}', id)\n              : false\n            ;\n            if(url) {\n              $module.data(metadata.url, url);\n            }\n            return url;\n          }\n        },\n\n\n        set: {\n          active: function() {\n            $module.addClass(className.active);\n          }\n        },\n\n        remove: {\n          active: function() {\n            $module.removeClass(className.active);\n          },\n          embed: function() {\n            $embed.empty();\n          }\n        },\n\n        encode: {\n          parameters: function(parameters) {\n            var\n              urlString = [],\n              index\n            ;\n            for (index in parameters) {\n              urlString.push( encodeURIComponent(index) + '=' + encodeURIComponent( parameters[index] ) );\n            }\n            return urlString.join('&amp;');\n          }\n        },\n\n        generate: {\n          embed: function(url) {\n            module.debug('Generating embed html');\n            var\n              source = module.get.source(),\n              html,\n              parameters\n            ;\n            url = module.get.url(url);\n            if(url) {\n              parameters = module.generate.parameters(source);\n              html       = templates.iframe(url, parameters);\n            }\n            else {\n              module.error(error.noURL, $module);\n            }\n            return html;\n          },\n          parameters: function(source, extraParameters) {\n            var\n              parameters = (sources[source] && sources[source].parameters !== undefined)\n                ? sources[source].parameters(settings)\n                : {}\n            ;\n            extraParameters = extraParameters || settings.parameters;\n            if(extraParameters) {\n              parameters = $.extend({}, parameters, extraParameters);\n            }\n            parameters = settings.onEmbed(parameters);\n            return module.encode.parameters(parameters);\n          }\n        },\n\n        has: {\n          embed: function() {\n            return ($embed.length > 0);\n          },\n          placeholder: function() {\n            return settings.placeholder || $module.data(metadata.placeholder);\n          }\n        },\n\n        should: {\n          autoplay: function() {\n            return (settings.autoplay === 'auto')\n              ? (settings.placeholder || $module.data(metadata.placeholder) !== undefined)\n              : settings.autoplay\n            ;\n          }\n        },\n\n        is: {\n          video: function() {\n            return module.get.type() == 'video';\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if($allModules.length > 1) {\n              title += ' ' + '(' + $allModules.length + ')';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.embed.settings = {\n\n  name        : 'Embed',\n  namespace   : 'embed',\n\n  silent      : false,\n  debug       : false,\n  verbose     : false,\n  performance : true,\n\n  icon     : false,\n  source   : false,\n  url      : false,\n  id       : false,\n\n  // standard video settings\n  autoplay  : 'auto',\n  color     : '#444444',\n  hd        : true,\n  brandedUI : false,\n\n  // additional parameters to include with the embed\n  parameters: false,\n\n  onDisplay            : function() {},\n  onPlaceholderDisplay : function() {},\n  onReset              : function() {},\n  onCreate             : function(url) {},\n  onEmbed              : function(parameters) {\n    return parameters;\n  },\n\n  metadata    : {\n    id          : 'id',\n    icon        : 'icon',\n    placeholder : 'placeholder',\n    source      : 'source',\n    url         : 'url'\n  },\n\n  error : {\n    noURL  : 'No URL specified',\n    method : 'The method you called is not defined'\n  },\n\n  className : {\n    active : 'active',\n    embed  : 'embed'\n  },\n\n  selector : {\n    embed       : '.embed',\n    placeholder : '.placeholder',\n    icon        : '.icon'\n  },\n\n  sources: {\n    youtube: {\n      name   : 'youtube',\n      type   : 'video',\n      icon   : 'video play',\n      domain : 'youtube.com',\n      url    : '//www.youtube.com/embed/{id}',\n      parameters: function(settings) {\n        return {\n          autohide       : !settings.brandedUI,\n          autoplay       : settings.autoplay,\n          color          : settings.color || undefined,\n          hq             : settings.hd,\n          jsapi          : settings.api,\n          modestbranding : !settings.brandedUI\n        };\n      }\n    },\n    vimeo: {\n      name   : 'vimeo',\n      type   : 'video',\n      icon   : 'video play',\n      domain : 'vimeo.com',\n      url    : '//player.vimeo.com/video/{id}',\n      parameters: function(settings) {\n        return {\n          api      : settings.api,\n          autoplay : settings.autoplay,\n          byline   : settings.brandedUI,\n          color    : settings.color || undefined,\n          portrait : settings.brandedUI,\n          title    : settings.brandedUI\n        };\n      }\n    }\n  },\n\n  templates: {\n    iframe : function(url, parameters) {\n      var src = url;\n      if (parameters) {\n          src += '?' + parameters;\n      }\n      return ''\n        + '<iframe src=\"' + src + '\"'\n        + ' width=\"100%\" height=\"100%\"'\n        + ' frameborder=\"0\" scrolling=\"no\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'\n      ;\n    },\n    placeholder : function(image, icon) {\n      var\n        html = ''\n      ;\n      if(icon) {\n        html += '<i class=\"' + icon + ' icon\"></i>';\n      }\n      if(image) {\n        html += '<img class=\"placeholder\" src=\"' + image + '\">';\n      }\n      return html;\n    }\n  },\n\n  // NOT YET IMPLEMENTED\n  api     : false,\n  onPause : function() {},\n  onPlay  : function() {},\n  onStop  : function() {}\n\n};\n\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Modal\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.modal = function(parameters) {\n  var\n    $allModules    = $(this),\n    $window        = $(window),\n    $document      = $(document),\n    $body          = $('body'),\n\n    moduleSelector = $allModules.selector || '',\n\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n\n    requestAnimationFrame = window.requestAnimationFrame\n      || window.mozRequestAnimationFrame\n      || window.webkitRequestAnimationFrame\n      || window.msRequestAnimationFrame\n      || function(callback) { setTimeout(callback, 0); },\n\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings    = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.modal.settings, parameters)\n          : $.extend({}, $.fn.modal.settings),\n\n        selector        = settings.selector,\n        className       = settings.className,\n        namespace       = settings.namespace,\n        error           = settings.error,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        $module         = $(this),\n        $context        = $(settings.context),\n        $close          = $module.find(selector.close),\n\n        $allModals,\n        $otherModals,\n        $focusedElement,\n        $dimmable,\n        $dimmer,\n\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n\n        elementEventNamespace,\n        id,\n        observer,\n        module\n      ;\n      module  = {\n\n        initialize: function() {\n          module.verbose('Initializing dimmer', $context);\n\n          module.create.id();\n          module.create.dimmer();\n          module.refreshModals();\n\n          module.bind.events();\n          if(settings.observeChanges) {\n            module.observeChanges();\n          }\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of modal');\n          instance = module;\n          $module\n            .data(moduleNamespace, instance)\n          ;\n        },\n\n        create: {\n          dimmer: function() {\n            var\n              defaultSettings = {\n                debug      : settings.debug,\n                dimmerName : 'modals',\n                duration   : {\n                  show     : settings.duration,\n                  hide     : settings.duration\n                }\n              },\n              dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)\n            ;\n            if(settings.inverted) {\n              dimmerSettings.variation = (dimmerSettings.variation !== undefined)\n                ? dimmerSettings.variation + ' inverted'\n                : 'inverted'\n              ;\n            }\n            if($.fn.dimmer === undefined) {\n              module.error(error.dimmer);\n              return;\n            }\n            module.debug('Creating dimmer with settings', dimmerSettings);\n            $dimmable = $context.dimmer(dimmerSettings);\n            if(settings.detachable) {\n              module.verbose('Modal is detachable, moving content into dimmer');\n              $dimmable.dimmer('add content', $module);\n            }\n            else {\n              module.set.undetached();\n            }\n            if(settings.blurring) {\n              $dimmable.addClass(className.blurring);\n            }\n            $dimmer = $dimmable.dimmer('get dimmer');\n          },\n          id: function() {\n            id = (Math.random().toString(16) + '000000000').substr(2,8);\n            elementEventNamespace = '.' + id;\n            module.verbose('Creating unique id for element', id);\n          }\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous modal');\n          $module\n            .removeData(moduleNamespace)\n            .off(eventNamespace)\n          ;\n          $window.off(elementEventNamespace);\n          $dimmer.off(elementEventNamespace);\n          $close.off(eventNamespace);\n          $context.dimmer('destroy');\n        },\n\n        observeChanges: function() {\n          if('MutationObserver' in window) {\n            observer = new MutationObserver(function(mutations) {\n              module.debug('DOM tree modified, refreshing');\n              module.refresh();\n            });\n            observer.observe(element, {\n              childList : true,\n              subtree   : true\n            });\n            module.debug('Setting up mutation observer', observer);\n          }\n        },\n\n        refresh: function() {\n          module.remove.scrolling();\n          module.cacheSizes();\n          module.set.screenHeight();\n          module.set.type();\n          module.set.position();\n        },\n\n        refreshModals: function() {\n          $otherModals = $module.siblings(selector.modal);\n          $allModals   = $otherModals.add($module);\n        },\n\n        attachEvents: function(selector, event) {\n          var\n            $toggle = $(selector)\n          ;\n          event = $.isFunction(module[event])\n            ? module[event]\n            : module.toggle\n          ;\n          if($toggle.length > 0) {\n            module.debug('Attaching modal events to element', selector, event);\n            $toggle\n              .off(eventNamespace)\n              .on('click' + eventNamespace, event)\n            ;\n          }\n          else {\n            module.error(error.notFound, selector);\n          }\n        },\n\n        bind: {\n          events: function() {\n            module.verbose('Attaching events');\n            $module\n              .on('click' + eventNamespace, selector.close, module.event.close)\n              .on('click' + eventNamespace, selector.approve, module.event.approve)\n              .on('click' + eventNamespace, selector.deny, module.event.deny)\n            ;\n            $window\n              .on('resize' + elementEventNamespace, module.event.resize)\n            ;\n          }\n        },\n\n        get: {\n          id: function() {\n            return (Math.random().toString(16) + '000000000').substr(2,8);\n          }\n        },\n\n        event: {\n          approve: function() {\n            if(settings.onApprove.call(element, $(this)) === false) {\n              module.verbose('Approve callback returned false cancelling hide');\n              return;\n            }\n            module.hide();\n          },\n          deny: function() {\n            if(settings.onDeny.call(element, $(this)) === false) {\n              module.verbose('Deny callback returned false cancelling hide');\n              return;\n            }\n            module.hide();\n          },\n          close: function() {\n            module.hide();\n          },\n          click: function(event) {\n            var\n              $target   = $(event.target),\n              isInModal = ($target.closest(selector.modal).length > 0),\n              isInDOM   = $.contains(document.documentElement, event.target)\n            ;\n            if(!isInModal && isInDOM) {\n              module.debug('Dimmer clicked, hiding all modals');\n              if( module.is.active() ) {\n                module.remove.clickaway();\n                if(settings.allowMultiple) {\n                  module.hide();\n                }\n                else {\n                  module.hideAll();\n                }\n              }\n            }\n          },\n          debounce: function(method, delay) {\n            clearTimeout(module.timer);\n            module.timer = setTimeout(method, delay);\n          },\n          keyboard: function(event) {\n            var\n              keyCode   = event.which,\n              escapeKey = 27\n            ;\n            if(keyCode == escapeKey) {\n              if(settings.closable) {\n                module.debug('Escape key pressed hiding modal');\n                module.hide();\n              }\n              else {\n                module.debug('Escape key pressed, but closable is set to false');\n              }\n              event.preventDefault();\n            }\n          },\n          resize: function() {\n            if( $dimmable.dimmer('is active') ) {\n              requestAnimationFrame(module.refresh);\n            }\n          }\n        },\n\n        toggle: function() {\n          if( module.is.active() || module.is.animating() ) {\n            module.hide();\n          }\n          else {\n            module.show();\n          }\n        },\n\n        show: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          module.refreshModals();\n          module.showModal(callback);\n        },\n\n        hide: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          module.refreshModals();\n          module.hideModal(callback);\n        },\n\n        showModal: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if( module.is.animating() || !module.is.active() ) {\n\n            module.showDimmer();\n            module.cacheSizes();\n            module.set.position();\n            module.set.screenHeight();\n            module.set.type();\n            module.set.clickaway();\n\n            if( !settings.allowMultiple && module.others.active() ) {\n              module.hideOthers(module.showModal);\n            }\n            else {\n              settings.onShow.call(element);\n              if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {\n                module.debug('Showing modal with css animations');\n                $module\n                  .transition({\n                    debug       : settings.debug,\n                    animation   : settings.transition + ' in',\n                    queue       : settings.queue,\n                    duration    : settings.duration,\n                    useFailSafe : true,\n                    onComplete : function() {\n                      settings.onVisible.apply(element);\n                      if(settings.keyboardShortcuts) {\n                        module.add.keyboardShortcuts();\n                      }\n                      module.save.focus();\n                      module.set.active();\n                      if(settings.autofocus) {\n                        module.set.autofocus();\n                      }\n                      callback();\n                    }\n                  })\n                ;\n              }\n              else {\n                module.error(error.noTransition);\n              }\n            }\n          }\n          else {\n            module.debug('Modal is already visible');\n          }\n        },\n\n        hideModal: function(callback, keepDimmed) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          module.debug('Hiding modal');\n          if(settings.onHide.call(element, $(this)) === false) {\n            module.verbose('Hide callback returned false cancelling hide');\n            return;\n          }\n\n          if( module.is.animating() || module.is.active() ) {\n            if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {\n              module.remove.active();\n              $module\n                .transition({\n                  debug       : settings.debug,\n                  animation   : settings.transition + ' out',\n                  queue       : settings.queue,\n                  duration    : settings.duration,\n                  useFailSafe : true,\n                  onStart     : function() {\n                    if(!module.others.active() && !keepDimmed) {\n                      module.hideDimmer();\n                    }\n                    if(settings.keyboardShortcuts) {\n                      module.remove.keyboardShortcuts();\n                    }\n                  },\n                  onComplete : function() {\n                    settings.onHidden.call(element);\n                    module.restore.focus();\n                    callback();\n                  }\n                })\n              ;\n            }\n            else {\n              module.error(error.noTransition);\n            }\n          }\n        },\n\n        showDimmer: function() {\n          if($dimmable.dimmer('is animating') || !$dimmable.dimmer('is active') ) {\n            module.debug('Showing dimmer');\n            $dimmable.dimmer('show');\n          }\n          else {\n            module.debug('Dimmer already visible');\n          }\n        },\n\n        hideDimmer: function() {\n          if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {\n            $dimmable.dimmer('hide', function() {\n              module.remove.clickaway();\n              module.remove.screenHeight();\n            });\n          }\n          else {\n            module.debug('Dimmer is not visible cannot hide');\n            return;\n          }\n        },\n\n        hideAll: function(callback) {\n          var\n            $visibleModals = $allModals.filter('.' + className.active + ', .' + className.animating)\n          ;\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if( $visibleModals.length > 0 ) {\n            module.debug('Hiding all visible modals');\n            module.hideDimmer();\n            $visibleModals\n              .modal('hide modal', callback)\n            ;\n          }\n        },\n\n        hideOthers: function(callback) {\n          var\n            $visibleModals = $otherModals.filter('.' + className.active + ', .' + className.animating)\n          ;\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if( $visibleModals.length > 0 ) {\n            module.debug('Hiding other modals', $otherModals);\n            $visibleModals\n              .modal('hide modal', callback, true)\n            ;\n          }\n        },\n\n        others: {\n          active: function() {\n            return ($otherModals.filter('.' + className.active).length > 0);\n          },\n          animating: function() {\n            return ($otherModals.filter('.' + className.animating).length > 0);\n          }\n        },\n\n\n        add: {\n          keyboardShortcuts: function() {\n            module.verbose('Adding keyboard shortcuts');\n            $document\n              .on('keyup' + eventNamespace, module.event.keyboard)\n            ;\n          }\n        },\n\n        save: {\n          focus: function() {\n            $focusedElement = $(document.activeElement).blur();\n          }\n        },\n\n        restore: {\n          focus: function() {\n            if($focusedElement && $focusedElement.length > 0) {\n              $focusedElement.focus();\n            }\n          }\n        },\n\n        remove: {\n          active: function() {\n            $module.removeClass(className.active);\n          },\n          clickaway: function() {\n            if(settings.closable) {\n              $dimmer\n                .off('click' + elementEventNamespace)\n              ;\n            }\n          },\n          bodyStyle: function() {\n            if($body.attr('style') === '') {\n              module.verbose('Removing style attribute');\n              $body.removeAttr('style');\n            }\n          },\n          screenHeight: function() {\n            module.debug('Removing page height');\n            $body\n              .css('height', '')\n            ;\n          },\n          keyboardShortcuts: function() {\n            module.verbose('Removing keyboard shortcuts');\n            $document\n              .off('keyup' + eventNamespace)\n            ;\n          },\n          scrolling: function() {\n            $dimmable.removeClass(className.scrolling);\n            $module.removeClass(className.scrolling);\n          }\n        },\n\n        cacheSizes: function() {\n          var\n            modalHeight = $module.outerHeight()\n          ;\n          if(module.cache === undefined || modalHeight !== 0) {\n            module.cache = {\n              pageHeight    : $(document).outerHeight(),\n              height        : modalHeight + settings.offset,\n              contextHeight : (settings.context == 'body')\n                ? $(window).height()\n                : $dimmable.height()\n            };\n          }\n          module.debug('Caching modal and container sizes', module.cache);\n        },\n\n        can: {\n          fit: function() {\n            return ( ( module.cache.height + (settings.padding * 2) ) < module.cache.contextHeight);\n          }\n        },\n\n        is: {\n          active: function() {\n            return $module.hasClass(className.active);\n          },\n          animating: function() {\n            return $module.transition('is supported')\n              ? $module.transition('is animating')\n              : $module.is(':visible')\n            ;\n          },\n          scrolling: function() {\n            return $dimmable.hasClass(className.scrolling);\n          },\n          modernBrowser: function() {\n            // appName for IE11 reports 'Netscape' can no longer use\n            return !(window.ActiveXObject || \"ActiveXObject\" in window);\n          }\n        },\n\n        set: {\n          autofocus: function() {\n            var\n              $inputs    = $module.find('[tabindex], :input').filter(':visible'),\n              $autofocus = $inputs.filter('[autofocus]'),\n              $input     = ($autofocus.length > 0)\n                ? $autofocus.first()\n                : $inputs.first()\n            ;\n            if($input.length > 0) {\n              $input.focus();\n            }\n          },\n          clickaway: function() {\n            if(settings.closable) {\n              $dimmer\n                .on('click' + elementEventNamespace, module.event.click)\n              ;\n            }\n          },\n          screenHeight: function() {\n            if( module.can.fit() ) {\n              $body.css('height', '');\n            }\n            else {\n              module.debug('Modal is taller than page content, resizing page height');\n              $body\n                .css('height', module.cache.height + (settings.padding * 2) )\n              ;\n            }\n          },\n          active: function() {\n            $module.addClass(className.active);\n          },\n          scrolling: function() {\n            $dimmable.addClass(className.scrolling);\n            $module.addClass(className.scrolling);\n          },\n          type: function() {\n            if(module.can.fit()) {\n              module.verbose('Modal fits on screen');\n              if(!module.others.active() && !module.others.animating()) {\n                module.remove.scrolling();\n              }\n            }\n            else {\n              module.verbose('Modal cannot fit on screen setting to scrolling');\n              module.set.scrolling();\n            }\n          },\n          position: function() {\n            module.verbose('Centering modal on page', module.cache);\n            if(module.can.fit()) {\n              $module\n                .css({\n                  top: '',\n                  marginTop: -(module.cache.height / 2)\n                })\n              ;\n            }\n            else {\n              $module\n                .css({\n                  marginTop : '',\n                  top       : $document.scrollTop()\n                })\n              ;\n            }\n          },\n          undetached: function() {\n            $dimmable.addClass(className.undetached);\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.modal.settings = {\n\n  name           : 'Modal',\n  namespace      : 'modal',\n\n  silent         : false,\n  debug          : false,\n  verbose        : false,\n  performance    : true,\n\n  observeChanges : false,\n\n  allowMultiple  : false,\n  detachable     : true,\n  closable       : true,\n  autofocus      : true,\n\n  inverted       : false,\n  blurring       : false,\n\n  dimmerSettings : {\n    closable : false,\n    useCSS   : true\n  },\n\n  // whether to use keyboard shortcuts\n  keyboardShortcuts: true,\n\n  context    : 'body',\n\n  queue      : false,\n  duration   : 500,\n  offset     : 0,\n  transition : 'scale',\n\n  // padding with edge of page\n  padding    : 50,\n\n  // called before show animation\n  onShow     : function(){},\n\n  // called after show animation\n  onVisible  : function(){},\n\n  // called before hide animation\n  onHide     : function(){ return true; },\n\n  // called after hide animation\n  onHidden   : function(){},\n\n  // called after approve selector match\n  onApprove  : function(){ return true; },\n\n  // called after deny selector match\n  onDeny     : function(){ return true; },\n\n  selector    : {\n    close    : '> .close',\n    approve  : '.actions .positive, .actions .approve, .actions .ok',\n    deny     : '.actions .negative, .actions .deny, .actions .cancel',\n    modal    : '.ui.modal'\n  },\n  error : {\n    dimmer    : 'UI Dimmer, a required component is not included in this page',\n    method    : 'The method you called is not defined.',\n    notFound  : 'The element you specified could not be found'\n  },\n  className : {\n    active     : 'active',\n    animating  : 'animating',\n    blurring   : 'blurring',\n    scrolling  : 'scrolling',\n    undetached : 'undetached'\n  }\n};\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Nag\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.nag = function(parameters) {\n  var\n    $allModules    = $(this),\n    moduleSelector = $allModules.selector || '',\n\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n    returnedValue\n  ;\n  $allModules\n    .each(function() {\n      var\n        settings          = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.nag.settings, parameters)\n          : $.extend({}, $.fn.nag.settings),\n\n        className       = settings.className,\n        selector        = settings.selector,\n        error           = settings.error,\n        namespace       = settings.namespace,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = namespace + '-module',\n\n        $module         = $(this),\n\n        $close          = $module.find(selector.close),\n        $context        = (settings.context)\n          ? $(settings.context)\n          : $('body'),\n\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n\n        moduleOffset,\n        moduleHeight,\n\n        contextWidth,\n        contextHeight,\n        contextOffset,\n\n        yOffset,\n        yPosition,\n\n        timer,\n        module,\n\n        requestAnimationFrame = window.requestAnimationFrame\n          || window.mozRequestAnimationFrame\n          || window.webkitRequestAnimationFrame\n          || window.msRequestAnimationFrame\n          || function(callback) { setTimeout(callback, 0); }\n      ;\n      module = {\n\n        initialize: function() {\n          module.verbose('Initializing element');\n\n          $module\n            .on('click' + eventNamespace, selector.close, module.dismiss)\n            .data(moduleNamespace, module)\n          ;\n\n          if(settings.detachable && $module.parent()[0] !== $context[0]) {\n            $module\n              .detach()\n              .prependTo($context)\n            ;\n          }\n\n          if(settings.displayTime > 0) {\n            setTimeout(module.hide, settings.displayTime);\n          }\n          module.show();\n        },\n\n        destroy: function() {\n          module.verbose('Destroying instance');\n          $module\n            .removeData(moduleNamespace)\n            .off(eventNamespace)\n          ;\n        },\n\n        show: function() {\n          if( module.should.show() && !$module.is(':visible') ) {\n            module.debug('Showing nag', settings.animation.show);\n            if(settings.animation.show == 'fade') {\n              $module\n                .fadeIn(settings.duration, settings.easing)\n              ;\n            }\n            else {\n              $module\n                .slideDown(settings.duration, settings.easing)\n              ;\n            }\n          }\n        },\n\n        hide: function() {\n          module.debug('Showing nag', settings.animation.hide);\n          if(settings.animation.show == 'fade') {\n            $module\n              .fadeIn(settings.duration, settings.easing)\n            ;\n          }\n          else {\n            $module\n              .slideUp(settings.duration, settings.easing)\n            ;\n          }\n        },\n\n        onHide: function() {\n          module.debug('Removing nag', settings.animation.hide);\n          $module.remove();\n          if (settings.onHide) {\n            settings.onHide();\n          }\n        },\n\n        dismiss: function(event) {\n          if(settings.storageMethod) {\n            module.storage.set(settings.key, settings.value);\n          }\n          module.hide();\n          event.stopImmediatePropagation();\n          event.preventDefault();\n        },\n\n        should: {\n          show: function() {\n            if(settings.persist) {\n              module.debug('Persistent nag is set, can show nag');\n              return true;\n            }\n            if( module.storage.get(settings.key) != settings.value.toString() ) {\n              module.debug('Stored value is not set, can show nag', module.storage.get(settings.key));\n              return true;\n            }\n            module.debug('Stored value is set, cannot show nag', module.storage.get(settings.key));\n            return false;\n          }\n        },\n\n        get: {\n          storageOptions: function() {\n            var\n              options = {}\n            ;\n            if(settings.expires) {\n              options.expires = settings.expires;\n            }\n            if(settings.domain) {\n              options.domain = settings.domain;\n            }\n            if(settings.path) {\n              options.path = settings.path;\n            }\n            return options;\n          }\n        },\n\n        clear: function() {\n          module.storage.remove(settings.key);\n        },\n\n        storage: {\n          set: function(key, value) {\n            var\n              options = module.get.storageOptions()\n            ;\n            if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {\n              window.localStorage.setItem(key, value);\n              module.debug('Value stored using local storage', key, value);\n            }\n            else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {\n              window.sessionStorage.setItem(key, value);\n              module.debug('Value stored using session storage', key, value);\n            }\n            else if($.cookie !== undefined) {\n              $.cookie(key, value, options);\n              module.debug('Value stored using cookie', key, value, options);\n            }\n            else {\n              module.error(error.noCookieStorage);\n              return;\n            }\n          },\n          get: function(key, value) {\n            var\n              storedValue\n            ;\n            if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {\n              storedValue = window.localStorage.getItem(key);\n            }\n            else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {\n              storedValue = window.sessionStorage.getItem(key);\n            }\n            // get by cookie\n            else if($.cookie !== undefined) {\n              storedValue = $.cookie(key);\n            }\n            else {\n              module.error(error.noCookieStorage);\n            }\n            if(storedValue == 'undefined' || storedValue == 'null' || storedValue === undefined || storedValue === null) {\n              storedValue = undefined;\n            }\n            return storedValue;\n          },\n          remove: function(key) {\n            var\n              options = module.get.storageOptions()\n            ;\n            if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {\n              window.localStorage.removeItem(key);\n            }\n            else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {\n              window.sessionStorage.removeItem(key);\n            }\n            // store by cookie\n            else if($.cookie !== undefined) {\n              $.removeCookie(key, options);\n            }\n            else {\n              module.error(error.noStorage);\n            }\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.nag.settings = {\n\n  name        : 'Nag',\n\n  silent      : false,\n  debug       : false,\n  verbose     : false,\n  performance : true,\n\n  namespace   : 'Nag',\n\n  // allows cookie to be overridden\n  persist     : false,\n\n  // set to zero to require manually dismissal, otherwise hides on its own\n  displayTime : 0,\n\n  animation   : {\n    show : 'slide',\n    hide : 'slide'\n  },\n\n  context       : false,\n  detachable    : false,\n\n  expires       : 30,\n  domain        : false,\n  path          : '/',\n\n  // type of storage to use\n  storageMethod : 'cookie',\n\n  // value to store in dismissed localstorage/cookie\n  key           : 'nag',\n  value         : 'dismiss',\n\n  error: {\n    noCookieStorage : '$.cookie is not included. A storage solution is required.',\n    noStorage       : 'Neither $.cookie or store is defined. A storage solution is required for storing state',\n    method          : 'The method you called is not defined.'\n  },\n\n  className     : {\n    bottom : 'bottom',\n    fixed  : 'fixed'\n  },\n\n  selector      : {\n    close : '.close.icon'\n  },\n\n  speed         : 500,\n  easing        : 'easeOutQuad',\n\n  onHide: function() {}\n\n};\n\n// Adds easing\n$.extend( $.easing, {\n  easeOutQuad: function (x, t, b, c, d) {\n    return -c *(t/=d)*(t-2) + b;\n  }\n});\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Popup\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.popup = function(parameters) {\n  var\n    $allModules    = $(this),\n    $document      = $(document),\n    $window        = $(window),\n    $body          = $('body'),\n\n    moduleSelector = $allModules.selector || '',\n\n    hasTouch       = (true),\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n\n    returnedValue\n  ;\n  $allModules\n    .each(function() {\n      var\n        settings        = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.popup.settings, parameters)\n          : $.extend({}, $.fn.popup.settings),\n\n        selector           = settings.selector,\n        className          = settings.className,\n        error              = settings.error,\n        metadata           = settings.metadata,\n        namespace          = settings.namespace,\n\n        eventNamespace     = '.' + settings.namespace,\n        moduleNamespace    = 'module-' + namespace,\n\n        $module            = $(this),\n        $context           = $(settings.context),\n        $scrollContext     = $(settings.scrollContext),\n        $boundary          = $(settings.boundary),\n        $target            = (settings.target)\n          ? $(settings.target)\n          : $module,\n\n        $popup,\n        $offsetParent,\n\n        searchDepth        = 0,\n        triedPositions     = false,\n        openedWithTouch    = false,\n\n        element            = this,\n        instance           = $module.data(moduleNamespace),\n\n        documentObserver,\n        elementNamespace,\n        id,\n        module\n      ;\n\n      module = {\n\n        // binds events\n        initialize: function() {\n          module.debug('Initializing', $module);\n          module.createID();\n          module.bind.events();\n          if(!module.exists() && settings.preserve) {\n            module.create();\n          }\n          if(settings.observeChanges) {\n            module.observeChanges();\n          }\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, instance)\n          ;\n        },\n\n        observeChanges: function() {\n          if('MutationObserver' in window) {\n            documentObserver = new MutationObserver(module.event.documentChanged);\n            documentObserver.observe(document, {\n              childList : true,\n              subtree   : true\n            });\n            module.debug('Setting up mutation observer', documentObserver);\n          }\n        },\n\n        refresh: function() {\n          if(settings.popup) {\n            $popup = $(settings.popup).eq(0);\n          }\n          else {\n            if(settings.inline) {\n              $popup = $target.nextAll(selector.popup).eq(0);\n              settings.popup = $popup;\n            }\n          }\n          if(settings.popup) {\n            $popup.addClass(className.loading);\n            $offsetParent = module.get.offsetParent();\n            $popup.removeClass(className.loading);\n            if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {\n              module.debug('Moving popup to the same offset parent as activating element');\n              $popup\n                .detach()\n                .appendTo($offsetParent)\n              ;\n            }\n          }\n          else {\n            $offsetParent = (settings.inline)\n              ? module.get.offsetParent($target)\n              : module.has.popup()\n                ? module.get.offsetParent($popup)\n                : $body\n            ;\n          }\n          if( $offsetParent.is('html') && $offsetParent[0] !== $body[0] ) {\n            module.debug('Setting page as offset parent');\n            $offsetParent = $body;\n          }\n          if( module.get.variation() ) {\n            module.set.variation();\n          }\n        },\n\n        reposition: function() {\n          module.refresh();\n          module.set.position();\n        },\n\n        destroy: function() {\n          module.debug('Destroying previous module');\n          if(documentObserver) {\n            documentObserver.disconnect();\n          }\n          // remove element only if was created dynamically\n          if($popup && !settings.preserve) {\n            module.removePopup();\n          }\n          // clear all timeouts\n          clearTimeout(module.hideTimer);\n          clearTimeout(module.showTimer);\n          // remove events\n          module.unbind.close();\n          module.unbind.events();\n          $module\n            .removeData(moduleNamespace)\n          ;\n        },\n\n        event: {\n          start:  function(event) {\n            var\n              delay = ($.isPlainObject(settings.delay))\n                ? settings.delay.show\n                : settings.delay\n            ;\n            clearTimeout(module.hideTimer);\n            if(!openedWithTouch) {\n              module.showTimer = setTimeout(module.show, delay);\n            }\n          },\n          end:  function() {\n            var\n              delay = ($.isPlainObject(settings.delay))\n                ? settings.delay.hide\n                : settings.delay\n            ;\n            clearTimeout(module.showTimer);\n            module.hideTimer = setTimeout(module.hide, delay);\n          },\n          touchstart: function(event) {\n            openedWithTouch = true;\n            module.show();\n          },\n          resize: function() {\n            if( module.is.visible() ) {\n              module.set.position();\n            }\n          },\n          documentChanged: function(mutations) {\n            [].forEach.call(mutations, function(mutation) {\n              if(mutation.removedNodes) {\n                [].forEach.call(mutation.removedNodes, function(node) {\n                  if(node == element || $(node).find(element).length > 0) {\n                    module.debug('Element removed from DOM, tearing down events');\n                    module.destroy();\n                  }\n                });\n              }\n            });\n          },\n          hideGracefully: function(event) {\n            var\n              $target = $(event.target),\n              isInDOM = $.contains(document.documentElement, event.target),\n              inPopup = ($target.closest(selector.popup).length > 0)\n            ;\n            // don't close on clicks inside popup\n            if(event && !inPopup && isInDOM) {\n              module.debug('Click occurred outside popup hiding popup');\n              module.hide();\n            }\n            else {\n              module.debug('Click was inside popup, keeping popup open');\n            }\n          }\n        },\n\n        // generates popup html from metadata\n        create: function() {\n          var\n            html      = module.get.html(),\n            title     = module.get.title(),\n            content   = module.get.content()\n          ;\n\n          if(html || content || title) {\n            module.debug('Creating pop-up html');\n            if(!html) {\n              html = settings.templates.popup({\n                title   : title,\n                content : content\n              });\n            }\n            $popup = $('<div/>')\n              .addClass(className.popup)\n              .data(metadata.activator, $module)\n              .html(html)\n            ;\n            if(settings.inline) {\n              module.verbose('Inserting popup element inline', $popup);\n              $popup\n                .insertAfter($module)\n              ;\n            }\n            else {\n              module.verbose('Appending popup element to body', $popup);\n              $popup\n                .appendTo( $context )\n              ;\n            }\n            module.refresh();\n            module.set.variation();\n\n            if(settings.hoverable) {\n              module.bind.popup();\n            }\n            settings.onCreate.call($popup, element);\n          }\n          else if($target.next(selector.popup).length !== 0) {\n            module.verbose('Pre-existing popup found');\n            settings.inline = true;\n            settings.popup  = $target.next(selector.popup).data(metadata.activator, $module);\n            module.refresh();\n            if(settings.hoverable) {\n              module.bind.popup();\n            }\n          }\n          else if(settings.popup) {\n            $(settings.popup).data(metadata.activator, $module);\n            module.verbose('Used popup specified in settings');\n            module.refresh();\n            if(settings.hoverable) {\n              module.bind.popup();\n            }\n          }\n          else {\n            module.debug('No content specified skipping display', element);\n          }\n        },\n\n        createID: function() {\n          id = (Math.random().toString(16) + '000000000').substr(2, 8);\n          elementNamespace = '.' + id;\n          module.verbose('Creating unique id for element', id);\n        },\n\n        // determines popup state\n        toggle: function() {\n          module.debug('Toggling pop-up');\n          if( module.is.hidden() ) {\n            module.debug('Popup is hidden, showing pop-up');\n            module.unbind.close();\n            module.show();\n          }\n          else {\n            module.debug('Popup is visible, hiding pop-up');\n            module.hide();\n          }\n        },\n\n        show: function(callback) {\n          callback = callback || function(){};\n          module.debug('Showing pop-up', settings.transition);\n          if(module.is.hidden() && !( module.is.active() && module.is.dropdown()) ) {\n            if( !module.exists() ) {\n              module.create();\n            }\n            if(settings.onShow.call($popup, element) === false) {\n              module.debug('onShow callback returned false, cancelling popup animation');\n              return;\n            }\n            else if(!settings.preserve && !settings.popup) {\n              module.refresh();\n            }\n            if( $popup && module.set.position() ) {\n              module.save.conditions();\n              if(settings.exclusive) {\n                module.hideAll();\n              }\n              module.animate.show(callback);\n            }\n          }\n        },\n\n\n        hide: function(callback) {\n          callback = callback || function(){};\n          if( module.is.visible() || module.is.animating() ) {\n            if(settings.onHide.call($popup, element) === false) {\n              module.debug('onHide callback returned false, cancelling popup animation');\n              return;\n            }\n            module.remove.visible();\n            module.unbind.close();\n            module.restore.conditions();\n            module.animate.hide(callback);\n          }\n        },\n\n        hideAll: function() {\n          $(selector.popup)\n            .filter('.' + className.visible)\n            .each(function() {\n              $(this)\n                .data(metadata.activator)\n                  .popup('hide')\n              ;\n            })\n          ;\n        },\n        exists: function() {\n          if(!$popup) {\n            return false;\n          }\n          if(settings.inline || settings.popup) {\n            return ( module.has.popup() );\n          }\n          else {\n            return ( $popup.closest($context).length >= 1 )\n              ? true\n              : false\n            ;\n          }\n        },\n\n        removePopup: function() {\n          if( module.has.popup() && !settings.popup) {\n            module.debug('Removing popup', $popup);\n            $popup.remove();\n            $popup = undefined;\n            settings.onRemove.call($popup, element);\n          }\n        },\n\n        save: {\n          conditions: function() {\n            module.cache = {\n              title: $module.attr('title')\n            };\n            if (module.cache.title) {\n              $module.removeAttr('title');\n            }\n            module.verbose('Saving original attributes', module.cache.title);\n          }\n        },\n        restore: {\n          conditions: function() {\n            if(module.cache && module.cache.title) {\n              $module.attr('title', module.cache.title);\n              module.verbose('Restoring original attributes', module.cache.title);\n            }\n            return true;\n          }\n        },\n        supports: {\n          svg: function() {\n            return (typeof SVGGraphicsElement === undefined);\n          }\n        },\n        animate: {\n          show: function(callback) {\n            callback = $.isFunction(callback) ? callback : function(){};\n            if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {\n              module.set.visible();\n              $popup\n                .transition({\n                  animation  : settings.transition + ' in',\n                  queue      : false,\n                  debug      : settings.debug,\n                  verbose    : settings.verbose,\n                  duration   : settings.duration,\n                  onComplete : function() {\n                    module.bind.close();\n                    callback.call($popup, element);\n                    settings.onVisible.call($popup, element);\n                  }\n                })\n              ;\n            }\n            else {\n              module.error(error.noTransition);\n            }\n          },\n          hide: function(callback) {\n            callback = $.isFunction(callback) ? callback : function(){};\n            module.debug('Hiding pop-up');\n            if(settings.onHide.call($popup, element) === false) {\n              module.debug('onHide callback returned false, cancelling popup animation');\n              return;\n            }\n            if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {\n              $popup\n                .transition({\n                  animation  : settings.transition + ' out',\n                  queue      : false,\n                  duration   : settings.duration,\n                  debug      : settings.debug,\n                  verbose    : settings.verbose,\n                  onComplete : function() {\n                    module.reset();\n                    callback.call($popup, element);\n                    settings.onHidden.call($popup, element);\n                  }\n                })\n              ;\n            }\n            else {\n              module.error(error.noTransition);\n            }\n          }\n        },\n\n        change: {\n          content: function(html) {\n            $popup.html(html);\n          }\n        },\n\n        get: {\n          html: function() {\n            $module.removeData(metadata.html);\n            return $module.data(metadata.html) || settings.html;\n          },\n          title: function() {\n            $module.removeData(metadata.title);\n            return $module.data(metadata.title) || settings.title;\n          },\n          content: function() {\n            $module.removeData(metadata.content);\n            return $module.data(metadata.content) || $module.attr('title') || settings.content;\n          },\n          variation: function() {\n            $module.removeData(metadata.variation);\n            return $module.data(metadata.variation) || settings.variation;\n          },\n          popup: function() {\n            return $popup;\n          },\n          popupOffset: function() {\n            return $popup.offset();\n          },\n          calculations: function() {\n            var\n              targetElement    = $target[0],\n              isWindow         = ($boundary[0] == window),\n              targetPosition   = (settings.inline || (settings.popup && settings.movePopup))\n                ? $target.position()\n                : $target.offset(),\n              screenPosition = (isWindow)\n                ? { top: 0, left: 0 }\n                : $boundary.offset(),\n              calculations   = {},\n              scroll = (isWindow)\n                ? { top: $window.scrollTop(), left: $window.scrollLeft() }\n                : { top: 0, left: 0},\n              screen\n            ;\n            calculations = {\n              // element which is launching popup\n              target : {\n                element : $target[0],\n                width   : $target.outerWidth(),\n                height  : $target.outerHeight(),\n                top     : targetPosition.top,\n                left    : targetPosition.left,\n                margin  : {}\n              },\n              // popup itself\n              popup : {\n                width  : $popup.outerWidth(),\n                height : $popup.outerHeight()\n              },\n              // offset container (or 3d context)\n              parent : {\n                width  : $offsetParent.outerWidth(),\n                height : $offsetParent.outerHeight()\n              },\n              // screen boundaries\n              screen : {\n                top  : screenPosition.top,\n                left : screenPosition.left,\n                scroll: {\n                  top  : scroll.top,\n                  left : scroll.left\n                },\n                width  : $boundary.width(),\n                height : $boundary.height()\n              }\n            };\n\n            // add in container calcs if fluid\n            if( settings.setFluidWidth && module.is.fluid() ) {\n              calculations.container = {\n                width: $popup.parent().outerWidth()\n              };\n              calculations.popup.width = calculations.container.width;\n            }\n\n            // add in margins if inline\n            calculations.target.margin.top = (settings.inline)\n              ? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-top'), 10)\n              : 0\n            ;\n            calculations.target.margin.left = (settings.inline)\n              ? module.is.rtl()\n                ? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-right'), 10)\n                : parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-left'), 10)\n              : 0\n            ;\n            // calculate screen boundaries\n            screen = calculations.screen;\n            calculations.boundary = {\n              top    : screen.top + screen.scroll.top,\n              bottom : screen.top + screen.scroll.top + screen.height,\n              left   : screen.left + screen.scroll.left,\n              right  : screen.left + screen.scroll.left + screen.width\n            };\n            return calculations;\n          },\n          id: function() {\n            return id;\n          },\n          startEvent: function() {\n            if(settings.on == 'hover') {\n              return 'mouseenter';\n            }\n            else if(settings.on == 'focus') {\n              return 'focus';\n            }\n            return false;\n          },\n          scrollEvent: function() {\n            return 'scroll';\n          },\n          endEvent: function() {\n            if(settings.on == 'hover') {\n              return 'mouseleave';\n            }\n            else if(settings.on == 'focus') {\n              return 'blur';\n            }\n            return false;\n          },\n          distanceFromBoundary: function(offset, calculations) {\n            var\n              distanceFromBoundary = {},\n              popup,\n              boundary\n            ;\n            calculations = calculations || module.get.calculations();\n\n            // shorthand\n            popup        = calculations.popup;\n            boundary     = calculations.boundary;\n\n            if(offset) {\n              distanceFromBoundary = {\n                top    : (offset.top - boundary.top),\n                left   : (offset.left - boundary.left),\n                right  : (boundary.right - (offset.left + popup.width) ),\n                bottom : (boundary.bottom - (offset.top + popup.height) )\n              };\n              module.verbose('Distance from boundaries determined', offset, distanceFromBoundary);\n            }\n            return distanceFromBoundary;\n          },\n          offsetParent: function($target) {\n            var\n              element = ($target !== undefined)\n                ? $target[0]\n                : $module[0],\n              parentNode = element.parentNode,\n              $node    = $(parentNode)\n            ;\n            if(parentNode) {\n              var\n                is2D     = ($node.css('transform') === 'none'),\n                isStatic = ($node.css('position') === 'static'),\n                isHTML   = $node.is('html')\n              ;\n              while(parentNode && !isHTML && isStatic && is2D) {\n                parentNode = parentNode.parentNode;\n                $node    = $(parentNode);\n                is2D     = ($node.css('transform') === 'none');\n                isStatic = ($node.css('position') === 'static');\n                isHTML   = $node.is('html');\n              }\n            }\n            return ($node && $node.length > 0)\n              ? $node\n              : $()\n            ;\n          },\n          positions: function() {\n            return {\n              'top left'      : false,\n              'top center'    : false,\n              'top right'     : false,\n              'bottom left'   : false,\n              'bottom center' : false,\n              'bottom right'  : false,\n              'left center'   : false,\n              'right center'  : false\n            };\n          },\n          nextPosition: function(position) {\n            var\n              positions          = position.split(' '),\n              verticalPosition   = positions[0],\n              horizontalPosition = positions[1],\n              opposite = {\n                top    : 'bottom',\n                bottom : 'top',\n                left   : 'right',\n                right  : 'left'\n              },\n              adjacent = {\n                left   : 'center',\n                center : 'right',\n                right  : 'left'\n              },\n              backup = {\n                'top left'      : 'top center',\n                'top center'    : 'top right',\n                'top right'     : 'right center',\n                'right center'  : 'bottom right',\n                'bottom right'  : 'bottom center',\n                'bottom center' : 'bottom left',\n                'bottom left'   : 'left center',\n                'left center'   : 'top left'\n              },\n              adjacentsAvailable = (verticalPosition == 'top' || verticalPosition == 'bottom'),\n              oppositeTried = false,\n              adjacentTried = false,\n              nextPosition  = false\n            ;\n            if(!triedPositions) {\n              module.verbose('All available positions available');\n              triedPositions = module.get.positions();\n            }\n\n            module.debug('Recording last position tried', position);\n            triedPositions[position] = true;\n\n            if(settings.prefer === 'opposite') {\n              nextPosition  = [opposite[verticalPosition], horizontalPosition];\n              nextPosition  = nextPosition.join(' ');\n              oppositeTried = (triedPositions[nextPosition] === true);\n              module.debug('Trying opposite strategy', nextPosition);\n            }\n            if((settings.prefer === 'adjacent') && adjacentsAvailable ) {\n              nextPosition  = [verticalPosition, adjacent[horizontalPosition]];\n              nextPosition  = nextPosition.join(' ');\n              adjacentTried = (triedPositions[nextPosition] === true);\n              module.debug('Trying adjacent strategy', nextPosition);\n            }\n            if(adjacentTried || oppositeTried) {\n              module.debug('Using backup position', nextPosition);\n              nextPosition = backup[position];\n            }\n            return nextPosition;\n          }\n        },\n\n        set: {\n          position: function(position, calculations) {\n\n            // exit conditions\n            if($target.length === 0 || $popup.length === 0) {\n              module.error(error.notFound);\n              return;\n            }\n            var\n              offset,\n              distanceAway,\n              target,\n              popup,\n              parent,\n              positioning,\n              popupOffset,\n              distanceFromBoundary\n            ;\n\n            calculations = calculations || module.get.calculations();\n            position     = position     || $module.data(metadata.position) || settings.position;\n\n            offset       = $module.data(metadata.offset) || settings.offset;\n            distanceAway = settings.distanceAway;\n\n            // shorthand\n            target = calculations.target;\n            popup  = calculations.popup;\n            parent = calculations.parent;\n\n            if(target.width === 0 && target.height === 0 && !module.is.svg(target.element)) {\n              module.debug('Popup target is hidden, no action taken');\n              return false;\n            }\n\n            if(settings.inline) {\n              module.debug('Adding margin to calculation', target.margin);\n              if(position == 'left center' || position == 'right center') {\n                offset       +=  target.margin.top;\n                distanceAway += -target.margin.left;\n              }\n              else if (position == 'top left' || position == 'top center' || position == 'top right') {\n                offset       += target.margin.left;\n                distanceAway -= target.margin.top;\n              }\n              else {\n                offset       += target.margin.left;\n                distanceAway += target.margin.top;\n              }\n            }\n\n            module.debug('Determining popup position from calculations', position, calculations);\n\n            if (module.is.rtl()) {\n              position = position.replace(/left|right/g, function (match) {\n                return (match == 'left')\n                  ? 'right'\n                  : 'left'\n                ;\n              });\n              module.debug('RTL: Popup position updated', position);\n            }\n\n            // if last attempt use specified last resort position\n            if(searchDepth == settings.maxSearchDepth && typeof settings.lastResort === 'string') {\n              position = settings.lastResort;\n            }\n\n            switch (position) {\n              case 'top left':\n                positioning = {\n                  top    : 'auto',\n                  bottom : parent.height - target.top + distanceAway,\n                  left   : target.left + offset,\n                  right  : 'auto'\n                };\n              break;\n              case 'top center':\n                positioning = {\n                  bottom : parent.height - target.top + distanceAway,\n                  left   : target.left + (target.width / 2) - (popup.width / 2) + offset,\n                  top    : 'auto',\n                  right  : 'auto'\n                };\n              break;\n              case 'top right':\n                positioning = {\n                  bottom :  parent.height - target.top + distanceAway,\n                  right  :  parent.width - target.left - target.width - offset,\n                  top    : 'auto',\n                  left   : 'auto'\n                };\n              break;\n              case 'left center':\n                positioning = {\n                  top    : target.top + (target.height / 2) - (popup.height / 2) + offset,\n                  right  : parent.width - target.left + distanceAway,\n                  left   : 'auto',\n                  bottom : 'auto'\n                };\n              break;\n              case 'right center':\n                positioning = {\n                  top    : target.top + (target.height / 2) - (popup.height / 2) + offset,\n                  left   : target.left + target.width + distanceAway,\n                  bottom : 'auto',\n                  right  : 'auto'\n                };\n              break;\n              case 'bottom left':\n                positioning = {\n                  top    : target.top + target.height + distanceAway,\n                  left   : target.left + offset,\n                  bottom : 'auto',\n                  right  : 'auto'\n                };\n              break;\n              case 'bottom center':\n                positioning = {\n                  top    : target.top + target.height + distanceAway,\n                  left   : target.left + (target.width / 2) - (popup.width / 2) + offset,\n                  bottom : 'auto',\n                  right  : 'auto'\n                };\n              break;\n              case 'bottom right':\n                positioning = {\n                  top    : target.top + target.height + distanceAway,\n                  right  : parent.width - target.left  - target.width - offset,\n                  left   : 'auto',\n                  bottom : 'auto'\n                };\n              break;\n            }\n            if(positioning === undefined) {\n              module.error(error.invalidPosition, position);\n            }\n\n            module.debug('Calculated popup positioning values', positioning);\n\n            // tentatively place on stage\n            $popup\n              .css(positioning)\n              .removeClass(className.position)\n              .addClass(position)\n              .addClass(className.loading)\n            ;\n\n            popupOffset = module.get.popupOffset();\n\n            // see if any boundaries are surpassed with this tentative position\n            distanceFromBoundary = module.get.distanceFromBoundary(popupOffset, calculations);\n\n            if( module.is.offstage(distanceFromBoundary, position) ) {\n              module.debug('Position is outside viewport', position);\n              if(searchDepth < settings.maxSearchDepth) {\n                searchDepth++;\n                position = module.get.nextPosition(position);\n                module.debug('Trying new position', position);\n                return ($popup)\n                  ? module.set.position(position, calculations)\n                  : false\n                ;\n              }\n              else {\n                if(settings.lastResort) {\n                  module.debug('No position found, showing with last position');\n                }\n                else {\n                  module.debug('Popup could not find a position to display', $popup);\n                  module.error(error.cannotPlace, element);\n                  module.remove.attempts();\n                  module.remove.loading();\n                  module.reset();\n                  settings.onUnplaceable.call($popup, element);\n                  return false;\n                }\n              }\n            }\n            module.debug('Position is on stage', position);\n            module.remove.attempts();\n            module.remove.loading();\n            if( settings.setFluidWidth && module.is.fluid() ) {\n              module.set.fluidWidth(calculations);\n            }\n            return true;\n          },\n\n          fluidWidth: function(calculations) {\n            calculations = calculations || module.get.calculations();\n            module.debug('Automatically setting element width to parent width', calculations.parent.width);\n            $popup.css('width', calculations.container.width);\n          },\n\n          variation: function(variation) {\n            variation = variation || module.get.variation();\n            if(variation && module.has.popup() ) {\n              module.verbose('Adding variation to popup', variation);\n              $popup.addClass(variation);\n            }\n          },\n\n          visible: function() {\n            $module.addClass(className.visible);\n          }\n        },\n\n        remove: {\n          loading: function() {\n            $popup.removeClass(className.loading);\n          },\n          variation: function(variation) {\n            variation = variation || module.get.variation();\n            if(variation) {\n              module.verbose('Removing variation', variation);\n              $popup.removeClass(variation);\n            }\n          },\n          visible: function() {\n            $module.removeClass(className.visible);\n          },\n          attempts: function() {\n            module.verbose('Resetting all searched positions');\n            searchDepth    = 0;\n            triedPositions = false;\n          }\n        },\n\n        bind: {\n          events: function() {\n            module.debug('Binding popup events to module');\n            if(settings.on == 'click') {\n              $module\n                .on('click' + eventNamespace, module.toggle)\n              ;\n            }\n            if(settings.on == 'hover' && hasTouch) {\n              $module\n                .on('touchstart' + eventNamespace, module.event.touchstart)\n              ;\n            }\n            if( module.get.startEvent() ) {\n              $module\n                .on(module.get.startEvent() + eventNamespace, module.event.start)\n                .on(module.get.endEvent() + eventNamespace, module.event.end)\n              ;\n            }\n            if(settings.target) {\n              module.debug('Target set to element', $target);\n            }\n            $window.on('resize' + elementNamespace, module.event.resize);\n          },\n          popup: function() {\n            module.verbose('Allowing hover events on popup to prevent closing');\n            if( $popup && module.has.popup() ) {\n              $popup\n                .on('mouseenter' + eventNamespace, module.event.start)\n                .on('mouseleave' + eventNamespace, module.event.end)\n              ;\n            }\n          },\n          close: function() {\n            if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) {\n              $scrollContext\n                .one(module.get.scrollEvent() + elementNamespace, module.event.hideGracefully)\n              ;\n            }\n            if(settings.on == 'hover' && openedWithTouch) {\n              module.verbose('Binding popup close event to document');\n              $document\n                .on('touchstart' + elementNamespace, function(event) {\n                  module.verbose('Touched away from popup');\n                  module.event.hideGracefully.call(element, event);\n                })\n              ;\n            }\n            if(settings.on == 'click' && settings.closable) {\n              module.verbose('Binding popup close event to document');\n              $document\n                .on('click' + elementNamespace, function(event) {\n                  module.verbose('Clicked away from popup');\n                  module.event.hideGracefully.call(element, event);\n                })\n              ;\n            }\n          }\n        },\n\n        unbind: {\n          events: function() {\n            $window\n              .off(elementNamespace)\n            ;\n            $module\n              .off(eventNamespace)\n            ;\n          },\n          close: function() {\n            $document\n              .off(elementNamespace)\n            ;\n            $scrollContext\n              .off(elementNamespace)\n            ;\n          },\n        },\n\n        has: {\n          popup: function() {\n            return ($popup && $popup.length > 0);\n          }\n        },\n\n        is: {\n          offstage: function(distanceFromBoundary, position) {\n            var\n              offstage = []\n            ;\n            // return boundaries that have been surpassed\n            $.each(distanceFromBoundary, function(direction, distance) {\n              if(distance < -settings.jitter) {\n                module.debug('Position exceeds allowable distance from edge', direction, distance, position);\n                offstage.push(direction);\n              }\n            });\n            if(offstage.length > 0) {\n              return true;\n            }\n            else {\n              return false;\n            }\n          },\n          svg: function(element) {\n            return module.supports.svg() && (element instanceof SVGGraphicsElement);\n          },\n          active: function() {\n            return $module.hasClass(className.active);\n          },\n          animating: function() {\n            return ($popup !== undefined && $popup.hasClass(className.animating) );\n          },\n          fluid: function() {\n            return ($popup !== undefined && $popup.hasClass(className.fluid));\n          },\n          visible: function() {\n            return ($popup !== undefined && $popup.hasClass(className.visible));\n          },\n          dropdown: function() {\n            return $module.hasClass(className.dropdown);\n          },\n          hidden: function() {\n            return !module.is.visible();\n          },\n          rtl: function () {\n            return $module.css('direction') == 'rtl';\n          }\n        },\n\n        reset: function() {\n          module.remove.visible();\n          if(settings.preserve) {\n            if($.fn.transition !== undefined) {\n              $popup\n                .transition('remove transition')\n              ;\n            }\n          }\n          else {\n            module.removePopup();\n          }\n        },\n\n        setting: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            settings[name] = value;\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.popup.settings = {\n\n  name           : 'Popup',\n\n  // module settings\n  silent         : false,\n  debug          : false,\n  verbose        : false,\n  performance    : true,\n  namespace      : 'popup',\n\n  // whether it should use dom mutation observers\n  observeChanges : true,\n\n  // callback only when element added to dom\n  onCreate       : function(){},\n\n  // callback before element removed from dom\n  onRemove       : function(){},\n\n  // callback before show animation\n  onShow         : function(){},\n\n  // callback after show animation\n  onVisible      : function(){},\n\n  // callback before hide animation\n  onHide         : function(){},\n\n  // callback when popup cannot be positioned in visible screen\n  onUnplaceable  : function(){},\n\n  // callback after hide animation\n  onHidden       : function(){},\n\n  // when to show popup\n  on             : 'hover',\n\n  // element to use to determine if popup is out of boundary\n  boundary       : window,\n\n  // whether to add touchstart events when using hover\n  addTouchEvents : true,\n\n  // default position relative to element\n  position       : 'top left',\n\n  // name of variation to use\n  variation      : '',\n\n  // whether popup should be moved to context\n  movePopup      : true,\n\n  // element which popup should be relative to\n  target         : false,\n\n  // jq selector or element that should be used as popup\n  popup          : false,\n\n  // popup should remain inline next to activator\n  inline         : false,\n\n  // popup should be removed from page on hide\n  preserve       : false,\n\n  // popup should not close when being hovered on\n  hoverable      : false,\n\n  // explicitly set content\n  content        : false,\n\n  // explicitly set html\n  html           : false,\n\n  // explicitly set title\n  title          : false,\n\n  // whether automatically close on clickaway when on click\n  closable       : true,\n\n  // automatically hide on scroll\n  hideOnScroll   : 'auto',\n\n  // hide other popups on show\n  exclusive      : false,\n\n  // context to attach popups\n  context        : 'body',\n\n  // context for binding scroll events\n  scrollContext  : window,\n\n  // position to prefer when calculating new position\n  prefer         : 'opposite',\n\n  // specify position to appear even if it doesn't fit\n  lastResort     : false,\n\n  // delay used to prevent accidental refiring of animations due to user error\n  delay        : {\n    show : 50,\n    hide : 70\n  },\n\n  // whether fluid variation should assign width explicitly\n  setFluidWidth  : true,\n\n  // transition settings\n  duration       : 200,\n  transition     : 'scale',\n\n  // distance away from activating element in px\n  distanceAway   : 0,\n\n  // number of pixels an element is allowed to be \"offstage\" for a position to be chosen (allows for rounding)\n  jitter         : 2,\n\n  // offset on aligning axis from calculated position\n  offset         : 0,\n\n  // maximum times to look for a position before failing (9 positions total)\n  maxSearchDepth : 15,\n\n  error: {\n    invalidPosition : 'The position you specified is not a valid position',\n    cannotPlace     : 'Popup does not fit within the boundaries of the viewport',\n    method          : 'The method you called is not defined.',\n    noTransition    : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>',\n    notFound        : 'The target or popup you specified does not exist on the page'\n  },\n\n  metadata: {\n    activator : 'activator',\n    content   : 'content',\n    html      : 'html',\n    offset    : 'offset',\n    position  : 'position',\n    title     : 'title',\n    variation : 'variation'\n  },\n\n  className   : {\n    active    : 'active',\n    animating : 'animating',\n    dropdown  : 'dropdown',\n    fluid     : 'fluid',\n    loading   : 'loading',\n    popup     : 'ui popup',\n    position  : 'top left center bottom right',\n    visible   : 'visible'\n  },\n\n  selector    : {\n    popup    : '.ui.popup'\n  },\n\n  templates: {\n    escape: function(string) {\n      var\n        badChars     = /[&<>\"'`]/g,\n        shouldEscape = /[&<>\"'`]/,\n        escape       = {\n          \"&\": \"&amp;\",\n          \"<\": \"&lt;\",\n          \">\": \"&gt;\",\n          '\"': \"&quot;\",\n          \"'\": \"&#x27;\",\n          \"`\": \"&#x60;\"\n        },\n        escapedChar  = function(chr) {\n          return escape[chr];\n        }\n      ;\n      if(shouldEscape.test(string)) {\n        return string.replace(badChars, escapedChar);\n      }\n      return string;\n    },\n    popup: function(text) {\n      var\n        html   = '',\n        escape = $.fn.popup.settings.templates.escape\n      ;\n      if(typeof text !== undefined) {\n        if(typeof text.title !== undefined && text.title) {\n          text.title = escape(text.title);\n          html += '<div class=\"header\">' + text.title + '</div>';\n        }\n        if(typeof text.content !== undefined && text.content) {\n          text.content = escape(text.content);\n          html += '<div class=\"content\">' + text.content + '</div>';\n        }\n      }\n      return html;\n    }\n  }\n\n};\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Progress\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\nvar\n  global = (typeof window != 'undefined' && window.Math == Math)\n    ? window\n    : (typeof self != 'undefined' && self.Math == Math)\n      ? self\n      : Function('return this')()\n;\n\n$.fn.progress = function(parameters) {\n  var\n    $allModules    = $(this),\n\n    moduleSelector = $allModules.selector || '',\n\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings          = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.progress.settings, parameters)\n          : $.extend({}, $.fn.progress.settings),\n\n        className       = settings.className,\n        metadata        = settings.metadata,\n        namespace       = settings.namespace,\n        selector        = settings.selector,\n        error           = settings.error,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        $module         = $(this),\n        $bar            = $(this).find(selector.bar),\n        $progress       = $(this).find(selector.progress),\n        $label          = $(this).find(selector.label),\n\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n\n        animating = false,\n        transitionEnd,\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.debug('Initializing progress bar', settings);\n\n          module.set.duration();\n          module.set.transitionEvent();\n\n          module.read.metadata();\n          module.read.settings();\n\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of progress', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n        destroy: function() {\n          module.verbose('Destroying previous progress for', $module);\n          clearInterval(instance.interval);\n          module.remove.state();\n          $module.removeData(moduleNamespace);\n          instance = undefined;\n        },\n\n        reset: function() {\n          module.remove.nextValue();\n          module.update.progress(0);\n        },\n\n        complete: function() {\n          if(module.percent === undefined || module.percent < 100) {\n            module.remove.progressPoll();\n            module.set.percent(100);\n          }\n        },\n\n        read: {\n          metadata: function() {\n            var\n              data = {\n                percent : $module.data(metadata.percent),\n                total   : $module.data(metadata.total),\n                value   : $module.data(metadata.value)\n              }\n            ;\n            if(data.percent) {\n              module.debug('Current percent value set from metadata', data.percent);\n              module.set.percent(data.percent);\n            }\n            if(data.total) {\n              module.debug('Total value set from metadata', data.total);\n              module.set.total(data.total);\n            }\n            if(data.value) {\n              module.debug('Current value set from metadata', data.value);\n              module.set.value(data.value);\n              module.set.progress(data.value);\n            }\n          },\n          settings: function() {\n            if(settings.total !== false) {\n              module.debug('Current total set in settings', settings.total);\n              module.set.total(settings.total);\n            }\n            if(settings.value !== false) {\n              module.debug('Current value set in settings', settings.value);\n              module.set.value(settings.value);\n              module.set.progress(module.value);\n            }\n            if(settings.percent !== false) {\n              module.debug('Current percent set in settings', settings.percent);\n              module.set.percent(settings.percent);\n            }\n          }\n        },\n\n        increment: function(incrementValue) {\n          var\n            maxValue,\n            startValue,\n            newValue\n          ;\n          if( module.has.total() ) {\n            startValue     = module.get.value();\n            incrementValue = incrementValue || 1;\n            newValue       = startValue + incrementValue;\n          }\n          else {\n            startValue     = module.get.percent();\n            incrementValue = incrementValue || module.get.randomValue();\n\n            newValue       = startValue + incrementValue;\n            maxValue       = 100;\n            module.debug('Incrementing percentage by', startValue, newValue);\n          }\n          newValue = module.get.normalizedValue(newValue);\n          module.set.progress(newValue);\n        },\n        decrement: function(decrementValue) {\n          var\n            total     = module.get.total(),\n            startValue,\n            newValue\n          ;\n          if(total) {\n            startValue     =  module.get.value();\n            decrementValue =  decrementValue || 1;\n            newValue       =  startValue - decrementValue;\n            module.debug('Decrementing value by', decrementValue, startValue);\n          }\n          else {\n            startValue     =  module.get.percent();\n            decrementValue =  decrementValue || module.get.randomValue();\n            newValue       =  startValue - decrementValue;\n            module.debug('Decrementing percentage by', decrementValue, startValue);\n          }\n          newValue = module.get.normalizedValue(newValue);\n          module.set.progress(newValue);\n        },\n\n        has: {\n          progressPoll: function() {\n            return module.progressPoll;\n          },\n          total: function() {\n            return (module.get.total() !== false);\n          }\n        },\n\n        get: {\n          text: function(templateText) {\n            var\n              value   = module.value                || 0,\n              total   = module.total                || 0,\n              percent = (animating)\n                ? module.get.displayPercent()\n                : module.percent || 0,\n              left = (module.total > 0)\n                ? (total - value)\n                : (100 - percent)\n            ;\n            templateText = templateText || '';\n            templateText = templateText\n              .replace('{value}', value)\n              .replace('{total}', total)\n              .replace('{left}', left)\n              .replace('{percent}', percent)\n            ;\n            module.verbose('Adding variables to progress bar text', templateText);\n            return templateText;\n          },\n\n          normalizedValue: function(value) {\n            if(value < 0) {\n              module.debug('Value cannot decrement below 0');\n              return 0;\n            }\n            if(module.has.total()) {\n              if(value > module.total) {\n                module.debug('Value cannot increment above total', module.total);\n                return module.total;\n              }\n            }\n            else if(value > 100 ) {\n              module.debug('Value cannot increment above 100 percent');\n              return 100;\n            }\n            return value;\n          },\n\n          updateInterval: function() {\n            if(settings.updateInterval == 'auto') {\n              return settings.duration;\n            }\n            return settings.updateInterval;\n          },\n\n          randomValue: function() {\n            module.debug('Generating random increment percentage');\n            return Math.floor((Math.random() * settings.random.max) + settings.random.min);\n          },\n\n          numericValue: function(value) {\n            return (typeof value === 'string')\n              ? (value.replace(/[^\\d.]/g, '') !== '')\n                ? +(value.replace(/[^\\d.]/g, ''))\n                : false\n              : value\n            ;\n          },\n\n          transitionEnd: function() {\n            var\n              element     = document.createElement('element'),\n              transitions = {\n                'transition'       :'transitionend',\n                'OTransition'      :'oTransitionEnd',\n                'MozTransition'    :'transitionend',\n                'WebkitTransition' :'webkitTransitionEnd'\n              },\n              transition\n            ;\n            for(transition in transitions){\n              if( element.style[transition] !== undefined ){\n                return transitions[transition];\n              }\n            }\n          },\n\n          // gets current displayed percentage (if animating values this is the intermediary value)\n          displayPercent: function() {\n            var\n              barWidth       = $bar.width(),\n              totalWidth     = $module.width(),\n              minDisplay     = parseInt($bar.css('min-width'), 10),\n              displayPercent = (barWidth > minDisplay)\n                ? (barWidth / totalWidth * 100)\n                : module.percent\n            ;\n            return (settings.precision > 0)\n              ? Math.round(displayPercent * (10 * settings.precision)) / (10 * settings.precision)\n              : Math.round(displayPercent)\n            ;\n          },\n\n          percent: function() {\n            return module.percent || 0;\n          },\n          value: function() {\n            return module.nextValue || module.value || 0;\n          },\n          total: function() {\n            return module.total || false;\n          }\n        },\n\n        create: {\n          progressPoll: function() {\n            module.progressPoll = setTimeout(function() {\n              module.update.toNextValue();\n              module.remove.progressPoll();\n            }, module.get.updateInterval());\n          },\n        },\n\n        is: {\n          complete: function() {\n            return module.is.success() || module.is.warning() || module.is.error();\n          },\n          success: function() {\n            return $module.hasClass(className.success);\n          },\n          warning: function() {\n            return $module.hasClass(className.warning);\n          },\n          error: function() {\n            return $module.hasClass(className.error);\n          },\n          active: function() {\n            return $module.hasClass(className.active);\n          },\n          visible: function() {\n            return $module.is(':visible');\n          }\n        },\n\n        remove: {\n          progressPoll: function() {\n            module.verbose('Removing progress poll timer');\n            if(module.progressPoll) {\n              clearTimeout(module.progressPoll);\n              delete module.progressPoll;\n            }\n          },\n          nextValue: function() {\n            module.verbose('Removing progress value stored for next update');\n            delete module.nextValue;\n          },\n          state: function() {\n            module.verbose('Removing stored state');\n            delete module.total;\n            delete module.percent;\n            delete module.value;\n          },\n          active: function() {\n            module.verbose('Removing active state');\n            $module.removeClass(className.active);\n          },\n          success: function() {\n            module.verbose('Removing success state');\n            $module.removeClass(className.success);\n          },\n          warning: function() {\n            module.verbose('Removing warning state');\n            $module.removeClass(className.warning);\n          },\n          error: function() {\n            module.verbose('Removing error state');\n            $module.removeClass(className.error);\n          }\n        },\n\n        set: {\n          barWidth: function(value) {\n            if(value > 100) {\n              module.error(error.tooHigh, value);\n            }\n            else if (value < 0) {\n              module.error(error.tooLow, value);\n            }\n            else {\n              $bar\n                .css('width', value + '%')\n              ;\n              $module\n                .attr('data-percent', parseInt(value, 10))\n              ;\n            }\n          },\n          duration: function(duration) {\n            duration = duration || settings.duration;\n            duration = (typeof duration == 'number')\n              ? duration + 'ms'\n              : duration\n            ;\n            module.verbose('Setting progress bar transition duration', duration);\n            $bar\n              .css({\n                'transition-duration':  duration\n              })\n            ;\n          },\n          percent: function(percent) {\n            percent = (typeof percent == 'string')\n              ? +(percent.replace('%', ''))\n              : percent\n            ;\n            // round display percentage\n            percent = (settings.precision > 0)\n              ? Math.round(percent * (10 * settings.precision)) / (10 * settings.precision)\n              : Math.round(percent)\n            ;\n            module.percent = percent;\n            if( !module.has.total() ) {\n              module.value = (settings.precision > 0)\n                ? Math.round( (percent / 100) * module.total * (10 * settings.precision)) / (10 * settings.precision)\n                : Math.round( (percent / 100) * module.total * 10) / 10\n              ;\n              if(settings.limitValues) {\n                module.value = (module.value > 100)\n                  ? 100\n                  : (module.value < 0)\n                    ? 0\n                    : module.value\n                ;\n              }\n            }\n            module.set.barWidth(percent);\n            module.set.labelInterval();\n            module.set.labels();\n            settings.onChange.call(element, percent, module.value, module.total);\n          },\n          labelInterval: function() {\n            var\n              animationCallback = function() {\n                module.verbose('Bar finished animating, removing continuous label updates');\n                clearInterval(module.interval);\n                animating = false;\n                module.set.labels();\n              }\n            ;\n            clearInterval(module.interval);\n            $bar.one(transitionEnd + eventNamespace, animationCallback);\n            animating = true;\n            module.interval = setInterval(function() {\n              var\n                isInDOM = $.contains(document.documentElement, element)\n              ;\n              if(!isInDOM) {\n                clearInterval(module.interval);\n                animating = false;\n              }\n              module.set.labels();\n            }, settings.framerate);\n          },\n          labels: function() {\n            module.verbose('Setting both bar progress and outer label text');\n            module.set.barLabel();\n            module.set.state();\n          },\n          label: function(text) {\n            text = text || '';\n            if(text) {\n              text = module.get.text(text);\n              module.verbose('Setting label to text', text);\n              $label.text(text);\n            }\n          },\n          state: function(percent) {\n            percent = (percent !== undefined)\n              ? percent\n              : module.percent\n            ;\n            if(percent === 100) {\n              if(settings.autoSuccess && !(module.is.warning() || module.is.error() || module.is.success())) {\n                module.set.success();\n                module.debug('Automatically triggering success at 100%');\n              }\n              else {\n                module.verbose('Reached 100% removing active state');\n                module.remove.active();\n                module.remove.progressPoll();\n              }\n            }\n            else if(percent > 0) {\n              module.verbose('Adjusting active progress bar label', percent);\n              module.set.active();\n            }\n            else {\n              module.remove.active();\n              module.set.label(settings.text.active);\n            }\n          },\n          barLabel: function(text) {\n            if(text !== undefined) {\n              $progress.text( module.get.text(text) );\n            }\n            else if(settings.label == 'ratio' && module.total) {\n              module.verbose('Adding ratio to bar label');\n              $progress.text( module.get.text(settings.text.ratio) );\n            }\n            else if(settings.label == 'percent') {\n              module.verbose('Adding percentage to bar label');\n              $progress.text( module.get.text(settings.text.percent) );\n            }\n          },\n          active: function(text) {\n            text = text || settings.text.active;\n            module.debug('Setting active state');\n            if(settings.showActivity && !module.is.active() ) {\n              $module.addClass(className.active);\n            }\n            module.remove.warning();\n            module.remove.error();\n            module.remove.success();\n            text = settings.onLabelUpdate('active', text, module.value, module.total);\n            if(text) {\n              module.set.label(text);\n            }\n            $bar.one(transitionEnd + eventNamespace, function() {\n              settings.onActive.call(element, module.value, module.total);\n            });\n          },\n          success : function(text) {\n            text = text || settings.text.success || settings.text.active;\n            module.debug('Setting success state');\n            $module.addClass(className.success);\n            module.remove.active();\n            module.remove.warning();\n            module.remove.error();\n            module.complete();\n            if(settings.text.success) {\n              text = settings.onLabelUpdate('success', text, module.value, module.total);\n              module.set.label(text);\n            }\n            else {\n              text = settings.onLabelUpdate('active', text, module.value, module.total);\n              module.set.label(text);\n            }\n            $bar.one(transitionEnd + eventNamespace, function() {\n              settings.onSuccess.call(element, module.total);\n            });\n          },\n          warning : function(text) {\n            text = text || settings.text.warning;\n            module.debug('Setting warning state');\n            $module.addClass(className.warning);\n            module.remove.active();\n            module.remove.success();\n            module.remove.error();\n            module.complete();\n            text = settings.onLabelUpdate('warning', text, module.value, module.total);\n            if(text) {\n              module.set.label(text);\n            }\n            $bar.one(transitionEnd + eventNamespace, function() {\n              settings.onWarning.call(element, module.value, module.total);\n            });\n          },\n          error : function(text) {\n            text = text || settings.text.error;\n            module.debug('Setting error state');\n            $module.addClass(className.error);\n            module.remove.active();\n            module.remove.success();\n            module.remove.warning();\n            module.complete();\n            text = settings.onLabelUpdate('error', text, module.value, module.total);\n            if(text) {\n              module.set.label(text);\n            }\n            $bar.one(transitionEnd + eventNamespace, function() {\n              settings.onError.call(element, module.value, module.total);\n            });\n          },\n          transitionEvent: function() {\n            transitionEnd = module.get.transitionEnd();\n          },\n          total: function(totalValue) {\n            module.total = totalValue;\n          },\n          value: function(value) {\n            module.value = value;\n          },\n          progress: function(value) {\n            if(!module.has.progressPoll()) {\n              module.debug('First update in progress update interval, immediately updating', value);\n              module.update.progress(value);\n              module.create.progressPoll();\n            }\n            else {\n              module.debug('Updated within interval, setting next update to use new value', value);\n              module.set.nextValue(value);\n            }\n          },\n          nextValue: function(value) {\n            module.nextValue = value;\n          }\n        },\n\n        update: {\n          toNextValue: function() {\n            var\n              nextValue = module.nextValue\n            ;\n            if(nextValue) {\n              module.debug('Update interval complete using last updated value', nextValue);\n              module.update.progress(nextValue);\n              module.remove.nextValue();\n            }\n          },\n          progress: function(value) {\n            var\n              percentComplete\n            ;\n            value = module.get.numericValue(value);\n            if(value === false) {\n              module.error(error.nonNumeric, value);\n            }\n            value = module.get.normalizedValue(value);\n            if( module.has.total() ) {\n              module.set.value(value);\n              percentComplete = (value / module.total) * 100;\n              module.debug('Calculating percent complete from total', percentComplete);\n              module.set.percent( percentComplete );\n            }\n            else {\n              percentComplete = value;\n              module.debug('Setting value to exact percentage value', percentComplete);\n              module.set.percent( percentComplete );\n            }\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.progress.settings = {\n\n  name         : 'Progress',\n  namespace    : 'progress',\n\n  silent       : false,\n  debug        : false,\n  verbose      : false,\n  performance  : true,\n\n  random       : {\n    min : 2,\n    max : 5\n  },\n\n  duration       : 300,\n\n  updateInterval : 'auto',\n\n  autoSuccess    : true,\n  showActivity   : true,\n  limitValues    : true,\n\n  label          : 'percent',\n  precision      : 0,\n  framerate      : (1000 / 30), /// 30 fps\n\n  percent        : false,\n  total          : false,\n  value          : false,\n\n  onLabelUpdate : function(state, text, value, total){\n    return text;\n  },\n  onChange      : function(percent, value, total){},\n  onSuccess     : function(total){},\n  onActive      : function(value, total){},\n  onError       : function(value, total){},\n  onWarning     : function(value, total){},\n\n  error    : {\n    method     : 'The method you called is not defined.',\n    nonNumeric : 'Progress value is non numeric',\n    tooHigh    : 'Value specified is above 100%',\n    tooLow     : 'Value specified is below 0%'\n  },\n\n  regExp: {\n    variable: /\\{\\$*[A-z0-9]+\\}/g\n  },\n\n  metadata: {\n    percent : 'percent',\n    total   : 'total',\n    value   : 'value'\n  },\n\n  selector : {\n    bar      : '> .bar',\n    label    : '> .label',\n    progress : '.bar > .progress'\n  },\n\n  text : {\n    active  : false,\n    error   : false,\n    success : false,\n    warning : false,\n    percent : '{percent}%',\n    ratio   : '{value} of {total}'\n  },\n\n  className : {\n    active  : 'active',\n    error   : 'error',\n    success : 'success',\n    warning : 'warning'\n  }\n\n};\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Rating\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.rating = function(parameters) {\n  var\n    $allModules     = $(this),\n    moduleSelector  = $allModules.selector || '',\n\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n    returnedValue\n  ;\n  $allModules\n    .each(function() {\n      var\n        settings        = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.rating.settings, parameters)\n          : $.extend({}, $.fn.rating.settings),\n\n        namespace       = settings.namespace,\n        className       = settings.className,\n        metadata        = settings.metadata,\n        selector        = settings.selector,\n        error           = settings.error,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        element         = this,\n        instance        = $(this).data(moduleNamespace),\n\n        $module         = $(this),\n        $icon           = $module.find(selector.icon),\n\n        initialLoad,\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.verbose('Initializing rating module', settings);\n\n          if($icon.length === 0) {\n            module.setup.layout();\n          }\n\n          if(settings.interactive) {\n            module.enable();\n          }\n          else {\n            module.disable();\n          }\n          module.set.initialLoad();\n          module.set.rating( module.get.initialRating() );\n          module.remove.initialLoad();\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Instantiating module', settings);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous instance', instance);\n          module.remove.events();\n          $module\n            .removeData(moduleNamespace)\n          ;\n        },\n\n        refresh: function() {\n          $icon   = $module.find(selector.icon);\n        },\n\n        setup: {\n          layout: function() {\n            var\n              maxRating = module.get.maxRating(),\n              html      = $.fn.rating.settings.templates.icon(maxRating)\n            ;\n            module.debug('Generating icon html dynamically');\n            $module\n              .html(html)\n            ;\n            module.refresh();\n          }\n        },\n\n        event: {\n          mouseenter: function() {\n            var\n              $activeIcon = $(this)\n            ;\n            $activeIcon\n              .nextAll()\n                .removeClass(className.selected)\n            ;\n            $module\n              .addClass(className.selected)\n            ;\n            $activeIcon\n              .addClass(className.selected)\n                .prevAll()\n                .addClass(className.selected)\n            ;\n          },\n          mouseleave: function() {\n            $module\n              .removeClass(className.selected)\n            ;\n            $icon\n              .removeClass(className.selected)\n            ;\n          },\n          click: function() {\n            var\n              $activeIcon   = $(this),\n              currentRating = module.get.rating(),\n              rating        = $icon.index($activeIcon) + 1,\n              canClear      = (settings.clearable == 'auto')\n               ? ($icon.length === 1)\n               : settings.clearable\n            ;\n            if(canClear && currentRating == rating) {\n              module.clearRating();\n            }\n            else {\n              module.set.rating( rating );\n            }\n          }\n        },\n\n        clearRating: function() {\n          module.debug('Clearing current rating');\n          module.set.rating(0);\n        },\n\n        bind: {\n          events: function() {\n            module.verbose('Binding events');\n            $module\n              .on('mouseenter' + eventNamespace, selector.icon, module.event.mouseenter)\n              .on('mouseleave' + eventNamespace, selector.icon, module.event.mouseleave)\n              .on('click'      + eventNamespace, selector.icon, module.event.click)\n            ;\n          }\n        },\n\n        remove: {\n          events: function() {\n            module.verbose('Removing events');\n            $module\n              .off(eventNamespace)\n            ;\n          },\n          initialLoad: function() {\n            initialLoad = false;\n          }\n        },\n\n        enable: function() {\n          module.debug('Setting rating to interactive mode');\n          module.bind.events();\n          $module\n            .removeClass(className.disabled)\n          ;\n        },\n\n        disable: function() {\n          module.debug('Setting rating to read-only mode');\n          module.remove.events();\n          $module\n            .addClass(className.disabled)\n          ;\n        },\n\n        is: {\n          initialLoad: function() {\n            return initialLoad;\n          }\n        },\n\n        get: {\n          initialRating: function() {\n            if($module.data(metadata.rating) !== undefined) {\n              $module.removeData(metadata.rating);\n              return $module.data(metadata.rating);\n            }\n            return settings.initialRating;\n          },\n          maxRating: function() {\n            if($module.data(metadata.maxRating) !== undefined) {\n              $module.removeData(metadata.maxRating);\n              return $module.data(metadata.maxRating);\n            }\n            return settings.maxRating;\n          },\n          rating: function() {\n            var\n              currentRating = $icon.filter('.' + className.active).length\n            ;\n            module.verbose('Current rating retrieved', currentRating);\n            return currentRating;\n          }\n        },\n\n        set: {\n          rating: function(rating) {\n            var\n              ratingIndex = (rating - 1 >= 0)\n                ? (rating - 1)\n                : 0,\n              $activeIcon = $icon.eq(ratingIndex)\n            ;\n            $module\n              .removeClass(className.selected)\n            ;\n            $icon\n              .removeClass(className.selected)\n              .removeClass(className.active)\n            ;\n            if(rating > 0) {\n              module.verbose('Setting current rating to', rating);\n              $activeIcon\n                .prevAll()\n                .addBack()\n                  .addClass(className.active)\n              ;\n            }\n            if(!module.is.initialLoad()) {\n              settings.onRate.call(element, rating);\n            }\n          },\n          initialLoad: function() {\n            initialLoad = true;\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if($allModules.length > 1) {\n              title += ' ' + '(' + $allModules.length + ')';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.rating.settings = {\n\n  name          : 'Rating',\n  namespace     : 'rating',\n\n  slent         : false,\n  debug         : false,\n  verbose       : false,\n  performance   : true,\n\n  initialRating : 0,\n  interactive   : true,\n  maxRating     : 4,\n  clearable     : 'auto',\n\n  fireOnInit    : false,\n\n  onRate        : function(rating){},\n\n  error         : {\n    method    : 'The method you called is not defined',\n    noMaximum : 'No maximum rating specified. Cannot generate HTML automatically'\n  },\n\n\n  metadata: {\n    rating    : 'rating',\n    maxRating : 'maxRating'\n  },\n\n  className : {\n    active   : 'active',\n    disabled : 'disabled',\n    selected : 'selected',\n    loading  : 'loading'\n  },\n\n  selector  : {\n    icon : '.icon'\n  },\n\n  templates: {\n    icon: function(maxRating) {\n      var\n        icon = 1,\n        html = ''\n      ;\n      while(icon <= maxRating) {\n        html += '<i class=\"icon\"></i>';\n        icon++;\n      }\n      return html;\n    }\n  }\n\n};\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Search\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.search = function(parameters) {\n  var\n    $allModules     = $(this),\n    moduleSelector  = $allModules.selector || '',\n\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n    returnedValue\n  ;\n  $(this)\n    .each(function() {\n      var\n        settings          = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.search.settings, parameters)\n          : $.extend({}, $.fn.search.settings),\n\n        className       = settings.className,\n        metadata        = settings.metadata,\n        regExp          = settings.regExp,\n        fields          = settings.fields,\n        selector        = settings.selector,\n        error           = settings.error,\n        namespace       = settings.namespace,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = namespace + '-module',\n\n        $module         = $(this),\n        $prompt         = $module.find(selector.prompt),\n        $searchButton   = $module.find(selector.searchButton),\n        $results        = $module.find(selector.results),\n        $result         = $module.find(selector.result),\n        $category       = $module.find(selector.category),\n\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n\n        disabledBubbled = false,\n\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.verbose('Initializing module');\n          module.determine.searchFields();\n          module.bind.events();\n          module.set.type();\n          module.create.results();\n          module.instantiate();\n        },\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n        destroy: function() {\n          module.verbose('Destroying instance');\n          $module\n            .off(eventNamespace)\n            .removeData(moduleNamespace)\n          ;\n        },\n\n        refresh: function() {\n          module.debug('Refreshing selector cache');\n          $prompt         = $module.find(selector.prompt);\n          $searchButton   = $module.find(selector.searchButton);\n          $category       = $module.find(selector.category);\n          $results        = $module.find(selector.results);\n          $result         = $module.find(selector.result);\n        },\n\n        refreshResults: function() {\n          $results = $module.find(selector.results);\n          $result  = $module.find(selector.result);\n        },\n\n        bind: {\n          events: function() {\n            module.verbose('Binding events to search');\n            if(settings.automatic) {\n              $module\n                .on(module.get.inputEvent() + eventNamespace, selector.prompt, module.event.input)\n              ;\n              $prompt\n                .attr('autocomplete', 'off')\n              ;\n            }\n            $module\n              // prompt\n              .on('focus'     + eventNamespace, selector.prompt, module.event.focus)\n              .on('blur'      + eventNamespace, selector.prompt, module.event.blur)\n              .on('keydown'   + eventNamespace, selector.prompt, module.handleKeyboard)\n              // search button\n              .on('click'     + eventNamespace, selector.searchButton, module.query)\n              // results\n              .on('mousedown' + eventNamespace, selector.results, module.event.result.mousedown)\n              .on('mouseup'   + eventNamespace, selector.results, module.event.result.mouseup)\n              .on('click'     + eventNamespace, selector.result,  module.event.result.click)\n            ;\n          }\n        },\n\n        determine: {\n          searchFields: function() {\n            // this makes sure $.extend does not add specified search fields to default fields\n            // this is the only setting which should not extend defaults\n            if(parameters && parameters.searchFields !== undefined) {\n              settings.searchFields = parameters.searchFields;\n            }\n          }\n        },\n\n        event: {\n          input: function() {\n            clearTimeout(module.timer);\n            module.timer = setTimeout(module.query, settings.searchDelay);\n          },\n          focus: function() {\n            module.set.focus();\n            if( module.has.minimumCharacters() ) {\n              module.query();\n              if( module.can.show() ) {\n                module.showResults();\n              }\n            }\n          },\n          blur: function(event) {\n            var\n              pageLostFocus = (document.activeElement === this),\n              callback      = function() {\n                module.cancel.query();\n                module.remove.focus();\n                module.timer = setTimeout(module.hideResults, settings.hideDelay);\n              }\n            ;\n            if(pageLostFocus) {\n              return;\n            }\n            if(module.resultsClicked) {\n              module.debug('Determining if user action caused search to close');\n              $module\n                .one('click.close' + eventNamespace, selector.results, function(event) {\n                  if(module.is.inMessage(event) || disabledBubbled) {\n                    $prompt.focus();\n                    return;\n                  }\n                  disabledBubbled = false;\n                  if( !module.is.animating() && !module.is.hidden()) {\n                    callback();\n                  }\n                })\n              ;\n            }\n            else {\n              module.debug('Input blurred without user action, closing results');\n              callback();\n            }\n          },\n          result: {\n            mousedown: function() {\n              module.resultsClicked = true;\n            },\n            mouseup: function() {\n              module.resultsClicked = false;\n            },\n            click: function(event) {\n              module.debug('Search result selected');\n              var\n                $result = $(this),\n                $title  = $result.find(selector.title).eq(0),\n                $link   = $result.is('a[href]')\n                  ? $result\n                  : $result.find('a[href]').eq(0),\n                href    = $link.attr('href')   || false,\n                target  = $link.attr('target') || false,\n                title   = $title.html(),\n                // title is used for result lookup\n                value   = ($title.length > 0)\n                  ? $title.text()\n                  : false,\n                results = module.get.results(),\n                result  = $result.data(metadata.result) || module.get.result(value, results),\n                returnedValue\n              ;\n              if( $.isFunction(settings.onSelect) ) {\n                if(settings.onSelect.call(element, result, results) === false) {\n                  module.debug('Custom onSelect callback cancelled default select action');\n                  disabledBubbled = true;\n                  return;\n                }\n              }\n              module.hideResults();\n              if(value) {\n                module.set.value(value);\n              }\n              if(href) {\n                module.verbose('Opening search link found in result', $link);\n                if(target == '_blank' || event.ctrlKey) {\n                  window.open(href);\n                }\n                else {\n                  window.location.href = (href);\n                }\n              }\n            }\n          }\n        },\n        handleKeyboard: function(event) {\n          var\n            // force selector refresh\n            $result      = $module.find(selector.result),\n            $category    = $module.find(selector.category),\n            currentIndex = $result.index( $result.filter('.' + className.active) ),\n            resultSize   = $result.length,\n\n            keyCode      = event.which,\n            keys         = {\n              backspace : 8,\n              enter     : 13,\n              escape    : 27,\n              upArrow   : 38,\n              downArrow : 40\n            },\n            newIndex\n          ;\n          // search shortcuts\n          if(keyCode == keys.escape) {\n            module.verbose('Escape key pressed, blurring search field');\n            module.trigger.blur();\n          }\n          if( module.is.visible() ) {\n            if(keyCode == keys.enter) {\n              module.verbose('Enter key pressed, selecting active result');\n              if( $result.filter('.' + className.active).length > 0 ) {\n                module.event.result.click.call($result.filter('.' + className.active), event);\n                event.preventDefault();\n                return false;\n              }\n            }\n            else if(keyCode == keys.upArrow) {\n              module.verbose('Up key pressed, changing active result');\n              newIndex = (currentIndex - 1 < 0)\n                ? currentIndex\n                : currentIndex - 1\n              ;\n              $category\n                .removeClass(className.active)\n              ;\n              $result\n                .removeClass(className.active)\n                .eq(newIndex)\n                  .addClass(className.active)\n                  .closest($category)\n                    .addClass(className.active)\n              ;\n              event.preventDefault();\n            }\n            else if(keyCode == keys.downArrow) {\n              module.verbose('Down key pressed, changing active result');\n              newIndex = (currentIndex + 1 >= resultSize)\n                ? currentIndex\n                : currentIndex + 1\n              ;\n              $category\n                .removeClass(className.active)\n              ;\n              $result\n                .removeClass(className.active)\n                .eq(newIndex)\n                  .addClass(className.active)\n                  .closest($category)\n                    .addClass(className.active)\n              ;\n              event.preventDefault();\n            }\n          }\n          else {\n            // query shortcuts\n            if(keyCode == keys.enter) {\n              module.verbose('Enter key pressed, executing query');\n              module.query();\n              module.set.buttonPressed();\n              $prompt.one('keyup', module.remove.buttonFocus);\n            }\n          }\n        },\n\n        setup: {\n          api: function(searchTerm) {\n            var\n              apiSettings = {\n                debug             : settings.debug,\n                on                : false,\n                cache             : true,\n                action            : 'search',\n                urlData           : {\n                  query : searchTerm\n                },\n                onSuccess         : function(response) {\n                  module.parse.response.call(element, response, searchTerm);\n                },\n                onAbort           : function(response) {\n                },\n                onFailure         : function() {\n                  module.displayMessage(error.serverError);\n                },\n                onError           : module.error\n              },\n              searchHTML\n            ;\n            $.extend(true, apiSettings, settings.apiSettings);\n            module.verbose('Setting up API request', apiSettings);\n            $module.api(apiSettings);\n          }\n        },\n\n        can: {\n          useAPI: function() {\n            return $.fn.api !== undefined;\n          },\n          show: function() {\n            return module.is.focused() && !module.is.visible() && !module.is.empty();\n          },\n          transition: function() {\n            return settings.transition && $.fn.transition !== undefined && $module.transition('is supported');\n          }\n        },\n\n        is: {\n          animating: function() {\n            return $results.hasClass(className.animating);\n          },\n          hidden: function() {\n            return $results.hasClass(className.hidden);\n          },\n          inMessage: function(event) {\n            return (event.target && $(event.target).closest(selector.message).length > 0);\n          },\n          empty: function() {\n            return ($results.html() === '');\n          },\n          visible: function() {\n            return ($results.filter(':visible').length > 0);\n          },\n          focused: function() {\n            return ($prompt.filter(':focus').length > 0);\n          }\n        },\n\n        trigger: {\n          blur: function() {\n            var\n              events        = document.createEvent('HTMLEvents'),\n              promptElement = $prompt[0]\n            ;\n            if(promptElement) {\n              module.verbose('Triggering native blur event');\n              events.initEvent('blur', false, false);\n              promptElement.dispatchEvent(events);\n            }\n          }\n        },\n\n        get: {\n          inputEvent: function() {\n            var\n              prompt = $prompt[0],\n              inputEvent   = (prompt !== undefined && prompt.oninput !== undefined)\n                ? 'input'\n                : (prompt !== undefined && prompt.onpropertychange !== undefined)\n                  ? 'propertychange'\n                  : 'keyup'\n            ;\n            return inputEvent;\n          },\n          value: function() {\n            return $prompt.val();\n          },\n          results: function() {\n            var\n              results = $module.data(metadata.results)\n            ;\n            return results;\n          },\n          result: function(value, results) {\n            var\n              lookupFields = ['title', 'id'],\n              result       = false\n            ;\n            value = (value !== undefined)\n              ? value\n              : module.get.value()\n            ;\n            results = (results !== undefined)\n              ? results\n              : module.get.results()\n            ;\n            if(settings.type === 'category') {\n              module.debug('Finding result that matches', value);\n              $.each(results, function(index, category) {\n                if($.isArray(category.results)) {\n                  result = module.search.object(value, category.results, lookupFields)[0];\n                  // don't continue searching if a result is found\n                  if(result) {\n                    return false;\n                  }\n                }\n              });\n            }\n            else {\n              module.debug('Finding result in results object', value);\n              result = module.search.object(value, results, lookupFields)[0];\n            }\n            return result || false;\n          },\n        },\n\n        select: {\n          firstResult: function() {\n            module.verbose('Selecting first result');\n            $result.first().addClass(className.active);\n          }\n        },\n\n        set: {\n          focus: function() {\n            $module.addClass(className.focus);\n          },\n          loading: function() {\n            $module.addClass(className.loading);\n          },\n          value: function(value) {\n            module.verbose('Setting search input value', value);\n            $prompt\n              .val(value)\n            ;\n          },\n          type: function(type) {\n            type = type || settings.type;\n            if(settings.type == 'category') {\n              $module.addClass(settings.type);\n            }\n          },\n          buttonPressed: function() {\n            $searchButton.addClass(className.pressed);\n          }\n        },\n\n        remove: {\n          loading: function() {\n            $module.removeClass(className.loading);\n          },\n          focus: function() {\n            $module.removeClass(className.focus);\n          },\n          buttonPressed: function() {\n            $searchButton.removeClass(className.pressed);\n          }\n        },\n\n        query: function() {\n          var\n            searchTerm = module.get.value(),\n            cache = module.read.cache(searchTerm)\n          ;\n          if( module.has.minimumCharacters() )  {\n            if(cache) {\n              module.debug('Reading result from cache', searchTerm);\n              module.save.results(cache.results);\n              module.addResults(cache.html);\n              module.inject.id(cache.results);\n            }\n            else {\n              module.debug('Querying for', searchTerm);\n              if($.isPlainObject(settings.source) || $.isArray(settings.source)) {\n                module.search.local(searchTerm);\n              }\n              else if( module.can.useAPI() ) {\n                module.search.remote(searchTerm);\n              }\n              else {\n                module.error(error.source);\n              }\n            }\n            settings.onSearchQuery.call(element, searchTerm);\n          }\n          else {\n            module.hideResults();\n          }\n        },\n\n        search: {\n          local: function(searchTerm) {\n            var\n              results = module.search.object(searchTerm, settings.content),\n              searchHTML\n            ;\n            module.set.loading();\n            module.save.results(results);\n            module.debug('Returned local search results', results);\n\n            searchHTML = module.generateResults({\n              results: results\n            });\n            module.remove.loading();\n            module.addResults(searchHTML);\n            module.inject.id(results);\n            module.write.cache(searchTerm, {\n              html    : searchHTML,\n              results : results\n            });\n          },\n          remote: function(searchTerm) {\n            if($module.api('is loading')) {\n              $module.api('abort');\n            }\n            module.setup.api(searchTerm);\n            $module\n              .api('query')\n            ;\n          },\n          object: function(searchTerm, source, searchFields) {\n            var\n              results      = [],\n              fuzzyResults = [],\n              searchExp    = searchTerm.toString().replace(regExp.escape, '\\\\$&'),\n              matchRegExp  = new RegExp(regExp.beginsWith + searchExp, 'i'),\n\n              // avoid duplicates when pushing results\n              addResult = function(array, result) {\n                var\n                  notResult      = ($.inArray(result, results) == -1),\n                  notFuzzyResult = ($.inArray(result, fuzzyResults) == -1)\n                ;\n                if(notResult && notFuzzyResult) {\n                  array.push(result);\n                }\n              }\n            ;\n            source = source || settings.source;\n            searchFields = (searchFields !== undefined)\n              ? searchFields\n              : settings.searchFields\n            ;\n\n            // search fields should be array to loop correctly\n            if(!$.isArray(searchFields)) {\n              searchFields = [searchFields];\n            }\n\n            // exit conditions if no source\n            if(source === undefined || source === false) {\n              module.error(error.source);\n              return [];\n            }\n\n            // iterate through search fields looking for matches\n            $.each(searchFields, function(index, field) {\n              $.each(source, function(label, content) {\n                var\n                  fieldExists = (typeof content[field] == 'string')\n                ;\n                if(fieldExists) {\n                  if( content[field].search(matchRegExp) !== -1) {\n                    // content starts with value (first in results)\n                    addResult(results, content);\n                  }\n                  else if(settings.searchFullText && module.fuzzySearch(searchTerm, content[field]) ) {\n                    // content fuzzy matches (last in results)\n                    addResult(fuzzyResults, content);\n                  }\n                }\n              });\n            });\n            return $.merge(results, fuzzyResults);\n          }\n        },\n\n        fuzzySearch: function(query, term) {\n          var\n            termLength  = term.length,\n            queryLength = query.length\n          ;\n          if(typeof query !== 'string') {\n            return false;\n          }\n          query = query.toLowerCase();\n          term  = term.toLowerCase();\n          if(queryLength > termLength) {\n            return false;\n          }\n          if(queryLength === termLength) {\n            return (query === term);\n          }\n          search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {\n            var\n              queryCharacter = query.charCodeAt(characterIndex)\n            ;\n            while(nextCharacterIndex < termLength) {\n              if(term.charCodeAt(nextCharacterIndex++) === queryCharacter) {\n                continue search;\n              }\n            }\n            return false;\n          }\n          return true;\n        },\n\n        parse: {\n          response: function(response, searchTerm) {\n            var\n              searchHTML = module.generateResults(response)\n            ;\n            module.verbose('Parsing server response', response);\n            if(response !== undefined) {\n              if(searchTerm !== undefined && response[fields.results] !== undefined) {\n                module.addResults(searchHTML);\n                module.inject.id(response[fields.results]);\n                module.write.cache(searchTerm, {\n                  html    : searchHTML,\n                  results : response[fields.results]\n                });\n                module.save.results(response[fields.results]);\n              }\n            }\n          }\n        },\n\n        cancel: {\n          query: function() {\n            if( module.can.useAPI() ) {\n              $module.api('abort');\n            }\n          }\n        },\n\n        has: {\n          minimumCharacters: function() {\n            var\n              searchTerm    = module.get.value(),\n              numCharacters = searchTerm.length\n            ;\n            return (numCharacters >= settings.minCharacters);\n          }\n        },\n\n        clear: {\n          cache: function(value) {\n            var\n              cache = $module.data(metadata.cache)\n            ;\n            if(!value) {\n              module.debug('Clearing cache', value);\n              $module.removeData(metadata.cache);\n            }\n            else if(value && cache && cache[value]) {\n              module.debug('Removing value from cache', value);\n              delete cache[value];\n              $module.data(metadata.cache, cache);\n            }\n          }\n        },\n\n        read: {\n          cache: function(name) {\n            var\n              cache = $module.data(metadata.cache)\n            ;\n            if(settings.cache) {\n              module.verbose('Checking cache for generated html for query', name);\n              return (typeof cache == 'object') && (cache[name] !== undefined)\n                ? cache[name]\n                : false\n              ;\n            }\n            return false;\n          }\n        },\n\n        create: {\n          id: function(resultIndex, categoryIndex) {\n            var\n              resultID      = (resultIndex + 1), // not zero indexed\n              categoryID    = (categoryIndex + 1),\n              firstCharCode,\n              letterID,\n              id\n            ;\n            if(categoryIndex !== undefined) {\n              // start char code for \"A\"\n              letterID = String.fromCharCode(97 + categoryIndex);\n              id          = letterID + resultID;\n              module.verbose('Creating category result id', id);\n            }\n            else {\n              id = resultID;\n              module.verbose('Creating result id', id);\n            }\n            return id;\n          },\n          results: function() {\n            if($results.length === 0) {\n              $results = $('<div />')\n                .addClass(className.results)\n                .appendTo($module)\n              ;\n            }\n          }\n        },\n\n        inject: {\n          result: function(result, resultIndex, categoryIndex) {\n            module.verbose('Injecting result into results');\n            var\n              $selectedResult = (categoryIndex !== undefined)\n                ? $results\n                    .children().eq(categoryIndex)\n                      .children(selector.result).eq(resultIndex)\n                : $results\n                    .children(selector.result).eq(resultIndex)\n            ;\n            module.verbose('Injecting results metadata', $selectedResult);\n            $selectedResult\n              .data(metadata.result, result)\n            ;\n          },\n          id: function(results) {\n            module.debug('Injecting unique ids into results');\n            var\n              // since results may be object, we must use counters\n              categoryIndex = 0,\n              resultIndex   = 0\n            ;\n            if(settings.type === 'category') {\n              // iterate through each category result\n              $.each(results, function(index, category) {\n                resultIndex = 0;\n                $.each(category.results, function(index, value) {\n                  var\n                    result = category.results[index]\n                  ;\n                  if(result.id === undefined) {\n                    result.id = module.create.id(resultIndex, categoryIndex);\n                  }\n                  module.inject.result(result, resultIndex, categoryIndex);\n                  resultIndex++;\n                });\n                categoryIndex++;\n              });\n            }\n            else {\n              // top level\n              $.each(results, function(index, value) {\n                var\n                  result = results[index]\n                ;\n                if(result.id === undefined) {\n                  result.id = module.create.id(resultIndex);\n                }\n                module.inject.result(result, resultIndex);\n                resultIndex++;\n              });\n            }\n            return results;\n          }\n        },\n\n        save: {\n          results: function(results) {\n            module.verbose('Saving current search results to metadata', results);\n            $module.data(metadata.results, results);\n          }\n        },\n\n        write: {\n          cache: function(name, value) {\n            var\n              cache = ($module.data(metadata.cache) !== undefined)\n                ? $module.data(metadata.cache)\n                : {}\n            ;\n            if(settings.cache) {\n              module.verbose('Writing generated html to cache', name, value);\n              cache[name] = value;\n              $module\n                .data(metadata.cache, cache)\n              ;\n            }\n          }\n        },\n\n        addResults: function(html) {\n          if( $.isFunction(settings.onResultsAdd) ) {\n            if( settings.onResultsAdd.call($results, html) === false ) {\n              module.debug('onResultsAdd callback cancelled default action');\n              return false;\n            }\n          }\n          if(html) {\n            $results\n              .html(html)\n            ;\n            module.refreshResults();\n            if(settings.selectFirstResult) {\n              module.select.firstResult();\n            }\n            module.showResults();\n          }\n          else {\n            module.hideResults();\n          }\n        },\n\n        showResults: function() {\n          if(!module.is.visible()) {\n            if( module.can.transition() ) {\n              module.debug('Showing results with css animations');\n              $results\n                .transition({\n                  animation  : settings.transition + ' in',\n                  debug      : settings.debug,\n                  verbose    : settings.verbose,\n                  duration   : settings.duration,\n                  queue      : true\n                })\n              ;\n            }\n            else {\n              module.debug('Showing results with javascript');\n              $results\n                .stop()\n                .fadeIn(settings.duration, settings.easing)\n              ;\n            }\n            settings.onResultsOpen.call($results);\n          }\n        },\n        hideResults: function() {\n          if( module.is.visible() ) {\n            if( module.can.transition() ) {\n              module.debug('Hiding results with css animations');\n              $results\n                .transition({\n                  animation  : settings.transition + ' out',\n                  debug      : settings.debug,\n                  verbose    : settings.verbose,\n                  duration   : settings.duration,\n                  queue      : true\n                })\n              ;\n            }\n            else {\n              module.debug('Hiding results with javascript');\n              $results\n                .stop()\n                .fadeOut(settings.duration, settings.easing)\n              ;\n            }\n            settings.onResultsClose.call($results);\n          }\n        },\n\n        generateResults: function(response) {\n          module.debug('Generating html from response', response);\n          var\n            template       = settings.templates[settings.type],\n            isProperObject = ($.isPlainObject(response[fields.results]) && !$.isEmptyObject(response[fields.results])),\n            isProperArray  = ($.isArray(response[fields.results]) && response[fields.results].length > 0),\n            html           = ''\n          ;\n          if(isProperObject || isProperArray ) {\n            if(settings.maxResults > 0) {\n              if(isProperObject) {\n                if(settings.type == 'standard') {\n                  module.error(error.maxResults);\n                }\n              }\n              else {\n                response[fields.results] = response[fields.results].slice(0, settings.maxResults);\n              }\n            }\n            if($.isFunction(template)) {\n              html = template(response, fields);\n            }\n            else {\n              module.error(error.noTemplate, false);\n            }\n          }\n          else if(settings.showNoResults) {\n            html = module.displayMessage(error.noResults, 'empty');\n          }\n          settings.onResults.call(element, response);\n          return html;\n        },\n\n        displayMessage: function(text, type) {\n          type = type || 'standard';\n          module.debug('Displaying message', text, type);\n          module.addResults( settings.templates.message(text, type) );\n          return settings.templates.message(text, type);\n        },\n\n        setting: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            settings[name] = value;\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if($allModules.length > 1) {\n              title += ' ' + '(' + $allModules.length + ')';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                return false;\n              }\n            });\n          }\n          if( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.search.settings = {\n\n  name              : 'Search',\n  namespace         : 'search',\n\n  silent            : false,\n  debug             : false,\n  verbose           : false,\n  performance       : true,\n\n  // template to use (specified in settings.templates)\n  type              : 'standard',\n\n  // minimum characters required to search\n  minCharacters     : 1,\n\n  // whether to select first result after searching automatically\n  selectFirstResult : false,\n\n  // API config\n  apiSettings       : false,\n\n  // object to search\n  source            : false,\n\n  // fields to search\n  searchFields   : [\n    'title',\n    'description'\n  ],\n\n  // field to display in standard results template\n  displayField   : '',\n\n  // whether to include fuzzy results in local search\n  searchFullText : true,\n\n  // whether to add events to prompt automatically\n  automatic      : true,\n\n  // delay before hiding menu after blur\n  hideDelay      : 0,\n\n  // delay before searching\n  searchDelay    : 200,\n\n  // maximum results returned from local\n  maxResults     : 7,\n\n  // whether to store lookups in local cache\n  cache          : true,\n\n  // whether no results errors should be shown\n  showNoResults  : true,\n\n  // transition settings\n  transition     : 'scale',\n  duration       : 200,\n  easing         : 'easeOutExpo',\n\n  // callbacks\n  onSelect       : false,\n  onResultsAdd   : false,\n\n  onSearchQuery  : function(query){},\n  onResults      : function(response){},\n\n  onResultsOpen  : function(){},\n  onResultsClose : function(){},\n\n  className: {\n    animating : 'animating',\n    active    : 'active',\n    empty     : 'empty',\n    focus     : 'focus',\n    hidden    : 'hidden',\n    loading   : 'loading',\n    results   : 'results',\n    pressed   : 'down'\n  },\n\n  error : {\n    source      : 'Cannot search. No source used, and Semantic API module was not included',\n    noResults   : 'Your search returned no results',\n    logging     : 'Error in debug logging, exiting.',\n    noEndpoint  : 'No search endpoint was specified',\n    noTemplate  : 'A valid template name was not specified.',\n    serverError : 'There was an issue querying the server.',\n    maxResults  : 'Results must be an array to use maxResults setting',\n    method      : 'The method you called is not defined.'\n  },\n\n  metadata: {\n    cache   : 'cache',\n    results : 'results',\n    result  : 'result'\n  },\n\n  regExp: {\n    escape     : /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\n    beginsWith : '(?:\\s|^)'\n  },\n\n  // maps api response attributes to internal representation\n  fields: {\n    categories      : 'results',     // array of categories (category view)\n    categoryName    : 'name',        // name of category (category view)\n    categoryResults : 'results',     // array of results (category view)\n    description     : 'description', // result description\n    image           : 'image',       // result image\n    price           : 'price',       // result price\n    results         : 'results',     // array of results (standard)\n    title           : 'title',       // result title\n    url             : 'url',         // result url\n    action          : 'action',      // \"view more\" object name\n    actionText      : 'text',        // \"view more\" text\n    actionURL       : 'url'          // \"view more\" url\n  },\n\n  selector : {\n    prompt       : '.prompt',\n    searchButton : '.search.button',\n    results      : '.results',\n    message      : '.results > .message',\n    category     : '.category',\n    result       : '.result',\n    title        : '.title, .name'\n  },\n\n  templates: {\n    escape: function(string) {\n      var\n        badChars     = /[&<>\"'`]/g,\n        shouldEscape = /[&<>\"'`]/,\n        escape       = {\n          \"&\": \"&amp;\",\n          \"<\": \"&lt;\",\n          \">\": \"&gt;\",\n          '\"': \"&quot;\",\n          \"'\": \"&#x27;\",\n          \"`\": \"&#x60;\"\n        },\n        escapedChar  = function(chr) {\n          return escape[chr];\n        }\n      ;\n      if(shouldEscape.test(string)) {\n        return string.replace(badChars, escapedChar);\n      }\n      return string;\n    },\n    message: function(message, type) {\n      var\n        html = ''\n      ;\n      if(message !== undefined && type !== undefined) {\n        html +=  ''\n          + '<div class=\"message ' + type + '\">'\n        ;\n        // message type\n        if(type == 'empty') {\n          html += ''\n            + '<div class=\"header\">No Results</div class=\"header\">'\n            + '<div class=\"description\">' + message + '</div class=\"description\">'\n          ;\n        }\n        else {\n          html += ' <div class=\"description\">' + message + '</div>';\n        }\n        html += '</div>';\n      }\n      return html;\n    },\n    category: function(response, fields) {\n      var\n        html = '',\n        escape = $.fn.search.settings.templates.escape\n      ;\n      if(response[fields.categoryResults] !== undefined) {\n\n        // each category\n        $.each(response[fields.categoryResults], function(index, category) {\n          if(category[fields.results] !== undefined && category.results.length > 0) {\n\n            html  += '<div class=\"category\">';\n\n            if(category[fields.categoryName] !== undefined) {\n              html += '<div class=\"name\">' + category[fields.categoryName] + '</div>';\n            }\n\n            // each item inside category\n            $.each(category.results, function(index, result) {\n              if(result[fields.url]) {\n                html  += '<a class=\"result\" href=\"' + result[fields.url] + '\">';\n              }\n              else {\n                html  += '<a class=\"result\">';\n              }\n              if(result[fields.image] !== undefined) {\n                html += ''\n                  + '<div class=\"image\">'\n                  + ' <img src=\"' + result[fields.image] + '\">'\n                  + '</div>'\n                ;\n              }\n              html += '<div class=\"content\">';\n              if(result[fields.price] !== undefined) {\n                html += '<div class=\"price\">' + result[fields.price] + '</div>';\n              }\n              if(result[fields.title] !== undefined) {\n                html += '<div class=\"title\">' + result[fields.title] + '</div>';\n              }\n              if(result[fields.description] !== undefined) {\n                html += '<div class=\"description\">' + result[fields.description] + '</div>';\n              }\n              html  += ''\n                + '</div>'\n              ;\n              html += '</a>';\n            });\n            html  += ''\n              + '</div>'\n            ;\n          }\n        });\n        if(response[fields.action]) {\n          html += ''\n          + '<a href=\"' + response[fields.action][fields.actionURL] + '\" class=\"action\">'\n          +   response[fields.action][fields.actionText]\n          + '</a>';\n        }\n        return html;\n      }\n      return false;\n    },\n    standard: function(response, fields) {\n      var\n        html = ''\n      ;\n      if(response[fields.results] !== undefined) {\n\n        // each result\n        $.each(response[fields.results], function(index, result) {\n          if(result[fields.url]) {\n            html  += '<a class=\"result\" href=\"' + result[fields.url] + '\">';\n          }\n          else {\n            html  += '<a class=\"result\">';\n          }\n          if(result[fields.image] !== undefined) {\n            html += ''\n              + '<div class=\"image\">'\n              + ' <img src=\"' + result[fields.image] + '\">'\n              + '</div>'\n            ;\n          }\n          html += '<div class=\"content\">';\n          if(result[fields.price] !== undefined) {\n            html += '<div class=\"price\">' + result[fields.price] + '</div>';\n          }\n          if(result[fields.title] !== undefined) {\n            html += '<div class=\"title\">' + result[fields.title] + '</div>';\n          }\n          if(result[fields.description] !== undefined) {\n            html += '<div class=\"description\">' + result[fields.description] + '</div>';\n          }\n          html  += ''\n            + '</div>'\n          ;\n          html += '</a>';\n        });\n\n        if(response[fields.action]) {\n          html += ''\n          + '<a href=\"' + response[fields.action][fields.actionURL] + '\" class=\"action\">'\n          +   response[fields.action][fields.actionText]\n          + '</a>';\n        }\n        return html;\n      }\n      return false;\n    }\n  }\n};\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Shape\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.shape = function(parameters) {\n  var\n    $allModules     = $(this),\n    $body           = $('body'),\n\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n\n    requestAnimationFrame = window.requestAnimationFrame\n      || window.mozRequestAnimationFrame\n      || window.webkitRequestAnimationFrame\n      || window.msRequestAnimationFrame\n      || function(callback) { setTimeout(callback, 0); },\n\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        moduleSelector = $allModules.selector || '',\n        settings       = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.shape.settings, parameters)\n          : $.extend({}, $.fn.shape.settings),\n\n        // internal aliases\n        namespace     = settings.namespace,\n        selector      = settings.selector,\n        error         = settings.error,\n        className     = settings.className,\n\n        // define namespaces for modules\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        // selector cache\n        $module       = $(this),\n        $sides        = $module.find(selector.sides),\n        $side         = $module.find(selector.side),\n\n        // private variables\n        nextIndex = false,\n        $activeSide,\n        $nextSide,\n\n        // standard module\n        element       = this,\n        instance      = $module.data(moduleNamespace),\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.verbose('Initializing module for', element);\n          module.set.defaultSide();\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, instance)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous module for', element);\n          $module\n            .removeData(moduleNamespace)\n            .off(eventNamespace)\n          ;\n        },\n\n        refresh: function() {\n          module.verbose('Refreshing selector cache for', element);\n          $module = $(element);\n          $sides  = $(this).find(selector.shape);\n          $side   = $(this).find(selector.side);\n        },\n\n        repaint: function() {\n          module.verbose('Forcing repaint event');\n          var\n            shape          = $sides[0] || document.createElement('div'),\n            fakeAssignment = shape.offsetWidth\n          ;\n        },\n\n        animate: function(propertyObject, callback) {\n          module.verbose('Animating box with properties', propertyObject);\n          callback = callback || function(event) {\n            module.verbose('Executing animation callback');\n            if(event !== undefined) {\n              event.stopPropagation();\n            }\n            module.reset();\n            module.set.active();\n          };\n          settings.beforeChange.call($nextSide[0]);\n          if(module.get.transitionEvent()) {\n            module.verbose('Starting CSS animation');\n            $module\n              .addClass(className.animating)\n            ;\n            $sides\n              .css(propertyObject)\n              .one(module.get.transitionEvent(), callback)\n            ;\n            module.set.duration(settings.duration);\n            requestAnimationFrame(function() {\n              $module\n                .addClass(className.animating)\n              ;\n              $activeSide\n                .addClass(className.hidden)\n              ;\n            });\n          }\n          else {\n            callback();\n          }\n        },\n\n        queue: function(method) {\n          module.debug('Queueing animation of', method);\n          $sides\n            .one(module.get.transitionEvent(), function() {\n              module.debug('Executing queued animation');\n              setTimeout(function(){\n                $module.shape(method);\n              }, 0);\n            })\n          ;\n        },\n\n        reset: function() {\n          module.verbose('Animating states reset');\n          $module\n            .removeClass(className.animating)\n            .attr('style', '')\n            .removeAttr('style')\n          ;\n          // removeAttr style does not consistently work in safari\n          $sides\n            .attr('style', '')\n            .removeAttr('style')\n          ;\n          $side\n            .attr('style', '')\n            .removeAttr('style')\n            .removeClass(className.hidden)\n          ;\n          $nextSide\n            .removeClass(className.animating)\n            .attr('style', '')\n            .removeAttr('style')\n          ;\n        },\n\n        is: {\n          complete: function() {\n            return ($side.filter('.' + className.active)[0] == $nextSide[0]);\n          },\n          animating: function() {\n            return $module.hasClass(className.animating);\n          }\n        },\n\n        set: {\n\n          defaultSide: function() {\n            $activeSide = $module.find('.' + settings.className.active);\n            $nextSide   = ( $activeSide.next(selector.side).length > 0 )\n              ? $activeSide.next(selector.side)\n              : $module.find(selector.side).first()\n            ;\n            nextIndex = false;\n            module.verbose('Active side set to', $activeSide);\n            module.verbose('Next side set to', $nextSide);\n          },\n\n          duration: function(duration) {\n            duration = duration || settings.duration;\n            duration = (typeof duration == 'number')\n              ? duration + 'ms'\n              : duration\n            ;\n            module.verbose('Setting animation duration', duration);\n            if(settings.duration || settings.duration === 0) {\n              $sides.add($side)\n                .css({\n                  '-webkit-transition-duration': duration,\n                  '-moz-transition-duration': duration,\n                  '-ms-transition-duration': duration,\n                  '-o-transition-duration': duration,\n                  'transition-duration': duration\n                })\n              ;\n            }\n          },\n\n          currentStageSize: function() {\n            var\n              $activeSide = $module.find('.' + settings.className.active),\n              width       = $activeSide.outerWidth(true),\n              height      = $activeSide.outerHeight(true)\n            ;\n            $module\n              .css({\n                width: width,\n                height: height\n              })\n            ;\n          },\n\n          stageSize: function() {\n            var\n              $clone      = $module.clone().addClass(className.loading),\n              $activeSide = $clone.find('.' + settings.className.active),\n              $nextSide   = (nextIndex)\n                ? $clone.find(selector.side).eq(nextIndex)\n                : ( $activeSide.next(selector.side).length > 0 )\n                  ? $activeSide.next(selector.side)\n                  : $clone.find(selector.side).first(),\n              newWidth    = (settings.width == 'next')\n                ? $nextSide.outerWidth(true)\n                : (settings.width == 'initial')\n                  ? $module.width()\n                  : settings.width,\n              newHeight    = (settings.height == 'next')\n                ? $nextSide.outerHeight(true)\n                : (settings.height == 'initial')\n                  ? $module.height()\n                  : settings.height\n            ;\n            $activeSide.removeClass(className.active);\n            $nextSide.addClass(className.active);\n            $clone.insertAfter($module);\n            $clone.remove();\n            if(settings.width != 'auto') {\n              $module.css('width', newWidth + settings.jitter);\n              module.verbose('Specifying width during animation', newWidth);\n            }\n            if(settings.height != 'auto') {\n              $module.css('height', newHeight + settings.jitter);\n              module.verbose('Specifying height during animation', newHeight);\n            }\n          },\n\n          nextSide: function(selector) {\n            nextIndex = selector;\n            $nextSide = $side.filter(selector);\n            nextIndex = $side.index($nextSide);\n            if($nextSide.length === 0) {\n              module.set.defaultSide();\n              module.error(error.side);\n            }\n            module.verbose('Next side manually set to', $nextSide);\n          },\n\n          active: function() {\n            module.verbose('Setting new side to active', $nextSide);\n            $side\n              .removeClass(className.active)\n            ;\n            $nextSide\n              .addClass(className.active)\n            ;\n            settings.onChange.call($nextSide[0]);\n            module.set.defaultSide();\n          }\n        },\n\n        flip: {\n\n          up: function() {\n            if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {\n              module.debug('Side already visible', $nextSide);\n              return;\n            }\n            if( !module.is.animating()) {\n              module.debug('Flipping up', $nextSide);\n              var\n                transform = module.get.transform.up()\n              ;\n              module.set.stageSize();\n              module.stage.above();\n              module.animate(transform);\n            }\n            else {\n              module.queue('flip up');\n            }\n          },\n\n          down: function() {\n            if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {\n              module.debug('Side already visible', $nextSide);\n              return;\n            }\n            if( !module.is.animating()) {\n              module.debug('Flipping down', $nextSide);\n              var\n                transform = module.get.transform.down()\n              ;\n              module.set.stageSize();\n              module.stage.below();\n              module.animate(transform);\n            }\n            else {\n              module.queue('flip down');\n            }\n          },\n\n          left: function() {\n            if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {\n              module.debug('Side already visible', $nextSide);\n              return;\n            }\n            if( !module.is.animating()) {\n              module.debug('Flipping left', $nextSide);\n              var\n                transform = module.get.transform.left()\n              ;\n              module.set.stageSize();\n              module.stage.left();\n              module.animate(transform);\n            }\n            else {\n              module.queue('flip left');\n            }\n          },\n\n          right: function() {\n            if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {\n              module.debug('Side already visible', $nextSide);\n              return;\n            }\n            if( !module.is.animating()) {\n              module.debug('Flipping right', $nextSide);\n              var\n                transform = module.get.transform.right()\n              ;\n              module.set.stageSize();\n              module.stage.right();\n              module.animate(transform);\n            }\n            else {\n              module.queue('flip right');\n            }\n          },\n\n          over: function() {\n            if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {\n              module.debug('Side already visible', $nextSide);\n              return;\n            }\n            if( !module.is.animating()) {\n              module.debug('Flipping over', $nextSide);\n              module.set.stageSize();\n              module.stage.behind();\n              module.animate(module.get.transform.over() );\n            }\n            else {\n              module.queue('flip over');\n            }\n          },\n\n          back: function() {\n            if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {\n              module.debug('Side already visible', $nextSide);\n              return;\n            }\n            if( !module.is.animating()) {\n              module.debug('Flipping back', $nextSide);\n              module.set.stageSize();\n              module.stage.behind();\n              module.animate(module.get.transform.back() );\n            }\n            else {\n              module.queue('flip back');\n            }\n          }\n\n        },\n\n        get: {\n\n          transform: {\n            up: function() {\n              var\n                translate = {\n                  y: -(($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2),\n                  z: -($activeSide.outerHeight(true) / 2)\n                }\n              ;\n              return {\n                transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(-90deg)'\n              };\n            },\n\n            down: function() {\n              var\n                translate = {\n                  y: -(($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2),\n                  z: -($activeSide.outerHeight(true) / 2)\n                }\n              ;\n              return {\n                transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(90deg)'\n              };\n            },\n\n            left: function() {\n              var\n                translate = {\n                  x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2),\n                  z : -($activeSide.outerWidth(true) / 2)\n                }\n              ;\n              return {\n                transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(90deg)'\n              };\n            },\n\n            right: function() {\n              var\n                translate = {\n                  x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2),\n                  z : -($activeSide.outerWidth(true) / 2)\n                }\n              ;\n              return {\n                transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(-90deg)'\n              };\n            },\n\n            over: function() {\n              var\n                translate = {\n                  x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2)\n                }\n              ;\n              return {\n                transform: 'translateX(' + translate.x + 'px) rotateY(180deg)'\n              };\n            },\n\n            back: function() {\n              var\n                translate = {\n                  x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2)\n                }\n              ;\n              return {\n                transform: 'translateX(' + translate.x + 'px) rotateY(-180deg)'\n              };\n            }\n          },\n\n          transitionEvent: function() {\n            var\n              element     = document.createElement('element'),\n              transitions = {\n                'transition'       :'transitionend',\n                'OTransition'      :'oTransitionEnd',\n                'MozTransition'    :'transitionend',\n                'WebkitTransition' :'webkitTransitionEnd'\n              },\n              transition\n            ;\n            for(transition in transitions){\n              if( element.style[transition] !== undefined ){\n                return transitions[transition];\n              }\n            }\n          },\n\n          nextSide: function() {\n            return ( $activeSide.next(selector.side).length > 0 )\n              ? $activeSide.next(selector.side)\n              : $module.find(selector.side).first()\n            ;\n          }\n\n        },\n\n        stage: {\n\n          above: function() {\n            var\n              box = {\n                origin : (($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2),\n                depth  : {\n                  active : ($nextSide.outerHeight(true) / 2),\n                  next   : ($activeSide.outerHeight(true) / 2)\n                }\n              }\n            ;\n            module.verbose('Setting the initial animation position as above', $nextSide, box);\n            $sides\n              .css({\n                'transform' : 'translateZ(-' + box.depth.active + 'px)'\n              })\n            ;\n            $activeSide\n              .css({\n                'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)'\n              })\n            ;\n            $nextSide\n              .addClass(className.animating)\n              .css({\n                'top'       : box.origin + 'px',\n                'transform' : 'rotateX(90deg) translateZ(' + box.depth.next + 'px)'\n              })\n            ;\n          },\n\n          below: function() {\n            var\n              box = {\n                origin : (($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2),\n                depth  : {\n                  active : ($nextSide.outerHeight(true) / 2),\n                  next   : ($activeSide.outerHeight(true) / 2)\n                }\n              }\n            ;\n            module.verbose('Setting the initial animation position as below', $nextSide, box);\n            $sides\n              .css({\n                'transform' : 'translateZ(-' + box.depth.active + 'px)'\n              })\n            ;\n            $activeSide\n              .css({\n                'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)'\n              })\n            ;\n            $nextSide\n              .addClass(className.animating)\n              .css({\n                'top'       : box.origin + 'px',\n                'transform' : 'rotateX(-90deg) translateZ(' + box.depth.next + 'px)'\n              })\n            ;\n          },\n\n          left: function() {\n            var\n              height = {\n                active : $activeSide.outerWidth(true),\n                next   : $nextSide.outerWidth(true)\n              },\n              box = {\n                origin : ( ( height.active - height.next ) / 2),\n                depth  : {\n                  active : (height.next / 2),\n                  next   : (height.active / 2)\n                }\n              }\n            ;\n            module.verbose('Setting the initial animation position as left', $nextSide, box);\n            $sides\n              .css({\n                'transform' : 'translateZ(-' + box.depth.active + 'px)'\n              })\n            ;\n            $activeSide\n              .css({\n                'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)'\n              })\n            ;\n            $nextSide\n              .addClass(className.animating)\n              .css({\n                'left'      : box.origin + 'px',\n                'transform' : 'rotateY(-90deg) translateZ(' + box.depth.next + 'px)'\n              })\n            ;\n          },\n\n          right: function() {\n            var\n              height = {\n                active : $activeSide.outerWidth(true),\n                next   : $nextSide.outerWidth(true)\n              },\n              box = {\n                origin : ( ( height.active - height.next ) / 2),\n                depth  : {\n                  active : (height.next / 2),\n                  next   : (height.active / 2)\n                }\n              }\n            ;\n            module.verbose('Setting the initial animation position as left', $nextSide, box);\n            $sides\n              .css({\n                'transform' : 'translateZ(-' + box.depth.active + 'px)'\n              })\n            ;\n            $activeSide\n              .css({\n                'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)'\n              })\n            ;\n            $nextSide\n              .addClass(className.animating)\n              .css({\n                'left'      : box.origin + 'px',\n                'transform' : 'rotateY(90deg) translateZ(' + box.depth.next + 'px)'\n              })\n            ;\n          },\n\n          behind: function() {\n            var\n              height = {\n                active : $activeSide.outerWidth(true),\n                next   : $nextSide.outerWidth(true)\n              },\n              box = {\n                origin : ( ( height.active - height.next ) / 2),\n                depth  : {\n                  active : (height.next / 2),\n                  next   : (height.active / 2)\n                }\n              }\n            ;\n            module.verbose('Setting the initial animation position as behind', $nextSide, box);\n            $activeSide\n              .css({\n                'transform' : 'rotateY(0deg)'\n              })\n            ;\n            $nextSide\n              .addClass(className.animating)\n              .css({\n                'left'      : box.origin + 'px',\n                'transform' : 'rotateY(-180deg)'\n              })\n            ;\n          }\n        },\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if($allModules.length > 1) {\n              title += ' ' + '(' + $allModules.length + ')';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.shape.settings = {\n\n  // module info\n  name : 'Shape',\n\n  // hide all debug content\n  silent     : false,\n\n  // debug content outputted to console\n  debug      : false,\n\n  // verbose debug output\n  verbose    : false,\n\n  // fudge factor in pixels when swapping from 2d to 3d (can be useful to correct rounding errors)\n  jitter     : 0,\n\n  // performance data output\n  performance: true,\n\n  // event namespace\n  namespace  : 'shape',\n\n  // width during animation, can be set to 'auto', initial', 'next' or pixel amount\n  width: 'initial',\n\n  // height during animation, can be set to 'auto', 'initial', 'next' or pixel amount\n  height: 'initial',\n\n  // callback occurs on side change\n  beforeChange : function() {},\n  onChange     : function() {},\n\n  // allow animation to same side\n  allowRepeats: false,\n\n  // animation duration\n  duration   : false,\n\n  // possible errors\n  error: {\n    side   : 'You tried to switch to a side that does not exist.',\n    method : 'The method you called is not defined'\n  },\n\n  // classnames used\n  className   : {\n    animating : 'animating',\n    hidden    : 'hidden',\n    loading   : 'loading',\n    active    : 'active'\n  },\n\n  // selectors used\n  selector    : {\n    sides : '.sides',\n    side  : '.side'\n  }\n\n};\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Sidebar\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.sidebar = function(parameters) {\n  var\n    $allModules     = $(this),\n    $window         = $(window),\n    $document       = $(document),\n    $html           = $('html'),\n    $head           = $('head'),\n\n    moduleSelector  = $allModules.selector || '',\n\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n\n    requestAnimationFrame = window.requestAnimationFrame\n      || window.mozRequestAnimationFrame\n      || window.webkitRequestAnimationFrame\n      || window.msRequestAnimationFrame\n      || function(callback) { setTimeout(callback, 0); },\n\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings        = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.sidebar.settings, parameters)\n          : $.extend({}, $.fn.sidebar.settings),\n\n        selector        = settings.selector,\n        className       = settings.className,\n        namespace       = settings.namespace,\n        regExp          = settings.regExp,\n        error           = settings.error,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        $module         = $(this),\n        $context        = $(settings.context),\n\n        $sidebars       = $module.children(selector.sidebar),\n        $fixed          = $context.children(selector.fixed),\n        $pusher         = $context.children(selector.pusher),\n        $style,\n\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n\n        elementNamespace,\n        id,\n        currentScroll,\n        transitionEvent,\n\n        module\n      ;\n\n      module      = {\n\n        initialize: function() {\n          module.debug('Initializing sidebar', parameters);\n\n          module.create.id();\n\n          transitionEvent = module.get.transitionEvent();\n\n          if(module.is.ios()) {\n            module.set.ios();\n          }\n\n          // avoids locking rendering if initialized in onReady\n          if(settings.delaySetup) {\n            requestAnimationFrame(module.setup.layout);\n          }\n          else {\n            module.setup.layout();\n          }\n\n          requestAnimationFrame(function() {\n            module.setup.cache();\n          });\n\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        create: {\n          id: function() {\n            id = (Math.random().toString(16) + '000000000').substr(2,8);\n            elementNamespace = '.' + id;\n            module.verbose('Creating unique id for element', id);\n          }\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous module for', $module);\n          $module\n            .off(eventNamespace)\n            .removeData(moduleNamespace)\n          ;\n          if(module.is.ios()) {\n            module.remove.ios();\n          }\n          // bound by uuid\n          $context.off(elementNamespace);\n          $window.off(elementNamespace);\n          $document.off(elementNamespace);\n        },\n\n        event: {\n          clickaway: function(event) {\n            var\n              clickedInPusher = ($pusher.find(event.target).length > 0 || $pusher.is(event.target)),\n              clickedContext  = ($context.is(event.target))\n            ;\n            if(clickedInPusher) {\n              module.verbose('User clicked on dimmed page');\n              module.hide();\n            }\n            if(clickedContext) {\n              module.verbose('User clicked on dimmable context (scaled out page)');\n              module.hide();\n            }\n          },\n          touch: function(event) {\n            //event.stopPropagation();\n          },\n          containScroll: function(event) {\n            if(element.scrollTop <= 0)  {\n              element.scrollTop = 1;\n            }\n            if((element.scrollTop + element.offsetHeight) >= element.scrollHeight) {\n              element.scrollTop = element.scrollHeight - element.offsetHeight - 1;\n            }\n          },\n          scroll: function(event) {\n            if( $(event.target).closest(selector.sidebar).length === 0 ) {\n              event.preventDefault();\n            }\n          }\n        },\n\n        bind: {\n          clickaway: function() {\n            module.verbose('Adding clickaway events to context', $context);\n            if(settings.closable) {\n              $context\n                .on('click'    + elementNamespace, module.event.clickaway)\n                .on('touchend' + elementNamespace, module.event.clickaway)\n              ;\n            }\n          },\n          scrollLock: function() {\n            if(settings.scrollLock) {\n              module.debug('Disabling page scroll');\n              $window\n                .on('DOMMouseScroll' + elementNamespace, module.event.scroll)\n              ;\n            }\n            module.verbose('Adding events to contain sidebar scroll');\n            $document\n              .on('touchmove' + elementNamespace, module.event.touch)\n            ;\n            $module\n              .on('scroll' + eventNamespace, module.event.containScroll)\n            ;\n          }\n        },\n        unbind: {\n          clickaway: function() {\n            module.verbose('Removing clickaway events from context', $context);\n            $context.off(elementNamespace);\n          },\n          scrollLock: function() {\n            module.verbose('Removing scroll lock from page');\n            $document.off(elementNamespace);\n            $window.off(elementNamespace);\n            $module.off('scroll' + eventNamespace);\n          }\n        },\n\n        add: {\n          inlineCSS: function() {\n            var\n              width     = module.cache.width  || $module.outerWidth(),\n              height    = module.cache.height || $module.outerHeight(),\n              isRTL     = module.is.rtl(),\n              direction = module.get.direction(),\n              distance  = {\n                left   : width,\n                right  : -width,\n                top    : height,\n                bottom : -height\n              },\n              style\n            ;\n\n            if(isRTL){\n              module.verbose('RTL detected, flipping widths');\n              distance.left = -width;\n              distance.right = width;\n            }\n\n            style  = '<style>';\n\n            if(direction === 'left' || direction === 'right') {\n              module.debug('Adding CSS rules for animation distance', width);\n              style  += ''\n                + ' .ui.visible.' + direction + '.sidebar ~ .fixed,'\n                + ' .ui.visible.' + direction + '.sidebar ~ .pusher {'\n                + '   -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);'\n                + '           transform: translate3d('+ distance[direction] + 'px, 0, 0);'\n                + ' }'\n              ;\n            }\n            else if(direction === 'top' || direction == 'bottom') {\n              style  += ''\n                + ' .ui.visible.' + direction + '.sidebar ~ .fixed,'\n                + ' .ui.visible.' + direction + '.sidebar ~ .pusher {'\n                + '   -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'\n                + '           transform: translate3d(0, ' + distance[direction] + 'px, 0);'\n                + ' }'\n              ;\n            }\n\n            /* IE is only browser not to create context with transforms */\n            /* https://www.w3.org/Bugs/Public/show_bug.cgi?id=16328 */\n            if( module.is.ie() ) {\n              if(direction === 'left' || direction === 'right') {\n                module.debug('Adding CSS rules for animation distance', width);\n                style  += ''\n                  + ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'\n                  + '   -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);'\n                  + '           transform: translate3d('+ distance[direction] + 'px, 0, 0);'\n                  + ' }'\n                ;\n              }\n              else if(direction === 'top' || direction == 'bottom') {\n                style  += ''\n                  + ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'\n                  + '   -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'\n                  + '           transform: translate3d(0, ' + distance[direction] + 'px, 0);'\n                  + ' }'\n                ;\n              }\n              /* opposite sides visible forces content overlay */\n              style += ''\n                + ' body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'\n                + ' body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'\n                + '   -webkit-transform: translate3d(0px, 0, 0);'\n                + '           transform: translate3d(0px, 0, 0);'\n                + ' }'\n              ;\n            }\n            style += '</style>';\n            $style = $(style)\n              .appendTo($head)\n            ;\n            module.debug('Adding sizing css to head', $style);\n          }\n        },\n\n        refresh: function() {\n          module.verbose('Refreshing selector cache');\n          $context  = $(settings.context);\n          $sidebars = $context.children(selector.sidebar);\n          $pusher   = $context.children(selector.pusher);\n          $fixed    = $context.children(selector.fixed);\n          module.clear.cache();\n        },\n\n        refreshSidebars: function() {\n          module.verbose('Refreshing other sidebars');\n          $sidebars = $context.children(selector.sidebar);\n        },\n\n        repaint: function() {\n          module.verbose('Forcing repaint event');\n          element.style.display = 'none';\n          var ignored = element.offsetHeight;\n          element.scrollTop = element.scrollTop;\n          element.style.display = '';\n        },\n\n        setup: {\n          cache: function() {\n            module.cache = {\n              width  : $module.outerWidth(),\n              height : $module.outerHeight(),\n              rtl    : ($module.css('direction') == 'rtl')\n            };\n          },\n          layout: function() {\n            if( $context.children(selector.pusher).length === 0 ) {\n              module.debug('Adding wrapper element for sidebar');\n              module.error(error.pusher);\n              $pusher = $('<div class=\"pusher\" />');\n              $context\n                .children()\n                  .not(selector.omitted)\n                  .not($sidebars)\n                  .wrapAll($pusher)\n              ;\n              module.refresh();\n            }\n            if($module.nextAll(selector.pusher).length === 0 || $module.nextAll(selector.pusher)[0] !== $pusher[0]) {\n              module.debug('Moved sidebar to correct parent element');\n              module.error(error.movedSidebar, element);\n              $module.detach().prependTo($context);\n              module.refresh();\n            }\n            module.clear.cache();\n            module.set.pushable();\n            module.set.direction();\n          }\n        },\n\n        attachEvents: function(selector, event) {\n          var\n            $toggle = $(selector)\n          ;\n          event = $.isFunction(module[event])\n            ? module[event]\n            : module.toggle\n          ;\n          if($toggle.length > 0) {\n            module.debug('Attaching sidebar events to element', selector, event);\n            $toggle\n              .on('click' + eventNamespace, event)\n            ;\n          }\n          else {\n            module.error(error.notFound, selector);\n          }\n        },\n\n        show: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if(module.is.hidden()) {\n            module.refreshSidebars();\n            if(settings.overlay)  {\n              module.error(error.overlay);\n              settings.transition = 'overlay';\n            }\n            module.refresh();\n            if(module.othersActive()) {\n              module.debug('Other sidebars currently visible');\n              if(settings.exclusive) {\n                // if not overlay queue animation after hide\n                if(settings.transition != 'overlay') {\n                  module.hideOthers(module.show);\n                  return;\n                }\n                else {\n                  module.hideOthers();\n                }\n              }\n              else {\n                settings.transition = 'overlay';\n              }\n            }\n            module.pushPage(function() {\n              callback.call(element);\n              settings.onShow.call(element);\n            });\n            settings.onChange.call(element);\n            settings.onVisible.call(element);\n          }\n          else {\n            module.debug('Sidebar is already visible');\n          }\n        },\n\n        hide: function(callback) {\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if(module.is.visible() || module.is.animating()) {\n            module.debug('Hiding sidebar', callback);\n            module.refreshSidebars();\n            module.pullPage(function() {\n              callback.call(element);\n              settings.onHidden.call(element);\n            });\n            settings.onChange.call(element);\n            settings.onHide.call(element);\n          }\n        },\n\n        othersAnimating: function() {\n          return ($sidebars.not($module).filter('.' + className.animating).length > 0);\n        },\n        othersVisible: function() {\n          return ($sidebars.not($module).filter('.' + className.visible).length > 0);\n        },\n        othersActive: function() {\n          return(module.othersVisible() || module.othersAnimating());\n        },\n\n        hideOthers: function(callback) {\n          var\n            $otherSidebars = $sidebars.not($module).filter('.' + className.visible),\n            sidebarCount   = $otherSidebars.length,\n            callbackCount  = 0\n          ;\n          callback = callback || function(){};\n          $otherSidebars\n            .sidebar('hide', function() {\n              callbackCount++;\n              if(callbackCount == sidebarCount) {\n                callback();\n              }\n            })\n          ;\n        },\n\n        toggle: function() {\n          module.verbose('Determining toggled direction');\n          if(module.is.hidden()) {\n            module.show();\n          }\n          else {\n            module.hide();\n          }\n        },\n\n        pushPage: function(callback) {\n          var\n            transition = module.get.transition(),\n            $transition = (transition === 'overlay' || module.othersActive())\n              ? $module\n              : $pusher,\n            animate,\n            dim,\n            transitionEnd\n          ;\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          if(settings.transition == 'scale down') {\n            module.scrollToTop();\n          }\n          module.set.transition(transition);\n          module.repaint();\n          animate = function() {\n            module.bind.clickaway();\n            module.add.inlineCSS();\n            module.set.animating();\n            module.set.visible();\n          };\n          dim = function() {\n            module.set.dimmed();\n          };\n          transitionEnd = function(event) {\n            if( event.target == $transition[0] ) {\n              $transition.off(transitionEvent + elementNamespace, transitionEnd);\n              module.remove.animating();\n              module.bind.scrollLock();\n              callback.call(element);\n            }\n          };\n          $transition.off(transitionEvent + elementNamespace);\n          $transition.on(transitionEvent + elementNamespace, transitionEnd);\n          requestAnimationFrame(animate);\n          if(settings.dimPage && !module.othersVisible()) {\n            requestAnimationFrame(dim);\n          }\n        },\n\n        pullPage: function(callback) {\n          var\n            transition = module.get.transition(),\n            $transition = (transition == 'overlay' || module.othersActive())\n              ? $module\n              : $pusher,\n            animate,\n            transitionEnd\n          ;\n          callback = $.isFunction(callback)\n            ? callback\n            : function(){}\n          ;\n          module.verbose('Removing context push state', module.get.direction());\n\n          module.unbind.clickaway();\n          module.unbind.scrollLock();\n\n          animate = function() {\n            module.set.transition(transition);\n            module.set.animating();\n            module.remove.visible();\n            if(settings.dimPage && !module.othersVisible()) {\n              $pusher.removeClass(className.dimmed);\n            }\n          };\n          transitionEnd = function(event) {\n            if( event.target == $transition[0] ) {\n              $transition.off(transitionEvent + elementNamespace, transitionEnd);\n              module.remove.animating();\n              module.remove.transition();\n              module.remove.inlineCSS();\n              if(transition == 'scale down' || (settings.returnScroll && module.is.mobile()) ) {\n                module.scrollBack();\n              }\n              callback.call(element);\n            }\n          };\n          $transition.off(transitionEvent + elementNamespace);\n          $transition.on(transitionEvent + elementNamespace, transitionEnd);\n          requestAnimationFrame(animate);\n        },\n\n        scrollToTop: function() {\n          module.verbose('Scrolling to top of page to avoid animation issues');\n          currentScroll = $(window).scrollTop();\n          $module.scrollTop(0);\n          window.scrollTo(0, 0);\n        },\n\n        scrollBack: function() {\n          module.verbose('Scrolling back to original page position');\n          window.scrollTo(0, currentScroll);\n        },\n\n        clear: {\n          cache: function() {\n            module.verbose('Clearing cached dimensions');\n            module.cache = {};\n          }\n        },\n\n        set: {\n\n          // ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios\n          ios: function() {\n            $html.addClass(className.ios);\n          },\n\n          // container\n          pushed: function() {\n            $context.addClass(className.pushed);\n          },\n          pushable: function() {\n            $context.addClass(className.pushable);\n          },\n\n          // pusher\n          dimmed: function() {\n            $pusher.addClass(className.dimmed);\n          },\n\n          // sidebar\n          active: function() {\n            $module.addClass(className.active);\n          },\n          animating: function() {\n            $module.addClass(className.animating);\n          },\n          transition: function(transition) {\n            transition = transition || module.get.transition();\n            $module.addClass(transition);\n          },\n          direction: function(direction) {\n            direction = direction || module.get.direction();\n            $module.addClass(className[direction]);\n          },\n          visible: function() {\n            $module.addClass(className.visible);\n          },\n          overlay: function() {\n            $module.addClass(className.overlay);\n          }\n        },\n        remove: {\n\n          inlineCSS: function() {\n            module.debug('Removing inline css styles', $style);\n            if($style && $style.length > 0) {\n              $style.remove();\n            }\n          },\n\n          // ios scroll on html not document\n          ios: function() {\n            $html.removeClass(className.ios);\n          },\n\n          // context\n          pushed: function() {\n            $context.removeClass(className.pushed);\n          },\n          pushable: function() {\n            $context.removeClass(className.pushable);\n          },\n\n          // sidebar\n          active: function() {\n            $module.removeClass(className.active);\n          },\n          animating: function() {\n            $module.removeClass(className.animating);\n          },\n          transition: function(transition) {\n            transition = transition || module.get.transition();\n            $module.removeClass(transition);\n          },\n          direction: function(direction) {\n            direction = direction || module.get.direction();\n            $module.removeClass(className[direction]);\n          },\n          visible: function() {\n            $module.removeClass(className.visible);\n          },\n          overlay: function() {\n            $module.removeClass(className.overlay);\n          }\n        },\n\n        get: {\n          direction: function() {\n            if($module.hasClass(className.top)) {\n              return className.top;\n            }\n            else if($module.hasClass(className.right)) {\n              return className.right;\n            }\n            else if($module.hasClass(className.bottom)) {\n              return className.bottom;\n            }\n            return className.left;\n          },\n          transition: function() {\n            var\n              direction = module.get.direction(),\n              transition\n            ;\n            transition = ( module.is.mobile() )\n              ? (settings.mobileTransition == 'auto')\n                ? settings.defaultTransition.mobile[direction]\n                : settings.mobileTransition\n              : (settings.transition == 'auto')\n                ? settings.defaultTransition.computer[direction]\n                : settings.transition\n            ;\n            module.verbose('Determined transition', transition);\n            return transition;\n          },\n          transitionEvent: function() {\n            var\n              element     = document.createElement('element'),\n              transitions = {\n                'transition'       :'transitionend',\n                'OTransition'      :'oTransitionEnd',\n                'MozTransition'    :'transitionend',\n                'WebkitTransition' :'webkitTransitionEnd'\n              },\n              transition\n            ;\n            for(transition in transitions){\n              if( element.style[transition] !== undefined ){\n                return transitions[transition];\n              }\n            }\n          }\n        },\n\n        is: {\n\n          ie: function() {\n            var\n              isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),\n              isIE   = ('ActiveXObject' in window)\n            ;\n            return (isIE11 || isIE);\n          },\n\n          ios: function() {\n            var\n              userAgent      = navigator.userAgent,\n              isIOS          = userAgent.match(regExp.ios),\n              isMobileChrome = userAgent.match(regExp.mobileChrome)\n            ;\n            if(isIOS && !isMobileChrome) {\n              module.verbose('Browser was found to be iOS', userAgent);\n              return true;\n            }\n            else {\n              return false;\n            }\n          },\n          mobile: function() {\n            var\n              userAgent    = navigator.userAgent,\n              isMobile     = userAgent.match(regExp.mobile)\n            ;\n            if(isMobile) {\n              module.verbose('Browser was found to be mobile', userAgent);\n              return true;\n            }\n            else {\n              module.verbose('Browser is not mobile, using regular transition', userAgent);\n              return false;\n            }\n          },\n          hidden: function() {\n            return !module.is.visible();\n          },\n          visible: function() {\n            return $module.hasClass(className.visible);\n          },\n          // alias\n          open: function() {\n            return module.is.visible();\n          },\n          closed: function() {\n            return module.is.hidden();\n          },\n          vertical: function() {\n            return $module.hasClass(className.top);\n          },\n          animating: function() {\n            return $context.hasClass(className.animating);\n          },\n          rtl: function () {\n            if(module.cache.rtl === undefined) {\n              module.cache.rtl = ($module.css('direction') == 'rtl');\n            }\n            return module.cache.rtl;\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      }\n    ;\n\n    if(methodInvoked) {\n      if(instance === undefined) {\n        module.initialize();\n      }\n      module.invoke(query);\n    }\n    else {\n      if(instance !== undefined) {\n        module.invoke('destroy');\n      }\n      module.initialize();\n    }\n  });\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.sidebar.settings = {\n\n  name              : 'Sidebar',\n  namespace         : 'sidebar',\n\n  silent            : false,\n  debug             : false,\n  verbose           : false,\n  performance       : true,\n\n  transition        : 'auto',\n  mobileTransition  : 'auto',\n\n  defaultTransition : {\n    computer: {\n      left   : 'uncover',\n      right  : 'uncover',\n      top    : 'overlay',\n      bottom : 'overlay'\n    },\n    mobile: {\n      left   : 'uncover',\n      right  : 'uncover',\n      top    : 'overlay',\n      bottom : 'overlay'\n    }\n  },\n\n  context           : 'body',\n  exclusive         : false,\n  closable          : true,\n  dimPage           : true,\n  scrollLock        : false,\n  returnScroll      : false,\n  delaySetup        : false,\n\n  duration          : 500,\n\n  onChange          : function(){},\n  onShow            : function(){},\n  onHide            : function(){},\n\n  onHidden          : function(){},\n  onVisible         : function(){},\n\n  className         : {\n    active    : 'active',\n    animating : 'animating',\n    dimmed    : 'dimmed',\n    ios       : 'ios',\n    pushable  : 'pushable',\n    pushed    : 'pushed',\n    right     : 'right',\n    top       : 'top',\n    left      : 'left',\n    bottom    : 'bottom',\n    visible   : 'visible'\n  },\n\n  selector: {\n    fixed   : '.fixed',\n    omitted : 'script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed',\n    pusher  : '.pusher',\n    sidebar : '.ui.sidebar'\n  },\n\n  regExp: {\n    ios          : /(iPad|iPhone|iPod)/g,\n    mobileChrome : /(CriOS)/g,\n    mobile       : /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g\n  },\n\n  error   : {\n    method       : 'The method you called is not defined.',\n    pusher       : 'Had to add pusher element. For optimal performance make sure body content is inside a pusher element',\n    movedSidebar : 'Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag',\n    overlay      : 'The overlay setting is no longer supported, use animation: overlay',\n    notFound     : 'There were no elements that matched the specified selector'\n  }\n\n};\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Sticky\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.sticky = function(parameters) {\n  var\n    $allModules    = $(this),\n    moduleSelector = $allModules.selector || '',\n\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings              = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.sticky.settings, parameters)\n          : $.extend({}, $.fn.sticky.settings),\n\n        className             = settings.className,\n        namespace             = settings.namespace,\n        error                 = settings.error,\n\n        eventNamespace        = '.' + namespace,\n        moduleNamespace       = 'module-' + namespace,\n\n        $module               = $(this),\n        $window               = $(window),\n        $scroll               = $(settings.scrollContext),\n        $container,\n        $context,\n\n        selector              = $module.selector || '',\n        instance              = $module.data(moduleNamespace),\n\n        requestAnimationFrame = window.requestAnimationFrame\n          || window.mozRequestAnimationFrame\n          || window.webkitRequestAnimationFrame\n          || window.msRequestAnimationFrame\n          || function(callback) { setTimeout(callback, 0); },\n\n        element         = this,\n\n        documentObserver,\n        observer,\n        module\n      ;\n\n      module      = {\n\n        initialize: function() {\n\n          module.determineContainer();\n          module.determineContext();\n          module.verbose('Initializing sticky', settings, $container);\n\n          module.save.positions();\n          module.checkErrors();\n          module.bind.events();\n\n          if(settings.observeChanges) {\n            module.observeChanges();\n          }\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous instance');\n          module.reset();\n          if(documentObserver) {\n            documentObserver.disconnect();\n          }\n          if(observer) {\n            observer.disconnect();\n          }\n          $window\n            .off('load' + eventNamespace, module.event.load)\n            .off('resize' + eventNamespace, module.event.resize)\n          ;\n          $scroll\n            .off('scrollchange' + eventNamespace, module.event.scrollchange)\n          ;\n          $module.removeData(moduleNamespace);\n        },\n\n        observeChanges: function() {\n          if('MutationObserver' in window) {\n            documentObserver = new MutationObserver(module.event.documentChanged);\n            observer         = new MutationObserver(module.event.changed);\n            documentObserver.observe(document, {\n              childList : true,\n              subtree   : true\n            });\n            observer.observe(element, {\n              childList : true,\n              subtree   : true\n            });\n            observer.observe($context[0], {\n              childList : true,\n              subtree   : true\n            });\n            module.debug('Setting up mutation observer', observer);\n          }\n        },\n\n        determineContainer: function() {\n          $container = $module.offsetParent();\n        },\n\n        determineContext: function() {\n          if(settings.context) {\n            $context = $(settings.context);\n          }\n          else {\n            $context = $container;\n          }\n          if($context.length === 0) {\n            module.error(error.invalidContext, settings.context, $module);\n            return;\n          }\n        },\n\n        checkErrors: function() {\n          if( module.is.hidden() ) {\n            module.error(error.visible, $module);\n          }\n          if(module.cache.element.height > module.cache.context.height) {\n            module.reset();\n            module.error(error.elementSize, $module);\n            return;\n          }\n        },\n\n        bind: {\n          events: function() {\n            $window\n              .on('load' + eventNamespace, module.event.load)\n              .on('resize' + eventNamespace, module.event.resize)\n            ;\n            // pub/sub pattern\n            $scroll\n              .off('scroll' + eventNamespace)\n              .on('scroll' + eventNamespace, module.event.scroll)\n              .on('scrollchange' + eventNamespace, module.event.scrollchange)\n            ;\n          }\n        },\n\n        event: {\n          changed: function(mutations) {\n            clearTimeout(module.timer);\n            module.timer = setTimeout(function() {\n              module.verbose('DOM tree modified, updating sticky menu', mutations);\n              module.refresh();\n            }, 100);\n          },\n          documentChanged: function(mutations) {\n            [].forEach.call(mutations, function(mutation) {\n              if(mutation.removedNodes) {\n                [].forEach.call(mutation.removedNodes, function(node) {\n                  if(node == element || $(node).find(element).length > 0) {\n                    module.debug('Element removed from DOM, tearing down events');\n                    module.destroy();\n                  }\n                });\n              }\n            });\n          },\n          load: function() {\n            module.verbose('Page contents finished loading');\n            requestAnimationFrame(module.refresh);\n          },\n          resize: function() {\n            module.verbose('Window resized');\n            requestAnimationFrame(module.refresh);\n          },\n          scroll: function() {\n            requestAnimationFrame(function() {\n              $scroll.triggerHandler('scrollchange' + eventNamespace, $scroll.scrollTop() );\n            });\n          },\n          scrollchange: function(event, scrollPosition) {\n            module.stick(scrollPosition);\n            settings.onScroll.call(element);\n          }\n        },\n\n        refresh: function(hardRefresh) {\n          module.reset();\n          if(!settings.context) {\n            module.determineContext();\n          }\n          if(hardRefresh) {\n            module.determineContainer();\n          }\n          module.save.positions();\n          module.stick();\n          settings.onReposition.call(element);\n        },\n\n        supports: {\n          sticky: function() {\n            var\n              $element = $('<div/>'),\n              element = $element[0]\n            ;\n            $element.addClass(className.supported);\n            return($element.css('position').match('sticky'));\n          }\n        },\n\n        save: {\n          lastScroll: function(scroll) {\n            module.lastScroll = scroll;\n          },\n          elementScroll: function(scroll) {\n            module.elementScroll = scroll;\n          },\n          positions: function() {\n            var\n              scrollContext = {\n                height : $scroll.height()\n              },\n              element = {\n                margin: {\n                  top    : parseInt($module.css('margin-top'), 10),\n                  bottom : parseInt($module.css('margin-bottom'), 10),\n                },\n                offset : $module.offset(),\n                width  : $module.outerWidth(),\n                height : $module.outerHeight()\n              },\n              context = {\n                offset : $context.offset(),\n                height : $context.outerHeight()\n              },\n              container = {\n                height: $container.outerHeight()\n              }\n            ;\n            if( !module.is.standardScroll() ) {\n              module.debug('Non-standard scroll. Removing scroll offset from element offset');\n\n              scrollContext.top  = $scroll.scrollTop();\n              scrollContext.left = $scroll.scrollLeft();\n\n              element.offset.top  += scrollContext.top;\n              context.offset.top  += scrollContext.top;\n              element.offset.left += scrollContext.left;\n              context.offset.left += scrollContext.left;\n            }\n            module.cache = {\n              fits : ( element.height < scrollContext.height ),\n              scrollContext : {\n                height : scrollContext.height\n              },\n              element: {\n                margin : element.margin,\n                top    : element.offset.top - element.margin.top,\n                left   : element.offset.left,\n                width  : element.width,\n                height : element.height,\n                bottom : element.offset.top + element.height\n              },\n              context: {\n                top           : context.offset.top,\n                height        : context.height,\n                bottom        : context.offset.top + context.height\n              }\n            };\n            module.set.containerSize();\n            module.set.size();\n            module.stick();\n            module.debug('Caching element positions', module.cache);\n          }\n        },\n\n        get: {\n          direction: function(scroll) {\n            var\n              direction = 'down'\n            ;\n            scroll = scroll || $scroll.scrollTop();\n            if(module.lastScroll !== undefined) {\n              if(module.lastScroll < scroll) {\n                direction = 'down';\n              }\n              else if(module.lastScroll > scroll) {\n                direction = 'up';\n              }\n            }\n            return direction;\n          },\n          scrollChange: function(scroll) {\n            scroll = scroll || $scroll.scrollTop();\n            return (module.lastScroll)\n              ? (scroll - module.lastScroll)\n              : 0\n            ;\n          },\n          currentElementScroll: function() {\n            if(module.elementScroll) {\n              return module.elementScroll;\n            }\n            return ( module.is.top() )\n              ? Math.abs(parseInt($module.css('top'), 10))    || 0\n              : Math.abs(parseInt($module.css('bottom'), 10)) || 0\n            ;\n          },\n\n          elementScroll: function(scroll) {\n            scroll = scroll || $scroll.scrollTop();\n            var\n              element        = module.cache.element,\n              scrollContext  = module.cache.scrollContext,\n              delta          = module.get.scrollChange(scroll),\n              maxScroll      = (element.height - scrollContext.height + settings.offset),\n              elementScroll  = module.get.currentElementScroll(),\n              possibleScroll = (elementScroll + delta)\n            ;\n            if(module.cache.fits || possibleScroll < 0) {\n              elementScroll = 0;\n            }\n            else if(possibleScroll > maxScroll ) {\n              elementScroll = maxScroll;\n            }\n            else {\n              elementScroll = possibleScroll;\n            }\n            return elementScroll;\n          }\n        },\n\n        remove: {\n          lastScroll: function() {\n            delete module.lastScroll;\n          },\n          elementScroll: function(scroll) {\n            delete module.elementScroll;\n          },\n          offset: function() {\n            $module.css('margin-top', '');\n          }\n        },\n\n        set: {\n          offset: function() {\n            module.verbose('Setting offset on element', settings.offset);\n            $module\n              .css('margin-top', settings.offset)\n            ;\n          },\n          containerSize: function() {\n            var\n              tagName = $container.get(0).tagName\n            ;\n            if(tagName === 'HTML' || tagName == 'body') {\n              // this can trigger for too many reasons\n              //module.error(error.container, tagName, $module);\n              module.determineContainer();\n            }\n            else {\n              if( Math.abs($container.outerHeight() - module.cache.context.height) > settings.jitter) {\n                module.debug('Context has padding, specifying exact height for container', module.cache.context.height);\n                $container.css({\n                  height: module.cache.context.height\n                });\n              }\n            }\n          },\n          minimumSize: function() {\n            var\n              element   = module.cache.element\n            ;\n            $container\n              .css('min-height', element.height)\n            ;\n          },\n          scroll: function(scroll) {\n            module.debug('Setting scroll on element', scroll);\n            if(module.elementScroll == scroll) {\n              return;\n            }\n            if( module.is.top() ) {\n              $module\n                .css('bottom', '')\n                .css('top', -scroll)\n              ;\n            }\n            if( module.is.bottom() ) {\n              $module\n                .css('top', '')\n                .css('bottom', scroll)\n              ;\n            }\n          },\n          size: function() {\n            if(module.cache.element.height !== 0 && module.cache.element.width !== 0) {\n              element.style.setProperty('width',  module.cache.element.width  + 'px', 'important');\n              element.style.setProperty('height', module.cache.element.height + 'px', 'important');\n            }\n          }\n        },\n\n        is: {\n          standardScroll: function() {\n            return ($scroll[0] == window);\n          },\n          top: function() {\n            return $module.hasClass(className.top);\n          },\n          bottom: function() {\n            return $module.hasClass(className.bottom);\n          },\n          initialPosition: function() {\n            return (!module.is.fixed() && !module.is.bound());\n          },\n          hidden: function() {\n            return (!$module.is(':visible'));\n          },\n          bound: function() {\n            return $module.hasClass(className.bound);\n          },\n          fixed: function() {\n            return $module.hasClass(className.fixed);\n          }\n        },\n\n        stick: function(scroll) {\n          var\n            cachedPosition = scroll || $scroll.scrollTop(),\n            cache          = module.cache,\n            fits           = cache.fits,\n            element        = cache.element,\n            scrollContext  = cache.scrollContext,\n            context        = cache.context,\n            offset         = (module.is.bottom() && settings.pushing)\n              ? settings.bottomOffset\n              : settings.offset,\n            scroll         = {\n              top    : cachedPosition + offset,\n              bottom : cachedPosition + offset + scrollContext.height\n            },\n            direction      = module.get.direction(scroll.top),\n            elementScroll  = (fits)\n              ? 0\n              : module.get.elementScroll(scroll.top),\n\n            // shorthand\n            doesntFit      = !fits,\n            elementVisible = (element.height !== 0)\n          ;\n\n          if(elementVisible) {\n\n            if( module.is.initialPosition() ) {\n              if(scroll.top >= context.bottom) {\n                module.debug('Initial element position is bottom of container');\n                module.bindBottom();\n              }\n              else if(scroll.top > element.top) {\n                if( (element.height + scroll.top - elementScroll) >= context.bottom ) {\n                  module.debug('Initial element position is bottom of container');\n                  module.bindBottom();\n                }\n                else {\n                  module.debug('Initial element position is fixed');\n                  module.fixTop();\n                }\n              }\n\n            }\n            else if( module.is.fixed() ) {\n\n              // currently fixed top\n              if( module.is.top() ) {\n                if( scroll.top <= element.top ) {\n                  module.debug('Fixed element reached top of container');\n                  module.setInitialPosition();\n                }\n                else if( (element.height + scroll.top - elementScroll) >= context.bottom ) {\n                  module.debug('Fixed element reached bottom of container');\n                  module.bindBottom();\n                }\n                // scroll element if larger than screen\n                else if(doesntFit) {\n                  module.set.scroll(elementScroll);\n                  module.save.lastScroll(scroll.top);\n                  module.save.elementScroll(elementScroll);\n                }\n              }\n\n              // currently fixed bottom\n              else if(module.is.bottom() ) {\n\n                // top edge\n                if( (scroll.bottom - element.height) <= element.top) {\n                  module.debug('Bottom fixed rail has reached top of container');\n                  module.setInitialPosition();\n                }\n                // bottom edge\n                else if(scroll.bottom >= context.bottom) {\n                  module.debug('Bottom fixed rail has reached bottom of container');\n                  module.bindBottom();\n                }\n                // scroll element if larger than screen\n                else if(doesntFit) {\n                  module.set.scroll(elementScroll);\n                  module.save.lastScroll(scroll.top);\n                  module.save.elementScroll(elementScroll);\n                }\n\n              }\n            }\n            else if( module.is.bottom() ) {\n              if( scroll.top <= element.top ) {\n                module.debug('Jumped from bottom fixed to top fixed, most likely used home/end button');\n                module.setInitialPosition();\n              }\n              else {\n                if(settings.pushing) {\n                  if(module.is.bound() && scroll.bottom <= context.bottom ) {\n                    module.debug('Fixing bottom attached element to bottom of browser.');\n                    module.fixBottom();\n                  }\n                }\n                else {\n                  if(module.is.bound() && (scroll.top <= context.bottom - element.height) ) {\n                    module.debug('Fixing bottom attached element to top of browser.');\n                    module.fixTop();\n                  }\n                }\n              }\n            }\n          }\n        },\n\n        bindTop: function() {\n          module.debug('Binding element to top of parent container');\n          module.remove.offset();\n          $module\n            .css({\n              left         : '',\n              top          : '',\n              marginBottom : ''\n            })\n            .removeClass(className.fixed)\n            .removeClass(className.bottom)\n            .addClass(className.bound)\n            .addClass(className.top)\n          ;\n          settings.onTop.call(element);\n          settings.onUnstick.call(element);\n        },\n        bindBottom: function() {\n          module.debug('Binding element to bottom of parent container');\n          module.remove.offset();\n          $module\n            .css({\n              left         : '',\n              top          : ''\n            })\n            .removeClass(className.fixed)\n            .removeClass(className.top)\n            .addClass(className.bound)\n            .addClass(className.bottom)\n          ;\n          settings.onBottom.call(element);\n          settings.onUnstick.call(element);\n        },\n\n        setInitialPosition: function() {\n          module.debug('Returning to initial position');\n          module.unfix();\n          module.unbind();\n        },\n\n\n        fixTop: function() {\n          module.debug('Fixing element to top of page');\n          module.set.minimumSize();\n          module.set.offset();\n          $module\n            .css({\n              left         : module.cache.element.left,\n              bottom       : '',\n              marginBottom : ''\n            })\n            .removeClass(className.bound)\n            .removeClass(className.bottom)\n            .addClass(className.fixed)\n            .addClass(className.top)\n          ;\n          settings.onStick.call(element);\n        },\n\n        fixBottom: function() {\n          module.debug('Sticking element to bottom of page');\n          module.set.minimumSize();\n          module.set.offset();\n          $module\n            .css({\n              left         : module.cache.element.left,\n              bottom       : '',\n              marginBottom : ''\n            })\n            .removeClass(className.bound)\n            .removeClass(className.top)\n            .addClass(className.fixed)\n            .addClass(className.bottom)\n          ;\n          settings.onStick.call(element);\n        },\n\n        unbind: function() {\n          if( module.is.bound() ) {\n            module.debug('Removing container bound position on element');\n            module.remove.offset();\n            $module\n              .removeClass(className.bound)\n              .removeClass(className.top)\n              .removeClass(className.bottom)\n            ;\n          }\n        },\n\n        unfix: function() {\n          if( module.is.fixed() ) {\n            module.debug('Removing fixed position on element');\n            module.remove.offset();\n            $module\n              .removeClass(className.fixed)\n              .removeClass(className.top)\n              .removeClass(className.bottom)\n            ;\n            settings.onUnstick.call(element);\n          }\n        },\n\n        reset: function() {\n          module.debug('Resetting elements position');\n          module.unbind();\n          module.unfix();\n          module.resetCSS();\n          module.remove.offset();\n          module.remove.lastScroll();\n        },\n\n        resetCSS: function() {\n          $module\n            .css({\n              width  : '',\n              height : ''\n            })\n          ;\n          $container\n            .css({\n              height: ''\n            })\n          ;\n        },\n\n        setting: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            settings[name] = value;\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 0);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.sticky.settings = {\n\n  name           : 'Sticky',\n  namespace      : 'sticky',\n\n  silent         : false,\n  debug          : false,\n  verbose        : true,\n  performance    : true,\n\n  // whether to stick in the opposite direction on scroll up\n  pushing        : false,\n\n  context        : false,\n\n  // Context to watch scroll events\n  scrollContext  : window,\n\n  // Offset to adjust scroll\n  offset         : 0,\n\n  // Offset to adjust scroll when attached to bottom of screen\n  bottomOffset   : 0,\n\n  jitter         : 5, // will only set container height if difference between context and container is larger than this number\n\n  // Whether to automatically observe changes with Mutation Observers\n  observeChanges : false,\n\n  // Called when position is recalculated\n  onReposition   : function(){},\n\n  // Called on each scroll\n  onScroll       : function(){},\n\n  // Called when element is stuck to viewport\n  onStick        : function(){},\n\n  // Called when element is unstuck from viewport\n  onUnstick      : function(){},\n\n  // Called when element reaches top of context\n  onTop          : function(){},\n\n  // Called when element reaches bottom of context\n  onBottom       : function(){},\n\n  error         : {\n    container      : 'Sticky element must be inside a relative container',\n    visible        : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.',\n    method         : 'The method you called is not defined.',\n    invalidContext : 'Context specified does not exist',\n    elementSize    : 'Sticky element is larger than its container, cannot create sticky.'\n  },\n\n  className : {\n    bound     : 'bound',\n    fixed     : 'fixed',\n    supported : 'native',\n    top       : 'top',\n    bottom    : 'bottom'\n  }\n\n};\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Tab\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.tab = function(parameters) {\n\n  var\n    // use window context if none specified\n    $allModules     = $.isFunction(this)\n        ? $(window)\n        : $(this),\n\n    moduleSelector  = $allModules.selector || '',\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n\n    initializedHistory = false,\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n\n        settings        = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.tab.settings, parameters)\n          : $.extend({}, $.fn.tab.settings),\n\n        className       = settings.className,\n        metadata        = settings.metadata,\n        selector        = settings.selector,\n        error           = settings.error,\n\n        eventNamespace  = '.' + settings.namespace,\n        moduleNamespace = 'module-' + settings.namespace,\n\n        $module         = $(this),\n        $context,\n        $tabs,\n\n        cache           = {},\n        firstLoad       = true,\n        recursionDepth  = 0,\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n\n        activeTabPath,\n        parameterArray,\n        module,\n\n        historyEvent\n\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.debug('Initializing tab menu item', $module);\n          module.fix.callbacks();\n          module.determineTabs();\n\n          module.debug('Determining tabs', settings.context, $tabs);\n          // set up automatic routing\n          if(settings.auto) {\n            module.set.auto();\n          }\n          module.bind.events();\n\n          if(settings.history && !initializedHistory) {\n            module.initializeHistory();\n            initializedHistory = true;\n          }\n\n          module.instantiate();\n        },\n\n        instantiate: function () {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.debug('Destroying tabs', $module);\n          $module\n            .removeData(moduleNamespace)\n            .off(eventNamespace)\n          ;\n        },\n\n        bind: {\n          events: function() {\n            // if using $.tab don't add events\n            if( !$.isWindow( element ) ) {\n              module.debug('Attaching tab activation events to element', $module);\n              $module\n                .on('click' + eventNamespace, module.event.click)\n              ;\n            }\n          }\n        },\n\n        determineTabs: function() {\n          var\n            $reference\n          ;\n\n          // determine tab context\n          if(settings.context === 'parent') {\n            if($module.closest(selector.ui).length > 0) {\n              $reference = $module.closest(selector.ui);\n              module.verbose('Using closest UI element as parent', $reference);\n            }\n            else {\n              $reference = $module;\n            }\n            $context = $reference.parent();\n            module.verbose('Determined parent element for creating context', $context);\n          }\n          else if(settings.context) {\n            $context = $(settings.context);\n            module.verbose('Using selector for tab context', settings.context, $context);\n          }\n          else {\n            $context = $('body');\n          }\n          // find tabs\n          if(settings.childrenOnly) {\n            $tabs = $context.children(selector.tabs);\n            module.debug('Searching tab context children for tabs', $context, $tabs);\n          }\n          else {\n            $tabs = $context.find(selector.tabs);\n            module.debug('Searching tab context for tabs', $context, $tabs);\n          }\n        },\n\n        fix: {\n          callbacks: function() {\n            if( $.isPlainObject(parameters) && (parameters.onTabLoad || parameters.onTabInit) ) {\n              if(parameters.onTabLoad) {\n                parameters.onLoad = parameters.onTabLoad;\n                delete parameters.onTabLoad;\n                module.error(error.legacyLoad, parameters.onLoad);\n              }\n              if(parameters.onTabInit) {\n                parameters.onFirstLoad = parameters.onTabInit;\n                delete parameters.onTabInit;\n                module.error(error.legacyInit, parameters.onFirstLoad);\n              }\n              settings = $.extend(true, {}, $.fn.tab.settings, parameters);\n            }\n          }\n        },\n\n        initializeHistory: function() {\n          module.debug('Initializing page state');\n          if( $.address === undefined ) {\n            module.error(error.state);\n            return false;\n          }\n          else {\n            if(settings.historyType == 'state') {\n              module.debug('Using HTML5 to manage state');\n              if(settings.path !== false) {\n                $.address\n                  .history(true)\n                  .state(settings.path)\n                ;\n              }\n              else {\n                module.error(error.path);\n                return false;\n              }\n            }\n            $.address\n              .bind('change', module.event.history.change)\n            ;\n          }\n        },\n\n        event: {\n          click: function(event) {\n            var\n              tabPath = $(this).data(metadata.tab)\n            ;\n            if(tabPath !== undefined) {\n              if(settings.history) {\n                module.verbose('Updating page state', event);\n                $.address.value(tabPath);\n              }\n              else {\n                module.verbose('Changing tab', event);\n                module.changeTab(tabPath);\n              }\n              event.preventDefault();\n            }\n            else {\n              module.debug('No tab specified');\n            }\n          },\n          history: {\n            change: function(event) {\n              var\n                tabPath   = event.pathNames.join('/') || module.get.initialPath(),\n                pageTitle = settings.templates.determineTitle(tabPath) || false\n              ;\n              module.performance.display();\n              module.debug('History change event', tabPath, event);\n              historyEvent = event;\n              if(tabPath !== undefined) {\n                module.changeTab(tabPath);\n              }\n              if(pageTitle) {\n                $.address.title(pageTitle);\n              }\n            }\n          }\n        },\n\n        refresh: function() {\n          if(activeTabPath) {\n            module.debug('Refreshing tab', activeTabPath);\n            module.changeTab(activeTabPath);\n          }\n        },\n\n        cache: {\n\n          read: function(cacheKey) {\n            return (cacheKey !== undefined)\n              ? cache[cacheKey]\n              : false\n            ;\n          },\n          add: function(cacheKey, content) {\n            cacheKey = cacheKey || activeTabPath;\n            module.debug('Adding cached content for', cacheKey);\n            cache[cacheKey] = content;\n          },\n          remove: function(cacheKey) {\n            cacheKey = cacheKey || activeTabPath;\n            module.debug('Removing cached content for', cacheKey);\n            delete cache[cacheKey];\n          }\n        },\n\n        set: {\n          auto: function() {\n            var\n              url = (typeof settings.path == 'string')\n                ? settings.path.replace(/\\/$/, '') + '/{$tab}'\n                : '/{$tab}'\n            ;\n            module.verbose('Setting up automatic tab retrieval from server', url);\n            if($.isPlainObject(settings.apiSettings)) {\n              settings.apiSettings.url = url;\n            }\n            else {\n              settings.apiSettings = {\n                url: url\n              };\n            }\n          },\n          loading: function(tabPath) {\n            var\n              $tab      = module.get.tabElement(tabPath),\n              isLoading = $tab.hasClass(className.loading)\n            ;\n            if(!isLoading) {\n              module.verbose('Setting loading state for', $tab);\n              $tab\n                .addClass(className.loading)\n                .siblings($tabs)\n                  .removeClass(className.active + ' ' + className.loading)\n              ;\n              if($tab.length > 0) {\n                settings.onRequest.call($tab[0], tabPath);\n              }\n            }\n          },\n          state: function(state) {\n            $.address.value(state);\n          }\n        },\n\n        changeTab: function(tabPath) {\n          var\n            pushStateAvailable = (window.history && window.history.pushState),\n            shouldIgnoreLoad   = (pushStateAvailable && settings.ignoreFirstLoad && firstLoad),\n            remoteContent      = (settings.auto || $.isPlainObject(settings.apiSettings) ),\n            // only add default path if not remote content\n            pathArray = (remoteContent && !shouldIgnoreLoad)\n              ? module.utilities.pathToArray(tabPath)\n              : module.get.defaultPathArray(tabPath)\n          ;\n          tabPath = module.utilities.arrayToPath(pathArray);\n          $.each(pathArray, function(index, tab) {\n            var\n              currentPathArray   = pathArray.slice(0, index + 1),\n              currentPath        = module.utilities.arrayToPath(currentPathArray),\n\n              isTab              = module.is.tab(currentPath),\n              isLastIndex        = (index + 1 == pathArray.length),\n\n              $tab               = module.get.tabElement(currentPath),\n              $anchor,\n              nextPathArray,\n              nextPath,\n              isLastTab\n            ;\n            module.verbose('Looking for tab', tab);\n            if(isTab) {\n              module.verbose('Tab was found', tab);\n              // scope up\n              activeTabPath  = currentPath;\n              parameterArray = module.utilities.filterArray(pathArray, currentPathArray);\n\n              if(isLastIndex) {\n                isLastTab = true;\n              }\n              else {\n                nextPathArray = pathArray.slice(0, index + 2);\n                nextPath      = module.utilities.arrayToPath(nextPathArray);\n                isLastTab     = ( !module.is.tab(nextPath) );\n                if(isLastTab) {\n                  module.verbose('Tab parameters found', nextPathArray);\n                }\n              }\n              if(isLastTab && remoteContent) {\n                if(!shouldIgnoreLoad) {\n                  module.activate.navigation(currentPath);\n                  module.fetch.content(currentPath, tabPath);\n                }\n                else {\n                  module.debug('Ignoring remote content on first tab load', currentPath);\n                  firstLoad = false;\n                  module.cache.add(tabPath, $tab.html());\n                  module.activate.all(currentPath);\n                  settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n                  settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n                }\n                return false;\n              }\n              else {\n                module.debug('Opened local tab', currentPath);\n                module.activate.all(currentPath);\n                if( !module.cache.read(currentPath) ) {\n                  module.cache.add(currentPath, true);\n                  module.debug('First time tab loaded calling tab init');\n                  settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n                }\n                settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n              }\n\n            }\n            else if(tabPath.search('/') == -1 && tabPath !== '') {\n              // look for in page anchor\n              $anchor     = $('#' + tabPath + ', a[name=\"' + tabPath + '\"]');\n              currentPath = $anchor.closest('[data-tab]').data(metadata.tab);\n              $tab        = module.get.tabElement(currentPath);\n              // if anchor exists use parent tab\n              if($anchor && $anchor.length > 0 && currentPath) {\n                module.debug('Anchor link used, opening parent tab', $tab, $anchor);\n                if( !$tab.hasClass(className.active) ) {\n                  setTimeout(function() {\n                    module.scrollTo($anchor);\n                  }, 0);\n                }\n                module.activate.all(currentPath);\n                if( !module.cache.read(currentPath) ) {\n                  module.cache.add(currentPath, true);\n                  module.debug('First time tab loaded calling tab init');\n                  settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n                }\n                settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n                return false;\n              }\n            }\n            else {\n              module.error(error.missingTab, $module, $context, currentPath);\n              return false;\n            }\n          });\n        },\n\n        scrollTo: function($element) {\n          var\n            scrollOffset = ($element && $element.length > 0)\n              ? $element.offset().top\n              : false\n          ;\n          if(scrollOffset !== false) {\n            module.debug('Forcing scroll to an in-page link in a hidden tab', scrollOffset, $element);\n            $(document).scrollTop(scrollOffset);\n          }\n        },\n\n        update: {\n          content: function(tabPath, html, evaluateScripts) {\n            var\n              $tab = module.get.tabElement(tabPath),\n              tab  = $tab[0]\n            ;\n            evaluateScripts = (evaluateScripts !== undefined)\n              ? evaluateScripts\n              : settings.evaluateScripts\n            ;\n            if(evaluateScripts) {\n              module.debug('Updating HTML and evaluating inline scripts', tabPath, html);\n              $tab.html(html);\n            }\n            else {\n              module.debug('Updating HTML', tabPath, html);\n              tab.innerHTML = html;\n            }\n          }\n        },\n\n        fetch: {\n\n          content: function(tabPath, fullTabPath) {\n            var\n              $tab        = module.get.tabElement(tabPath),\n              apiSettings = {\n                dataType         : 'html',\n                encodeParameters : false,\n                on               : 'now',\n                cache            : settings.alwaysRefresh,\n                headers          : {\n                  'X-Remote': true\n                },\n                onSuccess : function(response) {\n                  if(settings.cacheType == 'response') {\n                    module.cache.add(fullTabPath, response);\n                  }\n                  module.update.content(tabPath, response);\n                  if(tabPath == activeTabPath) {\n                    module.debug('Content loaded', tabPath);\n                    module.activate.tab(tabPath);\n                  }\n                  else {\n                    module.debug('Content loaded in background', tabPath);\n                  }\n                  settings.onFirstLoad.call($tab[0], tabPath, parameterArray, historyEvent);\n                  settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent);\n                  if(settings.cacheType != 'response') {\n                    module.cache.add(fullTabPath, $tab.html());\n                  }\n                },\n                urlData: {\n                  tab: fullTabPath\n                }\n              },\n              request         = $tab.api('get request') || false,\n              existingRequest = ( request && request.state() === 'pending' ),\n              requestSettings,\n              cachedContent\n            ;\n\n            fullTabPath   = fullTabPath || tabPath;\n            cachedContent = module.cache.read(fullTabPath);\n\n\n            if(settings.cache && cachedContent) {\n              module.activate.tab(tabPath);\n              module.debug('Adding cached content', fullTabPath);\n              if(settings.evaluateScripts == 'once') {\n                module.update.content(tabPath, cachedContent, false);\n              }\n              else {\n                module.update.content(tabPath, cachedContent);\n              }\n              settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent);\n            }\n            else if(existingRequest) {\n              module.set.loading(tabPath);\n              module.debug('Content is already loading', fullTabPath);\n            }\n            else if($.api !== undefined) {\n              requestSettings = $.extend(true, {}, settings.apiSettings, apiSettings);\n              module.debug('Retrieving remote content', fullTabPath, requestSettings);\n              module.set.loading(tabPath);\n              $tab.api(requestSettings);\n            }\n            else {\n              module.error(error.api);\n            }\n          }\n        },\n\n        activate: {\n          all: function(tabPath) {\n            module.activate.tab(tabPath);\n            module.activate.navigation(tabPath);\n          },\n          tab: function(tabPath) {\n            var\n              $tab          = module.get.tabElement(tabPath),\n              $deactiveTabs = (settings.deactivate == 'siblings')\n                ? $tab.siblings($tabs)\n                : $tabs.not($tab),\n              isActive      = $tab.hasClass(className.active)\n            ;\n            module.verbose('Showing tab content for', $tab);\n            if(!isActive) {\n              $tab\n                .addClass(className.active)\n              ;\n              $deactiveTabs\n                .removeClass(className.active + ' ' + className.loading)\n              ;\n              if($tab.length > 0) {\n                settings.onVisible.call($tab[0], tabPath);\n              }\n            }\n          },\n          navigation: function(tabPath) {\n            var\n              $navigation         = module.get.navElement(tabPath),\n              $deactiveNavigation = (settings.deactivate == 'siblings')\n                ? $navigation.siblings($allModules)\n                : $allModules.not($navigation),\n              isActive    = $navigation.hasClass(className.active)\n            ;\n            module.verbose('Activating tab navigation for', $navigation, tabPath);\n            if(!isActive) {\n              $navigation\n                .addClass(className.active)\n              ;\n              $deactiveNavigation\n                .removeClass(className.active + ' ' + className.loading)\n              ;\n            }\n          }\n        },\n\n        deactivate: {\n          all: function() {\n            module.deactivate.navigation();\n            module.deactivate.tabs();\n          },\n          navigation: function() {\n            $allModules\n              .removeClass(className.active)\n            ;\n          },\n          tabs: function() {\n            $tabs\n              .removeClass(className.active + ' ' + className.loading)\n            ;\n          }\n        },\n\n        is: {\n          tab: function(tabName) {\n            return (tabName !== undefined)\n              ? ( module.get.tabElement(tabName).length > 0 )\n              : false\n            ;\n          }\n        },\n\n        get: {\n          initialPath: function() {\n            return $allModules.eq(0).data(metadata.tab) || $tabs.eq(0).data(metadata.tab);\n          },\n          path: function() {\n            return $.address.value();\n          },\n          // adds default tabs to tab path\n          defaultPathArray: function(tabPath) {\n            return module.utilities.pathToArray( module.get.defaultPath(tabPath) );\n          },\n          defaultPath: function(tabPath) {\n            var\n              $defaultNav = $allModules.filter('[data-' + metadata.tab + '^=\"' + tabPath + '/\"]').eq(0),\n              defaultTab  = $defaultNav.data(metadata.tab) || false\n            ;\n            if( defaultTab ) {\n              module.debug('Found default tab', defaultTab);\n              if(recursionDepth < settings.maxDepth) {\n                recursionDepth++;\n                return module.get.defaultPath(defaultTab);\n              }\n              module.error(error.recursion);\n            }\n            else {\n              module.debug('No default tabs found for', tabPath, $tabs);\n            }\n            recursionDepth = 0;\n            return tabPath;\n          },\n          navElement: function(tabPath) {\n            tabPath = tabPath || activeTabPath;\n            return $allModules.filter('[data-' + metadata.tab + '=\"' + tabPath + '\"]');\n          },\n          tabElement: function(tabPath) {\n            var\n              $fullPathTab,\n              $simplePathTab,\n              tabPathArray,\n              lastTab\n            ;\n            tabPath        = tabPath || activeTabPath;\n            tabPathArray   = module.utilities.pathToArray(tabPath);\n            lastTab        = module.utilities.last(tabPathArray);\n            $fullPathTab   = $tabs.filter('[data-' + metadata.tab + '=\"' + tabPath + '\"]');\n            $simplePathTab = $tabs.filter('[data-' + metadata.tab + '=\"' + lastTab + '\"]');\n            return ($fullPathTab.length > 0)\n              ? $fullPathTab\n              : $simplePathTab\n            ;\n          },\n          tab: function() {\n            return activeTabPath;\n          }\n        },\n\n        utilities: {\n          filterArray: function(keepArray, removeArray) {\n            return $.grep(keepArray, function(keepValue) {\n              return ( $.inArray(keepValue, removeArray) == -1);\n            });\n          },\n          last: function(array) {\n            return $.isArray(array)\n              ? array[ array.length - 1]\n              : false\n            ;\n          },\n          pathToArray: function(pathName) {\n            if(pathName === undefined) {\n              pathName = activeTabPath;\n            }\n            return typeof pathName == 'string'\n              ? pathName.split('/')\n              : [pathName]\n            ;\n          },\n          arrayToPath: function(pathArray) {\n            return $.isArray(pathArray)\n              ? pathArray.join('/')\n              : false\n            ;\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n\n};\n\n// shortcut for tabbed content with no defined navigation\n$.tab = function() {\n  $(window).tab.apply(this, arguments);\n};\n\n$.fn.tab.settings = {\n\n  name            : 'Tab',\n  namespace       : 'tab',\n\n  silent          : false,\n  debug           : false,\n  verbose         : false,\n  performance     : true,\n\n  auto            : false,      // uses pjax style endpoints fetching content from same url with remote-content headers\n  history         : false,      // use browser history\n  historyType     : 'hash',     // #/ or html5 state\n  path            : false,      // base path of url\n\n  context         : false,      // specify a context that tabs must appear inside\n  childrenOnly    : false,      // use only tabs that are children of context\n  maxDepth        : 25,         // max depth a tab can be nested\n\n  deactivate      : 'siblings', // whether tabs should deactivate sibling menu elements or all elements initialized together\n\n  alwaysRefresh   : false,      // load tab content new every tab click\n  cache           : true,       // cache the content requests to pull locally\n  cacheType       : 'response', // Whether to cache exact response, or to html cache contents after scripts execute\n  ignoreFirstLoad : false,      // don't load remote content on first load\n\n  apiSettings     : false,      // settings for api call\n  evaluateScripts : 'once',     // whether inline scripts should be parsed (true/false/once). Once will not re-evaluate on cached content\n\n  onFirstLoad : function(tabPath, parameterArray, historyEvent) {}, // called first time loaded\n  onLoad      : function(tabPath, parameterArray, historyEvent) {}, // called on every load\n  onVisible   : function(tabPath, parameterArray, historyEvent) {}, // called every time tab visible\n  onRequest   : function(tabPath, parameterArray, historyEvent) {}, // called ever time a tab beings loading remote content\n\n  templates : {\n    determineTitle: function(tabArray) {} // returns page title for path\n  },\n\n  error: {\n    api        : 'You attempted to load content without API module',\n    method     : 'The method you called is not defined',\n    missingTab : 'Activated tab cannot be found. Tabs are case-sensitive.',\n    noContent  : 'The tab you specified is missing a content url.',\n    path       : 'History enabled, but no path was specified',\n    recursion  : 'Max recursive depth reached',\n    legacyInit : 'onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.',\n    legacyLoad : 'onTabLoad has been renamed to onLoad in 2.0. Please adjust your code',\n    state      : 'History requires Asual\\'s Address library <https://github.com/asual/jquery-address>'\n  },\n\n  metadata : {\n    tab    : 'tab',\n    loaded : 'loaded',\n    promise: 'promise'\n  },\n\n  className   : {\n    loading : 'loading',\n    active  : 'active'\n  },\n\n  selector    : {\n    tabs : '.ui.tab',\n    ui   : '.ui'\n  }\n\n};\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Transition\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.transition = function() {\n  var\n    $allModules     = $(this),\n    moduleSelector  = $allModules.selector || '',\n\n    time            = new Date().getTime(),\n    performance     = [],\n\n    moduleArguments = arguments,\n    query           = moduleArguments[0],\n    queryArguments  = [].slice.call(arguments, 1),\n    methodInvoked   = (typeof query === 'string'),\n\n    requestAnimationFrame = window.requestAnimationFrame\n      || window.mozRequestAnimationFrame\n      || window.webkitRequestAnimationFrame\n      || window.msRequestAnimationFrame\n      || function(callback) { setTimeout(callback, 0); },\n\n    returnedValue\n  ;\n  $allModules\n    .each(function(index) {\n      var\n        $module  = $(this),\n        element  = this,\n\n        // set at run time\n        settings,\n        instance,\n\n        error,\n        className,\n        metadata,\n        animationEnd,\n        animationName,\n\n        namespace,\n        moduleNamespace,\n        eventNamespace,\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n\n          // get full settings\n          settings        = module.get.settings.apply(element, moduleArguments);\n\n          // shorthand\n          className       = settings.className;\n          error           = settings.error;\n          metadata        = settings.metadata;\n\n          // define namespace\n          eventNamespace  = '.' + settings.namespace;\n          moduleNamespace = 'module-' + settings.namespace;\n          instance        = $module.data(moduleNamespace) || module;\n\n          // get vendor specific events\n          animationEnd    = module.get.animationEndEvent();\n\n          if(methodInvoked) {\n            methodInvoked = module.invoke(query);\n          }\n\n          // method not invoked, lets run an animation\n          if(methodInvoked === false) {\n            module.verbose('Converted arguments into settings object', settings);\n            if(settings.interval) {\n              module.delay(settings.animate);\n            }\n            else  {\n              module.animate();\n            }\n            module.instantiate();\n          }\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, instance)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous module for', element);\n          $module\n            .removeData(moduleNamespace)\n          ;\n        },\n\n        refresh: function() {\n          module.verbose('Refreshing display type on next animation');\n          delete module.displayType;\n        },\n\n        forceRepaint: function() {\n          module.verbose('Forcing element repaint');\n          var\n            $parentElement = $module.parent(),\n            $nextElement = $module.next()\n          ;\n          if($nextElement.length === 0) {\n            $module.detach().appendTo($parentElement);\n          }\n          else {\n            $module.detach().insertBefore($nextElement);\n          }\n        },\n\n        repaint: function() {\n          module.verbose('Repainting element');\n          var\n            fakeAssignment = element.offsetWidth\n          ;\n        },\n\n        delay: function(interval) {\n          var\n            direction = module.get.animationDirection(),\n            shouldReverse,\n            delay\n          ;\n          if(!direction) {\n            direction = module.can.transition()\n              ? module.get.direction()\n              : 'static'\n            ;\n          }\n          interval = (interval !== undefined)\n            ? interval\n            : settings.interval\n          ;\n          shouldReverse = (settings.reverse == 'auto' && direction == className.outward);\n          delay = (shouldReverse || settings.reverse == true)\n            ? ($allModules.length - index) * settings.interval\n            : index * settings.interval\n          ;\n          module.debug('Delaying animation by', delay);\n          setTimeout(module.animate, delay);\n        },\n\n        animate: function(overrideSettings) {\n          settings = overrideSettings || settings;\n          if(!module.is.supported()) {\n            module.error(error.support);\n            return false;\n          }\n          module.debug('Preparing animation', settings.animation);\n          if(module.is.animating()) {\n            if(settings.queue) {\n              if(!settings.allowRepeats && module.has.direction() && module.is.occurring() && module.queuing !== true) {\n                module.debug('Animation is currently occurring, preventing queueing same animation', settings.animation);\n              }\n              else {\n                module.queue(settings.animation);\n              }\n              return false;\n            }\n            else if(!settings.allowRepeats && module.is.occurring()) {\n              module.debug('Animation is already occurring, will not execute repeated animation', settings.animation);\n              return false;\n            }\n            else {\n              module.debug('New animation started, completing previous early', settings.animation);\n              instance.complete();\n            }\n          }\n          if( module.can.animate() ) {\n            module.set.animating(settings.animation);\n          }\n          else {\n            module.error(error.noAnimation, settings.animation, element);\n          }\n        },\n\n        reset: function() {\n          module.debug('Resetting animation to beginning conditions');\n          module.remove.animationCallbacks();\n          module.restore.conditions();\n          module.remove.animating();\n        },\n\n        queue: function(animation) {\n          module.debug('Queueing animation of', animation);\n          module.queuing = true;\n          $module\n            .one(animationEnd + '.queue' + eventNamespace, function() {\n              module.queuing = false;\n              module.repaint();\n              module.animate.apply(this, settings);\n            })\n          ;\n        },\n\n        complete: function (event) {\n          module.debug('Animation complete', settings.animation);\n          module.remove.completeCallback();\n          module.remove.failSafe();\n          if(!module.is.looping()) {\n            if( module.is.outward() ) {\n              module.verbose('Animation is outward, hiding element');\n              module.restore.conditions();\n              module.hide();\n            }\n            else if( module.is.inward() ) {\n              module.verbose('Animation is outward, showing element');\n              module.restore.conditions();\n              module.show();\n            }\n            else {\n              module.verbose('Static animation completed');\n              module.restore.conditions();\n              settings.onComplete.call(element);\n            }\n          }\n        },\n\n        force: {\n          visible: function() {\n            var\n              style          = $module.attr('style'),\n              userStyle      = module.get.userStyle(),\n              displayType    = module.get.displayType(),\n              overrideStyle  = userStyle + 'display: ' + displayType + ' !important;',\n              currentDisplay = $module.css('display'),\n              emptyStyle     = (style === undefined || style === '')\n            ;\n            if(currentDisplay !== displayType) {\n              module.verbose('Overriding default display to show element', displayType);\n              $module\n                .attr('style', overrideStyle)\n              ;\n            }\n            else if(emptyStyle) {\n              $module.removeAttr('style');\n            }\n          },\n          hidden: function() {\n            var\n              style          = $module.attr('style'),\n              currentDisplay = $module.css('display'),\n              emptyStyle     = (style === undefined || style === '')\n            ;\n            if(currentDisplay !== 'none' && !module.is.hidden()) {\n              module.verbose('Overriding default display to hide element');\n              $module\n                .css('display', 'none')\n              ;\n            }\n            else if(emptyStyle) {\n              $module\n                .removeAttr('style')\n              ;\n            }\n          }\n        },\n\n        has: {\n          direction: function(animation) {\n            var\n              hasDirection = false\n            ;\n            animation = animation || settings.animation;\n            if(typeof animation === 'string') {\n              animation = animation.split(' ');\n              $.each(animation, function(index, word){\n                if(word === className.inward || word === className.outward) {\n                  hasDirection = true;\n                }\n              });\n            }\n            return hasDirection;\n          },\n          inlineDisplay: function() {\n            var\n              style = $module.attr('style') || ''\n            ;\n            return $.isArray(style.match(/display.*?;/, ''));\n          }\n        },\n\n        set: {\n          animating: function(animation) {\n            var\n              animationClass,\n              direction\n            ;\n            // remove previous callbacks\n            module.remove.completeCallback();\n\n            // determine exact animation\n            animation      = animation || settings.animation;\n            animationClass = module.get.animationClass(animation);\n\n            // save animation class in cache to restore class names\n            module.save.animation(animationClass);\n\n            // override display if necessary so animation appears visibly\n            module.force.visible();\n\n            module.remove.hidden();\n            module.remove.direction();\n\n            module.start.animation(animationClass);\n\n          },\n          duration: function(animationName, duration) {\n            duration = duration || settings.duration;\n            duration = (typeof duration == 'number')\n              ? duration + 'ms'\n              : duration\n            ;\n            if(duration || duration === 0) {\n              module.verbose('Setting animation duration', duration);\n              $module\n                .css({\n                  'animation-duration':  duration\n                })\n              ;\n            }\n          },\n          direction: function(direction) {\n            direction = direction || module.get.direction();\n            if(direction == className.inward) {\n              module.set.inward();\n            }\n            else {\n              module.set.outward();\n            }\n          },\n          looping: function() {\n            module.debug('Transition set to loop');\n            $module\n              .addClass(className.looping)\n            ;\n          },\n          hidden: function() {\n            $module\n              .addClass(className.transition)\n              .addClass(className.hidden)\n            ;\n          },\n          inward: function() {\n            module.debug('Setting direction to inward');\n            $module\n              .removeClass(className.outward)\n              .addClass(className.inward)\n            ;\n          },\n          outward: function() {\n            module.debug('Setting direction to outward');\n            $module\n              .removeClass(className.inward)\n              .addClass(className.outward)\n            ;\n          },\n          visible: function() {\n            $module\n              .addClass(className.transition)\n              .addClass(className.visible)\n            ;\n          }\n        },\n\n        start: {\n          animation: function(animationClass) {\n            animationClass = animationClass || module.get.animationClass();\n            module.debug('Starting tween', animationClass);\n            $module\n              .addClass(animationClass)\n              .one(animationEnd + '.complete' + eventNamespace, module.complete)\n            ;\n            if(settings.useFailSafe) {\n              module.add.failSafe();\n            }\n            module.set.duration(settings.duration);\n            settings.onStart.call(element);\n          }\n        },\n\n        save: {\n          animation: function(animation) {\n            if(!module.cache) {\n              module.cache = {};\n            }\n            module.cache.animation = animation;\n          },\n          displayType: function(displayType) {\n            if(displayType !== 'none') {\n              $module.data(metadata.displayType, displayType);\n            }\n          },\n          transitionExists: function(animation, exists) {\n            $.fn.transition.exists[animation] = exists;\n            module.verbose('Saving existence of transition', animation, exists);\n          }\n        },\n\n        restore: {\n          conditions: function() {\n            var\n              animation = module.get.currentAnimation()\n            ;\n            if(animation) {\n              $module\n                .removeClass(animation)\n              ;\n              module.verbose('Removing animation class', module.cache);\n            }\n            module.remove.duration();\n          }\n        },\n\n        add: {\n          failSafe: function() {\n            var\n              duration = module.get.duration()\n            ;\n            module.timer = setTimeout(function() {\n              $module.triggerHandler(animationEnd);\n            }, duration + settings.failSafeDelay);\n            module.verbose('Adding fail safe timer', module.timer);\n          }\n        },\n\n        remove: {\n          animating: function() {\n            $module.removeClass(className.animating);\n          },\n          animationCallbacks: function() {\n            module.remove.queueCallback();\n            module.remove.completeCallback();\n          },\n          queueCallback: function() {\n            $module.off('.queue' + eventNamespace);\n          },\n          completeCallback: function() {\n            $module.off('.complete' + eventNamespace);\n          },\n          display: function() {\n            $module.css('display', '');\n          },\n          direction: function() {\n            $module\n              .removeClass(className.inward)\n              .removeClass(className.outward)\n            ;\n          },\n          duration: function() {\n            $module\n              .css('animation-duration', '')\n            ;\n          },\n          failSafe: function() {\n            module.verbose('Removing fail safe timer', module.timer);\n            if(module.timer) {\n              clearTimeout(module.timer);\n            }\n          },\n          hidden: function() {\n            $module.removeClass(className.hidden);\n          },\n          visible: function() {\n            $module.removeClass(className.visible);\n          },\n          looping: function() {\n            module.debug('Transitions are no longer looping');\n            if( module.is.looping() ) {\n              module.reset();\n              $module\n                .removeClass(className.looping)\n              ;\n            }\n          },\n          transition: function() {\n            $module\n              .removeClass(className.visible)\n              .removeClass(className.hidden)\n            ;\n          }\n        },\n        get: {\n          settings: function(animation, duration, onComplete) {\n            // single settings object\n            if(typeof animation == 'object') {\n              return $.extend(true, {}, $.fn.transition.settings, animation);\n            }\n            // all arguments provided\n            else if(typeof onComplete == 'function') {\n              return $.extend({}, $.fn.transition.settings, {\n                animation  : animation,\n                onComplete : onComplete,\n                duration   : duration\n              });\n            }\n            // only duration provided\n            else if(typeof duration == 'string' || typeof duration == 'number') {\n              return $.extend({}, $.fn.transition.settings, {\n                animation : animation,\n                duration  : duration\n              });\n            }\n            // duration is actually settings object\n            else if(typeof duration == 'object') {\n              return $.extend({}, $.fn.transition.settings, duration, {\n                animation : animation\n              });\n            }\n            // duration is actually callback\n            else if(typeof duration == 'function') {\n              return $.extend({}, $.fn.transition.settings, {\n                animation  : animation,\n                onComplete : duration\n              });\n            }\n            // only animation provided\n            else {\n              return $.extend({}, $.fn.transition.settings, {\n                animation : animation\n              });\n            }\n          },\n          animationClass: function(animation) {\n            var\n              animationClass = animation || settings.animation,\n              directionClass = (module.can.transition() && !module.has.direction())\n                ? module.get.direction() + ' '\n                : ''\n            ;\n            return className.animating + ' '\n              + className.transition + ' '\n              + directionClass\n              + animationClass\n            ;\n          },\n          currentAnimation: function() {\n            return (module.cache && module.cache.animation !== undefined)\n              ? module.cache.animation\n              : false\n            ;\n          },\n          currentDirection: function() {\n            return module.is.inward()\n              ? className.inward\n              : className.outward\n            ;\n          },\n          direction: function() {\n            return module.is.hidden() || !module.is.visible()\n              ? className.inward\n              : className.outward\n            ;\n          },\n          animationDirection: function(animation) {\n            var\n              direction\n            ;\n            animation = animation || settings.animation;\n            if(typeof animation === 'string') {\n              animation = animation.split(' ');\n              // search animation name for out/in class\n              $.each(animation, function(index, word){\n                if(word === className.inward) {\n                  direction = className.inward;\n                }\n                else if(word === className.outward) {\n                  direction = className.outward;\n                }\n              });\n            }\n            // return found direction\n            if(direction) {\n              return direction;\n            }\n            return false;\n          },\n          duration: function(duration) {\n            duration = duration || settings.duration;\n            if(duration === false) {\n              duration = $module.css('animation-duration') || 0;\n            }\n            return (typeof duration === 'string')\n              ? (duration.indexOf('ms') > -1)\n                ? parseFloat(duration)\n                : parseFloat(duration) * 1000\n              : duration\n            ;\n          },\n          displayType: function() {\n            if(settings.displayType) {\n              return settings.displayType;\n            }\n            if($module.data(metadata.displayType) === undefined) {\n              // create fake element to determine display state\n              module.can.transition(true);\n            }\n            return $module.data(metadata.displayType);\n          },\n          userStyle: function(style) {\n            style = style || $module.attr('style') || '';\n            return style.replace(/display.*?;/, '');\n          },\n          transitionExists: function(animation) {\n            return $.fn.transition.exists[animation];\n          },\n          animationStartEvent: function() {\n            var\n              element     = document.createElement('div'),\n              animations  = {\n                'animation'       :'animationstart',\n                'OAnimation'      :'oAnimationStart',\n                'MozAnimation'    :'mozAnimationStart',\n                'WebkitAnimation' :'webkitAnimationStart'\n              },\n              animation\n            ;\n            for(animation in animations){\n              if( element.style[animation] !== undefined ){\n                return animations[animation];\n              }\n            }\n            return false;\n          },\n          animationEndEvent: function() {\n            var\n              element     = document.createElement('div'),\n              animations  = {\n                'animation'       :'animationend',\n                'OAnimation'      :'oAnimationEnd',\n                'MozAnimation'    :'mozAnimationEnd',\n                'WebkitAnimation' :'webkitAnimationEnd'\n              },\n              animation\n            ;\n            for(animation in animations){\n              if( element.style[animation] !== undefined ){\n                return animations[animation];\n              }\n            }\n            return false;\n          }\n\n        },\n\n        can: {\n          transition: function(forced) {\n            var\n              animation         = settings.animation,\n              transitionExists  = module.get.transitionExists(animation),\n              elementClass,\n              tagName,\n              $clone,\n              currentAnimation,\n              inAnimation,\n              directionExists,\n              displayType\n            ;\n            if( transitionExists === undefined || forced) {\n              module.verbose('Determining whether animation exists');\n              elementClass = $module.attr('class');\n              tagName      = $module.prop('tagName');\n\n              $clone = $('<' + tagName + ' />').addClass( elementClass ).insertAfter($module);\n              currentAnimation = $clone\n                .addClass(animation)\n                .removeClass(className.inward)\n                .removeClass(className.outward)\n                .addClass(className.animating)\n                .addClass(className.transition)\n                .css('animationName')\n              ;\n              inAnimation = $clone\n                .addClass(className.inward)\n                .css('animationName')\n              ;\n              displayType = $clone\n                .attr('class', elementClass)\n                .removeAttr('style')\n                .removeClass(className.hidden)\n                .removeClass(className.visible)\n                .show()\n                .css('display')\n              ;\n              module.verbose('Determining final display state', displayType);\n              module.save.displayType(displayType);\n\n              $clone.remove();\n              if(currentAnimation != inAnimation) {\n                module.debug('Direction exists for animation', animation);\n                directionExists = true;\n              }\n              else if(currentAnimation == 'none' || !currentAnimation) {\n                module.debug('No animation defined in css', animation);\n                return;\n              }\n              else {\n                module.debug('Static animation found', animation, displayType);\n                directionExists = false;\n              }\n              module.save.transitionExists(animation, directionExists);\n            }\n            return (transitionExists !== undefined)\n              ? transitionExists\n              : directionExists\n            ;\n          },\n          animate: function() {\n            // can transition does not return a value if animation does not exist\n            return (module.can.transition() !== undefined);\n          }\n        },\n\n        is: {\n          animating: function() {\n            return $module.hasClass(className.animating);\n          },\n          inward: function() {\n            return $module.hasClass(className.inward);\n          },\n          outward: function() {\n            return $module.hasClass(className.outward);\n          },\n          looping: function() {\n            return $module.hasClass(className.looping);\n          },\n          occurring: function(animation) {\n            animation = animation || settings.animation;\n            animation = '.' + animation.replace(' ', '.');\n            return ( $module.filter(animation).length > 0 );\n          },\n          visible: function() {\n            return $module.is(':visible');\n          },\n          hidden: function() {\n            return $module.css('visibility') === 'hidden';\n          },\n          supported: function() {\n            return(animationEnd !== false);\n          }\n        },\n\n        hide: function() {\n          module.verbose('Hiding element');\n          if( module.is.animating() ) {\n            module.reset();\n          }\n          element.blur(); // IE will trigger focus change if element is not blurred before hiding\n          module.remove.display();\n          module.remove.visible();\n          module.set.hidden();\n          module.force.hidden();\n          settings.onHide.call(element);\n          settings.onComplete.call(element);\n          // module.repaint();\n        },\n\n        show: function(display) {\n          module.verbose('Showing element', display);\n          module.remove.hidden();\n          module.set.visible();\n          module.force.visible();\n          settings.onShow.call(element);\n          settings.onComplete.call(element);\n          // module.repaint();\n        },\n\n        toggle: function() {\n          if( module.is.visible() ) {\n            module.hide();\n          }\n          else {\n            module.show();\n          }\n        },\n\n        stop: function() {\n          module.debug('Stopping current animation');\n          $module.triggerHandler(animationEnd);\n        },\n\n        stopAll: function() {\n          module.debug('Stopping all animation');\n          module.remove.queueCallback();\n          $module.triggerHandler(animationEnd);\n        },\n\n        clear: {\n          queue: function() {\n            module.debug('Clearing animation queue');\n            module.remove.queueCallback();\n          }\n        },\n\n        enable: function() {\n          module.verbose('Starting animation');\n          $module.removeClass(className.disabled);\n        },\n\n        disable: function() {\n          module.debug('Stopping animation');\n          $module.addClass(className.disabled);\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if($allModules.length > 1) {\n              title += ' ' + '(' + $allModules.length + ')';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        // modified for transition to return invoke success\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return (found !== undefined)\n            ? found\n            : false\n          ;\n        }\n      };\n      module.initialize();\n    })\n  ;\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n// Records if CSS transition is available\n$.fn.transition.exists = {};\n\n$.fn.transition.settings = {\n\n  // module info\n  name          : 'Transition',\n\n  // hide all output from this component regardless of other settings\n  silent        : false,\n\n  // debug content outputted to console\n  debug         : false,\n\n  // verbose debug output\n  verbose       : false,\n\n  // performance data output\n  performance   : true,\n\n  // event namespace\n  namespace     : 'transition',\n\n  // delay between animations in group\n  interval      : 0,\n\n  // whether group animations should be reversed\n  reverse       : 'auto',\n\n  // animation callback event\n  onStart       : function() {},\n  onComplete    : function() {},\n  onShow        : function() {},\n  onHide        : function() {},\n\n  // whether timeout should be used to ensure callback fires in cases animationend does not\n  useFailSafe   : true,\n\n  // delay in ms for fail safe\n  failSafeDelay : 100,\n\n  // whether EXACT animation can occur twice in a row\n  allowRepeats  : false,\n\n  // Override final display type on visible\n  displayType   : false,\n\n  // animation duration\n  animation     : 'fade',\n  duration      : false,\n\n  // new animations will occur after previous ones\n  queue         : true,\n\n  metadata : {\n    displayType: 'display'\n  },\n\n  className   : {\n    animating  : 'animating',\n    disabled   : 'disabled',\n    hidden     : 'hidden',\n    inward     : 'in',\n    loading    : 'loading',\n    looping    : 'looping',\n    outward    : 'out',\n    transition : 'transition',\n    visible    : 'visible'\n  },\n\n  // possible errors\n  error: {\n    noAnimation : 'Element is no longer attached to DOM. Unable to animate.  Use silent setting to surpress this warning in production.',\n    repeated    : 'That animation is already occurring, cancelling repeated animation',\n    method      : 'The method you called is not defined',\n    support     : 'This browser does not support CSS animations'\n  }\n\n};\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - API\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nvar\n  window = (typeof window != 'undefined' && window.Math == Math)\n    ? window\n    : (typeof self != 'undefined' && self.Math == Math)\n      ? self\n      : Function('return this')()\n;\n\n$.api = $.fn.api = function(parameters) {\n\n  var\n    // use window context if none specified\n    $allModules     = $.isFunction(this)\n        ? $(window)\n        : $(this),\n    moduleSelector = $allModules.selector || '',\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n\n    returnedValue\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings          = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.api.settings, parameters)\n          : $.extend({}, $.fn.api.settings),\n\n        // internal aliases\n        namespace       = settings.namespace,\n        metadata        = settings.metadata,\n        selector        = settings.selector,\n        error           = settings.error,\n        className       = settings.className,\n\n        // define namespaces for modules\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        // element that creates request\n        $module         = $(this),\n        $form           = $module.closest(selector.form),\n\n        // context used for state\n        $context        = (settings.stateContext)\n          ? $(settings.stateContext)\n          : $module,\n\n        // request details\n        ajaxSettings,\n        requestSettings,\n        url,\n        data,\n        requestStartTime,\n\n        // standard module\n        element         = this,\n        context         = $context[0],\n        instance        = $module.data(moduleNamespace),\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          if(!methodInvoked) {\n            module.bind.events();\n          }\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, instance)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous module for', element);\n          $module\n            .removeData(moduleNamespace)\n            .off(eventNamespace)\n          ;\n        },\n\n        bind: {\n          events: function() {\n            var\n              triggerEvent = module.get.event()\n            ;\n            if( triggerEvent ) {\n              module.verbose('Attaching API events to element', triggerEvent);\n              $module\n                .on(triggerEvent + eventNamespace, module.event.trigger)\n              ;\n            }\n            else if(settings.on == 'now') {\n              module.debug('Querying API endpoint immediately');\n              module.query();\n            }\n          }\n        },\n\n        decode: {\n          json: function(response) {\n            if(response !== undefined && typeof response == 'string') {\n              try {\n               response = JSON.parse(response);\n              }\n              catch(e) {\n                // isnt json string\n              }\n            }\n            return response;\n          }\n        },\n\n        read: {\n          cachedResponse: function(url) {\n            var\n              response\n            ;\n            if(window.Storage === undefined) {\n              module.error(error.noStorage);\n              return;\n            }\n            response = sessionStorage.getItem(url);\n            module.debug('Using cached response', url, response);\n            response = module.decode.json(response);\n            return response;\n          }\n        },\n        write: {\n          cachedResponse: function(url, response) {\n            if(response && response === '') {\n              module.debug('Response empty, not caching', response);\n              return;\n            }\n            if(window.Storage === undefined) {\n              module.error(error.noStorage);\n              return;\n            }\n            if( $.isPlainObject(response) ) {\n              response = JSON.stringify(response);\n            }\n            sessionStorage.setItem(url, response);\n            module.verbose('Storing cached response for url', url, response);\n          }\n        },\n\n        query: function() {\n\n          if(module.is.disabled()) {\n            module.debug('Element is disabled API request aborted');\n            return;\n          }\n\n          if(module.is.loading()) {\n            if(settings.interruptRequests) {\n              module.debug('Interrupting previous request');\n              module.abort();\n            }\n            else {\n              module.debug('Cancelling request, previous request is still pending');\n              return;\n            }\n          }\n\n          // pass element metadata to url (value, text)\n          if(settings.defaultData) {\n            $.extend(true, settings.urlData, module.get.defaultData());\n          }\n\n          // Add form content\n          if(settings.serializeForm) {\n            settings.data = module.add.formData(settings.data);\n          }\n\n          // call beforesend and get any settings changes\n          requestSettings = module.get.settings();\n\n          // check if before send cancelled request\n          if(requestSettings === false) {\n            module.cancelled = true;\n            module.error(error.beforeSend);\n            return;\n          }\n          else {\n            module.cancelled = false;\n          }\n\n          // get url\n          url = module.get.templatedURL();\n\n          if(!url && !module.is.mocked()) {\n            module.error(error.missingURL);\n            return;\n          }\n\n          // replace variables\n          url = module.add.urlData( url );\n          // missing url parameters\n          if( !url && !module.is.mocked()) {\n            return;\n          }\n\n          requestSettings.url = settings.base + url;\n\n          // look for jQuery ajax parameters in settings\n          ajaxSettings = $.extend(true, {}, settings, {\n            type       : settings.method || settings.type,\n            data       : data,\n            url        : settings.base + url,\n            beforeSend : settings.beforeXHR,\n            success    : function() {},\n            failure    : function() {},\n            complete   : function() {}\n          });\n\n          module.debug('Querying URL', ajaxSettings.url);\n          module.verbose('Using AJAX settings', ajaxSettings);\n          if(settings.cache === 'local' && module.read.cachedResponse(url)) {\n            module.debug('Response returned from local cache');\n            module.request = module.create.request();\n            module.request.resolveWith(context, [ module.read.cachedResponse(url) ]);\n            return;\n          }\n\n          if( !settings.throttle ) {\n            module.debug('Sending request', data, ajaxSettings.method);\n            module.send.request();\n          }\n          else {\n            if(!settings.throttleFirstRequest && !module.timer) {\n              module.debug('Sending request', data, ajaxSettings.method);\n              module.send.request();\n              module.timer = setTimeout(function(){}, settings.throttle);\n            }\n            else {\n              module.debug('Throttling request', settings.throttle);\n              clearTimeout(module.timer);\n              module.timer = setTimeout(function() {\n                if(module.timer) {\n                  delete module.timer;\n                }\n                module.debug('Sending throttled request', data, ajaxSettings.method);\n                module.send.request();\n              }, settings.throttle);\n            }\n          }\n\n        },\n\n        should: {\n          removeError: function() {\n            return ( settings.hideError === true || (settings.hideError === 'auto' && !module.is.form()) );\n          }\n        },\n\n        is: {\n          disabled: function() {\n            return ($module.filter(selector.disabled).length > 0);\n          },\n          expectingJSON: function() {\n            return settings.dataType === 'json' || settings.dataType === 'jsonp';\n          },\n          form: function() {\n            return $module.is('form') || $context.is('form');\n          },\n          mocked: function() {\n            return (settings.mockResponse || settings.mockResponseAsync || settings.response || settings.responseAsync);\n          },\n          input: function() {\n            return $module.is('input');\n          },\n          loading: function() {\n            return (module.request)\n              ? (module.request.state() == 'pending')\n              : false\n            ;\n          },\n          abortedRequest: function(xhr) {\n            if(xhr && xhr.readyState !== undefined && xhr.readyState === 0) {\n              module.verbose('XHR request determined to be aborted');\n              return true;\n            }\n            else {\n              module.verbose('XHR request was not aborted');\n              return false;\n            }\n          },\n          validResponse: function(response) {\n            if( (!module.is.expectingJSON()) || !$.isFunction(settings.successTest) ) {\n              module.verbose('Response is not JSON, skipping validation', settings.successTest, response);\n              return true;\n            }\n            module.debug('Checking JSON returned success', settings.successTest, response);\n            if( settings.successTest(response) ) {\n              module.debug('Response passed success test', response);\n              return true;\n            }\n            else {\n              module.debug('Response failed success test', response);\n              return false;\n            }\n          }\n        },\n\n        was: {\n          cancelled: function() {\n            return (module.cancelled || false);\n          },\n          succesful: function() {\n            return (module.request && module.request.state() == 'resolved');\n          },\n          failure: function() {\n            return (module.request && module.request.state() == 'rejected');\n          },\n          complete: function() {\n            return (module.request && (module.request.state() == 'resolved' || module.request.state() == 'rejected') );\n          }\n        },\n\n        add: {\n          urlData: function(url, urlData) {\n            var\n              requiredVariables,\n              optionalVariables\n            ;\n            if(url) {\n              requiredVariables = url.match(settings.regExp.required);\n              optionalVariables = url.match(settings.regExp.optional);\n              urlData           = urlData || settings.urlData;\n              if(requiredVariables) {\n                module.debug('Looking for required URL variables', requiredVariables);\n                $.each(requiredVariables, function(index, templatedString) {\n                  var\n                    // allow legacy {$var} style\n                    variable = (templatedString.indexOf('$') !== -1)\n                      ? templatedString.substr(2, templatedString.length - 3)\n                      : templatedString.substr(1, templatedString.length - 2),\n                    value   = ($.isPlainObject(urlData) && urlData[variable] !== undefined)\n                      ? urlData[variable]\n                      : ($module.data(variable) !== undefined)\n                        ? $module.data(variable)\n                        : ($context.data(variable) !== undefined)\n                          ? $context.data(variable)\n                          : urlData[variable]\n                  ;\n                  // remove value\n                  if(value === undefined) {\n                    module.error(error.requiredParameter, variable, url);\n                    url = false;\n                    return false;\n                  }\n                  else {\n                    module.verbose('Found required variable', variable, value);\n                    value = (settings.encodeParameters)\n                      ? module.get.urlEncodedValue(value)\n                      : value\n                    ;\n                    url = url.replace(templatedString, value);\n                  }\n                });\n              }\n              if(optionalVariables) {\n                module.debug('Looking for optional URL variables', requiredVariables);\n                $.each(optionalVariables, function(index, templatedString) {\n                  var\n                    // allow legacy {/$var} style\n                    variable = (templatedString.indexOf('$') !== -1)\n                      ? templatedString.substr(3, templatedString.length - 4)\n                      : templatedString.substr(2, templatedString.length - 3),\n                    value   = ($.isPlainObject(urlData) && urlData[variable] !== undefined)\n                      ? urlData[variable]\n                      : ($module.data(variable) !== undefined)\n                        ? $module.data(variable)\n                        : ($context.data(variable) !== undefined)\n                          ? $context.data(variable)\n                          : urlData[variable]\n                  ;\n                  // optional replacement\n                  if(value !== undefined) {\n                    module.verbose('Optional variable Found', variable, value);\n                    url = url.replace(templatedString, value);\n                  }\n                  else {\n                    module.verbose('Optional variable not found', variable);\n                    // remove preceding slash if set\n                    if(url.indexOf('/' + templatedString) !== -1) {\n                      url = url.replace('/' + templatedString, '');\n                    }\n                    else {\n                      url = url.replace(templatedString, '');\n                    }\n                  }\n                });\n              }\n            }\n            return url;\n          },\n          formData: function(data) {\n            var\n              canSerialize = ($.fn.serializeObject !== undefined),\n              formData     = (canSerialize)\n                ? $form.serializeObject()\n                : $form.serialize(),\n              hasOtherData\n            ;\n            data         = data || settings.data;\n            hasOtherData = $.isPlainObject(data);\n\n            if(hasOtherData) {\n              if(canSerialize) {\n                module.debug('Extending existing data with form data', data, formData);\n                data = $.extend(true, {}, data, formData);\n              }\n              else {\n                module.error(error.missingSerialize);\n                module.debug('Cant extend data. Replacing data with form data', data, formData);\n                data = formData;\n              }\n            }\n            else {\n              module.debug('Adding form data', formData);\n              data = formData;\n            }\n            return data;\n          }\n        },\n\n        send: {\n          request: function() {\n            module.set.loading();\n            module.request = module.create.request();\n            if( module.is.mocked() ) {\n              module.mockedXHR = module.create.mockedXHR();\n            }\n            else {\n              module.xhr = module.create.xhr();\n            }\n            settings.onRequest.call(context, module.request, module.xhr);\n          }\n        },\n\n        event: {\n          trigger: function(event) {\n            module.query();\n            if(event.type == 'submit' || event.type == 'click') {\n              event.preventDefault();\n            }\n          },\n          xhr: {\n            always: function() {\n              // nothing special\n            },\n            done: function(response, textStatus, xhr) {\n              var\n                context            = this,\n                elapsedTime        = (new Date().getTime() - requestStartTime),\n                timeLeft           = (settings.loadingDuration - elapsedTime),\n                translatedResponse = ( $.isFunction(settings.onResponse) )\n                  ? module.is.expectingJSON()\n                    ? settings.onResponse.call(context, $.extend(true, {}, response))\n                    : settings.onResponse.call(context, response)\n                  : false\n              ;\n              timeLeft = (timeLeft > 0)\n                ? timeLeft\n                : 0\n              ;\n              if(translatedResponse) {\n                module.debug('Modified API response in onResponse callback', settings.onResponse, translatedResponse, response);\n                response = translatedResponse;\n              }\n              if(timeLeft > 0) {\n                module.debug('Response completed early delaying state change by', timeLeft);\n              }\n              setTimeout(function() {\n                if( module.is.validResponse(response) ) {\n                  module.request.resolveWith(context, [response, xhr]);\n                }\n                else {\n                  module.request.rejectWith(context, [xhr, 'invalid']);\n                }\n              }, timeLeft);\n            },\n            fail: function(xhr, status, httpMessage) {\n              var\n                context     = this,\n                elapsedTime = (new Date().getTime() - requestStartTime),\n                timeLeft    = (settings.loadingDuration - elapsedTime)\n              ;\n              timeLeft = (timeLeft > 0)\n                ? timeLeft\n                : 0\n              ;\n              if(timeLeft > 0) {\n                module.debug('Response completed early delaying state change by', timeLeft);\n              }\n              setTimeout(function() {\n                if( module.is.abortedRequest(xhr) ) {\n                  module.request.rejectWith(context, [xhr, 'aborted', httpMessage]);\n                }\n                else {\n                  module.request.rejectWith(context, [xhr, 'error', status, httpMessage]);\n                }\n              }, timeLeft);\n            }\n          },\n          request: {\n            done: function(response, xhr) {\n              module.debug('Successful API Response', response);\n              if(settings.cache === 'local' && url) {\n                module.write.cachedResponse(url, response);\n                module.debug('Saving server response locally', module.cache);\n              }\n              settings.onSuccess.call(context, response, $module, xhr);\n            },\n            complete: function(firstParameter, secondParameter) {\n              var\n                xhr,\n                response\n              ;\n              // have to guess callback parameters based on request success\n              if( module.was.succesful() ) {\n                response = firstParameter;\n                xhr      = secondParameter;\n              }\n              else {\n                xhr      = firstParameter;\n                response = module.get.responseFromXHR(xhr);\n              }\n              module.remove.loading();\n              settings.onComplete.call(context, response, $module, xhr);\n            },\n            fail: function(xhr, status, httpMessage) {\n              var\n                // pull response from xhr if available\n                response     = module.get.responseFromXHR(xhr),\n                errorMessage = module.get.errorFromRequest(response, status, httpMessage)\n              ;\n              if(status == 'aborted') {\n                module.debug('XHR Aborted (Most likely caused by page navigation or CORS Policy)', status, httpMessage);\n                settings.onAbort.call(context, status, $module, xhr);\n                return true;\n              }\n              else if(status == 'invalid') {\n                module.debug('JSON did not pass success test. A server-side error has most likely occurred', response);\n              }\n              else if(status == 'error') {\n                if(xhr !== undefined) {\n                  module.debug('XHR produced a server error', status, httpMessage);\n                  // make sure we have an error to display to console\n                  if( xhr.status != 200 && httpMessage !== undefined && httpMessage !== '') {\n                    module.error(error.statusMessage + httpMessage, ajaxSettings.url);\n                  }\n                  settings.onError.call(context, errorMessage, $module, xhr);\n                }\n              }\n\n              if(settings.errorDuration && status !== 'aborted') {\n                module.debug('Adding error state');\n                module.set.error();\n                if( module.should.removeError() ) {\n                  setTimeout(module.remove.error, settings.errorDuration);\n                }\n              }\n              module.debug('API Request failed', errorMessage, xhr);\n              settings.onFailure.call(context, response, $module, xhr);\n            }\n          }\n        },\n\n        create: {\n\n          request: function() {\n            // api request promise\n            return $.Deferred()\n              .always(module.event.request.complete)\n              .done(module.event.request.done)\n              .fail(module.event.request.fail)\n            ;\n          },\n\n          mockedXHR: function () {\n            var\n              // xhr does not simulate these properties of xhr but must return them\n              textStatus     = false,\n              status         = false,\n              httpMessage    = false,\n              responder      = settings.mockResponse      || settings.response,\n              asyncResponder = settings.mockResponseAsync || settings.responseAsync,\n              asyncCallback,\n              response,\n              mockedXHR\n            ;\n\n            mockedXHR = $.Deferred()\n              .always(module.event.xhr.complete)\n              .done(module.event.xhr.done)\n              .fail(module.event.xhr.fail)\n            ;\n\n            if(responder) {\n              if( $.isFunction(responder) ) {\n                module.debug('Using specified synchronous callback', responder);\n                response = responder.call(context, requestSettings);\n              }\n              else {\n                module.debug('Using settings specified response', responder);\n                response = responder;\n              }\n              // simulating response\n              mockedXHR.resolveWith(context, [ response, textStatus, { responseText: response }]);\n            }\n            else if( $.isFunction(asyncResponder) ) {\n              asyncCallback = function(response) {\n                module.debug('Async callback returned response', response);\n\n                if(response) {\n                  mockedXHR.resolveWith(context, [ response, textStatus, { responseText: response }]);\n                }\n                else {\n                  mockedXHR.rejectWith(context, [{ responseText: response }, status, httpMessage]);\n                }\n              };\n              module.debug('Using specified async response callback', asyncResponder);\n              asyncResponder.call(context, requestSettings, asyncCallback);\n            }\n            return mockedXHR;\n          },\n\n          xhr: function() {\n            var\n              xhr\n            ;\n            // ajax request promise\n            xhr = $.ajax(ajaxSettings)\n              .always(module.event.xhr.always)\n              .done(module.event.xhr.done)\n              .fail(module.event.xhr.fail)\n            ;\n            module.verbose('Created server request', xhr, ajaxSettings);\n            return xhr;\n          }\n        },\n\n        set: {\n          error: function() {\n            module.verbose('Adding error state to element', $context);\n            $context.addClass(className.error);\n          },\n          loading: function() {\n            module.verbose('Adding loading state to element', $context);\n            $context.addClass(className.loading);\n            requestStartTime = new Date().getTime();\n          }\n        },\n\n        remove: {\n          error: function() {\n            module.verbose('Removing error state from element', $context);\n            $context.removeClass(className.error);\n          },\n          loading: function() {\n            module.verbose('Removing loading state from element', $context);\n            $context.removeClass(className.loading);\n          }\n        },\n\n        get: {\n          responseFromXHR: function(xhr) {\n            return $.isPlainObject(xhr)\n              ? (module.is.expectingJSON())\n                ? module.decode.json(xhr.responseText)\n                : xhr.responseText\n              : false\n            ;\n          },\n          errorFromRequest: function(response, status, httpMessage) {\n            return ($.isPlainObject(response) && response.error !== undefined)\n              ? response.error // use json error message\n              : (settings.error[status] !== undefined) // use server error message\n                ? settings.error[status]\n                : httpMessage\n            ;\n          },\n          request: function() {\n            return module.request || false;\n          },\n          xhr: function() {\n            return module.xhr || false;\n          },\n          settings: function() {\n            var\n              runSettings\n            ;\n            runSettings = settings.beforeSend.call(context, settings);\n            if(runSettings) {\n              if(runSettings.success !== undefined) {\n                module.debug('Legacy success callback detected', runSettings);\n                module.error(error.legacyParameters, runSettings.success);\n                runSettings.onSuccess = runSettings.success;\n              }\n              if(runSettings.failure !== undefined) {\n                module.debug('Legacy failure callback detected', runSettings);\n                module.error(error.legacyParameters, runSettings.failure);\n                runSettings.onFailure = runSettings.failure;\n              }\n              if(runSettings.complete !== undefined) {\n                module.debug('Legacy complete callback detected', runSettings);\n                module.error(error.legacyParameters, runSettings.complete);\n                runSettings.onComplete = runSettings.complete;\n              }\n            }\n            if(runSettings === undefined) {\n              module.error(error.noReturnedValue);\n            }\n            if(runSettings === false) {\n              return runSettings;\n            }\n            return (runSettings !== undefined)\n              ? $.extend(true, {}, runSettings)\n              : $.extend(true, {}, settings)\n            ;\n          },\n          urlEncodedValue: function(value) {\n            var\n              decodedValue   = window.decodeURIComponent(value),\n              encodedValue   = window.encodeURIComponent(value),\n              alreadyEncoded = (decodedValue !== value)\n            ;\n            if(alreadyEncoded) {\n              module.debug('URL value is already encoded, avoiding double encoding', value);\n              return value;\n            }\n            module.verbose('Encoding value using encodeURIComponent', value, encodedValue);\n            return encodedValue;\n          },\n          defaultData: function() {\n            var\n              data = {}\n            ;\n            if( !$.isWindow(element) ) {\n              if( module.is.input() ) {\n                data.value = $module.val();\n              }\n              else if( module.is.form() ) {\n\n              }\n              else {\n                data.text = $module.text();\n              }\n            }\n            return data;\n          },\n          event: function() {\n            if( $.isWindow(element) || settings.on == 'now' ) {\n              module.debug('API called without element, no events attached');\n              return false;\n            }\n            else if(settings.on == 'auto') {\n              if( $module.is('input') ) {\n                return (element.oninput !== undefined)\n                  ? 'input'\n                  : (element.onpropertychange !== undefined)\n                    ? 'propertychange'\n                    : 'keyup'\n                ;\n              }\n              else if( $module.is('form') ) {\n                return 'submit';\n              }\n              else {\n                return 'click';\n              }\n            }\n            else {\n              return settings.on;\n            }\n          },\n          templatedURL: function(action) {\n            action = action || $module.data(metadata.action) || settings.action || false;\n            url    = $module.data(metadata.url) || settings.url || false;\n            if(url) {\n              module.debug('Using specified url', url);\n              return url;\n            }\n            if(action) {\n              module.debug('Looking up url for action', action, settings.api);\n              if(settings.api[action] === undefined && !module.is.mocked()) {\n                module.error(error.missingAction, settings.action, settings.api);\n                return;\n              }\n              url = settings.api[action];\n            }\n            else if( module.is.form() ) {\n              url = $module.attr('action') || $context.attr('action') || false;\n              module.debug('No url or action specified, defaulting to form action', url);\n            }\n            return url;\n          }\n        },\n\n        abort: function() {\n          var\n            xhr = module.get.xhr()\n          ;\n          if( xhr && xhr.state() !== 'resolved') {\n            module.debug('Cancelling API request');\n            xhr.abort();\n          }\n        },\n\n        // reset state\n        reset: function() {\n          module.remove.error();\n          module.remove.loading();\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                //'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.api.settings = {\n\n  name              : 'API',\n  namespace         : 'api',\n\n  debug             : false,\n  verbose           : false,\n  performance       : true,\n\n  // object containing all templates endpoints\n  api               : {},\n\n  // whether to cache responses\n  cache             : true,\n\n  // whether new requests should abort previous requests\n  interruptRequests : true,\n\n  // event binding\n  on                : 'auto',\n\n  // context for applying state classes\n  stateContext      : false,\n\n  // duration for loading state\n  loadingDuration   : 0,\n\n  // whether to hide errors after a period of time\n  hideError         : 'auto',\n\n  // duration for error state\n  errorDuration     : 2000,\n\n  // whether parameters should be encoded with encodeURIComponent\n  encodeParameters  : true,\n\n  // API action to use\n  action            : false,\n\n  // templated URL to use\n  url               : false,\n\n  // base URL to apply to all endpoints\n  base              : '',\n\n  // data that will\n  urlData           : {},\n\n  // whether to add default data to url data\n  defaultData          : true,\n\n  // whether to serialize closest form\n  serializeForm        : false,\n\n  // how long to wait before request should occur\n  throttle             : 0,\n\n  // whether to throttle first request or only repeated\n  throttleFirstRequest : true,\n\n  // standard ajax settings\n  method            : 'get',\n  data              : {},\n  dataType          : 'json',\n\n  // mock response\n  mockResponse      : false,\n  mockResponseAsync : false,\n\n  // aliases for mock\n  response          : false,\n  responseAsync     : false,\n\n  // callbacks before request\n  beforeSend  : function(settings) { return settings; },\n  beforeXHR   : function(xhr) {},\n  onRequest   : function(promise, xhr) {},\n\n  // after request\n  onResponse  : false, // function(response) { },\n\n  // response was successful, if JSON passed validation\n  onSuccess   : function(response, $module) {},\n\n  // request finished without aborting\n  onComplete  : function(response, $module) {},\n\n  // failed JSON success test\n  onFailure   : function(response, $module) {},\n\n  // server error\n  onError     : function(errorMessage, $module) {},\n\n  // request aborted\n  onAbort     : function(errorMessage, $module) {},\n\n  successTest : false,\n\n  // errors\n  error : {\n    beforeSend        : 'The before send function has aborted the request',\n    error             : 'There was an error with your request',\n    exitConditions    : 'API Request Aborted. Exit conditions met',\n    JSONParse         : 'JSON could not be parsed during error handling',\n    legacyParameters  : 'You are using legacy API success callback names',\n    method            : 'The method you called is not defined',\n    missingAction     : 'API action used but no url was defined',\n    missingSerialize  : 'jquery-serialize-object is required to add form data to an existing data object',\n    missingURL        : 'No URL specified for api event',\n    noReturnedValue   : 'The beforeSend callback must return a settings object, beforeSend ignored.',\n    noStorage         : 'Caching responses locally requires session storage',\n    parseError        : 'There was an error parsing your request',\n    requiredParameter : 'Missing a required URL parameter: ',\n    statusMessage     : 'Server gave an error: ',\n    timeout           : 'Your request timed out'\n  },\n\n  regExp  : {\n    required : /\\{\\$*[A-z0-9]+\\}/g,\n    optional : /\\{\\/\\$*[A-z0-9]+\\}/g,\n  },\n\n  className: {\n    loading : 'loading',\n    error   : 'error'\n  },\n\n  selector: {\n    disabled : '.disabled',\n    form      : 'form'\n  },\n\n  metadata: {\n    action  : 'action',\n    url     : 'url'\n  }\n};\n\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - State\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.state = function(parameters) {\n  var\n    $allModules     = $(this),\n\n    moduleSelector  = $allModules.selector || '',\n\n    hasTouch        = ('ontouchstart' in document.documentElement),\n    time            = new Date().getTime(),\n    performance     = [],\n\n    query           = arguments[0],\n    methodInvoked   = (typeof query == 'string'),\n    queryArguments  = [].slice.call(arguments, 1),\n\n    returnedValue\n  ;\n  $allModules\n    .each(function() {\n      var\n        settings          = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.state.settings, parameters)\n          : $.extend({}, $.fn.state.settings),\n\n        error           = settings.error,\n        metadata        = settings.metadata,\n        className       = settings.className,\n        namespace       = settings.namespace,\n        states          = settings.states,\n        text            = settings.text,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = namespace + '-module',\n\n        $module         = $(this),\n\n        element         = this,\n        instance        = $module.data(moduleNamespace),\n\n        module\n      ;\n      module = {\n\n        initialize: function() {\n          module.verbose('Initializing module');\n\n          // allow module to guess desired state based on element\n          if(settings.automatic) {\n            module.add.defaults();\n          }\n\n          // bind events with delegated events\n          if(settings.context && moduleSelector !== '') {\n            $(settings.context)\n              .on(moduleSelector, 'mouseenter' + eventNamespace, module.change.text)\n              .on(moduleSelector, 'mouseleave' + eventNamespace, module.reset.text)\n              .on(moduleSelector, 'click'      + eventNamespace, module.toggle.state)\n            ;\n          }\n          else {\n            $module\n              .on('mouseenter' + eventNamespace, module.change.text)\n              .on('mouseleave' + eventNamespace, module.reset.text)\n              .on('click'      + eventNamespace, module.toggle.state)\n            ;\n          }\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.verbose('Storing instance of module', module);\n          instance = module;\n          $module\n            .data(moduleNamespace, module)\n          ;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous module', instance);\n          $module\n            .off(eventNamespace)\n            .removeData(moduleNamespace)\n          ;\n        },\n\n        refresh: function() {\n          module.verbose('Refreshing selector cache');\n          $module = $(element);\n        },\n\n        add: {\n          defaults: function() {\n            var\n              userStates = parameters && $.isPlainObject(parameters.states)\n                ? parameters.states\n                : {}\n            ;\n            $.each(settings.defaults, function(type, typeStates) {\n              if( module.is[type] !== undefined && module.is[type]() ) {\n                module.verbose('Adding default states', type, element);\n                $.extend(settings.states, typeStates, userStates);\n              }\n            });\n          }\n        },\n\n        is: {\n\n          active: function() {\n            return $module.hasClass(className.active);\n          },\n          loading: function() {\n            return $module.hasClass(className.loading);\n          },\n          inactive: function() {\n            return !( $module.hasClass(className.active) );\n          },\n          state: function(state) {\n            if(className[state] === undefined) {\n              return false;\n            }\n            return $module.hasClass( className[state] );\n          },\n\n          enabled: function() {\n            return !( $module.is(settings.filter.active) );\n          },\n          disabled: function() {\n            return ( $module.is(settings.filter.active) );\n          },\n          textEnabled: function() {\n            return !( $module.is(settings.filter.text) );\n          },\n\n          // definitions for automatic type detection\n          button: function() {\n            return $module.is('.button:not(a, .submit)');\n          },\n          input: function() {\n            return $module.is('input');\n          },\n          progress: function() {\n            return $module.is('.ui.progress');\n          }\n        },\n\n        allow: function(state) {\n          module.debug('Now allowing state', state);\n          states[state] = true;\n        },\n        disallow: function(state) {\n          module.debug('No longer allowing', state);\n          states[state] = false;\n        },\n\n        allows: function(state) {\n          return states[state] || false;\n        },\n\n        enable: function() {\n          $module.removeClass(className.disabled);\n        },\n\n        disable: function() {\n          $module.addClass(className.disabled);\n        },\n\n        setState: function(state) {\n          if(module.allows(state)) {\n            $module.addClass( className[state] );\n          }\n        },\n\n        removeState: function(state) {\n          if(module.allows(state)) {\n            $module.removeClass( className[state] );\n          }\n        },\n\n        toggle: {\n          state: function() {\n            var\n              apiRequest,\n              requestCancelled\n            ;\n            if( module.allows('active') && module.is.enabled() ) {\n              module.refresh();\n              if($.fn.api !== undefined) {\n                apiRequest       = $module.api('get request');\n                requestCancelled = $module.api('was cancelled');\n                if( requestCancelled ) {\n                  module.debug('API Request cancelled by beforesend');\n                  settings.activateTest   = function(){ return false; };\n                  settings.deactivateTest = function(){ return false; };\n                }\n                else if(apiRequest) {\n                  module.listenTo(apiRequest);\n                  return;\n                }\n              }\n              module.change.state();\n            }\n          }\n        },\n\n        listenTo: function(apiRequest) {\n          module.debug('API request detected, waiting for state signal', apiRequest);\n          if(apiRequest) {\n            if(text.loading) {\n              module.update.text(text.loading);\n            }\n            $.when(apiRequest)\n              .then(function() {\n                if(apiRequest.state() == 'resolved') {\n                  module.debug('API request succeeded');\n                  settings.activateTest   = function(){ return true; };\n                  settings.deactivateTest = function(){ return true; };\n                }\n                else {\n                  module.debug('API request failed');\n                  settings.activateTest   = function(){ return false; };\n                  settings.deactivateTest = function(){ return false; };\n                }\n                module.change.state();\n              })\n            ;\n          }\n        },\n\n        // checks whether active/inactive state can be given\n        change: {\n\n          state: function() {\n            module.debug('Determining state change direction');\n            // inactive to active change\n            if( module.is.inactive() ) {\n              module.activate();\n            }\n            else {\n              module.deactivate();\n            }\n            if(settings.sync) {\n              module.sync();\n            }\n            settings.onChange.call(element);\n          },\n\n          text: function() {\n            if( module.is.textEnabled() ) {\n              if(module.is.disabled() ) {\n                module.verbose('Changing text to disabled text', text.hover);\n                module.update.text(text.disabled);\n              }\n              else if( module.is.active() ) {\n                if(text.hover) {\n                  module.verbose('Changing text to hover text', text.hover);\n                  module.update.text(text.hover);\n                }\n                else if(text.deactivate) {\n                  module.verbose('Changing text to deactivating text', text.deactivate);\n                  module.update.text(text.deactivate);\n                }\n              }\n              else {\n                if(text.hover) {\n                  module.verbose('Changing text to hover text', text.hover);\n                  module.update.text(text.hover);\n                }\n                else if(text.activate){\n                  module.verbose('Changing text to activating text', text.activate);\n                  module.update.text(text.activate);\n                }\n              }\n            }\n          }\n\n        },\n\n        activate: function() {\n          if( settings.activateTest.call(element) ) {\n            module.debug('Setting state to active');\n            $module\n              .addClass(className.active)\n            ;\n            module.update.text(text.active);\n            settings.onActivate.call(element);\n          }\n        },\n\n        deactivate: function() {\n          if( settings.deactivateTest.call(element) ) {\n            module.debug('Setting state to inactive');\n            $module\n              .removeClass(className.active)\n            ;\n            module.update.text(text.inactive);\n            settings.onDeactivate.call(element);\n          }\n        },\n\n        sync: function() {\n          module.verbose('Syncing other buttons to current state');\n          if( module.is.active() ) {\n            $allModules\n              .not($module)\n                .state('activate');\n          }\n          else {\n            $allModules\n              .not($module)\n                .state('deactivate')\n            ;\n          }\n        },\n\n        get: {\n          text: function() {\n            return (settings.selector.text)\n              ? $module.find(settings.selector.text).text()\n              : $module.html()\n            ;\n          },\n          textFor: function(state) {\n            return text[state] || false;\n          }\n        },\n\n        flash: {\n          text: function(text, duration, callback) {\n            var\n              previousText = module.get.text()\n            ;\n            module.debug('Flashing text message', text, duration);\n            text     = text     || settings.text.flash;\n            duration = duration || settings.flashDuration;\n            callback = callback || function() {};\n            module.update.text(text);\n            setTimeout(function(){\n              module.update.text(previousText);\n              callback.call(element);\n            }, duration);\n          }\n        },\n\n        reset: {\n          // on mouseout sets text to previous value\n          text: function() {\n            var\n              activeText   = text.active   || $module.data(metadata.storedText),\n              inactiveText = text.inactive || $module.data(metadata.storedText)\n            ;\n            if( module.is.textEnabled() ) {\n              if( module.is.active() && activeText) {\n                module.verbose('Resetting active text', activeText);\n                module.update.text(activeText);\n              }\n              else if(inactiveText) {\n                module.verbose('Resetting inactive text', activeText);\n                module.update.text(inactiveText);\n              }\n            }\n          }\n        },\n\n        update: {\n          text: function(text) {\n            var\n              currentText = module.get.text()\n            ;\n            if(text && text !== currentText) {\n              module.debug('Updating text', text);\n              if(settings.selector.text) {\n                $module\n                  .data(metadata.storedText, text)\n                  .find(settings.selector.text)\n                    .text(text)\n                ;\n              }\n              else {\n                $module\n                  .data(metadata.storedText, text)\n                  .html(text)\n                ;\n              }\n            }\n            else {\n              module.debug('Text is already set, ignoring update', text);\n            }\n          }\n        },\n\n        setting: function(name, value) {\n          module.debug('Changing setting', name, value);\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            if($.isPlainObject(settings[name])) {\n              $.extend(true, settings[name], value);\n            }\n            else {\n              settings[name] = value;\n            }\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.state.settings = {\n\n  // module info\n  name           : 'State',\n\n  // debug output\n  debug          : false,\n\n  // verbose debug output\n  verbose        : false,\n\n  // namespace for events\n  namespace      : 'state',\n\n  // debug data includes performance\n  performance    : true,\n\n  // callback occurs on state change\n  onActivate     : function() {},\n  onDeactivate   : function() {},\n  onChange       : function() {},\n\n  // state test functions\n  activateTest   : function() { return true; },\n  deactivateTest : function() { return true; },\n\n  // whether to automatically map default states\n  automatic      : true,\n\n  // activate / deactivate changes all elements instantiated at same time\n  sync           : false,\n\n  // default flash text duration, used for temporarily changing text of an element\n  flashDuration  : 1000,\n\n  // selector filter\n  filter     : {\n    text   : '.loading, .disabled',\n    active : '.disabled'\n  },\n\n  context    : false,\n\n  // error\n  error: {\n    beforeSend : 'The before send function has cancelled state change',\n    method     : 'The method you called is not defined.'\n  },\n\n  // metadata\n  metadata: {\n    promise    : 'promise',\n    storedText : 'stored-text'\n  },\n\n  // change class on state\n  className: {\n    active   : 'active',\n    disabled : 'disabled',\n    error    : 'error',\n    loading  : 'loading',\n    success  : 'success',\n    warning  : 'warning'\n  },\n\n  selector: {\n    // selector for text node\n    text: false\n  },\n\n  defaults : {\n    input: {\n      disabled : true,\n      loading  : true,\n      active   : true\n    },\n    button: {\n      disabled : true,\n      loading  : true,\n      active   : true,\n    },\n    progress: {\n      active   : true,\n      success  : true,\n      warning  : true,\n      error    : true\n    }\n  },\n\n  states     : {\n    active   : true,\n    disabled : true,\n    error    : true,\n    loading  : true,\n    success  : true,\n    warning  : true\n  },\n\n  text     : {\n    disabled   : false,\n    flash      : false,\n    hover      : false,\n    active     : false,\n    inactive   : false,\n    activate   : false,\n    deactivate : false\n  }\n\n};\n\n\n\n})( jQuery, window, document );\n\n/*!\n * # Semantic UI 2.2.4 - Visibility\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n  ? window\n  : (typeof self != 'undefined' && self.Math == Math)\n    ? self\n    : Function('return this')()\n;\n\n$.fn.visibility = function(parameters) {\n  var\n    $allModules    = $(this),\n    moduleSelector = $allModules.selector || '',\n\n    time           = new Date().getTime(),\n    performance    = [],\n\n    query          = arguments[0],\n    methodInvoked  = (typeof query == 'string'),\n    queryArguments = [].slice.call(arguments, 1),\n    returnedValue,\n\n    moduleCount    = $allModules.length,\n    loadedCount    = 0\n  ;\n\n  $allModules\n    .each(function() {\n      var\n        settings        = ( $.isPlainObject(parameters) )\n          ? $.extend(true, {}, $.fn.visibility.settings, parameters)\n          : $.extend({}, $.fn.visibility.settings),\n\n        className       = settings.className,\n        namespace       = settings.namespace,\n        error           = settings.error,\n        metadata        = settings.metadata,\n\n        eventNamespace  = '.' + namespace,\n        moduleNamespace = 'module-' + namespace,\n\n        $window         = $(window),\n\n        $module         = $(this),\n        $context        = $(settings.context),\n\n        $placeholder,\n\n        selector        = $module.selector || '',\n        instance        = $module.data(moduleNamespace),\n\n        requestAnimationFrame = window.requestAnimationFrame\n          || window.mozRequestAnimationFrame\n          || window.webkitRequestAnimationFrame\n          || window.msRequestAnimationFrame\n          || function(callback) { setTimeout(callback, 0); },\n\n        element         = this,\n        disabled        = false,\n\n        contextObserver,\n        observer,\n        module\n      ;\n\n      module = {\n\n        initialize: function() {\n          module.debug('Initializing', settings);\n\n          module.setup.cache();\n\n          if( module.should.trackChanges() ) {\n\n            if(settings.type == 'image') {\n              module.setup.image();\n            }\n            if(settings.type == 'fixed') {\n              module.setup.fixed();\n            }\n\n            if(settings.observeChanges) {\n              module.observeChanges();\n            }\n            module.bind.events();\n          }\n\n          module.save.position();\n          if( !module.is.visible() ) {\n            module.error(error.visible, $module);\n          }\n\n          if(settings.initialCheck) {\n            module.checkVisibility();\n          }\n          module.instantiate();\n        },\n\n        instantiate: function() {\n          module.debug('Storing instance', module);\n          $module\n            .data(moduleNamespace, module)\n          ;\n          instance = module;\n        },\n\n        destroy: function() {\n          module.verbose('Destroying previous module');\n          if(observer) {\n            observer.disconnect();\n          }\n          if(contextObserver) {\n            contextObserver.disconnect();\n          }\n          $window\n            .off('load'   + eventNamespace, module.event.load)\n            .off('resize' + eventNamespace, module.event.resize)\n          ;\n          $context\n            .off('scroll'       + eventNamespace, module.event.scroll)\n            .off('scrollchange' + eventNamespace, module.event.scrollchange)\n          ;\n          if(settings.type == 'fixed') {\n            module.resetFixed();\n            module.remove.placeholder();\n          }\n          $module\n            .off(eventNamespace)\n            .removeData(moduleNamespace)\n          ;\n        },\n\n        observeChanges: function() {\n          if('MutationObserver' in window) {\n            contextObserver = new MutationObserver(module.event.contextChanged);\n            observer        = new MutationObserver(module.event.changed);\n            contextObserver.observe(document, {\n              childList : true,\n              subtree   : true\n            });\n            observer.observe(element, {\n              childList : true,\n              subtree   : true\n            });\n            module.debug('Setting up mutation observer', observer);\n          }\n        },\n\n        bind: {\n          events: function() {\n            module.verbose('Binding visibility events to scroll and resize');\n            if(settings.refreshOnLoad) {\n              $window\n                .on('load'   + eventNamespace, module.event.load)\n              ;\n            }\n            $window\n              .on('resize' + eventNamespace, module.event.resize)\n            ;\n            // pub/sub pattern\n            $context\n              .off('scroll'      + eventNamespace)\n              .on('scroll'       + eventNamespace, module.event.scroll)\n              .on('scrollchange' + eventNamespace, module.event.scrollchange)\n            ;\n          }\n        },\n\n        event: {\n          changed: function(mutations) {\n            module.verbose('DOM tree modified, updating visibility calculations');\n            module.timer = setTimeout(function() {\n              module.verbose('DOM tree modified, updating sticky menu');\n              module.refresh();\n            }, 100);\n          },\n          contextChanged: function(mutations) {\n            [].forEach.call(mutations, function(mutation) {\n              if(mutation.removedNodes) {\n                [].forEach.call(mutation.removedNodes, function(node) {\n                  if(node == element || $(node).find(element).length > 0) {\n                    module.debug('Element removed from DOM, tearing down events');\n                    module.destroy();\n                  }\n                });\n              }\n            });\n          },\n          resize: function() {\n            module.debug('Window resized');\n            if(settings.refreshOnResize) {\n              requestAnimationFrame(module.refresh);\n            }\n          },\n          load: function() {\n            module.debug('Page finished loading');\n            requestAnimationFrame(module.refresh);\n          },\n          // publishes scrollchange event on one scroll\n          scroll: function() {\n            if(settings.throttle) {\n              clearTimeout(module.timer);\n              module.timer = setTimeout(function() {\n                $context.triggerHandler('scrollchange' + eventNamespace, [ $context.scrollTop() ]);\n              }, settings.throttle);\n            }\n            else {\n              requestAnimationFrame(function() {\n                $context.triggerHandler('scrollchange' + eventNamespace, [ $context.scrollTop() ]);\n              });\n            }\n          },\n          // subscribes to scrollchange\n          scrollchange: function(event, scrollPosition) {\n            module.checkVisibility(scrollPosition);\n          },\n        },\n\n        precache: function(images, callback) {\n          if (!(images instanceof Array)) {\n            images = [images];\n          }\n          var\n            imagesLength  = images.length,\n            loadedCounter = 0,\n            cache         = [],\n            cacheImage    = document.createElement('img'),\n            handleLoad    = function() {\n              loadedCounter++;\n              if (loadedCounter >= images.length) {\n                if ($.isFunction(callback)) {\n                  callback();\n                }\n              }\n            }\n          ;\n          while (imagesLength--) {\n            cacheImage         = document.createElement('img');\n            cacheImage.onload  = handleLoad;\n            cacheImage.onerror = handleLoad;\n            cacheImage.src     = images[imagesLength];\n            cache.push(cacheImage);\n          }\n        },\n\n        enableCallbacks: function() {\n          module.debug('Allowing callbacks to occur');\n          disabled = false;\n        },\n\n        disableCallbacks: function() {\n          module.debug('Disabling all callbacks temporarily');\n          disabled = true;\n        },\n\n        should: {\n          trackChanges: function() {\n            if(methodInvoked) {\n              module.debug('One time query, no need to bind events');\n              return false;\n            }\n            module.debug('Callbacks being attached');\n            return true;\n          }\n        },\n\n        setup: {\n          cache: function() {\n            module.cache = {\n              occurred : {},\n              screen   : {},\n              element  : {},\n            };\n          },\n          image: function() {\n            var\n              src = $module.data(metadata.src)\n            ;\n            if(src) {\n              module.verbose('Lazy loading image', src);\n              settings.once           = true;\n              settings.observeChanges = false;\n\n              // show when top visible\n              settings.onOnScreen = function() {\n                module.debug('Image on screen', element);\n                module.precache(src, function() {\n                  module.set.image(src, function() {\n                    loadedCount++;\n                    if(loadedCount == moduleCount) {\n                      settings.onAllLoaded.call(this);\n                    }\n                    settings.onLoad.call(this);\n                  });\n                });\n              };\n            }\n          },\n          fixed: function() {\n            module.debug('Setting up fixed');\n            settings.once           = false;\n            settings.observeChanges = false;\n            settings.initialCheck   = true;\n            settings.refreshOnLoad  = true;\n            if(!parameters.transition) {\n              settings.transition = false;\n            }\n            module.create.placeholder();\n            module.debug('Added placeholder', $placeholder);\n            settings.onTopPassed = function() {\n              module.debug('Element passed, adding fixed position', $module);\n              module.show.placeholder();\n              module.set.fixed();\n              if(settings.transition) {\n                if($.fn.transition !== undefined) {\n                  $module.transition(settings.transition, settings.duration);\n                }\n              }\n            };\n            settings.onTopPassedReverse = function() {\n              module.debug('Element returned to position, removing fixed', $module);\n              module.hide.placeholder();\n              module.remove.fixed();\n            };\n          }\n        },\n\n        create: {\n          placeholder: function() {\n            module.verbose('Creating fixed position placeholder');\n            $placeholder = $module\n              .clone(false)\n              .css('display', 'none')\n              .addClass(className.placeholder)\n              .insertAfter($module)\n            ;\n          }\n        },\n\n        show: {\n          placeholder: function() {\n            module.verbose('Showing placeholder');\n            $placeholder\n              .css('display', 'block')\n              .css('visibility', 'hidden')\n            ;\n          }\n        },\n        hide: {\n          placeholder: function() {\n            module.verbose('Hiding placeholder');\n            $placeholder\n              .css('display', 'none')\n              .css('visibility', '')\n            ;\n          }\n        },\n\n        set: {\n          fixed: function() {\n            module.verbose('Setting element to fixed position');\n            $module\n              .addClass(className.fixed)\n              .css({\n                position : 'fixed',\n                top      : settings.offset + 'px',\n                left     : 'auto',\n                zIndex   : settings.zIndex\n              })\n            ;\n            settings.onFixed.call(element);\n          },\n          image: function(src, callback) {\n            $module\n              .attr('src', src)\n            ;\n            if(settings.transition) {\n              if( $.fn.transition !== undefined ) {\n                $module.transition(settings.transition, settings.duration, callback);\n              }\n              else {\n                $module.fadeIn(settings.duration, callback);\n              }\n            }\n            else {\n              $module.show();\n            }\n          }\n        },\n\n        is: {\n          onScreen: function() {\n            var\n              calculations   = module.get.elementCalculations()\n            ;\n            return calculations.onScreen;\n          },\n          offScreen: function() {\n            var\n              calculations   = module.get.elementCalculations()\n            ;\n            return calculations.offScreen;\n          },\n          visible: function() {\n            if(module.cache && module.cache.element) {\n              return !(module.cache.element.width === 0 && module.cache.element.offset.top === 0);\n            }\n            return false;\n          }\n        },\n\n        refresh: function() {\n          module.debug('Refreshing constants (width/height)');\n          if(settings.type == 'fixed') {\n            module.resetFixed();\n          }\n          module.reset();\n          module.save.position();\n          if(settings.checkOnRefresh) {\n            module.checkVisibility();\n          }\n          settings.onRefresh.call(element);\n        },\n\n        resetFixed: function () {\n          module.remove.fixed();\n          module.remove.occurred();\n        },\n\n        reset: function() {\n          module.verbose('Resetting all cached values');\n          if( $.isPlainObject(module.cache) ) {\n            module.cache.screen = {};\n            module.cache.element = {};\n          }\n        },\n\n        checkVisibility: function(scroll) {\n          module.verbose('Checking visibility of element', module.cache.element);\n\n          if( !disabled && module.is.visible() ) {\n\n            // save scroll position\n            module.save.scroll(scroll);\n\n            // update calculations derived from scroll\n            module.save.calculations();\n\n            // percentage\n            module.passed();\n\n            // reverse (must be first)\n            module.passingReverse();\n            module.topVisibleReverse();\n            module.bottomVisibleReverse();\n            module.topPassedReverse();\n            module.bottomPassedReverse();\n\n            // one time\n            module.onScreen();\n            module.offScreen();\n            module.passing();\n            module.topVisible();\n            module.bottomVisible();\n            module.topPassed();\n            module.bottomPassed();\n\n            // on update callback\n            if(settings.onUpdate) {\n              settings.onUpdate.call(element, module.get.elementCalculations());\n            }\n          }\n        },\n\n        passed: function(amount, newCallback) {\n          var\n            calculations   = module.get.elementCalculations(),\n            amountInPixels\n          ;\n          // assign callback\n          if(amount && newCallback) {\n            settings.onPassed[amount] = newCallback;\n          }\n          else if(amount !== undefined) {\n            return (module.get.pixelsPassed(amount) > calculations.pixelsPassed);\n          }\n          else if(calculations.passing) {\n            $.each(settings.onPassed, function(amount, callback) {\n              if(calculations.bottomVisible || calculations.pixelsPassed > module.get.pixelsPassed(amount)) {\n                module.execute(callback, amount);\n              }\n              else if(!settings.once) {\n                module.remove.occurred(callback);\n              }\n            });\n          }\n        },\n\n        onScreen: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onOnScreen,\n            callbackName = 'onScreen'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for onScreen', newCallback);\n            settings.onOnScreen = newCallback;\n          }\n          if(calculations.onScreen) {\n            module.execute(callback, callbackName);\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback !== undefined) {\n            return calculations.onOnScreen;\n          }\n        },\n\n        offScreen: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onOffScreen,\n            callbackName = 'offScreen'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for offScreen', newCallback);\n            settings.onOffScreen = newCallback;\n          }\n          if(calculations.offScreen) {\n            module.execute(callback, callbackName);\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback !== undefined) {\n            return calculations.onOffScreen;\n          }\n        },\n\n        passing: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onPassing,\n            callbackName = 'passing'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for passing', newCallback);\n            settings.onPassing = newCallback;\n          }\n          if(calculations.passing) {\n            module.execute(callback, callbackName);\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback !== undefined) {\n            return calculations.passing;\n          }\n        },\n\n\n        topVisible: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onTopVisible,\n            callbackName = 'topVisible'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for top visible', newCallback);\n            settings.onTopVisible = newCallback;\n          }\n          if(calculations.topVisible) {\n            module.execute(callback, callbackName);\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback === undefined) {\n            return calculations.topVisible;\n          }\n        },\n\n        bottomVisible: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onBottomVisible,\n            callbackName = 'bottomVisible'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for bottom visible', newCallback);\n            settings.onBottomVisible = newCallback;\n          }\n          if(calculations.bottomVisible) {\n            module.execute(callback, callbackName);\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback === undefined) {\n            return calculations.bottomVisible;\n          }\n        },\n\n        topPassed: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onTopPassed,\n            callbackName = 'topPassed'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for top passed', newCallback);\n            settings.onTopPassed = newCallback;\n          }\n          if(calculations.topPassed) {\n            module.execute(callback, callbackName);\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback === undefined) {\n            return calculations.topPassed;\n          }\n        },\n\n        bottomPassed: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onBottomPassed,\n            callbackName = 'bottomPassed'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for bottom passed', newCallback);\n            settings.onBottomPassed = newCallback;\n          }\n          if(calculations.bottomPassed) {\n            module.execute(callback, callbackName);\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback === undefined) {\n            return calculations.bottomPassed;\n          }\n        },\n\n        passingReverse: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onPassingReverse,\n            callbackName = 'passingReverse'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for passing reverse', newCallback);\n            settings.onPassingReverse = newCallback;\n          }\n          if(!calculations.passing) {\n            if(module.get.occurred('passing')) {\n              module.execute(callback, callbackName);\n            }\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback !== undefined) {\n            return !calculations.passing;\n          }\n        },\n\n\n        topVisibleReverse: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onTopVisibleReverse,\n            callbackName = 'topVisibleReverse'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for top visible reverse', newCallback);\n            settings.onTopVisibleReverse = newCallback;\n          }\n          if(!calculations.topVisible) {\n            if(module.get.occurred('topVisible')) {\n              module.execute(callback, callbackName);\n            }\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback === undefined) {\n            return !calculations.topVisible;\n          }\n        },\n\n        bottomVisibleReverse: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onBottomVisibleReverse,\n            callbackName = 'bottomVisibleReverse'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for bottom visible reverse', newCallback);\n            settings.onBottomVisibleReverse = newCallback;\n          }\n          if(!calculations.bottomVisible) {\n            if(module.get.occurred('bottomVisible')) {\n              module.execute(callback, callbackName);\n            }\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback === undefined) {\n            return !calculations.bottomVisible;\n          }\n        },\n\n        topPassedReverse: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onTopPassedReverse,\n            callbackName = 'topPassedReverse'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for top passed reverse', newCallback);\n            settings.onTopPassedReverse = newCallback;\n          }\n          if(!calculations.topPassed) {\n            if(module.get.occurred('topPassed')) {\n              module.execute(callback, callbackName);\n            }\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback === undefined) {\n            return !calculations.onTopPassed;\n          }\n        },\n\n        bottomPassedReverse: function(newCallback) {\n          var\n            calculations = module.get.elementCalculations(),\n            callback     = newCallback || settings.onBottomPassedReverse,\n            callbackName = 'bottomPassedReverse'\n          ;\n          if(newCallback) {\n            module.debug('Adding callback for bottom passed reverse', newCallback);\n            settings.onBottomPassedReverse = newCallback;\n          }\n          if(!calculations.bottomPassed) {\n            if(module.get.occurred('bottomPassed')) {\n              module.execute(callback, callbackName);\n            }\n          }\n          else if(!settings.once) {\n            module.remove.occurred(callbackName);\n          }\n          if(newCallback === undefined) {\n            return !calculations.bottomPassed;\n          }\n        },\n\n        execute: function(callback, callbackName) {\n          var\n            calculations = module.get.elementCalculations(),\n            screen       = module.get.screenCalculations()\n          ;\n          callback = callback || false;\n          if(callback) {\n            if(settings.continuous) {\n              module.debug('Callback being called continuously', callbackName, calculations);\n              callback.call(element, calculations, screen);\n            }\n            else if(!module.get.occurred(callbackName)) {\n              module.debug('Conditions met', callbackName, calculations);\n              callback.call(element, calculations, screen);\n            }\n          }\n          module.save.occurred(callbackName);\n        },\n\n        remove: {\n          fixed: function() {\n            module.debug('Removing fixed position');\n            $module\n              .removeClass(className.fixed)\n              .css({\n                position : '',\n                top      : '',\n                left     : '',\n                zIndex   : ''\n              })\n            ;\n            settings.onUnfixed.call(element);\n          },\n          placeholder: function() {\n            module.debug('Removing placeholder content');\n            if($placeholder) {\n              $placeholder.remove();\n            }\n          },\n          occurred: function(callback) {\n            if(callback) {\n              var\n                occurred = module.cache.occurred\n              ;\n              if(occurred[callback] !== undefined && occurred[callback] === true) {\n                module.debug('Callback can now be called again', callback);\n                module.cache.occurred[callback] = false;\n              }\n            }\n            else {\n              module.cache.occurred = {};\n            }\n          }\n        },\n\n        save: {\n          calculations: function() {\n            module.verbose('Saving all calculations necessary to determine positioning');\n            module.save.direction();\n            module.save.screenCalculations();\n            module.save.elementCalculations();\n          },\n          occurred: function(callback) {\n            if(callback) {\n              if(module.cache.occurred[callback] === undefined || (module.cache.occurred[callback] !== true)) {\n                module.verbose('Saving callback occurred', callback);\n                module.cache.occurred[callback] = true;\n              }\n            }\n          },\n          scroll: function(scrollPosition) {\n            scrollPosition      = scrollPosition + settings.offset || $context.scrollTop() + settings.offset;\n            module.cache.scroll = scrollPosition;\n          },\n          direction: function() {\n            var\n              scroll     = module.get.scroll(),\n              lastScroll = module.get.lastScroll(),\n              direction\n            ;\n            if(scroll > lastScroll && lastScroll) {\n              direction = 'down';\n            }\n            else if(scroll < lastScroll && lastScroll) {\n              direction = 'up';\n            }\n            else {\n              direction = 'static';\n            }\n            module.cache.direction = direction;\n            return module.cache.direction;\n          },\n          elementPosition: function() {\n            var\n              element = module.cache.element,\n              screen  = module.get.screenSize()\n            ;\n            module.verbose('Saving element position');\n            // (quicker than $.extend)\n            element.fits          = (element.height < screen.height);\n            element.offset        = $module.offset();\n            element.width         = $module.outerWidth();\n            element.height        = $module.outerHeight();\n            // store\n            module.cache.element = element;\n            return element;\n          },\n          elementCalculations: function() {\n            var\n              screen     = module.get.screenCalculations(),\n              element    = module.get.elementPosition()\n            ;\n            // offset\n            if(settings.includeMargin) {\n              element.margin        = {};\n              element.margin.top    = parseInt($module.css('margin-top'), 10);\n              element.margin.bottom = parseInt($module.css('margin-bottom'), 10);\n              element.top    = element.offset.top - element.margin.top;\n              element.bottom = element.offset.top + element.height + element.margin.bottom;\n            }\n            else {\n              element.top    = element.offset.top;\n              element.bottom = element.offset.top + element.height;\n            }\n\n            // visibility\n            element.topVisible       = (screen.bottom >= element.top);\n            element.topPassed        = (screen.top >= element.top);\n            element.bottomVisible    = (screen.bottom >= element.bottom);\n            element.bottomPassed     = (screen.top >= element.bottom);\n            element.pixelsPassed     = 0;\n            element.percentagePassed = 0;\n\n            // meta calculations\n            element.onScreen  = (element.topVisible && !element.bottomPassed);\n            element.passing   = (element.topPassed && !element.bottomPassed);\n            element.offScreen = (!element.onScreen);\n\n            // passing calculations\n            if(element.passing) {\n              element.pixelsPassed     = (screen.top - element.top);\n              element.percentagePassed = (screen.top - element.top) / element.height;\n            }\n            module.cache.element = element;\n            module.verbose('Updated element calculations', element);\n            return element;\n          },\n          screenCalculations: function() {\n            var\n              scroll = module.get.scroll()\n            ;\n            module.save.direction();\n            module.cache.screen.top    = scroll;\n            module.cache.screen.bottom = scroll + module.cache.screen.height;\n            return module.cache.screen;\n          },\n          screenSize: function() {\n            module.verbose('Saving window position');\n            module.cache.screen = {\n              height: $context.height()\n            };\n          },\n          position: function() {\n            module.save.screenSize();\n            module.save.elementPosition();\n          }\n        },\n\n        get: {\n          pixelsPassed: function(amount) {\n            var\n              element = module.get.elementCalculations()\n            ;\n            if(amount.search('%') > -1) {\n              return ( element.height * (parseInt(amount, 10) / 100) );\n            }\n            return parseInt(amount, 10);\n          },\n          occurred: function(callback) {\n            return (module.cache.occurred !== undefined)\n              ? module.cache.occurred[callback] || false\n              : false\n            ;\n          },\n          direction: function() {\n            if(module.cache.direction === undefined) {\n              module.save.direction();\n            }\n            return module.cache.direction;\n          },\n          elementPosition: function() {\n            if(module.cache.element === undefined) {\n              module.save.elementPosition();\n            }\n            return module.cache.element;\n          },\n          elementCalculations: function() {\n            if(module.cache.element === undefined) {\n              module.save.elementCalculations();\n            }\n            return module.cache.element;\n          },\n          screenCalculations: function() {\n            if(module.cache.screen === undefined) {\n              module.save.screenCalculations();\n            }\n            return module.cache.screen;\n          },\n          screenSize: function() {\n            if(module.cache.screen === undefined) {\n              module.save.screenSize();\n            }\n            return module.cache.screen;\n          },\n          scroll: function() {\n            if(module.cache.scroll === undefined) {\n              module.save.scroll();\n            }\n            return module.cache.scroll;\n          },\n          lastScroll: function() {\n            if(module.cache.screen === undefined) {\n              module.debug('First scroll event, no last scroll could be found');\n              return false;\n            }\n            return module.cache.screen.top;\n          }\n        },\n\n        setting: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, settings, name);\n          }\n          else if(value !== undefined) {\n            settings[name] = value;\n          }\n          else {\n            return settings[name];\n          }\n        },\n        internal: function(name, value) {\n          if( $.isPlainObject(name) ) {\n            $.extend(true, module, name);\n          }\n          else if(value !== undefined) {\n            module[name] = value;\n          }\n          else {\n            return module[name];\n          }\n        },\n        debug: function() {\n          if(!settings.silent && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.debug.apply(console, arguments);\n            }\n          }\n        },\n        verbose: function() {\n          if(!settings.silent && settings.verbose && settings.debug) {\n            if(settings.performance) {\n              module.performance.log(arguments);\n            }\n            else {\n              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n              module.verbose.apply(console, arguments);\n            }\n          }\n        },\n        error: function() {\n          if(!settings.silent) {\n            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n            module.error.apply(console, arguments);\n          }\n        },\n        performance: {\n          log: function(message) {\n            var\n              currentTime,\n              executionTime,\n              previousTime\n            ;\n            if(settings.performance) {\n              currentTime   = new Date().getTime();\n              previousTime  = time || currentTime;\n              executionTime = currentTime - previousTime;\n              time          = currentTime;\n              performance.push({\n                'Name'           : message[0],\n                'Arguments'      : [].slice.call(message, 1) || '',\n                'Element'        : element,\n                'Execution Time' : executionTime\n              });\n            }\n            clearTimeout(module.performance.timer);\n            module.performance.timer = setTimeout(module.performance.display, 500);\n          },\n          display: function() {\n            var\n              title = settings.name + ':',\n              totalTime = 0\n            ;\n            time = false;\n            clearTimeout(module.performance.timer);\n            $.each(performance, function(index, data) {\n              totalTime += data['Execution Time'];\n            });\n            title += ' ' + totalTime + 'ms';\n            if(moduleSelector) {\n              title += ' \\'' + moduleSelector + '\\'';\n            }\n            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n              console.groupCollapsed(title);\n              if(console.table) {\n                console.table(performance);\n              }\n              else {\n                $.each(performance, function(index, data) {\n                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n                });\n              }\n              console.groupEnd();\n            }\n            performance = [];\n          }\n        },\n        invoke: function(query, passedArguments, context) {\n          var\n            object = instance,\n            maxDepth,\n            found,\n            response\n          ;\n          passedArguments = passedArguments || queryArguments;\n          context         = element         || context;\n          if(typeof query == 'string' && object !== undefined) {\n            query    = query.split(/[\\. ]/);\n            maxDepth = query.length - 1;\n            $.each(query, function(depth, value) {\n              var camelCaseValue = (depth != maxDepth)\n                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n                : query\n              ;\n              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n                object = object[camelCaseValue];\n              }\n              else if( object[camelCaseValue] !== undefined ) {\n                found = object[camelCaseValue];\n                return false;\n              }\n              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n                object = object[value];\n              }\n              else if( object[value] !== undefined ) {\n                found = object[value];\n                return false;\n              }\n              else {\n                module.error(error.method, query);\n                return false;\n              }\n            });\n          }\n          if ( $.isFunction( found ) ) {\n            response = found.apply(context, passedArguments);\n          }\n          else if(found !== undefined) {\n            response = found;\n          }\n          if($.isArray(returnedValue)) {\n            returnedValue.push(response);\n          }\n          else if(returnedValue !== undefined) {\n            returnedValue = [returnedValue, response];\n          }\n          else if(response !== undefined) {\n            returnedValue = response;\n          }\n          return found;\n        }\n      };\n\n      if(methodInvoked) {\n        if(instance === undefined) {\n          module.initialize();\n        }\n        instance.save.scroll();\n        instance.save.calculations();\n        module.invoke(query);\n      }\n      else {\n        if(instance !== undefined) {\n          instance.invoke('destroy');\n        }\n        module.initialize();\n      }\n    })\n  ;\n\n  return (returnedValue !== undefined)\n    ? returnedValue\n    : this\n  ;\n};\n\n$.fn.visibility.settings = {\n\n  name                   : 'Visibility',\n  namespace              : 'visibility',\n\n  debug                  : false,\n  verbose                : false,\n  performance            : true,\n\n  // whether to use mutation observers to follow changes\n  observeChanges         : true,\n\n  // check position immediately on init\n  initialCheck           : true,\n\n  // whether to refresh calculations after all page images load\n  refreshOnLoad          : true,\n\n  // whether to refresh calculations after page resize event\n  refreshOnResize        : true,\n\n  // should call callbacks on refresh event (resize, etc)\n  checkOnRefresh         : true,\n\n  // callback should only occur one time\n  once                   : true,\n\n  // callback should fire continuously whe evaluates to true\n  continuous             : false,\n\n  // offset to use with scroll top\n  offset                 : 0,\n\n  // whether to include margin in elements position\n  includeMargin          : false,\n\n  // scroll context for visibility checks\n  context                : window,\n\n  // visibility check delay in ms (defaults to animationFrame)\n  throttle               : false,\n\n  // special visibility type (image, fixed)\n  type                   : false,\n\n  // z-index to use with visibility 'fixed'\n  zIndex                 : '10',\n\n  // image only animation settings\n  transition             : 'fade in',\n  duration               : 1000,\n\n  // array of callbacks for percentage\n  onPassed               : {},\n\n  // standard callbacks\n  onOnScreen             : false,\n  onOffScreen            : false,\n  onPassing              : false,\n  onTopVisible           : false,\n  onBottomVisible        : false,\n  onTopPassed            : false,\n  onBottomPassed         : false,\n\n  // reverse callbacks\n  onPassingReverse       : false,\n  onTopVisibleReverse    : false,\n  onBottomVisibleReverse : false,\n  onTopPassedReverse     : false,\n  onBottomPassedReverse  : false,\n\n  // special callbacks for image\n  onLoad                 : function() {},\n  onAllLoaded            : function() {},\n\n  // special callbacks for fixed position\n  onFixed                : function() {},\n  onUnfixed              : function() {},\n\n  // utility callbacks\n  onUpdate               : false, // disabled by default for performance\n  onRefresh              : function(){},\n\n  metadata : {\n    src: 'src'\n  },\n\n  className: {\n    fixed       : 'fixed',\n    placeholder : 'placeholder'\n  },\n\n  error : {\n    method  : 'The method you called is not defined.',\n    visible : 'Element is hidden, you must call refresh after element becomes visible'\n  }\n\n};\n\n})( jQuery, window, document );\n"

/***/ },

/***/ 974:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(415);
module.exports = __webpack_require__(416);


/***/ }

},[974]);
//# sourceMappingURL=scripts.map