[
  {
    "path": ".gitignore",
    "content": "target/\r\n.settings/\r\n.springBeans\r\n.classpath\r\n.project\r\nbin/\r\n.cache\r\n.gradle\r\n.idea\r\nbuild/\r\n*.iml\r\n*.iws\r\n.DS_Store\r\n*.ipr\r\n"
  },
  {
    "path": "README.adoc",
    "content": "= spring-boot-scala-web\nA sample web application using spring-boot and Scala\n\n\n=== Using gradle as the build tool:\n\nBuild using `./gradlew build`\nRun using `./gradlew bootRun`\nOR\nRun using: `java -jar build/libs/spring-boot-scala-web-0.3.0.jar`\n\nA url listing the hotels is at http://localhost:8080/hotels[http://localhost:8080/hotels]\n\n=== Using sbt as the build tool\n\nStart up sbt console\n\n[source, bash]\n----\nsbt\n----\n\nStart App\n\n[source, bash]\n----\n~re-start\n----"
  },
  {
    "path": "build.gradle",
    "content": "plugins {\n    id 'org.springframework.boot' version '1.5.3.RELEASE'\n}\n\napply plugin: 'java'\napply plugin: 'scala'\napply plugin: 'eclipse'\napply plugin: 'idea'\n\next {\n    sourceCompatibility = 1.8\n    targetCompatibility = 1.8\n}\n\n\njar {\n    baseName = 'spring-boot-scala-web'\n    version =  '0.3.0'\n}\n\nrepositories {\n    mavenCentral()\n    jcenter()\n}\n\ndependencies {\n    compile(\"org.springframework.boot:spring-boot-starter-web\")\n    compile(\"org.springframework.boot:spring-boot-starter-data-jpa\")\n    compile(\"org.springframework.boot:spring-boot-starter-actuator\")\n    compile(\"org.thymeleaf:thymeleaf-spring4\")\n    compile(\"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect\")\n    testCompile(\"org.springframework.boot:spring-boot-starter-test\")\n    compile(\"com.h2database:h2\")\n    compile(\"org.scala-lang:scala-library:2.12.2\")\n    compile(\"org.webjars:bootstrap:3.1.1\")\n}"
  },
  {
    "path": "build.sbt",
    "content": "import Dependencies._\n\n//testCompile(\"org.springframework.boot:spring-boot-starter-test\")\n\nlazy val springVersion = \"1.5.3.RELEASE\"\nlazy val thymeleafVersion = \"2.1.5.RELEASE\"\n\nlazy val root = (project in file(\".\")).\n  settings(\n    inThisBuild(List(\n      organization := \"org.bk\",\n      scalaVersion := \"2.12.2\",\n      version      := \"0.3.0\"\n    )),\n    name := \"spring-boot-scala-web\",\n    libraryDependencies += scalaTest % Test,\n    libraryDependencies += \"org.springframework.boot\" % \"spring-boot-starter-web\" % springVersion,\n    libraryDependencies += \"org.springframework.boot\" % \"spring-boot-starter-data-jpa\" % springVersion,\n    libraryDependencies += \"org.springframework.boot\" % \"spring-boot-starter-actuator\" % springVersion,\n    libraryDependencies += \"org.thymeleaf\" % \"thymeleaf-spring4\" % thymeleafVersion,\n    libraryDependencies += \"nz.net.ultraq.thymeleaf\" % \"thymeleaf-layout-dialect\" % \"1.4.0\",\n    libraryDependencies += \"com.h2database\" % \"h2\" % \"1.4.195\",\n    libraryDependencies += \"org.webjars\" % \"bootstrap\" % \"3.1.1\"\n  )\n\n\n// set the main class for the main 'run' task\n// change Compile to Test to set it for 'test:run'\nmainClass in (Compile, run) := Some(\"mvctest.Application\")"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Sat May 20 21:37:31 PDT 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-3.5-all.zip\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave ( ) {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windows variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "project/Dependencies.scala",
    "content": "import sbt._\n\nobject Dependencies {\n  lazy val scalaTest = \"org.scalatest\" %% \"scalatest\" % \"3.0.1\"\n}\n"
  },
  {
    "path": "project/build.properties",
    "content": "sbt.version=0.13.15\n"
  },
  {
    "path": "project/plugins.sbt",
    "content": "addSbtPlugin(\"io.spray\" % \"sbt-revolver\" % \"0.8.0\")"
  },
  {
    "path": "sbt",
    "content": "#!/usr/bin/env bash\n\n./sbt-dist/bin/sbt \"$@\""
  },
  {
    "path": "sbt-dist/conf/sbtconfig.txt",
    "content": "# Set the java args to high\n\n-Xmx512M\n\n-XX:MaxPermSize=256m\n\n-XX:ReservedCodeCacheSize=128m\n\n\n\n# Set the extra SBT options\n\n-Dsbt.log.format=true\n\n"
  },
  {
    "path": "sbt-dist/conf/sbtopts",
    "content": "# ------------------------------------------------ #\n#  The SBT Configuration file.                     #\n# ------------------------------------------------ #\n\n\n# Disable ANSI color codes\n#\n#-no-colors\n\n# Starts sbt even if the current directory contains no sbt project.\n#\n-sbt-create\n\n# Path to global settings/plugins directory (default: ~/.sbt)\n#\n#-sbt-dir  /etc/sbt\n\n# Path to shared boot directory (default: ~/.sbt/boot in 0.11 series)\n#\n#-sbt-boot ~/.sbt/boot  \n\n# Path to local Ivy repository (default: ~/.ivy2)\n#\n#-ivy ~/.ivy2\n\n# set memory options\n#\n#-mem   <integer>  \n\n# Use local caches for projects, no sharing.\n#\n#-no-share\n\n# Put SBT in offline mode.\n#\n#-offline\n\n# Sets the SBT version to use.\n#-sbt-version  0.11.3\n\n# Scala version (default: latest release)\n#\n#-scala-home <path>        \n#-scala-version <version>\n\n# java version (default: java from PATH, currently $(java -version |& grep version))\n#\n#-java-home <path>\n\n"
  },
  {
    "path": "sbt.bat",
    "content": "@REM SBT launcher script\r\n\r\n.\\sbt-dist\\bin\\sbt.bat %*\r\n"
  },
  {
    "path": "src/main/resources/application.properties",
    "content": "spring.jpa.hibernate.ddl-auto: create-drop\nspring.datasource.url: jdbc:h2:mem:scratchdb"
  },
  {
    "path": "src/main/resources/import.sql",
    "content": "-- insert into hotel(id, name, address, zip) values (1, 'Test Hotel 1', 'Test Street 1', '000001');\n-- insert into hotel(id, name, address, zip) values (2, 'Test Hotel 2', 'Test Street 2', '000002');\n-- insert into hotel(id, name, address, zip) values (3, 'Test Hotel 3', 'Test Street 3', '000003');\n-- insert into hotel(id, name, address, zip) values (4, 'Test Hotel 4', 'Test Street 4', '000004');\n"
  },
  {
    "path": "src/main/resources/messages.properties",
    "content": "app.name=Sample Spring-Boot Scala App\r\n\r\n\r\n\r\n"
  },
  {
    "path": "src/main/resources/static/css/application.css",
    "content": "body {\n\tfont-family: tahoma, verdana, arial, sans-serif; font-size: 12px;\n\tpadding-top: 60px;\n}"
  },
  {
    "path": "src/main/resources/static/js/jquery-1.7.2.js",
    "content": "/*!\n * jQuery JavaScript Library v1.7.2\n * http://jquery.com/\n *\n * Copyright 2011, John Resig\n * Dual licensed under the MIT or GPL Version 2 licenses.\n * http://jquery.org/license\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n * Copyright 2011, The Dojo Foundation\n * Released under the MIT, BSD, and GPL Licenses.\n *\n * Date: Wed Mar 21 12:46:34 2012 -0700\n */\n(function( window, undefined ) {\n\n// Use the correct document accordingly with window argument (sandbox)\nvar document = window.document,\n  navigator = window.navigator,\n  location = window.location;\nvar jQuery = (function() {\n\n// Define a local copy of jQuery\nvar jQuery = function( selector, context ) {\n    // The jQuery object is actually just the init constructor 'enhanced'\n    return new jQuery.fn.init( selector, context, rootjQuery );\n  },\n\n  // Map over jQuery in case of overwrite\n  _jQuery = window.jQuery,\n\n  // Map over the $ in case of overwrite\n  _$ = window.$,\n\n  // A central reference to the root jQuery(document)\n  rootjQuery,\n\n  // A simple way to check for HTML strings or ID strings\n  // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n  quickExpr = /^(?:[^#<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]*)$)/,\n\n  // Check if a string has a non-whitespace character in it\n  rnotwhite = /\\S/,\n\n  // Used for trimming whitespace\n  trimLeft = /^\\s+/,\n  trimRight = /\\s+$/,\n\n  // Match a standalone tag\n  rsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,\n\n  // JSON RegExp\n  rvalidchars = /^[\\],:{}\\s]*$/,\n  rvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g,\n  rvalidtokens = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,\n  rvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\n\n  // Useragent RegExp\n  rwebkit = /(webkit)[ \\/]([\\w.]+)/,\n  ropera = /(opera)(?:.*version)?[ \\/]([\\w.]+)/,\n  rmsie = /(msie) ([\\w.]+)/,\n  rmozilla = /(mozilla)(?:.*? rv:([\\w.]+))?/,\n\n  // Matches dashed string for camelizing\n  rdashAlpha = /-([a-z]|[0-9])/ig,\n  rmsPrefix = /^-ms-/,\n\n  // Used by jQuery.camelCase as callback to replace()\n  fcamelCase = function( all, letter ) {\n    return ( letter + \"\" ).toUpperCase();\n  },\n\n  // Keep a UserAgent string for use with jQuery.browser\n  userAgent = navigator.userAgent,\n\n  // For matching the engine and version of the browser\n  browserMatch,\n\n  // The deferred used on DOM ready\n  readyList,\n\n  // The ready event handler\n  DOMContentLoaded,\n\n  // Save a reference to some core methods\n  toString = Object.prototype.toString,\n  hasOwn = Object.prototype.hasOwnProperty,\n  push = Array.prototype.push,\n  slice = Array.prototype.slice,\n  trim = String.prototype.trim,\n  indexOf = Array.prototype.indexOf,\n\n  // [[Class]] -> type pairs\n  class2type = {};\n\njQuery.fn = jQuery.prototype = {\n  constructor: jQuery,\n  init: function( selector, context, rootjQuery ) {\n    var match, elem, ret, doc;\n\n    // Handle $(\"\"), $(null), or $(undefined)\n    if ( !selector ) {\n      return this;\n    }\n\n    // Handle $(DOMElement)\n    if ( selector.nodeType ) {\n      this.context = this[0] = selector;\n      this.length = 1;\n      return this;\n    }\n\n    // The body element only exists once, optimize finding it\n    if ( selector === \"body\" && !context && document.body ) {\n      this.context = document;\n      this[0] = document.body;\n      this.selector = selector;\n      this.length = 1;\n      return this;\n    }\n\n    // Handle HTML strings\n    if ( typeof selector === \"string\" ) {\n      // Are we dealing with HTML string or an ID?\n      if ( selector.charAt(0) === \"<\" && selector.charAt( selector.length - 1 ) === \">\" && selector.length >= 3 ) {\n        // Assume that strings that start and end with <> are HTML and skip the regex check\n        match = [ null, selector, null ];\n\n      } else {\n        match = quickExpr.exec( selector );\n      }\n\n      // Verify a match, and that no context was specified for #id\n      if ( match && (match[1] || !context) ) {\n\n        // HANDLE: $(html) -> $(array)\n        if ( match[1] ) {\n          context = context instanceof jQuery ? context[0] : context;\n          doc = ( context ? context.ownerDocument || context : document );\n\n          // If a single string is passed in and it's a single tag\n          // just do a createElement and skip the rest\n          ret = rsingleTag.exec( selector );\n\n          if ( ret ) {\n            if ( jQuery.isPlainObject( context ) ) {\n              selector = [ document.createElement( ret[1] ) ];\n              jQuery.fn.attr.call( selector, context, true );\n\n            } else {\n              selector = [ doc.createElement( ret[1] ) ];\n            }\n\n          } else {\n            ret = jQuery.buildFragment( [ match[1] ], [ doc ] );\n            selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;\n          }\n\n          return jQuery.merge( this, selector );\n\n        // HANDLE: $(\"#id\")\n        } else {\n          elem = document.getElementById( match[2] );\n\n          // Check parentNode to catch when Blackberry 4.6 returns\n          // nodes that are no longer in the document #6963\n          if ( elem && elem.parentNode ) {\n            // Handle the case where IE and Opera return items\n            // by name instead of ID\n            if ( elem.id !== match[2] ) {\n              return rootjQuery.find( selector );\n            }\n\n            // Otherwise, we inject the element directly into the jQuery object\n            this.length = 1;\n            this[0] = elem;\n          }\n\n          this.context = document;\n          this.selector = selector;\n          return this;\n        }\n\n      // HANDLE: $(expr, $(...))\n      } else if ( !context || context.jquery ) {\n        return ( context || rootjQuery ).find( selector );\n\n      // HANDLE: $(expr, context)\n      // (which is just equivalent to: $(context).find(expr)\n      } else {\n        return this.constructor( context ).find( selector );\n      }\n\n    // HANDLE: $(function)\n    // Shortcut for document ready\n    } else if ( jQuery.isFunction( selector ) ) {\n      return rootjQuery.ready( selector );\n    }\n\n    if ( selector.selector !== undefined ) {\n      this.selector = selector.selector;\n      this.context = selector.context;\n    }\n\n    return jQuery.makeArray( selector, this );\n  },\n\n  // Start with an empty selector\n  selector: \"\",\n\n  // The current version of jQuery being used\n  jquery: \"1.7.2\",\n\n  // The default length of a jQuery object is 0\n  length: 0,\n\n  // The number of elements contained in the matched element set\n  size: function() {\n    return this.length;\n  },\n\n  toArray: function() {\n    return slice.call( this, 0 );\n  },\n\n  // Get the Nth element in the matched element set OR\n  // Get the whole matched element set as a clean array\n  get: function( num ) {\n    return num == null ?\n\n      // Return a 'clean' array\n      this.toArray() :\n\n      // Return just the object\n      ( num < 0 ? this[ this.length + num ] : this[ num ] );\n  },\n\n  // Take an array of elements and push it onto the stack\n  // (returning the new matched element set)\n  pushStack: function( elems, name, selector ) {\n    // Build a new jQuery matched element set\n    var ret = this.constructor();\n\n    if ( jQuery.isArray( elems ) ) {\n      push.apply( ret, elems );\n\n    } else {\n      jQuery.merge( ret, elems );\n    }\n\n    // Add the old object onto the stack (as a reference)\n    ret.prevObject = this;\n\n    ret.context = this.context;\n\n    if ( name === \"find\" ) {\n      ret.selector = this.selector + ( this.selector ? \" \" : \"\" ) + selector;\n    } else if ( name ) {\n      ret.selector = this.selector + \".\" + name + \"(\" + selector + \")\";\n    }\n\n    // Return the newly-formed element set\n    return ret;\n  },\n\n  // Execute a callback for every element in the matched set.\n  // (You can seed the arguments with an array of args, but this is\n  // only used internally.)\n  each: function( callback, args ) {\n    return jQuery.each( this, callback, args );\n  },\n\n  ready: function( fn ) {\n    // Attach the listeners\n    jQuery.bindReady();\n\n    // Add the callback\n    readyList.add( fn );\n\n    return this;\n  },\n\n  eq: function( i ) {\n    i = +i;\n    return i === -1 ?\n      this.slice( i ) :\n      this.slice( i, i + 1 );\n  },\n\n  first: function() {\n    return this.eq( 0 );\n  },\n\n  last: function() {\n    return this.eq( -1 );\n  },\n\n  slice: function() {\n    return this.pushStack( slice.apply( this, arguments ),\n      \"slice\", slice.call(arguments).join(\",\") );\n  },\n\n  map: function( callback ) {\n    return this.pushStack( jQuery.map(this, function( elem, i ) {\n      return callback.call( elem, i, elem );\n    }));\n  },\n\n  end: function() {\n    return this.prevObject || this.constructor(null);\n  },\n\n  // For internal use only.\n  // Behaves like an Array's method, not like a jQuery method.\n  push: push,\n  sort: [].sort,\n  splice: [].splice\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\njQuery.extend = jQuery.fn.extend = function() {\n  var options, name, src, copy, copyIsArray, clone,\n    target = arguments[0] || {},\n    i = 1,\n    length = arguments.length,\n    deep = false;\n\n  // Handle a deep copy situation\n  if ( typeof target === \"boolean\" ) {\n    deep = target;\n    target = arguments[1] || {};\n    // skip the boolean and the target\n    i = 2;\n  }\n\n  // Handle case when target is a string or something (possible in deep copy)\n  if ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\n    target = {};\n  }\n\n  // extend jQuery itself if only one argument is passed\n  if ( length === i ) {\n    target = this;\n    --i;\n  }\n\n  for ( ; i < length; i++ ) {\n    // Only deal with non-null/undefined values\n    if ( (options = arguments[ i ]) != null ) {\n      // Extend the base object\n      for ( name in options ) {\n        src = target[ name ];\n        copy = options[ name ];\n\n        // Prevent never-ending loop\n        if ( target === copy ) {\n          continue;\n        }\n\n        // Recurse if we're merging plain objects or arrays\n        if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\n          if ( copyIsArray ) {\n            copyIsArray = false;\n            clone = src && jQuery.isArray(src) ? src : [];\n\n          } else {\n            clone = src && jQuery.isPlainObject(src) ? src : {};\n          }\n\n          // Never move original objects, clone them\n          target[ name ] = jQuery.extend( deep, clone, copy );\n\n        // Don't bring in undefined values\n        } else if ( copy !== undefined ) {\n          target[ name ] = copy;\n        }\n      }\n    }\n  }\n\n  // Return the modified object\n  return target;\n};\n\njQuery.extend({\n  noConflict: function( deep ) {\n    if ( window.$ === jQuery ) {\n      window.$ = _$;\n    }\n\n    if ( deep && window.jQuery === jQuery ) {\n      window.jQuery = _jQuery;\n    }\n\n    return jQuery;\n  },\n\n  // Is the DOM ready to be used? Set to true once it occurs.\n  isReady: false,\n\n  // A counter to track how many items to wait for before\n  // the ready event fires. See #6781\n  readyWait: 1,\n\n  // Hold (or release) the ready event\n  holdReady: function( hold ) {\n    if ( hold ) {\n      jQuery.readyWait++;\n    } else {\n      jQuery.ready( true );\n    }\n  },\n\n  // Handle when the DOM is ready\n  ready: function( wait ) {\n    // Either a released hold or an DOMready/load event and not yet ready\n    if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {\n      // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n      if ( !document.body ) {\n        return setTimeout( jQuery.ready, 1 );\n      }\n\n      // Remember that the DOM is ready\n      jQuery.isReady = true;\n\n      // If a normal DOM Ready event fired, decrement, and wait if need be\n      if ( wait !== true && --jQuery.readyWait > 0 ) {\n        return;\n      }\n\n      // If there are functions bound, to execute\n      readyList.fireWith( document, [ jQuery ] );\n\n      // Trigger any bound ready events\n      if ( jQuery.fn.trigger ) {\n        jQuery( document ).trigger( \"ready\" ).off( \"ready\" );\n      }\n    }\n  },\n\n  bindReady: function() {\n    if ( readyList ) {\n      return;\n    }\n\n    readyList = jQuery.Callbacks( \"once memory\" );\n\n    // Catch cases where $(document).ready() is called after the\n    // browser event has already occurred.\n    if ( document.readyState === \"complete\" ) {\n      // Handle it asynchronously to allow scripts the opportunity to delay ready\n      return setTimeout( jQuery.ready, 1 );\n    }\n\n    // Mozilla, Opera and webkit nightlies currently support this event\n    if ( document.addEventListener ) {\n      // Use the handy event callback\n      document.addEventListener( \"DOMContentLoaded\", DOMContentLoaded, false );\n\n      // A fallback to window.onload, that will always work\n      window.addEventListener( \"load\", jQuery.ready, false );\n\n    // If IE event model is used\n    } else if ( document.attachEvent ) {\n      // ensure firing before onload,\n      // maybe late but safe also for iframes\n      document.attachEvent( \"onreadystatechange\", DOMContentLoaded );\n\n      // A fallback to window.onload, that will always work\n      window.attachEvent( \"onload\", jQuery.ready );\n\n      // If IE and not a frame\n      // continually check to see if the document is ready\n      var toplevel = false;\n\n      try {\n        toplevel = window.frameElement == null;\n      } catch(e) {}\n\n      if ( document.documentElement.doScroll && toplevel ) {\n        doScrollCheck();\n      }\n    }\n  },\n\n  // See test/unit/core.js for details concerning isFunction.\n  // Since version 1.3, DOM methods and functions like alert\n  // aren't supported. They return false on IE (#2968).\n  isFunction: function( obj ) {\n    return jQuery.type(obj) === \"function\";\n  },\n\n  isArray: Array.isArray || function( obj ) {\n    return jQuery.type(obj) === \"array\";\n  },\n\n  isWindow: function( obj ) {\n    return obj != null && obj == obj.window;\n  },\n\n  isNumeric: function( obj ) {\n    return !isNaN( parseFloat(obj) ) && isFinite( obj );\n  },\n\n  type: function( obj ) {\n    return obj == null ?\n      String( obj ) :\n      class2type[ toString.call(obj) ] || \"object\";\n  },\n\n  isPlainObject: function( obj ) {\n    // Must be an Object.\n    // Because of IE, we also have to check the presence of the constructor property.\n    // Make sure that DOM nodes and window objects don't pass through, as well\n    if ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n      return false;\n    }\n\n    try {\n      // Not own constructor property must be Object\n      if ( obj.constructor &&\n        !hasOwn.call(obj, \"constructor\") &&\n        !hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\n        return false;\n      }\n    } catch ( e ) {\n      // IE8,9 Will throw exceptions on certain host objects #9897\n      return false;\n    }\n\n    // Own properties are enumerated firstly, so to speed up,\n    // if last one is own, then all properties are own.\n\n    var key;\n    for ( key in obj ) {}\n\n    return key === undefined || hasOwn.call( obj, key );\n  },\n\n  isEmptyObject: function( obj ) {\n    for ( var name in obj ) {\n      return false;\n    }\n    return true;\n  },\n\n  error: function( msg ) {\n    throw new Error( msg );\n  },\n\n  parseJSON: function( data ) {\n    if ( typeof data !== \"string\" || !data ) {\n      return null;\n    }\n\n    // Make sure leading/trailing whitespace is removed (IE can't handle it)\n    data = jQuery.trim( data );\n\n    // Attempt to parse using the native JSON parser first\n    if ( window.JSON && window.JSON.parse ) {\n      return window.JSON.parse( data );\n    }\n\n    // Make sure the incoming data is actual JSON\n    // Logic borrowed from http://json.org/json2.js\n    if ( rvalidchars.test( data.replace( rvalidescape, \"@\" )\n      .replace( rvalidtokens, \"]\" )\n      .replace( rvalidbraces, \"\")) ) {\n\n      return ( new Function( \"return \" + data ) )();\n\n    }\n    jQuery.error( \"Invalid JSON: \" + data );\n  },\n\n  // Cross-browser xml parsing\n  parseXML: function( data ) {\n    if ( typeof data !== \"string\" || !data ) {\n      return null;\n    }\n    var xml, tmp;\n    try {\n      if ( window.DOMParser ) { // Standard\n        tmp = new DOMParser();\n        xml = tmp.parseFromString( data , \"text/xml\" );\n      } else { // IE\n        xml = new ActiveXObject( \"Microsoft.XMLDOM\" );\n        xml.async = \"false\";\n        xml.loadXML( data );\n      }\n    } catch( e ) {\n      xml = undefined;\n    }\n    if ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\n      jQuery.error( \"Invalid XML: \" + data );\n    }\n    return xml;\n  },\n\n  noop: function() {},\n\n  // Evaluates a script in a global context\n  // Workarounds based on findings by Jim Driscoll\n  // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n  globalEval: function( data ) {\n    if ( data && rnotwhite.test( data ) ) {\n      // We use execScript on Internet Explorer\n      // We use an anonymous function so that context is window\n      // rather than jQuery in Firefox\n      ( window.execScript || function( data ) {\n        window[ \"eval\" ].call( window, data );\n      } )( data );\n    }\n  },\n\n  // Convert dashed to camelCase; used by the css and data modules\n  // Microsoft forgot to hump their vendor prefix (#9572)\n  camelCase: function( string ) {\n    return string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n  },\n\n  nodeName: function( elem, name ) {\n    return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();\n  },\n\n  // args is for internal usage only\n  each: function( object, callback, args ) {\n    var name, i = 0,\n      length = object.length,\n      isObj = length === undefined || jQuery.isFunction( object );\n\n    if ( args ) {\n      if ( isObj ) {\n        for ( name in object ) {\n          if ( callback.apply( object[ name ], args ) === false ) {\n            break;\n          }\n        }\n      } else {\n        for ( ; i < length; ) {\n          if ( callback.apply( object[ i++ ], args ) === false ) {\n            break;\n          }\n        }\n      }\n\n    // A special, fast, case for the most common use of each\n    } else {\n      if ( isObj ) {\n        for ( name in object ) {\n          if ( callback.call( object[ name ], name, object[ name ] ) === false ) {\n            break;\n          }\n        }\n      } else {\n        for ( ; i < length; ) {\n          if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {\n            break;\n          }\n        }\n      }\n    }\n\n    return object;\n  },\n\n  // Use native String.trim function wherever possible\n  trim: trim ?\n    function( text ) {\n      return text == null ?\n        \"\" :\n        trim.call( text );\n    } :\n\n    // Otherwise use our own trimming functionality\n    function( text ) {\n      return text == null ?\n        \"\" :\n        text.toString().replace( trimLeft, \"\" ).replace( trimRight, \"\" );\n    },\n\n  // results is for internal usage only\n  makeArray: function( array, results ) {\n    var ret = results || [];\n\n    if ( array != null ) {\n      // The window, strings (and functions) also have 'length'\n      // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930\n      var type = jQuery.type( array );\n\n      if ( array.length == null || type === \"string\" || type === \"function\" || type === \"regexp\" || jQuery.isWindow( array ) ) {\n        push.call( ret, array );\n      } else {\n        jQuery.merge( ret, array );\n      }\n    }\n\n    return ret;\n  },\n\n  inArray: function( elem, array, i ) {\n    var len;\n\n    if ( array ) {\n      if ( indexOf ) {\n        return indexOf.call( array, elem, i );\n      }\n\n      len = array.length;\n      i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n      for ( ; i < len; i++ ) {\n        // Skip accessing in sparse arrays\n        if ( i in array && array[ i ] === elem ) {\n          return i;\n        }\n      }\n    }\n\n    return -1;\n  },\n\n  merge: function( first, second ) {\n    var i = first.length,\n      j = 0;\n\n    if ( typeof second.length === \"number\" ) {\n      for ( var l = second.length; j < l; j++ ) {\n        first[ i++ ] = second[ j ];\n      }\n\n    } else {\n      while ( second[j] !== undefined ) {\n        first[ i++ ] = second[ j++ ];\n      }\n    }\n\n    first.length = i;\n\n    return first;\n  },\n\n  grep: function( elems, callback, inv ) {\n    var ret = [], retVal;\n    inv = !!inv;\n\n    // Go through the array, only saving the items\n    // that pass the validator function\n    for ( var i = 0, length = elems.length; i < length; i++ ) {\n      retVal = !!callback( elems[ i ], i );\n      if ( inv !== retVal ) {\n        ret.push( elems[ i ] );\n      }\n    }\n\n    return ret;\n  },\n\n  // arg is for internal usage only\n  map: function( elems, callback, arg ) {\n    var value, key, ret = [],\n      i = 0,\n      length = elems.length,\n      // jquery objects are treated as arrays\n      isArray = elems instanceof jQuery || length !== undefined && typeof length === \"number\" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;\n\n    // Go through the array, translating each of the items to their\n    if ( isArray ) {\n      for ( ; i < length; i++ ) {\n        value = callback( elems[ i ], i, arg );\n\n        if ( value != null ) {\n          ret[ ret.length ] = value;\n        }\n      }\n\n    // Go through every key on the object,\n    } else {\n      for ( key in elems ) {\n        value = callback( elems[ key ], key, arg );\n\n        if ( value != null ) {\n          ret[ ret.length ] = value;\n        }\n      }\n    }\n\n    // Flatten any nested arrays\n    return ret.concat.apply( [], ret );\n  },\n\n  // A global GUID counter for objects\n  guid: 1,\n\n  // Bind a function to a context, optionally partially applying any\n  // arguments.\n  proxy: function( fn, context ) {\n    if ( typeof context === \"string\" ) {\n      var tmp = fn[ context ];\n      context = fn;\n      fn = tmp;\n    }\n\n    // Quick check to determine if target is callable, in the spec\n    // this throws a TypeError, but we will just return undefined.\n    if ( !jQuery.isFunction( fn ) ) {\n      return undefined;\n    }\n\n    // Simulated bind\n    var args = slice.call( arguments, 2 ),\n      proxy = function() {\n        return fn.apply( context, args.concat( slice.call( arguments ) ) );\n      };\n\n    // Set the guid of unique handler to the same of original handler, so it can be removed\n    proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;\n\n    return proxy;\n  },\n\n  // Mutifunctional method to get and set values to a collection\n  // The value/s can optionally be executed if it's a function\n  access: function( elems, fn, key, value, chainable, emptyGet, pass ) {\n    var exec,\n      bulk = key == null,\n      i = 0,\n      length = elems.length;\n\n    // Sets many values\n    if ( key && typeof key === \"object\" ) {\n      for ( i in key ) {\n        jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );\n      }\n      chainable = 1;\n\n    // Sets one value\n    } else if ( value !== undefined ) {\n      // Optionally, function values get executed if exec is true\n      exec = pass === undefined && jQuery.isFunction( value );\n\n      if ( bulk ) {\n        // Bulk operations only iterate when executing function values\n        if ( exec ) {\n          exec = fn;\n          fn = function( elem, key, value ) {\n            return exec.call( jQuery( elem ), value );\n          };\n\n        // Otherwise they run against the entire set\n        } else {\n          fn.call( elems, value );\n          fn = null;\n        }\n      }\n\n      if ( fn ) {\n        for (; i < length; i++ ) {\n          fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );\n        }\n      }\n\n      chainable = 1;\n    }\n\n    return chainable ?\n      elems :\n\n      // Gets\n      bulk ?\n        fn.call( elems ) :\n        length ? fn( elems[0], key ) : emptyGet;\n  },\n\n  now: function() {\n    return ( new Date() ).getTime();\n  },\n\n  // Use of jQuery.browser is frowned upon.\n  // More details: http://docs.jquery.com/Utilities/jQuery.browser\n  uaMatch: function( ua ) {\n    ua = ua.toLowerCase();\n\n    var match = rwebkit.exec( ua ) ||\n      ropera.exec( ua ) ||\n      rmsie.exec( ua ) ||\n      ua.indexOf(\"compatible\") < 0 && rmozilla.exec( ua ) ||\n      [];\n\n    return { browser: match[1] || \"\", version: match[2] || \"0\" };\n  },\n\n  sub: function() {\n    function jQuerySub( selector, context ) {\n      return new jQuerySub.fn.init( selector, context );\n    }\n    jQuery.extend( true, jQuerySub, this );\n    jQuerySub.superclass = this;\n    jQuerySub.fn = jQuerySub.prototype = this();\n    jQuerySub.fn.constructor = jQuerySub;\n    jQuerySub.sub = this.sub;\n    jQuerySub.fn.init = function init( selector, context ) {\n      if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {\n        context = jQuerySub( context );\n      }\n\n      return jQuery.fn.init.call( this, selector, context, rootjQuerySub );\n    };\n    jQuerySub.fn.init.prototype = jQuerySub.fn;\n    var rootjQuerySub = jQuerySub(document);\n    return jQuerySub;\n  },\n\n  browser: {}\n});\n\n// Populate the class2type map\njQuery.each(\"Boolean Number String Function Array Date RegExp Object\".split(\" \"), function(i, name) {\n  class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n});\n\nbrowserMatch = jQuery.uaMatch( userAgent );\nif ( browserMatch.browser ) {\n  jQuery.browser[ browserMatch.browser ] = true;\n  jQuery.browser.version = browserMatch.version;\n}\n\n// Deprecated, use jQuery.browser.webkit instead\nif ( jQuery.browser.webkit ) {\n  jQuery.browser.safari = true;\n}\n\n// IE doesn't match non-breaking spaces with \\s\nif ( rnotwhite.test( \"\\xA0\" ) ) {\n  trimLeft = /^[\\s\\xA0]+/;\n  trimRight = /[\\s\\xA0]+$/;\n}\n\n// All jQuery objects should point back to these\nrootjQuery = jQuery(document);\n\n// Cleanup functions for the document ready method\nif ( document.addEventListener ) {\n  DOMContentLoaded = function() {\n    document.removeEventListener( \"DOMContentLoaded\", DOMContentLoaded, false );\n    jQuery.ready();\n  };\n\n} else if ( document.attachEvent ) {\n  DOMContentLoaded = function() {\n    // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n    if ( document.readyState === \"complete\" ) {\n      document.detachEvent( \"onreadystatechange\", DOMContentLoaded );\n      jQuery.ready();\n    }\n  };\n}\n\n// The DOM ready check for Internet Explorer\nfunction doScrollCheck() {\n  if ( jQuery.isReady ) {\n    return;\n  }\n\n  try {\n    // If IE is used, use the trick by Diego Perini\n    // http://javascript.nwbox.com/IEContentLoaded/\n    document.documentElement.doScroll(\"left\");\n  } catch(e) {\n    setTimeout( doScrollCheck, 1 );\n    return;\n  }\n\n  // and execute any waiting functions\n  jQuery.ready();\n}\n\nreturn jQuery;\n\n})();\n\n\n// String to Object flags format cache\nvar flagsCache = {};\n\n// Convert String-formatted flags into Object-formatted ones and store in cache\nfunction createFlags( flags ) {\n  var object = flagsCache[ flags ] = {},\n    i, length;\n  flags = flags.split( /\\s+/ );\n  for ( i = 0, length = flags.length; i < length; i++ ) {\n    object[ flags[i] ] = true;\n  }\n  return object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\tflags:\tan optional list of space-separated flags that will change how\n *\t\t\tthe callback list behaves\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible flags:\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( flags ) {\n\n  // Convert flags from String-formatted to Object-formatted\n  // (we check in cache first)\n  flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};\n\n  var // Actual callback list\n    list = [],\n    // Stack of fire calls for repeatable lists\n    stack = [],\n    // Last fire value (for non-forgettable lists)\n    memory,\n    // Flag to know if list was already fired\n    fired,\n    // Flag to know if list is currently firing\n    firing,\n    // First callback to fire (used internally by add and fireWith)\n    firingStart,\n    // End of the loop when firing\n    firingLength,\n    // Index of currently firing callback (modified by remove if needed)\n    firingIndex,\n    // Add one or several callbacks to the list\n    add = function( args ) {\n      var i,\n        length,\n        elem,\n        type,\n        actual;\n      for ( i = 0, length = args.length; i < length; i++ ) {\n        elem = args[ i ];\n        type = jQuery.type( elem );\n        if ( type === \"array\" ) {\n          // Inspect recursively\n          add( elem );\n        } else if ( type === \"function\" ) {\n          // Add if not in unique mode and callback is not in\n          if ( !flags.unique || !self.has( elem ) ) {\n            list.push( elem );\n          }\n        }\n      }\n    },\n    // Fire callbacks\n    fire = function( context, args ) {\n      args = args || [];\n      memory = !flags.memory || [ context, args ];\n      fired = true;\n      firing = true;\n      firingIndex = firingStart || 0;\n      firingStart = 0;\n      firingLength = list.length;\n      for ( ; list && firingIndex < firingLength; firingIndex++ ) {\n        if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {\n          memory = true; // Mark as halted\n          break;\n        }\n      }\n      firing = false;\n      if ( list ) {\n        if ( !flags.once ) {\n          if ( stack && stack.length ) {\n            memory = stack.shift();\n            self.fireWith( memory[ 0 ], memory[ 1 ] );\n          }\n        } else if ( memory === true ) {\n          self.disable();\n        } else {\n          list = [];\n        }\n      }\n    },\n    // Actual Callbacks object\n    self = {\n      // Add a callback or a collection of callbacks to the list\n      add: function() {\n        if ( list ) {\n          var length = list.length;\n          add( arguments );\n          // Do we need to add the callbacks to the\n          // current firing batch?\n          if ( firing ) {\n            firingLength = list.length;\n          // With memory, if we're not firing then\n          // we should call right away, unless previous\n          // firing was halted (stopOnFalse)\n          } else if ( memory && memory !== true ) {\n            firingStart = length;\n            fire( memory[ 0 ], memory[ 1 ] );\n          }\n        }\n        return this;\n      },\n      // Remove a callback from the list\n      remove: function() {\n        if ( list ) {\n          var args = arguments,\n            argIndex = 0,\n            argLength = args.length;\n          for ( ; argIndex < argLength ; argIndex++ ) {\n            for ( var i = 0; i < list.length; i++ ) {\n              if ( args[ argIndex ] === list[ i ] ) {\n                // Handle firingIndex and firingLength\n                if ( firing ) {\n                  if ( i <= firingLength ) {\n                    firingLength--;\n                    if ( i <= firingIndex ) {\n                      firingIndex--;\n                    }\n                  }\n                }\n                // Remove the element\n                list.splice( i--, 1 );\n                // If we have some unicity property then\n                // we only need to do this once\n                if ( flags.unique ) {\n                  break;\n                }\n              }\n            }\n          }\n        }\n        return this;\n      },\n      // Control if a given callback is in the list\n      has: function( fn ) {\n        if ( list ) {\n          var i = 0,\n            length = list.length;\n          for ( ; i < length; i++ ) {\n            if ( fn === list[ i ] ) {\n              return true;\n            }\n          }\n        }\n        return false;\n      },\n      // Remove all callbacks from the list\n      empty: function() {\n        list = [];\n        return this;\n      },\n      // Have the list do nothing anymore\n      disable: function() {\n        list = stack = memory = undefined;\n        return this;\n      },\n      // Is it disabled?\n      disabled: function() {\n        return !list;\n      },\n      // Lock the list in its current state\n      lock: function() {\n        stack = undefined;\n        if ( !memory || memory === true ) {\n          self.disable();\n        }\n        return this;\n      },\n      // Is it locked?\n      locked: function() {\n        return !stack;\n      },\n      // Call all callbacks with the given context and arguments\n      fireWith: function( context, args ) {\n        if ( stack ) {\n          if ( firing ) {\n            if ( !flags.once ) {\n              stack.push( [ context, args ] );\n            }\n          } else if ( !( flags.once && memory ) ) {\n            fire( context, args );\n          }\n        }\n        return this;\n      },\n      // Call all the callbacks with the given arguments\n      fire: function() {\n        self.fireWith( this, arguments );\n        return this;\n      },\n      // To know if the callbacks have already been called at least once\n      fired: function() {\n        return !!fired;\n      }\n    };\n\n  return self;\n};\n\n\n\n\nvar // Static reference to slice\n  sliceDeferred = [].slice;\n\njQuery.extend({\n\n  Deferred: function( func ) {\n    var doneList = jQuery.Callbacks( \"once memory\" ),\n      failList = jQuery.Callbacks( \"once memory\" ),\n      progressList = jQuery.Callbacks( \"memory\" ),\n      state = \"pending\",\n      lists = {\n        resolve: doneList,\n        reject: failList,\n        notify: progressList\n      },\n      promise = {\n        done: doneList.add,\n        fail: failList.add,\n        progress: progressList.add,\n\n        state: function() {\n          return state;\n        },\n\n        // Deprecated\n        isResolved: doneList.fired,\n        isRejected: failList.fired,\n\n        then: function( doneCallbacks, failCallbacks, progressCallbacks ) {\n          deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );\n          return this;\n        },\n        always: function() {\n          deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );\n          return this;\n        },\n        pipe: function( fnDone, fnFail, fnProgress ) {\n          return jQuery.Deferred(function( newDefer ) {\n            jQuery.each( {\n              done: [ fnDone, \"resolve\" ],\n              fail: [ fnFail, \"reject\" ],\n              progress: [ fnProgress, \"notify\" ]\n            }, function( handler, data ) {\n              var fn = data[ 0 ],\n                action = data[ 1 ],\n                returned;\n              if ( jQuery.isFunction( fn ) ) {\n                deferred[ handler ](function() {\n                  returned = fn.apply( this, arguments );\n                  if ( returned && jQuery.isFunction( returned.promise ) ) {\n                    returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );\n                  } else {\n                    newDefer[ action + \"With\" ]( this === deferred ? newDefer : this, [ returned ] );\n                  }\n                });\n              } else {\n                deferred[ handler ]( newDefer[ action ] );\n              }\n            });\n          }).promise();\n        },\n        // Get a promise for this deferred\n        // If obj is provided, the promise aspect is added to the object\n        promise: function( obj ) {\n          if ( obj == null ) {\n            obj = promise;\n          } else {\n            for ( var key in promise ) {\n              obj[ key ] = promise[ key ];\n            }\n          }\n          return obj;\n        }\n      },\n      deferred = promise.promise({}),\n      key;\n\n    for ( key in lists ) {\n      deferred[ key ] = lists[ key ].fire;\n      deferred[ key + \"With\" ] = lists[ key ].fireWith;\n    }\n\n    // Handle state\n    deferred.done( function() {\n      state = \"resolved\";\n    }, failList.disable, progressList.lock ).fail( function() {\n      state = \"rejected\";\n    }, doneList.disable, progressList.lock );\n\n    // Call given func if any\n    if ( func ) {\n      func.call( deferred, deferred );\n    }\n\n    // All done!\n    return deferred;\n  },\n\n  // Deferred helper\n  when: function( firstParam ) {\n    var args = sliceDeferred.call( arguments, 0 ),\n      i = 0,\n      length = args.length,\n      pValues = new Array( length ),\n      count = length,\n      pCount = length,\n      deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?\n        firstParam :\n        jQuery.Deferred(),\n      promise = deferred.promise();\n    function resolveFunc( i ) {\n      return function( value ) {\n        args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;\n        if ( !( --count ) ) {\n          deferred.resolveWith( deferred, args );\n        }\n      };\n    }\n    function progressFunc( i ) {\n      return function( value ) {\n        pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;\n        deferred.notifyWith( promise, pValues );\n      };\n    }\n    if ( length > 1 ) {\n      for ( ; i < length; i++ ) {\n        if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {\n          args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );\n        } else {\n          --count;\n        }\n      }\n      if ( !count ) {\n        deferred.resolveWith( deferred, args );\n      }\n    } else if ( deferred !== firstParam ) {\n      deferred.resolveWith( deferred, length ? [ firstParam ] : [] );\n    }\n    return promise;\n  }\n});\n\n\n\n\njQuery.support = (function() {\n\n  var support,\n    all,\n    a,\n    select,\n    opt,\n    input,\n    fragment,\n    tds,\n    events,\n    eventName,\n    i,\n    isSupported,\n    div = document.createElement( \"div\" ),\n    documentElement = document.documentElement;\n\n  // Preliminary tests\n  div.setAttribute(\"className\", \"t\");\n  div.innerHTML = \"   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>\";\n\n  all = div.getElementsByTagName( \"*\" );\n  a = div.getElementsByTagName( \"a\" )[ 0 ];\n\n  // Can't get basic test support\n  if ( !all || !all.length || !a ) {\n    return {};\n  }\n\n  // First batch of supports tests\n  select = document.createElement( \"select\" );\n  opt = select.appendChild( document.createElement(\"option\") );\n  input = div.getElementsByTagName( \"input\" )[ 0 ];\n\n  support = {\n    // IE strips leading whitespace when .innerHTML is used\n    leadingWhitespace: ( div.firstChild.nodeType === 3 ),\n\n    // Make sure that tbody elements aren't automatically inserted\n    // IE will insert them into empty tables\n    tbody: !div.getElementsByTagName(\"tbody\").length,\n\n    // Make sure that link elements get serialized correctly by innerHTML\n    // This requires a wrapper element in IE\n    htmlSerialize: !!div.getElementsByTagName(\"link\").length,\n\n    // Get the style information from getAttribute\n    // (IE uses .cssText instead)\n    style: /top/.test( a.getAttribute(\"style\") ),\n\n    // Make sure that URLs aren't manipulated\n    // (IE normalizes it by default)\n    hrefNormalized: ( a.getAttribute(\"href\") === \"/a\" ),\n\n    // Make sure that element opacity exists\n    // (IE uses filter instead)\n    // Use a regex to work around a WebKit issue. See #5145\n    opacity: /^0.55/.test( a.style.opacity ),\n\n    // Verify style float existence\n    // (IE uses styleFloat instead of cssFloat)\n    cssFloat: !!a.style.cssFloat,\n\n    // Make sure that if no value is specified for a checkbox\n    // that it defaults to \"on\".\n    // (WebKit defaults to \"\" instead)\n    checkOn: ( input.value === \"on\" ),\n\n    // Make sure that a selected-by-default option has a working selected property.\n    // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n    optSelected: opt.selected,\n\n    // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)\n    getSetAttribute: div.className !== \"t\",\n\n    // Tests for enctype support on a form(#6743)\n    enctype: !!document.createElement(\"form\").enctype,\n\n    // Makes sure cloning an html5 element does not cause problems\n    // Where outerHTML is undefined, this still works\n    html5Clone: document.createElement(\"nav\").cloneNode( true ).outerHTML !== \"<:nav></:nav>\",\n\n    // Will be defined later\n    submitBubbles: true,\n    changeBubbles: true,\n    focusinBubbles: false,\n    deleteExpando: true,\n    noCloneEvent: true,\n    inlineBlockNeedsLayout: false,\n    shrinkWrapBlocks: false,\n    reliableMarginRight: true,\n    pixelMargin: true\n  };\n\n  // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead\n  jQuery.boxModel = support.boxModel = (document.compatMode === \"CSS1Compat\");\n\n  // Make sure checked status is properly cloned\n  input.checked = true;\n  support.noCloneChecked = input.cloneNode( true ).checked;\n\n  // Make sure that the options inside disabled selects aren't marked as disabled\n  // (WebKit marks them as disabled)\n  select.disabled = true;\n  support.optDisabled = !opt.disabled;\n\n  // Test to see if it's possible to delete an expando from an element\n  // Fails in Internet Explorer\n  try {\n    delete div.test;\n  } catch( e ) {\n    support.deleteExpando = false;\n  }\n\n  if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {\n    div.attachEvent( \"onclick\", function() {\n      // Cloning a node shouldn't copy over any\n      // bound event handlers (IE does this)\n      support.noCloneEvent = false;\n    });\n    div.cloneNode( true ).fireEvent( \"onclick\" );\n  }\n\n  // Check if a radio maintains its value\n  // after being appended to the DOM\n  input = document.createElement(\"input\");\n  input.value = \"t\";\n  input.setAttribute(\"type\", \"radio\");\n  support.radioValue = input.value === \"t\";\n\n  input.setAttribute(\"checked\", \"checked\");\n\n  // #11217 - WebKit loses check when the name is after the checked attribute\n  input.setAttribute( \"name\", \"t\" );\n\n  div.appendChild( input );\n  fragment = document.createDocumentFragment();\n  fragment.appendChild( div.lastChild );\n\n  // WebKit doesn't clone checked state correctly in fragments\n  support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n  // Check if a disconnected checkbox will retain its checked\n  // value of true after appended to the DOM (IE6/7)\n  support.appendChecked = input.checked;\n\n  fragment.removeChild( input );\n  fragment.appendChild( div );\n\n  // Technique from Juriy Zaytsev\n  // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/\n  // We only care about the case where non-standard event systems\n  // are used, namely in IE. Short-circuiting here helps us to\n  // avoid an eval call (in setAttribute) which can cause CSP\n  // to go haywire. See: https://developer.mozilla.org/en/Security/CSP\n  if ( div.attachEvent ) {\n    for ( i in {\n      submit: 1,\n      change: 1,\n      focusin: 1\n    }) {\n      eventName = \"on\" + i;\n      isSupported = ( eventName in div );\n      if ( !isSupported ) {\n        div.setAttribute( eventName, \"return;\" );\n        isSupported = ( typeof div[ eventName ] === \"function\" );\n      }\n      support[ i + \"Bubbles\" ] = isSupported;\n    }\n  }\n\n  fragment.removeChild( div );\n\n  // Null elements to avoid leaks in IE\n  fragment = select = opt = div = input = null;\n\n  // Run tests that need a body at doc ready\n  jQuery(function() {\n    var container, outer, inner, table, td, offsetSupport,\n      marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,\n      paddingMarginBorderVisibility, paddingMarginBorder,\n      body = document.getElementsByTagName(\"body\")[0];\n\n    if ( !body ) {\n      // Return for frameset docs that don't have a body\n      return;\n    }\n\n    conMarginTop = 1;\n    paddingMarginBorder = \"padding:0;margin:0;border:\";\n    positionTopLeftWidthHeight = \"position:absolute;top:0;left:0;width:1px;height:1px;\";\n    paddingMarginBorderVisibility = paddingMarginBorder + \"0;visibility:hidden;\";\n    style = \"style='\" + positionTopLeftWidthHeight + paddingMarginBorder + \"5px solid #000;\";\n    html = \"<div \" + style + \"display:block;'><div style='\" + paddingMarginBorder + \"0;display:block;overflow:hidden;'></div></div>\" +\n      \"<table \" + style + \"' cellpadding='0' cellspacing='0'>\" +\n      \"<tr><td></td></tr></table>\";\n\n    container = document.createElement(\"div\");\n    container.style.cssText = paddingMarginBorderVisibility + \"width:0;height:0;position:static;top:0;margin-top:\" + conMarginTop + \"px\";\n    body.insertBefore( container, body.firstChild );\n\n    // Construct the test element\n    div = document.createElement(\"div\");\n    container.appendChild( div );\n\n    // Check if table cells still have offsetWidth/Height when they are set\n    // to display:none and there are still other visible table cells in a\n    // table row; if so, offsetWidth/Height are not reliable for use when\n    // determining if an element has been hidden directly using\n    // display:none (it is still safe to use offsets if a parent element is\n    // hidden; don safety goggles and see bug #4512 for more information).\n    // (only IE 8 fails this test)\n    div.innerHTML = \"<table><tr><td style='\" + paddingMarginBorder + \"0;display:none'></td><td>t</td></tr></table>\";\n    tds = div.getElementsByTagName( \"td\" );\n    isSupported = ( tds[ 0 ].offsetHeight === 0 );\n\n    tds[ 0 ].style.display = \"\";\n    tds[ 1 ].style.display = \"none\";\n\n    // Check if empty table cells still have offsetWidth/Height\n    // (IE <= 8 fail this test)\n    support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );\n\n    // Check if div with explicit width and no margin-right incorrectly\n    // gets computed margin-right based on width of container. For more\n    // info see bug #3333\n    // Fails in WebKit before Feb 2011 nightlies\n    // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n    if ( window.getComputedStyle ) {\n      div.innerHTML = \"\";\n      marginDiv = document.createElement( \"div\" );\n      marginDiv.style.width = \"0\";\n      marginDiv.style.marginRight = \"0\";\n      div.style.width = \"2px\";\n      div.appendChild( marginDiv );\n      support.reliableMarginRight =\n        ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;\n    }\n\n    if ( typeof div.style.zoom !== \"undefined\" ) {\n      // Check if natively block-level elements act like inline-block\n      // elements when setting their display to 'inline' and giving\n      // them layout\n      // (IE < 8 does this)\n      div.innerHTML = \"\";\n      div.style.width = div.style.padding = \"1px\";\n      div.style.border = 0;\n      div.style.overflow = \"hidden\";\n      div.style.display = \"inline\";\n      div.style.zoom = 1;\n      support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );\n\n      // Check if elements with layout shrink-wrap their children\n      // (IE 6 does this)\n      div.style.display = \"block\";\n      div.style.overflow = \"visible\";\n      div.innerHTML = \"<div style='width:5px;'></div>\";\n      support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );\n    }\n\n    div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;\n    div.innerHTML = html;\n\n    outer = div.firstChild;\n    inner = outer.firstChild;\n    td = outer.nextSibling.firstChild.firstChild;\n\n    offsetSupport = {\n      doesNotAddBorder: ( inner.offsetTop !== 5 ),\n      doesAddBorderForTableAndCells: ( td.offsetTop === 5 )\n    };\n\n    inner.style.position = \"fixed\";\n    inner.style.top = \"20px\";\n\n    // safari subtracts parent border width here which is 5px\n    offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );\n    inner.style.position = inner.style.top = \"\";\n\n    outer.style.overflow = \"hidden\";\n    outer.style.position = \"relative\";\n\n    offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );\n    offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );\n\n    if ( window.getComputedStyle ) {\n      div.style.marginTop = \"1%\";\n      support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== \"1%\";\n    }\n\n    if ( typeof container.style.zoom !== \"undefined\" ) {\n      container.style.zoom = 1;\n    }\n\n    body.removeChild( container );\n    marginDiv = div = container = null;\n\n    jQuery.extend( support, offsetSupport );\n  });\n\n  return support;\n})();\n\n\n\n\nvar rbrace = /^(?:\\{.*\\}|\\[.*\\])$/,\n  rmultiDash = /([A-Z])/g;\n\njQuery.extend({\n  cache: {},\n\n  // Please use with caution\n  uuid: 0,\n\n  // Unique for each copy of jQuery on the page\n  // Non-digits removed to match rinlinejQuery\n  expando: \"jQuery\" + ( jQuery.fn.jquery + Math.random() ).replace( /\\D/g, \"\" ),\n\n  // The following elements throw uncatchable exceptions if you\n  // attempt to add expando properties to them.\n  noData: {\n    \"embed\": true,\n    // Ban all objects except for Flash (which handle expandos)\n    \"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",\n    \"applet\": true\n  },\n\n  hasData: function( elem ) {\n    elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\n    return !!elem && !isEmptyDataObject( elem );\n  },\n\n  data: function( elem, name, data, pvt /* Internal Use Only */ ) {\n    if ( !jQuery.acceptData( elem ) ) {\n      return;\n    }\n\n    var privateCache, thisCache, ret,\n      internalKey = jQuery.expando,\n      getByName = typeof name === \"string\",\n\n      // We have to handle DOM nodes and JS objects differently because IE6-7\n      // can't GC object references properly across the DOM-JS boundary\n      isNode = elem.nodeType,\n\n      // Only DOM nodes need the global jQuery cache; JS object data is\n      // attached directly to the object so GC can occur automatically\n      cache = isNode ? jQuery.cache : elem,\n\n      // Only defining an ID for JS objects if its cache already exists allows\n      // the code to shortcut on the same path as a DOM node with no cache\n      id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,\n      isEvents = name === \"events\";\n\n    // Avoid doing any more work than we need to when trying to get data on an\n    // object that has no data at all\n    if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {\n      return;\n    }\n\n    if ( !id ) {\n      // Only DOM nodes need a new unique ID for each element since their data\n      // ends up in the global cache\n      if ( isNode ) {\n        elem[ internalKey ] = id = ++jQuery.uuid;\n      } else {\n        id = internalKey;\n      }\n    }\n\n    if ( !cache[ id ] ) {\n      cache[ id ] = {};\n\n      // Avoids exposing jQuery metadata on plain JS objects when the object\n      // is serialized using JSON.stringify\n      if ( !isNode ) {\n        cache[ id ].toJSON = jQuery.noop;\n      }\n    }\n\n    // An object can be passed to jQuery.data instead of a key/value pair; this gets\n    // shallow copied over onto the existing cache\n    if ( typeof name === \"object\" || typeof name === \"function\" ) {\n      if ( pvt ) {\n        cache[ id ] = jQuery.extend( cache[ id ], name );\n      } else {\n        cache[ id ].data = jQuery.extend( cache[ id ].data, name );\n      }\n    }\n\n    privateCache = thisCache = cache[ id ];\n\n    // jQuery data() is stored in a separate object inside the object's internal data\n    // cache in order to avoid key collisions between internal data and user-defined\n    // data.\n    if ( !pvt ) {\n      if ( !thisCache.data ) {\n        thisCache.data = {};\n      }\n\n      thisCache = thisCache.data;\n    }\n\n    if ( data !== undefined ) {\n      thisCache[ jQuery.camelCase( name ) ] = data;\n    }\n\n    // Users should not attempt to inspect the internal events object using jQuery.data,\n    // it is undocumented and subject to change. But does anyone listen? No.\n    if ( isEvents && !thisCache[ name ] ) {\n      return privateCache.events;\n    }\n\n    // Check for both converted-to-camel and non-converted data property names\n    // If a data property was specified\n    if ( getByName ) {\n\n      // First Try to find as-is property data\n      ret = thisCache[ name ];\n\n      // Test for null|undefined property data\n      if ( ret == null ) {\n\n        // Try to find the camelCased property\n        ret = thisCache[ jQuery.camelCase( name ) ];\n      }\n    } else {\n      ret = thisCache;\n    }\n\n    return ret;\n  },\n\n  removeData: function( elem, name, pvt /* Internal Use Only */ ) {\n    if ( !jQuery.acceptData( elem ) ) {\n      return;\n    }\n\n    var thisCache, i, l,\n\n      // Reference to internal data cache key\n      internalKey = jQuery.expando,\n\n      isNode = elem.nodeType,\n\n      // See jQuery.data for more information\n      cache = isNode ? jQuery.cache : elem,\n\n      // See jQuery.data for more information\n      id = isNode ? elem[ internalKey ] : internalKey;\n\n    // If there is already no cache entry for this object, there is no\n    // purpose in continuing\n    if ( !cache[ id ] ) {\n      return;\n    }\n\n    if ( name ) {\n\n      thisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n      if ( thisCache ) {\n\n        // Support array or space separated string names for data keys\n        if ( !jQuery.isArray( name ) ) {\n\n          // try the string as a key before any manipulation\n          if ( name in thisCache ) {\n            name = [ name ];\n          } else {\n\n            // split the camel cased version by spaces unless a key with the spaces exists\n            name = jQuery.camelCase( name );\n            if ( name in thisCache ) {\n              name = [ name ];\n            } else {\n              name = name.split( \" \" );\n            }\n          }\n        }\n\n        for ( i = 0, l = name.length; i < l; i++ ) {\n          delete thisCache[ name[i] ];\n        }\n\n        // If there is no data left in the cache, we want to continue\n        // and let the cache object itself get destroyed\n        if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {\n          return;\n        }\n      }\n    }\n\n    // See jQuery.data for more information\n    if ( !pvt ) {\n      delete cache[ id ].data;\n\n      // Don't destroy the parent cache unless the internal data object\n      // had been the only thing left in it\n      if ( !isEmptyDataObject(cache[ id ]) ) {\n        return;\n      }\n    }\n\n    // Browsers that fail expando deletion also refuse to delete expandos on\n    // the window, but it will allow it on all other JS objects; other browsers\n    // don't care\n    // Ensure that `cache` is not a window object #10080\n    if ( jQuery.support.deleteExpando || !cache.setInterval ) {\n      delete cache[ id ];\n    } else {\n      cache[ id ] = null;\n    }\n\n    // We destroyed the cache and need to eliminate the expando on the node to avoid\n    // false lookups in the cache for entries that no longer exist\n    if ( isNode ) {\n      // IE does not allow us to delete expando properties from nodes,\n      // nor does it have a removeAttribute function on Document nodes;\n      // we must handle all of these cases\n      if ( jQuery.support.deleteExpando ) {\n        delete elem[ internalKey ];\n      } else if ( elem.removeAttribute ) {\n        elem.removeAttribute( internalKey );\n      } else {\n        elem[ internalKey ] = null;\n      }\n    }\n  },\n\n  // For internal use only.\n  _data: function( elem, name, data ) {\n    return jQuery.data( elem, name, data, true );\n  },\n\n  // A method for determining if a DOM node can handle the data expando\n  acceptData: function( elem ) {\n    if ( elem.nodeName ) {\n      var match = jQuery.noData[ elem.nodeName.toLowerCase() ];\n\n      if ( match ) {\n        return !(match === true || elem.getAttribute(\"classid\") !== match);\n      }\n    }\n\n    return true;\n  }\n});\n\njQuery.fn.extend({\n  data: function( key, value ) {\n    var parts, part, attr, name, l,\n      elem = this[0],\n      i = 0,\n      data = null;\n\n    // Gets all values\n    if ( key === undefined ) {\n      if ( this.length ) {\n        data = jQuery.data( elem );\n\n        if ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\n          attr = elem.attributes;\n          for ( l = attr.length; i < l; i++ ) {\n            name = attr[i].name;\n\n            if ( name.indexOf( \"data-\" ) === 0 ) {\n              name = jQuery.camelCase( name.substring(5) );\n\n              dataAttr( elem, name, data[ name ] );\n            }\n          }\n          jQuery._data( elem, \"parsedAttrs\", true );\n        }\n      }\n\n      return data;\n    }\n\n    // Sets multiple values\n    if ( typeof key === \"object\" ) {\n      return this.each(function() {\n        jQuery.data( this, key );\n      });\n    }\n\n    parts = key.split( \".\", 2 );\n    parts[1] = parts[1] ? \".\" + parts[1] : \"\";\n    part = parts[1] + \"!\";\n\n    return jQuery.access( this, function( value ) {\n\n      if ( value === undefined ) {\n        data = this.triggerHandler( \"getData\" + part, [ parts[0] ] );\n\n        // Try to fetch any internally stored data first\n        if ( data === undefined && elem ) {\n          data = jQuery.data( elem, key );\n          data = dataAttr( elem, key, data );\n        }\n\n        return data === undefined && parts[1] ?\n          this.data( parts[0] ) :\n          data;\n      }\n\n      parts[1] = value;\n      this.each(function() {\n        var self = jQuery( this );\n\n        self.triggerHandler( \"setData\" + part, parts );\n        jQuery.data( this, key, value );\n        self.triggerHandler( \"changeData\" + part, parts );\n      });\n    }, null, value, arguments.length > 1, null, false );\n  },\n\n  removeData: function( key ) {\n    return this.each(function() {\n      jQuery.removeData( this, key );\n    });\n  }\n});\n\nfunction dataAttr( elem, key, data ) {\n  // If nothing was found internally, try to fetch any\n  // data from the HTML5 data-* attribute\n  if ( data === undefined && elem.nodeType === 1 ) {\n\n    var name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n    data = elem.getAttribute( name );\n\n    if ( typeof data === \"string\" ) {\n      try {\n        data = data === \"true\" ? true :\n        data === \"false\" ? false :\n        data === \"null\" ? null :\n        jQuery.isNumeric( data ) ? +data :\n          rbrace.test( data ) ? jQuery.parseJSON( data ) :\n          data;\n      } catch( e ) {}\n\n      // Make sure we set the data so it isn't changed later\n      jQuery.data( elem, key, data );\n\n    } else {\n      data = undefined;\n    }\n  }\n\n  return data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n  for ( var name in obj ) {\n\n    // if the public data object is empty, the private is still empty\n    if ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\n      continue;\n    }\n    if ( name !== \"toJSON\" ) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\n\n\n\nfunction handleQueueMarkDefer( elem, type, src ) {\n  var deferDataKey = type + \"defer\",\n    queueDataKey = type + \"queue\",\n    markDataKey = type + \"mark\",\n    defer = jQuery._data( elem, deferDataKey );\n  if ( defer &&\n    ( src === \"queue\" || !jQuery._data(elem, queueDataKey) ) &&\n    ( src === \"mark\" || !jQuery._data(elem, markDataKey) ) ) {\n    // Give room for hard-coded callbacks to fire first\n    // and eventually mark/queue something else on the element\n    setTimeout( function() {\n      if ( !jQuery._data( elem, queueDataKey ) &&\n        !jQuery._data( elem, markDataKey ) ) {\n        jQuery.removeData( elem, deferDataKey, true );\n        defer.fire();\n      }\n    }, 0 );\n  }\n}\n\njQuery.extend({\n\n  _mark: function( elem, type ) {\n    if ( elem ) {\n      type = ( type || \"fx\" ) + \"mark\";\n      jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );\n    }\n  },\n\n  _unmark: function( force, elem, type ) {\n    if ( force !== true ) {\n      type = elem;\n      elem = force;\n      force = false;\n    }\n    if ( elem ) {\n      type = type || \"fx\";\n      var key = type + \"mark\",\n        count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );\n      if ( count ) {\n        jQuery._data( elem, key, count );\n      } else {\n        jQuery.removeData( elem, key, true );\n        handleQueueMarkDefer( elem, type, \"mark\" );\n      }\n    }\n  },\n\n  queue: function( elem, type, data ) {\n    var q;\n    if ( elem ) {\n      type = ( type || \"fx\" ) + \"queue\";\n      q = jQuery._data( elem, type );\n\n      // Speed up dequeue by getting out quickly if this is just a lookup\n      if ( data ) {\n        if ( !q || jQuery.isArray(data) ) {\n          q = jQuery._data( elem, type, jQuery.makeArray(data) );\n        } else {\n          q.push( data );\n        }\n      }\n      return q || [];\n    }\n  },\n\n  dequeue: function( elem, type ) {\n    type = type || \"fx\";\n\n    var queue = jQuery.queue( elem, type ),\n      fn = queue.shift(),\n      hooks = {};\n\n    // If the fx queue is dequeued, always remove the progress sentinel\n    if ( fn === \"inprogress\" ) {\n      fn = queue.shift();\n    }\n\n    if ( fn ) {\n      // Add a progress sentinel to prevent the fx queue from being\n      // automatically dequeued\n      if ( type === \"fx\" ) {\n        queue.unshift( \"inprogress\" );\n      }\n\n      jQuery._data( elem, type + \".run\", hooks );\n      fn.call( elem, function() {\n        jQuery.dequeue( elem, type );\n      }, hooks );\n    }\n\n    if ( !queue.length ) {\n      jQuery.removeData( elem, type + \"queue \" + type + \".run\", true );\n      handleQueueMarkDefer( elem, type, \"queue\" );\n    }\n  }\n});\n\njQuery.fn.extend({\n  queue: function( type, data ) {\n    var setter = 2;\n\n    if ( typeof type !== \"string\" ) {\n      data = type;\n      type = \"fx\";\n      setter--;\n    }\n\n    if ( arguments.length < setter ) {\n      return jQuery.queue( this[0], type );\n    }\n\n    return data === undefined ?\n      this :\n      this.each(function() {\n        var queue = jQuery.queue( this, type, data );\n\n        if ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\n          jQuery.dequeue( this, type );\n        }\n      });\n  },\n  dequeue: function( type ) {\n    return this.each(function() {\n      jQuery.dequeue( this, type );\n    });\n  },\n  // Based off of the plugin by Clint Helfers, with permission.\n  // http://blindsignals.com/index.php/2009/07/jquery-delay/\n  delay: function( time, type ) {\n    time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n    type = type || \"fx\";\n\n    return this.queue( type, function( next, hooks ) {\n      var timeout = setTimeout( next, time );\n      hooks.stop = function() {\n        clearTimeout( timeout );\n      };\n    });\n  },\n  clearQueue: function( type ) {\n    return this.queue( type || \"fx\", [] );\n  },\n  // Get a promise resolved when queues of a certain type\n  // are emptied (fx is the type by default)\n  promise: function( type, object ) {\n    if ( typeof type !== \"string\" ) {\n      object = type;\n      type = undefined;\n    }\n    type = type || \"fx\";\n    var defer = jQuery.Deferred(),\n      elements = this,\n      i = elements.length,\n      count = 1,\n      deferDataKey = type + \"defer\",\n      queueDataKey = type + \"queue\",\n      markDataKey = type + \"mark\",\n      tmp;\n    function resolve() {\n      if ( !( --count ) ) {\n        defer.resolveWith( elements, [ elements ] );\n      }\n    }\n    while( i-- ) {\n      if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||\n          ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||\n            jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&\n          jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( \"once memory\" ), true ) )) {\n        count++;\n        tmp.add( resolve );\n      }\n    }\n    resolve();\n    return defer.promise( object );\n  }\n});\n\n\n\n\nvar rclass = /[\\n\\t\\r]/g,\n  rspace = /\\s+/,\n  rreturn = /\\r/g,\n  rtype = /^(?:button|input)$/i,\n  rfocusable = /^(?:button|input|object|select|textarea)$/i,\n  rclickable = /^a(?:rea)?$/i,\n  rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,\n  getSetAttribute = jQuery.support.getSetAttribute,\n  nodeHook, boolHook, fixSpecified;\n\njQuery.fn.extend({\n  attr: function( name, value ) {\n    return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );\n  },\n\n  removeAttr: function( name ) {\n    return this.each(function() {\n      jQuery.removeAttr( this, name );\n    });\n  },\n\n  prop: function( name, value ) {\n    return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );\n  },\n\n  removeProp: function( name ) {\n    name = jQuery.propFix[ name ] || name;\n    return this.each(function() {\n      // try/catch handles cases where IE balks (such as removing a property on window)\n      try {\n        this[ name ] = undefined;\n        delete this[ name ];\n      } catch( e ) {}\n    });\n  },\n\n  addClass: function( value ) {\n    var classNames, i, l, elem,\n      setClass, c, cl;\n\n    if ( jQuery.isFunction( value ) ) {\n      return this.each(function( j ) {\n        jQuery( this ).addClass( value.call(this, j, this.className) );\n      });\n    }\n\n    if ( value && typeof value === \"string\" ) {\n      classNames = value.split( rspace );\n\n      for ( i = 0, l = this.length; i < l; i++ ) {\n        elem = this[ i ];\n\n        if ( elem.nodeType === 1 ) {\n          if ( !elem.className && classNames.length === 1 ) {\n            elem.className = value;\n\n          } else {\n            setClass = \" \" + elem.className + \" \";\n\n            for ( c = 0, cl = classNames.length; c < cl; c++ ) {\n              if ( !~setClass.indexOf( \" \" + classNames[ c ] + \" \" ) ) {\n                setClass += classNames[ c ] + \" \";\n              }\n            }\n            elem.className = jQuery.trim( setClass );\n          }\n        }\n      }\n    }\n\n    return this;\n  },\n\n  removeClass: function( value ) {\n    var classNames, i, l, elem, className, c, cl;\n\n    if ( jQuery.isFunction( value ) ) {\n      return this.each(function( j ) {\n        jQuery( this ).removeClass( value.call(this, j, this.className) );\n      });\n    }\n\n    if ( (value && typeof value === \"string\") || value === undefined ) {\n      classNames = ( value || \"\" ).split( rspace );\n\n      for ( i = 0, l = this.length; i < l; i++ ) {\n        elem = this[ i ];\n\n        if ( elem.nodeType === 1 && elem.className ) {\n          if ( value ) {\n            className = (\" \" + elem.className + \" \").replace( rclass, \" \" );\n            for ( c = 0, cl = classNames.length; c < cl; c++ ) {\n              className = className.replace(\" \" + classNames[ c ] + \" \", \" \");\n            }\n            elem.className = jQuery.trim( className );\n\n          } else {\n            elem.className = \"\";\n          }\n        }\n      }\n    }\n\n    return this;\n  },\n\n  toggleClass: function( value, stateVal ) {\n    var type = typeof value,\n      isBool = typeof stateVal === \"boolean\";\n\n    if ( jQuery.isFunction( value ) ) {\n      return this.each(function( i ) {\n        jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\n      });\n    }\n\n    return this.each(function() {\n      if ( type === \"string\" ) {\n        // toggle individual class names\n        var className,\n          i = 0,\n          self = jQuery( this ),\n          state = stateVal,\n          classNames = value.split( rspace );\n\n        while ( (className = classNames[ i++ ]) ) {\n          // check each className given, space seperated list\n          state = isBool ? state : !self.hasClass( className );\n          self[ state ? \"addClass\" : \"removeClass\" ]( className );\n        }\n\n      } else if ( type === \"undefined\" || type === \"boolean\" ) {\n        if ( this.className ) {\n          // store className if set\n          jQuery._data( this, \"__className__\", this.className );\n        }\n\n        // toggle whole className\n        this.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\n      }\n    });\n  },\n\n  hasClass: function( selector ) {\n    var className = \" \" + selector + \" \",\n      i = 0,\n      l = this.length;\n    for ( ; i < l; i++ ) {\n      if ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) > -1 ) {\n        return true;\n      }\n    }\n\n    return false;\n  },\n\n  val: function( value ) {\n    var hooks, ret, isFunction,\n      elem = this[0];\n\n    if ( !arguments.length ) {\n      if ( elem ) {\n        hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n        if ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\n          return ret;\n        }\n\n        ret = elem.value;\n\n        return typeof ret === \"string\" ?\n          // handle most common string cases\n          ret.replace(rreturn, \"\") :\n          // handle cases where value is null/undef or number\n          ret == null ? \"\" : ret;\n      }\n\n      return;\n    }\n\n    isFunction = jQuery.isFunction( value );\n\n    return this.each(function( i ) {\n      var self = jQuery(this), val;\n\n      if ( this.nodeType !== 1 ) {\n        return;\n      }\n\n      if ( isFunction ) {\n        val = value.call( this, i, self.val() );\n      } else {\n        val = value;\n      }\n\n      // Treat null/undefined as \"\"; convert numbers to string\n      if ( val == null ) {\n        val = \"\";\n      } else if ( typeof val === \"number\" ) {\n        val += \"\";\n      } else if ( jQuery.isArray( val ) ) {\n        val = jQuery.map(val, function ( value ) {\n          return value == null ? \"\" : value + \"\";\n        });\n      }\n\n      hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n      // If set returns undefined, fall back to normal setting\n      if ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\n        this.value = val;\n      }\n    });\n  }\n});\n\njQuery.extend({\n  valHooks: {\n    option: {\n      get: function( elem ) {\n        // attributes.value is undefined in Blackberry 4.7 but\n        // uses .value. See #6932\n        var val = elem.attributes.value;\n        return !val || val.specified ? elem.value : elem.text;\n      }\n    },\n    select: {\n      get: function( elem ) {\n        var value, i, max, option,\n          index = elem.selectedIndex,\n          values = [],\n          options = elem.options,\n          one = elem.type === \"select-one\";\n\n        // Nothing was selected\n        if ( index < 0 ) {\n          return null;\n        }\n\n        // Loop through all the selected options\n        i = one ? index : 0;\n        max = one ? index + 1 : options.length;\n        for ( ; i < max; i++ ) {\n          option = options[ i ];\n\n          // Don't return options that are disabled or in a disabled optgroup\n          if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null) &&\n              (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" )) ) {\n\n            // Get the specific value for the option\n            value = jQuery( option ).val();\n\n            // We don't need an array for one selects\n            if ( one ) {\n              return value;\n            }\n\n            // Multi-Selects return an array\n            values.push( value );\n          }\n        }\n\n        // Fixes Bug #2551 -- select.val() broken in IE after form.reset()\n        if ( one && !values.length && options.length ) {\n          return jQuery( options[ index ] ).val();\n        }\n\n        return values;\n      },\n\n      set: function( elem, value ) {\n        var values = jQuery.makeArray( value );\n\n        jQuery(elem).find(\"option\").each(function() {\n          this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;\n        });\n\n        if ( !values.length ) {\n          elem.selectedIndex = -1;\n        }\n        return values;\n      }\n    }\n  },\n\n  attrFn: {\n    val: true,\n    css: true,\n    html: true,\n    text: true,\n    data: true,\n    width: true,\n    height: true,\n    offset: true\n  },\n\n  attr: function( elem, name, value, pass ) {\n    var ret, hooks, notxml,\n      nType = elem.nodeType;\n\n    // don't get/set attributes on text, comment and attribute nodes\n    if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n      return;\n    }\n\n    if ( pass && name in jQuery.attrFn ) {\n      return jQuery( elem )[ name ]( value );\n    }\n\n    // Fallback to prop when attributes are not supported\n    if ( typeof elem.getAttribute === \"undefined\" ) {\n      return jQuery.prop( elem, name, value );\n    }\n\n    notxml = nType !== 1 || !jQuery.isXMLDoc( elem );\n\n    // All attributes are lowercase\n    // Grab necessary hook if one is defined\n    if ( notxml ) {\n      name = name.toLowerCase();\n      hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );\n    }\n\n    if ( value !== undefined ) {\n\n      if ( value === null ) {\n        jQuery.removeAttr( elem, name );\n        return;\n\n      } else if ( hooks && \"set\" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {\n        return ret;\n\n      } else {\n        elem.setAttribute( name, \"\" + value );\n        return value;\n      }\n\n    } else if ( hooks && \"get\" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {\n      return ret;\n\n    } else {\n\n      ret = elem.getAttribute( name );\n\n      // Non-existent attributes return null, we normalize to undefined\n      return ret === null ?\n        undefined :\n        ret;\n    }\n  },\n\n  removeAttr: function( elem, value ) {\n    var propName, attrNames, name, l, isBool,\n      i = 0;\n\n    if ( value && elem.nodeType === 1 ) {\n      attrNames = value.toLowerCase().split( rspace );\n      l = attrNames.length;\n\n      for ( ; i < l; i++ ) {\n        name = attrNames[ i ];\n\n        if ( name ) {\n          propName = jQuery.propFix[ name ] || name;\n          isBool = rboolean.test( name );\n\n          // See #9699 for explanation of this approach (setting first, then removal)\n          // Do not do this for boolean attributes (see #10870)\n          if ( !isBool ) {\n            jQuery.attr( elem, name, \"\" );\n          }\n          elem.removeAttribute( getSetAttribute ? name : propName );\n\n          // Set corresponding property to false for boolean attributes\n          if ( isBool && propName in elem ) {\n            elem[ propName ] = false;\n          }\n        }\n      }\n    }\n  },\n\n  attrHooks: {\n    type: {\n      set: function( elem, value ) {\n        // We can't allow the type property to be changed (since it causes problems in IE)\n        if ( rtype.test( elem.nodeName ) && elem.parentNode ) {\n          jQuery.error( \"type property can't be changed\" );\n        } else if ( !jQuery.support.radioValue && value === \"radio\" && jQuery.nodeName(elem, \"input\") ) {\n          // Setting the type on a radio button after the value resets the value in IE6-9\n          // Reset value to it's default in case type is set after value\n          // This is for element creation\n          var val = elem.value;\n          elem.setAttribute( \"type\", value );\n          if ( val ) {\n            elem.value = val;\n          }\n          return value;\n        }\n      }\n    },\n    // Use the value property for back compat\n    // Use the nodeHook for button elements in IE6/7 (#1954)\n    value: {\n      get: function( elem, name ) {\n        if ( nodeHook && jQuery.nodeName( elem, \"button\" ) ) {\n          return nodeHook.get( elem, name );\n        }\n        return name in elem ?\n          elem.value :\n          null;\n      },\n      set: function( elem, value, name ) {\n        if ( nodeHook && jQuery.nodeName( elem, \"button\" ) ) {\n          return nodeHook.set( elem, value, name );\n        }\n        // Does not return so that setAttribute is also used\n        elem.value = value;\n      }\n    }\n  },\n\n  propFix: {\n    tabindex: \"tabIndex\",\n    readonly: \"readOnly\",\n    \"for\": \"htmlFor\",\n    \"class\": \"className\",\n    maxlength: \"maxLength\",\n    cellspacing: \"cellSpacing\",\n    cellpadding: \"cellPadding\",\n    rowspan: \"rowSpan\",\n    colspan: \"colSpan\",\n    usemap: \"useMap\",\n    frameborder: \"frameBorder\",\n    contenteditable: \"contentEditable\"\n  },\n\n  prop: function( elem, name, value ) {\n    var ret, hooks, notxml,\n      nType = elem.nodeType;\n\n    // don't get/set properties on text, comment and attribute nodes\n    if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n      return;\n    }\n\n    notxml = nType !== 1 || !jQuery.isXMLDoc( elem );\n\n    if ( notxml ) {\n      // Fix name and attach hooks\n      name = jQuery.propFix[ name ] || name;\n      hooks = jQuery.propHooks[ name ];\n    }\n\n    if ( value !== undefined ) {\n      if ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\n        return ret;\n\n      } else {\n        return ( elem[ name ] = value );\n      }\n\n    } else {\n      if ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\n        return ret;\n\n      } else {\n        return elem[ name ];\n      }\n    }\n  },\n\n  propHooks: {\n    tabIndex: {\n      get: function( elem ) {\n        // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\n        // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n        var attributeNode = elem.getAttributeNode(\"tabindex\");\n\n        return attributeNode && attributeNode.specified ?\n          parseInt( attributeNode.value, 10 ) :\n          rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\n            0 :\n            undefined;\n      }\n    }\n  }\n});\n\n// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)\njQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;\n\n// Hook for boolean attributes\nboolHook = {\n  get: function( elem, name ) {\n    // Align boolean attributes with corresponding properties\n    // Fall back to attribute presence where some booleans are not supported\n    var attrNode,\n      property = jQuery.prop( elem, name );\n    return property === true || typeof property !== \"boolean\" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?\n      name.toLowerCase() :\n      undefined;\n  },\n  set: function( elem, value, name ) {\n    var propName;\n    if ( value === false ) {\n      // Remove boolean attributes when set to false\n      jQuery.removeAttr( elem, name );\n    } else {\n      // value is true since we know at this point it's type boolean and not false\n      // Set boolean attributes to the same name and set the DOM property\n      propName = jQuery.propFix[ name ] || name;\n      if ( propName in elem ) {\n        // Only set the IDL specifically if it already exists on the element\n        elem[ propName ] = true;\n      }\n\n      elem.setAttribute( name, name.toLowerCase() );\n    }\n    return name;\n  }\n};\n\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\nif ( !getSetAttribute ) {\n\n  fixSpecified = {\n    name: true,\n    id: true,\n    coords: true\n  };\n\n  // Use this for any attribute in IE6/7\n  // This fixes almost every IE6/7 issue\n  nodeHook = jQuery.valHooks.button = {\n    get: function( elem, name ) {\n      var ret;\n      ret = elem.getAttributeNode( name );\n      return ret && ( fixSpecified[ name ] ? ret.nodeValue !== \"\" : ret.specified ) ?\n        ret.nodeValue :\n        undefined;\n    },\n    set: function( elem, value, name ) {\n      // Set the existing or create a new attribute node\n      var ret = elem.getAttributeNode( name );\n      if ( !ret ) {\n        ret = document.createAttribute( name );\n        elem.setAttributeNode( ret );\n      }\n      return ( ret.nodeValue = value + \"\" );\n    }\n  };\n\n  // Apply the nodeHook to tabindex\n  jQuery.attrHooks.tabindex.set = nodeHook.set;\n\n  // Set width and height to auto instead of 0 on empty string( Bug #8150 )\n  // This is for removals\n  jQuery.each([ \"width\", \"height\" ], function( i, name ) {\n    jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\n      set: function( elem, value ) {\n        if ( value === \"\" ) {\n          elem.setAttribute( name, \"auto\" );\n          return value;\n        }\n      }\n    });\n  });\n\n  // Set contenteditable to false on removals(#10429)\n  // Setting to empty string throws an error as an invalid value\n  jQuery.attrHooks.contenteditable = {\n    get: nodeHook.get,\n    set: function( elem, value, name ) {\n      if ( value === \"\" ) {\n        value = \"false\";\n      }\n      nodeHook.set( elem, value, name );\n    }\n  };\n}\n\n\n// Some attributes require a special call on IE\nif ( !jQuery.support.hrefNormalized ) {\n  jQuery.each([ \"href\", \"src\", \"width\", \"height\" ], function( i, name ) {\n    jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\n      get: function( elem ) {\n        var ret = elem.getAttribute( name, 2 );\n        return ret === null ? undefined : ret;\n      }\n    });\n  });\n}\n\nif ( !jQuery.support.style ) {\n  jQuery.attrHooks.style = {\n    get: function( elem ) {\n      // Return undefined in the case of empty string\n      // Normalize to lowercase since IE uppercases css property names\n      return elem.style.cssText.toLowerCase() || undefined;\n    },\n    set: function( elem, value ) {\n      return ( elem.style.cssText = \"\" + value );\n    }\n  };\n}\n\n// Safari mis-reports the default selected property of an option\n// Accessing the parent's selectedIndex property fixes it\nif ( !jQuery.support.optSelected ) {\n  jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {\n    get: function( elem ) {\n      var parent = elem.parentNode;\n\n      if ( parent ) {\n        parent.selectedIndex;\n\n        // Make sure that it also works with optgroups, see #5701\n        if ( parent.parentNode ) {\n          parent.parentNode.selectedIndex;\n        }\n      }\n      return null;\n    }\n  });\n}\n\n// IE6/7 call enctype encoding\nif ( !jQuery.support.enctype ) {\n  jQuery.propFix.enctype = \"encoding\";\n}\n\n// Radios and checkboxes getter/setter\nif ( !jQuery.support.checkOn ) {\n  jQuery.each([ \"radio\", \"checkbox\" ], function() {\n    jQuery.valHooks[ this ] = {\n      get: function( elem ) {\n        // Handle the case where in Webkit \"\" is returned instead of \"on\" if a value isn't specified\n        return elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\n      }\n    };\n  });\n}\njQuery.each([ \"radio\", \"checkbox\" ], function() {\n  jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {\n    set: function( elem, value ) {\n      if ( jQuery.isArray( value ) ) {\n        return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\n      }\n    }\n  });\n});\n\n\n\n\nvar rformElems = /^(?:textarea|input|select)$/i,\n  rtypenamespace = /^([^\\.]*)?(?:\\.(.+))?$/,\n  rhoverHack = /(?:^|\\s)hover(\\.\\S+)?\\b/,\n  rkeyEvent = /^key/,\n  rmouseEvent = /^(?:mouse|contextmenu)|click/,\n  rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n  rquickIs = /^(\\w*)(?:#([\\w\\-]+))?(?:\\.([\\w\\-]+))?$/,\n  quickParse = function( selector ) {\n    var quick = rquickIs.exec( selector );\n    if ( quick ) {\n      //   0  1    2   3\n      // [ _, tag, id, class ]\n      quick[1] = ( quick[1] || \"\" ).toLowerCase();\n      quick[3] = quick[3] && new RegExp( \"(?:^|\\\\s)\" + quick[3] + \"(?:\\\\s|$)\" );\n    }\n    return quick;\n  },\n  quickIs = function( elem, m ) {\n    var attrs = elem.attributes || {};\n    return (\n      (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&\n      (!m[2] || (attrs.id || {}).value === m[2]) &&\n      (!m[3] || m[3].test( (attrs[ \"class\" ] || {}).value ))\n    );\n  },\n  hoverHack = function( events ) {\n    return jQuery.event.special.hover ? events : events.replace( rhoverHack, \"mouseenter$1 mouseleave$1\" );\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  add: function( elem, types, handler, data, selector ) {\n\n    var elemData, eventHandle, events,\n      t, tns, type, namespaces, handleObj,\n      handleObjIn, quick, handlers, special;\n\n    // Don't attach events to noData or text/comment nodes (allow plain objects tho)\n    if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {\n      return;\n    }\n\n    // Caller can pass in an object of custom data in lieu of the handler\n    if ( handler.handler ) {\n      handleObjIn = handler;\n      handler = handleObjIn.handler;\n      selector = handleObjIn.selector;\n    }\n\n    // Make sure that the handler has a unique ID, used to find/remove it later\n    if ( !handler.guid ) {\n      handler.guid = jQuery.guid++;\n    }\n\n    // Init the element's event structure and main handler, if this is the first\n    events = elemData.events;\n    if ( !events ) {\n      elemData.events = events = {};\n    }\n    eventHandle = elemData.handle;\n    if ( !eventHandle ) {\n      elemData.handle = eventHandle = function( e ) {\n        // Discard the second event of a jQuery.event.trigger() and\n        // when an event is called after a page has unloaded\n        return typeof jQuery !== \"undefined\" && (!e || jQuery.event.triggered !== e.type) ?\n          jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n          undefined;\n      };\n      // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events\n      eventHandle.elem = elem;\n    }\n\n    // Handle multiple events separated by a space\n    // jQuery(...).bind(\"mouseover mouseout\", fn);\n    types = jQuery.trim( hoverHack(types) ).split( \" \" );\n    for ( t = 0; t < types.length; t++ ) {\n\n      tns = rtypenamespace.exec( types[t] ) || [];\n      type = tns[1];\n      namespaces = ( tns[2] || \"\" ).split( \".\" ).sort();\n\n      // If event changes its type, use the special event handlers for the changed type\n      special = jQuery.event.special[ type ] || {};\n\n      // If selector defined, determine special event api type, otherwise given type\n      type = ( selector ? special.delegateType : special.bindType ) || type;\n\n      // Update special based on newly reset type\n      special = jQuery.event.special[ type ] || {};\n\n      // handleObj is passed to all event handlers\n      handleObj = jQuery.extend({\n        type: type,\n        origType: tns[1],\n        data: data,\n        handler: handler,\n        guid: handler.guid,\n        selector: selector,\n        quick: selector && quickParse( selector ),\n        namespace: namespaces.join(\".\")\n      }, handleObjIn );\n\n      // Init the event handler queue if we're the first\n      handlers = events[ type ];\n      if ( !handlers ) {\n        handlers = events[ type ] = [];\n        handlers.delegateCount = 0;\n\n        // Only use addEventListener/attachEvent if the special events handler returns false\n        if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n          // Bind the global event handler to the element\n          if ( elem.addEventListener ) {\n            elem.addEventListener( type, eventHandle, false );\n\n          } else if ( elem.attachEvent ) {\n            elem.attachEvent( \"on\" + type, eventHandle );\n          }\n        }\n      }\n\n      if ( special.add ) {\n        special.add.call( elem, handleObj );\n\n        if ( !handleObj.handler.guid ) {\n          handleObj.handler.guid = handler.guid;\n        }\n      }\n\n      // Add to the element's handler list, delegates in front\n      if ( selector ) {\n        handlers.splice( handlers.delegateCount++, 0, handleObj );\n      } else {\n        handlers.push( handleObj );\n      }\n\n      // Keep track of which events have ever been used, for event optimization\n      jQuery.event.global[ type ] = true;\n    }\n\n    // Nullify elem to prevent memory leaks in IE\n    elem = null;\n  },\n\n  global: {},\n\n  // Detach an event or set of events from an element\n  remove: function( elem, types, handler, selector, mappedTypes ) {\n\n    var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),\n      t, tns, type, origType, namespaces, origCount,\n      j, events, special, handle, eventType, handleObj;\n\n    if ( !elemData || !(events = elemData.events) ) {\n      return;\n    }\n\n    // Once for each type.namespace in types; type may be omitted\n    types = jQuery.trim( hoverHack( types || \"\" ) ).split(\" \");\n    for ( t = 0; t < types.length; t++ ) {\n      tns = rtypenamespace.exec( types[t] ) || [];\n      type = origType = tns[1];\n      namespaces = tns[2];\n\n      // Unbind all events (on this namespace, if provided) for the element\n      if ( !type ) {\n        for ( type in events ) {\n          jQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n        }\n        continue;\n      }\n\n      special = jQuery.event.special[ type ] || {};\n      type = ( selector? special.delegateType : special.bindType ) || type;\n      eventType = events[ type ] || [];\n      origCount = eventType.length;\n      namespaces = namespaces ? new RegExp(\"(^|\\\\.)\" + namespaces.split(\".\").sort().join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\") : null;\n\n      // Remove matching events\n      for ( j = 0; j < eventType.length; j++ ) {\n        handleObj = eventType[ j ];\n\n        if ( ( mappedTypes || origType === handleObj.origType ) &&\n           ( !handler || handler.guid === handleObj.guid ) &&\n           ( !namespaces || namespaces.test( handleObj.namespace ) ) &&\n           ( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\n          eventType.splice( j--, 1 );\n\n          if ( handleObj.selector ) {\n            eventType.delegateCount--;\n          }\n          if ( special.remove ) {\n            special.remove.call( elem, handleObj );\n          }\n        }\n      }\n\n      // Remove generic event handler if we removed something and no more handlers exist\n      // (avoids potential for endless recursion during removal of special event handlers)\n      if ( eventType.length === 0 && origCount !== eventType.length ) {\n        if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {\n          jQuery.removeEvent( elem, type, elemData.handle );\n        }\n\n        delete events[ type ];\n      }\n    }\n\n    // Remove the expando if it's no longer used\n    if ( jQuery.isEmptyObject( events ) ) {\n      handle = elemData.handle;\n      if ( handle ) {\n        handle.elem = null;\n      }\n\n      // removeData also checks for emptiness and clears the expando if empty\n      // so use it instead of delete\n      jQuery.removeData( elem, [ \"events\", \"handle\" ], true );\n    }\n  },\n\n  // Events that are safe to short-circuit if no handlers are attached.\n  // Native DOM events should not be added, they may have inline handlers.\n  customEvent: {\n    \"getData\": true,\n    \"setData\": true,\n    \"changeData\": true\n  },\n\n  trigger: function( event, data, elem, onlyHandlers ) {\n    // Don't do events on text and comment nodes\n    if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {\n      return;\n    }\n\n    // Event object or event type\n    var type = event.type || event,\n      namespaces = [],\n      cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;\n\n    // focus/blur morphs to focusin/out; ensure we're not firing them right now\n    if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n      return;\n    }\n\n    if ( type.indexOf( \"!\" ) >= 0 ) {\n      // Exclusive events trigger only for the exact event (no namespaces)\n      type = type.slice(0, -1);\n      exclusive = true;\n    }\n\n    if ( type.indexOf( \".\" ) >= 0 ) {\n      // Namespaced trigger; create a regexp to match event type in handle()\n      namespaces = type.split(\".\");\n      type = namespaces.shift();\n      namespaces.sort();\n    }\n\n    if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {\n      // No jQuery handlers for this event type, and it can't have inline handlers\n      return;\n    }\n\n    // Caller can pass in an Event, Object, or just an event type string\n    event = typeof event === \"object\" ?\n      // jQuery.Event object\n      event[ jQuery.expando ] ? event :\n      // Object literal\n      new jQuery.Event( type, event ) :\n      // Just the event type (string)\n      new jQuery.Event( type );\n\n    event.type = type;\n    event.isTrigger = true;\n    event.exclusive = exclusive;\n    event.namespace = namespaces.join( \".\" );\n    event.namespace_re = event.namespace? new RegExp(\"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.)?\") + \"(\\\\.|$)\") : null;\n    ontype = type.indexOf( \":\" ) < 0 ? \"on\" + type : \"\";\n\n    // Handle a global trigger\n    if ( !elem ) {\n\n      // TODO: Stop taunting the data cache; remove global events and always attach to document\n      cache = jQuery.cache;\n      for ( i in cache ) {\n        if ( cache[ i ].events && cache[ i ].events[ type ] ) {\n          jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );\n        }\n      }\n      return;\n    }\n\n    // Clean up the event in case it is being reused\n    event.result = undefined;\n    if ( !event.target ) {\n      event.target = elem;\n    }\n\n    // Clone any incoming data and prepend the event, creating the handler arg list\n    data = data != null ? jQuery.makeArray( data ) : [];\n    data.unshift( event );\n\n    // Allow special events to draw outside the lines\n    special = jQuery.event.special[ type ] || {};\n    if ( special.trigger && special.trigger.apply( elem, data ) === false ) {\n      return;\n    }\n\n    // Determine event propagation path in advance, per W3C events spec (#9951)\n    // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n    eventPath = [[ elem, special.bindType || type ]];\n    if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n      bubbleType = special.delegateType || type;\n      cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;\n      old = null;\n      for ( ; cur; cur = cur.parentNode ) {\n        eventPath.push([ cur, bubbleType ]);\n        old = cur;\n      }\n\n      // Only add window if we got to document (e.g., not plain obj or detached DOM)\n      if ( old && old === elem.ownerDocument ) {\n        eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);\n      }\n    }\n\n    // Fire handlers on the event path\n    for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {\n\n      cur = eventPath[i][0];\n      event.type = eventPath[i][1];\n\n      handle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] && jQuery._data( cur, \"handle\" );\n      if ( handle ) {\n        handle.apply( cur, data );\n      }\n      // Note that this is a bare JS function and not a jQuery handler\n      handle = ontype && cur[ ontype ];\n      if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {\n        event.preventDefault();\n      }\n    }\n    event.type = type;\n\n    // If nobody prevented the default action, do it now\n    if ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n      if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&\n        !(type === \"click\" && jQuery.nodeName( elem, \"a\" )) && jQuery.acceptData( elem ) ) {\n\n        // Call a native DOM method on the target with the same name name as the event.\n        // Can't use an .isFunction() check here because IE6/7 fails that test.\n        // Don't do default actions on window, that's where global variables be (#6170)\n        // IE<9 dies on focus/blur to hidden element (#1486)\n        if ( ontype && elem[ type ] && ((type !== \"focus\" && type !== \"blur\") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {\n\n          // Don't re-trigger an onFOO event when we call its FOO() method\n          old = elem[ ontype ];\n\n          if ( old ) {\n            elem[ ontype ] = null;\n          }\n\n          // Prevent re-triggering of the same event, since we already bubbled it above\n          jQuery.event.triggered = type;\n          elem[ type ]();\n          jQuery.event.triggered = undefined;\n\n          if ( old ) {\n            elem[ ontype ] = old;\n          }\n        }\n      }\n    }\n\n    return event.result;\n  },\n\n  dispatch: function( event ) {\n\n    // Make a writable jQuery.Event from the native event object\n    event = jQuery.event.fix( event || window.event );\n\n    var handlers = ( (jQuery._data( this, \"events\" ) || {} )[ event.type ] || []),\n      delegateCount = handlers.delegateCount,\n      args = [].slice.call( arguments, 0 ),\n      run_all = !event.exclusive && !event.namespace,\n      special = jQuery.event.special[ event.type ] || {},\n      handlerQueue = [],\n      i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;\n\n    // Use the fix-ed jQuery.Event rather than the (read-only) native event\n    args[0] = event;\n    event.delegateTarget = this;\n\n    // Call the preDispatch hook for the mapped type, and let it bail if desired\n    if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n      return;\n    }\n\n    // Determine handlers that should run if there are delegated events\n    // Avoid non-left-click bubbling in Firefox (#3861)\n    if ( delegateCount && !(event.button && event.type === \"click\") ) {\n\n      // Pregenerate a single jQuery object for reuse with .is()\n      jqcur = jQuery(this);\n      jqcur.context = this.ownerDocument || this;\n\n      for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {\n\n        // Don't process events on disabled elements (#6911, #8165)\n        if ( cur.disabled !== true ) {\n          selMatch = {};\n          matches = [];\n          jqcur[0] = cur;\n          for ( i = 0; i < delegateCount; i++ ) {\n            handleObj = handlers[ i ];\n            sel = handleObj.selector;\n\n            if ( selMatch[ sel ] === undefined ) {\n              selMatch[ sel ] = (\n                handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )\n              );\n            }\n            if ( selMatch[ sel ] ) {\n              matches.push( handleObj );\n            }\n          }\n          if ( matches.length ) {\n            handlerQueue.push({ elem: cur, matches: matches });\n          }\n        }\n      }\n    }\n\n    // Add the remaining (directly-bound) handlers\n    if ( handlers.length > delegateCount ) {\n      handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });\n    }\n\n    // Run delegates first; they may want to stop propagation beneath us\n    for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {\n      matched = handlerQueue[ i ];\n      event.currentTarget = matched.elem;\n\n      for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {\n        handleObj = matched.matches[ j ];\n\n        // Triggered event must either 1) be non-exclusive and have no namespace, or\n        // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).\n        if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {\n\n          event.data = handleObj.data;\n          event.handleObj = handleObj;\n\n          ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )\n              .apply( matched.elem, args );\n\n          if ( ret !== undefined ) {\n            event.result = ret;\n            if ( ret === false ) {\n              event.preventDefault();\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n    }\n\n    // Call the postDispatch hook for the mapped type\n    if ( special.postDispatch ) {\n      special.postDispatch.call( this, event );\n    }\n\n    return event.result;\n  },\n\n  // Includes some event props shared by KeyEvent and MouseEvent\n  // *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***\n  props: \"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\n\n  fixHooks: {},\n\n  keyHooks: {\n    props: \"char charCode key keyCode\".split(\" \"),\n    filter: function( event, original ) {\n\n      // Add which for key events\n      if ( event.which == null ) {\n        event.which = original.charCode != null ? original.charCode : original.keyCode;\n      }\n\n      return event;\n    }\n  },\n\n  mouseHooks: {\n    props: \"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\n    filter: function( event, original ) {\n      var eventDoc, doc, body,\n        button = original.button,\n        fromElement = original.fromElement;\n\n      // Calculate pageX/Y if missing and clientX/Y available\n      if ( event.pageX == null && original.clientX != null ) {\n        eventDoc = event.target.ownerDocument || document;\n        doc = eventDoc.documentElement;\n        body = eventDoc.body;\n\n        event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\n        event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );\n      }\n\n      // Add relatedTarget, if necessary\n      if ( !event.relatedTarget && fromElement ) {\n        event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\n      }\n\n      // Add which for click: 1 === left; 2 === middle; 3 === right\n      // Note: button is not normalized, so don't use it\n      if ( !event.which && button !== undefined ) {\n        event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n      }\n\n      return event;\n    }\n  },\n\n  fix: function( event ) {\n    if ( event[ jQuery.expando ] ) {\n      return event;\n    }\n\n    // Create a writable copy of the event object and normalize some properties\n    var i, prop,\n      originalEvent = event,\n      fixHook = jQuery.event.fixHooks[ event.type ] || {},\n      copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n    event = jQuery.Event( originalEvent );\n\n    for ( i = copy.length; i; ) {\n      prop = copy[ --i ];\n      event[ prop ] = originalEvent[ prop ];\n    }\n\n    // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)\n    if ( !event.target ) {\n      event.target = originalEvent.srcElement || document;\n    }\n\n    // Target should not be a text node (#504, Safari)\n    if ( event.target.nodeType === 3 ) {\n      event.target = event.target.parentNode;\n    }\n\n    // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)\n    if ( event.metaKey === undefined ) {\n      event.metaKey = event.ctrlKey;\n    }\n\n    return fixHook.filter? fixHook.filter( event, originalEvent ) : event;\n  },\n\n  special: {\n    ready: {\n      // Make sure the ready event is setup\n      setup: jQuery.bindReady\n    },\n\n    load: {\n      // Prevent triggered image.load events from bubbling to window.load\n      noBubble: true\n    },\n\n    focus: {\n      delegateType: \"focusin\"\n    },\n    blur: {\n      delegateType: \"focusout\"\n    },\n\n    beforeunload: {\n      setup: function( data, namespaces, eventHandle ) {\n        // We only want to do this special case on windows\n        if ( jQuery.isWindow( this ) ) {\n          this.onbeforeunload = eventHandle;\n        }\n      },\n\n      teardown: function( namespaces, eventHandle ) {\n        if ( this.onbeforeunload === eventHandle ) {\n          this.onbeforeunload = null;\n        }\n      }\n    }\n  },\n\n  simulate: function( type, elem, event, bubble ) {\n    // Piggyback on a donor event to simulate a different one.\n    // Fake originalEvent to avoid donor's stopPropagation, but if the\n    // simulated event prevents default then we do the same on the donor.\n    var e = jQuery.extend(\n      new jQuery.Event(),\n      event,\n      { type: type,\n        isSimulated: true,\n        originalEvent: {}\n      }\n    );\n    if ( bubble ) {\n      jQuery.event.trigger( e, null, elem );\n    } else {\n      jQuery.event.dispatch.call( elem, e );\n    }\n    if ( e.isDefaultPrevented() ) {\n      event.preventDefault();\n    }\n  }\n};\n\n// Some plugins are using, but it's undocumented/deprecated and will be removed.\n// The 1.7 special event interface should provide all the hooks needed now.\njQuery.event.handle = jQuery.event.dispatch;\n\njQuery.removeEvent = document.removeEventListener ?\n  function( elem, type, handle ) {\n    if ( elem.removeEventListener ) {\n      elem.removeEventListener( type, handle, false );\n    }\n  } :\n  function( elem, type, handle ) {\n    if ( elem.detachEvent ) {\n      elem.detachEvent( \"on\" + type, handle );\n    }\n  };\n\njQuery.Event = function( src, props ) {\n  // Allow instantiation without the 'new' keyword\n  if ( !(this instanceof jQuery.Event) ) {\n    return new jQuery.Event( src, props );\n  }\n\n  // Event object\n  if ( src && src.type ) {\n    this.originalEvent = src;\n    this.type = src.type;\n\n    // Events bubbling up the document may have been marked as prevented\n    // by a handler lower down the tree; reflect the correct value.\n    this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||\n      src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;\n\n  // Event type\n  } else {\n    this.type = src;\n  }\n\n  // Put explicitly provided properties onto the event object\n  if ( props ) {\n    jQuery.extend( this, props );\n  }\n\n  // Create a timestamp if incoming event doesn't have one\n  this.timeStamp = src && src.timeStamp || jQuery.now();\n\n  // Mark it as fixed\n  this[ jQuery.expando ] = true;\n};\n\nfunction returnFalse() {\n  return false;\n}\nfunction returnTrue() {\n  return true;\n}\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n  preventDefault: function() {\n    this.isDefaultPrevented = returnTrue;\n\n    var e = this.originalEvent;\n    if ( !e ) {\n      return;\n    }\n\n    // if preventDefault exists run it on the original event\n    if ( e.preventDefault ) {\n      e.preventDefault();\n\n    // otherwise set the returnValue property of the original event to false (IE)\n    } else {\n      e.returnValue = false;\n    }\n  },\n  stopPropagation: function() {\n    this.isPropagationStopped = returnTrue;\n\n    var e = this.originalEvent;\n    if ( !e ) {\n      return;\n    }\n    // if stopPropagation exists run it on the original event\n    if ( e.stopPropagation ) {\n      e.stopPropagation();\n    }\n    // otherwise set the cancelBubble property of the original event to true (IE)\n    e.cancelBubble = true;\n  },\n  stopImmediatePropagation: function() {\n    this.isImmediatePropagationStopped = returnTrue;\n    this.stopPropagation();\n  },\n  isDefaultPrevented: returnFalse,\n  isPropagationStopped: returnFalse,\n  isImmediatePropagationStopped: returnFalse\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\njQuery.each({\n  mouseenter: \"mouseover\",\n  mouseleave: \"mouseout\"\n}, function( orig, fix ) {\n  jQuery.event.special[ orig ] = {\n    delegateType: fix,\n    bindType: fix,\n\n    handle: function( event ) {\n      var target = this,\n        related = event.relatedTarget,\n        handleObj = event.handleObj,\n        selector = handleObj.selector,\n        ret;\n\n      // For mousenter/leave call the handler if related is outside the target.\n      // NB: No relatedTarget if the mouse left/entered the browser window\n      if ( !related || (related !== target && !jQuery.contains( target, related )) ) {\n        event.type = handleObj.origType;\n        ret = handleObj.handler.apply( this, arguments );\n        event.type = fix;\n      }\n      return ret;\n    }\n  };\n});\n\n// IE submit delegation\nif ( !jQuery.support.submitBubbles ) {\n\n  jQuery.event.special.submit = {\n    setup: function() {\n      // Only need this for delegated form submit events\n      if ( jQuery.nodeName( this, \"form\" ) ) {\n        return false;\n      }\n\n      // Lazy-add a submit handler when a descendant form may potentially be submitted\n      jQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n        // Node name check avoids a VML-related crash in IE (#9807)\n        var elem = e.target,\n          form = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ? elem.form : undefined;\n        if ( form && !form._submit_attached ) {\n          jQuery.event.add( form, \"submit._submit\", function( event ) {\n            event._submit_bubble = true;\n          });\n          form._submit_attached = true;\n        }\n      });\n      // return undefined since we don't need an event listener\n    },\n\n    postDispatch: function( event ) {\n      // If form was submitted by the user, bubble the event up the tree\n      if ( event._submit_bubble ) {\n        delete event._submit_bubble;\n        if ( this.parentNode && !event.isTrigger ) {\n          jQuery.event.simulate( \"submit\", this.parentNode, event, true );\n        }\n      }\n    },\n\n    teardown: function() {\n      // Only need this for delegated form submit events\n      if ( jQuery.nodeName( this, \"form\" ) ) {\n        return false;\n      }\n\n      // Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n      jQuery.event.remove( this, \"._submit\" );\n    }\n  };\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !jQuery.support.changeBubbles ) {\n\n  jQuery.event.special.change = {\n\n    setup: function() {\n\n      if ( rformElems.test( this.nodeName ) ) {\n        // IE doesn't fire change on a check/radio until blur; trigger it on click\n        // after a propertychange. Eat the blur-change in special.change.handle.\n        // This still fires onchange a second time for check/radio after blur.\n        if ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n          jQuery.event.add( this, \"propertychange._change\", function( event ) {\n            if ( event.originalEvent.propertyName === \"checked\" ) {\n              this._just_changed = true;\n            }\n          });\n          jQuery.event.add( this, \"click._change\", function( event ) {\n            if ( this._just_changed && !event.isTrigger ) {\n              this._just_changed = false;\n              jQuery.event.simulate( \"change\", this, event, true );\n            }\n          });\n        }\n        return false;\n      }\n      // Delegated event; lazy-add a change handler on descendant inputs\n      jQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n        var elem = e.target;\n\n        if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {\n          jQuery.event.add( elem, \"change._change\", function( event ) {\n            if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n              jQuery.event.simulate( \"change\", this.parentNode, event, true );\n            }\n          });\n          elem._change_attached = true;\n        }\n      });\n    },\n\n    handle: function( event ) {\n      var elem = event.target;\n\n      // Swallow native change events from checkbox/radio, we already triggered them above\n      if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== \"radio\" && elem.type !== \"checkbox\") ) {\n        return event.handleObj.handler.apply( this, arguments );\n      }\n    },\n\n    teardown: function() {\n      jQuery.event.remove( this, \"._change\" );\n\n      return rformElems.test( this.nodeName );\n    }\n  };\n}\n\n// Create \"bubbling\" focus and blur events\nif ( !jQuery.support.focusinBubbles ) {\n  jQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n    // Attach a single capturing handler while someone wants focusin/focusout\n    var attaches = 0,\n      handler = function( event ) {\n        jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\n      };\n\n    jQuery.event.special[ fix ] = {\n      setup: function() {\n        if ( attaches++ === 0 ) {\n          document.addEventListener( orig, handler, true );\n        }\n      },\n      teardown: function() {\n        if ( --attaches === 0 ) {\n          document.removeEventListener( orig, handler, true );\n        }\n      }\n    };\n  });\n}\n\njQuery.fn.extend({\n\n  on: function( types, selector, data, fn, /*INTERNAL*/ one ) {\n    var origFn, type;\n\n    // Types can be a map of types/handlers\n    if ( typeof types === \"object\" ) {\n      // ( types-Object, selector, data )\n      if ( typeof selector !== \"string\" ) { // && selector != null\n        // ( types-Object, data )\n        data = data || selector;\n        selector = undefined;\n      }\n      for ( type in types ) {\n        this.on( type, selector, data, types[ type ], one );\n      }\n      return this;\n    }\n\n    if ( data == null && fn == null ) {\n      // ( types, fn )\n      fn = selector;\n      data = selector = undefined;\n    } else if ( fn == null ) {\n      if ( typeof selector === \"string\" ) {\n        // ( types, selector, fn )\n        fn = data;\n        data = undefined;\n      } else {\n        // ( types, data, fn )\n        fn = data;\n        data = selector;\n        selector = undefined;\n      }\n    }\n    if ( fn === false ) {\n      fn = returnFalse;\n    } else if ( !fn ) {\n      return this;\n    }\n\n    if ( one === 1 ) {\n      origFn = fn;\n      fn = function( event ) {\n        // Can use an empty set, since event contains the info\n        jQuery().off( event );\n        return origFn.apply( this, arguments );\n      };\n      // Use same guid so caller can remove using origFn\n      fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n    }\n    return this.each( function() {\n      jQuery.event.add( this, types, fn, data, selector );\n    });\n  },\n  one: function( types, selector, data, fn ) {\n    return this.on( types, selector, data, fn, 1 );\n  },\n  off: function( types, selector, fn ) {\n    if ( types && types.preventDefault && types.handleObj ) {\n      // ( event )  dispatched jQuery.Event\n      var handleObj = types.handleObj;\n      jQuery( types.delegateTarget ).off(\n        handleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType,\n        handleObj.selector,\n        handleObj.handler\n      );\n      return this;\n    }\n    if ( typeof types === \"object\" ) {\n      // ( types-object [, selector] )\n      for ( var type in types ) {\n        this.off( type, selector, types[ type ] );\n      }\n      return this;\n    }\n    if ( selector === false || typeof selector === \"function\" ) {\n      // ( types [, fn] )\n      fn = selector;\n      selector = undefined;\n    }\n    if ( fn === false ) {\n      fn = returnFalse;\n    }\n    return this.each(function() {\n      jQuery.event.remove( this, types, fn, selector );\n    });\n  },\n\n  bind: function( types, data, fn ) {\n    return this.on( types, null, data, fn );\n  },\n  unbind: function( types, fn ) {\n    return this.off( types, null, fn );\n  },\n\n  live: function( types, data, fn ) {\n    jQuery( this.context ).on( types, this.selector, data, fn );\n    return this;\n  },\n  die: function( types, fn ) {\n    jQuery( this.context ).off( types, this.selector || \"**\", fn );\n    return this;\n  },\n\n  delegate: function( selector, types, data, fn ) {\n    return this.on( types, selector, data, fn );\n  },\n  undelegate: function( selector, types, fn ) {\n    // ( namespace ) or ( selector, types [, fn] )\n    return arguments.length == 1? this.off( selector, \"**\" ) : this.off( types, selector, fn );\n  },\n\n  trigger: function( type, data ) {\n    return this.each(function() {\n      jQuery.event.trigger( type, data, this );\n    });\n  },\n  triggerHandler: function( type, data ) {\n    if ( this[0] ) {\n      return jQuery.event.trigger( type, data, this[0], true );\n    }\n  },\n\n  toggle: function( fn ) {\n    // Save reference to arguments for access in closure\n    var args = arguments,\n      guid = fn.guid || jQuery.guid++,\n      i = 0,\n      toggler = function( event ) {\n        // Figure out which function to execute\n        var lastToggle = ( jQuery._data( this, \"lastToggle\" + fn.guid ) || 0 ) % i;\n        jQuery._data( this, \"lastToggle\" + fn.guid, lastToggle + 1 );\n\n        // Make sure that clicks stop\n        event.preventDefault();\n\n        // and execute the function\n        return args[ lastToggle ].apply( this, arguments ) || false;\n      };\n\n    // link all the functions, so any of them can unbind this click handler\n    toggler.guid = guid;\n    while ( i < args.length ) {\n      args[ i++ ].guid = guid;\n    }\n\n    return this.click( toggler );\n  },\n\n  hover: function( fnOver, fnOut ) {\n    return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n  }\n});\n\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\n  \"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n  \"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\n\n  // Handle event binding\n  jQuery.fn[ name ] = function( data, fn ) {\n    if ( fn == null ) {\n      fn = data;\n      data = null;\n    }\n\n    return arguments.length > 0 ?\n      this.on( name, null, data, fn ) :\n      this.trigger( name );\n  };\n\n  if ( jQuery.attrFn ) {\n    jQuery.attrFn[ name ] = true;\n  }\n\n  if ( rkeyEvent.test( name ) ) {\n    jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;\n  }\n\n  if ( rmouseEvent.test( name ) ) {\n    jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;\n  }\n});\n\n\n\n/*!\n * Sizzle CSS Selector Engine\n *  Copyright 2011, The Dojo Foundation\n *  Released under the MIT, BSD, and GPL Licenses.\n *  More information: http://sizzlejs.com/\n */\n(function(){\n\nvar chunker = /((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^\\[\\]]*\\]|['\"][^'\"]*['\"]|[^\\[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,\n  expando = \"sizcache\" + (Math.random() + '').replace('.', ''),\n  done = 0,\n  toString = Object.prototype.toString,\n  hasDuplicate = false,\n  baseHasDuplicate = true,\n  rBackslash = /\\\\/g,\n  rReturn = /\\r\\n/g,\n  rNonWord = /\\W/;\n\n// Here we check if the JavaScript engine is using some sort of\n// optimization where it does not always call our comparision\n// function. If that is the case, discard the hasDuplicate value.\n//   Thus far that includes Google Chrome.\n[0, 0].sort(function() {\n  baseHasDuplicate = false;\n  return 0;\n});\n\nvar Sizzle = function( selector, context, results, seed ) {\n  results = results || [];\n  context = context || document;\n\n  var origContext = context;\n\n  if ( context.nodeType !== 1 && context.nodeType !== 9 ) {\n    return [];\n  }\n\n  if ( !selector || typeof selector !== \"string\" ) {\n    return results;\n  }\n\n  var m, set, checkSet, extra, ret, cur, pop, i,\n    prune = true,\n    contextXML = Sizzle.isXML( context ),\n    parts = [],\n    soFar = selector;\n\n  // Reset the position of the chunker regexp (start from head)\n  do {\n    chunker.exec( \"\" );\n    m = chunker.exec( soFar );\n\n    if ( m ) {\n      soFar = m[3];\n\n      parts.push( m[1] );\n\n      if ( m[2] ) {\n        extra = m[3];\n        break;\n      }\n    }\n  } while ( m );\n\n  if ( parts.length > 1 && origPOS.exec( selector ) ) {\n\n    if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {\n      set = posProcess( parts[0] + parts[1], context, seed );\n\n    } else {\n      set = Expr.relative[ parts[0] ] ?\n        [ context ] :\n        Sizzle( parts.shift(), context );\n\n      while ( parts.length ) {\n        selector = parts.shift();\n\n        if ( Expr.relative[ selector ] ) {\n          selector += parts.shift();\n        }\n\n        set = posProcess( selector, set, seed );\n      }\n    }\n\n  } else {\n    // Take a shortcut and set the context if the root selector is an ID\n    // (but not if it'll be faster if the inner selector is an ID)\n    if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&\n        Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {\n\n      ret = Sizzle.find( parts.shift(), context, contextXML );\n      context = ret.expr ?\n        Sizzle.filter( ret.expr, ret.set )[0] :\n        ret.set[0];\n    }\n\n    if ( context ) {\n      ret = seed ?\n        { expr: parts.pop(), set: makeArray(seed) } :\n        Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === \"~\" || parts[0] === \"+\") && context.parentNode ? context.parentNode : context, contextXML );\n\n      set = ret.expr ?\n        Sizzle.filter( ret.expr, ret.set ) :\n        ret.set;\n\n      if ( parts.length > 0 ) {\n        checkSet = makeArray( set );\n\n      } else {\n        prune = false;\n      }\n\n      while ( parts.length ) {\n        cur = parts.pop();\n        pop = cur;\n\n        if ( !Expr.relative[ cur ] ) {\n          cur = \"\";\n        } else {\n          pop = parts.pop();\n        }\n\n        if ( pop == null ) {\n          pop = context;\n        }\n\n        Expr.relative[ cur ]( checkSet, pop, contextXML );\n      }\n\n    } else {\n      checkSet = parts = [];\n    }\n  }\n\n  if ( !checkSet ) {\n    checkSet = set;\n  }\n\n  if ( !checkSet ) {\n    Sizzle.error( cur || selector );\n  }\n\n  if ( toString.call(checkSet) === \"[object Array]\" ) {\n    if ( !prune ) {\n      results.push.apply( results, checkSet );\n\n    } else if ( context && context.nodeType === 1 ) {\n      for ( i = 0; checkSet[i] != null; i++ ) {\n        if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {\n          results.push( set[i] );\n        }\n      }\n\n    } else {\n      for ( i = 0; checkSet[i] != null; i++ ) {\n        if ( checkSet[i] && checkSet[i].nodeType === 1 ) {\n          results.push( set[i] );\n        }\n      }\n    }\n\n  } else {\n    makeArray( checkSet, results );\n  }\n\n  if ( extra ) {\n    Sizzle( extra, origContext, results, seed );\n    Sizzle.uniqueSort( results );\n  }\n\n  return results;\n};\n\nSizzle.uniqueSort = function( results ) {\n  if ( sortOrder ) {\n    hasDuplicate = baseHasDuplicate;\n    results.sort( sortOrder );\n\n    if ( hasDuplicate ) {\n      for ( var i = 1; i < results.length; i++ ) {\n        if ( results[i] === results[ i - 1 ] ) {\n          results.splice( i--, 1 );\n        }\n      }\n    }\n  }\n\n  return results;\n};\n\nSizzle.matches = function( expr, set ) {\n  return Sizzle( expr, null, null, set );\n};\n\nSizzle.matchesSelector = function( node, expr ) {\n  return Sizzle( expr, null, null, [node] ).length > 0;\n};\n\nSizzle.find = function( expr, context, isXML ) {\n  var set, i, len, match, type, left;\n\n  if ( !expr ) {\n    return [];\n  }\n\n  for ( i = 0, len = Expr.order.length; i < len; i++ ) {\n    type = Expr.order[i];\n\n    if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {\n      left = match[1];\n      match.splice( 1, 1 );\n\n      if ( left.substr( left.length - 1 ) !== \"\\\\\" ) {\n        match[1] = (match[1] || \"\").replace( rBackslash, \"\" );\n        set = Expr.find[ type ]( match, context, isXML );\n\n        if ( set != null ) {\n          expr = expr.replace( Expr.match[ type ], \"\" );\n          break;\n        }\n      }\n    }\n  }\n\n  if ( !set ) {\n    set = typeof context.getElementsByTagName !== \"undefined\" ?\n      context.getElementsByTagName( \"*\" ) :\n      [];\n  }\n\n  return { set: set, expr: expr };\n};\n\nSizzle.filter = function( expr, set, inplace, not ) {\n  var match, anyFound,\n    type, found, item, filter, left,\n    i, pass,\n    old = expr,\n    result = [],\n    curLoop = set,\n    isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );\n\n  while ( expr && set.length ) {\n    for ( type in Expr.filter ) {\n      if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {\n        filter = Expr.filter[ type ];\n        left = match[1];\n\n        anyFound = false;\n\n        match.splice(1,1);\n\n        if ( left.substr( left.length - 1 ) === \"\\\\\" ) {\n          continue;\n        }\n\n        if ( curLoop === result ) {\n          result = [];\n        }\n\n        if ( Expr.preFilter[ type ] ) {\n          match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );\n\n          if ( !match ) {\n            anyFound = found = true;\n\n          } else if ( match === true ) {\n            continue;\n          }\n        }\n\n        if ( match ) {\n          for ( i = 0; (item = curLoop[i]) != null; i++ ) {\n            if ( item ) {\n              found = filter( item, match, i, curLoop );\n              pass = not ^ found;\n\n              if ( inplace && found != null ) {\n                if ( pass ) {\n                  anyFound = true;\n\n                } else {\n                  curLoop[i] = false;\n                }\n\n              } else if ( pass ) {\n                result.push( item );\n                anyFound = true;\n              }\n            }\n          }\n        }\n\n        if ( found !== undefined ) {\n          if ( !inplace ) {\n            curLoop = result;\n          }\n\n          expr = expr.replace( Expr.match[ type ], \"\" );\n\n          if ( !anyFound ) {\n            return [];\n          }\n\n          break;\n        }\n      }\n    }\n\n    // Improper expression\n    if ( expr === old ) {\n      if ( anyFound == null ) {\n        Sizzle.error( expr );\n\n      } else {\n        break;\n      }\n    }\n\n    old = expr;\n  }\n\n  return curLoop;\n};\n\nSizzle.error = function( msg ) {\n  throw new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Utility function for retreiving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\nvar getText = Sizzle.getText = function( elem ) {\n    var i, node,\n    nodeType = elem.nodeType,\n    ret = \"\";\n\n  if ( nodeType ) {\n    if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n      // Use textContent || innerText for elements\n      if ( typeof elem.textContent === 'string' ) {\n        return elem.textContent;\n      } else if ( typeof elem.innerText === 'string' ) {\n        // Replace IE's carriage returns\n        return elem.innerText.replace( rReturn, '' );\n      } else {\n        // Traverse it's children\n        for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {\n          ret += getText( elem );\n        }\n      }\n    } else if ( nodeType === 3 || nodeType === 4 ) {\n      return elem.nodeValue;\n    }\n  } else {\n\n    // If no nodeType, this is expected to be an array\n    for ( i = 0; (node = elem[i]); i++ ) {\n      // Do not traverse comment nodes\n      if ( node.nodeType !== 8 ) {\n        ret += getText( node );\n      }\n    }\n  }\n  return ret;\n};\n\nvar Expr = Sizzle.selectors = {\n  order: [ \"ID\", \"NAME\", \"TAG\" ],\n\n  match: {\n    ID: /#((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,\n    CLASS: /\\.((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,\n    NAME: /\\[name=['\"]*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)['\"]*\\]/,\n    ATTR: /\\[\\s*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)\\s*(?:(\\S?=)\\s*(?:(['\"])(.*?)\\3|(#?(?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)*)|)|)\\s*\\]/,\n    TAG: /^((?:[\\w\\u00c0-\\uFFFF\\*\\-]|\\\\.)+)/,\n    CHILD: /:(only|nth|last|first)-child(?:\\(\\s*(even|odd|(?:[+\\-]?\\d+|(?:[+\\-]?\\d*)?n\\s*(?:[+\\-]\\s*\\d+)?))\\s*\\))?/,\n    POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^\\-]|$)/,\n    PSEUDO: /:((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)(?:\\((['\"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/\n  },\n\n  leftMatch: {},\n\n  attrMap: {\n    \"class\": \"className\",\n    \"for\": \"htmlFor\"\n  },\n\n  attrHandle: {\n    href: function( elem ) {\n      return elem.getAttribute( \"href\" );\n    },\n    type: function( elem ) {\n      return elem.getAttribute( \"type\" );\n    }\n  },\n\n  relative: {\n    \"+\": function(checkSet, part){\n      var isPartStr = typeof part === \"string\",\n        isTag = isPartStr && !rNonWord.test( part ),\n        isPartStrNotTag = isPartStr && !isTag;\n\n      if ( isTag ) {\n        part = part.toLowerCase();\n      }\n\n      for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {\n        if ( (elem = checkSet[i]) ) {\n          while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}\n\n          checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?\n            elem || false :\n            elem === part;\n        }\n      }\n\n      if ( isPartStrNotTag ) {\n        Sizzle.filter( part, checkSet, true );\n      }\n    },\n\n    \">\": function( checkSet, part ) {\n      var elem,\n        isPartStr = typeof part === \"string\",\n        i = 0,\n        l = checkSet.length;\n\n      if ( isPartStr && !rNonWord.test( part ) ) {\n        part = part.toLowerCase();\n\n        for ( ; i < l; i++ ) {\n          elem = checkSet[i];\n\n          if ( elem ) {\n            var parent = elem.parentNode;\n            checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;\n          }\n        }\n\n      } else {\n        for ( ; i < l; i++ ) {\n          elem = checkSet[i];\n\n          if ( elem ) {\n            checkSet[i] = isPartStr ?\n              elem.parentNode :\n              elem.parentNode === part;\n          }\n        }\n\n        if ( isPartStr ) {\n          Sizzle.filter( part, checkSet, true );\n        }\n      }\n    },\n\n    \"\": function(checkSet, part, isXML){\n      var nodeCheck,\n        doneName = done++,\n        checkFn = dirCheck;\n\n      if ( typeof part === \"string\" && !rNonWord.test( part ) ) {\n        part = part.toLowerCase();\n        nodeCheck = part;\n        checkFn = dirNodeCheck;\n      }\n\n      checkFn( \"parentNode\", part, doneName, checkSet, nodeCheck, isXML );\n    },\n\n    \"~\": function( checkSet, part, isXML ) {\n      var nodeCheck,\n        doneName = done++,\n        checkFn = dirCheck;\n\n      if ( typeof part === \"string\" && !rNonWord.test( part ) ) {\n        part = part.toLowerCase();\n        nodeCheck = part;\n        checkFn = dirNodeCheck;\n      }\n\n      checkFn( \"previousSibling\", part, doneName, checkSet, nodeCheck, isXML );\n    }\n  },\n\n  find: {\n    ID: function( match, context, isXML ) {\n      if ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n        var m = context.getElementById(match[1]);\n        // Check parentNode to catch when Blackberry 4.6 returns\n        // nodes that are no longer in the document #6963\n        return m && m.parentNode ? [m] : [];\n      }\n    },\n\n    NAME: function( match, context ) {\n      if ( typeof context.getElementsByName !== \"undefined\" ) {\n        var ret = [],\n          results = context.getElementsByName( match[1] );\n\n        for ( var i = 0, l = results.length; i < l; i++ ) {\n          if ( results[i].getAttribute(\"name\") === match[1] ) {\n            ret.push( results[i] );\n          }\n        }\n\n        return ret.length === 0 ? null : ret;\n      }\n    },\n\n    TAG: function( match, context ) {\n      if ( typeof context.getElementsByTagName !== \"undefined\" ) {\n        return context.getElementsByTagName( match[1] );\n      }\n    }\n  },\n  preFilter: {\n    CLASS: function( match, curLoop, inplace, result, not, isXML ) {\n      match = \" \" + match[1].replace( rBackslash, \"\" ) + \" \";\n\n      if ( isXML ) {\n        return match;\n      }\n\n      for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {\n        if ( elem ) {\n          if ( not ^ (elem.className && (\" \" + elem.className + \" \").replace(/[\\t\\n\\r]/g, \" \").indexOf(match) >= 0) ) {\n            if ( !inplace ) {\n              result.push( elem );\n            }\n\n          } else if ( inplace ) {\n            curLoop[i] = false;\n          }\n        }\n      }\n\n      return false;\n    },\n\n    ID: function( match ) {\n      return match[1].replace( rBackslash, \"\" );\n    },\n\n    TAG: function( match, curLoop ) {\n      return match[1].replace( rBackslash, \"\" ).toLowerCase();\n    },\n\n    CHILD: function( match ) {\n      if ( match[1] === \"nth\" ) {\n        if ( !match[2] ) {\n          Sizzle.error( match[0] );\n        }\n\n        match[2] = match[2].replace(/^\\+|\\s*/g, '');\n\n        // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'\n        var test = /(-?)(\\d*)(?:n([+\\-]?\\d*))?/.exec(\n          match[2] === \"even\" && \"2n\" || match[2] === \"odd\" && \"2n+1\" ||\n          !/\\D/.test( match[2] ) && \"0n+\" + match[2] || match[2]);\n\n        // calculate the numbers (first)n+(last) including if they are negative\n        match[2] = (test[1] + (test[2] || 1)) - 0;\n        match[3] = test[3] - 0;\n      }\n      else if ( match[2] ) {\n        Sizzle.error( match[0] );\n      }\n\n      // TODO: Move to normal caching system\n      match[0] = done++;\n\n      return match;\n    },\n\n    ATTR: function( match, curLoop, inplace, result, not, isXML ) {\n      var name = match[1] = match[1].replace( rBackslash, \"\" );\n\n      if ( !isXML && Expr.attrMap[name] ) {\n        match[1] = Expr.attrMap[name];\n      }\n\n      // Handle if an un-quoted value was used\n      match[4] = ( match[4] || match[5] || \"\" ).replace( rBackslash, \"\" );\n\n      if ( match[2] === \"~=\" ) {\n        match[4] = \" \" + match[4] + \" \";\n      }\n\n      return match;\n    },\n\n    PSEUDO: function( match, curLoop, inplace, result, not ) {\n      if ( match[1] === \"not\" ) {\n        // If we're dealing with a complex expression, or a simple one\n        if ( ( chunker.exec(match[3]) || \"\" ).length > 1 || /^\\w/.test(match[3]) ) {\n          match[3] = Sizzle(match[3], null, null, curLoop);\n\n        } else {\n          var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);\n\n          if ( !inplace ) {\n            result.push.apply( result, ret );\n          }\n\n          return false;\n        }\n\n      } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {\n        return true;\n      }\n\n      return match;\n    },\n\n    POS: function( match ) {\n      match.unshift( true );\n\n      return match;\n    }\n  },\n\n  filters: {\n    enabled: function( elem ) {\n      return elem.disabled === false && elem.type !== \"hidden\";\n    },\n\n    disabled: function( elem ) {\n      return elem.disabled === true;\n    },\n\n    checked: function( elem ) {\n      return elem.checked === true;\n    },\n\n    selected: function( elem ) {\n      // Accessing this property makes selected-by-default\n      // options in Safari work properly\n      if ( elem.parentNode ) {\n        elem.parentNode.selectedIndex;\n      }\n\n      return elem.selected === true;\n    },\n\n    parent: function( elem ) {\n      return !!elem.firstChild;\n    },\n\n    empty: function( elem ) {\n      return !elem.firstChild;\n    },\n\n    has: function( elem, i, match ) {\n      return !!Sizzle( match[3], elem ).length;\n    },\n\n    header: function( elem ) {\n      return (/h\\d/i).test( elem.nodeName );\n    },\n\n    text: function( elem ) {\n      var attr = elem.getAttribute( \"type\" ), type = elem.type;\n      // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\n      // use getAttribute instead to test this case\n      return elem.nodeName.toLowerCase() === \"input\" && \"text\" === type && ( attr === type || attr === null );\n    },\n\n    radio: function( elem ) {\n      return elem.nodeName.toLowerCase() === \"input\" && \"radio\" === elem.type;\n    },\n\n    checkbox: function( elem ) {\n      return elem.nodeName.toLowerCase() === \"input\" && \"checkbox\" === elem.type;\n    },\n\n    file: function( elem ) {\n      return elem.nodeName.toLowerCase() === \"input\" && \"file\" === elem.type;\n    },\n\n    password: function( elem ) {\n      return elem.nodeName.toLowerCase() === \"input\" && \"password\" === elem.type;\n    },\n\n    submit: function( elem ) {\n      var name = elem.nodeName.toLowerCase();\n      return (name === \"input\" || name === \"button\") && \"submit\" === elem.type;\n    },\n\n    image: function( elem ) {\n      return elem.nodeName.toLowerCase() === \"input\" && \"image\" === elem.type;\n    },\n\n    reset: function( elem ) {\n      var name = elem.nodeName.toLowerCase();\n      return (name === \"input\" || name === \"button\") && \"reset\" === elem.type;\n    },\n\n    button: function( elem ) {\n      var name = elem.nodeName.toLowerCase();\n      return name === \"input\" && \"button\" === elem.type || name === \"button\";\n    },\n\n    input: function( elem ) {\n      return (/input|select|textarea|button/i).test( elem.nodeName );\n    },\n\n    focus: function( elem ) {\n      return elem === elem.ownerDocument.activeElement;\n    }\n  },\n  setFilters: {\n    first: function( elem, i ) {\n      return i === 0;\n    },\n\n    last: function( elem, i, match, array ) {\n      return i === array.length - 1;\n    },\n\n    even: function( elem, i ) {\n      return i % 2 === 0;\n    },\n\n    odd: function( elem, i ) {\n      return i % 2 === 1;\n    },\n\n    lt: function( elem, i, match ) {\n      return i < match[3] - 0;\n    },\n\n    gt: function( elem, i, match ) {\n      return i > match[3] - 0;\n    },\n\n    nth: function( elem, i, match ) {\n      return match[3] - 0 === i;\n    },\n\n    eq: function( elem, i, match ) {\n      return match[3] - 0 === i;\n    }\n  },\n  filter: {\n    PSEUDO: function( elem, match, i, array ) {\n      var name = match[1],\n        filter = Expr.filters[ name ];\n\n      if ( filter ) {\n        return filter( elem, i, match, array );\n\n      } else if ( name === \"contains\" ) {\n        return (elem.textContent || elem.innerText || getText([ elem ]) || \"\").indexOf(match[3]) >= 0;\n\n      } else if ( name === \"not\" ) {\n        var not = match[3];\n\n        for ( var j = 0, l = not.length; j < l; j++ ) {\n          if ( not[j] === elem ) {\n            return false;\n          }\n        }\n\n        return true;\n\n      } else {\n        Sizzle.error( name );\n      }\n    },\n\n    CHILD: function( elem, match ) {\n      var first, last,\n        doneName, parent, cache,\n        count, diff,\n        type = match[1],\n        node = elem;\n\n      switch ( type ) {\n        case \"only\":\n        case \"first\":\n          while ( (node = node.previousSibling) ) {\n            if ( node.nodeType === 1 ) {\n              return false;\n            }\n          }\n\n          if ( type === \"first\" ) {\n            return true;\n          }\n\n          node = elem;\n\n          /* falls through */\n        case \"last\":\n          while ( (node = node.nextSibling) ) {\n            if ( node.nodeType === 1 ) {\n              return false;\n            }\n          }\n\n          return true;\n\n        case \"nth\":\n          first = match[2];\n          last = match[3];\n\n          if ( first === 1 && last === 0 ) {\n            return true;\n          }\n\n          doneName = match[0];\n          parent = elem.parentNode;\n\n          if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {\n            count = 0;\n\n            for ( node = parent.firstChild; node; node = node.nextSibling ) {\n              if ( node.nodeType === 1 ) {\n                node.nodeIndex = ++count;\n              }\n            }\n\n            parent[ expando ] = doneName;\n          }\n\n          diff = elem.nodeIndex - last;\n\n          if ( first === 0 ) {\n            return diff === 0;\n\n          } else {\n            return ( diff % first === 0 && diff / first >= 0 );\n          }\n      }\n    },\n\n    ID: function( elem, match ) {\n      return elem.nodeType === 1 && elem.getAttribute(\"id\") === match;\n    },\n\n    TAG: function( elem, match ) {\n      return (match === \"*\" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;\n    },\n\n    CLASS: function( elem, match ) {\n      return (\" \" + (elem.className || elem.getAttribute(\"class\")) + \" \")\n        .indexOf( match ) > -1;\n    },\n\n    ATTR: function( elem, match ) {\n      var name = match[1],\n        result = Sizzle.attr ?\n          Sizzle.attr( elem, name ) :\n          Expr.attrHandle[ name ] ?\n          Expr.attrHandle[ name ]( elem ) :\n          elem[ name ] != null ?\n            elem[ name ] :\n            elem.getAttribute( name ),\n        value = result + \"\",\n        type = match[2],\n        check = match[4];\n\n      return result == null ?\n        type === \"!=\" :\n        !type && Sizzle.attr ?\n        result != null :\n        type === \"=\" ?\n        value === check :\n        type === \"*=\" ?\n        value.indexOf(check) >= 0 :\n        type === \"~=\" ?\n        (\" \" + value + \" \").indexOf(check) >= 0 :\n        !check ?\n        value && result !== false :\n        type === \"!=\" ?\n        value !== check :\n        type === \"^=\" ?\n        value.indexOf(check) === 0 :\n        type === \"$=\" ?\n        value.substr(value.length - check.length) === check :\n        type === \"|=\" ?\n        value === check || value.substr(0, check.length + 1) === check + \"-\" :\n        false;\n    },\n\n    POS: function( elem, match, i, array ) {\n      var name = match[2],\n        filter = Expr.setFilters[ name ];\n\n      if ( filter ) {\n        return filter( elem, i, match, array );\n      }\n    }\n  }\n};\n\nvar origPOS = Expr.match.POS,\n  fescape = function(all, num){\n    return \"\\\\\" + (num - 0 + 1);\n  };\n\nfor ( var type in Expr.match ) {\n  Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\\[]*\\])(?![^\\(]*\\))/.source) );\n  Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\\r|\\n)*?)/.source + Expr.match[ type ].source.replace(/\\\\(\\d+)/g, fescape) );\n}\n// Expose origPOS\n// \"global\" as in regardless of relation to brackets/parens\nExpr.match.globalPOS = origPOS;\n\nvar makeArray = function( array, results ) {\n  array = Array.prototype.slice.call( array, 0 );\n\n  if ( results ) {\n    results.push.apply( results, array );\n    return results;\n  }\n\n  return array;\n};\n\n// Perform a simple check to determine if the browser is capable of\n// converting a NodeList to an array using builtin methods.\n// Also verifies that the returned array holds DOM nodes\n// (which is not the case in the Blackberry browser)\ntry {\n  Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;\n\n// Provide a fallback method if it does not work\n} catch( e ) {\n  makeArray = function( array, results ) {\n    var i = 0,\n      ret = results || [];\n\n    if ( toString.call(array) === \"[object Array]\" ) {\n      Array.prototype.push.apply( ret, array );\n\n    } else {\n      if ( typeof array.length === \"number\" ) {\n        for ( var l = array.length; i < l; i++ ) {\n          ret.push( array[i] );\n        }\n\n      } else {\n        for ( ; array[i]; i++ ) {\n          ret.push( array[i] );\n        }\n      }\n    }\n\n    return ret;\n  };\n}\n\nvar sortOrder, siblingCheck;\n\nif ( document.documentElement.compareDocumentPosition ) {\n  sortOrder = function( a, b ) {\n    if ( a === b ) {\n      hasDuplicate = true;\n      return 0;\n    }\n\n    if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {\n      return a.compareDocumentPosition ? -1 : 1;\n    }\n\n    return a.compareDocumentPosition(b) & 4 ? -1 : 1;\n  };\n\n} else {\n  sortOrder = function( a, b ) {\n    // The nodes are identical, we can exit early\n    if ( a === b ) {\n      hasDuplicate = true;\n      return 0;\n\n    // Fallback to using sourceIndex (in IE) if it's available on both nodes\n    } else if ( a.sourceIndex && b.sourceIndex ) {\n      return a.sourceIndex - b.sourceIndex;\n    }\n\n    var al, bl,\n      ap = [],\n      bp = [],\n      aup = a.parentNode,\n      bup = b.parentNode,\n      cur = aup;\n\n    // If the nodes are siblings (or identical) we can do a quick check\n    if ( aup === bup ) {\n      return siblingCheck( a, b );\n\n    // If no parents were found then the nodes are disconnected\n    } else if ( !aup ) {\n      return -1;\n\n    } else if ( !bup ) {\n      return 1;\n    }\n\n    // Otherwise they're somewhere else in the tree so we need\n    // to build up a full list of the parentNodes for comparison\n    while ( cur ) {\n      ap.unshift( cur );\n      cur = cur.parentNode;\n    }\n\n    cur = bup;\n\n    while ( cur ) {\n      bp.unshift( cur );\n      cur = cur.parentNode;\n    }\n\n    al = ap.length;\n    bl = bp.length;\n\n    // Start walking down the tree looking for a discrepancy\n    for ( var i = 0; i < al && i < bl; i++ ) {\n      if ( ap[i] !== bp[i] ) {\n        return siblingCheck( ap[i], bp[i] );\n      }\n    }\n\n    // We ended someplace up the tree so do a sibling check\n    return i === al ?\n      siblingCheck( a, bp[i], -1 ) :\n      siblingCheck( ap[i], b, 1 );\n  };\n\n  siblingCheck = function( a, b, ret ) {\n    if ( a === b ) {\n      return ret;\n    }\n\n    var cur = a.nextSibling;\n\n    while ( cur ) {\n      if ( cur === b ) {\n        return -1;\n      }\n\n      cur = cur.nextSibling;\n    }\n\n    return 1;\n  };\n}\n\n// Check to see if the browser returns elements by name when\n// querying by getElementById (and provide a workaround)\n(function(){\n  // We're going to inject a fake input element with a specified name\n  var form = document.createElement(\"div\"),\n    id = \"script\" + (new Date()).getTime(),\n    root = document.documentElement;\n\n  form.innerHTML = \"<a name='\" + id + \"'/>\";\n\n  // Inject it into the root element, check its status, and remove it quickly\n  root.insertBefore( form, root.firstChild );\n\n  // The workaround has to do additional checks after a getElementById\n  // Which slows things down for other browsers (hence the branching)\n  if ( document.getElementById( id ) ) {\n    Expr.find.ID = function( match, context, isXML ) {\n      if ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n        var m = context.getElementById(match[1]);\n\n        return m ?\n          m.id === match[1] || typeof m.getAttributeNode !== \"undefined\" && m.getAttributeNode(\"id\").nodeValue === match[1] ?\n            [m] :\n            undefined :\n          [];\n      }\n    };\n\n    Expr.filter.ID = function( elem, match ) {\n      var node = typeof elem.getAttributeNode !== \"undefined\" && elem.getAttributeNode(\"id\");\n\n      return elem.nodeType === 1 && node && node.nodeValue === match;\n    };\n  }\n\n  root.removeChild( form );\n\n  // release memory in IE\n  root = form = null;\n})();\n\n(function(){\n  // Check to see if the browser returns only elements\n  // when doing getElementsByTagName(\"*\")\n\n  // Create a fake element\n  var div = document.createElement(\"div\");\n  div.appendChild( document.createComment(\"\") );\n\n  // Make sure no comments are found\n  if ( div.getElementsByTagName(\"*\").length > 0 ) {\n    Expr.find.TAG = function( match, context ) {\n      var results = context.getElementsByTagName( match[1] );\n\n      // Filter out possible comments\n      if ( match[1] === \"*\" ) {\n        var tmp = [];\n\n        for ( var i = 0; results[i]; i++ ) {\n          if ( results[i].nodeType === 1 ) {\n            tmp.push( results[i] );\n          }\n        }\n\n        results = tmp;\n      }\n\n      return results;\n    };\n  }\n\n  // Check to see if an attribute returns normalized href attributes\n  div.innerHTML = \"<a href='#'></a>\";\n\n  if ( div.firstChild && typeof div.firstChild.getAttribute !== \"undefined\" &&\n      div.firstChild.getAttribute(\"href\") !== \"#\" ) {\n\n    Expr.attrHandle.href = function( elem ) {\n      return elem.getAttribute( \"href\", 2 );\n    };\n  }\n\n  // release memory in IE\n  div = null;\n})();\n\nif ( document.querySelectorAll ) {\n  (function(){\n    var oldSizzle = Sizzle,\n      div = document.createElement(\"div\"),\n      id = \"__sizzle__\";\n\n    div.innerHTML = \"<p class='TEST'></p>\";\n\n    // Safari can't handle uppercase or unicode characters when\n    // in quirks mode.\n    if ( div.querySelectorAll && div.querySelectorAll(\".TEST\").length === 0 ) {\n      return;\n    }\n\n    Sizzle = function( query, context, extra, seed ) {\n      context = context || document;\n\n      // Only use querySelectorAll on non-XML documents\n      // (ID selectors don't work in non-HTML documents)\n      if ( !seed && !Sizzle.isXML(context) ) {\n        // See if we find a selector to speed up\n        var match = /^(\\w+$)|^\\.([\\w\\-]+$)|^#([\\w\\-]+$)/.exec( query );\n\n        if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {\n          // Speed-up: Sizzle(\"TAG\")\n          if ( match[1] ) {\n            return makeArray( context.getElementsByTagName( query ), extra );\n\n          // Speed-up: Sizzle(\".CLASS\")\n          } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {\n            return makeArray( context.getElementsByClassName( match[2] ), extra );\n          }\n        }\n\n        if ( context.nodeType === 9 ) {\n          // Speed-up: Sizzle(\"body\")\n          // The body element only exists once, optimize finding it\n          if ( query === \"body\" && context.body ) {\n            return makeArray( [ context.body ], extra );\n\n          // Speed-up: Sizzle(\"#ID\")\n          } else if ( match && match[3] ) {\n            var elem = context.getElementById( match[3] );\n\n            // Check parentNode to catch when Blackberry 4.6 returns\n            // nodes that are no longer in the document #6963\n            if ( elem && elem.parentNode ) {\n              // Handle the case where IE and Opera return items\n              // by name instead of ID\n              if ( elem.id === match[3] ) {\n                return makeArray( [ elem ], extra );\n              }\n\n            } else {\n              return makeArray( [], extra );\n            }\n          }\n\n          try {\n            return makeArray( context.querySelectorAll(query), extra );\n          } catch(qsaError) {}\n\n        // qSA works strangely on Element-rooted queries\n        // We can work around this by specifying an extra ID on the root\n        // and working up from there (Thanks to Andrew Dupont for the technique)\n        // IE 8 doesn't work on object elements\n        } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\n          var oldContext = context,\n            old = context.getAttribute( \"id\" ),\n            nid = old || id,\n            hasParent = context.parentNode,\n            relativeHierarchySelector = /^\\s*[+~]/.test( query );\n\n          if ( !old ) {\n            context.setAttribute( \"id\", nid );\n          } else {\n            nid = nid.replace( /'/g, \"\\\\$&\" );\n          }\n          if ( relativeHierarchySelector && hasParent ) {\n            context = context.parentNode;\n          }\n\n          try {\n            if ( !relativeHierarchySelector || hasParent ) {\n              return makeArray( context.querySelectorAll( \"[id='\" + nid + \"'] \" + query ), extra );\n            }\n\n          } catch(pseudoError) {\n          } finally {\n            if ( !old ) {\n              oldContext.removeAttribute( \"id\" );\n            }\n          }\n        }\n      }\n\n      return oldSizzle(query, context, extra, seed);\n    };\n\n    for ( var prop in oldSizzle ) {\n      Sizzle[ prop ] = oldSizzle[ prop ];\n    }\n\n    // release memory in IE\n    div = null;\n  })();\n}\n\n(function(){\n  var html = document.documentElement,\n    matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;\n\n  if ( matches ) {\n    // Check to see if it's possible to do matchesSelector\n    // on a disconnected node (IE 9 fails this)\n    var disconnectedMatch = !matches.call( document.createElement( \"div\" ), \"div\" ),\n      pseudoWorks = false;\n\n    try {\n      // This should fail with an exception\n      // Gecko does not error, returns false instead\n      matches.call( document.documentElement, \"[test!='']:sizzle\" );\n\n    } catch( pseudoError ) {\n      pseudoWorks = true;\n    }\n\n    Sizzle.matchesSelector = function( node, expr ) {\n      // Make sure that attribute selectors are quoted\n      expr = expr.replace(/\\=\\s*([^'\"\\]]*)\\s*\\]/g, \"='$1']\");\n\n      if ( !Sizzle.isXML( node ) ) {\n        try {\n          if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {\n            var ret = matches.call( node, expr );\n\n            // IE 9's matchesSelector returns false on disconnected nodes\n            if ( ret || !disconnectedMatch ||\n                // As well, disconnected nodes are said to be in a document\n                // fragment in IE 9, so check for that\n                node.document && node.document.nodeType !== 11 ) {\n              return ret;\n            }\n          }\n        } catch(e) {}\n      }\n\n      return Sizzle(expr, null, null, [node]).length > 0;\n    };\n  }\n})();\n\n(function(){\n  var div = document.createElement(\"div\");\n\n  div.innerHTML = \"<div class='test e'></div><div class='test'></div>\";\n\n  // Opera can't find a second classname (in 9.6)\n  // Also, make sure that getElementsByClassName actually exists\n  if ( !div.getElementsByClassName || div.getElementsByClassName(\"e\").length === 0 ) {\n    return;\n  }\n\n  // Safari caches class attributes, doesn't catch changes (in 3.2)\n  div.lastChild.className = \"e\";\n\n  if ( div.getElementsByClassName(\"e\").length === 1 ) {\n    return;\n  }\n\n  Expr.order.splice(1, 0, \"CLASS\");\n  Expr.find.CLASS = function( match, context, isXML ) {\n    if ( typeof context.getElementsByClassName !== \"undefined\" && !isXML ) {\n      return context.getElementsByClassName(match[1]);\n    }\n  };\n\n  // release memory in IE\n  div = null;\n})();\n\nfunction dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n  for ( var i = 0, l = checkSet.length; i < l; i++ ) {\n    var elem = checkSet[i];\n\n    if ( elem ) {\n      var match = false;\n\n      elem = elem[dir];\n\n      while ( elem ) {\n        if ( elem[ expando ] === doneName ) {\n          match = checkSet[elem.sizset];\n          break;\n        }\n\n        if ( elem.nodeType === 1 && !isXML ){\n          elem[ expando ] = doneName;\n          elem.sizset = i;\n        }\n\n        if ( elem.nodeName.toLowerCase() === cur ) {\n          match = elem;\n          break;\n        }\n\n        elem = elem[dir];\n      }\n\n      checkSet[i] = match;\n    }\n  }\n}\n\nfunction dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n  for ( var i = 0, l = checkSet.length; i < l; i++ ) {\n    var elem = checkSet[i];\n\n    if ( elem ) {\n      var match = false;\n\n      elem = elem[dir];\n\n      while ( elem ) {\n        if ( elem[ expando ] === doneName ) {\n          match = checkSet[elem.sizset];\n          break;\n        }\n\n        if ( elem.nodeType === 1 ) {\n          if ( !isXML ) {\n            elem[ expando ] = doneName;\n            elem.sizset = i;\n          }\n\n          if ( typeof cur !== \"string\" ) {\n            if ( elem === cur ) {\n              match = true;\n              break;\n            }\n\n          } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {\n            match = elem;\n            break;\n          }\n        }\n\n        elem = elem[dir];\n      }\n\n      checkSet[i] = match;\n    }\n  }\n}\n\nif ( document.documentElement.contains ) {\n  Sizzle.contains = function( a, b ) {\n    return a !== b && (a.contains ? a.contains(b) : true);\n  };\n\n} else if ( document.documentElement.compareDocumentPosition ) {\n  Sizzle.contains = function( a, b ) {\n    return !!(a.compareDocumentPosition(b) & 16);\n  };\n\n} else {\n  Sizzle.contains = function() {\n    return false;\n  };\n}\n\nSizzle.isXML = function( elem ) {\n  // documentElement is verified for cases where it doesn't yet exist\n  // (such as loading iframes in IE - #4833)\n  var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;\n\n  return documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\nvar posProcess = function( selector, context, seed ) {\n  var match,\n    tmpSet = [],\n    later = \"\",\n    root = context.nodeType ? [context] : context;\n\n  // Position selectors must be done after the filter\n  // And so must :not(positional) so we move all PSEUDOs to the end\n  while ( (match = Expr.match.PSEUDO.exec( selector )) ) {\n    later += match[0];\n    selector = selector.replace( Expr.match.PSEUDO, \"\" );\n  }\n\n  selector = Expr.relative[selector] ? selector + \"*\" : selector;\n\n  for ( var i = 0, l = root.length; i < l; i++ ) {\n    Sizzle( selector, root[i], tmpSet, seed );\n  }\n\n  return Sizzle.filter( later, tmpSet );\n};\n\n// EXPOSE\n// Override sizzle attribute retrieval\nSizzle.attr = jQuery.attr;\nSizzle.selectors.attrMap = {};\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[\":\"] = jQuery.expr.filters;\njQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n})();\n\n\nvar runtil = /Until$/,\n  rparentsprev = /^(?:parents|prevUntil|prevAll)/,\n  // Note: This RegExp should be improved, or likely pulled from Sizzle\n  rmultiselector = /,/,\n  isSimple = /^.[^:#\\[\\.,]*$/,\n  slice = Array.prototype.slice,\n  POS = jQuery.expr.match.globalPOS,\n  // methods guaranteed to produce a unique set when starting from a unique set\n  guaranteedUnique = {\n    children: true,\n    contents: true,\n    next: true,\n    prev: true\n  };\n\njQuery.fn.extend({\n  find: function( selector ) {\n    var self = this,\n      i, l;\n\n    if ( typeof selector !== \"string\" ) {\n      return jQuery( selector ).filter(function() {\n        for ( i = 0, l = self.length; i < l; i++ ) {\n          if ( jQuery.contains( self[ i ], this ) ) {\n            return true;\n          }\n        }\n      });\n    }\n\n    var ret = this.pushStack( \"\", \"find\", selector ),\n      length, n, r;\n\n    for ( i = 0, l = this.length; i < l; i++ ) {\n      length = ret.length;\n      jQuery.find( selector, this[i], ret );\n\n      if ( i > 0 ) {\n        // Make sure that the results are unique\n        for ( n = length; n < ret.length; n++ ) {\n          for ( r = 0; r < length; r++ ) {\n            if ( ret[r] === ret[n] ) {\n              ret.splice(n--, 1);\n              break;\n            }\n          }\n        }\n      }\n    }\n\n    return ret;\n  },\n\n  has: function( target ) {\n    var targets = jQuery( target );\n    return this.filter(function() {\n      for ( var i = 0, l = targets.length; i < l; i++ ) {\n        if ( jQuery.contains( this, targets[i] ) ) {\n          return true;\n        }\n      }\n    });\n  },\n\n  not: function( selector ) {\n    return this.pushStack( winnow(this, selector, false), \"not\", selector);\n  },\n\n  filter: function( selector ) {\n    return this.pushStack( winnow(this, selector, true), \"filter\", selector );\n  },\n\n  is: function( selector ) {\n    return !!selector && (\n      typeof selector === \"string\" ?\n        // If this is a positional selector, check membership in the returned set\n        // so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n        POS.test( selector ) ?\n          jQuery( selector, this.context ).index( this[0] ) >= 0 :\n          jQuery.filter( selector, this ).length > 0 :\n        this.filter( selector ).length > 0 );\n  },\n\n  closest: function( selectors, context ) {\n    var ret = [], i, l, cur = this[0];\n\n    // Array (deprecated as of jQuery 1.7)\n    if ( jQuery.isArray( selectors ) ) {\n      var level = 1;\n\n      while ( cur && cur.ownerDocument && cur !== context ) {\n        for ( i = 0; i < selectors.length; i++ ) {\n\n          if ( jQuery( cur ).is( selectors[ i ] ) ) {\n            ret.push({ selector: selectors[ i ], elem: cur, level: level });\n          }\n        }\n\n        cur = cur.parentNode;\n        level++;\n      }\n\n      return ret;\n    }\n\n    // String\n    var pos = POS.test( selectors ) || typeof selectors !== \"string\" ?\n        jQuery( selectors, context || this.context ) :\n        0;\n\n    for ( i = 0, l = this.length; i < l; i++ ) {\n      cur = this[i];\n\n      while ( cur ) {\n        if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {\n          ret.push( cur );\n          break;\n\n        } else {\n          cur = cur.parentNode;\n          if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {\n            break;\n          }\n        }\n      }\n    }\n\n    ret = ret.length > 1 ? jQuery.unique( ret ) : ret;\n\n    return this.pushStack( ret, \"closest\", selectors );\n  },\n\n  // Determine the position of an element within\n  // the matched set of elements\n  index: function( elem ) {\n\n    // No argument, return index in parent\n    if ( !elem ) {\n      return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;\n    }\n\n    // index in selector\n    if ( typeof elem === \"string\" ) {\n      return jQuery.inArray( this[0], jQuery( elem ) );\n    }\n\n    // Locate the position of the desired element\n    return jQuery.inArray(\n      // If it receives a jQuery object, the first element is used\n      elem.jquery ? elem[0] : elem, this );\n  },\n\n  add: function( selector, context ) {\n    var set = typeof selector === \"string\" ?\n        jQuery( selector, context ) :\n        jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),\n      all = jQuery.merge( this.get(), set );\n\n    return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?\n      all :\n      jQuery.unique( all ) );\n  },\n\n  andSelf: function() {\n    return this.add( this.prevObject );\n  }\n});\n\n// A painfully simple check to see if an element is disconnected\n// from a document (should be improved, where feasible).\nfunction isDisconnected( node ) {\n  return !node || !node.parentNode || node.parentNode.nodeType === 11;\n}\n\njQuery.each({\n  parent: function( elem ) {\n    var parent = elem.parentNode;\n    return parent && parent.nodeType !== 11 ? parent : null;\n  },\n  parents: function( elem ) {\n    return jQuery.dir( elem, \"parentNode\" );\n  },\n  parentsUntil: function( elem, i, until ) {\n    return jQuery.dir( elem, \"parentNode\", until );\n  },\n  next: function( elem ) {\n    return jQuery.nth( elem, 2, \"nextSibling\" );\n  },\n  prev: function( elem ) {\n    return jQuery.nth( elem, 2, \"previousSibling\" );\n  },\n  nextAll: function( elem ) {\n    return jQuery.dir( elem, \"nextSibling\" );\n  },\n  prevAll: function( elem ) {\n    return jQuery.dir( elem, \"previousSibling\" );\n  },\n  nextUntil: function( elem, i, until ) {\n    return jQuery.dir( elem, \"nextSibling\", until );\n  },\n  prevUntil: function( elem, i, until ) {\n    return jQuery.dir( elem, \"previousSibling\", until );\n  },\n  siblings: function( elem ) {\n    return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\n  },\n  children: function( elem ) {\n    return jQuery.sibling( elem.firstChild );\n  },\n  contents: function( elem ) {\n    return jQuery.nodeName( elem, \"iframe\" ) ?\n      elem.contentDocument || elem.contentWindow.document :\n      jQuery.makeArray( elem.childNodes );\n  }\n}, function( name, fn ) {\n  jQuery.fn[ name ] = function( until, selector ) {\n    var ret = jQuery.map( this, fn, until );\n\n    if ( !runtil.test( name ) ) {\n      selector = until;\n    }\n\n    if ( selector && typeof selector === \"string\" ) {\n      ret = jQuery.filter( selector, ret );\n    }\n\n    ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;\n\n    if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {\n      ret = ret.reverse();\n    }\n\n    return this.pushStack( ret, name, slice.call( arguments ).join(\",\") );\n  };\n});\n\njQuery.extend({\n  filter: function( expr, elems, not ) {\n    if ( not ) {\n      expr = \":not(\" + expr + \")\";\n    }\n\n    return elems.length === 1 ?\n      jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :\n      jQuery.find.matches(expr, elems);\n  },\n\n  dir: function( elem, dir, until ) {\n    var matched = [],\n      cur = elem[ dir ];\n\n    while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\n      if ( cur.nodeType === 1 ) {\n        matched.push( cur );\n      }\n      cur = cur[dir];\n    }\n    return matched;\n  },\n\n  nth: function( cur, result, dir, elem ) {\n    result = result || 1;\n    var num = 0;\n\n    for ( ; cur; cur = cur[dir] ) {\n      if ( cur.nodeType === 1 && ++num === result ) {\n        break;\n      }\n    }\n\n    return cur;\n  },\n\n  sibling: function( n, elem ) {\n    var r = [];\n\n    for ( ; n; n = n.nextSibling ) {\n      if ( n.nodeType === 1 && n !== elem ) {\n        r.push( n );\n      }\n    }\n\n    return r;\n  }\n});\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, keep ) {\n\n  // Can't pass null or undefined to indexOf in Firefox 4\n  // Set to 0 to skip string check\n  qualifier = qualifier || 0;\n\n  if ( jQuery.isFunction( qualifier ) ) {\n    return jQuery.grep(elements, function( elem, i ) {\n      var retVal = !!qualifier.call( elem, i, elem );\n      return retVal === keep;\n    });\n\n  } else if ( qualifier.nodeType ) {\n    return jQuery.grep(elements, function( elem, i ) {\n      return ( elem === qualifier ) === keep;\n    });\n\n  } else if ( typeof qualifier === \"string\" ) {\n    var filtered = jQuery.grep(elements, function( elem ) {\n      return elem.nodeType === 1;\n    });\n\n    if ( isSimple.test( qualifier ) ) {\n      return jQuery.filter(qualifier, filtered, !keep);\n    } else {\n      qualifier = jQuery.filter( qualifier, filtered );\n    }\n  }\n\n  return jQuery.grep(elements, function( elem, i ) {\n    return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;\n  });\n}\n\n\n\n\nfunction createSafeFragment( document ) {\n  var list = nodeNames.split( \"|\" ),\n  safeFrag = document.createDocumentFragment();\n\n  if ( safeFrag.createElement ) {\n    while ( list.length ) {\n      safeFrag.createElement(\n        list.pop()\n      );\n    }\n  }\n  return safeFrag;\n}\n\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|\" +\n    \"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",\n  rinlinejQuery = / jQuery\\d+=\"(?:\\d+|null)\"/g,\n  rleadingWhitespace = /^\\s+/,\n  rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n  rtagName = /<([\\w:]+)/,\n  rtbody = /<tbody/i,\n  rhtml = /<|&#?\\w+;/,\n  rnoInnerhtml = /<(?:script|style)/i,\n  rnocache = /<(?:script|object|embed|option|style)/i,\n  rnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\"),\n  // checked=\"checked\" or checked\n  rchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n  rscriptType = /\\/(java|ecma)script/i,\n  rcleanScript = /^\\s*<!(?:\\[CDATA\\[|\\-\\-)/,\n  wrapMap = {\n    option: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n    legend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n    thead: [ 1, \"<table>\", \"</table>\" ],\n    tr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n    td: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n    col: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n    area: [ 1, \"<map>\", \"</map>\" ],\n    _default: [ 0, \"\", \"\" ]\n  },\n  safeFragment = createSafeFragment( document );\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// IE can't serialize <link> and <script> tags normally\nif ( !jQuery.support.htmlSerialize ) {\n  wrapMap._default = [ 1, \"div<div>\", \"</div>\" ];\n}\n\njQuery.fn.extend({\n  text: function( value ) {\n    return jQuery.access( this, function( value ) {\n      return value === undefined ?\n        jQuery.text( this ) :\n        this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );\n    }, null, value, arguments.length );\n  },\n\n  wrapAll: function( html ) {\n    if ( jQuery.isFunction( html ) ) {\n      return this.each(function(i) {\n        jQuery(this).wrapAll( html.call(this, i) );\n      });\n    }\n\n    if ( this[0] ) {\n      // The elements to wrap the target around\n      var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\n\n      if ( this[0].parentNode ) {\n        wrap.insertBefore( this[0] );\n      }\n\n      wrap.map(function() {\n        var elem = this;\n\n        while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n          elem = elem.firstChild;\n        }\n\n        return elem;\n      }).append( this );\n    }\n\n    return this;\n  },\n\n  wrapInner: function( html ) {\n    if ( jQuery.isFunction( html ) ) {\n      return this.each(function(i) {\n        jQuery(this).wrapInner( html.call(this, i) );\n      });\n    }\n\n    return this.each(function() {\n      var self = jQuery( this ),\n        contents = self.contents();\n\n      if ( contents.length ) {\n        contents.wrapAll( html );\n\n      } else {\n        self.append( html );\n      }\n    });\n  },\n\n  wrap: function( html ) {\n    var isFunction = jQuery.isFunction( html );\n\n    return this.each(function(i) {\n      jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\n    });\n  },\n\n  unwrap: function() {\n    return this.parent().each(function() {\n      if ( !jQuery.nodeName( this, \"body\" ) ) {\n        jQuery( this ).replaceWith( this.childNodes );\n      }\n    }).end();\n  },\n\n  append: function() {\n    return this.domManip(arguments, true, function( elem ) {\n      if ( this.nodeType === 1 ) {\n        this.appendChild( elem );\n      }\n    });\n  },\n\n  prepend: function() {\n    return this.domManip(arguments, true, function( elem ) {\n      if ( this.nodeType === 1 ) {\n        this.insertBefore( elem, this.firstChild );\n      }\n    });\n  },\n\n  before: function() {\n    if ( this[0] && this[0].parentNode ) {\n      return this.domManip(arguments, false, function( elem ) {\n        this.parentNode.insertBefore( elem, this );\n      });\n    } else if ( arguments.length ) {\n      var set = jQuery.clean( arguments );\n      set.push.apply( set, this.toArray() );\n      return this.pushStack( set, \"before\", arguments );\n    }\n  },\n\n  after: function() {\n    if ( this[0] && this[0].parentNode ) {\n      return this.domManip(arguments, false, function( elem ) {\n        this.parentNode.insertBefore( elem, this.nextSibling );\n      });\n    } else if ( arguments.length ) {\n      var set = this.pushStack( this, \"after\", arguments );\n      set.push.apply( set, jQuery.clean(arguments) );\n      return set;\n    }\n  },\n\n  // keepData is for internal use only--do not document\n  remove: function( selector, keepData ) {\n    for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {\n      if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {\n        if ( !keepData && elem.nodeType === 1 ) {\n          jQuery.cleanData( elem.getElementsByTagName(\"*\") );\n          jQuery.cleanData( [ elem ] );\n        }\n\n        if ( elem.parentNode ) {\n          elem.parentNode.removeChild( elem );\n        }\n      }\n    }\n\n    return this;\n  },\n\n  empty: function() {\n    for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {\n      // Remove element nodes and prevent memory leaks\n      if ( elem.nodeType === 1 ) {\n        jQuery.cleanData( elem.getElementsByTagName(\"*\") );\n      }\n\n      // Remove any remaining nodes\n      while ( elem.firstChild ) {\n        elem.removeChild( elem.firstChild );\n      }\n    }\n\n    return this;\n  },\n\n  clone: function( dataAndEvents, deepDataAndEvents ) {\n    dataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n    deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n    return this.map( function () {\n      return jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n    });\n  },\n\n  html: function( value ) {\n    return jQuery.access( this, function( value ) {\n      var elem = this[0] || {},\n        i = 0,\n        l = this.length;\n\n      if ( value === undefined ) {\n        return elem.nodeType === 1 ?\n          elem.innerHTML.replace( rinlinejQuery, \"\" ) :\n          null;\n      }\n\n\n      if ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n        ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\n        !wrapMap[ ( rtagName.exec( value ) || [\"\", \"\"] )[1].toLowerCase() ] ) {\n\n        value = value.replace( rxhtmlTag, \"<$1></$2>\" );\n\n        try {\n          for (; i < l; i++ ) {\n            // Remove element nodes and prevent memory leaks\n            elem = this[i] || {};\n            if ( elem.nodeType === 1 ) {\n              jQuery.cleanData( elem.getElementsByTagName( \"*\" ) );\n              elem.innerHTML = value;\n            }\n          }\n\n          elem = 0;\n\n        // If using innerHTML throws an exception, use the fallback method\n        } catch(e) {}\n      }\n\n      if ( elem ) {\n        this.empty().append( value );\n      }\n    }, null, value, arguments.length );\n  },\n\n  replaceWith: function( value ) {\n    if ( this[0] && this[0].parentNode ) {\n      // Make sure that the elements are removed from the DOM before they are inserted\n      // this can help fix replacing a parent with child elements\n      if ( jQuery.isFunction( value ) ) {\n        return this.each(function(i) {\n          var self = jQuery(this), old = self.html();\n          self.replaceWith( value.call( this, i, old ) );\n        });\n      }\n\n      if ( typeof value !== \"string\" ) {\n        value = jQuery( value ).detach();\n      }\n\n      return this.each(function() {\n        var next = this.nextSibling,\n          parent = this.parentNode;\n\n        jQuery( this ).remove();\n\n        if ( next ) {\n          jQuery(next).before( value );\n        } else {\n          jQuery(parent).append( value );\n        }\n      });\n    } else {\n      return this.length ?\n        this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), \"replaceWith\", value ) :\n        this;\n    }\n  },\n\n  detach: function( selector ) {\n    return this.remove( selector, true );\n  },\n\n  domManip: function( args, table, callback ) {\n    var results, first, fragment, parent,\n      value = args[0],\n      scripts = [];\n\n    // We can't cloneNode fragments that contain checked, in WebKit\n    if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === \"string\" && rchecked.test( value ) ) {\n      return this.each(function() {\n        jQuery(this).domManip( args, table, callback, true );\n      });\n    }\n\n    if ( jQuery.isFunction(value) ) {\n      return this.each(function(i) {\n        var self = jQuery(this);\n        args[0] = value.call(this, i, table ? self.html() : undefined);\n        self.domManip( args, table, callback );\n      });\n    }\n\n    if ( this[0] ) {\n      parent = value && value.parentNode;\n\n      // If we're in a fragment, just use that instead of building a new one\n      if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {\n        results = { fragment: parent };\n\n      } else {\n        results = jQuery.buildFragment( args, this, scripts );\n      }\n\n      fragment = results.fragment;\n\n      if ( fragment.childNodes.length === 1 ) {\n        first = fragment = fragment.firstChild;\n      } else {\n        first = fragment.firstChild;\n      }\n\n      if ( first ) {\n        table = table && jQuery.nodeName( first, \"tr\" );\n\n        for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {\n          callback.call(\n            table ?\n              root(this[i], first) :\n              this[i],\n            // Make sure that we do not leak memory by inadvertently discarding\n            // the original fragment (which might have attached data) instead of\n            // using it; in addition, use the original fragment object for the last\n            // item instead of first because it can end up being emptied incorrectly\n            // in certain situations (Bug #8070).\n            // Fragments from the fragment cache must always be cloned and never used\n            // in place.\n            results.cacheable || ( l > 1 && i < lastIndex ) ?\n              jQuery.clone( fragment, true, true ) :\n              fragment\n          );\n        }\n      }\n\n      if ( scripts.length ) {\n        jQuery.each( scripts, function( i, elem ) {\n          if ( elem.src ) {\n            jQuery.ajax({\n              type: \"GET\",\n              global: false,\n              url: elem.src,\n              async: false,\n              dataType: \"script\"\n            });\n          } else {\n            jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || \"\" ).replace( rcleanScript, \"/*$0*/\" ) );\n          }\n\n          if ( elem.parentNode ) {\n            elem.parentNode.removeChild( elem );\n          }\n        });\n      }\n    }\n\n    return this;\n  }\n});\n\nfunction root( elem, cur ) {\n  return jQuery.nodeName(elem, \"table\") ?\n    (elem.getElementsByTagName(\"tbody\")[0] ||\n    elem.appendChild(elem.ownerDocument.createElement(\"tbody\"))) :\n    elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\n  if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n    return;\n  }\n\n  var type, i, l,\n    oldData = jQuery._data( src ),\n    curData = jQuery._data( dest, oldData ),\n    events = oldData.events;\n\n  if ( events ) {\n    delete curData.handle;\n    curData.events = {};\n\n    for ( type in events ) {\n      for ( i = 0, l = events[ type ].length; i < l; i++ ) {\n        jQuery.event.add( dest, type, events[ type ][ i ] );\n      }\n    }\n  }\n\n  // make the cloned public data object a copy from the original\n  if ( curData.data ) {\n    curData.data = jQuery.extend( {}, curData.data );\n  }\n}\n\nfunction cloneFixAttributes( src, dest ) {\n  var nodeName;\n\n  // We do not need to do anything for non-Elements\n  if ( dest.nodeType !== 1 ) {\n    return;\n  }\n\n  // clearAttributes removes the attributes, which we don't want,\n  // but also removes the attachEvent events, which we *do* want\n  if ( dest.clearAttributes ) {\n    dest.clearAttributes();\n  }\n\n  // mergeAttributes, in contrast, only merges back on the\n  // original attributes, not the events\n  if ( dest.mergeAttributes ) {\n    dest.mergeAttributes( src );\n  }\n\n  nodeName = dest.nodeName.toLowerCase();\n\n  // IE6-8 fail to clone children inside object elements that use\n  // the proprietary classid attribute value (rather than the type\n  // attribute) to identify the type of content to display\n  if ( nodeName === \"object\" ) {\n    dest.outerHTML = src.outerHTML;\n\n  } else if ( nodeName === \"input\" && (src.type === \"checkbox\" || src.type === \"radio\") ) {\n    // IE6-8 fails to persist the checked state of a cloned checkbox\n    // or radio button. Worse, IE6-7 fail to give the cloned element\n    // a checked appearance if the defaultChecked value isn't also set\n    if ( src.checked ) {\n      dest.defaultChecked = dest.checked = src.checked;\n    }\n\n    // IE6-7 get confused and end up setting the value of a cloned\n    // checkbox/radio button to an empty string instead of \"on\"\n    if ( dest.value !== src.value ) {\n      dest.value = src.value;\n    }\n\n  // IE6-8 fails to return the selected option to the default selected\n  // state when cloning options\n  } else if ( nodeName === \"option\" ) {\n    dest.selected = src.defaultSelected;\n\n  // IE6-8 fails to set the defaultValue to the correct value when\n  // cloning other types of input fields\n  } else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n    dest.defaultValue = src.defaultValue;\n\n  // IE blanks contents when cloning scripts\n  } else if ( nodeName === \"script\" && dest.text !== src.text ) {\n    dest.text = src.text;\n  }\n\n  // Event data gets referenced instead of copied if the expando\n  // gets copied too\n  dest.removeAttribute( jQuery.expando );\n\n  // Clear flags for bubbling special change/submit events, they must\n  // be reattached when the newly cloned events are first activated\n  dest.removeAttribute( \"_submit_attached\" );\n  dest.removeAttribute( \"_change_attached\" );\n}\n\njQuery.buildFragment = function( args, nodes, scripts ) {\n  var fragment, cacheable, cacheresults, doc,\n  first = args[ 0 ];\n\n  // nodes may contain either an explicit document object,\n  // a jQuery collection or context object.\n  // If nodes[0] contains a valid object to assign to doc\n  if ( nodes && nodes[0] ) {\n    doc = nodes[0].ownerDocument || nodes[0];\n  }\n\n  // Ensure that an attr object doesn't incorrectly stand in as a document object\n  // Chrome and Firefox seem to allow this to occur and will throw exception\n  // Fixes #8950\n  if ( !doc.createDocumentFragment ) {\n    doc = document;\n  }\n\n  // Only cache \"small\" (1/2 KB) HTML strings that are associated with the main document\n  // Cloning options loses the selected state, so don't cache them\n  // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment\n  // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache\n  // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501\n  if ( args.length === 1 && typeof first === \"string\" && first.length < 512 && doc === document &&\n    first.charAt(0) === \"<\" && !rnocache.test( first ) &&\n    (jQuery.support.checkClone || !rchecked.test( first )) &&\n    (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {\n\n    cacheable = true;\n\n    cacheresults = jQuery.fragments[ first ];\n    if ( cacheresults && cacheresults !== 1 ) {\n      fragment = cacheresults;\n    }\n  }\n\n  if ( !fragment ) {\n    fragment = doc.createDocumentFragment();\n    jQuery.clean( args, doc, fragment, scripts );\n  }\n\n  if ( cacheable ) {\n    jQuery.fragments[ first ] = cacheresults ? fragment : 1;\n  }\n\n  return { fragment: fragment, cacheable: cacheable };\n};\n\njQuery.fragments = {};\n\njQuery.each({\n  appendTo: \"append\",\n  prependTo: \"prepend\",\n  insertBefore: \"before\",\n  insertAfter: \"after\",\n  replaceAll: \"replaceWith\"\n}, function( name, original ) {\n  jQuery.fn[ name ] = function( selector ) {\n    var ret = [],\n      insert = jQuery( selector ),\n      parent = this.length === 1 && this[0].parentNode;\n\n    if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {\n      insert[ original ]( this[0] );\n      return this;\n\n    } else {\n      for ( var i = 0, l = insert.length; i < l; i++ ) {\n        var elems = ( i > 0 ? this.clone(true) : this ).get();\n        jQuery( insert[i] )[ original ]( elems );\n        ret = ret.concat( elems );\n      }\n\n      return this.pushStack( ret, name, insert.selector );\n    }\n  };\n});\n\nfunction getAll( elem ) {\n  if ( typeof elem.getElementsByTagName !== \"undefined\" ) {\n    return elem.getElementsByTagName( \"*\" );\n\n  } else if ( typeof elem.querySelectorAll !== \"undefined\" ) {\n    return elem.querySelectorAll( \"*\" );\n\n  } else {\n    return [];\n  }\n}\n\n// Used in clean, fixes the defaultChecked property\nfunction fixDefaultChecked( elem ) {\n  if ( elem.type === \"checkbox\" || elem.type === \"radio\" ) {\n    elem.defaultChecked = elem.checked;\n  }\n}\n// Finds all inputs and passes them to fixDefaultChecked\nfunction findInputs( elem ) {\n  var nodeName = ( elem.nodeName || \"\" ).toLowerCase();\n  if ( nodeName === \"input\" ) {\n    fixDefaultChecked( elem );\n  // Skip scripts, get other children\n  } else if ( nodeName !== \"script\" && typeof elem.getElementsByTagName !== \"undefined\" ) {\n    jQuery.grep( elem.getElementsByTagName(\"input\"), fixDefaultChecked );\n  }\n}\n\n// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js\nfunction shimCloneNode( elem ) {\n  var div = document.createElement( \"div\" );\n  safeFragment.appendChild( div );\n\n  div.innerHTML = elem.outerHTML;\n  return div.firstChild;\n}\n\njQuery.extend({\n  clone: function( elem, dataAndEvents, deepDataAndEvents ) {\n    var srcElements,\n      destElements,\n      i,\n      // IE<=8 does not properly clone detached, unknown element nodes\n      clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ?\n        elem.cloneNode( true ) :\n        shimCloneNode( elem );\n\n    if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\n        (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\n      // IE copies events bound via attachEvent when using cloneNode.\n      // Calling detachEvent on the clone will also remove the events\n      // from the original. In order to get around this, we use some\n      // proprietary methods to clear the events. Thanks to MooTools\n      // guys for this hotness.\n\n      cloneFixAttributes( elem, clone );\n\n      // Using Sizzle here is crazy slow, so we use getElementsByTagName instead\n      srcElements = getAll( elem );\n      destElements = getAll( clone );\n\n      // Weird iteration because IE will replace the length property\n      // with an element if you are cloning the body and one of the\n      // elements on the page has a name or id of \"length\"\n      for ( i = 0; srcElements[i]; ++i ) {\n        // Ensure that the destination node is not null; Fixes #9587\n        if ( destElements[i] ) {\n          cloneFixAttributes( srcElements[i], destElements[i] );\n        }\n      }\n    }\n\n    // Copy the events from the original to the clone\n    if ( dataAndEvents ) {\n      cloneCopyEvent( elem, clone );\n\n      if ( deepDataAndEvents ) {\n        srcElements = getAll( elem );\n        destElements = getAll( clone );\n\n        for ( i = 0; srcElements[i]; ++i ) {\n          cloneCopyEvent( srcElements[i], destElements[i] );\n        }\n      }\n    }\n\n    srcElements = destElements = null;\n\n    // Return the cloned set\n    return clone;\n  },\n\n  clean: function( elems, context, fragment, scripts ) {\n    var checkScriptType, script, j,\n        ret = [];\n\n    context = context || document;\n\n    // !context.createElement fails in IE with an error but returns typeof 'object'\n    if ( typeof context.createElement === \"undefined\" ) {\n      context = context.ownerDocument || context[0] && context[0].ownerDocument || document;\n    }\n\n    for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n      if ( typeof elem === \"number\" ) {\n        elem += \"\";\n      }\n\n      if ( !elem ) {\n        continue;\n      }\n\n      // Convert html string into DOM nodes\n      if ( typeof elem === \"string\" ) {\n        if ( !rhtml.test( elem ) ) {\n          elem = context.createTextNode( elem );\n        } else {\n          // Fix \"XHTML\"-style tags in all browsers\n          elem = elem.replace(rxhtmlTag, \"<$1></$2>\");\n\n          // Trim whitespace, otherwise indexOf won't work as expected\n          var tag = ( rtagName.exec( elem ) || [\"\", \"\"] )[1].toLowerCase(),\n            wrap = wrapMap[ tag ] || wrapMap._default,\n            depth = wrap[0],\n            div = context.createElement(\"div\"),\n            safeChildNodes = safeFragment.childNodes,\n            remove;\n\n          // Append wrapper element to unknown element safe doc fragment\n          if ( context === document ) {\n            // Use the fragment we've already created for this document\n            safeFragment.appendChild( div );\n          } else {\n            // Use a fragment created with the owner document\n            createSafeFragment( context ).appendChild( div );\n          }\n\n          // Go to html and back, then peel off extra wrappers\n          div.innerHTML = wrap[1] + elem + wrap[2];\n\n          // Move to the right depth\n          while ( depth-- ) {\n            div = div.lastChild;\n          }\n\n          // Remove IE's autoinserted <tbody> from table fragments\n          if ( !jQuery.support.tbody ) {\n\n            // String was a <table>, *may* have spurious <tbody>\n            var hasBody = rtbody.test(elem),\n              tbody = tag === \"table\" && !hasBody ?\n                div.firstChild && div.firstChild.childNodes :\n\n                // String was a bare <thead> or <tfoot>\n                wrap[1] === \"<table>\" && !hasBody ?\n                  div.childNodes :\n                  [];\n\n            for ( j = tbody.length - 1; j >= 0 ; --j ) {\n              if ( jQuery.nodeName( tbody[ j ], \"tbody\" ) && !tbody[ j ].childNodes.length ) {\n                tbody[ j ].parentNode.removeChild( tbody[ j ] );\n              }\n            }\n          }\n\n          // IE completely kills leading whitespace when innerHTML is used\n          if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n            div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );\n          }\n\n          elem = div.childNodes;\n\n          // Clear elements from DocumentFragment (safeFragment or otherwise)\n          // to avoid hoarding elements. Fixes #11356\n          if ( div ) {\n            div.parentNode.removeChild( div );\n\n            // Guard against -1 index exceptions in FF3.6\n            if ( safeChildNodes.length > 0 ) {\n              remove = safeChildNodes[ safeChildNodes.length - 1 ];\n\n              if ( remove && remove.parentNode ) {\n                remove.parentNode.removeChild( remove );\n              }\n            }\n          }\n        }\n      }\n\n      // Resets defaultChecked for any radios and checkboxes\n      // about to be appended to the DOM in IE 6/7 (#8060)\n      var len;\n      if ( !jQuery.support.appendChecked ) {\n        if ( elem[0] && typeof (len = elem.length) === \"number\" ) {\n          for ( j = 0; j < len; j++ ) {\n            findInputs( elem[j] );\n          }\n        } else {\n          findInputs( elem );\n        }\n      }\n\n      if ( elem.nodeType ) {\n        ret.push( elem );\n      } else {\n        ret = jQuery.merge( ret, elem );\n      }\n    }\n\n    if ( fragment ) {\n      checkScriptType = function( elem ) {\n        return !elem.type || rscriptType.test( elem.type );\n      };\n      for ( i = 0; ret[i]; i++ ) {\n        script = ret[i];\n        if ( scripts && jQuery.nodeName( script, \"script\" ) && (!script.type || rscriptType.test( script.type )) ) {\n          scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script );\n\n        } else {\n          if ( script.nodeType === 1 ) {\n            var jsTags = jQuery.grep( script.getElementsByTagName( \"script\" ), checkScriptType );\n\n            ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );\n          }\n          fragment.appendChild( script );\n        }\n      }\n    }\n\n    return ret;\n  },\n\n  cleanData: function( elems ) {\n    var data, id,\n      cache = jQuery.cache,\n      special = jQuery.event.special,\n      deleteExpando = jQuery.support.deleteExpando;\n\n    for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n      if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {\n        continue;\n      }\n\n      id = elem[ jQuery.expando ];\n\n      if ( id ) {\n        data = cache[ id ];\n\n        if ( data && data.events ) {\n          for ( var type in data.events ) {\n            if ( special[ type ] ) {\n              jQuery.event.remove( elem, type );\n\n            // This is a shortcut to avoid jQuery.event.remove's overhead\n            } else {\n              jQuery.removeEvent( elem, type, data.handle );\n            }\n          }\n\n          // Null the DOM reference to avoid IE6/7/8 leak (#7054)\n          if ( data.handle ) {\n            data.handle.elem = null;\n          }\n        }\n\n        if ( deleteExpando ) {\n          delete elem[ jQuery.expando ];\n\n        } else if ( elem.removeAttribute ) {\n          elem.removeAttribute( jQuery.expando );\n        }\n\n        delete cache[ id ];\n      }\n    }\n  }\n});\n\n\n\n\nvar ralpha = /alpha\\([^)]*\\)/i,\n  ropacity = /opacity=([^)]*)/,\n  // fixed for IE9, see #8346\n  rupper = /([A-Z]|^ms)/g,\n  rnum = /^[\\-+]?(?:\\d*\\.)?\\d+$/i,\n  rnumnonpx = /^-?(?:\\d*\\.)?\\d+(?!px)[^\\d\\s]+$/i,\n  rrelNum = /^([\\-+])=([\\-+.\\de]+)/,\n  rmargin = /^margin/,\n\n  cssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\n  // order is important!\n  cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ],\n\n  curCSS,\n\n  getComputedStyle,\n  currentStyle;\n\njQuery.fn.css = function( name, value ) {\n  return jQuery.access( this, function( elem, name, value ) {\n    return value !== undefined ?\n      jQuery.style( elem, name, value ) :\n      jQuery.css( elem, name );\n  }, name, value, arguments.length > 1 );\n};\n\njQuery.extend({\n  // Add in style property hooks for overriding the default\n  // behavior of getting and setting a style property\n  cssHooks: {\n    opacity: {\n      get: function( elem, computed ) {\n        if ( computed ) {\n          // We should always get a number back from opacity\n          var ret = curCSS( elem, \"opacity\" );\n          return ret === \"\" ? \"1\" : ret;\n\n        } else {\n          return elem.style.opacity;\n        }\n      }\n    }\n  },\n\n  // Exclude the following css properties to add px\n  cssNumber: {\n    \"fillOpacity\": true,\n    \"fontWeight\": true,\n    \"lineHeight\": true,\n    \"opacity\": true,\n    \"orphans\": true,\n    \"widows\": true,\n    \"zIndex\": true,\n    \"zoom\": true\n  },\n\n  // Add in properties whose names you wish to fix before\n  // setting or getting the value\n  cssProps: {\n    // normalize float css property\n    \"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\n  },\n\n  // Get and set the style property on a DOM Node\n  style: function( elem, name, value, extra ) {\n    // Don't set styles on text and comment nodes\n    if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n      return;\n    }\n\n    // Make sure that we're working with the right name\n    var ret, type, origName = jQuery.camelCase( name ),\n      style = elem.style, hooks = jQuery.cssHooks[ origName ];\n\n    name = jQuery.cssProps[ origName ] || origName;\n\n    // Check if we're setting a value\n    if ( value !== undefined ) {\n      type = typeof value;\n\n      // convert relative number strings (+= or -=) to relative numbers. #7345\n      if ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\n        value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );\n        // Fixes bug #9237\n        type = \"number\";\n      }\n\n      // Make sure that NaN and null values aren't set. See: #7116\n      if ( value == null || type === \"number\" && isNaN( value ) ) {\n        return;\n      }\n\n      // If a number was passed in, add 'px' to the (except for certain CSS properties)\n      if ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\n        value += \"px\";\n      }\n\n      // If a hook was provided, use that value, otherwise just set the specified value\n      if ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {\n        // Wrapped to prevent IE from throwing errors when 'invalid' values are provided\n        // Fixes bug #5509\n        try {\n          style[ name ] = value;\n        } catch(e) {}\n      }\n\n    } else {\n      // If a hook was provided get the non-computed value from there\n      if ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\n        return ret;\n      }\n\n      // Otherwise just get the value from the style object\n      return style[ name ];\n    }\n  },\n\n  css: function( elem, name, extra ) {\n    var ret, hooks;\n\n    // Make sure that we're working with the right name\n    name = jQuery.camelCase( name );\n    hooks = jQuery.cssHooks[ name ];\n    name = jQuery.cssProps[ name ] || name;\n\n    // cssFloat needs a special treatment\n    if ( name === \"cssFloat\" ) {\n      name = \"float\";\n    }\n\n    // If a hook was provided get the computed value from there\n    if ( hooks && \"get\" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {\n      return ret;\n\n    // Otherwise, if a way to get the computed value exists, use that\n    } else if ( curCSS ) {\n      return curCSS( elem, name );\n    }\n  },\n\n  // A method for quickly swapping in/out CSS properties to get correct calculations\n  swap: function( elem, options, callback ) {\n    var old = {},\n      ret, name;\n\n    // Remember the old values, and insert the new ones\n    for ( name in options ) {\n      old[ name ] = elem.style[ name ];\n      elem.style[ name ] = options[ name ];\n    }\n\n    ret = callback.call( elem );\n\n    // Revert the old values\n    for ( name in options ) {\n      elem.style[ name ] = old[ name ];\n    }\n\n    return ret;\n  }\n});\n\n// DEPRECATED in 1.3, Use jQuery.css() instead\njQuery.curCSS = jQuery.css;\n\nif ( document.defaultView && document.defaultView.getComputedStyle ) {\n  getComputedStyle = function( elem, name ) {\n    var ret, defaultView, computedStyle, width,\n      style = elem.style;\n\n    name = name.replace( rupper, \"-$1\" ).toLowerCase();\n\n    if ( (defaultView = elem.ownerDocument.defaultView) &&\n        (computedStyle = defaultView.getComputedStyle( elem, null )) ) {\n\n      ret = computedStyle.getPropertyValue( name );\n      if ( ret === \"\" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {\n        ret = jQuery.style( elem, name );\n      }\n    }\n\n    // A tribute to the \"awesome hack by Dean Edwards\"\n    // WebKit uses \"computed value (percentage if specified)\" instead of \"used value\" for margins\n    // which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values\n    if ( !jQuery.support.pixelMargin && computedStyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) {\n      width = style.width;\n      style.width = ret;\n      ret = computedStyle.width;\n      style.width = width;\n    }\n\n    return ret;\n  };\n}\n\nif ( document.documentElement.currentStyle ) {\n  currentStyle = function( elem, name ) {\n    var left, rsLeft, uncomputed,\n      ret = elem.currentStyle && elem.currentStyle[ name ],\n      style = elem.style;\n\n    // Avoid setting ret to empty string here\n    // so we don't default to auto\n    if ( ret == null && style && (uncomputed = style[ name ]) ) {\n      ret = uncomputed;\n    }\n\n    // From the awesome hack by Dean Edwards\n    // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n    // If we're not dealing with a regular pixel number\n    // but a number that has a weird ending, we need to convert it to pixels\n    if ( rnumnonpx.test( ret ) ) {\n\n      // Remember the original values\n      left = style.left;\n      rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;\n\n      // Put in the new values to get a computed value out\n      if ( rsLeft ) {\n        elem.runtimeStyle.left = elem.currentStyle.left;\n      }\n      style.left = name === \"fontSize\" ? \"1em\" : ret;\n      ret = style.pixelLeft + \"px\";\n\n      // Revert the changed values\n      style.left = left;\n      if ( rsLeft ) {\n        elem.runtimeStyle.left = rsLeft;\n      }\n    }\n\n    return ret === \"\" ? \"auto\" : ret;\n  };\n}\n\ncurCSS = getComputedStyle || currentStyle;\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n  // Start with offset property\n  var val = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n    i = name === \"width\" ? 1 : 0,\n    len = 4;\n\n  if ( val > 0 ) {\n    if ( extra !== \"border\" ) {\n      for ( ; i < len; i += 2 ) {\n        if ( !extra ) {\n          val -= parseFloat( jQuery.css( elem, \"padding\" + cssExpand[ i ] ) ) || 0;\n        }\n        if ( extra === \"margin\" ) {\n          val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ] ) ) || 0;\n        } else {\n          val -= parseFloat( jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\" ) ) || 0;\n        }\n      }\n    }\n\n    return val + \"px\";\n  }\n\n  // Fall back to computed then uncomputed css if necessary\n  val = curCSS( elem, name );\n  if ( val < 0 || val == null ) {\n    val = elem.style[ name ];\n  }\n\n  // Computed unit is not pixels. Stop here and return.\n  if ( rnumnonpx.test(val) ) {\n    return val;\n  }\n\n  // Normalize \"\", auto, and prepare for extra\n  val = parseFloat( val ) || 0;\n\n  // Add padding, border, margin\n  if ( extra ) {\n    for ( ; i < len; i += 2 ) {\n      val += parseFloat( jQuery.css( elem, \"padding\" + cssExpand[ i ] ) ) || 0;\n      if ( extra !== \"padding\" ) {\n        val += parseFloat( jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\" ) ) || 0;\n      }\n      if ( extra === \"margin\" ) {\n        val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ]) ) || 0;\n      }\n    }\n  }\n\n  return val + \"px\";\n}\n\njQuery.each([ \"height\", \"width\" ], function( i, name ) {\n  jQuery.cssHooks[ name ] = {\n    get: function( elem, computed, extra ) {\n      if ( computed ) {\n        if ( elem.offsetWidth !== 0 ) {\n          return getWidthOrHeight( elem, name, extra );\n        } else {\n          return jQuery.swap( elem, cssShow, function() {\n            return getWidthOrHeight( elem, name, extra );\n          });\n        }\n      }\n    },\n\n    set: function( elem, value ) {\n      return rnum.test( value ) ?\n        value + \"px\" :\n        value;\n    }\n  };\n});\n\nif ( !jQuery.support.opacity ) {\n  jQuery.cssHooks.opacity = {\n    get: function( elem, computed ) {\n      // IE uses filters for opacity\n      return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\" ) ?\n        ( parseFloat( RegExp.$1 ) / 100 ) + \"\" :\n        computed ? \"1\" : \"\";\n    },\n\n    set: function( elem, value ) {\n      var style = elem.style,\n        currentStyle = elem.currentStyle,\n        opacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\n        filter = currentStyle && currentStyle.filter || style.filter || \"\";\n\n      // IE has trouble with opacity if it does not have layout\n      // Force it by setting the zoom level\n      style.zoom = 1;\n\n      // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652\n      if ( value >= 1 && jQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" ) {\n\n        // Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\n        // if \"filter:\" is present at all, clearType is disabled, we want to avoid this\n        // style.removeAttribute is IE Only, but so apparently is this code path...\n        style.removeAttribute( \"filter\" );\n\n        // if there there is no filter style applied in a css rule, we are done\n        if ( currentStyle && !currentStyle.filter ) {\n          return;\n        }\n      }\n\n      // otherwise, set new filter values\n      style.filter = ralpha.test( filter ) ?\n        filter.replace( ralpha, opacity ) :\n        filter + \" \" + opacity;\n    }\n  };\n}\n\njQuery(function() {\n  // This hook cannot be added until DOM ready because the support test\n  // for it is not run until after DOM ready\n  if ( !jQuery.support.reliableMarginRight ) {\n    jQuery.cssHooks.marginRight = {\n      get: function( elem, computed ) {\n        // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n        // Work around by temporarily setting element display to inline-block\n        return jQuery.swap( elem, { \"display\": \"inline-block\" }, function() {\n          if ( computed ) {\n            return curCSS( elem, \"margin-right\" );\n          } else {\n            return elem.style.marginRight;\n          }\n        });\n      }\n    };\n  }\n});\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n  jQuery.expr.filters.hidden = function( elem ) {\n    var width = elem.offsetWidth,\n      height = elem.offsetHeight;\n\n    return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, \"display\" )) === \"none\");\n  };\n\n  jQuery.expr.filters.visible = function( elem ) {\n    return !jQuery.expr.filters.hidden( elem );\n  };\n}\n\n// These hooks are used by animate to expand properties\njQuery.each({\n  margin: \"\",\n  padding: \"\",\n  border: \"Width\"\n}, function( prefix, suffix ) {\n\n  jQuery.cssHooks[ prefix + suffix ] = {\n    expand: function( value ) {\n      var i,\n\n        // assumes a single number if not a string\n        parts = typeof value === \"string\" ? value.split(\" \") : [ value ],\n        expanded = {};\n\n      for ( i = 0; i < 4; i++ ) {\n        expanded[ prefix + cssExpand[ i ] + suffix ] =\n          parts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n      }\n\n      return expanded;\n    }\n  };\n});\n\n\n\n\nvar r20 = /%20/g,\n  rbracket = /\\[\\]$/,\n  rCRLF = /\\r?\\n/g,\n  rhash = /#.*$/,\n  rheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\n  rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,\n  // #7653, #8125, #8152: local protocol detection\n  rlocalProtocol = /^(?:about|app|app\\-storage|.+\\-extension|file|res|widget):$/,\n  rnoContent = /^(?:GET|HEAD)$/,\n  rprotocol = /^\\/\\//,\n  rquery = /\\?/,\n  rscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n  rselectTextarea = /^(?:select|textarea)/i,\n  rspacesAjax = /\\s+/,\n  rts = /([?&])_=[^&]*/,\n  rurl = /^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+))?)?/,\n\n  // Keep a copy of the old load method\n  _load = jQuery.fn.load,\n\n  /* Prefilters\n   * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n   * 2) These are called:\n   *    - BEFORE asking for a transport\n   *    - AFTER param serialization (s.data is a string if s.processData is true)\n   * 3) key is the dataType\n   * 4) the catchall symbol \"*\" can be used\n   * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n   */\n  prefilters = {},\n\n  /* Transports bindings\n   * 1) key is the dataType\n   * 2) the catchall symbol \"*\" can be used\n   * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n   */\n  transports = {},\n\n  // Document location\n  ajaxLocation,\n\n  // Document location segments\n  ajaxLocParts,\n\n  // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n  allTypes = [\"*/\"] + [\"*\"];\n\n// #8138, IE may throw an exception when accessing\n// a field from window.location if document.domain has been set\ntry {\n  ajaxLocation = location.href;\n} catch( e ) {\n  // Use the href attribute of an A element\n  // since IE will modify it given document.location\n  ajaxLocation = document.createElement( \"a\" );\n  ajaxLocation.href = \"\";\n  ajaxLocation = ajaxLocation.href;\n}\n\n// Segment location into parts\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n  // dataTypeExpression is optional and defaults to \"*\"\n  return function( dataTypeExpression, func ) {\n\n    if ( typeof dataTypeExpression !== \"string\" ) {\n      func = dataTypeExpression;\n      dataTypeExpression = \"*\";\n    }\n\n    if ( jQuery.isFunction( func ) ) {\n      var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),\n        i = 0,\n        length = dataTypes.length,\n        dataType,\n        list,\n        placeBefore;\n\n      // For each dataType in the dataTypeExpression\n      for ( ; i < length; i++ ) {\n        dataType = dataTypes[ i ];\n        // We control if we're asked to add before\n        // any existing element\n        placeBefore = /^\\+/.test( dataType );\n        if ( placeBefore ) {\n          dataType = dataType.substr( 1 ) || \"*\";\n        }\n        list = structure[ dataType ] = structure[ dataType ] || [];\n        // then we add to the structure accordingly\n        list[ placeBefore ? \"unshift\" : \"push\" ]( func );\n      }\n    }\n  };\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,\n    dataType /* internal */, inspected /* internal */ ) {\n\n  dataType = dataType || options.dataTypes[ 0 ];\n  inspected = inspected || {};\n\n  inspected[ dataType ] = true;\n\n  var list = structure[ dataType ],\n    i = 0,\n    length = list ? list.length : 0,\n    executeOnly = ( structure === prefilters ),\n    selection;\n\n  for ( ; i < length && ( executeOnly || !selection ); i++ ) {\n    selection = list[ i ]( options, originalOptions, jqXHR );\n    // If we got redirected to another dataType\n    // we try there if executing only and not done already\n    if ( typeof selection === \"string\" ) {\n      if ( !executeOnly || inspected[ selection ] ) {\n        selection = undefined;\n      } else {\n        options.dataTypes.unshift( selection );\n        selection = inspectPrefiltersOrTransports(\n            structure, options, originalOptions, jqXHR, selection, inspected );\n      }\n    }\n  }\n  // If we're only executing or nothing was selected\n  // we try the catchall dataType if not done already\n  if ( ( executeOnly || !selection ) && !inspected[ \"*\" ] ) {\n    selection = inspectPrefiltersOrTransports(\n        structure, options, originalOptions, jqXHR, \"*\", inspected );\n  }\n  // unnecessary when only executing (prefilters)\n  // but it'll be ignored by the caller in that case\n  return selection;\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  var key, deep,\n    flatOptions = jQuery.ajaxSettings.flatOptions || {};\n  for ( key in src ) {\n    if ( src[ key ] !== undefined ) {\n      ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n    }\n  }\n  if ( deep ) {\n    jQuery.extend( true, target, deep );\n  }\n}\n\njQuery.fn.extend({\n  load: function( url, params, callback ) {\n    if ( typeof url !== \"string\" && _load ) {\n      return _load.apply( this, arguments );\n\n    // Don't do a request if no elements are being requested\n    } else if ( !this.length ) {\n      return this;\n    }\n\n    var off = url.indexOf( \" \" );\n    if ( off >= 0 ) {\n      var selector = url.slice( off, url.length );\n      url = url.slice( 0, off );\n    }\n\n    // Default to a GET request\n    var type = \"GET\";\n\n    // If the second parameter was provided\n    if ( params ) {\n      // If it's a function\n      if ( jQuery.isFunction( params ) ) {\n        // We assume that it's the callback\n        callback = params;\n        params = undefined;\n\n      // Otherwise, build a param string\n      } else if ( typeof params === \"object\" ) {\n        params = jQuery.param( params, jQuery.ajaxSettings.traditional );\n        type = \"POST\";\n      }\n    }\n\n    var self = this;\n\n    // Request the remote document\n    jQuery.ajax({\n      url: url,\n      type: type,\n      dataType: \"html\",\n      data: params,\n      // Complete callback (responseText is used internally)\n      complete: function( jqXHR, status, responseText ) {\n        // Store the response as specified by the jqXHR object\n        responseText = jqXHR.responseText;\n        // If successful, inject the HTML into all the matched elements\n        if ( jqXHR.isResolved() ) {\n          // #4825: Get the actual response in case\n          // a dataFilter is present in ajaxSettings\n          jqXHR.done(function( r ) {\n            responseText = r;\n          });\n          // See if a selector was specified\n          self.html( selector ?\n            // Create a dummy div to hold the results\n            jQuery(\"<div>\")\n              // inject the contents of the document in, removing the scripts\n              // to avoid any 'Permission Denied' errors in IE\n              .append(responseText.replace(rscript, \"\"))\n\n              // Locate the specified elements\n              .find(selector) :\n\n            // If not, just inject the full result\n            responseText );\n        }\n\n        if ( callback ) {\n          self.each( callback, [ responseText, status, jqXHR ] );\n        }\n      }\n    });\n\n    return this;\n  },\n\n  serialize: function() {\n    return jQuery.param( this.serializeArray() );\n  },\n\n  serializeArray: function() {\n    return this.map(function(){\n      return this.elements ? jQuery.makeArray( this.elements ) : this;\n    })\n    .filter(function(){\n      return this.name && !this.disabled &&\n        ( this.checked || rselectTextarea.test( this.nodeName ) ||\n          rinput.test( this.type ) );\n    })\n    .map(function( i, elem ){\n      var val = jQuery( this ).val();\n\n      return val == null ?\n        null :\n        jQuery.isArray( val ) ?\n          jQuery.map( val, function( val, i ){\n            return { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n          }) :\n          { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n    }).get();\n  }\n});\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( \"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split( \" \" ), function( i, o ){\n  jQuery.fn[ o ] = function( f ){\n    return this.on( o, f );\n  };\n});\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n  jQuery[ method ] = function( url, data, callback, type ) {\n    // shift arguments if data argument was omitted\n    if ( jQuery.isFunction( data ) ) {\n      type = type || callback;\n      callback = data;\n      data = undefined;\n    }\n\n    return jQuery.ajax({\n      type: method,\n      url: url,\n      data: data,\n      success: callback,\n      dataType: type\n    });\n  };\n});\n\njQuery.extend({\n\n  getScript: function( url, callback ) {\n    return jQuery.get( url, undefined, callback, \"script\" );\n  },\n\n  getJSON: function( url, data, callback ) {\n    return jQuery.get( url, data, callback, \"json\" );\n  },\n\n  // Creates a full fledged settings object into target\n  // with both ajaxSettings and settings fields.\n  // If target is omitted, writes into ajaxSettings.\n  ajaxSetup: function( target, settings ) {\n    if ( settings ) {\n      // Building a settings object\n      ajaxExtend( target, jQuery.ajaxSettings );\n    } else {\n      // Extending ajaxSettings\n      settings = target;\n      target = jQuery.ajaxSettings;\n    }\n    ajaxExtend( target, settings );\n    return target;\n  },\n\n  ajaxSettings: {\n    url: ajaxLocation,\n    isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n    global: true,\n    type: \"GET\",\n    contentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n    processData: true,\n    async: true,\n    /*\n    timeout: 0,\n    data: null,\n    dataType: null,\n    username: null,\n    password: null,\n    cache: null,\n    traditional: false,\n    headers: {},\n    */\n\n    accepts: {\n      xml: \"application/xml, text/xml\",\n      html: \"text/html\",\n      text: \"text/plain\",\n      json: \"application/json, text/javascript\",\n      \"*\": allTypes\n    },\n\n    contents: {\n      xml: /xml/,\n      html: /html/,\n      json: /json/\n    },\n\n    responseFields: {\n      xml: \"responseXML\",\n      text: \"responseText\"\n    },\n\n    // List of data converters\n    // 1) key format is \"source_type destination_type\" (a single space in-between)\n    // 2) the catchall symbol \"*\" can be used for source_type\n    converters: {\n\n      // Convert anything to text\n      \"* text\": window.String,\n\n      // Text to html (true = no transformation)\n      \"text html\": true,\n\n      // Evaluate text as a json expression\n      \"text json\": jQuery.parseJSON,\n\n      // Parse text as xml\n      \"text xml\": jQuery.parseXML\n    },\n\n    // For options that shouldn't be deep extended:\n    // you can add your own custom options here if\n    // and when you create one that shouldn't be\n    // deep extended (see ajaxExtend)\n    flatOptions: {\n      context: true,\n      url: true\n    }\n  },\n\n  ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n  ajaxTransport: addToPrefiltersOrTransports( transports ),\n\n  // Main method\n  ajax: function( url, options ) {\n\n    // If url is an object, simulate pre-1.5 signature\n    if ( typeof url === \"object\" ) {\n      options = url;\n      url = undefined;\n    }\n\n    // Force options to be an object\n    options = options || {};\n\n    var // Create the final options object\n      s = jQuery.ajaxSetup( {}, options ),\n      // Callbacks context\n      callbackContext = s.context || s,\n      // Context for global events\n      // It's the callbackContext if one was provided in the options\n      // and if it's a DOM node or a jQuery collection\n      globalEventContext = callbackContext !== s &&\n        ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?\n            jQuery( callbackContext ) : jQuery.event,\n      // Deferreds\n      deferred = jQuery.Deferred(),\n      completeDeferred = jQuery.Callbacks( \"once memory\" ),\n      // Status-dependent callbacks\n      statusCode = s.statusCode || {},\n      // ifModified key\n      ifModifiedKey,\n      // Headers (they are sent all at once)\n      requestHeaders = {},\n      requestHeadersNames = {},\n      // Response headers\n      responseHeadersString,\n      responseHeaders,\n      // transport\n      transport,\n      // timeout handle\n      timeoutTimer,\n      // Cross-domain detection vars\n      parts,\n      // The jqXHR state\n      state = 0,\n      // To know if global events are to be dispatched\n      fireGlobals,\n      // Loop variable\n      i,\n      // Fake xhr\n      jqXHR = {\n\n        readyState: 0,\n\n        // Caches the header\n        setRequestHeader: function( name, value ) {\n          if ( !state ) {\n            var lname = name.toLowerCase();\n            name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n            requestHeaders[ name ] = value;\n          }\n          return this;\n        },\n\n        // Raw string\n        getAllResponseHeaders: function() {\n          return state === 2 ? responseHeadersString : null;\n        },\n\n        // Builds headers hashtable if needed\n        getResponseHeader: function( key ) {\n          var match;\n          if ( state === 2 ) {\n            if ( !responseHeaders ) {\n              responseHeaders = {};\n              while( ( match = rheaders.exec( responseHeadersString ) ) ) {\n                responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\n              }\n            }\n            match = responseHeaders[ key.toLowerCase() ];\n          }\n          return match === undefined ? null : match;\n        },\n\n        // Overrides response content-type header\n        overrideMimeType: function( type ) {\n          if ( !state ) {\n            s.mimeType = type;\n          }\n          return this;\n        },\n\n        // Cancel the request\n        abort: function( statusText ) {\n          statusText = statusText || \"abort\";\n          if ( transport ) {\n            transport.abort( statusText );\n          }\n          done( 0, statusText );\n          return this;\n        }\n      };\n\n    // Callback for when everything is done\n    // It is defined here because jslint complains if it is declared\n    // at the end of the function (which would be more logical and readable)\n    function done( status, nativeStatusText, responses, headers ) {\n\n      // Called once\n      if ( state === 2 ) {\n        return;\n      }\n\n      // State is \"done\" now\n      state = 2;\n\n      // Clear timeout if it exists\n      if ( timeoutTimer ) {\n        clearTimeout( timeoutTimer );\n      }\n\n      // Dereference transport for early garbage collection\n      // (no matter how long the jqXHR object will be used)\n      transport = undefined;\n\n      // Cache response headers\n      responseHeadersString = headers || \"\";\n\n      // Set readyState\n      jqXHR.readyState = status > 0 ? 4 : 0;\n\n      var isSuccess,\n        success,\n        error,\n        statusText = nativeStatusText,\n        response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,\n        lastModified,\n        etag;\n\n      // If successful, handle type chaining\n      if ( status >= 200 && status < 300 || status === 304 ) {\n\n        // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n        if ( s.ifModified ) {\n\n          if ( ( lastModified = jqXHR.getResponseHeader( \"Last-Modified\" ) ) ) {\n            jQuery.lastModified[ ifModifiedKey ] = lastModified;\n          }\n          if ( ( etag = jqXHR.getResponseHeader( \"Etag\" ) ) ) {\n            jQuery.etag[ ifModifiedKey ] = etag;\n          }\n        }\n\n        // If not modified\n        if ( status === 304 ) {\n\n          statusText = \"notmodified\";\n          isSuccess = true;\n\n        // If we have data\n        } else {\n\n          try {\n            success = ajaxConvert( s, response );\n            statusText = \"success\";\n            isSuccess = true;\n          } catch(e) {\n            // We have a parsererror\n            statusText = \"parsererror\";\n            error = e;\n          }\n        }\n      } else {\n        // We extract error from statusText\n        // then normalize statusText and status for non-aborts\n        error = statusText;\n        if ( !statusText || status ) {\n          statusText = \"error\";\n          if ( status < 0 ) {\n            status = 0;\n          }\n        }\n      }\n\n      // Set data for the fake xhr object\n      jqXHR.status = status;\n      jqXHR.statusText = \"\" + ( nativeStatusText || statusText );\n\n      // Success/Error\n      if ( isSuccess ) {\n        deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n      } else {\n        deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n      }\n\n      // Status-dependent callbacks\n      jqXHR.statusCode( statusCode );\n      statusCode = undefined;\n\n      if ( fireGlobals ) {\n        globalEventContext.trigger( \"ajax\" + ( isSuccess ? \"Success\" : \"Error\" ),\n            [ jqXHR, s, isSuccess ? success : error ] );\n      }\n\n      // Complete\n      completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n      if ( fireGlobals ) {\n        globalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n        // Handle the global AJAX counter\n        if ( !( --jQuery.active ) ) {\n          jQuery.event.trigger( \"ajaxStop\" );\n        }\n      }\n    }\n\n    // Attach deferreds\n    deferred.promise( jqXHR );\n    jqXHR.success = jqXHR.done;\n    jqXHR.error = jqXHR.fail;\n    jqXHR.complete = completeDeferred.add;\n\n    // Status-dependent callbacks\n    jqXHR.statusCode = function( map ) {\n      if ( map ) {\n        var tmp;\n        if ( state < 2 ) {\n          for ( tmp in map ) {\n            statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];\n          }\n        } else {\n          tmp = map[ jqXHR.status ];\n          jqXHR.then( tmp, tmp );\n        }\n      }\n      return this;\n    };\n\n    // Remove hash character (#7531: and string promotion)\n    // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\n    // We also use the url parameter if available\n    s.url = ( ( url || s.url ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n    // Extract dataTypes list\n    s.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().split( rspacesAjax );\n\n    // Determine if a cross-domain request is in order\n    if ( s.crossDomain == null ) {\n      parts = rurl.exec( s.url.toLowerCase() );\n      s.crossDomain = !!( parts &&\n        ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||\n          ( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? 80 : 443 ) ) !=\n            ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? 80 : 443 ) ) )\n      );\n    }\n\n    // Convert data if not already a string\n    if ( s.data && s.processData && typeof s.data !== \"string\" ) {\n      s.data = jQuery.param( s.data, s.traditional );\n    }\n\n    // Apply prefilters\n    inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n    // If request was aborted inside a prefilter, stop there\n    if ( state === 2 ) {\n      return false;\n    }\n\n    // We can fire global events as of now if asked to\n    fireGlobals = s.global;\n\n    // Uppercase the type\n    s.type = s.type.toUpperCase();\n\n    // Determine if request has content\n    s.hasContent = !rnoContent.test( s.type );\n\n    // Watch for a new set of requests\n    if ( fireGlobals && jQuery.active++ === 0 ) {\n      jQuery.event.trigger( \"ajaxStart\" );\n    }\n\n    // More options handling for requests with no content\n    if ( !s.hasContent ) {\n\n      // If data is available, append data to url\n      if ( s.data ) {\n        s.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.data;\n        // #9682: remove data so that it's not used in an eventual retry\n        delete s.data;\n      }\n\n      // Get ifModifiedKey before adding the anti-cache parameter\n      ifModifiedKey = s.url;\n\n      // Add anti-cache in url if needed\n      if ( s.cache === false ) {\n\n        var ts = jQuery.now(),\n          // try replacing _= if it is there\n          ret = s.url.replace( rts, \"$1_=\" + ts );\n\n        // if nothing was replaced, add timestamp to the end\n        s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? \"&\" : \"?\" ) + \"_=\" + ts : \"\" );\n      }\n    }\n\n    // Set the correct header, if data is being sent\n    if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n      jqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n    }\n\n    // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n    if ( s.ifModified ) {\n      ifModifiedKey = ifModifiedKey || s.url;\n      if ( jQuery.lastModified[ ifModifiedKey ] ) {\n        jqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ ifModifiedKey ] );\n      }\n      if ( jQuery.etag[ ifModifiedKey ] ) {\n        jqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ ifModifiedKey ] );\n      }\n    }\n\n    // Set the Accepts header for the server, depending on the dataType\n    jqXHR.setRequestHeader(\n      \"Accept\",\n      s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\n        s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n        s.accepts[ \"*\" ]\n    );\n\n    // Check for headers option\n    for ( i in s.headers ) {\n      jqXHR.setRequestHeader( i, s.headers[ i ] );\n    }\n\n    // Allow custom headers/mimetypes and early abort\n    if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n        // Abort if not done already\n        jqXHR.abort();\n        return false;\n\n    }\n\n    // Install callbacks on deferreds\n    for ( i in { success: 1, error: 1, complete: 1 } ) {\n      jqXHR[ i ]( s[ i ] );\n    }\n\n    // Get transport\n    transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n    // If no transport, we auto-abort\n    if ( !transport ) {\n      done( -1, \"No Transport\" );\n    } else {\n      jqXHR.readyState = 1;\n      // Send global event\n      if ( fireGlobals ) {\n        globalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n      }\n      // Timeout\n      if ( s.async && s.timeout > 0 ) {\n        timeoutTimer = setTimeout( function(){\n          jqXHR.abort( \"timeout\" );\n        }, s.timeout );\n      }\n\n      try {\n        state = 1;\n        transport.send( requestHeaders, done );\n      } catch (e) {\n        // Propagate exception as error if not done\n        if ( state < 2 ) {\n          done( -1, e );\n        // Simply rethrow otherwise\n        } else {\n          throw e;\n        }\n      }\n    }\n\n    return jqXHR;\n  },\n\n  // Serialize an array of form elements or a set of\n  // key/values into a query string\n  param: function( a, traditional ) {\n    var s = [],\n      add = function( key, value ) {\n        // If value is a function, invoke it and return its value\n        value = jQuery.isFunction( value ) ? value() : value;\n        s[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n      };\n\n    // Set traditional to true for jQuery <= 1.3.2 behavior.\n    if ( traditional === undefined ) {\n      traditional = jQuery.ajaxSettings.traditional;\n    }\n\n    // If an array was passed in, assume that it is an array of form elements.\n    if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n      // Serialize the form elements\n      jQuery.each( a, function() {\n        add( this.name, this.value );\n      });\n\n    } else {\n      // If traditional, encode the \"old\" way (the way 1.3.2 or older\n      // did it), otherwise encode params recursively.\n      for ( var prefix in a ) {\n        buildParams( prefix, a[ prefix ], traditional, add );\n      }\n    }\n\n    // Return the resulting serialization\n    return s.join( \"&\" ).replace( r20, \"+\" );\n  }\n});\n\nfunction buildParams( prefix, obj, traditional, add ) {\n  if ( jQuery.isArray( obj ) ) {\n    // Serialize array item.\n    jQuery.each( obj, function( i, v ) {\n      if ( traditional || rbracket.test( prefix ) ) {\n        // Treat each array item as a scalar.\n        add( prefix, v );\n\n      } else {\n        // If array item is non-scalar (array or object), encode its\n        // numeric index to resolve deserialization ambiguity issues.\n        // Note that rack (as of 1.0.0) can't currently deserialize\n        // nested arrays properly, and attempting to do so may cause\n        // a server error. Possible fixes are to modify rack's\n        // deserialization algorithm or to provide an option or flag\n        // to force array serialization to be shallow.\n        buildParams( prefix + \"[\" + ( typeof v === \"object\" ? i : \"\" ) + \"]\", v, traditional, add );\n      }\n    });\n\n  } else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n    // Serialize object item.\n    for ( var name in obj ) {\n      buildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n    }\n\n  } else {\n    // Serialize scalar item.\n    add( prefix, obj );\n  }\n}\n\n// This is still on the jQuery object... for now\n// Want to move this to jQuery.ajax some day\njQuery.extend({\n\n  // Counter for holding the number of active queries\n  active: 0,\n\n  // Last-Modified header cache for next request\n  lastModified: {},\n  etag: {}\n\n});\n\n/* Handles responses to an ajax request:\n * - sets all responseXXX fields accordingly\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  var contents = s.contents,\n    dataTypes = s.dataTypes,\n    responseFields = s.responseFields,\n    ct,\n    type,\n    finalDataType,\n    firstDataType;\n\n  // Fill responseXXX fields\n  for ( type in responseFields ) {\n    if ( type in responses ) {\n      jqXHR[ responseFields[type] ] = responses[ type ];\n    }\n  }\n\n  // Remove auto dataType and get content-type in the process\n  while( dataTypes[ 0 ] === \"*\" ) {\n    dataTypes.shift();\n    if ( ct === undefined ) {\n      ct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n    }\n  }\n\n  // Check if we're dealing with a known content-type\n  if ( ct ) {\n    for ( type in contents ) {\n      if ( contents[ type ] && contents[ type ].test( ct ) ) {\n        dataTypes.unshift( type );\n        break;\n      }\n    }\n  }\n\n  // Check to see if we have a response for the expected dataType\n  if ( dataTypes[ 0 ] in responses ) {\n    finalDataType = dataTypes[ 0 ];\n  } else {\n    // Try convertible dataTypes\n    for ( type in responses ) {\n      if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n        finalDataType = type;\n        break;\n      }\n      if ( !firstDataType ) {\n        firstDataType = type;\n      }\n    }\n    // Or just use first one\n    finalDataType = finalDataType || firstDataType;\n  }\n\n  // If we found a dataType\n  // We add the dataType to the list if needed\n  // and return the corresponding response\n  if ( finalDataType ) {\n    if ( finalDataType !== dataTypes[ 0 ] ) {\n      dataTypes.unshift( finalDataType );\n    }\n    return responses[ finalDataType ];\n  }\n}\n\n// Chain conversions given the request and the original response\nfunction ajaxConvert( s, response ) {\n\n  // Apply the dataFilter if provided\n  if ( s.dataFilter ) {\n    response = s.dataFilter( response, s.dataType );\n  }\n\n  var dataTypes = s.dataTypes,\n    converters = {},\n    i,\n    key,\n    length = dataTypes.length,\n    tmp,\n    // Current and previous dataTypes\n    current = dataTypes[ 0 ],\n    prev,\n    // Conversion expression\n    conversion,\n    // Conversion function\n    conv,\n    // Conversion functions (transitive conversion)\n    conv1,\n    conv2;\n\n  // For each dataType in the chain\n  for ( i = 1; i < length; i++ ) {\n\n    // Create converters map\n    // with lowercased keys\n    if ( i === 1 ) {\n      for ( key in s.converters ) {\n        if ( typeof key === \"string\" ) {\n          converters[ key.toLowerCase() ] = s.converters[ key ];\n        }\n      }\n    }\n\n    // Get the dataTypes\n    prev = current;\n    current = dataTypes[ i ];\n\n    // If current is auto dataType, update it to prev\n    if ( current === \"*\" ) {\n      current = prev;\n    // If no auto and dataTypes are actually different\n    } else if ( prev !== \"*\" && prev !== current ) {\n\n      // Get the converter\n      conversion = prev + \" \" + current;\n      conv = converters[ conversion ] || converters[ \"* \" + current ];\n\n      // If there is no direct converter, search transitively\n      if ( !conv ) {\n        conv2 = undefined;\n        for ( conv1 in converters ) {\n          tmp = conv1.split( \" \" );\n          if ( tmp[ 0 ] === prev || tmp[ 0 ] === \"*\" ) {\n            conv2 = converters[ tmp[1] + \" \" + current ];\n            if ( conv2 ) {\n              conv1 = converters[ conv1 ];\n              if ( conv1 === true ) {\n                conv = conv2;\n              } else if ( conv2 === true ) {\n                conv = conv1;\n              }\n              break;\n            }\n          }\n        }\n      }\n      // If we found no converter, dispatch an error\n      if ( !( conv || conv2 ) ) {\n        jQuery.error( \"No conversion from \" + conversion.replace(\" \",\" to \") );\n      }\n      // If found converter is not an equivalence\n      if ( conv !== true ) {\n        // Convert with 1 or 2 converters accordingly\n        response = conv ? conv( response ) : conv2( conv1(response) );\n      }\n    }\n  }\n  return response;\n}\n\n\n\n\nvar jsc = jQuery.now(),\n  jsre = /(\\=)\\?(&|$)|\\?\\?/i;\n\n// Default jsonp settings\njQuery.ajaxSetup({\n  jsonp: \"callback\",\n  jsonpCallback: function() {\n    return jQuery.expando + \"_\" + ( jsc++ );\n  }\n});\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n  var inspectData = ( typeof s.data === \"string\" ) && /^application\\/x\\-www\\-form\\-urlencoded/.test( s.contentType );\n\n  if ( s.dataTypes[ 0 ] === \"jsonp\" ||\n    s.jsonp !== false && ( jsre.test( s.url ) ||\n        inspectData && jsre.test( s.data ) ) ) {\n\n    var responseContainer,\n      jsonpCallback = s.jsonpCallback =\n        jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,\n      previous = window[ jsonpCallback ],\n      url = s.url,\n      data = s.data,\n      replace = \"$1\" + jsonpCallback + \"$2\";\n\n    if ( s.jsonp !== false ) {\n      url = url.replace( jsre, replace );\n      if ( s.url === url ) {\n        if ( inspectData ) {\n          data = data.replace( jsre, replace );\n        }\n        if ( s.data === data ) {\n          // Add callback manually\n          url += (/\\?/.test( url ) ? \"&\" : \"?\") + s.jsonp + \"=\" + jsonpCallback;\n        }\n      }\n    }\n\n    s.url = url;\n    s.data = data;\n\n    // Install callback\n    window[ jsonpCallback ] = function( response ) {\n      responseContainer = [ response ];\n    };\n\n    // Clean-up function\n    jqXHR.always(function() {\n      // Set callback back to previous value\n      window[ jsonpCallback ] = previous;\n      // Call if it was a function and we have a response\n      if ( responseContainer && jQuery.isFunction( previous ) ) {\n        window[ jsonpCallback ]( responseContainer[ 0 ] );\n      }\n    });\n\n    // Use data converter to retrieve json after script execution\n    s.converters[\"script json\"] = function() {\n      if ( !responseContainer ) {\n        jQuery.error( jsonpCallback + \" was not called\" );\n      }\n      return responseContainer[ 0 ];\n    };\n\n    // force json dataType\n    s.dataTypes[ 0 ] = \"json\";\n\n    // Delegate to script\n    return \"script\";\n  }\n});\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup({\n  accepts: {\n    script: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n  },\n  contents: {\n    script: /javascript|ecmascript/\n  },\n  converters: {\n    \"text script\": function( text ) {\n      jQuery.globalEval( text );\n      return text;\n    }\n  }\n});\n\n// Handle cache's special case and global\njQuery.ajaxPrefilter( \"script\", function( s ) {\n  if ( s.cache === undefined ) {\n    s.cache = false;\n  }\n  if ( s.crossDomain ) {\n    s.type = \"GET\";\n    s.global = false;\n  }\n});\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function(s) {\n\n  // This transport only deals with cross domain requests\n  if ( s.crossDomain ) {\n\n    var script,\n      head = document.head || document.getElementsByTagName( \"head\" )[0] || document.documentElement;\n\n    return {\n\n      send: function( _, callback ) {\n\n        script = document.createElement( \"script\" );\n\n        script.async = \"async\";\n\n        if ( s.scriptCharset ) {\n          script.charset = s.scriptCharset;\n        }\n\n        script.src = s.url;\n\n        // Attach handlers for all browsers\n        script.onload = script.onreadystatechange = function( _, isAbort ) {\n\n          if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\n\n            // Handle memory leak in IE\n            script.onload = script.onreadystatechange = null;\n\n            // Remove the script\n            if ( head && script.parentNode ) {\n              head.removeChild( script );\n            }\n\n            // Dereference the script\n            script = undefined;\n\n            // Callback if not abort\n            if ( !isAbort ) {\n              callback( 200, \"success\" );\n            }\n          }\n        };\n        // Use insertBefore instead of appendChild  to circumvent an IE6 bug.\n        // This arises when a base node is used (#2709 and #4378).\n        head.insertBefore( script, head.firstChild );\n      },\n\n      abort: function() {\n        if ( script ) {\n          script.onload( 0, 1 );\n        }\n      }\n    };\n  }\n});\n\n\n\n\nvar // #5280: Internet Explorer will keep connections alive if we don't abort on unload\n  xhrOnUnloadAbort = window.ActiveXObject ? function() {\n    // Abort all pending requests\n    for ( var key in xhrCallbacks ) {\n      xhrCallbacks[ key ]( 0, 1 );\n    }\n  } : false,\n  xhrId = 0,\n  xhrCallbacks;\n\n// Functions to create xhrs\nfunction createStandardXHR() {\n  try {\n    return new window.XMLHttpRequest();\n  } catch( e ) {}\n}\n\nfunction createActiveXHR() {\n  try {\n    return new window.ActiveXObject( \"Microsoft.XMLHTTP\" );\n  } catch( e ) {}\n}\n\n// Create the request object\n// (This is still attached to ajaxSettings for backward compatibility)\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\n  /* Microsoft failed to properly\n   * implement the XMLHttpRequest in IE7 (can't request local files),\n   * so we use the ActiveXObject when it is available\n   * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\n   * we need a fallback.\n   */\n  function() {\n    return !this.isLocal && createStandardXHR() || createActiveXHR();\n  } :\n  // For all other browsers, use the standard XMLHttpRequest object\n  createStandardXHR;\n\n// Determine support properties\n(function( xhr ) {\n  jQuery.extend( jQuery.support, {\n    ajax: !!xhr,\n    cors: !!xhr && ( \"withCredentials\" in xhr )\n  });\n})( jQuery.ajaxSettings.xhr() );\n\n// Create transport if the browser can provide an xhr\nif ( jQuery.support.ajax ) {\n\n  jQuery.ajaxTransport(function( s ) {\n    // Cross domain only allowed if supported through XMLHttpRequest\n    if ( !s.crossDomain || jQuery.support.cors ) {\n\n      var callback;\n\n      return {\n        send: function( headers, complete ) {\n\n          // Get a new xhr\n          var xhr = s.xhr(),\n            handle,\n            i;\n\n          // Open the socket\n          // Passing null username, generates a login popup on Opera (#2865)\n          if ( s.username ) {\n            xhr.open( s.type, s.url, s.async, s.username, s.password );\n          } else {\n            xhr.open( s.type, s.url, s.async );\n          }\n\n          // Apply custom fields if provided\n          if ( s.xhrFields ) {\n            for ( i in s.xhrFields ) {\n              xhr[ i ] = s.xhrFields[ i ];\n            }\n          }\n\n          // Override mime type if needed\n          if ( s.mimeType && xhr.overrideMimeType ) {\n            xhr.overrideMimeType( s.mimeType );\n          }\n\n          // X-Requested-With header\n          // For cross-domain requests, seeing as conditions for a preflight are\n          // akin to a jigsaw puzzle, we simply never set it to be sure.\n          // (it can always be set on a per-request basis or even using ajaxSetup)\n          // For same-domain requests, won't change header if already provided.\n          if ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\n            headers[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n          }\n\n          // Need an extra try/catch for cross domain requests in Firefox 3\n          try {\n            for ( i in headers ) {\n              xhr.setRequestHeader( i, headers[ i ] );\n            }\n          } catch( _ ) {}\n\n          // Do send the request\n          // This may raise an exception which is actually\n          // handled in jQuery.ajax (so no try/catch here)\n          xhr.send( ( s.hasContent && s.data ) || null );\n\n          // Listener\n          callback = function( _, isAbort ) {\n\n            var status,\n              statusText,\n              responseHeaders,\n              responses,\n              xml;\n\n            // Firefox throws exceptions when accessing properties\n            // of an xhr when a network error occured\n            // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\n            try {\n\n              // Was never called and is aborted or complete\n              if ( callback && ( isAbort || xhr.readyState === 4 ) ) {\n\n                // Only called once\n                callback = undefined;\n\n                // Do not keep as active anymore\n                if ( handle ) {\n                  xhr.onreadystatechange = jQuery.noop;\n                  if ( xhrOnUnloadAbort ) {\n                    delete xhrCallbacks[ handle ];\n                  }\n                }\n\n                // If it's an abort\n                if ( isAbort ) {\n                  // Abort it manually if needed\n                  if ( xhr.readyState !== 4 ) {\n                    xhr.abort();\n                  }\n                } else {\n                  status = xhr.status;\n                  responseHeaders = xhr.getAllResponseHeaders();\n                  responses = {};\n                  xml = xhr.responseXML;\n\n                  // Construct response list\n                  if ( xml && xml.documentElement /* #4958 */ ) {\n                    responses.xml = xml;\n                  }\n\n                  // When requesting binary data, IE6-9 will throw an exception\n                  // on any attempt to access responseText (#11426)\n                  try {\n                    responses.text = xhr.responseText;\n                  } catch( _ ) {\n                  }\n\n                  // Firefox throws an exception when accessing\n                  // statusText for faulty cross-domain requests\n                  try {\n                    statusText = xhr.statusText;\n                  } catch( e ) {\n                    // We normalize with Webkit giving an empty statusText\n                    statusText = \"\";\n                  }\n\n                  // Filter status for non standard behaviors\n\n                  // If the request is local and we have data: assume a success\n                  // (success with no data won't get notified, that's the best we\n                  // can do given current implementations)\n                  if ( !status && s.isLocal && !s.crossDomain ) {\n                    status = responses.text ? 200 : 404;\n                  // IE - #1450: sometimes returns 1223 when it should be 204\n                  } else if ( status === 1223 ) {\n                    status = 204;\n                  }\n                }\n              }\n            } catch( firefoxAccessException ) {\n              if ( !isAbort ) {\n                complete( -1, firefoxAccessException );\n              }\n            }\n\n            // Call complete if needed\n            if ( responses ) {\n              complete( status, statusText, responses, responseHeaders );\n            }\n          };\n\n          // if we're in sync mode or it's in cache\n          // and has been retrieved directly (IE6 & IE7)\n          // we need to manually fire the callback\n          if ( !s.async || xhr.readyState === 4 ) {\n            callback();\n          } else {\n            handle = ++xhrId;\n            if ( xhrOnUnloadAbort ) {\n              // Create the active xhrs callbacks list if needed\n              // and attach the unload handler\n              if ( !xhrCallbacks ) {\n                xhrCallbacks = {};\n                jQuery( window ).unload( xhrOnUnloadAbort );\n              }\n              // Add to list of active xhrs callbacks\n              xhrCallbacks[ handle ] = callback;\n            }\n            xhr.onreadystatechange = callback;\n          }\n        },\n\n        abort: function() {\n          if ( callback ) {\n            callback(0,1);\n          }\n        }\n      };\n    }\n  });\n}\n\n\n\n\nvar elemdisplay = {},\n  iframe, iframeDoc,\n  rfxtypes = /^(?:toggle|show|hide)$/,\n  rfxnum = /^([+\\-]=)?([\\d+.\\-]+)([a-z%]*)$/i,\n  timerId,\n  fxAttrs = [\n    // height animations\n    [ \"height\", \"marginTop\", \"marginBottom\", \"paddingTop\", \"paddingBottom\" ],\n    // width animations\n    [ \"width\", \"marginLeft\", \"marginRight\", \"paddingLeft\", \"paddingRight\" ],\n    // opacity animations\n    [ \"opacity\" ]\n  ],\n  fxNow;\n\njQuery.fn.extend({\n  show: function( speed, easing, callback ) {\n    var elem, display;\n\n    if ( speed || speed === 0 ) {\n      return this.animate( genFx(\"show\", 3), speed, easing, callback );\n\n    } else {\n      for ( var i = 0, j = this.length; i < j; i++ ) {\n        elem = this[ i ];\n\n        if ( elem.style ) {\n          display = elem.style.display;\n\n          // Reset the inline display of this element to learn if it is\n          // being hidden by cascaded rules or not\n          if ( !jQuery._data(elem, \"olddisplay\") && display === \"none\" ) {\n            display = elem.style.display = \"\";\n          }\n\n          // Set elements which have been overridden with display: none\n          // in a stylesheet to whatever the default browser style is\n          // for such an element\n          if ( (display === \"\" && jQuery.css(elem, \"display\") === \"none\") ||\n            !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {\n            jQuery._data( elem, \"olddisplay\", defaultDisplay(elem.nodeName) );\n          }\n        }\n      }\n\n      // Set the display of most of the elements in a second loop\n      // to avoid the constant reflow\n      for ( i = 0; i < j; i++ ) {\n        elem = this[ i ];\n\n        if ( elem.style ) {\n          display = elem.style.display;\n\n          if ( display === \"\" || display === \"none\" ) {\n            elem.style.display = jQuery._data( elem, \"olddisplay\" ) || \"\";\n          }\n        }\n      }\n\n      return this;\n    }\n  },\n\n  hide: function( speed, easing, callback ) {\n    if ( speed || speed === 0 ) {\n      return this.animate( genFx(\"hide\", 3), speed, easing, callback);\n\n    } else {\n      var elem, display,\n        i = 0,\n        j = this.length;\n\n      for ( ; i < j; i++ ) {\n        elem = this[i];\n        if ( elem.style ) {\n          display = jQuery.css( elem, \"display\" );\n\n          if ( display !== \"none\" && !jQuery._data( elem, \"olddisplay\" ) ) {\n            jQuery._data( elem, \"olddisplay\", display );\n          }\n        }\n      }\n\n      // Set the display of the elements in a second loop\n      // to avoid the constant reflow\n      for ( i = 0; i < j; i++ ) {\n        if ( this[i].style ) {\n          this[i].style.display = \"none\";\n        }\n      }\n\n      return this;\n    }\n  },\n\n  // Save the old toggle function\n  _toggle: jQuery.fn.toggle,\n\n  toggle: function( fn, fn2, callback ) {\n    var bool = typeof fn === \"boolean\";\n\n    if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {\n      this._toggle.apply( this, arguments );\n\n    } else if ( fn == null || bool ) {\n      this.each(function() {\n        var state = bool ? fn : jQuery(this).is(\":hidden\");\n        jQuery(this)[ state ? \"show\" : \"hide\" ]();\n      });\n\n    } else {\n      this.animate(genFx(\"toggle\", 3), fn, fn2, callback);\n    }\n\n    return this;\n  },\n\n  fadeTo: function( speed, to, easing, callback ) {\n    return this.filter(\":hidden\").css(\"opacity\", 0).show().end()\n          .animate({opacity: to}, speed, easing, callback);\n  },\n\n  animate: function( prop, speed, easing, callback ) {\n    var optall = jQuery.speed( speed, easing, callback );\n\n    if ( jQuery.isEmptyObject( prop ) ) {\n      return this.each( optall.complete, [ false ] );\n    }\n\n    // Do not change referenced properties as per-property easing will be lost\n    prop = jQuery.extend( {}, prop );\n\n    function doAnimation() {\n      // XXX 'this' does not always have a nodeName when running the\n      // test suite\n\n      if ( optall.queue === false ) {\n        jQuery._mark( this );\n      }\n\n      var opt = jQuery.extend( {}, optall ),\n        isElement = this.nodeType === 1,\n        hidden = isElement && jQuery(this).is(\":hidden\"),\n        name, val, p, e, hooks, replace,\n        parts, start, end, unit,\n        method;\n\n      // will store per property easing and be used to determine when an animation is complete\n      opt.animatedProperties = {};\n\n      // first pass over propertys to expand / normalize\n      for ( p in prop ) {\n        name = jQuery.camelCase( p );\n        if ( p !== name ) {\n          prop[ name ] = prop[ p ];\n          delete prop[ p ];\n        }\n\n        if ( ( hooks = jQuery.cssHooks[ name ] ) && \"expand\" in hooks ) {\n          replace = hooks.expand( prop[ name ] );\n          delete prop[ name ];\n\n          // not quite $.extend, this wont overwrite keys already present.\n          // also - reusing 'p' from above because we have the correct \"name\"\n          for ( p in replace ) {\n            if ( ! ( p in prop ) ) {\n              prop[ p ] = replace[ p ];\n            }\n          }\n        }\n      }\n\n      for ( name in prop ) {\n        val = prop[ name ];\n        // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)\n        if ( jQuery.isArray( val ) ) {\n          opt.animatedProperties[ name ] = val[ 1 ];\n          val = prop[ name ] = val[ 0 ];\n        } else {\n          opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';\n        }\n\n        if ( val === \"hide\" && hidden || val === \"show\" && !hidden ) {\n          return opt.complete.call( this );\n        }\n\n        if ( isElement && ( name === \"height\" || name === \"width\" ) ) {\n          // Make sure that nothing sneaks out\n          // Record all 3 overflow attributes because IE does not\n          // change the overflow attribute when overflowX and\n          // overflowY are set to the same value\n          opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];\n\n          // Set display property to inline-block for height/width\n          // animations on inline elements that are having width/height animated\n          if ( jQuery.css( this, \"display\" ) === \"inline\" &&\n              jQuery.css( this, \"float\" ) === \"none\" ) {\n\n            // inline-level elements accept inline-block;\n            // block-level elements need to be inline with layout\n            if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === \"inline\" ) {\n              this.style.display = \"inline-block\";\n\n            } else {\n              this.style.zoom = 1;\n            }\n          }\n        }\n      }\n\n      if ( opt.overflow != null ) {\n        this.style.overflow = \"hidden\";\n      }\n\n      for ( p in prop ) {\n        e = new jQuery.fx( this, opt, p );\n        val = prop[ p ];\n\n        if ( rfxtypes.test( val ) ) {\n\n          // Tracks whether to show or hide based on private\n          // data attached to the element\n          method = jQuery._data( this, \"toggle\" + p ) || ( val === \"toggle\" ? hidden ? \"show\" : \"hide\" : 0 );\n          if ( method ) {\n            jQuery._data( this, \"toggle\" + p, method === \"show\" ? \"hide\" : \"show\" );\n            e[ method ]();\n          } else {\n            e[ val ]();\n          }\n\n        } else {\n          parts = rfxnum.exec( val );\n          start = e.cur();\n\n          if ( parts ) {\n            end = parseFloat( parts[2] );\n            unit = parts[3] || ( jQuery.cssNumber[ p ] ? \"\" : \"px\" );\n\n            // We need to compute starting value\n            if ( unit !== \"px\" ) {\n              jQuery.style( this, p, (end || 1) + unit);\n              start = ( (end || 1) / e.cur() ) * start;\n              jQuery.style( this, p, start + unit);\n            }\n\n            // If a +=/-= token was provided, we're doing a relative animation\n            if ( parts[1] ) {\n              end = ( (parts[ 1 ] === \"-=\" ? -1 : 1) * end ) + start;\n            }\n\n            e.custom( start, end, unit );\n\n          } else {\n            e.custom( start, val, \"\" );\n          }\n        }\n      }\n\n      // For JS strict compliance\n      return true;\n    }\n\n    return optall.queue === false ?\n      this.each( doAnimation ) :\n      this.queue( optall.queue, doAnimation );\n  },\n\n  stop: function( type, clearQueue, gotoEnd ) {\n    if ( typeof type !== \"string\" ) {\n      gotoEnd = clearQueue;\n      clearQueue = type;\n      type = undefined;\n    }\n    if ( clearQueue && type !== false ) {\n      this.queue( type || \"fx\", [] );\n    }\n\n    return this.each(function() {\n      var index,\n        hadTimers = false,\n        timers = jQuery.timers,\n        data = jQuery._data( this );\n\n      // clear marker counters if we know they won't be\n      if ( !gotoEnd ) {\n        jQuery._unmark( true, this );\n      }\n\n      function stopQueue( elem, data, index ) {\n        var hooks = data[ index ];\n        jQuery.removeData( elem, index, true );\n        hooks.stop( gotoEnd );\n      }\n\n      if ( type == null ) {\n        for ( index in data ) {\n          if ( data[ index ] && data[ index ].stop && index.indexOf(\".run\") === index.length - 4 ) {\n            stopQueue( this, data, index );\n          }\n        }\n      } else if ( data[ index = type + \".run\" ] && data[ index ].stop ){\n        stopQueue( this, data, index );\n      }\n\n      for ( index = timers.length; index--; ) {\n        if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\n          if ( gotoEnd ) {\n\n            // force the next step to be the last\n            timers[ index ]( true );\n          } else {\n            timers[ index ].saveState();\n          }\n          hadTimers = true;\n          timers.splice( index, 1 );\n        }\n      }\n\n      // start the next in the queue if the last step wasn't forced\n      // timers currently will call their complete callbacks, which will dequeue\n      // but only if they were gotoEnd\n      if ( !( gotoEnd && hadTimers ) ) {\n        jQuery.dequeue( this, type );\n      }\n    });\n  }\n\n});\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n  setTimeout( clearFxNow, 0 );\n  return ( fxNow = jQuery.now() );\n}\n\nfunction clearFxNow() {\n  fxNow = undefined;\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, num ) {\n  var obj = {};\n\n  jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {\n    obj[ this ] = type;\n  });\n\n  return obj;\n}\n\n// Generate shortcuts for custom animations\njQuery.each({\n  slideDown: genFx( \"show\", 1 ),\n  slideUp: genFx( \"hide\", 1 ),\n  slideToggle: genFx( \"toggle\", 1 ),\n  fadeIn: { opacity: \"show\" },\n  fadeOut: { opacity: \"hide\" },\n  fadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n  jQuery.fn[ name ] = function( speed, easing, callback ) {\n    return this.animate( props, speed, easing, callback );\n  };\n});\n\njQuery.extend({\n  speed: function( speed, easing, fn ) {\n    var opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n      complete: fn || !fn && easing ||\n        jQuery.isFunction( speed ) && speed,\n      duration: speed,\n      easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n    };\n\n    opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n      opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n    // normalize opt.queue - true/undefined/null -> \"fx\"\n    if ( opt.queue == null || opt.queue === true ) {\n      opt.queue = \"fx\";\n    }\n\n    // Queueing\n    opt.old = opt.complete;\n\n    opt.complete = function( noUnmark ) {\n      if ( jQuery.isFunction( opt.old ) ) {\n        opt.old.call( this );\n      }\n\n      if ( opt.queue ) {\n        jQuery.dequeue( this, opt.queue );\n      } else if ( noUnmark !== false ) {\n        jQuery._unmark( this );\n      }\n    };\n\n    return opt;\n  },\n\n  easing: {\n    linear: function( p ) {\n      return p;\n    },\n    swing: function( p ) {\n      return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5;\n    }\n  },\n\n  timers: [],\n\n  fx: function( elem, options, prop ) {\n    this.options = options;\n    this.elem = elem;\n    this.prop = prop;\n\n    options.orig = options.orig || {};\n  }\n\n});\n\njQuery.fx.prototype = {\n  // Simple function for setting a style value\n  update: function() {\n    if ( this.options.step ) {\n      this.options.step.call( this.elem, this.now, this );\n    }\n\n    ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );\n  },\n\n  // Get the current size\n  cur: function() {\n    if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {\n      return this.elem[ this.prop ];\n    }\n\n    var parsed,\n      r = jQuery.css( this.elem, this.prop );\n    // Empty strings, null, undefined and \"auto\" are converted to 0,\n    // complex values such as \"rotate(1rad)\" are returned as is,\n    // simple values such as \"10px\" are parsed to Float.\n    return isNaN( parsed = parseFloat( r ) ) ? !r || r === \"auto\" ? 0 : r : parsed;\n  },\n\n  // Start an animation from one number to another\n  custom: function( from, to, unit ) {\n    var self = this,\n      fx = jQuery.fx;\n\n    this.startTime = fxNow || createFxNow();\n    this.end = to;\n    this.now = this.start = from;\n    this.pos = this.state = 0;\n    this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? \"\" : \"px\" );\n\n    function t( gotoEnd ) {\n      return self.step( gotoEnd );\n    }\n\n    t.queue = this.options.queue;\n    t.elem = this.elem;\n    t.saveState = function() {\n      if ( jQuery._data( self.elem, \"fxshow\" + self.prop ) === undefined ) {\n        if ( self.options.hide ) {\n          jQuery._data( self.elem, \"fxshow\" + self.prop, self.start );\n        } else if ( self.options.show ) {\n          jQuery._data( self.elem, \"fxshow\" + self.prop, self.end );\n        }\n      }\n    };\n\n    if ( t() && jQuery.timers.push(t) && !timerId ) {\n      timerId = setInterval( fx.tick, fx.interval );\n    }\n  },\n\n  // Simple 'show' function\n  show: function() {\n    var dataShow = jQuery._data( this.elem, \"fxshow\" + this.prop );\n\n    // Remember where we started, so that we can go back to it later\n    this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );\n    this.options.show = true;\n\n    // Begin the animation\n    // Make sure that we start at a small width/height to avoid any flash of content\n    if ( dataShow !== undefined ) {\n      // This show is picking up where a previous hide or show left off\n      this.custom( this.cur(), dataShow );\n    } else {\n      this.custom( this.prop === \"width\" || this.prop === \"height\" ? 1 : 0, this.cur() );\n    }\n\n    // Start by showing the element\n    jQuery( this.elem ).show();\n  },\n\n  // Simple 'hide' function\n  hide: function() {\n    // Remember where we started, so that we can go back to it later\n    this.options.orig[ this.prop ] = jQuery._data( this.elem, \"fxshow\" + this.prop ) || jQuery.style( this.elem, this.prop );\n    this.options.hide = true;\n\n    // Begin the animation\n    this.custom( this.cur(), 0 );\n  },\n\n  // Each step of an animation\n  step: function( gotoEnd ) {\n    var p, n, complete,\n      t = fxNow || createFxNow(),\n      done = true,\n      elem = this.elem,\n      options = this.options;\n\n    if ( gotoEnd || t >= options.duration + this.startTime ) {\n      this.now = this.end;\n      this.pos = this.state = 1;\n      this.update();\n\n      options.animatedProperties[ this.prop ] = true;\n\n      for ( p in options.animatedProperties ) {\n        if ( options.animatedProperties[ p ] !== true ) {\n          done = false;\n        }\n      }\n\n      if ( done ) {\n        // Reset the overflow\n        if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {\n\n          jQuery.each( [ \"\", \"X\", \"Y\" ], function( index, value ) {\n            elem.style[ \"overflow\" + value ] = options.overflow[ index ];\n          });\n        }\n\n        // Hide the element if the \"hide\" operation was done\n        if ( options.hide ) {\n          jQuery( elem ).hide();\n        }\n\n        // Reset the properties, if the item has been hidden or shown\n        if ( options.hide || options.show ) {\n          for ( p in options.animatedProperties ) {\n            jQuery.style( elem, p, options.orig[ p ] );\n            jQuery.removeData( elem, \"fxshow\" + p, true );\n            // Toggle data is no longer needed\n            jQuery.removeData( elem, \"toggle\" + p, true );\n          }\n        }\n\n        // Execute the complete function\n        // in the event that the complete function throws an exception\n        // we must ensure it won't be called twice. #5684\n\n        complete = options.complete;\n        if ( complete ) {\n\n          options.complete = false;\n          complete.call( elem );\n        }\n      }\n\n      return false;\n\n    } else {\n      // classical easing cannot be used with an Infinity duration\n      if ( options.duration == Infinity ) {\n        this.now = t;\n      } else {\n        n = t - this.startTime;\n        this.state = n / options.duration;\n\n        // Perform the easing function, defaults to swing\n        this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );\n        this.now = this.start + ( (this.end - this.start) * this.pos );\n      }\n      // Perform the next step of the animation\n      this.update();\n    }\n\n    return true;\n  }\n};\n\njQuery.extend( jQuery.fx, {\n  tick: function() {\n    var timer,\n      timers = jQuery.timers,\n      i = 0;\n\n    for ( ; i < timers.length; i++ ) {\n      timer = timers[ i ];\n      // Checks the timer has not already been removed\n      if ( !timer() && timers[ i ] === timer ) {\n        timers.splice( i--, 1 );\n      }\n    }\n\n    if ( !timers.length ) {\n      jQuery.fx.stop();\n    }\n  },\n\n  interval: 13,\n\n  stop: function() {\n    clearInterval( timerId );\n    timerId = null;\n  },\n\n  speeds: {\n    slow: 600,\n    fast: 200,\n    // Default speed\n    _default: 400\n  },\n\n  step: {\n    opacity: function( fx ) {\n      jQuery.style( fx.elem, \"opacity\", fx.now );\n    },\n\n    _default: function( fx ) {\n      if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {\n        fx.elem.style[ fx.prop ] = fx.now + fx.unit;\n      } else {\n        fx.elem[ fx.prop ] = fx.now;\n      }\n    }\n  }\n});\n\n// Ensure props that can't be negative don't go there on undershoot easing\njQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) {\n  // exclude marginTop, marginLeft, marginBottom and marginRight from this list\n  if ( prop.indexOf( \"margin\" ) ) {\n    jQuery.fx.step[ prop ] = function( fx ) {\n      jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );\n    };\n  }\n});\n\nif ( jQuery.expr && jQuery.expr.filters ) {\n  jQuery.expr.filters.animated = function( elem ) {\n    return jQuery.grep(jQuery.timers, function( fn ) {\n      return elem === fn.elem;\n    }).length;\n  };\n}\n\n// Try to restore the default display value of an element\nfunction defaultDisplay( nodeName ) {\n\n  if ( !elemdisplay[ nodeName ] ) {\n\n    var body = document.body,\n      elem = jQuery( \"<\" + nodeName + \">\" ).appendTo( body ),\n      display = elem.css( \"display\" );\n    elem.remove();\n\n    // If the simple way fails,\n    // get element's real default display by attaching it to a temp iframe\n    if ( display === \"none\" || display === \"\" ) {\n      // No iframe to use yet, so create it\n      if ( !iframe ) {\n        iframe = document.createElement( \"iframe\" );\n        iframe.frameBorder = iframe.width = iframe.height = 0;\n      }\n\n      body.appendChild( iframe );\n\n      // Create a cacheable copy of the iframe document on first call.\n      // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML\n      // document to it; WebKit & Firefox won't allow reusing the iframe document.\n      if ( !iframeDoc || !iframe.createElement ) {\n        iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;\n        iframeDoc.write( ( jQuery.support.boxModel ? \"<!doctype html>\" : \"\" ) + \"<html><body>\" );\n        iframeDoc.close();\n      }\n\n      elem = iframeDoc.createElement( nodeName );\n\n      iframeDoc.body.appendChild( elem );\n\n      display = jQuery.css( elem, \"display\" );\n      body.removeChild( iframe );\n    }\n\n    // Store the correct default display\n    elemdisplay[ nodeName ] = display;\n  }\n\n  return elemdisplay[ nodeName ];\n}\n\n\n\n\nvar getOffset,\n  rtable = /^t(?:able|d|h)$/i,\n  rroot = /^(?:body|html)$/i;\n\nif ( \"getBoundingClientRect\" in document.documentElement ) {\n  getOffset = function( elem, doc, docElem, box ) {\n    try {\n      box = elem.getBoundingClientRect();\n    } catch(e) {}\n\n    // Make sure we're not dealing with a disconnected DOM node\n    if ( !box || !jQuery.contains( docElem, elem ) ) {\n      return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };\n    }\n\n    var body = doc.body,\n      win = getWindow( doc ),\n      clientTop  = docElem.clientTop  || body.clientTop  || 0,\n      clientLeft = docElem.clientLeft || body.clientLeft || 0,\n      scrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,\n      scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,\n      top  = box.top  + scrollTop  - clientTop,\n      left = box.left + scrollLeft - clientLeft;\n\n    return { top: top, left: left };\n  };\n\n} else {\n  getOffset = function( elem, doc, docElem ) {\n    var computedStyle,\n      offsetParent = elem.offsetParent,\n      prevOffsetParent = elem,\n      body = doc.body,\n      defaultView = doc.defaultView,\n      prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,\n      top = elem.offsetTop,\n      left = elem.offsetLeft;\n\n    while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {\n      if ( jQuery.support.fixedPosition && prevComputedStyle.position === \"fixed\" ) {\n        break;\n      }\n\n      computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;\n      top  -= elem.scrollTop;\n      left -= elem.scrollLeft;\n\n      if ( elem === offsetParent ) {\n        top  += elem.offsetTop;\n        left += elem.offsetLeft;\n\n        if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {\n          top  += parseFloat( computedStyle.borderTopWidth  ) || 0;\n          left += parseFloat( computedStyle.borderLeftWidth ) || 0;\n        }\n\n        prevOffsetParent = offsetParent;\n        offsetParent = elem.offsetParent;\n      }\n\n      if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== \"visible\" ) {\n        top  += parseFloat( computedStyle.borderTopWidth  ) || 0;\n        left += parseFloat( computedStyle.borderLeftWidth ) || 0;\n      }\n\n      prevComputedStyle = computedStyle;\n    }\n\n    if ( prevComputedStyle.position === \"relative\" || prevComputedStyle.position === \"static\" ) {\n      top  += body.offsetTop;\n      left += body.offsetLeft;\n    }\n\n    if ( jQuery.support.fixedPosition && prevComputedStyle.position === \"fixed\" ) {\n      top  += Math.max( docElem.scrollTop, body.scrollTop );\n      left += Math.max( docElem.scrollLeft, body.scrollLeft );\n    }\n\n    return { top: top, left: left };\n  };\n}\n\njQuery.fn.offset = function( options ) {\n  if ( arguments.length ) {\n    return options === undefined ?\n      this :\n      this.each(function( i ) {\n        jQuery.offset.setOffset( this, options, i );\n      });\n  }\n\n  var elem = this[0],\n    doc = elem && elem.ownerDocument;\n\n  if ( !doc ) {\n    return null;\n  }\n\n  if ( elem === doc.body ) {\n    return jQuery.offset.bodyOffset( elem );\n  }\n\n  return getOffset( elem, doc, doc.documentElement );\n};\n\njQuery.offset = {\n\n  bodyOffset: function( body ) {\n    var top = body.offsetTop,\n      left = body.offsetLeft;\n\n    if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {\n      top  += parseFloat( jQuery.css(body, \"marginTop\") ) || 0;\n      left += parseFloat( jQuery.css(body, \"marginLeft\") ) || 0;\n    }\n\n    return { top: top, left: left };\n  },\n\n  setOffset: function( elem, options, i ) {\n    var position = jQuery.css( elem, \"position\" );\n\n    // set position first, in-case top/left are set even on static elem\n    if ( position === \"static\" ) {\n      elem.style.position = \"relative\";\n    }\n\n    var curElem = jQuery( elem ),\n      curOffset = curElem.offset(),\n      curCSSTop = jQuery.css( elem, \"top\" ),\n      curCSSLeft = jQuery.css( elem, \"left\" ),\n      calculatePosition = ( position === \"absolute\" || position === \"fixed\" ) && jQuery.inArray(\"auto\", [curCSSTop, curCSSLeft]) > -1,\n      props = {}, curPosition = {}, curTop, curLeft;\n\n    // need to be able to calculate position if either top or left is auto and position is either absolute or fixed\n    if ( calculatePosition ) {\n      curPosition = curElem.position();\n      curTop = curPosition.top;\n      curLeft = curPosition.left;\n    } else {\n      curTop = parseFloat( curCSSTop ) || 0;\n      curLeft = parseFloat( curCSSLeft ) || 0;\n    }\n\n    if ( jQuery.isFunction( options ) ) {\n      options = options.call( elem, i, curOffset );\n    }\n\n    if ( options.top != null ) {\n      props.top = ( options.top - curOffset.top ) + curTop;\n    }\n    if ( options.left != null ) {\n      props.left = ( options.left - curOffset.left ) + curLeft;\n    }\n\n    if ( \"using\" in options ) {\n      options.using.call( elem, props );\n    } else {\n      curElem.css( props );\n    }\n  }\n};\n\n\njQuery.fn.extend({\n\n  position: function() {\n    if ( !this[0] ) {\n      return null;\n    }\n\n    var elem = this[0],\n\n    // Get *real* offsetParent\n    offsetParent = this.offsetParent(),\n\n    // Get correct offsets\n    offset       = this.offset(),\n    parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();\n\n    // Subtract element margins\n    // note: when an element has margin: auto the offsetLeft and marginLeft\n    // are the same in Safari causing offset.left to incorrectly be 0\n    offset.top  -= parseFloat( jQuery.css(elem, \"marginTop\") ) || 0;\n    offset.left -= parseFloat( jQuery.css(elem, \"marginLeft\") ) || 0;\n\n    // Add offsetParent borders\n    parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], \"borderTopWidth\") ) || 0;\n    parentOffset.left += parseFloat( jQuery.css(offsetParent[0], \"borderLeftWidth\") ) || 0;\n\n    // Subtract the two offsets\n    return {\n      top:  offset.top  - parentOffset.top,\n      left: offset.left - parentOffset.left\n    };\n  },\n\n  offsetParent: function() {\n    return this.map(function() {\n      var offsetParent = this.offsetParent || document.body;\n      while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, \"position\") === \"static\") ) {\n        offsetParent = offsetParent.offsetParent;\n      }\n      return offsetParent;\n    });\n  }\n});\n\n\n// Create scrollLeft and scrollTop methods\njQuery.each( {scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\"}, function( method, prop ) {\n  var top = /Y/.test( prop );\n\n  jQuery.fn[ method ] = function( val ) {\n    return jQuery.access( this, function( elem, method, val ) {\n      var win = getWindow( elem );\n\n      if ( val === undefined ) {\n        return win ? (prop in win) ? win[ prop ] :\n          jQuery.support.boxModel && win.document.documentElement[ method ] ||\n            win.document.body[ method ] :\n          elem[ method ];\n      }\n\n      if ( win ) {\n        win.scrollTo(\n          !top ? val : jQuery( win ).scrollLeft(),\n           top ? val : jQuery( win ).scrollTop()\n        );\n\n      } else {\n        elem[ method ] = val;\n      }\n    }, method, val, arguments.length, null );\n  };\n});\n\nfunction getWindow( elem ) {\n  return jQuery.isWindow( elem ) ?\n    elem :\n    elem.nodeType === 9 ?\n      elem.defaultView || elem.parentWindow :\n      false;\n}\n\n\n\n\n// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n  var clientProp = \"client\" + name,\n    scrollProp = \"scroll\" + name,\n    offsetProp = \"offset\" + name;\n\n  // innerHeight and innerWidth\n  jQuery.fn[ \"inner\" + name ] = function() {\n    var elem = this[0];\n    return elem ?\n      elem.style ?\n      parseFloat( jQuery.css( elem, type, \"padding\" ) ) :\n      this[ type ]() :\n      null;\n  };\n\n  // outerHeight and outerWidth\n  jQuery.fn[ \"outer\" + name ] = function( margin ) {\n    var elem = this[0];\n    return elem ?\n      elem.style ?\n      parseFloat( jQuery.css( elem, type, margin ? \"margin\" : \"border\" ) ) :\n      this[ type ]() :\n      null;\n  };\n\n  jQuery.fn[ type ] = function( value ) {\n    return jQuery.access( this, function( elem, type, value ) {\n      var doc, docElemProp, orig, ret;\n\n      if ( jQuery.isWindow( elem ) ) {\n        // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat\n        doc = elem.document;\n        docElemProp = doc.documentElement[ clientProp ];\n        return jQuery.support.boxModel && docElemProp ||\n          doc.body && doc.body[ clientProp ] || docElemProp;\n      }\n\n      // Get document width or height\n      if ( elem.nodeType === 9 ) {\n        // Either scroll[Width/Height] or offset[Width/Height], whichever is greater\n        doc = elem.documentElement;\n\n        // when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height]\n        // so we can't use max, as it'll choose the incorrect offset[Width/Height]\n        // instead we use the correct client[Width/Height]\n        // support:IE6\n        if ( doc[ clientProp ] >= doc[ scrollProp ] ) {\n          return doc[ clientProp ];\n        }\n\n        return Math.max(\n          elem.body[ scrollProp ], doc[ scrollProp ],\n          elem.body[ offsetProp ], doc[ offsetProp ]\n        );\n      }\n\n      // Get width or height on the element\n      if ( value === undefined ) {\n        orig = jQuery.css( elem, type );\n        ret = parseFloat( orig );\n        return jQuery.isNumeric( ret ) ? ret : orig;\n      }\n\n      // Set the width or height on the element\n      jQuery( elem ).css( type, value );\n    }, type, value, arguments.length, null );\n  };\n});\n\n\n\n\n// Expose jQuery to the global object\nwindow.jQuery = window.$ = jQuery;\n\n// Expose jQuery as an AMD module, but only for AMD loaders that\n// understand the issues with loading multiple versions of jQuery\n// in a page that all might call define(). The loader will indicate\n// they have special allowances for multiple jQuery versions by\n// specifying define.amd.jQuery = true. Register as a named module,\n// since jQuery can be concatenated with other files that may use define,\n// but not use a proper concatenation script that understands anonymous\n// AMD modules. A named AMD is safest and most robust way to register.\n// Lowercase jquery is used because AMD module names are derived from\n// file names, and jQuery is normally delivered in a lowercase file name.\n// Do this after creating the global so that if an AMD module wants to call\n// noConflict to hide this version of jQuery, it will work.\nif ( typeof define === \"function\" && define.amd && define.amd.jQuery ) {\n  define( \"jquery\", [], function () { return jQuery; } );\n}\n\n\n\n})( window );"
  },
  {
    "path": "src/main/resources/static/js/jquery.validate.js",
    "content": "/**\n * jQuery Validation Plugin @VERSION\n *\n * http://bassistance.de/jquery-plugins/jquery-plugin-validation/\n * http://docs.jquery.com/Plugins/Validation\n *\n * Copyright (c) 2012 JÃ¶rn Zaefferer\n *\n * Dual licensed under the MIT and GPL licenses:\n *   http://www.opensource.org/licenses/mit-license.php\n *   http://www.gnu.org/licenses/gpl.html\n */\n\n(function($) {\n\n$.extend($.fn, {\n  // http://docs.jquery.com/Plugins/Validation/validate\n  validate: function( options ) {\n\n    // if nothing is selected, return nothing; can't chain anyway\n    if (!this.length) {\n      if (options && options.debug && window.console) {\n        console.warn( \"nothing selected, can't validate, returning nothing\" );\n      }\n      return;\n    }\n\n    // check if a validator for this form was already created\n    var validator = $.data(this[0], 'validator');\n    if ( validator ) {\n      return validator;\n    }\n\n    // Add novalidate tag if HTML5.\n    this.attr('novalidate', 'novalidate');\n\n    validator = new $.validator( options, this[0] );\n    $.data(this[0], 'validator', validator);\n\n    if ( validator.settings.onsubmit ) {\n\n      this.validateDelegate( \":submit\", \"click\", function(ev) {\n        if ( validator.settings.submitHandler ) {\n          validator.submitButton = ev.target;\n        }\n        // allow suppressing validation by adding a cancel class to the submit button\n        if ( $(ev.target).hasClass('cancel') ) {\n          validator.cancelSubmit = true;\n        }\n      });\n\n      // validate the form on submit\n      this.submit( function( event ) {\n        if ( validator.settings.debug ) {\n          // prevent form submit to be able to see console output\n          event.preventDefault();\n        }\n        function handle() {\n          var hidden;\n          if ( validator.settings.submitHandler ) {\n            if (validator.submitButton) {\n              // insert a hidden input as a replacement for the missing submit button\n              hidden = $(\"<input type='hidden'/>\").attr(\"name\", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);\n            }\n            validator.settings.submitHandler.call( validator, validator.currentForm, event );\n            if (validator.submitButton) {\n              // and clean up afterwards; thanks to no-block-scope, hidden can be referenced\n              hidden.remove();\n            }\n            return false;\n          }\n          return true;\n        }\n\n        // prevent submit for invalid forms or custom submit handlers\n        if ( validator.cancelSubmit ) {\n          validator.cancelSubmit = false;\n          return handle();\n        }\n        if ( validator.form() ) {\n          if ( validator.pendingRequest ) {\n            validator.formSubmitted = true;\n            return false;\n          }\n          return handle();\n        } else {\n          validator.focusInvalid();\n          return false;\n        }\n      });\n    }\n\n    return validator;\n  },\n  // http://docs.jquery.com/Plugins/Validation/valid\n  valid: function() {\n    if ( $(this[0]).is('form')) {\n      return this.validate().form();\n    } else {\n      var valid = true;\n      var validator = $(this[0].form).validate();\n      this.each(function() {\n        valid &= validator.element(this);\n      });\n      return valid;\n    }\n  },\n  // attributes: space seperated list of attributes to retrieve and remove\n  removeAttrs: function(attributes) {\n    var result = {},\n      $element = this;\n    $.each(attributes.split(/\\s/), function(index, value) {\n      result[value] = $element.attr(value);\n      $element.removeAttr(value);\n    });\n    return result;\n  },\n  // http://docs.jquery.com/Plugins/Validation/rules\n  rules: function(command, argument) {\n    var element = this[0];\n\n    if (command) {\n      var settings = $.data(element.form, 'validator').settings;\n      var staticRules = settings.rules;\n      var existingRules = $.validator.staticRules(element);\n      switch(command) {\n      case \"add\":\n        $.extend(existingRules, $.validator.normalizeRule(argument));\n        staticRules[element.name] = existingRules;\n        if (argument.messages) {\n          settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n        }\n        break;\n      case \"remove\":\n        if (!argument) {\n          delete staticRules[element.name];\n          return existingRules;\n        }\n        var filtered = {};\n        $.each(argument.split(/\\s/), function(index, method) {\n          filtered[method] = existingRules[method];\n          delete existingRules[method];\n        });\n        return filtered;\n      }\n    }\n\n    var data = $.validator.normalizeRules(\n    $.extend(\n      {},\n      $.validator.metadataRules(element),\n      $.validator.classRules(element),\n      $.validator.attributeRules(element),\n      $.validator.staticRules(element)\n    ), element);\n\n    // make sure required is at front\n    if (data.required) {\n      var param = data.required;\n      delete data.required;\n      data = $.extend({required: param}, data);\n    }\n\n    return data;\n  }\n});\n\n// Custom selectors\n$.extend($.expr[\":\"], {\n  // http://docs.jquery.com/Plugins/Validation/blank\n  blank: function(a) {return !$.trim(\"\" + a.value);},\n  // http://docs.jquery.com/Plugins/Validation/filled\n  filled: function(a) {return !!$.trim(\"\" + a.value);},\n  // http://docs.jquery.com/Plugins/Validation/unchecked\n  unchecked: function(a) {return !a.checked;}\n});\n\n// constructor for validator\n$.validator = function( options, form ) {\n  this.settings = $.extend( true, {}, $.validator.defaults, options );\n  this.currentForm = form;\n  this.init();\n};\n\n$.validator.format = function(source, params) {\n  if ( arguments.length === 1 ) {\n    return function() {\n      var args = $.makeArray(arguments);\n      args.unshift(source);\n      return $.validator.format.apply( this, args );\n    };\n  }\n  if ( arguments.length > 2 && params.constructor !== Array  ) {\n    params = $.makeArray(arguments).slice(1);\n  }\n  if ( params.constructor !== Array ) {\n    params = [ params ];\n  }\n  $.each(params, function(i, n) {\n    source = source.replace(new RegExp(\"\\\\{\" + i + \"\\\\}\", \"g\"), n);\n  });\n  return source;\n};\n\n$.extend($.validator, {\n\n  defaults: {\n    messages: {},\n    groups: {},\n    rules: {},\n    errorClass: \"error\",\n    validClass: \"valid\",\n    errorElement: \"label\",\n    focusInvalid: true,\n    errorContainer: $( [] ),\n    errorLabelContainer: $( [] ),\n    onsubmit: true,\n    ignore: \":hidden\",\n    ignoreTitle: false,\n    onfocusin: function(element, event) {\n      this.lastActive = element;\n\n      // hide error label and remove error class on focus if enabled\n      if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {\n        if ( this.settings.unhighlight ) {\n          this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n        }\n        this.addWrapper(this.errorsFor(element)).hide();\n      }\n    },\n    onfocusout: function(element, event) {\n      if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {\n        this.element(element);\n      }\n    },\n    onkeyup: function(element, event) {\n      if ( element.name in this.submitted || element === this.lastElement ) {\n        this.element(element);\n      }\n    },\n    onclick: function(element, event) {\n      // click on selects, radiobuttons and checkboxes\n      if ( element.name in this.submitted ) {\n        this.element(element);\n      }\n      // or option elements, check parent select in that case\n      else if (element.parentNode.name in this.submitted) {\n        this.element(element.parentNode);\n      }\n    },\n    highlight: function(element, errorClass, validClass) {\n      if (element.type === 'radio') {\n        this.findByName(element.name).addClass(errorClass).removeClass(validClass);\n      } else {\n        $(element).addClass(errorClass).removeClass(validClass);\n      }\n    },\n    unhighlight: function(element, errorClass, validClass) {\n      if (element.type === 'radio') {\n        this.findByName(element.name).removeClass(errorClass).addClass(validClass);\n      } else {\n        $(element).removeClass(errorClass).addClass(validClass);\n      }\n    }\n  },\n\n  // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults\n  setDefaults: function(settings) {\n    $.extend( $.validator.defaults, settings );\n  },\n\n  messages: {\n    required: \"This field is required.\",\n    remote: \"Please fix this field.\",\n    email: \"Please enter a valid email address.\",\n    url: \"Please enter a valid URL.\",\n    date: \"Please enter a valid date.\",\n    dateISO: \"Please enter a valid date (ISO).\",\n    number: \"Please enter a valid number.\",\n    digits: \"Please enter only digits.\",\n    creditcard: \"Please enter a valid credit card number.\",\n    equalTo: \"Please enter the same value again.\",\n    accept: \"Please enter a value with a valid extension.\",\n    maxlength: $.validator.format(\"Please enter no more than {0} characters.\"),\n    minlength: $.validator.format(\"Please enter at least {0} characters.\"),\n    rangelength: $.validator.format(\"Please enter a value between {0} and {1} characters long.\"),\n    range: $.validator.format(\"Please enter a value between {0} and {1}.\"),\n    max: $.validator.format(\"Please enter a value less than or equal to {0}.\"),\n    min: $.validator.format(\"Please enter a value greater than or equal to {0}.\")\n  },\n\n  autoCreateRanges: false,\n\n  prototype: {\n\n    init: function() {\n      this.labelContainer = $(this.settings.errorLabelContainer);\n      this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);\n      this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );\n      this.submitted = {};\n      this.valueCache = {};\n      this.pendingRequest = 0;\n      this.pending = {};\n      this.invalid = {};\n      this.reset();\n\n      var groups = (this.groups = {});\n      $.each(this.settings.groups, function(key, value) {\n        $.each(value.split(/\\s/), function(index, name) {\n          groups[name] = key;\n        });\n      });\n      var rules = this.settings.rules;\n      $.each(rules, function(key, value) {\n        rules[key] = $.validator.normalizeRule(value);\n      });\n\n      function delegate(event) {\n        var validator = $.data(this[0].form, \"validator\"),\n          eventType = \"on\" + event.type.replace(/^validate/, \"\");\n        if (validator.settings[eventType]) {\n          validator.settings[eventType].call(validator, this[0], event);\n        }\n      }\n      $(this.currentForm)\n        .validateDelegate(\"[type='text'], [type='password'], [type='file'], select, textarea, \" +\n          \"[type='number'], [type='search'] ,[type='tel'], [type='url'], \" +\n          \"[type='email'], [type='datetime'], [type='date'], [type='month'], \" +\n          \"[type='week'], [type='time'], [type='datetime-local'], \" +\n          \"[type='range'], [type='color'] \",\n          \"focusin focusout keyup\", delegate)\n        .validateDelegate(\"[type='radio'], [type='checkbox'], select, option\", \"click\", delegate);\n\n      if (this.settings.invalidHandler) {\n        $(this.currentForm).bind(\"invalid-form.validate\", this.settings.invalidHandler);\n      }\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Validator/form\n    form: function() {\n      this.checkForm();\n      $.extend(this.submitted, this.errorMap);\n      this.invalid = $.extend({}, this.errorMap);\n      if (!this.valid()) {\n        $(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n      }\n      this.showErrors();\n      return this.valid();\n    },\n\n    checkForm: function() {\n      this.prepareForm();\n      for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {\n        this.check( elements[i] );\n      }\n      return this.valid();\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Validator/element\n    element: function( element ) {\n      element = this.validationTargetFor( this.clean( element ) );\n      this.lastElement = element;\n      this.prepareElement( element );\n      this.currentElements = $(element);\n      var result = this.check( element ) !== false;\n      if (result) {\n        delete this.invalid[element.name];\n      } else {\n        this.invalid[element.name] = true;\n      }\n      if ( !this.numberOfInvalids() ) {\n        // Hide error containers on last error\n        this.toHide = this.toHide.add( this.containers );\n      }\n      this.showErrors();\n      return result;\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Validator/showErrors\n    showErrors: function(errors) {\n      if(errors) {\n        // add items to error list and map\n        $.extend( this.errorMap, errors );\n        this.errorList = [];\n        for ( var name in errors ) {\n          this.errorList.push({\n            message: errors[name],\n            element: this.findByName(name)[0]\n          });\n        }\n        // remove items from success list\n        this.successList = $.grep( this.successList, function(element) {\n          return !(element.name in errors);\n        });\n      }\n      if (this.settings.showErrors) {\n        this.settings.showErrors.call( this, this.errorMap, this.errorList );\n      } else {\n        this.defaultShowErrors();\n      }\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Validator/resetForm\n    resetForm: function() {\n      if ( $.fn.resetForm ) {\n        $( this.currentForm ).resetForm();\n      }\n      this.submitted = {};\n      this.lastElement = null;\n      this.prepareForm();\n      this.hideErrors();\n      this.elements().removeClass( this.settings.errorClass );\n    },\n\n    numberOfInvalids: function() {\n      return this.objectLength(this.invalid);\n    },\n\n    objectLength: function( obj ) {\n      var count = 0;\n      for ( var i in obj ) {\n        count++;\n      }\n      return count;\n    },\n\n    hideErrors: function() {\n      this.addWrapper( this.toHide ).hide();\n    },\n\n    valid: function() {\n      return this.size() === 0;\n    },\n\n    size: function() {\n      return this.errorList.length;\n    },\n\n    focusInvalid: function() {\n      if( this.settings.focusInvalid ) {\n        try {\n          $(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])\n          .filter(\":visible\")\n          .focus()\n          // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n          .trigger(\"focusin\");\n        } catch(e) {\n          // ignore IE throwing errors when focusing hidden elements\n        }\n      }\n    },\n\n    findLastActive: function() {\n      var lastActive = this.lastActive;\n      return lastActive && $.grep(this.errorList, function(n) {\n        return n.element.name === lastActive.name;\n      }).length === 1 && lastActive;\n    },\n\n    elements: function() {\n      var validator = this,\n        rulesCache = {};\n\n      // select all valid inputs inside the form (no submit or reset buttons)\n      return $(this.currentForm)\n      .find(\"input, select, textarea\")\n      .not(\":submit, :reset, :image, [disabled]\")\n      .not( this.settings.ignore )\n      .filter(function() {\n        if ( !this.name && validator.settings.debug && window.console ) {\n          console.error( \"%o has no name assigned\", this);\n        }\n\n        // select only the first element for each name, and only those with rules specified\n        if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {\n          return false;\n        }\n\n        rulesCache[this.name] = true;\n        return true;\n      });\n    },\n\n    clean: function( selector ) {\n      return $( selector )[0];\n    },\n\n    errors: function() {\n      var errorClass = this.settings.errorClass.replace(' ', '.');\n      return $( this.settings.errorElement + \".\" + errorClass, this.errorContext );\n    },\n\n    reset: function() {\n      this.successList = [];\n      this.errorList = [];\n      this.errorMap = {};\n      this.toShow = $([]);\n      this.toHide = $([]);\n      this.currentElements = $([]);\n    },\n\n    prepareForm: function() {\n      this.reset();\n      this.toHide = this.errors().add( this.containers );\n    },\n\n    prepareElement: function( element ) {\n      this.reset();\n      this.toHide = this.errorsFor(element);\n    },\n\n    elementValue: function( element ) {\n      var val = $(element).val();\n      if( typeof val === 'string' ) {\n        return val.replace(/\\r/g, \"\");\n      }\n      return val;\n    },\n\n    check: function( element ) {\n      element = this.validationTargetFor( this.clean( element ) );\n\n      var rules = $(element).rules();\n      var dependencyMismatch = false;\n      var val = this.elementValue(element);\n      var result;\n\n      for (var method in rules ) {\n        var rule = { method: method, parameters: rules[method] };\n        try {\n\n          result = $.validator.methods[method].call( this, val, element, rule.parameters );\n\n          // if a method indicates that the field is optional and therefore valid,\n          // don't mark it as valid when there are no other rules\n          if ( result === \"dependency-mismatch\" ) {\n            dependencyMismatch = true;\n            continue;\n          }\n          dependencyMismatch = false;\n\n          if ( result === \"pending\" ) {\n            this.toHide = this.toHide.not( this.errorsFor(element) );\n            return;\n          }\n\n          if( !result ) {\n            this.formatAndAdd( element, rule );\n            return false;\n          }\n        } catch(e) {\n          if ( this.settings.debug && window.console ) {\n            console.log(\"exception occured when checking element \" + element.id + \", check the '\" + rule.method + \"' method\", e);\n          }\n          throw e;\n        }\n      }\n      if (dependencyMismatch) {\n        return;\n      }\n      if ( this.objectLength(rules) ) {\n        this.successList.push(element);\n      }\n      return true;\n    },\n\n    // return the custom message for the given element and validation method\n    // specified in the element's \"messages\" metadata\n    customMetaMessage: function(element, method) {\n      if (!$.metadata) {\n        return;\n      }\n      var meta = this.settings.meta ? $(element).metadata()[this.settings.meta] : $(element).metadata();\n      return meta && meta.messages && meta.messages[method];\n    },\n\n    // return the custom message for the given element name and validation method\n    customMessage: function( name, method ) {\n      var m = this.settings.messages[name];\n      return m && (m.constructor === String ? m : m[method]);\n    },\n\n    // return the first defined argument, allowing empty strings\n    findDefined: function() {\n      for(var i = 0; i < arguments.length; i++) {\n        if (arguments[i] !== undefined) {\n          return arguments[i];\n        }\n      }\n      return undefined;\n    },\n\n    defaultMessage: function( element, method) {\n      return this.findDefined(\n        this.customMessage( element.name, method ),\n        this.customMetaMessage( element, method ),\n        // title is never undefined, so handle empty string as undefined\n        !this.settings.ignoreTitle && element.title || undefined,\n        $.validator.messages[method],\n        \"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n      );\n    },\n\n    formatAndAdd: function( element, rule ) {\n      var message = this.defaultMessage( element, rule.method ),\n        theregex = /\\$?\\{(\\d+)\\}/g;\n      if ( typeof message === \"function\" ) {\n        message = message.call(this, rule.parameters, element);\n      } else if (theregex.test(message)) {\n        message = $.validator.format(message.replace(theregex, '{$1}'), rule.parameters);\n      }\n      this.errorList.push({\n        message: message,\n        element: element\n      });\n\n      this.errorMap[element.name] = message;\n      this.submitted[element.name] = message;\n    },\n\n    addWrapper: function(toToggle) {\n      if ( this.settings.wrapper ) {\n        toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n      }\n      return toToggle;\n    },\n\n    defaultShowErrors: function() {\n      var i, elements;\n      for ( i = 0; this.errorList[i]; i++ ) {\n        var error = this.errorList[i];\n        if ( this.settings.highlight ) {\n          this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n        }\n        this.showLabel( error.element, error.message );\n      }\n      if( this.errorList.length ) {\n        this.toShow = this.toShow.add( this.containers );\n      }\n      if (this.settings.success) {\n        for ( i = 0; this.successList[i]; i++ ) {\n          this.showLabel( this.successList[i] );\n        }\n      }\n      if (this.settings.unhighlight) {\n        for ( i = 0, elements = this.validElements(); elements[i]; i++ ) {\n          this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );\n        }\n      }\n      this.toHide = this.toHide.not( this.toShow );\n      this.hideErrors();\n      this.addWrapper( this.toShow ).show();\n    },\n\n    validElements: function() {\n      return this.currentElements.not(this.invalidElements());\n    },\n\n    invalidElements: function() {\n      return $(this.errorList).map(function() {\n        return this.element;\n      });\n    },\n\n    showLabel: function(element, message) {\n      var label = this.errorsFor( element );\n      if ( label.length ) {\n        // refresh error/success class\n        label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\n        // check if we have a generated label, replace the message then\n        if ( label.attr(\"generated\") ) {\n          label.html(message);\n        }\n      } else {\n        // create label\n        label = $(\"<\" + this.settings.errorElement + \"/>\")\n          .attr({\"for\":  this.idOrName(element), generated: true})\n          .addClass(this.settings.errorClass)\n          .html(message || \"\");\n        if ( this.settings.wrapper ) {\n          // make sure the element is visible, even in IE\n          // actually showing the wrapped element is handled elsewhere\n          label = label.hide().show().wrap(\"<\" + this.settings.wrapper + \"/>\").parent();\n        }\n        if ( !this.labelContainer.append(label).length ) {\n          if ( this.settings.errorPlacement ) {\n            this.settings.errorPlacement(label, $(element) );\n          } else {\n          label.insertAfter(element);\n          }\n        }\n      }\n      if ( !message && this.settings.success ) {\n        label.text(\"\");\n        if ( typeof this.settings.success === \"string\" ) {\n          label.addClass( this.settings.success );\n        } else {\n          this.settings.success( label );\n        }\n      }\n      this.toShow = this.toShow.add(label);\n    },\n\n    errorsFor: function(element) {\n      var name = this.idOrName(element);\n      return this.errors().filter(function() {\n        return $(this).attr('for') === name;\n      });\n    },\n\n    idOrName: function(element) {\n      return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);\n    },\n\n    validationTargetFor: function(element) {\n      // if radio/checkbox, validate first element in group instead\n      if (this.checkable(element)) {\n        element = this.findByName( element.name ).not(this.settings.ignore)[0];\n      }\n      return element;\n    },\n\n    checkable: function( element ) {\n      return (/radio|checkbox/i).test(element.type);\n    },\n\n    findByName: function( name ) {\n      // select by name and filter by form for performance over form.find(\"[name=...]\")\n      var form = this.currentForm;\n      return $(document.getElementsByName(name)).map(function(index, element) {\n        return element.form === form && element.name === name && element  || null;\n      });\n    },\n\n    getLength: function(value, element) {\n      switch( element.nodeName.toLowerCase() ) {\n      case 'select':\n        return $(\"option:selected\", element).length;\n      case 'input':\n        if( this.checkable( element) ) {\n          return this.findByName(element.name).filter(':checked').length;\n        }\n      }\n      return value.length;\n    },\n\n    depend: function(param, element) {\n      return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;\n    },\n\n    dependTypes: {\n      \"boolean\": function(param, element) {\n        return param;\n      },\n      \"string\": function(param, element) {\n        return !!$(param, element.form).length;\n      },\n      \"function\": function(param, element) {\n        return param(element);\n      }\n    },\n\n    optional: function(element) {\n      var val = this.elementValue(element);\n      return !$.validator.methods.required.call(this, val, element) && \"dependency-mismatch\";\n    },\n\n    startRequest: function(element) {\n      if (!this.pending[element.name]) {\n        this.pendingRequest++;\n        this.pending[element.name] = true;\n      }\n    },\n\n    stopRequest: function(element, valid) {\n      this.pendingRequest--;\n      // sometimes synchronization fails, make sure pendingRequest is never < 0\n      if (this.pendingRequest < 0) {\n        this.pendingRequest = 0;\n      }\n      delete this.pending[element.name];\n      if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {\n        $(this.currentForm).submit();\n        this.formSubmitted = false;\n      } else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {\n        $(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n        this.formSubmitted = false;\n      }\n    },\n\n    previousValue: function(element) {\n      return $.data(element, \"previousValue\") || $.data(element, \"previousValue\", {\n        old: null,\n        valid: true,\n        message: this.defaultMessage( element, \"remote\" )\n      });\n    }\n\n  },\n\n  classRuleSettings: {\n    required: {required: true},\n    email: {email: true},\n    url: {url: true},\n    date: {date: true},\n    dateISO: {dateISO: true},\n    number: {number: true},\n    digits: {digits: true},\n    creditcard: {creditcard: true}\n  },\n\n  addClassRules: function(className, rules) {\n    if ( className.constructor === String ) {\n      this.classRuleSettings[className] = rules;\n    } else {\n      $.extend(this.classRuleSettings, className);\n    }\n  },\n\n  classRules: function(element) {\n    var rules = {};\n    var classes = $(element).attr('class');\n    if ( classes ) {\n      $.each(classes.split(' '), function() {\n        if (this in $.validator.classRuleSettings) {\n          $.extend(rules, $.validator.classRuleSettings[this]);\n        }\n      });\n    }\n    return rules;\n  },\n\n  attributeRules: function(element) {\n    var rules = {};\n    var $element = $(element);\n\n    for (var method in $.validator.methods) {\n      var value;\n\n      // support for <input required> in both html5 and older browsers\n      if (method === 'required') {\n        value = $element.get(0).getAttribute(method);\n        // Some browsers return an empty string for the required attribute\n        // and non-HTML5 browsers might have required=\"\" markup\n        if (value === \"\") {\n          value = true;\n        } else if (value === \"false\") {\n          value = false;\n        }\n        // force non-HTML5 browsers to return bool\n        value = !!value;\n      } else {\n        value = $element.attr(method);\n      }\n\n      if (value) {\n        rules[method] = value;\n      } else if ($element[0].getAttribute(\"type\") === method) {\n        rules[method] = true;\n      }\n    }\n\n    // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs\n    if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {\n      delete rules.maxlength;\n    }\n\n    return rules;\n  },\n\n  metadataRules: function(element) {\n    if (!$.metadata) {\n      return {};\n    }\n\n    var meta = $.data(element.form, 'validator').settings.meta;\n    return meta ?\n      $(element).metadata()[meta] :\n      $(element).metadata();\n  },\n\n  staticRules: function(element) {\n    var rules = {};\n    var validator = $.data(element.form, 'validator');\n    if (validator.settings.rules) {\n      rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};\n    }\n    return rules;\n  },\n\n  normalizeRules: function(rules, element) {\n    // handle dependency check\n    $.each(rules, function(prop, val) {\n      // ignore rule when param is explicitly false, eg. required:false\n      if (val === false) {\n        delete rules[prop];\n        return;\n      }\n      if (val.param || val.depends) {\n        var keepRule = true;\n        switch (typeof val.depends) {\n          case \"string\":\n            keepRule = !!$(val.depends, element.form).length;\n            break;\n          case \"function\":\n            keepRule = val.depends.call(element, element);\n            break;\n        }\n        if (keepRule) {\n          rules[prop] = val.param !== undefined ? val.param : true;\n        } else {\n          delete rules[prop];\n        }\n      }\n    });\n\n    // evaluate parameters\n    $.each(rules, function(rule, parameter) {\n      rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;\n    });\n\n    // clean number parameters\n    $.each(['minlength', 'maxlength', 'min', 'max'], function() {\n      if (rules[this]) {\n        rules[this] = Number(rules[this]);\n      }\n    });\n    $.each(['rangelength', 'range'], function() {\n      if (rules[this]) {\n        rules[this] = [Number(rules[this][0]), Number(rules[this][1])];\n      }\n    });\n\n    if ($.validator.autoCreateRanges) {\n      // auto-create ranges\n      if (rules.min && rules.max) {\n        rules.range = [rules.min, rules.max];\n        delete rules.min;\n        delete rules.max;\n      }\n      if (rules.minlength && rules.maxlength) {\n        rules.rangelength = [rules.minlength, rules.maxlength];\n        delete rules.minlength;\n        delete rules.maxlength;\n      }\n    }\n\n    // To support custom messages in metadata ignore rule methods titled \"messages\"\n    if (rules.messages) {\n      delete rules.messages;\n    }\n\n    return rules;\n  },\n\n  // Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n  normalizeRule: function(data) {\n    if( typeof data === \"string\" ) {\n      var transformed = {};\n      $.each(data.split(/\\s/), function() {\n        transformed[this] = true;\n      });\n      data = transformed;\n    }\n    return data;\n  },\n\n  // http://docs.jquery.com/Plugins/Validation/Validator/addMethod\n  addMethod: function(name, method, message) {\n    $.validator.methods[name] = method;\n    $.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];\n    if (method.length < 3) {\n      $.validator.addClassRules(name, $.validator.normalizeRule(name));\n    }\n  },\n\n  methods: {\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/required\n    required: function(value, element, param) {\n      // check if dependency is met\n      if ( !this.depend(param, element) ) {\n        return \"dependency-mismatch\";\n      }\n      if ( element.nodeName.toLowerCase() === \"select\" ) {\n        // could be an array for select-multiple or a string, both are fine this way\n        var val = $(element).val();\n        return val && val.length > 0;\n      }\n      if ( this.checkable(element) ) {\n        return this.getLength(value, element) > 0;\n      }\n      return $.trim(value).length > 0;\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/remote\n    remote: function(value, element, param) {\n      if ( this.optional(element) ) {\n        return \"dependency-mismatch\";\n      }\n\n      var previous = this.previousValue(element);\n      if (!this.settings.messages[element.name] ) {\n        this.settings.messages[element.name] = {};\n      }\n      previous.originalMessage = this.settings.messages[element.name].remote;\n      this.settings.messages[element.name].remote = previous.message;\n\n      param = typeof param === \"string\" && {url:param} || param;\n\n      if ( this.pending[element.name] ) {\n        return \"pending\";\n      }\n      if ( previous.old === value ) {\n        return previous.valid;\n      }\n\n      previous.old = value;\n      var validator = this;\n      this.startRequest(element);\n      var data = {};\n      data[element.name] = value;\n      $.ajax($.extend(true, {\n        url: param,\n        mode: \"abort\",\n        port: \"validate\" + element.name,\n        dataType: \"json\",\n        data: data,\n        success: function(response) {\n          validator.settings.messages[element.name].remote = previous.originalMessage;\n          var valid = response === true;\n          if ( valid ) {\n            var submitted = validator.formSubmitted;\n            validator.prepareElement(element);\n            validator.formSubmitted = submitted;\n            validator.successList.push(element);\n            validator.showErrors();\n          } else {\n            var errors = {};\n            var message = response || validator.defaultMessage( element, \"remote\" );\n            errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\n            validator.showErrors(errors);\n          }\n          previous.valid = valid;\n          validator.stopRequest(element, valid);\n        }\n      }, param));\n      return \"pending\";\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/minlength\n    minlength: function(value, element, param) {\n      var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n      return this.optional(element) || length >= param;\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/maxlength\n    maxlength: function(value, element, param) {\n      var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n      return this.optional(element) || length <= param;\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/rangelength\n    rangelength: function(value, element, param) {\n      var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n      return this.optional(element) || ( length >= param[0] && length <= param[1] );\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/min\n    min: function( value, element, param ) {\n      return this.optional(element) || value >= param;\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/max\n    max: function( value, element, param ) {\n      return this.optional(element) || value <= param;\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/range\n    range: function( value, element, param ) {\n      return this.optional(element) || ( value >= param[0] && value <= param[1] );\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/email\n    email: function(value, element) {\n      // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\n      return this.optional(element) || /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i.test(value);\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/url\n    url: function(value, element) {\n      // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/\n      return this.optional(element) || /^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/date\n    date: function(value, element) {\n      return this.optional(element) || !/Invalid|NaN/.test(new Date(value));\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/dateISO\n    dateISO: function(value, element) {\n      return this.optional(element) || /^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/.test(value);\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/number\n    number: function(value, element) {\n      return this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test(value);\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/digits\n    digits: function(value, element) {\n      return this.optional(element) || /^\\d+$/.test(value);\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/creditcard\n    // based on http://en.wikipedia.org/wiki/Luhn\n    creditcard: function(value, element) {\n      if ( this.optional(element) ) {\n        return \"dependency-mismatch\";\n      }\n      // accept only spaces, digits and dashes\n      if (/[^0-9 \\-]+/.test(value)) {\n        return false;\n      }\n      var nCheck = 0,\n        nDigit = 0,\n        bEven = false;\n\n      value = value.replace(/\\D/g, \"\");\n\n      for (var n = value.length - 1; n >= 0; n--) {\n        var cDigit = value.charAt(n);\n        nDigit = parseInt(cDigit, 10);\n        if (bEven) {\n          if ((nDigit *= 2) > 9) {\n            nDigit -= 9;\n          }\n        }\n        nCheck += nDigit;\n        bEven = !bEven;\n      }\n\n      return (nCheck % 10) === 0;\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/accept\n    accept: function(value, element, param) {\n      param = typeof param === \"string\" ? param.replace(/,/g, '|') : \"png|jpe?g|gif\";\n      return this.optional(element) || value.match(new RegExp(\".(\" + param + \")$\", \"i\"));\n    },\n\n    // http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n    equalTo: function(value, element, param) {\n      // bind to the blur event of the target in order to revalidate whenever the target field is updated\n      // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\n      var target = $(param).unbind(\".validate-equalTo\").bind(\"blur.validate-equalTo\", function() {\n        $(element).valid();\n      });\n      return value === target.val();\n    }\n\n  }\n\n});\n\n// deprecated, use $.validator.format instead\n$.format = $.validator.format;\n\n}(jQuery));\n\n// ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n(function($) {\n  var pendingRequests = {};\n  // Use a prefilter if available (1.5+)\n  if ( $.ajaxPrefilter ) {\n    $.ajaxPrefilter(function(settings, _, xhr) {\n      var port = settings.port;\n      if (settings.mode === \"abort\") {\n        if ( pendingRequests[port] ) {\n          pendingRequests[port].abort();\n        }\n        pendingRequests[port] = xhr;\n      }\n    });\n  } else {\n    // Proxy ajax\n    var ajax = $.ajax;\n    $.ajax = function(settings) {\n      var mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n        port = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n      if (mode === \"abort\") {\n        if ( pendingRequests[port] ) {\n          pendingRequests[port].abort();\n        }\n        return (pendingRequests[port] = ajax.apply(this, arguments));\n      }\n      return ajax.apply(this, arguments);\n    };\n  }\n}(jQuery));\n\n// provides cross-browser focusin and focusout events\n// IE has native support, in other browsers, use event caputuring (neither bubbles)\n\n// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\n// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target\n(function($) {\n  // only implement if not provided by jQuery core (since 1.4)\n  // TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs\n  if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {\n    $.each({\n      focus: 'focusin',\n      blur: 'focusout'\n    }, function( original, fix ){\n      $.event.special[fix] = {\n        setup:function() {\n          this.addEventListener( original, handler, true );\n        },\n        teardown:function() {\n          this.removeEventListener( original, handler, true );\n        },\n        handler: function(e) {\n          var args = arguments;\n          args[0] = $.event.fix(e);\n          args[0].type = fix;\n          return $.event.handle.apply(this, args);\n        }\n      };\n      function handler(e) {\n        e = $.event.fix(e);\n        e.type = fix;\n        return $.event.handle.call(this, e);\n      }\n    });\n  }\n  $.extend($.fn, {\n    validateDelegate: function(delegate, type, handler) {\n      return this.bind(type, function(event) {\n        var target = $(event.target);\n        if (target.is(delegate)) {\n          return handler.apply(target, arguments);\n        }\n      });\n    }\n  });\n}(jQuery));"
  },
  {
    "path": "src/main/resources/templates/hotels/create.html",
    "content": "<!DOCTYPE html>\n<html xmlns:th=\"http://www.thymeleaf.org\" layout:decorator=\"layout/sitelayout\">\n<head>\n<title th:text=\"#{app.name}\">List of Hotels</title>\n<link rel=\"stylesheet\" th:href=\"@{/webjars/bootstrap/3.1.1/css/bootstrap.min.css}\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css\" />\n<link rel=\"stylesheet\" th:href=\"@{/webjars/bootstrap/3.1.1/css/bootstrap-theme.css}\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.css\" />\n<link rel=\"stylesheet\" th:href=\"@{/css/application.css}\" href=\"../../static/css/application.css\" />\n</head>\n<body>\n\t<div class=\"container\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t<h1 class=\"well well-small\">Hotels</h1>\n\t\t\t</div>\n\t\t</div>\n\t\t<div layout:fragment=\"content\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t<form action=\"#\" th:action=\"@{/hotels}\" method=\"POST\" th:object=\"${hotel}\" class=\"form-horizontal\">\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"name\" class=\"col-xs-2\">Name</label>\n\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"Name\" th:field=\"*{name}\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-xs-4\">\n\t\t\t\t\t\t\t\t<p class=\"text-warning\" th:if=\"${#fields.hasErrors('name')}\" th:errors=\"*{name}\">Error with Name</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"address\" class=\"col-xs-2\">Address</label>\n\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"Address\" th:field=\"*{address}\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-xs-4\">\n\t\t\t\t\t\t\t\t<p class=\"text-warning\" th:if=\"${#fields.hasErrors('address')}\" th:errors=\"*{address}\">Error with Address</p>\n\t\t\t\t\t\t\t</div>\t\t\t\n\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"zip\" class=\"col-xs-2\">Zip</label>\n\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"Zip\" th:field=\"*{zip}\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-xs-4\">\n\t\t\t\t\t\t\t\t<p class=\"text-warning\" th:if=\"${#fields.hasErrors('zip')}\" th:errors=\"*{zip}\">Error with Zip</p>\n\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-default\">Submit</button>\t\t\t\t\t\t\t\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</body>\n</html>"
  },
  {
    "path": "src/main/resources/templates/hotels/edit.html",
    "content": "<!DOCTYPE html>\n<html xmlns:th=\"http://www.thymeleaf.org\" layout:decorator=\"layout/sitelayout\">\n<head>\n<title th:text=\"#{app.name}\">List of Hotels</title>\n<link rel=\"stylesheet\" th:href=\"@{/webjars/bootstrap/3.1.1/css/bootstrap.min.css}\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css\" />\n<link rel=\"stylesheet\" th:href=\"@{/webjars/bootstrap/3.1.1/css/bootstrap-theme.css}\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.css\" />\n<link rel=\"stylesheet\" th:href=\"@{/css/application.css}\" href=\"../../static/css/application.css\" />\n</head>\n<body>\n\t<div class=\"container-fluid\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t<h1 class=\"well well-small\">Hotels</h1>\n\t\t\t</div>\n\t\t</div>\n\t\t<div layout:fragment=\"content\">\t\t\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t<form action=\"#\" th:action=\"@{/hotels/update}\" method=\"post\" th:object=\"${hotel}\" class=\"form-horizontal\">\n\t\t\t\t\t\t<input type=\"hidden\" th:field=\"*{id}\"/>\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"name\" class=\"col-xs-2\">Name</label>\n\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"Name\" th:field=\"*{name}\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-xs-4\">\n\t\t\t\t\t\t\t\t<p class=\"text-warning\" th:if=\"${#fields.hasErrors('name')}\" th:errors=\"*{name}\">Error with Name</p>\n\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"address\" class=\"col-xs-2\">Address</label>\n\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"Address\" th:field=\"*{address}\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-xs-4\">\n\t\t\t\t\t\t\t\t<p class=\"text-warning\" th:if=\"${#fields.hasErrors('address')}\" th:errors=\"*{address}\">Error with Address</p>\n\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\t\t\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label for=\"zip\" class=\"col-xs-2\">Zip</label>\n\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"Zip\" th:field=\"*{zip}\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-xs-4\">\n\t\t\t\t\t\t\t\t<p class=\"text-warning\" th:if=\"${#fields.hasErrors('zip')}\" th:errors=\"*{zip}\">Error with Zip</p>\n\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-default\">Submit</button>\t\t\t\t\t\t\t\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</body>\n</html>"
  },
  {
    "path": "src/main/resources/templates/hotels/list.html",
    "content": "<!DOCTYPE html>\n<html xmlns:th=\"http://www.thymeleaf.org\" layout:decorator=\"layout/sitelayout\">\n<head>\n<title th:text=\"#{app.name}\">List of Hotels</title>\n<link rel=\"stylesheet\" th:href=\"@{/webjars/bootstrap/3.1.1/css/bootstrap.min.css}\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css\" />\n<link rel=\"stylesheet\" th:href=\"@{/webjars/bootstrap/3.1.1/css/bootstrap-theme.css}\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.css\" />\n<link rel=\"stylesheet\" th:href=\"@{/css/application.css}\" href=\"../../static/css/application.css\" />\n</head>\n<body>\n\t<div class=\"container\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t<h1 class=\"well well-small\">Hotels</h1>\n\t\t\t</div>\n\t\t</div>\n\t\t<div layout:fragment=\"content\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t<table class=\"table table-bordered table-striped\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>ID</th>\n\t\t\t\t\t\t\t\t<th>Name</th>\n\t\t\t\t\t\t\t\t<th>Address</th>\n\t\t\t\t\t\t\t\t<th>Zip</th>\n\t\t\t\t\t\t\t\t<th>Action</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr th:if=\"${hotels.empty}\">\n\t\t\t\t\t\t\t\t<td colspan=\"5\">No messages</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr th:each=\"hotel : ${hotels}\">\n\t\t\t\t\t\t\t\t<td th:text=\"${hotel.id}\">1</td>\n\t\t\t\t\t\t\t\t<td th:text=\"${hotel.name}\">Test Name 1</td>\n\t\t\t\t\t\t\t\t<td th:text=\"${hotel.address}\">Test Address 1</td>\n\t\t\t\t\t\t\t\t<td th:text=\"${hotel.zip}\">Test Zip 1</td>\n\t\t\t\t\t\t\t\t<td><a th:href=\"@{/hotels/edit/__${hotel.id}__}\" href=\"#\">Edit</a>\n\t\t\t\t\t\t\t\t\t| <a th:href=\"@{/hotels/delete/__${hotel.id}__}\" href=\"#\">Delete</a>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t<a href=\"#\" th:href=\"@{/hotels?form=true}\" class=\"btn btn-default\">New Hotel</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</body>\n</html>"
  },
  {
    "path": "src/main/resources/templates/layout/sitelayout.html",
    "content": "<!DOCTYPE html>\n<html xmlns:th=\"http://www.thymeleaf.org\">\n<head>\n<title th:text=\"#{app.name}\">List of Hotels</title>\n<link rel=\"stylesheet\" th:href=\"@{/webjars/bootstrap/3.1.1/css/bootstrap.min.css}\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css\" />\n<link rel=\"stylesheet\" th:href=\"@{/webjars/bootstrap/3.1.1/css/bootstrap-theme.css}\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.css\" />\n<link rel=\"stylesheet\" th:href=\"@{/css/application.css}\" href=\"../../static/css/application.css\" />\n</head>\n<body>\n\t<div class=\"navbar navbar-default navbar-fixed-top\" role=\"navigation\">\n\t\t<div class=\"container-fluid\">\n\t\t\t<div class=\"navbar-header\">\n\t\t\t<button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\n\t\t\t\t<span class=\"sr-only\">Toggle navigation</span>\n\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t</button>\n\t\t\t<a class=\"navbar-brand\" th:href=\"@{/hotels}\">Hotels Listing</a>\n\t\t\t</div>\n\t\t\t<div class=\"navbar-collapse collapse\">\n\t\t\t<ul class=\"nav navbar-nav navbar-right\">\n\t\t\t\t<li><a href=\"#\">Settings</a></li>\n\t\t\t\t<li><a href=\"#\">Profile</a></li>\n\t\t\t\t<li><a href=\"#\">Help</a></li>\n\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"container-fluid\">\n\t\t<div class=\"row\" th:if=\"${statusmessage != null}\">\n\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t<div class=\"alert alert-success\">\n\t\t\t\t\t<span th:text=\"${statusmessage}\">Status message</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\t\n\t\t<div layout:fragment=\"content\">\n\t\t\t<h1>Static content for prototyping purposes only</h1>\n\t\t\t\t<p>\n\t\t\t\tThis is the layout of the site. The actual content will come from individual views making use of this layout\n\t\t\t</p>\n\t\t </div>\t\t\n\t</div>\n\t<div id=\"footer\">\n\t\t<div class=\"container-fluid\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t<hr/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</body>\n</html>"
  },
  {
    "path": "src/main/scala/mvctest/Application.scala",
    "content": "package mvctest\n\nimport org.springframework.boot.SpringApplication\n\nobject Application extends App {\n  SpringApplication.run(classOf[BootConfig]);\n}"
  },
  {
    "path": "src/main/scala/mvctest/BootConfig.scala",
    "content": "package mvctest\n\nimport org.springframework.boot.autoconfigure.SpringBootApplication\n\n@SpringBootApplication\nclass BootConfig"
  },
  {
    "path": "src/main/scala/mvctest/DbPopulator.scala",
    "content": "package mvctest\n\nimport mvctest.domain.Hotel\nimport mvctest.service.HotelRepository\nimport org.springframework.beans.factory.annotation.Autowired\nimport org.springframework.boot.CommandLineRunner\nimport org.springframework.stereotype.Component\n\n/**\n  * Responsible for populating some initial data into the database..\n  */\n\n@Component\nclass DbPopulator @Autowired()(val hotelRepository: HotelRepository) extends CommandLineRunner {\n  override def run(args: String*): Unit = {\n    (1 to 10).foreach(i => {\n      hotelRepository.save(new Hotel(id=null, name = s\"Hotel $i\", address = s\"Address $i\", zip = s\"Zip $i\"))  \n    })\n  }\n}\n"
  },
  {
    "path": "src/main/scala/mvctest/domain/Hotel.scala",
    "content": "package mvctest.domain\n\nimport javax.persistence.Id\nimport javax.persistence.GeneratedValue\nimport java.lang.Long\nimport javax.persistence.Entity\n\nimport scala.beans.BeanProperty\nimport org.hibernate.validator.constraints.NotEmpty\n\nimport scala.annotation.meta.field\n\n@Entity\nclass Hotel(@(Id @field) @(GeneratedValue @field) @BeanProperty var id: Long,\n            @BeanProperty @(NotEmpty @field) var name: String,\n            @BeanProperty @(NotEmpty @field) var address: String,\n            @BeanProperty @(NotEmpty @field) var zip: String) {\n\n  def this() = this(null, null, null, null)\n}"
  },
  {
    "path": "src/main/scala/mvctest/service/HotelRepository.scala",
    "content": "package mvctest.service\n\nimport org.springframework.data.repository.CrudRepository\nimport mvctest.domain.Hotel\nimport java.lang.Long\n\ntrait HotelRepository extends CrudRepository[Hotel, Long]"
  },
  {
    "path": "src/main/scala/mvctest/web/HotelController.scala",
    "content": "package mvctest.web\n\nimport java.lang.Long\nimport javax.validation.Valid\n\nimport mvctest.domain.Hotel\nimport mvctest.service.HotelRepository\nimport org.springframework.beans.factory.annotation.Autowired\nimport org.springframework.stereotype.Controller\nimport org.springframework.ui.Model\nimport org.springframework.validation.BindingResult\nimport org.springframework.web.bind.annotation._\n\n@Controller\n@RequestMapping(Array(\"/hotels\"))\nclass HotelController @Autowired()(private val hotelRepository: HotelRepository) {\n\n  @GetMapping\n  def list(model: Model) = {\n    val hotels = hotelRepository.findAll()\n    model.addAttribute(\"hotels\", hotels)\n    \"hotels/list\"\n  }\n\n  @GetMapping(Array(\"/edit/{id}\"))\n  def edit(@PathVariable(\"id\") id: Long, model: Model) = {\n    model.addAttribute(\"hotel\", hotelRepository.findOne(id))\n    \"hotels/edit\"\n  }\n\n  @GetMapping(params = Array(\"form\"))\n  def createForm(model: Model) = {\n    model.addAttribute(\"hotel\", new Hotel())\n    \"hotels/create\"\n  }\n\n  @PostMapping\n  def create(@Valid hotel: Hotel, bindingResult: BindingResult) =\n    if (bindingResult.hasErrors()) {\n      \"hotels/create\"\n    } else {\n      hotelRepository.save(hotel)\n      \"redirect:/hotels\"\n    }\n\n\n  @PostMapping(value = Array(\"/update\"))\n  def update(@Valid hotel: Hotel, bindingResult: BindingResult) =\n    if (bindingResult.hasErrors()) {\n      \"hotels/edit\"\n    } else {\n      hotelRepository.save(hotel)\n      \"redirect:/hotels\"\n    }\n\n\n  @GetMapping(value = Array(\"/delete/{id}\"))\n  def delete(@PathVariable(\"id\") id: Long) = {\n    hotelRepository.delete(id)\n    \"redirect:/hotels\"\n  }\n\n}"
  },
  {
    "path": "src/main/scala/mvctest/web/RootController.scala",
    "content": "package mvctest.web\n\nimport org.springframework.stereotype.Controller\nimport org.springframework.web.bind.annotation.RequestMapping\n\n@Controller\nclass RootController {\n\n  @RequestMapping(Array(\"/\"))\n  def handleRootRequest(): String = \"redirect:/hotels\"\n}\n"
  }
]