--- /dev/null
+{
+ "jscodehints.detectedExclusions": [
+ "Y:/web/wp-content/themes/littlefield_township/bower_components/jquery/src/outro.js"
+ ]
+}
\ No newline at end of file
--- /dev/null
+*.DS_Store
+/bower_components/*
+/node_modules/*
\ No newline at end of file
--- /dev/null
+module.exports = function(grunt) {
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+
+ sass: {
+ options: {
+ includePaths: ['bower_components/foundation/scss'],
+ sourceMap: true
+ },
+ dist: {
+ options: {
+ outputStyle: 'expanded'
+ },
+ files: {
+ 'css/app.css': 'scss/app.scss'
+ }
+ }
+ },
+
+ copy: {
+ scripts: {
+ expand: true,
+ cwd: 'bower_components/',
+ src: '**/*.js',
+ dest: 'js'
+ },
+
+ maps: {
+ expand: true,
+ cwd: 'bower_components/',
+ src: '**/*.map',
+ dest: 'js'
+ }
+ },
+
+ uglify: {
+ dist: {
+ files: {
+ 'js/modernizr/modernizr.min.js': ['js/modernizr/modernizr.js']
+ }
+ }
+ },
+
+ concat: {
+ options: {
+ separator: ';'
+ },
+ dist: {
+ src: [
+ 'js/dollarsign.js',
+ 'js/foundation/js/foundation.min.js',
+ 'js/custom/*.js',
+ ],
+
+ dest: 'js/app.js'
+ }
+
+ },
+
+ watch: {
+ grunt: { files: ['Gruntfile.js'] },
+
+ sass: {
+ files: 'scss/**/*.{scss,sass}',
+ tasks: ['sass']
+ },
+
+ scripts: {
+ files: ['js/custom/*.js'],
+ tasks: ['concat', 'uglify']
+ }
+
+ }
+ });
+
+ grunt.loadNpmTasks('grunt-sass');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-copy');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+
+ grunt.registerTask('build', ['sass', 'copy', 'uglify', 'concat']);
+ grunt.registerTask('runwatch', ['sass','uglify', 'concat']);
+ grunt.registerTask('default', ['runwatch','watch']);
+}
--- /dev/null
+# Gaslight Media Foundation Template
+
+This is a template to start your own project that uses Grunt and libsass!
+
+## Requirements
+
+You'll need to have the following items installed before continuing.
+
+ * [Node.js](http://nodejs.org): Use the installer provided on the NodeJS website.
+ * [Grunt](http://gruntjs.com/): Run `[sudo] npm install -g grunt-cli`
+ * [Bower](http://bower.io): Run `[sudo] npm install -g bower`
+
+## Quickstart
+
+```bash
+npm install && bower install
+```
+
+While you're working on your project, run:
+
+`grunt`
+
+And you're set!
+
+## Directory Structure
+
+ * `scss/_settings.scss`: Foundation configuration settings go in here
+ * `scss/app.scss`: Application styles go here
--- /dev/null
+<?php get_header(); ?>
+<main class="blog-archive">
+ <article <?php post_class() ?> id="interior">
+ <?php GLM_get_header(); ?>
+ </article>
+ <div class="row">
+ <div id="blog-posts-over" class="small-12 medium-9 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <div class="row content blog-posts-container">
+ <div class="small-11 small-centered columns">
+ <article id="<?php the_ID()?>" <?php post_class()?>>
+ <header class="entry-header">
+ <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
+ <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
+ </header>
+ <?php echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
+ <footer class="entry-meta small-12 medium-6 medium-push-3 center">
+ <?php $post_categories = wp_get_post_categories( get_the_ID() );
+ $cats = array();
+ echo 'This entry was posted ';
+ if (has_category()) {
+ echo 'in';
+ foreach($post_categories as $c){
+ $cat = get_category( $c );
+ $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
+ echo ', <a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>';
+ }
+ echo '.';
+ }
+ ?>
+ </footer>
+ </article>
+ </div>
+ </div>
+ <?php endwhile; ?>
+ <div class="navigation">
+ <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+ </div><!-- /.navigation -->
+ <?php else: ?>
+ <div id="post-404" class="noposts">
+ <p><?php _e('Sorry, no results were found.');?></p>
+ </div><!-- /#post-404 -->
+ <?php endif;?>
+ </div>
+ <?php get_template_part('parts/blog-sidebar-r'); ?>
+ </div>
+ <?php get_footer(); ?>
--- /dev/null
+{
+ "name": "foundation-libsass-template",
+ "dependencies": {
+ "foundation": "zurb/bower-foundation"
+ }
+}
--- /dev/null
+meta.foundation-version {
+ font-family: "/5.5.2/"; }
+
+meta.foundation-mq-small {
+ font-family: "/only screen/";
+ width: 0em; }
+
+meta.foundation-mq-small-only {
+ font-family: "/only screen and (max-width: 40em)/";
+ width: 0em; }
+
+meta.foundation-mq-medium {
+ font-family: "/only screen and (min-width:40.063em)/";
+ width: 40.063em; }
+
+meta.foundation-mq-medium-only {
+ font-family: "/only screen and (min-width:40.063em) and (max-width:64em)/";
+ width: 40.063em; }
+
+meta.foundation-mq-large {
+ font-family: "/only screen and (min-width:64.063em)/";
+ width: 64.063em; }
+
+meta.foundation-mq-large-only {
+ font-family: "/only screen and (min-width:64.063em) and (max-width:90em)/";
+ width: 64.063em; }
+
+meta.foundation-mq-xlarge {
+ font-family: "/only screen and (min-width:90.063em)/";
+ width: 90.063em; }
+
+meta.foundation-mq-xlarge-only {
+ font-family: "/only screen and (min-width:90.063em) and (max-width:120em)/";
+ width: 90.063em; }
+
+meta.foundation-mq-xxlarge {
+ font-family: "/only screen and (min-width:120.063em)/";
+ width: 120.063em; }
+
+meta.foundation-data-attribute-namespace {
+ font-family: false; }
+
+html, body {
+ height: 100%; }
+
+html {
+ box-sizing: border-box; }
+
+*, *:before, *:after {
+ -webkit-box-sizing: inherit;
+ -moz-box-sizing: inherit;
+ box-sizing: inherit; }
+
+html, body {
+ font-size: 100%; }
+
+body {
+ background: url(../assets/repeating-bkgrd-pattern.jpg) repeat;
+ color: #000000;
+ cursor: auto;
+ font-family: "Times New Roman";
+ font-style: normal;
+ font-weight: normal;
+ line-height: 150%;
+ margin: 0;
+ padding: 0;
+ position: relative; }
+
+a:hover {
+ cursor: pointer; }
+
+img {
+ max-width: 100%;
+ height: auto; }
+
+img {
+ -ms-interpolation-mode: bicubic; }
+
+#map_canvas img, #map_canvas embed, #map_canvas object, .map_canvas img, .map_canvas embed, .map_canvas object, .mqa-display img, .mqa-display embed, .mqa-display object {
+ max-width: none !important; }
+
+.left {
+ float: left !important; }
+
+.right {
+ float: right !important; }
+
+.clearfix:before, .clearfix:after {
+ content: " ";
+ display: table; }
+.clearfix:after {
+ clear: both; }
+
+.hide {
+ display: none; }
+
+.invisible {
+ visibility: hidden; }
+
+.antialiased {
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale; }
+
+img {
+ display: inline-block;
+ vertical-align: middle; }
+
+textarea {
+ height: auto;
+ min-height: 50px; }
+
+select {
+ width: 100%; }
+
+.row {
+ margin: 0 auto;
+ max-width: 62.5rem;
+ width: 100%; }
+ .row:before, .row:after {
+ content: " ";
+ display: table; }
+ .row:after {
+ clear: both; }
+ .row.collapse > .column, .row.collapse > .columns {
+ padding-left: 0;
+ padding-right: 0; }
+ .row.collapse .row {
+ margin-left: 0;
+ margin-right: 0; }
+ .row .row {
+ margin: 0 -0.9375rem;
+ max-width: none;
+ width: auto; }
+ .row .row:before, .row .row:after {
+ content: " ";
+ display: table; }
+ .row .row:after {
+ clear: both; }
+ .row .row.collapse {
+ margin: 0;
+ max-width: none;
+ width: auto; }
+ .row .row.collapse:before, .row .row.collapse:after {
+ content: " ";
+ display: table; }
+ .row .row.collapse:after {
+ clear: both; }
+
+.column, .columns {
+ padding-left: 0.9375rem;
+ padding-right: 0.9375rem;
+ width: 100%;
+ float: left; }
+
+.column + .column:last-child, .columns + .columns:last-child {
+ float: right; }
+.column + .column.end, .columns + .columns.end {
+ float: left; }
+
+@media only screen {
+ .small-push-0 {
+ position: relative;
+ left: 0;
+ right: auto; }
+ .small-pull-0 {
+ position: relative;
+ right: 0;
+ left: auto; }
+ .small-push-1 {
+ position: relative;
+ left: 8.3333333333%;
+ right: auto; }
+ .small-pull-1 {
+ position: relative;
+ right: 8.3333333333%;
+ left: auto; }
+ .small-push-2 {
+ position: relative;
+ left: 16.6666666667%;
+ right: auto; }
+ .small-pull-2 {
+ position: relative;
+ right: 16.6666666667%;
+ left: auto; }
+ .small-push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+ .small-pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+ .small-push-4 {
+ position: relative;
+ left: 33.3333333333%;
+ right: auto; }
+ .small-pull-4 {
+ position: relative;
+ right: 33.3333333333%;
+ left: auto; }
+ .small-push-5 {
+ position: relative;
+ left: 41.6666666667%;
+ right: auto; }
+ .small-pull-5 {
+ position: relative;
+ right: 41.6666666667%;
+ left: auto; }
+ .small-push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+ .small-pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+ .small-push-7 {
+ position: relative;
+ left: 58.3333333333%;
+ right: auto; }
+ .small-pull-7 {
+ position: relative;
+ right: 58.3333333333%;
+ left: auto; }
+ .small-push-8 {
+ position: relative;
+ left: 66.6666666667%;
+ right: auto; }
+ .small-pull-8 {
+ position: relative;
+ right: 66.6666666667%;
+ left: auto; }
+ .small-push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+ .small-pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+ .small-push-10 {
+ position: relative;
+ left: 83.3333333333%;
+ right: auto; }
+ .small-pull-10 {
+ position: relative;
+ right: 83.3333333333%;
+ left: auto; }
+ .small-push-11 {
+ position: relative;
+ left: 91.6666666667%;
+ right: auto; }
+ .small-pull-11 {
+ position: relative;
+ right: 91.6666666667%;
+ left: auto; }
+ .column, .columns {
+ position: relative;
+ padding-left: 0.9375rem;
+ padding-right: 0.9375rem;
+ float: left; }
+ .small-1 {
+ width: 8.3333333333%; }
+ .small-2 {
+ width: 16.6666666667%; }
+ .small-3 {
+ width: 25%; }
+ .small-4 {
+ width: 33.3333333333%; }
+ .small-5 {
+ width: 41.6666666667%; }
+ .small-6 {
+ width: 50%; }
+ .small-7 {
+ width: 58.3333333333%; }
+ .small-8 {
+ width: 66.6666666667%; }
+ .small-9 {
+ width: 75%; }
+ .small-10 {
+ width: 83.3333333333%; }
+ .small-11 {
+ width: 91.6666666667%; }
+ .small-12 {
+ width: 100%; }
+ .small-offset-0 {
+ margin-left: 0 !important; }
+ .small-offset-1 {
+ margin-left: 8.3333333333% !important; }
+ .small-offset-2 {
+ margin-left: 16.6666666667% !important; }
+ .small-offset-3 {
+ margin-left: 25% !important; }
+ .small-offset-4 {
+ margin-left: 33.3333333333% !important; }
+ .small-offset-5 {
+ margin-left: 41.6666666667% !important; }
+ .small-offset-6 {
+ margin-left: 50% !important; }
+ .small-offset-7 {
+ margin-left: 58.3333333333% !important; }
+ .small-offset-8 {
+ margin-left: 66.6666666667% !important; }
+ .small-offset-9 {
+ margin-left: 75% !important; }
+ .small-offset-10 {
+ margin-left: 83.3333333333% !important; }
+ .small-offset-11 {
+ margin-left: 91.6666666667% !important; }
+ .small-reset-order {
+ float: left;
+ left: auto;
+ margin-left: 0;
+ margin-right: 0;
+ right: auto; }
+ .column.small-centered, .columns.small-centered {
+ margin-left: auto;
+ margin-right: auto;
+ float: none; }
+ .column.small-uncentered, .columns.small-uncentered {
+ float: left;
+ margin-left: 0;
+ margin-right: 0; }
+ .column.small-centered:last-child, .columns.small-centered:last-child {
+ float: none; }
+ .column.small-uncentered:last-child, .columns.small-uncentered:last-child {
+ float: left; }
+ .column.small-uncentered.opposite, .columns.small-uncentered.opposite {
+ float: right; }
+ .row.small-collapse > .column, .row.small-collapse > .columns {
+ padding-left: 0;
+ padding-right: 0; }
+ .row.small-collapse .row {
+ margin-left: 0;
+ margin-right: 0; }
+ .row.small-uncollapse > .column, .row.small-uncollapse > .columns {
+ padding-left: 0.9375rem;
+ padding-right: 0.9375rem;
+ float: left; } }
+
+@media only screen and (min-width:40.063em) {
+ .medium-push-0 {
+ position: relative;
+ left: 0;
+ right: auto; }
+ .medium-pull-0 {
+ position: relative;
+ right: 0;
+ left: auto; }
+ .medium-push-1 {
+ position: relative;
+ left: 8.3333333333%;
+ right: auto; }
+ .medium-pull-1 {
+ position: relative;
+ right: 8.3333333333%;
+ left: auto; }
+ .medium-push-2 {
+ position: relative;
+ left: 16.6666666667%;
+ right: auto; }
+ .medium-pull-2 {
+ position: relative;
+ right: 16.6666666667%;
+ left: auto; }
+ .medium-push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+ .medium-pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+ .medium-push-4 {
+ position: relative;
+ left: 33.3333333333%;
+ right: auto; }
+ .medium-pull-4 {
+ position: relative;
+ right: 33.3333333333%;
+ left: auto; }
+ .medium-push-5 {
+ position: relative;
+ left: 41.6666666667%;
+ right: auto; }
+ .medium-pull-5 {
+ position: relative;
+ right: 41.6666666667%;
+ left: auto; }
+ .medium-push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+ .medium-pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+ .medium-push-7 {
+ position: relative;
+ left: 58.3333333333%;
+ right: auto; }
+ .medium-pull-7 {
+ position: relative;
+ right: 58.3333333333%;
+ left: auto; }
+ .medium-push-8 {
+ position: relative;
+ left: 66.6666666667%;
+ right: auto; }
+ .medium-pull-8 {
+ position: relative;
+ right: 66.6666666667%;
+ left: auto; }
+ .medium-push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+ .medium-pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+ .medium-push-10 {
+ position: relative;
+ left: 83.3333333333%;
+ right: auto; }
+ .medium-pull-10 {
+ position: relative;
+ right: 83.3333333333%;
+ left: auto; }
+ .medium-push-11 {
+ position: relative;
+ left: 91.6666666667%;
+ right: auto; }
+ .medium-pull-11 {
+ position: relative;
+ right: 91.6666666667%;
+ left: auto; }
+ .column, .columns {
+ position: relative;
+ padding-left: 0.9375rem;
+ padding-right: 0.9375rem;
+ float: left; }
+ .medium-1 {
+ width: 8.3333333333%; }
+ .medium-2 {
+ width: 16.6666666667%; }
+ .medium-3 {
+ width: 25%; }
+ .medium-4 {
+ width: 33.3333333333%; }
+ .medium-5 {
+ width: 41.6666666667%; }
+ .medium-6 {
+ width: 50%; }
+ .medium-7 {
+ width: 58.3333333333%; }
+ .medium-8 {
+ width: 66.6666666667%; }
+ .medium-9 {
+ width: 75%; }
+ .medium-10 {
+ width: 83.3333333333%; }
+ .medium-11 {
+ width: 91.6666666667%; }
+ .medium-12 {
+ width: 100%; }
+ .medium-offset-0 {
+ margin-left: 0 !important; }
+ .medium-offset-1 {
+ margin-left: 8.3333333333% !important; }
+ .medium-offset-2 {
+ margin-left: 16.6666666667% !important; }
+ .medium-offset-3 {
+ margin-left: 25% !important; }
+ .medium-offset-4 {
+ margin-left: 33.3333333333% !important; }
+ .medium-offset-5 {
+ margin-left: 41.6666666667% !important; }
+ .medium-offset-6 {
+ margin-left: 50% !important; }
+ .medium-offset-7 {
+ margin-left: 58.3333333333% !important; }
+ .medium-offset-8 {
+ margin-left: 66.6666666667% !important; }
+ .medium-offset-9 {
+ margin-left: 75% !important; }
+ .medium-offset-10 {
+ margin-left: 83.3333333333% !important; }
+ .medium-offset-11 {
+ margin-left: 91.6666666667% !important; }
+ .medium-reset-order {
+ float: left;
+ left: auto;
+ margin-left: 0;
+ margin-right: 0;
+ right: auto; }
+ .column.medium-centered, .columns.medium-centered {
+ margin-left: auto;
+ margin-right: auto;
+ float: none; }
+ .column.medium-uncentered, .columns.medium-uncentered {
+ float: left;
+ margin-left: 0;
+ margin-right: 0; }
+ .column.medium-centered:last-child, .columns.medium-centered:last-child {
+ float: none; }
+ .column.medium-uncentered:last-child, .columns.medium-uncentered:last-child {
+ float: left; }
+ .column.medium-uncentered.opposite, .columns.medium-uncentered.opposite {
+ float: right; }
+ .row.medium-collapse > .column, .row.medium-collapse > .columns {
+ padding-left: 0;
+ padding-right: 0; }
+ .row.medium-collapse .row {
+ margin-left: 0;
+ margin-right: 0; }
+ .row.medium-uncollapse > .column, .row.medium-uncollapse > .columns {
+ padding-left: 0.9375rem;
+ padding-right: 0.9375rem;
+ float: left; }
+ .push-0 {
+ position: relative;
+ left: 0;
+ right: auto; }
+ .pull-0 {
+ position: relative;
+ right: 0;
+ left: auto; }
+ .push-1 {
+ position: relative;
+ left: 8.3333333333%;
+ right: auto; }
+ .pull-1 {
+ position: relative;
+ right: 8.3333333333%;
+ left: auto; }
+ .push-2 {
+ position: relative;
+ left: 16.6666666667%;
+ right: auto; }
+ .pull-2 {
+ position: relative;
+ right: 16.6666666667%;
+ left: auto; }
+ .push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+ .pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+ .push-4 {
+ position: relative;
+ left: 33.3333333333%;
+ right: auto; }
+ .pull-4 {
+ position: relative;
+ right: 33.3333333333%;
+ left: auto; }
+ .push-5 {
+ position: relative;
+ left: 41.6666666667%;
+ right: auto; }
+ .pull-5 {
+ position: relative;
+ right: 41.6666666667%;
+ left: auto; }
+ .push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+ .pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+ .push-7 {
+ position: relative;
+ left: 58.3333333333%;
+ right: auto; }
+ .pull-7 {
+ position: relative;
+ right: 58.3333333333%;
+ left: auto; }
+ .push-8 {
+ position: relative;
+ left: 66.6666666667%;
+ right: auto; }
+ .pull-8 {
+ position: relative;
+ right: 66.6666666667%;
+ left: auto; }
+ .push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+ .pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+ .push-10 {
+ position: relative;
+ left: 83.3333333333%;
+ right: auto; }
+ .pull-10 {
+ position: relative;
+ right: 83.3333333333%;
+ left: auto; }
+ .push-11 {
+ position: relative;
+ left: 91.6666666667%;
+ right: auto; }
+ .pull-11 {
+ position: relative;
+ right: 91.6666666667%;
+ left: auto; } }
+
+@media only screen and (min-width:64.063em) {
+ .large-push-0 {
+ position: relative;
+ left: 0;
+ right: auto; }
+ .large-pull-0 {
+ position: relative;
+ right: 0;
+ left: auto; }
+ .large-push-1 {
+ position: relative;
+ left: 8.3333333333%;
+ right: auto; }
+ .large-pull-1 {
+ position: relative;
+ right: 8.3333333333%;
+ left: auto; }
+ .large-push-2 {
+ position: relative;
+ left: 16.6666666667%;
+ right: auto; }
+ .large-pull-2 {
+ position: relative;
+ right: 16.6666666667%;
+ left: auto; }
+ .large-push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+ .large-pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+ .large-push-4 {
+ position: relative;
+ left: 33.3333333333%;
+ right: auto; }
+ .large-pull-4 {
+ position: relative;
+ right: 33.3333333333%;
+ left: auto; }
+ .large-push-5 {
+ position: relative;
+ left: 41.6666666667%;
+ right: auto; }
+ .large-pull-5 {
+ position: relative;
+ right: 41.6666666667%;
+ left: auto; }
+ .large-push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+ .large-pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+ .large-push-7 {
+ position: relative;
+ left: 58.3333333333%;
+ right: auto; }
+ .large-pull-7 {
+ position: relative;
+ right: 58.3333333333%;
+ left: auto; }
+ .large-push-8 {
+ position: relative;
+ left: 66.6666666667%;
+ right: auto; }
+ .large-pull-8 {
+ position: relative;
+ right: 66.6666666667%;
+ left: auto; }
+ .large-push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+ .large-pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+ .large-push-10 {
+ position: relative;
+ left: 83.3333333333%;
+ right: auto; }
+ .large-pull-10 {
+ position: relative;
+ right: 83.3333333333%;
+ left: auto; }
+ .large-push-11 {
+ position: relative;
+ left: 91.6666666667%;
+ right: auto; }
+ .large-pull-11 {
+ position: relative;
+ right: 91.6666666667%;
+ left: auto; }
+ .column, .columns {
+ position: relative;
+ padding-left: 0.9375rem;
+ padding-right: 0.9375rem;
+ float: left; }
+ .large-1 {
+ width: 8.3333333333%; }
+ .large-2 {
+ width: 16.6666666667%; }
+ .large-3 {
+ width: 25%; }
+ .large-4 {
+ width: 33.3333333333%; }
+ .large-5 {
+ width: 41.6666666667%; }
+ .large-6 {
+ width: 50%; }
+ .large-7 {
+ width: 58.3333333333%; }
+ .large-8 {
+ width: 66.6666666667%; }
+ .large-9 {
+ width: 75%; }
+ .large-10 {
+ width: 83.3333333333%; }
+ .large-11 {
+ width: 91.6666666667%; }
+ .large-12 {
+ width: 100%; }
+ .large-offset-0 {
+ margin-left: 0 !important; }
+ .large-offset-1 {
+ margin-left: 8.3333333333% !important; }
+ .large-offset-2 {
+ margin-left: 16.6666666667% !important; }
+ .large-offset-3 {
+ margin-left: 25% !important; }
+ .large-offset-4 {
+ margin-left: 33.3333333333% !important; }
+ .large-offset-5 {
+ margin-left: 41.6666666667% !important; }
+ .large-offset-6 {
+ margin-left: 50% !important; }
+ .large-offset-7 {
+ margin-left: 58.3333333333% !important; }
+ .large-offset-8 {
+ margin-left: 66.6666666667% !important; }
+ .large-offset-9 {
+ margin-left: 75% !important; }
+ .large-offset-10 {
+ margin-left: 83.3333333333% !important; }
+ .large-offset-11 {
+ margin-left: 91.6666666667% !important; }
+ .large-reset-order {
+ float: left;
+ left: auto;
+ margin-left: 0;
+ margin-right: 0;
+ right: auto; }
+ .column.large-centered, .columns.large-centered {
+ margin-left: auto;
+ margin-right: auto;
+ float: none; }
+ .column.large-uncentered, .columns.large-uncentered {
+ float: left;
+ margin-left: 0;
+ margin-right: 0; }
+ .column.large-centered:last-child, .columns.large-centered:last-child {
+ float: none; }
+ .column.large-uncentered:last-child, .columns.large-uncentered:last-child {
+ float: left; }
+ .column.large-uncentered.opposite, .columns.large-uncentered.opposite {
+ float: right; }
+ .row.large-collapse > .column, .row.large-collapse > .columns {
+ padding-left: 0;
+ padding-right: 0; }
+ .row.large-collapse .row {
+ margin-left: 0;
+ margin-right: 0; }
+ .row.large-uncollapse > .column, .row.large-uncollapse > .columns {
+ padding-left: 0.9375rem;
+ padding-right: 0.9375rem;
+ float: left; }
+ .push-0 {
+ position: relative;
+ left: 0;
+ right: auto; }
+ .pull-0 {
+ position: relative;
+ right: 0;
+ left: auto; }
+ .push-1 {
+ position: relative;
+ left: 8.3333333333%;
+ right: auto; }
+ .pull-1 {
+ position: relative;
+ right: 8.3333333333%;
+ left: auto; }
+ .push-2 {
+ position: relative;
+ left: 16.6666666667%;
+ right: auto; }
+ .pull-2 {
+ position: relative;
+ right: 16.6666666667%;
+ left: auto; }
+ .push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+ .pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+ .push-4 {
+ position: relative;
+ left: 33.3333333333%;
+ right: auto; }
+ .pull-4 {
+ position: relative;
+ right: 33.3333333333%;
+ left: auto; }
+ .push-5 {
+ position: relative;
+ left: 41.6666666667%;
+ right: auto; }
+ .pull-5 {
+ position: relative;
+ right: 41.6666666667%;
+ left: auto; }
+ .push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+ .pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+ .push-7 {
+ position: relative;
+ left: 58.3333333333%;
+ right: auto; }
+ .pull-7 {
+ position: relative;
+ right: 58.3333333333%;
+ left: auto; }
+ .push-8 {
+ position: relative;
+ left: 66.6666666667%;
+ right: auto; }
+ .pull-8 {
+ position: relative;
+ right: 66.6666666667%;
+ left: auto; }
+ .push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+ .pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+ .push-10 {
+ position: relative;
+ left: 83.3333333333%;
+ right: auto; }
+ .pull-10 {
+ position: relative;
+ right: 83.3333333333%;
+ left: auto; }
+ .push-11 {
+ position: relative;
+ left: 91.6666666667%;
+ right: auto; }
+ .pull-11 {
+ position: relative;
+ right: 91.6666666667%;
+ left: auto; } }
+
+.accordion {
+ margin-bottom: 0; }
+ .accordion:before, .accordion:after {
+ content: " ";
+ display: table; }
+ .accordion:after {
+ clear: both; }
+ .accordion .accordion-navigation, .accordion dd {
+ display: block;
+ margin-bottom: 0 !important; }
+ .accordion .accordion-navigation.active > a, .accordion dd.active > a {
+ background: #e8e8e8; }
+ .accordion .accordion-navigation > a, .accordion dd > a {
+ background: #EFEFEF;
+ color: #222222;
+ display: block;
+ font-family: "Times New Roman";
+ font-size: 1rem;
+ padding: 1rem; }
+ .accordion .accordion-navigation > a:hover, .accordion dd > a:hover {
+ background: #e3e3e3; }
+ .accordion .accordion-navigation > .content, .accordion dd > .content {
+ display: none;
+ padding: 0.9375rem; }
+ .accordion .accordion-navigation > .content.active, .accordion dd > .content.active {
+ background: #FFFFFF;
+ display: block; }
+
+.alert-box {
+ border-style: solid;
+ border-width: 1px;
+ display: block;
+ font-size: 0.8125rem;
+ font-weight: normal;
+ margin-bottom: 1.25rem;
+ padding: 0.875rem 1.5rem 0.875rem 0.875rem;
+ position: relative;
+ transition: opacity 300ms ease-out;
+ background-color: #008CBA;
+ border-color: #0078a0;
+ color: #FFFFFF; }
+ .alert-box .close {
+ right: 0.25rem;
+ background: inherit;
+ color: #333333;
+ font-size: 1.375rem;
+ line-height: .9;
+ margin-top: -0.6875rem;
+ opacity: 0.3;
+ padding: 0 6px 4px;
+ position: absolute;
+ top: 50%; }
+ .alert-box .close:hover, .alert-box .close:focus {
+ opacity: 0.5; }
+ .alert-box.radius {
+ border-radius: 3px; }
+ .alert-box.round {
+ border-radius: 1000px; }
+ .alert-box.success {
+ background-color: #43AC6A;
+ border-color: #3a945b;
+ color: #FFFFFF; }
+ .alert-box.alert {
+ background-color: #f04124;
+ border-color: #de2d0f;
+ color: #FFFFFF; }
+ .alert-box.secondary {
+ background-color: #e7e7e7;
+ border-color: #c7c7c7;
+ color: #4f4f4f; }
+ .alert-box.warning {
+ background-color: #f08a24;
+ border-color: #de770f;
+ color: #FFFFFF; }
+ .alert-box.info {
+ background-color: #a0d3e8;
+ border-color: #74bfdd;
+ color: #4f4f4f; }
+ .alert-box.alert-close {
+ opacity: 0; }
+
+[class*="block-grid-"] {
+ display: block;
+ padding: 0;
+ margin: 0 -0.625rem; }
+ [class*="block-grid-"]:before, [class*="block-grid-"]:after {
+ content: " ";
+ display: table; }
+ [class*="block-grid-"]:after {
+ clear: both; }
+ [class*="block-grid-"] > li {
+ display: block;
+ float: left;
+ height: auto;
+ padding: 0 0.625rem 1.25rem; }
+
+@media only screen {
+ .small-block-grid-1 > li {
+ list-style: none;
+ width: 100%; }
+ .small-block-grid-1 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-1 > li:nth-of-type(1n+1) {
+ clear: both; }
+ .small-block-grid-2 > li {
+ list-style: none;
+ width: 50%; }
+ .small-block-grid-2 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-2 > li:nth-of-type(2n+1) {
+ clear: both; }
+ .small-block-grid-3 > li {
+ list-style: none;
+ width: 33.3333333333%; }
+ .small-block-grid-3 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-3 > li:nth-of-type(3n+1) {
+ clear: both; }
+ .small-block-grid-4 > li {
+ list-style: none;
+ width: 25%; }
+ .small-block-grid-4 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-4 > li:nth-of-type(4n+1) {
+ clear: both; }
+ .small-block-grid-5 > li {
+ list-style: none;
+ width: 20%; }
+ .small-block-grid-5 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-5 > li:nth-of-type(5n+1) {
+ clear: both; }
+ .small-block-grid-6 > li {
+ list-style: none;
+ width: 16.6666666667%; }
+ .small-block-grid-6 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-6 > li:nth-of-type(6n+1) {
+ clear: both; }
+ .small-block-grid-7 > li {
+ list-style: none;
+ width: 14.2857142857%; }
+ .small-block-grid-7 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-7 > li:nth-of-type(7n+1) {
+ clear: both; }
+ .small-block-grid-8 > li {
+ list-style: none;
+ width: 12.5%; }
+ .small-block-grid-8 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-8 > li:nth-of-type(8n+1) {
+ clear: both; }
+ .small-block-grid-9 > li {
+ list-style: none;
+ width: 11.1111111111%; }
+ .small-block-grid-9 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-9 > li:nth-of-type(9n+1) {
+ clear: both; }
+ .small-block-grid-10 > li {
+ list-style: none;
+ width: 10%; }
+ .small-block-grid-10 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-10 > li:nth-of-type(10n+1) {
+ clear: both; }
+ .small-block-grid-11 > li {
+ list-style: none;
+ width: 9.0909090909%; }
+ .small-block-grid-11 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-11 > li:nth-of-type(11n+1) {
+ clear: both; }
+ .small-block-grid-12 > li {
+ list-style: none;
+ width: 8.3333333333%; }
+ .small-block-grid-12 > li:nth-of-type(1n) {
+ clear: none; }
+ .small-block-grid-12 > li:nth-of-type(12n+1) {
+ clear: both; } }
+
+@media only screen and (min-width:40.063em) {
+ .medium-block-grid-1 > li {
+ list-style: none;
+ width: 100%; }
+ .medium-block-grid-1 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-1 > li:nth-of-type(1n+1) {
+ clear: both; }
+ .medium-block-grid-2 > li {
+ list-style: none;
+ width: 50%; }
+ .medium-block-grid-2 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-2 > li:nth-of-type(2n+1) {
+ clear: both; }
+ .medium-block-grid-3 > li {
+ list-style: none;
+ width: 33.3333333333%; }
+ .medium-block-grid-3 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-3 > li:nth-of-type(3n+1) {
+ clear: both; }
+ .medium-block-grid-4 > li {
+ list-style: none;
+ width: 25%; }
+ .medium-block-grid-4 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-4 > li:nth-of-type(4n+1) {
+ clear: both; }
+ .medium-block-grid-5 > li {
+ list-style: none;
+ width: 20%; }
+ .medium-block-grid-5 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-5 > li:nth-of-type(5n+1) {
+ clear: both; }
+ .medium-block-grid-6 > li {
+ list-style: none;
+ width: 16.6666666667%; }
+ .medium-block-grid-6 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-6 > li:nth-of-type(6n+1) {
+ clear: both; }
+ .medium-block-grid-7 > li {
+ list-style: none;
+ width: 14.2857142857%; }
+ .medium-block-grid-7 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-7 > li:nth-of-type(7n+1) {
+ clear: both; }
+ .medium-block-grid-8 > li {
+ list-style: none;
+ width: 12.5%; }
+ .medium-block-grid-8 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-8 > li:nth-of-type(8n+1) {
+ clear: both; }
+ .medium-block-grid-9 > li {
+ list-style: none;
+ width: 11.1111111111%; }
+ .medium-block-grid-9 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-9 > li:nth-of-type(9n+1) {
+ clear: both; }
+ .medium-block-grid-10 > li {
+ list-style: none;
+ width: 10%; }
+ .medium-block-grid-10 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-10 > li:nth-of-type(10n+1) {
+ clear: both; }
+ .medium-block-grid-11 > li {
+ list-style: none;
+ width: 9.0909090909%; }
+ .medium-block-grid-11 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-11 > li:nth-of-type(11n+1) {
+ clear: both; }
+ .medium-block-grid-12 > li {
+ list-style: none;
+ width: 8.3333333333%; }
+ .medium-block-grid-12 > li:nth-of-type(1n) {
+ clear: none; }
+ .medium-block-grid-12 > li:nth-of-type(12n+1) {
+ clear: both; } }
+
+@media only screen and (min-width:64.063em) {
+ .large-block-grid-1 > li {
+ list-style: none;
+ width: 100%; }
+ .large-block-grid-1 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-1 > li:nth-of-type(1n+1) {
+ clear: both; }
+ .large-block-grid-2 > li {
+ list-style: none;
+ width: 50%; }
+ .large-block-grid-2 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-2 > li:nth-of-type(2n+1) {
+ clear: both; }
+ .large-block-grid-3 > li {
+ list-style: none;
+ width: 33.3333333333%; }
+ .large-block-grid-3 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-3 > li:nth-of-type(3n+1) {
+ clear: both; }
+ .large-block-grid-4 > li {
+ list-style: none;
+ width: 25%; }
+ .large-block-grid-4 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-4 > li:nth-of-type(4n+1) {
+ clear: both; }
+ .large-block-grid-5 > li {
+ list-style: none;
+ width: 20%; }
+ .large-block-grid-5 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-5 > li:nth-of-type(5n+1) {
+ clear: both; }
+ .large-block-grid-6 > li {
+ list-style: none;
+ width: 16.6666666667%; }
+ .large-block-grid-6 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-6 > li:nth-of-type(6n+1) {
+ clear: both; }
+ .large-block-grid-7 > li {
+ list-style: none;
+ width: 14.2857142857%; }
+ .large-block-grid-7 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-7 > li:nth-of-type(7n+1) {
+ clear: both; }
+ .large-block-grid-8 > li {
+ list-style: none;
+ width: 12.5%; }
+ .large-block-grid-8 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-8 > li:nth-of-type(8n+1) {
+ clear: both; }
+ .large-block-grid-9 > li {
+ list-style: none;
+ width: 11.1111111111%; }
+ .large-block-grid-9 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-9 > li:nth-of-type(9n+1) {
+ clear: both; }
+ .large-block-grid-10 > li {
+ list-style: none;
+ width: 10%; }
+ .large-block-grid-10 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-10 > li:nth-of-type(10n+1) {
+ clear: both; }
+ .large-block-grid-11 > li {
+ list-style: none;
+ width: 9.0909090909%; }
+ .large-block-grid-11 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-11 > li:nth-of-type(11n+1) {
+ clear: both; }
+ .large-block-grid-12 > li {
+ list-style: none;
+ width: 8.3333333333%; }
+ .large-block-grid-12 > li:nth-of-type(1n) {
+ clear: none; }
+ .large-block-grid-12 > li:nth-of-type(12n+1) {
+ clear: both; } }
+
+.breadcrumbs {
+ border-style: solid;
+ border-width: 1px;
+ display: block;
+ list-style: none;
+ margin-left: 0;
+ overflow: hidden;
+ padding: 0.5625rem 0.875rem 0.5625rem;
+ background-color: #f4f4f4;
+ border-color: gainsboro;
+ border-radius: 3px; }
+ .breadcrumbs > * {
+ color: #008CBA;
+ float: left;
+ font-size: 0.6875rem;
+ line-height: 0.6875rem;
+ margin: 0;
+ text-transform: uppercase; }
+ .breadcrumbs > *:hover a, .breadcrumbs > *:focus a {
+ text-decoration: underline; }
+ .breadcrumbs > * a {
+ color: #008CBA; }
+ .breadcrumbs > *.current {
+ color: #333333;
+ cursor: default; }
+ .breadcrumbs > *.current a {
+ color: #333333;
+ cursor: default; }
+ .breadcrumbs > *.current:hover, .breadcrumbs > *.current:hover a, .breadcrumbs > *.current:focus, .breadcrumbs > *.current:focus a {
+ text-decoration: none; }
+ .breadcrumbs > *.unavailable {
+ color: #999999; }
+ .breadcrumbs > *.unavailable a {
+ color: #999999; }
+ .breadcrumbs > *.unavailable:hover, .breadcrumbs > *.unavailable:hover a, .breadcrumbs > *.unavailable:focus, .breadcrumbs > *.unavailable a:focus {
+ color: #999999;
+ cursor: false;
+ text-decoration: none; }
+ .breadcrumbs > *:before {
+ color: #AAAAAA;
+ content: "/";
+ margin: 0 0.75rem;
+ position: relative;
+ top: 1px; }
+ .breadcrumbs > *:first-child:before {
+ content: " ";
+ margin: 0; }
+
+/* Accessibility - hides the forward slash */
+[aria-label="breadcrumbs"] [aria-hidden="true"]:after {
+ content: "/"; }
+
+button, .button {
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ border-radius: 0;
+ border-style: solid;
+ border-width: 0;
+ cursor: pointer;
+ font-family: "Times New Roman";
+ font-weight: normal;
+ line-height: normal;
+ margin: 0 0 1.25rem;
+ position: relative;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ padding: 1rem 2rem 1.0625rem 2rem;
+ font-size: 1rem;
+ background-color: #008CBA;
+ border-color: #007095;
+ color: #FFFFFF;
+ transition: background-color 300ms ease-out; }
+ button:hover, button:focus, .button:hover, .button:focus {
+ background-color: #007095; }
+ button:hover, button:focus, .button:hover, .button:focus {
+ color: #FFFFFF; }
+ button.secondary, .button.secondary {
+ background-color: #e7e7e7;
+ border-color: #b9b9b9;
+ color: #333333; }
+ button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus {
+ background-color: #b9b9b9; }
+ button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus {
+ color: #333333; }
+ button.success, .button.success {
+ background-color: #43AC6A;
+ border-color: #368a55;
+ color: #FFFFFF; }
+ button.success:hover, button.success:focus, .button.success:hover, .button.success:focus {
+ background-color: #368a55; }
+ button.success:hover, button.success:focus, .button.success:hover, .button.success:focus {
+ color: #FFFFFF; }
+ button.alert, .button.alert {
+ background-color: #f04124;
+ border-color: #cf2a0e;
+ color: #FFFFFF; }
+ button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus {
+ background-color: #cf2a0e; }
+ button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus {
+ color: #FFFFFF; }
+ button.warning, .button.warning {
+ background-color: #f08a24;
+ border-color: #cf6e0e;
+ color: #FFFFFF; }
+ button.warning:hover, button.warning:focus, .button.warning:hover, .button.warning:focus {
+ background-color: #cf6e0e; }
+ button.warning:hover, button.warning:focus, .button.warning:hover, .button.warning:focus {
+ color: #FFFFFF; }
+ button.info, .button.info {
+ background-color: #a0d3e8;
+ border-color: #61b6d9;
+ color: #333333; }
+ button.info:hover, button.info:focus, .button.info:hover, .button.info:focus {
+ background-color: #61b6d9; }
+ button.info:hover, button.info:focus, .button.info:hover, .button.info:focus {
+ color: #FFFFFF; }
+ button.large, .button.large {
+ padding: 1.125rem 2.25rem 1.1875rem 2.25rem;
+ font-size: 1.25rem; }
+ button.small, .button.small {
+ padding: 0.875rem 1.75rem 0.9375rem 1.75rem;
+ font-size: 0.8125rem; }
+ button.tiny, .button.tiny {
+ padding: 0.625rem 1.25rem 0.6875rem 1.25rem;
+ font-size: 0.6875rem; }
+ button.expand, .button.expand {
+ padding-left: 0;
+ padding-right: 0;
+ width: 100%; }
+ button.left-align, .button.left-align {
+ text-align: left;
+ text-indent: 0.75rem; }
+ button.right-align, .button.right-align {
+ text-align: right;
+ padding-right: 0.75rem; }
+ button.radius, .button.radius {
+ border-radius: 3px; }
+ button.round, .button.round {
+ border-radius: 1000px; }
+ button.disabled, button[disabled], .button.disabled, .button[disabled] {
+ background-color: #008CBA;
+ border-color: #007095;
+ color: #FFFFFF;
+ box-shadow: none;
+ cursor: default;
+ opacity: 0.7; }
+ button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
+ background-color: #007095; }
+ button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
+ color: #FFFFFF; }
+ button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
+ background-color: #008CBA; }
+ button.disabled.secondary, button[disabled].secondary, .button.disabled.secondary, .button[disabled].secondary {
+ background-color: #e7e7e7;
+ border-color: #b9b9b9;
+ color: #333333;
+ box-shadow: none;
+ cursor: default;
+ opacity: 0.7; }
+ button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
+ background-color: #b9b9b9; }
+ button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
+ color: #333333; }
+ button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
+ background-color: #e7e7e7; }
+ button.disabled.success, button[disabled].success, .button.disabled.success, .button[disabled].success {
+ background-color: #43AC6A;
+ border-color: #368a55;
+ color: #FFFFFF;
+ box-shadow: none;
+ cursor: default;
+ opacity: 0.7; }
+ button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
+ background-color: #368a55; }
+ button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
+ color: #FFFFFF; }
+ button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
+ background-color: #43AC6A; }
+ button.disabled.alert, button[disabled].alert, .button.disabled.alert, .button[disabled].alert {
+ background-color: #f04124;
+ border-color: #cf2a0e;
+ color: #FFFFFF;
+ box-shadow: none;
+ cursor: default;
+ opacity: 0.7; }
+ button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
+ background-color: #cf2a0e; }
+ button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
+ color: #FFFFFF; }
+ button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
+ background-color: #f04124; }
+ button.disabled.warning, button[disabled].warning, .button.disabled.warning, .button[disabled].warning {
+ background-color: #f08a24;
+ border-color: #cf6e0e;
+ color: #FFFFFF;
+ box-shadow: none;
+ cursor: default;
+ opacity: 0.7; }
+ button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus {
+ background-color: #cf6e0e; }
+ button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus {
+ color: #FFFFFF; }
+ button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus {
+ background-color: #f08a24; }
+ button.disabled.info, button[disabled].info, .button.disabled.info, .button[disabled].info {
+ background-color: #a0d3e8;
+ border-color: #61b6d9;
+ color: #333333;
+ box-shadow: none;
+ cursor: default;
+ opacity: 0.7; }
+ button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus {
+ background-color: #61b6d9; }
+ button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus {
+ color: #FFFFFF; }
+ button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus {
+ background-color: #a0d3e8; }
+
+button::-moz-focus-inner {
+ border: 0;
+ padding: 0; }
+
+@media only screen and (min-width:40.063em) {
+ button, .button {
+ display: inline-block; } }
+
+.button-group {
+ list-style: none;
+ margin: 0;
+ left: 0; }
+ .button-group:before, .button-group:after {
+ content: " ";
+ display: table; }
+ .button-group:after {
+ clear: both; }
+ .button-group.even-2 li {
+ display: inline-block;
+ margin: 0 -2px;
+ width: 50%; }
+ .button-group.even-2 li > button, .button-group.even-2 li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.even-2 li:first-child button, .button-group.even-2 li:first-child .button {
+ border-left: 0; }
+ .button-group.even-2 li button, .button-group.even-2 li .button {
+ width: 100%; }
+ .button-group.even-3 li {
+ display: inline-block;
+ margin: 0 -2px;
+ width: 33.3333333333%; }
+ .button-group.even-3 li > button, .button-group.even-3 li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.even-3 li:first-child button, .button-group.even-3 li:first-child .button {
+ border-left: 0; }
+ .button-group.even-3 li button, .button-group.even-3 li .button {
+ width: 100%; }
+ .button-group.even-4 li {
+ display: inline-block;
+ margin: 0 -2px;
+ width: 25%; }
+ .button-group.even-4 li > button, .button-group.even-4 li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.even-4 li:first-child button, .button-group.even-4 li:first-child .button {
+ border-left: 0; }
+ .button-group.even-4 li button, .button-group.even-4 li .button {
+ width: 100%; }
+ .button-group.even-5 li {
+ display: inline-block;
+ margin: 0 -2px;
+ width: 20%; }
+ .button-group.even-5 li > button, .button-group.even-5 li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.even-5 li:first-child button, .button-group.even-5 li:first-child .button {
+ border-left: 0; }
+ .button-group.even-5 li button, .button-group.even-5 li .button {
+ width: 100%; }
+ .button-group.even-6 li {
+ display: inline-block;
+ margin: 0 -2px;
+ width: 16.6666666667%; }
+ .button-group.even-6 li > button, .button-group.even-6 li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.even-6 li:first-child button, .button-group.even-6 li:first-child .button {
+ border-left: 0; }
+ .button-group.even-6 li button, .button-group.even-6 li .button {
+ width: 100%; }
+ .button-group.even-7 li {
+ display: inline-block;
+ margin: 0 -2px;
+ width: 14.2857142857%; }
+ .button-group.even-7 li > button, .button-group.even-7 li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.even-7 li:first-child button, .button-group.even-7 li:first-child .button {
+ border-left: 0; }
+ .button-group.even-7 li button, .button-group.even-7 li .button {
+ width: 100%; }
+ .button-group.even-8 li {
+ display: inline-block;
+ margin: 0 -2px;
+ width: 12.5%; }
+ .button-group.even-8 li > button, .button-group.even-8 li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.even-8 li:first-child button, .button-group.even-8 li:first-child .button {
+ border-left: 0; }
+ .button-group.even-8 li button, .button-group.even-8 li .button {
+ width: 100%; }
+ .button-group > li {
+ display: inline-block;
+ margin: 0 -2px; }
+ .button-group > li > button, .button-group > li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group > li:first-child button, .button-group > li:first-child .button {
+ border-left: 0; }
+ .button-group.stack > li {
+ display: block;
+ margin: 0;
+ float: none; }
+ .button-group.stack > li > button, .button-group.stack > li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.stack > li:first-child button, .button-group.stack > li:first-child .button {
+ border-left: 0; }
+ .button-group.stack > li > button, .button-group.stack > li .button {
+ border-color: rgba(255, 255, 255, 0.5);
+ border-left-width: 0;
+ border-top: 1px solid;
+ display: block;
+ margin: 0; }
+ .button-group.stack > li > button {
+ width: 100%; }
+ .button-group.stack > li:first-child button, .button-group.stack > li:first-child .button {
+ border-top: 0; }
+ .button-group.stack-for-small > li {
+ display: inline-block;
+ margin: 0 -2px; }
+ .button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button {
+ border-left: 0; }
+ @media only screen and (max-width: 40em) {
+ .button-group.stack-for-small > li {
+ display: block;
+ margin: 0; }
+ .button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button {
+ border-left: 0; }
+ .button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button {
+ border-color: rgba(255, 255, 255, 0.5);
+ border-left-width: 0;
+ border-top: 1px solid;
+ display: block;
+ margin: 0; }
+ .button-group.stack-for-small > li > button {
+ width: 100%; }
+ .button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button {
+ border-top: 0; } }
+ .button-group.radius > * {
+ display: inline-block;
+ margin: 0 -2px; }
+ .button-group.radius > * > button, .button-group.radius > * .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.radius > *:first-child button, .button-group.radius > *:first-child .button {
+ border-left: 0; }
+ .button-group.radius > *, .button-group.radius > * > a, .button-group.radius > * > button, .button-group.radius > * > .button {
+ border-radius: 0; }
+ .button-group.radius > *:first-child, .button-group.radius > *:first-child > a, .button-group.radius > *:first-child > button, .button-group.radius > *:first-child > .button {
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+ .button-group.radius > *:last-child, .button-group.radius > *:last-child > a, .button-group.radius > *:last-child > button, .button-group.radius > *:last-child > .button {
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+ .button-group.radius.stack > * {
+ display: block;
+ margin: 0; }
+ .button-group.radius.stack > * > button, .button-group.radius.stack > * .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.radius.stack > *:first-child button, .button-group.radius.stack > *:first-child .button {
+ border-left: 0; }
+ .button-group.radius.stack > * > button, .button-group.radius.stack > * .button {
+ border-color: rgba(255, 255, 255, 0.5);
+ border-left-width: 0;
+ border-top: 1px solid;
+ display: block;
+ margin: 0; }
+ .button-group.radius.stack > * > button {
+ width: 100%; }
+ .button-group.radius.stack > *:first-child button, .button-group.radius.stack > *:first-child .button {
+ border-top: 0; }
+ .button-group.radius.stack > *, .button-group.radius.stack > * > a, .button-group.radius.stack > * > button, .button-group.radius.stack > * > .button {
+ border-radius: 0; }
+ .button-group.radius.stack > *:first-child, .button-group.radius.stack > *:first-child > a, .button-group.radius.stack > *:first-child > button, .button-group.radius.stack > *:first-child > .button {
+ -webkit-top-left-radius: 3px;
+ -webkit-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px; }
+ .button-group.radius.stack > *:last-child, .button-group.radius.stack > *:last-child > a, .button-group.radius.stack > *:last-child > button, .button-group.radius.stack > *:last-child > .button {
+ -webkit-bottom-left-radius: 3px;
+ -webkit-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px; }
+ @media only screen and (min-width:40.063em) {
+ .button-group.radius.stack-for-small > * {
+ display: inline-block;
+ margin: 0 -2px; }
+ .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button {
+ border-left: 0; }
+ .button-group.radius.stack-for-small > *, .button-group.radius.stack-for-small > * > a, .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * > .button {
+ border-radius: 0; }
+ .button-group.radius.stack-for-small > *:first-child, .button-group.radius.stack-for-small > *:first-child > a, .button-group.radius.stack-for-small > *:first-child > button, .button-group.radius.stack-for-small > *:first-child > .button {
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+ .button-group.radius.stack-for-small > *:last-child, .button-group.radius.stack-for-small > *:last-child > a, .button-group.radius.stack-for-small > *:last-child > button, .button-group.radius.stack-for-small > *:last-child > .button {
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; } }
+ @media only screen and (max-width: 40em) {
+ .button-group.radius.stack-for-small > * {
+ display: block;
+ margin: 0; }
+ .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button {
+ border-left: 0; }
+ .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button {
+ border-color: rgba(255, 255, 255, 0.5);
+ border-left-width: 0;
+ border-top: 1px solid;
+ display: block;
+ margin: 0; }
+ .button-group.radius.stack-for-small > * > button {
+ width: 100%; }
+ .button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button {
+ border-top: 0; }
+ .button-group.radius.stack-for-small > *, .button-group.radius.stack-for-small > * > a, .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * > .button {
+ border-radius: 0; }
+ .button-group.radius.stack-for-small > *:first-child, .button-group.radius.stack-for-small > *:first-child > a, .button-group.radius.stack-for-small > *:first-child > button, .button-group.radius.stack-for-small > *:first-child > .button {
+ -webkit-top-left-radius: 3px;
+ -webkit-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px; }
+ .button-group.radius.stack-for-small > *:last-child, .button-group.radius.stack-for-small > *:last-child > a, .button-group.radius.stack-for-small > *:last-child > button, .button-group.radius.stack-for-small > *:last-child > .button {
+ -webkit-bottom-left-radius: 3px;
+ -webkit-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px; } }
+ .button-group.round > * {
+ display: inline-block;
+ margin: 0 -2px; }
+ .button-group.round > * > button, .button-group.round > * .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.round > *:first-child button, .button-group.round > *:first-child .button {
+ border-left: 0; }
+ .button-group.round > *, .button-group.round > * > a, .button-group.round > * > button, .button-group.round > * > .button {
+ border-radius: 0; }
+ .button-group.round > *:first-child, .button-group.round > *:first-child > a, .button-group.round > *:first-child > button, .button-group.round > *:first-child > .button {
+ -webkit-border-bottom-left-radius: 1000px;
+ -webkit-border-top-left-radius: 1000px;
+ border-bottom-left-radius: 1000px;
+ border-top-left-radius: 1000px; }
+ .button-group.round > *:last-child, .button-group.round > *:last-child > a, .button-group.round > *:last-child > button, .button-group.round > *:last-child > .button {
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; }
+ .button-group.round.stack > * {
+ display: block;
+ margin: 0; }
+ .button-group.round.stack > * > button, .button-group.round.stack > * .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.round.stack > *:first-child button, .button-group.round.stack > *:first-child .button {
+ border-left: 0; }
+ .button-group.round.stack > * > button, .button-group.round.stack > * .button {
+ border-color: rgba(255, 255, 255, 0.5);
+ border-left-width: 0;
+ border-top: 1px solid;
+ display: block;
+ margin: 0; }
+ .button-group.round.stack > * > button {
+ width: 100%; }
+ .button-group.round.stack > *:first-child button, .button-group.round.stack > *:first-child .button {
+ border-top: 0; }
+ .button-group.round.stack > *, .button-group.round.stack > * > a, .button-group.round.stack > * > button, .button-group.round.stack > * > .button {
+ border-radius: 0; }
+ .button-group.round.stack > *:first-child, .button-group.round.stack > *:first-child > a, .button-group.round.stack > *:first-child > button, .button-group.round.stack > *:first-child > .button {
+ -webkit-top-left-radius: 1rem;
+ -webkit-top-right-radius: 1rem;
+ border-top-left-radius: 1rem;
+ border-top-right-radius: 1rem; }
+ .button-group.round.stack > *:last-child, .button-group.round.stack > *:last-child > a, .button-group.round.stack > *:last-child > button, .button-group.round.stack > *:last-child > .button {
+ -webkit-bottom-left-radius: 1rem;
+ -webkit-bottom-right-radius: 1rem;
+ border-bottom-left-radius: 1rem;
+ border-bottom-right-radius: 1rem; }
+ @media only screen and (min-width:40.063em) {
+ .button-group.round.stack-for-small > * {
+ display: inline-block;
+ margin: 0 -2px; }
+ .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button {
+ border-left: 0; }
+ .button-group.round.stack-for-small > *, .button-group.round.stack-for-small > * > a, .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * > .button {
+ border-radius: 0; }
+ .button-group.round.stack-for-small > *:first-child, .button-group.round.stack-for-small > *:first-child > a, .button-group.round.stack-for-small > *:first-child > button, .button-group.round.stack-for-small > *:first-child > .button {
+ -webkit-border-bottom-left-radius: 1000px;
+ -webkit-border-top-left-radius: 1000px;
+ border-bottom-left-radius: 1000px;
+ border-top-left-radius: 1000px; }
+ .button-group.round.stack-for-small > *:last-child, .button-group.round.stack-for-small > *:last-child > a, .button-group.round.stack-for-small > *:last-child > button, .button-group.round.stack-for-small > *:last-child > .button {
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; } }
+ @media only screen and (max-width: 40em) {
+ .button-group.round.stack-for-small > * {
+ display: block;
+ margin: 0; }
+ .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button {
+ border-left: 1px solid;
+ border-color: rgba(255, 255, 255, 0.5); }
+ .button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button {
+ border-left: 0; }
+ .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button {
+ border-color: rgba(255, 255, 255, 0.5);
+ border-left-width: 0;
+ border-top: 1px solid;
+ display: block;
+ margin: 0; }
+ .button-group.round.stack-for-small > * > button {
+ width: 100%; }
+ .button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button {
+ border-top: 0; }
+ .button-group.round.stack-for-small > *, .button-group.round.stack-for-small > * > a, .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * > .button {
+ border-radius: 0; }
+ .button-group.round.stack-for-small > *:first-child, .button-group.round.stack-for-small > *:first-child > a, .button-group.round.stack-for-small > *:first-child > button, .button-group.round.stack-for-small > *:first-child > .button {
+ -webkit-top-left-radius: 1rem;
+ -webkit-top-right-radius: 1rem;
+ border-top-left-radius: 1rem;
+ border-top-right-radius: 1rem; }
+ .button-group.round.stack-for-small > *:last-child, .button-group.round.stack-for-small > *:last-child > a, .button-group.round.stack-for-small > *:last-child > button, .button-group.round.stack-for-small > *:last-child > .button {
+ -webkit-bottom-left-radius: 1rem;
+ -webkit-bottom-right-radius: 1rem;
+ border-bottom-left-radius: 1rem;
+ border-bottom-right-radius: 1rem; } }
+
+.button-bar:before, .button-bar:after {
+ content: " ";
+ display: table; }
+.button-bar:after {
+ clear: both; }
+.button-bar .button-group {
+ float: left;
+ margin-right: 0.625rem; }
+ .button-bar .button-group div {
+ overflow: hidden; }
+
+/* Clearing Styles */
+.clearing-thumbs, [data-clearing] {
+ list-style: none;
+ margin-left: 0;
+ margin-bottom: 0; }
+ .clearing-thumbs:before, .clearing-thumbs:after, [data-clearing]:before, [data-clearing]:after {
+ content: " ";
+ display: table; }
+ .clearing-thumbs:after, [data-clearing]:after {
+ clear: both; }
+ .clearing-thumbs li, [data-clearing] li {
+ float: left;
+ margin-right: 10px; }
+ .clearing-thumbs[class*="block-grid-"] li, [data-clearing][class*="block-grid-"] li {
+ margin-right: 0; }
+
+.clearing-blackout {
+ background: #333333;
+ height: 100%;
+ position: fixed;
+ top: 0;
+ width: 100%;
+ z-index: 998;
+ left: 0; }
+ .clearing-blackout .clearing-close {
+ display: block; }
+
+.clearing-container {
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+ position: relative;
+ z-index: 998; }
+
+.clearing-touch-label {
+ color: #AAAAAA;
+ font-size: .6em;
+ left: 50%;
+ position: absolute;
+ top: 50%; }
+
+.visible-img {
+ height: 95%;
+ position: relative; }
+ .visible-img img {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ -webkit-transform: translateY(-50%) translateX(-50%);
+ -moz-transform: translateY(-50%) translateX(-50%);
+ -ms-transform: translateY(-50%) translateX(-50%);
+ -o-transform: translateY(-50%) translateX(-50%);
+ transform: translateY(-50%) translateX(-50%);
+ max-height: 100%;
+ max-width: 100%; }
+
+.clearing-caption {
+ background: #333333;
+ bottom: 0;
+ color: #CCCCCC;
+ font-size: 0.875em;
+ line-height: 1.3;
+ margin-bottom: 0;
+ padding: 10px 30px 20px;
+ position: absolute;
+ text-align: center;
+ width: 100%;
+ left: 0; }
+
+.clearing-close {
+ color: #CCCCCC;
+ display: none;
+ font-size: 30px;
+ line-height: 1;
+ padding-left: 20px;
+ padding-top: 10px;
+ z-index: 999; }
+ .clearing-close:hover, .clearing-close:focus {
+ color: #CCCCCC; }
+
+.clearing-assembled .clearing-container {
+ height: 100%; }
+ .clearing-assembled .clearing-container .carousel > ul {
+ display: none; }
+
+.clearing-feature li {
+ display: none; }
+ .clearing-feature li.clearing-featured-img {
+ display: block; }
+
+@media only screen and (min-width:40.063em) {
+ .clearing-main-prev, .clearing-main-next {
+ height: 100%;
+ position: absolute;
+ top: 0;
+ width: 40px; }
+ .clearing-main-prev > span, .clearing-main-next > span {
+ border: solid 12px;
+ display: block;
+ height: 0;
+ position: absolute;
+ top: 50%;
+ width: 0; }
+ .clearing-main-prev > span:hover, .clearing-main-next > span:hover {
+ opacity: .8; }
+ .clearing-main-prev {
+ left: 0; }
+ .clearing-main-prev > span {
+ left: 5px;
+ border-color: transparent;
+ border-right-color: #CCCCCC; }
+ .clearing-main-next {
+ right: 0; }
+ .clearing-main-next > span {
+ border-color: transparent;
+ border-left-color: #CCCCCC; }
+ .clearing-main-prev.disabled, .clearing-main-next.disabled {
+ opacity: .3; }
+ .clearing-assembled .clearing-container .carousel {
+ background: rgba(51, 51, 51, 0.8);
+ height: 120px;
+ margin-top: 10px;
+ text-align: center; }
+ .clearing-assembled .clearing-container .carousel > ul {
+ display: inline-block;
+ z-index: 999;
+ height: 100%;
+ position: relative;
+ float: none; }
+ .clearing-assembled .clearing-container .carousel > ul li {
+ clear: none;
+ cursor: pointer;
+ display: block;
+ float: left;
+ margin-right: 0;
+ min-height: inherit;
+ opacity: .4;
+ overflow: hidden;
+ padding: 0;
+ position: relative;
+ width: 120px; }
+ .clearing-assembled .clearing-container .carousel > ul li.fix-height img {
+ height: 100%;
+ max-width: none; }
+ .clearing-assembled .clearing-container .carousel > ul li a.th {
+ border: none;
+ box-shadow: none;
+ display: block; }
+ .clearing-assembled .clearing-container .carousel > ul li img {
+ cursor: pointer !important;
+ width: 100% !important; }
+ .clearing-assembled .clearing-container .carousel > ul li.visible {
+ opacity: 1; }
+ .clearing-assembled .clearing-container .carousel > ul li:hover {
+ opacity: .8; }
+ .clearing-assembled .clearing-container .visible-img {
+ background: #333333;
+ height: 85%;
+ overflow: hidden; }
+ .clearing-close {
+ padding-left: 0;
+ padding-top: 0;
+ position: absolute;
+ top: 10px;
+ right: 20px; } }
+
+/* Foundation Dropdowns */
+.f-dropdown {
+ display: none;
+ left: -9999px;
+ list-style: none;
+ margin-left: 0;
+ position: absolute;
+ background: #FFFFFF;
+ border: solid 1px #cccccc;
+ font-size: 0.875rem;
+ height: auto;
+ max-height: none;
+ width: 100%;
+ z-index: 89;
+ margin-top: 2px;
+ max-width: 200px; }
+ .f-dropdown.open {
+ display: block; }
+ .f-dropdown > *:first-child {
+ margin-top: 0; }
+ .f-dropdown > *:last-child {
+ margin-bottom: 0; }
+ .f-dropdown:before {
+ border: inset 6px;
+ content: "";
+ display: block;
+ height: 0;
+ width: 0;
+ border-color: transparent transparent #FFFFFF transparent;
+ border-bottom-style: solid;
+ position: absolute;
+ top: -12px;
+ left: 10px;
+ z-index: 89; }
+ .f-dropdown:after {
+ border: inset 7px;
+ content: "";
+ display: block;
+ height: 0;
+ width: 0;
+ border-color: transparent transparent #cccccc transparent;
+ border-bottom-style: solid;
+ position: absolute;
+ top: -14px;
+ left: 9px;
+ z-index: 88; }
+ .f-dropdown.right:before {
+ left: auto;
+ right: 10px; }
+ .f-dropdown.right:after {
+ left: auto;
+ right: 9px; }
+ .f-dropdown.drop-right {
+ display: none;
+ left: -9999px;
+ list-style: none;
+ margin-left: 0;
+ position: absolute;
+ background: #FFFFFF;
+ border: solid 1px #cccccc;
+ font-size: 0.875rem;
+ height: auto;
+ max-height: none;
+ width: 100%;
+ z-index: 89;
+ margin-top: 0;
+ margin-left: 2px;
+ max-width: 200px; }
+ .f-dropdown.drop-right.open {
+ display: block; }
+ .f-dropdown.drop-right > *:first-child {
+ margin-top: 0; }
+ .f-dropdown.drop-right > *:last-child {
+ margin-bottom: 0; }
+ .f-dropdown.drop-right:before {
+ border: inset 6px;
+ content: "";
+ display: block;
+ height: 0;
+ width: 0;
+ border-color: transparent #FFFFFF transparent transparent;
+ border-right-style: solid;
+ position: absolute;
+ top: 10px;
+ left: -12px;
+ z-index: 89; }
+ .f-dropdown.drop-right:after {
+ border: inset 7px;
+ content: "";
+ display: block;
+ height: 0;
+ width: 0;
+ border-color: transparent #cccccc transparent transparent;
+ border-right-style: solid;
+ position: absolute;
+ top: 9px;
+ left: -14px;
+ z-index: 88; }
+ .f-dropdown.drop-left {
+ display: none;
+ left: -9999px;
+ list-style: none;
+ margin-left: 0;
+ position: absolute;
+ background: #FFFFFF;
+ border: solid 1px #cccccc;
+ font-size: 0.875rem;
+ height: auto;
+ max-height: none;
+ width: 100%;
+ z-index: 89;
+ margin-top: 0;
+ margin-left: -2px;
+ max-width: 200px; }
+ .f-dropdown.drop-left.open {
+ display: block; }
+ .f-dropdown.drop-left > *:first-child {
+ margin-top: 0; }
+ .f-dropdown.drop-left > *:last-child {
+ margin-bottom: 0; }
+ .f-dropdown.drop-left:before {
+ border: inset 6px;
+ content: "";
+ display: block;
+ height: 0;
+ width: 0;
+ border-color: transparent transparent transparent #FFFFFF;
+ border-left-style: solid;
+ position: absolute;
+ top: 10px;
+ right: -12px;
+ left: auto;
+ z-index: 89; }
+ .f-dropdown.drop-left:after {
+ border: inset 7px;
+ content: "";
+ display: block;
+ height: 0;
+ width: 0;
+ border-color: transparent transparent transparent #cccccc;
+ border-left-style: solid;
+ position: absolute;
+ top: 9px;
+ right: -14px;
+ left: auto;
+ z-index: 88; }
+ .f-dropdown.drop-top {
+ display: none;
+ left: -9999px;
+ list-style: none;
+ margin-left: 0;
+ position: absolute;
+ background: #FFFFFF;
+ border: solid 1px #cccccc;
+ font-size: 0.875rem;
+ height: auto;
+ max-height: none;
+ width: 100%;
+ z-index: 89;
+ margin-left: 0;
+ margin-top: -2px;
+ max-width: 200px; }
+ .f-dropdown.drop-top.open {
+ display: block; }
+ .f-dropdown.drop-top > *:first-child {
+ margin-top: 0; }
+ .f-dropdown.drop-top > *:last-child {
+ margin-bottom: 0; }
+ .f-dropdown.drop-top:before {
+ border: inset 6px;
+ content: "";
+ display: block;
+ height: 0;
+ width: 0;
+ border-color: #FFFFFF transparent transparent transparent;
+ border-top-style: solid;
+ bottom: -12px;
+ position: absolute;
+ top: auto;
+ left: 10px;
+ right: auto;
+ z-index: 89; }
+ .f-dropdown.drop-top:after {
+ border: inset 7px;
+ content: "";
+ display: block;
+ height: 0;
+ width: 0;
+ border-color: #cccccc transparent transparent transparent;
+ border-top-style: solid;
+ bottom: -14px;
+ position: absolute;
+ top: auto;
+ left: 9px;
+ right: auto;
+ z-index: 88; }
+ .f-dropdown li {
+ cursor: pointer;
+ font-size: 0.875rem;
+ line-height: 1.125rem;
+ margin: 0; }
+ .f-dropdown li:hover, .f-dropdown li:focus {
+ background: #FFFFFF; }
+ .f-dropdown li.radius {
+ border-radius: 3px; }
+ .f-dropdown li a {
+ display: block;
+ padding: 0.5rem;
+ color: #000000; }
+ .f-dropdown.content {
+ display: none;
+ left: -9999px;
+ list-style: none;
+ margin-left: 0;
+ position: absolute;
+ background: #FFFFFF;
+ border: solid 1px #cccccc;
+ font-size: 0.875rem;
+ height: auto;
+ max-height: none;
+ padding: 1rem;
+ width: 100%;
+ z-index: 89;
+ max-width: 200px; }
+ .f-dropdown.content.open {
+ display: block; }
+ .f-dropdown.content > *:first-child {
+ margin-top: 0; }
+ .f-dropdown.content > *:last-child {
+ margin-bottom: 0; }
+ .f-dropdown.tiny {
+ max-width: 200px; }
+ .f-dropdown.small {
+ max-width: 300px; }
+ .f-dropdown.medium {
+ max-width: 500px; }
+ .f-dropdown.large {
+ max-width: 800px; }
+ .f-dropdown.mega {
+ width: 100% !important;
+ max-width: 100% !important; }
+ .f-dropdown.mega.open {
+ left: 0 !important; }
+
+.dropdown.button, button.dropdown {
+ position: relative;
+ padding-right: 3.5625rem; }
+ .dropdown.button::after, button.dropdown::after {
+ border-color: #FFFFFF transparent transparent transparent;
+ border-style: solid;
+ content: "";
+ display: block;
+ height: 0;
+ position: absolute;
+ top: 50%;
+ width: 0; }
+ .dropdown.button::after, button.dropdown::after {
+ border-width: 0.375rem;
+ right: 1.40625rem;
+ margin-top: -0.15625rem; }
+ .dropdown.button::after, button.dropdown::after {
+ border-color: #FFFFFF transparent transparent transparent; }
+ .dropdown.button.tiny, button.dropdown.tiny {
+ padding-right: 2.625rem; }
+ .dropdown.button.tiny:after, button.dropdown.tiny:after {
+ border-width: 0.375rem;
+ right: 1.125rem;
+ margin-top: -0.125rem; }
+ .dropdown.button.tiny::after, button.dropdown.tiny::after {
+ border-color: #FFFFFF transparent transparent transparent; }
+ .dropdown.button.small, button.dropdown.small {
+ padding-right: 3.0625rem; }
+ .dropdown.button.small::after, button.dropdown.small::after {
+ border-width: 0.4375rem;
+ right: 1.3125rem;
+ margin-top: -0.15625rem; }
+ .dropdown.button.small::after, button.dropdown.small::after {
+ border-color: #FFFFFF transparent transparent transparent; }
+ .dropdown.button.large, button.dropdown.large {
+ padding-right: 3.625rem; }
+ .dropdown.button.large::after, button.dropdown.large::after {
+ border-width: 0.3125rem;
+ right: 1.71875rem;
+ margin-top: -0.15625rem; }
+ .dropdown.button.large::after, button.dropdown.large::after {
+ border-color: #FFFFFF transparent transparent transparent; }
+ .dropdown.button.secondary:after, button.dropdown.secondary:after {
+ border-color: #333333 transparent transparent transparent; }
+
+.flex-video {
+ height: 0;
+ margin-bottom: 1rem;
+ overflow: hidden;
+ padding-bottom: 67.5%;
+ padding-top: 1.5625rem;
+ position: relative; }
+ .flex-video.widescreen {
+ padding-bottom: 56.34%; }
+ .flex-video.vimeo {
+ padding-top: 0; }
+ .flex-video iframe, .flex-video object, .flex-video embed, .flex-video video {
+ height: 100%;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ left: 0; }
+
+/* Standard Forms */
+form {
+ margin: 0 0 1rem; }
+
+/* Using forms within rows, we need to set some defaults */
+form .row .row {
+ margin: 0 -0.5rem; }
+ form .row .row .column, form .row .row .columns {
+ padding: 0 0.5rem; }
+ form .row .row.collapse {
+ margin: 0; }
+ form .row .row.collapse .column, form .row .row.collapse .columns {
+ padding: 0; }
+ form .row .row.collapse input {
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0; }
+form .row input.column, form .row input.columns, form .row textarea.column, form .row textarea.columns {
+ padding-left: 0.5rem; }
+
+/* Label Styles */
+label {
+ color: #4d4d4d;
+ cursor: pointer;
+ display: block;
+ font-size: 0.875rem;
+ font-weight: normal;
+ line-height: 1.5;
+ margin-bottom: 0;
+ /* Styles for required inputs */ }
+ label.right {
+ float: none !important;
+ text-align: right; }
+ label.inline {
+ margin: 0 0 1rem 0;
+ padding: 0.5625rem 0; }
+ label small {
+ text-transform: capitalize;
+ color: #676767; }
+
+/* Attach elements to the beginning or end of an input */
+.prefix, .postfix {
+ border-style: solid;
+ border-width: 1px;
+ display: block;
+ font-size: 0.875rem;
+ height: 2.3125rem;
+ line-height: 2.3125rem;
+ overflow: visible;
+ padding-bottom: 0;
+ padding-top: 0;
+ position: relative;
+ text-align: center;
+ width: 100%;
+ z-index: 2; }
+
+/* Adjust padding, alignment and radius if pre/post element is a button */
+.postfix.button {
+ border-color: true; }
+
+.prefix.button {
+ border: none;
+ padding-left: 0;
+ padding-right: 0;
+ padding-bottom: 0;
+ padding-top: 0;
+ text-align: center; }
+
+.prefix.button.radius {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+
+.postfix.button.radius {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+
+.prefix.button.round {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 1000px;
+ -webkit-border-top-left-radius: 1000px;
+ border-bottom-left-radius: 1000px;
+ border-top-left-radius: 1000px; }
+
+.postfix.button.round {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; }
+
+/* Separate prefix and postfix styles when on span or label so buttons keep their own */
+span.prefix, label.prefix {
+ background: #f2f2f2;
+ border-right: none;
+ color: #333333;
+ border-color: #cccccc; }
+
+span.postfix, label.postfix {
+ background: #f2f2f2;
+ color: #333333;
+ border-color: #cccccc; }
+
+/* We use this to get basic styling on all basic form elements */
+input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="week"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], input[type="color"], textarea {
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ border-radius: 0;
+ background-color: #FFFFFF;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #cccccc;
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+ color: rgba(0, 0, 0, 0.75);
+ display: block;
+ font-family: inherit;
+ font-size: 0.875rem;
+ height: 2.3125rem;
+ margin: 0 0 1rem 0;
+ padding: 0.5rem;
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ -webkit-transition: border-color 0.15s linear, background 0.15s linear;
+ -moz-transition: border-color 0.15s linear, background 0.15s linear;
+ -ms-transition: border-color 0.15s linear, background 0.15s linear;
+ -o-transition: border-color 0.15s linear, background 0.15s linear;
+ transition: border-color 0.15s linear, background 0.15s linear; }
+ input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="week"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="color"]:focus, textarea:focus {
+ background: #fafafa;
+ border-color: #999999;
+ outline: none; }
+ input[type="text"]:disabled, input[type="password"]:disabled, input[type="date"]:disabled, input[type="datetime"]:disabled, input[type="datetime-local"]:disabled, input[type="month"]:disabled, input[type="week"]:disabled, input[type="email"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="tel"]:disabled, input[type="time"]:disabled, input[type="url"]:disabled, input[type="color"]:disabled, textarea:disabled {
+ background-color: #DDDDDD;
+ cursor: default; }
+ input[type="text"][disabled], input[type="text"][readonly], fieldset[disabled] input[type="text"], input[type="password"][disabled], input[type="password"][readonly], fieldset[disabled] input[type="password"], input[type="date"][disabled], input[type="date"][readonly], fieldset[disabled] input[type="date"], input[type="datetime"][disabled], input[type="datetime"][readonly], fieldset[disabled] input[type="datetime"], input[type="datetime-local"][disabled], input[type="datetime-local"][readonly], fieldset[disabled] input[type="datetime-local"], input[type="month"][disabled], input[type="month"][readonly], fieldset[disabled] input[type="month"], input[type="week"][disabled], input[type="week"][readonly], fieldset[disabled] input[type="week"], input[type="email"][disabled], input[type="email"][readonly], fieldset[disabled] input[type="email"], input[type="number"][disabled], input[type="number"][readonly], fieldset[disabled] input[type="number"], input[type="search"][disabled], input[type="search"][readonly], fieldset[disabled] input[type="search"], input[type="tel"][disabled], input[type="tel"][readonly], fieldset[disabled] input[type="tel"], input[type="time"][disabled], input[type="time"][readonly], fieldset[disabled] input[type="time"], input[type="url"][disabled], input[type="url"][readonly], fieldset[disabled] input[type="url"], input[type="color"][disabled], input[type="color"][readonly], fieldset[disabled] input[type="color"], textarea[disabled], textarea[readonly], fieldset[disabled] textarea {
+ background-color: #DDDDDD;
+ cursor: default; }
+ input[type="text"].radius, input[type="password"].radius, input[type="date"].radius, input[type="datetime"].radius, input[type="datetime-local"].radius, input[type="month"].radius, input[type="week"].radius, input[type="email"].radius, input[type="number"].radius, input[type="search"].radius, input[type="tel"].radius, input[type="time"].radius, input[type="url"].radius, input[type="color"].radius, textarea.radius {
+ border-radius: 3px; }
+
+form .row .prefix-radius.row.collapse input, form .row .prefix-radius.row.collapse textarea, form .row .prefix-radius.row.collapse select, form .row .prefix-radius.row.collapse button {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+form .row .prefix-radius.row.collapse .prefix {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+form .row .postfix-radius.row.collapse input, form .row .postfix-radius.row.collapse textarea, form .row .postfix-radius.row.collapse select, form .row .postfix-radius.row.collapse button {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+form .row .postfix-radius.row.collapse .postfix {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+form .row .prefix-round.row.collapse input, form .row .prefix-round.row.collapse textarea, form .row .prefix-round.row.collapse select, form .row .prefix-round.row.collapse button {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; }
+form .row .prefix-round.row.collapse .prefix {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 1000px;
+ -webkit-border-top-left-radius: 1000px;
+ border-bottom-left-radius: 1000px;
+ border-top-left-radius: 1000px; }
+form .row .postfix-round.row.collapse input, form .row .postfix-round.row.collapse textarea, form .row .postfix-round.row.collapse select, form .row .postfix-round.row.collapse button {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 1000px;
+ -webkit-border-top-left-radius: 1000px;
+ border-bottom-left-radius: 1000px;
+ border-top-left-radius: 1000px; }
+form .row .postfix-round.row.collapse .postfix {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; }
+
+input[type="submit"] {
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ border-radius: 0; }
+
+/* Respect enforced amount of rows for textarea */
+textarea[rows] {
+ height: auto; }
+
+/* Not allow resize out of parent */
+textarea {
+ max-width: 100%; }
+
+::-webkit-input-placeholder {
+ color: #cccccc; }
+
+:-moz-placeholder {
+ /* Firefox 18- */
+ color: #cccccc; }
+
+::-moz-placeholder {
+ /* Firefox 19+ */
+ color: #cccccc; }
+
+:-ms-input-placeholder {
+ color: #cccccc; }
+
+/* Add height value for select elements to match text input height */
+select {
+ -webkit-appearance: none !important;
+ -moz-appearance: none !important;
+ background-color: #FAFAFA;
+ border-radius: 0;
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+);
+ background-position: 100% center;
+ background-repeat: no-repeat;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #cccccc;
+ color: rgba(0, 0, 0, 0.75);
+ font-family: inherit;
+ font-size: 0.875rem;
+ line-height: normal;
+ padding: 0.5rem;
+ border-radius: 0;
+ height: 2.3125rem; }
+ select::-ms-expand {
+ display: none; }
+ select.radius {
+ border-radius: 3px; }
+ select:hover {
+ background-color: #f3f3f3;
+ border-color: #999999; }
+ select:disabled {
+ background-color: #DDDDDD;
+ cursor: default; }
+ select[multiple] {
+ height: auto; }
+
+/* Adjust margin for form elements below */
+input[type="file"], input[type="checkbox"], input[type="radio"], select {
+ margin: 0 0 1rem 0; }
+
+input[type="checkbox"] + label, input[type="radio"] + label {
+ display: inline-block;
+ margin-left: 0.5rem;
+ margin-right: 1rem;
+ margin-bottom: 0;
+ vertical-align: baseline; }
+
+/* Normalize file input width */
+input[type="file"] {
+ width: 100%; }
+
+/* HTML5 Number spinners settings */
+/* We add basic fieldset styling */
+fieldset {
+ border: 1px solid #DDDDDD;
+ margin: 1.125rem 0;
+ padding: 1.25rem; }
+ fieldset legend {
+ background: #FFFFFF;
+ font-weight: bold;
+ margin-left: -0.1875rem;
+ margin: 0;
+ padding: 0 0.1875rem; }
+
+/* Error Handling */
+[data-abide] .error small.error, [data-abide] .error span.error, [data-abide] span.error, [data-abide] small.error {
+ display: block;
+ font-size: 0.75rem;
+ font-style: italic;
+ font-weight: normal;
+ margin-bottom: 1rem;
+ margin-top: -1px;
+ padding: 0.375rem 0.5625rem 0.5625rem;
+ background: #f04124;
+ color: #FFFFFF; }
+[data-abide] span.error, [data-abide] small.error {
+ display: none; }
+
+span.error, small.error {
+ display: block;
+ font-size: 0.75rem;
+ font-style: italic;
+ font-weight: normal;
+ margin-bottom: 1rem;
+ margin-top: -1px;
+ padding: 0.375rem 0.5625rem 0.5625rem;
+ background: #f04124;
+ color: #FFFFFF; }
+
+.error input, .error textarea, .error select {
+ margin-bottom: 0; }
+.error input[type="checkbox"], .error input[type="radio"] {
+ margin-bottom: 1rem; }
+.error label, .error label.error {
+ color: #f04124; }
+.error small.error {
+ display: block;
+ font-size: 0.75rem;
+ font-style: italic;
+ font-weight: normal;
+ margin-bottom: 1rem;
+ margin-top: -1px;
+ padding: 0.375rem 0.5625rem 0.5625rem;
+ background: #f04124;
+ color: #FFFFFF; }
+.error > label > small {
+ background: transparent;
+ color: #676767;
+ display: inline;
+ font-size: 60%;
+ font-style: normal;
+ margin: 0;
+ padding: 0;
+ text-transform: capitalize; }
+.error span.error-message {
+ display: block; }
+
+input.error, textarea.error, select.error {
+ margin-bottom: 0; }
+
+label.error {
+ color: #f04124; }
+
+.icon-bar {
+ display: inline-block;
+ font-size: 0;
+ width: 100%;
+ background: #333333; }
+ .icon-bar > * {
+ display: block;
+ float: left;
+ font-size: 1rem;
+ margin: 0 auto;
+ padding: 1.25rem;
+ text-align: center;
+ width: 25%; }
+ .icon-bar > * i, .icon-bar > * img {
+ display: block;
+ margin: 0 auto; }
+ .icon-bar > * i + label, .icon-bar > * img + label {
+ margin-top: .0625rem; }
+ .icon-bar > * i {
+ font-size: 1.875rem;
+ vertical-align: middle; }
+ .icon-bar > * img {
+ height: 1.875rem;
+ width: 1.875rem; }
+ .icon-bar.label-right > * i, .icon-bar.label-right > * img {
+ display: inline-block;
+ margin: 0 .0625rem 0 0; }
+ .icon-bar.label-right > * i + label, .icon-bar.label-right > * img + label {
+ margin-top: 0; }
+ .icon-bar.label-right > * label {
+ display: inline-block; }
+ .icon-bar.vertical.label-right > * {
+ text-align: left; }
+ .icon-bar.vertical, .icon-bar.small-vertical {
+ height: 100%;
+ width: auto; }
+ .icon-bar.vertical .item, .icon-bar.small-vertical .item {
+ float: none;
+ margin: auto;
+ width: auto; }
+ @media only screen and (min-width:40.063em) {
+ .icon-bar.medium-vertical {
+ height: 100%;
+ width: auto; }
+ .icon-bar.medium-vertical .item {
+ float: none;
+ margin: auto;
+ width: auto; } }
+ @media only screen and (min-width:64.063em) {
+ .icon-bar.large-vertical {
+ height: 100%;
+ width: auto; }
+ .icon-bar.large-vertical .item {
+ float: none;
+ margin: auto;
+ width: auto; } }
+ .icon-bar > * {
+ font-size: 1rem;
+ padding: 1.25rem; }
+ .icon-bar > * i + label, .icon-bar > * img + label {
+ margin-top: .0625rem;
+ font-size: 1rem; }
+ .icon-bar > * i {
+ font-size: 1.875rem; }
+ .icon-bar > * img {
+ height: 1.875rem;
+ width: 1.875rem; }
+ .icon-bar > * label {
+ color: #FFFFFF; }
+ .icon-bar > * i {
+ color: #FFFFFF; }
+ .icon-bar > a:hover {
+ background: #008CBA; }
+ .icon-bar > a:hover label {
+ color: #FFFFFF; }
+ .icon-bar > a:hover i {
+ color: #FFFFFF; }
+ .icon-bar > a.active {
+ background: #008CBA; }
+ .icon-bar > a.active label {
+ color: #FFFFFF; }
+ .icon-bar > a.active i {
+ color: #FFFFFF; }
+ .icon-bar .item.disabled {
+ cursor: false;
+ opacity: 0.7;
+ pointer-events: none; }
+ .icon-bar .item.disabled > * {
+ opacity: 0.7;
+ cursor: false; }
+ .icon-bar.two-up .item {
+ width: 50%; }
+ .icon-bar.two-up.vertical .item, .icon-bar.two-up.small-vertical .item {
+ width: auto; }
+ @media only screen and (min-width:40.063em) {
+ .icon-bar.two-up.medium-vertical .item {
+ width: auto; } }
+ @media only screen and (min-width:64.063em) {
+ .icon-bar.two-up.large-vertical .item {
+ width: auto; } }
+ .icon-bar.three-up .item {
+ width: 33.3333%; }
+ .icon-bar.three-up.vertical .item, .icon-bar.three-up.small-vertical .item {
+ width: auto; }
+ @media only screen and (min-width:40.063em) {
+ .icon-bar.three-up.medium-vertical .item {
+ width: auto; } }
+ @media only screen and (min-width:64.063em) {
+ .icon-bar.three-up.large-vertical .item {
+ width: auto; } }
+ .icon-bar.four-up .item {
+ width: 25%; }
+ .icon-bar.four-up.vertical .item, .icon-bar.four-up.small-vertical .item {
+ width: auto; }
+ @media only screen and (min-width:40.063em) {
+ .icon-bar.four-up.medium-vertical .item {
+ width: auto; } }
+ @media only screen and (min-width:64.063em) {
+ .icon-bar.four-up.large-vertical .item {
+ width: auto; } }
+ .icon-bar.five-up .item {
+ width: 20%; }
+ .icon-bar.five-up.vertical .item, .icon-bar.five-up.small-vertical .item {
+ width: auto; }
+ @media only screen and (min-width:40.063em) {
+ .icon-bar.five-up.medium-vertical .item {
+ width: auto; } }
+ @media only screen and (min-width:64.063em) {
+ .icon-bar.five-up.large-vertical .item {
+ width: auto; } }
+ .icon-bar.six-up .item {
+ width: 16.66667%; }
+ .icon-bar.six-up.vertical .item, .icon-bar.six-up.small-vertical .item {
+ width: auto; }
+ @media only screen and (min-width:40.063em) {
+ .icon-bar.six-up.medium-vertical .item {
+ width: auto; } }
+ @media only screen and (min-width:64.063em) {
+ .icon-bar.six-up.large-vertical .item {
+ width: auto; } }
+ .icon-bar.seven-up .item {
+ width: 14.28571%; }
+ .icon-bar.seven-up.vertical .item, .icon-bar.seven-up.small-vertical .item {
+ width: auto; }
+ @media only screen and (min-width:40.063em) {
+ .icon-bar.seven-up.medium-vertical .item {
+ width: auto; } }
+ @media only screen and (min-width:64.063em) {
+ .icon-bar.seven-up.large-vertical .item {
+ width: auto; } }
+ .icon-bar.eight-up .item {
+ width: 12.5%; }
+ .icon-bar.eight-up.vertical .item, .icon-bar.eight-up.small-vertical .item {
+ width: auto; }
+ @media only screen and (min-width:40.063em) {
+ .icon-bar.eight-up.medium-vertical .item {
+ width: auto; } }
+ @media only screen and (min-width:64.063em) {
+ .icon-bar.eight-up.large-vertical .item {
+ width: auto; } }
+
+.icon-bar.two-up .item {
+ width: 50%; }
+.icon-bar.two-up.vertical .item, .icon-bar.two-up.small-vertical .item {
+ width: auto; }
+@media only screen and (min-width:40.063em) {
+ .icon-bar.two-up.medium-vertical .item {
+ width: auto; } }
+@media only screen and (min-width:64.063em) {
+ .icon-bar.two-up.large-vertical .item {
+ width: auto; } }
+.icon-bar.three-up .item {
+ width: 33.3333%; }
+.icon-bar.three-up.vertical .item, .icon-bar.three-up.small-vertical .item {
+ width: auto; }
+@media only screen and (min-width:40.063em) {
+ .icon-bar.three-up.medium-vertical .item {
+ width: auto; } }
+@media only screen and (min-width:64.063em) {
+ .icon-bar.three-up.large-vertical .item {
+ width: auto; } }
+.icon-bar.four-up .item {
+ width: 25%; }
+.icon-bar.four-up.vertical .item, .icon-bar.four-up.small-vertical .item {
+ width: auto; }
+@media only screen and (min-width:40.063em) {
+ .icon-bar.four-up.medium-vertical .item {
+ width: auto; } }
+@media only screen and (min-width:64.063em) {
+ .icon-bar.four-up.large-vertical .item {
+ width: auto; } }
+.icon-bar.five-up .item {
+ width: 20%; }
+.icon-bar.five-up.vertical .item, .icon-bar.five-up.small-vertical .item {
+ width: auto; }
+@media only screen and (min-width:40.063em) {
+ .icon-bar.five-up.medium-vertical .item {
+ width: auto; } }
+@media only screen and (min-width:64.063em) {
+ .icon-bar.five-up.large-vertical .item {
+ width: auto; } }
+.icon-bar.six-up .item {
+ width: 16.66667%; }
+.icon-bar.six-up.vertical .item, .icon-bar.six-up.small-vertical .item {
+ width: auto; }
+@media only screen and (min-width:40.063em) {
+ .icon-bar.six-up.medium-vertical .item {
+ width: auto; } }
+@media only screen and (min-width:64.063em) {
+ .icon-bar.six-up.large-vertical .item {
+ width: auto; } }
+.icon-bar.seven-up .item {
+ width: 14.28571%; }
+.icon-bar.seven-up.vertical .item, .icon-bar.seven-up.small-vertical .item {
+ width: auto; }
+@media only screen and (min-width:40.063em) {
+ .icon-bar.seven-up.medium-vertical .item {
+ width: auto; } }
+@media only screen and (min-width:64.063em) {
+ .icon-bar.seven-up.large-vertical .item {
+ width: auto; } }
+.icon-bar.eight-up .item {
+ width: 12.5%; }
+.icon-bar.eight-up.vertical .item, .icon-bar.eight-up.small-vertical .item {
+ width: auto; }
+@media only screen and (min-width:40.063em) {
+ .icon-bar.eight-up.medium-vertical .item {
+ width: auto; } }
+@media only screen and (min-width:64.063em) {
+ .icon-bar.eight-up.large-vertical .item {
+ width: auto; } }
+
+.inline-list {
+ list-style: none;
+ margin-left: -1.375rem;
+ margin-right: 0;
+ margin: 0 auto 1.0625rem auto;
+ overflow: hidden;
+ padding: 0; }
+ .inline-list > li {
+ display: block;
+ float: left;
+ list-style: none;
+ margin-left: 1.375rem; }
+ .inline-list > li > * {
+ display: block; }
+
+/* Foundation Joyride */
+.joyride-list {
+ display: none; }
+
+/* Default styles for the container */
+.joyride-tip-guide {
+ background: #333333;
+ color: #FFFFFF;
+ display: none;
+ font-family: inherit;
+ font-weight: normal;
+ position: absolute;
+ top: 0;
+ width: 95%;
+ z-index: 101;
+ left: 2.5%; }
+
+.lt-ie9 .joyride-tip-guide {
+ margin-left: -400px;
+ max-width: 800px;
+ left: 50%; }
+
+.joyride-content-wrapper {
+ padding: 1.125rem 1.25rem 1.5rem;
+ width: 100%; }
+ .joyride-content-wrapper .button {
+ margin-bottom: 0 !important; }
+ .joyride-content-wrapper .joyride-prev-tip {
+ margin-right: 10px; }
+
+/* Add a little css triangle pip, older browser just miss out on the fanciness of it */
+.joyride-tip-guide .joyride-nub {
+ border: 10px solid #333333;
+ display: block;
+ height: 0;
+ position: absolute;
+ width: 0;
+ left: 22px; }
+ .joyride-tip-guide .joyride-nub.top {
+ border-color: #333333;
+ border-top-color: transparent !important;
+ border-top-style: solid;
+ border-left-color: transparent !important;
+ border-right-color: transparent !important;
+ top: -20px; }
+ .joyride-tip-guide .joyride-nub.bottom {
+ border-color: #333333 !important;
+ border-bottom-color: transparent !important;
+ border-bottom-style: solid;
+ border-left-color: transparent !important;
+ border-right-color: transparent !important;
+ bottom: -20px; }
+ .joyride-tip-guide .joyride-nub.right {
+ right: -20px; }
+ .joyride-tip-guide .joyride-nub.left {
+ left: -20px; }
+
+/* Typography */
+.joyride-tip-guide h1, .joyride-tip-guide h2, .joyride-tip-guide h3, .joyride-tip-guide h4, .joyride-tip-guide h5, .joyride-tip-guide h6 {
+ color: #FFFFFF;
+ font-weight: bold;
+ line-height: 1.25;
+ margin: 0; }
+
+.joyride-tip-guide p {
+ font-size: 0.875rem;
+ line-height: 1.3;
+ margin: 0 0 1.125rem 0; }
+
+.joyride-timer-indicator-wrap {
+ border: solid 1px #555555;
+ bottom: 1rem;
+ height: 3px;
+ position: absolute;
+ width: 50px;
+ right: 1.0625rem; }
+
+.joyride-timer-indicator {
+ background: #666666;
+ display: block;
+ height: inherit;
+ width: 0; }
+
+.joyride-close-tip {
+ color: #777777 !important;
+ font-size: 24px;
+ font-weight: normal;
+ line-height: .5 !important;
+ position: absolute;
+ text-decoration: none;
+ top: 10px;
+ right: 12px; }
+ .joyride-close-tip:hover, .joyride-close-tip:focus {
+ color: #EEEEEE !important; }
+
+.joyride-modal-bg {
+ background: rgba(0, 0, 0, 0.5);
+ cursor: pointer;
+ display: none;
+ height: 100%;
+ position: fixed;
+ top: 0;
+ width: 100%;
+ z-index: 100;
+ left: 0; }
+
+.joyride-expose-wrapper {
+ background-color: #FFFFFF;
+ border-radius: 3px;
+ box-shadow: 0 0 15px #FFFFFF;
+ position: absolute;
+ z-index: 102; }
+
+.joyride-expose-cover {
+ background: transparent;
+ border-radius: 3px;
+ left: 0;
+ position: absolute;
+ top: 0;
+ z-index: 9999; }
+
+/* Styles for screens that are at least 768px; */
+@media only screen and (min-width:40.063em) {
+ .joyride-tip-guide {
+ width: 300px;
+ left: inherit; }
+ .joyride-tip-guide .joyride-nub.bottom {
+ border-color: #333333 !important;
+ border-bottom-color: transparent !important;
+ border-left-color: transparent !important;
+ border-right-color: transparent !important;
+ bottom: -20px; }
+ .joyride-tip-guide .joyride-nub.right {
+ border-color: #333333 !important;
+ border-right-color: transparent !important;
+ border-bottom-color: transparent !important;
+ border-top-color: transparent !important;
+ left: auto;
+ right: -20px;
+ top: 22px; }
+ .joyride-tip-guide .joyride-nub.left {
+ border-color: #333333 !important;
+ border-bottom-color: transparent !important;
+ border-left-color: transparent !important;
+ border-top-color: transparent !important;
+ left: -20px;
+ right: auto;
+ top: 22px; } }
+
+.keystroke, kbd {
+ background-color: #ededed;
+ border-color: #dddddd;
+ color: #222222;
+ border-style: solid;
+ border-width: 1px;
+ font-family: "Consolas", "Menlo", "Courier", monospace;
+ font-size: inherit;
+ margin: 0;
+ padding: 0.125rem 0.25rem 0;
+ border-radius: 3px; }
+
+.label {
+ display: inline-block;
+ font-family: "Times New Roman";
+ font-weight: normal;
+ line-height: 1;
+ margin-bottom: auto;
+ position: relative;
+ text-align: center;
+ text-decoration: none;
+ white-space: nowrap;
+ padding: 0.25rem 0.5rem 0.25rem;
+ font-size: 0.6875rem;
+ background-color: #008CBA;
+ color: #FFFFFF; }
+ .label.radius {
+ border-radius: 3px; }
+ .label.round {
+ border-radius: 1000px; }
+ .label.alert {
+ background-color: #f04124;
+ color: #FFFFFF; }
+ .label.warning {
+ background-color: #f08a24;
+ color: #FFFFFF; }
+ .label.success {
+ background-color: #43AC6A;
+ color: #FFFFFF; }
+ .label.secondary {
+ background-color: #e7e7e7;
+ color: #333333; }
+ .label.info {
+ background-color: #a0d3e8;
+ color: #333333; }
+
+[data-magellan-expedition], [data-magellan-expedition-clone] {
+ background: #FFFFFF;
+ min-width: 100%;
+ padding: 10px;
+ z-index: 50; }
+ [data-magellan-expedition] .sub-nav, [data-magellan-expedition-clone] .sub-nav {
+ margin-bottom: 0; }
+ [data-magellan-expedition] .sub-nav dd, [data-magellan-expedition-clone] .sub-nav dd {
+ margin-bottom: 0; }
+ [data-magellan-expedition] .sub-nav a, [data-magellan-expedition-clone] .sub-nav a {
+ line-height: 1.8em; }
+
+@-webkit-keyframes rotate {
+ from {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg); }
+
+ to {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg); } }
+
+@keyframes rotate {
+ from {
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ transform: rotate(0deg); }
+
+ to {
+ -webkit-transform: rotate(360deg);
+ -moz-transform: rotate(360deg);
+ -ms-transform: rotate(360deg);
+ transform: rotate(360deg); } }
+
+/* Orbit Graceful Loading */
+.slideshow-wrapper {
+ position: relative; }
+ .slideshow-wrapper ul {
+ list-style-type: none;
+ margin: 0; }
+ .slideshow-wrapper ul li, .slideshow-wrapper ul li .orbit-caption {
+ display: none; }
+ .slideshow-wrapper ul li:first-child {
+ display: block; }
+ .slideshow-wrapper .orbit-container {
+ background-color: transparent; }
+ .slideshow-wrapper .orbit-container li {
+ display: block; }
+ .slideshow-wrapper .orbit-container li .orbit-caption {
+ display: block; }
+ .slideshow-wrapper .orbit-container .orbit-bullets li {
+ display: inline-block; }
+ .slideshow-wrapper .preloader {
+ border-radius: 1000px;
+ animation-duration: 1.5s;
+ animation-iteration-count: infinite;
+ animation-name: rotate;
+ animation-timing-function: linear;
+ border-color: #555555 #FFFFFF;
+ border: solid 3px;
+ display: block;
+ height: 40px;
+ left: 50%;
+ margin-left: -20px;
+ margin-top: -20px;
+ position: absolute;
+ top: 50%;
+ width: 40px; }
+
+.orbit-container {
+ background: none;
+ overflow: hidden;
+ position: relative;
+ width: 100%; }
+ .orbit-container .orbit-slides-container {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ position: relative;
+ -webkit-transform: translateZ(0);
+ -moz-transform: translateZ(0);
+ -ms-transform: translateZ(0);
+ -o-transform: translateZ(0);
+ transform: translateZ(0); }
+ .orbit-container .orbit-slides-container img {
+ display: block;
+ max-width: 100%; }
+ .orbit-container .orbit-slides-container > * {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ margin-left: 100%; }
+ .orbit-container .orbit-slides-container > *:first-child {
+ margin-left: 0; }
+ .orbit-container .orbit-slides-container > * .orbit-caption {
+ bottom: 0;
+ position: absolute;
+ background-color: rgba(51, 51, 51, 0.8);
+ color: #FFFFFF;
+ font-size: 0.875rem;
+ padding: 0.625rem 0.875rem;
+ width: 100%; }
+ .orbit-container .orbit-slide-number {
+ left: 10px;
+ background: transparent;
+ color: #FFFFFF;
+ font-size: 12px;
+ position: absolute;
+ top: 10px;
+ z-index: 10; }
+ .orbit-container .orbit-slide-number span {
+ font-weight: 700;
+ padding: 0.3125rem; }
+ .orbit-container .orbit-timer {
+ position: absolute;
+ top: 12px;
+ right: 10px;
+ height: 6px;
+ width: 100px;
+ z-index: 10; }
+ .orbit-container .orbit-timer .orbit-progress {
+ height: 3px;
+ background-color: rgba(255, 255, 255, 0.3);
+ display: block;
+ width: 0;
+ position: relative;
+ right: 20px;
+ top: 5px; }
+ .orbit-container .orbit-timer > span {
+ border: solid 4px #FFFFFF;
+ border-bottom: none;
+ border-top: none;
+ display: none;
+ height: 14px;
+ position: absolute;
+ top: 0;
+ width: 11px;
+ right: 0; }
+ .orbit-container .orbit-timer.paused > span {
+ top: 0;
+ width: 11px;
+ height: 14px;
+ border: inset 8px;
+ border-left-style: solid;
+ border-color: transparent;
+ border-left-color: #FFFFFF;
+ right: -4px; }
+ .orbit-container .orbit-timer.paused > span.dark {
+ border-left-color: #333333; }
+ .orbit-container:hover .orbit-timer > span {
+ display: block; }
+ .orbit-container .orbit-prev, .orbit-container .orbit-next {
+ background-color: transparent;
+ color: white;
+ height: 60px;
+ line-height: 50px;
+ margin-top: -25px;
+ position: absolute;
+ text-indent: -9999px !important;
+ top: 45%;
+ width: 36px;
+ z-index: 10; }
+ .orbit-container .orbit-prev:hover, .orbit-container .orbit-next:hover {
+ background-color: rgba(0, 0, 0, 0.3); }
+ .orbit-container .orbit-prev > span, .orbit-container .orbit-next > span {
+ border: inset 10px;
+ display: block;
+ height: 0;
+ margin-top: -10px;
+ position: absolute;
+ top: 50%;
+ width: 0; }
+ .orbit-container .orbit-prev {
+ left: 0; }
+ .orbit-container .orbit-prev > span {
+ border-right-style: solid;
+ border-color: transparent;
+ border-right-color: #FFFFFF; }
+ .orbit-container .orbit-prev:hover > span {
+ border-right-color: #FFFFFF; }
+ .orbit-container .orbit-next {
+ right: 0; }
+ .orbit-container .orbit-next > span {
+ border-color: transparent;
+ border-left-style: solid;
+ border-left-color: #FFFFFF;
+ left: 50%;
+ margin-left: -4px; }
+ .orbit-container .orbit-next:hover > span {
+ border-left-color: #FFFFFF; }
+
+.orbit-bullets-container {
+ text-align: center; }
+
+.orbit-bullets {
+ display: block;
+ float: none;
+ margin: 0 auto 30px auto;
+ overflow: hidden;
+ position: relative;
+ text-align: center;
+ top: 10px; }
+ .orbit-bullets li {
+ background: #CCCCCC;
+ cursor: pointer;
+ display: inline-block;
+ float: none;
+ height: 0.5625rem;
+ margin-right: 6px;
+ width: 0.5625rem;
+ border-radius: 1000px; }
+ .orbit-bullets li.active {
+ background: #999999; }
+ .orbit-bullets li:last-child {
+ margin-right: 0; }
+
+.touch .orbit-container .orbit-prev, .touch .orbit-container .orbit-next {
+ display: none; }
+.touch .orbit-bullets {
+ display: none; }
+
+@media only screen and (min-width:40.063em) {
+ .touch .orbit-container .orbit-prev, .touch .orbit-container .orbit-next {
+ display: inherit; }
+ .touch .orbit-bullets {
+ display: block; } }
+
+@media only screen and (max-width: 40em) {
+ .orbit-stack-on-small .orbit-slides-container {
+ height: auto !important; }
+ .orbit-stack-on-small .orbit-slides-container > * {
+ margin: 0 !important;
+ opacity: 1 !important;
+ position: relative; }
+ .orbit-stack-on-small .orbit-slide-number {
+ display: none; }
+ .orbit-timer {
+ display: none; }
+ .orbit-next, .orbit-prev {
+ display: none; }
+ .orbit-bullets {
+ display: none; } }
+
+ul.pagination {
+ display: block;
+ margin-left: -0.3125rem;
+ min-height: 1.5rem; }
+ ul.pagination li {
+ color: #222222;
+ font-size: 0.875rem;
+ height: 1.5rem;
+ margin-left: 0.3125rem; }
+ ul.pagination li a, ul.pagination li button {
+ border-radius: 3px;
+ transition: background-color 300ms ease-out;
+ background: none;
+ color: #999999;
+ display: block;
+ font-size: 1em;
+ font-weight: normal;
+ line-height: inherit;
+ padding: 0.0625rem 0.625rem 0.0625rem; }
+ ul.pagination li:hover a, ul.pagination li a:focus, ul.pagination li:hover button, ul.pagination li button:focus {
+ background: #e6e6e6; }
+ ul.pagination li.unavailable a, ul.pagination li.unavailable button {
+ cursor: default;
+ color: #999999; }
+ ul.pagination li.unavailable:hover a, ul.pagination li.unavailable a:focus, ul.pagination li.unavailable:hover button, ul.pagination li.unavailable button:focus {
+ background: transparent; }
+ ul.pagination li.current a, ul.pagination li.current button {
+ background: #008CBA;
+ color: #FFFFFF;
+ cursor: default;
+ font-weight: bold; }
+ ul.pagination li.current a:hover, ul.pagination li.current a:focus, ul.pagination li.current button:hover, ul.pagination li.current button:focus {
+ background: #008CBA; }
+ ul.pagination li {
+ display: block;
+ float: left; }
+
+/* Pagination centred wrapper */
+.pagination-centered {
+ text-align: center; }
+ .pagination-centered ul.pagination li {
+ display: inline-block;
+ float: none; }
+
+/* Panels */
+.panel {
+ border-style: solid;
+ border-width: 1px;
+ border-color: #d8d8d8;
+ margin-bottom: 1.25rem;
+ padding: 1.25rem;
+ background: #f2f2f2;
+ color: #333333; }
+ .panel > :first-child {
+ margin-top: 0; }
+ .panel > :last-child {
+ margin-bottom: 0; }
+ .panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p, .panel li, .panel dl {
+ color: #333333; }
+ .panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6 {
+ line-height: 1;
+ margin-bottom: 0.625rem; }
+ .panel h1.subheader, .panel h2.subheader, .panel h3.subheader, .panel h4.subheader, .panel h5.subheader, .panel h6.subheader {
+ line-height: 1.4; }
+ .panel.callout {
+ border-style: solid;
+ border-width: 1px;
+ border-color: #d8d8d8;
+ margin-bottom: 1.25rem;
+ padding: 1.25rem;
+ background: #ecfaff;
+ color: #333333; }
+ .panel.callout > :first-child {
+ margin-top: 0; }
+ .panel.callout > :last-child {
+ margin-bottom: 0; }
+ .panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6, .panel.callout p, .panel.callout li, .panel.callout dl {
+ color: #333333; }
+ .panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6 {
+ line-height: 1;
+ margin-bottom: 0.625rem; }
+ .panel.callout h1.subheader, .panel.callout h2.subheader, .panel.callout h3.subheader, .panel.callout h4.subheader, .panel.callout h5.subheader, .panel.callout h6.subheader {
+ line-height: 1.4; }
+ .panel.callout a:not(.button) {
+ color: #008CBA; }
+ .panel.callout a:not(.button):hover, .panel.callout a:not(.button):focus {
+ color: #0078a0; }
+ .panel.radius {
+ border-radius: 3px; }
+
+/* Pricing Tables */
+.pricing-table {
+ border: solid 1px #DDDDDD;
+ margin-left: 0;
+ margin-bottom: 1.25rem; }
+ .pricing-table * {
+ list-style: none;
+ line-height: 1; }
+ .pricing-table .title {
+ background-color: #333333;
+ color: #EEEEEE;
+ font-family: "Times New Roman";
+ font-size: 1rem;
+ font-weight: normal;
+ padding: 0.9375rem 1.25rem;
+ text-align: center; }
+ .pricing-table .price {
+ background-color: #F6F6F6;
+ color: #333333;
+ font-family: "Times New Roman";
+ font-size: 2rem;
+ font-weight: normal;
+ padding: 0.9375rem 1.25rem;
+ text-align: center; }
+ .pricing-table .description {
+ background-color: #FFFFFF;
+ border-bottom: dotted 1px #DDDDDD;
+ color: #777777;
+ font-size: 0.75rem;
+ font-weight: normal;
+ line-height: 1.4;
+ padding: 0.9375rem;
+ text-align: center; }
+ .pricing-table .bullet-item {
+ background-color: #FFFFFF;
+ border-bottom: dotted 1px #DDDDDD;
+ color: #333333;
+ font-size: 0.875rem;
+ font-weight: normal;
+ padding: 0.9375rem;
+ text-align: center; }
+ .pricing-table .cta-button {
+ background-color: #FFFFFF;
+ padding: 1.25rem 1.25rem 0;
+ text-align: center; }
+
+/* Progress Bar */
+.progress {
+ background-color: #F6F6F6;
+ border: 1px solid white;
+ height: 1.5625rem;
+ margin-bottom: 0.625rem;
+ padding: 0.125rem; }
+ .progress .meter {
+ background: #008CBA;
+ display: block;
+ height: 100%; }
+ .progress.secondary .meter {
+ background: #e7e7e7;
+ display: block;
+ height: 100%; }
+ .progress.success .meter {
+ background: #43AC6A;
+ display: block;
+ height: 100%; }
+ .progress.alert .meter {
+ background: #f04124;
+ display: block;
+ height: 100%; }
+ .progress.radius {
+ border-radius: 3px; }
+ .progress.radius .meter {
+ border-radius: 2px; }
+ .progress.round {
+ border-radius: 1000px; }
+ .progress.round .meter {
+ border-radius: 999px; }
+
+.range-slider {
+ border: 1px solid #DDDDDD;
+ margin: 1.25rem 0;
+ position: relative;
+ -ms-touch-action: none;
+ touch-action: none;
+ display: block;
+ height: 1rem;
+ width: 100%;
+ background: #FAFAFA; }
+ .range-slider.vertical-range {
+ border: 1px solid #DDDDDD;
+ margin: 1.25rem 0;
+ position: relative;
+ -ms-touch-action: none;
+ touch-action: none;
+ display: inline-block;
+ height: 12.5rem;
+ width: 1rem; }
+ .range-slider.vertical-range .range-slider-handle {
+ bottom: -10.5rem;
+ margin-left: -0.5rem;
+ margin-top: 0;
+ position: absolute; }
+ .range-slider.vertical-range .range-slider-active-segment {
+ border-bottom-left-radius: inherit;
+ border-bottom-right-radius: inherit;
+ border-top-left-radius: initial;
+ bottom: 0;
+ height: auto;
+ width: 0.875rem; }
+ .range-slider.radius {
+ background: #FAFAFA;
+ border-radius: 3px; }
+ .range-slider.radius .range-slider-handle {
+ background: #008CBA;
+ border-radius: 3px; }
+ .range-slider.radius .range-slider-handle:hover {
+ background: #007ba4; }
+ .range-slider.round {
+ background: #FAFAFA;
+ border-radius: 1000px; }
+ .range-slider.round .range-slider-handle {
+ background: #008CBA;
+ border-radius: 1000px; }
+ .range-slider.round .range-slider-handle:hover {
+ background: #007ba4; }
+ .range-slider.disabled, .range-slider[disabled] {
+ background: #FAFAFA;
+ cursor: false;
+ opacity: 0.7; }
+ .range-slider.disabled .range-slider-handle, .range-slider[disabled] .range-slider-handle {
+ background: #008CBA;
+ cursor: default;
+ opacity: 0.7; }
+ .range-slider.disabled .range-slider-handle:hover, .range-slider[disabled] .range-slider-handle:hover {
+ background: #007ba4; }
+
+.range-slider-active-segment {
+ background: #e5e5e5;
+ border-bottom-left-radius: inherit;
+ border-top-left-radius: inherit;
+ display: inline-block;
+ height: 0.875rem;
+ position: absolute; }
+
+.range-slider-handle {
+ border: 1px solid none;
+ cursor: pointer;
+ display: inline-block;
+ height: 1.375rem;
+ position: absolute;
+ top: -0.3125rem;
+ width: 2rem;
+ z-index: 1;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ background: #008CBA; }
+ .range-slider-handle:hover {
+ background: #007ba4; }
+
+.reveal-modal-bg {
+ background: #000000;
+ background: rgba(0, 0, 0, 0.45);
+ bottom: 0;
+ display: none;
+ left: 0;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 1004;
+ left: 0; }
+
+.reveal-modal {
+ border-radius: 3px;
+ display: none;
+ position: absolute;
+ top: 0;
+ visibility: hidden;
+ width: 100%;
+ z-index: 1005;
+ left: 0;
+ background-color: #FFFFFF;
+ padding: 1.875rem;
+ border: solid 1px #666666;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); }
+ @media only screen and (max-width: 40em) {
+ .reveal-modal {
+ min-height: 100vh; } }
+ .reveal-modal .column, .reveal-modal .columns {
+ min-width: 0; }
+ .reveal-modal > :first-child {
+ margin-top: 0; }
+ .reveal-modal > :last-child {
+ margin-bottom: 0; }
+ @media only screen and (min-width:40.063em) {
+ .reveal-modal {
+ left: 0;
+ margin: 0 auto;
+ max-width: 62.5rem;
+ right: 0;
+ width: 80%; } }
+ @media only screen and (min-width:40.063em) {
+ .reveal-modal {
+ top: 6.25rem; } }
+ .reveal-modal.radius {
+ border-radius: 3px; }
+ .reveal-modal.round {
+ border-radius: 1000px; }
+ .reveal-modal.collapse {
+ padding: 0; }
+ @media only screen and (min-width:40.063em) {
+ .reveal-modal.tiny {
+ left: 0;
+ margin: 0 auto;
+ max-width: 62.5rem;
+ right: 0;
+ width: 30%; } }
+ @media only screen and (min-width:40.063em) {
+ .reveal-modal.small {
+ left: 0;
+ margin: 0 auto;
+ max-width: 62.5rem;
+ right: 0;
+ width: 40%; } }
+ @media only screen and (min-width:40.063em) {
+ .reveal-modal.medium {
+ left: 0;
+ margin: 0 auto;
+ max-width: 62.5rem;
+ right: 0;
+ width: 60%; } }
+ @media only screen and (min-width:40.063em) {
+ .reveal-modal.large {
+ left: 0;
+ margin: 0 auto;
+ max-width: 62.5rem;
+ right: 0;
+ width: 70%; } }
+ @media only screen and (min-width:40.063em) {
+ .reveal-modal.xlarge {
+ left: 0;
+ margin: 0 auto;
+ max-width: 62.5rem;
+ right: 0;
+ width: 95%; } }
+ .reveal-modal.full {
+ height: 100vh;
+ height: 100%;
+ left: 0;
+ margin-left: 0 !important;
+ max-width: none !important;
+ min-height: 100vh;
+ top: 0; }
+ @media only screen and (min-width:40.063em) {
+ .reveal-modal.full {
+ left: 0;
+ margin: 0 auto;
+ max-width: 62.5rem;
+ right: 0;
+ width: 100%; } }
+ .reveal-modal.toback {
+ z-index: 1003; }
+ .reveal-modal .close-reveal-modal {
+ color: #AAAAAA;
+ cursor: pointer;
+ font-size: 2.5rem;
+ font-weight: bold;
+ line-height: 1;
+ position: absolute;
+ top: 0.625rem;
+ right: 1.375rem; }
+
+.side-nav {
+ display: block;
+ font-family: "Times New Roman";
+ list-style-position: outside;
+ list-style-type: none;
+ margin: 0;
+ padding: 0.875rem 0; }
+ .side-nav li {
+ font-size: 0.875rem;
+ font-weight: normal;
+ margin: 0 0 0.4375rem 0; }
+ .side-nav li a:not(.button) {
+ color: #008CBA;
+ display: block;
+ margin: 0;
+ padding: 0.4375rem 0.875rem; }
+ .side-nav li a:not(.button):hover, .side-nav li a:not(.button):focus {
+ background: rgba(0, 0, 0, 0.025);
+ color: #1cc7ff; }
+ .side-nav li a:not(.button):active {
+ color: #1cc7ff; }
+ .side-nav li.active > a:first-child:not(.button) {
+ color: #1cc7ff;
+ font-family: "Times New Roman";
+ font-weight: normal; }
+ .side-nav li.divider {
+ border-top: 1px solid;
+ height: 0;
+ list-style: none;
+ padding: 0;
+ border-top-color: #e6e6e6; }
+ .side-nav li.heading {
+ color: #008CBA;
+ font-size: 0.875rem;
+ font-weight: bold;
+ text-transform: uppercase; }
+
+.split.button {
+ position: relative;
+ padding-right: 5.0625rem; }
+ .split.button span {
+ display: block;
+ height: 100%;
+ position: absolute;
+ right: 0;
+ top: 0;
+ border-left: solid 1px; }
+ .split.button span:after {
+ position: absolute;
+ content: "";
+ width: 0;
+ height: 0;
+ display: block;
+ border-style: inset;
+ top: 50%;
+ left: 50%; }
+ .split.button span:active {
+ background-color: rgba(0, 0, 0, 0.1); }
+ .split.button span {
+ border-left-color: rgba(255, 255, 255, 0.5); }
+ .split.button span {
+ width: 3.09375rem; }
+ .split.button span:after {
+ border-top-style: solid;
+ border-width: 0.375rem;
+ margin-left: -0.375rem;
+ top: 48%; }
+ .split.button span:after {
+ border-color: #FFFFFF transparent transparent transparent; }
+ .split.button.secondary span {
+ border-left-color: rgba(255, 255, 255, 0.5); }
+ .split.button.secondary span:after {
+ border-color: #FFFFFF transparent transparent transparent; }
+ .split.button.alert span {
+ border-left-color: rgba(255, 255, 255, 0.5); }
+ .split.button.success span {
+ border-left-color: rgba(255, 255, 255, 0.5); }
+ .split.button.tiny {
+ padding-right: 3.75rem; }
+ .split.button.tiny span {
+ width: 2.25rem; }
+ .split.button.tiny span:after {
+ border-top-style: solid;
+ border-width: 0.375rem;
+ margin-left: -0.375rem;
+ top: 48%; }
+ .split.button.small {
+ padding-right: 4.375rem; }
+ .split.button.small span {
+ width: 2.625rem; }
+ .split.button.small span:after {
+ border-top-style: solid;
+ border-width: 0.4375rem;
+ margin-left: -0.375rem;
+ top: 48%; }
+ .split.button.large {
+ padding-right: 5.5rem; }
+ .split.button.large span {
+ width: 3.4375rem; }
+ .split.button.large span:after {
+ border-top-style: solid;
+ border-width: 0.3125rem;
+ margin-left: -0.375rem;
+ top: 48%; }
+ .split.button.expand {
+ padding-left: 2rem; }
+ .split.button.secondary span:after {
+ border-color: #333333 transparent transparent transparent; }
+ .split.button.radius span {
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+ .split.button.round span {
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; }
+ .split.button.no-pip span:before {
+ border-style: none; }
+ .split.button.no-pip span:after {
+ border-style: none; }
+ .split.button.no-pip span > i {
+ display: block;
+ left: 50%;
+ margin-left: -0.28889em;
+ margin-top: -0.48889em;
+ position: absolute;
+ top: 50%; }
+
+.sub-nav {
+ display: block;
+ margin: -0.25rem 0 1.125rem;
+ overflow: hidden;
+ padding-top: 0.25rem;
+ width: auto; }
+ .sub-nav dt {
+ text-transform: uppercase; }
+ .sub-nav dt, .sub-nav dd, .sub-nav li {
+ color: #999999;
+ float: left;
+ font-family: "Times New Roman";
+ font-size: 0.875rem;
+ font-weight: normal;
+ margin-left: 1rem;
+ margin-bottom: 0; }
+ .sub-nav dt a, .sub-nav dd a, .sub-nav li a {
+ color: #999999;
+ padding: 0.1875rem 1rem;
+ text-decoration: none; }
+ .sub-nav dt a:hover, .sub-nav dd a:hover, .sub-nav li a:hover {
+ color: #737373; }
+ .sub-nav dt.active a, .sub-nav dd.active a, .sub-nav li.active a {
+ border-radius: 3px;
+ background: #008CBA;
+ color: #FFFFFF;
+ cursor: default;
+ font-weight: normal;
+ padding: 0.1875rem 1rem; }
+ .sub-nav dt.active a:hover, .sub-nav dd.active a:hover, .sub-nav li.active a:hover {
+ background: #0078a0; }
+
+.switch {
+ border: none;
+ margin-bottom: 1.5rem;
+ outline: 0;
+ padding: 0;
+ position: relative;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none; }
+ .switch label {
+ background: #DDDDDD;
+ color: transparent;
+ cursor: pointer;
+ display: block;
+ margin-bottom: 1rem;
+ position: relative;
+ text-indent: 100%;
+ width: 4rem;
+ height: 2rem;
+ transition: left 0.15s ease-out; }
+ .switch input {
+ left: 10px;
+ opacity: 0;
+ padding: 0;
+ position: absolute;
+ top: 9px; }
+ .switch input + label {
+ margin-left: 0;
+ margin-right: 0; }
+ .switch label:after {
+ background: #FFFFFF;
+ content: "";
+ display: block;
+ height: 1.5rem;
+ left: .25rem;
+ position: absolute;
+ top: .25rem;
+ width: 1.5rem;
+ -webkit-transition: left 0.15s ease-out;
+ -moz-transition: left 0.15s ease-out;
+ -o-transition: translate3d(0, 0, 0);
+ transition: left 0.15s ease-out;
+ -webkit-transform: translate3d(0, 0, 0);
+ -moz-transform: translate3d(0, 0, 0);
+ -ms-transform: translate3d(0, 0, 0);
+ -o-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0); }
+ .switch input:checked + label {
+ background: #008CBA; }
+ .switch input:checked + label:after {
+ left: 2.25rem; }
+ .switch label {
+ height: 2rem;
+ width: 4rem; }
+ .switch label:after {
+ height: 1.5rem;
+ width: 1.5rem; }
+ .switch input:checked + label:after {
+ left: 2.25rem; }
+ .switch label {
+ color: transparent;
+ background: #DDDDDD; }
+ .switch label:after {
+ background: #FFFFFF; }
+ .switch input:checked + label {
+ background: #008CBA; }
+ .switch.large label {
+ height: 2.5rem;
+ width: 5rem; }
+ .switch.large label:after {
+ height: 2rem;
+ width: 2rem; }
+ .switch.large input:checked + label:after {
+ left: 2.75rem; }
+ .switch.small label {
+ height: 1.75rem;
+ width: 3.5rem; }
+ .switch.small label:after {
+ height: 1.25rem;
+ width: 1.25rem; }
+ .switch.small input:checked + label:after {
+ left: 2rem; }
+ .switch.tiny label {
+ height: 1.5rem;
+ width: 3rem; }
+ .switch.tiny label:after {
+ height: 1rem;
+ width: 1rem; }
+ .switch.tiny input:checked + label:after {
+ left: 1.75rem; }
+ .switch.radius label {
+ border-radius: 4px; }
+ .switch.radius label:after {
+ border-radius: 3px; }
+ .switch.round {
+ border-radius: 1000px; }
+ .switch.round label {
+ border-radius: 2rem; }
+ .switch.round label:after {
+ border-radius: 2rem; }
+
+table {
+ background: #FFFFFF;
+ border: solid 1px #DDDDDD;
+ margin-bottom: 1.25rem;
+ table-layout: auto; }
+ table caption {
+ background: transparent;
+ color: #222222;
+ font-size: 1rem;
+ font-weight: bold; }
+ table thead {
+ background: #F5F5F5; }
+ table thead tr th, table thead tr td {
+ color: #222222;
+ font-size: 0.875rem;
+ font-weight: bold;
+ padding: 0.5rem 0.625rem 0.625rem; }
+ table tfoot {
+ background: #F5F5F5; }
+ table tfoot tr th, table tfoot tr td {
+ color: #222222;
+ font-size: 0.875rem;
+ font-weight: bold;
+ padding: 0.5rem 0.625rem 0.625rem; }
+ table tr th, table tr td {
+ color: #222222;
+ font-size: 0.875rem;
+ padding: 0.5625rem 0.625rem;
+ text-align: left; }
+ table tr.even, table tr.alt, table tr:nth-of-type(even) {
+ background: #F9F9F9; }
+ table thead tr th, table tfoot tr th, table tfoot tr td, table tbody tr th, table tbody tr td, table tr td {
+ display: table-cell;
+ line-height: 1.125rem; }
+
+.tabs {
+ margin-bottom: 0 !important;
+ margin-left: 0; }
+ .tabs:before, .tabs:after {
+ content: " ";
+ display: table; }
+ .tabs:after {
+ clear: both; }
+ .tabs dd, .tabs .tab-title {
+ float: left;
+ list-style: none;
+ margin-bottom: 0 !important;
+ position: relative; }
+ .tabs dd > a, .tabs .tab-title > a {
+ display: block;
+ background-color: #EFEFEF;
+ color: #222222;
+ font-family: "Times New Roman";
+ font-size: 1rem;
+ padding: 1rem 2rem; }
+ .tabs dd > a:hover, .tabs .tab-title > a:hover {
+ background-color: #e1e1e1; }
+ .tabs dd.active a, .tabs .tab-title.active a {
+ background-color: #FFFFFF;
+ color: #222222; }
+ .tabs.radius dd:first-child a, .tabs.radius .tab:first-child a {
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+ .tabs.radius dd:last-child a, .tabs.radius .tab:last-child a {
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+ .tabs.vertical dd, .tabs.vertical .tab-title {
+ position: inherit;
+ float: none;
+ display: block;
+ top: auto; }
+
+.tabs-content {
+ margin-bottom: 1.5rem;
+ width: 100%; }
+ .tabs-content:before, .tabs-content:after {
+ content: " ";
+ display: table; }
+ .tabs-content:after {
+ clear: both; }
+ .tabs-content > .content {
+ display: none;
+ float: left;
+ padding: 0.9375rem 0;
+ width: 100%; }
+ .tabs-content > .content.active {
+ display: block;
+ float: none; }
+ .tabs-content > .content.contained {
+ padding: 0.9375rem; }
+ .tabs-content.vertical {
+ display: block; }
+ .tabs-content.vertical > .content {
+ padding: 0 0.9375rem; }
+
+@media only screen and (min-width:40.063em) {
+ .tabs.vertical {
+ float: left;
+ margin: 0;
+ margin-bottom: 1.25rem !important;
+ max-width: 20%;
+ width: 20%; }
+ .tabs-content.vertical {
+ float: left;
+ margin-left: -1px;
+ max-width: 80%;
+ padding-left: 1rem;
+ width: 80%; } }
+
+.no-js .tabs-content > .content {
+ display: block;
+ float: none; }
+
+/* Image Thumbnails */
+.th {
+ border: solid 4px #FFFFFF;
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
+ display: inline-block;
+ line-height: 0;
+ max-width: 100%;
+ transition: all 200ms ease-out; }
+ .th:hover, .th:focus {
+ box-shadow: 0 0 6px 1px rgba(0, 140, 186, 0.5); }
+ .th.radius {
+ border-radius: 3px; }
+
+/* Tooltips */
+.has-tip {
+ border-bottom: dotted 1px #CCCCCC;
+ color: #333333;
+ cursor: help;
+ font-weight: bold; }
+ .has-tip:hover, .has-tip:focus {
+ border-bottom: dotted 1px #003f54;
+ color: #008CBA; }
+ .has-tip.tip-left, .has-tip.tip-right {
+ float: none !important; }
+
+.tooltip {
+ background: #333333;
+ color: #FFFFFF;
+ display: none;
+ font-size: 0.875rem;
+ font-weight: normal;
+ line-height: 1.3;
+ max-width: 300px;
+ padding: 0.75rem;
+ position: absolute;
+ width: 100%;
+ z-index: 1006;
+ left: 50%; }
+ .tooltip > .nub {
+ border-color: transparent transparent #333333 transparent;
+ border: solid 5px;
+ display: block;
+ height: 0;
+ pointer-events: none;
+ position: absolute;
+ top: -10px;
+ width: 0;
+ left: 5px; }
+ .tooltip > .nub.rtl {
+ left: auto;
+ right: 5px; }
+ .tooltip.radius {
+ border-radius: 3px; }
+ .tooltip.round {
+ border-radius: 1000px; }
+ .tooltip.round > .nub {
+ left: 2rem; }
+ .tooltip.opened {
+ border-bottom: dotted 1px #003f54 !important;
+ color: #008CBA !important; }
+
+.tap-to-close {
+ color: #777777;
+ display: block;
+ font-size: 0.625rem;
+ font-weight: normal; }
+
+@media only screen and (min-width:40.063em) {
+ .tooltip > .nub {
+ border-color: transparent transparent #333333 transparent;
+ top: -10px; }
+ .tooltip.tip-top > .nub {
+ border-color: #333333 transparent transparent transparent;
+ bottom: -10px;
+ top: auto; }
+ .tooltip.tip-left, .tooltip.tip-right {
+ float: none !important; }
+ .tooltip.tip-left > .nub {
+ border-color: transparent transparent transparent #333333;
+ left: auto;
+ margin-top: -5px;
+ right: -10px;
+ top: 50%; }
+ .tooltip.tip-right > .nub {
+ border-color: transparent #333333 transparent transparent;
+ left: -10px;
+ margin-top: -5px;
+ right: auto;
+ top: 50%; } }
+
+meta.foundation-mq-topbar {
+ font-family: "/only screen and (min-width:40.063em)/";
+ width: 40.063em; }
+
+/* Wrapped around .top-bar to contain to grid width */
+.contain-to-grid {
+ width: 100%;
+ background: #FFFFFF; }
+ .contain-to-grid .top-bar {
+ margin-bottom: 0; }
+
+.fixed {
+ position: fixed;
+ top: 0;
+ width: 100%;
+ z-index: 99;
+ left: 0; }
+ .fixed.expanded:not(.top-bar) {
+ height: auto;
+ max-height: 100%;
+ overflow-y: auto;
+ width: 100%; }
+ .fixed.expanded:not(.top-bar) .title-area {
+ position: fixed;
+ width: 100%;
+ z-index: 99; }
+ .fixed.expanded:not(.top-bar) .top-bar-section {
+ margin-top: 2.6875rem;
+ z-index: 98; }
+
+.top-bar {
+ background: #FFFFFF;
+ height: 2.6875rem;
+ line-height: 2.6875rem;
+ margin-bottom: 0;
+ overflow: hidden;
+ position: relative; }
+ .top-bar ul {
+ list-style: none;
+ margin-bottom: 0; }
+ .top-bar .row {
+ max-width: none; }
+ .top-bar form, .top-bar input, .top-bar select {
+ margin-bottom: 0; }
+ .top-bar input, .top-bar select {
+ font-size: 0.75rem;
+ height: 1.75rem;
+ padding-bottom: .35rem;
+ padding-top: .35rem; }
+ .top-bar .button, .top-bar button {
+ font-size: 0.75rem;
+ margin-bottom: 0;
+ padding-bottom: .4125rem;
+ padding-top: .4125rem; }
+ @media only screen and (max-width: 40em) {
+ .top-bar .button, .top-bar button {
+ position: relative;
+ top: -1px; } }
+ .top-bar .title-area {
+ margin: 0;
+ position: relative; }
+ .top-bar .name {
+ font-size: 16px;
+ height: 2.6875rem;
+ margin: 0; }
+ .top-bar .name h1, .top-bar .name h2, .top-bar .name h3, .top-bar .name h4, .top-bar .name p, .top-bar .name span {
+ font-size: 1.0625rem;
+ line-height: 2.6875rem;
+ margin: 0; }
+ .top-bar .name h1 a, .top-bar .name h2 a, .top-bar .name h3 a, .top-bar .name h4 a, .top-bar .name p a, .top-bar .name span a {
+ color: #005287;
+ display: block;
+ font-weight: normal;
+ padding: 0 0.8958333333rem;
+ width: 75%; }
+ .top-bar .toggle-topbar {
+ position: absolute;
+ right: 0;
+ top: 0; }
+ .top-bar .toggle-topbar a {
+ color: #005287;
+ display: block;
+ font-size: 0.8125rem;
+ font-weight: bold;
+ height: 2.6875rem;
+ line-height: 2.6875rem;
+ padding: 0 0.8958333333rem;
+ position: relative;
+ text-transform: uppercase; }
+ .top-bar .toggle-topbar.menu-icon {
+ margin-top: -16px;
+ top: 50%; }
+ .top-bar .toggle-topbar.menu-icon a {
+ color: #FFFFFF;
+ height: 34px;
+ line-height: 33px;
+ padding: 0 2.4583333333rem 0 0.8958333333rem;
+ position: relative; }
+ .top-bar .toggle-topbar.menu-icon a span::after {
+ content: "";
+ display: block;
+ height: 0;
+ position: absolute;
+ margin-top: -8px;
+ top: 50%;
+ right: 0.8958333333rem;
+ box-shadow: 0 0 0 1px #FFFFFF, 0 7px 0 1px #FFFFFF, 0 14px 0 1px #FFFFFF;
+ width: 16px; }
+ .top-bar .toggle-topbar.menu-icon a span:hover:after {
+ box-shadow: 0 0 0 1px "", 0 7px 0 1px "", 0 14px 0 1px ""; }
+ .top-bar.expanded {
+ background: transparent;
+ height: auto; }
+ .top-bar.expanded .title-area {
+ background: #FFFFFF; }
+ .top-bar.expanded .toggle-topbar a {
+ color: #888888; }
+ .top-bar.expanded .toggle-topbar a span::after {
+ box-shadow: 0 0 0 1px #888888, 0 7px 0 1px #888888, 0 14px 0 1px #888888; }
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
+ .top-bar.expanded .top-bar-section .has-dropdown.moved > .dropdown, .top-bar.expanded .top-bar-section .dropdown {
+ clip: initial; }
+ .top-bar.expanded .top-bar-section .has-dropdown:not(.moved) > ul {
+ padding: 0; } }
+
+.top-bar-section {
+ left: 0;
+ position: relative;
+ width: auto;
+ transition: left 300ms ease-out; }
+ .top-bar-section ul {
+ display: block;
+ font-size: 16px;
+ height: auto;
+ margin: 0;
+ padding: 0;
+ width: 100%; }
+ .top-bar-section .divider, .top-bar-section [role="separator"] {
+ border-top: solid 1px gray;
+ clear: both;
+ height: 1px;
+ width: 100%; }
+ .top-bar-section ul li {
+ background: #FFFFFF; }
+ .top-bar-section ul li > a {
+ color: #005287;
+ display: block;
+ font-family: "Times New Roman";
+ font-size: 1.25rem;
+ font-weight: normal;
+ padding-left: 0.8958333333rem;
+ padding: 12px 0 12px 0.8958333333rem;
+ text-transform: none;
+ width: 100%; }
+ .top-bar-section ul li > a.button {
+ font-size: 1.25rem;
+ padding-left: 0.8958333333rem;
+ padding-right: 0.8958333333rem;
+ background-color: #008CBA;
+ border-color: #007095;
+ color: #FFFFFF; }
+ .top-bar-section ul li > a.button:hover, .top-bar-section ul li > a.button:focus {
+ background-color: #007095; }
+ .top-bar-section ul li > a.button:hover, .top-bar-section ul li > a.button:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > a.button.secondary {
+ background-color: #e7e7e7;
+ border-color: #b9b9b9;
+ color: #333333; }
+ .top-bar-section ul li > a.button.secondary:hover, .top-bar-section ul li > a.button.secondary:focus {
+ background-color: #b9b9b9; }
+ .top-bar-section ul li > a.button.secondary:hover, .top-bar-section ul li > a.button.secondary:focus {
+ color: #333333; }
+ .top-bar-section ul li > a.button.success {
+ background-color: #43AC6A;
+ border-color: #368a55;
+ color: #FFFFFF; }
+ .top-bar-section ul li > a.button.success:hover, .top-bar-section ul li > a.button.success:focus {
+ background-color: #368a55; }
+ .top-bar-section ul li > a.button.success:hover, .top-bar-section ul li > a.button.success:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > a.button.alert {
+ background-color: #f04124;
+ border-color: #cf2a0e;
+ color: #FFFFFF; }
+ .top-bar-section ul li > a.button.alert:hover, .top-bar-section ul li > a.button.alert:focus {
+ background-color: #cf2a0e; }
+ .top-bar-section ul li > a.button.alert:hover, .top-bar-section ul li > a.button.alert:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > a.button.warning {
+ background-color: #f08a24;
+ border-color: #cf6e0e;
+ color: #FFFFFF; }
+ .top-bar-section ul li > a.button.warning:hover, .top-bar-section ul li > a.button.warning:focus {
+ background-color: #cf6e0e; }
+ .top-bar-section ul li > a.button.warning:hover, .top-bar-section ul li > a.button.warning:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > a.button.info {
+ background-color: #a0d3e8;
+ border-color: #61b6d9;
+ color: #333333; }
+ .top-bar-section ul li > a.button.info:hover, .top-bar-section ul li > a.button.info:focus {
+ background-color: #61b6d9; }
+ .top-bar-section ul li > a.button.info:hover, .top-bar-section ul li > a.button.info:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > button {
+ font-size: 1.25rem;
+ padding-left: 0.8958333333rem;
+ padding-right: 0.8958333333rem;
+ background-color: #008CBA;
+ border-color: #007095;
+ color: #FFFFFF; }
+ .top-bar-section ul li > button:hover, .top-bar-section ul li > button:focus {
+ background-color: #007095; }
+ .top-bar-section ul li > button:hover, .top-bar-section ul li > button:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > button.secondary {
+ background-color: #e7e7e7;
+ border-color: #b9b9b9;
+ color: #333333; }
+ .top-bar-section ul li > button.secondary:hover, .top-bar-section ul li > button.secondary:focus {
+ background-color: #b9b9b9; }
+ .top-bar-section ul li > button.secondary:hover, .top-bar-section ul li > button.secondary:focus {
+ color: #333333; }
+ .top-bar-section ul li > button.success {
+ background-color: #43AC6A;
+ border-color: #368a55;
+ color: #FFFFFF; }
+ .top-bar-section ul li > button.success:hover, .top-bar-section ul li > button.success:focus {
+ background-color: #368a55; }
+ .top-bar-section ul li > button.success:hover, .top-bar-section ul li > button.success:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > button.alert {
+ background-color: #f04124;
+ border-color: #cf2a0e;
+ color: #FFFFFF; }
+ .top-bar-section ul li > button.alert:hover, .top-bar-section ul li > button.alert:focus {
+ background-color: #cf2a0e; }
+ .top-bar-section ul li > button.alert:hover, .top-bar-section ul li > button.alert:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > button.warning {
+ background-color: #f08a24;
+ border-color: #cf6e0e;
+ color: #FFFFFF; }
+ .top-bar-section ul li > button.warning:hover, .top-bar-section ul li > button.warning:focus {
+ background-color: #cf6e0e; }
+ .top-bar-section ul li > button.warning:hover, .top-bar-section ul li > button.warning:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li > button.info {
+ background-color: #a0d3e8;
+ border-color: #61b6d9;
+ color: #333333; }
+ .top-bar-section ul li > button.info:hover, .top-bar-section ul li > button.info:focus {
+ background-color: #61b6d9; }
+ .top-bar-section ul li > button.info:hover, .top-bar-section ul li > button.info:focus {
+ color: #FFFFFF; }
+ .top-bar-section ul li:hover:not(.has-form) > a {
+ background-color: #005287;
+ color: #FFFFFF;
+ background: #005287; }
+ .top-bar-section ul li.active > a {
+ background: #005287;
+ color: #FFFFFF; }
+ .top-bar-section ul li.active > a:hover {
+ background: #0078a0;
+ color: #FFFFFF; }
+ .top-bar-section .has-form {
+ padding: 0.8958333333rem; }
+ .top-bar-section .has-dropdown {
+ position: relative; }
+ .top-bar-section .has-dropdown > a:after {
+ margin-right: 0.8958333333rem;
+ margin-top: -4.5px;
+ position: absolute;
+ top: 50%;
+ right: 0; }
+ .top-bar-section .has-dropdown.moved {
+ position: static; }
+ .top-bar-section .has-dropdown.moved > .dropdown {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto;
+ display: block;
+ position: absolute !important;
+ width: 100%; }
+ .top-bar-section .has-dropdown.moved > a:after {
+ display: none; }
+ .top-bar-section .dropdown {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px;
+ display: block;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ z-index: 99;
+ left: 100%; }
+ .top-bar-section .dropdown li {
+ height: auto;
+ width: 100%; }
+ .top-bar-section .dropdown li a {
+ font-weight: normal;
+ padding: 8px 0.8958333333rem; }
+ .top-bar-section .dropdown li a.parent-link {
+ font-weight: normal; }
+ .top-bar-section .dropdown li.title h5, .top-bar-section .dropdown li.parent-link {
+ margin-bottom: 0;
+ margin-top: 0;
+ font-size: 1.125rem; }
+ .top-bar-section .dropdown li.title h5 a, .top-bar-section .dropdown li.parent-link a {
+ color: #005287;
+ display: block; }
+ .top-bar-section .dropdown li.title h5 a:hover, .top-bar-section .dropdown li.parent-link a:hover {
+ background: none; }
+ .top-bar-section .dropdown li.has-form {
+ padding: 8px 0.8958333333rem; }
+ .top-bar-section .dropdown li .button, .top-bar-section .dropdown li button {
+ top: auto; }
+ .top-bar-section .dropdown label {
+ color: #777777;
+ font-size: 0.625rem;
+ font-weight: bold;
+ margin-bottom: 0;
+ padding: 8px 0.8958333333rem 2px;
+ text-transform: uppercase; }
+
+.js-generated {
+ display: block; }
+
+@media only screen and (min-width:40.063em) {
+ .top-bar {
+ background: #FFFFFF;
+ overflow: visible; }
+ .top-bar:before, .top-bar:after {
+ content: " ";
+ display: table; }
+ .top-bar:after {
+ clear: both; }
+ .top-bar .toggle-topbar {
+ display: none; }
+ .top-bar .title-area {
+ float: left; }
+ .top-bar .name h1 a, .top-bar .name h2 a, .top-bar .name h3 a, .top-bar .name h4 a, .top-bar .name h5 a, .top-bar .name h6 a {
+ width: auto; }
+ .top-bar input, .top-bar select, .top-bar .button, .top-bar button {
+ font-size: 0.875rem;
+ height: 1.75rem;
+ position: relative;
+ top: 0.46875rem; }
+ .top-bar.expanded {
+ background: #FFFFFF; }
+ .contain-to-grid .top-bar {
+ margin-bottom: 0;
+ margin: 0 auto;
+ max-width: 62.5rem; }
+ .top-bar-section {
+ transition: none 0 0;
+ left: 0 !important; }
+ .top-bar-section ul {
+ display: inline;
+ height: auto !important;
+ width: auto; }
+ .top-bar-section ul li {
+ float: left; }
+ .top-bar-section ul li .js-generated {
+ display: none; }
+ .top-bar-section li.hover > a:not(.button) {
+ background-color: #005287;
+ background: #005287;
+ color: #FFFFFF; }
+ .top-bar-section li:not(.has-form) a:not(.button) {
+ background: #FFFFFF;
+ line-height: 2.6875rem;
+ padding: 0 0.8958333333rem; }
+ .top-bar-section li:not(.has-form) a:not(.button):hover {
+ background-color: #005287;
+ background: #005287; }
+ .top-bar-section li.active:not(.has-form) a:not(.button) {
+ background: #005287;
+ color: #FFFFFF;
+ line-height: 2.6875rem;
+ padding: 0 0.8958333333rem; }
+ .top-bar-section li.active:not(.has-form) a:not(.button):hover {
+ background: #0078a0;
+ color: #FFFFFF; }
+ .top-bar-section .has-dropdown.moved {
+ position: relative; }
+ .top-bar-section .has-dropdown.moved > .dropdown {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px;
+ display: block; }
+ .top-bar-section .has-dropdown.hover > .dropdown, .top-bar-section .has-dropdown.not-click:hover > .dropdown {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto;
+ display: block;
+ position: absolute !important; }
+ .top-bar-section .has-dropdown > a:focus + .dropdown {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto;
+ display: block;
+ position: absolute !important; }
+ .top-bar-section .has-dropdown .dropdown li.has-dropdown > a:after {
+ border: none;
+ content: "\00bb";
+ top: 0.1875rem;
+ right: 5px; }
+ .top-bar-section .dropdown {
+ left: 0;
+ background: transparent;
+ min-width: 100%;
+ top: auto; }
+ .top-bar-section .dropdown li a {
+ background: #FFFFFF;
+ color: #000000;
+ line-height: 2.6875rem;
+ padding: 12px 0.8958333333rem;
+ white-space: nowrap; }
+ .top-bar-section .dropdown li:not(.has-form):not(.active) > a:not(.button) {
+ background: #FFFFFF;
+ color: #000000; }
+ .top-bar-section .dropdown li:not(.has-form):not(.active):hover > a:not(.button) {
+ background-color: #005287;
+ color: #005287;
+ background: #FFFFFF; }
+ .top-bar-section .dropdown li label {
+ background: #333333;
+ white-space: nowrap; }
+ .top-bar-section .dropdown li .dropdown {
+ left: 100%;
+ top: 0; }
+ .top-bar-section > ul > .divider, .top-bar-section > ul > [role="separator"] {
+ border-right: solid 1px white;
+ border-bottom: none;
+ border-top: none;
+ clear: none;
+ height: 2.6875rem;
+ width: 0; }
+ .top-bar-section .has-form {
+ background: #FFFFFF;
+ height: 2.6875rem;
+ padding: 0 0.8958333333rem; }
+ .top-bar-section .right li .dropdown {
+ left: auto;
+ right: 0; }
+ .top-bar-section .right li .dropdown li .dropdown {
+ right: 100%; }
+ .top-bar-section .left li .dropdown {
+ right: auto;
+ left: 0; }
+ .top-bar-section .left li .dropdown li .dropdown {
+ left: 100%; }
+ .no-js .top-bar-section ul li:hover > a {
+ background-color: #005287;
+ background: #005287;
+ color: #FFFFFF; }
+ .no-js .top-bar-section ul li:active > a {
+ background: #005287;
+ color: #FFFFFF; }
+ .no-js .top-bar-section .has-dropdown:hover > .dropdown {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto;
+ display: block;
+ position: absolute !important; }
+ .no-js .top-bar-section .has-dropdown > a:focus + .dropdown {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto;
+ display: block;
+ position: absolute !important; } }
+
+.text-left {
+ text-align: left !important; }
+
+.text-right {
+ text-align: right !important; }
+
+.text-center {
+ text-align: center !important; }
+
+.text-justify {
+ text-align: justify !important; }
+
+@media only screen and (max-width: 40em) {
+ .small-only-text-left {
+ text-align: left !important; }
+ .small-only-text-right {
+ text-align: right !important; }
+ .small-only-text-center {
+ text-align: center !important; }
+ .small-only-text-justify {
+ text-align: justify !important; } }
+
+@media only screen {
+ .small-text-left {
+ text-align: left !important; }
+ .small-text-right {
+ text-align: right !important; }
+ .small-text-center {
+ text-align: center !important; }
+ .small-text-justify {
+ text-align: justify !important; } }
+
+@media only screen and (min-width:40.063em) and (max-width:64em) {
+ .medium-only-text-left {
+ text-align: left !important; }
+ .medium-only-text-right {
+ text-align: right !important; }
+ .medium-only-text-center {
+ text-align: center !important; }
+ .medium-only-text-justify {
+ text-align: justify !important; } }
+
+@media only screen and (min-width:40.063em) {
+ .medium-text-left {
+ text-align: left !important; }
+ .medium-text-right {
+ text-align: right !important; }
+ .medium-text-center {
+ text-align: center !important; }
+ .medium-text-justify {
+ text-align: justify !important; } }
+
+@media only screen and (min-width:64.063em) and (max-width:90em) {
+ .large-only-text-left {
+ text-align: left !important; }
+ .large-only-text-right {
+ text-align: right !important; }
+ .large-only-text-center {
+ text-align: center !important; }
+ .large-only-text-justify {
+ text-align: justify !important; } }
+
+@media only screen and (min-width:64.063em) {
+ .large-text-left {
+ text-align: left !important; }
+ .large-text-right {
+ text-align: right !important; }
+ .large-text-center {
+ text-align: center !important; }
+ .large-text-justify {
+ text-align: justify !important; } }
+
+@media only screen and (min-width:90.063em) and (max-width:120em) {
+ .xlarge-only-text-left {
+ text-align: left !important; }
+ .xlarge-only-text-right {
+ text-align: right !important; }
+ .xlarge-only-text-center {
+ text-align: center !important; }
+ .xlarge-only-text-justify {
+ text-align: justify !important; } }
+
+@media only screen and (min-width:90.063em) {
+ .xlarge-text-left {
+ text-align: left !important; }
+ .xlarge-text-right {
+ text-align: right !important; }
+ .xlarge-text-center {
+ text-align: center !important; }
+ .xlarge-text-justify {
+ text-align: justify !important; } }
+
+@media only screen and (min-width:120.063em) and (max-width:99999999em) {
+ .xxlarge-only-text-left {
+ text-align: left !important; }
+ .xxlarge-only-text-right {
+ text-align: right !important; }
+ .xxlarge-only-text-center {
+ text-align: center !important; }
+ .xxlarge-only-text-justify {
+ text-align: justify !important; } }
+
+@media only screen and (min-width:120.063em) {
+ .xxlarge-text-left {
+ text-align: left !important; }
+ .xxlarge-text-right {
+ text-align: right !important; }
+ .xxlarge-text-center {
+ text-align: center !important; }
+ .xxlarge-text-justify {
+ text-align: justify !important; } }
+
+/* Typography resets */
+div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td {
+ margin: 0;
+ padding: 0; }
+
+/* Default Link Styles */
+a {
+ color: #008CBA;
+ line-height: inherit;
+ text-decoration: none; }
+ a:hover, a:focus {
+ color: #0078a0; }
+ a img {
+ border: none; }
+
+/* Default paragraph styles */
+p {
+ font-family: inherit;
+ font-size: 1rem;
+ font-weight: normal;
+ line-height: 1.6;
+ margin-bottom: 1.25rem;
+ text-rendering: optimizeLegibility; }
+ p.lead {
+ font-size: 1.21875rem;
+ line-height: 1.6; }
+ p aside {
+ font-size: 0.875rem;
+ font-style: italic;
+ line-height: 1.35; }
+
+/* Default header styles */
+h1, h2, h3, h4, h5, h6 {
+ color: #222222;
+ font-family: "Times New Roman";
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1.4;
+ margin-bottom: 0.5rem;
+ margin-top: 0.2rem;
+ text-rendering: optimizeLegibility; }
+ h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
+ color: #6f6f6f;
+ font-size: 60%;
+ line-height: 0; }
+
+h1 {
+ font-size: 1.6875rem; }
+
+h2 {
+ font-size: 1.125rem; }
+
+h3 {
+ font-size: 1.0625rem; }
+
+h4 {
+ font-size: 1rem; }
+
+h5 {
+ font-size: 1rem; }
+
+h6 {
+ font-size: 1rem; }
+
+.subheader {
+ line-height: 1.4;
+ color: #6f6f6f;
+ font-weight: normal;
+ margin-top: 0.2rem;
+ margin-bottom: 0.5rem; }
+
+hr {
+ border: solid #DDDDDD;
+ border-width: 1px 0 0;
+ clear: both;
+ height: 0;
+ margin: 1.25rem 0 1.1875rem; }
+
+/* Helpful Typography Defaults */
+em, i {
+ font-style: italic;
+ line-height: inherit; }
+
+strong, b {
+ font-weight: bold;
+ line-height: inherit; }
+
+small {
+ font-size: 60%;
+ line-height: inherit; }
+
+code {
+ background-color: #f8f8f8;
+ border-color: #dfdfdf;
+ border-style: solid;
+ border-width: 1px;
+ color: #333333;
+ font-family: Consolas, "Liberation Mono", Courier, monospace;
+ font-weight: normal;
+ padding: 0.125rem 0.3125rem 0.0625rem; }
+
+/* Lists */
+ul, ol, dl {
+ font-family: inherit;
+ font-size: 1rem;
+ line-height: 1.6;
+ list-style-position: outside;
+ margin-bottom: 1.25rem; }
+
+ul {
+ margin-left: 1.1rem; }
+ ul.no-bullet {
+ margin-left: 0; }
+ ul.no-bullet li ul, ul.no-bullet li ol {
+ margin-left: 1.25rem;
+ margin-bottom: 0;
+ list-style: none; }
+
+/* Unordered Lists */
+ul li ul, ul li ol {
+ margin-left: 1.25rem;
+ margin-bottom: 0; }
+ul.square li ul, ul.circle li ul, ul.disc li ul {
+ list-style: inherit; }
+ul.square {
+ list-style-type: square;
+ margin-left: 1.1rem; }
+ul.circle {
+ list-style-type: circle;
+ margin-left: 1.1rem; }
+ul.disc {
+ list-style-type: disc;
+ margin-left: 1.1rem; }
+ul.no-bullet {
+ list-style: none; }
+
+/* Ordered Lists */
+ol {
+ margin-left: 1.4rem; }
+ ol li ul, ol li ol {
+ margin-left: 1.25rem;
+ margin-bottom: 0; }
+
+/* Definition Lists */
+dl dt {
+ margin-bottom: 0.3rem;
+ font-weight: bold; }
+dl dd {
+ margin-bottom: 0.75rem; }
+
+/* Abbreviations */
+abbr, acronym {
+ text-transform: uppercase;
+ font-size: 90%;
+ color: #000000;
+ cursor: help; }
+
+abbr {
+ text-transform: none; }
+ abbr[title] {
+ border-bottom: 1px dotted #DDDDDD; }
+
+/* Blockquotes */
+blockquote {
+ margin: 0 0 1.25rem;
+ padding: 0.5625rem 1.25rem 0 1.1875rem;
+ border-left: 1px solid #DDDDDD; }
+ blockquote cite {
+ display: block;
+ font-size: 0.8125rem;
+ color: #555555; }
+ blockquote cite:before {
+ content: "\2014 \0020"; }
+ blockquote cite a, blockquote cite a:visited {
+ color: #555555; }
+
+blockquote, blockquote p {
+ line-height: 1.6;
+ color: #6f6f6f; }
+
+/* Microformats */
+.vcard {
+ display: inline-block;
+ margin: 0 0 1.25rem 0;
+ border: 1px solid #DDDDDD;
+ padding: 0.625rem 0.75rem; }
+ .vcard li {
+ margin: 0;
+ display: block; }
+ .vcard .fn {
+ font-weight: bold;
+ font-size: 0.9375rem; }
+
+.vevent .summary {
+ font-weight: bold; }
+.vevent abbr {
+ cursor: default;
+ text-decoration: none;
+ font-weight: bold;
+ border: none;
+ padding: 0 0.0625rem; }
+
+@media only screen and (min-width:40.063em) {
+ h1, h2, h3, h4, h5, h6 {
+ line-height: 1.4; }
+ h1 {
+ font-size: 2rem; }
+ h2 {
+ font-size: 1.125rem; }
+ h3 {
+ font-size: 1.0625rem; }
+ h4 {
+ font-size: 1rem; }
+ h5 {
+ font-size: 1rem; }
+ h6 {
+ font-size: 1rem; } }
+
+.off-canvas-wrap {
+ -webkit-backface-visibility: hidden;
+ position: relative;
+ width: 100%;
+ overflow: hidden; }
+ .off-canvas-wrap.move-right, .off-canvas-wrap.move-left {
+ min-height: 100%;
+ -webkit-overflow-scrolling: touch; }
+
+.inner-wrap {
+ position: relative;
+ width: 100%;
+ -webkit-transition: -webkit-transform 500ms ease;
+ -moz-transition: -moz-transform 500ms ease;
+ -ms-transition: -ms-transform 500ms ease;
+ -o-transition: -o-transform 500ms ease;
+ transition: transform 500ms ease; }
+ .inner-wrap:before, .inner-wrap:after {
+ content: " ";
+ display: table; }
+ .inner-wrap:after {
+ clear: both; }
+
+.tab-bar {
+ -webkit-backface-visibility: hidden;
+ background: #005287;
+ color: #FFFFFF;
+ height: 2.8125rem;
+ line-height: 2.8125rem;
+ position: relative; }
+ .tab-bar h1, .tab-bar h2, .tab-bar h3, .tab-bar h4, .tab-bar h5, .tab-bar h6 {
+ color: #FFFFFF;
+ font-weight: bold;
+ line-height: 2.8125rem;
+ margin: 0; }
+ .tab-bar h1, .tab-bar h2, .tab-bar h3, .tab-bar h4 {
+ font-size: 1rem; }
+
+.left-small {
+ height: 2.8125rem;
+ position: absolute;
+ top: 0;
+ width: 2.8125rem;
+ border-right: solid 1px #002944;
+ left: 0; }
+
+.right-small {
+ height: 2.8125rem;
+ position: absolute;
+ top: 0;
+ width: 2.8125rem;
+ border-left: solid 1px #002944;
+ right: 0; }
+
+.tab-bar-section {
+ height: 2.8125rem;
+ padding: 0 0.625rem;
+ position: absolute;
+ text-align: center;
+ top: 0; }
+ .tab-bar-section.left {
+ text-align: left; }
+ .tab-bar-section.right {
+ text-align: right; }
+ .tab-bar-section.left {
+ left: 0;
+ right: 2.8125rem; }
+ .tab-bar-section.right {
+ left: 2.8125rem;
+ right: 0; }
+ .tab-bar-section.middle {
+ left: 2.8125rem;
+ right: 2.8125rem; }
+
+.tab-bar .menu-icon {
+ color: #FFFFFF;
+ display: block;
+ height: 2.8125rem;
+ padding: 0;
+ position: relative;
+ text-indent: 2.1875rem;
+ transform: translate3d(0, 0, 0);
+ width: 2.8125rem; }
+ .tab-bar .menu-icon span::after {
+ content: "";
+ display: block;
+ height: 0;
+ position: absolute;
+ top: 50%;
+ margin-top: -0.5rem;
+ left: 0.90625rem;
+ box-shadow: 0 0 0 1px #FFFFFF, 0 7px 0 1px #FFFFFF, 0 14px 0 1px #FFFFFF;
+ width: 1rem; }
+ .tab-bar .menu-icon span:hover:after {
+ box-shadow: 0 0 0 1px #b3b3b3, 0 7px 0 1px #b3b3b3, 0 14px 0 1px #b3b3b3; }
+
+.left-off-canvas-menu {
+ -webkit-backface-visibility: hidden;
+ background: #005287;
+ bottom: 0;
+ box-sizing: content-box;
+ -webkit-overflow-scrolling: touch;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ overflow-x: hidden;
+ overflow-y: auto;
+ position: absolute;
+ top: 0;
+ transition: transform 500ms ease 0s;
+ width: 15.625rem;
+ z-index: 1001;
+ -webkit-transform: translate3d(-100%, 0, 0);
+ -moz-transform: translate3d(-100%, 0, 0);
+ -ms-transform: translate(-100%, 0);
+ -ms-transform: translate3d(-100%, 0, 0);
+ -o-transform: translate3d(-100%, 0, 0);
+ transform: translate3d(-100%, 0, 0);
+ left: 0; }
+ .left-off-canvas-menu * {
+ -webkit-backface-visibility: hidden; }
+
+.right-off-canvas-menu {
+ -webkit-backface-visibility: hidden;
+ background: #005287;
+ bottom: 0;
+ box-sizing: content-box;
+ -webkit-overflow-scrolling: touch;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ overflow-x: hidden;
+ overflow-y: auto;
+ position: absolute;
+ top: 0;
+ transition: transform 500ms ease 0s;
+ width: 15.625rem;
+ z-index: 1001;
+ -webkit-transform: translate3d(100%, 0, 0);
+ -moz-transform: translate3d(100%, 0, 0);
+ -ms-transform: translate(100%, 0);
+ -ms-transform: translate3d(100%, 0, 0);
+ -o-transform: translate3d(100%, 0, 0);
+ transform: translate3d(100%, 0, 0);
+ right: 0; }
+ .right-off-canvas-menu * {
+ -webkit-backface-visibility: hidden; }
+
+ul.off-canvas-list {
+ list-style-type: none;
+ margin: 0;
+ padding: 0; }
+ ul.off-canvas-list li label {
+ background: #444444;
+ border-bottom: none;
+ border-top: 1px solid #5e5e5e;
+ color: #999999;
+ display: block;
+ font-size: 0.75rem;
+ font-weight: bold;
+ margin: 0;
+ padding: .3rem 0.9375rem;
+ text-transform: uppercase; }
+ ul.off-canvas-list li a {
+ border-bottom: 1px solid #003d65;
+ color: #FFFFFF;
+ display: block;
+ padding: 0.4rem;
+ transition: background 300ms ease; }
+ ul.off-canvas-list li a:hover {
+ background: #00395f; }
+ ul.off-canvas-list li a:active {
+ background: #00395f; }
+
+.move-right > .inner-wrap {
+ -webkit-transform: translate3d(15.625rem, 0, 0);
+ -moz-transform: translate3d(15.625rem, 0, 0);
+ -ms-transform: translate(15.625rem, 0);
+ -ms-transform: translate3d(15.625rem, 0, 0);
+ -o-transform: translate3d(15.625rem, 0, 0);
+ transform: translate3d(15.625rem, 0, 0); }
+.move-right .exit-off-canvas {
+ -webkit-backface-visibility: hidden;
+ box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
+ cursor: pointer;
+ transition: background 300ms ease;
+ -webkit-tap-highlight-color: transparent;
+ background: rgba(255, 255, 255, 0.2);
+ bottom: 0;
+ display: block;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 1002; }
+ @media only screen and (min-width:40.063em) {
+ .move-right .exit-off-canvas:hover {
+ background: rgba(255, 255, 255, 0.05); } }
+
+.move-left > .inner-wrap {
+ -webkit-transform: translate3d(-15.625rem, 0, 0);
+ -moz-transform: translate3d(-15.625rem, 0, 0);
+ -ms-transform: translate(-15.625rem, 0);
+ -ms-transform: translate3d(-15.625rem, 0, 0);
+ -o-transform: translate3d(-15.625rem, 0, 0);
+ transform: translate3d(-15.625rem, 0, 0); }
+.move-left .exit-off-canvas {
+ -webkit-backface-visibility: hidden;
+ box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
+ cursor: pointer;
+ transition: background 300ms ease;
+ -webkit-tap-highlight-color: transparent;
+ background: rgba(255, 255, 255, 0.2);
+ bottom: 0;
+ display: block;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 1002; }
+ @media only screen and (min-width:40.063em) {
+ .move-left .exit-off-canvas:hover {
+ background: rgba(255, 255, 255, 0.05); } }
+
+.offcanvas-overlap .left-off-canvas-menu, .offcanvas-overlap .right-off-canvas-menu {
+ -ms-transform: none;
+ -webkit-transform: none;
+ -moz-transform: none;
+ -o-transform: none;
+ transform: none;
+ z-index: 1003; }
+.offcanvas-overlap .exit-off-canvas {
+ -webkit-backface-visibility: hidden;
+ box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
+ cursor: pointer;
+ transition: background 300ms ease;
+ -webkit-tap-highlight-color: transparent;
+ background: rgba(255, 255, 255, 0.2);
+ bottom: 0;
+ display: block;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 1002; }
+ @media only screen and (min-width:40.063em) {
+ .offcanvas-overlap .exit-off-canvas:hover {
+ background: rgba(255, 255, 255, 0.05); } }
+
+.offcanvas-overlap-left .right-off-canvas-menu {
+ -ms-transform: none;
+ -webkit-transform: none;
+ -moz-transform: none;
+ -o-transform: none;
+ transform: none;
+ z-index: 1003; }
+.offcanvas-overlap-left .exit-off-canvas {
+ -webkit-backface-visibility: hidden;
+ box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
+ cursor: pointer;
+ transition: background 300ms ease;
+ -webkit-tap-highlight-color: transparent;
+ background: rgba(255, 255, 255, 0.2);
+ bottom: 0;
+ display: block;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 1002; }
+ @media only screen and (min-width:40.063em) {
+ .offcanvas-overlap-left .exit-off-canvas:hover {
+ background: rgba(255, 255, 255, 0.05); } }
+
+.offcanvas-overlap-right .left-off-canvas-menu {
+ -ms-transform: none;
+ -webkit-transform: none;
+ -moz-transform: none;
+ -o-transform: none;
+ transform: none;
+ z-index: 1003; }
+.offcanvas-overlap-right .exit-off-canvas {
+ -webkit-backface-visibility: hidden;
+ box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5);
+ cursor: pointer;
+ transition: background 300ms ease;
+ -webkit-tap-highlight-color: transparent;
+ background: rgba(255, 255, 255, 0.2);
+ bottom: 0;
+ display: block;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 1002; }
+ @media only screen and (min-width:40.063em) {
+ .offcanvas-overlap-right .exit-off-canvas:hover {
+ background: rgba(255, 255, 255, 0.05); } }
+
+.no-csstransforms .left-off-canvas-menu {
+ left: -15.625rem; }
+.no-csstransforms .right-off-canvas-menu {
+ right: -15.625rem; }
+.no-csstransforms .move-left > .inner-wrap {
+ right: 15.625rem; }
+.no-csstransforms .move-right > .inner-wrap {
+ left: 15.625rem; }
+
+.left-submenu {
+ -webkit-backface-visibility: hidden;
+ -webkit-overflow-scrolling: touch;
+ background: #005287;
+ bottom: 0;
+ box-sizing: content-box;
+ margin: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ position: absolute;
+ top: 0;
+ width: 15.625rem;
+ z-index: 1002;
+ -webkit-transform: translate3d(-100%, 0, 0);
+ -moz-transform: translate3d(-100%, 0, 0);
+ -ms-transform: translate(-100%, 0);
+ -ms-transform: translate3d(-100%, 0, 0);
+ -o-transform: translate3d(-100%, 0, 0);
+ transform: translate3d(-100%, 0, 0);
+ left: 0;
+ -webkit-transition: -webkit-transform 500ms ease;
+ -moz-transition: -moz-transform 500ms ease;
+ -ms-transition: -ms-transform 500ms ease;
+ -o-transition: -o-transform 500ms ease;
+ transition: transform 500ms ease; }
+ .left-submenu * {
+ -webkit-backface-visibility: hidden; }
+ .left-submenu .back > a {
+ background: #444;
+ border-bottom: none;
+ border-top: 1px solid #5e5e5e;
+ color: #999999;
+ font-weight: bold;
+ padding: .3rem 0.9375rem;
+ text-transform: uppercase;
+ margin: 0; }
+ .left-submenu .back > a:hover {
+ background: #303030;
+ border-bottom: none;
+ border-top: 1px solid #5e5e5e; }
+ .left-submenu .back > a:before {
+ content: "\AB";
+ margin-right: .5rem;
+ display: inline; }
+ .left-submenu.move-right, .left-submenu.offcanvas-overlap-right, .left-submenu.offcanvas-overlap {
+ -webkit-transform: translate3d(0%, 0, 0);
+ -moz-transform: translate3d(0%, 0, 0);
+ -ms-transform: translate(0%, 0);
+ -ms-transform: translate3d(0%, 0, 0);
+ -o-transform: translate3d(0%, 0, 0);
+ transform: translate3d(0%, 0, 0); }
+
+.right-submenu {
+ -webkit-backface-visibility: hidden;
+ -webkit-overflow-scrolling: touch;
+ background: #005287;
+ bottom: 0;
+ box-sizing: content-box;
+ margin: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ position: absolute;
+ top: 0;
+ width: 15.625rem;
+ z-index: 1002;
+ -webkit-transform: translate3d(100%, 0, 0);
+ -moz-transform: translate3d(100%, 0, 0);
+ -ms-transform: translate(100%, 0);
+ -ms-transform: translate3d(100%, 0, 0);
+ -o-transform: translate3d(100%, 0, 0);
+ transform: translate3d(100%, 0, 0);
+ right: 0;
+ -webkit-transition: -webkit-transform 500ms ease;
+ -moz-transition: -moz-transform 500ms ease;
+ -ms-transition: -ms-transform 500ms ease;
+ -o-transition: -o-transform 500ms ease;
+ transition: transform 500ms ease; }
+ .right-submenu * {
+ -webkit-backface-visibility: hidden; }
+ .right-submenu .back > a {
+ background: #444;
+ border-bottom: none;
+ border-top: 1px solid #5e5e5e;
+ color: #999999;
+ font-weight: bold;
+ padding: .3rem 0.9375rem;
+ text-transform: uppercase;
+ margin: 0; }
+ .right-submenu .back > a:hover {
+ background: #303030;
+ border-bottom: none;
+ border-top: 1px solid #5e5e5e; }
+ .right-submenu .back > a:after {
+ content: "\BB";
+ margin-left: .5rem;
+ display: inline; }
+ .right-submenu.move-left, .right-submenu.offcanvas-overlap-left, .right-submenu.offcanvas-overlap {
+ -webkit-transform: translate3d(0%, 0, 0);
+ -moz-transform: translate3d(0%, 0, 0);
+ -ms-transform: translate(0%, 0);
+ -ms-transform: translate3d(0%, 0, 0);
+ -o-transform: translate3d(0%, 0, 0);
+ transform: translate3d(0%, 0, 0); }
+
+.left-off-canvas-menu ul.off-canvas-list li.has-submenu > a:after {
+ content: "\BB";
+ margin-left: .5rem;
+ display: inline; }
+
+.right-off-canvas-menu ul.off-canvas-list li.has-submenu > a:before {
+ content: "\AB";
+ margin-right: .5rem;
+ display: inline; }
+
+/* small displays */
+@media only screen {
+ .show-for-small-only, .show-for-small-up, .show-for-small, .show-for-small-down, .hide-for-medium-only, .hide-for-medium-up, .hide-for-medium, .show-for-medium-down, .hide-for-large-only, .hide-for-large-up, .hide-for-large, .show-for-large-down, .hide-for-xlarge-only, .hide-for-xlarge-up, .hide-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .show-for-xxlarge-down {
+ display: inherit !important; }
+ .hide-for-small-only, .hide-for-small-up, .hide-for-small, .hide-for-small-down, .show-for-medium-only, .show-for-medium-up, .show-for-medium, .hide-for-medium-down, .show-for-large-only, .show-for-large-up, .show-for-large, .hide-for-large-down, .show-for-xlarge-only, .show-for-xlarge-up, .show-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .hide-for-xxlarge-down {
+ display: none !important; }
+ .visible-for-small-only, .visible-for-small-up, .visible-for-small, .visible-for-small-down, .hidden-for-medium-only, .hidden-for-medium-up, .hidden-for-medium, .visible-for-medium-down, .hidden-for-large-only, .hidden-for-large-up, .hidden-for-large, .visible-for-large-down, .hidden-for-xlarge-only, .hidden-for-xlarge-up, .hidden-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .visible-for-xxlarge-down {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto; }
+ .hidden-for-small-only, .hidden-for-small-up, .hidden-for-small, .hidden-for-small-down, .visible-for-medium-only, .visible-for-medium-up, .visible-for-medium, .hidden-for-medium-down, .visible-for-large-only, .visible-for-large-up, .visible-for-large, .hidden-for-large-down, .visible-for-xlarge-only, .visible-for-xlarge-up, .visible-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .hidden-for-xxlarge-down {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px; }
+ table.show-for-small-only, table.show-for-small-up, table.show-for-small, table.show-for-small-down, table.hide-for-medium-only, table.hide-for-medium-up, table.hide-for-medium, table.show-for-medium-down, table.hide-for-large-only, table.hide-for-large-up, table.hide-for-large, table.show-for-large-down, table.hide-for-xlarge-only, table.hide-for-xlarge-up, table.hide-for-xlarge, table.show-for-xlarge-down, table.hide-for-xxlarge-only, table.hide-for-xxlarge-up, table.hide-for-xxlarge, table.show-for-xxlarge-down {
+ display: table !important; }
+ thead.show-for-small-only, thead.show-for-small-up, thead.show-for-small, thead.show-for-small-down, thead.hide-for-medium-only, thead.hide-for-medium-up, thead.hide-for-medium, thead.show-for-medium-down, thead.hide-for-large-only, thead.hide-for-large-up, thead.hide-for-large, thead.show-for-large-down, thead.hide-for-xlarge-only, thead.hide-for-xlarge-up, thead.hide-for-xlarge, thead.show-for-xlarge-down, thead.hide-for-xxlarge-only, thead.hide-for-xxlarge-up, thead.hide-for-xxlarge, thead.show-for-xxlarge-down {
+ display: table-header-group !important; }
+ tbody.show-for-small-only, tbody.show-for-small-up, tbody.show-for-small, tbody.show-for-small-down, tbody.hide-for-medium-only, tbody.hide-for-medium-up, tbody.hide-for-medium, tbody.show-for-medium-down, tbody.hide-for-large-only, tbody.hide-for-large-up, tbody.hide-for-large, tbody.show-for-large-down, tbody.hide-for-xlarge-only, tbody.hide-for-xlarge-up, tbody.hide-for-xlarge, tbody.show-for-xlarge-down, tbody.hide-for-xxlarge-only, tbody.hide-for-xxlarge-up, tbody.hide-for-xxlarge, tbody.show-for-xxlarge-down {
+ display: table-row-group !important; }
+ tr.show-for-small-only, tr.show-for-small-up, tr.show-for-small, tr.show-for-small-down, tr.hide-for-medium-only, tr.hide-for-medium-up, tr.hide-for-medium, tr.show-for-medium-down, tr.hide-for-large-only, tr.hide-for-large-up, tr.hide-for-large, tr.show-for-large-down, tr.hide-for-xlarge-only, tr.hide-for-xlarge-up, tr.hide-for-xlarge, tr.show-for-xlarge-down, tr.hide-for-xxlarge-only, tr.hide-for-xxlarge-up, tr.hide-for-xxlarge, tr.show-for-xxlarge-down {
+ display: table-row; }
+ th.show-for-small-only, td.show-for-small-only, th.show-for-small-up, td.show-for-small-up, th.show-for-small, td.show-for-small, th.show-for-small-down, td.show-for-small-down, th.hide-for-medium-only, td.hide-for-medium-only, th.hide-for-medium-up, td.hide-for-medium-up, th.hide-for-medium, td.hide-for-medium, th.show-for-medium-down, td.show-for-medium-down, th.hide-for-large-only, td.hide-for-large-only, th.hide-for-large-up, td.hide-for-large-up, th.hide-for-large, td.hide-for-large, th.show-for-large-down, td.show-for-large-down, th.hide-for-xlarge-only, td.hide-for-xlarge-only, th.hide-for-xlarge-up, td.hide-for-xlarge-up, th.hide-for-xlarge, td.hide-for-xlarge, th.show-for-xlarge-down, td.show-for-xlarge-down, th.hide-for-xxlarge-only, td.hide-for-xxlarge-only, th.hide-for-xxlarge-up, td.hide-for-xxlarge-up, th.hide-for-xxlarge, td.hide-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down {
+ display: table-cell !important; } }
+
+/* medium displays */
+@media only screen and (min-width:40.063em) {
+ .hide-for-small-only, .show-for-small-up, .hide-for-small, .hide-for-small-down, .show-for-medium-only, .show-for-medium-up, .show-for-medium, .show-for-medium-down, .hide-for-large-only, .hide-for-large-up, .hide-for-large, .show-for-large-down, .hide-for-xlarge-only, .hide-for-xlarge-up, .hide-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .show-for-xxlarge-down {
+ display: inherit !important; }
+ .show-for-small-only, .hide-for-small-up, .show-for-small, .show-for-small-down, .hide-for-medium-only, .hide-for-medium-up, .hide-for-medium, .hide-for-medium-down, .show-for-large-only, .show-for-large-up, .show-for-large, .hide-for-large-down, .show-for-xlarge-only, .show-for-xlarge-up, .show-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .hide-for-xxlarge-down {
+ display: none !important; }
+ .hidden-for-small-only, .visible-for-small-up, .hidden-for-small, .hidden-for-small-down, .visible-for-medium-only, .visible-for-medium-up, .visible-for-medium, .visible-for-medium-down, .hidden-for-large-only, .hidden-for-large-up, .hidden-for-large, .visible-for-large-down, .hidden-for-xlarge-only, .hidden-for-xlarge-up, .hidden-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .visible-for-xxlarge-down {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto; }
+ .visible-for-small-only, .hidden-for-small-up, .visible-for-small, .visible-for-small-down, .hidden-for-medium-only, .hidden-for-medium-up, .hidden-for-medium, .hidden-for-medium-down, .visible-for-large-only, .visible-for-large-up, .visible-for-large, .hidden-for-large-down, .visible-for-xlarge-only, .visible-for-xlarge-up, .visible-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .hidden-for-xxlarge-down {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px; }
+ table.hide-for-small-only, table.show-for-small-up, table.hide-for-small, table.hide-for-small-down, table.show-for-medium-only, table.show-for-medium-up, table.show-for-medium, table.show-for-medium-down, table.hide-for-large-only, table.hide-for-large-up, table.hide-for-large, table.show-for-large-down, table.hide-for-xlarge-only, table.hide-for-xlarge-up, table.hide-for-xlarge, table.show-for-xlarge-down, table.hide-for-xxlarge-only, table.hide-for-xxlarge-up, table.hide-for-xxlarge, table.show-for-xxlarge-down {
+ display: table !important; }
+ thead.hide-for-small-only, thead.show-for-small-up, thead.hide-for-small, thead.hide-for-small-down, thead.show-for-medium-only, thead.show-for-medium-up, thead.show-for-medium, thead.show-for-medium-down, thead.hide-for-large-only, thead.hide-for-large-up, thead.hide-for-large, thead.show-for-large-down, thead.hide-for-xlarge-only, thead.hide-for-xlarge-up, thead.hide-for-xlarge, thead.show-for-xlarge-down, thead.hide-for-xxlarge-only, thead.hide-for-xxlarge-up, thead.hide-for-xxlarge, thead.show-for-xxlarge-down {
+ display: table-header-group !important; }
+ tbody.hide-for-small-only, tbody.show-for-small-up, tbody.hide-for-small, tbody.hide-for-small-down, tbody.show-for-medium-only, tbody.show-for-medium-up, tbody.show-for-medium, tbody.show-for-medium-down, tbody.hide-for-large-only, tbody.hide-for-large-up, tbody.hide-for-large, tbody.show-for-large-down, tbody.hide-for-xlarge-only, tbody.hide-for-xlarge-up, tbody.hide-for-xlarge, tbody.show-for-xlarge-down, tbody.hide-for-xxlarge-only, tbody.hide-for-xxlarge-up, tbody.hide-for-xxlarge, tbody.show-for-xxlarge-down {
+ display: table-row-group !important; }
+ tr.hide-for-small-only, tr.show-for-small-up, tr.hide-for-small, tr.hide-for-small-down, tr.show-for-medium-only, tr.show-for-medium-up, tr.show-for-medium, tr.show-for-medium-down, tr.hide-for-large-only, tr.hide-for-large-up, tr.hide-for-large, tr.show-for-large-down, tr.hide-for-xlarge-only, tr.hide-for-xlarge-up, tr.hide-for-xlarge, tr.show-for-xlarge-down, tr.hide-for-xxlarge-only, tr.hide-for-xxlarge-up, tr.hide-for-xxlarge, tr.show-for-xxlarge-down {
+ display: table-row; }
+ th.hide-for-small-only, td.hide-for-small-only, th.show-for-small-up, td.show-for-small-up, th.hide-for-small, td.hide-for-small, th.hide-for-small-down, td.hide-for-small-down, th.show-for-medium-only, td.show-for-medium-only, th.show-for-medium-up, td.show-for-medium-up, th.show-for-medium, td.show-for-medium, th.show-for-medium-down, td.show-for-medium-down, th.hide-for-large-only, td.hide-for-large-only, th.hide-for-large-up, td.hide-for-large-up, th.hide-for-large, td.hide-for-large, th.show-for-large-down, td.show-for-large-down, th.hide-for-xlarge-only, td.hide-for-xlarge-only, th.hide-for-xlarge-up, td.hide-for-xlarge-up, th.hide-for-xlarge, td.hide-for-xlarge, th.show-for-xlarge-down, td.show-for-xlarge-down, th.hide-for-xxlarge-only, td.hide-for-xxlarge-only, th.hide-for-xxlarge-up, td.hide-for-xxlarge-up, th.hide-for-xxlarge, td.hide-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down {
+ display: table-cell !important; } }
+
+/* large displays */
+@media only screen and (min-width:64.063em) {
+ .hide-for-small-only, .show-for-small-up, .hide-for-small, .hide-for-small-down, .hide-for-medium-only, .show-for-medium-up, .hide-for-medium, .hide-for-medium-down, .show-for-large-only, .show-for-large-up, .show-for-large, .show-for-large-down, .hide-for-xlarge-only, .hide-for-xlarge-up, .hide-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .show-for-xxlarge-down {
+ display: inherit !important; }
+ .show-for-small-only, .hide-for-small-up, .show-for-small, .show-for-small-down, .show-for-medium-only, .hide-for-medium-up, .show-for-medium, .show-for-medium-down, .hide-for-large-only, .hide-for-large-up, .hide-for-large, .hide-for-large-down, .show-for-xlarge-only, .show-for-xlarge-up, .show-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .hide-for-xxlarge-down {
+ display: none !important; }
+ .hidden-for-small-only, .visible-for-small-up, .hidden-for-small, .hidden-for-small-down, .hidden-for-medium-only, .visible-for-medium-up, .hidden-for-medium, .hidden-for-medium-down, .visible-for-large-only, .visible-for-large-up, .visible-for-large, .visible-for-large-down, .hidden-for-xlarge-only, .hidden-for-xlarge-up, .hidden-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .visible-for-xxlarge-down {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto; }
+ .visible-for-small-only, .hidden-for-small-up, .visible-for-small, .visible-for-small-down, .visible-for-medium-only, .hidden-for-medium-up, .visible-for-medium, .visible-for-medium-down, .hidden-for-large-only, .hidden-for-large-up, .hidden-for-large, .hidden-for-large-down, .visible-for-xlarge-only, .visible-for-xlarge-up, .visible-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .hidden-for-xxlarge-down {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px; }
+ table.hide-for-small-only, table.show-for-small-up, table.hide-for-small, table.hide-for-small-down, table.hide-for-medium-only, table.show-for-medium-up, table.hide-for-medium, table.hide-for-medium-down, table.show-for-large-only, table.show-for-large-up, table.show-for-large, table.show-for-large-down, table.hide-for-xlarge-only, table.hide-for-xlarge-up, table.hide-for-xlarge, table.show-for-xlarge-down, table.hide-for-xxlarge-only, table.hide-for-xxlarge-up, table.hide-for-xxlarge, table.show-for-xxlarge-down {
+ display: table !important; }
+ thead.hide-for-small-only, thead.show-for-small-up, thead.hide-for-small, thead.hide-for-small-down, thead.hide-for-medium-only, thead.show-for-medium-up, thead.hide-for-medium, thead.hide-for-medium-down, thead.show-for-large-only, thead.show-for-large-up, thead.show-for-large, thead.show-for-large-down, thead.hide-for-xlarge-only, thead.hide-for-xlarge-up, thead.hide-for-xlarge, thead.show-for-xlarge-down, thead.hide-for-xxlarge-only, thead.hide-for-xxlarge-up, thead.hide-for-xxlarge, thead.show-for-xxlarge-down {
+ display: table-header-group !important; }
+ tbody.hide-for-small-only, tbody.show-for-small-up, tbody.hide-for-small, tbody.hide-for-small-down, tbody.hide-for-medium-only, tbody.show-for-medium-up, tbody.hide-for-medium, tbody.hide-for-medium-down, tbody.show-for-large-only, tbody.show-for-large-up, tbody.show-for-large, tbody.show-for-large-down, tbody.hide-for-xlarge-only, tbody.hide-for-xlarge-up, tbody.hide-for-xlarge, tbody.show-for-xlarge-down, tbody.hide-for-xxlarge-only, tbody.hide-for-xxlarge-up, tbody.hide-for-xxlarge, tbody.show-for-xxlarge-down {
+ display: table-row-group !important; }
+ tr.hide-for-small-only, tr.show-for-small-up, tr.hide-for-small, tr.hide-for-small-down, tr.hide-for-medium-only, tr.show-for-medium-up, tr.hide-for-medium, tr.hide-for-medium-down, tr.show-for-large-only, tr.show-for-large-up, tr.show-for-large, tr.show-for-large-down, tr.hide-for-xlarge-only, tr.hide-for-xlarge-up, tr.hide-for-xlarge, tr.show-for-xlarge-down, tr.hide-for-xxlarge-only, tr.hide-for-xxlarge-up, tr.hide-for-xxlarge, tr.show-for-xxlarge-down {
+ display: table-row; }
+ th.hide-for-small-only, td.hide-for-small-only, th.show-for-small-up, td.show-for-small-up, th.hide-for-small, td.hide-for-small, th.hide-for-small-down, td.hide-for-small-down, th.hide-for-medium-only, td.hide-for-medium-only, th.show-for-medium-up, td.show-for-medium-up, th.hide-for-medium, td.hide-for-medium, th.hide-for-medium-down, td.hide-for-medium-down, th.show-for-large-only, td.show-for-large-only, th.show-for-large-up, td.show-for-large-up, th.show-for-large, td.show-for-large, th.show-for-large-down, td.show-for-large-down, th.hide-for-xlarge-only, td.hide-for-xlarge-only, th.hide-for-xlarge-up, td.hide-for-xlarge-up, th.hide-for-xlarge, td.hide-for-xlarge, th.show-for-xlarge-down, td.show-for-xlarge-down, th.hide-for-xxlarge-only, td.hide-for-xxlarge-only, th.hide-for-xxlarge-up, td.hide-for-xxlarge-up, th.hide-for-xxlarge, td.hide-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down {
+ display: table-cell !important; } }
+
+/* xlarge displays */
+@media only screen and (min-width:90.063em) {
+ .hide-for-small-only, .show-for-small-up, .hide-for-small, .hide-for-small-down, .hide-for-medium-only, .show-for-medium-up, .hide-for-medium, .hide-for-medium-down, .hide-for-large-only, .show-for-large-up, .hide-for-large, .hide-for-large-down, .show-for-xlarge-only, .show-for-xlarge-up, .show-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .show-for-xxlarge-down {
+ display: inherit !important; }
+ .show-for-small-only, .hide-for-small-up, .show-for-small, .show-for-small-down, .show-for-medium-only, .hide-for-medium-up, .show-for-medium, .show-for-medium-down, .show-for-large-only, .hide-for-large-up, .show-for-large, .show-for-large-down, .hide-for-xlarge-only, .hide-for-xlarge-up, .hide-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .hide-for-xxlarge-down {
+ display: none !important; }
+ .hidden-for-small-only, .visible-for-small-up, .hidden-for-small, .hidden-for-small-down, .hidden-for-medium-only, .visible-for-medium-up, .hidden-for-medium, .hidden-for-medium-down, .hidden-for-large-only, .visible-for-large-up, .hidden-for-large, .hidden-for-large-down, .visible-for-xlarge-only, .visible-for-xlarge-up, .visible-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .visible-for-xxlarge-down {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto; }
+ .visible-for-small-only, .hidden-for-small-up, .visible-for-small, .visible-for-small-down, .visible-for-medium-only, .hidden-for-medium-up, .visible-for-medium, .visible-for-medium-down, .visible-for-large-only, .hidden-for-large-up, .visible-for-large, .visible-for-large-down, .hidden-for-xlarge-only, .hidden-for-xlarge-up, .hidden-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .hidden-for-xxlarge-down {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px; }
+ table.hide-for-small-only, table.show-for-small-up, table.hide-for-small, table.hide-for-small-down, table.hide-for-medium-only, table.show-for-medium-up, table.hide-for-medium, table.hide-for-medium-down, table.hide-for-large-only, table.show-for-large-up, table.hide-for-large, table.hide-for-large-down, table.show-for-xlarge-only, table.show-for-xlarge-up, table.show-for-xlarge, table.show-for-xlarge-down, table.hide-for-xxlarge-only, table.hide-for-xxlarge-up, table.hide-for-xxlarge, table.show-for-xxlarge-down {
+ display: table !important; }
+ thead.hide-for-small-only, thead.show-for-small-up, thead.hide-for-small, thead.hide-for-small-down, thead.hide-for-medium-only, thead.show-for-medium-up, thead.hide-for-medium, thead.hide-for-medium-down, thead.hide-for-large-only, thead.show-for-large-up, thead.hide-for-large, thead.hide-for-large-down, thead.show-for-xlarge-only, thead.show-for-xlarge-up, thead.show-for-xlarge, thead.show-for-xlarge-down, thead.hide-for-xxlarge-only, thead.hide-for-xxlarge-up, thead.hide-for-xxlarge, thead.show-for-xxlarge-down {
+ display: table-header-group !important; }
+ tbody.hide-for-small-only, tbody.show-for-small-up, tbody.hide-for-small, tbody.hide-for-small-down, tbody.hide-for-medium-only, tbody.show-for-medium-up, tbody.hide-for-medium, tbody.hide-for-medium-down, tbody.hide-for-large-only, tbody.show-for-large-up, tbody.hide-for-large, tbody.hide-for-large-down, tbody.show-for-xlarge-only, tbody.show-for-xlarge-up, tbody.show-for-xlarge, tbody.show-for-xlarge-down, tbody.hide-for-xxlarge-only, tbody.hide-for-xxlarge-up, tbody.hide-for-xxlarge, tbody.show-for-xxlarge-down {
+ display: table-row-group !important; }
+ tr.hide-for-small-only, tr.show-for-small-up, tr.hide-for-small, tr.hide-for-small-down, tr.hide-for-medium-only, tr.show-for-medium-up, tr.hide-for-medium, tr.hide-for-medium-down, tr.hide-for-large-only, tr.show-for-large-up, tr.hide-for-large, tr.hide-for-large-down, tr.show-for-xlarge-only, tr.show-for-xlarge-up, tr.show-for-xlarge, tr.show-for-xlarge-down, tr.hide-for-xxlarge-only, tr.hide-for-xxlarge-up, tr.hide-for-xxlarge, tr.show-for-xxlarge-down {
+ display: table-row; }
+ th.hide-for-small-only, td.hide-for-small-only, th.show-for-small-up, td.show-for-small-up, th.hide-for-small, td.hide-for-small, th.hide-for-small-down, td.hide-for-small-down, th.hide-for-medium-only, td.hide-for-medium-only, th.show-for-medium-up, td.show-for-medium-up, th.hide-for-medium, td.hide-for-medium, th.hide-for-medium-down, td.hide-for-medium-down, th.hide-for-large-only, td.hide-for-large-only, th.show-for-large-up, td.show-for-large-up, th.hide-for-large, td.hide-for-large, th.hide-for-large-down, td.hide-for-large-down, th.show-for-xlarge-only, td.show-for-xlarge-only, th.show-for-xlarge-up, td.show-for-xlarge-up, th.show-for-xlarge, td.show-for-xlarge, th.show-for-xlarge-down, td.show-for-xlarge-down, th.hide-for-xxlarge-only, td.hide-for-xxlarge-only, th.hide-for-xxlarge-up, td.hide-for-xxlarge-up, th.hide-for-xxlarge, td.hide-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down {
+ display: table-cell !important; } }
+
+/* xxlarge displays */
+@media only screen and (min-width:120.063em) {
+ .hide-for-small-only, .show-for-small-up, .hide-for-small, .hide-for-small-down, .hide-for-medium-only, .show-for-medium-up, .hide-for-medium, .hide-for-medium-down, .hide-for-large-only, .show-for-large-up, .hide-for-large, .hide-for-large-down, .hide-for-xlarge-only, .show-for-xlarge-up, .hide-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .show-for-xxlarge-down {
+ display: inherit !important; }
+ .show-for-small-only, .hide-for-small-up, .show-for-small, .show-for-small-down, .show-for-medium-only, .hide-for-medium-up, .show-for-medium, .show-for-medium-down, .show-for-large-only, .hide-for-large-up, .show-for-large, .show-for-large-down, .show-for-xlarge-only, .hide-for-xlarge-up, .show-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .hide-for-xxlarge-down {
+ display: none !important; }
+ .hidden-for-small-only, .visible-for-small-up, .hidden-for-small, .hidden-for-small-down, .hidden-for-medium-only, .visible-for-medium-up, .hidden-for-medium, .hidden-for-medium-down, .hidden-for-large-only, .visible-for-large-up, .hidden-for-large, .hidden-for-large-down, .hidden-for-xlarge-only, .visible-for-xlarge-up, .hidden-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .visible-for-xxlarge-down {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto; }
+ .visible-for-small-only, .hidden-for-small-up, .visible-for-small, .visible-for-small-down, .visible-for-medium-only, .hidden-for-medium-up, .visible-for-medium, .visible-for-medium-down, .visible-for-large-only, .hidden-for-large-up, .visible-for-large, .visible-for-large-down, .visible-for-xlarge-only, .hidden-for-xlarge-up, .visible-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .hidden-for-xxlarge-down {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px; }
+ table.hide-for-small-only, table.show-for-small-up, table.hide-for-small, table.hide-for-small-down, table.hide-for-medium-only, table.show-for-medium-up, table.hide-for-medium, table.hide-for-medium-down, table.hide-for-large-only, table.show-for-large-up, table.hide-for-large, table.hide-for-large-down, table.hide-for-xlarge-only, table.show-for-xlarge-up, table.hide-for-xlarge, table.hide-for-xlarge-down, table.show-for-xxlarge-only, table.show-for-xxlarge-up, table.show-for-xxlarge, table.show-for-xxlarge-down {
+ display: table !important; }
+ thead.hide-for-small-only, thead.show-for-small-up, thead.hide-for-small, thead.hide-for-small-down, thead.hide-for-medium-only, thead.show-for-medium-up, thead.hide-for-medium, thead.hide-for-medium-down, thead.hide-for-large-only, thead.show-for-large-up, thead.hide-for-large, thead.hide-for-large-down, thead.hide-for-xlarge-only, thead.show-for-xlarge-up, thead.hide-for-xlarge, thead.hide-for-xlarge-down, thead.show-for-xxlarge-only, thead.show-for-xxlarge-up, thead.show-for-xxlarge, thead.show-for-xxlarge-down {
+ display: table-header-group !important; }
+ tbody.hide-for-small-only, tbody.show-for-small-up, tbody.hide-for-small, tbody.hide-for-small-down, tbody.hide-for-medium-only, tbody.show-for-medium-up, tbody.hide-for-medium, tbody.hide-for-medium-down, tbody.hide-for-large-only, tbody.show-for-large-up, tbody.hide-for-large, tbody.hide-for-large-down, tbody.hide-for-xlarge-only, tbody.show-for-xlarge-up, tbody.hide-for-xlarge, tbody.hide-for-xlarge-down, tbody.show-for-xxlarge-only, tbody.show-for-xxlarge-up, tbody.show-for-xxlarge, tbody.show-for-xxlarge-down {
+ display: table-row-group !important; }
+ tr.hide-for-small-only, tr.show-for-small-up, tr.hide-for-small, tr.hide-for-small-down, tr.hide-for-medium-only, tr.show-for-medium-up, tr.hide-for-medium, tr.hide-for-medium-down, tr.hide-for-large-only, tr.show-for-large-up, tr.hide-for-large, tr.hide-for-large-down, tr.hide-for-xlarge-only, tr.show-for-xlarge-up, tr.hide-for-xlarge, tr.hide-for-xlarge-down, tr.show-for-xxlarge-only, tr.show-for-xxlarge-up, tr.show-for-xxlarge, tr.show-for-xxlarge-down {
+ display: table-row; }
+ th.hide-for-small-only, td.hide-for-small-only, th.show-for-small-up, td.show-for-small-up, th.hide-for-small, td.hide-for-small, th.hide-for-small-down, td.hide-for-small-down, th.hide-for-medium-only, td.hide-for-medium-only, th.show-for-medium-up, td.show-for-medium-up, th.hide-for-medium, td.hide-for-medium, th.hide-for-medium-down, td.hide-for-medium-down, th.hide-for-large-only, td.hide-for-large-only, th.show-for-large-up, td.show-for-large-up, th.hide-for-large, td.hide-for-large, th.hide-for-large-down, td.hide-for-large-down, th.hide-for-xlarge-only, td.hide-for-xlarge-only, th.show-for-xlarge-up, td.show-for-xlarge-up, th.hide-for-xlarge, td.hide-for-xlarge, th.hide-for-xlarge-down, td.hide-for-xlarge-down, th.show-for-xxlarge-only, td.show-for-xxlarge-only, th.show-for-xxlarge-up, td.show-for-xxlarge-up, th.show-for-xxlarge, td.show-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down {
+ display: table-cell !important; } }
+
+/* Orientation targeting */
+.show-for-landscape, .hide-for-portrait {
+ display: inherit !important; }
+
+.hide-for-landscape, .show-for-portrait {
+ display: none !important; }
+
+/* Specific visibility for tables */
+table.hide-for-landscape, table.show-for-portrait {
+ display: table !important; }
+
+thead.hide-for-landscape, thead.show-for-portrait {
+ display: table-header-group !important; }
+
+tbody.hide-for-landscape, tbody.show-for-portrait {
+ display: table-row-group !important; }
+
+tr.hide-for-landscape, tr.show-for-portrait {
+ display: table-row !important; }
+
+td.hide-for-landscape, td.show-for-portrait, th.hide-for-landscape, th.show-for-portrait {
+ display: table-cell !important; }
+
+@media only screen and (orientation: landscape) {
+ .show-for-landscape, .hide-for-portrait {
+ display: inherit !important; }
+ .hide-for-landscape, .show-for-portrait {
+ display: none !important; }
+ /* Specific visibility for tables */
+ table.show-for-landscape, table.hide-for-portrait {
+ display: table !important; }
+ thead.show-for-landscape, thead.hide-for-portrait {
+ display: table-header-group !important; }
+ tbody.show-for-landscape, tbody.hide-for-portrait {
+ display: table-row-group !important; }
+ tr.show-for-landscape, tr.hide-for-portrait {
+ display: table-row !important; }
+ td.show-for-landscape, td.hide-for-portrait, th.show-for-landscape, th.hide-for-portrait {
+ display: table-cell !important; } }
+
+@media only screen and (orientation: portrait) {
+ .show-for-portrait, .hide-for-landscape {
+ display: inherit !important; }
+ .hide-for-portrait, .show-for-landscape {
+ display: none !important; }
+ /* Specific visibility for tables */
+ table.show-for-portrait, table.hide-for-landscape {
+ display: table !important; }
+ thead.show-for-portrait, thead.hide-for-landscape {
+ display: table-header-group !important; }
+ tbody.show-for-portrait, tbody.hide-for-landscape {
+ display: table-row-group !important; }
+ tr.show-for-portrait, tr.hide-for-landscape {
+ display: table-row !important; }
+ td.show-for-portrait, td.hide-for-landscape, th.show-for-portrait, th.hide-for-landscape {
+ display: table-cell !important; } }
+
+/* Touch-enabled device targeting */
+.show-for-touch {
+ display: none !important; }
+
+.hide-for-touch {
+ display: inherit !important; }
+
+.touch .show-for-touch {
+ display: inherit !important; }
+
+.touch .hide-for-touch {
+ display: none !important; }
+
+/* Specific visibility for tables */
+table.hide-for-touch {
+ display: table !important; }
+
+.touch table.show-for-touch {
+ display: table !important; }
+
+thead.hide-for-touch {
+ display: table-header-group !important; }
+
+.touch thead.show-for-touch {
+ display: table-header-group !important; }
+
+tbody.hide-for-touch {
+ display: table-row-group !important; }
+
+.touch tbody.show-for-touch {
+ display: table-row-group !important; }
+
+tr.hide-for-touch {
+ display: table-row !important; }
+
+.touch tr.show-for-touch {
+ display: table-row !important; }
+
+td.hide-for-touch {
+ display: table-cell !important; }
+
+.touch td.show-for-touch {
+ display: table-cell !important; }
+
+th.hide-for-touch {
+ display: table-cell !important; }
+
+.touch th.show-for-touch {
+ display: table-cell !important; }
+
+/* Screen reader-specific classes */
+.show-for-sr {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px; }
+
+.show-on-focus {
+ clip: rect(1px, 1px, 1px, 1px);
+ height: 1px;
+ overflow: hidden;
+ position: absolute !important;
+ width: 1px; }
+ .show-on-focus:focus, .show-on-focus:active {
+ position: static !important;
+ height: auto;
+ width: auto;
+ overflow: visible;
+ clip: auto; }
+
+/*
+ * Print styles.
+ *
+ * Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
+ * Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com)
+ */
+.print-only {
+ display: none !important; }
+
+@media print {
+ * {
+ background: transparent !important;
+ box-shadow: none !important;
+ color: #000000 !important;
+ /* Black prints faster: h5bp.com/s */
+ text-shadow: none !important; }
+ .show-for-print {
+ display: block; }
+ .hide-for-print {
+ display: none; }
+ table.show-for-print {
+ display: table !important; }
+ thead.show-for-print {
+ display: table-header-group !important; }
+ tbody.show-for-print {
+ display: table-row-group !important; }
+ tr.show-for-print {
+ display: table-row !important; }
+ td.show-for-print {
+ display: table-cell !important; }
+ th.show-for-print {
+ display: table-cell !important; }
+ a, a:visited {
+ text-decoration: underline; }
+ a[href]:after {
+ content: " (" attr(href) ")"; }
+ abbr[title]:after {
+ content: " (" attr(title) ")"; }
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after {
+ content: ""; }
+ pre, blockquote {
+ border: 1px solid #999999;
+ page-break-inside: avoid; }
+ thead {
+ display: table-header-group;
+ /* h5bp.com/t */ }
+ tr, img {
+ page-break-inside: avoid; }
+ img {
+ max-width: 100% !important; }
+ @page {
+ margin: .5cm; }
+
+ p, h2, h3 {
+ orphans: 3;
+ widows: 3; }
+ h2, h3 {
+ page-break-after: avoid; }
+ .hide-on-print {
+ display: none !important; }
+ .print-only {
+ display: block !important; }
+ .hide-for-print {
+ display: none !important; }
+ .show-for-print {
+ display: inherit !important; } }
+
+/* Print visibility */
+@media print {
+ .show-for-print {
+ display: block; }
+ .hide-for-print {
+ display: none; }
+ table.show-for-print {
+ display: table !important; }
+ thead.show-for-print {
+ display: table-header-group !important; }
+ tbody.show-for-print {
+ display: table-row-group !important; }
+ tr.show-for-print {
+ display: table-row !important; }
+ td.show-for-print {
+ display: table-cell !important; }
+ th.show-for-print {
+ display: table-cell !important; } }
+
+@media not print {
+ .show-for-print {
+ display: none !important; } }
+
+/*
+ Created on : Mar 5, 2015, 2:57:35 PM
+ Author : laury
+*/
+img.aligncenter {
+ display: block;
+ clear: both;
+ float: none;
+ padding: 0;
+ margin-left: auto;
+ margin-right: auto; }
+
+img.alignright {
+ padding: 0;
+ margin: 0 0 6px 11px;
+ display: inline; }
+
+blockquote.alignleft, img.alignleft, .wp-caption.alignleft {
+ margin: 0.4375rem 2.1875rem 0.4375rem 0; }
+
+blockquote.alignright, img.alignright, .wp-caption.alignright {
+ margin: 0.4375rem 0 0.4375rem 2.1875rem; }
+
+img.alignleft {
+ padding: 0;
+ display: inline; }
+
+img.alignleft, img.alignright, img.aligncenter, img.alignnone, div.wp-caption img {
+ border: 1px solid #555555; }
+
+.alignright {
+ float: right; }
+
+.alignnone {
+ float: none; }
+
+.alignleft {
+ float: left; }
+
+.wp-caption {
+ background: #555555;
+ width: auto; }
+
+.wp-caption-text {
+ font-family: Open Sans, sans-serif;
+ font-size: 9px;
+ color: #FFFFFF;
+ font-style: italic;
+ margin: 0;
+ padding: 0 5px; }
+
+.gallery-one-title {
+ height: 45px;
+ font-size: 0.8em;
+ text-align: center;
+ font-family: sans-serif;
+ padding: 5px; }
+
+.gallery-holder {
+ margin: 10px 0 20px 0; }
+
+@media 0em, 40em {
+ img.alignright, img.alignleft, img.aligncenter {
+ width: 70% !important;
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center; }
+ div.wp-caption.alignright, div.wp-caption.alignleft {
+ width: 44% !important;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center; }
+ div.wp-caption.aligncenter {
+ width: 85% !important;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center; }
+ div.wp-caption.alignnone {
+ width: 85% !important;
+ float: none; }
+ div.wp-caption.alignright, div.wp-caption.alignleft, div.wp-caption.aligncenter {
+ width: 100%; } }
+
+@media 40.063em, 64em {
+ img.aligncenter, img.alignnone {
+ width: 70% !important;
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center; }
+ div.wp-caption.aligncenter {
+ width: 74% !important;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center; }
+ div.wp-caption.aligncenter {
+ width: 100%; }
+ div.wp-caption.alignnone {
+ width: 73% !important;
+ float: none; } }
+
+.wp-caption {
+ max-width: 100%;
+ margin: 10px 20px;
+ padding: 5px;
+ background-color: #f3f3f3;
+ border: 1px solid #ddd;
+ text-align: center; }
+ .wp-caption img {
+ width: 100%; }
+ .wp-caption p.wp-caption-text {
+ padding: 5px;
+ width: 100%;
+ margin: 0;
+ color: black;
+ font-size: 12px; }
+ .wp-caption.aligncenter {
+ margin: 10px auto; }
+
+@media only screen and (max-width: 40em) {
+ #blog-posts-over {
+ padding: 0 !important;
+ margin: 0 !important; } }
+
+.blog-posts-container {
+ margin: 30px 0 30px; }
+ .blog-posts-container embed, .blog-posts-container iframe, .blog-posts-container object, .blog-posts-container video {
+ max-width: 100%; }
+ .blog-posts-container a {
+ text-decoration: none; }
+ .blog-posts-container header.entry-header h2.entry-title a {
+ color: #222;
+ margin-left: 0; }
+ .blog-posts-container .wp-caption .wp-caption-text, .blog-posts-container .gallery-caption, .blog-posts-container .entry-caption {
+ overflow: hidden;
+ color: #757575;
+ font-size: 0.857143rem;
+ font-style: italic;
+ line-height: 2; }
+ .blog-posts-container .date {
+ font-size: 12px; }
+ .blog-posts-container footer.entry-meta {
+ color: #757575;
+ font-size: 0.928571rem;
+ line-height: 1.84615;
+ margin-top: 1.71429rem;
+ clear: both;
+ float: none;
+ margin-right: auto; }
+ .blog-posts-container footer {
+ background: none;
+ clear: both;
+ padding: 15px 0 0;
+ position: relative;
+ text-align: center; }
+
+#content-wrapper h1, #content-wrapper h2, #content-wrapper h3, #content-wrapper h4, #content-wrapper h5, #content-wrapper h6 {
+ clear: both; }
+
+.content {
+ background: #fff;
+ /* -webkit-box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.75);
+ -moz-box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.75);
+ box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.75);*/
+ box-shadow: 3px 3px 8px -1px darkgrey; }
+
+#searchform_container {
+ margin-top: 20px; }
+
+#searchform {
+ max-width: 100%;
+ text-align: center; }
+ #searchform div input.blogbutton {
+ background: -webkit-linear-gradient(left, #1999ce 5%, #107098 100%);
+ background: -moz-linear-gradient(center top, #1999ce 5%, #107098 100%);
+ background: -ms-linear-gradient(left, #1999ce 5%, #107098 100%); }
+
+#blog-side-info {
+ border-left: 1px solid grey;
+ margin-top: 30px;
+ padding-left: 20px; }
+ @media only screen and (max-width: 40em) {
+ #blog-side-info {
+ text-align: center; } }
+
+h1, h2, h3, h4, h5, h6 {
+ clear: both; }
+
+/* PLUGINS */
+/* Nextgen */
+.gallery li a img {
+ display: block;
+ width: 100%; }
+
+.ngg-gallery-thumbnail, .ngg-gallery-thumbnail-box {
+ float: none !important; }
+
+.ngg-album-compact h4 .ngg-album-desc {
+ height: auto !important;
+ font-family: Georgia, Cambria, "Times New Roman", Times, serif;
+ font-weight: 400; }
+
+.ngg-album-compact .album-meta-wrapper h4 a {
+ font-style: normal; }
+
+.album-meta-wrapper {
+ display: block;
+ height: 54px;
+ margin-bottom: 20px; }
+
+.ngg-glmalbums {
+ margin: 10px 0;
+ min-height: 260px; }
+ @media only screen and (max-width: 40em) {
+ .ngg-glmalbums {
+ min-height: 180px; } }
+
+.ngg-album-link {
+ text-align: center; }
+
+/* Ninja Forms */
+.ninja-forms-form-wrap {
+ max-width: 600px;
+ margin: 0 auto; }
+ .ninja-forms-form-wrap input[type=submit] {
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ border-radius: 0;
+ border-style: solid;
+ border-width: 0;
+ cursor: pointer;
+ font-family: "Times New Roman";
+ font-weight: normal;
+ line-height: normal;
+ margin: 0 0 1.25rem;
+ position: relative;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ padding: 1rem 2rem 1.0625rem 2rem;
+ font-size: 1rem;
+ background-color: #008CBA;
+ border-color: #007095;
+ color: #FFFFFF;
+ transition: background-color 300ms ease-out;
+ display: block;
+ margin: 0 auto; }
+ .ninja-forms-form-wrap input[type=submit]:hover, .ninja-forms-form-wrap input[type=submit]:focus {
+ background-color: #007095; }
+ .ninja-forms-form-wrap input[type=submit]:hover, .ninja-forms-form-wrap input[type=submit]:focus {
+ color: #FFFFFF; }
+
+/* For fixing cellphones not showing phone numbers because of /helpful/ auto-coloring */
+a[href^=tel] {
+ color: inherit;
+ text-decoration: none; }
+
+body {
+ background: url(../assets/bkgrd.jpg) no-repeat fixed;
+ background-size: cover; }
+ body .shadow-wrapper {
+ margin: 0 auto;
+ background: #FFFFFF;
+ box-shadow: 0 0 15px -6px #000000;
+ -ms-box-shadow: 0 0 15px -6px #000000;
+ -moz-box-shadow: 0 0 15px -6px #000000;
+ -webkit-box-shadow: 0 0 15px -6px #000000;
+ max-width: 1000px;
+ padding-top: 1.25rem; }
+
+header {
+ height: auto; }
+ header #logo img {
+ margin-bottom: 15px; }
+ header .search input {
+ height: 20px;
+ width: 167px;
+ padding: 0 8px;
+ margin: 13px 0px 0px 18px;
+ border-radius: 3px;
+ font-size: 10px;
+ color: #000000;
+ display: inline-block; }
+ header .search a.magnifying-glass {
+ font-size: 10em;
+ /* This controls the size. */
+ display: inline-block;
+ width: 0.625rem;
+ height: 0.625rem;
+ border: 0.125rem solid #131c5f;
+ position: relative;
+ border-radius: 0.35em;
+ margin: 0 0 0 -25px; }
+ header .search a.magnifying-glass:before {
+ content: "";
+ display: inline-block;
+ position: absolute;
+ right: -0.4375rem;
+ bottom: -0.25rem;
+ border-width: 0;
+ background: #131c5f;
+ width: 0.5rem;
+ height: 0.125rem;
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+ transform: rotate(45deg); }
+ header #sec-nav {
+ position: relative;
+ text-align: left;
+ padding: 10px 0;
+ margin: 0 0 15px 45px; }
+ header #sec-nav ul {
+ margin: 0; }
+ header #sec-nav ul li {
+ display: inline; }
+ header #sec-nav ul li a {
+ font-size: 12px;
+ color: #131c5f;
+ padding: 0 5px;
+ font-weight: bold; }
+ header #sec-nav > ul > li {
+ position: relative; }
+ header #sec-nav > ul > li:before {
+ color: #999999;
+ content: "|";
+ position: absolute;
+ top: 2px;
+ left: -15px;
+ font-size: 14px;
+ font-weight: bold;
+ display: block;
+ padding: 0 10px; }
+ header #sec-nav > ul > li:first-child:before {
+ content: none; }
+ header img {
+ margin-left: 5px; }
+ header .social {
+ margin-top: -25px;
+ padding-right: 0; }
+ header .social a {
+ float: right;
+ margin: 0 5px; }
+ header .social a img {
+ margin: 0; }
+
+.contain-to-grid {
+ box-shadow: 0 5px 10px -1px #999999; }
+ .contain-to-grid .top-bar {
+ height: 73px;
+ box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.5);
+ margin-bottom: 10px; }
+
+.tab-bar .tab-bar-section.middle {
+ text-align: right; }
+
+.top-bar-section {
+ background: transparent;
+ float: none;
+ margin-left: auto;
+ margin-right: auto;
+ display: inline-block;
+ height: auto;
+ line-height: 1; }
+ .top-bar-section ul li {
+ background: none;
+ padding: 12px 0;
+ border-left: 2px solid #FFFFFF;
+ max-width: 166.5px;
+ line-height: 1.25; }
+ .top-bar-section ul li:first-child {
+ border: none; }
+ .top-bar-section ul li:hover {
+ background: #FFFFFF; }
+ .top-bar-section ul li a {
+ text-align: center;
+ padding: 0 20px;
+ font-size: 20px;
+ font-weight: bold;
+ color: #FFFFFF; }
+ .top-bar-section ul li a:hover {
+ color: #131c5f;
+ text-shadow: 0 0 1px #131c5f;
+ text-shadow: 1 0 1px #131c5f;
+ text-shadow: 0 1 1px #131c5f;
+ text-shadow: -1 0 1px #131c5f;
+ text-shadow: 0 -1 1px #131c5f; }
+ .top-bar-section ul li:not(.has-form):not(.active) > a:not(.button) {
+ background: transparent; }
+ .top-bar-section ul li.drop-left ul.dropdown {
+ padding-left: 21px;
+ padding-right: 250px;
+ top: 74px;
+ background: #FFFFFF;
+ border-bottom-left-radius: 10px;
+ border-bottom-right-radius: 10px;
+ min-width: 500px;
+ box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -ms-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -webkit-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5); }
+ .top-bar-section ul li.drop-left ul.dropdown li {
+ white-space: nowrap;
+ border-bottom: 1px solid #e7e7e8;
+ padding: 5px 0; }
+ .top-bar-section ul li.drop-left ul.dropdown li.nav-img-container {
+ border: none; }
+ .top-bar-section ul li.drop-left ul.dropdown li.nav-img-container img {
+ position: absolute;
+ right: 20px;
+ top: 23px;
+ border: 6px solid #fdefd4; }
+ .top-bar-section ul li.drop-left ul.dropdown li a {
+ padding-left: 0;
+ text-align: left;
+ font-size: 18px; }
+ .top-bar-section ul li.drop-left ul.dropdown li a:hover {
+ color: #131c5f;
+ text-shadow: 0 0 1px #a6b567;
+ text-shadow: 1 0 1px #a6b567;
+ text-shadow: 0 1 1px #a6b567;
+ text-shadow: -1 0 1px #a6b567;
+ text-shadow: 0 -1 1px #a6b567; }
+ .top-bar-section ul li.drop-right ul.dropdown {
+ padding-left: 250px;
+ padding-right: 21px;
+ right: -1%;
+ left: auto;
+ top: 74px;
+ background: #FFFFFF;
+ border-bottom-left-radius: 10px;
+ border-bottom-right-radius: 10px;
+ min-width: 500px;
+ box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -ms-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -webkit-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5); }
+ .top-bar-section ul li.drop-right ul.dropdown li {
+ white-space: nowrap;
+ background: #FFFFFF;
+ text-align: right;
+ border-bottom: 1px solid #e7e7e8;
+ padding: 5px 0; }
+ .top-bar-section ul li.drop-right ul.dropdown li.nav-img-container {
+ border: none; }
+ .top-bar-section ul li.drop-right ul.dropdown li.nav-img-container img {
+ position: absolute;
+ left: 20px;
+ top: 23px;
+ border: 6px solid #fdefd4; }
+ .top-bar-section ul li.drop-right ul.dropdown li a {
+ padding-left: 0;
+ text-align: left;
+ font-size: 18px; }
+ .top-bar-section ul li.drop-right ul.dropdown li a:hover {
+ color: #131c5f;
+ text-shadow: 0 0 1px #a6b567;
+ text-shadow: 1 0 1px #a6b567;
+ text-shadow: 0 1 1px #a6b567;
+ text-shadow: -1 0 1px #a6b567;
+ text-shadow: 0 -1 1px #a6b567; }
+
+.breadcrumbs {
+ margin-top: 10px; }
+
+#content-bulk #con {
+ margin: 0; }
+#content-bulk h2 {
+ text-transform: uppercase;
+ font-size: 25px; }
+#content-bulk footer {
+ margin: 35px 0; }
+ #content-bulk footer #address {
+ margin-top: 25px; }
+ #content-bulk footer #address p {
+ font-size: 12px;
+ margin-top: 5px; }
+ #content-bulk footer #address img {
+ margin: 0;
+ padding-right: 5px; }
+ #content-bulk footer #address a {
+ font-size: 12px; }
+ #content-bulk footer img {
+ box-shadow: none; }
+
+#slideshow {
+ border-bottom: 5px solid #131c5f;
+ margin-top: -10px; }
+ #slideshow #caption {
+ background: rgba(0, 0, 0, 0.75);
+ color: #FFFFFF;
+ margin-top: -51px; }
+ #slideshow #caption p {
+ padding: 10px 5px;
+ font-size: 12px;
+ margin: 0;
+ text-align: right; }
+
+/* NextGen Gallery */
+.ngg-gallery-thumbnail, .ngg-gallery-thumbnail-box {
+ float: none !important; }
+
+.gallery li a img {
+ display: block;
+ width: 100%; }
+
+.ngg-gallery-thumbnail, .ngg-gallery-thumbnail-box {
+ float: none !important; }
+
+.ngg-album-compact h4 .ngg-album-desc {
+ height: auto !important;
+ font-family: Georgia, Cambria, "Times New Roman", Times, serif;
+ font-weight: 400; }
+
+.ngg-album-compact .album-meta-wrapper h4 a {
+ font-style: normal; }
+
+.album-meta-wrapper {
+ display: block;
+ height: 54px;
+ margin-bottom: 20px; }
+
+.ngg-glmalbums {
+ margin: 10px 0; }
+
+/* Ninja Forms */
+.ninja-forms-form-wrap {
+ max-width: 600px;
+ margin: 0 auto; }
+ .ninja-forms-form-wrap input[type=submit] {
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ border-radius: 0;
+ border-style: solid;
+ border-width: 0;
+ cursor: pointer;
+ font-family: "Times New Roman";
+ font-weight: normal;
+ line-height: normal;
+ margin: 0 0 1.25rem;
+ position: relative;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ padding: 1rem 2rem 1.0625rem 2rem;
+ font-size: 1rem;
+ background-color: #008CBA;
+ border-color: #007095;
+ color: #FFFFFF;
+ transition: background-color 300ms ease-out;
+ display: block;
+ margin: 0 auto; }
+ .ninja-forms-form-wrap input[type=submit]:hover, .ninja-forms-form-wrap input[type=submit]:focus {
+ background-color: #007095; }
+ .ninja-forms-form-wrap input[type=submit]:hover, .ninja-forms-form-wrap input[type=submit]:focus {
+ color: #FFFFFF; }
+
+/* End NextGen Gallery */
+#front {
+ padding: 20px; }
+ #front .row.collapse h1 {
+ border-bottom: 1px solid #d1d2d4; }
+ #front .row.collapse .row {
+ margin-bottom: 20px; }
+ #front .row.collapse .row img {
+ margin-top: 5px;
+ border: 3px solid #FFFFFF;
+ -webkit-box-shadow: 0px 0px 5px 0px #ababab;
+ -moz-box-shadow: 0px 0px 5px 0px #ababab;
+ -ms-box-shadow: 0px 0px 5px 0px #ababab;
+ box-shadow: 0px 0px 5px 0px #ababab; }
+ #front .row.collapse .row .detail {
+ padding-left: 40px;
+ margin: 0 auto; }
+ #front .row.collapse .row .detail h2 {
+ margin: 0; }
+ #front .row.collapse .row .detail p {
+ font-size: 0.75rem;
+ margin: 0; }
+ #front .row.collapse .row .detail a {
+ font-size: 0.75rem; }
+ #front .row.collapse .row.collapse img {
+ margin-left: 15px;
+ margin-top: 5px;
+ border: 3px solid #FFFFFF;
+ -webkit-box-shadow: 0px 0px 5px 0px #ababab;
+ -moz-box-shadow: 0px 0px 5px 0px #ababab;
+ -ms-box-shadow: 0px 0px 5px 0px #ababab;
+ box-shadow: 0px 0px 5px 0px #ababab; }
+ #front .row.collapse h4 {
+ line-height: 1.3; }
+ #front .row.collapse ul {
+ list-style: none;
+ margin: 10px 0; }
+ #front .row.collapse ul li {
+ font-size: 0.625rem;
+ color: grey;
+ padding: 0 0 5px; }
+ #front .row.collapse ul li a {
+ font-size: 0.6875rem; }
+ #front .row.collapse ul li a.more {
+ color: darkblue;
+ font-weight: bold;
+ text-transform: uppercase; }
+ #front .row.collapse #video {
+ padding: 0;
+ margin-top: 30px;
+ float: left; }
+ #front .row.collapse #video h2 {
+ margin-top: 20px;
+ font-size: 1.125rem; }
+ @media only screen and (min-width:40.063em) and (max-width:64em) {
+ #front .row.collapse #video h2 {
+ margin-top: 15px; } }
+ @media only screen and (max-width: 40em) {
+ #front .row.collapse #video h2 {
+ margin: 0; } }
+ #front .row.collapse #video a {
+ font-size: 12px; }
+ #front .row.collapse #video img {
+ margin-left: 25px; }
+ @media only screen and (max-width: 40em) {
+ #front .row.collapse #video img {
+ margin: 0; } }
+
+.home-feed-post {
+ padding-bottom: 25px; }
+ @media only screen and (max-width: 40em) {
+ .home-feed-post > * {
+ text-align: center; } }
+
+input[type="submit"].blogbutton {
+ border-radius: 3px;
+ color: #FFFFFF;
+ border: 2px solid #FFFFFF;
+ font-weight: bold;
+ font-size: 13px;
+ padding: 2px 5px;
+ margin-top: -10px;
+ text-transform: uppercase; }
+ input[type="submit"].blogbutton:hover {
+ cursor: pointer;
+ background: #FFFFFF;
+ border: 2px solid #035C84;
+ color: white; }
+
+#blog-posts-over article {
+ padding-top: 10px;
+ margin-bottom: 15px;
+ display: inline-block;
+ width: 100%; }
+ #blog-posts-over article .entry-header {
+ background: transparent; }
+ #blog-posts-over article p {
+ padding-bottom: 15px; }
+ #blog-posts-over article a.read-more {
+ border: 2px solid #FFFFFF;
+ font-weight: bold;
+ font-size: 13px;
+ padding: 0 3px;
+ text-transform: uppercase; }
+ #blog-posts-over article a.read-more:hover {
+ background: #FFFFFF;
+ border: 2px solid #035C84;
+ color: #035C84; }
+ #blog-posts-over article .entry-header {
+ margin-bottom: 10px; }
+ #blog-posts-over article .entry-header .entry-title {
+ margin-bottom: 0; }
+ #blog-posts-over article .entry-header .meta.date {
+ font-size: 13px;
+ font-weight: bold; }
+
+/*#searchform div input &[type="text"] {
+ width: 95%;
+}*/
+#blog-posts-over .entry-meta {
+ text-align: center;
+ color: #757575;
+ font-size: 12px; }
+
+#blog-posts-over > div {
+ margin: 25px 0; }
+
+#blog-side-info #searchform {
+ margin-bottom: 30px; }
+#blog-side-info p {
+ margin-bottom: 0; }
+
+@media only screen and (max-width: 40em) {
+ #blog-side-info-wrapper {
+ float: none;
+ margin: 0 auto;
+ clear: both; }
+ #blog-side-info {
+ padding-left: 0;
+ border-left: 0; }
+ #blog-side-info ul {
+ margin-left: 0;
+ margin-top: 10px; }
+ #blog-side-info #searchform {
+ padding: 35px 0; }
+ #blog-side-info #searchform #s {
+ width: 100%; } }
+
+#blog-side-info {
+ padding-right: 10px; }
+ #blog-side-info ul {
+ list-style-type: none; }
+
+#sidebar {
+ padding-top: 25px;
+ background: #f2f9fc; }
+ #sidebar .row.collapse {
+ margin-left: 14px; }
+ #sidebar li {
+ list-style: none; }
+ #sidebar li #calendar_wrap table#wp-calendar {
+ margin: 0 auto; }
+ #sidebar a {
+ font-size: 12px; }
+ #sidebar form {
+ margin: 0 12px 0 14px; }
+ #sidebar form select {
+ padding: 0 0.5rem;
+ border-radius: 5px;
+ height: 25px;
+ margin: 0; }
+ #sidebar form select option {
+ font-size: 10px; }
+ #sidebar .small-block-grid-2 {
+ margin-top: 10px; }
+ #sidebar .small-block-grid-2 li {
+ padding: 0 0.625rem 0.625rem; }
+ #sidebar .small-block-grid-2 li img {
+ border: 2px solid lightblue; }
+ #sidebar .small-block-grid-2 > li:nth-of-type(2), #sidebar .small-block-grid-2 > li:nth-of-type(4) {
+ padding-left: 0; }
+ #sidebar .small-block-grid-2 > li:nth-of-type(3), #sidebar .small-block-grid-2 > li:nth-of-type(4) {
+ padding-bottom: 20px; }
+ #sidebar h3 {
+ margin: 20px 0 0; }
+ #sidebar h1 {
+ margin: 0;
+ font-size: 1.5625rem;
+ text-transform: none; }
+ #sidebar input {
+ padding: 5px 0 5px 8px;
+ height: auto;
+ margin: 10px 0; }
+ #sidebar button {
+ border-radius: 2px;
+ padding: 0 10px; }
+
+#side-nav {
+ padding-top: 10px;
+ background: #f2f9fc; }
+ #side-nav h1 {
+ font-size: 1.375rem;
+ /* margin: 5px 0 25px;*/ }
+ #side-nav h4 {
+ font-weight: bold;
+ margin-left: 10px; }
+ #side-nav li {
+ list-style: none; }
+ #side-nav ul {
+ list-style: none;
+ margin: 0 0 20px; }
+ #side-nav ul li {
+ margin: 0 -15px;
+ padding: 5px 10px 5px 25px; }
+ #side-nav ul li:hover {
+ background: #81adc1; }
+ #side-nav ul li a {
+ color: darkblue; }
+ #side-nav ul li a:hover {
+ color: #FFFFFF; }
+ #side-nav h3 {
+ text-transform: none;
+ margin: 0; }
+ #side-nav input {
+ padding: 5px 0 5px 8px;
+ height: auto;
+ margin-bottom: 10px; }
+ #side-nav button {
+ border-radius: 2px;
+ padding: 0 10px; }
+
+#extra {
+ margin-top: 15px; }
+ #extra p {
+ line-height: 1.3; }
+ #extra p.title {
+ margin: 0; }
+ #extra p.title#last {
+ padding-top: 10px; }
+ #extra p#message {
+ text-transform: uppercase;
+ color: lightblue;
+ font-size: 0.9375rem;
+ margin: 40px 0; }
+
+.county-news {
+ font-weight: bold; }
+
+.current_page_item a {
+ font-weight: bold; }
+
+.search-top #searchform {
+ text-align: left;
+ display: inline-block;
+ position: relative; }
+ .search-top #searchform #search-button {
+ width: 22px;
+ right: 0px;
+ position: absolute;
+ padding: 0;
+ border: 1px solid lightgray; }
+.search-top input {
+ height: 20px;
+ width: 167px;
+ padding: 0 8px;
+ margin: 13px 0px 0px 18px;
+ border-radius: 3px;
+ font-size: 10px;
+ color: #000000;
+ display: inline-block; }
+.search-top a.magnifying-glass {
+ font-size: 10em;
+ /* This controls the size. */
+ width: 0.75rem;
+ height: 0.75rem;
+ border: 0.125rem solid darkblue;
+ position: absolute;
+ top: 15px;
+ border-radius: 0.35em;
+ margin: 0 0 0 -20px; }
+ .search-top a.magnifying-glass:before {
+ content: "";
+ display: inline-block;
+ position: absolute;
+ right: -0.4375rem;
+ bottom: -0.25rem;
+ border-width: 0;
+ background: darkblue;
+ width: 0.5rem;
+ height: 0.125rem;
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+ transform: rotate(45deg); }
+
+#connect {
+ padding-top: 20px;
+ background: #4c4d4f; }
+ #connect ul {
+ margin: 0;
+ list-style: none; }
+ #connect ul li {
+ background: none;
+ padding: 0 5px;
+ display: inline-block; }
+ #connect ul li > a {
+ display: block;
+ font-family: Open Sans, sans-serif;
+ font-size: 12px;
+ color: #fff;
+ padding: 20px 18px;
+ line-height: 1.2; }
+ #connect ul li a#current {
+ background: #0093d1; }
+
+#copyright {
+ padding: 20px 0;
+ margin: 0 auto;
+ float: none; }
+ #copyright p {
+ font-size: 0.625rem; }
+ #copyright a {
+ color: #000000; }
+
+#footer_address span.bullet, #copyright span.bullet {
+ margin: 0 5px; }
+ @media only screen and (max-width: 40em) {
+ #footer_address span.bullet, #copyright span.bullet {
+ display: none !important; } }
+
+#example.element {
+ background-color: transparent; }
+
+/* for the mobile menu */
+aside.left-off-canvas-menu {
+ background-color: rgba(0, 0, 0, 0.7);
+ color: white; }
+
+aside.left-off-canvas-menu li.page_item {
+ display: block;
+ overflow: hidden;
+ position: relative;
+ padding: 4px 8px; }
+
+aside.left-off-canvas-menu .off-canvas-list ul li a {
+ line-height: 20px;
+ color: white;
+ border-bottom: 1px solid #b1b3b6;
+ background-repeat: no-repeat;
+ background-position: 3px 50%; }
+
+aside.left-off-canvas-menu li.page_item_has_children a.toggle {
+ border-left: 15px solid transparent;
+ border-right: 15px solid transparent;
+ border-top: 20px solid #e7e7e7;
+ border-bottom: 0;
+ font-size: 0;
+ height: 0;
+ line-height: 0;
+ padding: 0;
+ position: absolute;
+ right: 10px;
+ top: 13px;
+ width: 0; }
+
+aside.left-off-canvas-menu li.page_item_has_children a.toggle.open {
+ border-left: 15px solid transparent;
+ border-right: 15px solid transparent;
+ border-bottom: 20px solid #e7e7e7;
+ border-top: 0; }
+
+aside.left-off-canvas-menu ul.children {
+ display: none; }
+
+aside.left-off-canvas-menu .off-canvas-list ul li > ul li > a {
+ padding-left: 10px;
+ margin-left: 25px;
+ line-height: 18px; }
+
+aside.left-off-canvas-menu ul.open {
+ display: block; }
+
+.left-off-canvas-menu {
+ list-style: none; }
+ .left-off-canvas-menu li a {
+ color: #FFFFFF;
+ font-size: 1.25rem;
+ line-height: 150%;
+ border-color: white; }
+ .left-off-canvas-menu li a:hover {
+ color: black; }
+ .left-off-canvas-menu li .dropdown {
+ list-style: none; }
+ .left-off-canvas-menu ul {
+ list-style: none;
+ padding: 10px 0; }
+ .left-off-canvas-menu ul li a {
+ color: #FFFFFF; }
+ .left-off-canvas-menu ul li ul {
+ list-style: none; }
+
+.offcavas-social-list {
+ list-style: none;
+ margin-left: -1.375rem;
+ margin-right: 0;
+ margin: 0 auto 1.0625rem auto;
+ overflow: hidden;
+ padding: 0;
+ margin-left: auto; }
+ .offcavas-social-list > li {
+ display: block;
+ float: left;
+ list-style: none;
+ margin-left: 1.375rem; }
+ .offcavas-social-list > li > * {
+ display: block; }
+
+/* End Mobile Menu */
+/*# sourceMappingURL=app.css.map */
\ No newline at end of file
--- /dev/null
+{
+ "version": 3,
+ "file": "app.css",
+ "sources": [
+ "../app.scss",
+ "../_settings.scss",
+ "../../bower_components/foundation/scss/foundation.scss",
+ "../_mixins.scss",
+ "../_wordpress.scss",
+ "../_defaults.scss",
+ "../_body.scss",
+ "../_page.header.scss",
+ "../_topbar.scss",
+ "../_main.scss",
+ "../_slideshow.scss",
+ "../_plugins.scss",
+ "../_blog.scss",
+ "../_sidebar.scss",
+ "../_search.scss",
+ "../_page.footer.scss",
+ "../_copyright.scss",
+ "../_structure.scss",
+ "../_left-off-canvas.scss",
+ "../../bower_components/foundation/scss/foundation/_functions.scss",
+ "../../bower_components/foundation/scss/foundation/components/_grid.scss",
+ "../../bower_components/foundation/scss/foundation/components/_accordion.scss",
+ "../../bower_components/foundation/scss/foundation/components/_alert-boxes.scss",
+ "../../bower_components/foundation/scss/foundation/components/_block-grid.scss",
+ "../../bower_components/foundation/scss/foundation/components/_breadcrumbs.scss",
+ "../../bower_components/foundation/scss/foundation/components/_button-groups.scss",
+ "../../bower_components/foundation/scss/foundation/components/_buttons.scss",
+ "../../bower_components/foundation/scss/foundation/components/_clearing.scss",
+ "../../bower_components/foundation/scss/foundation/components/_dropdown.scss",
+ "../../bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss",
+ "../../bower_components/foundation/scss/foundation/components/_flex-video.scss",
+ "../../bower_components/foundation/scss/foundation/components/_forms.scss",
+ "../../bower_components/foundation/scss/foundation/components/_icon-bar.scss",
+ "../../bower_components/foundation/scss/foundation/components/_inline-lists.scss",
+ "../../bower_components/foundation/scss/foundation/components/_joyride.scss",
+ "../../bower_components/foundation/scss/foundation/components/_keystrokes.scss",
+ "../../bower_components/foundation/scss/foundation/components/_labels.scss",
+ "../../bower_components/foundation/scss/foundation/components/_magellan.scss",
+ "../../bower_components/foundation/scss/foundation/components/_orbit.scss",
+ "../../bower_components/foundation/scss/foundation/components/_pagination.scss",
+ "../../bower_components/foundation/scss/foundation/components/_panels.scss",
+ "../../bower_components/foundation/scss/foundation/components/_pricing-tables.scss",
+ "../../bower_components/foundation/scss/foundation/components/_progress-bars.scss",
+ "../../bower_components/foundation/scss/foundation/components/_range-slider.scss",
+ "../../bower_components/foundation/scss/foundation/components/_reveal.scss",
+ "../../bower_components/foundation/scss/foundation/components/_side-nav.scss",
+ "../../bower_components/foundation/scss/foundation/components/_split-buttons.scss",
+ "../../bower_components/foundation/scss/foundation/components/_sub-nav.scss",
+ "../../bower_components/foundation/scss/foundation/components/_switches.scss",
+ "../../bower_components/foundation/scss/foundation/components/_tables.scss",
+ "../../bower_components/foundation/scss/foundation/components/_tabs.scss",
+ "../../bower_components/foundation/scss/foundation/components/_thumbs.scss",
+ "../../bower_components/foundation/scss/foundation/components/_tooltips.scss",
+ "../../bower_components/foundation/scss/foundation/components/_top-bar.scss",
+ "../../bower_components/foundation/scss/foundation/components/_type.scss",
+ "../../bower_components/foundation/scss/foundation/components/_offcanvas.scss",
+ "../../bower_components/foundation/scss/foundation/components/_visibility.scss",
+ "../mixins/_gradient.scss",
+ "../mixins/_off-canvas-arrow.scss",
+ "../plugins/_nextgen.scss",
+ "../../bower_components/foundation/scss/foundation/components/_global.scss"
+ ],
+ "sourcesContent": [],
+ "mappings": "A4D2WA,AAAI;EACE,AAAa;;AAGnB,AAAI;EACE,AAAa;EACb,AAKO;;AAFb,AAAI;EACE,AAAa;EACb,AAAO;;AAGb,AAAI;EACE,AAAa;EACb,AP9SN;;AOiTA,AAAI;EACE,AAAa;EACb,APnTN;;AOsTA,AAAI;EACE,AAAa;EACb,AAKO;;AAFb,AAAI;EACE,AAAa;EACb,AAAO;;AAGb,AAAI;EACE,AAAa;EACb,AAKO;;AAFb,AAAI;EACE,AAAa;EACb,AAAO;;AAGb,AAAI;EACE,AAAa;EACb,AAAO;;AAGb,AAAI;EACE,AAAa;;AAQnB,AAAM;EAAW,AAAQ;;AAGzB;EACM,AAAY;;AAElB,AAAG,AAAC,AAAS,AAAC;EA1VZ,AA6VwB;EA5VrB,AA4VqB;EA3VhB,AA2VgB;;AAG1B,AAAM;EACK,A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G,AAAG;EAChD,AAAa;EACb,AAAO;EACP,AAAe;EACf,AAAmB;EACnB,AAAqB;;AAEvB,AAAK,AAAsB,AAAE,AAAwB,AAAC;EwCjBpD,AAAqB;EACrB,AAAsB;EAMpB,AAAY;EACZ,AAAe;ExCWjB,AAAW;EACX,AAAQ;EACR,AAAa;EACb,AAAS;EACT,AAAU;EACV,AAAO;EACP,AAAK;EACL,AAAO;;AAET,AAAK,AAAsB,AAAE,AAAwB,AAAC,AAAO;EwC5B3D,AAAqB;EACrB,AAAsB;EAEpB,AAAe;EACf,AAAY;;AxC2BhB,AAAK,AAAsB,AAAE;EAC3B,AAAS;;AAEX,AAAK,AAAsB,AAAiB,AAAG,AAAK,AAAG,AAAK;EAC1D,AAAc;EACd,AAAa;EACb,AAAa;;AAEf,AAAK,AAAsB,AAAE;EAC3B,AAAS;;AAEX;EACQ,AAAY;EAEpB,AAAsB,AAAG;IACT,AQsHH;IRrHG,AAAW;IACX,AAAa;IACb,AAAc;EAE9B,AAAsB,AAAG,AAAC;IACV,AAAO;EAEvB,AAAsB,AAAG;IACT,AAAY;EAG5B,AAAsB;IACV,AAAY;IAEZ,AAAS;IAErB,AAAsB,AAAG,AAAG;MACR,AQoGP;IRlGb,AAAsB,AAAG,AAAG;MACR,AAAY;;AAKhC;EevCE,AAAY;EACZ,AApBiC;EAqBjC,AAvB4B;EAwB5B,AAAQ;EACR,AAjBqB;EAkBrB,AArBoB;EfyDlB,AAAa;EelCjB,AAAwB;IACpB,AAlBkB;IAmBlB,A2BuOc;I3BtOd,AAAY;IACZ,AA7BoC;IA8BxC,AAAwB,AAAK;MAAnB,AAnBqB",
+ "names": []
+}
\ No newline at end of file
--- /dev/null
+ <footer>
+ <?php if (is_active_sidebar('sidebar-f')) :?>
+ <?php dynamic_sidebar('sidebar-f');?>
+ <?php endif;?>
+ <div class="row">
+ <?php get_template_part('parts/client-info-footer');?>
+ </div>
+ </footer>
+ </main><!--End of main-->
+ </div><!--End of shadow-->
+ <div id="copyright" class="small-12 text-center row columns">
+ <span>© <?php echo date('Y');?> </span>
+ <span class="bullet"> • </span>
+ <span> All Rights Reserved.</span>
+ <span class="bullet"> • </span>
+ <span> Produced by <a target="_blank" href="http://www.gaslightmedia.com">Gaslight Media</a></span>
+ </div>
+ </div>
+ <a class="exit-off-canvas"></a>
+ </div><!--End of inner-wrap-->
+ </div><!--End of off-canvas-->
+ <?php wp_footer();?>
+ </body>
+</html>
--- /dev/null
+<?php get_header(); ?>
+<main class="page-front">
+ <div class="row">
+ <div id="head-img">
+ <?php echo glm_get_background(); ?>
+ </div>
+ </div>
+ <div id="content-wrapper">
+ <div class="row">
+ <div id="main-content" class="small-12 medium-6 large-8 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <?php the_content();?>
+ <?php endwhile; else:?>
+ <p><?php _e('Sorry, no posts yet');?></p>
+ <?php endif;?>
+ </div>
+ </div>
+ <div id="block-row">
+ <div class="row">
+ <div class="medium-2 columns show-for-medium-up"></div>
+ <?php
+ get_template_part('parts/glm-blocks');
+ ?>
+ <div class="medium-2 columns show-for-medium-up"></div>
+ </div>
+ </div>
+ <div id="contact-field">
+
+ </div>
+ </div>
+<?php get_footer(); ?>
--- /dev/null
+<?php
+
+
+$ancestorId = null;
+$includePages = array();
+$frontPageId = get_option('page_on_front');
+add_action('widgets_init', 'glm_quicksite_widget_init');
+
+if (!function_exists('glm_quicksite_widget_init')) {
+
+ function glm_quicksite_widget_init()
+ {
+ register_sidebar(array(
+ 'name' => __('Right Sidebar'),
+ 'id' => 'sidebar-r',
+ 'description' => __('Appears in Right Sidebar')
+ ));
+ //register_sidebar(array(
+ // 'name' => __('Footer'),
+ // 'id' => 'sidebar-f',
+ // 'description' => __('Appears in Footer Area')
+ //));
+ }
+
+}
+
+/**
+ * get_menu_options
+ *
+ * Grab the menu options from the theme.ini file
+ */
+function glm_get_menu_options()
+{
+ static $menu_options;
+ $themeConfig = get_template_directory() . '/theme.ini';
+
+ if (!$menu_options && is_file($themeConfig)) {
+ $menu_options = parse_ini_file($themeConfig, true);
+ }
+ return $menu_options;
+}
+
+/**
+ * glm_page_menu
+ *
+ * Grab the top level pages and their sub pages as the main navigation
+ */
+function glm_page_menu($parent = 0, $class = '')
+{
+ $menuConfig = glm_get_menu_options();
+ $frontPageId = get_option('page_on_front');
+ $parents = array();
+ $args = array(
+ 'post_type' => 'page',
+ 'parent' => $parent,
+ 'number' => '',
+ 'exclude' => $frontPageId,
+ 'post_status' => 'publish',
+ 'sort_order' => 'asc',
+ 'sort_column' => 'menu_order'
+ );
+ if ($parent == 0 && $menuConfig['menu_options']['main_level_pages']) {
+ $args['include'] = $menuConfig['menu_options']['main_level_pages'];
+ }
+ $pages = get_pages($args);
+ echo '<ul'.(($class)?' class="'.$class.'"':'').'><!-- begin -->'."\n";
+ foreach ($pages as $page) {
+ $childs = get_pages('child_of=' . $page->ID);
+ if (count($childs) > 0) {
+ echo '<li class="has-dropdown">'."\n";
+ echo '<a href="'.get_permalink($page->ID).'">'.$page->post_title.'</a>'."\n";
+ echo glm_page_menu($page->ID, 'sub-menu dropdown');
+ echo '</li>'."\n";
+ } else {
+ echo '<li><a href="'.get_permalink($page->ID).'">'.$page->post_title.'</a></li>'."\n";
+ }
+ }
+ echo '</ul><!-- end -->'."\n";
+}
+
+/**
+ * Return the client info option for the given key
+ *
+ * @param type $name Name of the client info option to return
+ *
+ * @return string Option
+ */
+if (!function_exists('glm_get_clientinfo_option')) {
+ function glm_get_clientinfo_option($name)
+ {
+ $settings = get_option('glmclientinfo_settings');
+ $states = get_option('glmclientinfo_states');
+ if ($name == 'stateFull' && $settings['state']) {
+ return $states[$settings['state']];
+ }
+ if ($name == 'state2Full' && $settings['state2']) {
+ return $states[$settings['state2']];
+ }
+ return ($settings && $settings[$name])
+ ? $settings[$name]
+ : null;
+ }
+}
+
+/**
+ * glm_offcanvas_menu
+ *
+ * Generate the list of pages as nested ul li list
+ */
+function glm_offcanvas_menu()
+{
+ wp_page_menu(array(
+ 'depth' => 0,
+ 'sort_column' => 'menu_order',
+ 'menu_class' => 'left-off-canvas-list'
+ ));
+}
+
+add_theme_support('post-thumbnails');
+set_post_thumbnail_size(120, 100, true);
+/**
+ * glm_site_scripts
+ *
+ * Add the scripts that we'll need for any home page stuff
+ */
+function glm_site_scripts()
+{
+ wp_enqueue_script(
+ 'modernizr',
+ get_template_directory_uri() . '/js/modernizr/modernizr.min.js'
+ );
+ wp_enqueue_script('jquery');
+ wp_enqueue_script(
+ 'glm_foundation',
+ get_template_directory_uri() . '/js/app.js',
+ 'jquery',
+ '1.0',
+ true
+ );
+ if(is_front_page()) {
+ }
+
+}
+
+
+/* Header for posts*/
+function glm_get_header() {
+ echo '<div';
+
+ if (has_post_thumbnail()) {
+ $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+ echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "';
+ } else {
+ //echo ' style="background-image: url('.get_template_directory_uri().'/assets/default-header.gif);height:0;padding:0;padding-bottom:30%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;"';
+ echo ' class="no-featured"';
+ }
+ echo '>';
+ echo '</div>';
+ echo '<div class="row">';
+ echo '<div class="small-12 columns">';
+ echo '</div>';
+ echo '</div>';
+}
+
+// // The code below is useful when you want the image to resize to
+// if (has_post_thumbnail()) {
+// $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+// echo '<img src="'.$image_data[0].'" style="no-repeat;max-height:400px;">';
+// } else {
+// echo '<img src="'.get_template_directory_uri().'/assets/default-header.gif" style="max-height:400px;">';
+// }
+// echo '<div class="row">';
+// echo '<div class="small-12 columns">';
+// echo '</div>';
+// echo '</div>';
+
+
+function glm_side_menu() {
+ global $post;
+ $parents = get_post_ancestors($post->ID);
+ $id = ($parents) ? $parents[count($parents)-1]: $post->ID;
+ $parent = get_page( $id );
+ if ($id == 0) {
+ $ID = $post->ID;
+ } else {
+ $ID = $parent->ID;
+ }
+ echo '<h1>'.get_the_title($ID).'</h1>';
+ echo '<ul class="sidebar"><!-- begin -->'."\n";
+ echo wp_list_pages( 'child_of='.$ID.'&title_li=&depth=1&echo=0');
+ echo '</ul><!-- end -->'."\n";
+}
+
+
+add_action('wp_enqueue_scripts', 'glm_site_scripts');
+
+
+// Start of the Contextual/Highlight Search functions
+function mytheme_init() {
+ remove_action('thematic_searchloop', 'thematic_search_loop');
+}
+
+add_action('init', 'mytheme_init', 10);
+
+function mytheme_search_loop() {
+ while ( have_posts() ) : the_post(); ?>
+
+ <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
+ <?php thematic_postheader(); ?>
+ <div class="entry-content">
+ <?php thematic_content(); /* We will replace this next */ ?>
+
+ </div>
+ <?php thematic_postfooter(); ?>
+ </div><!-- .post -->
+
+ <?php endwhile;
+}
+
+add_action('thematic_searchloop', 'mytheme_search_loop');
+// End of the Contextual/Highlight Search functions
+?>
--- /dev/null
+<!doctype html>
+<html class="no-js" lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title><?php wp_title(); ?></title>
+ <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css">
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
+ <link href='http://fonts.googleapis.com/css?family=Crimson+Text:600italic' rel='stylesheet' type='text/css'>
+ <?php wp_head(); ?>
+ </head>
+ <body>
+ <div class="off-canvas-wrap" data-offcanvas>
+ <div class="inner-wrap">
+ <div id="page-wrapper">
+ <div class="shadow-wrapper">
+ <header>
+ <div class="row">
+ <div class="small-4 medium-3 columns">
+ <a href="<?php bloginfo('url');?>"><img src="<?php echo get_template_directory_uri(); ?>/assets/littlefield-twp-logo.jpg"></a>
+ </div>
+ <div class="large-9 columns show-for-large-up">
+ <div class="row">
+ <div id="sec-nav" class="large-2 columns right">
+ <ul>
+ <li><a href="<?php bloginfo('url');?>">Home</a></li>
+ <li><a href="<?php bloginfo('url');?>/"><img src="<?php echo get_template_directory_uri(); ?>/assets/email-icon.jpg"></a></li>
+ <li><a href="<?php bloginfo('url');?>/"><img src="<?php echo get_template_directory_uri(); ?>/assets/search-icon.jpg"></a></li>
+ </ul>
+ </div>
+ <div class="large-12 columns show-for-large-up">
+ <?php get_template_part('parts/top-bar');?>
+ </div>
+ </div>
+ </div>
+ </div>
+ </header>
+ <?php get_template_part('parts/tab-bar');?>
+ <?php get_template_part('parts/off-canvas-menu');?>
--- /dev/null
+<?php get_header(); ?>
+<main class="blog-home">
+<!-- <article <?php // post_class() ?> id="interior-featured">
+ <?php // GLM_get_header(); ?>
+ </article> -->
+ <div class="row">
+ <div id="blog-posts-over" class="small-12 medium-9 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <div class="row content blog-posts-container">
+ <div class="small-11 small-centered columns">
+ <article id="<?php the_ID()?>" <?php post_class()?>>
+ <header class="entry-header">
+ <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
+ <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
+ </header>
+ <?php echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
+ <!--the_advanced_excerpt('length=200&length_type=words&no_custom=1&ellipsis=%26hellip;');-->
+ <!-- This could be wrapped in php tags and be functional,
+ but it is easier to change this in admin side-->
+ <footer class="entry-meta small-12 medium-6 medium-push-3 center">
+ <?php $post_categories = wp_get_post_categories( get_the_ID() );
+ $cats = array();
+ echo 'This entry was posted ';
+ if (has_category()) {
+ echo 'in';
+ foreach($post_categories as $c){
+ $cat = get_category( $c );
+ $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
+ echo ', <a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>';
+ }
+ echo '.';
+ }
+ ?>
+ </footer>
+ </article>
+ </div>
+ </div>
+ <?php endwhile; ?>
+ <div class="navigation">
+ <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+ </div><!-- /.navigation -->
+ <?php else: ?>
+ <div id="post-404" class="noposts">
+ <p><?php _e('Sorry, no results were found.');?></p>
+ </div><!-- /#post-404 -->
+ <?php endif;?>
+ </div>
+ <?php get_template_part('parts/blog-sidebar-r'); ?>
+ </div>
+ <?php get_footer(); ?>
+
+
+
--- /dev/null
+<!doctype html>
+<html class="no-js" lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>wp-title</title>
+ <link rel="stylesheet" href="css/app.css">
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
+ <link href='http://fonts.googleapis.com/css?family=Crimson+Text:600italic' rel='stylesheet' type='text/css'>
+ <script src="bower_components/modernizr/modernizr.js"></script>
+ </head>
+ <body>
+ <div class="off-canvas-wrap" data-offcanvas>
+ <div class="inner-wrap">
+ <div id="page-wrapper">
+ <div class="shadow-wrapper">
+ <header>
+ <div class="row">
+ <div class="medium-4 columns show-for-medium-only">
+ <a href="#"><img src="assets/logo.png"></a>
+ </div>
+ <div class="small-12 columns show-for-small-down text-center">
+ <a href="#"><img src="assets/logo.png"></a>
+ </div>
+ </div>
+ <div class="row">
+ <nav class="top-bar show-for-large-up" data-topbar role="navigation">
+ <section class="top-bar-section">
+ <ul>
+ <li id="logo"><a href="#"><img src="assets/logo.png"></a></li>
+ <li class="has-dropdown"><a href="#">About Us</a>
+ <ul class="dropdown">
+ <li><a href="#">Our People</a></li>
+ <li><a href="#">Our Equipment</a></li>
+ <li><a href="#">Our Facilities</a></li>
+ <li><a href="#">Our Jobs</a></li>
+ <li><a href="#">Other Resources</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a href="#">Services & Rates</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a href="#">Membership</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a>News</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a href="#">Clinics & Events</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a href="#">FAQ</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ </ul>
+ </section>
+ </nav>
+ <nav class="tab-bar show-for-medium-down">
+ <section class="left-small">
+ <a class="left-off-canvas-toggle menu-icon" href="#"><span>Menu</span></a>
+ </section>
+ </nav>
+ </div>
+ <aside class="left-off-canvas-menu hide-for-large-up">
+ <ul class="left-off-canvas-list">
+ <li class="has-dropdown"><a href="#">About Us</a>
+ <ul class="dropdown">
+ <li><a href="#">Our People</a></li>
+ <li><a href="#">Our Equipment</a></li>
+ <li><a href="#">Our Facilities</a></li>
+ <li><a href="#">Our Jobs</a></li>
+ <li><a href="#">Other Resources</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a href="#">Services & Rates</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a href="#">Membership</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a>News</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a href="#">Clinics & Events</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ <li class="has-dropdown"><a href="#">FAQ</a>
+ <ul class="dropdown">
+ <li><a href="#">Sub-Nav 1</a></li>
+ <li><a href="#">Sub-Nav 2</a></li>
+ <li><a href="#">Sub-Nav 3</a></li>
+ <li><a href="#">Sub-Nav 4</a></li>
+ </ul>
+ </li>
+ </ul>
+ </aside>
+ </header>
+ <main>
+ <div class="row">
+ <div id="slideshow">
+ <img src="http://placehold.it/1000x400">
+ <div class="medium-4 columns show-for-medium-up" id="slide_descrip">
+ <p>Img description here.</p>
+ </div>
+ </div>
+ </div>
+ <div id="content-wrapper">
+ <div class="row"><!-- Blocks -->
+ <div class="small-12 large-4 columns small-text-center large-text-left blocks">
+ <img src="http://placehold.it/267x193">
+ <h1>State Licensed</h1>
+ <p>Just 74 days after the Emmet County Board of Commissioners gave their approval for the County to assume EMS services, the state has put its stamp of approval on the operations as well.</p><a href="#">Read More...</a>
+ </div>
+ <div class="small-12 large-4 columns small-text-center large-text-left blocks">
+ <img src="http://placehold.it/267x193">
+ <h1>New M-119 Location</h1>
+ <p>Emmet County continues to move forward on its new facility to house the ambulances and related equipment currently being constructed on M-119, near Pleasantview Road.</p><a href="#">Read More...</a>
+ </div>
+ <div class="small-12 large-4 columns small-text-center large-text-left blocks">
+ <img src="http://placehold.it/267x193">
+ <h1>New Rig</h1>
+ <p>Progress is being made in Emmet County’s efforts to provide ambulance services in Northwest Michigan, with the arrival of one of several new ambulances Oct. 9 in Petoskey.</p><a href="#">Read More...</a>
+ </div>
+ </div><!-- END Blocks -->
+ <div class="row">
+ <div id="main-content" class="small-12 large-8 columns">
+ <h1>Title Here</h1>
+ <p>Doluptur sinis nihic teturitat id que prorro incturem dem volorit atiume ped mi, cusci rest voluptatium qui consedi odigeni musdae. Ipsa suntum quaecab il explia voluptam harum conet harupturit pratio que cum et litium lis sernatur sunt, ommolup tatiam hillam ratur? Acea verum in natet laut id moloremped et volupic iisqui ressin cus, venditia corum, con re sunt.<br><br>
+ Quias eos et porerciis in nienihi lligeni ssiminu sapicienet volut a amus di cullat pa sin re pre voluptas adicitibus peris cum anti idem eiusani moluptatium aria doloribus, cus.<br><br>
+ Abores eossumq uuntissum apienis doluptae quasit lam, nonseque nus exce rrum commoluptat quas volorempos quassu magnatium nonsect inverfe ratassint quaerro viderro renihicti apid esto blaciet eum quae ius magnihi lluptas que volupt quid ute porem.</p>
+ </div>
+ <div class="small-12 large-4 columns small-text-center large-text-left">
+ <h1>EMS Events</h1>
+ <img src="assets/calander.jpg">
+ </div>
+ </div>
+ </div>
+ <footer id="page-footer">
+ <div class="row">
+ <div id="footer_address" class="row small-centered small-11 medium-6 columns">
+ <h2></h2>
+ <span></span>
+ <span class="bullet"> • </span>
+ <span>, </span>
+ <span class="bullet"> • </span>
+ <span></span>
+ </div>
+ </div>
+ </footer>
+ </main>
+ </div><!--End of shadow-->
+ <div id="copyright" class="small-12 columns text-center">
+ <span>© 2015 </span>
+ <span class="bullet"> • </span>
+ <span>Produced by <a href="http://www.gaslightmedia.com">Gaslight Media</a></span>
+ <span class="bullet"> • </span>
+ <span>All Rights Reserved</span>
+ </div>
+ </div>
+ <a class="exit-off-canvas"></a>
+ </div><!--End of inner-wrap-->
+ </div><!--End of off-canvas-->
+ <script src="bower_components/jquery/dist/jquery.min.js"></script>
+ <script src="bower_components/foundation/js/foundation.min.js"></script>
+ <script src="js/app.js"></script>
+ </body>
+</html>
--- /dev/null
+<?php get_header(); ?>
+<main>
+ <div class="row">
+ <div id="slideshow">
+ <img src="assets/slid-rig.jpg">
+ <div class="medium-4 columns show-for-medium-up" id="slide_descrip">
+ <p>Img description here.</p>
+ </div>
+ </div>
+ </div>
+ <div id="content-wrapper">
+ <div class="row">
+ <div class="small-12 columns text-center Emer">
+ <h1>If this is an emergency, please call 9-1-1</h1>
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 large-4 columns small-text-center large-text-left blocks">
+ <img src="assets/licensed.jpg">
+ <h1>State Licensed</h1>
+ <p>Just 74 days after the Emmet County Board of Commissioners gave their approval for the County to assume EMS services, the state has put its stamp of approval on the operations as well.</p><a href="#">Read More...</a>
+ </div>
+ <div class="small-12 large-4 columns small-text-center large-text-left blocks">
+ <img src="assets/m-119.jpg">
+ <h1>New M-119 Location</h1>
+ <p>Emmet County continues to move forward on its new facility to house the ambulances and related equipment currently being constructed on M-119, near Pleasantview Road.</p><a href="#">Read More...</a>
+ </div>
+ <div class="small-12 large-4 columns small-text-center large-text-left blocks">
+ <img src="assets/rig.jpg">
+ <h1>New Rig</h1>
+ <p>Progress is being made in Emmet County’s efforts to provide ambulance services in Northwest Michigan, with the arrival of one of several new ambulances Oct. 9 in Petoskey.</p><a href="#">Read More...</a>
+ </div>
+ </div>
+ <div class="row">
+ <div id="main-content" class="small-12 large-8 columns">
+ <h1>Title Here</h1>
+ <p>Doluptur sinis nihic teturitat id que prorro incturem dem volorit atiume ped mi, cusci rest voluptatium qui consedi odigeni musdae. Ipsa suntum quaecab il explia voluptam harum conet harupturit pratio que cum et litium lis sernatur sunt, ommolup tatiam hillam ratur? Acea verum in natet laut id moloremped et volupic iisqui ressin cus, venditia corum, con re sunt.<br><br>
+Quias eos et porerciis in nienihi lligeni ssiminu sapicienet volut a amus di cullat pa sin re pre voluptas adicitibus peris cum anti idem eiusani moluptatium aria doloribus, cus.<br><br>
+Abores eossumq uuntissum apienis doluptae quasit lam, nonseque nus exce rrum commoluptat quas volorempos quassu magnatium nonsect inverfe ratassint quaerro viderro renihicti apid esto blaciet eum quae ius magnihi lluptas que volupt quid ute porem.</p>
+ </div>
+ <div class="small-12 large-4 columns small-text-center large-text-left">
+ <h1>EMS Events</h1>
+ <img src="<?php echo get_template_directory_uri(); ?>/assets/calander.jpg">
+ </div>
+ </div>
+ </div>
+<?php get_footer(); ?>
--- /dev/null
+/*
+ * To avoid conflicts, Wordpress tends to prefer jQuery being used over $.
+ * As long as this file is included, no such conflicts should arise. Ensure it
+ * is called before other .js files using $.
+ */
+var $=jQuery.noConflict();;!function(a,b,c,d){"use strict";function e(a){return("string"==typeof a||a instanceof String)&&(a=a.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g,"")),a}var f=function(b){for(var c=b.length,d=a("head");c--;)0===d.has("."+b[c]).length&&d.append('<meta class="'+b[c]+'" />')};f(["foundation-mq-small","foundation-mq-small-only","foundation-mq-medium","foundation-mq-medium-only","foundation-mq-large","foundation-mq-large-only","foundation-mq-xlarge","foundation-mq-xlarge-only","foundation-mq-xxlarge","foundation-data-attribute-namespace"]),a(function(){"undefined"!=typeof FastClick&&"undefined"!=typeof c.body&&FastClick.attach(c.body)});var g=function(b,d){if("string"==typeof b){if(d){var e;if(d.jquery){if(e=d[0],!e)return d}else e=d;return a(e.querySelectorAll(b))}return a(c.querySelectorAll(b))}return a(b,d)},h=function(a){var b=[];return a||b.push("data"),this.namespace.length>0&&b.push(this.namespace),b.push(this.name),b.join("-")},i=function(a){for(var b=a.split("-"),c=b.length,d=[];c--;)0!==c?d.push(b[c]):this.namespace.length>0?d.push(this.namespace,b[c]):d.push(b[c]);return d.reverse().join("-")},j=function(b,c){var d=this,e=function(){var e=g(this),f=!e.data(d.attr_name(!0)+"-init");e.data(d.attr_name(!0)+"-init",a.extend({},d.settings,c||b,d.data_options(e))),f&&d.events(this)};return g(this.scope).is("["+this.attr_name()+"]")?e.call(this.scope):g("["+this.attr_name()+"]",this.scope).each(e),"string"==typeof b?this[b].call(this,c):void 0},k=function(a,b){function c(){b(a[0])}function d(){if(this.one("load",c),/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var a=this.attr("src"),b=a.match(/\?/)?"&":"?";b+="random="+(new Date).getTime(),this.attr("src",a+b)}}return a.attr("src")?void(a[0].complete||4===a[0].readyState?c():d.call(a)):void c()};/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
+b.matchMedia||(b.matchMedia=function(){var a=b.styleMedia||b.media;if(!a){var d=c.createElement("style"),e=c.getElementsByTagName("script")[0],f=null;d.type="text/css",d.id="matchmediajs-test",e.parentNode.insertBefore(d,e),f="getComputedStyle"in b&&b.getComputedStyle(d,null)||d.currentStyle,a={matchMedium:function(a){var b="@media "+a+"{ #matchmediajs-test { width: 1px; } }";return d.styleSheet?d.styleSheet.cssText=b:d.textContent=b,"1px"===f.width}}}return function(b){return{matches:a.matchMedium(b||"all"),media:b||"all"}}}()),function(a){function c(){d&&(g(c),i&&a.fx.tick())}for(var d,e=0,f=["webkit","moz"],g=b.requestAnimationFrame,h=b.cancelAnimationFrame,i="undefined"!=typeof a.fx;e<f.length&&!g;e++)g=b[f[e]+"RequestAnimationFrame"],h=h||b[f[e]+"CancelAnimationFrame"]||b[f[e]+"CancelRequestAnimationFrame"];g?(b.requestAnimationFrame=g,b.cancelAnimationFrame=h,i&&(a.fx.timer=function(b){b()&&a.timers.push(b)&&!d&&(d=!0,c())},a.fx.stop=function(){d=!1})):(b.requestAnimationFrame=function(a){var c=(new Date).getTime(),d=Math.max(0,16-(c-e)),f=b.setTimeout(function(){a(c+d)},d);return e=c+d,f},b.cancelAnimationFrame=function(a){clearTimeout(a)})}(a),b.Foundation={name:"Foundation",version:"5.5.2",media_queries:{small:g(".foundation-mq-small").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"small-only":g(".foundation-mq-small-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),medium:g(".foundation-mq-medium").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"medium-only":g(".foundation-mq-medium-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),large:g(".foundation-mq-large").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"large-only":g(".foundation-mq-large-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xlarge:g(".foundation-mq-xlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"xlarge-only":g(".foundation-mq-xlarge-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xxlarge:g(".foundation-mq-xxlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,"")},stylesheet:a("<style></style>").appendTo("head")[0].sheet,global:{namespace:d},init:function(a,c,d,e,f){var h=[a,d,e,f],i=[];if(this.rtl=/rtl/i.test(g("html").attr("dir")),this.scope=a||this.scope,this.set_namespace(),c&&"string"==typeof c&&!/reflow/i.test(c))this.libs.hasOwnProperty(c)&&i.push(this.init_lib(c,h));else for(var j in this.libs)i.push(this.init_lib(j,c));return g(b).load(function(){g(b).trigger("resize.fndtn.clearing").trigger("resize.fndtn.dropdown").trigger("resize.fndtn.equalizer").trigger("resize.fndtn.interchange").trigger("resize.fndtn.joyride").trigger("resize.fndtn.magellan").trigger("resize.fndtn.topbar").trigger("resize.fndtn.slider")}),a},init_lib:function(b,c){return this.libs.hasOwnProperty(b)?(this.patch(this.libs[b]),c&&c.hasOwnProperty(b)?("undefined"!=typeof this.libs[b].settings?a.extend(!0,this.libs[b].settings,c[b]):"undefined"!=typeof this.libs[b].defaults&&a.extend(!0,this.libs[b].defaults,c[b]),this.libs[b].init.apply(this.libs[b],[this.scope,c[b]])):(c=c instanceof Array?c:new Array(c),this.libs[b].init.apply(this.libs[b],c))):function(){}},patch:function(a){a.scope=this.scope,a.namespace=this.global.namespace,a.rtl=this.rtl,a.data_options=this.utils.data_options,a.attr_name=h,a.add_namespace=i,a.bindings=j,a.S=this.utils.S},inherit:function(a,b){for(var c=b.split(" "),d=c.length;d--;)this.utils.hasOwnProperty(c[d])&&(a[c[d]]=this.utils[c[d]])},set_namespace:function(){var b=this.global.namespace===d?a(".foundation-data-attribute-namespace").css("font-family"):this.global.namespace;this.global.namespace=b===d||/false/i.test(b)?"":b},libs:{},utils:{S:g,throttle:function(a,b){var c=null;return function(){var d=this,e=arguments;null==c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}},debounce:function(a,b,c){var d,e;return function(){var f=this,g=arguments,h=function(){d=null,c||(e=a.apply(f,g))},i=c&&!d;return clearTimeout(d),d=setTimeout(h,b),i&&(e=a.apply(f,g)),e}},data_options:function(b,c){function d(a){return!isNaN(a-0)&&null!==a&&""!==a&&a!==!1&&a!==!0}function e(b){return"string"==typeof b?a.trim(b):b}c=c||"options";var f,g,h,i={},j=function(a){var b=Foundation.global.namespace;return a.data(b.length>0?b+"-"+c:c)},k=j(b);if("object"==typeof k)return k;for(h=(k||":").split(";"),f=h.length;f--;)g=h[f].split(":"),g=[g[0],g.slice(1).join(":")],/true/i.test(g[1])&&(g[1]=!0),/false/i.test(g[1])&&(g[1]=!1),d(g[1])&&(-1===g[1].indexOf(".")?g[1]=parseInt(g[1],10):g[1]=parseFloat(g[1])),2===g.length&&g[0].length>0&&(i[e(g[0])]=e(g[1]));return i},register_media:function(b,c){Foundation.media_queries[b]===d&&(a("head").append('<meta class="'+c+'"/>'),Foundation.media_queries[b]=e(a("."+c).css("font-family")))},add_custom_rule:function(a,b){if(b===d&&Foundation.stylesheet)Foundation.stylesheet.insertRule(a,Foundation.stylesheet.cssRules.length);else{var c=Foundation.media_queries[b];c!==d&&Foundation.stylesheet.insertRule("@media "+Foundation.media_queries[b]+"{ "+a+" }",Foundation.stylesheet.cssRules.length)}},image_loaded:function(a,b){function c(a){for(var b=a.length,c=b-1;c>=0;c--)if(a.attr("height")===d)return!1;return!0}var e=this,f=a.length;(0===f||c(a))&&b(a),a.each(function(){k(e.S(this),function(){f-=1,0===f&&b(a)})})},random_str:function(){return this.fidx||(this.fidx=0),this.prefix=this.prefix||[this.name||"F",(+new Date).toString(36)].join("-"),this.prefix+(this.fidx++).toString(36)},match:function(a){return b.matchMedia(a).matches},is_small_up:function(){return this.match(Foundation.media_queries.small)},is_medium_up:function(){return this.match(Foundation.media_queries.medium)},is_large_up:function(){return this.match(Foundation.media_queries.large)},is_xlarge_up:function(){return this.match(Foundation.media_queries.xlarge)},is_xxlarge_up:function(){return this.match(Foundation.media_queries.xxlarge)},is_small_only:function(){return!(this.is_medium_up()||this.is_large_up()||this.is_xlarge_up()||this.is_xxlarge_up())},is_medium_only:function(){return this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_large_only:function(){return this.is_medium_up()&&this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_xlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&!this.is_xxlarge_up()},is_xxlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&this.is_xxlarge_up()}}},a.fn.foundation=function(){var a=Array.prototype.slice.call(arguments,0);return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(a)),this})}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.abide={name:"abide",version:"5.5.2",settings:{live_validate:!0,validate_on_blur:!0,focus_on_invalid:!0,error_labels:!0,error_class:"error",timeout:1e3,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},validators:{equalTo:function(a,b,d){var e=c.getElementById(a.getAttribute(this.add_namespace("data-equalto"))).value,f=a.value,g=e===f;return g}}},timer:null,init:function(a,b,c){this.bindings(b,c)},events:function(b){function c(a,b){clearTimeout(d.timer),d.timer=setTimeout(function(){d.validate([a],b)}.bind(a),f.timeout)}var d=this,e=d.S(b).attr("novalidate","novalidate"),f=e.data(this.attr_name(!0)+"-init")||{};this.invalid_attr=this.add_namespace("data-invalid"),e.off(".abide").on("submit.fndtn.abide",function(a){var b=/ajax/i.test(d.S(this).attr(d.attr_name()));return d.validate(d.S(this).find("input, textarea, select").not(":hidden, [data-abide-ignore]").get(),a,b)}).on("validate.fndtn.abide",function(a){"manual"===f.validate_on&&d.validate([a.target],a)}).on("reset",function(b){return d.reset(a(this),b)}).find("input, textarea, select").not(":hidden, [data-abide-ignore]").off(".abide").on("blur.fndtn.abide change.fndtn.abide",function(a){f.validate_on_blur&&f.validate_on_blur===!0&&c(this,a),"change"===f.validate_on&&c(this,a)}).on("keydown.fndtn.abide",function(a){f.live_validate&&f.live_validate===!0&&9!=a.which&&c(this,a),"tab"===f.validate_on&&9===a.which?c(this,a):"change"===f.validate_on&&c(this,a)}).on("focus",function(b){navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)&&a("html, body").animate({scrollTop:a(b.target).offset().top},100)})},reset:function(b,c){var d=this;b.removeAttr(d.invalid_attr),a("["+d.invalid_attr+"]",b).removeAttr(d.invalid_attr),a("."+d.settings.error_class,b).not("small").removeClass(d.settings.error_class),a(":input",b).not(":button, :submit, :reset, :hidden, [data-abide-ignore]").val("").removeAttr(d.invalid_attr)},validate:function(a,b,c){for(var d=this.parse_patterns(a),e=d.length,f=this.S(a[0]).closest("form"),g=/submit/.test(b.type),h=0;e>h;h++)if(!d[h]&&(g||c))return this.settings.focus_on_invalid&&a[h].focus(),f.trigger("invalid.fndtn.abide"),this.S(a[h]).closest("form").attr(this.invalid_attr,""),!1;return(g||c)&&f.trigger("valid.fndtn.abide"),f.removeAttr(this.invalid_attr),c?!1:!0},parse_patterns:function(a){for(var b=a.length,c=[];b--;)c.push(this.pattern(a[b]));return this.check_validation_and_apply_styles(c)},pattern:function(a){var b=a.getAttribute("type"),c="string"==typeof a.getAttribute("required"),d=a.getAttribute("pattern")||"";return this.settings.patterns.hasOwnProperty(d)&&d.length>0?[a,this.settings.patterns[d],c]:d.length>0?[a,new RegExp(d),c]:this.settings.patterns.hasOwnProperty(b)?[a,this.settings.patterns[b],c]:(d=/.*/,[a,d,c])},check_validation_and_apply_styles:function(b){var c=b.length,d=[],e=this.S(b[0][0]).closest("[data-"+this.attr_name(!0)+"]");for(e.data(this.attr_name(!0)+"-init")||{};c--;){var f,g,h=b[c][0],i=b[c][2],j=h.value.trim(),k=this.S(h).parent(),l=h.getAttribute(this.add_namespace("data-abide-validator")),m="radio"===h.type,n="checkbox"===h.type,o=this.S('label[for="'+h.getAttribute("id")+'"]'),p=i?h.value.length>0:!0,q=[];if(h.getAttribute(this.add_namespace("data-equalto"))&&(l="equalTo"),f=k.is("label")?k.parent():k,m&&i)q.push(this.valid_radio(h,i));else if(n&&i)q.push(this.valid_checkbox(h,i));else if(l){for(var r=l.split(" "),s=!0,t=!0,u=0;u<r.length;u++)g=this.settings.validators[r[u]].apply(this,[h,i,f]),q.push(g),t=g&&s,s=g;t?(this.S(h).removeAttr(this.invalid_attr),f.removeClass("error"),o.length>0&&this.settings.error_labels&&o.removeClass(this.settings.error_class).removeAttr("role"),a(h).triggerHandler("valid")):(this.S(h).attr(this.invalid_attr,""),f.addClass("error"),o.length>0&&this.settings.error_labels&&o.addClass(this.settings.error_class).attr("role","alert"),a(h).triggerHandler("invalid"))}else if(q.push(b[c][1].test(j)&&p||!i&&h.value.length<1||a(h).attr("disabled")?!0:!1),q=[q.every(function(a){return a})],q[0])this.S(h).removeAttr(this.invalid_attr),h.setAttribute("aria-invalid","false"),h.removeAttribute("aria-describedby"),f.removeClass(this.settings.error_class),o.length>0&&this.settings.error_labels&&o.removeClass(this.settings.error_class).removeAttr("role"),a(h).triggerHandler("valid");else{this.S(h).attr(this.invalid_attr,""),h.setAttribute("aria-invalid","true");var v=f.find("small."+this.settings.error_class,"span."+this.settings.error_class),w=v.length>0?v[0].id:"";w.length>0&&h.setAttribute("aria-describedby",w),f.addClass(this.settings.error_class),o.length>0&&this.settings.error_labels&&o.addClass(this.settings.error_class).attr("role","alert"),a(h).triggerHandler("invalid")}d=d.concat(q)}return d},valid_checkbox:function(b,c){var b=this.S(b),d=b.is(":checked")||!c||b.get(0).getAttribute("disabled");return d?(b.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class),a(b).triggerHandler("valid")):(b.attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),a(b).triggerHandler("invalid")),d},valid_radio:function(b,c){for(var d=b.getAttribute("name"),e=this.S(b).closest("[data-"+this.attr_name(!0)+"]").find("[name='"+d+"']"),f=e.length,g=!1,h=!1,i=0;f>i;i++)e[i].getAttribute("disabled")?(h=!0,g=!0):e[i].checked?g=!0:h&&(g=!1);for(var i=0;f>i;i++)g?(this.S(e[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class),a(e[i]).triggerHandler("valid")):(this.S(e[i]).attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),a(e[i]).triggerHandler("invalid"));return g},valid_equal:function(a,b,d){var e=c.getElementById(a.getAttribute(this.add_namespace("data-equalto"))).value,f=a.value,g=e===f;return g?(this.S(a).removeAttr(this.invalid_attr),d.removeClass(this.settings.error_class),label.length>0&&settings.error_labels&&label.removeClass(this.settings.error_class)):(this.S(a).attr(this.invalid_attr,""),d.addClass(this.settings.error_class),label.length>0&&settings.error_labels&&label.addClass(this.settings.error_class)),g},valid_oneof:function(a,b,c,d){var a=this.S(a),e=this.S("["+this.add_namespace("data-oneof")+"]"),f=e.filter(":checked").length>0;if(f?a.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class):a.attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),!d){var g=this;e.each(function(){g.valid_oneof.call(g,this,null,null,!0)})}return f},reflow:function(a,b){var c=this,d=c.S("["+this.attr_name()+"]").attr("novalidate","novalidate");c.S(d).each(function(a,b){c.events(b)})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.accordion={name:"accordion",version:"5.5.2",settings:{content_class:"content",active_class:"active",multi_expand:!1,toggleable:!0,callback:function(){}},init:function(a,b,c){this.bindings(b,c)},events:function(b){var c=this,d=this.S;c.create(this.S(b)),d(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion","["+this.attr_name()+"] > dd > a, ["+this.attr_name()+"] > li > a",function(b){var e=d(this).closest("["+c.attr_name()+"]"),f=c.attr_name()+"="+e.attr(c.attr_name()),g=e.data(c.attr_name(!0)+"-init")||c.settings,h=d("#"+this.href.split("#")[1]),i=a("> dd, > li",e),j=i.children("."+g.content_class),k=j.filter("."+g.active_class);return b.preventDefault(),e.attr(c.attr_name())&&(j=j.add("["+f+"] dd > ."+g.content_class+", ["+f+"] li > ."+g.content_class),i=i.add("["+f+"] dd, ["+f+"] li")),g.toggleable&&h.is(k)?(h.parent("dd, li").toggleClass(g.active_class,!1),h.toggleClass(g.active_class,!1),d(this).attr("aria-expanded",function(a,b){return"true"===b?"false":"true"}),g.callback(h),h.triggerHandler("toggled",[e]),void e.triggerHandler("toggled",[h])):(g.multi_expand||(j.removeClass(g.active_class),i.removeClass(g.active_class),i.children("a").attr("aria-expanded","false")),h.addClass(g.active_class).parent().addClass(g.active_class),g.callback(h),h.triggerHandler("toggled",[e]),e.triggerHandler("toggled",[h]),void d(this).attr("aria-expanded","true"))})},create:function(b){var c=this,d=b,e=a("> .accordion-navigation",d),f=d.data(c.attr_name(!0)+"-init")||c.settings;e.children("a").attr("aria-expanded","false"),e.has("."+f.content_class+"."+f.active_class).children("a").attr("aria-expanded","true"),f.multi_expand&&b.attr("aria-multiselectable","true")},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.alert={name:"alert",version:"5.5.2",settings:{callback:function(){}},init:function(a,b,c){this.bindings(b,c)},events:function(){var b=this,c=this.S;a(this.scope).off(".alert").on("click.fndtn.alert","["+this.attr_name()+"] .close",function(a){var d=c(this).closest("["+b.attr_name()+"]"),e=d.data(b.attr_name(!0)+"-init")||b.settings;a.preventDefault(),Modernizr.csstransitions?(d.addClass("alert-close"),d.on("transitionend webkitTransitionEnd oTransitionEnd",function(a){c(this).trigger("close.fndtn.alert").remove(),e.callback()})):d.fadeOut(300,function(){c(this).trigger("close.fndtn.alert").remove(),e.callback()})})},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.clearing={name:"clearing",version:"5.5.2",settings:{templates:{viewing:'<a href="#" class="clearing-close">×</a><div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" /><p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a><a href="#" class="clearing-main-next"><span></span></a></div><img class="clearing-preload-next" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" /><img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'},close_selectors:".clearing-close, div.clearing-blackout",open_selectors:"",skip_selector:"",touch_label:"",init:!1,locked:!1},init:function(a,b,c){var d=this;Foundation.inherit(this,"throttle image_loaded"),this.bindings(b,c),d.S(this.scope).is("["+this.attr_name()+"]")?this.assemble(d.S("li",this.scope)):d.S("["+this.attr_name()+"]",this.scope).each(function(){d.assemble(d.S("li",this))})},events:function(d){var e=this,f=e.S,g=a(".scroll-container");g.length>0&&(this.scope=g),f(this.scope).off(".clearing").on("click.fndtn.clearing","ul["+this.attr_name()+"] li "+this.settings.open_selectors,function(a,b,c){var b=b||f(this),c=c||b,d=b.next("li"),g=b.closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init"),h=f(a.target);a.preventDefault(),g||(e.init(),g=b.closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init")),c.hasClass("visible")&&b[0]===c[0]&&d.length>0&&e.is_open(b)&&(c=d,h=f("img",c)),e.open(h,b,c),e.update_paddles(c)}).on("click.fndtn.clearing",".clearing-main-next",function(a){e.nav(a,"next")}).on("click.fndtn.clearing",".clearing-main-prev",function(a){e.nav(a,"prev")}).on("click.fndtn.clearing",this.settings.close_selectors,function(a){Foundation.libs.clearing.close(a,this)}),a(c).on("keydown.fndtn.clearing",function(a){e.keydown(a)}),f(b).off(".clearing").on("resize.fndtn.clearing",function(){e.resize()}),this.swipe_events(d)},swipe_events:function(a){var b=this,c=b.S;c(this.scope).on("touchstart.fndtn.clearing",".visible-img",function(a){a.touches||(a=a.originalEvent);var b={start_page_x:a.touches[0].pageX,start_page_y:a.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:d};c(this).data("swipe-transition",b),a.stopPropagation()}).on("touchmove.fndtn.clearing",".visible-img",function(a){if(a.touches||(a=a.originalEvent),!(a.touches.length>1||a.scale&&1!==a.scale)){var d=c(this).data("swipe-transition");if("undefined"==typeof d&&(d={}),d.delta_x=a.touches[0].pageX-d.start_page_x,Foundation.rtl&&(d.delta_x=-d.delta_x),"undefined"==typeof d.is_scrolling&&(d.is_scrolling=!!(d.is_scrolling||Math.abs(d.delta_x)<Math.abs(a.touches[0].pageY-d.start_page_y))),!d.is_scrolling&&!d.active){a.preventDefault();var e=d.delta_x<0?"next":"prev";d.active=!0,b.nav(a,e)}}}).on("touchend.fndtn.clearing",".visible-img",function(a){c(this).data("swipe-transition",{}),a.stopPropagation()})},assemble:function(b){var c=b.parent();if(!c.parent().hasClass("carousel")){c.after('<div id="foundationClearingHolder"></div>');var d=c.detach(),e="";if(null!=d[0]){e=d[0].outerHTML;var f=this.S("#foundationClearingHolder"),g=c.data(this.attr_name(!0)+"-init"),h={grid:'<div class="carousel">'+e+"</div>",viewing:g.templates.viewing},i='<div class="clearing-assembled"><div>'+h.viewing+h.grid+"</div></div>",j=this.settings.touch_label;Modernizr.touch&&(i=a(i).find(".clearing-touch-label").html(j).end()),f.after(i).remove()}}},open:function(b,d,e){function f(){setTimeout(function(){this.image_loaded(m,function(){1!==m.outerWidth()||o?g.call(this,m):f.call(this)}.bind(this))}.bind(this),100)}function g(b){var c=a(b);c.css("visibility","visible"),c.trigger("imageVisible"),i.css("overflow","hidden"),j.addClass("clearing-blackout"),k.addClass("clearing-container"),l.show(),this.fix_height(e).caption(h.S(".clearing-caption",l),h.S("img",e)).center_and_label(b,n).shift(d,e,function(){e.closest("li").siblings().removeClass("visible"),e.closest("li").addClass("visible")}),l.trigger("opened.fndtn.clearing")}var h=this,i=a(c.body),j=e.closest(".clearing-assembled"),k=h.S("div",j).first(),l=h.S(".visible-img",k),m=h.S("img",l).not(b),n=h.S(".clearing-touch-label",k),o=!1,p={};a("body").on("touchmove",function(a){a.preventDefault()}),m.error(function(){o=!0}),this.locked()||(l.trigger("open.fndtn.clearing"),p=this.load(b),p.interchange?m.attr("data-interchange",p.interchange).foundation("interchange","reflow"):m.attr("src",p.src).attr("data-interchange",""),m.css("visibility","hidden"),f.call(this))},close:function(b,d){b.preventDefault();var e,f,g=function(a){return/blackout/.test(a.selector)?a:a.closest(".clearing-blackout")}(a(d)),h=a(c.body);return d===b.target&&g&&(h.css("overflow",""),e=a("div",g).first(),f=a(".visible-img",e),f.trigger("close.fndtn.clearing"),this.settings.prev_index=0,a("ul["+this.attr_name()+"]",g).attr("style","").closest(".clearing-blackout").removeClass("clearing-blackout"),e.removeClass("clearing-container"),f.hide(),f.trigger("closed.fndtn.clearing")),a("body").off("touchmove"),!1},is_open:function(a){return a.parent().prop("style").length>0},keydown:function(b){var c=a(".clearing-blackout ul["+this.attr_name()+"]"),d=this.rtl?37:39,e=this.rtl?39:37,f=27;b.which===d&&this.go(c,"next"),b.which===e&&this.go(c,"prev"),b.which===f&&this.S("a.clearing-close").trigger("click.fndtn.clearing")},nav:function(b,c){var d=a("ul["+this.attr_name()+"]",".clearing-blackout");b.preventDefault(),this.go(d,c)},resize:function(){var b=a("img",".clearing-blackout .visible-img"),c=a(".clearing-touch-label",".clearing-blackout");b.length&&(this.center_and_label(b,c),b.trigger("resized.fndtn.clearing"))},fix_height:function(a){var b=a.parent().children(),c=this;return b.each(function(){var a=c.S(this),b=a.find("img");a.height()>b.outerHeight()&&a.addClass("fix-height")}).closest("ul").width(100*b.length+"%"),this},update_paddles:function(a){a=a.closest("li");var b=a.closest(".carousel").siblings(".visible-img");a.next().length>0?this.S(".clearing-main-next",b).removeClass("disabled"):this.S(".clearing-main-next",b).addClass("disabled"),a.prev().length>0?this.S(".clearing-main-prev",b).removeClass("disabled"):this.S(".clearing-main-prev",b).addClass("disabled")},center_and_label:function(a,b){return b.css(!this.rtl&&b.length>0?{marginLeft:-(b.outerWidth()/2),marginTop:-(a.outerHeight()/2)-b.outerHeight()-10}:{marginRight:-(b.outerWidth()/2),marginTop:-(a.outerHeight()/2)-b.outerHeight()-10,left:"auto",right:"50%"}),this},load:function(a){var b,c,d;return"A"===a[0].nodeName?(b=a.attr("href"),c=a.data("clearing-interchange")):(d=a.closest("a"),b=d.attr("href"),c=d.data("clearing-interchange")),this.preload(a),{src:b?b:a.attr("src"),interchange:b?c:a.data("clearing-interchange")}},preload:function(a){this.img(a.closest("li").next(),"next").img(a.closest("li").prev(),"prev")},img:function(b,c){if(b.length){var d,e,f,g=a(".clearing-preload-"+c),h=this.S("a",b);h.length?(d=h.attr("href"),e=h.data("clearing-interchange")):(f=this.S("img",b),d=f.attr("src"),e=f.data("clearing-interchange")),e?g.attr("data-interchange",e):(g.attr("src",d),g.attr("data-interchange",""))}return this},caption:function(a,b){var c=b.attr("data-caption");return c?a.html(c).show():a.text("").hide(),this},go:function(a,b){var c=this.S(".visible",a),d=c[b]();this.settings.skip_selector&&0!=d.find(this.settings.skip_selector).length&&(d=d[b]()),d.length&&this.S("img",d).trigger("click.fndtn.clearing",[c,d]).trigger("change.fndtn.clearing")},shift:function(a,b,c){var d,e=b.parent(),f=this.settings.prev_index||b.index(),g=this.direction(e,a,b),h=this.rtl?"right":"left",i=parseInt(e.css("left"),10),j=b.outerWidth(),k={};b.index()===f||/skip/.test(g)?/skip/.test(g)&&(d=b.index()-this.settings.up_count,this.lock(),d>0?(k[h]=-(d*j),e.animate(k,300,this.unlock())):(k[h]=0,e.animate(k,300,this.unlock()))):/left/.test(g)?(this.lock(),k[h]=i+j,e.animate(k,300,this.unlock())):/right/.test(g)&&(this.lock(),k[h]=i-j,e.animate(k,300,this.unlock())),c()},direction:function(a,b,c){var d,e=this.S("li",a),f=e.outerWidth()+e.outerWidth()/4,g=Math.floor(this.S(".clearing-container").outerWidth()/f)-1,h=e.index(c);return this.settings.up_count=g,d=this.adjacent(this.settings.prev_index,h)?h>g&&h>this.settings.prev_index?"right":h>g-1&&h<=this.settings.prev_index?"left":!1:"skip",this.settings.prev_index=h,d},adjacent:function(a,b){for(var c=b+1;c>=b-1;c--)if(c===a)return!0;return!1},lock:function(){this.settings.locked=!0},unlock:function(){this.settings.locked=!1},locked:function(){return this.settings.locked},off:function(){this.S(this.scope).off(".fndtn.clearing"),this.S(b).off(".fndtn.clearing")},reflow:function(){this.init()}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"5.5.2",settings:{active_class:"open",disabled_class:"disabled",mega_class:"mega",align:"bottom",is_hover:!1,hover_timeout:150,opened:function(){},closed:function(){}},init:function(b,c,d){Foundation.inherit(this,"throttle"),a.extend(!0,this.settings,c,d),this.bindings(c,d)},events:function(d){var e=this,f=e.S;f(this.scope).off(".dropdown").on("click.fndtn.dropdown","["+this.attr_name()+"]",function(b){var c=f(this).data(e.attr_name(!0)+"-init")||e.settings;(!c.is_hover||Modernizr.touch)&&(b.preventDefault(),f(this).parent("[data-reveal-id]").length&&b.stopPropagation(),e.toggle(a(this)))}).on("mouseenter.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(a){var b,c,d=f(this);clearTimeout(e.timeout),d.data(e.data_attr())?(b=f("#"+d.data(e.data_attr())),c=d):(b=d,c=f("["+e.attr_name()+'="'+b.attr("id")+'"]'));var g=c.data(e.attr_name(!0)+"-init")||e.settings;f(a.currentTarget).data(e.data_attr())&&g.is_hover&&e.closeall.call(e),g.is_hover&&e.open.apply(e,[b,c])}).on("mouseleave.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(a){var b,c=f(this);if(c.data(e.data_attr()))b=c.data(e.data_attr(!0)+"-init")||e.settings;else var d=f("["+e.attr_name()+'="'+f(this).attr("id")+'"]'),b=d.data(e.attr_name(!0)+"-init")||e.settings;e.timeout=setTimeout(function(){c.data(e.data_attr())?b.is_hover&&e.close.call(e,f("#"+c.data(e.data_attr()))):b.is_hover&&e.close.call(e,c)}.bind(this),b.hover_timeout)}).on("click.fndtn.dropdown",function(b){var d=f(b.target).closest("["+e.attr_name()+"-content]"),g=d.find("a");return g.length>0&&"false"!==d.attr("aria-autoclose")&&e.close.call(e,f("["+e.attr_name()+"-content]")),b.target!==c&&!a.contains(c.documentElement,b.target)||f(b.target).closest("["+e.attr_name()+"]").length>0?void 0:!f(b.target).data("revealId")&&d.length>0&&(f(b.target).is("["+e.attr_name()+"-content]")||a.contains(d.first()[0],b.target))?void b.stopPropagation():void e.close.call(e,f("["+e.attr_name()+"-content]"))}).on("opened.fndtn.dropdown","["+e.attr_name()+"-content]",function(){e.settings.opened.call(this)}).on("closed.fndtn.dropdown","["+e.attr_name()+"-content]",function(){e.settings.closed.call(this)}),f(b).off(".dropdown").on("resize.fndtn.dropdown",e.throttle(function(){e.resize.call(e)},50)),this.resize()},close:function(b){var c=this;b.each(function(d){var e=a("["+c.attr_name()+"="+b[d].id+"]")||a("aria-controls="+b[d].id+"]");e.attr("aria-expanded","false"),c.S(this).hasClass(c.settings.active_class)&&(c.S(this).css(Foundation.rtl?"right":"left","-99999px").attr("aria-hidden","true").removeClass(c.settings.active_class).prev("["+c.attr_name()+"]").removeClass(c.settings.active_class).removeData("target"),c.S(this).trigger("closed.fndtn.dropdown",[b]))}),b.removeClass("f-open-"+this.attr_name(!0))},closeall:function(){var b=this;a.each(b.S(".f-open-"+this.attr_name(!0)),function(){b.close.call(b,b.S(this))})},open:function(a,b){this.css(a.addClass(this.settings.active_class),b),a.prev("["+this.attr_name()+"]").addClass(this.settings.active_class),a.data("target",b.get(0)).trigger("opened.fndtn.dropdown",[a,b]),a.attr("aria-hidden","false"),b.attr("aria-expanded","true"),a.focus(),a.addClass("f-open-"+this.attr_name(!0))},data_attr:function(){return this.namespace.length>0?this.namespace+"-"+this.name:this.name},toggle:function(a){if(!a.hasClass(this.settings.disabled_class)){var b=this.S("#"+a.data(this.data_attr()));0!==b.length&&(this.close.call(this,this.S("["+this.attr_name()+"-content]").not(b)),b.hasClass(this.settings.active_class)?(this.close.call(this,b),b.data("target")!==a.get(0)&&this.open.call(this,b,a)):this.open.call(this,b,a))}},resize:function(){var b=this.S("["+this.attr_name()+"-content].open"),c=a(b.data("target"));b.length&&c.length&&this.css(b,c)},css:function(a,b){var c=Math.max((b.width()-a.width())/2,8),d=b.data(this.attr_name(!0)+"-init")||this.settings,e=a.parent().css("overflow-y")||a.parent().css("overflow");if(this.clear_idx(),this.small()){var f=this.dirs.bottom.call(a,b,d);a.attr("style","").removeClass("drop-left drop-right drop-top").css({position:"absolute",width:"95%","max-width":"none",top:f.top}),a.css(Foundation.rtl?"right":"left",c)}else if("visible"!==e){var g=b[0].offsetTop+b[0].offsetHeight;a.attr("style","").css({position:"absolute",top:g}),a.css(Foundation.rtl?"right":"left",c)}else this.style(a,b,d);return a},style:function(b,c,d){var e=a.extend({position:"absolute"},this.dirs[d.align].call(b,c,d));b.attr("style","").css(e)},dirs:{_base:function(a){var d=this.offsetParent(),e=d.offset(),f=a.offset();f.top-=e.top,f.left-=e.left,f.missRight=!1,f.missTop=!1,f.missLeft=!1,f.leftRightFlag=!1;var g;g=c.getElementsByClassName("row")[0]?c.getElementsByClassName("row")[0].clientWidth:b.innerWidth;var h=(b.innerWidth-g)/2,i=g;return this.hasClass("mega")||(a.offset().top<=this.outerHeight()&&(f.missTop=!0,i=b.innerWidth-h,f.leftRightFlag=!0),a.offset().left+this.outerWidth()>a.offset().left+h&&a.offset().left-h>this.outerWidth()&&(f.missRight=!0,f.missLeft=!1),a.offset().left-this.outerWidth()<=0&&(f.missLeft=!0,f.missRight=!1)),f},top:function(a,b){var c=Foundation.libs.dropdown,d=c.dirs._base.call(this,a);return this.addClass("drop-top"),1==d.missTop&&(d.top=d.top+a.outerHeight()+this.outerHeight(),this.removeClass("drop-top")),1==d.missRight&&(d.left=d.left-this.outerWidth()+a.outerWidth()),(a.outerWidth()<this.outerWidth()||c.small()||this.hasClass(b.mega_menu))&&c.adjust_pip(this,a,b,d),Foundation.rtl?{left:d.left-this.outerWidth()+a.outerWidth(),top:d.top-this.outerHeight()}:{left:d.left,top:d.top-this.outerHeight()}},bottom:function(a,b){var c=Foundation.libs.dropdown,d=c.dirs._base.call(this,a);return 1==d.missRight&&(d.left=d.left-this.outerWidth()+a.outerWidth()),(a.outerWidth()<this.outerWidth()||c.small()||this.hasClass(b.mega_menu))&&c.adjust_pip(this,a,b,d),
+c.rtl?{left:d.left-this.outerWidth()+a.outerWidth(),top:d.top+a.outerHeight()}:{left:d.left,top:d.top+a.outerHeight()}},left:function(a,b){var c=Foundation.libs.dropdown.dirs._base.call(this,a);return this.addClass("drop-left"),1==c.missLeft&&(c.left=c.left+this.outerWidth(),c.top=c.top+a.outerHeight(),this.removeClass("drop-left")),{left:c.left-this.outerWidth(),top:c.top}},right:function(a,b){var c=Foundation.libs.dropdown.dirs._base.call(this,a);this.addClass("drop-right"),1==c.missRight?(c.left=c.left-this.outerWidth(),c.top=c.top+a.outerHeight(),this.removeClass("drop-right")):c.triggeredRight=!0;var d=Foundation.libs.dropdown;return(a.outerWidth()<this.outerWidth()||d.small()||this.hasClass(b.mega_menu))&&d.adjust_pip(this,a,b,c),{left:c.left+a.outerWidth(),top:c.top}}},adjust_pip:function(a,b,c,d){var e=Foundation.stylesheet,f=8;a.hasClass(c.mega_class)?f=d.left+b.outerWidth()/2-8:this.small()&&(f+=d.left-8),this.rule_idx=e.cssRules.length;var g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left: "+f+"px;",j="left: "+(f-1)+"px;";1==d.missRight&&(f=a.outerWidth()-23,g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left: "+f+"px;",j="left: "+(f-1)+"px;"),1==d.triggeredRight&&(g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left:-12px;",j="left:-14px;"),e.insertRule?(e.insertRule([g,"{",i,"}"].join(" "),this.rule_idx),e.insertRule([h,"{",j,"}"].join(" "),this.rule_idx+1)):(e.addRule(g,i,this.rule_idx),e.addRule(h,j,this.rule_idx+1))},clear_idx:function(){var a=Foundation.stylesheet;"undefined"!=typeof this.rule_idx&&(a.deleteRule(this.rule_idx),a.deleteRule(this.rule_idx),delete this.rule_idx)},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},off:function(){this.S(this.scope).off(".fndtn.dropdown"),this.S("html, body").off(".fndtn.dropdown"),this.S(b).off(".fndtn.dropdown"),this.S("[data-dropdown-content]").off(".fndtn.dropdown")},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.equalizer={name:"equalizer",version:"5.5.2",settings:{use_tallest:!0,before_height_change:a.noop,after_height_change:a.noop,equalize_on_stack:!1,act_on_hidden_el:!1},init:function(a,b,c){Foundation.inherit(this,"image_loaded"),this.bindings(b,c),this.reflow()},events:function(){this.S(b).off(".equalizer").on("resize.fndtn.equalizer",function(a){this.reflow()}.bind(this))},equalize:function(b){var c,d,e=!1,f=b.data("equalizer"),g=b.data(this.attr_name(!0)+"-init")||this.settings;if(c=b.find(g.act_on_hidden_el?f?"["+this.attr_name()+'-watch="'+f+'"]':"["+this.attr_name()+"-watch]":f?"["+this.attr_name()+'-watch="'+f+'"]:visible':"["+this.attr_name()+"-watch]:visible"),0!==c.length&&(g.before_height_change(),b.trigger("before-height-change.fndth.equalizer"),c.height("inherit"),g.equalize_on_stack!==!1||(d=c.first().offset().top,c.each(function(){return a(this).offset().top!==d?(e=!0,!1):void 0}),!e))){var h=c.map(function(){return a(this).outerHeight(!1)}).get();if(g.use_tallest){var i=Math.max.apply(null,h);c.css("height",i)}else{var j=Math.min.apply(null,h);c.css("height",j)}g.after_height_change(),b.trigger("after-height-change.fndtn.equalizer")}},reflow:function(){var b=this;this.S("["+this.attr_name()+"]",this.scope).each(function(){var c=a(this),d=c.data("equalizer-mq"),e=!0;d&&(d="is_"+d.replace(/-/g,"_"),Foundation.utils.hasOwnProperty(d)&&(e=!1)),b.image_loaded(b.S("img",this),function(){if(e||Foundation.utils[d]())b.equalize(c);else{var a=c.find("["+b.attr_name()+"-watch]:visible");a.css("height","auto")}})})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.interchange={name:"interchange",version:"5.5.2",cache:{},images_loaded:!1,nodes_loaded:!1,settings:{load_attr:"interchange",named_queries:{"default":"only screen",small:Foundation.media_queries.small,"small-only":Foundation.media_queries["small-only"],medium:Foundation.media_queries.medium,"medium-only":Foundation.media_queries["medium-only"],large:Foundation.media_queries.large,"large-only":Foundation.media_queries["large-only"],xlarge:Foundation.media_queries.xlarge,"xlarge-only":Foundation.media_queries["xlarge-only"],xxlarge:Foundation.media_queries.xxlarge,landscape:"only screen and (orientation: landscape)",portrait:"only screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx)"},directives:{replace:function(b,c,d){if(null!==b&&/IMG/.test(b[0].nodeName)){var e=b[0].src;if(new RegExp(c,"i").test(e))return;return b.attr("src",c),d(b[0].src)}var f=b.data(this.data_attr+"-last-path"),g=this;if(f!=c)return/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(c)?(a(b).css("background-image","url("+c+")"),b.data("interchange-last-path",c),d(c)):a.get(c,function(a){b.html(a),b.data(g.data_attr+"-last-path",c),d()})}}},init:function(b,c,d){Foundation.inherit(this,"throttle random_str"),this.data_attr=this.set_data_attr(),a.extend(!0,this.settings,c,d),this.bindings(c,d),this.reflow()},get_media_hash:function(){var a="";for(var b in this.settings.named_queries)a+=matchMedia(this.settings.named_queries[b]).matches.toString();return a},events:function(){var c,d=this;return a(b).off(".interchange").on("resize.fndtn.interchange",d.throttle(function(){var a=d.get_media_hash();a!==c&&d.resize(),c=a},50)),this},resize:function(){var b=this.cache;if(!this.images_loaded||!this.nodes_loaded)return void setTimeout(a.proxy(this.resize,this),50);for(var c in b)if(b.hasOwnProperty(c)){var d=this.results(c,b[c]);d&&this.settings.directives[d.scenario[1]].call(this,d.el,d.scenario[0],function(a){if(arguments[0]instanceof Array)var b=arguments[0];else var b=Array.prototype.slice.call(arguments,0);return function(){a.el.trigger(a.scenario[1],b)}}(d))}},results:function(a,b){var c=b.length;if(c>0)for(var d=this.S("["+this.add_namespace("data-uuid")+'="'+a+'"]');c--;){var e,f=b[c][2];if(e=matchMedia(this.settings.named_queries.hasOwnProperty(f)?this.settings.named_queries[f]:f),e.matches)return{el:d,scenario:b[c]}}return!1},load:function(a,b){return("undefined"==typeof this["cached_"+a]||b)&&this["update_"+a](),this["cached_"+a]},update_images:function(){var a=this.S("img["+this.data_attr+"]"),b=a.length,c=b,d=0,e=this.data_attr;for(this.cache={},this.cached_images=[],this.images_loaded=0===b;c--;){if(d++,a[c]){var f=a[c].getAttribute(e)||"";f.length>0&&this.cached_images.push(a[c])}d===b&&(this.images_loaded=!0,this.enhance("images"))}return this},update_nodes:function(){var a=this.S("["+this.data_attr+"]").not("img"),b=a.length,c=b,d=0,e=this.data_attr;for(this.cached_nodes=[],this.nodes_loaded=0===b;c--;){d++;var f=a[c].getAttribute(e)||"";f.length>0&&this.cached_nodes.push(a[c]),d===b&&(this.nodes_loaded=!0,this.enhance("nodes"))}return this},enhance:function(c){for(var d=this["cached_"+c].length;d--;)this.object(a(this["cached_"+c][d]));return a(b).trigger("resize.fndtn.interchange")},convert_directive:function(a){var b=this.trim(a);return b.length>0?b:"replace"},parse_scenario:function(a){var b=a[0].match(/(.+),\s*(\w+)\s*$/),c=a[1].match(/(.*)\)/);if(b)var d=b[1],e=b[2];else var f=a[0].split(/,\s*$/),d=f[0],e="";return[this.trim(d),this.convert_directive(e),this.trim(c[1])]},object:function(a){var b=this.parse_data_attr(a),c=[],d=b.length;if(d>0)for(;d--;){var e=b[d].split(/,\s?\(/);if(e.length>1){var f=this.parse_scenario(e);c.push(f)}}return this.store(a,c)},store:function(a,b){var c=this.random_str(),d=a.data(this.add_namespace("uuid",!0));return this.cache[d]?this.cache[d]:(a.attr(this.add_namespace("data-uuid"),c),this.cache[c]=b)},trim:function(b){return"string"==typeof b?a.trim(b):b},set_data_attr:function(a){return a?this.namespace.length>0?this.namespace+"-"+this.settings.load_attr:this.settings.load_attr:this.namespace.length>0?"data-"+this.namespace+"-"+this.settings.load_attr:"data-"+this.settings.load_attr},parse_data_attr:function(a){for(var b=a.attr(this.attr_name()).split(/\[(.*?)\]/),c=b.length,d=[];c--;)b[c].replace(/[\W\d]+/,"").length>4&&d.push(b[c]);return d},reflow:function(){this.load("images",!0),this.load("nodes",!0)}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.joyride={name:"joyride",version:"5.5.2",defaults:{expose:!1,modal:!0,keyboard:!0,tip_location:"bottom",nub_position:"auto",scroll_speed:1500,scroll_animation:"linear",timer:0,start_timer_on_click:!0,start_offset:0,next_button:!0,prev_button:!0,tip_animation:"fade",pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:!1,cookie_name:"joyride",cookie_domain:!1,cookie_expires:365,tip_container:"body",abort_on_close:!0,tip_location_patterns:{top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'<a href="#close" class="joyride-close-tip">×</a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',tip:'<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',wrapper:'<div class="joyride-content-wrapper"></div>',button:'<a href="#" class="small button joyride-next-tip"></a>',prev_button:'<a href="#" class="small button joyride-prev-tip"></a>',modal:'<div class="joyride-modal-bg"></div>',expose:'<div class="joyride-expose-wrapper"></div>',expose_cover:'<div class="joyride-expose-cover"></div>'},expose_add_class:""},init:function(b,c,d){Foundation.inherit(this,"throttle random_str"),this.settings=this.settings||a.extend({},this.defaults,d||c),this.bindings(c,d)},go_next:function(){this.settings.$li.next().length<1?this.end():this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(),this.startTimer()):(this.hide(),this.show())},go_prev:function(){this.settings.$li.prev().length<1||(this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(null,!0),this.startTimer()):(this.hide(),this.show(null,!0)))},events:function(){var c=this;a(this.scope).off(".joyride").on("click.fndtn.joyride",".joyride-next-tip, .joyride-modal-bg",function(a){a.preventDefault(),this.go_next()}.bind(this)).on("click.fndtn.joyride",".joyride-prev-tip",function(a){a.preventDefault(),this.go_prev()}.bind(this)).on("click.fndtn.joyride",".joyride-close-tip",function(a){a.preventDefault(),this.end(this.settings.abort_on_close)}.bind(this)).on("keyup.fndtn.joyride",function(a){if(this.settings.keyboard&&this.settings.riding)switch(a.which){case 39:a.preventDefault(),this.go_next();break;case 37:a.preventDefault(),this.go_prev();break;case 27:a.preventDefault(),this.end(this.settings.abort_on_close)}}.bind(this)),a(b).off(".joyride").on("resize.fndtn.joyride",c.throttle(function(){if(a("["+c.attr_name()+"]").length>0&&c.settings.$next_tip&&c.settings.riding){if(c.settings.exposed.length>0){var b=a(c.settings.exposed);b.each(function(){var b=a(this);c.un_expose(b),c.expose(b)})}c.is_phone()?c.pos_phone():c.pos_default(!1)}},100))},start:function(){var b=this,c=a("["+this.attr_name()+"]",this.scope),d=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],e=d.length;!c.length>0||(this.settings.init||this.events(),this.settings=c.data(this.attr_name(!0)+"-init"),this.settings.$content_el=c,this.settings.$body=a(this.settings.tip_container),this.settings.body_offset=a(this.settings.tip_container).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,this.settings.riding=!0,"function"!=typeof a.cookie&&(this.settings.cookie_monster=!1),(!this.settings.cookie_monster||this.settings.cookie_monster&&!a.cookie(this.settings.cookie_name))&&(this.settings.$tip_content.each(function(c){var f=a(this);this.settings=a.extend({},b.defaults,b.data_options(f));for(var g=e;g--;)b.settings[d[g]]=parseInt(b.settings[d[g]],10);b.create({$li:f,index:c})}),!this.settings.start_timer_on_click&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init")))},resume:function(){this.set_li(),this.show()},tip_template:function(b){var c,d;return b.tip_class=b.tip_class||"",c=a(this.settings.template.tip).addClass(b.tip_class),d=a.trim(a(b.li).html())+this.prev_button_text(b.prev_button_text,b.index)+this.button_text(b.button_text)+this.settings.template.link+this.timer_instance(b.index),c.append(a(this.settings.template.wrapper)),c.first().attr(this.add_namespace("data-index"),b.index),a(".joyride-content-wrapper",c).append(d),c[0]},timer_instance:function(b){var c;return c=0===b&&this.settings.start_timer_on_click&&this.settings.timer>0||0===this.settings.timer?"":a(this.settings.template.timer)[0].outerHTML},button_text:function(b){return this.settings.tip_settings.next_button?(b=a.trim(b)||"Next",b=a(this.settings.template.button).append(b)[0].outerHTML):b="",b},prev_button_text:function(b,c){return this.settings.tip_settings.prev_button?(b=a.trim(b)||"Previous",b=0==c?a(this.settings.template.prev_button).append(b).addClass("disabled")[0].outerHTML:a(this.settings.template.prev_button).append(b)[0].outerHTML):b="",b},create:function(b){this.settings.tip_settings=a.extend({},this.settings,this.data_options(b.$li));var c=b.$li.attr(this.add_namespace("data-button"))||b.$li.attr(this.add_namespace("data-text")),d=b.$li.attr(this.add_namespace("data-button-prev"))||b.$li.attr(this.add_namespace("data-prev-text")),e=b.$li.attr("class"),f=a(this.tip_template({tip_class:e,index:b.index,button_text:c,prev_button_text:d,li:b.$li}));a(this.settings.tip_container).append(f)},show:function(b,c){var e=null;if(this.settings.$li===d||-1===a.inArray(this.settings.$li.index(),this.settings.pause_after))if(this.settings.paused?this.settings.paused=!1:this.set_li(b,c),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0){if(b&&(this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tip_settings=a.extend({},this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location],!/body/i.test(this.settings.$target.selector)){var f=a(".joyride-modal-bg");/pop/i.test(this.settings.tipAnimation)?f.hide():f.fadeOut(this.settings.tipAnimationFadeSpeed),this.scroll_to()}this.is_phone()?this.pos_phone(!0):this.pos_default(!0),e=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tip_animation)?(e.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),setTimeout(function(){e.animate({width:e.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tip_animation)&&(e.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show(),setTimeout(function(){e.animate({width:e.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed)),this.settings.$current_tip=this.settings.$next_tip}else this.settings.$li&&this.settings.$target.length<1?this.show(b,c):this.end();else this.settings.paused=!0},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.modal||a(".joyride-modal-bg").hide(),this.settings.$current_tip.css("visibility","hidden"),setTimeout(a.proxy(function(){this.hide(),this.css("visibility","visible")},this.settings.$current_tip),0),this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(a,b){a?(this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset),this.set_next_tip(),this.settings.$current_tip=this.settings.$next_tip):(b?this.settings.$li=this.settings.$li.prev():this.settings.$li=this.settings.$li.next(),this.set_next_tip()),this.set_target()},set_next_tip:function(){this.settings.$next_tip=a(".joyride-tip-guide").eq(this.settings.$li.index()),this.settings.$next_tip.data("closed","")},set_target:function(){var b=this.settings.$li.attr(this.add_namespace("data-class")),d=this.settings.$li.attr(this.add_namespace("data-id")),e=function(){return d?a(c.getElementById(d)):b?a("."+b).first():a("body")};this.settings.$target=e()},scroll_to:function(){var c,d;c=a(b).height()/2,d=Math.ceil(this.settings.$target.offset().top-c+this.settings.$next_tip.outerHeight()),0!=d&&a("html, body").stop().animate({scrollTop:d},this.settings.scroll_speed,"swing")},paused:function(){return-1===a.inArray(this.settings.$li.index()+1,this.settings.pause_after)},restart:function(){this.hide(),this.settings.$li=d,this.show("init")},pos_default:function(a){var b=this.settings.$next_tip.find(".joyride-nub"),c=Math.ceil(b.outerWidth()/2),d=Math.ceil(b.outerHeight()/2),e=a||!1;if(e&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector))this.settings.$li.length&&this.pos_modal(b);else{var f=this.settings.tip_settings.tipAdjustmentY?parseInt(this.settings.tip_settings.tipAdjustmentY):0,g=this.settings.tip_settings.tipAdjustmentX?parseInt(this.settings.tip_settings.tipAdjustmentX):0;this.bottom()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top+d+this.settings.$target.outerHeight()+f,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()+g}:{top:this.settings.$target.offset().top+d+this.settings.$target.outerHeight()+f,left:this.settings.$target.offset().left+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"top")):this.top()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-d+f,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}:{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-d+f,left:this.settings.$target.offset().left+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"bottom")):this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top+f,left:this.settings.$target.outerWidth()+this.settings.$target.offset().left+c+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top+f,left:this.settings.$target.offset().left-this.settings.$next_tip.outerWidth()-c+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"right")),!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tip_settings.tip_location_pattern.length&&(b.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),this.settings.tip_settings.tip_location=this.settings.tip_settings.tip_location_pattern[this.settings.attempts],this.settings.attempts++,this.pos_default())}e&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_phone:function(b){var c=this.settings.$next_tip.outerHeight(),d=(this.settings.$next_tip.offset(),this.settings.$target.outerHeight()),e=a(".joyride-nub",this.settings.$next_tip),f=Math.ceil(e.outerHeight()/2),g=b||!1;e.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),g&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(e):this.top()?(this.settings.$next_tip.offset({top:this.settings.$target.offset().top-c-f}),e.addClass("bottom")):(this.settings.$next_tip.offset({top:this.settings.$target.offset().top+d+f}),e.addClass("top")),g&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_modal:function(a){this.center(),a.hide(),this.show_modal()},show_modal:function(){if(!this.settings.$next_tip.data("closed")){var b=a(".joyride-modal-bg");if(b.length<1){var b=a(this.settings.template.modal);b.appendTo("body")}/pop/i.test(this.settings.tip_animation)?b.show():b.fadeIn(this.settings.tip_animation_fade_speed)}},expose:function(){var c,d,e,f,g,h="expose-"+this.random_str(6);if(arguments.length>0&&arguments[0]instanceof a)e=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;e=this.settings.$target}return e.length<1?(b.console&&console.error("element not valid",e),!1):(c=a(this.settings.template.expose),this.settings.$body.append(c),c.css({top:e.offset().top,left:e.offset().left,width:e.outerWidth(!0),height:e.outerHeight(!0)}),d=a(this.settings.template.expose_cover),f={zIndex:e.css("z-index"),position:e.css("position")},g=null==e.attr("class")?"":e.attr("class"),e.css("z-index",parseInt(c.css("z-index"))+1),"static"==f.position&&e.css("position","relative"),e.data("expose-css",f),e.data("orig-class",g),e.attr("class",g+" "+this.settings.expose_add_class),d.css({top:e.offset().top,left:e.offset().left,width:e.outerWidth(!0),height:e.outerHeight(!0)}),this.settings.modal&&this.show_modal(),this.settings.$body.append(d),c.addClass(h),d.addClass(h),e.data("expose",h),this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,e),void this.add_exposed(e))},un_expose:function(){var c,d,e,f,g,h=!1;if(arguments.length>0&&arguments[0]instanceof a)d=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;d=this.settings.$target}return d.length<1?(b.console&&console.error("element not valid",d),!1):(c=d.data("expose"),e=a("."+c),arguments.length>1&&(h=arguments[1]),h===!0?a(".joyride-expose-wrapper,.joyride-expose-cover").remove():e.remove(),f=d.data("expose-css"),"auto"==f.zIndex?d.css("z-index",""):d.css("z-index",f.zIndex),f.position!=d.css("position")&&("static"==f.position?d.css("position",""):d.css("position",f.position)),g=d.data("orig-class"),d.attr("class",g),d.removeData("orig-classes"),d.removeData("expose"),d.removeData("expose-z-index"),void this.remove_exposed(d))},add_exposed:function(b){this.settings.exposed=this.settings.exposed||[],b instanceof a||"object"==typeof b?this.settings.exposed.push(b[0]):"string"==typeof b&&this.settings.exposed.push(b)},remove_exposed:function(b){var c,d;for(b instanceof a?c=b[0]:"string"==typeof b&&(c=b),this.settings.exposed=this.settings.exposed||[],d=this.settings.exposed.length;d--;)if(this.settings.exposed[d]==c)return void this.settings.exposed.splice(d,1)},center:function(){var c=a(b);return this.settings.$next_tip.css({top:(c.height()-this.settings.$next_tip.outerHeight())/2+c.scrollTop(),left:(c.width()-this.settings.$next_tip.outerWidth())/2+c.scrollLeft()}),!0},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location)},top:function(){return/top/i.test(this.settings.tip_settings.tip_location)},right:function(){return/right/i.test(this.settings.tip_settings.tip_location)},left:function(){return/left/i.test(this.settings.tip_settings.tip_location)},corners:function(c){var d=a(b),e=d.height()/2,f=Math.ceil(this.settings.$target.offset().top-e+this.settings.$next_tip.outerHeight()),g=d.width()+d.scrollLeft(),h=d.height()+f,i=d.height()+d.scrollTop(),j=d.scrollTop();return j>f&&(j=0>f?0:f),h>i&&(i=h),[c.offset().top<j,g<c.offset().left+c.outerWidth(),i<c.offset().top+c.outerHeight(),d.scrollLeft()>c.offset().left]},visible:function(a){for(var b=a.length;b--;)if(a[b])return!1;return!0},nub_position:function(a,b,c){a.addClass("auto"===b?c:b)},startTimer:function(){this.settings.$li.length?this.settings.automate=setTimeout(function(){this.hide(),this.show(),this.startTimer()}.bind(this),this.settings.timer):clearTimeout(this.settings.automate)},end:function(b){this.settings.cookie_monster&&a.cookie(this.settings.cookie_name,"ridden",{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain}),this.settings.timer>0&&clearTimeout(this.settings.automate),this.settings.modal&&this.settings.expose&&this.un_expose(),a(this.scope).off("keyup.joyride"),this.settings.$next_tip.data("closed",!0),this.settings.riding=!1,a(".joyride-modal-bg").hide(),this.settings.$current_tip.hide(),("undefined"==typeof b||b===!1)&&(this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip),this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip)),a(".joyride-tip-guide").remove()},off:function(){a(this.scope).off(".joyride"),a(b).off(".joyride"),a(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride"),a(".joyride-tip-guide, .joyride-modal-bg").remove(),clearTimeout(this.settings.automate),this.settings={}},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs["magellan-expedition"]={name:"magellan-expedition",version:"5.5.2",settings:{active_class:"active",threshold:0,destination_threshold:20,throttle_delay:30,fixed_top:0,offset_by_height:!0,duration:700,easing:"swing"},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c)},events:function(){var b=this,c=b.S,d=b.settings;b.set_expedition_position(),c(b.scope).off(".magellan").on("click.fndtn.magellan","["+b.add_namespace("data-magellan-arrival")+"] a[href*=#]",function(c){var d=this.hostname===location.hostname||!this.hostname,e=b.filterPathname(location.pathname)===b.filterPathname(this.pathname),f=this.hash.replace(/(:|\.|\/)/g,"\\$1"),g=this;if(d&&e&&f){c.preventDefault();var h=a(this).closest("["+b.attr_name()+"]"),i=h.data("magellan-expedition-init"),j=this.hash.split("#").join(""),k=a('a[name="'+j+'"]');0===k.length&&(k=a("#"+j));var l=k.offset().top-i.destination_threshold+1;i.offset_by_height&&(l-=h.outerHeight()),a("html, body").stop().animate({scrollTop:l},i.duration,i.easing,function(){history.pushState?history.pushState(null,null,g.pathname+"#"+j):location.hash=g.pathname+"#"+j})}}).on("scroll.fndtn.magellan",b.throttle(this.check_for_arrivals.bind(this),d.throttle_delay))},check_for_arrivals:function(){var a=this;a.update_arrivals(),a.update_expedition_positions()},set_expedition_position:function(){var b=this;a("["+this.attr_name()+"=fixed]",b.scope).each(function(c,d){var e,f,g=a(this),h=g.data("magellan-expedition-init"),i=g.attr("styles");g.attr("style",""),e=g.offset().top+h.threshold,f=parseInt(g.data("magellan-fixed-top")),isNaN(f)||(b.settings.fixed_top=f),g.data(b.data_attr("magellan-top-offset"),e),g.attr("style",i)})},update_expedition_positions:function(){var c=this,d=a(b).scrollTop();a("["+this.attr_name()+"=fixed]",c.scope).each(function(){var b=a(this),e=b.data("magellan-expedition-init"),f=b.attr("style"),g=b.data("magellan-top-offset");if(d+c.settings.fixed_top>=g){var h=b.prev("["+c.add_namespace("data-magellan-expedition-clone")+"]");0===h.length&&(h=b.clone(),h.removeAttr(c.attr_name()),h.attr(c.add_namespace("data-magellan-expedition-clone"),""),b.before(h)),b.css({position:"fixed",top:e.fixed_top}).addClass("fixed")}else b.prev("["+c.add_namespace("data-magellan-expedition-clone")+"]").remove(),b.attr("style",f).css("position","").css("top","").removeClass("fixed")})},update_arrivals:function(){var c=this,d=a(b).scrollTop();a("["+this.attr_name()+"]",c.scope).each(function(){var b=a(this),e=b.data(c.attr_name(!0)+"-init"),f=c.offsets(b,d),g=b.find("["+c.add_namespace("data-magellan-arrival")+"]"),h=!1;f.each(function(a,d){if(d.viewport_offset>=d.top_offset){var f=b.find("["+c.add_namespace("data-magellan-arrival")+"]");return f.not(d.arrival).removeClass(e.active_class),d.arrival.addClass(e.active_class),h=!0,!0}}),h||g.removeClass(e.active_class)})},offsets:function(b,c){var d=this,e=b.data(d.attr_name(!0)+"-init"),f=c;return b.find("["+d.add_namespace("data-magellan-arrival")+"]").map(function(c,g){var h=a(this).data(d.data_attr("magellan-arrival")),i=a("["+d.add_namespace("data-magellan-destination")+"="+h+"]");if(i.length>0){var j=i.offset().top-e.destination_threshold;return e.offset_by_height&&(j-=b.outerHeight()),j=Math.floor(j),{destination:i,arrival:a(this),top_offset:j,viewport_offset:f}}}).sort(function(a,b){return a.top_offset<b.top_offset?-1:a.top_offset>b.top_offset?1:0})},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},off:function(){this.S(this.scope).off(".magellan"),this.S(b).off(".magellan")},filterPathname:function(a){return a=a||"",a.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},reflow:function(){var b=this;a("["+b.add_namespace("data-magellan-expedition-clone")+"]",b.scope).remove()}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.offcanvas={name:"offcanvas",version:"5.5.2",settings:{open_method:"move",close_on_click:!1},init:function(a,b,c){this.bindings(b,c)},events:function(){var b=this,c=b.S,d="",e="",f="";"move"===this.settings.open_method?(d="move-",e="right",f="left"):"overlap_single"===this.settings.open_method?(d="offcanvas-overlap-",e="right",f="left"):"overlap"===this.settings.open_method&&(d="offcanvas-overlap"),c(this.scope).off(".offcanvas").on("click.fndtn.offcanvas",".left-off-canvas-toggle",function(f){b.click_toggle_class(f,d+e),"overlap"!==b.settings.open_method&&c(".left-submenu").removeClass(d+e),a(".left-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".left-off-canvas-menu a",function(f){var g=b.get_settings(f),h=c(this).parent();!g.close_on_click||h.hasClass("has-submenu")||h.hasClass("back")?c(this).parent().hasClass("has-submenu")?(f.preventDefault(),c(this).siblings(".left-submenu").toggleClass(d+e)):h.hasClass("back")&&(f.preventDefault(),h.parent().removeClass(d+e)):(b.hide.call(b,d+e,b.get_wrapper(f)),h.parent().removeClass(d+e)),a(".left-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".right-off-canvas-toggle",function(e){b.click_toggle_class(e,d+f),"overlap"!==b.settings.open_method&&c(".right-submenu").removeClass(d+f),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".right-off-canvas-menu a",function(e){var g=b.get_settings(e),h=c(this).parent();!g.close_on_click||h.hasClass("has-submenu")||h.hasClass("back")?c(this).parent().hasClass("has-submenu")?(e.preventDefault(),c(this).siblings(".right-submenu").toggleClass(d+f)):h.hasClass("back")&&(e.preventDefault(),h.parent().removeClass(d+f)):(b.hide.call(b,d+f,b.get_wrapper(e)),h.parent().removeClass(d+f)),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(g){b.click_remove_class(g,d+f),c(".right-submenu").removeClass(d+f),e&&(b.click_remove_class(g,d+e),c(".left-submenu").removeClass(d+f)),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(c){b.click_remove_class(c,d+f),a(".left-off-canvas-toggle").attr("aria-expanded","false"),e&&(b.click_remove_class(c,d+e),a(".right-off-canvas-toggle").attr("aria-expanded","false"))})},toggle:function(a,b){b=b||this.get_wrapper(),b.is("."+a)?this.hide(a,b):this.show(a,b)},show:function(a,b){b=b||this.get_wrapper(),b.trigger("open.fndtn.offcanvas"),b.addClass(a)},hide:function(a,b){b=b||this.get_wrapper(),b.trigger("close.fndtn.offcanvas"),b.removeClass(a)},click_toggle_class:function(a,b){
+a.preventDefault();var c=this.get_wrapper(a);this.toggle(b,c)},click_remove_class:function(a,b){a.preventDefault();var c=this.get_wrapper(a);this.hide(b,c)},get_settings:function(a){var b=this.S(a.target).closest("["+this.attr_name()+"]");return b.data(this.attr_name(!0)+"-init")||this.settings},get_wrapper:function(a){var b=this.S(a?a.target:this.scope).closest(".off-canvas-wrap");return 0===b.length&&(b=this.S(".off-canvas-wrap")),b},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";var e=function(){},f=function(e,f){if(e.hasClass(f.slides_container_class))return this;var j,k,l,m,n,o,p=this,q=e,r=0,s=!1;p.slides=function(){return q.children(f.slide_selector)},p.slides().first().addClass(f.active_slide_class),p.update_slide_number=function(b){f.slide_number&&(k.find("span:first").text(parseInt(b)+1),k.find("span:last").text(p.slides().length)),f.bullets&&(l.children().removeClass(f.bullets_active_class),a(l.children().get(b)).addClass(f.bullets_active_class))},p.update_active_link=function(b){var c=a('[data-orbit-link="'+p.slides().eq(b).attr("data-orbit-slide")+'"]');c.siblings().removeClass(f.bullets_active_class),c.addClass(f.bullets_active_class)},p.build_markup=function(){q.wrap('<div class="'+f.container_class+'"></div>'),j=q.parent(),q.addClass(f.slides_container_class),f.stack_on_small&&j.addClass(f.stack_on_small_class),f.navigation_arrows&&(j.append(a('<a href="#"><span></span></a>').addClass(f.prev_class)),j.append(a('<a href="#"><span></span></a>').addClass(f.next_class))),f.timer&&(m=a("<div>").addClass(f.timer_container_class),m.append("<span>"),m.append(a("<div>").addClass(f.timer_progress_class)),m.addClass(f.timer_paused_class),j.append(m)),f.slide_number&&(k=a("<div>").addClass(f.slide_number_class),k.append("<span></span> "+f.slide_number_text+" <span></span>"),j.append(k)),f.bullets&&(l=a("<ol>").addClass(f.bullets_container_class),j.append(l),l.wrap('<div class="orbit-bullets-container"></div>'),p.slides().each(function(b,c){var d=a("<li>").attr("data-orbit-slide",b).on("click",p.link_bullet);l.append(d)}))},p._goto=function(b,c){if(b===r)return!1;"object"==typeof o&&o.restart();var d=p.slides(),e="next";if(s=!0,r>b&&(e="prev"),b>=d.length){if(!f.circular)return!1;b=0}else if(0>b){if(!f.circular)return!1;b=d.length-1}var g=a(d.get(r)),h=a(d.get(b));g.css("zIndex",2),g.removeClass(f.active_slide_class),h.css("zIndex",4).addClass(f.active_slide_class),q.trigger("before-slide-change.fndtn.orbit"),f.before_slide_change(),p.update_active_link(b);var i=function(){var a=function(){r=b,s=!1,c===!0&&(o=p.create_timer(),o.start()),p.update_slide_number(r),q.trigger("after-slide-change.fndtn.orbit",[{slide_number:r,total_slides:d.length}]),f.after_slide_change(r,d.length)};q.outerHeight()!=h.outerHeight()&&f.variable_height?q.animate({height:h.outerHeight()},250,"linear",a):a()};if(1===d.length)return i(),!1;var j=function(){"next"===e&&n.next(g,h,i),"prev"===e&&n.prev(g,h,i)};h.outerHeight()>q.outerHeight()&&f.variable_height?q.animate({height:h.outerHeight()},250,"linear",j):j()},p.next=function(a){a.stopImmediatePropagation(),a.preventDefault(),p._goto(r+1)},p.prev=function(a){a.stopImmediatePropagation(),a.preventDefault(),p._goto(r-1)},p.link_custom=function(b){b.preventDefault();var c=a(this).attr("data-orbit-link");if("string"==typeof c&&""!=(c=a.trim(c))){var d=j.find("[data-orbit-slide="+c+"]");-1!=d.index()&&p._goto(d.index())}},p.link_bullet=function(b){var c=a(this).attr("data-orbit-slide");if("string"==typeof c&&""!=(c=a.trim(c)))if(isNaN(parseInt(c))){var d=j.find("[data-orbit-slide="+c+"]");-1!=d.index()&&p._goto(d.index()+1)}else p._goto(parseInt(c))},p.timer_callback=function(){p._goto(r+1,!0)},p.compute_dimensions=function(){var b=a(p.slides().get(r)),c=b.outerHeight();f.variable_height||p.slides().each(function(){a(this).outerHeight()>c&&(c=a(this).outerHeight())}),q.height(c)},p.create_timer=function(){var a=new g(j.find("."+f.timer_container_class),f,p.timer_callback);return a},p.stop_timer=function(){"object"==typeof o&&o.stop()},p.toggle_timer=function(){var a=j.find("."+f.timer_container_class);a.hasClass(f.timer_paused_class)?("undefined"==typeof o&&(o=p.create_timer()),o.start()):"object"==typeof o&&o.stop()},p.init=function(){p.build_markup(),f.timer&&(o=p.create_timer(),Foundation.utils.image_loaded(this.slides().children("img"),o.start)),n=new i(f,q),"slide"===f.animation&&(n=new h(f,q)),j.on("click","."+f.next_class,p.next),j.on("click","."+f.prev_class,p.prev),f.next_on_click&&j.on("click","."+f.slides_container_class+" [data-orbit-slide]",p.link_bullet),j.on("click",p.toggle_timer),f.swipe&&j.on("touchstart.fndtn.orbit",function(a){a.touches||(a=a.originalEvent);var b={start_page_x:a.touches[0].pageX,start_page_y:a.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:d};j.data("swipe-transition",b),a.stopPropagation()}).on("touchmove.fndtn.orbit",function(a){if(a.touches||(a=a.originalEvent),!(a.touches.length>1||a.scale&&1!==a.scale)){var b=j.data("swipe-transition");if("undefined"==typeof b&&(b={}),b.delta_x=a.touches[0].pageX-b.start_page_x,"undefined"==typeof b.is_scrolling&&(b.is_scrolling=!!(b.is_scrolling||Math.abs(b.delta_x)<Math.abs(a.touches[0].pageY-b.start_page_y))),!b.is_scrolling&&!b.active){a.preventDefault();var c=b.delta_x<0?r+1:r-1;b.active=!0,p._goto(c)}}}).on("touchend.fndtn.orbit",function(a){j.data("swipe-transition",{}),a.stopPropagation()}),j.on("mouseenter.fndtn.orbit",function(a){f.timer&&f.pause_on_hover&&p.stop_timer()}).on("mouseleave.fndtn.orbit",function(a){f.timer&&f.resume_on_mouseout&&o.start()}),a(c).on("click","[data-orbit-link]",p.link_custom),a(b).on("load resize",p.compute_dimensions),Foundation.utils.image_loaded(this.slides().children("img"),p.compute_dimensions),Foundation.utils.image_loaded(this.slides().children("img"),function(){j.prev("."+f.preloader_class).css("display","none"),p.update_slide_number(0),p.update_active_link(0),q.trigger("ready.fndtn.orbit")})},p.init()},g=function(a,b,c){var d,e,f=this,g=b.timer_speed,h=a.find("."+b.timer_progress_class),i=-1;this.update_progress=function(a){var b=h.clone();b.attr("style",""),b.css("width",a+"%"),h.replaceWith(b),h=b},this.restart=function(){clearTimeout(e),a.addClass(b.timer_paused_class),i=-1,f.update_progress(0)},this.start=function(){return a.hasClass(b.timer_paused_class)?(i=-1===i?g:i,a.removeClass(b.timer_paused_class),d=(new Date).getTime(),h.animate({width:"100%"},i,"linear"),e=setTimeout(function(){f.restart(),c()},i),void a.trigger("timer-started.fndtn.orbit")):!0},this.stop=function(){if(a.hasClass(b.timer_paused_class))return!0;clearTimeout(e),a.addClass(b.timer_paused_class);var c=(new Date).getTime();i-=c-d;var h=100-i/g*100;f.update_progress(h),a.trigger("timer-stopped.fndtn.orbit")}},h=function(b,c){var d=b.animation_speed,e=1===a("html[dir=rtl]").length,f=e?"marginRight":"marginLeft",g={};g[f]="0%",this.next=function(a,b,c){a.animate({marginLeft:"-100%"},d),b.animate(g,d,function(){a.css(f,"100%"),c()})},this.prev=function(a,b,c){a.animate({marginLeft:"100%"},d),b.css(f,"-100%"),b.animate(g,d,function(){a.css(f,"100%"),c()})}},i=function(b,c){{var d=b.animation_speed;1===a("html[dir=rtl]").length}this.next=function(a,b,c){b.css({margin:"0%",opacity:"0.01"}),b.animate({opacity:"1"},d,"linear",function(){a.css("margin","100%"),c()})},this.prev=function(a,b,c){b.css({margin:"0%",opacity:"0.01"}),b.animate({opacity:"1"},d,"linear",function(){a.css("margin","100%"),c()})}};Foundation.libs=Foundation.libs||{},Foundation.libs.orbit={name:"orbit",version:"5.5.2",settings:{animation:"slide",timer_speed:1e4,pause_on_hover:!0,resume_on_mouseout:!1,next_on_click:!0,animation_speed:500,stack_on_small:!1,navigation_arrows:!0,slide_number:!0,slide_number_text:"of",container_class:"orbit-container",stack_on_small_class:"orbit-stack-on-small",next_class:"orbit-next",prev_class:"orbit-prev",timer_container_class:"orbit-timer",timer_paused_class:"paused",timer_progress_class:"orbit-progress",slides_container_class:"orbit-slides-container",preloader_class:"preloader",slide_selector:"*",bullets_container_class:"orbit-bullets",bullets_active_class:"active",slide_number_class:"orbit-slide-number",caption_class:"orbit-caption",active_slide_class:"active",orbit_transition_class:"orbit-transitioning",bullets:!0,circular:!0,timer:!0,variable_height:!1,swipe:!0,before_slide_change:e,after_slide_change:e},init:function(a,b,c){this.bindings(b,c)},events:function(a){var b=new f(this.S(a),this.S(a).data("orbit-init"));this.S(a).data(this.name+"-instance",b)},reflow:function(){var a=this;if(a.S(a.scope).is("[data-orbit]")){var b=a.S(a.scope),c=b.data(a.name+"-instance");c.compute_dimensions()}else a.S("[data-orbit]",a.scope).each(function(b,c){var d=a.S(c),e=(a.data_options(d),d.data(a.name+"-instance"));e.compute_dimensions()})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";function e(a){var b=/fade/i.test(a),c=/pop/i.test(a);return{animate:b||c,pop:c,fade:b}}Foundation.libs.reveal={name:"reveal",version:"5.5.2",locked:!1,settings:{animation:"fadeAndPop",animation_speed:250,close_on_background_click:!0,close_on_esc:!0,dismiss_modal_class:"close-reveal-modal",multiple_opened:!1,bg_class:"reveal-modal-bg",root_element:"body",open:function(){},opened:function(){},close:function(){},closed:function(){},on_ajax_error:a.noop,bg:a(".reveal-modal-bg"),css:{open:{opacity:0,visibility:"visible",display:"block"},close:{opacity:1,visibility:"hidden",display:"none"}}},init:function(b,c,d){a.extend(!0,this.settings,c,d),this.bindings(c,d)},events:function(a){var b=this,d=b.S;return d(this.scope).off(".reveal").on("click.fndtn.reveal","["+this.add_namespace("data-reveal-id")+"]:not([disabled])",function(a){if(a.preventDefault(),!b.locked){var c=d(this),e=c.data(b.data_attr("reveal-ajax")),f=c.data(b.data_attr("reveal-replace-content"));if(b.locked=!0,"undefined"==typeof e)b.open.call(b,c);else{var g=e===!0?c.attr("href"):e;b.open.call(b,c,{url:g},{replaceContentSel:f})}}}),d(c).on("click.fndtn.reveal",this.close_targets(),function(a){if(a.preventDefault(),!b.locked){var c=d("["+b.attr_name()+"].open").data(b.attr_name(!0)+"-init")||b.settings,e=d(a.target)[0]===d("."+c.bg_class)[0];if(e){if(!c.close_on_background_click)return;a.stopPropagation()}b.locked=!0,b.close.call(b,e?d("["+b.attr_name()+"].open:not(.toback)"):d(this).closest("["+b.attr_name()+"]"))}}),d("["+b.attr_name()+"]",this.scope).length>0?d(this.scope).on("open.fndtn.reveal",this.settings.open).on("opened.fndtn.reveal",this.settings.opened).on("opened.fndtn.reveal",this.open_video).on("close.fndtn.reveal",this.settings.close).on("closed.fndtn.reveal",this.settings.closed).on("closed.fndtn.reveal",this.close_video):d(this.scope).on("open.fndtn.reveal","["+b.attr_name()+"]",this.settings.open).on("opened.fndtn.reveal","["+b.attr_name()+"]",this.settings.opened).on("opened.fndtn.reveal","["+b.attr_name()+"]",this.open_video).on("close.fndtn.reveal","["+b.attr_name()+"]",this.settings.close).on("closed.fndtn.reveal","["+b.attr_name()+"]",this.settings.closed).on("closed.fndtn.reveal","["+b.attr_name()+"]",this.close_video),!0},key_up_on:function(a){var b=this;return b.S("body").off("keyup.fndtn.reveal").on("keyup.fndtn.reveal",function(a){var c=b.S("["+b.attr_name()+"].open"),d=c.data(b.attr_name(!0)+"-init")||b.settings;d&&27===a.which&&d.close_on_esc&&!b.locked&&b.close.call(b,c)}),!0},key_up_off:function(a){return this.S("body").off("keyup.fndtn.reveal"),!0},open:function(c,d){var e,f=this;c?"undefined"!=typeof c.selector?e=f.S("#"+c.data(f.data_attr("reveal-id"))).first():(e=f.S(this.scope),d=c):e=f.S(this.scope);var g=e.data(f.attr_name(!0)+"-init");if(g=g||this.settings,e.hasClass("open")&&c.attr("data-reveal-id")==e.attr("id"))return f.close(e);if(!e.hasClass("open")){var h=f.S("["+f.attr_name()+"].open");if("undefined"==typeof e.data("css-top")&&e.data("css-top",parseInt(e.css("top"),10)).data("offset",this.cache_offset(e)),e.attr("tabindex","0").attr("aria-hidden","false"),this.key_up_on(e),e.on("open.fndtn.reveal",function(a){"fndtn.reveal"!==a.namespace}),e.on("open.fndtn.reveal").trigger("open.fndtn.reveal"),h.length<1&&this.toggle_bg(e,!0),"string"==typeof d&&(d={url:d}),"undefined"!=typeof d&&d.url){var i="undefined"!=typeof d.success?d.success:null;a.extend(d,{success:function(b,c,d){if(a.isFunction(i)){var j=i(b,c,d);"string"==typeof j&&(b=j)}"undefined"!=typeof options&&"undefined"!=typeof options.replaceContentSel?e.find(options.replaceContentSel).html(b):e.html(b),f.S(e).foundation("section","reflow"),f.S(e).children().foundation(),h.length>0&&(g.multiple_opened?f.to_back(h):f.hide(h,g.css.close)),f.show(e,g.css.open)}}),g.on_ajax_error!==a.noop&&a.extend(d,{error:g.on_ajax_error}),a.ajax(d)}else h.length>0&&(g.multiple_opened?f.to_back(h):f.hide(h,g.css.close)),this.show(e,g.css.open)}f.S(b).trigger("resize")},close:function(b){var b=b&&b.length?b:this.S(this.scope),c=this.S("["+this.attr_name()+"].open"),d=b.data(this.attr_name(!0)+"-init")||this.settings,e=this;c.length>0&&(b.removeAttr("tabindex","0").attr("aria-hidden","true"),this.locked=!0,this.key_up_off(b),b.trigger("close.fndtn.reveal"),(d.multiple_opened&&1===c.length||!d.multiple_opened||b.length>1)&&(e.toggle_bg(b,!1),e.to_front(b)),d.multiple_opened?(e.hide(b,d.css.close,d),e.to_front(a(a.makeArray(c).reverse()[1]))):e.hide(c,d.css.close,d))},close_targets:function(){var a="."+this.settings.dismiss_modal_class;return this.settings.close_on_background_click?a+", ."+this.settings.bg_class:a},toggle_bg:function(b,c){0===this.S("."+this.settings.bg_class).length&&(this.settings.bg=a("<div />",{"class":this.settings.bg_class}).appendTo("body").hide());var e=this.settings.bg.filter(":visible").length>0;c!=e&&((c==d?e:!c)?this.hide(this.settings.bg):this.show(this.settings.bg))},show:function(c,d){if(d){var f=c.data(this.attr_name(!0)+"-init")||this.settings,g=f.root_element,h=this;if(0===c.parent(g).length){var i=c.wrap('<div style="display: none;" />').parent();c.on("closed.fndtn.reveal.wrapped",function(){c.detach().appendTo(i),c.unwrap().unbind("closed.fndtn.reveal.wrapped")}),c.detach().appendTo(g)}var j=e(f.animation);if(j.animate||(this.locked=!1),j.pop){d.top=a(b).scrollTop()-c.data("offset")+"px";var k={top:a(b).scrollTop()+c.data("css-top")+"px",opacity:1};return setTimeout(function(){return c.css(d).animate(k,f.animation_speed,"linear",function(){h.locked=!1,c.trigger("opened.fndtn.reveal")}).addClass("open")},f.animation_speed/2)}if(j.fade){d.top=a(b).scrollTop()+c.data("css-top")+"px";var k={opacity:1};return setTimeout(function(){return c.css(d).animate(k,f.animation_speed,"linear",function(){h.locked=!1,c.trigger("opened.fndtn.reveal")}).addClass("open")},f.animation_speed/2)}return c.css(d).show().css({opacity:1}).addClass("open").trigger("opened.fndtn.reveal")}var f=this.settings;return e(f.animation).fade?c.fadeIn(f.animation_speed/2):(this.locked=!1,c.show())},to_back:function(a){a.addClass("toback")},to_front:function(a){a.removeClass("toback")},hide:function(c,d){if(d){var f=c.data(this.attr_name(!0)+"-init"),g=this;f=f||this.settings;var h=e(f.animation);if(h.animate||(this.locked=!1),h.pop){var i={top:-a(b).scrollTop()-c.data("offset")+"px",opacity:0};return setTimeout(function(){return c.animate(i,f.animation_speed,"linear",function(){g.locked=!1,c.css(d).trigger("closed.fndtn.reveal")}).removeClass("open")},f.animation_speed/2)}if(h.fade){var i={opacity:0};return setTimeout(function(){return c.animate(i,f.animation_speed,"linear",function(){g.locked=!1,c.css(d).trigger("closed.fndtn.reveal")}).removeClass("open")},f.animation_speed/2)}return c.hide().css(d).removeClass("open").trigger("closed.fndtn.reveal")}var f=this.settings;return e(f.animation).fade?c.fadeOut(f.animation_speed/2):c.hide()},close_video:function(b){var c=a(".flex-video",b.target),d=a("iframe",c);d.length>0&&(d.attr("data-src",d[0].src),d.attr("src",d.attr("src")),c.hide())},open_video:function(b){var c=a(".flex-video",b.target),e=c.find("iframe");if(e.length>0){var f=e.attr("data-src");if("string"==typeof f)e[0].src=e.attr("data-src");else{var g=e[0].src;e[0].src=d,e[0].src=g}c.show()}},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},cache_offset:function(a){var b=a.show().height()+parseInt(a.css("top"),10)+a.scrollY;return a.hide(),b},off:function(){a(this.scope).off(".fndtn.reveal")},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.slider={name:"slider",version:"5.5.2",settings:{start:0,end:100,step:1,precision:null,initial:null,display_selector:"",vertical:!1,trigger_input_change:!1,on_change:function(){}},cache:{},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c),this.reflow()},events:function(){var c=this;a(this.scope).off(".slider").on("mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider","["+c.attr_name()+"]:not(.disabled, [disabled]) .range-slider-handle",function(b){c.cache.active||(b.preventDefault(),c.set_active_slider(a(b.target)))}).on("mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider",function(d){if(c.cache.active)if(d.preventDefault(),a.data(c.cache.active[0],"settings").vertical){var e=0;d.pageY||(e=b.scrollY),c.calculate_position(c.cache.active,c.get_cursor_position(d,"y")+e)}else c.calculate_position(c.cache.active,c.get_cursor_position(d,"x"))}).on("mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider",function(a){c.remove_active_slider()}).on("change.fndtn.slider",function(a){c.settings.on_change()}),c.S(b).on("resize.fndtn.slider",c.throttle(function(a){c.reflow()},300)),this.S("["+this.attr_name()+"]").each(function(){var b=a(this),d=b.children(".range-slider-handle")[0],e=c.initialize_settings(d);""!=e.display_selector&&a(e.display_selector).each(function(){this.hasOwnProperty("value")&&a(this).change(function(){b.foundation("slider","set_value",a(this).val())})})})},get_cursor_position:function(a,b){var c,d="page"+b.toUpperCase(),e="client"+b.toUpperCase();return"undefined"!=typeof a[d]?c=a[d]:"undefined"!=typeof a.originalEvent[e]?c=a.originalEvent[e]:a.originalEvent.touches&&a.originalEvent.touches[0]&&"undefined"!=typeof a.originalEvent.touches[0][e]?c=a.originalEvent.touches[0][e]:a.currentPoint&&"undefined"!=typeof a.currentPoint[b]&&(c=a.currentPoint[b]),c},set_active_slider:function(a){this.cache.active=a},remove_active_slider:function(){this.cache.active=null},calculate_position:function(b,c){var d=this,e=a.data(b[0],"settings"),f=(a.data(b[0],"handle_l"),a.data(b[0],"handle_o"),a.data(b[0],"bar_l")),g=a.data(b[0],"bar_o");requestAnimationFrame(function(){var a;a=Foundation.rtl&&!e.vertical?d.limit_to((g+f-c)/f,0,1):d.limit_to((c-g)/f,0,1),a=e.vertical?1-a:a;var h=d.normalized_value(a,e.start,e.end,e.step,e.precision);d.set_ui(b,h)})},set_ui:function(b,c){var d=a.data(b[0],"settings"),e=a.data(b[0],"handle_l"),f=a.data(b[0],"bar_l"),g=this.normalized_percentage(c,d.start,d.end),h=g*(f-e)-1,i=100*g,j=b.parent(),k=b.parent().children("input[type=hidden]");Foundation.rtl&&!d.vertical&&(h=-h),h=d.vertical?-h+f-e+1:h,this.set_translate(b,h,d.vertical),d.vertical?b.siblings(".range-slider-active-segment").css("height",i+"%"):b.siblings(".range-slider-active-segment").css("width",i+"%"),j.attr(this.attr_name(),c).trigger("change.fndtn.slider"),k.val(c),d.trigger_input_change&&k.trigger("change.fndtn.slider"),b[0].hasAttribute("aria-valuemin")||b.attr({"aria-valuemin":d.start,"aria-valuemax":d.end}),b.attr("aria-valuenow",c),""!=d.display_selector&&a(d.display_selector).each(function(){this.hasAttribute("value")?a(this).val(c):a(this).text(c)})},normalized_percentage:function(a,b,c){return Math.min(1,(a-b)/(c-b))},normalized_value:function(a,b,c,d,e){var f=c-b,g=a*f,h=(g-g%d)/d,i=g%d,j=i>=.5*d?d:0;return(h*d+j+b).toFixed(e)},set_translate:function(b,c,d){d?a(b).css("-webkit-transform","translateY("+c+"px)").css("-moz-transform","translateY("+c+"px)").css("-ms-transform","translateY("+c+"px)").css("-o-transform","translateY("+c+"px)").css("transform","translateY("+c+"px)"):a(b).css("-webkit-transform","translateX("+c+"px)").css("-moz-transform","translateX("+c+"px)").css("-ms-transform","translateX("+c+"px)").css("-o-transform","translateX("+c+"px)").css("transform","translateX("+c+"px)")},limit_to:function(a,b,c){return Math.min(Math.max(a,b),c)},initialize_settings:function(b){var c,d=a.extend({},this.settings,this.data_options(a(b).parent()));return null===d.precision&&(c=(""+d.step).match(/\.([\d]*)/),d.precision=c&&c[1]?c[1].length:0),d.vertical?(a.data(b,"bar_o",a(b).parent().offset().top),a.data(b,"bar_l",a(b).parent().outerHeight()),a.data(b,"handle_o",a(b).offset().top),a.data(b,"handle_l",a(b).outerHeight())):(a.data(b,"bar_o",a(b).parent().offset().left),a.data(b,"bar_l",a(b).parent().outerWidth()),a.data(b,"handle_o",a(b).offset().left),a.data(b,"handle_l",a(b).outerWidth())),a.data(b,"bar",a(b).parent()),a.data(b,"settings",d)},set_initial_position:function(b){var c=a.data(b.children(".range-slider-handle")[0],"settings"),d="number"!=typeof c.initial||isNaN(c.initial)?Math.floor(.5*(c.end-c.start)/c.step)*c.step+c.start:c.initial,e=b.children(".range-slider-handle");this.set_ui(e,d)},set_value:function(b){var c=this;a("["+c.attr_name()+"]",this.scope).each(function(){a(this).attr(c.attr_name(),b)}),a(this.scope).attr(c.attr_name())&&a(this.scope).attr(c.attr_name(),b),c.reflow()},reflow:function(){var b=this;b.S("["+this.attr_name()+"]").each(function(){var c=a(this).children(".range-slider-handle")[0],d=a(this).attr(b.attr_name());b.initialize_settings(c),d?b.set_ui(a(c),parseFloat(d)):b.set_initial_position(a(this))})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.tab={name:"tab",version:"5.5.2",settings:{active_class:"active",callback:function(){},deep_linking:!1,scroll_to_content:!0,is_hover:!1},default_tab_hashes:[],init:function(a,c,d){var e=this,f=this.S;f("["+this.attr_name()+"] > .active > a",this.scope).each(function(){e.default_tab_hashes.push(this.hash)}),e.entry_location=b.location.href,this.bindings(c,d),this.handle_location_hash_change()},events:function(){var a=this,c=this.S,d=function(b,d){var e=c(d).closest("["+a.attr_name()+"]").data(a.attr_name(!0)+"-init");(!e.is_hover||Modernizr.touch)&&(b.preventDefault(),b.stopPropagation(),a.toggle_active_tab(c(d).parent()))};c(this.scope).off(".tab").on("keydown.fndtn.tab","["+this.attr_name()+"] > * > a",function(a){var b=this,c=a.keyCode||a.which;9==c&&(a.preventDefault(),d(a,b))}).on("click.fndtn.tab","["+this.attr_name()+"] > * > a",function(a){var b=this;d(a,b)}).on("mouseenter.fndtn.tab","["+this.attr_name()+"] > * > a",function(b){var d=c(this).closest("["+a.attr_name()+"]").data(a.attr_name(!0)+"-init");d.is_hover&&a.toggle_active_tab(c(this).parent())}),c(b).on("hashchange.fndtn.tab",function(b){b.preventDefault(),a.handle_location_hash_change()})},handle_location_hash_change:function(){var b=this,c=this.S;c("["+this.attr_name()+"]",this.scope).each(function(){var e=c(this).data(b.attr_name(!0)+"-init");if(e.deep_linking){var f;if(f=e.scroll_to_content?b.scope.location.hash:b.scope.location.hash.replace("fndtn-",""),""!=f){var g=c(f);if(g.hasClass("content")&&g.parent().hasClass("tabs-content"))b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href="+f+"]").parent());else{var h=g.closest(".content").attr("id");h!=d&&b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href=#"+h+"]").parent(),f)}}else for(var i=0;i<b.default_tab_hashes.length;i++)b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href="+b.default_tab_hashes[i]+"]").parent())}})},toggle_active_tab:function(e,f){var g=this,h=g.S,i=e.closest("["+this.attr_name()+"]"),j=e.find("a"),k=e.children("a").first(),l="#"+k.attr("href").split("#")[1],m=h(l),n=e.siblings(),o=i.data(this.attr_name(!0)+"-init"),p=function(b){var d,e=a(this),f=a(this).parents("li").prev().children('[role="tab"]'),g=a(this).parents("li").next().children('[role="tab"]');switch(b.keyCode){case 37:d=f;break;case 39:d=g;break;default:d=!1}d.length&&(e.attr({tabindex:"-1","aria-selected":null}),d.attr({tabindex:"0","aria-selected":!0}).focus()),a('[role="tabpanel"]').attr("aria-hidden","true"),a("#"+a(c.activeElement).attr("href").substring(1)).attr("aria-hidden",null)},q=function(a){var c=b.location.href===g.entry_location,d=o.scroll_to_content?g.default_tab_hashes[0]:c?b.location.hash:"fndtn-"+g.default_tab_hashes[0].replace("#","");c&&a===d||(b.location.hash=a)};k.data("tab-content")&&(l="#"+k.data("tab-content").split("#")[1],m=h(l)),o.deep_linking&&(o.scroll_to_content?(q(f||l),f==d||f==l?e.parent()[0].scrollIntoView():h(l)[0].scrollIntoView()):q(f!=d?"fndtn-"+f.replace("#",""):"fndtn-"+l.replace("#",""))),e.addClass(o.active_class).triggerHandler("opened"),j.attr({"aria-selected":"true",tabindex:0}),n.removeClass(o.active_class),n.find("a").attr({"aria-selected":"false",tabindex:-1}),m.siblings().removeClass(o.active_class).attr({"aria-hidden":"true",tabindex:-1}),m.addClass(o.active_class).attr("aria-hidden","false").removeAttr("tabindex"),o.callback(e),m.triggerHandler("toggled",[m]),i.triggerHandler("toggled",[e]),j.off("keydown").on("keydown",p)},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.tooltip={name:"tooltip",version:"5.5.2",settings:{additional_inheritable_classes:[],tooltip_class:".tooltip",append_to:"body",touch_close_text:"Tap To Close",disable_for_touch:!1,hover_delay:200,show_on:"all",tip_template:function(a,b){return'<span data-selector="'+a+'" id="'+a+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'" role="tooltip">'+b+'<span class="nub"></span></span>'}},cache:{},init:function(a,b,c){Foundation.inherit(this,"random_str"),this.bindings(b,c)},should_show:function(b,c){var d=a.extend({},this.settings,this.data_options(b));return"all"===d.show_on?!0:this.small()&&"small"===d.show_on?!0:this.medium()&&"medium"===d.show_on?!0:this.large()&&"large"===d.show_on?!0:!1},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},events:function(b){function c(a,b,c){a.timer||(c?(a.timer=null,e.showTip(b)):a.timer=setTimeout(function(){a.timer=null,e.showTip(b)}.bind(a),e.settings.hover_delay))}function d(a,b){a.timer&&(clearTimeout(a.timer),a.timer=null),e.hide(b)}var e=this,f=e.S;e.create(this.S(b)),a(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"]",function(b){var g=f(this),h=a.extend({},e.settings,e.data_options(g)),i=!1;if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&f(b.target).is("a"))return!1;if(/mouse/i.test(b.type)&&e.ie_touch(b))return!1;if(g.hasClass("open"))Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&b.preventDefault(),e.hide(g);else{if(h.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type))return;if(!h.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&(b.preventDefault(),f(h.tooltip_class+".open").hide(),i=!0,a(".open["+e.attr_name()+"]").length>0)){var j=f(a(".open["+e.attr_name()+"]")[0]);e.hide(j)}/enter|over/i.test(b.type)?c(this,g):"mouseout"===b.type||"mouseleave"===b.type?d(this,g):c(this,g,!0)}}).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"].open",function(b){return/mouse/i.test(b.type)&&e.ie_touch(b)?!1:void(("touch"!=a(this).data("tooltip-open-event-type")||"mouseleave"!=b.type)&&("mouse"==a(this).data("tooltip-open-event-type")&&/MSPointerDown|touchstart/i.test(b.type)?e.convert_to_touch(a(this)):d(this,a(this))))}).on("DOMNodeRemoved DOMAttrModified","["+this.attr_name()+"]:not(a)",function(a){d(this,f(this))})},ie_touch:function(a){return!1},showTip:function(a){var b=this.getTip(a);return this.should_show(a,b)?this.show(a):void 0},getTip:function(b){var c=this.selector(b),d=a.extend({},this.settings,this.data_options(b)),e=null;return c&&(e=this.S('span[data-selector="'+c+'"]'+d.tooltip_class)),"object"==typeof e?e:!1},selector:function(a){var b=a.attr(this.attr_name())||a.attr("data-selector");return"string"!=typeof b&&(b=this.random_str(6),a.attr("data-selector",b).attr("aria-describedby",b)),b},create:function(c){var d=this,e=a.extend({},this.settings,this.data_options(c)),f=this.settings.tip_template;"string"==typeof e.tip_template&&b.hasOwnProperty(e.tip_template)&&(f=b[e.tip_template]);var g=a(f(this.selector(c),a("<div></div>").html(c.attr("title")).html())),h=this.inheritable_classes(c);g.addClass(h).appendTo(e.append_to),Modernizr.touch&&(g.append('<span class="tap-to-close">'+e.touch_close_text+"</span>"),g.on("touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip",function(a){d.hide(c)})),c.removeAttr("title").attr("title","")},reposition:function(b,c,d){var e,f,g,h,i;if(c.css("visibility","hidden").show(),e=b.data("width"),f=c.children(".nub"),g=f.outerHeight(),h=f.outerHeight(),c.css(this.small()?{width:"100%"}:{width:e?e:"auto"}),i=function(a,b,c,d,e,f){return a.css({top:b?b:"auto",bottom:d?d:"auto",left:e?e:"auto",right:c?c:"auto"}).end()},i(c,b.offset().top+b.outerHeight()+10,"auto","auto",b.offset().left),this.small())i(c,b.offset().top+b.outerHeight()+10,"auto","auto",12.5,a(this.scope).width()),c.addClass("tip-override"),i(f,-g,"auto","auto",b.offset().left);else{var j=b.offset().left;Foundation.rtl&&(f.addClass("rtl"),j=b.offset().left+b.outerWidth()-c.outerWidth()),i(c,b.offset().top+b.outerHeight()+10,"auto","auto",j),f.attr("style")&&f.removeAttr("style"),c.removeClass("tip-override"),d&&d.indexOf("tip-top")>-1?(Foundation.rtl&&f.addClass("rtl"),i(c,b.offset().top-c.outerHeight(),"auto","auto",j).removeClass("tip-override")):d&&d.indexOf("tip-left")>-1?(i(c,b.offset().top+b.outerHeight()/2-c.outerHeight()/2,"auto","auto",b.offset().left-c.outerWidth()-g).removeClass("tip-override"),f.removeClass("rtl")):d&&d.indexOf("tip-right")>-1&&(i(c,b.offset().top+b.outerHeight()/2-c.outerHeight()/2,"auto","auto",b.offset().left+b.outerWidth()+g).removeClass("tip-override"),f.removeClass("rtl"))}c.css("visibility","visible").hide()},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},inheritable_classes:function(b){var c=a.extend({},this.settings,this.data_options(b)),d=["tip-top","tip-left","tip-bottom","tip-right","radius","round"].concat(c.additional_inheritable_classes),e=b.attr("class"),f=e?a.map(e.split(" "),function(b,c){return-1!==a.inArray(b,d)?b:void 0}).join(" "):"";return a.trim(f)},convert_to_touch:function(b){var c=this,d=c.getTip(b),e=a.extend({},c.settings,c.data_options(b));0===d.find(".tap-to-close").length&&(d.append('<span class="tap-to-close">'+e.touch_close_text+"</span>"),d.on("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose",function(a){c.hide(b)})),b.data("tooltip-open-event-type","touch")},show:function(a){var b=this.getTip(a);"touch"==a.data("tooltip-open-event-type")&&this.convert_to_touch(a),this.reposition(a,b,a.attr("class")),a.addClass("open"),b.fadeIn(150)},hide:function(a){var b=this.getTip(a);b.fadeOut(150,function(){b.find(".tap-to-close").remove(),b.off("click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose"),a.removeClass("open")})},off:function(){var b=this;this.S(this.scope).off(".fndtn.tooltip"),this.S(this.settings.tooltip_class).each(function(c){a("["+b.attr_name()+"]").eq(c).attr("title",a(this).text())}).remove()},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.topbar={name:"topbar",version:"5.5.2",settings:{index:0,start_offset:0,
+sticky_class:"sticky",custom_back_text:!0,back_text:"Back",mobile_show_parent_link:!0,is_hover:!0,scrolltop:!0,sticky_on:"all",dropdown_autoclose:!0},init:function(b,c,d){Foundation.inherit(this,"add_custom_rule register_media throttle");var e=this;e.register_media("topbar","foundation-mq-topbar"),this.bindings(c,d),e.S("["+this.attr_name()+"]",this.scope).each(function(){{var b=a(this),c=b.data(e.attr_name(!0)+"-init");e.S("section, .top-bar-section",this)}b.data("index",0);var d=b.parent();d.hasClass("fixed")||e.is_sticky(b,d,c)?(e.settings.sticky_class=c.sticky_class,e.settings.sticky_topbar=b,b.data("height",d.outerHeight()),b.data("stickyoffset",d.offset().top)):b.data("height",b.outerHeight()),c.assembled||e.assemble(b),c.is_hover?e.S(".has-dropdown",b).addClass("not-click"):e.S(".has-dropdown",b).removeClass("not-click"),e.add_custom_rule(".f-topbar-fixed { padding-top: "+b.data("height")+"px }"),d.hasClass("fixed")&&e.S("body").addClass("f-topbar-fixed")})},is_sticky:function(a,b,c){var d=b.hasClass(c.sticky_class),e=matchMedia(Foundation.media_queries.small).matches,f=matchMedia(Foundation.media_queries.medium).matches,g=matchMedia(Foundation.media_queries.large).matches;return d&&"all"===c.sticky_on?!0:d&&this.small()&&-1!==c.sticky_on.indexOf("small")&&e&&!f&&!g?!0:d&&this.medium()&&-1!==c.sticky_on.indexOf("medium")&&e&&f&&!g?!0:d&&this.large()&&-1!==c.sticky_on.indexOf("large")&&e&&f&&g?!0:!1},toggle:function(c){var d,e=this;d=c?e.S(c).closest("["+this.attr_name()+"]"):e.S("["+this.attr_name()+"]");var f=d.data(this.attr_name(!0)+"-init"),g=e.S("section, .top-bar-section",d);e.breakpoint()&&(e.rtl?(g.css({right:"0%"}),a(">.name",g).css({right:"100%"})):(g.css({left:"0%"}),a(">.name",g).css({left:"100%"})),e.S("li.moved",g).removeClass("moved"),d.data("index",0),d.toggleClass("expanded").css("height","")),f.scrolltop?d.hasClass("expanded")?d.parent().hasClass("fixed")&&(f.scrolltop?(d.parent().removeClass("fixed"),d.addClass("fixed"),e.S("body").removeClass("f-topbar-fixed"),b.scrollTo(0,0)):d.parent().removeClass("expanded")):d.hasClass("fixed")&&(d.parent().addClass("fixed"),d.removeClass("fixed"),e.S("body").addClass("f-topbar-fixed")):(e.is_sticky(d,d.parent(),f)&&d.parent().addClass("fixed"),d.parent().hasClass("fixed")&&(d.hasClass("expanded")?(d.addClass("fixed"),d.parent().addClass("expanded"),e.S("body").addClass("f-topbar-fixed")):(d.removeClass("fixed"),d.parent().removeClass("expanded"),e.update_sticky_positioning())))},timer:null,events:function(c){var d=this,e=this.S;e(this.scope).off(".topbar").on("click.fndtn.topbar","["+this.attr_name()+"] .toggle-topbar",function(a){a.preventDefault(),d.toggle(this)}).on("click.fndtn.topbar contextmenu.fndtn.topbar",'.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',function(b){var c=a(this).closest("li"),e=c.closest("["+d.attr_name()+"]"),f=e.data(d.attr_name(!0)+"-init");if(f.dropdown_autoclose&&f.is_hover){var g=a(this).closest(".hover");g.removeClass("hover")}!d.breakpoint()||c.hasClass("back")||c.hasClass("has-dropdown")||d.toggle()}).on("click.fndtn.topbar","["+this.attr_name()+"] li.has-dropdown",function(b){var c=e(this),f=e(b.target),g=c.closest("["+d.attr_name()+"]"),h=g.data(d.attr_name(!0)+"-init");return f.data("revealId")?void d.toggle():void(d.breakpoint()||(!h.is_hover||Modernizr.touch)&&(b.stopImmediatePropagation(),c.hasClass("hover")?(c.removeClass("hover").find("li").removeClass("hover"),c.parents("li.hover").removeClass("hover")):(c.addClass("hover"),a(c).siblings().removeClass("hover"),"A"===f[0].nodeName&&f.parent().hasClass("has-dropdown")&&b.preventDefault())))}).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown>a",function(a){if(d.breakpoint()){a.preventDefault();var b=e(this),c=b.closest("["+d.attr_name()+"]"),f=c.find("section, .top-bar-section"),g=(b.next(".dropdown").outerHeight(),b.closest("li"));c.data("index",c.data("index")+1),g.addClass("moved"),d.rtl?(f.css({right:-(100*c.data("index"))+"%"}),f.find(">.name").css({right:100*c.data("index")+"%"})):(f.css({left:-(100*c.data("index"))+"%"}),f.find(">.name").css({left:100*c.data("index")+"%"})),c.css("height",b.siblings("ul").outerHeight(!0)+c.data("height"))}}),e(b).off(".topbar").on("resize.fndtn.topbar",d.throttle(function(){d.resize.call(d)},50)).trigger("resize.fndtn.topbar").load(function(){e(this).trigger("resize.fndtn.topbar")}),e("body").off(".topbar").on("click.fndtn.topbar",function(a){var b=e(a.target).closest("li").closest("li.hover");b.length>0||e("["+d.attr_name()+"] li.hover").removeClass("hover")}),e(this.scope).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown .back",function(a){a.preventDefault();var b=e(this),c=b.closest("["+d.attr_name()+"]"),f=c.find("section, .top-bar-section"),g=(c.data(d.attr_name(!0)+"-init"),b.closest("li.moved")),h=g.parent();c.data("index",c.data("index")-1),d.rtl?(f.css({right:-(100*c.data("index"))+"%"}),f.find(">.name").css({right:100*c.data("index")+"%"})):(f.css({left:-(100*c.data("index"))+"%"}),f.find(">.name").css({left:100*c.data("index")+"%"})),0===c.data("index")?c.css("height",""):c.css("height",h.outerHeight(!0)+c.data("height")),setTimeout(function(){g.removeClass("moved")},300)}),e(this.scope).find(".dropdown a").focus(function(){a(this).parents(".has-dropdown").addClass("hover")}).blur(function(){a(this).parents(".has-dropdown").removeClass("hover")})},resize:function(){var a=this;a.S("["+this.attr_name()+"]").each(function(){var b,d=a.S(this),e=d.data(a.attr_name(!0)+"-init"),f=d.parent("."+a.settings.sticky_class);if(!a.breakpoint()){var g=d.hasClass("expanded");d.css("height","").removeClass("expanded").find("li").removeClass("hover"),g&&a.toggle(d)}a.is_sticky(d,f,e)&&(f.hasClass("fixed")?(f.removeClass("fixed"),b=f.offset().top,a.S(c.body).hasClass("f-topbar-fixed")&&(b-=d.data("height")),d.data("stickyoffset",b),f.addClass("fixed")):(b=f.offset().top,d.data("stickyoffset",b)))})},breakpoint:function(){return!matchMedia(Foundation.media_queries.topbar).matches},small:function(){return matchMedia(Foundation.media_queries.small).matches},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},assemble:function(b){var c=this,d=b.data(this.attr_name(!0)+"-init"),e=c.S("section, .top-bar-section",b);e.detach(),c.S(".has-dropdown>a",e).each(function(){var b,e=c.S(this),f=e.siblings(".dropdown"),g=e.attr("href");f.find(".title.back").length||(b=a(1==d.mobile_show_parent_link&&g?'<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="'+g+'">'+e.html()+"</a></li>":'<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>'),a("h5>a",b).html(1==d.custom_back_text?d.back_text:"« "+e.html()),f.prepend(b))}),e.appendTo(b),this.sticky(),this.assembled(b)},assembled:function(b){b.data(this.attr_name(!0),a.extend({},b.data(this.attr_name(!0)),{assembled:!0}))},height:function(b){var c=0,d=this;return a("> li",b).each(function(){c+=d.S(this).outerHeight(!0)}),c},sticky:function(){var a=this;this.S(b).on("scroll",function(){a.update_sticky_positioning()})},update_sticky_positioning:function(){var a="."+this.settings.sticky_class,c=this.S(b),d=this;if(d.settings.sticky_topbar&&d.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)){var e=this.settings.sticky_topbar.data("stickyoffset")+this.settings.start_offset;d.S(a).hasClass("expanded")||(c.scrollTop()>e?d.S(a).hasClass("fixed")||(d.S(a).addClass("fixed"),d.S("body").addClass("f-topbar-fixed")):c.scrollTop()<=e&&d.S(a).hasClass("fixed")&&(d.S(a).removeClass("fixed"),d.S("body").removeClass("f-topbar-fixed")))}},off:function(){this.S(this.scope).off(".fndtn.topbar"),this.S(b).off(".fndtn.topbar")},reflow:function(){}}}(jQuery,window,window.document);;// Load foundation
+$(document).foundation();
+$(document).ready(function () {
+ $('ul.children').each(function () {
+ $(this).before('<a class="toggle" href="#"></a>');
+ });
+ $('a.toggle').click('click', function () {
+ $(this).toggleClass('open');
+ $(this).siblings('ul').toggleClass('open');
+ });
+});
--- /dev/null
+// Load foundation
+$(document).foundation();
+$(document).ready(function () {
+ $('ul.children').each(function () {
+ $(this).before('<a class="toggle" href="#"></a>');
+ });
+ $('a.toggle').click('click', function () {
+ $(this).toggleClass('open');
+ $(this).siblings('ul').toggleClass('open');
+ });
+});
--- /dev/null
+/*
+ * To avoid conflicts, Wordpress tends to prefer jQuery being used over $.
+ * As long as this file is included, no such conflicts should arise. Ensure it
+ * is called before other .js files using $.
+ */
+var $=jQuery.noConflict();
\ No newline at end of file
--- /dev/null
+;(function () {
+ 'use strict';
+
+ /**
+ * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
+ *
+ * @codingstandard ftlabs-jsv2
+ * @copyright The Financial Times Limited [All Rights Reserved]
+ * @license MIT License (see LICENSE.txt)
+ */
+
+ /*jslint browser:true, node:true*/
+ /*global define, Event, Node*/
+
+
+ /**
+ * Instantiate fast-clicking listeners on the specified layer.
+ *
+ * @constructor
+ * @param {Element} layer The layer to listen on
+ * @param {Object} [options={}] The options to override the defaults
+ */
+ function FastClick(layer, options) {
+ var oldOnClick;
+
+ options = options || {};
+
+ /**
+ * Whether a click is currently being tracked.
+ *
+ * @type boolean
+ */
+ this.trackingClick = false;
+
+
+ /**
+ * Timestamp for when click tracking started.
+ *
+ * @type number
+ */
+ this.trackingClickStart = 0;
+
+
+ /**
+ * The element being tracked for a click.
+ *
+ * @type EventTarget
+ */
+ this.targetElement = null;
+
+
+ /**
+ * X-coordinate of touch start event.
+ *
+ * @type number
+ */
+ this.touchStartX = 0;
+
+
+ /**
+ * Y-coordinate of touch start event.
+ *
+ * @type number
+ */
+ this.touchStartY = 0;
+
+
+ /**
+ * ID of the last touch, retrieved from Touch.identifier.
+ *
+ * @type number
+ */
+ this.lastTouchIdentifier = 0;
+
+
+ /**
+ * Touchmove boundary, beyond which a click will be cancelled.
+ *
+ * @type number
+ */
+ this.touchBoundary = options.touchBoundary || 10;
+
+
+ /**
+ * The FastClick layer.
+ *
+ * @type Element
+ */
+ this.layer = layer;
+
+ /**
+ * The minimum time between tap(touchstart and touchend) events
+ *
+ * @type number
+ */
+ this.tapDelay = options.tapDelay || 200;
+
+ /**
+ * The maximum time for a tap
+ *
+ * @type number
+ */
+ this.tapTimeout = options.tapTimeout || 700;
+
+ if (FastClick.notNeeded(layer)) {
+ return;
+ }
+
+ // Some old versions of Android don't have Function.prototype.bind
+ function bind(method, context) {
+ return function() { return method.apply(context, arguments); };
+ }
+
+
+ var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
+ var context = this;
+ for (var i = 0, l = methods.length; i < l; i++) {
+ context[methods[i]] = bind(context[methods[i]], context);
+ }
+
+ // Set up event handlers as required
+ if (deviceIsAndroid) {
+ layer.addEventListener('mouseover', this.onMouse, true);
+ layer.addEventListener('mousedown', this.onMouse, true);
+ layer.addEventListener('mouseup', this.onMouse, true);
+ }
+
+ layer.addEventListener('click', this.onClick, true);
+ layer.addEventListener('touchstart', this.onTouchStart, false);
+ layer.addEventListener('touchmove', this.onTouchMove, false);
+ layer.addEventListener('touchend', this.onTouchEnd, false);
+ layer.addEventListener('touchcancel', this.onTouchCancel, false);
+
+ // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+ // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
+ // layer when they are cancelled.
+ if (!Event.prototype.stopImmediatePropagation) {
+ layer.removeEventListener = function(type, callback, capture) {
+ var rmv = Node.prototype.removeEventListener;
+ if (type === 'click') {
+ rmv.call(layer, type, callback.hijacked || callback, capture);
+ } else {
+ rmv.call(layer, type, callback, capture);
+ }
+ };
+
+ layer.addEventListener = function(type, callback, capture) {
+ var adv = Node.prototype.addEventListener;
+ if (type === 'click') {
+ adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
+ if (!event.propagationStopped) {
+ callback(event);
+ }
+ }), capture);
+ } else {
+ adv.call(layer, type, callback, capture);
+ }
+ };
+ }
+
+ // If a handler is already declared in the element's onclick attribute, it will be fired before
+ // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
+ // adding it as listener.
+ if (typeof layer.onclick === 'function') {
+
+ // Android browser on at least 3.2 requires a new reference to the function in layer.onclick
+ // - the old one won't work if passed to addEventListener directly.
+ oldOnClick = layer.onclick;
+ layer.addEventListener('click', function(event) {
+ oldOnClick(event);
+ }, false);
+ layer.onclick = null;
+ }
+ }
+
+ /**
+ * Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
+ *
+ * @type boolean
+ */
+ var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
+
+ /**
+ * Android requires exceptions.
+ *
+ * @type boolean
+ */
+ var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
+
+
+ /**
+ * iOS requires exceptions.
+ *
+ * @type boolean
+ */
+ var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
+
+
+ /**
+ * iOS 4 requires an exception for select elements.
+ *
+ * @type boolean
+ */
+ var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
+
+
+ /**
+ * iOS 6.0-7.* requires the target element to be manually derived
+ *
+ * @type boolean
+ */
+ var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent);
+
+ /**
+ * BlackBerry requires exceptions.
+ *
+ * @type boolean
+ */
+ var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
+
+ /**
+ * Determine whether a given element requires a native click.
+ *
+ * @param {EventTarget|Element} target Target DOM element
+ * @returns {boolean} Returns true if the element needs a native click
+ */
+ FastClick.prototype.needsClick = function(target) {
+ switch (target.nodeName.toLowerCase()) {
+
+ // Don't send a synthetic click to disabled inputs (issue #62)
+ case 'button':
+ case 'select':
+ case 'textarea':
+ if (target.disabled) {
+ return true;
+ }
+
+ break;
+ case 'input':
+
+ // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
+ if ((deviceIsIOS && target.type === 'file') || target.disabled) {
+ return true;
+ }
+
+ break;
+ case 'label':
+ case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
+ case 'video':
+ return true;
+ }
+
+ return (/\bneedsclick\b/).test(target.className);
+ };
+
+
+ /**
+ * Determine whether a given element requires a call to focus to simulate click into element.
+ *
+ * @param {EventTarget|Element} target Target DOM element
+ * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
+ */
+ FastClick.prototype.needsFocus = function(target) {
+ switch (target.nodeName.toLowerCase()) {
+ case 'textarea':
+ return true;
+ case 'select':
+ return !deviceIsAndroid;
+ case 'input':
+ switch (target.type) {
+ case 'button':
+ case 'checkbox':
+ case 'file':
+ case 'image':
+ case 'radio':
+ case 'submit':
+ return false;
+ }
+
+ // No point in attempting to focus disabled inputs
+ return !target.disabled && !target.readOnly;
+ default:
+ return (/\bneedsfocus\b/).test(target.className);
+ }
+ };
+
+
+ /**
+ * Send a click event to the specified element.
+ *
+ * @param {EventTarget|Element} targetElement
+ * @param {Event} event
+ */
+ FastClick.prototype.sendClick = function(targetElement, event) {
+ var clickEvent, touch;
+
+ // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
+ if (document.activeElement && document.activeElement !== targetElement) {
+ document.activeElement.blur();
+ }
+
+ touch = event.changedTouches[0];
+
+ // Synthesise a click event, with an extra attribute so it can be tracked
+ clickEvent = document.createEvent('MouseEvents');
+ clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
+ clickEvent.forwardedTouchEvent = true;
+ targetElement.dispatchEvent(clickEvent);
+ };
+
+ FastClick.prototype.determineEventType = function(targetElement) {
+
+ //Issue #159: Android Chrome Select Box does not open with a synthetic click event
+ if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
+ return 'mousedown';
+ }
+
+ return 'click';
+ };
+
+
+ /**
+ * @param {EventTarget|Element} targetElement
+ */
+ FastClick.prototype.focus = function(targetElement) {
+ var length;
+
+ // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
+ if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
+ length = targetElement.value.length;
+ targetElement.setSelectionRange(length, length);
+ } else {
+ targetElement.focus();
+ }
+ };
+
+
+ /**
+ * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
+ *
+ * @param {EventTarget|Element} targetElement
+ */
+ FastClick.prototype.updateScrollParent = function(targetElement) {
+ var scrollParent, parentElement;
+
+ scrollParent = targetElement.fastClickScrollParent;
+
+ // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
+ // target element was moved to another parent.
+ if (!scrollParent || !scrollParent.contains(targetElement)) {
+ parentElement = targetElement;
+ do {
+ if (parentElement.scrollHeight > parentElement.offsetHeight) {
+ scrollParent = parentElement;
+ targetElement.fastClickScrollParent = parentElement;
+ break;
+ }
+
+ parentElement = parentElement.parentElement;
+ } while (parentElement);
+ }
+
+ // Always update the scroll top tracker if possible.
+ if (scrollParent) {
+ scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
+ }
+ };
+
+
+ /**
+ * @param {EventTarget} targetElement
+ * @returns {Element|EventTarget}
+ */
+ FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
+
+ // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
+ if (eventTarget.nodeType === Node.TEXT_NODE) {
+ return eventTarget.parentNode;
+ }
+
+ return eventTarget;
+ };
+
+
+ /**
+ * On touch start, record the position and scroll offset.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onTouchStart = function(event) {
+ var targetElement, touch, selection;
+
+ // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
+ if (event.targetTouches.length > 1) {
+ return true;
+ }
+
+ targetElement = this.getTargetElementFromEventTarget(event.target);
+ touch = event.targetTouches[0];
+
+ if (deviceIsIOS) {
+
+ // Only trusted events will deselect text on iOS (issue #49)
+ selection = window.getSelection();
+ if (selection.rangeCount && !selection.isCollapsed) {
+ return true;
+ }
+
+ if (!deviceIsIOS4) {
+
+ // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
+ // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
+ // with the same identifier as the touch event that previously triggered the click that triggered the alert.
+ // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
+ // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
+ // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
+ // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
+ // random integers, it's safe to to continue if the identifier is 0 here.
+ if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
+ event.preventDefault();
+ return false;
+ }
+
+ this.lastTouchIdentifier = touch.identifier;
+
+ // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
+ // 1) the user does a fling scroll on the scrollable layer
+ // 2) the user stops the fling scroll with another tap
+ // then the event.target of the last 'touchend' event will be the element that was under the user's finger
+ // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
+ // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
+ this.updateScrollParent(targetElement);
+ }
+ }
+
+ this.trackingClick = true;
+ this.trackingClickStart = event.timeStamp;
+ this.targetElement = targetElement;
+
+ this.touchStartX = touch.pageX;
+ this.touchStartY = touch.pageY;
+
+ // Prevent phantom clicks on fast double-tap (issue #36)
+ if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
+ event.preventDefault();
+ }
+
+ return true;
+ };
+
+
+ /**
+ * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.touchHasMoved = function(event) {
+ var touch = event.changedTouches[0], boundary = this.touchBoundary;
+
+ if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
+ return true;
+ }
+
+ return false;
+ };
+
+
+ /**
+ * Update the last position.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onTouchMove = function(event) {
+ if (!this.trackingClick) {
+ return true;
+ }
+
+ // If the touch has moved, cancel the click tracking
+ if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
+ this.trackingClick = false;
+ this.targetElement = null;
+ }
+
+ return true;
+ };
+
+
+ /**
+ * Attempt to find the labelled control for the given label element.
+ *
+ * @param {EventTarget|HTMLLabelElement} labelElement
+ * @returns {Element|null}
+ */
+ FastClick.prototype.findControl = function(labelElement) {
+
+ // Fast path for newer browsers supporting the HTML5 control attribute
+ if (labelElement.control !== undefined) {
+ return labelElement.control;
+ }
+
+ // All browsers under test that support touch events also support the HTML5 htmlFor attribute
+ if (labelElement.htmlFor) {
+ return document.getElementById(labelElement.htmlFor);
+ }
+
+ // If no for attribute exists, attempt to retrieve the first labellable descendant element
+ // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
+ return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
+ };
+
+
+ /**
+ * On touch end, determine whether to send a click event at once.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onTouchEnd = function(event) {
+ var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
+
+ if (!this.trackingClick) {
+ return true;
+ }
+
+ // Prevent phantom clicks on fast double-tap (issue #36)
+ if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
+ this.cancelNextClick = true;
+ return true;
+ }
+
+ if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {
+ return true;
+ }
+
+ // Reset to prevent wrong click cancel on input (issue #156).
+ this.cancelNextClick = false;
+
+ this.lastClickTime = event.timeStamp;
+
+ trackingClickStart = this.trackingClickStart;
+ this.trackingClick = false;
+ this.trackingClickStart = 0;
+
+ // On some iOS devices, the targetElement supplied with the event is invalid if the layer
+ // is performing a transition or scroll, and has to be re-detected manually. Note that
+ // for this to function correctly, it must be called *after* the event target is checked!
+ // See issue #57; also filed as rdar://13048589 .
+ if (deviceIsIOSWithBadTarget) {
+ touch = event.changedTouches[0];
+
+ // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
+ targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
+ targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
+ }
+
+ targetTagName = targetElement.tagName.toLowerCase();
+ if (targetTagName === 'label') {
+ forElement = this.findControl(targetElement);
+ if (forElement) {
+ this.focus(targetElement);
+ if (deviceIsAndroid) {
+ return false;
+ }
+
+ targetElement = forElement;
+ }
+ } else if (this.needsFocus(targetElement)) {
+
+ // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
+ // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
+ if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
+ this.targetElement = null;
+ return false;
+ }
+
+ this.focus(targetElement);
+ this.sendClick(targetElement, event);
+
+ // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
+ // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
+ if (!deviceIsIOS || targetTagName !== 'select') {
+ this.targetElement = null;
+ event.preventDefault();
+ }
+
+ return false;
+ }
+
+ if (deviceIsIOS && !deviceIsIOS4) {
+
+ // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
+ // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
+ scrollParent = targetElement.fastClickScrollParent;
+ if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
+ return true;
+ }
+ }
+
+ // Prevent the actual click from going though - unless the target node is marked as requiring
+ // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
+ if (!this.needsClick(targetElement)) {
+ event.preventDefault();
+ this.sendClick(targetElement, event);
+ }
+
+ return false;
+ };
+
+
+ /**
+ * On touch cancel, stop tracking the click.
+ *
+ * @returns {void}
+ */
+ FastClick.prototype.onTouchCancel = function() {
+ this.trackingClick = false;
+ this.targetElement = null;
+ };
+
+
+ /**
+ * Determine mouse events which should be permitted.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onMouse = function(event) {
+
+ // If a target element was never set (because a touch event was never fired) allow the event
+ if (!this.targetElement) {
+ return true;
+ }
+
+ if (event.forwardedTouchEvent) {
+ return true;
+ }
+
+ // Programmatically generated events targeting a specific element should be permitted
+ if (!event.cancelable) {
+ return true;
+ }
+
+ // Derive and check the target element to see whether the mouse event needs to be permitted;
+ // unless explicitly enabled, prevent non-touch click events from triggering actions,
+ // to prevent ghost/doubleclicks.
+ if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
+
+ // Prevent any user-added listeners declared on FastClick element from being fired.
+ if (event.stopImmediatePropagation) {
+ event.stopImmediatePropagation();
+ } else {
+
+ // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+ event.propagationStopped = true;
+ }
+
+ // Cancel the event
+ event.stopPropagation();
+ event.preventDefault();
+
+ return false;
+ }
+
+ // If the mouse event is permitted, return true for the action to go through.
+ return true;
+ };
+
+
+ /**
+ * On actual clicks, determine whether this is a touch-generated click, a click action occurring
+ * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
+ * an actual click which should be permitted.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+ FastClick.prototype.onClick = function(event) {
+ var permitted;
+
+ // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
+ if (this.trackingClick) {
+ this.targetElement = null;
+ this.trackingClick = false;
+ return true;
+ }
+
+ // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
+ if (event.target.type === 'submit' && event.detail === 0) {
+ return true;
+ }
+
+ permitted = this.onMouse(event);
+
+ // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
+ if (!permitted) {
+ this.targetElement = null;
+ }
+
+ // If clicks are permitted, return true for the action to go through.
+ return permitted;
+ };
+
+
+ /**
+ * Remove all FastClick's event listeners.
+ *
+ * @returns {void}
+ */
+ FastClick.prototype.destroy = function() {
+ var layer = this.layer;
+
+ if (deviceIsAndroid) {
+ layer.removeEventListener('mouseover', this.onMouse, true);
+ layer.removeEventListener('mousedown', this.onMouse, true);
+ layer.removeEventListener('mouseup', this.onMouse, true);
+ }
+
+ layer.removeEventListener('click', this.onClick, true);
+ layer.removeEventListener('touchstart', this.onTouchStart, false);
+ layer.removeEventListener('touchmove', this.onTouchMove, false);
+ layer.removeEventListener('touchend', this.onTouchEnd, false);
+ layer.removeEventListener('touchcancel', this.onTouchCancel, false);
+ };
+
+
+ /**
+ * Check whether FastClick is needed.
+ *
+ * @param {Element} layer The layer to listen on
+ */
+ FastClick.notNeeded = function(layer) {
+ var metaViewport;
+ var chromeVersion;
+ var blackberryVersion;
+ var firefoxVersion;
+
+ // Devices that don't support touch don't need FastClick
+ if (typeof window.ontouchstart === 'undefined') {
+ return true;
+ }
+
+ // Chrome version - zero for other browsers
+ chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
+
+ if (chromeVersion) {
+
+ if (deviceIsAndroid) {
+ metaViewport = document.querySelector('meta[name=viewport]');
+
+ if (metaViewport) {
+ // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
+ if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+ return true;
+ }
+ // Chrome 32 and above with width=device-width or less don't need FastClick
+ if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
+ return true;
+ }
+ }
+
+ // Chrome desktop doesn't need FastClick (issue #15)
+ } else {
+ return true;
+ }
+ }
+
+ if (deviceIsBlackBerry10) {
+ blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
+
+ // BlackBerry 10.3+ does not require Fastclick library.
+ // https://github.com/ftlabs/fastclick/issues/251
+ if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
+ metaViewport = document.querySelector('meta[name=viewport]');
+
+ if (metaViewport) {
+ // user-scalable=no eliminates click delay.
+ if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+ return true;
+ }
+ // width=device-width (or less than device-width) eliminates click delay.
+ if (document.documentElement.scrollWidth <= window.outerWidth) {
+ return true;
+ }
+ }
+ }
+ }
+
+ // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
+ if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
+ return true;
+ }
+
+ // Firefox version - zero for other browsers
+ firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
+
+ if (firefoxVersion >= 27) {
+ // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
+
+ metaViewport = document.querySelector('meta[name=viewport]');
+ if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
+ return true;
+ }
+ }
+
+ // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
+ // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
+ if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
+ return true;
+ }
+
+ return false;
+ };
+
+
+ /**
+ * Factory method for creating a FastClick object
+ *
+ * @param {Element} layer The layer to listen on
+ * @param {Object} [options={}] The options to override the defaults
+ */
+ FastClick.attach = function(layer, options) {
+ return new FastClick(layer, options);
+ };
+
+
+ if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
+
+ // AMD. Register as an anonymous module.
+ define(function() {
+ return FastClick;
+ });
+ } else if (typeof module !== 'undefined' && module.exports) {
+ module.exports = FastClick.attach;
+ module.exports.FastClick = FastClick;
+ } else {
+ window.FastClick = FastClick;
+ }
+}());
--- /dev/null
+{
+"version": 3,
+"mappings": "AA2WI,uBAAwB;EACtB,WAAW,EAAE,eAAe;;AAG9B,wBAAyB;EACvB,WAAW,EAAE,eAA8B;EAC3C,KAAK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e,EAAE,SAAS;;EACtC,aAAc;IAAE,OAAO,EAAE,mBAAmB;;EAE5C,iBAAkB;IAAE,OAAO,EAAE,oBAAoB;;EAGjD;;oBAEmB;IAAE,OAAO,EAAE,EAAE;;EAEhC;YACW;IACT,MAAM,EAAE,iBAAmB;IAC3B,iBAAiB,EAAE,KAAK;;EAG1B,KAAM;IAAE,OAAO,EAAE,kBAAkB;;;EAEnC;KACI;IAAE,iBAAiB,EAAE,KAAK;;EAE9B,GAAI;IAAE,SAAS,EAAE,eAAe;;EAEhC,KAAuB;IAAf,MAAM,EAAE,IAAI;EAEpB;;IAEG;IACD,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;;EAGX;IACG;IAAE,gBAAgB,EAAE,KAAK;;EAE5B,cAAe;IAAE,OAAO,EAAE,eAAe;;EACzC,WAAY;IAAE,OAAO,EAAE,gBAAgB;;EACvC,eAAgB;IAAE,OAAO,EAAE,eAAe;;EAC1C,eAAgB;IAAE,OAAO,EAAE,kBAAkB;;AAKjD,YAAa;EACX,eAAgB;IAAE,OAAO,EAAE,KAAK;;EAChC,eAAgB;IAAE,OAAO,EAAE,IAAI;;EAE/B,oBAAqB;IAAE,OAAO,EAAE,gBAAgB;;EAChD,oBAAqB;IAAE,OAAO,EAAE,6BAA6B;;EAC7D,oBAAqB;IAAE,OAAO,EAAE,0BAA0B;;EAC1D,iBAAkB;IAAE,OAAO,EAAE,oBAAoB;;EACjD,iBAAkB;IAAE,OAAO,EAAE,qBAAqB;;EAClD,iBAAkB;IAAE,OAAO,EAAE,qBAAqB;AAGpD,gBAAgB;EACd,eAAgB;IAAE,OAAO,EAAE,eAAe",
+"sources": ["../../../scss/foundation/components/_global.scss","../../../scss/foundation/components/_grid.scss","../../../scss/foundation/components/_accordion.scss","../../../scss/foundation/components/_alert-boxes.scss","../../../scss/foundation/components/_block-grid.scss","../../../scss/foundation/components/_breadcrumbs.scss","../../../scss/foundation/components/_buttons.scss","../../../scss/foundation/_functions.scss","../../../scss/foundation/components/_button-groups.scss","../../../scss/foundation/components/_clearing.scss","../../../scss/foundation/components/_dropdown.scss","../../../scss/foundation/components/_dropdown-buttons.scss","../../../scss/foundation/components/_flex-video.scss","../../../scss/foundation/components/_forms.scss","../../../scss/foundation/components/_icon-bar.scss","../../../scss/foundation/components/_inline-lists.scss","../../../scss/foundation/components/_joyride.scss","../../../scss/foundation/components/_keystrokes.scss","../../../scss/foundation/components/_labels.scss","../../../scss/foundation/components/_magellan.scss","../../../scss/foundation/components/_orbit.scss","../../../scss/foundation/components/_pagination.scss","../../../scss/foundation/components/_panels.scss","../../../scss/foundation/components/_pricing-tables.scss","../../../scss/foundation/components/_progress-bars.scss","../../../scss/foundation/components/_range-slider.scss","../../../scss/foundation/components/_reveal.scss","../../../scss/foundation/components/_side-nav.scss","../../../scss/foundation/components/_split-buttons.scss","../../../scss/foundation/components/_sub-nav.scss","../../../scss/foundation/components/_switches.scss","../../../scss/foundation/components/_tables.scss","../../../scss/foundation/components/_tabs.scss","../../../scss/foundation/components/_thumbs.scss","../../../scss/foundation/components/_tooltips.scss","../../../scss/foundation/components/_top-bar.scss","../../../scss/foundation/components/_type.scss","../../../scss/foundation/components/_offcanvas.scss","../../../scss/foundation/components/_visibility.scss"],
+"names": [],
+"file": "foundation.css"
+}
--- /dev/null
+{
+"version": 3,
+"mappings": ";;;;;;AAQA,IAAK;EACH,WAAW,EAAE,UAAU;;EACvB,oBAAoB,EAAE,IAAI;;EAC1B,wBAAwB,EAAE,IAAI;;;;;;AAOhC,IAAK;EACH,MAAM,EAAE,CAAC;;;;;;;;;;AAaX;;;;;;;;;;;;OAYQ;EACN,OAAO,EAAE,KAAK;;;;;;AAQhB;;;KAGM;EACJ,OAAO,EAAE,YAAY;;EACrB,cAAc,EAAE,QAAQ;;;;;;;AAQ1B,qBAAsB;EACpB,OAAO,EAAE,IAAI;EACb,MAAM,EAAE,CAAC;;;;;;AAQX;QACS;EACP,OAAO,EAAE,IAAI;;;;;;;AAUf,CAAE;EAC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C;;;;;;AAQZ,KAAM;EACJ,WAAW,EAAE,MAAM;;;;;;;;;AAWrB;mBACoB;EAClB,UAAU,EAAE,UAAU;;EACtB,OAAO,EAAE,CAAC;;;;;;;;AASZ;+CACgD;EAC9C,MAAM,EAAE,IAAI;;;;;;AAQd,oBAAqB;EACnB,kBAAkB,EAAE,SAAS;;EAC7B,UAAU,EAAE,WAAW;;;;;;;;AASzB;+CACgD;EAC9C,kBAAkB,EAAE,IAAI;;;;;AAO1B,QAAS;EACP,MAAM,EAAE,iBAAiB;EACzB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,qBAAqB;;;;;;AAQhC,MAAO;EACL,MAAM,EAAE,CAAC;;EACT,OAAO,EAAE,CAAC;;;;;;AAOZ,QAAS;EACP,QAAQ,EAAE,IAAI;;;;;;AAQhB,QAAS;EACP,WAAW,EAAE,IAAI;;;;;;;AAUnB,KAAM;EACJ,eAAe,EAAE,QAAQ;EACzB,cAAc,EAAE,CAAC;;AAGnB;EACG;EACD,OAAO,EAAE,CAAC",
+"sources": ["../../../scss/normalize.scss"],
+"names": [],
+"file": "normalize.css"
+}
--- /dev/null
+/*
+ * Foundation Responsive Library
+ * http://foundation.zurb.com
+ * Copyright 2014, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+
+(function ($, window, document, undefined) {
+ 'use strict';
+
+ var header_helpers = function (class_array) {
+ var i = class_array.length;
+ var head = $('head');
+
+ while (i--) {
+ if (head.has('.' + class_array[i]).length === 0) {
+ head.append('<meta class="' + class_array[i] + '" />');
+ }
+ }
+ };
+
+ header_helpers([
+ 'foundation-mq-small',
+ 'foundation-mq-small-only',
+ 'foundation-mq-medium',
+ 'foundation-mq-medium-only',
+ 'foundation-mq-large',
+ 'foundation-mq-large-only',
+ 'foundation-mq-xlarge',
+ 'foundation-mq-xlarge-only',
+ 'foundation-mq-xxlarge',
+ 'foundation-data-attribute-namespace']);
+
+ // Enable FastClick if present
+
+ $(function () {
+ if (typeof FastClick !== 'undefined') {
+ // Don't attach to body if undefined
+ if (typeof document.body !== 'undefined') {
+ FastClick.attach(document.body);
+ }
+ }
+ });
+
+ // private Fast Selector wrapper,
+ // returns jQuery object. Only use where
+ // getElementById is not available.
+ var S = function (selector, context) {
+ if (typeof selector === 'string') {
+ if (context) {
+ var cont;
+ if (context.jquery) {
+ cont = context[0];
+ if (!cont) {
+ return context;
+ }
+ } else {
+ cont = context;
+ }
+ return $(cont.querySelectorAll(selector));
+ }
+
+ return $(document.querySelectorAll(selector));
+ }
+
+ return $(selector, context);
+ };
+
+ // Namespace functions.
+
+ var attr_name = function (init) {
+ var arr = [];
+ if (!init) {
+ arr.push('data');
+ }
+ if (this.namespace.length > 0) {
+ arr.push(this.namespace);
+ }
+ arr.push(this.name);
+
+ return arr.join('-');
+ };
+
+ var add_namespace = function (str) {
+ var parts = str.split('-'),
+ i = parts.length,
+ arr = [];
+
+ while (i--) {
+ if (i !== 0) {
+ arr.push(parts[i]);
+ } else {
+ if (this.namespace.length > 0) {
+ arr.push(this.namespace, parts[i]);
+ } else {
+ arr.push(parts[i]);
+ }
+ }
+ }
+
+ return arr.reverse().join('-');
+ };
+
+ // Event binding and data-options updating.
+
+ var bindings = function (method, options) {
+ var self = this,
+ bind = function(){
+ var $this = S(this),
+ should_bind_events = !$this.data(self.attr_name(true) + '-init');
+ $this.data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options($this)));
+
+ if (should_bind_events) {
+ self.events(this);
+ }
+ };
+
+ if (S(this.scope).is('[' + this.attr_name() +']')) {
+ bind.call(this.scope);
+ } else {
+ S('[' + this.attr_name() +']', this.scope).each(bind);
+ }
+ // # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating.
+ if (typeof method === 'string') {
+ return this[method].call(this, options);
+ }
+
+ };
+
+ var single_image_loaded = function (image, callback) {
+ function loaded () {
+ callback(image[0]);
+ }
+
+ function bindLoad () {
+ this.one('load', loaded);
+
+ if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
+ var src = this.attr( 'src' ),
+ param = src.match( /\?/ ) ? '&' : '?';
+
+ param += 'random=' + (new Date()).getTime();
+ this.attr('src', src + param);
+ }
+ }
+
+ if (!image.attr('src')) {
+ loaded();
+ return;
+ }
+
+ if (image[0].complete || image[0].readyState === 4) {
+ loaded();
+ } else {
+ bindLoad.call(image);
+ }
+ };
+
+ /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
+
+ window.matchMedia || (window.matchMedia = function() {
+ "use strict";
+
+ // For browsers that support matchMedium api such as IE 9 and webkit
+ var styleMedia = (window.styleMedia || window.media);
+
+ // For those that don't support matchMedium
+ if (!styleMedia) {
+ var style = document.createElement('style'),
+ script = document.getElementsByTagName('script')[0],
+ info = null;
+
+ style.type = 'text/css';
+ style.id = 'matchmediajs-test';
+
+ script.parentNode.insertBefore(style, script);
+
+ // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
+ info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;
+
+ styleMedia = {
+ matchMedium: function(media) {
+ var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
+
+ // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
+ if (style.styleSheet) {
+ style.styleSheet.cssText = text;
+ } else {
+ style.textContent = text;
+ }
+
+ // Test if media query is true or false
+ return info.width === '1px';
+ }
+ };
+ }
+
+ return function(media) {
+ return {
+ matches: styleMedia.matchMedium(media || 'all'),
+ media: media || 'all'
+ };
+ };
+ }());
+
+ /*
+ * jquery.requestAnimationFrame
+ * https://github.com/gnarf37/jquery-requestAnimationFrame
+ * Requires jQuery 1.8+
+ *
+ * Copyright (c) 2012 Corey Frang
+ * Licensed under the MIT license.
+ */
+
+ (function(jQuery) {
+
+
+ // requestAnimationFrame polyfill adapted from Erik Möller
+ // fixes from Paul Irish and Tino Zijdel
+ // http://paulirish.com/2011/requestanimationframe-for-smart-animating/
+ // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
+
+ var animating,
+ lastTime = 0,
+ vendors = ['webkit', 'moz'],
+ requestAnimationFrame = window.requestAnimationFrame,
+ cancelAnimationFrame = window.cancelAnimationFrame,
+ jqueryFxAvailable = 'undefined' !== typeof jQuery.fx;
+
+ for (; lastTime < vendors.length && !requestAnimationFrame; lastTime++) {
+ requestAnimationFrame = window[ vendors[lastTime] + 'RequestAnimationFrame' ];
+ cancelAnimationFrame = cancelAnimationFrame ||
+ window[ vendors[lastTime] + 'CancelAnimationFrame' ] ||
+ window[ vendors[lastTime] + 'CancelRequestAnimationFrame' ];
+ }
+
+ function raf() {
+ if (animating) {
+ requestAnimationFrame(raf);
+
+ if (jqueryFxAvailable) {
+ jQuery.fx.tick();
+ }
+ }
+ }
+
+ if (requestAnimationFrame) {
+ // use rAF
+ window.requestAnimationFrame = requestAnimationFrame;
+ window.cancelAnimationFrame = cancelAnimationFrame;
+
+ if (jqueryFxAvailable) {
+ jQuery.fx.timer = function (timer) {
+ if (timer() && jQuery.timers.push(timer) && !animating) {
+ animating = true;
+ raf();
+ }
+ };
+
+ jQuery.fx.stop = function () {
+ animating = false;
+ };
+ }
+ } else {
+ // polyfill
+ window.requestAnimationFrame = function (callback) {
+ var currTime = new Date().getTime(),
+ timeToCall = Math.max(0, 16 - (currTime - lastTime)),
+ id = window.setTimeout(function () {
+ callback(currTime + timeToCall);
+ }, timeToCall);
+ lastTime = currTime + timeToCall;
+ return id;
+ };
+
+ window.cancelAnimationFrame = function (id) {
+ clearTimeout(id);
+ };
+
+ }
+
+ }( $ ));
+
+ function removeQuotes (string) {
+ if (typeof string === 'string' || string instanceof String) {
+ string = string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g, '');
+ }
+
+ return string;
+ }
+
+ window.Foundation = {
+ name : 'Foundation',
+
+ version : '5.5.2',
+
+ media_queries : {
+ 'small' : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'small-only' : S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'medium' : S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'medium-only' : S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'large' : S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'large-only' : S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'xlarge' : S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'xlarge-only' : S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'xxlarge' : S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, '')
+ },
+
+ stylesheet : $('<style></style>').appendTo('head')[0].sheet,
+
+ global : {
+ namespace : undefined
+ },
+
+ init : function (scope, libraries, method, options, response) {
+ var args = [scope, method, options, response],
+ responses = [];
+
+ // check RTL
+ this.rtl = /rtl/i.test(S('html').attr('dir'));
+
+ // set foundation global scope
+ this.scope = scope || this.scope;
+
+ this.set_namespace();
+
+ if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) {
+ if (this.libs.hasOwnProperty(libraries)) {
+ responses.push(this.init_lib(libraries, args));
+ }
+ } else {
+ for (var lib in this.libs) {
+ responses.push(this.init_lib(lib, libraries));
+ }
+ }
+
+ S(window).load(function () {
+ S(window)
+ .trigger('resize.fndtn.clearing')
+ .trigger('resize.fndtn.dropdown')
+ .trigger('resize.fndtn.equalizer')
+ .trigger('resize.fndtn.interchange')
+ .trigger('resize.fndtn.joyride')
+ .trigger('resize.fndtn.magellan')
+ .trigger('resize.fndtn.topbar')
+ .trigger('resize.fndtn.slider');
+ });
+
+ return scope;
+ },
+
+ init_lib : function (lib, args) {
+ if (this.libs.hasOwnProperty(lib)) {
+ this.patch(this.libs[lib]);
+
+ if (args && args.hasOwnProperty(lib)) {
+ if (typeof this.libs[lib].settings !== 'undefined') {
+ $.extend(true, this.libs[lib].settings, args[lib]);
+ } else if (typeof this.libs[lib].defaults !== 'undefined') {
+ $.extend(true, this.libs[lib].defaults, args[lib]);
+ }
+ return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]);
+ }
+
+ args = args instanceof Array ? args : new Array(args);
+ return this.libs[lib].init.apply(this.libs[lib], args);
+ }
+
+ return function () {};
+ },
+
+ patch : function (lib) {
+ lib.scope = this.scope;
+ lib.namespace = this.global.namespace;
+ lib.rtl = this.rtl;
+ lib['data_options'] = this.utils.data_options;
+ lib['attr_name'] = attr_name;
+ lib['add_namespace'] = add_namespace;
+ lib['bindings'] = bindings;
+ lib['S'] = this.utils.S;
+ },
+
+ inherit : function (scope, methods) {
+ var methods_arr = methods.split(' '),
+ i = methods_arr.length;
+
+ while (i--) {
+ if (this.utils.hasOwnProperty(methods_arr[i])) {
+ scope[methods_arr[i]] = this.utils[methods_arr[i]];
+ }
+ }
+ },
+
+ set_namespace : function () {
+
+ // Description:
+ // Don't bother reading the namespace out of the meta tag
+ // if the namespace has been set globally in javascript
+ //
+ // Example:
+ // Foundation.global.namespace = 'my-namespace';
+ // or make it an empty string:
+ // Foundation.global.namespace = '';
+ //
+ //
+
+ // If the namespace has not been set (is undefined), try to read it out of the meta element.
+ // Otherwise use the globally defined namespace, even if it's empty ('')
+ var namespace = ( this.global.namespace === undefined ) ? $('.foundation-data-attribute-namespace').css('font-family') : this.global.namespace;
+
+ // Finally, if the namsepace is either undefined or false, set it to an empty string.
+ // Otherwise use the namespace value.
+ this.global.namespace = ( namespace === undefined || /false/i.test(namespace) ) ? '' : namespace;
+ },
+
+ libs : {},
+
+ // methods that can be inherited in libraries
+ utils : {
+
+ // Description:
+ // Fast Selector wrapper returns jQuery object. Only use where getElementById
+ // is not available.
+ //
+ // Arguments:
+ // Selector (String): CSS selector describing the element(s) to be
+ // returned as a jQuery object.
+ //
+ // Scope (String): CSS selector describing the area to be searched. Default
+ // is document.
+ //
+ // Returns:
+ // Element (jQuery Object): jQuery object containing elements matching the
+ // selector within the scope.
+ S : S,
+
+ // Description:
+ // Executes a function a max of once every n milliseconds
+ //
+ // Arguments:
+ // Func (Function): Function to be throttled.
+ //
+ // Delay (Integer): Function execution threshold in milliseconds.
+ //
+ // Returns:
+ // Lazy_function (Function): Function with throttling applied.
+ throttle : function (func, delay) {
+ var timer = null;
+
+ return function () {
+ var context = this, args = arguments;
+
+ if (timer == null) {
+ timer = setTimeout(function () {
+ func.apply(context, args);
+ timer = null;
+ }, delay);
+ }
+ };
+ },
+
+ // Description:
+ // Executes a function when it stops being invoked for n seconds
+ // Modified version of _.debounce() http://underscorejs.org
+ //
+ // Arguments:
+ // Func (Function): Function to be debounced.
+ //
+ // Delay (Integer): Function execution threshold in milliseconds.
+ //
+ // Immediate (Bool): Whether the function should be called at the beginning
+ // of the delay instead of the end. Default is false.
+ //
+ // Returns:
+ // Lazy_function (Function): Function with debouncing applied.
+ debounce : function (func, delay, immediate) {
+ var timeout, result;
+ return function () {
+ var context = this, args = arguments;
+ var later = function () {
+ timeout = null;
+ if (!immediate) {
+ result = func.apply(context, args);
+ }
+ };
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, delay);
+ if (callNow) {
+ result = func.apply(context, args);
+ }
+ return result;
+ };
+ },
+
+ // Description:
+ // Parses data-options attribute
+ //
+ // Arguments:
+ // El (jQuery Object): Element to be parsed.
+ //
+ // Returns:
+ // Options (Javascript Object): Contents of the element's data-options
+ // attribute.
+ data_options : function (el, data_attr_name) {
+ data_attr_name = data_attr_name || 'options';
+ var opts = {}, ii, p, opts_arr,
+ data_options = function (el) {
+ var namespace = Foundation.global.namespace;
+
+ if (namespace.length > 0) {
+ return el.data(namespace + '-' + data_attr_name);
+ }
+
+ return el.data(data_attr_name);
+ };
+
+ var cached_options = data_options(el);
+
+ if (typeof cached_options === 'object') {
+ return cached_options;
+ }
+
+ opts_arr = (cached_options || ':').split(';');
+ ii = opts_arr.length;
+
+ function isNumber (o) {
+ return !isNaN (o - 0) && o !== null && o !== '' && o !== false && o !== true;
+ }
+
+ function trim (str) {
+ if (typeof str === 'string') {
+ return $.trim(str);
+ }
+ return str;
+ }
+
+ while (ii--) {
+ p = opts_arr[ii].split(':');
+ p = [p[0], p.slice(1).join(':')];
+
+ if (/true/i.test(p[1])) {
+ p[1] = true;
+ }
+ if (/false/i.test(p[1])) {
+ p[1] = false;
+ }
+ if (isNumber(p[1])) {
+ if (p[1].indexOf('.') === -1) {
+ p[1] = parseInt(p[1], 10);
+ } else {
+ p[1] = parseFloat(p[1]);
+ }
+ }
+
+ if (p.length === 2 && p[0].length > 0) {
+ opts[trim(p[0])] = trim(p[1]);
+ }
+ }
+
+ return opts;
+ },
+
+ // Description:
+ // Adds JS-recognizable media queries
+ //
+ // Arguments:
+ // Media (String): Key string for the media query to be stored as in
+ // Foundation.media_queries
+ //
+ // Class (String): Class name for the generated <meta> tag
+ register_media : function (media, media_class) {
+ if (Foundation.media_queries[media] === undefined) {
+ $('head').append('<meta class="' + media_class + '"/>');
+ Foundation.media_queries[media] = removeQuotes($('.' + media_class).css('font-family'));
+ }
+ },
+
+ // Description:
+ // Add custom CSS within a JS-defined media query
+ //
+ // Arguments:
+ // Rule (String): CSS rule to be appended to the document.
+ //
+ // Media (String): Optional media query string for the CSS rule to be
+ // nested under.
+ add_custom_rule : function (rule, media) {
+ if (media === undefined && Foundation.stylesheet) {
+ Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length);
+ } else {
+ var query = Foundation.media_queries[media];
+
+ if (query !== undefined) {
+ Foundation.stylesheet.insertRule('@media ' +
+ Foundation.media_queries[media] + '{ ' + rule + ' }', Foundation.stylesheet.cssRules.length);
+ }
+ }
+ },
+
+ // Description:
+ // Performs a callback function when an image is fully loaded
+ //
+ // Arguments:
+ // Image (jQuery Object): Image(s) to check if loaded.
+ //
+ // Callback (Function): Function to execute when image is fully loaded.
+ image_loaded : function (images, callback) {
+ var self = this,
+ unloaded = images.length;
+
+ function pictures_has_height(images) {
+ var pictures_number = images.length;
+
+ for (var i = pictures_number - 1; i >= 0; i--) {
+ if(images.attr('height') === undefined) {
+ return false;
+ };
+ };
+
+ return true;
+ }
+
+ if (unloaded === 0 || pictures_has_height(images)) {
+ callback(images);
+ }
+
+ images.each(function () {
+ single_image_loaded(self.S(this), function () {
+ unloaded -= 1;
+ if (unloaded === 0) {
+ callback(images);
+ }
+ });
+ });
+ },
+
+ // Description:
+ // Returns a random, alphanumeric string
+ //
+ // Arguments:
+ // Length (Integer): Length of string to be generated. Defaults to random
+ // integer.
+ //
+ // Returns:
+ // Rand (String): Pseudo-random, alphanumeric string.
+ random_str : function () {
+ if (!this.fidx) {
+ this.fidx = 0;
+ }
+ this.prefix = this.prefix || [(this.name || 'F'), (+new Date).toString(36)].join('-');
+
+ return this.prefix + (this.fidx++).toString(36);
+ },
+
+ // Description:
+ // Helper for window.matchMedia
+ //
+ // Arguments:
+ // mq (String): Media query
+ //
+ // Returns:
+ // (Boolean): Whether the media query passes or not
+ match : function (mq) {
+ return window.matchMedia(mq).matches;
+ },
+
+ // Description:
+ // Helpers for checking Foundation default media queries with JS
+ //
+ // Returns:
+ // (Boolean): Whether the media query passes or not
+
+ is_small_up : function () {
+ return this.match(Foundation.media_queries.small);
+ },
+
+ is_medium_up : function () {
+ return this.match(Foundation.media_queries.medium);
+ },
+
+ is_large_up : function () {
+ return this.match(Foundation.media_queries.large);
+ },
+
+ is_xlarge_up : function () {
+ return this.match(Foundation.media_queries.xlarge);
+ },
+
+ is_xxlarge_up : function () {
+ return this.match(Foundation.media_queries.xxlarge);
+ },
+
+ is_small_only : function () {
+ return !this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
+ },
+
+ is_medium_only : function () {
+ return this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
+ },
+
+ is_large_only : function () {
+ return this.is_medium_up() && this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
+ },
+
+ is_xlarge_only : function () {
+ return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && !this.is_xxlarge_up();
+ },
+
+ is_xxlarge_only : function () {
+ return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && this.is_xxlarge_up();
+ }
+ }
+ };
+
+ $.fn.foundation = function () {
+ var args = Array.prototype.slice.call(arguments, 0);
+
+ return this.each(function () {
+ Foundation.init.apply(Foundation, [this].concat(args));
+ return this;
+ });
+ };
+
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.abide = {
+ name : 'abide',
+
+ version : '5.5.2',
+
+ settings : {
+ live_validate : true,
+ validate_on_blur : true,
+ // validate_on: 'tab', // tab (when user tabs between fields), change (input changes), manual (call custom events)
+ focus_on_invalid : true,
+ error_labels : true, // labels with a for="inputId" will recieve an `error` class
+ error_class : 'error',
+ timeout : 1000,
+ patterns : {
+ alpha : /^[a-zA-Z]+$/,
+ alpha_numeric : /^[a-zA-Z0-9]+$/,
+ integer : /^[-+]?\d+$/,
+ number : /^[-+]?\d*(?:[\.\,]\d+)?$/,
+
+ // amex, visa, diners
+ card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
+ cvv : /^([0-9]){3,4}$/,
+
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
+ email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,
+
+ // http://blogs.lse.ac.uk/lti/2008/04/23/a-regular-expression-to-match-any-url/
+ url: /^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,
+ // abc.de
+ domain : /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,
+
+ datetime : /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
+ // YYYY-MM-DD
+ date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,
+ // HH:MM:SS
+ time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
+ dateISO : /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
+ // MM/DD/YYYY
+ month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,
+ // DD/MM/YYYY
+ day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,
+
+ // #FFF or #FFFFFF
+ color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
+ },
+ validators : {
+ equalTo : function (el, required, parent) {
+ var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
+ to = el.value,
+ valid = (from === to);
+
+ return valid;
+ }
+ }
+ },
+
+ timer : null,
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function (scope) {
+ var self = this,
+ form = self.S(scope).attr('novalidate', 'novalidate'),
+ settings = form.data(this.attr_name(true) + '-init') || {};
+
+ this.invalid_attr = this.add_namespace('data-invalid');
+
+ function validate(originalSelf, e) {
+ clearTimeout(self.timer);
+ self.timer = setTimeout(function () {
+ self.validate([originalSelf], e);
+ }.bind(originalSelf), settings.timeout);
+ }
+
+
+ form
+ .off('.abide')
+ .on('submit.fndtn.abide', function (e) {
+ var is_ajax = /ajax/i.test(self.S(this).attr(self.attr_name()));
+ return self.validate(self.S(this).find('input, textarea, select').not(":hidden, [data-abide-ignore]").get(), e, is_ajax);
+ })
+ .on('validate.fndtn.abide', function (e) {
+ if (settings.validate_on === 'manual') {
+ self.validate([e.target], e);
+ }
+ })
+ .on('reset', function (e) {
+ return self.reset($(this), e);
+ })
+ .find('input, textarea, select').not(":hidden, [data-abide-ignore]")
+ .off('.abide')
+ .on('blur.fndtn.abide change.fndtn.abide', function (e) {
+ // old settings fallback
+ // will be deprecated with F6 release
+ if (settings.validate_on_blur && settings.validate_on_blur === true) {
+ validate(this, e);
+ }
+ // new settings combining validate options into one setting
+ if (settings.validate_on === 'change') {
+ validate(this, e);
+ }
+ })
+ .on('keydown.fndtn.abide', function (e) {
+ // old settings fallback
+ // will be deprecated with F6 release
+ if (settings.live_validate && settings.live_validate === true && e.which != 9) {
+ validate(this, e);
+ }
+ // new settings combining validate options into one setting
+ if (settings.validate_on === 'tab' && e.which === 9) {
+ validate(this, e);
+ }
+ else if (settings.validate_on === 'change') {
+ validate(this, e);
+ }
+ })
+ .on('focus', function (e) {
+ if (navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)) {
+ $('html, body').animate({
+ scrollTop: $(e.target).offset().top
+ }, 100);
+ }
+ });
+ },
+
+ reset : function (form, e) {
+ var self = this;
+ form.removeAttr(self.invalid_attr);
+
+ $('[' + self.invalid_attr + ']', form).removeAttr(self.invalid_attr);
+ $('.' + self.settings.error_class, form).not('small').removeClass(self.settings.error_class);
+ $(':input', form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr(self.invalid_attr);
+ },
+
+ validate : function (els, e, is_ajax) {
+ var validations = this.parse_patterns(els),
+ validation_count = validations.length,
+ form = this.S(els[0]).closest('form'),
+ submit_event = /submit/.test(e.type);
+
+ // Has to count up to make sure the focus gets applied to the top error
+ for (var i = 0; i < validation_count; i++) {
+ if (!validations[i] && (submit_event || is_ajax)) {
+ if (this.settings.focus_on_invalid) {
+ els[i].focus();
+ }
+ form.trigger('invalid.fndtn.abide');
+ this.S(els[i]).closest('form').attr(this.invalid_attr, '');
+ return false;
+ }
+ }
+
+ if (submit_event || is_ajax) {
+ form.trigger('valid.fndtn.abide');
+ }
+
+ form.removeAttr(this.invalid_attr);
+
+ if (is_ajax) {
+ return false;
+ }
+
+ return true;
+ },
+
+ parse_patterns : function (els) {
+ var i = els.length,
+ el_patterns = [];
+
+ while (i--) {
+ el_patterns.push(this.pattern(els[i]));
+ }
+
+ return this.check_validation_and_apply_styles(el_patterns);
+ },
+
+ pattern : function (el) {
+ var type = el.getAttribute('type'),
+ required = typeof el.getAttribute('required') === 'string';
+
+ var pattern = el.getAttribute('pattern') || '';
+
+ if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) {
+ return [el, this.settings.patterns[pattern], required];
+ } else if (pattern.length > 0) {
+ return [el, new RegExp(pattern), required];
+ }
+
+ if (this.settings.patterns.hasOwnProperty(type)) {
+ return [el, this.settings.patterns[type], required];
+ }
+
+ pattern = /.*/;
+
+ return [el, pattern, required];
+ },
+
+ // TODO: Break this up into smaller methods, getting hard to read.
+ check_validation_and_apply_styles : function (el_patterns) {
+ var i = el_patterns.length,
+ validations = [],
+ form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
+ settings = form.data(this.attr_name(true) + '-init') || {};
+ while (i--) {
+ var el = el_patterns[i][0],
+ required = el_patterns[i][2],
+ value = el.value.trim(),
+ direct_parent = this.S(el).parent(),
+ validator = el.getAttribute(this.add_namespace('data-abide-validator')),
+ is_radio = el.type === 'radio',
+ is_checkbox = el.type === 'checkbox',
+ label = this.S('label[for="' + el.getAttribute('id') + '"]'),
+ valid_length = (required) ? (el.value.length > 0) : true,
+ el_validations = [];
+
+ var parent, valid;
+
+ // support old way to do equalTo validations
+ if (el.getAttribute(this.add_namespace('data-equalto'))) { validator = 'equalTo' }
+
+ if (!direct_parent.is('label')) {
+ parent = direct_parent;
+ } else {
+ parent = direct_parent.parent();
+ }
+
+ if (is_radio && required) {
+ el_validations.push(this.valid_radio(el, required));
+ } else if (is_checkbox && required) {
+ el_validations.push(this.valid_checkbox(el, required));
+
+ } else if (validator) {
+ // Validate using each of the specified (space-delimited) validators.
+ var validators = validator.split(' ');
+ var last_valid = true, all_valid = true;
+ for (var iv = 0; iv < validators.length; iv++) {
+ valid = this.settings.validators[validators[iv]].apply(this, [el, required, parent])
+ el_validations.push(valid);
+ all_valid = valid && last_valid;
+ last_valid = valid;
+ }
+ if (all_valid) {
+ this.S(el).removeAttr(this.invalid_attr);
+ parent.removeClass('error');
+ if (label.length > 0 && this.settings.error_labels) {
+ label.removeClass(this.settings.error_class).removeAttr('role');
+ }
+ $(el).triggerHandler('valid');
+ } else {
+ this.S(el).attr(this.invalid_attr, '');
+ parent.addClass('error');
+ if (label.length > 0 && this.settings.error_labels) {
+ label.addClass(this.settings.error_class).attr('role', 'alert');
+ }
+ $(el).triggerHandler('invalid');
+ }
+ } else {
+
+ if (el_patterns[i][1].test(value) && valid_length ||
+ !required && el.value.length < 1 || $(el).attr('disabled')) {
+ el_validations.push(true);
+ } else {
+ el_validations.push(false);
+ }
+
+ el_validations = [el_validations.every(function (valid) {return valid;})];
+ if (el_validations[0]) {
+ this.S(el).removeAttr(this.invalid_attr);
+ el.setAttribute('aria-invalid', 'false');
+ el.removeAttribute('aria-describedby');
+ parent.removeClass(this.settings.error_class);
+ if (label.length > 0 && this.settings.error_labels) {
+ label.removeClass(this.settings.error_class).removeAttr('role');
+ }
+ $(el).triggerHandler('valid');
+ } else {
+ this.S(el).attr(this.invalid_attr, '');
+ el.setAttribute('aria-invalid', 'true');
+
+ // Try to find the error associated with the input
+ var errorElem = parent.find('small.' + this.settings.error_class, 'span.' + this.settings.error_class);
+ var errorID = errorElem.length > 0 ? errorElem[0].id : '';
+ if (errorID.length > 0) {
+ el.setAttribute('aria-describedby', errorID);
+ }
+
+ // el.setAttribute('aria-describedby', $(el).find('.error')[0].id);
+ parent.addClass(this.settings.error_class);
+ if (label.length > 0 && this.settings.error_labels) {
+ label.addClass(this.settings.error_class).attr('role', 'alert');
+ }
+ $(el).triggerHandler('invalid');
+ }
+ }
+ validations = validations.concat(el_validations);
+ }
+ return validations;
+ },
+
+ valid_checkbox : function (el, required) {
+ var el = this.S(el),
+ valid = (el.is(':checked') || !required || el.get(0).getAttribute('disabled'));
+
+ if (valid) {
+ el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
+ $(el).triggerHandler('valid');
+ } else {
+ el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
+ $(el).triggerHandler('invalid');
+ }
+
+ return valid;
+ },
+
+ valid_radio : function (el, required) {
+ var name = el.getAttribute('name'),
+ group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='" + name + "']"),
+ count = group.length,
+ valid = false,
+ disabled = false;
+
+ // Has to count up to make sure the focus gets applied to the top error
+ for (var i=0; i < count; i++) {
+ if( group[i].getAttribute('disabled') ){
+ disabled=true;
+ valid=true;
+ } else {
+ if (group[i].checked){
+ valid = true;
+ } else {
+ if( disabled ){
+ valid = false;
+ }
+ }
+ }
+ }
+
+ // Has to count up to make sure the focus gets applied to the top error
+ for (var i = 0; i < count; i++) {
+ if (valid) {
+ this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
+ $(group[i]).triggerHandler('valid');
+ } else {
+ this.S(group[i]).attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
+ $(group[i]).triggerHandler('invalid');
+ }
+ }
+
+ return valid;
+ },
+
+ valid_equal : function (el, required, parent) {
+ var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
+ to = el.value,
+ valid = (from === to);
+
+ if (valid) {
+ this.S(el).removeAttr(this.invalid_attr);
+ parent.removeClass(this.settings.error_class);
+ if (label.length > 0 && settings.error_labels) {
+ label.removeClass(this.settings.error_class);
+ }
+ } else {
+ this.S(el).attr(this.invalid_attr, '');
+ parent.addClass(this.settings.error_class);
+ if (label.length > 0 && settings.error_labels) {
+ label.addClass(this.settings.error_class);
+ }
+ }
+
+ return valid;
+ },
+
+ valid_oneof : function (el, required, parent, doNotValidateOthers) {
+ var el = this.S(el),
+ others = this.S('[' + this.add_namespace('data-oneof') + ']'),
+ valid = others.filter(':checked').length > 0;
+
+ if (valid) {
+ el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
+ } else {
+ el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
+ }
+
+ if (!doNotValidateOthers) {
+ var _this = this;
+ others.each(function () {
+ _this.valid_oneof.call(_this, this, null, null, true);
+ });
+ }
+
+ return valid;
+ },
+
+ reflow : function(scope, options) {
+ var self = this,
+ form = self.S('[' + this.attr_name() + ']').attr('novalidate', 'novalidate');
+ self.S(form).each(function (idx, el) {
+ self.events(el);
+ });
+ }
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.accordion = {
+ name : 'accordion',
+
+ version : '5.5.2',
+
+ settings : {
+ content_class : 'content',
+ active_class : 'active',
+ multi_expand : false,
+ toggleable : true,
+ callback : function () {}
+ },
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function (instance) {
+ var self = this;
+ var S = this.S;
+ self.create(this.S(instance));
+
+ S(this.scope)
+ .off('.fndtn.accordion')
+ .on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a, [' + this.attr_name() + '] > li > a', function (e) {
+ var accordion = S(this).closest('[' + self.attr_name() + ']'),
+ groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
+ settings = accordion.data(self.attr_name(true) + '-init') || self.settings,
+ target = S('#' + this.href.split('#')[1]),
+ aunts = $('> dd, > li', accordion),
+ siblings = aunts.children('.' + settings.content_class),
+ active_content = siblings.filter('.' + settings.active_class);
+
+ e.preventDefault();
+
+ if (accordion.attr(self.attr_name())) {
+ siblings = siblings.add('[' + groupSelector + '] dd > ' + '.' + settings.content_class + ', [' + groupSelector + '] li > ' + '.' + settings.content_class);
+ aunts = aunts.add('[' + groupSelector + '] dd, [' + groupSelector + '] li');
+ }
+
+ if (settings.toggleable && target.is(active_content)) {
+ target.parent('dd, li').toggleClass(settings.active_class, false);
+ target.toggleClass(settings.active_class, false);
+ S(this).attr('aria-expanded', function(i, attr){
+ return attr === 'true' ? 'false' : 'true';
+ });
+ settings.callback(target);
+ target.triggerHandler('toggled', [accordion]);
+ accordion.triggerHandler('toggled', [target]);
+ return;
+ }
+
+ if (!settings.multi_expand) {
+ siblings.removeClass(settings.active_class);
+ aunts.removeClass(settings.active_class);
+ aunts.children('a').attr('aria-expanded','false');
+ }
+
+ target.addClass(settings.active_class).parent().addClass(settings.active_class);
+ settings.callback(target);
+ target.triggerHandler('toggled', [accordion]);
+ accordion.triggerHandler('toggled', [target]);
+ S(this).attr('aria-expanded','true');
+ });
+ },
+
+ create: function($instance) {
+ var self = this,
+ accordion = $instance,
+ aunts = $('> .accordion-navigation', accordion),
+ settings = accordion.data(self.attr_name(true) + '-init') || self.settings;
+
+ aunts.children('a').attr('aria-expanded','false');
+ aunts.has('.' + settings.content_class + '.' + settings.active_class).children('a').attr('aria-expanded','true');
+
+ if (settings.multi_expand) {
+ $instance.attr('aria-multiselectable','true');
+ }
+ },
+
+ off : function () {},
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.alert = {
+ name : 'alert',
+
+ version : '5.5.2',
+
+ settings : {
+ callback : function () {}
+ },
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function () {
+ var self = this,
+ S = this.S;
+
+ $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] .close', function (e) {
+ var alertBox = S(this).closest('[' + self.attr_name() + ']'),
+ settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
+
+ e.preventDefault();
+ if (Modernizr.csstransitions) {
+ alertBox.addClass('alert-close');
+ alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function (e) {
+ S(this).trigger('close.fndtn.alert').remove();
+ settings.callback();
+ });
+ } else {
+ alertBox.fadeOut(300, function () {
+ S(this).trigger('close.fndtn.alert').remove();
+ settings.callback();
+ });
+ }
+ });
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.clearing = {
+ name : 'clearing',
+
+ version : '5.5.2',
+
+ settings : {
+ templates : {
+ viewing : '<a href="#" class="clearing-close">×</a>' +
+ '<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
+ '<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>' +
+ '<a href="#" class="clearing-main-next"><span></span></a></div>' +
+ '<img class="clearing-preload-next" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
+ '<img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'
+ },
+
+ // comma delimited list of selectors that, on click, will close clearing,
+ // add 'div.clearing-blackout, div.visible-img' to close on background click
+ close_selectors : '.clearing-close, div.clearing-blackout',
+
+ // Default to the entire li element.
+ open_selectors : '',
+
+ // Image will be skipped in carousel.
+ skip_selector : '',
+
+ touch_label : '',
+
+ // event initializers and locks
+ init : false,
+ locked : false
+ },
+
+ init : function (scope, method, options) {
+ var self = this;
+ Foundation.inherit(this, 'throttle image_loaded');
+
+ this.bindings(method, options);
+
+ if (self.S(this.scope).is('[' + this.attr_name() + ']')) {
+ this.assemble(self.S('li', this.scope));
+ } else {
+ self.S('[' + this.attr_name() + ']', this.scope).each(function () {
+ self.assemble(self.S('li', this));
+ });
+ }
+ },
+
+ events : function (scope) {
+ var self = this,
+ S = self.S,
+ $scroll_container = $('.scroll-container');
+
+ if ($scroll_container.length > 0) {
+ this.scope = $scroll_container;
+ }
+
+ S(this.scope)
+ .off('.clearing')
+ .on('click.fndtn.clearing', 'ul[' + this.attr_name() + '] li ' + this.settings.open_selectors,
+ function (e, current, target) {
+ var current = current || S(this),
+ target = target || current,
+ next = current.next('li'),
+ settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init'),
+ image = S(e.target);
+
+ e.preventDefault();
+
+ if (!settings) {
+ self.init();
+ settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
+ }
+
+ // if clearing is open and the current image is
+ // clicked, go to the next image in sequence
+ if (target.hasClass('visible') &&
+ current[0] === target[0] &&
+ next.length > 0 && self.is_open(current)) {
+ target = next;
+ image = S('img', target);
+ }
+
+ // set current and target to the clicked li if not otherwise defined.
+ self.open(image, current, target);
+ self.update_paddles(target);
+ })
+
+ .on('click.fndtn.clearing', '.clearing-main-next',
+ function (e) { self.nav(e, 'next') })
+ .on('click.fndtn.clearing', '.clearing-main-prev',
+ function (e) { self.nav(e, 'prev') })
+ .on('click.fndtn.clearing', this.settings.close_selectors,
+ function (e) { Foundation.libs.clearing.close(e, this) });
+
+ $(document).on('keydown.fndtn.clearing',
+ function (e) { self.keydown(e) });
+
+ S(window).off('.clearing').on('resize.fndtn.clearing',
+ function () { self.resize() });
+
+ this.swipe_events(scope);
+ },
+
+ swipe_events : function (scope) {
+ var self = this,
+ S = self.S;
+
+ S(this.scope)
+ .on('touchstart.fndtn.clearing', '.visible-img', function (e) {
+ if (!e.touches) { e = e.originalEvent; }
+ var data = {
+ start_page_x : e.touches[0].pageX,
+ start_page_y : e.touches[0].pageY,
+ start_time : (new Date()).getTime(),
+ delta_x : 0,
+ is_scrolling : undefined
+ };
+
+ S(this).data('swipe-transition', data);
+ e.stopPropagation();
+ })
+ .on('touchmove.fndtn.clearing', '.visible-img', function (e) {
+ if (!e.touches) {
+ e = e.originalEvent;
+ }
+ // Ignore pinch/zoom events
+ if (e.touches.length > 1 || e.scale && e.scale !== 1) {
+ return;
+ }
+
+ var data = S(this).data('swipe-transition');
+
+ if (typeof data === 'undefined') {
+ data = {};
+ }
+
+ data.delta_x = e.touches[0].pageX - data.start_page_x;
+
+ if (Foundation.rtl) {
+ data.delta_x = -data.delta_x;
+ }
+
+ if (typeof data.is_scrolling === 'undefined') {
+ data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
+ }
+
+ if (!data.is_scrolling && !data.active) {
+ e.preventDefault();
+ var direction = (data.delta_x < 0) ? 'next' : 'prev';
+ data.active = true;
+ self.nav(e, direction);
+ }
+ })
+ .on('touchend.fndtn.clearing', '.visible-img', function (e) {
+ S(this).data('swipe-transition', {});
+ e.stopPropagation();
+ });
+ },
+
+ assemble : function ($li) {
+ var $el = $li.parent();
+
+ if ($el.parent().hasClass('carousel')) {
+ return;
+ }
+
+ $el.after('<div id="foundationClearingHolder"></div>');
+
+ var grid = $el.detach(),
+ grid_outerHTML = '';
+
+ if (grid[0] == null) {
+ return;
+ } else {
+ grid_outerHTML = grid[0].outerHTML;
+ }
+
+ var holder = this.S('#foundationClearingHolder'),
+ settings = $el.data(this.attr_name(true) + '-init'),
+ data = {
+ grid : '<div class="carousel">' + grid_outerHTML + '</div>',
+ viewing : settings.templates.viewing
+ },
+ wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
+ data.grid + '</div></div>',
+ touch_label = this.settings.touch_label;
+
+ if (Modernizr.touch) {
+ wrapper = $(wrapper).find('.clearing-touch-label').html(touch_label).end();
+ }
+
+ holder.after(wrapper).remove();
+ },
+
+ open : function ($image, current, target) {
+ var self = this,
+ body = $(document.body),
+ root = target.closest('.clearing-assembled'),
+ container = self.S('div', root).first(),
+ visible_image = self.S('.visible-img', container),
+ image = self.S('img', visible_image).not($image),
+ label = self.S('.clearing-touch-label', container),
+ error = false,
+ loaded = {};
+
+ // Event to disable scrolling on touch devices when Clearing is activated
+ $('body').on('touchmove', function (e) {
+ e.preventDefault();
+ });
+
+ image.error(function () {
+ error = true;
+ });
+
+ function startLoad() {
+ setTimeout(function () {
+ this.image_loaded(image, function () {
+ if (image.outerWidth() === 1 && !error) {
+ startLoad.call(this);
+ } else {
+ cb.call(this, image);
+ }
+ }.bind(this));
+ }.bind(this), 100);
+ }
+
+ function cb (image) {
+ var $image = $(image);
+ $image.css('visibility', 'visible');
+ $image.trigger('imageVisible');
+ // toggle the gallery
+ body.css('overflow', 'hidden');
+ root.addClass('clearing-blackout');
+ container.addClass('clearing-container');
+ visible_image.show();
+ this.fix_height(target)
+ .caption(self.S('.clearing-caption', visible_image), self.S('img', target))
+ .center_and_label(image, label)
+ .shift(current, target, function () {
+ target.closest('li').siblings().removeClass('visible');
+ target.closest('li').addClass('visible');
+ });
+ visible_image.trigger('opened.fndtn.clearing')
+ }
+
+ if (!this.locked()) {
+ visible_image.trigger('open.fndtn.clearing');
+ // set the image to the selected thumbnail
+ loaded = this.load($image);
+ if (loaded.interchange) {
+ image
+ .attr('data-interchange', loaded.interchange)
+ .foundation('interchange', 'reflow');
+ } else {
+ image
+ .attr('src', loaded.src)
+ .attr('data-interchange', '');
+ }
+ image.css('visibility', 'hidden');
+
+ startLoad.call(this);
+ }
+ },
+
+ close : function (e, el) {
+ e.preventDefault();
+
+ var root = (function (target) {
+ if (/blackout/.test(target.selector)) {
+ return target;
+ } else {
+ return target.closest('.clearing-blackout');
+ }
+ }($(el))),
+ body = $(document.body), container, visible_image;
+
+ if (el === e.target && root) {
+ body.css('overflow', '');
+ container = $('div', root).first();
+ visible_image = $('.visible-img', container);
+ visible_image.trigger('close.fndtn.clearing');
+ this.settings.prev_index = 0;
+ $('ul[' + this.attr_name() + ']', root)
+ .attr('style', '').closest('.clearing-blackout')
+ .removeClass('clearing-blackout');
+ container.removeClass('clearing-container');
+ visible_image.hide();
+ visible_image.trigger('closed.fndtn.clearing');
+ }
+
+ // Event to re-enable scrolling on touch devices
+ $('body').off('touchmove');
+
+ return false;
+ },
+
+ is_open : function (current) {
+ return current.parent().prop('style').length > 0;
+ },
+
+ keydown : function (e) {
+ var clearing = $('.clearing-blackout ul[' + this.attr_name() + ']'),
+ NEXT_KEY = this.rtl ? 37 : 39,
+ PREV_KEY = this.rtl ? 39 : 37,
+ ESC_KEY = 27;
+
+ if (e.which === NEXT_KEY) {
+ this.go(clearing, 'next');
+ }
+ if (e.which === PREV_KEY) {
+ this.go(clearing, 'prev');
+ }
+ if (e.which === ESC_KEY) {
+ this.S('a.clearing-close').trigger('click.fndtn.clearing');
+ }
+ },
+
+ nav : function (e, direction) {
+ var clearing = $('ul[' + this.attr_name() + ']', '.clearing-blackout');
+
+ e.preventDefault();
+ this.go(clearing, direction);
+ },
+
+ resize : function () {
+ var image = $('img', '.clearing-blackout .visible-img'),
+ label = $('.clearing-touch-label', '.clearing-blackout');
+
+ if (image.length) {
+ this.center_and_label(image, label);
+ image.trigger('resized.fndtn.clearing')
+ }
+ },
+
+ // visual adjustments
+ fix_height : function (target) {
+ var lis = target.parent().children(),
+ self = this;
+
+ lis.each(function () {
+ var li = self.S(this),
+ image = li.find('img');
+
+ if (li.height() > image.outerHeight()) {
+ li.addClass('fix-height');
+ }
+ })
+ .closest('ul')
+ .width(lis.length * 100 + '%');
+
+ return this;
+ },
+
+ update_paddles : function (target) {
+ target = target.closest('li');
+ var visible_image = target
+ .closest('.carousel')
+ .siblings('.visible-img');
+
+ if (target.next().length > 0) {
+ this.S('.clearing-main-next', visible_image).removeClass('disabled');
+ } else {
+ this.S('.clearing-main-next', visible_image).addClass('disabled');
+ }
+
+ if (target.prev().length > 0) {
+ this.S('.clearing-main-prev', visible_image).removeClass('disabled');
+ } else {
+ this.S('.clearing-main-prev', visible_image).addClass('disabled');
+ }
+ },
+
+ center_and_label : function (target, label) {
+ if (!this.rtl && label.length > 0) {
+ label.css({
+ marginLeft : -(label.outerWidth() / 2),
+ marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10
+ });
+ } else {
+ label.css({
+ marginRight : -(label.outerWidth() / 2),
+ marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,
+ left: 'auto',
+ right: '50%'
+ });
+ }
+ return this;
+ },
+
+ // image loading and preloading
+
+ load : function ($image) {
+ var href,
+ interchange,
+ closest_a;
+
+ if ($image[0].nodeName === 'A') {
+ href = $image.attr('href');
+ interchange = $image.data('clearing-interchange');
+ } else {
+ closest_a = $image.closest('a');
+ href = closest_a.attr('href');
+ interchange = closest_a.data('clearing-interchange');
+ }
+
+ this.preload($image);
+
+ return {
+ 'src': href ? href : $image.attr('src'),
+ 'interchange': href ? interchange : $image.data('clearing-interchange')
+ }
+ },
+
+ preload : function ($image) {
+ this
+ .img($image.closest('li').next(), 'next')
+ .img($image.closest('li').prev(), 'prev');
+ },
+
+ img : function (img, sibling_type) {
+ if (img.length) {
+ var preload_img = $('.clearing-preload-' + sibling_type),
+ new_a = this.S('a', img),
+ src,
+ interchange,
+ image;
+
+ if (new_a.length) {
+ src = new_a.attr('href');
+ interchange = new_a.data('clearing-interchange');
+ } else {
+ image = this.S('img', img);
+ src = image.attr('src');
+ interchange = image.data('clearing-interchange');
+ }
+
+ if (interchange) {
+ preload_img.attr('data-interchange', interchange);
+ } else {
+ preload_img.attr('src', src);
+ preload_img.attr('data-interchange', '');
+ }
+ }
+ return this;
+ },
+
+ // image caption
+
+ caption : function (container, $image) {
+ var caption = $image.attr('data-caption');
+
+ if (caption) {
+ container
+ .html(caption)
+ .show();
+ } else {
+ container
+ .text('')
+ .hide();
+ }
+ return this;
+ },
+
+ // directional methods
+
+ go : function ($ul, direction) {
+ var current = this.S('.visible', $ul),
+ target = current[direction]();
+
+ // Check for skip selector.
+ if (this.settings.skip_selector && target.find(this.settings.skip_selector).length != 0) {
+ target = target[direction]();
+ }
+
+ if (target.length) {
+ this.S('img', target)
+ .trigger('click.fndtn.clearing', [current, target])
+ .trigger('change.fndtn.clearing');
+ }
+ },
+
+ shift : function (current, target, callback) {
+ var clearing = target.parent(),
+ old_index = this.settings.prev_index || target.index(),
+ direction = this.direction(clearing, current, target),
+ dir = this.rtl ? 'right' : 'left',
+ left = parseInt(clearing.css('left'), 10),
+ width = target.outerWidth(),
+ skip_shift;
+
+ var dir_obj = {};
+
+ // we use jQuery animate instead of CSS transitions because we
+ // need a callback to unlock the next animation
+ // needs support for RTL **
+ if (target.index() !== old_index && !/skip/.test(direction)) {
+ if (/left/.test(direction)) {
+ this.lock();
+ dir_obj[dir] = left + width;
+ clearing.animate(dir_obj, 300, this.unlock());
+ } else if (/right/.test(direction)) {
+ this.lock();
+ dir_obj[dir] = left - width;
+ clearing.animate(dir_obj, 300, this.unlock());
+ }
+ } else if (/skip/.test(direction)) {
+ // the target image is not adjacent to the current image, so
+ // do we scroll right or not
+ skip_shift = target.index() - this.settings.up_count;
+ this.lock();
+
+ if (skip_shift > 0) {
+ dir_obj[dir] = -(skip_shift * width);
+ clearing.animate(dir_obj, 300, this.unlock());
+ } else {
+ dir_obj[dir] = 0;
+ clearing.animate(dir_obj, 300, this.unlock());
+ }
+ }
+
+ callback();
+ },
+
+ direction : function ($el, current, target) {
+ var lis = this.S('li', $el),
+ li_width = lis.outerWidth() + (lis.outerWidth() / 4),
+ up_count = Math.floor(this.S('.clearing-container').outerWidth() / li_width) - 1,
+ target_index = lis.index(target),
+ response;
+
+ this.settings.up_count = up_count;
+
+ if (this.adjacent(this.settings.prev_index, target_index)) {
+ if ((target_index > up_count) && target_index > this.settings.prev_index) {
+ response = 'right';
+ } else if ((target_index > up_count - 1) && target_index <= this.settings.prev_index) {
+ response = 'left';
+ } else {
+ response = false;
+ }
+ } else {
+ response = 'skip';
+ }
+
+ this.settings.prev_index = target_index;
+
+ return response;
+ },
+
+ adjacent : function (current_index, target_index) {
+ for (var i = target_index + 1; i >= target_index - 1; i--) {
+ if (i === current_index) {
+ return true;
+ }
+ }
+ return false;
+ },
+
+ // lock management
+
+ lock : function () {
+ this.settings.locked = true;
+ },
+
+ unlock : function () {
+ this.settings.locked = false;
+ },
+
+ locked : function () {
+ return this.settings.locked;
+ },
+
+ off : function () {
+ this.S(this.scope).off('.fndtn.clearing');
+ this.S(window).off('.fndtn.clearing');
+ },
+
+ reflow : function () {
+ this.init();
+ }
+ };
+
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.dropdown = {
+ name : 'dropdown',
+
+ version : '5.5.2',
+
+ settings : {
+ active_class : 'open',
+ disabled_class : 'disabled',
+ mega_class : 'mega',
+ align : 'bottom',
+ is_hover : false,
+ hover_timeout : 150,
+ opened : function () {},
+ closed : function () {}
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle');
+
+ $.extend(true, this.settings, method, options);
+ this.bindings(method, options);
+ },
+
+ events : function (scope) {
+ var self = this,
+ S = self.S;
+
+ S(this.scope)
+ .off('.dropdown')
+ .on('click.fndtn.dropdown', '[' + this.attr_name() + ']', function (e) {
+ var settings = S(this).data(self.attr_name(true) + '-init') || self.settings;
+ if (!settings.is_hover || Modernizr.touch) {
+ e.preventDefault();
+ if (S(this).parent('[data-reveal-id]').length) {
+ e.stopPropagation();
+ }
+ self.toggle($(this));
+ }
+ })
+ .on('mouseenter.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
+ var $this = S(this),
+ dropdown,
+ target;
+
+ clearTimeout(self.timeout);
+
+ if ($this.data(self.data_attr())) {
+ dropdown = S('#' + $this.data(self.data_attr()));
+ target = $this;
+ } else {
+ dropdown = $this;
+ target = S('[' + self.attr_name() + '="' + dropdown.attr('id') + '"]');
+ }
+
+ var settings = target.data(self.attr_name(true) + '-init') || self.settings;
+
+ if (S(e.currentTarget).data(self.data_attr()) && settings.is_hover) {
+ self.closeall.call(self);
+ }
+
+ if (settings.is_hover) {
+ self.open.apply(self, [dropdown, target]);
+ }
+ })
+ .on('mouseleave.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
+ var $this = S(this);
+ var settings;
+
+ if ($this.data(self.data_attr())) {
+ settings = $this.data(self.data_attr(true) + '-init') || self.settings;
+ } else {
+ var target = S('[' + self.attr_name() + '="' + S(this).attr('id') + '"]'),
+ settings = target.data(self.attr_name(true) + '-init') || self.settings;
+ }
+
+ self.timeout = setTimeout(function () {
+ if ($this.data(self.data_attr())) {
+ if (settings.is_hover) {
+ self.close.call(self, S('#' + $this.data(self.data_attr())));
+ }
+ } else {
+ if (settings.is_hover) {
+ self.close.call(self, $this);
+ }
+ }
+ }.bind(this), settings.hover_timeout);
+ })
+ .on('click.fndtn.dropdown', function (e) {
+ var parent = S(e.target).closest('[' + self.attr_name() + '-content]');
+ var links = parent.find('a');
+
+ if (links.length > 0 && parent.attr('aria-autoclose') !== 'false') {
+ self.close.call(self, S('[' + self.attr_name() + '-content]'));
+ }
+
+ if (e.target !== document && !$.contains(document.documentElement, e.target)) {
+ return;
+ }
+
+ if (S(e.target).closest('[' + self.attr_name() + ']').length > 0) {
+ return;
+ }
+
+ if (!(S(e.target).data('revealId')) &&
+ (parent.length > 0 && (S(e.target).is('[' + self.attr_name() + '-content]') ||
+ $.contains(parent.first()[0], e.target)))) {
+ e.stopPropagation();
+ return;
+ }
+
+ self.close.call(self, S('[' + self.attr_name() + '-content]'));
+ })
+ .on('opened.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
+ self.settings.opened.call(this);
+ })
+ .on('closed.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
+ self.settings.closed.call(this);
+ });
+
+ S(window)
+ .off('.dropdown')
+ .on('resize.fndtn.dropdown', self.throttle(function () {
+ self.resize.call(self);
+ }, 50));
+
+ this.resize();
+ },
+
+ close : function (dropdown) {
+ var self = this;
+ dropdown.each(function (idx) {
+ var original_target = $('[' + self.attr_name() + '=' + dropdown[idx].id + ']') || $('aria-controls=' + dropdown[idx].id + ']');
+ original_target.attr('aria-expanded', 'false');
+ if (self.S(this).hasClass(self.settings.active_class)) {
+ self.S(this)
+ .css(Foundation.rtl ? 'right' : 'left', '-99999px')
+ .attr('aria-hidden', 'true')
+ .removeClass(self.settings.active_class)
+ .prev('[' + self.attr_name() + ']')
+ .removeClass(self.settings.active_class)
+ .removeData('target');
+
+ self.S(this).trigger('closed.fndtn.dropdown', [dropdown]);
+ }
+ });
+ dropdown.removeClass('f-open-' + this.attr_name(true));
+ },
+
+ closeall : function () {
+ var self = this;
+ $.each(self.S('.f-open-' + this.attr_name(true)), function () {
+ self.close.call(self, self.S(this));
+ });
+ },
+
+ open : function (dropdown, target) {
+ this
+ .css(dropdown
+ .addClass(this.settings.active_class), target);
+ dropdown.prev('[' + this.attr_name() + ']').addClass(this.settings.active_class);
+ dropdown.data('target', target.get(0)).trigger('opened.fndtn.dropdown', [dropdown, target]);
+ dropdown.attr('aria-hidden', 'false');
+ target.attr('aria-expanded', 'true');
+ dropdown.focus();
+ dropdown.addClass('f-open-' + this.attr_name(true));
+ },
+
+ data_attr : function () {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + this.name;
+ }
+
+ return this.name;
+ },
+
+ toggle : function (target) {
+ if (target.hasClass(this.settings.disabled_class)) {
+ return;
+ }
+ var dropdown = this.S('#' + target.data(this.data_attr()));
+ if (dropdown.length === 0) {
+ // No dropdown found, not continuing
+ return;
+ }
+
+ this.close.call(this, this.S('[' + this.attr_name() + '-content]').not(dropdown));
+
+ if (dropdown.hasClass(this.settings.active_class)) {
+ this.close.call(this, dropdown);
+ if (dropdown.data('target') !== target.get(0)) {
+ this.open.call(this, dropdown, target);
+ }
+ } else {
+ this.open.call(this, dropdown, target);
+ }
+ },
+
+ resize : function () {
+ var dropdown = this.S('[' + this.attr_name() + '-content].open');
+ var target = $(dropdown.data("target"));
+
+ if (dropdown.length && target.length) {
+ this.css(dropdown, target);
+ }
+ },
+
+ css : function (dropdown, target) {
+ var left_offset = Math.max((target.width() - dropdown.width()) / 2, 8),
+ settings = target.data(this.attr_name(true) + '-init') || this.settings,
+ parentOverflow = dropdown.parent().css('overflow-y') || dropdown.parent().css('overflow');
+
+ this.clear_idx();
+
+
+
+ if (this.small()) {
+ var p = this.dirs.bottom.call(dropdown, target, settings);
+
+ dropdown.attr('style', '').removeClass('drop-left drop-right drop-top').css({
+ position : 'absolute',
+ width : '95%',
+ 'max-width' : 'none',
+ top : p.top
+ });
+
+ dropdown.css(Foundation.rtl ? 'right' : 'left', left_offset);
+ }
+ // detect if dropdown is in an overflow container
+ else if (parentOverflow !== 'visible') {
+ var offset = target[0].offsetTop + target[0].offsetHeight;
+
+ dropdown.attr('style', '').css({
+ position : 'absolute',
+ top : offset
+ });
+
+ dropdown.css(Foundation.rtl ? 'right' : 'left', left_offset);
+ }
+ else {
+
+ this.style(dropdown, target, settings);
+ }
+
+ return dropdown;
+ },
+
+ style : function (dropdown, target, settings) {
+ var css = $.extend({position : 'absolute'},
+ this.dirs[settings.align].call(dropdown, target, settings));
+
+ dropdown.attr('style', '').css(css);
+ },
+
+ // return CSS property object
+ // `this` is the dropdown
+ dirs : {
+ // Calculate target offset
+ _base : function (t) {
+ var o_p = this.offsetParent(),
+ o = o_p.offset(),
+ p = t.offset();
+
+ p.top -= o.top;
+ p.left -= o.left;
+
+ //set some flags on the p object to pass along
+ p.missRight = false;
+ p.missTop = false;
+ p.missLeft = false;
+ p.leftRightFlag = false;
+
+ //lets see if the panel will be off the screen
+ //get the actual width of the page and store it
+ var actualBodyWidth;
+ if (document.getElementsByClassName('row')[0]) {
+ actualBodyWidth = document.getElementsByClassName('row')[0].clientWidth;
+ } else {
+ actualBodyWidth = window.innerWidth;
+ }
+
+ var actualMarginWidth = (window.innerWidth - actualBodyWidth) / 2;
+ var actualBoundary = actualBodyWidth;
+
+ if (!this.hasClass('mega')) {
+ //miss top
+ if (t.offset().top <= this.outerHeight()) {
+ p.missTop = true;
+ actualBoundary = window.innerWidth - actualMarginWidth;
+ p.leftRightFlag = true;
+ }
+
+ //miss right
+ if (t.offset().left + this.outerWidth() > t.offset().left + actualMarginWidth && t.offset().left - actualMarginWidth > this.outerWidth()) {
+ p.missRight = true;
+ p.missLeft = false;
+ }
+
+ //miss left
+ if (t.offset().left - this.outerWidth() <= 0) {
+ p.missLeft = true;
+ p.missRight = false;
+ }
+ }
+
+ return p;
+ },
+
+ top : function (t, s) {
+ var self = Foundation.libs.dropdown,
+ p = self.dirs._base.call(this, t);
+
+ this.addClass('drop-top');
+
+ if (p.missTop == true) {
+ p.top = p.top + t.outerHeight() + this.outerHeight();
+ this.removeClass('drop-top');
+ }
+
+ if (p.missRight == true) {
+ p.left = p.left - this.outerWidth() + t.outerWidth();
+ }
+
+ if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
+ self.adjust_pip(this, t, s, p);
+ }
+
+ if (Foundation.rtl) {
+ return {left : p.left - this.outerWidth() + t.outerWidth(),
+ top : p.top - this.outerHeight()};
+ }
+
+ return {left : p.left, top : p.top - this.outerHeight()};
+ },
+
+ bottom : function (t, s) {
+ var self = Foundation.libs.dropdown,
+ p = self.dirs._base.call(this, t);
+
+ if (p.missRight == true) {
+ p.left = p.left - this.outerWidth() + t.outerWidth();
+ }
+
+ if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
+ self.adjust_pip(this, t, s, p);
+ }
+
+ if (self.rtl) {
+ return {left : p.left - this.outerWidth() + t.outerWidth(), top : p.top + t.outerHeight()};
+ }
+
+ return {left : p.left, top : p.top + t.outerHeight()};
+ },
+
+ left : function (t, s) {
+ var p = Foundation.libs.dropdown.dirs._base.call(this, t);
+
+ this.addClass('drop-left');
+
+ if (p.missLeft == true) {
+ p.left = p.left + this.outerWidth();
+ p.top = p.top + t.outerHeight();
+ this.removeClass('drop-left');
+ }
+
+ return {left : p.left - this.outerWidth(), top : p.top};
+ },
+
+ right : function (t, s) {
+ var p = Foundation.libs.dropdown.dirs._base.call(this, t);
+
+ this.addClass('drop-right');
+
+ if (p.missRight == true) {
+ p.left = p.left - this.outerWidth();
+ p.top = p.top + t.outerHeight();
+ this.removeClass('drop-right');
+ } else {
+ p.triggeredRight = true;
+ }
+
+ var self = Foundation.libs.dropdown;
+
+ if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
+ self.adjust_pip(this, t, s, p);
+ }
+
+ return {left : p.left + t.outerWidth(), top : p.top};
+ }
+ },
+
+ // Insert rule to style psuedo elements
+ adjust_pip : function (dropdown, target, settings, position) {
+ var sheet = Foundation.stylesheet,
+ pip_offset_base = 8;
+
+ if (dropdown.hasClass(settings.mega_class)) {
+ pip_offset_base = position.left + (target.outerWidth() / 2) - 8;
+ } else if (this.small()) {
+ pip_offset_base += position.left - 8;
+ }
+
+ this.rule_idx = sheet.cssRules.length;
+
+ //default
+ var sel_before = '.f-dropdown.open:before',
+ sel_after = '.f-dropdown.open:after',
+ css_before = 'left: ' + pip_offset_base + 'px;',
+ css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
+
+ if (position.missRight == true) {
+ pip_offset_base = dropdown.outerWidth() - 23;
+ sel_before = '.f-dropdown.open:before',
+ sel_after = '.f-dropdown.open:after',
+ css_before = 'left: ' + pip_offset_base + 'px;',
+ css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
+ }
+
+ //just a case where right is fired, but its not missing right
+ if (position.triggeredRight == true) {
+ sel_before = '.f-dropdown.open:before',
+ sel_after = '.f-dropdown.open:after',
+ css_before = 'left:-12px;',
+ css_after = 'left:-14px;';
+ }
+
+ if (sheet.insertRule) {
+ sheet.insertRule([sel_before, '{', css_before, '}'].join(' '), this.rule_idx);
+ sheet.insertRule([sel_after, '{', css_after, '}'].join(' '), this.rule_idx + 1);
+ } else {
+ sheet.addRule(sel_before, css_before, this.rule_idx);
+ sheet.addRule(sel_after, css_after, this.rule_idx + 1);
+ }
+ },
+
+ // Remove old dropdown rule index
+ clear_idx : function () {
+ var sheet = Foundation.stylesheet;
+
+ if (typeof this.rule_idx !== 'undefined') {
+ sheet.deleteRule(this.rule_idx);
+ sheet.deleteRule(this.rule_idx);
+ delete this.rule_idx;
+ }
+ },
+
+ small : function () {
+ return matchMedia(Foundation.media_queries.small).matches &&
+ !matchMedia(Foundation.media_queries.medium).matches;
+ },
+
+ off : function () {
+ this.S(this.scope).off('.fndtn.dropdown');
+ this.S('html, body').off('.fndtn.dropdown');
+ this.S(window).off('.fndtn.dropdown');
+ this.S('[data-dropdown-content]').off('.fndtn.dropdown');
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.equalizer = {
+ name : 'equalizer',
+
+ version : '5.5.2',
+
+ settings : {
+ use_tallest : true,
+ before_height_change : $.noop,
+ after_height_change : $.noop,
+ equalize_on_stack : false,
+ act_on_hidden_el: false
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'image_loaded');
+ this.bindings(method, options);
+ this.reflow();
+ },
+
+ events : function () {
+ this.S(window).off('.equalizer').on('resize.fndtn.equalizer', function (e) {
+ this.reflow();
+ }.bind(this));
+ },
+
+ equalize : function (equalizer) {
+ var isStacked = false,
+ group = equalizer.data('equalizer'),
+ settings = equalizer.data(this.attr_name(true)+'-init') || this.settings,
+ vals,
+ firstTopOffset;
+
+ if (settings.act_on_hidden_el) {
+ vals = group ? equalizer.find('['+this.attr_name()+'-watch="'+group+'"]') : equalizer.find('['+this.attr_name()+'-watch]');
+ }
+ else {
+ vals = group ? equalizer.find('['+this.attr_name()+'-watch="'+group+'"]:visible') : equalizer.find('['+this.attr_name()+'-watch]:visible');
+ }
+
+ if (vals.length === 0) {
+ return;
+ }
+
+ settings.before_height_change();
+ equalizer.trigger('before-height-change.fndth.equalizer');
+ vals.height('inherit');
+
+ if (settings.equalize_on_stack === false) {
+ firstTopOffset = vals.first().offset().top;
+ vals.each(function () {
+ if ($(this).offset().top !== firstTopOffset) {
+ isStacked = true;
+ return false;
+ }
+ });
+ if (isStacked) {
+ return;
+ }
+ }
+
+ var heights = vals.map(function () { return $(this).outerHeight(false) }).get();
+
+ if (settings.use_tallest) {
+ var max = Math.max.apply(null, heights);
+ vals.css('height', max);
+ } else {
+ var min = Math.min.apply(null, heights);
+ vals.css('height', min);
+ }
+
+ settings.after_height_change();
+ equalizer.trigger('after-height-change.fndtn.equalizer');
+ },
+
+ reflow : function () {
+ var self = this;
+
+ this.S('[' + this.attr_name() + ']', this.scope).each(function () {
+ var $eq_target = $(this),
+ media_query = $eq_target.data('equalizer-mq'),
+ ignore_media_query = true;
+
+ if (media_query) {
+ media_query = 'is_' + media_query.replace(/-/g, '_');
+ if (Foundation.utils.hasOwnProperty(media_query)) {
+ ignore_media_query = false;
+ }
+ }
+
+ self.image_loaded(self.S('img', this), function () {
+ if (ignore_media_query || Foundation.utils[media_query]()) {
+ self.equalize($eq_target)
+ } else {
+ var vals = $eq_target.find('[' + self.attr_name() + '-watch]:visible');
+ vals.css('height', 'auto');
+ }
+ });
+ });
+ }
+ };
+})(jQuery, window, window.document);
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.interchange = {
+ name : 'interchange',
+
+ version : '5.5.2',
+
+ cache : {},
+
+ images_loaded : false,
+ nodes_loaded : false,
+
+ settings : {
+ load_attr : 'interchange',
+
+ named_queries : {
+ 'default' : 'only screen',
+ 'small' : Foundation.media_queries['small'],
+ 'small-only' : Foundation.media_queries['small-only'],
+ 'medium' : Foundation.media_queries['medium'],
+ 'medium-only' : Foundation.media_queries['medium-only'],
+ 'large' : Foundation.media_queries['large'],
+ 'large-only' : Foundation.media_queries['large-only'],
+ 'xlarge' : Foundation.media_queries['xlarge'],
+ 'xlarge-only' : Foundation.media_queries['xlarge-only'],
+ 'xxlarge' : Foundation.media_queries['xxlarge'],
+ 'landscape' : 'only screen and (orientation: landscape)',
+ 'portrait' : 'only screen and (orientation: portrait)',
+ 'retina' : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
+ 'only screen and (min--moz-device-pixel-ratio: 2),' +
+ 'only screen and (-o-min-device-pixel-ratio: 2/1),' +
+ 'only screen and (min-device-pixel-ratio: 2),' +
+ 'only screen and (min-resolution: 192dpi),' +
+ 'only screen and (min-resolution: 2dppx)'
+ },
+
+ directives : {
+ replace : function (el, path, trigger) {
+ // The trigger argument, if called within the directive, fires
+ // an event named after the directive on the element, passing
+ // any parameters along to the event that you pass to trigger.
+ //
+ // ex. trigger(), trigger([a, b, c]), or trigger(a, b, c)
+ //
+ // This allows you to bind a callback like so:
+ // $('#interchangeContainer').on('replace', function (e, a, b, c) {
+ // console.log($(this).html(), a, b, c);
+ // });
+
+ if (el !== null && /IMG/.test(el[0].nodeName)) {
+ var orig_path = el[0].src;
+
+ if (new RegExp(path, 'i').test(orig_path)) {
+ return;
+ }
+
+ el.attr("src", path);
+
+ return trigger(el[0].src);
+ }
+ var last_path = el.data(this.data_attr + '-last-path'),
+ self = this;
+
+ if (last_path == path) {
+ return;
+ }
+
+ if (/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(path)) {
+ $(el).css('background-image', 'url(' + path + ')');
+ el.data('interchange-last-path', path);
+ return trigger(path);
+ }
+
+ return $.get(path, function (response) {
+ el.html(response);
+ el.data(self.data_attr + '-last-path', path);
+ trigger();
+ });
+
+ }
+ }
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle random_str');
+
+ this.data_attr = this.set_data_attr();
+ $.extend(true, this.settings, method, options);
+ this.bindings(method, options);
+ this.reflow();
+ },
+
+ get_media_hash : function () {
+ var mediaHash = '';
+ for (var queryName in this.settings.named_queries ) {
+ mediaHash += matchMedia(this.settings.named_queries[queryName]).matches.toString();
+ }
+ return mediaHash;
+ },
+
+ events : function () {
+ var self = this, prevMediaHash;
+
+ $(window)
+ .off('.interchange')
+ .on('resize.fndtn.interchange', self.throttle(function () {
+ var currMediaHash = self.get_media_hash();
+ if (currMediaHash !== prevMediaHash) {
+ self.resize();
+ }
+ prevMediaHash = currMediaHash;
+ }, 50));
+
+ return this;
+ },
+
+ resize : function () {
+ var cache = this.cache;
+
+ if (!this.images_loaded || !this.nodes_loaded) {
+ setTimeout($.proxy(this.resize, this), 50);
+ return;
+ }
+
+ for (var uuid in cache) {
+ if (cache.hasOwnProperty(uuid)) {
+ var passed = this.results(uuid, cache[uuid]);
+ if (passed) {
+ this.settings.directives[passed
+ .scenario[1]].call(this, passed.el, passed.scenario[0], (function (passed) {
+ if (arguments[0] instanceof Array) {
+ var args = arguments[0];
+ } else {
+ var args = Array.prototype.slice.call(arguments, 0);
+ }
+
+ return function() {
+ passed.el.trigger(passed.scenario[1], args);
+ }
+ }(passed)));
+ }
+ }
+ }
+
+ },
+
+ results : function (uuid, scenarios) {
+ var count = scenarios.length;
+
+ if (count > 0) {
+ var el = this.S('[' + this.add_namespace('data-uuid') + '="' + uuid + '"]');
+
+ while (count--) {
+ var mq, rule = scenarios[count][2];
+ if (this.settings.named_queries.hasOwnProperty(rule)) {
+ mq = matchMedia(this.settings.named_queries[rule]);
+ } else {
+ mq = matchMedia(rule);
+ }
+ if (mq.matches) {
+ return {el : el, scenario : scenarios[count]};
+ }
+ }
+ }
+
+ return false;
+ },
+
+ load : function (type, force_update) {
+ if (typeof this['cached_' + type] === 'undefined' || force_update) {
+ this['update_' + type]();
+ }
+
+ return this['cached_' + type];
+ },
+
+ update_images : function () {
+ var images = this.S('img[' + this.data_attr + ']'),
+ count = images.length,
+ i = count,
+ loaded_count = 0,
+ data_attr = this.data_attr;
+
+ this.cache = {};
+ this.cached_images = [];
+ this.images_loaded = (count === 0);
+
+ while (i--) {
+ loaded_count++;
+ if (images[i]) {
+ var str = images[i].getAttribute(data_attr) || '';
+
+ if (str.length > 0) {
+ this.cached_images.push(images[i]);
+ }
+ }
+
+ if (loaded_count === count) {
+ this.images_loaded = true;
+ this.enhance('images');
+ }
+ }
+
+ return this;
+ },
+
+ update_nodes : function () {
+ var nodes = this.S('[' + this.data_attr + ']').not('img'),
+ count = nodes.length,
+ i = count,
+ loaded_count = 0,
+ data_attr = this.data_attr;
+
+ this.cached_nodes = [];
+ this.nodes_loaded = (count === 0);
+
+ while (i--) {
+ loaded_count++;
+ var str = nodes[i].getAttribute(data_attr) || '';
+
+ if (str.length > 0) {
+ this.cached_nodes.push(nodes[i]);
+ }
+
+ if (loaded_count === count) {
+ this.nodes_loaded = true;
+ this.enhance('nodes');
+ }
+ }
+
+ return this;
+ },
+
+ enhance : function (type) {
+ var i = this['cached_' + type].length;
+
+ while (i--) {
+ this.object($(this['cached_' + type][i]));
+ }
+
+ return $(window).trigger('resize.fndtn.interchange');
+ },
+
+ convert_directive : function (directive) {
+
+ var trimmed = this.trim(directive);
+
+ if (trimmed.length > 0) {
+ return trimmed;
+ }
+
+ return 'replace';
+ },
+
+ parse_scenario : function (scenario) {
+ // This logic had to be made more complex since some users were using commas in the url path
+ // So we cannot simply just split on a comma
+
+ var directive_match = scenario[0].match(/(.+),\s*(\w+)\s*$/),
+ // getting the mq has gotten a bit complicated since we started accounting for several use cases
+ // of URLs. For now we'll continue to match these scenarios, but we may consider having these scenarios
+ // as nested objects or arrays in F6.
+ // regex: match everything before close parenthesis for mq
+ media_query = scenario[1].match(/(.*)\)/);
+
+ if (directive_match) {
+ var path = directive_match[1],
+ directive = directive_match[2];
+
+ } else {
+ var cached_split = scenario[0].split(/,\s*$/),
+ path = cached_split[0],
+ directive = '';
+ }
+
+ return [this.trim(path), this.convert_directive(directive), this.trim(media_query[1])];
+ },
+
+ object : function (el) {
+ var raw_arr = this.parse_data_attr(el),
+ scenarios = [],
+ i = raw_arr.length;
+
+ if (i > 0) {
+ while (i--) {
+ // split array between comma delimited content and mq
+ // regex: comma, optional space, open parenthesis
+ var scenario = raw_arr[i].split(/,\s?\(/);
+
+ if (scenario.length > 1) {
+ var params = this.parse_scenario(scenario);
+ scenarios.push(params);
+ }
+ }
+ }
+
+ return this.store(el, scenarios);
+ },
+
+ store : function (el, scenarios) {
+ var uuid = this.random_str(),
+ current_uuid = el.data(this.add_namespace('uuid', true));
+
+ if (this.cache[current_uuid]) {
+ return this.cache[current_uuid];
+ }
+
+ el.attr(this.add_namespace('data-uuid'), uuid);
+ return this.cache[uuid] = scenarios;
+ },
+
+ trim : function (str) {
+
+ if (typeof str === 'string') {
+ return $.trim(str);
+ }
+
+ return str;
+ },
+
+ set_data_attr : function (init) {
+ if (init) {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + this.settings.load_attr;
+ }
+
+ return this.settings.load_attr;
+ }
+
+ if (this.namespace.length > 0) {
+ return 'data-' + this.namespace + '-' + this.settings.load_attr;
+ }
+
+ return 'data-' + this.settings.load_attr;
+ },
+
+ parse_data_attr : function (el) {
+ var raw = el.attr(this.attr_name()).split(/\[(.*?)\]/),
+ i = raw.length,
+ output = [];
+
+ while (i--) {
+ if (raw[i].replace(/[\W\d]+/, '').length > 4) {
+ output.push(raw[i]);
+ }
+ }
+
+ return output;
+ },
+
+ reflow : function () {
+ this.load('images', true);
+ this.load('nodes', true);
+ }
+
+ };
+
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ var Modernizr = Modernizr || false;
+
+ Foundation.libs.joyride = {
+ name : 'joyride',
+
+ version : '5.5.2',
+
+ defaults : {
+ expose : false, // turn on or off the expose feature
+ modal : true, // Whether to cover page with modal during the tour
+ keyboard : true, // enable left, right and esc keystrokes
+ tip_location : 'bottom', // 'top' or 'bottom' in relation to parent
+ nub_position : 'auto', // override on a per tooltip bases
+ scroll_speed : 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation
+ scroll_animation : 'linear', // supports 'swing' and 'linear', extend with jQuery UI.
+ timer : 0, // 0 = no timer , all other numbers = timer in milliseconds
+ start_timer_on_click : true, // true or false - true requires clicking the first button start the timer
+ start_offset : 0, // the index of the tooltip you want to start on (index of the li)
+ next_button : true, // true or false to control whether a next button is used
+ prev_button : true, // true or false to control whether a prev button is used
+ tip_animation : 'fade', // 'pop' or 'fade' in each tip
+ pause_after : [], // array of indexes where to pause the tour after
+ exposed : [], // array of expose elements
+ tip_animation_fade_speed : 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
+ cookie_monster : false, // true or false to control whether cookies are used
+ cookie_name : 'joyride', // Name the cookie you'll use
+ cookie_domain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
+ cookie_expires : 365, // set when you would like the cookie to expire.
+ tip_container : 'body', // Where will the tip be attached
+ abort_on_close : true, // When true, the close event will not fire any callback
+ tip_location_patterns : {
+ top : ['bottom'],
+ bottom : [], // bottom should not need to be repositioned
+ left : ['right', 'top', 'bottom'],
+ right : ['left', 'top', 'bottom']
+ },
+ post_ride_callback : function () {}, // A method to call once the tour closes (canceled or complete)
+ post_step_callback : function () {}, // A method to call after each step
+ pre_step_callback : function () {}, // A method to call before each step
+ pre_ride_callback : function () {}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
+ post_expose_callback : function () {}, // A method to call after an element has been exposed
+ template : { // HTML segments for tip layout
+ link : '<a href="#close" class="joyride-close-tip">×</a>',
+ timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
+ tip : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
+ wrapper : '<div class="joyride-content-wrapper"></div>',
+ button : '<a href="#" class="small button joyride-next-tip"></a>',
+ prev_button : '<a href="#" class="small button joyride-prev-tip"></a>',
+ modal : '<div class="joyride-modal-bg"></div>',
+ expose : '<div class="joyride-expose-wrapper"></div>',
+ expose_cover : '<div class="joyride-expose-cover"></div>'
+ },
+ expose_add_class : '' // One or more space-separated class names to be added to exposed element
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle random_str');
+
+ this.settings = this.settings || $.extend({}, this.defaults, (options || method));
+
+ this.bindings(method, options)
+ },
+
+ go_next : function () {
+ if (this.settings.$li.next().length < 1) {
+ this.end();
+ } else if (this.settings.timer > 0) {
+ clearTimeout(this.settings.automate);
+ this.hide();
+ this.show();
+ this.startTimer();
+ } else {
+ this.hide();
+ this.show();
+ }
+ },
+
+ go_prev : function () {
+ if (this.settings.$li.prev().length < 1) {
+ // Do nothing if there are no prev element
+ } else if (this.settings.timer > 0) {
+ clearTimeout(this.settings.automate);
+ this.hide();
+ this.show(null, true);
+ this.startTimer();
+ } else {
+ this.hide();
+ this.show(null, true);
+ }
+ },
+
+ events : function () {
+ var self = this;
+
+ $(this.scope)
+ .off('.joyride')
+ .on('click.fndtn.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
+ e.preventDefault();
+ this.go_next()
+ }.bind(this))
+ .on('click.fndtn.joyride', '.joyride-prev-tip', function (e) {
+ e.preventDefault();
+ this.go_prev();
+ }.bind(this))
+
+ .on('click.fndtn.joyride', '.joyride-close-tip', function (e) {
+ e.preventDefault();
+ this.end(this.settings.abort_on_close);
+ }.bind(this))
+
+ .on('keyup.fndtn.joyride', function (e) {
+ // Don't do anything if keystrokes are disabled
+ // or if the joyride is not being shown
+ if (!this.settings.keyboard || !this.settings.riding) {
+ return;
+ }
+
+ switch (e.which) {
+ case 39: // right arrow
+ e.preventDefault();
+ this.go_next();
+ break;
+ case 37: // left arrow
+ e.preventDefault();
+ this.go_prev();
+ break;
+ case 27: // escape
+ e.preventDefault();
+ this.end(this.settings.abort_on_close);
+ }
+ }.bind(this));
+
+ $(window)
+ .off('.joyride')
+ .on('resize.fndtn.joyride', self.throttle(function () {
+ if ($('[' + self.attr_name() + ']').length > 0 && self.settings.$next_tip && self.settings.riding) {
+ if (self.settings.exposed.length > 0) {
+ var $els = $(self.settings.exposed);
+
+ $els.each(function () {
+ var $this = $(this);
+ self.un_expose($this);
+ self.expose($this);
+ });
+ }
+
+ if (self.is_phone()) {
+ self.pos_phone();
+ } else {
+ self.pos_default(false);
+ }
+ }
+ }, 100));
+ },
+
+ start : function () {
+ var self = this,
+ $this = $('[' + this.attr_name() + ']', this.scope),
+ integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
+ int_settings_count = integer_settings.length;
+
+ if (!$this.length > 0) {
+ return;
+ }
+
+ if (!this.settings.init) {
+ this.events();
+ }
+
+ this.settings = $this.data(this.attr_name(true) + '-init');
+
+ // non configureable settings
+ this.settings.$content_el = $this;
+ this.settings.$body = $(this.settings.tip_container);
+ this.settings.body_offset = $(this.settings.tip_container).position();
+ this.settings.$tip_content = this.settings.$content_el.find('> li');
+ this.settings.paused = false;
+ this.settings.attempts = 0;
+ this.settings.riding = true;
+
+ // can we create cookies?
+ if (typeof $.cookie !== 'function') {
+ this.settings.cookie_monster = false;
+ }
+
+ // generate the tips and insert into dom.
+ if (!this.settings.cookie_monster || this.settings.cookie_monster && !$.cookie(this.settings.cookie_name)) {
+ this.settings.$tip_content.each(function (index) {
+ var $this = $(this);
+ this.settings = $.extend({}, self.defaults, self.data_options($this));
+
+ // Make sure that settings parsed from data_options are integers where necessary
+ var i = int_settings_count;
+ while (i--) {
+ self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10);
+ }
+ self.create({$li : $this, index : index});
+ });
+
+ // show first tip
+ if (!this.settings.start_timer_on_click && this.settings.timer > 0) {
+ this.show('init');
+ this.startTimer();
+ } else {
+ this.show('init');
+ }
+
+ }
+ },
+
+ resume : function () {
+ this.set_li();
+ this.show();
+ },
+
+ tip_template : function (opts) {
+ var $blank, content;
+
+ opts.tip_class = opts.tip_class || '';
+
+ $blank = $(this.settings.template.tip).addClass(opts.tip_class);
+ content = $.trim($(opts.li).html()) +
+ this.prev_button_text(opts.prev_button_text, opts.index) +
+ this.button_text(opts.button_text) +
+ this.settings.template.link +
+ this.timer_instance(opts.index);
+
+ $blank.append($(this.settings.template.wrapper));
+ $blank.first().attr(this.add_namespace('data-index'), opts.index);
+ $('.joyride-content-wrapper', $blank).append(content);
+
+ return $blank[0];
+ },
+
+ timer_instance : function (index) {
+ var txt;
+
+ if ((index === 0 && this.settings.start_timer_on_click && this.settings.timer > 0) || this.settings.timer === 0) {
+ txt = '';
+ } else {
+ txt = $(this.settings.template.timer)[0].outerHTML;
+ }
+ return txt;
+ },
+
+ button_text : function (txt) {
+ if (this.settings.tip_settings.next_button) {
+ txt = $.trim(txt) || 'Next';
+ txt = $(this.settings.template.button).append(txt)[0].outerHTML;
+ } else {
+ txt = '';
+ }
+ return txt;
+ },
+
+ prev_button_text : function (txt, idx) {
+ if (this.settings.tip_settings.prev_button) {
+ txt = $.trim(txt) || 'Previous';
+
+ // Add the disabled class to the button if it's the first element
+ if (idx == 0) {
+ txt = $(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;
+ } else {
+ txt = $(this.settings.template.prev_button).append(txt)[0].outerHTML;
+ }
+ } else {
+ txt = '';
+ }
+ return txt;
+ },
+
+ create : function (opts) {
+ this.settings.tip_settings = $.extend({}, this.settings, this.data_options(opts.$li));
+ var buttonText = opts.$li.attr(this.add_namespace('data-button')) || opts.$li.attr(this.add_namespace('data-text')),
+ prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev')) || opts.$li.attr(this.add_namespace('data-prev-text')),
+ tipClass = opts.$li.attr('class'),
+ $tip_content = $(this.tip_template({
+ tip_class : tipClass,
+ index : opts.index,
+ button_text : buttonText,
+ prev_button_text : prevButtonText,
+ li : opts.$li
+ }));
+
+ $(this.settings.tip_container).append($tip_content);
+ },
+
+ show : function (init, is_prev) {
+ var $timer = null;
+
+ // are we paused?
+ if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
+
+ // don't go to the next li if the tour was paused
+ if (this.settings.paused) {
+ this.settings.paused = false;
+ } else {
+ this.set_li(init, is_prev);
+ }
+
+ this.settings.attempts = 0;
+
+ if (this.settings.$li.length && this.settings.$target.length > 0) {
+ if (init) { //run when we first start
+ this.settings.pre_ride_callback(this.settings.$li.index(), this.settings.$next_tip);
+ if (this.settings.modal) {
+ this.show_modal();
+ }
+ }
+
+ this.settings.pre_step_callback(this.settings.$li.index(), this.settings.$next_tip);
+
+ if (this.settings.modal && this.settings.expose) {
+ this.expose();
+ }
+
+ this.settings.tip_settings = $.extend({}, this.settings, this.data_options(this.settings.$li));
+
+ this.settings.timer = parseInt(this.settings.timer, 10);
+
+ this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
+
+ // scroll and hide bg if not modal
+ if (!/body/i.test(this.settings.$target.selector)) {
+ var joyridemodalbg = $('.joyride-modal-bg');
+ if (/pop/i.test(this.settings.tipAnimation)) {
+ joyridemodalbg.hide();
+ } else {
+ joyridemodalbg.fadeOut(this.settings.tipAnimationFadeSpeed);
+ }
+ this.scroll_to();
+ }
+
+ if (this.is_phone()) {
+ this.pos_phone(true);
+ } else {
+ this.pos_default(true);
+ }
+
+ $timer = this.settings.$next_tip.find('.joyride-timer-indicator');
+
+ if (/pop/i.test(this.settings.tip_animation)) {
+
+ $timer.width(0);
+
+ if (this.settings.timer > 0) {
+
+ this.settings.$next_tip.show();
+
+ setTimeout(function () {
+ $timer.animate({
+ width : $timer.parent().width()
+ }, this.settings.timer, 'linear');
+ }.bind(this), this.settings.tip_animation_fade_speed);
+
+ } else {
+ this.settings.$next_tip.show();
+
+ }
+
+ } else if (/fade/i.test(this.settings.tip_animation)) {
+
+ $timer.width(0);
+
+ if (this.settings.timer > 0) {
+
+ this.settings.$next_tip
+ .fadeIn(this.settings.tip_animation_fade_speed)
+ .show();
+
+ setTimeout(function () {
+ $timer.animate({
+ width : $timer.parent().width()
+ }, this.settings.timer, 'linear');
+ }.bind(this), this.settings.tip_animation_fade_speed);
+
+ } else {
+ this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);
+ }
+ }
+
+ this.settings.$current_tip = this.settings.$next_tip;
+
+ // skip non-existant targets
+ } else if (this.settings.$li && this.settings.$target.length < 1) {
+
+ this.show(init, is_prev);
+
+ } else {
+
+ this.end();
+
+ }
+ } else {
+
+ this.settings.paused = true;
+
+ }
+
+ },
+
+ is_phone : function () {
+ return matchMedia(Foundation.media_queries.small).matches &&
+ !matchMedia(Foundation.media_queries.medium).matches;
+ },
+
+ hide : function () {
+ if (this.settings.modal && this.settings.expose) {
+ this.un_expose();
+ }
+
+ if (!this.settings.modal) {
+ $('.joyride-modal-bg').hide();
+ }
+
+ // Prevent scroll bouncing...wait to remove from layout
+ this.settings.$current_tip.css('visibility', 'hidden');
+ setTimeout($.proxy(function () {
+ this.hide();
+ this.css('visibility', 'visible');
+ }, this.settings.$current_tip), 0);
+ this.settings.post_step_callback(this.settings.$li.index(),
+ this.settings.$current_tip);
+ },
+
+ set_li : function (init, is_prev) {
+ if (init) {
+ this.settings.$li = this.settings.$tip_content.eq(this.settings.start_offset);
+ this.set_next_tip();
+ this.settings.$current_tip = this.settings.$next_tip;
+ } else {
+ if (is_prev) {
+ this.settings.$li = this.settings.$li.prev();
+ } else {
+ this.settings.$li = this.settings.$li.next();
+ }
+ this.set_next_tip();
+ }
+
+ this.set_target();
+ },
+
+ set_next_tip : function () {
+ this.settings.$next_tip = $('.joyride-tip-guide').eq(this.settings.$li.index());
+ this.settings.$next_tip.data('closed', '');
+ },
+
+ set_target : function () {
+ var cl = this.settings.$li.attr(this.add_namespace('data-class')),
+ id = this.settings.$li.attr(this.add_namespace('data-id')),
+ $sel = function () {
+ if (id) {
+ return $(document.getElementById(id));
+ } else if (cl) {
+ return $('.' + cl).first();
+ } else {
+ return $('body');
+ }
+ };
+
+ this.settings.$target = $sel();
+ },
+
+ scroll_to : function () {
+ var window_half, tipOffset;
+
+ window_half = $(window).height() / 2;
+ tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight());
+
+ if (tipOffset != 0) {
+ $('html, body').stop().animate({
+ scrollTop : tipOffset
+ }, this.settings.scroll_speed, 'swing');
+ }
+ },
+
+ paused : function () {
+ return ($.inArray((this.settings.$li.index() + 1), this.settings.pause_after) === -1);
+ },
+
+ restart : function () {
+ this.hide();
+ this.settings.$li = undefined;
+ this.show('init');
+ },
+
+ pos_default : function (init) {
+ var $nub = this.settings.$next_tip.find('.joyride-nub'),
+ nub_width = Math.ceil($nub.outerWidth() / 2),
+ nub_height = Math.ceil($nub.outerHeight() / 2),
+ toggle = init || false;
+
+ // tip must not be "display: none" to calculate position
+ if (toggle) {
+ this.settings.$next_tip.css('visibility', 'hidden');
+ this.settings.$next_tip.show();
+ }
+
+ if (!/body/i.test(this.settings.$target.selector)) {
+ var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
+ leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
+
+ if (this.bottom()) {
+ if (this.rtl) {
+ this.settings.$next_tip.css({
+ top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
+ left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
+ } else {
+ this.settings.$next_tip.css({
+ top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
+ left : this.settings.$target.offset().left + leftAdjustment});
+ }
+
+ this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
+
+ } else if (this.top()) {
+ if (this.rtl) {
+ this.settings.$next_tip.css({
+ top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
+ left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
+ } else {
+ this.settings.$next_tip.css({
+ top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
+ left : this.settings.$target.offset().left + leftAdjustment});
+ }
+
+ this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
+
+ } else if (this.right()) {
+
+ this.settings.$next_tip.css({
+ top : this.settings.$target.offset().top + topAdjustment,
+ left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
+
+ this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
+
+ } else if (this.left()) {
+
+ this.settings.$next_tip.css({
+ top : this.settings.$target.offset().top + topAdjustment,
+ left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
+
+ this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
+
+ }
+
+ if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
+
+ $nub.removeClass('bottom')
+ .removeClass('top')
+ .removeClass('right')
+ .removeClass('left');
+
+ this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
+
+ this.settings.attempts++;
+
+ this.pos_default();
+
+ }
+
+ } else if (this.settings.$li.length) {
+
+ this.pos_modal($nub);
+
+ }
+
+ if (toggle) {
+ this.settings.$next_tip.hide();
+ this.settings.$next_tip.css('visibility', 'visible');
+ }
+
+ },
+
+ pos_phone : function (init) {
+ var tip_height = this.settings.$next_tip.outerHeight(),
+ tip_offset = this.settings.$next_tip.offset(),
+ target_height = this.settings.$target.outerHeight(),
+ $nub = $('.joyride-nub', this.settings.$next_tip),
+ nub_height = Math.ceil($nub.outerHeight() / 2),
+ toggle = init || false;
+
+ $nub.removeClass('bottom')
+ .removeClass('top')
+ .removeClass('right')
+ .removeClass('left');
+
+ if (toggle) {
+ this.settings.$next_tip.css('visibility', 'hidden');
+ this.settings.$next_tip.show();
+ }
+
+ if (!/body/i.test(this.settings.$target.selector)) {
+
+ if (this.top()) {
+
+ this.settings.$next_tip.offset({top : this.settings.$target.offset().top - tip_height - nub_height});
+ $nub.addClass('bottom');
+
+ } else {
+
+ this.settings.$next_tip.offset({top : this.settings.$target.offset().top + target_height + nub_height});
+ $nub.addClass('top');
+
+ }
+
+ } else if (this.settings.$li.length) {
+ this.pos_modal($nub);
+ }
+
+ if (toggle) {
+ this.settings.$next_tip.hide();
+ this.settings.$next_tip.css('visibility', 'visible');
+ }
+ },
+
+ pos_modal : function ($nub) {
+ this.center();
+ $nub.hide();
+
+ this.show_modal();
+ },
+
+ show_modal : function () {
+ if (!this.settings.$next_tip.data('closed')) {
+ var joyridemodalbg = $('.joyride-modal-bg');
+ if (joyridemodalbg.length < 1) {
+ var joyridemodalbg = $(this.settings.template.modal);
+ joyridemodalbg.appendTo('body');
+ }
+
+ if (/pop/i.test(this.settings.tip_animation)) {
+ joyridemodalbg.show();
+ } else {
+ joyridemodalbg.fadeIn(this.settings.tip_animation_fade_speed);
+ }
+ }
+ },
+
+ expose : function () {
+ var expose,
+ exposeCover,
+ el,
+ origCSS,
+ origClasses,
+ randId = 'expose-' + this.random_str(6);
+
+ if (arguments.length > 0 && arguments[0] instanceof $) {
+ el = arguments[0];
+ } else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
+ el = this.settings.$target;
+ } else {
+ return false;
+ }
+
+ if (el.length < 1) {
+ if (window.console) {
+ console.error('element not valid', el);
+ }
+ return false;
+ }
+
+ expose = $(this.settings.template.expose);
+ this.settings.$body.append(expose);
+ expose.css({
+ top : el.offset().top,
+ left : el.offset().left,
+ width : el.outerWidth(true),
+ height : el.outerHeight(true)
+ });
+
+ exposeCover = $(this.settings.template.expose_cover);
+
+ origCSS = {
+ zIndex : el.css('z-index'),
+ position : el.css('position')
+ };
+
+ origClasses = el.attr('class') == null ? '' : el.attr('class');
+
+ el.css('z-index', parseInt(expose.css('z-index')) + 1);
+
+ if (origCSS.position == 'static') {
+ el.css('position', 'relative');
+ }
+
+ el.data('expose-css', origCSS);
+ el.data('orig-class', origClasses);
+ el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
+
+ exposeCover.css({
+ top : el.offset().top,
+ left : el.offset().left,
+ width : el.outerWidth(true),
+ height : el.outerHeight(true)
+ });
+
+ if (this.settings.modal) {
+ this.show_modal();
+ }
+
+ this.settings.$body.append(exposeCover);
+ expose.addClass(randId);
+ exposeCover.addClass(randId);
+ el.data('expose', randId);
+ this.settings.post_expose_callback(this.settings.$li.index(), this.settings.$next_tip, el);
+ this.add_exposed(el);
+ },
+
+ un_expose : function () {
+ var exposeId,
+ el,
+ expose,
+ origCSS,
+ origClasses,
+ clearAll = false;
+
+ if (arguments.length > 0 && arguments[0] instanceof $) {
+ el = arguments[0];
+ } else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
+ el = this.settings.$target;
+ } else {
+ return false;
+ }
+
+ if (el.length < 1) {
+ if (window.console) {
+ console.error('element not valid', el);
+ }
+ return false;
+ }
+
+ exposeId = el.data('expose');
+ expose = $('.' + exposeId);
+
+ if (arguments.length > 1) {
+ clearAll = arguments[1];
+ }
+
+ if (clearAll === true) {
+ $('.joyride-expose-wrapper,.joyride-expose-cover').remove();
+ } else {
+ expose.remove();
+ }
+
+ origCSS = el.data('expose-css');
+
+ if (origCSS.zIndex == 'auto') {
+ el.css('z-index', '');
+ } else {
+ el.css('z-index', origCSS.zIndex);
+ }
+
+ if (origCSS.position != el.css('position')) {
+ if (origCSS.position == 'static') {// this is default, no need to set it.
+ el.css('position', '');
+ } else {
+ el.css('position', origCSS.position);
+ }
+ }
+
+ origClasses = el.data('orig-class');
+ el.attr('class', origClasses);
+ el.removeData('orig-classes');
+
+ el.removeData('expose');
+ el.removeData('expose-z-index');
+ this.remove_exposed(el);
+ },
+
+ add_exposed : function (el) {
+ this.settings.exposed = this.settings.exposed || [];
+ if (el instanceof $ || typeof el === 'object') {
+ this.settings.exposed.push(el[0]);
+ } else if (typeof el == 'string') {
+ this.settings.exposed.push(el);
+ }
+ },
+
+ remove_exposed : function (el) {
+ var search, i;
+ if (el instanceof $) {
+ search = el[0]
+ } else if (typeof el == 'string') {
+ search = el;
+ }
+
+ this.settings.exposed = this.settings.exposed || [];
+ i = this.settings.exposed.length;
+
+ while (i--) {
+ if (this.settings.exposed[i] == search) {
+ this.settings.exposed.splice(i, 1);
+ return;
+ }
+ }
+ },
+
+ center : function () {
+ var $w = $(window);
+
+ this.settings.$next_tip.css({
+ top : ((($w.height() - this.settings.$next_tip.outerHeight()) / 2) + $w.scrollTop()),
+ left : ((($w.width() - this.settings.$next_tip.outerWidth()) / 2) + $w.scrollLeft())
+ });
+
+ return true;
+ },
+
+ bottom : function () {
+ return /bottom/i.test(this.settings.tip_settings.tip_location);
+ },
+
+ top : function () {
+ return /top/i.test(this.settings.tip_settings.tip_location);
+ },
+
+ right : function () {
+ return /right/i.test(this.settings.tip_settings.tip_location);
+ },
+
+ left : function () {
+ return /left/i.test(this.settings.tip_settings.tip_location);
+ },
+
+ corners : function (el) {
+ var w = $(window),
+ window_half = w.height() / 2,
+ //using this to calculate since scroll may not have finished yet.
+ tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()),
+ right = w.width() + w.scrollLeft(),
+ offsetBottom = w.height() + tipOffset,
+ bottom = w.height() + w.scrollTop(),
+ top = w.scrollTop();
+
+ if (tipOffset < top) {
+ if (tipOffset < 0) {
+ top = 0;
+ } else {
+ top = tipOffset;
+ }
+ }
+
+ if (offsetBottom > bottom) {
+ bottom = offsetBottom;
+ }
+
+ return [
+ el.offset().top < top,
+ right < el.offset().left + el.outerWidth(),
+ bottom < el.offset().top + el.outerHeight(),
+ w.scrollLeft() > el.offset().left
+ ];
+ },
+
+ visible : function (hidden_corners) {
+ var i = hidden_corners.length;
+
+ while (i--) {
+ if (hidden_corners[i]) {
+ return false;
+ }
+ }
+
+ return true;
+ },
+
+ nub_position : function (nub, pos, def) {
+ if (pos === 'auto') {
+ nub.addClass(def);
+ } else {
+ nub.addClass(pos);
+ }
+ },
+
+ startTimer : function () {
+ if (this.settings.$li.length) {
+ this.settings.automate = setTimeout(function () {
+ this.hide();
+ this.show();
+ this.startTimer();
+ }.bind(this), this.settings.timer);
+ } else {
+ clearTimeout(this.settings.automate);
+ }
+ },
+
+ end : function (abort) {
+ if (this.settings.cookie_monster) {
+ $.cookie(this.settings.cookie_name, 'ridden', {expires : this.settings.cookie_expires, domain : this.settings.cookie_domain});
+ }
+
+ if (this.settings.timer > 0) {
+ clearTimeout(this.settings.automate);
+ }
+
+ if (this.settings.modal && this.settings.expose) {
+ this.un_expose();
+ }
+
+ // Unplug keystrokes listener
+ $(this.scope).off('keyup.joyride')
+
+ this.settings.$next_tip.data('closed', true);
+ this.settings.riding = false;
+
+ $('.joyride-modal-bg').hide();
+ this.settings.$current_tip.hide();
+
+ if (typeof abort === 'undefined' || abort === false) {
+ this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
+ this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
+ }
+
+ $('.joyride-tip-guide').remove();
+ },
+
+ off : function () {
+ $(this.scope).off('.joyride');
+ $(window).off('.joyride');
+ $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
+ $('.joyride-tip-guide, .joyride-modal-bg').remove();
+ clearTimeout(this.settings.automate);
+ this.settings = {};
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs['magellan-expedition'] = {
+ name : 'magellan-expedition',
+
+ version : '5.5.2',
+
+ settings : {
+ active_class : 'active',
+ threshold : 0, // pixels from the top of the expedition for it to become fixes
+ destination_threshold : 20, // pixels from the top of destination for it to be considered active
+ throttle_delay : 30, // calculation throttling to increase framerate
+ fixed_top : 0, // top distance in pixels assigend to the fixed element on scroll
+ offset_by_height : true, // whether to offset the destination by the expedition height. Usually you want this to be true, unless your expedition is on the side.
+ duration : 700, // animation duration time
+ easing : 'swing' // animation easing
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle');
+ this.bindings(method, options);
+ },
+
+ events : function () {
+ var self = this,
+ S = self.S,
+ settings = self.settings;
+
+ // initialize expedition offset
+ self.set_expedition_position();
+
+ S(self.scope)
+ .off('.magellan')
+ .on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href*=#]', function (e) {
+ var sameHost = ((this.hostname === location.hostname) || !this.hostname),
+ samePath = self.filterPathname(location.pathname) === self.filterPathname(this.pathname),
+ testHash = this.hash.replace(/(:|\.|\/)/g, '\\$1'),
+ anchor = this;
+
+ if (sameHost && samePath && testHash) {
+ e.preventDefault();
+ var expedition = $(this).closest('[' + self.attr_name() + ']'),
+ settings = expedition.data('magellan-expedition-init'),
+ hash = this.hash.split('#').join(''),
+ target = $('a[name="' + hash + '"]');
+
+ if (target.length === 0) {
+ target = $('#' + hash);
+
+ }
+
+ // Account for expedition height if fixed position
+ var scroll_top = target.offset().top - settings.destination_threshold + 1;
+ if (settings.offset_by_height) {
+ scroll_top = scroll_top - expedition.outerHeight();
+ }
+ $('html, body').stop().animate({
+ 'scrollTop' : scroll_top
+ }, settings.duration, settings.easing, function () {
+ if (history.pushState) {
+ history.pushState(null, null, anchor.pathname + '#' + hash);
+ }
+ else {
+ location.hash = anchor.pathname + '#' + hash;
+ }
+ });
+ }
+ })
+ .on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay));
+ },
+
+ check_for_arrivals : function () {
+ var self = this;
+ self.update_arrivals();
+ self.update_expedition_positions();
+ },
+
+ set_expedition_position : function () {
+ var self = this;
+ $('[' + this.attr_name() + '=fixed]', self.scope).each(function (idx, el) {
+ var expedition = $(this),
+ settings = expedition.data('magellan-expedition-init'),
+ styles = expedition.attr('styles'), // save styles
+ top_offset, fixed_top;
+
+ expedition.attr('style', '');
+ top_offset = expedition.offset().top + settings.threshold;
+
+ //set fixed-top by attribute
+ fixed_top = parseInt(expedition.data('magellan-fixed-top'));
+ if (!isNaN(fixed_top)) {
+ self.settings.fixed_top = fixed_top;
+ }
+
+ expedition.data(self.data_attr('magellan-top-offset'), top_offset);
+ expedition.attr('style', styles);
+ });
+ },
+
+ update_expedition_positions : function () {
+ var self = this,
+ window_top_offset = $(window).scrollTop();
+
+ $('[' + this.attr_name() + '=fixed]', self.scope).each(function () {
+ var expedition = $(this),
+ settings = expedition.data('magellan-expedition-init'),
+ styles = expedition.attr('style'), // save styles
+ top_offset = expedition.data('magellan-top-offset');
+
+ //scroll to the top distance
+ if (window_top_offset + self.settings.fixed_top >= top_offset) {
+ // Placeholder allows height calculations to be consistent even when
+ // appearing to switch between fixed/non-fixed placement
+ var placeholder = expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']');
+ if (placeholder.length === 0) {
+ placeholder = expedition.clone();
+ placeholder.removeAttr(self.attr_name());
+ placeholder.attr(self.add_namespace('data-magellan-expedition-clone'), '');
+ expedition.before(placeholder);
+ }
+ expedition.css({position :'fixed', top : settings.fixed_top}).addClass('fixed');
+ } else {
+ expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
+ expedition.attr('style', styles).css('position', '').css('top', '').removeClass('fixed');
+ }
+ });
+ },
+
+ update_arrivals : function () {
+ var self = this,
+ window_top_offset = $(window).scrollTop();
+
+ $('[' + this.attr_name() + ']', self.scope).each(function () {
+ var expedition = $(this),
+ settings = expedition.data(self.attr_name(true) + '-init'),
+ offsets = self.offsets(expedition, window_top_offset),
+ arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']'),
+ active_item = false;
+ offsets.each(function (idx, item) {
+ if (item.viewport_offset >= item.top_offset) {
+ var arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']');
+ arrivals.not(item.arrival).removeClass(settings.active_class);
+ item.arrival.addClass(settings.active_class);
+ active_item = true;
+ return true;
+ }
+ });
+
+ if (!active_item) {
+ arrivals.removeClass(settings.active_class);
+ }
+ });
+ },
+
+ offsets : function (expedition, window_offset) {
+ var self = this,
+ settings = expedition.data(self.attr_name(true) + '-init'),
+ viewport_offset = window_offset;
+
+ return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function (idx, el) {
+ var name = $(this).data(self.data_attr('magellan-arrival')),
+ dest = $('[' + self.add_namespace('data-magellan-destination') + '=' + name + ']');
+ if (dest.length > 0) {
+ var top_offset = dest.offset().top - settings.destination_threshold;
+ if (settings.offset_by_height) {
+ top_offset = top_offset - expedition.outerHeight();
+ }
+ top_offset = Math.floor(top_offset);
+ return {
+ destination : dest,
+ arrival : $(this),
+ top_offset : top_offset,
+ viewport_offset : viewport_offset
+ }
+ }
+ }).sort(function (a, b) {
+ if (a.top_offset < b.top_offset) {
+ return -1;
+ }
+ if (a.top_offset > b.top_offset) {
+ return 1;
+ }
+ return 0;
+ });
+ },
+
+ data_attr : function (str) {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + str;
+ }
+
+ return str;
+ },
+
+ off : function () {
+ this.S(this.scope).off('.magellan');
+ this.S(window).off('.magellan');
+ },
+
+ filterPathname : function (pathname) {
+ pathname = pathname || '';
+ return pathname
+ .replace(/^\//,'')
+ .replace(/(?:index|default).[a-zA-Z]{3,4}$/,'')
+ .replace(/\/$/,'');
+ },
+
+ reflow : function () {
+ var self = this;
+ // remove placeholder expeditions used for height calculation purposes
+ $('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove();
+ }
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.offcanvas = {
+ name : 'offcanvas',
+
+ version : '5.5.2',
+
+ settings : {
+ open_method : 'move',
+ close_on_click : false
+ },
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function () {
+ var self = this,
+ S = self.S,
+ move_class = '',
+ right_postfix = '',
+ left_postfix = '';
+
+ if (this.settings.open_method === 'move') {
+ move_class = 'move-';
+ right_postfix = 'right';
+ left_postfix = 'left';
+ } else if (this.settings.open_method === 'overlap_single') {
+ move_class = 'offcanvas-overlap-';
+ right_postfix = 'right';
+ left_postfix = 'left';
+ } else if (this.settings.open_method === 'overlap') {
+ move_class = 'offcanvas-overlap';
+ }
+
+ S(this.scope).off('.offcanvas')
+ .on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
+ self.click_toggle_class(e, move_class + right_postfix);
+ if (self.settings.open_method !== 'overlap') {
+ S('.left-submenu').removeClass(move_class + right_postfix);
+ }
+ $('.left-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.left-off-canvas-menu a', function (e) {
+ var settings = self.get_settings(e);
+ var parent = S(this).parent();
+
+ if (settings.close_on_click && !parent.hasClass('has-submenu') && !parent.hasClass('back')) {
+ self.hide.call(self, move_class + right_postfix, self.get_wrapper(e));
+ parent.parent().removeClass(move_class + right_postfix);
+ } else if (S(this).parent().hasClass('has-submenu')) {
+ e.preventDefault();
+ S(this).siblings('.left-submenu').toggleClass(move_class + right_postfix);
+ } else if (parent.hasClass('back')) {
+ e.preventDefault();
+ parent.parent().removeClass(move_class + right_postfix);
+ }
+ $('.left-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
+ self.click_toggle_class(e, move_class + left_postfix);
+ if (self.settings.open_method !== 'overlap') {
+ S('.right-submenu').removeClass(move_class + left_postfix);
+ }
+ $('.right-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.right-off-canvas-menu a', function (e) {
+ var settings = self.get_settings(e);
+ var parent = S(this).parent();
+
+ if (settings.close_on_click && !parent.hasClass('has-submenu') && !parent.hasClass('back')) {
+ self.hide.call(self, move_class + left_postfix, self.get_wrapper(e));
+ parent.parent().removeClass(move_class + left_postfix);
+ } else if (S(this).parent().hasClass('has-submenu')) {
+ e.preventDefault();
+ S(this).siblings('.right-submenu').toggleClass(move_class + left_postfix);
+ } else if (parent.hasClass('back')) {
+ e.preventDefault();
+ parent.parent().removeClass(move_class + left_postfix);
+ }
+ $('.right-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
+ self.click_remove_class(e, move_class + left_postfix);
+ S('.right-submenu').removeClass(move_class + left_postfix);
+ if (right_postfix) {
+ self.click_remove_class(e, move_class + right_postfix);
+ S('.left-submenu').removeClass(move_class + left_postfix);
+ }
+ $('.right-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
+ self.click_remove_class(e, move_class + left_postfix);
+ $('.left-off-canvas-toggle').attr('aria-expanded', 'false');
+ if (right_postfix) {
+ self.click_remove_class(e, move_class + right_postfix);
+ $('.right-off-canvas-toggle').attr('aria-expanded', 'false');
+ }
+ });
+ },
+
+ toggle : function (class_name, $off_canvas) {
+ $off_canvas = $off_canvas || this.get_wrapper();
+ if ($off_canvas.is('.' + class_name)) {
+ this.hide(class_name, $off_canvas);
+ } else {
+ this.show(class_name, $off_canvas);
+ }
+ },
+
+ show : function (class_name, $off_canvas) {
+ $off_canvas = $off_canvas || this.get_wrapper();
+ $off_canvas.trigger('open.fndtn.offcanvas');
+ $off_canvas.addClass(class_name);
+ },
+
+ hide : function (class_name, $off_canvas) {
+ $off_canvas = $off_canvas || this.get_wrapper();
+ $off_canvas.trigger('close.fndtn.offcanvas');
+ $off_canvas.removeClass(class_name);
+ },
+
+ click_toggle_class : function (e, class_name) {
+ e.preventDefault();
+ var $off_canvas = this.get_wrapper(e);
+ this.toggle(class_name, $off_canvas);
+ },
+
+ click_remove_class : function (e, class_name) {
+ e.preventDefault();
+ var $off_canvas = this.get_wrapper(e);
+ this.hide(class_name, $off_canvas);
+ },
+
+ get_settings : function (e) {
+ var offcanvas = this.S(e.target).closest('[' + this.attr_name() + ']');
+ return offcanvas.data(this.attr_name(true) + '-init') || this.settings;
+ },
+
+ get_wrapper : function (e) {
+ var $off_canvas = this.S(e ? e.target : this.scope).closest('.off-canvas-wrap');
+
+ if ($off_canvas.length === 0) {
+ $off_canvas = this.S('.off-canvas-wrap');
+ }
+ return $off_canvas;
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ var noop = function () {};
+
+ var Orbit = function (el, settings) {
+ // Don't reinitialize plugin
+ if (el.hasClass(settings.slides_container_class)) {
+ return this;
+ }
+
+ var self = this,
+ container,
+ slides_container = el,
+ number_container,
+ bullets_container,
+ timer_container,
+ idx = 0,
+ animate,
+ timer,
+ locked = false,
+ adjust_height_after = false;
+
+ self.slides = function () {
+ return slides_container.children(settings.slide_selector);
+ };
+
+ self.slides().first().addClass(settings.active_slide_class);
+
+ self.update_slide_number = function (index) {
+ if (settings.slide_number) {
+ number_container.find('span:first').text(parseInt(index) + 1);
+ number_container.find('span:last').text(self.slides().length);
+ }
+ if (settings.bullets) {
+ bullets_container.children().removeClass(settings.bullets_active_class);
+ $(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
+ }
+ };
+
+ self.update_active_link = function (index) {
+ var link = $('[data-orbit-link="' + self.slides().eq(index).attr('data-orbit-slide') + '"]');
+ link.siblings().removeClass(settings.bullets_active_class);
+ link.addClass(settings.bullets_active_class);
+ };
+
+ self.build_markup = function () {
+ slides_container.wrap('<div class="' + settings.container_class + '"></div>');
+ container = slides_container.parent();
+ slides_container.addClass(settings.slides_container_class);
+
+ if (settings.stack_on_small) {
+ container.addClass(settings.stack_on_small_class);
+ }
+
+ if (settings.navigation_arrows) {
+ container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
+ container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
+ }
+
+ if (settings.timer) {
+ timer_container = $('<div>').addClass(settings.timer_container_class);
+ timer_container.append('<span>');
+ timer_container.append($('<div>').addClass(settings.timer_progress_class));
+ timer_container.addClass(settings.timer_paused_class);
+ container.append(timer_container);
+ }
+
+ if (settings.slide_number) {
+ number_container = $('<div>').addClass(settings.slide_number_class);
+ number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
+ container.append(number_container);
+ }
+
+ if (settings.bullets) {
+ bullets_container = $('<ol>').addClass(settings.bullets_container_class);
+ container.append(bullets_container);
+ bullets_container.wrap('<div class="orbit-bullets-container"></div>');
+ self.slides().each(function (idx, el) {
+ var bullet = $('<li>').attr('data-orbit-slide', idx).on('click', self.link_bullet);;
+ bullets_container.append(bullet);
+ });
+ }
+
+ };
+
+ self._goto = function (next_idx, start_timer) {
+ // if (locked) {return false;}
+ if (next_idx === idx) {return false;}
+ if (typeof timer === 'object') {timer.restart();}
+ var slides = self.slides();
+
+ var dir = 'next';
+ locked = true;
+ if (next_idx < idx) {dir = 'prev';}
+ if (next_idx >= slides.length) {
+ if (!settings.circular) {
+ return false;
+ }
+ next_idx = 0;
+ } else if (next_idx < 0) {
+ if (!settings.circular) {
+ return false;
+ }
+ next_idx = slides.length - 1;
+ }
+
+ var current = $(slides.get(idx));
+ var next = $(slides.get(next_idx));
+
+ current.css('zIndex', 2);
+ current.removeClass(settings.active_slide_class);
+ next.css('zIndex', 4).addClass(settings.active_slide_class);
+
+ slides_container.trigger('before-slide-change.fndtn.orbit');
+ settings.before_slide_change();
+ self.update_active_link(next_idx);
+
+ var callback = function () {
+ var unlock = function () {
+ idx = next_idx;
+ locked = false;
+ if (start_timer === true) {timer = self.create_timer(); timer.start();}
+ self.update_slide_number(idx);
+ slides_container.trigger('after-slide-change.fndtn.orbit', [{slide_number : idx, total_slides : slides.length}]);
+ settings.after_slide_change(idx, slides.length);
+ };
+ if (slides_container.outerHeight() != next.outerHeight() && settings.variable_height) {
+ slides_container.animate({'height': next.outerHeight()}, 250, 'linear', unlock);
+ } else {
+ unlock();
+ }
+ };
+
+ if (slides.length === 1) {callback(); return false;}
+
+ var start_animation = function () {
+ if (dir === 'next') {animate.next(current, next, callback);}
+ if (dir === 'prev') {animate.prev(current, next, callback);}
+ };
+
+ if (next.outerHeight() > slides_container.outerHeight() && settings.variable_height) {
+ slides_container.animate({'height': next.outerHeight()}, 250, 'linear', start_animation);
+ } else {
+ start_animation();
+ }
+ };
+
+ self.next = function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ self._goto(idx + 1);
+ };
+
+ self.prev = function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ self._goto(idx - 1);
+ };
+
+ self.link_custom = function (e) {
+ e.preventDefault();
+ var link = $(this).attr('data-orbit-link');
+ if ((typeof link === 'string') && (link = $.trim(link)) != '') {
+ var slide = container.find('[data-orbit-slide=' + link + ']');
+ if (slide.index() != -1) {self._goto(slide.index());}
+ }
+ };
+
+ self.link_bullet = function (e) {
+ var index = $(this).attr('data-orbit-slide');
+ if ((typeof index === 'string') && (index = $.trim(index)) != '') {
+ if (isNaN(parseInt(index))) {
+ var slide = container.find('[data-orbit-slide=' + index + ']');
+ if (slide.index() != -1) {self._goto(slide.index() + 1);}
+ } else {
+ self._goto(parseInt(index));
+ }
+ }
+
+ }
+
+ self.timer_callback = function () {
+ self._goto(idx + 1, true);
+ }
+
+ self.compute_dimensions = function () {
+ var current = $(self.slides().get(idx));
+ var h = current.outerHeight();
+ if (!settings.variable_height) {
+ self.slides().each(function(){
+ if ($(this).outerHeight() > h) { h = $(this).outerHeight(); }
+ });
+ }
+ slides_container.height(h);
+ };
+
+ self.create_timer = function () {
+ var t = new Timer(
+ container.find('.' + settings.timer_container_class),
+ settings,
+ self.timer_callback
+ );
+ return t;
+ };
+
+ self.stop_timer = function () {
+ if (typeof timer === 'object') {
+ timer.stop();
+ }
+ };
+
+ self.toggle_timer = function () {
+ var t = container.find('.' + settings.timer_container_class);
+ if (t.hasClass(settings.timer_paused_class)) {
+ if (typeof timer === 'undefined') {timer = self.create_timer();}
+ timer.start();
+ } else {
+ if (typeof timer === 'object') {timer.stop();}
+ }
+ };
+
+ self.init = function () {
+ self.build_markup();
+ if (settings.timer) {
+ timer = self.create_timer();
+ Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
+ }
+ animate = new FadeAnimation(settings, slides_container);
+ if (settings.animation === 'slide') {
+ animate = new SlideAnimation(settings, slides_container);
+ }
+
+ container.on('click', '.' + settings.next_class, self.next);
+ container.on('click', '.' + settings.prev_class, self.prev);
+
+ if (settings.next_on_click) {
+ container.on('click', '.' + settings.slides_container_class + ' [data-orbit-slide]', self.link_bullet);
+ }
+
+ container.on('click', self.toggle_timer);
+ if (settings.swipe) {
+ container.on('touchstart.fndtn.orbit', function (e) {
+ if (!e.touches) {e = e.originalEvent;}
+ var data = {
+ start_page_x : e.touches[0].pageX,
+ start_page_y : e.touches[0].pageY,
+ start_time : (new Date()).getTime(),
+ delta_x : 0,
+ is_scrolling : undefined
+ };
+ container.data('swipe-transition', data);
+ e.stopPropagation();
+ })
+ .on('touchmove.fndtn.orbit', function (e) {
+ if (!e.touches) {
+ e = e.originalEvent;
+ }
+ // Ignore pinch/zoom events
+ if (e.touches.length > 1 || e.scale && e.scale !== 1) {
+ return;
+ }
+
+ var data = container.data('swipe-transition');
+ if (typeof data === 'undefined') {data = {};}
+
+ data.delta_x = e.touches[0].pageX - data.start_page_x;
+
+ if ( typeof data.is_scrolling === 'undefined') {
+ data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
+ }
+
+ if (!data.is_scrolling && !data.active) {
+ e.preventDefault();
+ var direction = (data.delta_x < 0) ? (idx + 1) : (idx - 1);
+ data.active = true;
+ self._goto(direction);
+ }
+ })
+ .on('touchend.fndtn.orbit', function (e) {
+ container.data('swipe-transition', {});
+ e.stopPropagation();
+ })
+ }
+ container.on('mouseenter.fndtn.orbit', function (e) {
+ if (settings.timer && settings.pause_on_hover) {
+ self.stop_timer();
+ }
+ })
+ .on('mouseleave.fndtn.orbit', function (e) {
+ if (settings.timer && settings.resume_on_mouseout) {
+ timer.start();
+ }
+ });
+
+ $(document).on('click', '[data-orbit-link]', self.link_custom);
+ $(window).on('load resize', self.compute_dimensions);
+ Foundation.utils.image_loaded(this.slides().children('img'), self.compute_dimensions);
+ Foundation.utils.image_loaded(this.slides().children('img'), function () {
+ container.prev('.' + settings.preloader_class).css('display', 'none');
+ self.update_slide_number(0);
+ self.update_active_link(0);
+ slides_container.trigger('ready.fndtn.orbit');
+ });
+ };
+
+ self.init();
+ };
+
+ var Timer = function (el, settings, callback) {
+ var self = this,
+ duration = settings.timer_speed,
+ progress = el.find('.' + settings.timer_progress_class),
+ start,
+ timeout,
+ left = -1;
+
+ this.update_progress = function (w) {
+ var new_progress = progress.clone();
+ new_progress.attr('style', '');
+ new_progress.css('width', w + '%');
+ progress.replaceWith(new_progress);
+ progress = new_progress;
+ };
+
+ this.restart = function () {
+ clearTimeout(timeout);
+ el.addClass(settings.timer_paused_class);
+ left = -1;
+ self.update_progress(0);
+ };
+
+ this.start = function () {
+ if (!el.hasClass(settings.timer_paused_class)) {return true;}
+ left = (left === -1) ? duration : left;
+ el.removeClass(settings.timer_paused_class);
+ start = new Date().getTime();
+ progress.animate({'width' : '100%'}, left, 'linear');
+ timeout = setTimeout(function () {
+ self.restart();
+ callback();
+ }, left);
+ el.trigger('timer-started.fndtn.orbit')
+ };
+
+ this.stop = function () {
+ if (el.hasClass(settings.timer_paused_class)) {return true;}
+ clearTimeout(timeout);
+ el.addClass(settings.timer_paused_class);
+ var end = new Date().getTime();
+ left = left - (end - start);
+ var w = 100 - ((left / duration) * 100);
+ self.update_progress(w);
+ el.trigger('timer-stopped.fndtn.orbit');
+ };
+ };
+
+ var SlideAnimation = function (settings, container) {
+ var duration = settings.animation_speed;
+ var is_rtl = ($('html[dir=rtl]').length === 1);
+ var margin = is_rtl ? 'marginRight' : 'marginLeft';
+ var animMargin = {};
+ animMargin[margin] = '0%';
+
+ this.next = function (current, next, callback) {
+ current.animate({marginLeft : '-100%'}, duration);
+ next.animate(animMargin, duration, function () {
+ current.css(margin, '100%');
+ callback();
+ });
+ };
+
+ this.prev = function (current, prev, callback) {
+ current.animate({marginLeft : '100%'}, duration);
+ prev.css(margin, '-100%');
+ prev.animate(animMargin, duration, function () {
+ current.css(margin, '100%');
+ callback();
+ });
+ };
+ };
+
+ var FadeAnimation = function (settings, container) {
+ var duration = settings.animation_speed;
+ var is_rtl = ($('html[dir=rtl]').length === 1);
+ var margin = is_rtl ? 'marginRight' : 'marginLeft';
+
+ this.next = function (current, next, callback) {
+ next.css({'margin' : '0%', 'opacity' : '0.01'});
+ next.animate({'opacity' :'1'}, duration, 'linear', function () {
+ current.css('margin', '100%');
+ callback();
+ });
+ };
+
+ this.prev = function (current, prev, callback) {
+ prev.css({'margin' : '0%', 'opacity' : '0.01'});
+ prev.animate({'opacity' : '1'}, duration, 'linear', function () {
+ current.css('margin', '100%');
+ callback();
+ });
+ };
+ };
+
+ Foundation.libs = Foundation.libs || {};
+
+ Foundation.libs.orbit = {
+ name : 'orbit',
+
+ version : '5.5.2',
+
+ settings : {
+ animation : 'slide',
+ timer_speed : 10000,
+ pause_on_hover : true,
+ resume_on_mouseout : false,
+ next_on_click : true,
+ animation_speed : 500,
+ stack_on_small : false,
+ navigation_arrows : true,
+ slide_number : true,
+ slide_number_text : 'of',
+ container_class : 'orbit-container',
+ stack_on_small_class : 'orbit-stack-on-small',
+ next_class : 'orbit-next',
+ prev_class : 'orbit-prev',
+ timer_container_class : 'orbit-timer',
+ timer_paused_class : 'paused',
+ timer_progress_class : 'orbit-progress',
+ slides_container_class : 'orbit-slides-container',
+ preloader_class : 'preloader',
+ slide_selector : '*',
+ bullets_container_class : 'orbit-bullets',
+ bullets_active_class : 'active',
+ slide_number_class : 'orbit-slide-number',
+ caption_class : 'orbit-caption',
+ active_slide_class : 'active',
+ orbit_transition_class : 'orbit-transitioning',
+ bullets : true,
+ circular : true,
+ timer : true,
+ variable_height : false,
+ swipe : true,
+ before_slide_change : noop,
+ after_slide_change : noop
+ },
+
+ init : function (scope, method, options) {
+ var self = this;
+ this.bindings(method, options);
+ },
+
+ events : function (instance) {
+ var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
+ this.S(instance).data(this.name + '-instance', orbit_instance);
+ },
+
+ reflow : function () {
+ var self = this;
+
+ if (self.S(self.scope).is('[data-orbit]')) {
+ var $el = self.S(self.scope);
+ var instance = $el.data(self.name + '-instance');
+ instance.compute_dimensions();
+ } else {
+ self.S('[data-orbit]', self.scope).each(function (idx, el) {
+ var $el = self.S(el);
+ var opts = self.data_options($el);
+ var instance = $el.data(self.name + '-instance');
+ instance.compute_dimensions();
+ });
+ }
+ }
+ };
+
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.reveal = {
+ name : 'reveal',
+
+ version : '5.5.2',
+
+ locked : false,
+
+ settings : {
+ animation : 'fadeAndPop',
+ animation_speed : 250,
+ close_on_background_click : true,
+ close_on_esc : true,
+ dismiss_modal_class : 'close-reveal-modal',
+ multiple_opened : false,
+ bg_class : 'reveal-modal-bg',
+ root_element : 'body',
+ open : function(){},
+ opened : function(){},
+ close : function(){},
+ closed : function(){},
+ on_ajax_error: $.noop,
+ bg : $('.reveal-modal-bg'),
+ css : {
+ open : {
+ 'opacity' : 0,
+ 'visibility' : 'visible',
+ 'display' : 'block'
+ },
+ close : {
+ 'opacity' : 1,
+ 'visibility' : 'hidden',
+ 'display' : 'none'
+ }
+ }
+ },
+
+ init : function (scope, method, options) {
+ $.extend(true, this.settings, method, options);
+ this.bindings(method, options);
+ },
+
+ events : function (scope) {
+ var self = this,
+ S = self.S;
+
+ S(this.scope)
+ .off('.reveal')
+ .on('click.fndtn.reveal', '[' + this.add_namespace('data-reveal-id') + ']:not([disabled])', function (e) {
+ e.preventDefault();
+
+ if (!self.locked) {
+ var element = S(this),
+ ajax = element.data(self.data_attr('reveal-ajax')),
+ replaceContentSel = element.data(self.data_attr('reveal-replace-content'));
+
+ self.locked = true;
+
+ if (typeof ajax === 'undefined') {
+ self.open.call(self, element);
+ } else {
+ var url = ajax === true ? element.attr('href') : ajax;
+ self.open.call(self, element, {url : url}, { replaceContentSel : replaceContentSel });
+ }
+ }
+ });
+
+ S(document)
+ .on('click.fndtn.reveal', this.close_targets(), function (e) {
+ e.preventDefault();
+ if (!self.locked) {
+ var settings = S('[' + self.attr_name() + '].open').data(self.attr_name(true) + '-init') || self.settings,
+ bg_clicked = S(e.target)[0] === S('.' + settings.bg_class)[0];
+
+ if (bg_clicked) {
+ if (settings.close_on_background_click) {
+ e.stopPropagation();
+ } else {
+ return;
+ }
+ }
+
+ self.locked = true;
+ self.close.call(self, bg_clicked ? S('[' + self.attr_name() + '].open:not(.toback)') : S(this).closest('[' + self.attr_name() + ']'));
+ }
+ });
+
+ if (S('[' + self.attr_name() + ']', this.scope).length > 0) {
+ S(this.scope)
+ // .off('.reveal')
+ .on('open.fndtn.reveal', this.settings.open)
+ .on('opened.fndtn.reveal', this.settings.opened)
+ .on('opened.fndtn.reveal', this.open_video)
+ .on('close.fndtn.reveal', this.settings.close)
+ .on('closed.fndtn.reveal', this.settings.closed)
+ .on('closed.fndtn.reveal', this.close_video);
+ } else {
+ S(this.scope)
+ // .off('.reveal')
+ .on('open.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.open)
+ .on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.opened)
+ .on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.open_video)
+ .on('close.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.close)
+ .on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.closed)
+ .on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.close_video);
+ }
+
+ return true;
+ },
+
+ // PATCH #3: turning on key up capture only when a reveal window is open
+ key_up_on : function (scope) {
+ var self = this;
+
+ // PATCH #1: fixing multiple keyup event trigger from single key press
+ self.S('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal', function ( event ) {
+ var open_modal = self.S('[' + self.attr_name() + '].open'),
+ settings = open_modal.data(self.attr_name(true) + '-init') || self.settings ;
+ // PATCH #2: making sure that the close event can be called only while unlocked,
+ // so that multiple keyup.fndtn.reveal events don't prevent clean closing of the reveal window.
+ if ( settings && event.which === 27 && settings.close_on_esc && !self.locked) { // 27 is the keycode for the Escape key
+ self.close.call(self, open_modal);
+ }
+ });
+
+ return true;
+ },
+
+ // PATCH #3: turning on key up capture only when a reveal window is open
+ key_up_off : function (scope) {
+ this.S('body').off('keyup.fndtn.reveal');
+ return true;
+ },
+
+ open : function (target, ajax_settings) {
+ var self = this,
+ modal;
+
+ if (target) {
+ if (typeof target.selector !== 'undefined') {
+ // Find the named node; only use the first one found, since the rest of the code assumes there's only one node
+ modal = self.S('#' + target.data(self.data_attr('reveal-id'))).first();
+ } else {
+ modal = self.S(this.scope);
+
+ ajax_settings = target;
+ }
+ } else {
+ modal = self.S(this.scope);
+ }
+
+ var settings = modal.data(self.attr_name(true) + '-init');
+ settings = settings || this.settings;
+
+
+ if (modal.hasClass('open') && target.attr('data-reveal-id') == modal.attr('id')) {
+ return self.close(modal);
+ }
+
+ if (!modal.hasClass('open')) {
+ var open_modal = self.S('[' + self.attr_name() + '].open');
+
+ if (typeof modal.data('css-top') === 'undefined') {
+ modal.data('css-top', parseInt(modal.css('top'), 10))
+ .data('offset', this.cache_offset(modal));
+ }
+
+ modal.attr('tabindex','0').attr('aria-hidden','false');
+
+ this.key_up_on(modal); // PATCH #3: turning on key up capture only when a reveal window is open
+
+ // Prevent namespace event from triggering twice
+ modal.on('open.fndtn.reveal', function(e) {
+ if (e.namespace !== 'fndtn.reveal') return;
+ });
+
+ modal.on('open.fndtn.reveal').trigger('open.fndtn.reveal');
+
+ if (open_modal.length < 1) {
+ this.toggle_bg(modal, true);
+ }
+
+ if (typeof ajax_settings === 'string') {
+ ajax_settings = {
+ url : ajax_settings
+ };
+ }
+
+ if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
+ if (open_modal.length > 0) {
+ if (settings.multiple_opened) {
+ self.to_back(open_modal);
+ } else {
+ self.hide(open_modal, settings.css.close);
+ }
+ }
+
+ this.show(modal, settings.css.open);
+ } else {
+ var old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null;
+ $.extend(ajax_settings, {
+ success : function (data, textStatus, jqXHR) {
+ if ( $.isFunction(old_success) ) {
+ var result = old_success(data, textStatus, jqXHR);
+ if (typeof result == 'string') {
+ data = result;
+ }
+ }
+
+ if (typeof options !== 'undefined' && typeof options.replaceContentSel !== 'undefined') {
+ modal.find(options.replaceContentSel).html(data);
+ } else {
+ modal.html(data);
+ }
+
+ self.S(modal).foundation('section', 'reflow');
+ self.S(modal).children().foundation();
+
+ if (open_modal.length > 0) {
+ if (settings.multiple_opened) {
+ self.to_back(open_modal);
+ } else {
+ self.hide(open_modal, settings.css.close);
+ }
+ }
+ self.show(modal, settings.css.open);
+ }
+ });
+
+ // check for if user initalized with error callback
+ if (settings.on_ajax_error !== $.noop) {
+ $.extend(ajax_settings, {
+ error : settings.on_ajax_error
+ });
+ }
+
+ $.ajax(ajax_settings);
+ }
+ }
+ self.S(window).trigger('resize');
+ },
+
+ close : function (modal) {
+ var modal = modal && modal.length ? modal : this.S(this.scope),
+ open_modals = this.S('[' + this.attr_name() + '].open'),
+ settings = modal.data(this.attr_name(true) + '-init') || this.settings,
+ self = this;
+
+ if (open_modals.length > 0) {
+
+ modal.removeAttr('tabindex','0').attr('aria-hidden','true');
+
+ this.locked = true;
+ this.key_up_off(modal); // PATCH #3: turning on key up capture only when a reveal window is open
+
+ modal.trigger('close.fndtn.reveal');
+
+ if ((settings.multiple_opened && open_modals.length === 1) || !settings.multiple_opened || modal.length > 1) {
+ self.toggle_bg(modal, false);
+ self.to_front(modal);
+ }
+
+ if (settings.multiple_opened) {
+ self.hide(modal, settings.css.close, settings);
+ self.to_front($($.makeArray(open_modals).reverse()[1]));
+ } else {
+ self.hide(open_modals, settings.css.close, settings);
+ }
+ }
+ },
+
+ close_targets : function () {
+ var base = '.' + this.settings.dismiss_modal_class;
+
+ if (this.settings.close_on_background_click) {
+ return base + ', .' + this.settings.bg_class;
+ }
+
+ return base;
+ },
+
+ toggle_bg : function (modal, state) {
+ if (this.S('.' + this.settings.bg_class).length === 0) {
+ this.settings.bg = $('<div />', {'class': this.settings.bg_class})
+ .appendTo('body').hide();
+ }
+
+ var visible = this.settings.bg.filter(':visible').length > 0;
+ if ( state != visible ) {
+ if ( state == undefined ? visible : !state ) {
+ this.hide(this.settings.bg);
+ } else {
+ this.show(this.settings.bg);
+ }
+ }
+ },
+
+ show : function (el, css) {
+ // is modal
+ if (css) {
+ var settings = el.data(this.attr_name(true) + '-init') || this.settings,
+ root_element = settings.root_element,
+ context = this;
+
+ if (el.parent(root_element).length === 0) {
+ var placeholder = el.wrap('<div style="display: none;" />').parent();
+
+ el.on('closed.fndtn.reveal.wrapped', function () {
+ el.detach().appendTo(placeholder);
+ el.unwrap().unbind('closed.fndtn.reveal.wrapped');
+ });
+
+ el.detach().appendTo(root_element);
+ }
+
+ var animData = getAnimationData(settings.animation);
+ if (!animData.animate) {
+ this.locked = false;
+ }
+ if (animData.pop) {
+ css.top = $(window).scrollTop() - el.data('offset') + 'px';
+ var end_css = {
+ top: $(window).scrollTop() + el.data('css-top') + 'px',
+ opacity: 1
+ };
+
+ return setTimeout(function () {
+ return el
+ .css(css)
+ .animate(end_css, settings.animation_speed, 'linear', function () {
+ context.locked = false;
+ el.trigger('opened.fndtn.reveal');
+ })
+ .addClass('open');
+ }, settings.animation_speed / 2);
+ }
+
+ if (animData.fade) {
+ css.top = $(window).scrollTop() + el.data('css-top') + 'px';
+ var end_css = {opacity: 1};
+
+ return setTimeout(function () {
+ return el
+ .css(css)
+ .animate(end_css, settings.animation_speed, 'linear', function () {
+ context.locked = false;
+ el.trigger('opened.fndtn.reveal');
+ })
+ .addClass('open');
+ }, settings.animation_speed / 2);
+ }
+
+ return el.css(css).show().css({opacity : 1}).addClass('open').trigger('opened.fndtn.reveal');
+ }
+
+ var settings = this.settings;
+
+ // should we animate the background?
+ if (getAnimationData(settings.animation).fade) {
+ return el.fadeIn(settings.animation_speed / 2);
+ }
+
+ this.locked = false;
+
+ return el.show();
+ },
+
+ to_back : function(el) {
+ el.addClass('toback');
+ },
+
+ to_front : function(el) {
+ el.removeClass('toback');
+ },
+
+ hide : function (el, css) {
+ // is modal
+ if (css) {
+ var settings = el.data(this.attr_name(true) + '-init'),
+ context = this;
+ settings = settings || this.settings;
+
+ var animData = getAnimationData(settings.animation);
+ if (!animData.animate) {
+ this.locked = false;
+ }
+ if (animData.pop) {
+ var end_css = {
+ top: - $(window).scrollTop() - el.data('offset') + 'px',
+ opacity: 0
+ };
+
+ return setTimeout(function () {
+ return el
+ .animate(end_css, settings.animation_speed, 'linear', function () {
+ context.locked = false;
+ el.css(css).trigger('closed.fndtn.reveal');
+ })
+ .removeClass('open');
+ }, settings.animation_speed / 2);
+ }
+
+ if (animData.fade) {
+ var end_css = {opacity : 0};
+
+ return setTimeout(function () {
+ return el
+ .animate(end_css, settings.animation_speed, 'linear', function () {
+ context.locked = false;
+ el.css(css).trigger('closed.fndtn.reveal');
+ })
+ .removeClass('open');
+ }, settings.animation_speed / 2);
+ }
+
+ return el.hide().css(css).removeClass('open').trigger('closed.fndtn.reveal');
+ }
+
+ var settings = this.settings;
+
+ // should we animate the background?
+ if (getAnimationData(settings.animation).fade) {
+ return el.fadeOut(settings.animation_speed / 2);
+ }
+
+ return el.hide();
+ },
+
+ close_video : function (e) {
+ var video = $('.flex-video', e.target),
+ iframe = $('iframe', video);
+
+ if (iframe.length > 0) {
+ iframe.attr('data-src', iframe[0].src);
+ iframe.attr('src', iframe.attr('src'));
+ video.hide();
+ }
+ },
+
+ open_video : function (e) {
+ var video = $('.flex-video', e.target),
+ iframe = video.find('iframe');
+
+ if (iframe.length > 0) {
+ var data_src = iframe.attr('data-src');
+ if (typeof data_src === 'string') {
+ iframe[0].src = iframe.attr('data-src');
+ } else {
+ var src = iframe[0].src;
+ iframe[0].src = undefined;
+ iframe[0].src = src;
+ }
+ video.show();
+ }
+ },
+
+ data_attr : function (str) {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + str;
+ }
+
+ return str;
+ },
+
+ cache_offset : function (modal) {
+ var offset = modal.show().height() + parseInt(modal.css('top'), 10) + modal.scrollY;
+
+ modal.hide();
+
+ return offset;
+ },
+
+ off : function () {
+ $(this.scope).off('.fndtn.reveal');
+ },
+
+ reflow : function () {}
+ };
+
+ /*
+ * getAnimationData('popAndFade') // {animate: true, pop: true, fade: true}
+ * getAnimationData('fade') // {animate: true, pop: false, fade: true}
+ * getAnimationData('pop') // {animate: true, pop: true, fade: false}
+ * getAnimationData('foo') // {animate: false, pop: false, fade: false}
+ * getAnimationData(null) // {animate: false, pop: false, fade: false}
+ */
+ function getAnimationData(str) {
+ var fade = /fade/i.test(str);
+ var pop = /pop/i.test(str);
+ return {
+ animate : fade || pop,
+ pop : pop,
+ fade : fade
+ };
+ }
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.slider = {
+ name : 'slider',
+
+ version : '5.5.2',
+
+ settings : {
+ start : 0,
+ end : 100,
+ step : 1,
+ precision : null,
+ initial : null,
+ display_selector : '',
+ vertical : false,
+ trigger_input_change : false,
+ on_change : function () {}
+ },
+
+ cache : {},
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle');
+ this.bindings(method, options);
+ this.reflow();
+ },
+
+ events : function () {
+ var self = this;
+
+ $(this.scope)
+ .off('.slider')
+ .on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider',
+ '[' + self.attr_name() + ']:not(.disabled, [disabled]) .range-slider-handle', function (e) {
+ if (!self.cache.active) {
+ e.preventDefault();
+ self.set_active_slider($(e.target));
+ }
+ })
+ .on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider', function (e) {
+ if (!!self.cache.active) {
+ e.preventDefault();
+ if ($.data(self.cache.active[0], 'settings').vertical) {
+ var scroll_offset = 0;
+ if (!e.pageY) {
+ scroll_offset = window.scrollY;
+ }
+ self.calculate_position(self.cache.active, self.get_cursor_position(e, 'y') + scroll_offset);
+ } else {
+ self.calculate_position(self.cache.active, self.get_cursor_position(e, 'x'));
+ }
+ }
+ })
+ .on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider', function (e) {
+ self.remove_active_slider();
+ })
+ .on('change.fndtn.slider', function (e) {
+ self.settings.on_change();
+ });
+
+ self.S(window)
+ .on('resize.fndtn.slider', self.throttle(function (e) {
+ self.reflow();
+ }, 300));
+
+ // update slider value as users change input value
+ this.S('[' + this.attr_name() + ']').each(function () {
+ var slider = $(this),
+ handle = slider.children('.range-slider-handle')[0],
+ settings = self.initialize_settings(handle);
+
+ if (settings.display_selector != '') {
+ $(settings.display_selector).each(function(){
+ if (this.hasOwnProperty('value')) {
+ $(this).change(function(){
+ // is there a better way to do this?
+ slider.foundation("slider", "set_value", $(this).val());
+ });
+ }
+ });
+ }
+ });
+ },
+
+ get_cursor_position : function (e, xy) {
+ var pageXY = 'page' + xy.toUpperCase(),
+ clientXY = 'client' + xy.toUpperCase(),
+ position;
+
+ if (typeof e[pageXY] !== 'undefined') {
+ position = e[pageXY];
+ } else if (typeof e.originalEvent[clientXY] !== 'undefined') {
+ position = e.originalEvent[clientXY];
+ } else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0][clientXY] !== 'undefined') {
+ position = e.originalEvent.touches[0][clientXY];
+ } else if (e.currentPoint && typeof e.currentPoint[xy] !== 'undefined') {
+ position = e.currentPoint[xy];
+ }
+
+ return position;
+ },
+
+ set_active_slider : function ($handle) {
+ this.cache.active = $handle;
+ },
+
+ remove_active_slider : function () {
+ this.cache.active = null;
+ },
+
+ calculate_position : function ($handle, cursor_x) {
+ var self = this,
+ settings = $.data($handle[0], 'settings'),
+ handle_l = $.data($handle[0], 'handle_l'),
+ handle_o = $.data($handle[0], 'handle_o'),
+ bar_l = $.data($handle[0], 'bar_l'),
+ bar_o = $.data($handle[0], 'bar_o');
+
+ requestAnimationFrame(function () {
+ var pct;
+
+ if (Foundation.rtl && !settings.vertical) {
+ pct = self.limit_to(((bar_o + bar_l - cursor_x) / bar_l), 0, 1);
+ } else {
+ pct = self.limit_to(((cursor_x - bar_o) / bar_l), 0, 1);
+ }
+
+ pct = settings.vertical ? 1 - pct : pct;
+
+ var norm = self.normalized_value(pct, settings.start, settings.end, settings.step, settings.precision);
+
+ self.set_ui($handle, norm);
+ });
+ },
+
+ set_ui : function ($handle, value) {
+ var settings = $.data($handle[0], 'settings'),
+ handle_l = $.data($handle[0], 'handle_l'),
+ bar_l = $.data($handle[0], 'bar_l'),
+ norm_pct = this.normalized_percentage(value, settings.start, settings.end),
+ handle_offset = norm_pct * (bar_l - handle_l) - 1,
+ progress_bar_length = norm_pct * 100,
+ $handle_parent = $handle.parent(),
+ $hidden_inputs = $handle.parent().children('input[type=hidden]');
+
+ if (Foundation.rtl && !settings.vertical) {
+ handle_offset = -handle_offset;
+ }
+
+ handle_offset = settings.vertical ? -handle_offset + bar_l - handle_l + 1 : handle_offset;
+ this.set_translate($handle, handle_offset, settings.vertical);
+
+ if (settings.vertical) {
+ $handle.siblings('.range-slider-active-segment').css('height', progress_bar_length + '%');
+ } else {
+ $handle.siblings('.range-slider-active-segment').css('width', progress_bar_length + '%');
+ }
+
+ $handle_parent.attr(this.attr_name(), value).trigger('change.fndtn.slider');
+
+ $hidden_inputs.val(value);
+ if (settings.trigger_input_change) {
+ $hidden_inputs.trigger('change.fndtn.slider');
+ }
+
+ if (!$handle[0].hasAttribute('aria-valuemin')) {
+ $handle.attr({
+ 'aria-valuemin' : settings.start,
+ 'aria-valuemax' : settings.end
+ });
+ }
+ $handle.attr('aria-valuenow', value);
+
+ if (settings.display_selector != '') {
+ $(settings.display_selector).each(function () {
+ if (this.hasAttribute('value')) {
+ $(this).val(value);
+ } else {
+ $(this).text(value);
+ }
+ });
+ }
+
+ },
+
+ normalized_percentage : function (val, start, end) {
+ return Math.min(1, (val - start) / (end - start));
+ },
+
+ normalized_value : function (val, start, end, step, precision) {
+ var range = end - start,
+ point = val * range,
+ mod = (point - (point % step)) / step,
+ rem = point % step,
+ round = ( rem >= step * 0.5 ? step : 0);
+ return ((mod * step + round) + start).toFixed(precision);
+ },
+
+ set_translate : function (ele, offset, vertical) {
+ if (vertical) {
+ $(ele)
+ .css('-webkit-transform', 'translateY(' + offset + 'px)')
+ .css('-moz-transform', 'translateY(' + offset + 'px)')
+ .css('-ms-transform', 'translateY(' + offset + 'px)')
+ .css('-o-transform', 'translateY(' + offset + 'px)')
+ .css('transform', 'translateY(' + offset + 'px)');
+ } else {
+ $(ele)
+ .css('-webkit-transform', 'translateX(' + offset + 'px)')
+ .css('-moz-transform', 'translateX(' + offset + 'px)')
+ .css('-ms-transform', 'translateX(' + offset + 'px)')
+ .css('-o-transform', 'translateX(' + offset + 'px)')
+ .css('transform', 'translateX(' + offset + 'px)');
+ }
+ },
+
+ limit_to : function (val, min, max) {
+ return Math.min(Math.max(val, min), max);
+ },
+
+ initialize_settings : function (handle) {
+ var settings = $.extend({}, this.settings, this.data_options($(handle).parent())),
+ decimal_places_match_result;
+
+ if (settings.precision === null) {
+ decimal_places_match_result = ('' + settings.step).match(/\.([\d]*)/);
+ settings.precision = decimal_places_match_result && decimal_places_match_result[1] ? decimal_places_match_result[1].length : 0;
+ }
+
+ if (settings.vertical) {
+ $.data(handle, 'bar_o', $(handle).parent().offset().top);
+ $.data(handle, 'bar_l', $(handle).parent().outerHeight());
+ $.data(handle, 'handle_o', $(handle).offset().top);
+ $.data(handle, 'handle_l', $(handle).outerHeight());
+ } else {
+ $.data(handle, 'bar_o', $(handle).parent().offset().left);
+ $.data(handle, 'bar_l', $(handle).parent().outerWidth());
+ $.data(handle, 'handle_o', $(handle).offset().left);
+ $.data(handle, 'handle_l', $(handle).outerWidth());
+ }
+
+ $.data(handle, 'bar', $(handle).parent());
+ return $.data(handle, 'settings', settings);
+ },
+
+ set_initial_position : function ($ele) {
+ var settings = $.data($ele.children('.range-slider-handle')[0], 'settings'),
+ initial = ((typeof settings.initial == 'number' && !isNaN(settings.initial)) ? settings.initial : Math.floor((settings.end - settings.start) * 0.5 / settings.step) * settings.step + settings.start),
+ $handle = $ele.children('.range-slider-handle');
+ this.set_ui($handle, initial);
+ },
+
+ set_value : function (value) {
+ var self = this;
+ $('[' + self.attr_name() + ']', this.scope).each(function () {
+ $(this).attr(self.attr_name(), value);
+ });
+ if (!!$(this.scope).attr(self.attr_name())) {
+ $(this.scope).attr(self.attr_name(), value);
+ }
+ self.reflow();
+ },
+
+ reflow : function () {
+ var self = this;
+ self.S('[' + this.attr_name() + ']').each(function () {
+ var handle = $(this).children('.range-slider-handle')[0],
+ val = $(this).attr(self.attr_name());
+ self.initialize_settings(handle);
+
+ if (val) {
+ self.set_ui($(handle), parseFloat(val));
+ } else {
+ self.set_initial_position($(this));
+ }
+ });
+ }
+ };
+
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.tab = {
+ name : 'tab',
+
+ version : '5.5.2',
+
+ settings : {
+ active_class : 'active',
+ callback : function () {},
+ deep_linking : false,
+ scroll_to_content : true,
+ is_hover : false
+ },
+
+ default_tab_hashes : [],
+
+ init : function (scope, method, options) {
+ var self = this,
+ S = this.S;
+
+ // Store the default active tabs which will be referenced when the
+ // location hash is absent, as in the case of navigating the tabs and
+ // returning to the first viewing via the browser Back button.
+ S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
+ self.default_tab_hashes.push(this.hash);
+ });
+
+ // store the initial href, which is used to allow correct behaviour of the
+ // browser back button when deep linking is turned on.
+ self.entry_location = window.location.href;
+
+ this.bindings(method, options);
+ this.handle_location_hash_change();
+ },
+
+ events : function () {
+ var self = this,
+ S = this.S;
+
+ var usual_tab_behavior = function (e, target) {
+ var settings = S(target).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
+ if (!settings.is_hover || Modernizr.touch) {
+ e.preventDefault();
+ e.stopPropagation();
+ self.toggle_active_tab(S(target).parent());
+ }
+ };
+
+ S(this.scope)
+ .off('.tab')
+ // Key event: focus/tab key
+ .on('keydown.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
+ var el = this;
+ var keyCode = e.keyCode || e.which;
+ // if user pressed tab key
+ if (keyCode == 9) {
+ e.preventDefault();
+ // TODO: Change usual_tab_behavior into accessibility function?
+ usual_tab_behavior(e, el);
+ }
+ })
+ // Click event: tab title
+ .on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
+ var el = this;
+ usual_tab_behavior(e, el);
+ })
+ // Hover event: tab title
+ .on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
+ var settings = S(this).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
+ if (settings.is_hover) {
+ self.toggle_active_tab(S(this).parent());
+ }
+ });
+
+ // Location hash change event
+ S(window).on('hashchange.fndtn.tab', function (e) {
+ e.preventDefault();
+ self.handle_location_hash_change();
+ });
+ },
+
+ handle_location_hash_change : function () {
+
+ var self = this,
+ S = this.S;
+
+ S('[' + this.attr_name() + ']', this.scope).each(function () {
+ var settings = S(this).data(self.attr_name(true) + '-init');
+ if (settings.deep_linking) {
+ // Match the location hash to a label
+ var hash;
+ if (settings.scroll_to_content) {
+ hash = self.scope.location.hash;
+ } else {
+ // prefix the hash to prevent anchor scrolling
+ hash = self.scope.location.hash.replace('fndtn-', '');
+ }
+ if (hash != '') {
+ // Check whether the location hash references a tab content div or
+ // another element on the page (inside or outside the tab content div)
+ var hash_element = S(hash);
+ if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
+ // Tab content div
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + hash + ']').parent());
+ } else {
+ // Not the tab content div. If inside the tab content, find the
+ // containing tab and toggle it as active.
+ var hash_tab_container_id = hash_element.closest('.content').attr('id');
+ if (hash_tab_container_id != undefined) {
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=#' + hash_tab_container_id + ']').parent(), hash);
+ }
+ }
+ } else {
+ // Reference the default tab hashes which were initialized in the init function
+ for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + self.default_tab_hashes[ind] + ']').parent());
+ }
+ }
+ }
+ });
+ },
+
+ toggle_active_tab : function (tab, location_hash) {
+ var self = this,
+ S = self.S,
+ tabs = tab.closest('[' + this.attr_name() + ']'),
+ tab_link = tab.find('a'),
+ anchor = tab.children('a').first(),
+ target_hash = '#' + anchor.attr('href').split('#')[1],
+ target = S(target_hash),
+ siblings = tab.siblings(),
+ settings = tabs.data(this.attr_name(true) + '-init'),
+ interpret_keyup_action = function (e) {
+ // Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
+
+ // define current, previous and next (possible) tabs
+
+ var $original = $(this);
+ var $prev = $(this).parents('li').prev().children('[role="tab"]');
+ var $next = $(this).parents('li').next().children('[role="tab"]');
+ var $target;
+
+ // find the direction (prev or next)
+
+ switch (e.keyCode) {
+ case 37:
+ $target = $prev;
+ break;
+ case 39:
+ $target = $next;
+ break;
+ default:
+ $target = false
+ break;
+ }
+
+ if ($target.length) {
+ $original.attr({
+ 'tabindex' : '-1',
+ 'aria-selected' : null
+ });
+ $target.attr({
+ 'tabindex' : '0',
+ 'aria-selected' : true
+ }).focus();
+ }
+
+ // Hide panels
+
+ $('[role="tabpanel"]')
+ .attr('aria-hidden', 'true');
+
+ // Show panel which corresponds to target
+
+ $('#' + $(document.activeElement).attr('href').substring(1))
+ .attr('aria-hidden', null);
+
+ },
+ go_to_hash = function(hash) {
+ // This function allows correct behaviour of the browser's back button when deep linking is enabled. Without it
+ // the user would get continually redirected to the default hash.
+ var is_entry_location = window.location.href === self.entry_location,
+ default_hash = settings.scroll_to_content ? self.default_tab_hashes[0] : is_entry_location ? window.location.hash :'fndtn-' + self.default_tab_hashes[0].replace('#', '')
+
+ if (!(is_entry_location && hash === default_hash)) {
+ window.location.hash = hash;
+ }
+ };
+
+ // allow usage of data-tab-content attribute instead of href
+ if (anchor.data('tab-content')) {
+ target_hash = '#' + anchor.data('tab-content').split('#')[1];
+ target = S(target_hash);
+ }
+
+ if (settings.deep_linking) {
+
+ if (settings.scroll_to_content) {
+
+ // retain current hash to scroll to content
+ go_to_hash(location_hash || target_hash);
+
+ if (location_hash == undefined || location_hash == target_hash) {
+ tab.parent()[0].scrollIntoView();
+ } else {
+ S(target_hash)[0].scrollIntoView();
+ }
+ } else {
+ // prefix the hashes so that the browser doesn't scroll down
+ if (location_hash != undefined) {
+ go_to_hash('fndtn-' + location_hash.replace('#', ''));
+ } else {
+ go_to_hash('fndtn-' + target_hash.replace('#', ''));
+ }
+ }
+ }
+
+ // WARNING: The activation and deactivation of the tab content must
+ // occur after the deep linking in order to properly refresh the browser
+ // window (notably in Chrome).
+ // Clean up multiple attr instances to done once
+ tab.addClass(settings.active_class).triggerHandler('opened');
+ tab_link.attr({'aria-selected' : 'true', tabindex : 0});
+ siblings.removeClass(settings.active_class)
+ siblings.find('a').attr({'aria-selected' : 'false', tabindex : -1});
+ target.siblings().removeClass(settings.active_class).attr({'aria-hidden' : 'true', tabindex : -1});
+ target.addClass(settings.active_class).attr('aria-hidden', 'false').removeAttr('tabindex');
+ settings.callback(tab);
+ target.triggerHandler('toggled', [target]);
+ tabs.triggerHandler('toggled', [tab]);
+
+ tab_link.off('keydown').on('keydown', interpret_keyup_action );
+ },
+
+ data_attr : function (str) {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + str;
+ }
+
+ return str;
+ },
+
+ off : function () {},
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.tooltip = {
+ name : 'tooltip',
+
+ version : '5.5.2',
+
+ settings : {
+ additional_inheritable_classes : [],
+ tooltip_class : '.tooltip',
+ append_to : 'body',
+ touch_close_text : 'Tap To Close',
+ disable_for_touch : false,
+ hover_delay : 200,
+ show_on : 'all',
+ tip_template : function (selector, content) {
+ return '<span data-selector="' + selector + '" id="' + selector + '" class="'
+ + Foundation.libs.tooltip.settings.tooltip_class.substring(1)
+ + '" role="tooltip">' + content + '<span class="nub"></span></span>';
+ }
+ },
+
+ cache : {},
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'random_str');
+ this.bindings(method, options);
+ },
+
+ should_show : function (target, tip) {
+ var settings = $.extend({}, this.settings, this.data_options(target));
+
+ if (settings.show_on === 'all') {
+ return true;
+ } else if (this.small() && settings.show_on === 'small') {
+ return true;
+ } else if (this.medium() && settings.show_on === 'medium') {
+ return true;
+ } else if (this.large() && settings.show_on === 'large') {
+ return true;
+ }
+ return false;
+ },
+
+ medium : function () {
+ return matchMedia(Foundation.media_queries['medium']).matches;
+ },
+
+ large : function () {
+ return matchMedia(Foundation.media_queries['large']).matches;
+ },
+
+ events : function (instance) {
+ var self = this,
+ S = self.S;
+
+ self.create(this.S(instance));
+
+ function _startShow(elt, $this, immediate) {
+ if (elt.timer) {
+ return;
+ }
+
+ if (immediate) {
+ elt.timer = null;
+ self.showTip($this);
+ } else {
+ elt.timer = setTimeout(function () {
+ elt.timer = null;
+ self.showTip($this);
+ }.bind(elt), self.settings.hover_delay);
+ }
+ }
+
+ function _startHide(elt, $this) {
+ if (elt.timer) {
+ clearTimeout(elt.timer);
+ elt.timer = null;
+ }
+
+ self.hide($this);
+ }
+
+ $(this.scope)
+ .off('.tooltip')
+ .on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip',
+ '[' + this.attr_name() + ']', function (e) {
+ var $this = S(this),
+ settings = $.extend({}, self.settings, self.data_options($this)),
+ is_touch = false;
+
+ if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type) && S(e.target).is('a')) {
+ return false;
+ }
+
+ if (/mouse/i.test(e.type) && self.ie_touch(e)) {
+ return false;
+ }
+
+ if ($this.hasClass('open')) {
+ if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
+ e.preventDefault();
+ }
+ self.hide($this);
+ } else {
+ if (settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
+ return;
+ } else if (!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
+ e.preventDefault();
+ S(settings.tooltip_class + '.open').hide();
+ is_touch = true;
+ // close other open tooltips on touch
+ if ($('.open[' + self.attr_name() + ']').length > 0) {
+ var prevOpen = S($('.open[' + self.attr_name() + ']')[0]);
+ self.hide(prevOpen);
+ }
+ }
+
+ if (/enter|over/i.test(e.type)) {
+ _startShow(this, $this);
+
+ } else if (e.type === 'mouseout' || e.type === 'mouseleave') {
+ _startHide(this, $this);
+ } else {
+ _startShow(this, $this, true);
+ }
+ }
+ })
+ .on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', '[' + this.attr_name() + '].open', function (e) {
+ if (/mouse/i.test(e.type) && self.ie_touch(e)) {
+ return false;
+ }
+
+ if ($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
+ return;
+ } else if ($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
+ self.convert_to_touch($(this));
+ } else {
+ _startHide(this, $(this));
+ }
+ })
+ .on('DOMNodeRemoved DOMAttrModified', '[' + this.attr_name() + ']:not(a)', function (e) {
+ _startHide(this, S(this));
+ });
+ },
+
+ ie_touch : function (e) {
+ // How do I distinguish between IE11 and Windows Phone 8?????
+ return false;
+ },
+
+ showTip : function ($target) {
+ var $tip = this.getTip($target);
+ if (this.should_show($target, $tip)) {
+ return this.show($target);
+ }
+ return;
+ },
+
+ getTip : function ($target) {
+ var selector = this.selector($target),
+ settings = $.extend({}, this.settings, this.data_options($target)),
+ tip = null;
+
+ if (selector) {
+ tip = this.S('span[data-selector="' + selector + '"]' + settings.tooltip_class);
+ }
+
+ return (typeof tip === 'object') ? tip : false;
+ },
+
+ selector : function ($target) {
+ var dataSelector = $target.attr(this.attr_name()) || $target.attr('data-selector');
+
+ if (typeof dataSelector != 'string') {
+ dataSelector = this.random_str(6);
+ $target
+ .attr('data-selector', dataSelector)
+ .attr('aria-describedby', dataSelector);
+ }
+
+ return dataSelector;
+ },
+
+ create : function ($target) {
+ var self = this,
+ settings = $.extend({}, this.settings, this.data_options($target)),
+ tip_template = this.settings.tip_template;
+
+ if (typeof settings.tip_template === 'string' && window.hasOwnProperty(settings.tip_template)) {
+ tip_template = window[settings.tip_template];
+ }
+
+ var $tip = $(tip_template(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
+ classes = this.inheritable_classes($target);
+
+ $tip.addClass(classes).appendTo(settings.append_to);
+
+ if (Modernizr.touch) {
+ $tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
+ $tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function (e) {
+ self.hide($target);
+ });
+ }
+
+ $target.removeAttr('title').attr('title', '');
+ },
+
+ reposition : function (target, tip, classes) {
+ var width, nub, nubHeight, nubWidth, column, objPos;
+
+ tip.css('visibility', 'hidden').show();
+
+ width = target.data('width');
+ nub = tip.children('.nub');
+ nubHeight = nub.outerHeight();
+ nubWidth = nub.outerHeight();
+
+ if (this.small()) {
+ tip.css({'width' : '100%'});
+ } else {
+ tip.css({'width' : (width) ? width : 'auto'});
+ }
+
+ objPos = function (obj, top, right, bottom, left, width) {
+ return obj.css({
+ 'top' : (top) ? top : 'auto',
+ 'bottom' : (bottom) ? bottom : 'auto',
+ 'left' : (left) ? left : 'auto',
+ 'right' : (right) ? right : 'auto'
+ }).end();
+ };
+
+ objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', target.offset().left);
+
+ if (this.small()) {
+ objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', 12.5, $(this.scope).width());
+ tip.addClass('tip-override');
+ objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
+ } else {
+ var left = target.offset().left;
+ if (Foundation.rtl) {
+ nub.addClass('rtl');
+ left = target.offset().left + target.outerWidth() - tip.outerWidth();
+ }
+
+ objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', left);
+ // reset nub from small styles, if they've been applied
+ if (nub.attr('style')) {
+ nub.removeAttr('style');
+ }
+
+ tip.removeClass('tip-override');
+ if (classes && classes.indexOf('tip-top') > -1) {
+ if (Foundation.rtl) {
+ nub.addClass('rtl');
+ }
+ objPos(tip, (target.offset().top - tip.outerHeight()), 'auto', 'auto', left)
+ .removeClass('tip-override');
+ } else if (classes && classes.indexOf('tip-left') > -1) {
+ objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left - tip.outerWidth() - nubHeight))
+ .removeClass('tip-override');
+ nub.removeClass('rtl');
+ } else if (classes && classes.indexOf('tip-right') > -1) {
+ objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left + target.outerWidth() + nubHeight))
+ .removeClass('tip-override');
+ nub.removeClass('rtl');
+ }
+ }
+
+ tip.css('visibility', 'visible').hide();
+ },
+
+ small : function () {
+ return matchMedia(Foundation.media_queries.small).matches &&
+ !matchMedia(Foundation.media_queries.medium).matches;
+ },
+
+ inheritable_classes : function ($target) {
+ var settings = $.extend({}, this.settings, this.data_options($target)),
+ inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'radius', 'round'].concat(settings.additional_inheritable_classes),
+ classes = $target.attr('class'),
+ filtered = classes ? $.map(classes.split(' '), function (el, i) {
+ if ($.inArray(el, inheritables) !== -1) {
+ return el;
+ }
+ }).join(' ') : '';
+
+ return $.trim(filtered);
+ },
+
+ convert_to_touch : function ($target) {
+ var self = this,
+ $tip = self.getTip($target),
+ settings = $.extend({}, self.settings, self.data_options($target));
+
+ if ($tip.find('.tap-to-close').length === 0) {
+ $tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
+ $tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function (e) {
+ self.hide($target);
+ });
+ }
+
+ $target.data('tooltip-open-event-type', 'touch');
+ },
+
+ show : function ($target) {
+ var $tip = this.getTip($target);
+
+ if ($target.data('tooltip-open-event-type') == 'touch') {
+ this.convert_to_touch($target);
+ }
+
+ this.reposition($target, $tip, $target.attr('class'));
+ $target.addClass('open');
+ $tip.fadeIn(150);
+ },
+
+ hide : function ($target) {
+ var $tip = this.getTip($target);
+ $tip.fadeOut(150, function () {
+ $tip.find('.tap-to-close').remove();
+ $tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');
+ $target.removeClass('open');
+ });
+ },
+
+ off : function () {
+ var self = this;
+ this.S(this.scope).off('.fndtn.tooltip');
+ this.S(this.settings.tooltip_class).each(function (i) {
+ $('[' + self.attr_name() + ']').eq(i).attr('title', $(this).text());
+ }).remove();
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
+
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.topbar = {
+ name : 'topbar',
+
+ version : '5.5.2',
+
+ settings : {
+ index : 0,
+ start_offset : 0,
+ sticky_class : 'sticky',
+ custom_back_text : true,
+ back_text : 'Back',
+ mobile_show_parent_link : true,
+ is_hover : true,
+ scrolltop : true, // jump to top when sticky nav menu toggle is clicked
+ sticky_on : 'all',
+ dropdown_autoclose: true
+ },
+
+ init : function (section, method, options) {
+ Foundation.inherit(this, 'add_custom_rule register_media throttle');
+ var self = this;
+
+ self.register_media('topbar', 'foundation-mq-topbar');
+
+ this.bindings(method, options);
+
+ self.S('[' + this.attr_name() + ']', this.scope).each(function () {
+ var topbar = $(this),
+ settings = topbar.data(self.attr_name(true) + '-init'),
+ section = self.S('section, .top-bar-section', this);
+ topbar.data('index', 0);
+ var topbarContainer = topbar.parent();
+ if (topbarContainer.hasClass('fixed') || self.is_sticky(topbar, topbarContainer, settings) ) {
+ self.settings.sticky_class = settings.sticky_class;
+ self.settings.sticky_topbar = topbar;
+ topbar.data('height', topbarContainer.outerHeight());
+ topbar.data('stickyoffset', topbarContainer.offset().top);
+ } else {
+ topbar.data('height', topbar.outerHeight());
+ }
+
+ if (!settings.assembled) {
+ self.assemble(topbar);
+ }
+
+ if (settings.is_hover) {
+ self.S('.has-dropdown', topbar).addClass('not-click');
+ } else {
+ self.S('.has-dropdown', topbar).removeClass('not-click');
+ }
+
+ // Pad body when sticky (scrolled) or fixed.
+ self.add_custom_rule('.f-topbar-fixed { padding-top: ' + topbar.data('height') + 'px }');
+
+ if (topbarContainer.hasClass('fixed')) {
+ self.S('body').addClass('f-topbar-fixed');
+ }
+ });
+
+ },
+
+ is_sticky : function (topbar, topbarContainer, settings) {
+ var sticky = topbarContainer.hasClass(settings.sticky_class);
+ var smallMatch = matchMedia(Foundation.media_queries.small).matches;
+ var medMatch = matchMedia(Foundation.media_queries.medium).matches;
+ var lrgMatch = matchMedia(Foundation.media_queries.large).matches;
+
+ if (sticky && settings.sticky_on === 'all') {
+ return true;
+ }
+ if (sticky && this.small() && settings.sticky_on.indexOf('small') !== -1) {
+ if (smallMatch && !medMatch && !lrgMatch) { return true; }
+ }
+ if (sticky && this.medium() && settings.sticky_on.indexOf('medium') !== -1) {
+ if (smallMatch && medMatch && !lrgMatch) { return true; }
+ }
+ if (sticky && this.large() && settings.sticky_on.indexOf('large') !== -1) {
+ if (smallMatch && medMatch && lrgMatch) { return true; }
+ }
+
+ return false;
+ },
+
+ toggle : function (toggleEl) {
+ var self = this,
+ topbar;
+
+ if (toggleEl) {
+ topbar = self.S(toggleEl).closest('[' + this.attr_name() + ']');
+ } else {
+ topbar = self.S('[' + this.attr_name() + ']');
+ }
+
+ var settings = topbar.data(this.attr_name(true) + '-init');
+
+ var section = self.S('section, .top-bar-section', topbar);
+
+ if (self.breakpoint()) {
+ if (!self.rtl) {
+ section.css({left : '0%'});
+ $('>.name', section).css({left : '100%'});
+ } else {
+ section.css({right : '0%'});
+ $('>.name', section).css({right : '100%'});
+ }
+
+ self.S('li.moved', section).removeClass('moved');
+ topbar.data('index', 0);
+
+ topbar
+ .toggleClass('expanded')
+ .css('height', '');
+ }
+
+ if (settings.scrolltop) {
+ if (!topbar.hasClass('expanded')) {
+ if (topbar.hasClass('fixed')) {
+ topbar.parent().addClass('fixed');
+ topbar.removeClass('fixed');
+ self.S('body').addClass('f-topbar-fixed');
+ }
+ } else if (topbar.parent().hasClass('fixed')) {
+ if (settings.scrolltop) {
+ topbar.parent().removeClass('fixed');
+ topbar.addClass('fixed');
+ self.S('body').removeClass('f-topbar-fixed');
+
+ window.scrollTo(0, 0);
+ } else {
+ topbar.parent().removeClass('expanded');
+ }
+ }
+ } else {
+ if (self.is_sticky(topbar, topbar.parent(), settings)) {
+ topbar.parent().addClass('fixed');
+ }
+
+ if (topbar.parent().hasClass('fixed')) {
+ if (!topbar.hasClass('expanded')) {
+ topbar.removeClass('fixed');
+ topbar.parent().removeClass('expanded');
+ self.update_sticky_positioning();
+ } else {
+ topbar.addClass('fixed');
+ topbar.parent().addClass('expanded');
+ self.S('body').addClass('f-topbar-fixed');
+ }
+ }
+ }
+ },
+
+ timer : null,
+
+ events : function (bar) {
+ var self = this,
+ S = this.S;
+
+ S(this.scope)
+ .off('.topbar')
+ .on('click.fndtn.topbar', '[' + this.attr_name() + '] .toggle-topbar', function (e) {
+ e.preventDefault();
+ self.toggle(this);
+ })
+ .on('click.fndtn.topbar contextmenu.fndtn.topbar', '.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]', function (e) {
+ var li = $(this).closest('li'),
+ topbar = li.closest('[' + self.attr_name() + ']'),
+ settings = topbar.data(self.attr_name(true) + '-init');
+
+ if (settings.dropdown_autoclose && settings.is_hover) {
+ var hoverLi = $(this).closest('.hover');
+ hoverLi.removeClass('hover');
+ }
+ if (self.breakpoint() && !li.hasClass('back') && !li.hasClass('has-dropdown')) {
+ self.toggle();
+ }
+
+ })
+ .on('click.fndtn.topbar', '[' + this.attr_name() + '] li.has-dropdown', function (e) {
+ var li = S(this),
+ target = S(e.target),
+ topbar = li.closest('[' + self.attr_name() + ']'),
+ settings = topbar.data(self.attr_name(true) + '-init');
+
+ if (target.data('revealId')) {
+ self.toggle();
+ return;
+ }
+
+ if (self.breakpoint()) {
+ return;
+ }
+
+ if (settings.is_hover && !Modernizr.touch) {
+ return;
+ }
+
+ e.stopImmediatePropagation();
+
+ if (li.hasClass('hover')) {
+ li
+ .removeClass('hover')
+ .find('li')
+ .removeClass('hover');
+
+ li.parents('li.hover')
+ .removeClass('hover');
+ } else {
+ li.addClass('hover');
+
+ $(li).siblings().removeClass('hover');
+
+ if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) {
+ e.preventDefault();
+ }
+ }
+ })
+ .on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown>a', function (e) {
+ if (self.breakpoint()) {
+
+ e.preventDefault();
+
+ var $this = S(this),
+ topbar = $this.closest('[' + self.attr_name() + ']'),
+ section = topbar.find('section, .top-bar-section'),
+ dropdownHeight = $this.next('.dropdown').outerHeight(),
+ $selectedLi = $this.closest('li');
+
+ topbar.data('index', topbar.data('index') + 1);
+ $selectedLi.addClass('moved');
+
+ if (!self.rtl) {
+ section.css({left : -(100 * topbar.data('index')) + '%'});
+ section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
+ } else {
+ section.css({right : -(100 * topbar.data('index')) + '%'});
+ section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
+ }
+
+ topbar.css('height', $this.siblings('ul').outerHeight(true) + topbar.data('height'));
+ }
+ });
+
+ S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function () {
+ self.resize.call(self);
+ }, 50)).trigger('resize.fndtn.topbar').load(function () {
+ // Ensure that the offset is calculated after all of the pages resources have loaded
+ S(this).trigger('resize.fndtn.topbar');
+ });
+
+ S('body').off('.topbar').on('click.fndtn.topbar', function (e) {
+ var parent = S(e.target).closest('li').closest('li.hover');
+
+ if (parent.length > 0) {
+ return;
+ }
+
+ S('[' + self.attr_name() + '] li.hover').removeClass('hover');
+ });
+
+ // Go up a level on Click
+ S(this.scope).on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown .back', function (e) {
+ e.preventDefault();
+
+ var $this = S(this),
+ topbar = $this.closest('[' + self.attr_name() + ']'),
+ section = topbar.find('section, .top-bar-section'),
+ settings = topbar.data(self.attr_name(true) + '-init'),
+ $movedLi = $this.closest('li.moved'),
+ $previousLevelUl = $movedLi.parent();
+
+ topbar.data('index', topbar.data('index') - 1);
+
+ if (!self.rtl) {
+ section.css({left : -(100 * topbar.data('index')) + '%'});
+ section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
+ } else {
+ section.css({right : -(100 * topbar.data('index')) + '%'});
+ section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
+ }
+
+ if (topbar.data('index') === 0) {
+ topbar.css('height', '');
+ } else {
+ topbar.css('height', $previousLevelUl.outerHeight(true) + topbar.data('height'));
+ }
+
+ setTimeout(function () {
+ $movedLi.removeClass('moved');
+ }, 300);
+ });
+
+ // Show dropdown menus when their items are focused
+ S(this.scope).find('.dropdown a')
+ .focus(function () {
+ $(this).parents('.has-dropdown').addClass('hover');
+ })
+ .blur(function () {
+ $(this).parents('.has-dropdown').removeClass('hover');
+ });
+ },
+
+ resize : function () {
+ var self = this;
+ self.S('[' + this.attr_name() + ']').each(function () {
+ var topbar = self.S(this),
+ settings = topbar.data(self.attr_name(true) + '-init');
+
+ var stickyContainer = topbar.parent('.' + self.settings.sticky_class);
+ var stickyOffset;
+
+ if (!self.breakpoint()) {
+ var doToggle = topbar.hasClass('expanded');
+ topbar
+ .css('height', '')
+ .removeClass('expanded')
+ .find('li')
+ .removeClass('hover');
+
+ if (doToggle) {
+ self.toggle(topbar);
+ }
+ }
+
+ if (self.is_sticky(topbar, stickyContainer, settings)) {
+ if (stickyContainer.hasClass('fixed')) {
+ // Remove the fixed to allow for correct calculation of the offset.
+ stickyContainer.removeClass('fixed');
+
+ stickyOffset = stickyContainer.offset().top;
+ if (self.S(document.body).hasClass('f-topbar-fixed')) {
+ stickyOffset -= topbar.data('height');
+ }
+
+ topbar.data('stickyoffset', stickyOffset);
+ stickyContainer.addClass('fixed');
+ } else {
+ stickyOffset = stickyContainer.offset().top;
+ topbar.data('stickyoffset', stickyOffset);
+ }
+ }
+
+ });
+ },
+
+ breakpoint : function () {
+ return !matchMedia(Foundation.media_queries['topbar']).matches;
+ },
+
+ small : function () {
+ return matchMedia(Foundation.media_queries['small']).matches;
+ },
+
+ medium : function () {
+ return matchMedia(Foundation.media_queries['medium']).matches;
+ },
+
+ large : function () {
+ return matchMedia(Foundation.media_queries['large']).matches;
+ },
+
+ assemble : function (topbar) {
+ var self = this,
+ settings = topbar.data(this.attr_name(true) + '-init'),
+ section = self.S('section, .top-bar-section', topbar);
+
+ // Pull element out of the DOM for manipulation
+ section.detach();
+
+ self.S('.has-dropdown>a', section).each(function () {
+ var $link = self.S(this),
+ $dropdown = $link.siblings('.dropdown'),
+ url = $link.attr('href'),
+ $titleLi;
+
+ if (!$dropdown.find('.title.back').length) {
+
+ if (settings.mobile_show_parent_link == true && url) {
+ $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="' + url + '">' + $link.html() +'</a></li>');
+ } else {
+ $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>');
+ }
+
+ // Copy link to subnav
+ if (settings.custom_back_text == true) {
+ $('h5>a', $titleLi).html(settings.back_text);
+ } else {
+ $('h5>a', $titleLi).html('« ' + $link.html());
+ }
+ $dropdown.prepend($titleLi);
+ }
+ });
+
+ // Put element back in the DOM
+ section.appendTo(topbar);
+
+ // check for sticky
+ this.sticky();
+
+ this.assembled(topbar);
+ },
+
+ assembled : function (topbar) {
+ topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled : true}));
+ },
+
+ height : function (ul) {
+ var total = 0,
+ self = this;
+
+ $('> li', ul).each(function () {
+ total += self.S(this).outerHeight(true);
+ });
+
+ return total;
+ },
+
+ sticky : function () {
+ var self = this;
+
+ this.S(window).on('scroll', function () {
+ self.update_sticky_positioning();
+ });
+ },
+
+ update_sticky_positioning : function () {
+ var klass = '.' + this.settings.sticky_class,
+ $window = this.S(window),
+ self = this;
+
+ if (self.settings.sticky_topbar && self.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(), this.settings)) {
+ var distance = this.settings.sticky_topbar.data('stickyoffset') + this.settings.start_offset;
+ if (!self.S(klass).hasClass('expanded')) {
+ if ($window.scrollTop() > (distance)) {
+ if (!self.S(klass).hasClass('fixed')) {
+ self.S(klass).addClass('fixed');
+ self.S('body').addClass('f-topbar-fixed');
+ }
+ } else if ($window.scrollTop() <= distance) {
+ if (self.S(klass).hasClass('fixed')) {
+ self.S(klass).removeClass('fixed');
+ self.S('body').removeClass('f-topbar-fixed');
+ }
+ }
+ }
+ }
+ },
+
+ off : function () {
+ this.S(this.scope).off('.fndtn.topbar');
+ this.S(window).off('.fndtn.topbar');
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+!function(a,b,c,d){"use strict";function e(a){return("string"==typeof a||a instanceof String)&&(a=a.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g,"")),a}var f=function(b){for(var c=b.length,d=a("head");c--;)0===d.has("."+b[c]).length&&d.append('<meta class="'+b[c]+'" />')};f(["foundation-mq-small","foundation-mq-small-only","foundation-mq-medium","foundation-mq-medium-only","foundation-mq-large","foundation-mq-large-only","foundation-mq-xlarge","foundation-mq-xlarge-only","foundation-mq-xxlarge","foundation-data-attribute-namespace"]),a(function(){"undefined"!=typeof FastClick&&"undefined"!=typeof c.body&&FastClick.attach(c.body)});var g=function(b,d){if("string"==typeof b){if(d){var e;if(d.jquery){if(e=d[0],!e)return d}else e=d;return a(e.querySelectorAll(b))}return a(c.querySelectorAll(b))}return a(b,d)},h=function(a){var b=[];return a||b.push("data"),this.namespace.length>0&&b.push(this.namespace),b.push(this.name),b.join("-")},i=function(a){for(var b=a.split("-"),c=b.length,d=[];c--;)0!==c?d.push(b[c]):this.namespace.length>0?d.push(this.namespace,b[c]):d.push(b[c]);return d.reverse().join("-")},j=function(b,c){var d=this,e=function(){var e=g(this),f=!e.data(d.attr_name(!0)+"-init");e.data(d.attr_name(!0)+"-init",a.extend({},d.settings,c||b,d.data_options(e))),f&&d.events(this)};return g(this.scope).is("["+this.attr_name()+"]")?e.call(this.scope):g("["+this.attr_name()+"]",this.scope).each(e),"string"==typeof b?this[b].call(this,c):void 0},k=function(a,b){function c(){b(a[0])}function d(){if(this.one("load",c),/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var a=this.attr("src"),b=a.match(/\?/)?"&":"?";b+="random="+(new Date).getTime(),this.attr("src",a+b)}}return a.attr("src")?void(a[0].complete||4===a[0].readyState?c():d.call(a)):void c()};/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
+b.matchMedia||(b.matchMedia=function(){var a=b.styleMedia||b.media;if(!a){var d=c.createElement("style"),e=c.getElementsByTagName("script")[0],f=null;d.type="text/css",d.id="matchmediajs-test",e.parentNode.insertBefore(d,e),f="getComputedStyle"in b&&b.getComputedStyle(d,null)||d.currentStyle,a={matchMedium:function(a){var b="@media "+a+"{ #matchmediajs-test { width: 1px; } }";return d.styleSheet?d.styleSheet.cssText=b:d.textContent=b,"1px"===f.width}}}return function(b){return{matches:a.matchMedium(b||"all"),media:b||"all"}}}()),function(a){function c(){d&&(g(c),i&&a.fx.tick())}for(var d,e=0,f=["webkit","moz"],g=b.requestAnimationFrame,h=b.cancelAnimationFrame,i="undefined"!=typeof a.fx;e<f.length&&!g;e++)g=b[f[e]+"RequestAnimationFrame"],h=h||b[f[e]+"CancelAnimationFrame"]||b[f[e]+"CancelRequestAnimationFrame"];g?(b.requestAnimationFrame=g,b.cancelAnimationFrame=h,i&&(a.fx.timer=function(b){b()&&a.timers.push(b)&&!d&&(d=!0,c())},a.fx.stop=function(){d=!1})):(b.requestAnimationFrame=function(a){var c=(new Date).getTime(),d=Math.max(0,16-(c-e)),f=b.setTimeout(function(){a(c+d)},d);return e=c+d,f},b.cancelAnimationFrame=function(a){clearTimeout(a)})}(a),b.Foundation={name:"Foundation",version:"5.5.2",media_queries:{small:g(".foundation-mq-small").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"small-only":g(".foundation-mq-small-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),medium:g(".foundation-mq-medium").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"medium-only":g(".foundation-mq-medium-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),large:g(".foundation-mq-large").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"large-only":g(".foundation-mq-large-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xlarge:g(".foundation-mq-xlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"xlarge-only":g(".foundation-mq-xlarge-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xxlarge:g(".foundation-mq-xxlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,"")},stylesheet:a("<style></style>").appendTo("head")[0].sheet,global:{namespace:d},init:function(a,c,d,e,f){var h=[a,d,e,f],i=[];if(this.rtl=/rtl/i.test(g("html").attr("dir")),this.scope=a||this.scope,this.set_namespace(),c&&"string"==typeof c&&!/reflow/i.test(c))this.libs.hasOwnProperty(c)&&i.push(this.init_lib(c,h));else for(var j in this.libs)i.push(this.init_lib(j,c));return g(b).load(function(){g(b).trigger("resize.fndtn.clearing").trigger("resize.fndtn.dropdown").trigger("resize.fndtn.equalizer").trigger("resize.fndtn.interchange").trigger("resize.fndtn.joyride").trigger("resize.fndtn.magellan").trigger("resize.fndtn.topbar").trigger("resize.fndtn.slider")}),a},init_lib:function(b,c){return this.libs.hasOwnProperty(b)?(this.patch(this.libs[b]),c&&c.hasOwnProperty(b)?("undefined"!=typeof this.libs[b].settings?a.extend(!0,this.libs[b].settings,c[b]):"undefined"!=typeof this.libs[b].defaults&&a.extend(!0,this.libs[b].defaults,c[b]),this.libs[b].init.apply(this.libs[b],[this.scope,c[b]])):(c=c instanceof Array?c:new Array(c),this.libs[b].init.apply(this.libs[b],c))):function(){}},patch:function(a){a.scope=this.scope,a.namespace=this.global.namespace,a.rtl=this.rtl,a.data_options=this.utils.data_options,a.attr_name=h,a.add_namespace=i,a.bindings=j,a.S=this.utils.S},inherit:function(a,b){for(var c=b.split(" "),d=c.length;d--;)this.utils.hasOwnProperty(c[d])&&(a[c[d]]=this.utils[c[d]])},set_namespace:function(){var b=this.global.namespace===d?a(".foundation-data-attribute-namespace").css("font-family"):this.global.namespace;this.global.namespace=b===d||/false/i.test(b)?"":b},libs:{},utils:{S:g,throttle:function(a,b){var c=null;return function(){var d=this,e=arguments;null==c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}},debounce:function(a,b,c){var d,e;return function(){var f=this,g=arguments,h=function(){d=null,c||(e=a.apply(f,g))},i=c&&!d;return clearTimeout(d),d=setTimeout(h,b),i&&(e=a.apply(f,g)),e}},data_options:function(b,c){function d(a){return!isNaN(a-0)&&null!==a&&""!==a&&a!==!1&&a!==!0}function e(b){return"string"==typeof b?a.trim(b):b}c=c||"options";var f,g,h,i={},j=function(a){var b=Foundation.global.namespace;return a.data(b.length>0?b+"-"+c:c)},k=j(b);if("object"==typeof k)return k;for(h=(k||":").split(";"),f=h.length;f--;)g=h[f].split(":"),g=[g[0],g.slice(1).join(":")],/true/i.test(g[1])&&(g[1]=!0),/false/i.test(g[1])&&(g[1]=!1),d(g[1])&&(-1===g[1].indexOf(".")?g[1]=parseInt(g[1],10):g[1]=parseFloat(g[1])),2===g.length&&g[0].length>0&&(i[e(g[0])]=e(g[1]));return i},register_media:function(b,c){Foundation.media_queries[b]===d&&(a("head").append('<meta class="'+c+'"/>'),Foundation.media_queries[b]=e(a("."+c).css("font-family")))},add_custom_rule:function(a,b){if(b===d&&Foundation.stylesheet)Foundation.stylesheet.insertRule(a,Foundation.stylesheet.cssRules.length);else{var c=Foundation.media_queries[b];c!==d&&Foundation.stylesheet.insertRule("@media "+Foundation.media_queries[b]+"{ "+a+" }",Foundation.stylesheet.cssRules.length)}},image_loaded:function(a,b){function c(a){for(var b=a.length,c=b-1;c>=0;c--)if(a.attr("height")===d)return!1;return!0}var e=this,f=a.length;(0===f||c(a))&&b(a),a.each(function(){k(e.S(this),function(){f-=1,0===f&&b(a)})})},random_str:function(){return this.fidx||(this.fidx=0),this.prefix=this.prefix||[this.name||"F",(+new Date).toString(36)].join("-"),this.prefix+(this.fidx++).toString(36)},match:function(a){return b.matchMedia(a).matches},is_small_up:function(){return this.match(Foundation.media_queries.small)},is_medium_up:function(){return this.match(Foundation.media_queries.medium)},is_large_up:function(){return this.match(Foundation.media_queries.large)},is_xlarge_up:function(){return this.match(Foundation.media_queries.xlarge)},is_xxlarge_up:function(){return this.match(Foundation.media_queries.xxlarge)},is_small_only:function(){return!(this.is_medium_up()||this.is_large_up()||this.is_xlarge_up()||this.is_xxlarge_up())},is_medium_only:function(){return this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_large_only:function(){return this.is_medium_up()&&this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_xlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&!this.is_xxlarge_up()},is_xxlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&this.is_xxlarge_up()}}},a.fn.foundation=function(){var a=Array.prototype.slice.call(arguments,0);return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(a)),this})}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.abide={name:"abide",version:"5.5.2",settings:{live_validate:!0,validate_on_blur:!0,focus_on_invalid:!0,error_labels:!0,error_class:"error",timeout:1e3,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},validators:{equalTo:function(a,b,d){var e=c.getElementById(a.getAttribute(this.add_namespace("data-equalto"))).value,f=a.value,g=e===f;return g}}},timer:null,init:function(a,b,c){this.bindings(b,c)},events:function(b){function c(a,b){clearTimeout(d.timer),d.timer=setTimeout(function(){d.validate([a],b)}.bind(a),f.timeout)}var d=this,e=d.S(b).attr("novalidate","novalidate"),f=e.data(this.attr_name(!0)+"-init")||{};this.invalid_attr=this.add_namespace("data-invalid"),e.off(".abide").on("submit.fndtn.abide",function(a){var b=/ajax/i.test(d.S(this).attr(d.attr_name()));return d.validate(d.S(this).find("input, textarea, select").not(":hidden, [data-abide-ignore]").get(),a,b)}).on("validate.fndtn.abide",function(a){"manual"===f.validate_on&&d.validate([a.target],a)}).on("reset",function(b){return d.reset(a(this),b)}).find("input, textarea, select").not(":hidden, [data-abide-ignore]").off(".abide").on("blur.fndtn.abide change.fndtn.abide",function(a){f.validate_on_blur&&f.validate_on_blur===!0&&c(this,a),"change"===f.validate_on&&c(this,a)}).on("keydown.fndtn.abide",function(a){f.live_validate&&f.live_validate===!0&&9!=a.which&&c(this,a),"tab"===f.validate_on&&9===a.which?c(this,a):"change"===f.validate_on&&c(this,a)}).on("focus",function(b){navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)&&a("html, body").animate({scrollTop:a(b.target).offset().top},100)})},reset:function(b,c){var d=this;b.removeAttr(d.invalid_attr),a("["+d.invalid_attr+"]",b).removeAttr(d.invalid_attr),a("."+d.settings.error_class,b).not("small").removeClass(d.settings.error_class),a(":input",b).not(":button, :submit, :reset, :hidden, [data-abide-ignore]").val("").removeAttr(d.invalid_attr)},validate:function(a,b,c){for(var d=this.parse_patterns(a),e=d.length,f=this.S(a[0]).closest("form"),g=/submit/.test(b.type),h=0;e>h;h++)if(!d[h]&&(g||c))return this.settings.focus_on_invalid&&a[h].focus(),f.trigger("invalid.fndtn.abide"),this.S(a[h]).closest("form").attr(this.invalid_attr,""),!1;return(g||c)&&f.trigger("valid.fndtn.abide"),f.removeAttr(this.invalid_attr),c?!1:!0},parse_patterns:function(a){for(var b=a.length,c=[];b--;)c.push(this.pattern(a[b]));return this.check_validation_and_apply_styles(c)},pattern:function(a){var b=a.getAttribute("type"),c="string"==typeof a.getAttribute("required"),d=a.getAttribute("pattern")||"";return this.settings.patterns.hasOwnProperty(d)&&d.length>0?[a,this.settings.patterns[d],c]:d.length>0?[a,new RegExp(d),c]:this.settings.patterns.hasOwnProperty(b)?[a,this.settings.patterns[b],c]:(d=/.*/,[a,d,c])},check_validation_and_apply_styles:function(b){var c=b.length,d=[],e=this.S(b[0][0]).closest("[data-"+this.attr_name(!0)+"]");for(e.data(this.attr_name(!0)+"-init")||{};c--;){var f,g,h=b[c][0],i=b[c][2],j=h.value.trim(),k=this.S(h).parent(),l=h.getAttribute(this.add_namespace("data-abide-validator")),m="radio"===h.type,n="checkbox"===h.type,o=this.S('label[for="'+h.getAttribute("id")+'"]'),p=i?h.value.length>0:!0,q=[];if(h.getAttribute(this.add_namespace("data-equalto"))&&(l="equalTo"),f=k.is("label")?k.parent():k,m&&i)q.push(this.valid_radio(h,i));else if(n&&i)q.push(this.valid_checkbox(h,i));else if(l){for(var r=l.split(" "),s=!0,t=!0,u=0;u<r.length;u++)g=this.settings.validators[r[u]].apply(this,[h,i,f]),q.push(g),t=g&&s,s=g;t?(this.S(h).removeAttr(this.invalid_attr),f.removeClass("error"),o.length>0&&this.settings.error_labels&&o.removeClass(this.settings.error_class).removeAttr("role"),a(h).triggerHandler("valid")):(this.S(h).attr(this.invalid_attr,""),f.addClass("error"),o.length>0&&this.settings.error_labels&&o.addClass(this.settings.error_class).attr("role","alert"),a(h).triggerHandler("invalid"))}else if(q.push(b[c][1].test(j)&&p||!i&&h.value.length<1||a(h).attr("disabled")?!0:!1),q=[q.every(function(a){return a})],q[0])this.S(h).removeAttr(this.invalid_attr),h.setAttribute("aria-invalid","false"),h.removeAttribute("aria-describedby"),f.removeClass(this.settings.error_class),o.length>0&&this.settings.error_labels&&o.removeClass(this.settings.error_class).removeAttr("role"),a(h).triggerHandler("valid");else{this.S(h).attr(this.invalid_attr,""),h.setAttribute("aria-invalid","true");var v=f.find("small."+this.settings.error_class,"span."+this.settings.error_class),w=v.length>0?v[0].id:"";w.length>0&&h.setAttribute("aria-describedby",w),f.addClass(this.settings.error_class),o.length>0&&this.settings.error_labels&&o.addClass(this.settings.error_class).attr("role","alert"),a(h).triggerHandler("invalid")}d=d.concat(q)}return d},valid_checkbox:function(b,c){var b=this.S(b),d=b.is(":checked")||!c||b.get(0).getAttribute("disabled");return d?(b.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class),a(b).triggerHandler("valid")):(b.attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),a(b).triggerHandler("invalid")),d},valid_radio:function(b,c){for(var d=b.getAttribute("name"),e=this.S(b).closest("[data-"+this.attr_name(!0)+"]").find("[name='"+d+"']"),f=e.length,g=!1,h=!1,i=0;f>i;i++)e[i].getAttribute("disabled")?(h=!0,g=!0):e[i].checked?g=!0:h&&(g=!1);for(var i=0;f>i;i++)g?(this.S(e[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class),a(e[i]).triggerHandler("valid")):(this.S(e[i]).attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),a(e[i]).triggerHandler("invalid"));return g},valid_equal:function(a,b,d){var e=c.getElementById(a.getAttribute(this.add_namespace("data-equalto"))).value,f=a.value,g=e===f;return g?(this.S(a).removeAttr(this.invalid_attr),d.removeClass(this.settings.error_class),label.length>0&&settings.error_labels&&label.removeClass(this.settings.error_class)):(this.S(a).attr(this.invalid_attr,""),d.addClass(this.settings.error_class),label.length>0&&settings.error_labels&&label.addClass(this.settings.error_class)),g},valid_oneof:function(a,b,c,d){var a=this.S(a),e=this.S("["+this.add_namespace("data-oneof")+"]"),f=e.filter(":checked").length>0;if(f?a.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class):a.attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),!d){var g=this;e.each(function(){g.valid_oneof.call(g,this,null,null,!0)})}return f},reflow:function(a,b){var c=this,d=c.S("["+this.attr_name()+"]").attr("novalidate","novalidate");c.S(d).each(function(a,b){c.events(b)})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.accordion={name:"accordion",version:"5.5.2",settings:{content_class:"content",active_class:"active",multi_expand:!1,toggleable:!0,callback:function(){}},init:function(a,b,c){this.bindings(b,c)},events:function(b){var c=this,d=this.S;c.create(this.S(b)),d(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion","["+this.attr_name()+"] > dd > a, ["+this.attr_name()+"] > li > a",function(b){var e=d(this).closest("["+c.attr_name()+"]"),f=c.attr_name()+"="+e.attr(c.attr_name()),g=e.data(c.attr_name(!0)+"-init")||c.settings,h=d("#"+this.href.split("#")[1]),i=a("> dd, > li",e),j=i.children("."+g.content_class),k=j.filter("."+g.active_class);return b.preventDefault(),e.attr(c.attr_name())&&(j=j.add("["+f+"] dd > ."+g.content_class+", ["+f+"] li > ."+g.content_class),i=i.add("["+f+"] dd, ["+f+"] li")),g.toggleable&&h.is(k)?(h.parent("dd, li").toggleClass(g.active_class,!1),h.toggleClass(g.active_class,!1),d(this).attr("aria-expanded",function(a,b){return"true"===b?"false":"true"}),g.callback(h),h.triggerHandler("toggled",[e]),void e.triggerHandler("toggled",[h])):(g.multi_expand||(j.removeClass(g.active_class),i.removeClass(g.active_class),i.children("a").attr("aria-expanded","false")),h.addClass(g.active_class).parent().addClass(g.active_class),g.callback(h),h.triggerHandler("toggled",[e]),e.triggerHandler("toggled",[h]),void d(this).attr("aria-expanded","true"))})},create:function(b){var c=this,d=b,e=a("> .accordion-navigation",d),f=d.data(c.attr_name(!0)+"-init")||c.settings;e.children("a").attr("aria-expanded","false"),e.has("."+f.content_class+"."+f.active_class).children("a").attr("aria-expanded","true"),f.multi_expand&&b.attr("aria-multiselectable","true")},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.alert={name:"alert",version:"5.5.2",settings:{callback:function(){}},init:function(a,b,c){this.bindings(b,c)},events:function(){var b=this,c=this.S;a(this.scope).off(".alert").on("click.fndtn.alert","["+this.attr_name()+"] .close",function(a){var d=c(this).closest("["+b.attr_name()+"]"),e=d.data(b.attr_name(!0)+"-init")||b.settings;a.preventDefault(),Modernizr.csstransitions?(d.addClass("alert-close"),d.on("transitionend webkitTransitionEnd oTransitionEnd",function(a){c(this).trigger("close.fndtn.alert").remove(),e.callback()})):d.fadeOut(300,function(){c(this).trigger("close.fndtn.alert").remove(),e.callback()})})},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.clearing={name:"clearing",version:"5.5.2",settings:{templates:{viewing:'<a href="#" class="clearing-close">×</a><div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" /><p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a><a href="#" class="clearing-main-next"><span></span></a></div><img class="clearing-preload-next" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" /><img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'},close_selectors:".clearing-close, div.clearing-blackout",open_selectors:"",skip_selector:"",touch_label:"",init:!1,locked:!1},init:function(a,b,c){var d=this;Foundation.inherit(this,"throttle image_loaded"),this.bindings(b,c),d.S(this.scope).is("["+this.attr_name()+"]")?this.assemble(d.S("li",this.scope)):d.S("["+this.attr_name()+"]",this.scope).each(function(){d.assemble(d.S("li",this))})},events:function(d){var e=this,f=e.S,g=a(".scroll-container");g.length>0&&(this.scope=g),f(this.scope).off(".clearing").on("click.fndtn.clearing","ul["+this.attr_name()+"] li "+this.settings.open_selectors,function(a,b,c){var b=b||f(this),c=c||b,d=b.next("li"),g=b.closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init"),h=f(a.target);a.preventDefault(),g||(e.init(),g=b.closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init")),c.hasClass("visible")&&b[0]===c[0]&&d.length>0&&e.is_open(b)&&(c=d,h=f("img",c)),e.open(h,b,c),e.update_paddles(c)}).on("click.fndtn.clearing",".clearing-main-next",function(a){e.nav(a,"next")}).on("click.fndtn.clearing",".clearing-main-prev",function(a){e.nav(a,"prev")}).on("click.fndtn.clearing",this.settings.close_selectors,function(a){Foundation.libs.clearing.close(a,this)}),a(c).on("keydown.fndtn.clearing",function(a){e.keydown(a)}),f(b).off(".clearing").on("resize.fndtn.clearing",function(){e.resize()}),this.swipe_events(d)},swipe_events:function(a){var b=this,c=b.S;c(this.scope).on("touchstart.fndtn.clearing",".visible-img",function(a){a.touches||(a=a.originalEvent);var b={start_page_x:a.touches[0].pageX,start_page_y:a.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:d};c(this).data("swipe-transition",b),a.stopPropagation()}).on("touchmove.fndtn.clearing",".visible-img",function(a){if(a.touches||(a=a.originalEvent),!(a.touches.length>1||a.scale&&1!==a.scale)){var d=c(this).data("swipe-transition");if("undefined"==typeof d&&(d={}),d.delta_x=a.touches[0].pageX-d.start_page_x,Foundation.rtl&&(d.delta_x=-d.delta_x),"undefined"==typeof d.is_scrolling&&(d.is_scrolling=!!(d.is_scrolling||Math.abs(d.delta_x)<Math.abs(a.touches[0].pageY-d.start_page_y))),!d.is_scrolling&&!d.active){a.preventDefault();var e=d.delta_x<0?"next":"prev";d.active=!0,b.nav(a,e)}}}).on("touchend.fndtn.clearing",".visible-img",function(a){c(this).data("swipe-transition",{}),a.stopPropagation()})},assemble:function(b){var c=b.parent();if(!c.parent().hasClass("carousel")){c.after('<div id="foundationClearingHolder"></div>');var d=c.detach(),e="";if(null!=d[0]){e=d[0].outerHTML;var f=this.S("#foundationClearingHolder"),g=c.data(this.attr_name(!0)+"-init"),h={grid:'<div class="carousel">'+e+"</div>",viewing:g.templates.viewing},i='<div class="clearing-assembled"><div>'+h.viewing+h.grid+"</div></div>",j=this.settings.touch_label;Modernizr.touch&&(i=a(i).find(".clearing-touch-label").html(j).end()),f.after(i).remove()}}},open:function(b,d,e){function f(){setTimeout(function(){this.image_loaded(m,function(){1!==m.outerWidth()||o?g.call(this,m):f.call(this)}.bind(this))}.bind(this),100)}function g(b){var c=a(b);c.css("visibility","visible"),c.trigger("imageVisible"),i.css("overflow","hidden"),j.addClass("clearing-blackout"),k.addClass("clearing-container"),l.show(),this.fix_height(e).caption(h.S(".clearing-caption",l),h.S("img",e)).center_and_label(b,n).shift(d,e,function(){e.closest("li").siblings().removeClass("visible"),e.closest("li").addClass("visible")}),l.trigger("opened.fndtn.clearing")}var h=this,i=a(c.body),j=e.closest(".clearing-assembled"),k=h.S("div",j).first(),l=h.S(".visible-img",k),m=h.S("img",l).not(b),n=h.S(".clearing-touch-label",k),o=!1,p={};a("body").on("touchmove",function(a){a.preventDefault()}),m.error(function(){o=!0}),this.locked()||(l.trigger("open.fndtn.clearing"),p=this.load(b),p.interchange?m.attr("data-interchange",p.interchange).foundation("interchange","reflow"):m.attr("src",p.src).attr("data-interchange",""),m.css("visibility","hidden"),f.call(this))},close:function(b,d){b.preventDefault();var e,f,g=function(a){return/blackout/.test(a.selector)?a:a.closest(".clearing-blackout")}(a(d)),h=a(c.body);return d===b.target&&g&&(h.css("overflow",""),e=a("div",g).first(),f=a(".visible-img",e),f.trigger("close.fndtn.clearing"),this.settings.prev_index=0,a("ul["+this.attr_name()+"]",g).attr("style","").closest(".clearing-blackout").removeClass("clearing-blackout"),e.removeClass("clearing-container"),f.hide(),f.trigger("closed.fndtn.clearing")),a("body").off("touchmove"),!1},is_open:function(a){return a.parent().prop("style").length>0},keydown:function(b){var c=a(".clearing-blackout ul["+this.attr_name()+"]"),d=this.rtl?37:39,e=this.rtl?39:37,f=27;b.which===d&&this.go(c,"next"),b.which===e&&this.go(c,"prev"),b.which===f&&this.S("a.clearing-close").trigger("click.fndtn.clearing")},nav:function(b,c){var d=a("ul["+this.attr_name()+"]",".clearing-blackout");b.preventDefault(),this.go(d,c)},resize:function(){var b=a("img",".clearing-blackout .visible-img"),c=a(".clearing-touch-label",".clearing-blackout");b.length&&(this.center_and_label(b,c),b.trigger("resized.fndtn.clearing"))},fix_height:function(a){var b=a.parent().children(),c=this;return b.each(function(){var a=c.S(this),b=a.find("img");a.height()>b.outerHeight()&&a.addClass("fix-height")}).closest("ul").width(100*b.length+"%"),this},update_paddles:function(a){a=a.closest("li");var b=a.closest(".carousel").siblings(".visible-img");a.next().length>0?this.S(".clearing-main-next",b).removeClass("disabled"):this.S(".clearing-main-next",b).addClass("disabled"),a.prev().length>0?this.S(".clearing-main-prev",b).removeClass("disabled"):this.S(".clearing-main-prev",b).addClass("disabled")},center_and_label:function(a,b){return b.css(!this.rtl&&b.length>0?{marginLeft:-(b.outerWidth()/2),marginTop:-(a.outerHeight()/2)-b.outerHeight()-10}:{marginRight:-(b.outerWidth()/2),marginTop:-(a.outerHeight()/2)-b.outerHeight()-10,left:"auto",right:"50%"}),this},load:function(a){var b,c,d;return"A"===a[0].nodeName?(b=a.attr("href"),c=a.data("clearing-interchange")):(d=a.closest("a"),b=d.attr("href"),c=d.data("clearing-interchange")),this.preload(a),{src:b?b:a.attr("src"),interchange:b?c:a.data("clearing-interchange")}},preload:function(a){this.img(a.closest("li").next(),"next").img(a.closest("li").prev(),"prev")},img:function(b,c){if(b.length){var d,e,f,g=a(".clearing-preload-"+c),h=this.S("a",b);h.length?(d=h.attr("href"),e=h.data("clearing-interchange")):(f=this.S("img",b),d=f.attr("src"),e=f.data("clearing-interchange")),e?g.attr("data-interchange",e):(g.attr("src",d),g.attr("data-interchange",""))}return this},caption:function(a,b){var c=b.attr("data-caption");return c?a.html(c).show():a.text("").hide(),this},go:function(a,b){var c=this.S(".visible",a),d=c[b]();this.settings.skip_selector&&0!=d.find(this.settings.skip_selector).length&&(d=d[b]()),d.length&&this.S("img",d).trigger("click.fndtn.clearing",[c,d]).trigger("change.fndtn.clearing")},shift:function(a,b,c){var d,e=b.parent(),f=this.settings.prev_index||b.index(),g=this.direction(e,a,b),h=this.rtl?"right":"left",i=parseInt(e.css("left"),10),j=b.outerWidth(),k={};b.index()===f||/skip/.test(g)?/skip/.test(g)&&(d=b.index()-this.settings.up_count,this.lock(),d>0?(k[h]=-(d*j),e.animate(k,300,this.unlock())):(k[h]=0,e.animate(k,300,this.unlock()))):/left/.test(g)?(this.lock(),k[h]=i+j,e.animate(k,300,this.unlock())):/right/.test(g)&&(this.lock(),k[h]=i-j,e.animate(k,300,this.unlock())),c()},direction:function(a,b,c){var d,e=this.S("li",a),f=e.outerWidth()+e.outerWidth()/4,g=Math.floor(this.S(".clearing-container").outerWidth()/f)-1,h=e.index(c);return this.settings.up_count=g,d=this.adjacent(this.settings.prev_index,h)?h>g&&h>this.settings.prev_index?"right":h>g-1&&h<=this.settings.prev_index?"left":!1:"skip",this.settings.prev_index=h,d},adjacent:function(a,b){for(var c=b+1;c>=b-1;c--)if(c===a)return!0;return!1},lock:function(){this.settings.locked=!0},unlock:function(){this.settings.locked=!1},locked:function(){return this.settings.locked},off:function(){this.S(this.scope).off(".fndtn.clearing"),this.S(b).off(".fndtn.clearing")},reflow:function(){this.init()}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"5.5.2",settings:{active_class:"open",disabled_class:"disabled",mega_class:"mega",align:"bottom",is_hover:!1,hover_timeout:150,opened:function(){},closed:function(){}},init:function(b,c,d){Foundation.inherit(this,"throttle"),a.extend(!0,this.settings,c,d),this.bindings(c,d)},events:function(d){var e=this,f=e.S;f(this.scope).off(".dropdown").on("click.fndtn.dropdown","["+this.attr_name()+"]",function(b){var c=f(this).data(e.attr_name(!0)+"-init")||e.settings;(!c.is_hover||Modernizr.touch)&&(b.preventDefault(),f(this).parent("[data-reveal-id]").length&&b.stopPropagation(),e.toggle(a(this)))}).on("mouseenter.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(a){var b,c,d=f(this);clearTimeout(e.timeout),d.data(e.data_attr())?(b=f("#"+d.data(e.data_attr())),c=d):(b=d,c=f("["+e.attr_name()+'="'+b.attr("id")+'"]'));var g=c.data(e.attr_name(!0)+"-init")||e.settings;f(a.currentTarget).data(e.data_attr())&&g.is_hover&&e.closeall.call(e),g.is_hover&&e.open.apply(e,[b,c])}).on("mouseleave.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(a){var b,c=f(this);if(c.data(e.data_attr()))b=c.data(e.data_attr(!0)+"-init")||e.settings;else var d=f("["+e.attr_name()+'="'+f(this).attr("id")+'"]'),b=d.data(e.attr_name(!0)+"-init")||e.settings;e.timeout=setTimeout(function(){c.data(e.data_attr())?b.is_hover&&e.close.call(e,f("#"+c.data(e.data_attr()))):b.is_hover&&e.close.call(e,c)}.bind(this),b.hover_timeout)}).on("click.fndtn.dropdown",function(b){var d=f(b.target).closest("["+e.attr_name()+"-content]"),g=d.find("a");return g.length>0&&"false"!==d.attr("aria-autoclose")&&e.close.call(e,f("["+e.attr_name()+"-content]")),b.target!==c&&!a.contains(c.documentElement,b.target)||f(b.target).closest("["+e.attr_name()+"]").length>0?void 0:!f(b.target).data("revealId")&&d.length>0&&(f(b.target).is("["+e.attr_name()+"-content]")||a.contains(d.first()[0],b.target))?void b.stopPropagation():void e.close.call(e,f("["+e.attr_name()+"-content]"))}).on("opened.fndtn.dropdown","["+e.attr_name()+"-content]",function(){e.settings.opened.call(this)}).on("closed.fndtn.dropdown","["+e.attr_name()+"-content]",function(){e.settings.closed.call(this)}),f(b).off(".dropdown").on("resize.fndtn.dropdown",e.throttle(function(){e.resize.call(e)},50)),this.resize()},close:function(b){var c=this;b.each(function(d){var e=a("["+c.attr_name()+"="+b[d].id+"]")||a("aria-controls="+b[d].id+"]");e.attr("aria-expanded","false"),c.S(this).hasClass(c.settings.active_class)&&(c.S(this).css(Foundation.rtl?"right":"left","-99999px").attr("aria-hidden","true").removeClass(c.settings.active_class).prev("["+c.attr_name()+"]").removeClass(c.settings.active_class).removeData("target"),c.S(this).trigger("closed.fndtn.dropdown",[b]))}),b.removeClass("f-open-"+this.attr_name(!0))},closeall:function(){var b=this;a.each(b.S(".f-open-"+this.attr_name(!0)),function(){b.close.call(b,b.S(this))})},open:function(a,b){this.css(a.addClass(this.settings.active_class),b),a.prev("["+this.attr_name()+"]").addClass(this.settings.active_class),a.data("target",b.get(0)).trigger("opened.fndtn.dropdown",[a,b]),a.attr("aria-hidden","false"),b.attr("aria-expanded","true"),a.focus(),a.addClass("f-open-"+this.attr_name(!0))},data_attr:function(){return this.namespace.length>0?this.namespace+"-"+this.name:this.name},toggle:function(a){if(!a.hasClass(this.settings.disabled_class)){var b=this.S("#"+a.data(this.data_attr()));0!==b.length&&(this.close.call(this,this.S("["+this.attr_name()+"-content]").not(b)),b.hasClass(this.settings.active_class)?(this.close.call(this,b),b.data("target")!==a.get(0)&&this.open.call(this,b,a)):this.open.call(this,b,a))}},resize:function(){var b=this.S("["+this.attr_name()+"-content].open"),c=a(b.data("target"));b.length&&c.length&&this.css(b,c)},css:function(a,b){var c=Math.max((b.width()-a.width())/2,8),d=b.data(this.attr_name(!0)+"-init")||this.settings,e=a.parent().css("overflow-y")||a.parent().css("overflow");if(this.clear_idx(),this.small()){var f=this.dirs.bottom.call(a,b,d);a.attr("style","").removeClass("drop-left drop-right drop-top").css({position:"absolute",width:"95%","max-width":"none",top:f.top}),a.css(Foundation.rtl?"right":"left",c)}else if("visible"!==e){var g=b[0].offsetTop+b[0].offsetHeight;a.attr("style","").css({position:"absolute",top:g}),a.css(Foundation.rtl?"right":"left",c)}else this.style(a,b,d);return a},style:function(b,c,d){var e=a.extend({position:"absolute"},this.dirs[d.align].call(b,c,d));b.attr("style","").css(e)},dirs:{_base:function(a){var d=this.offsetParent(),e=d.offset(),f=a.offset();f.top-=e.top,f.left-=e.left,f.missRight=!1,f.missTop=!1,f.missLeft=!1,f.leftRightFlag=!1;var g;g=c.getElementsByClassName("row")[0]?c.getElementsByClassName("row")[0].clientWidth:b.innerWidth;var h=(b.innerWidth-g)/2,i=g;return this.hasClass("mega")||(a.offset().top<=this.outerHeight()&&(f.missTop=!0,i=b.innerWidth-h,f.leftRightFlag=!0),a.offset().left+this.outerWidth()>a.offset().left+h&&a.offset().left-h>this.outerWidth()&&(f.missRight=!0,f.missLeft=!1),a.offset().left-this.outerWidth()<=0&&(f.missLeft=!0,f.missRight=!1)),f},top:function(a,b){var c=Foundation.libs.dropdown,d=c.dirs._base.call(this,a);return this.addClass("drop-top"),1==d.missTop&&(d.top=d.top+a.outerHeight()+this.outerHeight(),this.removeClass("drop-top")),1==d.missRight&&(d.left=d.left-this.outerWidth()+a.outerWidth()),(a.outerWidth()<this.outerWidth()||c.small()||this.hasClass(b.mega_menu))&&c.adjust_pip(this,a,b,d),Foundation.rtl?{left:d.left-this.outerWidth()+a.outerWidth(),top:d.top-this.outerHeight()}:{left:d.left,top:d.top-this.outerHeight()}},bottom:function(a,b){var c=Foundation.libs.dropdown,d=c.dirs._base.call(this,a);return 1==d.missRight&&(d.left=d.left-this.outerWidth()+a.outerWidth()),(a.outerWidth()<this.outerWidth()||c.small()||this.hasClass(b.mega_menu))&&c.adjust_pip(this,a,b,d),
+c.rtl?{left:d.left-this.outerWidth()+a.outerWidth(),top:d.top+a.outerHeight()}:{left:d.left,top:d.top+a.outerHeight()}},left:function(a,b){var c=Foundation.libs.dropdown.dirs._base.call(this,a);return this.addClass("drop-left"),1==c.missLeft&&(c.left=c.left+this.outerWidth(),c.top=c.top+a.outerHeight(),this.removeClass("drop-left")),{left:c.left-this.outerWidth(),top:c.top}},right:function(a,b){var c=Foundation.libs.dropdown.dirs._base.call(this,a);this.addClass("drop-right"),1==c.missRight?(c.left=c.left-this.outerWidth(),c.top=c.top+a.outerHeight(),this.removeClass("drop-right")):c.triggeredRight=!0;var d=Foundation.libs.dropdown;return(a.outerWidth()<this.outerWidth()||d.small()||this.hasClass(b.mega_menu))&&d.adjust_pip(this,a,b,c),{left:c.left+a.outerWidth(),top:c.top}}},adjust_pip:function(a,b,c,d){var e=Foundation.stylesheet,f=8;a.hasClass(c.mega_class)?f=d.left+b.outerWidth()/2-8:this.small()&&(f+=d.left-8),this.rule_idx=e.cssRules.length;var g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left: "+f+"px;",j="left: "+(f-1)+"px;";1==d.missRight&&(f=a.outerWidth()-23,g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left: "+f+"px;",j="left: "+(f-1)+"px;"),1==d.triggeredRight&&(g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left:-12px;",j="left:-14px;"),e.insertRule?(e.insertRule([g,"{",i,"}"].join(" "),this.rule_idx),e.insertRule([h,"{",j,"}"].join(" "),this.rule_idx+1)):(e.addRule(g,i,this.rule_idx),e.addRule(h,j,this.rule_idx+1))},clear_idx:function(){var a=Foundation.stylesheet;"undefined"!=typeof this.rule_idx&&(a.deleteRule(this.rule_idx),a.deleteRule(this.rule_idx),delete this.rule_idx)},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},off:function(){this.S(this.scope).off(".fndtn.dropdown"),this.S("html, body").off(".fndtn.dropdown"),this.S(b).off(".fndtn.dropdown"),this.S("[data-dropdown-content]").off(".fndtn.dropdown")},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.equalizer={name:"equalizer",version:"5.5.2",settings:{use_tallest:!0,before_height_change:a.noop,after_height_change:a.noop,equalize_on_stack:!1,act_on_hidden_el:!1},init:function(a,b,c){Foundation.inherit(this,"image_loaded"),this.bindings(b,c),this.reflow()},events:function(){this.S(b).off(".equalizer").on("resize.fndtn.equalizer",function(a){this.reflow()}.bind(this))},equalize:function(b){var c,d,e=!1,f=b.data("equalizer"),g=b.data(this.attr_name(!0)+"-init")||this.settings;if(c=b.find(g.act_on_hidden_el?f?"["+this.attr_name()+'-watch="'+f+'"]':"["+this.attr_name()+"-watch]":f?"["+this.attr_name()+'-watch="'+f+'"]:visible':"["+this.attr_name()+"-watch]:visible"),0!==c.length&&(g.before_height_change(),b.trigger("before-height-change.fndth.equalizer"),c.height("inherit"),g.equalize_on_stack!==!1||(d=c.first().offset().top,c.each(function(){return a(this).offset().top!==d?(e=!0,!1):void 0}),!e))){var h=c.map(function(){return a(this).outerHeight(!1)}).get();if(g.use_tallest){var i=Math.max.apply(null,h);c.css("height",i)}else{var j=Math.min.apply(null,h);c.css("height",j)}g.after_height_change(),b.trigger("after-height-change.fndtn.equalizer")}},reflow:function(){var b=this;this.S("["+this.attr_name()+"]",this.scope).each(function(){var c=a(this),d=c.data("equalizer-mq"),e=!0;d&&(d="is_"+d.replace(/-/g,"_"),Foundation.utils.hasOwnProperty(d)&&(e=!1)),b.image_loaded(b.S("img",this),function(){if(e||Foundation.utils[d]())b.equalize(c);else{var a=c.find("["+b.attr_name()+"-watch]:visible");a.css("height","auto")}})})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.interchange={name:"interchange",version:"5.5.2",cache:{},images_loaded:!1,nodes_loaded:!1,settings:{load_attr:"interchange",named_queries:{"default":"only screen",small:Foundation.media_queries.small,"small-only":Foundation.media_queries["small-only"],medium:Foundation.media_queries.medium,"medium-only":Foundation.media_queries["medium-only"],large:Foundation.media_queries.large,"large-only":Foundation.media_queries["large-only"],xlarge:Foundation.media_queries.xlarge,"xlarge-only":Foundation.media_queries["xlarge-only"],xxlarge:Foundation.media_queries.xxlarge,landscape:"only screen and (orientation: landscape)",portrait:"only screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx)"},directives:{replace:function(b,c,d){if(null!==b&&/IMG/.test(b[0].nodeName)){var e=b[0].src;if(new RegExp(c,"i").test(e))return;return b.attr("src",c),d(b[0].src)}var f=b.data(this.data_attr+"-last-path"),g=this;if(f!=c)return/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(c)?(a(b).css("background-image","url("+c+")"),b.data("interchange-last-path",c),d(c)):a.get(c,function(a){b.html(a),b.data(g.data_attr+"-last-path",c),d()})}}},init:function(b,c,d){Foundation.inherit(this,"throttle random_str"),this.data_attr=this.set_data_attr(),a.extend(!0,this.settings,c,d),this.bindings(c,d),this.reflow()},get_media_hash:function(){var a="";for(var b in this.settings.named_queries)a+=matchMedia(this.settings.named_queries[b]).matches.toString();return a},events:function(){var c,d=this;return a(b).off(".interchange").on("resize.fndtn.interchange",d.throttle(function(){var a=d.get_media_hash();a!==c&&d.resize(),c=a},50)),this},resize:function(){var b=this.cache;if(!this.images_loaded||!this.nodes_loaded)return void setTimeout(a.proxy(this.resize,this),50);for(var c in b)if(b.hasOwnProperty(c)){var d=this.results(c,b[c]);d&&this.settings.directives[d.scenario[1]].call(this,d.el,d.scenario[0],function(a){if(arguments[0]instanceof Array)var b=arguments[0];else var b=Array.prototype.slice.call(arguments,0);return function(){a.el.trigger(a.scenario[1],b)}}(d))}},results:function(a,b){var c=b.length;if(c>0)for(var d=this.S("["+this.add_namespace("data-uuid")+'="'+a+'"]');c--;){var e,f=b[c][2];if(e=matchMedia(this.settings.named_queries.hasOwnProperty(f)?this.settings.named_queries[f]:f),e.matches)return{el:d,scenario:b[c]}}return!1},load:function(a,b){return("undefined"==typeof this["cached_"+a]||b)&&this["update_"+a](),this["cached_"+a]},update_images:function(){var a=this.S("img["+this.data_attr+"]"),b=a.length,c=b,d=0,e=this.data_attr;for(this.cache={},this.cached_images=[],this.images_loaded=0===b;c--;){if(d++,a[c]){var f=a[c].getAttribute(e)||"";f.length>0&&this.cached_images.push(a[c])}d===b&&(this.images_loaded=!0,this.enhance("images"))}return this},update_nodes:function(){var a=this.S("["+this.data_attr+"]").not("img"),b=a.length,c=b,d=0,e=this.data_attr;for(this.cached_nodes=[],this.nodes_loaded=0===b;c--;){d++;var f=a[c].getAttribute(e)||"";f.length>0&&this.cached_nodes.push(a[c]),d===b&&(this.nodes_loaded=!0,this.enhance("nodes"))}return this},enhance:function(c){for(var d=this["cached_"+c].length;d--;)this.object(a(this["cached_"+c][d]));return a(b).trigger("resize.fndtn.interchange")},convert_directive:function(a){var b=this.trim(a);return b.length>0?b:"replace"},parse_scenario:function(a){var b=a[0].match(/(.+),\s*(\w+)\s*$/),c=a[1].match(/(.*)\)/);if(b)var d=b[1],e=b[2];else var f=a[0].split(/,\s*$/),d=f[0],e="";return[this.trim(d),this.convert_directive(e),this.trim(c[1])]},object:function(a){var b=this.parse_data_attr(a),c=[],d=b.length;if(d>0)for(;d--;){var e=b[d].split(/,\s?\(/);if(e.length>1){var f=this.parse_scenario(e);c.push(f)}}return this.store(a,c)},store:function(a,b){var c=this.random_str(),d=a.data(this.add_namespace("uuid",!0));return this.cache[d]?this.cache[d]:(a.attr(this.add_namespace("data-uuid"),c),this.cache[c]=b)},trim:function(b){return"string"==typeof b?a.trim(b):b},set_data_attr:function(a){return a?this.namespace.length>0?this.namespace+"-"+this.settings.load_attr:this.settings.load_attr:this.namespace.length>0?"data-"+this.namespace+"-"+this.settings.load_attr:"data-"+this.settings.load_attr},parse_data_attr:function(a){for(var b=a.attr(this.attr_name()).split(/\[(.*?)\]/),c=b.length,d=[];c--;)b[c].replace(/[\W\d]+/,"").length>4&&d.push(b[c]);return d},reflow:function(){this.load("images",!0),this.load("nodes",!0)}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.joyride={name:"joyride",version:"5.5.2",defaults:{expose:!1,modal:!0,keyboard:!0,tip_location:"bottom",nub_position:"auto",scroll_speed:1500,scroll_animation:"linear",timer:0,start_timer_on_click:!0,start_offset:0,next_button:!0,prev_button:!0,tip_animation:"fade",pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:!1,cookie_name:"joyride",cookie_domain:!1,cookie_expires:365,tip_container:"body",abort_on_close:!0,tip_location_patterns:{top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'<a href="#close" class="joyride-close-tip">×</a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',tip:'<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',wrapper:'<div class="joyride-content-wrapper"></div>',button:'<a href="#" class="small button joyride-next-tip"></a>',prev_button:'<a href="#" class="small button joyride-prev-tip"></a>',modal:'<div class="joyride-modal-bg"></div>',expose:'<div class="joyride-expose-wrapper"></div>',expose_cover:'<div class="joyride-expose-cover"></div>'},expose_add_class:""},init:function(b,c,d){Foundation.inherit(this,"throttle random_str"),this.settings=this.settings||a.extend({},this.defaults,d||c),this.bindings(c,d)},go_next:function(){this.settings.$li.next().length<1?this.end():this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(),this.startTimer()):(this.hide(),this.show())},go_prev:function(){this.settings.$li.prev().length<1||(this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(null,!0),this.startTimer()):(this.hide(),this.show(null,!0)))},events:function(){var c=this;a(this.scope).off(".joyride").on("click.fndtn.joyride",".joyride-next-tip, .joyride-modal-bg",function(a){a.preventDefault(),this.go_next()}.bind(this)).on("click.fndtn.joyride",".joyride-prev-tip",function(a){a.preventDefault(),this.go_prev()}.bind(this)).on("click.fndtn.joyride",".joyride-close-tip",function(a){a.preventDefault(),this.end(this.settings.abort_on_close)}.bind(this)).on("keyup.fndtn.joyride",function(a){if(this.settings.keyboard&&this.settings.riding)switch(a.which){case 39:a.preventDefault(),this.go_next();break;case 37:a.preventDefault(),this.go_prev();break;case 27:a.preventDefault(),this.end(this.settings.abort_on_close)}}.bind(this)),a(b).off(".joyride").on("resize.fndtn.joyride",c.throttle(function(){if(a("["+c.attr_name()+"]").length>0&&c.settings.$next_tip&&c.settings.riding){if(c.settings.exposed.length>0){var b=a(c.settings.exposed);b.each(function(){var b=a(this);c.un_expose(b),c.expose(b)})}c.is_phone()?c.pos_phone():c.pos_default(!1)}},100))},start:function(){var b=this,c=a("["+this.attr_name()+"]",this.scope),d=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],e=d.length;!c.length>0||(this.settings.init||this.events(),this.settings=c.data(this.attr_name(!0)+"-init"),this.settings.$content_el=c,this.settings.$body=a(this.settings.tip_container),this.settings.body_offset=a(this.settings.tip_container).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,this.settings.riding=!0,"function"!=typeof a.cookie&&(this.settings.cookie_monster=!1),(!this.settings.cookie_monster||this.settings.cookie_monster&&!a.cookie(this.settings.cookie_name))&&(this.settings.$tip_content.each(function(c){var f=a(this);this.settings=a.extend({},b.defaults,b.data_options(f));for(var g=e;g--;)b.settings[d[g]]=parseInt(b.settings[d[g]],10);b.create({$li:f,index:c})}),!this.settings.start_timer_on_click&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init")))},resume:function(){this.set_li(),this.show()},tip_template:function(b){var c,d;return b.tip_class=b.tip_class||"",c=a(this.settings.template.tip).addClass(b.tip_class),d=a.trim(a(b.li).html())+this.prev_button_text(b.prev_button_text,b.index)+this.button_text(b.button_text)+this.settings.template.link+this.timer_instance(b.index),c.append(a(this.settings.template.wrapper)),c.first().attr(this.add_namespace("data-index"),b.index),a(".joyride-content-wrapper",c).append(d),c[0]},timer_instance:function(b){var c;return c=0===b&&this.settings.start_timer_on_click&&this.settings.timer>0||0===this.settings.timer?"":a(this.settings.template.timer)[0].outerHTML},button_text:function(b){return this.settings.tip_settings.next_button?(b=a.trim(b)||"Next",b=a(this.settings.template.button).append(b)[0].outerHTML):b="",b},prev_button_text:function(b,c){return this.settings.tip_settings.prev_button?(b=a.trim(b)||"Previous",b=0==c?a(this.settings.template.prev_button).append(b).addClass("disabled")[0].outerHTML:a(this.settings.template.prev_button).append(b)[0].outerHTML):b="",b},create:function(b){this.settings.tip_settings=a.extend({},this.settings,this.data_options(b.$li));var c=b.$li.attr(this.add_namespace("data-button"))||b.$li.attr(this.add_namespace("data-text")),d=b.$li.attr(this.add_namespace("data-button-prev"))||b.$li.attr(this.add_namespace("data-prev-text")),e=b.$li.attr("class"),f=a(this.tip_template({tip_class:e,index:b.index,button_text:c,prev_button_text:d,li:b.$li}));a(this.settings.tip_container).append(f)},show:function(b,c){var e=null;if(this.settings.$li===d||-1===a.inArray(this.settings.$li.index(),this.settings.pause_after))if(this.settings.paused?this.settings.paused=!1:this.set_li(b,c),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0){if(b&&(this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tip_settings=a.extend({},this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location],!/body/i.test(this.settings.$target.selector)){var f=a(".joyride-modal-bg");/pop/i.test(this.settings.tipAnimation)?f.hide():f.fadeOut(this.settings.tipAnimationFadeSpeed),this.scroll_to()}this.is_phone()?this.pos_phone(!0):this.pos_default(!0),e=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tip_animation)?(e.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),setTimeout(function(){e.animate({width:e.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tip_animation)&&(e.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show(),setTimeout(function(){e.animate({width:e.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed)),this.settings.$current_tip=this.settings.$next_tip}else this.settings.$li&&this.settings.$target.length<1?this.show(b,c):this.end();else this.settings.paused=!0},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.modal||a(".joyride-modal-bg").hide(),this.settings.$current_tip.css("visibility","hidden"),setTimeout(a.proxy(function(){this.hide(),this.css("visibility","visible")},this.settings.$current_tip),0),this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(a,b){a?(this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset),this.set_next_tip(),this.settings.$current_tip=this.settings.$next_tip):(b?this.settings.$li=this.settings.$li.prev():this.settings.$li=this.settings.$li.next(),this.set_next_tip()),this.set_target()},set_next_tip:function(){this.settings.$next_tip=a(".joyride-tip-guide").eq(this.settings.$li.index()),this.settings.$next_tip.data("closed","")},set_target:function(){var b=this.settings.$li.attr(this.add_namespace("data-class")),d=this.settings.$li.attr(this.add_namespace("data-id")),e=function(){return d?a(c.getElementById(d)):b?a("."+b).first():a("body")};this.settings.$target=e()},scroll_to:function(){var c,d;c=a(b).height()/2,d=Math.ceil(this.settings.$target.offset().top-c+this.settings.$next_tip.outerHeight()),0!=d&&a("html, body").stop().animate({scrollTop:d},this.settings.scroll_speed,"swing")},paused:function(){return-1===a.inArray(this.settings.$li.index()+1,this.settings.pause_after)},restart:function(){this.hide(),this.settings.$li=d,this.show("init")},pos_default:function(a){var b=this.settings.$next_tip.find(".joyride-nub"),c=Math.ceil(b.outerWidth()/2),d=Math.ceil(b.outerHeight()/2),e=a||!1;if(e&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector))this.settings.$li.length&&this.pos_modal(b);else{var f=this.settings.tip_settings.tipAdjustmentY?parseInt(this.settings.tip_settings.tipAdjustmentY):0,g=this.settings.tip_settings.tipAdjustmentX?parseInt(this.settings.tip_settings.tipAdjustmentX):0;this.bottom()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top+d+this.settings.$target.outerHeight()+f,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()+g}:{top:this.settings.$target.offset().top+d+this.settings.$target.outerHeight()+f,left:this.settings.$target.offset().left+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"top")):this.top()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-d+f,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}:{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-d+f,left:this.settings.$target.offset().left+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"bottom")):this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top+f,left:this.settings.$target.outerWidth()+this.settings.$target.offset().left+c+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top+f,left:this.settings.$target.offset().left-this.settings.$next_tip.outerWidth()-c+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"right")),!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tip_settings.tip_location_pattern.length&&(b.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),this.settings.tip_settings.tip_location=this.settings.tip_settings.tip_location_pattern[this.settings.attempts],this.settings.attempts++,this.pos_default())}e&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_phone:function(b){var c=this.settings.$next_tip.outerHeight(),d=(this.settings.$next_tip.offset(),this.settings.$target.outerHeight()),e=a(".joyride-nub",this.settings.$next_tip),f=Math.ceil(e.outerHeight()/2),g=b||!1;e.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),g&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(e):this.top()?(this.settings.$next_tip.offset({top:this.settings.$target.offset().top-c-f}),e.addClass("bottom")):(this.settings.$next_tip.offset({top:this.settings.$target.offset().top+d+f}),e.addClass("top")),g&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_modal:function(a){this.center(),a.hide(),this.show_modal()},show_modal:function(){if(!this.settings.$next_tip.data("closed")){var b=a(".joyride-modal-bg");if(b.length<1){var b=a(this.settings.template.modal);b.appendTo("body")}/pop/i.test(this.settings.tip_animation)?b.show():b.fadeIn(this.settings.tip_animation_fade_speed)}},expose:function(){var c,d,e,f,g,h="expose-"+this.random_str(6);if(arguments.length>0&&arguments[0]instanceof a)e=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;e=this.settings.$target}return e.length<1?(b.console&&console.error("element not valid",e),!1):(c=a(this.settings.template.expose),this.settings.$body.append(c),c.css({top:e.offset().top,left:e.offset().left,width:e.outerWidth(!0),height:e.outerHeight(!0)}),d=a(this.settings.template.expose_cover),f={zIndex:e.css("z-index"),position:e.css("position")},g=null==e.attr("class")?"":e.attr("class"),e.css("z-index",parseInt(c.css("z-index"))+1),"static"==f.position&&e.css("position","relative"),e.data("expose-css",f),e.data("orig-class",g),e.attr("class",g+" "+this.settings.expose_add_class),d.css({top:e.offset().top,left:e.offset().left,width:e.outerWidth(!0),height:e.outerHeight(!0)}),this.settings.modal&&this.show_modal(),this.settings.$body.append(d),c.addClass(h),d.addClass(h),e.data("expose",h),this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,e),void this.add_exposed(e))},un_expose:function(){var c,d,e,f,g,h=!1;if(arguments.length>0&&arguments[0]instanceof a)d=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;d=this.settings.$target}return d.length<1?(b.console&&console.error("element not valid",d),!1):(c=d.data("expose"),e=a("."+c),arguments.length>1&&(h=arguments[1]),h===!0?a(".joyride-expose-wrapper,.joyride-expose-cover").remove():e.remove(),f=d.data("expose-css"),"auto"==f.zIndex?d.css("z-index",""):d.css("z-index",f.zIndex),f.position!=d.css("position")&&("static"==f.position?d.css("position",""):d.css("position",f.position)),g=d.data("orig-class"),d.attr("class",g),d.removeData("orig-classes"),d.removeData("expose"),d.removeData("expose-z-index"),void this.remove_exposed(d))},add_exposed:function(b){this.settings.exposed=this.settings.exposed||[],b instanceof a||"object"==typeof b?this.settings.exposed.push(b[0]):"string"==typeof b&&this.settings.exposed.push(b)},remove_exposed:function(b){var c,d;for(b instanceof a?c=b[0]:"string"==typeof b&&(c=b),this.settings.exposed=this.settings.exposed||[],d=this.settings.exposed.length;d--;)if(this.settings.exposed[d]==c)return void this.settings.exposed.splice(d,1)},center:function(){var c=a(b);return this.settings.$next_tip.css({top:(c.height()-this.settings.$next_tip.outerHeight())/2+c.scrollTop(),left:(c.width()-this.settings.$next_tip.outerWidth())/2+c.scrollLeft()}),!0},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location)},top:function(){return/top/i.test(this.settings.tip_settings.tip_location)},right:function(){return/right/i.test(this.settings.tip_settings.tip_location)},left:function(){return/left/i.test(this.settings.tip_settings.tip_location)},corners:function(c){var d=a(b),e=d.height()/2,f=Math.ceil(this.settings.$target.offset().top-e+this.settings.$next_tip.outerHeight()),g=d.width()+d.scrollLeft(),h=d.height()+f,i=d.height()+d.scrollTop(),j=d.scrollTop();return j>f&&(j=0>f?0:f),h>i&&(i=h),[c.offset().top<j,g<c.offset().left+c.outerWidth(),i<c.offset().top+c.outerHeight(),d.scrollLeft()>c.offset().left]},visible:function(a){for(var b=a.length;b--;)if(a[b])return!1;return!0},nub_position:function(a,b,c){a.addClass("auto"===b?c:b)},startTimer:function(){this.settings.$li.length?this.settings.automate=setTimeout(function(){this.hide(),this.show(),this.startTimer()}.bind(this),this.settings.timer):clearTimeout(this.settings.automate)},end:function(b){this.settings.cookie_monster&&a.cookie(this.settings.cookie_name,"ridden",{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain}),this.settings.timer>0&&clearTimeout(this.settings.automate),this.settings.modal&&this.settings.expose&&this.un_expose(),a(this.scope).off("keyup.joyride"),this.settings.$next_tip.data("closed",!0),this.settings.riding=!1,a(".joyride-modal-bg").hide(),this.settings.$current_tip.hide(),("undefined"==typeof b||b===!1)&&(this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip),this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip)),a(".joyride-tip-guide").remove()},off:function(){a(this.scope).off(".joyride"),a(b).off(".joyride"),a(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride"),a(".joyride-tip-guide, .joyride-modal-bg").remove(),clearTimeout(this.settings.automate),this.settings={}},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs["magellan-expedition"]={name:"magellan-expedition",version:"5.5.2",settings:{active_class:"active",threshold:0,destination_threshold:20,throttle_delay:30,fixed_top:0,offset_by_height:!0,duration:700,easing:"swing"},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c)},events:function(){var b=this,c=b.S,d=b.settings;b.set_expedition_position(),c(b.scope).off(".magellan").on("click.fndtn.magellan","["+b.add_namespace("data-magellan-arrival")+"] a[href*=#]",function(c){var d=this.hostname===location.hostname||!this.hostname,e=b.filterPathname(location.pathname)===b.filterPathname(this.pathname),f=this.hash.replace(/(:|\.|\/)/g,"\\$1"),g=this;if(d&&e&&f){c.preventDefault();var h=a(this).closest("["+b.attr_name()+"]"),i=h.data("magellan-expedition-init"),j=this.hash.split("#").join(""),k=a('a[name="'+j+'"]');0===k.length&&(k=a("#"+j));var l=k.offset().top-i.destination_threshold+1;i.offset_by_height&&(l-=h.outerHeight()),a("html, body").stop().animate({scrollTop:l},i.duration,i.easing,function(){history.pushState?history.pushState(null,null,g.pathname+"#"+j):location.hash=g.pathname+"#"+j})}}).on("scroll.fndtn.magellan",b.throttle(this.check_for_arrivals.bind(this),d.throttle_delay))},check_for_arrivals:function(){var a=this;a.update_arrivals(),a.update_expedition_positions()},set_expedition_position:function(){var b=this;a("["+this.attr_name()+"=fixed]",b.scope).each(function(c,d){var e,f,g=a(this),h=g.data("magellan-expedition-init"),i=g.attr("styles");g.attr("style",""),e=g.offset().top+h.threshold,f=parseInt(g.data("magellan-fixed-top")),isNaN(f)||(b.settings.fixed_top=f),g.data(b.data_attr("magellan-top-offset"),e),g.attr("style",i)})},update_expedition_positions:function(){var c=this,d=a(b).scrollTop();a("["+this.attr_name()+"=fixed]",c.scope).each(function(){var b=a(this),e=b.data("magellan-expedition-init"),f=b.attr("style"),g=b.data("magellan-top-offset");if(d+c.settings.fixed_top>=g){var h=b.prev("["+c.add_namespace("data-magellan-expedition-clone")+"]");0===h.length&&(h=b.clone(),h.removeAttr(c.attr_name()),h.attr(c.add_namespace("data-magellan-expedition-clone"),""),b.before(h)),b.css({position:"fixed",top:e.fixed_top}).addClass("fixed")}else b.prev("["+c.add_namespace("data-magellan-expedition-clone")+"]").remove(),b.attr("style",f).css("position","").css("top","").removeClass("fixed")})},update_arrivals:function(){var c=this,d=a(b).scrollTop();a("["+this.attr_name()+"]",c.scope).each(function(){var b=a(this),e=b.data(c.attr_name(!0)+"-init"),f=c.offsets(b,d),g=b.find("["+c.add_namespace("data-magellan-arrival")+"]"),h=!1;f.each(function(a,d){if(d.viewport_offset>=d.top_offset){var f=b.find("["+c.add_namespace("data-magellan-arrival")+"]");return f.not(d.arrival).removeClass(e.active_class),d.arrival.addClass(e.active_class),h=!0,!0}}),h||g.removeClass(e.active_class)})},offsets:function(b,c){var d=this,e=b.data(d.attr_name(!0)+"-init"),f=c;return b.find("["+d.add_namespace("data-magellan-arrival")+"]").map(function(c,g){var h=a(this).data(d.data_attr("magellan-arrival")),i=a("["+d.add_namespace("data-magellan-destination")+"="+h+"]");if(i.length>0){var j=i.offset().top-e.destination_threshold;return e.offset_by_height&&(j-=b.outerHeight()),j=Math.floor(j),{destination:i,arrival:a(this),top_offset:j,viewport_offset:f}}}).sort(function(a,b){return a.top_offset<b.top_offset?-1:a.top_offset>b.top_offset?1:0})},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},off:function(){this.S(this.scope).off(".magellan"),this.S(b).off(".magellan")},filterPathname:function(a){return a=a||"",a.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},reflow:function(){var b=this;a("["+b.add_namespace("data-magellan-expedition-clone")+"]",b.scope).remove()}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.offcanvas={name:"offcanvas",version:"5.5.2",settings:{open_method:"move",close_on_click:!1},init:function(a,b,c){this.bindings(b,c)},events:function(){var b=this,c=b.S,d="",e="",f="";"move"===this.settings.open_method?(d="move-",e="right",f="left"):"overlap_single"===this.settings.open_method?(d="offcanvas-overlap-",e="right",f="left"):"overlap"===this.settings.open_method&&(d="offcanvas-overlap"),c(this.scope).off(".offcanvas").on("click.fndtn.offcanvas",".left-off-canvas-toggle",function(f){b.click_toggle_class(f,d+e),"overlap"!==b.settings.open_method&&c(".left-submenu").removeClass(d+e),a(".left-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".left-off-canvas-menu a",function(f){var g=b.get_settings(f),h=c(this).parent();!g.close_on_click||h.hasClass("has-submenu")||h.hasClass("back")?c(this).parent().hasClass("has-submenu")?(f.preventDefault(),c(this).siblings(".left-submenu").toggleClass(d+e)):h.hasClass("back")&&(f.preventDefault(),h.parent().removeClass(d+e)):(b.hide.call(b,d+e,b.get_wrapper(f)),h.parent().removeClass(d+e)),a(".left-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".right-off-canvas-toggle",function(e){b.click_toggle_class(e,d+f),"overlap"!==b.settings.open_method&&c(".right-submenu").removeClass(d+f),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".right-off-canvas-menu a",function(e){var g=b.get_settings(e),h=c(this).parent();!g.close_on_click||h.hasClass("has-submenu")||h.hasClass("back")?c(this).parent().hasClass("has-submenu")?(e.preventDefault(),c(this).siblings(".right-submenu").toggleClass(d+f)):h.hasClass("back")&&(e.preventDefault(),h.parent().removeClass(d+f)):(b.hide.call(b,d+f,b.get_wrapper(e)),h.parent().removeClass(d+f)),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(g){b.click_remove_class(g,d+f),c(".right-submenu").removeClass(d+f),e&&(b.click_remove_class(g,d+e),c(".left-submenu").removeClass(d+f)),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(c){b.click_remove_class(c,d+f),a(".left-off-canvas-toggle").attr("aria-expanded","false"),e&&(b.click_remove_class(c,d+e),a(".right-off-canvas-toggle").attr("aria-expanded","false"))})},toggle:function(a,b){b=b||this.get_wrapper(),b.is("."+a)?this.hide(a,b):this.show(a,b)},show:function(a,b){b=b||this.get_wrapper(),b.trigger("open.fndtn.offcanvas"),b.addClass(a)},hide:function(a,b){b=b||this.get_wrapper(),b.trigger("close.fndtn.offcanvas"),b.removeClass(a)},click_toggle_class:function(a,b){
+a.preventDefault();var c=this.get_wrapper(a);this.toggle(b,c)},click_remove_class:function(a,b){a.preventDefault();var c=this.get_wrapper(a);this.hide(b,c)},get_settings:function(a){var b=this.S(a.target).closest("["+this.attr_name()+"]");return b.data(this.attr_name(!0)+"-init")||this.settings},get_wrapper:function(a){var b=this.S(a?a.target:this.scope).closest(".off-canvas-wrap");return 0===b.length&&(b=this.S(".off-canvas-wrap")),b},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";var e=function(){},f=function(e,f){if(e.hasClass(f.slides_container_class))return this;var j,k,l,m,n,o,p=this,q=e,r=0,s=!1;p.slides=function(){return q.children(f.slide_selector)},p.slides().first().addClass(f.active_slide_class),p.update_slide_number=function(b){f.slide_number&&(k.find("span:first").text(parseInt(b)+1),k.find("span:last").text(p.slides().length)),f.bullets&&(l.children().removeClass(f.bullets_active_class),a(l.children().get(b)).addClass(f.bullets_active_class))},p.update_active_link=function(b){var c=a('[data-orbit-link="'+p.slides().eq(b).attr("data-orbit-slide")+'"]');c.siblings().removeClass(f.bullets_active_class),c.addClass(f.bullets_active_class)},p.build_markup=function(){q.wrap('<div class="'+f.container_class+'"></div>'),j=q.parent(),q.addClass(f.slides_container_class),f.stack_on_small&&j.addClass(f.stack_on_small_class),f.navigation_arrows&&(j.append(a('<a href="#"><span></span></a>').addClass(f.prev_class)),j.append(a('<a href="#"><span></span></a>').addClass(f.next_class))),f.timer&&(m=a("<div>").addClass(f.timer_container_class),m.append("<span>"),m.append(a("<div>").addClass(f.timer_progress_class)),m.addClass(f.timer_paused_class),j.append(m)),f.slide_number&&(k=a("<div>").addClass(f.slide_number_class),k.append("<span></span> "+f.slide_number_text+" <span></span>"),j.append(k)),f.bullets&&(l=a("<ol>").addClass(f.bullets_container_class),j.append(l),l.wrap('<div class="orbit-bullets-container"></div>'),p.slides().each(function(b,c){var d=a("<li>").attr("data-orbit-slide",b).on("click",p.link_bullet);l.append(d)}))},p._goto=function(b,c){if(b===r)return!1;"object"==typeof o&&o.restart();var d=p.slides(),e="next";if(s=!0,r>b&&(e="prev"),b>=d.length){if(!f.circular)return!1;b=0}else if(0>b){if(!f.circular)return!1;b=d.length-1}var g=a(d.get(r)),h=a(d.get(b));g.css("zIndex",2),g.removeClass(f.active_slide_class),h.css("zIndex",4).addClass(f.active_slide_class),q.trigger("before-slide-change.fndtn.orbit"),f.before_slide_change(),p.update_active_link(b);var i=function(){var a=function(){r=b,s=!1,c===!0&&(o=p.create_timer(),o.start()),p.update_slide_number(r),q.trigger("after-slide-change.fndtn.orbit",[{slide_number:r,total_slides:d.length}]),f.after_slide_change(r,d.length)};q.outerHeight()!=h.outerHeight()&&f.variable_height?q.animate({height:h.outerHeight()},250,"linear",a):a()};if(1===d.length)return i(),!1;var j=function(){"next"===e&&n.next(g,h,i),"prev"===e&&n.prev(g,h,i)};h.outerHeight()>q.outerHeight()&&f.variable_height?q.animate({height:h.outerHeight()},250,"linear",j):j()},p.next=function(a){a.stopImmediatePropagation(),a.preventDefault(),p._goto(r+1)},p.prev=function(a){a.stopImmediatePropagation(),a.preventDefault(),p._goto(r-1)},p.link_custom=function(b){b.preventDefault();var c=a(this).attr("data-orbit-link");if("string"==typeof c&&""!=(c=a.trim(c))){var d=j.find("[data-orbit-slide="+c+"]");-1!=d.index()&&p._goto(d.index())}},p.link_bullet=function(b){var c=a(this).attr("data-orbit-slide");if("string"==typeof c&&""!=(c=a.trim(c)))if(isNaN(parseInt(c))){var d=j.find("[data-orbit-slide="+c+"]");-1!=d.index()&&p._goto(d.index()+1)}else p._goto(parseInt(c))},p.timer_callback=function(){p._goto(r+1,!0)},p.compute_dimensions=function(){var b=a(p.slides().get(r)),c=b.outerHeight();f.variable_height||p.slides().each(function(){a(this).outerHeight()>c&&(c=a(this).outerHeight())}),q.height(c)},p.create_timer=function(){var a=new g(j.find("."+f.timer_container_class),f,p.timer_callback);return a},p.stop_timer=function(){"object"==typeof o&&o.stop()},p.toggle_timer=function(){var a=j.find("."+f.timer_container_class);a.hasClass(f.timer_paused_class)?("undefined"==typeof o&&(o=p.create_timer()),o.start()):"object"==typeof o&&o.stop()},p.init=function(){p.build_markup(),f.timer&&(o=p.create_timer(),Foundation.utils.image_loaded(this.slides().children("img"),o.start)),n=new i(f,q),"slide"===f.animation&&(n=new h(f,q)),j.on("click","."+f.next_class,p.next),j.on("click","."+f.prev_class,p.prev),f.next_on_click&&j.on("click","."+f.slides_container_class+" [data-orbit-slide]",p.link_bullet),j.on("click",p.toggle_timer),f.swipe&&j.on("touchstart.fndtn.orbit",function(a){a.touches||(a=a.originalEvent);var b={start_page_x:a.touches[0].pageX,start_page_y:a.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:d};j.data("swipe-transition",b),a.stopPropagation()}).on("touchmove.fndtn.orbit",function(a){if(a.touches||(a=a.originalEvent),!(a.touches.length>1||a.scale&&1!==a.scale)){var b=j.data("swipe-transition");if("undefined"==typeof b&&(b={}),b.delta_x=a.touches[0].pageX-b.start_page_x,"undefined"==typeof b.is_scrolling&&(b.is_scrolling=!!(b.is_scrolling||Math.abs(b.delta_x)<Math.abs(a.touches[0].pageY-b.start_page_y))),!b.is_scrolling&&!b.active){a.preventDefault();var c=b.delta_x<0?r+1:r-1;b.active=!0,p._goto(c)}}}).on("touchend.fndtn.orbit",function(a){j.data("swipe-transition",{}),a.stopPropagation()}),j.on("mouseenter.fndtn.orbit",function(a){f.timer&&f.pause_on_hover&&p.stop_timer()}).on("mouseleave.fndtn.orbit",function(a){f.timer&&f.resume_on_mouseout&&o.start()}),a(c).on("click","[data-orbit-link]",p.link_custom),a(b).on("load resize",p.compute_dimensions),Foundation.utils.image_loaded(this.slides().children("img"),p.compute_dimensions),Foundation.utils.image_loaded(this.slides().children("img"),function(){j.prev("."+f.preloader_class).css("display","none"),p.update_slide_number(0),p.update_active_link(0),q.trigger("ready.fndtn.orbit")})},p.init()},g=function(a,b,c){var d,e,f=this,g=b.timer_speed,h=a.find("."+b.timer_progress_class),i=-1;this.update_progress=function(a){var b=h.clone();b.attr("style",""),b.css("width",a+"%"),h.replaceWith(b),h=b},this.restart=function(){clearTimeout(e),a.addClass(b.timer_paused_class),i=-1,f.update_progress(0)},this.start=function(){return a.hasClass(b.timer_paused_class)?(i=-1===i?g:i,a.removeClass(b.timer_paused_class),d=(new Date).getTime(),h.animate({width:"100%"},i,"linear"),e=setTimeout(function(){f.restart(),c()},i),void a.trigger("timer-started.fndtn.orbit")):!0},this.stop=function(){if(a.hasClass(b.timer_paused_class))return!0;clearTimeout(e),a.addClass(b.timer_paused_class);var c=(new Date).getTime();i-=c-d;var h=100-i/g*100;f.update_progress(h),a.trigger("timer-stopped.fndtn.orbit")}},h=function(b,c){var d=b.animation_speed,e=1===a("html[dir=rtl]").length,f=e?"marginRight":"marginLeft",g={};g[f]="0%",this.next=function(a,b,c){a.animate({marginLeft:"-100%"},d),b.animate(g,d,function(){a.css(f,"100%"),c()})},this.prev=function(a,b,c){a.animate({marginLeft:"100%"},d),b.css(f,"-100%"),b.animate(g,d,function(){a.css(f,"100%"),c()})}},i=function(b,c){{var d=b.animation_speed;1===a("html[dir=rtl]").length}this.next=function(a,b,c){b.css({margin:"0%",opacity:"0.01"}),b.animate({opacity:"1"},d,"linear",function(){a.css("margin","100%"),c()})},this.prev=function(a,b,c){b.css({margin:"0%",opacity:"0.01"}),b.animate({opacity:"1"},d,"linear",function(){a.css("margin","100%"),c()})}};Foundation.libs=Foundation.libs||{},Foundation.libs.orbit={name:"orbit",version:"5.5.2",settings:{animation:"slide",timer_speed:1e4,pause_on_hover:!0,resume_on_mouseout:!1,next_on_click:!0,animation_speed:500,stack_on_small:!1,navigation_arrows:!0,slide_number:!0,slide_number_text:"of",container_class:"orbit-container",stack_on_small_class:"orbit-stack-on-small",next_class:"orbit-next",prev_class:"orbit-prev",timer_container_class:"orbit-timer",timer_paused_class:"paused",timer_progress_class:"orbit-progress",slides_container_class:"orbit-slides-container",preloader_class:"preloader",slide_selector:"*",bullets_container_class:"orbit-bullets",bullets_active_class:"active",slide_number_class:"orbit-slide-number",caption_class:"orbit-caption",active_slide_class:"active",orbit_transition_class:"orbit-transitioning",bullets:!0,circular:!0,timer:!0,variable_height:!1,swipe:!0,before_slide_change:e,after_slide_change:e},init:function(a,b,c){this.bindings(b,c)},events:function(a){var b=new f(this.S(a),this.S(a).data("orbit-init"));this.S(a).data(this.name+"-instance",b)},reflow:function(){var a=this;if(a.S(a.scope).is("[data-orbit]")){var b=a.S(a.scope),c=b.data(a.name+"-instance");c.compute_dimensions()}else a.S("[data-orbit]",a.scope).each(function(b,c){var d=a.S(c),e=(a.data_options(d),d.data(a.name+"-instance"));e.compute_dimensions()})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";function e(a){var b=/fade/i.test(a),c=/pop/i.test(a);return{animate:b||c,pop:c,fade:b}}Foundation.libs.reveal={name:"reveal",version:"5.5.2",locked:!1,settings:{animation:"fadeAndPop",animation_speed:250,close_on_background_click:!0,close_on_esc:!0,dismiss_modal_class:"close-reveal-modal",multiple_opened:!1,bg_class:"reveal-modal-bg",root_element:"body",open:function(){},opened:function(){},close:function(){},closed:function(){},on_ajax_error:a.noop,bg:a(".reveal-modal-bg"),css:{open:{opacity:0,visibility:"visible",display:"block"},close:{opacity:1,visibility:"hidden",display:"none"}}},init:function(b,c,d){a.extend(!0,this.settings,c,d),this.bindings(c,d)},events:function(a){var b=this,d=b.S;return d(this.scope).off(".reveal").on("click.fndtn.reveal","["+this.add_namespace("data-reveal-id")+"]:not([disabled])",function(a){if(a.preventDefault(),!b.locked){var c=d(this),e=c.data(b.data_attr("reveal-ajax")),f=c.data(b.data_attr("reveal-replace-content"));if(b.locked=!0,"undefined"==typeof e)b.open.call(b,c);else{var g=e===!0?c.attr("href"):e;b.open.call(b,c,{url:g},{replaceContentSel:f})}}}),d(c).on("click.fndtn.reveal",this.close_targets(),function(a){if(a.preventDefault(),!b.locked){var c=d("["+b.attr_name()+"].open").data(b.attr_name(!0)+"-init")||b.settings,e=d(a.target)[0]===d("."+c.bg_class)[0];if(e){if(!c.close_on_background_click)return;a.stopPropagation()}b.locked=!0,b.close.call(b,e?d("["+b.attr_name()+"].open:not(.toback)"):d(this).closest("["+b.attr_name()+"]"))}}),d("["+b.attr_name()+"]",this.scope).length>0?d(this.scope).on("open.fndtn.reveal",this.settings.open).on("opened.fndtn.reveal",this.settings.opened).on("opened.fndtn.reveal",this.open_video).on("close.fndtn.reveal",this.settings.close).on("closed.fndtn.reveal",this.settings.closed).on("closed.fndtn.reveal",this.close_video):d(this.scope).on("open.fndtn.reveal","["+b.attr_name()+"]",this.settings.open).on("opened.fndtn.reveal","["+b.attr_name()+"]",this.settings.opened).on("opened.fndtn.reveal","["+b.attr_name()+"]",this.open_video).on("close.fndtn.reveal","["+b.attr_name()+"]",this.settings.close).on("closed.fndtn.reveal","["+b.attr_name()+"]",this.settings.closed).on("closed.fndtn.reveal","["+b.attr_name()+"]",this.close_video),!0},key_up_on:function(a){var b=this;return b.S("body").off("keyup.fndtn.reveal").on("keyup.fndtn.reveal",function(a){var c=b.S("["+b.attr_name()+"].open"),d=c.data(b.attr_name(!0)+"-init")||b.settings;d&&27===a.which&&d.close_on_esc&&!b.locked&&b.close.call(b,c)}),!0},key_up_off:function(a){return this.S("body").off("keyup.fndtn.reveal"),!0},open:function(c,d){var e,f=this;c?"undefined"!=typeof c.selector?e=f.S("#"+c.data(f.data_attr("reveal-id"))).first():(e=f.S(this.scope),d=c):e=f.S(this.scope);var g=e.data(f.attr_name(!0)+"-init");if(g=g||this.settings,e.hasClass("open")&&c.attr("data-reveal-id")==e.attr("id"))return f.close(e);if(!e.hasClass("open")){var h=f.S("["+f.attr_name()+"].open");if("undefined"==typeof e.data("css-top")&&e.data("css-top",parseInt(e.css("top"),10)).data("offset",this.cache_offset(e)),e.attr("tabindex","0").attr("aria-hidden","false"),this.key_up_on(e),e.on("open.fndtn.reveal",function(a){"fndtn.reveal"!==a.namespace}),e.on("open.fndtn.reveal").trigger("open.fndtn.reveal"),h.length<1&&this.toggle_bg(e,!0),"string"==typeof d&&(d={url:d}),"undefined"!=typeof d&&d.url){var i="undefined"!=typeof d.success?d.success:null;a.extend(d,{success:function(b,c,d){if(a.isFunction(i)){var j=i(b,c,d);"string"==typeof j&&(b=j)}"undefined"!=typeof options&&"undefined"!=typeof options.replaceContentSel?e.find(options.replaceContentSel).html(b):e.html(b),f.S(e).foundation("section","reflow"),f.S(e).children().foundation(),h.length>0&&(g.multiple_opened?f.to_back(h):f.hide(h,g.css.close)),f.show(e,g.css.open)}}),g.on_ajax_error!==a.noop&&a.extend(d,{error:g.on_ajax_error}),a.ajax(d)}else h.length>0&&(g.multiple_opened?f.to_back(h):f.hide(h,g.css.close)),this.show(e,g.css.open)}f.S(b).trigger("resize")},close:function(b){var b=b&&b.length?b:this.S(this.scope),c=this.S("["+this.attr_name()+"].open"),d=b.data(this.attr_name(!0)+"-init")||this.settings,e=this;c.length>0&&(b.removeAttr("tabindex","0").attr("aria-hidden","true"),this.locked=!0,this.key_up_off(b),b.trigger("close.fndtn.reveal"),(d.multiple_opened&&1===c.length||!d.multiple_opened||b.length>1)&&(e.toggle_bg(b,!1),e.to_front(b)),d.multiple_opened?(e.hide(b,d.css.close,d),e.to_front(a(a.makeArray(c).reverse()[1]))):e.hide(c,d.css.close,d))},close_targets:function(){var a="."+this.settings.dismiss_modal_class;return this.settings.close_on_background_click?a+", ."+this.settings.bg_class:a},toggle_bg:function(b,c){0===this.S("."+this.settings.bg_class).length&&(this.settings.bg=a("<div />",{"class":this.settings.bg_class}).appendTo("body").hide());var e=this.settings.bg.filter(":visible").length>0;c!=e&&((c==d?e:!c)?this.hide(this.settings.bg):this.show(this.settings.bg))},show:function(c,d){if(d){var f=c.data(this.attr_name(!0)+"-init")||this.settings,g=f.root_element,h=this;if(0===c.parent(g).length){var i=c.wrap('<div style="display: none;" />').parent();c.on("closed.fndtn.reveal.wrapped",function(){c.detach().appendTo(i),c.unwrap().unbind("closed.fndtn.reveal.wrapped")}),c.detach().appendTo(g)}var j=e(f.animation);if(j.animate||(this.locked=!1),j.pop){d.top=a(b).scrollTop()-c.data("offset")+"px";var k={top:a(b).scrollTop()+c.data("css-top")+"px",opacity:1};return setTimeout(function(){return c.css(d).animate(k,f.animation_speed,"linear",function(){h.locked=!1,c.trigger("opened.fndtn.reveal")}).addClass("open")},f.animation_speed/2)}if(j.fade){d.top=a(b).scrollTop()+c.data("css-top")+"px";var k={opacity:1};return setTimeout(function(){return c.css(d).animate(k,f.animation_speed,"linear",function(){h.locked=!1,c.trigger("opened.fndtn.reveal")}).addClass("open")},f.animation_speed/2)}return c.css(d).show().css({opacity:1}).addClass("open").trigger("opened.fndtn.reveal")}var f=this.settings;return e(f.animation).fade?c.fadeIn(f.animation_speed/2):(this.locked=!1,c.show())},to_back:function(a){a.addClass("toback")},to_front:function(a){a.removeClass("toback")},hide:function(c,d){if(d){var f=c.data(this.attr_name(!0)+"-init"),g=this;f=f||this.settings;var h=e(f.animation);if(h.animate||(this.locked=!1),h.pop){var i={top:-a(b).scrollTop()-c.data("offset")+"px",opacity:0};return setTimeout(function(){return c.animate(i,f.animation_speed,"linear",function(){g.locked=!1,c.css(d).trigger("closed.fndtn.reveal")}).removeClass("open")},f.animation_speed/2)}if(h.fade){var i={opacity:0};return setTimeout(function(){return c.animate(i,f.animation_speed,"linear",function(){g.locked=!1,c.css(d).trigger("closed.fndtn.reveal")}).removeClass("open")},f.animation_speed/2)}return c.hide().css(d).removeClass("open").trigger("closed.fndtn.reveal")}var f=this.settings;return e(f.animation).fade?c.fadeOut(f.animation_speed/2):c.hide()},close_video:function(b){var c=a(".flex-video",b.target),d=a("iframe",c);d.length>0&&(d.attr("data-src",d[0].src),d.attr("src",d.attr("src")),c.hide())},open_video:function(b){var c=a(".flex-video",b.target),e=c.find("iframe");if(e.length>0){var f=e.attr("data-src");if("string"==typeof f)e[0].src=e.attr("data-src");else{var g=e[0].src;e[0].src=d,e[0].src=g}c.show()}},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},cache_offset:function(a){var b=a.show().height()+parseInt(a.css("top"),10)+a.scrollY;return a.hide(),b},off:function(){a(this.scope).off(".fndtn.reveal")},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.slider={name:"slider",version:"5.5.2",settings:{start:0,end:100,step:1,precision:null,initial:null,display_selector:"",vertical:!1,trigger_input_change:!1,on_change:function(){}},cache:{},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c),this.reflow()},events:function(){var c=this;a(this.scope).off(".slider").on("mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider","["+c.attr_name()+"]:not(.disabled, [disabled]) .range-slider-handle",function(b){c.cache.active||(b.preventDefault(),c.set_active_slider(a(b.target)))}).on("mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider",function(d){if(c.cache.active)if(d.preventDefault(),a.data(c.cache.active[0],"settings").vertical){var e=0;d.pageY||(e=b.scrollY),c.calculate_position(c.cache.active,c.get_cursor_position(d,"y")+e)}else c.calculate_position(c.cache.active,c.get_cursor_position(d,"x"))}).on("mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider",function(a){c.remove_active_slider()}).on("change.fndtn.slider",function(a){c.settings.on_change()}),c.S(b).on("resize.fndtn.slider",c.throttle(function(a){c.reflow()},300)),this.S("["+this.attr_name()+"]").each(function(){var b=a(this),d=b.children(".range-slider-handle")[0],e=c.initialize_settings(d);""!=e.display_selector&&a(e.display_selector).each(function(){this.hasOwnProperty("value")&&a(this).change(function(){b.foundation("slider","set_value",a(this).val())})})})},get_cursor_position:function(a,b){var c,d="page"+b.toUpperCase(),e="client"+b.toUpperCase();return"undefined"!=typeof a[d]?c=a[d]:"undefined"!=typeof a.originalEvent[e]?c=a.originalEvent[e]:a.originalEvent.touches&&a.originalEvent.touches[0]&&"undefined"!=typeof a.originalEvent.touches[0][e]?c=a.originalEvent.touches[0][e]:a.currentPoint&&"undefined"!=typeof a.currentPoint[b]&&(c=a.currentPoint[b]),c},set_active_slider:function(a){this.cache.active=a},remove_active_slider:function(){this.cache.active=null},calculate_position:function(b,c){var d=this,e=a.data(b[0],"settings"),f=(a.data(b[0],"handle_l"),a.data(b[0],"handle_o"),a.data(b[0],"bar_l")),g=a.data(b[0],"bar_o");requestAnimationFrame(function(){var a;a=Foundation.rtl&&!e.vertical?d.limit_to((g+f-c)/f,0,1):d.limit_to((c-g)/f,0,1),a=e.vertical?1-a:a;var h=d.normalized_value(a,e.start,e.end,e.step,e.precision);d.set_ui(b,h)})},set_ui:function(b,c){var d=a.data(b[0],"settings"),e=a.data(b[0],"handle_l"),f=a.data(b[0],"bar_l"),g=this.normalized_percentage(c,d.start,d.end),h=g*(f-e)-1,i=100*g,j=b.parent(),k=b.parent().children("input[type=hidden]");Foundation.rtl&&!d.vertical&&(h=-h),h=d.vertical?-h+f-e+1:h,this.set_translate(b,h,d.vertical),d.vertical?b.siblings(".range-slider-active-segment").css("height",i+"%"):b.siblings(".range-slider-active-segment").css("width",i+"%"),j.attr(this.attr_name(),c).trigger("change.fndtn.slider"),k.val(c),d.trigger_input_change&&k.trigger("change.fndtn.slider"),b[0].hasAttribute("aria-valuemin")||b.attr({"aria-valuemin":d.start,"aria-valuemax":d.end}),b.attr("aria-valuenow",c),""!=d.display_selector&&a(d.display_selector).each(function(){this.hasAttribute("value")?a(this).val(c):a(this).text(c)})},normalized_percentage:function(a,b,c){return Math.min(1,(a-b)/(c-b))},normalized_value:function(a,b,c,d,e){var f=c-b,g=a*f,h=(g-g%d)/d,i=g%d,j=i>=.5*d?d:0;return(h*d+j+b).toFixed(e)},set_translate:function(b,c,d){d?a(b).css("-webkit-transform","translateY("+c+"px)").css("-moz-transform","translateY("+c+"px)").css("-ms-transform","translateY("+c+"px)").css("-o-transform","translateY("+c+"px)").css("transform","translateY("+c+"px)"):a(b).css("-webkit-transform","translateX("+c+"px)").css("-moz-transform","translateX("+c+"px)").css("-ms-transform","translateX("+c+"px)").css("-o-transform","translateX("+c+"px)").css("transform","translateX("+c+"px)")},limit_to:function(a,b,c){return Math.min(Math.max(a,b),c)},initialize_settings:function(b){var c,d=a.extend({},this.settings,this.data_options(a(b).parent()));return null===d.precision&&(c=(""+d.step).match(/\.([\d]*)/),d.precision=c&&c[1]?c[1].length:0),d.vertical?(a.data(b,"bar_o",a(b).parent().offset().top),a.data(b,"bar_l",a(b).parent().outerHeight()),a.data(b,"handle_o",a(b).offset().top),a.data(b,"handle_l",a(b).outerHeight())):(a.data(b,"bar_o",a(b).parent().offset().left),a.data(b,"bar_l",a(b).parent().outerWidth()),a.data(b,"handle_o",a(b).offset().left),a.data(b,"handle_l",a(b).outerWidth())),a.data(b,"bar",a(b).parent()),a.data(b,"settings",d)},set_initial_position:function(b){var c=a.data(b.children(".range-slider-handle")[0],"settings"),d="number"!=typeof c.initial||isNaN(c.initial)?Math.floor(.5*(c.end-c.start)/c.step)*c.step+c.start:c.initial,e=b.children(".range-slider-handle");this.set_ui(e,d)},set_value:function(b){var c=this;a("["+c.attr_name()+"]",this.scope).each(function(){a(this).attr(c.attr_name(),b)}),a(this.scope).attr(c.attr_name())&&a(this.scope).attr(c.attr_name(),b),c.reflow()},reflow:function(){var b=this;b.S("["+this.attr_name()+"]").each(function(){var c=a(this).children(".range-slider-handle")[0],d=a(this).attr(b.attr_name());b.initialize_settings(c),d?b.set_ui(a(c),parseFloat(d)):b.set_initial_position(a(this))})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.tab={name:"tab",version:"5.5.2",settings:{active_class:"active",callback:function(){},deep_linking:!1,scroll_to_content:!0,is_hover:!1},default_tab_hashes:[],init:function(a,c,d){var e=this,f=this.S;f("["+this.attr_name()+"] > .active > a",this.scope).each(function(){e.default_tab_hashes.push(this.hash)}),e.entry_location=b.location.href,this.bindings(c,d),this.handle_location_hash_change()},events:function(){var a=this,c=this.S,d=function(b,d){var e=c(d).closest("["+a.attr_name()+"]").data(a.attr_name(!0)+"-init");(!e.is_hover||Modernizr.touch)&&(b.preventDefault(),b.stopPropagation(),a.toggle_active_tab(c(d).parent()))};c(this.scope).off(".tab").on("keydown.fndtn.tab","["+this.attr_name()+"] > * > a",function(a){var b=this,c=a.keyCode||a.which;9==c&&(a.preventDefault(),d(a,b))}).on("click.fndtn.tab","["+this.attr_name()+"] > * > a",function(a){var b=this;d(a,b)}).on("mouseenter.fndtn.tab","["+this.attr_name()+"] > * > a",function(b){var d=c(this).closest("["+a.attr_name()+"]").data(a.attr_name(!0)+"-init");d.is_hover&&a.toggle_active_tab(c(this).parent())}),c(b).on("hashchange.fndtn.tab",function(b){b.preventDefault(),a.handle_location_hash_change()})},handle_location_hash_change:function(){var b=this,c=this.S;c("["+this.attr_name()+"]",this.scope).each(function(){var e=c(this).data(b.attr_name(!0)+"-init");if(e.deep_linking){var f;if(f=e.scroll_to_content?b.scope.location.hash:b.scope.location.hash.replace("fndtn-",""),""!=f){var g=c(f);if(g.hasClass("content")&&g.parent().hasClass("tabs-content"))b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href="+f+"]").parent());else{var h=g.closest(".content").attr("id");h!=d&&b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href=#"+h+"]").parent(),f)}}else for(var i=0;i<b.default_tab_hashes.length;i++)b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href="+b.default_tab_hashes[i]+"]").parent())}})},toggle_active_tab:function(e,f){var g=this,h=g.S,i=e.closest("["+this.attr_name()+"]"),j=e.find("a"),k=e.children("a").first(),l="#"+k.attr("href").split("#")[1],m=h(l),n=e.siblings(),o=i.data(this.attr_name(!0)+"-init"),p=function(b){var d,e=a(this),f=a(this).parents("li").prev().children('[role="tab"]'),g=a(this).parents("li").next().children('[role="tab"]');switch(b.keyCode){case 37:d=f;break;case 39:d=g;break;default:d=!1}d.length&&(e.attr({tabindex:"-1","aria-selected":null}),d.attr({tabindex:"0","aria-selected":!0}).focus()),a('[role="tabpanel"]').attr("aria-hidden","true"),a("#"+a(c.activeElement).attr("href").substring(1)).attr("aria-hidden",null)},q=function(a){var c=b.location.href===g.entry_location,d=o.scroll_to_content?g.default_tab_hashes[0]:c?b.location.hash:"fndtn-"+g.default_tab_hashes[0].replace("#","");c&&a===d||(b.location.hash=a)};k.data("tab-content")&&(l="#"+k.data("tab-content").split("#")[1],m=h(l)),o.deep_linking&&(o.scroll_to_content?(q(f||l),f==d||f==l?e.parent()[0].scrollIntoView():h(l)[0].scrollIntoView()):q(f!=d?"fndtn-"+f.replace("#",""):"fndtn-"+l.replace("#",""))),e.addClass(o.active_class).triggerHandler("opened"),j.attr({"aria-selected":"true",tabindex:0}),n.removeClass(o.active_class),n.find("a").attr({"aria-selected":"false",tabindex:-1}),m.siblings().removeClass(o.active_class).attr({"aria-hidden":"true",tabindex:-1}),m.addClass(o.active_class).attr("aria-hidden","false").removeAttr("tabindex"),o.callback(e),m.triggerHandler("toggled",[m]),i.triggerHandler("toggled",[e]),j.off("keydown").on("keydown",p)},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.tooltip={name:"tooltip",version:"5.5.2",settings:{additional_inheritable_classes:[],tooltip_class:".tooltip",append_to:"body",touch_close_text:"Tap To Close",disable_for_touch:!1,hover_delay:200,show_on:"all",tip_template:function(a,b){return'<span data-selector="'+a+'" id="'+a+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'" role="tooltip">'+b+'<span class="nub"></span></span>'}},cache:{},init:function(a,b,c){Foundation.inherit(this,"random_str"),this.bindings(b,c)},should_show:function(b,c){var d=a.extend({},this.settings,this.data_options(b));return"all"===d.show_on?!0:this.small()&&"small"===d.show_on?!0:this.medium()&&"medium"===d.show_on?!0:this.large()&&"large"===d.show_on?!0:!1},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},events:function(b){function c(a,b,c){a.timer||(c?(a.timer=null,e.showTip(b)):a.timer=setTimeout(function(){a.timer=null,e.showTip(b)}.bind(a),e.settings.hover_delay))}function d(a,b){a.timer&&(clearTimeout(a.timer),a.timer=null),e.hide(b)}var e=this,f=e.S;e.create(this.S(b)),a(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"]",function(b){var g=f(this),h=a.extend({},e.settings,e.data_options(g)),i=!1;if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&f(b.target).is("a"))return!1;if(/mouse/i.test(b.type)&&e.ie_touch(b))return!1;if(g.hasClass("open"))Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&b.preventDefault(),e.hide(g);else{if(h.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type))return;if(!h.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&(b.preventDefault(),f(h.tooltip_class+".open").hide(),i=!0,a(".open["+e.attr_name()+"]").length>0)){var j=f(a(".open["+e.attr_name()+"]")[0]);e.hide(j)}/enter|over/i.test(b.type)?c(this,g):"mouseout"===b.type||"mouseleave"===b.type?d(this,g):c(this,g,!0)}}).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"].open",function(b){return/mouse/i.test(b.type)&&e.ie_touch(b)?!1:void(("touch"!=a(this).data("tooltip-open-event-type")||"mouseleave"!=b.type)&&("mouse"==a(this).data("tooltip-open-event-type")&&/MSPointerDown|touchstart/i.test(b.type)?e.convert_to_touch(a(this)):d(this,a(this))))}).on("DOMNodeRemoved DOMAttrModified","["+this.attr_name()+"]:not(a)",function(a){d(this,f(this))})},ie_touch:function(a){return!1},showTip:function(a){var b=this.getTip(a);return this.should_show(a,b)?this.show(a):void 0},getTip:function(b){var c=this.selector(b),d=a.extend({},this.settings,this.data_options(b)),e=null;return c&&(e=this.S('span[data-selector="'+c+'"]'+d.tooltip_class)),"object"==typeof e?e:!1},selector:function(a){var b=a.attr(this.attr_name())||a.attr("data-selector");return"string"!=typeof b&&(b=this.random_str(6),a.attr("data-selector",b).attr("aria-describedby",b)),b},create:function(c){var d=this,e=a.extend({},this.settings,this.data_options(c)),f=this.settings.tip_template;"string"==typeof e.tip_template&&b.hasOwnProperty(e.tip_template)&&(f=b[e.tip_template]);var g=a(f(this.selector(c),a("<div></div>").html(c.attr("title")).html())),h=this.inheritable_classes(c);g.addClass(h).appendTo(e.append_to),Modernizr.touch&&(g.append('<span class="tap-to-close">'+e.touch_close_text+"</span>"),g.on("touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip",function(a){d.hide(c)})),c.removeAttr("title").attr("title","")},reposition:function(b,c,d){var e,f,g,h,i;if(c.css("visibility","hidden").show(),e=b.data("width"),f=c.children(".nub"),g=f.outerHeight(),h=f.outerHeight(),c.css(this.small()?{width:"100%"}:{width:e?e:"auto"}),i=function(a,b,c,d,e,f){return a.css({top:b?b:"auto",bottom:d?d:"auto",left:e?e:"auto",right:c?c:"auto"}).end()},i(c,b.offset().top+b.outerHeight()+10,"auto","auto",b.offset().left),this.small())i(c,b.offset().top+b.outerHeight()+10,"auto","auto",12.5,a(this.scope).width()),c.addClass("tip-override"),i(f,-g,"auto","auto",b.offset().left);else{var j=b.offset().left;Foundation.rtl&&(f.addClass("rtl"),j=b.offset().left+b.outerWidth()-c.outerWidth()),i(c,b.offset().top+b.outerHeight()+10,"auto","auto",j),f.attr("style")&&f.removeAttr("style"),c.removeClass("tip-override"),d&&d.indexOf("tip-top")>-1?(Foundation.rtl&&f.addClass("rtl"),i(c,b.offset().top-c.outerHeight(),"auto","auto",j).removeClass("tip-override")):d&&d.indexOf("tip-left")>-1?(i(c,b.offset().top+b.outerHeight()/2-c.outerHeight()/2,"auto","auto",b.offset().left-c.outerWidth()-g).removeClass("tip-override"),f.removeClass("rtl")):d&&d.indexOf("tip-right")>-1&&(i(c,b.offset().top+b.outerHeight()/2-c.outerHeight()/2,"auto","auto",b.offset().left+b.outerWidth()+g).removeClass("tip-override"),f.removeClass("rtl"))}c.css("visibility","visible").hide()},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},inheritable_classes:function(b){var c=a.extend({},this.settings,this.data_options(b)),d=["tip-top","tip-left","tip-bottom","tip-right","radius","round"].concat(c.additional_inheritable_classes),e=b.attr("class"),f=e?a.map(e.split(" "),function(b,c){return-1!==a.inArray(b,d)?b:void 0}).join(" "):"";return a.trim(f)},convert_to_touch:function(b){var c=this,d=c.getTip(b),e=a.extend({},c.settings,c.data_options(b));0===d.find(".tap-to-close").length&&(d.append('<span class="tap-to-close">'+e.touch_close_text+"</span>"),d.on("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose",function(a){c.hide(b)})),b.data("tooltip-open-event-type","touch")},show:function(a){var b=this.getTip(a);"touch"==a.data("tooltip-open-event-type")&&this.convert_to_touch(a),this.reposition(a,b,a.attr("class")),a.addClass("open"),b.fadeIn(150)},hide:function(a){var b=this.getTip(a);b.fadeOut(150,function(){b.find(".tap-to-close").remove(),b.off("click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose"),a.removeClass("open")})},off:function(){var b=this;this.S(this.scope).off(".fndtn.tooltip"),this.S(this.settings.tooltip_class).each(function(c){a("["+b.attr_name()+"]").eq(c).attr("title",a(this).text())}).remove()},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.topbar={name:"topbar",version:"5.5.2",settings:{index:0,start_offset:0,
+sticky_class:"sticky",custom_back_text:!0,back_text:"Back",mobile_show_parent_link:!0,is_hover:!0,scrolltop:!0,sticky_on:"all",dropdown_autoclose:!0},init:function(b,c,d){Foundation.inherit(this,"add_custom_rule register_media throttle");var e=this;e.register_media("topbar","foundation-mq-topbar"),this.bindings(c,d),e.S("["+this.attr_name()+"]",this.scope).each(function(){{var b=a(this),c=b.data(e.attr_name(!0)+"-init");e.S("section, .top-bar-section",this)}b.data("index",0);var d=b.parent();d.hasClass("fixed")||e.is_sticky(b,d,c)?(e.settings.sticky_class=c.sticky_class,e.settings.sticky_topbar=b,b.data("height",d.outerHeight()),b.data("stickyoffset",d.offset().top)):b.data("height",b.outerHeight()),c.assembled||e.assemble(b),c.is_hover?e.S(".has-dropdown",b).addClass("not-click"):e.S(".has-dropdown",b).removeClass("not-click"),e.add_custom_rule(".f-topbar-fixed { padding-top: "+b.data("height")+"px }"),d.hasClass("fixed")&&e.S("body").addClass("f-topbar-fixed")})},is_sticky:function(a,b,c){var d=b.hasClass(c.sticky_class),e=matchMedia(Foundation.media_queries.small).matches,f=matchMedia(Foundation.media_queries.medium).matches,g=matchMedia(Foundation.media_queries.large).matches;return d&&"all"===c.sticky_on?!0:d&&this.small()&&-1!==c.sticky_on.indexOf("small")&&e&&!f&&!g?!0:d&&this.medium()&&-1!==c.sticky_on.indexOf("medium")&&e&&f&&!g?!0:d&&this.large()&&-1!==c.sticky_on.indexOf("large")&&e&&f&&g?!0:!1},toggle:function(c){var d,e=this;d=c?e.S(c).closest("["+this.attr_name()+"]"):e.S("["+this.attr_name()+"]");var f=d.data(this.attr_name(!0)+"-init"),g=e.S("section, .top-bar-section",d);e.breakpoint()&&(e.rtl?(g.css({right:"0%"}),a(">.name",g).css({right:"100%"})):(g.css({left:"0%"}),a(">.name",g).css({left:"100%"})),e.S("li.moved",g).removeClass("moved"),d.data("index",0),d.toggleClass("expanded").css("height","")),f.scrolltop?d.hasClass("expanded")?d.parent().hasClass("fixed")&&(f.scrolltop?(d.parent().removeClass("fixed"),d.addClass("fixed"),e.S("body").removeClass("f-topbar-fixed"),b.scrollTo(0,0)):d.parent().removeClass("expanded")):d.hasClass("fixed")&&(d.parent().addClass("fixed"),d.removeClass("fixed"),e.S("body").addClass("f-topbar-fixed")):(e.is_sticky(d,d.parent(),f)&&d.parent().addClass("fixed"),d.parent().hasClass("fixed")&&(d.hasClass("expanded")?(d.addClass("fixed"),d.parent().addClass("expanded"),e.S("body").addClass("f-topbar-fixed")):(d.removeClass("fixed"),d.parent().removeClass("expanded"),e.update_sticky_positioning())))},timer:null,events:function(c){var d=this,e=this.S;e(this.scope).off(".topbar").on("click.fndtn.topbar","["+this.attr_name()+"] .toggle-topbar",function(a){a.preventDefault(),d.toggle(this)}).on("click.fndtn.topbar contextmenu.fndtn.topbar",'.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',function(b){var c=a(this).closest("li"),e=c.closest("["+d.attr_name()+"]"),f=e.data(d.attr_name(!0)+"-init");if(f.dropdown_autoclose&&f.is_hover){var g=a(this).closest(".hover");g.removeClass("hover")}!d.breakpoint()||c.hasClass("back")||c.hasClass("has-dropdown")||d.toggle()}).on("click.fndtn.topbar","["+this.attr_name()+"] li.has-dropdown",function(b){var c=e(this),f=e(b.target),g=c.closest("["+d.attr_name()+"]"),h=g.data(d.attr_name(!0)+"-init");return f.data("revealId")?void d.toggle():void(d.breakpoint()||(!h.is_hover||Modernizr.touch)&&(b.stopImmediatePropagation(),c.hasClass("hover")?(c.removeClass("hover").find("li").removeClass("hover"),c.parents("li.hover").removeClass("hover")):(c.addClass("hover"),a(c).siblings().removeClass("hover"),"A"===f[0].nodeName&&f.parent().hasClass("has-dropdown")&&b.preventDefault())))}).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown>a",function(a){if(d.breakpoint()){a.preventDefault();var b=e(this),c=b.closest("["+d.attr_name()+"]"),f=c.find("section, .top-bar-section"),g=(b.next(".dropdown").outerHeight(),b.closest("li"));c.data("index",c.data("index")+1),g.addClass("moved"),d.rtl?(f.css({right:-(100*c.data("index"))+"%"}),f.find(">.name").css({right:100*c.data("index")+"%"})):(f.css({left:-(100*c.data("index"))+"%"}),f.find(">.name").css({left:100*c.data("index")+"%"})),c.css("height",b.siblings("ul").outerHeight(!0)+c.data("height"))}}),e(b).off(".topbar").on("resize.fndtn.topbar",d.throttle(function(){d.resize.call(d)},50)).trigger("resize.fndtn.topbar").load(function(){e(this).trigger("resize.fndtn.topbar")}),e("body").off(".topbar").on("click.fndtn.topbar",function(a){var b=e(a.target).closest("li").closest("li.hover");b.length>0||e("["+d.attr_name()+"] li.hover").removeClass("hover")}),e(this.scope).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown .back",function(a){a.preventDefault();var b=e(this),c=b.closest("["+d.attr_name()+"]"),f=c.find("section, .top-bar-section"),g=(c.data(d.attr_name(!0)+"-init"),b.closest("li.moved")),h=g.parent();c.data("index",c.data("index")-1),d.rtl?(f.css({right:-(100*c.data("index"))+"%"}),f.find(">.name").css({right:100*c.data("index")+"%"})):(f.css({left:-(100*c.data("index"))+"%"}),f.find(">.name").css({left:100*c.data("index")+"%"})),0===c.data("index")?c.css("height",""):c.css("height",h.outerHeight(!0)+c.data("height")),setTimeout(function(){g.removeClass("moved")},300)}),e(this.scope).find(".dropdown a").focus(function(){a(this).parents(".has-dropdown").addClass("hover")}).blur(function(){a(this).parents(".has-dropdown").removeClass("hover")})},resize:function(){var a=this;a.S("["+this.attr_name()+"]").each(function(){var b,d=a.S(this),e=d.data(a.attr_name(!0)+"-init"),f=d.parent("."+a.settings.sticky_class);if(!a.breakpoint()){var g=d.hasClass("expanded");d.css("height","").removeClass("expanded").find("li").removeClass("hover"),g&&a.toggle(d)}a.is_sticky(d,f,e)&&(f.hasClass("fixed")?(f.removeClass("fixed"),b=f.offset().top,a.S(c.body).hasClass("f-topbar-fixed")&&(b-=d.data("height")),d.data("stickyoffset",b),f.addClass("fixed")):(b=f.offset().top,d.data("stickyoffset",b)))})},breakpoint:function(){return!matchMedia(Foundation.media_queries.topbar).matches},small:function(){return matchMedia(Foundation.media_queries.small).matches},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},assemble:function(b){var c=this,d=b.data(this.attr_name(!0)+"-init"),e=c.S("section, .top-bar-section",b);e.detach(),c.S(".has-dropdown>a",e).each(function(){var b,e=c.S(this),f=e.siblings(".dropdown"),g=e.attr("href");f.find(".title.back").length||(b=a(1==d.mobile_show_parent_link&&g?'<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="'+g+'">'+e.html()+"</a></li>":'<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>'),a("h5>a",b).html(1==d.custom_back_text?d.back_text:"« "+e.html()),f.prepend(b))}),e.appendTo(b),this.sticky(),this.assembled(b)},assembled:function(b){b.data(this.attr_name(!0),a.extend({},b.data(this.attr_name(!0)),{assembled:!0}))},height:function(b){var c=0,d=this;return a("> li",b).each(function(){c+=d.S(this).outerHeight(!0)}),c},sticky:function(){var a=this;this.S(b).on("scroll",function(){a.update_sticky_positioning()})},update_sticky_positioning:function(){var a="."+this.settings.sticky_class,c=this.S(b),d=this;if(d.settings.sticky_topbar&&d.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)){var e=this.settings.sticky_topbar.data("stickyoffset")+this.settings.start_offset;d.S(a).hasClass("expanded")||(c.scrollTop()>e?d.S(a).hasClass("fixed")||(d.S(a).addClass("fixed"),d.S("body").addClass("f-topbar-fixed")):c.scrollTop()<=e&&d.S(a).hasClass("fixed")&&(d.S(a).removeClass("fixed"),d.S("body").removeClass("f-topbar-fixed")))}},off:function(){this.S(this.scope).off(".fndtn.topbar"),this.S(b).off(".fndtn.topbar")},reflow:function(){}}}(jQuery,window,window.document);
\ No newline at end of file
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.abide = {
+ name : 'abide',
+
+ version : '5.5.2',
+
+ settings : {
+ live_validate : true,
+ validate_on_blur : true,
+ // validate_on: 'tab', // tab (when user tabs between fields), change (input changes), manual (call custom events)
+ focus_on_invalid : true,
+ error_labels : true, // labels with a for="inputId" will recieve an `error` class
+ error_class : 'error',
+ timeout : 1000,
+ patterns : {
+ alpha : /^[a-zA-Z]+$/,
+ alpha_numeric : /^[a-zA-Z0-9]+$/,
+ integer : /^[-+]?\d+$/,
+ number : /^[-+]?\d*(?:[\.\,]\d+)?$/,
+
+ // amex, visa, diners
+ card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
+ cvv : /^([0-9]){3,4}$/,
+
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
+ email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,
+
+ // http://blogs.lse.ac.uk/lti/2008/04/23/a-regular-expression-to-match-any-url/
+ url: /^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,
+ // abc.de
+ domain : /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,
+
+ datetime : /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
+ // YYYY-MM-DD
+ date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,
+ // HH:MM:SS
+ time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
+ dateISO : /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
+ // MM/DD/YYYY
+ month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,
+ // DD/MM/YYYY
+ day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,
+
+ // #FFF or #FFFFFF
+ color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
+ },
+ validators : {
+ equalTo : function (el, required, parent) {
+ var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
+ to = el.value,
+ valid = (from === to);
+
+ return valid;
+ }
+ }
+ },
+
+ timer : null,
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function (scope) {
+ var self = this,
+ form = self.S(scope).attr('novalidate', 'novalidate'),
+ settings = form.data(this.attr_name(true) + '-init') || {};
+
+ this.invalid_attr = this.add_namespace('data-invalid');
+
+ function validate(originalSelf, e) {
+ clearTimeout(self.timer);
+ self.timer = setTimeout(function () {
+ self.validate([originalSelf], e);
+ }.bind(originalSelf), settings.timeout);
+ }
+
+
+ form
+ .off('.abide')
+ .on('submit.fndtn.abide', function (e) {
+ var is_ajax = /ajax/i.test(self.S(this).attr(self.attr_name()));
+ return self.validate(self.S(this).find('input, textarea, select').not(":hidden, [data-abide-ignore]").get(), e, is_ajax);
+ })
+ .on('validate.fndtn.abide', function (e) {
+ if (settings.validate_on === 'manual') {
+ self.validate([e.target], e);
+ }
+ })
+ .on('reset', function (e) {
+ return self.reset($(this), e);
+ })
+ .find('input, textarea, select').not(":hidden, [data-abide-ignore]")
+ .off('.abide')
+ .on('blur.fndtn.abide change.fndtn.abide', function (e) {
+ // old settings fallback
+ // will be deprecated with F6 release
+ if (settings.validate_on_blur && settings.validate_on_blur === true) {
+ validate(this, e);
+ }
+ // new settings combining validate options into one setting
+ if (settings.validate_on === 'change') {
+ validate(this, e);
+ }
+ })
+ .on('keydown.fndtn.abide', function (e) {
+ // old settings fallback
+ // will be deprecated with F6 release
+ if (settings.live_validate && settings.live_validate === true && e.which != 9) {
+ validate(this, e);
+ }
+ // new settings combining validate options into one setting
+ if (settings.validate_on === 'tab' && e.which === 9) {
+ validate(this, e);
+ }
+ else if (settings.validate_on === 'change') {
+ validate(this, e);
+ }
+ })
+ .on('focus', function (e) {
+ if (navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)) {
+ $('html, body').animate({
+ scrollTop: $(e.target).offset().top
+ }, 100);
+ }
+ });
+ },
+
+ reset : function (form, e) {
+ var self = this;
+ form.removeAttr(self.invalid_attr);
+
+ $('[' + self.invalid_attr + ']', form).removeAttr(self.invalid_attr);
+ $('.' + self.settings.error_class, form).not('small').removeClass(self.settings.error_class);
+ $(':input', form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr(self.invalid_attr);
+ },
+
+ validate : function (els, e, is_ajax) {
+ var validations = this.parse_patterns(els),
+ validation_count = validations.length,
+ form = this.S(els[0]).closest('form'),
+ submit_event = /submit/.test(e.type);
+
+ // Has to count up to make sure the focus gets applied to the top error
+ for (var i = 0; i < validation_count; i++) {
+ if (!validations[i] && (submit_event || is_ajax)) {
+ if (this.settings.focus_on_invalid) {
+ els[i].focus();
+ }
+ form.trigger('invalid.fndtn.abide');
+ this.S(els[i]).closest('form').attr(this.invalid_attr, '');
+ return false;
+ }
+ }
+
+ if (submit_event || is_ajax) {
+ form.trigger('valid.fndtn.abide');
+ }
+
+ form.removeAttr(this.invalid_attr);
+
+ if (is_ajax) {
+ return false;
+ }
+
+ return true;
+ },
+
+ parse_patterns : function (els) {
+ var i = els.length,
+ el_patterns = [];
+
+ while (i--) {
+ el_patterns.push(this.pattern(els[i]));
+ }
+
+ return this.check_validation_and_apply_styles(el_patterns);
+ },
+
+ pattern : function (el) {
+ var type = el.getAttribute('type'),
+ required = typeof el.getAttribute('required') === 'string';
+
+ var pattern = el.getAttribute('pattern') || '';
+
+ if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) {
+ return [el, this.settings.patterns[pattern], required];
+ } else if (pattern.length > 0) {
+ return [el, new RegExp(pattern), required];
+ }
+
+ if (this.settings.patterns.hasOwnProperty(type)) {
+ return [el, this.settings.patterns[type], required];
+ }
+
+ pattern = /.*/;
+
+ return [el, pattern, required];
+ },
+
+ // TODO: Break this up into smaller methods, getting hard to read.
+ check_validation_and_apply_styles : function (el_patterns) {
+ var i = el_patterns.length,
+ validations = [],
+ form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
+ settings = form.data(this.attr_name(true) + '-init') || {};
+ while (i--) {
+ var el = el_patterns[i][0],
+ required = el_patterns[i][2],
+ value = el.value.trim(),
+ direct_parent = this.S(el).parent(),
+ validator = el.getAttribute(this.add_namespace('data-abide-validator')),
+ is_radio = el.type === 'radio',
+ is_checkbox = el.type === 'checkbox',
+ label = this.S('label[for="' + el.getAttribute('id') + '"]'),
+ valid_length = (required) ? (el.value.length > 0) : true,
+ el_validations = [];
+
+ var parent, valid;
+
+ // support old way to do equalTo validations
+ if (el.getAttribute(this.add_namespace('data-equalto'))) { validator = 'equalTo' }
+
+ if (!direct_parent.is('label')) {
+ parent = direct_parent;
+ } else {
+ parent = direct_parent.parent();
+ }
+
+ if (is_radio && required) {
+ el_validations.push(this.valid_radio(el, required));
+ } else if (is_checkbox && required) {
+ el_validations.push(this.valid_checkbox(el, required));
+
+ } else if (validator) {
+ // Validate using each of the specified (space-delimited) validators.
+ var validators = validator.split(' ');
+ var last_valid = true, all_valid = true;
+ for (var iv = 0; iv < validators.length; iv++) {
+ valid = this.settings.validators[validators[iv]].apply(this, [el, required, parent])
+ el_validations.push(valid);
+ all_valid = valid && last_valid;
+ last_valid = valid;
+ }
+ if (all_valid) {
+ this.S(el).removeAttr(this.invalid_attr);
+ parent.removeClass('error');
+ if (label.length > 0 && this.settings.error_labels) {
+ label.removeClass(this.settings.error_class).removeAttr('role');
+ }
+ $(el).triggerHandler('valid');
+ } else {
+ this.S(el).attr(this.invalid_attr, '');
+ parent.addClass('error');
+ if (label.length > 0 && this.settings.error_labels) {
+ label.addClass(this.settings.error_class).attr('role', 'alert');
+ }
+ $(el).triggerHandler('invalid');
+ }
+ } else {
+
+ if (el_patterns[i][1].test(value) && valid_length ||
+ !required && el.value.length < 1 || $(el).attr('disabled')) {
+ el_validations.push(true);
+ } else {
+ el_validations.push(false);
+ }
+
+ el_validations = [el_validations.every(function (valid) {return valid;})];
+ if (el_validations[0]) {
+ this.S(el).removeAttr(this.invalid_attr);
+ el.setAttribute('aria-invalid', 'false');
+ el.removeAttribute('aria-describedby');
+ parent.removeClass(this.settings.error_class);
+ if (label.length > 0 && this.settings.error_labels) {
+ label.removeClass(this.settings.error_class).removeAttr('role');
+ }
+ $(el).triggerHandler('valid');
+ } else {
+ this.S(el).attr(this.invalid_attr, '');
+ el.setAttribute('aria-invalid', 'true');
+
+ // Try to find the error associated with the input
+ var errorElem = parent.find('small.' + this.settings.error_class, 'span.' + this.settings.error_class);
+ var errorID = errorElem.length > 0 ? errorElem[0].id : '';
+ if (errorID.length > 0) {
+ el.setAttribute('aria-describedby', errorID);
+ }
+
+ // el.setAttribute('aria-describedby', $(el).find('.error')[0].id);
+ parent.addClass(this.settings.error_class);
+ if (label.length > 0 && this.settings.error_labels) {
+ label.addClass(this.settings.error_class).attr('role', 'alert');
+ }
+ $(el).triggerHandler('invalid');
+ }
+ }
+ validations = validations.concat(el_validations);
+ }
+ return validations;
+ },
+
+ valid_checkbox : function (el, required) {
+ var el = this.S(el),
+ valid = (el.is(':checked') || !required || el.get(0).getAttribute('disabled'));
+
+ if (valid) {
+ el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
+ $(el).triggerHandler('valid');
+ } else {
+ el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
+ $(el).triggerHandler('invalid');
+ }
+
+ return valid;
+ },
+
+ valid_radio : function (el, required) {
+ var name = el.getAttribute('name'),
+ group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='" + name + "']"),
+ count = group.length,
+ valid = false,
+ disabled = false;
+
+ // Has to count up to make sure the focus gets applied to the top error
+ for (var i=0; i < count; i++) {
+ if( group[i].getAttribute('disabled') ){
+ disabled=true;
+ valid=true;
+ } else {
+ if (group[i].checked){
+ valid = true;
+ } else {
+ if( disabled ){
+ valid = false;
+ }
+ }
+ }
+ }
+
+ // Has to count up to make sure the focus gets applied to the top error
+ for (var i = 0; i < count; i++) {
+ if (valid) {
+ this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
+ $(group[i]).triggerHandler('valid');
+ } else {
+ this.S(group[i]).attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
+ $(group[i]).triggerHandler('invalid');
+ }
+ }
+
+ return valid;
+ },
+
+ valid_equal : function (el, required, parent) {
+ var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
+ to = el.value,
+ valid = (from === to);
+
+ if (valid) {
+ this.S(el).removeAttr(this.invalid_attr);
+ parent.removeClass(this.settings.error_class);
+ if (label.length > 0 && settings.error_labels) {
+ label.removeClass(this.settings.error_class);
+ }
+ } else {
+ this.S(el).attr(this.invalid_attr, '');
+ parent.addClass(this.settings.error_class);
+ if (label.length > 0 && settings.error_labels) {
+ label.addClass(this.settings.error_class);
+ }
+ }
+
+ return valid;
+ },
+
+ valid_oneof : function (el, required, parent, doNotValidateOthers) {
+ var el = this.S(el),
+ others = this.S('[' + this.add_namespace('data-oneof') + ']'),
+ valid = others.filter(':checked').length > 0;
+
+ if (valid) {
+ el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
+ } else {
+ el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
+ }
+
+ if (!doNotValidateOthers) {
+ var _this = this;
+ others.each(function () {
+ _this.valid_oneof.call(_this, this, null, null, true);
+ });
+ }
+
+ return valid;
+ },
+
+ reflow : function(scope, options) {
+ var self = this,
+ form = self.S('[' + this.attr_name() + ']').attr('novalidate', 'novalidate');
+ self.S(form).each(function (idx, el) {
+ self.events(el);
+ });
+ }
+ };
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.accordion = {
+ name : 'accordion',
+
+ version : '5.5.2',
+
+ settings : {
+ content_class : 'content',
+ active_class : 'active',
+ multi_expand : false,
+ toggleable : true,
+ callback : function () {}
+ },
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function (instance) {
+ var self = this;
+ var S = this.S;
+ self.create(this.S(instance));
+
+ S(this.scope)
+ .off('.fndtn.accordion')
+ .on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a, [' + this.attr_name() + '] > li > a', function (e) {
+ var accordion = S(this).closest('[' + self.attr_name() + ']'),
+ groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
+ settings = accordion.data(self.attr_name(true) + '-init') || self.settings,
+ target = S('#' + this.href.split('#')[1]),
+ aunts = $('> dd, > li', accordion),
+ siblings = aunts.children('.' + settings.content_class),
+ active_content = siblings.filter('.' + settings.active_class);
+
+ e.preventDefault();
+
+ if (accordion.attr(self.attr_name())) {
+ siblings = siblings.add('[' + groupSelector + '] dd > ' + '.' + settings.content_class + ', [' + groupSelector + '] li > ' + '.' + settings.content_class);
+ aunts = aunts.add('[' + groupSelector + '] dd, [' + groupSelector + '] li');
+ }
+
+ if (settings.toggleable && target.is(active_content)) {
+ target.parent('dd, li').toggleClass(settings.active_class, false);
+ target.toggleClass(settings.active_class, false);
+ S(this).attr('aria-expanded', function(i, attr){
+ return attr === 'true' ? 'false' : 'true';
+ });
+ settings.callback(target);
+ target.triggerHandler('toggled', [accordion]);
+ accordion.triggerHandler('toggled', [target]);
+ return;
+ }
+
+ if (!settings.multi_expand) {
+ siblings.removeClass(settings.active_class);
+ aunts.removeClass(settings.active_class);
+ aunts.children('a').attr('aria-expanded','false');
+ }
+
+ target.addClass(settings.active_class).parent().addClass(settings.active_class);
+ settings.callback(target);
+ target.triggerHandler('toggled', [accordion]);
+ accordion.triggerHandler('toggled', [target]);
+ S(this).attr('aria-expanded','true');
+ });
+ },
+
+ create: function($instance) {
+ var self = this,
+ accordion = $instance,
+ aunts = $('> .accordion-navigation', accordion),
+ settings = accordion.data(self.attr_name(true) + '-init') || self.settings;
+
+ aunts.children('a').attr('aria-expanded','false');
+ aunts.has('.' + settings.content_class + '.' + settings.active_class).children('a').attr('aria-expanded','true');
+
+ if (settings.multi_expand) {
+ $instance.attr('aria-multiselectable','true');
+ }
+ },
+
+ off : function () {},
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.alert = {
+ name : 'alert',
+
+ version : '5.5.2',
+
+ settings : {
+ callback : function () {}
+ },
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function () {
+ var self = this,
+ S = this.S;
+
+ $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] .close', function (e) {
+ var alertBox = S(this).closest('[' + self.attr_name() + ']'),
+ settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
+
+ e.preventDefault();
+ if (Modernizr.csstransitions) {
+ alertBox.addClass('alert-close');
+ alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function (e) {
+ S(this).trigger('close.fndtn.alert').remove();
+ settings.callback();
+ });
+ } else {
+ alertBox.fadeOut(300, function () {
+ S(this).trigger('close.fndtn.alert').remove();
+ settings.callback();
+ });
+ }
+ });
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.clearing = {
+ name : 'clearing',
+
+ version : '5.5.2',
+
+ settings : {
+ templates : {
+ viewing : '<a href="#" class="clearing-close">×</a>' +
+ '<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
+ '<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>' +
+ '<a href="#" class="clearing-main-next"><span></span></a></div>' +
+ '<img class="clearing-preload-next" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
+ '<img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'
+ },
+
+ // comma delimited list of selectors that, on click, will close clearing,
+ // add 'div.clearing-blackout, div.visible-img' to close on background click
+ close_selectors : '.clearing-close, div.clearing-blackout',
+
+ // Default to the entire li element.
+ open_selectors : '',
+
+ // Image will be skipped in carousel.
+ skip_selector : '',
+
+ touch_label : '',
+
+ // event initializers and locks
+ init : false,
+ locked : false
+ },
+
+ init : function (scope, method, options) {
+ var self = this;
+ Foundation.inherit(this, 'throttle image_loaded');
+
+ this.bindings(method, options);
+
+ if (self.S(this.scope).is('[' + this.attr_name() + ']')) {
+ this.assemble(self.S('li', this.scope));
+ } else {
+ self.S('[' + this.attr_name() + ']', this.scope).each(function () {
+ self.assemble(self.S('li', this));
+ });
+ }
+ },
+
+ events : function (scope) {
+ var self = this,
+ S = self.S,
+ $scroll_container = $('.scroll-container');
+
+ if ($scroll_container.length > 0) {
+ this.scope = $scroll_container;
+ }
+
+ S(this.scope)
+ .off('.clearing')
+ .on('click.fndtn.clearing', 'ul[' + this.attr_name() + '] li ' + this.settings.open_selectors,
+ function (e, current, target) {
+ var current = current || S(this),
+ target = target || current,
+ next = current.next('li'),
+ settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init'),
+ image = S(e.target);
+
+ e.preventDefault();
+
+ if (!settings) {
+ self.init();
+ settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
+ }
+
+ // if clearing is open and the current image is
+ // clicked, go to the next image in sequence
+ if (target.hasClass('visible') &&
+ current[0] === target[0] &&
+ next.length > 0 && self.is_open(current)) {
+ target = next;
+ image = S('img', target);
+ }
+
+ // set current and target to the clicked li if not otherwise defined.
+ self.open(image, current, target);
+ self.update_paddles(target);
+ })
+
+ .on('click.fndtn.clearing', '.clearing-main-next',
+ function (e) { self.nav(e, 'next') })
+ .on('click.fndtn.clearing', '.clearing-main-prev',
+ function (e) { self.nav(e, 'prev') })
+ .on('click.fndtn.clearing', this.settings.close_selectors,
+ function (e) { Foundation.libs.clearing.close(e, this) });
+
+ $(document).on('keydown.fndtn.clearing',
+ function (e) { self.keydown(e) });
+
+ S(window).off('.clearing').on('resize.fndtn.clearing',
+ function () { self.resize() });
+
+ this.swipe_events(scope);
+ },
+
+ swipe_events : function (scope) {
+ var self = this,
+ S = self.S;
+
+ S(this.scope)
+ .on('touchstart.fndtn.clearing', '.visible-img', function (e) {
+ if (!e.touches) { e = e.originalEvent; }
+ var data = {
+ start_page_x : e.touches[0].pageX,
+ start_page_y : e.touches[0].pageY,
+ start_time : (new Date()).getTime(),
+ delta_x : 0,
+ is_scrolling : undefined
+ };
+
+ S(this).data('swipe-transition', data);
+ e.stopPropagation();
+ })
+ .on('touchmove.fndtn.clearing', '.visible-img', function (e) {
+ if (!e.touches) {
+ e = e.originalEvent;
+ }
+ // Ignore pinch/zoom events
+ if (e.touches.length > 1 || e.scale && e.scale !== 1) {
+ return;
+ }
+
+ var data = S(this).data('swipe-transition');
+
+ if (typeof data === 'undefined') {
+ data = {};
+ }
+
+ data.delta_x = e.touches[0].pageX - data.start_page_x;
+
+ if (Foundation.rtl) {
+ data.delta_x = -data.delta_x;
+ }
+
+ if (typeof data.is_scrolling === 'undefined') {
+ data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
+ }
+
+ if (!data.is_scrolling && !data.active) {
+ e.preventDefault();
+ var direction = (data.delta_x < 0) ? 'next' : 'prev';
+ data.active = true;
+ self.nav(e, direction);
+ }
+ })
+ .on('touchend.fndtn.clearing', '.visible-img', function (e) {
+ S(this).data('swipe-transition', {});
+ e.stopPropagation();
+ });
+ },
+
+ assemble : function ($li) {
+ var $el = $li.parent();
+
+ if ($el.parent().hasClass('carousel')) {
+ return;
+ }
+
+ $el.after('<div id="foundationClearingHolder"></div>');
+
+ var grid = $el.detach(),
+ grid_outerHTML = '';
+
+ if (grid[0] == null) {
+ return;
+ } else {
+ grid_outerHTML = grid[0].outerHTML;
+ }
+
+ var holder = this.S('#foundationClearingHolder'),
+ settings = $el.data(this.attr_name(true) + '-init'),
+ data = {
+ grid : '<div class="carousel">' + grid_outerHTML + '</div>',
+ viewing : settings.templates.viewing
+ },
+ wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
+ data.grid + '</div></div>',
+ touch_label = this.settings.touch_label;
+
+ if (Modernizr.touch) {
+ wrapper = $(wrapper).find('.clearing-touch-label').html(touch_label).end();
+ }
+
+ holder.after(wrapper).remove();
+ },
+
+ open : function ($image, current, target) {
+ var self = this,
+ body = $(document.body),
+ root = target.closest('.clearing-assembled'),
+ container = self.S('div', root).first(),
+ visible_image = self.S('.visible-img', container),
+ image = self.S('img', visible_image).not($image),
+ label = self.S('.clearing-touch-label', container),
+ error = false,
+ loaded = {};
+
+ // Event to disable scrolling on touch devices when Clearing is activated
+ $('body').on('touchmove', function (e) {
+ e.preventDefault();
+ });
+
+ image.error(function () {
+ error = true;
+ });
+
+ function startLoad() {
+ setTimeout(function () {
+ this.image_loaded(image, function () {
+ if (image.outerWidth() === 1 && !error) {
+ startLoad.call(this);
+ } else {
+ cb.call(this, image);
+ }
+ }.bind(this));
+ }.bind(this), 100);
+ }
+
+ function cb (image) {
+ var $image = $(image);
+ $image.css('visibility', 'visible');
+ $image.trigger('imageVisible');
+ // toggle the gallery
+ body.css('overflow', 'hidden');
+ root.addClass('clearing-blackout');
+ container.addClass('clearing-container');
+ visible_image.show();
+ this.fix_height(target)
+ .caption(self.S('.clearing-caption', visible_image), self.S('img', target))
+ .center_and_label(image, label)
+ .shift(current, target, function () {
+ target.closest('li').siblings().removeClass('visible');
+ target.closest('li').addClass('visible');
+ });
+ visible_image.trigger('opened.fndtn.clearing')
+ }
+
+ if (!this.locked()) {
+ visible_image.trigger('open.fndtn.clearing');
+ // set the image to the selected thumbnail
+ loaded = this.load($image);
+ if (loaded.interchange) {
+ image
+ .attr('data-interchange', loaded.interchange)
+ .foundation('interchange', 'reflow');
+ } else {
+ image
+ .attr('src', loaded.src)
+ .attr('data-interchange', '');
+ }
+ image.css('visibility', 'hidden');
+
+ startLoad.call(this);
+ }
+ },
+
+ close : function (e, el) {
+ e.preventDefault();
+
+ var root = (function (target) {
+ if (/blackout/.test(target.selector)) {
+ return target;
+ } else {
+ return target.closest('.clearing-blackout');
+ }
+ }($(el))),
+ body = $(document.body), container, visible_image;
+
+ if (el === e.target && root) {
+ body.css('overflow', '');
+ container = $('div', root).first();
+ visible_image = $('.visible-img', container);
+ visible_image.trigger('close.fndtn.clearing');
+ this.settings.prev_index = 0;
+ $('ul[' + this.attr_name() + ']', root)
+ .attr('style', '').closest('.clearing-blackout')
+ .removeClass('clearing-blackout');
+ container.removeClass('clearing-container');
+ visible_image.hide();
+ visible_image.trigger('closed.fndtn.clearing');
+ }
+
+ // Event to re-enable scrolling on touch devices
+ $('body').off('touchmove');
+
+ return false;
+ },
+
+ is_open : function (current) {
+ return current.parent().prop('style').length > 0;
+ },
+
+ keydown : function (e) {
+ var clearing = $('.clearing-blackout ul[' + this.attr_name() + ']'),
+ NEXT_KEY = this.rtl ? 37 : 39,
+ PREV_KEY = this.rtl ? 39 : 37,
+ ESC_KEY = 27;
+
+ if (e.which === NEXT_KEY) {
+ this.go(clearing, 'next');
+ }
+ if (e.which === PREV_KEY) {
+ this.go(clearing, 'prev');
+ }
+ if (e.which === ESC_KEY) {
+ this.S('a.clearing-close').trigger('click.fndtn.clearing');
+ }
+ },
+
+ nav : function (e, direction) {
+ var clearing = $('ul[' + this.attr_name() + ']', '.clearing-blackout');
+
+ e.preventDefault();
+ this.go(clearing, direction);
+ },
+
+ resize : function () {
+ var image = $('img', '.clearing-blackout .visible-img'),
+ label = $('.clearing-touch-label', '.clearing-blackout');
+
+ if (image.length) {
+ this.center_and_label(image, label);
+ image.trigger('resized.fndtn.clearing')
+ }
+ },
+
+ // visual adjustments
+ fix_height : function (target) {
+ var lis = target.parent().children(),
+ self = this;
+
+ lis.each(function () {
+ var li = self.S(this),
+ image = li.find('img');
+
+ if (li.height() > image.outerHeight()) {
+ li.addClass('fix-height');
+ }
+ })
+ .closest('ul')
+ .width(lis.length * 100 + '%');
+
+ return this;
+ },
+
+ update_paddles : function (target) {
+ target = target.closest('li');
+ var visible_image = target
+ .closest('.carousel')
+ .siblings('.visible-img');
+
+ if (target.next().length > 0) {
+ this.S('.clearing-main-next', visible_image).removeClass('disabled');
+ } else {
+ this.S('.clearing-main-next', visible_image).addClass('disabled');
+ }
+
+ if (target.prev().length > 0) {
+ this.S('.clearing-main-prev', visible_image).removeClass('disabled');
+ } else {
+ this.S('.clearing-main-prev', visible_image).addClass('disabled');
+ }
+ },
+
+ center_and_label : function (target, label) {
+ if (!this.rtl && label.length > 0) {
+ label.css({
+ marginLeft : -(label.outerWidth() / 2),
+ marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10
+ });
+ } else {
+ label.css({
+ marginRight : -(label.outerWidth() / 2),
+ marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,
+ left: 'auto',
+ right: '50%'
+ });
+ }
+ return this;
+ },
+
+ // image loading and preloading
+
+ load : function ($image) {
+ var href,
+ interchange,
+ closest_a;
+
+ if ($image[0].nodeName === 'A') {
+ href = $image.attr('href');
+ interchange = $image.data('clearing-interchange');
+ } else {
+ closest_a = $image.closest('a');
+ href = closest_a.attr('href');
+ interchange = closest_a.data('clearing-interchange');
+ }
+
+ this.preload($image);
+
+ return {
+ 'src': href ? href : $image.attr('src'),
+ 'interchange': href ? interchange : $image.data('clearing-interchange')
+ }
+ },
+
+ preload : function ($image) {
+ this
+ .img($image.closest('li').next(), 'next')
+ .img($image.closest('li').prev(), 'prev');
+ },
+
+ img : function (img, sibling_type) {
+ if (img.length) {
+ var preload_img = $('.clearing-preload-' + sibling_type),
+ new_a = this.S('a', img),
+ src,
+ interchange,
+ image;
+
+ if (new_a.length) {
+ src = new_a.attr('href');
+ interchange = new_a.data('clearing-interchange');
+ } else {
+ image = this.S('img', img);
+ src = image.attr('src');
+ interchange = image.data('clearing-interchange');
+ }
+
+ if (interchange) {
+ preload_img.attr('data-interchange', interchange);
+ } else {
+ preload_img.attr('src', src);
+ preload_img.attr('data-interchange', '');
+ }
+ }
+ return this;
+ },
+
+ // image caption
+
+ caption : function (container, $image) {
+ var caption = $image.attr('data-caption');
+
+ if (caption) {
+ container
+ .html(caption)
+ .show();
+ } else {
+ container
+ .text('')
+ .hide();
+ }
+ return this;
+ },
+
+ // directional methods
+
+ go : function ($ul, direction) {
+ var current = this.S('.visible', $ul),
+ target = current[direction]();
+
+ // Check for skip selector.
+ if (this.settings.skip_selector && target.find(this.settings.skip_selector).length != 0) {
+ target = target[direction]();
+ }
+
+ if (target.length) {
+ this.S('img', target)
+ .trigger('click.fndtn.clearing', [current, target])
+ .trigger('change.fndtn.clearing');
+ }
+ },
+
+ shift : function (current, target, callback) {
+ var clearing = target.parent(),
+ old_index = this.settings.prev_index || target.index(),
+ direction = this.direction(clearing, current, target),
+ dir = this.rtl ? 'right' : 'left',
+ left = parseInt(clearing.css('left'), 10),
+ width = target.outerWidth(),
+ skip_shift;
+
+ var dir_obj = {};
+
+ // we use jQuery animate instead of CSS transitions because we
+ // need a callback to unlock the next animation
+ // needs support for RTL **
+ if (target.index() !== old_index && !/skip/.test(direction)) {
+ if (/left/.test(direction)) {
+ this.lock();
+ dir_obj[dir] = left + width;
+ clearing.animate(dir_obj, 300, this.unlock());
+ } else if (/right/.test(direction)) {
+ this.lock();
+ dir_obj[dir] = left - width;
+ clearing.animate(dir_obj, 300, this.unlock());
+ }
+ } else if (/skip/.test(direction)) {
+ // the target image is not adjacent to the current image, so
+ // do we scroll right or not
+ skip_shift = target.index() - this.settings.up_count;
+ this.lock();
+
+ if (skip_shift > 0) {
+ dir_obj[dir] = -(skip_shift * width);
+ clearing.animate(dir_obj, 300, this.unlock());
+ } else {
+ dir_obj[dir] = 0;
+ clearing.animate(dir_obj, 300, this.unlock());
+ }
+ }
+
+ callback();
+ },
+
+ direction : function ($el, current, target) {
+ var lis = this.S('li', $el),
+ li_width = lis.outerWidth() + (lis.outerWidth() / 4),
+ up_count = Math.floor(this.S('.clearing-container').outerWidth() / li_width) - 1,
+ target_index = lis.index(target),
+ response;
+
+ this.settings.up_count = up_count;
+
+ if (this.adjacent(this.settings.prev_index, target_index)) {
+ if ((target_index > up_count) && target_index > this.settings.prev_index) {
+ response = 'right';
+ } else if ((target_index > up_count - 1) && target_index <= this.settings.prev_index) {
+ response = 'left';
+ } else {
+ response = false;
+ }
+ } else {
+ response = 'skip';
+ }
+
+ this.settings.prev_index = target_index;
+
+ return response;
+ },
+
+ adjacent : function (current_index, target_index) {
+ for (var i = target_index + 1; i >= target_index - 1; i--) {
+ if (i === current_index) {
+ return true;
+ }
+ }
+ return false;
+ },
+
+ // lock management
+
+ lock : function () {
+ this.settings.locked = true;
+ },
+
+ unlock : function () {
+ this.settings.locked = false;
+ },
+
+ locked : function () {
+ return this.settings.locked;
+ },
+
+ off : function () {
+ this.S(this.scope).off('.fndtn.clearing');
+ this.S(window).off('.fndtn.clearing');
+ },
+
+ reflow : function () {
+ this.init();
+ }
+ };
+
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.dropdown = {
+ name : 'dropdown',
+
+ version : '5.5.2',
+
+ settings : {
+ active_class : 'open',
+ disabled_class : 'disabled',
+ mega_class : 'mega',
+ align : 'bottom',
+ is_hover : false,
+ hover_timeout : 150,
+ opened : function () {},
+ closed : function () {}
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle');
+
+ $.extend(true, this.settings, method, options);
+ this.bindings(method, options);
+ },
+
+ events : function (scope) {
+ var self = this,
+ S = self.S;
+
+ S(this.scope)
+ .off('.dropdown')
+ .on('click.fndtn.dropdown', '[' + this.attr_name() + ']', function (e) {
+ var settings = S(this).data(self.attr_name(true) + '-init') || self.settings;
+ if (!settings.is_hover || Modernizr.touch) {
+ e.preventDefault();
+ if (S(this).parent('[data-reveal-id]').length) {
+ e.stopPropagation();
+ }
+ self.toggle($(this));
+ }
+ })
+ .on('mouseenter.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
+ var $this = S(this),
+ dropdown,
+ target;
+
+ clearTimeout(self.timeout);
+
+ if ($this.data(self.data_attr())) {
+ dropdown = S('#' + $this.data(self.data_attr()));
+ target = $this;
+ } else {
+ dropdown = $this;
+ target = S('[' + self.attr_name() + '="' + dropdown.attr('id') + '"]');
+ }
+
+ var settings = target.data(self.attr_name(true) + '-init') || self.settings;
+
+ if (S(e.currentTarget).data(self.data_attr()) && settings.is_hover) {
+ self.closeall.call(self);
+ }
+
+ if (settings.is_hover) {
+ self.open.apply(self, [dropdown, target]);
+ }
+ })
+ .on('mouseleave.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
+ var $this = S(this);
+ var settings;
+
+ if ($this.data(self.data_attr())) {
+ settings = $this.data(self.data_attr(true) + '-init') || self.settings;
+ } else {
+ var target = S('[' + self.attr_name() + '="' + S(this).attr('id') + '"]'),
+ settings = target.data(self.attr_name(true) + '-init') || self.settings;
+ }
+
+ self.timeout = setTimeout(function () {
+ if ($this.data(self.data_attr())) {
+ if (settings.is_hover) {
+ self.close.call(self, S('#' + $this.data(self.data_attr())));
+ }
+ } else {
+ if (settings.is_hover) {
+ self.close.call(self, $this);
+ }
+ }
+ }.bind(this), settings.hover_timeout);
+ })
+ .on('click.fndtn.dropdown', function (e) {
+ var parent = S(e.target).closest('[' + self.attr_name() + '-content]');
+ var links = parent.find('a');
+
+ if (links.length > 0 && parent.attr('aria-autoclose') !== 'false') {
+ self.close.call(self, S('[' + self.attr_name() + '-content]'));
+ }
+
+ if (e.target !== document && !$.contains(document.documentElement, e.target)) {
+ return;
+ }
+
+ if (S(e.target).closest('[' + self.attr_name() + ']').length > 0) {
+ return;
+ }
+
+ if (!(S(e.target).data('revealId')) &&
+ (parent.length > 0 && (S(e.target).is('[' + self.attr_name() + '-content]') ||
+ $.contains(parent.first()[0], e.target)))) {
+ e.stopPropagation();
+ return;
+ }
+
+ self.close.call(self, S('[' + self.attr_name() + '-content]'));
+ })
+ .on('opened.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
+ self.settings.opened.call(this);
+ })
+ .on('closed.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
+ self.settings.closed.call(this);
+ });
+
+ S(window)
+ .off('.dropdown')
+ .on('resize.fndtn.dropdown', self.throttle(function () {
+ self.resize.call(self);
+ }, 50));
+
+ this.resize();
+ },
+
+ close : function (dropdown) {
+ var self = this;
+ dropdown.each(function (idx) {
+ var original_target = $('[' + self.attr_name() + '=' + dropdown[idx].id + ']') || $('aria-controls=' + dropdown[idx].id + ']');
+ original_target.attr('aria-expanded', 'false');
+ if (self.S(this).hasClass(self.settings.active_class)) {
+ self.S(this)
+ .css(Foundation.rtl ? 'right' : 'left', '-99999px')
+ .attr('aria-hidden', 'true')
+ .removeClass(self.settings.active_class)
+ .prev('[' + self.attr_name() + ']')
+ .removeClass(self.settings.active_class)
+ .removeData('target');
+
+ self.S(this).trigger('closed.fndtn.dropdown', [dropdown]);
+ }
+ });
+ dropdown.removeClass('f-open-' + this.attr_name(true));
+ },
+
+ closeall : function () {
+ var self = this;
+ $.each(self.S('.f-open-' + this.attr_name(true)), function () {
+ self.close.call(self, self.S(this));
+ });
+ },
+
+ open : function (dropdown, target) {
+ this
+ .css(dropdown
+ .addClass(this.settings.active_class), target);
+ dropdown.prev('[' + this.attr_name() + ']').addClass(this.settings.active_class);
+ dropdown.data('target', target.get(0)).trigger('opened.fndtn.dropdown', [dropdown, target]);
+ dropdown.attr('aria-hidden', 'false');
+ target.attr('aria-expanded', 'true');
+ dropdown.focus();
+ dropdown.addClass('f-open-' + this.attr_name(true));
+ },
+
+ data_attr : function () {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + this.name;
+ }
+
+ return this.name;
+ },
+
+ toggle : function (target) {
+ if (target.hasClass(this.settings.disabled_class)) {
+ return;
+ }
+ var dropdown = this.S('#' + target.data(this.data_attr()));
+ if (dropdown.length === 0) {
+ // No dropdown found, not continuing
+ return;
+ }
+
+ this.close.call(this, this.S('[' + this.attr_name() + '-content]').not(dropdown));
+
+ if (dropdown.hasClass(this.settings.active_class)) {
+ this.close.call(this, dropdown);
+ if (dropdown.data('target') !== target.get(0)) {
+ this.open.call(this, dropdown, target);
+ }
+ } else {
+ this.open.call(this, dropdown, target);
+ }
+ },
+
+ resize : function () {
+ var dropdown = this.S('[' + this.attr_name() + '-content].open');
+ var target = $(dropdown.data("target"));
+
+ if (dropdown.length && target.length) {
+ this.css(dropdown, target);
+ }
+ },
+
+ css : function (dropdown, target) {
+ var left_offset = Math.max((target.width() - dropdown.width()) / 2, 8),
+ settings = target.data(this.attr_name(true) + '-init') || this.settings,
+ parentOverflow = dropdown.parent().css('overflow-y') || dropdown.parent().css('overflow');
+
+ this.clear_idx();
+
+
+
+ if (this.small()) {
+ var p = this.dirs.bottom.call(dropdown, target, settings);
+
+ dropdown.attr('style', '').removeClass('drop-left drop-right drop-top').css({
+ position : 'absolute',
+ width : '95%',
+ 'max-width' : 'none',
+ top : p.top
+ });
+
+ dropdown.css(Foundation.rtl ? 'right' : 'left', left_offset);
+ }
+ // detect if dropdown is in an overflow container
+ else if (parentOverflow !== 'visible') {
+ var offset = target[0].offsetTop + target[0].offsetHeight;
+
+ dropdown.attr('style', '').css({
+ position : 'absolute',
+ top : offset
+ });
+
+ dropdown.css(Foundation.rtl ? 'right' : 'left', left_offset);
+ }
+ else {
+
+ this.style(dropdown, target, settings);
+ }
+
+ return dropdown;
+ },
+
+ style : function (dropdown, target, settings) {
+ var css = $.extend({position : 'absolute'},
+ this.dirs[settings.align].call(dropdown, target, settings));
+
+ dropdown.attr('style', '').css(css);
+ },
+
+ // return CSS property object
+ // `this` is the dropdown
+ dirs : {
+ // Calculate target offset
+ _base : function (t) {
+ var o_p = this.offsetParent(),
+ o = o_p.offset(),
+ p = t.offset();
+
+ p.top -= o.top;
+ p.left -= o.left;
+
+ //set some flags on the p object to pass along
+ p.missRight = false;
+ p.missTop = false;
+ p.missLeft = false;
+ p.leftRightFlag = false;
+
+ //lets see if the panel will be off the screen
+ //get the actual width of the page and store it
+ var actualBodyWidth;
+ if (document.getElementsByClassName('row')[0]) {
+ actualBodyWidth = document.getElementsByClassName('row')[0].clientWidth;
+ } else {
+ actualBodyWidth = window.innerWidth;
+ }
+
+ var actualMarginWidth = (window.innerWidth - actualBodyWidth) / 2;
+ var actualBoundary = actualBodyWidth;
+
+ if (!this.hasClass('mega')) {
+ //miss top
+ if (t.offset().top <= this.outerHeight()) {
+ p.missTop = true;
+ actualBoundary = window.innerWidth - actualMarginWidth;
+ p.leftRightFlag = true;
+ }
+
+ //miss right
+ if (t.offset().left + this.outerWidth() > t.offset().left + actualMarginWidth && t.offset().left - actualMarginWidth > this.outerWidth()) {
+ p.missRight = true;
+ p.missLeft = false;
+ }
+
+ //miss left
+ if (t.offset().left - this.outerWidth() <= 0) {
+ p.missLeft = true;
+ p.missRight = false;
+ }
+ }
+
+ return p;
+ },
+
+ top : function (t, s) {
+ var self = Foundation.libs.dropdown,
+ p = self.dirs._base.call(this, t);
+
+ this.addClass('drop-top');
+
+ if (p.missTop == true) {
+ p.top = p.top + t.outerHeight() + this.outerHeight();
+ this.removeClass('drop-top');
+ }
+
+ if (p.missRight == true) {
+ p.left = p.left - this.outerWidth() + t.outerWidth();
+ }
+
+ if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
+ self.adjust_pip(this, t, s, p);
+ }
+
+ if (Foundation.rtl) {
+ return {left : p.left - this.outerWidth() + t.outerWidth(),
+ top : p.top - this.outerHeight()};
+ }
+
+ return {left : p.left, top : p.top - this.outerHeight()};
+ },
+
+ bottom : function (t, s) {
+ var self = Foundation.libs.dropdown,
+ p = self.dirs._base.call(this, t);
+
+ if (p.missRight == true) {
+ p.left = p.left - this.outerWidth() + t.outerWidth();
+ }
+
+ if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
+ self.adjust_pip(this, t, s, p);
+ }
+
+ if (self.rtl) {
+ return {left : p.left - this.outerWidth() + t.outerWidth(), top : p.top + t.outerHeight()};
+ }
+
+ return {left : p.left, top : p.top + t.outerHeight()};
+ },
+
+ left : function (t, s) {
+ var p = Foundation.libs.dropdown.dirs._base.call(this, t);
+
+ this.addClass('drop-left');
+
+ if (p.missLeft == true) {
+ p.left = p.left + this.outerWidth();
+ p.top = p.top + t.outerHeight();
+ this.removeClass('drop-left');
+ }
+
+ return {left : p.left - this.outerWidth(), top : p.top};
+ },
+
+ right : function (t, s) {
+ var p = Foundation.libs.dropdown.dirs._base.call(this, t);
+
+ this.addClass('drop-right');
+
+ if (p.missRight == true) {
+ p.left = p.left - this.outerWidth();
+ p.top = p.top + t.outerHeight();
+ this.removeClass('drop-right');
+ } else {
+ p.triggeredRight = true;
+ }
+
+ var self = Foundation.libs.dropdown;
+
+ if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
+ self.adjust_pip(this, t, s, p);
+ }
+
+ return {left : p.left + t.outerWidth(), top : p.top};
+ }
+ },
+
+ // Insert rule to style psuedo elements
+ adjust_pip : function (dropdown, target, settings, position) {
+ var sheet = Foundation.stylesheet,
+ pip_offset_base = 8;
+
+ if (dropdown.hasClass(settings.mega_class)) {
+ pip_offset_base = position.left + (target.outerWidth() / 2) - 8;
+ } else if (this.small()) {
+ pip_offset_base += position.left - 8;
+ }
+
+ this.rule_idx = sheet.cssRules.length;
+
+ //default
+ var sel_before = '.f-dropdown.open:before',
+ sel_after = '.f-dropdown.open:after',
+ css_before = 'left: ' + pip_offset_base + 'px;',
+ css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
+
+ if (position.missRight == true) {
+ pip_offset_base = dropdown.outerWidth() - 23;
+ sel_before = '.f-dropdown.open:before',
+ sel_after = '.f-dropdown.open:after',
+ css_before = 'left: ' + pip_offset_base + 'px;',
+ css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
+ }
+
+ //just a case where right is fired, but its not missing right
+ if (position.triggeredRight == true) {
+ sel_before = '.f-dropdown.open:before',
+ sel_after = '.f-dropdown.open:after',
+ css_before = 'left:-12px;',
+ css_after = 'left:-14px;';
+ }
+
+ if (sheet.insertRule) {
+ sheet.insertRule([sel_before, '{', css_before, '}'].join(' '), this.rule_idx);
+ sheet.insertRule([sel_after, '{', css_after, '}'].join(' '), this.rule_idx + 1);
+ } else {
+ sheet.addRule(sel_before, css_before, this.rule_idx);
+ sheet.addRule(sel_after, css_after, this.rule_idx + 1);
+ }
+ },
+
+ // Remove old dropdown rule index
+ clear_idx : function () {
+ var sheet = Foundation.stylesheet;
+
+ if (typeof this.rule_idx !== 'undefined') {
+ sheet.deleteRule(this.rule_idx);
+ sheet.deleteRule(this.rule_idx);
+ delete this.rule_idx;
+ }
+ },
+
+ small : function () {
+ return matchMedia(Foundation.media_queries.small).matches &&
+ !matchMedia(Foundation.media_queries.medium).matches;
+ },
+
+ off : function () {
+ this.S(this.scope).off('.fndtn.dropdown');
+ this.S('html, body').off('.fndtn.dropdown');
+ this.S(window).off('.fndtn.dropdown');
+ this.S('[data-dropdown-content]').off('.fndtn.dropdown');
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.equalizer = {
+ name : 'equalizer',
+
+ version : '5.5.2',
+
+ settings : {
+ use_tallest : true,
+ before_height_change : $.noop,
+ after_height_change : $.noop,
+ equalize_on_stack : false,
+ act_on_hidden_el: false
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'image_loaded');
+ this.bindings(method, options);
+ this.reflow();
+ },
+
+ events : function () {
+ this.S(window).off('.equalizer').on('resize.fndtn.equalizer', function (e) {
+ this.reflow();
+ }.bind(this));
+ },
+
+ equalize : function (equalizer) {
+ var isStacked = false,
+ group = equalizer.data('equalizer'),
+ settings = equalizer.data(this.attr_name(true)+'-init') || this.settings,
+ vals,
+ firstTopOffset;
+
+ if (settings.act_on_hidden_el) {
+ vals = group ? equalizer.find('['+this.attr_name()+'-watch="'+group+'"]') : equalizer.find('['+this.attr_name()+'-watch]');
+ }
+ else {
+ vals = group ? equalizer.find('['+this.attr_name()+'-watch="'+group+'"]:visible') : equalizer.find('['+this.attr_name()+'-watch]:visible');
+ }
+
+ if (vals.length === 0) {
+ return;
+ }
+
+ settings.before_height_change();
+ equalizer.trigger('before-height-change.fndth.equalizer');
+ vals.height('inherit');
+
+ if (settings.equalize_on_stack === false) {
+ firstTopOffset = vals.first().offset().top;
+ vals.each(function () {
+ if ($(this).offset().top !== firstTopOffset) {
+ isStacked = true;
+ return false;
+ }
+ });
+ if (isStacked) {
+ return;
+ }
+ }
+
+ var heights = vals.map(function () { return $(this).outerHeight(false) }).get();
+
+ if (settings.use_tallest) {
+ var max = Math.max.apply(null, heights);
+ vals.css('height', max);
+ } else {
+ var min = Math.min.apply(null, heights);
+ vals.css('height', min);
+ }
+
+ settings.after_height_change();
+ equalizer.trigger('after-height-change.fndtn.equalizer');
+ },
+
+ reflow : function () {
+ var self = this;
+
+ this.S('[' + this.attr_name() + ']', this.scope).each(function () {
+ var $eq_target = $(this),
+ media_query = $eq_target.data('equalizer-mq'),
+ ignore_media_query = true;
+
+ if (media_query) {
+ media_query = 'is_' + media_query.replace(/-/g, '_');
+ if (Foundation.utils.hasOwnProperty(media_query)) {
+ ignore_media_query = false;
+ }
+ }
+
+ self.image_loaded(self.S('img', this), function () {
+ if (ignore_media_query || Foundation.utils[media_query]()) {
+ self.equalize($eq_target)
+ } else {
+ var vals = $eq_target.find('[' + self.attr_name() + '-watch]:visible');
+ vals.css('height', 'auto');
+ }
+ });
+ });
+ }
+ };
+})(jQuery, window, window.document);
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.interchange = {
+ name : 'interchange',
+
+ version : '5.5.2',
+
+ cache : {},
+
+ images_loaded : false,
+ nodes_loaded : false,
+
+ settings : {
+ load_attr : 'interchange',
+
+ named_queries : {
+ 'default' : 'only screen',
+ 'small' : Foundation.media_queries['small'],
+ 'small-only' : Foundation.media_queries['small-only'],
+ 'medium' : Foundation.media_queries['medium'],
+ 'medium-only' : Foundation.media_queries['medium-only'],
+ 'large' : Foundation.media_queries['large'],
+ 'large-only' : Foundation.media_queries['large-only'],
+ 'xlarge' : Foundation.media_queries['xlarge'],
+ 'xlarge-only' : Foundation.media_queries['xlarge-only'],
+ 'xxlarge' : Foundation.media_queries['xxlarge'],
+ 'landscape' : 'only screen and (orientation: landscape)',
+ 'portrait' : 'only screen and (orientation: portrait)',
+ 'retina' : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
+ 'only screen and (min--moz-device-pixel-ratio: 2),' +
+ 'only screen and (-o-min-device-pixel-ratio: 2/1),' +
+ 'only screen and (min-device-pixel-ratio: 2),' +
+ 'only screen and (min-resolution: 192dpi),' +
+ 'only screen and (min-resolution: 2dppx)'
+ },
+
+ directives : {
+ replace : function (el, path, trigger) {
+ // The trigger argument, if called within the directive, fires
+ // an event named after the directive on the element, passing
+ // any parameters along to the event that you pass to trigger.
+ //
+ // ex. trigger(), trigger([a, b, c]), or trigger(a, b, c)
+ //
+ // This allows you to bind a callback like so:
+ // $('#interchangeContainer').on('replace', function (e, a, b, c) {
+ // console.log($(this).html(), a, b, c);
+ // });
+
+ if (el !== null && /IMG/.test(el[0].nodeName)) {
+ var orig_path = el[0].src;
+
+ if (new RegExp(path, 'i').test(orig_path)) {
+ return;
+ }
+
+ el.attr("src", path);
+
+ return trigger(el[0].src);
+ }
+ var last_path = el.data(this.data_attr + '-last-path'),
+ self = this;
+
+ if (last_path == path) {
+ return;
+ }
+
+ if (/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(path)) {
+ $(el).css('background-image', 'url(' + path + ')');
+ el.data('interchange-last-path', path);
+ return trigger(path);
+ }
+
+ return $.get(path, function (response) {
+ el.html(response);
+ el.data(self.data_attr + '-last-path', path);
+ trigger();
+ });
+
+ }
+ }
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle random_str');
+
+ this.data_attr = this.set_data_attr();
+ $.extend(true, this.settings, method, options);
+ this.bindings(method, options);
+ this.reflow();
+ },
+
+ get_media_hash : function () {
+ var mediaHash = '';
+ for (var queryName in this.settings.named_queries ) {
+ mediaHash += matchMedia(this.settings.named_queries[queryName]).matches.toString();
+ }
+ return mediaHash;
+ },
+
+ events : function () {
+ var self = this, prevMediaHash;
+
+ $(window)
+ .off('.interchange')
+ .on('resize.fndtn.interchange', self.throttle(function () {
+ var currMediaHash = self.get_media_hash();
+ if (currMediaHash !== prevMediaHash) {
+ self.resize();
+ }
+ prevMediaHash = currMediaHash;
+ }, 50));
+
+ return this;
+ },
+
+ resize : function () {
+ var cache = this.cache;
+
+ if (!this.images_loaded || !this.nodes_loaded) {
+ setTimeout($.proxy(this.resize, this), 50);
+ return;
+ }
+
+ for (var uuid in cache) {
+ if (cache.hasOwnProperty(uuid)) {
+ var passed = this.results(uuid, cache[uuid]);
+ if (passed) {
+ this.settings.directives[passed
+ .scenario[1]].call(this, passed.el, passed.scenario[0], (function (passed) {
+ if (arguments[0] instanceof Array) {
+ var args = arguments[0];
+ } else {
+ var args = Array.prototype.slice.call(arguments, 0);
+ }
+
+ return function() {
+ passed.el.trigger(passed.scenario[1], args);
+ }
+ }(passed)));
+ }
+ }
+ }
+
+ },
+
+ results : function (uuid, scenarios) {
+ var count = scenarios.length;
+
+ if (count > 0) {
+ var el = this.S('[' + this.add_namespace('data-uuid') + '="' + uuid + '"]');
+
+ while (count--) {
+ var mq, rule = scenarios[count][2];
+ if (this.settings.named_queries.hasOwnProperty(rule)) {
+ mq = matchMedia(this.settings.named_queries[rule]);
+ } else {
+ mq = matchMedia(rule);
+ }
+ if (mq.matches) {
+ return {el : el, scenario : scenarios[count]};
+ }
+ }
+ }
+
+ return false;
+ },
+
+ load : function (type, force_update) {
+ if (typeof this['cached_' + type] === 'undefined' || force_update) {
+ this['update_' + type]();
+ }
+
+ return this['cached_' + type];
+ },
+
+ update_images : function () {
+ var images = this.S('img[' + this.data_attr + ']'),
+ count = images.length,
+ i = count,
+ loaded_count = 0,
+ data_attr = this.data_attr;
+
+ this.cache = {};
+ this.cached_images = [];
+ this.images_loaded = (count === 0);
+
+ while (i--) {
+ loaded_count++;
+ if (images[i]) {
+ var str = images[i].getAttribute(data_attr) || '';
+
+ if (str.length > 0) {
+ this.cached_images.push(images[i]);
+ }
+ }
+
+ if (loaded_count === count) {
+ this.images_loaded = true;
+ this.enhance('images');
+ }
+ }
+
+ return this;
+ },
+
+ update_nodes : function () {
+ var nodes = this.S('[' + this.data_attr + ']').not('img'),
+ count = nodes.length,
+ i = count,
+ loaded_count = 0,
+ data_attr = this.data_attr;
+
+ this.cached_nodes = [];
+ this.nodes_loaded = (count === 0);
+
+ while (i--) {
+ loaded_count++;
+ var str = nodes[i].getAttribute(data_attr) || '';
+
+ if (str.length > 0) {
+ this.cached_nodes.push(nodes[i]);
+ }
+
+ if (loaded_count === count) {
+ this.nodes_loaded = true;
+ this.enhance('nodes');
+ }
+ }
+
+ return this;
+ },
+
+ enhance : function (type) {
+ var i = this['cached_' + type].length;
+
+ while (i--) {
+ this.object($(this['cached_' + type][i]));
+ }
+
+ return $(window).trigger('resize.fndtn.interchange');
+ },
+
+ convert_directive : function (directive) {
+
+ var trimmed = this.trim(directive);
+
+ if (trimmed.length > 0) {
+ return trimmed;
+ }
+
+ return 'replace';
+ },
+
+ parse_scenario : function (scenario) {
+ // This logic had to be made more complex since some users were using commas in the url path
+ // So we cannot simply just split on a comma
+
+ var directive_match = scenario[0].match(/(.+),\s*(\w+)\s*$/),
+ // getting the mq has gotten a bit complicated since we started accounting for several use cases
+ // of URLs. For now we'll continue to match these scenarios, but we may consider having these scenarios
+ // as nested objects or arrays in F6.
+ // regex: match everything before close parenthesis for mq
+ media_query = scenario[1].match(/(.*)\)/);
+
+ if (directive_match) {
+ var path = directive_match[1],
+ directive = directive_match[2];
+
+ } else {
+ var cached_split = scenario[0].split(/,\s*$/),
+ path = cached_split[0],
+ directive = '';
+ }
+
+ return [this.trim(path), this.convert_directive(directive), this.trim(media_query[1])];
+ },
+
+ object : function (el) {
+ var raw_arr = this.parse_data_attr(el),
+ scenarios = [],
+ i = raw_arr.length;
+
+ if (i > 0) {
+ while (i--) {
+ // split array between comma delimited content and mq
+ // regex: comma, optional space, open parenthesis
+ var scenario = raw_arr[i].split(/,\s?\(/);
+
+ if (scenario.length > 1) {
+ var params = this.parse_scenario(scenario);
+ scenarios.push(params);
+ }
+ }
+ }
+
+ return this.store(el, scenarios);
+ },
+
+ store : function (el, scenarios) {
+ var uuid = this.random_str(),
+ current_uuid = el.data(this.add_namespace('uuid', true));
+
+ if (this.cache[current_uuid]) {
+ return this.cache[current_uuid];
+ }
+
+ el.attr(this.add_namespace('data-uuid'), uuid);
+ return this.cache[uuid] = scenarios;
+ },
+
+ trim : function (str) {
+
+ if (typeof str === 'string') {
+ return $.trim(str);
+ }
+
+ return str;
+ },
+
+ set_data_attr : function (init) {
+ if (init) {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + this.settings.load_attr;
+ }
+
+ return this.settings.load_attr;
+ }
+
+ if (this.namespace.length > 0) {
+ return 'data-' + this.namespace + '-' + this.settings.load_attr;
+ }
+
+ return 'data-' + this.settings.load_attr;
+ },
+
+ parse_data_attr : function (el) {
+ var raw = el.attr(this.attr_name()).split(/\[(.*?)\]/),
+ i = raw.length,
+ output = [];
+
+ while (i--) {
+ if (raw[i].replace(/[\W\d]+/, '').length > 4) {
+ output.push(raw[i]);
+ }
+ }
+
+ return output;
+ },
+
+ reflow : function () {
+ this.load('images', true);
+ this.load('nodes', true);
+ }
+
+ };
+
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ var Modernizr = Modernizr || false;
+
+ Foundation.libs.joyride = {
+ name : 'joyride',
+
+ version : '5.5.2',
+
+ defaults : {
+ expose : false, // turn on or off the expose feature
+ modal : true, // Whether to cover page with modal during the tour
+ keyboard : true, // enable left, right and esc keystrokes
+ tip_location : 'bottom', // 'top' or 'bottom' in relation to parent
+ nub_position : 'auto', // override on a per tooltip bases
+ scroll_speed : 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation
+ scroll_animation : 'linear', // supports 'swing' and 'linear', extend with jQuery UI.
+ timer : 0, // 0 = no timer , all other numbers = timer in milliseconds
+ start_timer_on_click : true, // true or false - true requires clicking the first button start the timer
+ start_offset : 0, // the index of the tooltip you want to start on (index of the li)
+ next_button : true, // true or false to control whether a next button is used
+ prev_button : true, // true or false to control whether a prev button is used
+ tip_animation : 'fade', // 'pop' or 'fade' in each tip
+ pause_after : [], // array of indexes where to pause the tour after
+ exposed : [], // array of expose elements
+ tip_animation_fade_speed : 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
+ cookie_monster : false, // true or false to control whether cookies are used
+ cookie_name : 'joyride', // Name the cookie you'll use
+ cookie_domain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
+ cookie_expires : 365, // set when you would like the cookie to expire.
+ tip_container : 'body', // Where will the tip be attached
+ abort_on_close : true, // When true, the close event will not fire any callback
+ tip_location_patterns : {
+ top : ['bottom'],
+ bottom : [], // bottom should not need to be repositioned
+ left : ['right', 'top', 'bottom'],
+ right : ['left', 'top', 'bottom']
+ },
+ post_ride_callback : function () {}, // A method to call once the tour closes (canceled or complete)
+ post_step_callback : function () {}, // A method to call after each step
+ pre_step_callback : function () {}, // A method to call before each step
+ pre_ride_callback : function () {}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
+ post_expose_callback : function () {}, // A method to call after an element has been exposed
+ template : { // HTML segments for tip layout
+ link : '<a href="#close" class="joyride-close-tip">×</a>',
+ timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
+ tip : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
+ wrapper : '<div class="joyride-content-wrapper"></div>',
+ button : '<a href="#" class="small button joyride-next-tip"></a>',
+ prev_button : '<a href="#" class="small button joyride-prev-tip"></a>',
+ modal : '<div class="joyride-modal-bg"></div>',
+ expose : '<div class="joyride-expose-wrapper"></div>',
+ expose_cover : '<div class="joyride-expose-cover"></div>'
+ },
+ expose_add_class : '' // One or more space-separated class names to be added to exposed element
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle random_str');
+
+ this.settings = this.settings || $.extend({}, this.defaults, (options || method));
+
+ this.bindings(method, options)
+ },
+
+ go_next : function () {
+ if (this.settings.$li.next().length < 1) {
+ this.end();
+ } else if (this.settings.timer > 0) {
+ clearTimeout(this.settings.automate);
+ this.hide();
+ this.show();
+ this.startTimer();
+ } else {
+ this.hide();
+ this.show();
+ }
+ },
+
+ go_prev : function () {
+ if (this.settings.$li.prev().length < 1) {
+ // Do nothing if there are no prev element
+ } else if (this.settings.timer > 0) {
+ clearTimeout(this.settings.automate);
+ this.hide();
+ this.show(null, true);
+ this.startTimer();
+ } else {
+ this.hide();
+ this.show(null, true);
+ }
+ },
+
+ events : function () {
+ var self = this;
+
+ $(this.scope)
+ .off('.joyride')
+ .on('click.fndtn.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
+ e.preventDefault();
+ this.go_next()
+ }.bind(this))
+ .on('click.fndtn.joyride', '.joyride-prev-tip', function (e) {
+ e.preventDefault();
+ this.go_prev();
+ }.bind(this))
+
+ .on('click.fndtn.joyride', '.joyride-close-tip', function (e) {
+ e.preventDefault();
+ this.end(this.settings.abort_on_close);
+ }.bind(this))
+
+ .on('keyup.fndtn.joyride', function (e) {
+ // Don't do anything if keystrokes are disabled
+ // or if the joyride is not being shown
+ if (!this.settings.keyboard || !this.settings.riding) {
+ return;
+ }
+
+ switch (e.which) {
+ case 39: // right arrow
+ e.preventDefault();
+ this.go_next();
+ break;
+ case 37: // left arrow
+ e.preventDefault();
+ this.go_prev();
+ break;
+ case 27: // escape
+ e.preventDefault();
+ this.end(this.settings.abort_on_close);
+ }
+ }.bind(this));
+
+ $(window)
+ .off('.joyride')
+ .on('resize.fndtn.joyride', self.throttle(function () {
+ if ($('[' + self.attr_name() + ']').length > 0 && self.settings.$next_tip && self.settings.riding) {
+ if (self.settings.exposed.length > 0) {
+ var $els = $(self.settings.exposed);
+
+ $els.each(function () {
+ var $this = $(this);
+ self.un_expose($this);
+ self.expose($this);
+ });
+ }
+
+ if (self.is_phone()) {
+ self.pos_phone();
+ } else {
+ self.pos_default(false);
+ }
+ }
+ }, 100));
+ },
+
+ start : function () {
+ var self = this,
+ $this = $('[' + this.attr_name() + ']', this.scope),
+ integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
+ int_settings_count = integer_settings.length;
+
+ if (!$this.length > 0) {
+ return;
+ }
+
+ if (!this.settings.init) {
+ this.events();
+ }
+
+ this.settings = $this.data(this.attr_name(true) + '-init');
+
+ // non configureable settings
+ this.settings.$content_el = $this;
+ this.settings.$body = $(this.settings.tip_container);
+ this.settings.body_offset = $(this.settings.tip_container).position();
+ this.settings.$tip_content = this.settings.$content_el.find('> li');
+ this.settings.paused = false;
+ this.settings.attempts = 0;
+ this.settings.riding = true;
+
+ // can we create cookies?
+ if (typeof $.cookie !== 'function') {
+ this.settings.cookie_monster = false;
+ }
+
+ // generate the tips and insert into dom.
+ if (!this.settings.cookie_monster || this.settings.cookie_monster && !$.cookie(this.settings.cookie_name)) {
+ this.settings.$tip_content.each(function (index) {
+ var $this = $(this);
+ this.settings = $.extend({}, self.defaults, self.data_options($this));
+
+ // Make sure that settings parsed from data_options are integers where necessary
+ var i = int_settings_count;
+ while (i--) {
+ self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10);
+ }
+ self.create({$li : $this, index : index});
+ });
+
+ // show first tip
+ if (!this.settings.start_timer_on_click && this.settings.timer > 0) {
+ this.show('init');
+ this.startTimer();
+ } else {
+ this.show('init');
+ }
+
+ }
+ },
+
+ resume : function () {
+ this.set_li();
+ this.show();
+ },
+
+ tip_template : function (opts) {
+ var $blank, content;
+
+ opts.tip_class = opts.tip_class || '';
+
+ $blank = $(this.settings.template.tip).addClass(opts.tip_class);
+ content = $.trim($(opts.li).html()) +
+ this.prev_button_text(opts.prev_button_text, opts.index) +
+ this.button_text(opts.button_text) +
+ this.settings.template.link +
+ this.timer_instance(opts.index);
+
+ $blank.append($(this.settings.template.wrapper));
+ $blank.first().attr(this.add_namespace('data-index'), opts.index);
+ $('.joyride-content-wrapper', $blank).append(content);
+
+ return $blank[0];
+ },
+
+ timer_instance : function (index) {
+ var txt;
+
+ if ((index === 0 && this.settings.start_timer_on_click && this.settings.timer > 0) || this.settings.timer === 0) {
+ txt = '';
+ } else {
+ txt = $(this.settings.template.timer)[0].outerHTML;
+ }
+ return txt;
+ },
+
+ button_text : function (txt) {
+ if (this.settings.tip_settings.next_button) {
+ txt = $.trim(txt) || 'Next';
+ txt = $(this.settings.template.button).append(txt)[0].outerHTML;
+ } else {
+ txt = '';
+ }
+ return txt;
+ },
+
+ prev_button_text : function (txt, idx) {
+ if (this.settings.tip_settings.prev_button) {
+ txt = $.trim(txt) || 'Previous';
+
+ // Add the disabled class to the button if it's the first element
+ if (idx == 0) {
+ txt = $(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;
+ } else {
+ txt = $(this.settings.template.prev_button).append(txt)[0].outerHTML;
+ }
+ } else {
+ txt = '';
+ }
+ return txt;
+ },
+
+ create : function (opts) {
+ this.settings.tip_settings = $.extend({}, this.settings, this.data_options(opts.$li));
+ var buttonText = opts.$li.attr(this.add_namespace('data-button')) || opts.$li.attr(this.add_namespace('data-text')),
+ prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev')) || opts.$li.attr(this.add_namespace('data-prev-text')),
+ tipClass = opts.$li.attr('class'),
+ $tip_content = $(this.tip_template({
+ tip_class : tipClass,
+ index : opts.index,
+ button_text : buttonText,
+ prev_button_text : prevButtonText,
+ li : opts.$li
+ }));
+
+ $(this.settings.tip_container).append($tip_content);
+ },
+
+ show : function (init, is_prev) {
+ var $timer = null;
+
+ // are we paused?
+ if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
+
+ // don't go to the next li if the tour was paused
+ if (this.settings.paused) {
+ this.settings.paused = false;
+ } else {
+ this.set_li(init, is_prev);
+ }
+
+ this.settings.attempts = 0;
+
+ if (this.settings.$li.length && this.settings.$target.length > 0) {
+ if (init) { //run when we first start
+ this.settings.pre_ride_callback(this.settings.$li.index(), this.settings.$next_tip);
+ if (this.settings.modal) {
+ this.show_modal();
+ }
+ }
+
+ this.settings.pre_step_callback(this.settings.$li.index(), this.settings.$next_tip);
+
+ if (this.settings.modal && this.settings.expose) {
+ this.expose();
+ }
+
+ this.settings.tip_settings = $.extend({}, this.settings, this.data_options(this.settings.$li));
+
+ this.settings.timer = parseInt(this.settings.timer, 10);
+
+ this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
+
+ // scroll and hide bg if not modal
+ if (!/body/i.test(this.settings.$target.selector)) {
+ var joyridemodalbg = $('.joyride-modal-bg');
+ if (/pop/i.test(this.settings.tipAnimation)) {
+ joyridemodalbg.hide();
+ } else {
+ joyridemodalbg.fadeOut(this.settings.tipAnimationFadeSpeed);
+ }
+ this.scroll_to();
+ }
+
+ if (this.is_phone()) {
+ this.pos_phone(true);
+ } else {
+ this.pos_default(true);
+ }
+
+ $timer = this.settings.$next_tip.find('.joyride-timer-indicator');
+
+ if (/pop/i.test(this.settings.tip_animation)) {
+
+ $timer.width(0);
+
+ if (this.settings.timer > 0) {
+
+ this.settings.$next_tip.show();
+
+ setTimeout(function () {
+ $timer.animate({
+ width : $timer.parent().width()
+ }, this.settings.timer, 'linear');
+ }.bind(this), this.settings.tip_animation_fade_speed);
+
+ } else {
+ this.settings.$next_tip.show();
+
+ }
+
+ } else if (/fade/i.test(this.settings.tip_animation)) {
+
+ $timer.width(0);
+
+ if (this.settings.timer > 0) {
+
+ this.settings.$next_tip
+ .fadeIn(this.settings.tip_animation_fade_speed)
+ .show();
+
+ setTimeout(function () {
+ $timer.animate({
+ width : $timer.parent().width()
+ }, this.settings.timer, 'linear');
+ }.bind(this), this.settings.tip_animation_fade_speed);
+
+ } else {
+ this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);
+ }
+ }
+
+ this.settings.$current_tip = this.settings.$next_tip;
+
+ // skip non-existant targets
+ } else if (this.settings.$li && this.settings.$target.length < 1) {
+
+ this.show(init, is_prev);
+
+ } else {
+
+ this.end();
+
+ }
+ } else {
+
+ this.settings.paused = true;
+
+ }
+
+ },
+
+ is_phone : function () {
+ return matchMedia(Foundation.media_queries.small).matches &&
+ !matchMedia(Foundation.media_queries.medium).matches;
+ },
+
+ hide : function () {
+ if (this.settings.modal && this.settings.expose) {
+ this.un_expose();
+ }
+
+ if (!this.settings.modal) {
+ $('.joyride-modal-bg').hide();
+ }
+
+ // Prevent scroll bouncing...wait to remove from layout
+ this.settings.$current_tip.css('visibility', 'hidden');
+ setTimeout($.proxy(function () {
+ this.hide();
+ this.css('visibility', 'visible');
+ }, this.settings.$current_tip), 0);
+ this.settings.post_step_callback(this.settings.$li.index(),
+ this.settings.$current_tip);
+ },
+
+ set_li : function (init, is_prev) {
+ if (init) {
+ this.settings.$li = this.settings.$tip_content.eq(this.settings.start_offset);
+ this.set_next_tip();
+ this.settings.$current_tip = this.settings.$next_tip;
+ } else {
+ if (is_prev) {
+ this.settings.$li = this.settings.$li.prev();
+ } else {
+ this.settings.$li = this.settings.$li.next();
+ }
+ this.set_next_tip();
+ }
+
+ this.set_target();
+ },
+
+ set_next_tip : function () {
+ this.settings.$next_tip = $('.joyride-tip-guide').eq(this.settings.$li.index());
+ this.settings.$next_tip.data('closed', '');
+ },
+
+ set_target : function () {
+ var cl = this.settings.$li.attr(this.add_namespace('data-class')),
+ id = this.settings.$li.attr(this.add_namespace('data-id')),
+ $sel = function () {
+ if (id) {
+ return $(document.getElementById(id));
+ } else if (cl) {
+ return $('.' + cl).first();
+ } else {
+ return $('body');
+ }
+ };
+
+ this.settings.$target = $sel();
+ },
+
+ scroll_to : function () {
+ var window_half, tipOffset;
+
+ window_half = $(window).height() / 2;
+ tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight());
+
+ if (tipOffset != 0) {
+ $('html, body').stop().animate({
+ scrollTop : tipOffset
+ }, this.settings.scroll_speed, 'swing');
+ }
+ },
+
+ paused : function () {
+ return ($.inArray((this.settings.$li.index() + 1), this.settings.pause_after) === -1);
+ },
+
+ restart : function () {
+ this.hide();
+ this.settings.$li = undefined;
+ this.show('init');
+ },
+
+ pos_default : function (init) {
+ var $nub = this.settings.$next_tip.find('.joyride-nub'),
+ nub_width = Math.ceil($nub.outerWidth() / 2),
+ nub_height = Math.ceil($nub.outerHeight() / 2),
+ toggle = init || false;
+
+ // tip must not be "display: none" to calculate position
+ if (toggle) {
+ this.settings.$next_tip.css('visibility', 'hidden');
+ this.settings.$next_tip.show();
+ }
+
+ if (!/body/i.test(this.settings.$target.selector)) {
+ var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
+ leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
+
+ if (this.bottom()) {
+ if (this.rtl) {
+ this.settings.$next_tip.css({
+ top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
+ left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
+ } else {
+ this.settings.$next_tip.css({
+ top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
+ left : this.settings.$target.offset().left + leftAdjustment});
+ }
+
+ this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
+
+ } else if (this.top()) {
+ if (this.rtl) {
+ this.settings.$next_tip.css({
+ top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
+ left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
+ } else {
+ this.settings.$next_tip.css({
+ top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
+ left : this.settings.$target.offset().left + leftAdjustment});
+ }
+
+ this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
+
+ } else if (this.right()) {
+
+ this.settings.$next_tip.css({
+ top : this.settings.$target.offset().top + topAdjustment,
+ left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
+
+ this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
+
+ } else if (this.left()) {
+
+ this.settings.$next_tip.css({
+ top : this.settings.$target.offset().top + topAdjustment,
+ left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
+
+ this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
+
+ }
+
+ if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
+
+ $nub.removeClass('bottom')
+ .removeClass('top')
+ .removeClass('right')
+ .removeClass('left');
+
+ this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
+
+ this.settings.attempts++;
+
+ this.pos_default();
+
+ }
+
+ } else if (this.settings.$li.length) {
+
+ this.pos_modal($nub);
+
+ }
+
+ if (toggle) {
+ this.settings.$next_tip.hide();
+ this.settings.$next_tip.css('visibility', 'visible');
+ }
+
+ },
+
+ pos_phone : function (init) {
+ var tip_height = this.settings.$next_tip.outerHeight(),
+ tip_offset = this.settings.$next_tip.offset(),
+ target_height = this.settings.$target.outerHeight(),
+ $nub = $('.joyride-nub', this.settings.$next_tip),
+ nub_height = Math.ceil($nub.outerHeight() / 2),
+ toggle = init || false;
+
+ $nub.removeClass('bottom')
+ .removeClass('top')
+ .removeClass('right')
+ .removeClass('left');
+
+ if (toggle) {
+ this.settings.$next_tip.css('visibility', 'hidden');
+ this.settings.$next_tip.show();
+ }
+
+ if (!/body/i.test(this.settings.$target.selector)) {
+
+ if (this.top()) {
+
+ this.settings.$next_tip.offset({top : this.settings.$target.offset().top - tip_height - nub_height});
+ $nub.addClass('bottom');
+
+ } else {
+
+ this.settings.$next_tip.offset({top : this.settings.$target.offset().top + target_height + nub_height});
+ $nub.addClass('top');
+
+ }
+
+ } else if (this.settings.$li.length) {
+ this.pos_modal($nub);
+ }
+
+ if (toggle) {
+ this.settings.$next_tip.hide();
+ this.settings.$next_tip.css('visibility', 'visible');
+ }
+ },
+
+ pos_modal : function ($nub) {
+ this.center();
+ $nub.hide();
+
+ this.show_modal();
+ },
+
+ show_modal : function () {
+ if (!this.settings.$next_tip.data('closed')) {
+ var joyridemodalbg = $('.joyride-modal-bg');
+ if (joyridemodalbg.length < 1) {
+ var joyridemodalbg = $(this.settings.template.modal);
+ joyridemodalbg.appendTo('body');
+ }
+
+ if (/pop/i.test(this.settings.tip_animation)) {
+ joyridemodalbg.show();
+ } else {
+ joyridemodalbg.fadeIn(this.settings.tip_animation_fade_speed);
+ }
+ }
+ },
+
+ expose : function () {
+ var expose,
+ exposeCover,
+ el,
+ origCSS,
+ origClasses,
+ randId = 'expose-' + this.random_str(6);
+
+ if (arguments.length > 0 && arguments[0] instanceof $) {
+ el = arguments[0];
+ } else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
+ el = this.settings.$target;
+ } else {
+ return false;
+ }
+
+ if (el.length < 1) {
+ if (window.console) {
+ console.error('element not valid', el);
+ }
+ return false;
+ }
+
+ expose = $(this.settings.template.expose);
+ this.settings.$body.append(expose);
+ expose.css({
+ top : el.offset().top,
+ left : el.offset().left,
+ width : el.outerWidth(true),
+ height : el.outerHeight(true)
+ });
+
+ exposeCover = $(this.settings.template.expose_cover);
+
+ origCSS = {
+ zIndex : el.css('z-index'),
+ position : el.css('position')
+ };
+
+ origClasses = el.attr('class') == null ? '' : el.attr('class');
+
+ el.css('z-index', parseInt(expose.css('z-index')) + 1);
+
+ if (origCSS.position == 'static') {
+ el.css('position', 'relative');
+ }
+
+ el.data('expose-css', origCSS);
+ el.data('orig-class', origClasses);
+ el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
+
+ exposeCover.css({
+ top : el.offset().top,
+ left : el.offset().left,
+ width : el.outerWidth(true),
+ height : el.outerHeight(true)
+ });
+
+ if (this.settings.modal) {
+ this.show_modal();
+ }
+
+ this.settings.$body.append(exposeCover);
+ expose.addClass(randId);
+ exposeCover.addClass(randId);
+ el.data('expose', randId);
+ this.settings.post_expose_callback(this.settings.$li.index(), this.settings.$next_tip, el);
+ this.add_exposed(el);
+ },
+
+ un_expose : function () {
+ var exposeId,
+ el,
+ expose,
+ origCSS,
+ origClasses,
+ clearAll = false;
+
+ if (arguments.length > 0 && arguments[0] instanceof $) {
+ el = arguments[0];
+ } else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
+ el = this.settings.$target;
+ } else {
+ return false;
+ }
+
+ if (el.length < 1) {
+ if (window.console) {
+ console.error('element not valid', el);
+ }
+ return false;
+ }
+
+ exposeId = el.data('expose');
+ expose = $('.' + exposeId);
+
+ if (arguments.length > 1) {
+ clearAll = arguments[1];
+ }
+
+ if (clearAll === true) {
+ $('.joyride-expose-wrapper,.joyride-expose-cover').remove();
+ } else {
+ expose.remove();
+ }
+
+ origCSS = el.data('expose-css');
+
+ if (origCSS.zIndex == 'auto') {
+ el.css('z-index', '');
+ } else {
+ el.css('z-index', origCSS.zIndex);
+ }
+
+ if (origCSS.position != el.css('position')) {
+ if (origCSS.position == 'static') {// this is default, no need to set it.
+ el.css('position', '');
+ } else {
+ el.css('position', origCSS.position);
+ }
+ }
+
+ origClasses = el.data('orig-class');
+ el.attr('class', origClasses);
+ el.removeData('orig-classes');
+
+ el.removeData('expose');
+ el.removeData('expose-z-index');
+ this.remove_exposed(el);
+ },
+
+ add_exposed : function (el) {
+ this.settings.exposed = this.settings.exposed || [];
+ if (el instanceof $ || typeof el === 'object') {
+ this.settings.exposed.push(el[0]);
+ } else if (typeof el == 'string') {
+ this.settings.exposed.push(el);
+ }
+ },
+
+ remove_exposed : function (el) {
+ var search, i;
+ if (el instanceof $) {
+ search = el[0]
+ } else if (typeof el == 'string') {
+ search = el;
+ }
+
+ this.settings.exposed = this.settings.exposed || [];
+ i = this.settings.exposed.length;
+
+ while (i--) {
+ if (this.settings.exposed[i] == search) {
+ this.settings.exposed.splice(i, 1);
+ return;
+ }
+ }
+ },
+
+ center : function () {
+ var $w = $(window);
+
+ this.settings.$next_tip.css({
+ top : ((($w.height() - this.settings.$next_tip.outerHeight()) / 2) + $w.scrollTop()),
+ left : ((($w.width() - this.settings.$next_tip.outerWidth()) / 2) + $w.scrollLeft())
+ });
+
+ return true;
+ },
+
+ bottom : function () {
+ return /bottom/i.test(this.settings.tip_settings.tip_location);
+ },
+
+ top : function () {
+ return /top/i.test(this.settings.tip_settings.tip_location);
+ },
+
+ right : function () {
+ return /right/i.test(this.settings.tip_settings.tip_location);
+ },
+
+ left : function () {
+ return /left/i.test(this.settings.tip_settings.tip_location);
+ },
+
+ corners : function (el) {
+ var w = $(window),
+ window_half = w.height() / 2,
+ //using this to calculate since scroll may not have finished yet.
+ tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()),
+ right = w.width() + w.scrollLeft(),
+ offsetBottom = w.height() + tipOffset,
+ bottom = w.height() + w.scrollTop(),
+ top = w.scrollTop();
+
+ if (tipOffset < top) {
+ if (tipOffset < 0) {
+ top = 0;
+ } else {
+ top = tipOffset;
+ }
+ }
+
+ if (offsetBottom > bottom) {
+ bottom = offsetBottom;
+ }
+
+ return [
+ el.offset().top < top,
+ right < el.offset().left + el.outerWidth(),
+ bottom < el.offset().top + el.outerHeight(),
+ w.scrollLeft() > el.offset().left
+ ];
+ },
+
+ visible : function (hidden_corners) {
+ var i = hidden_corners.length;
+
+ while (i--) {
+ if (hidden_corners[i]) {
+ return false;
+ }
+ }
+
+ return true;
+ },
+
+ nub_position : function (nub, pos, def) {
+ if (pos === 'auto') {
+ nub.addClass(def);
+ } else {
+ nub.addClass(pos);
+ }
+ },
+
+ startTimer : function () {
+ if (this.settings.$li.length) {
+ this.settings.automate = setTimeout(function () {
+ this.hide();
+ this.show();
+ this.startTimer();
+ }.bind(this), this.settings.timer);
+ } else {
+ clearTimeout(this.settings.automate);
+ }
+ },
+
+ end : function (abort) {
+ if (this.settings.cookie_monster) {
+ $.cookie(this.settings.cookie_name, 'ridden', {expires : this.settings.cookie_expires, domain : this.settings.cookie_domain});
+ }
+
+ if (this.settings.timer > 0) {
+ clearTimeout(this.settings.automate);
+ }
+
+ if (this.settings.modal && this.settings.expose) {
+ this.un_expose();
+ }
+
+ // Unplug keystrokes listener
+ $(this.scope).off('keyup.joyride')
+
+ this.settings.$next_tip.data('closed', true);
+ this.settings.riding = false;
+
+ $('.joyride-modal-bg').hide();
+ this.settings.$current_tip.hide();
+
+ if (typeof abort === 'undefined' || abort === false) {
+ this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
+ this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
+ }
+
+ $('.joyride-tip-guide').remove();
+ },
+
+ off : function () {
+ $(this.scope).off('.joyride');
+ $(window).off('.joyride');
+ $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
+ $('.joyride-tip-guide, .joyride-modal-bg').remove();
+ clearTimeout(this.settings.automate);
+ this.settings = {};
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+/*
+ * Foundation Responsive Library
+ * http://foundation.zurb.com
+ * Copyright 2014, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+
+(function ($, window, document, undefined) {
+ 'use strict';
+
+ var header_helpers = function (class_array) {
+ var i = class_array.length;
+ var head = $('head');
+
+ while (i--) {
+ if (head.has('.' + class_array[i]).length === 0) {
+ head.append('<meta class="' + class_array[i] + '" />');
+ }
+ }
+ };
+
+ header_helpers([
+ 'foundation-mq-small',
+ 'foundation-mq-small-only',
+ 'foundation-mq-medium',
+ 'foundation-mq-medium-only',
+ 'foundation-mq-large',
+ 'foundation-mq-large-only',
+ 'foundation-mq-xlarge',
+ 'foundation-mq-xlarge-only',
+ 'foundation-mq-xxlarge',
+ 'foundation-data-attribute-namespace']);
+
+ // Enable FastClick if present
+
+ $(function () {
+ if (typeof FastClick !== 'undefined') {
+ // Don't attach to body if undefined
+ if (typeof document.body !== 'undefined') {
+ FastClick.attach(document.body);
+ }
+ }
+ });
+
+ // private Fast Selector wrapper,
+ // returns jQuery object. Only use where
+ // getElementById is not available.
+ var S = function (selector, context) {
+ if (typeof selector === 'string') {
+ if (context) {
+ var cont;
+ if (context.jquery) {
+ cont = context[0];
+ if (!cont) {
+ return context;
+ }
+ } else {
+ cont = context;
+ }
+ return $(cont.querySelectorAll(selector));
+ }
+
+ return $(document.querySelectorAll(selector));
+ }
+
+ return $(selector, context);
+ };
+
+ // Namespace functions.
+
+ var attr_name = function (init) {
+ var arr = [];
+ if (!init) {
+ arr.push('data');
+ }
+ if (this.namespace.length > 0) {
+ arr.push(this.namespace);
+ }
+ arr.push(this.name);
+
+ return arr.join('-');
+ };
+
+ var add_namespace = function (str) {
+ var parts = str.split('-'),
+ i = parts.length,
+ arr = [];
+
+ while (i--) {
+ if (i !== 0) {
+ arr.push(parts[i]);
+ } else {
+ if (this.namespace.length > 0) {
+ arr.push(this.namespace, parts[i]);
+ } else {
+ arr.push(parts[i]);
+ }
+ }
+ }
+
+ return arr.reverse().join('-');
+ };
+
+ // Event binding and data-options updating.
+
+ var bindings = function (method, options) {
+ var self = this,
+ bind = function(){
+ var $this = S(this),
+ should_bind_events = !$this.data(self.attr_name(true) + '-init');
+ $this.data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options($this)));
+
+ if (should_bind_events) {
+ self.events(this);
+ }
+ };
+
+ if (S(this.scope).is('[' + this.attr_name() +']')) {
+ bind.call(this.scope);
+ } else {
+ S('[' + this.attr_name() +']', this.scope).each(bind);
+ }
+ // # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating.
+ if (typeof method === 'string') {
+ return this[method].call(this, options);
+ }
+
+ };
+
+ var single_image_loaded = function (image, callback) {
+ function loaded () {
+ callback(image[0]);
+ }
+
+ function bindLoad () {
+ this.one('load', loaded);
+
+ if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
+ var src = this.attr( 'src' ),
+ param = src.match( /\?/ ) ? '&' : '?';
+
+ param += 'random=' + (new Date()).getTime();
+ this.attr('src', src + param);
+ }
+ }
+
+ if (!image.attr('src')) {
+ loaded();
+ return;
+ }
+
+ if (image[0].complete || image[0].readyState === 4) {
+ loaded();
+ } else {
+ bindLoad.call(image);
+ }
+ };
+
+ /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
+
+ window.matchMedia || (window.matchMedia = function() {
+ "use strict";
+
+ // For browsers that support matchMedium api such as IE 9 and webkit
+ var styleMedia = (window.styleMedia || window.media);
+
+ // For those that don't support matchMedium
+ if (!styleMedia) {
+ var style = document.createElement('style'),
+ script = document.getElementsByTagName('script')[0],
+ info = null;
+
+ style.type = 'text/css';
+ style.id = 'matchmediajs-test';
+
+ script.parentNode.insertBefore(style, script);
+
+ // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
+ info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;
+
+ styleMedia = {
+ matchMedium: function(media) {
+ var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
+
+ // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
+ if (style.styleSheet) {
+ style.styleSheet.cssText = text;
+ } else {
+ style.textContent = text;
+ }
+
+ // Test if media query is true or false
+ return info.width === '1px';
+ }
+ };
+ }
+
+ return function(media) {
+ return {
+ matches: styleMedia.matchMedium(media || 'all'),
+ media: media || 'all'
+ };
+ };
+ }());
+
+ /*
+ * jquery.requestAnimationFrame
+ * https://github.com/gnarf37/jquery-requestAnimationFrame
+ * Requires jQuery 1.8+
+ *
+ * Copyright (c) 2012 Corey Frang
+ * Licensed under the MIT license.
+ */
+
+ (function(jQuery) {
+
+
+ // requestAnimationFrame polyfill adapted from Erik Möller
+ // fixes from Paul Irish and Tino Zijdel
+ // http://paulirish.com/2011/requestanimationframe-for-smart-animating/
+ // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
+
+ var animating,
+ lastTime = 0,
+ vendors = ['webkit', 'moz'],
+ requestAnimationFrame = window.requestAnimationFrame,
+ cancelAnimationFrame = window.cancelAnimationFrame,
+ jqueryFxAvailable = 'undefined' !== typeof jQuery.fx;
+
+ for (; lastTime < vendors.length && !requestAnimationFrame; lastTime++) {
+ requestAnimationFrame = window[ vendors[lastTime] + 'RequestAnimationFrame' ];
+ cancelAnimationFrame = cancelAnimationFrame ||
+ window[ vendors[lastTime] + 'CancelAnimationFrame' ] ||
+ window[ vendors[lastTime] + 'CancelRequestAnimationFrame' ];
+ }
+
+ function raf() {
+ if (animating) {
+ requestAnimationFrame(raf);
+
+ if (jqueryFxAvailable) {
+ jQuery.fx.tick();
+ }
+ }
+ }
+
+ if (requestAnimationFrame) {
+ // use rAF
+ window.requestAnimationFrame = requestAnimationFrame;
+ window.cancelAnimationFrame = cancelAnimationFrame;
+
+ if (jqueryFxAvailable) {
+ jQuery.fx.timer = function (timer) {
+ if (timer() && jQuery.timers.push(timer) && !animating) {
+ animating = true;
+ raf();
+ }
+ };
+
+ jQuery.fx.stop = function () {
+ animating = false;
+ };
+ }
+ } else {
+ // polyfill
+ window.requestAnimationFrame = function (callback) {
+ var currTime = new Date().getTime(),
+ timeToCall = Math.max(0, 16 - (currTime - lastTime)),
+ id = window.setTimeout(function () {
+ callback(currTime + timeToCall);
+ }, timeToCall);
+ lastTime = currTime + timeToCall;
+ return id;
+ };
+
+ window.cancelAnimationFrame = function (id) {
+ clearTimeout(id);
+ };
+
+ }
+
+ }( $ ));
+
+ function removeQuotes (string) {
+ if (typeof string === 'string' || string instanceof String) {
+ string = string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g, '');
+ }
+
+ return string;
+ }
+
+ window.Foundation = {
+ name : 'Foundation',
+
+ version : '5.5.2',
+
+ media_queries : {
+ 'small' : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'small-only' : S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'medium' : S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'medium-only' : S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'large' : S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'large-only' : S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'xlarge' : S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'xlarge-only' : S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
+ 'xxlarge' : S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, '')
+ },
+
+ stylesheet : $('<style></style>').appendTo('head')[0].sheet,
+
+ global : {
+ namespace : undefined
+ },
+
+ init : function (scope, libraries, method, options, response) {
+ var args = [scope, method, options, response],
+ responses = [];
+
+ // check RTL
+ this.rtl = /rtl/i.test(S('html').attr('dir'));
+
+ // set foundation global scope
+ this.scope = scope || this.scope;
+
+ this.set_namespace();
+
+ if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) {
+ if (this.libs.hasOwnProperty(libraries)) {
+ responses.push(this.init_lib(libraries, args));
+ }
+ } else {
+ for (var lib in this.libs) {
+ responses.push(this.init_lib(lib, libraries));
+ }
+ }
+
+ S(window).load(function () {
+ S(window)
+ .trigger('resize.fndtn.clearing')
+ .trigger('resize.fndtn.dropdown')
+ .trigger('resize.fndtn.equalizer')
+ .trigger('resize.fndtn.interchange')
+ .trigger('resize.fndtn.joyride')
+ .trigger('resize.fndtn.magellan')
+ .trigger('resize.fndtn.topbar')
+ .trigger('resize.fndtn.slider');
+ });
+
+ return scope;
+ },
+
+ init_lib : function (lib, args) {
+ if (this.libs.hasOwnProperty(lib)) {
+ this.patch(this.libs[lib]);
+
+ if (args && args.hasOwnProperty(lib)) {
+ if (typeof this.libs[lib].settings !== 'undefined') {
+ $.extend(true, this.libs[lib].settings, args[lib]);
+ } else if (typeof this.libs[lib].defaults !== 'undefined') {
+ $.extend(true, this.libs[lib].defaults, args[lib]);
+ }
+ return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]);
+ }
+
+ args = args instanceof Array ? args : new Array(args);
+ return this.libs[lib].init.apply(this.libs[lib], args);
+ }
+
+ return function () {};
+ },
+
+ patch : function (lib) {
+ lib.scope = this.scope;
+ lib.namespace = this.global.namespace;
+ lib.rtl = this.rtl;
+ lib['data_options'] = this.utils.data_options;
+ lib['attr_name'] = attr_name;
+ lib['add_namespace'] = add_namespace;
+ lib['bindings'] = bindings;
+ lib['S'] = this.utils.S;
+ },
+
+ inherit : function (scope, methods) {
+ var methods_arr = methods.split(' '),
+ i = methods_arr.length;
+
+ while (i--) {
+ if (this.utils.hasOwnProperty(methods_arr[i])) {
+ scope[methods_arr[i]] = this.utils[methods_arr[i]];
+ }
+ }
+ },
+
+ set_namespace : function () {
+
+ // Description:
+ // Don't bother reading the namespace out of the meta tag
+ // if the namespace has been set globally in javascript
+ //
+ // Example:
+ // Foundation.global.namespace = 'my-namespace';
+ // or make it an empty string:
+ // Foundation.global.namespace = '';
+ //
+ //
+
+ // If the namespace has not been set (is undefined), try to read it out of the meta element.
+ // Otherwise use the globally defined namespace, even if it's empty ('')
+ var namespace = ( this.global.namespace === undefined ) ? $('.foundation-data-attribute-namespace').css('font-family') : this.global.namespace;
+
+ // Finally, if the namsepace is either undefined or false, set it to an empty string.
+ // Otherwise use the namespace value.
+ this.global.namespace = ( namespace === undefined || /false/i.test(namespace) ) ? '' : namespace;
+ },
+
+ libs : {},
+
+ // methods that can be inherited in libraries
+ utils : {
+
+ // Description:
+ // Fast Selector wrapper returns jQuery object. Only use where getElementById
+ // is not available.
+ //
+ // Arguments:
+ // Selector (String): CSS selector describing the element(s) to be
+ // returned as a jQuery object.
+ //
+ // Scope (String): CSS selector describing the area to be searched. Default
+ // is document.
+ //
+ // Returns:
+ // Element (jQuery Object): jQuery object containing elements matching the
+ // selector within the scope.
+ S : S,
+
+ // Description:
+ // Executes a function a max of once every n milliseconds
+ //
+ // Arguments:
+ // Func (Function): Function to be throttled.
+ //
+ // Delay (Integer): Function execution threshold in milliseconds.
+ //
+ // Returns:
+ // Lazy_function (Function): Function with throttling applied.
+ throttle : function (func, delay) {
+ var timer = null;
+
+ return function () {
+ var context = this, args = arguments;
+
+ if (timer == null) {
+ timer = setTimeout(function () {
+ func.apply(context, args);
+ timer = null;
+ }, delay);
+ }
+ };
+ },
+
+ // Description:
+ // Executes a function when it stops being invoked for n seconds
+ // Modified version of _.debounce() http://underscorejs.org
+ //
+ // Arguments:
+ // Func (Function): Function to be debounced.
+ //
+ // Delay (Integer): Function execution threshold in milliseconds.
+ //
+ // Immediate (Bool): Whether the function should be called at the beginning
+ // of the delay instead of the end. Default is false.
+ //
+ // Returns:
+ // Lazy_function (Function): Function with debouncing applied.
+ debounce : function (func, delay, immediate) {
+ var timeout, result;
+ return function () {
+ var context = this, args = arguments;
+ var later = function () {
+ timeout = null;
+ if (!immediate) {
+ result = func.apply(context, args);
+ }
+ };
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, delay);
+ if (callNow) {
+ result = func.apply(context, args);
+ }
+ return result;
+ };
+ },
+
+ // Description:
+ // Parses data-options attribute
+ //
+ // Arguments:
+ // El (jQuery Object): Element to be parsed.
+ //
+ // Returns:
+ // Options (Javascript Object): Contents of the element's data-options
+ // attribute.
+ data_options : function (el, data_attr_name) {
+ data_attr_name = data_attr_name || 'options';
+ var opts = {}, ii, p, opts_arr,
+ data_options = function (el) {
+ var namespace = Foundation.global.namespace;
+
+ if (namespace.length > 0) {
+ return el.data(namespace + '-' + data_attr_name);
+ }
+
+ return el.data(data_attr_name);
+ };
+
+ var cached_options = data_options(el);
+
+ if (typeof cached_options === 'object') {
+ return cached_options;
+ }
+
+ opts_arr = (cached_options || ':').split(';');
+ ii = opts_arr.length;
+
+ function isNumber (o) {
+ return !isNaN (o - 0) && o !== null && o !== '' && o !== false && o !== true;
+ }
+
+ function trim (str) {
+ if (typeof str === 'string') {
+ return $.trim(str);
+ }
+ return str;
+ }
+
+ while (ii--) {
+ p = opts_arr[ii].split(':');
+ p = [p[0], p.slice(1).join(':')];
+
+ if (/true/i.test(p[1])) {
+ p[1] = true;
+ }
+ if (/false/i.test(p[1])) {
+ p[1] = false;
+ }
+ if (isNumber(p[1])) {
+ if (p[1].indexOf('.') === -1) {
+ p[1] = parseInt(p[1], 10);
+ } else {
+ p[1] = parseFloat(p[1]);
+ }
+ }
+
+ if (p.length === 2 && p[0].length > 0) {
+ opts[trim(p[0])] = trim(p[1]);
+ }
+ }
+
+ return opts;
+ },
+
+ // Description:
+ // Adds JS-recognizable media queries
+ //
+ // Arguments:
+ // Media (String): Key string for the media query to be stored as in
+ // Foundation.media_queries
+ //
+ // Class (String): Class name for the generated <meta> tag
+ register_media : function (media, media_class) {
+ if (Foundation.media_queries[media] === undefined) {
+ $('head').append('<meta class="' + media_class + '"/>');
+ Foundation.media_queries[media] = removeQuotes($('.' + media_class).css('font-family'));
+ }
+ },
+
+ // Description:
+ // Add custom CSS within a JS-defined media query
+ //
+ // Arguments:
+ // Rule (String): CSS rule to be appended to the document.
+ //
+ // Media (String): Optional media query string for the CSS rule to be
+ // nested under.
+ add_custom_rule : function (rule, media) {
+ if (media === undefined && Foundation.stylesheet) {
+ Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length);
+ } else {
+ var query = Foundation.media_queries[media];
+
+ if (query !== undefined) {
+ Foundation.stylesheet.insertRule('@media ' +
+ Foundation.media_queries[media] + '{ ' + rule + ' }', Foundation.stylesheet.cssRules.length);
+ }
+ }
+ },
+
+ // Description:
+ // Performs a callback function when an image is fully loaded
+ //
+ // Arguments:
+ // Image (jQuery Object): Image(s) to check if loaded.
+ //
+ // Callback (Function): Function to execute when image is fully loaded.
+ image_loaded : function (images, callback) {
+ var self = this,
+ unloaded = images.length;
+
+ function pictures_has_height(images) {
+ var pictures_number = images.length;
+
+ for (var i = pictures_number - 1; i >= 0; i--) {
+ if(images.attr('height') === undefined) {
+ return false;
+ };
+ };
+
+ return true;
+ }
+
+ if (unloaded === 0 || pictures_has_height(images)) {
+ callback(images);
+ }
+
+ images.each(function () {
+ single_image_loaded(self.S(this), function () {
+ unloaded -= 1;
+ if (unloaded === 0) {
+ callback(images);
+ }
+ });
+ });
+ },
+
+ // Description:
+ // Returns a random, alphanumeric string
+ //
+ // Arguments:
+ // Length (Integer): Length of string to be generated. Defaults to random
+ // integer.
+ //
+ // Returns:
+ // Rand (String): Pseudo-random, alphanumeric string.
+ random_str : function () {
+ if (!this.fidx) {
+ this.fidx = 0;
+ }
+ this.prefix = this.prefix || [(this.name || 'F'), (+new Date).toString(36)].join('-');
+
+ return this.prefix + (this.fidx++).toString(36);
+ },
+
+ // Description:
+ // Helper for window.matchMedia
+ //
+ // Arguments:
+ // mq (String): Media query
+ //
+ // Returns:
+ // (Boolean): Whether the media query passes or not
+ match : function (mq) {
+ return window.matchMedia(mq).matches;
+ },
+
+ // Description:
+ // Helpers for checking Foundation default media queries with JS
+ //
+ // Returns:
+ // (Boolean): Whether the media query passes or not
+
+ is_small_up : function () {
+ return this.match(Foundation.media_queries.small);
+ },
+
+ is_medium_up : function () {
+ return this.match(Foundation.media_queries.medium);
+ },
+
+ is_large_up : function () {
+ return this.match(Foundation.media_queries.large);
+ },
+
+ is_xlarge_up : function () {
+ return this.match(Foundation.media_queries.xlarge);
+ },
+
+ is_xxlarge_up : function () {
+ return this.match(Foundation.media_queries.xxlarge);
+ },
+
+ is_small_only : function () {
+ return !this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
+ },
+
+ is_medium_only : function () {
+ return this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
+ },
+
+ is_large_only : function () {
+ return this.is_medium_up() && this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
+ },
+
+ is_xlarge_only : function () {
+ return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && !this.is_xxlarge_up();
+ },
+
+ is_xxlarge_only : function () {
+ return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && this.is_xxlarge_up();
+ }
+ }
+ };
+
+ $.fn.foundation = function () {
+ var args = Array.prototype.slice.call(arguments, 0);
+
+ return this.each(function () {
+ Foundation.init.apply(Foundation, [this].concat(args));
+ return this;
+ });
+ };
+
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs['magellan-expedition'] = {
+ name : 'magellan-expedition',
+
+ version : '5.5.2',
+
+ settings : {
+ active_class : 'active',
+ threshold : 0, // pixels from the top of the expedition for it to become fixes
+ destination_threshold : 20, // pixels from the top of destination for it to be considered active
+ throttle_delay : 30, // calculation throttling to increase framerate
+ fixed_top : 0, // top distance in pixels assigend to the fixed element on scroll
+ offset_by_height : true, // whether to offset the destination by the expedition height. Usually you want this to be true, unless your expedition is on the side.
+ duration : 700, // animation duration time
+ easing : 'swing' // animation easing
+ },
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle');
+ this.bindings(method, options);
+ },
+
+ events : function () {
+ var self = this,
+ S = self.S,
+ settings = self.settings;
+
+ // initialize expedition offset
+ self.set_expedition_position();
+
+ S(self.scope)
+ .off('.magellan')
+ .on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href*=#]', function (e) {
+ var sameHost = ((this.hostname === location.hostname) || !this.hostname),
+ samePath = self.filterPathname(location.pathname) === self.filterPathname(this.pathname),
+ testHash = this.hash.replace(/(:|\.|\/)/g, '\\$1'),
+ anchor = this;
+
+ if (sameHost && samePath && testHash) {
+ e.preventDefault();
+ var expedition = $(this).closest('[' + self.attr_name() + ']'),
+ settings = expedition.data('magellan-expedition-init'),
+ hash = this.hash.split('#').join(''),
+ target = $('a[name="' + hash + '"]');
+
+ if (target.length === 0) {
+ target = $('#' + hash);
+
+ }
+
+ // Account for expedition height if fixed position
+ var scroll_top = target.offset().top - settings.destination_threshold + 1;
+ if (settings.offset_by_height) {
+ scroll_top = scroll_top - expedition.outerHeight();
+ }
+ $('html, body').stop().animate({
+ 'scrollTop' : scroll_top
+ }, settings.duration, settings.easing, function () {
+ if (history.pushState) {
+ history.pushState(null, null, anchor.pathname + '#' + hash);
+ }
+ else {
+ location.hash = anchor.pathname + '#' + hash;
+ }
+ });
+ }
+ })
+ .on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay));
+ },
+
+ check_for_arrivals : function () {
+ var self = this;
+ self.update_arrivals();
+ self.update_expedition_positions();
+ },
+
+ set_expedition_position : function () {
+ var self = this;
+ $('[' + this.attr_name() + '=fixed]', self.scope).each(function (idx, el) {
+ var expedition = $(this),
+ settings = expedition.data('magellan-expedition-init'),
+ styles = expedition.attr('styles'), // save styles
+ top_offset, fixed_top;
+
+ expedition.attr('style', '');
+ top_offset = expedition.offset().top + settings.threshold;
+
+ //set fixed-top by attribute
+ fixed_top = parseInt(expedition.data('magellan-fixed-top'));
+ if (!isNaN(fixed_top)) {
+ self.settings.fixed_top = fixed_top;
+ }
+
+ expedition.data(self.data_attr('magellan-top-offset'), top_offset);
+ expedition.attr('style', styles);
+ });
+ },
+
+ update_expedition_positions : function () {
+ var self = this,
+ window_top_offset = $(window).scrollTop();
+
+ $('[' + this.attr_name() + '=fixed]', self.scope).each(function () {
+ var expedition = $(this),
+ settings = expedition.data('magellan-expedition-init'),
+ styles = expedition.attr('style'), // save styles
+ top_offset = expedition.data('magellan-top-offset');
+
+ //scroll to the top distance
+ if (window_top_offset + self.settings.fixed_top >= top_offset) {
+ // Placeholder allows height calculations to be consistent even when
+ // appearing to switch between fixed/non-fixed placement
+ var placeholder = expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']');
+ if (placeholder.length === 0) {
+ placeholder = expedition.clone();
+ placeholder.removeAttr(self.attr_name());
+ placeholder.attr(self.add_namespace('data-magellan-expedition-clone'), '');
+ expedition.before(placeholder);
+ }
+ expedition.css({position :'fixed', top : settings.fixed_top}).addClass('fixed');
+ } else {
+ expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
+ expedition.attr('style', styles).css('position', '').css('top', '').removeClass('fixed');
+ }
+ });
+ },
+
+ update_arrivals : function () {
+ var self = this,
+ window_top_offset = $(window).scrollTop();
+
+ $('[' + this.attr_name() + ']', self.scope).each(function () {
+ var expedition = $(this),
+ settings = expedition.data(self.attr_name(true) + '-init'),
+ offsets = self.offsets(expedition, window_top_offset),
+ arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']'),
+ active_item = false;
+ offsets.each(function (idx, item) {
+ if (item.viewport_offset >= item.top_offset) {
+ var arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']');
+ arrivals.not(item.arrival).removeClass(settings.active_class);
+ item.arrival.addClass(settings.active_class);
+ active_item = true;
+ return true;
+ }
+ });
+
+ if (!active_item) {
+ arrivals.removeClass(settings.active_class);
+ }
+ });
+ },
+
+ offsets : function (expedition, window_offset) {
+ var self = this,
+ settings = expedition.data(self.attr_name(true) + '-init'),
+ viewport_offset = window_offset;
+
+ return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function (idx, el) {
+ var name = $(this).data(self.data_attr('magellan-arrival')),
+ dest = $('[' + self.add_namespace('data-magellan-destination') + '=' + name + ']');
+ if (dest.length > 0) {
+ var top_offset = dest.offset().top - settings.destination_threshold;
+ if (settings.offset_by_height) {
+ top_offset = top_offset - expedition.outerHeight();
+ }
+ top_offset = Math.floor(top_offset);
+ return {
+ destination : dest,
+ arrival : $(this),
+ top_offset : top_offset,
+ viewport_offset : viewport_offset
+ }
+ }
+ }).sort(function (a, b) {
+ if (a.top_offset < b.top_offset) {
+ return -1;
+ }
+ if (a.top_offset > b.top_offset) {
+ return 1;
+ }
+ return 0;
+ });
+ },
+
+ data_attr : function (str) {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + str;
+ }
+
+ return str;
+ },
+
+ off : function () {
+ this.S(this.scope).off('.magellan');
+ this.S(window).off('.magellan');
+ },
+
+ filterPathname : function (pathname) {
+ pathname = pathname || '';
+ return pathname
+ .replace(/^\//,'')
+ .replace(/(?:index|default).[a-zA-Z]{3,4}$/,'')
+ .replace(/\/$/,'');
+ },
+
+ reflow : function () {
+ var self = this;
+ // remove placeholder expeditions used for height calculation purposes
+ $('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove();
+ }
+ };
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.offcanvas = {
+ name : 'offcanvas',
+
+ version : '5.5.2',
+
+ settings : {
+ open_method : 'move',
+ close_on_click : false
+ },
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function () {
+ var self = this,
+ S = self.S,
+ move_class = '',
+ right_postfix = '',
+ left_postfix = '';
+
+ if (this.settings.open_method === 'move') {
+ move_class = 'move-';
+ right_postfix = 'right';
+ left_postfix = 'left';
+ } else if (this.settings.open_method === 'overlap_single') {
+ move_class = 'offcanvas-overlap-';
+ right_postfix = 'right';
+ left_postfix = 'left';
+ } else if (this.settings.open_method === 'overlap') {
+ move_class = 'offcanvas-overlap';
+ }
+
+ S(this.scope).off('.offcanvas')
+ .on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
+ self.click_toggle_class(e, move_class + right_postfix);
+ if (self.settings.open_method !== 'overlap') {
+ S('.left-submenu').removeClass(move_class + right_postfix);
+ }
+ $('.left-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.left-off-canvas-menu a', function (e) {
+ var settings = self.get_settings(e);
+ var parent = S(this).parent();
+
+ if (settings.close_on_click && !parent.hasClass('has-submenu') && !parent.hasClass('back')) {
+ self.hide.call(self, move_class + right_postfix, self.get_wrapper(e));
+ parent.parent().removeClass(move_class + right_postfix);
+ } else if (S(this).parent().hasClass('has-submenu')) {
+ e.preventDefault();
+ S(this).siblings('.left-submenu').toggleClass(move_class + right_postfix);
+ } else if (parent.hasClass('back')) {
+ e.preventDefault();
+ parent.parent().removeClass(move_class + right_postfix);
+ }
+ $('.left-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
+ self.click_toggle_class(e, move_class + left_postfix);
+ if (self.settings.open_method !== 'overlap') {
+ S('.right-submenu').removeClass(move_class + left_postfix);
+ }
+ $('.right-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.right-off-canvas-menu a', function (e) {
+ var settings = self.get_settings(e);
+ var parent = S(this).parent();
+
+ if (settings.close_on_click && !parent.hasClass('has-submenu') && !parent.hasClass('back')) {
+ self.hide.call(self, move_class + left_postfix, self.get_wrapper(e));
+ parent.parent().removeClass(move_class + left_postfix);
+ } else if (S(this).parent().hasClass('has-submenu')) {
+ e.preventDefault();
+ S(this).siblings('.right-submenu').toggleClass(move_class + left_postfix);
+ } else if (parent.hasClass('back')) {
+ e.preventDefault();
+ parent.parent().removeClass(move_class + left_postfix);
+ }
+ $('.right-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
+ self.click_remove_class(e, move_class + left_postfix);
+ S('.right-submenu').removeClass(move_class + left_postfix);
+ if (right_postfix) {
+ self.click_remove_class(e, move_class + right_postfix);
+ S('.left-submenu').removeClass(move_class + left_postfix);
+ }
+ $('.right-off-canvas-toggle').attr('aria-expanded', 'true');
+ })
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
+ self.click_remove_class(e, move_class + left_postfix);
+ $('.left-off-canvas-toggle').attr('aria-expanded', 'false');
+ if (right_postfix) {
+ self.click_remove_class(e, move_class + right_postfix);
+ $('.right-off-canvas-toggle').attr('aria-expanded', 'false');
+ }
+ });
+ },
+
+ toggle : function (class_name, $off_canvas) {
+ $off_canvas = $off_canvas || this.get_wrapper();
+ if ($off_canvas.is('.' + class_name)) {
+ this.hide(class_name, $off_canvas);
+ } else {
+ this.show(class_name, $off_canvas);
+ }
+ },
+
+ show : function (class_name, $off_canvas) {
+ $off_canvas = $off_canvas || this.get_wrapper();
+ $off_canvas.trigger('open.fndtn.offcanvas');
+ $off_canvas.addClass(class_name);
+ },
+
+ hide : function (class_name, $off_canvas) {
+ $off_canvas = $off_canvas || this.get_wrapper();
+ $off_canvas.trigger('close.fndtn.offcanvas');
+ $off_canvas.removeClass(class_name);
+ },
+
+ click_toggle_class : function (e, class_name) {
+ e.preventDefault();
+ var $off_canvas = this.get_wrapper(e);
+ this.toggle(class_name, $off_canvas);
+ },
+
+ click_remove_class : function (e, class_name) {
+ e.preventDefault();
+ var $off_canvas = this.get_wrapper(e);
+ this.hide(class_name, $off_canvas);
+ },
+
+ get_settings : function (e) {
+ var offcanvas = this.S(e.target).closest('[' + this.attr_name() + ']');
+ return offcanvas.data(this.attr_name(true) + '-init') || this.settings;
+ },
+
+ get_wrapper : function (e) {
+ var $off_canvas = this.S(e ? e.target : this.scope).closest('.off-canvas-wrap');
+
+ if ($off_canvas.length === 0) {
+ $off_canvas = this.S('.off-canvas-wrap');
+ }
+ return $off_canvas;
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ var noop = function () {};
+
+ var Orbit = function (el, settings) {
+ // Don't reinitialize plugin
+ if (el.hasClass(settings.slides_container_class)) {
+ return this;
+ }
+
+ var self = this,
+ container,
+ slides_container = el,
+ number_container,
+ bullets_container,
+ timer_container,
+ idx = 0,
+ animate,
+ timer,
+ locked = false,
+ adjust_height_after = false;
+
+ self.slides = function () {
+ return slides_container.children(settings.slide_selector);
+ };
+
+ self.slides().first().addClass(settings.active_slide_class);
+
+ self.update_slide_number = function (index) {
+ if (settings.slide_number) {
+ number_container.find('span:first').text(parseInt(index) + 1);
+ number_container.find('span:last').text(self.slides().length);
+ }
+ if (settings.bullets) {
+ bullets_container.children().removeClass(settings.bullets_active_class);
+ $(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
+ }
+ };
+
+ self.update_active_link = function (index) {
+ var link = $('[data-orbit-link="' + self.slides().eq(index).attr('data-orbit-slide') + '"]');
+ link.siblings().removeClass(settings.bullets_active_class);
+ link.addClass(settings.bullets_active_class);
+ };
+
+ self.build_markup = function () {
+ slides_container.wrap('<div class="' + settings.container_class + '"></div>');
+ container = slides_container.parent();
+ slides_container.addClass(settings.slides_container_class);
+
+ if (settings.stack_on_small) {
+ container.addClass(settings.stack_on_small_class);
+ }
+
+ if (settings.navigation_arrows) {
+ container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
+ container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
+ }
+
+ if (settings.timer) {
+ timer_container = $('<div>').addClass(settings.timer_container_class);
+ timer_container.append('<span>');
+ timer_container.append($('<div>').addClass(settings.timer_progress_class));
+ timer_container.addClass(settings.timer_paused_class);
+ container.append(timer_container);
+ }
+
+ if (settings.slide_number) {
+ number_container = $('<div>').addClass(settings.slide_number_class);
+ number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
+ container.append(number_container);
+ }
+
+ if (settings.bullets) {
+ bullets_container = $('<ol>').addClass(settings.bullets_container_class);
+ container.append(bullets_container);
+ bullets_container.wrap('<div class="orbit-bullets-container"></div>');
+ self.slides().each(function (idx, el) {
+ var bullet = $('<li>').attr('data-orbit-slide', idx).on('click', self.link_bullet);;
+ bullets_container.append(bullet);
+ });
+ }
+
+ };
+
+ self._goto = function (next_idx, start_timer) {
+ // if (locked) {return false;}
+ if (next_idx === idx) {return false;}
+ if (typeof timer === 'object') {timer.restart();}
+ var slides = self.slides();
+
+ var dir = 'next';
+ locked = true;
+ if (next_idx < idx) {dir = 'prev';}
+ if (next_idx >= slides.length) {
+ if (!settings.circular) {
+ return false;
+ }
+ next_idx = 0;
+ } else if (next_idx < 0) {
+ if (!settings.circular) {
+ return false;
+ }
+ next_idx = slides.length - 1;
+ }
+
+ var current = $(slides.get(idx));
+ var next = $(slides.get(next_idx));
+
+ current.css('zIndex', 2);
+ current.removeClass(settings.active_slide_class);
+ next.css('zIndex', 4).addClass(settings.active_slide_class);
+
+ slides_container.trigger('before-slide-change.fndtn.orbit');
+ settings.before_slide_change();
+ self.update_active_link(next_idx);
+
+ var callback = function () {
+ var unlock = function () {
+ idx = next_idx;
+ locked = false;
+ if (start_timer === true) {timer = self.create_timer(); timer.start();}
+ self.update_slide_number(idx);
+ slides_container.trigger('after-slide-change.fndtn.orbit', [{slide_number : idx, total_slides : slides.length}]);
+ settings.after_slide_change(idx, slides.length);
+ };
+ if (slides_container.outerHeight() != next.outerHeight() && settings.variable_height) {
+ slides_container.animate({'height': next.outerHeight()}, 250, 'linear', unlock);
+ } else {
+ unlock();
+ }
+ };
+
+ if (slides.length === 1) {callback(); return false;}
+
+ var start_animation = function () {
+ if (dir === 'next') {animate.next(current, next, callback);}
+ if (dir === 'prev') {animate.prev(current, next, callback);}
+ };
+
+ if (next.outerHeight() > slides_container.outerHeight() && settings.variable_height) {
+ slides_container.animate({'height': next.outerHeight()}, 250, 'linear', start_animation);
+ } else {
+ start_animation();
+ }
+ };
+
+ self.next = function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ self._goto(idx + 1);
+ };
+
+ self.prev = function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ self._goto(idx - 1);
+ };
+
+ self.link_custom = function (e) {
+ e.preventDefault();
+ var link = $(this).attr('data-orbit-link');
+ if ((typeof link === 'string') && (link = $.trim(link)) != '') {
+ var slide = container.find('[data-orbit-slide=' + link + ']');
+ if (slide.index() != -1) {self._goto(slide.index());}
+ }
+ };
+
+ self.link_bullet = function (e) {
+ var index = $(this).attr('data-orbit-slide');
+ if ((typeof index === 'string') && (index = $.trim(index)) != '') {
+ if (isNaN(parseInt(index))) {
+ var slide = container.find('[data-orbit-slide=' + index + ']');
+ if (slide.index() != -1) {self._goto(slide.index() + 1);}
+ } else {
+ self._goto(parseInt(index));
+ }
+ }
+
+ }
+
+ self.timer_callback = function () {
+ self._goto(idx + 1, true);
+ }
+
+ self.compute_dimensions = function () {
+ var current = $(self.slides().get(idx));
+ var h = current.outerHeight();
+ if (!settings.variable_height) {
+ self.slides().each(function(){
+ if ($(this).outerHeight() > h) { h = $(this).outerHeight(); }
+ });
+ }
+ slides_container.height(h);
+ };
+
+ self.create_timer = function () {
+ var t = new Timer(
+ container.find('.' + settings.timer_container_class),
+ settings,
+ self.timer_callback
+ );
+ return t;
+ };
+
+ self.stop_timer = function () {
+ if (typeof timer === 'object') {
+ timer.stop();
+ }
+ };
+
+ self.toggle_timer = function () {
+ var t = container.find('.' + settings.timer_container_class);
+ if (t.hasClass(settings.timer_paused_class)) {
+ if (typeof timer === 'undefined') {timer = self.create_timer();}
+ timer.start();
+ } else {
+ if (typeof timer === 'object') {timer.stop();}
+ }
+ };
+
+ self.init = function () {
+ self.build_markup();
+ if (settings.timer) {
+ timer = self.create_timer();
+ Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
+ }
+ animate = new FadeAnimation(settings, slides_container);
+ if (settings.animation === 'slide') {
+ animate = new SlideAnimation(settings, slides_container);
+ }
+
+ container.on('click', '.' + settings.next_class, self.next);
+ container.on('click', '.' + settings.prev_class, self.prev);
+
+ if (settings.next_on_click) {
+ container.on('click', '.' + settings.slides_container_class + ' [data-orbit-slide]', self.link_bullet);
+ }
+
+ container.on('click', self.toggle_timer);
+ if (settings.swipe) {
+ container.on('touchstart.fndtn.orbit', function (e) {
+ if (!e.touches) {e = e.originalEvent;}
+ var data = {
+ start_page_x : e.touches[0].pageX,
+ start_page_y : e.touches[0].pageY,
+ start_time : (new Date()).getTime(),
+ delta_x : 0,
+ is_scrolling : undefined
+ };
+ container.data('swipe-transition', data);
+ e.stopPropagation();
+ })
+ .on('touchmove.fndtn.orbit', function (e) {
+ if (!e.touches) {
+ e = e.originalEvent;
+ }
+ // Ignore pinch/zoom events
+ if (e.touches.length > 1 || e.scale && e.scale !== 1) {
+ return;
+ }
+
+ var data = container.data('swipe-transition');
+ if (typeof data === 'undefined') {data = {};}
+
+ data.delta_x = e.touches[0].pageX - data.start_page_x;
+
+ if ( typeof data.is_scrolling === 'undefined') {
+ data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
+ }
+
+ if (!data.is_scrolling && !data.active) {
+ e.preventDefault();
+ var direction = (data.delta_x < 0) ? (idx + 1) : (idx - 1);
+ data.active = true;
+ self._goto(direction);
+ }
+ })
+ .on('touchend.fndtn.orbit', function (e) {
+ container.data('swipe-transition', {});
+ e.stopPropagation();
+ })
+ }
+ container.on('mouseenter.fndtn.orbit', function (e) {
+ if (settings.timer && settings.pause_on_hover) {
+ self.stop_timer();
+ }
+ })
+ .on('mouseleave.fndtn.orbit', function (e) {
+ if (settings.timer && settings.resume_on_mouseout) {
+ timer.start();
+ }
+ });
+
+ $(document).on('click', '[data-orbit-link]', self.link_custom);
+ $(window).on('load resize', self.compute_dimensions);
+ Foundation.utils.image_loaded(this.slides().children('img'), self.compute_dimensions);
+ Foundation.utils.image_loaded(this.slides().children('img'), function () {
+ container.prev('.' + settings.preloader_class).css('display', 'none');
+ self.update_slide_number(0);
+ self.update_active_link(0);
+ slides_container.trigger('ready.fndtn.orbit');
+ });
+ };
+
+ self.init();
+ };
+
+ var Timer = function (el, settings, callback) {
+ var self = this,
+ duration = settings.timer_speed,
+ progress = el.find('.' + settings.timer_progress_class),
+ start,
+ timeout,
+ left = -1;
+
+ this.update_progress = function (w) {
+ var new_progress = progress.clone();
+ new_progress.attr('style', '');
+ new_progress.css('width', w + '%');
+ progress.replaceWith(new_progress);
+ progress = new_progress;
+ };
+
+ this.restart = function () {
+ clearTimeout(timeout);
+ el.addClass(settings.timer_paused_class);
+ left = -1;
+ self.update_progress(0);
+ };
+
+ this.start = function () {
+ if (!el.hasClass(settings.timer_paused_class)) {return true;}
+ left = (left === -1) ? duration : left;
+ el.removeClass(settings.timer_paused_class);
+ start = new Date().getTime();
+ progress.animate({'width' : '100%'}, left, 'linear');
+ timeout = setTimeout(function () {
+ self.restart();
+ callback();
+ }, left);
+ el.trigger('timer-started.fndtn.orbit')
+ };
+
+ this.stop = function () {
+ if (el.hasClass(settings.timer_paused_class)) {return true;}
+ clearTimeout(timeout);
+ el.addClass(settings.timer_paused_class);
+ var end = new Date().getTime();
+ left = left - (end - start);
+ var w = 100 - ((left / duration) * 100);
+ self.update_progress(w);
+ el.trigger('timer-stopped.fndtn.orbit');
+ };
+ };
+
+ var SlideAnimation = function (settings, container) {
+ var duration = settings.animation_speed;
+ var is_rtl = ($('html[dir=rtl]').length === 1);
+ var margin = is_rtl ? 'marginRight' : 'marginLeft';
+ var animMargin = {};
+ animMargin[margin] = '0%';
+
+ this.next = function (current, next, callback) {
+ current.animate({marginLeft : '-100%'}, duration);
+ next.animate(animMargin, duration, function () {
+ current.css(margin, '100%');
+ callback();
+ });
+ };
+
+ this.prev = function (current, prev, callback) {
+ current.animate({marginLeft : '100%'}, duration);
+ prev.css(margin, '-100%');
+ prev.animate(animMargin, duration, function () {
+ current.css(margin, '100%');
+ callback();
+ });
+ };
+ };
+
+ var FadeAnimation = function (settings, container) {
+ var duration = settings.animation_speed;
+ var is_rtl = ($('html[dir=rtl]').length === 1);
+ var margin = is_rtl ? 'marginRight' : 'marginLeft';
+
+ this.next = function (current, next, callback) {
+ next.css({'margin' : '0%', 'opacity' : '0.01'});
+ next.animate({'opacity' :'1'}, duration, 'linear', function () {
+ current.css('margin', '100%');
+ callback();
+ });
+ };
+
+ this.prev = function (current, prev, callback) {
+ prev.css({'margin' : '0%', 'opacity' : '0.01'});
+ prev.animate({'opacity' : '1'}, duration, 'linear', function () {
+ current.css('margin', '100%');
+ callback();
+ });
+ };
+ };
+
+ Foundation.libs = Foundation.libs || {};
+
+ Foundation.libs.orbit = {
+ name : 'orbit',
+
+ version : '5.5.2',
+
+ settings : {
+ animation : 'slide',
+ timer_speed : 10000,
+ pause_on_hover : true,
+ resume_on_mouseout : false,
+ next_on_click : true,
+ animation_speed : 500,
+ stack_on_small : false,
+ navigation_arrows : true,
+ slide_number : true,
+ slide_number_text : 'of',
+ container_class : 'orbit-container',
+ stack_on_small_class : 'orbit-stack-on-small',
+ next_class : 'orbit-next',
+ prev_class : 'orbit-prev',
+ timer_container_class : 'orbit-timer',
+ timer_paused_class : 'paused',
+ timer_progress_class : 'orbit-progress',
+ slides_container_class : 'orbit-slides-container',
+ preloader_class : 'preloader',
+ slide_selector : '*',
+ bullets_container_class : 'orbit-bullets',
+ bullets_active_class : 'active',
+ slide_number_class : 'orbit-slide-number',
+ caption_class : 'orbit-caption',
+ active_slide_class : 'active',
+ orbit_transition_class : 'orbit-transitioning',
+ bullets : true,
+ circular : true,
+ timer : true,
+ variable_height : false,
+ swipe : true,
+ before_slide_change : noop,
+ after_slide_change : noop
+ },
+
+ init : function (scope, method, options) {
+ var self = this;
+ this.bindings(method, options);
+ },
+
+ events : function (instance) {
+ var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
+ this.S(instance).data(this.name + '-instance', orbit_instance);
+ },
+
+ reflow : function () {
+ var self = this;
+
+ if (self.S(self.scope).is('[data-orbit]')) {
+ var $el = self.S(self.scope);
+ var instance = $el.data(self.name + '-instance');
+ instance.compute_dimensions();
+ } else {
+ self.S('[data-orbit]', self.scope).each(function (idx, el) {
+ var $el = self.S(el);
+ var opts = self.data_options($el);
+ var instance = $el.data(self.name + '-instance');
+ instance.compute_dimensions();
+ });
+ }
+ }
+ };
+
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.reveal = {
+ name : 'reveal',
+
+ version : '5.5.2',
+
+ locked : false,
+
+ settings : {
+ animation : 'fadeAndPop',
+ animation_speed : 250,
+ close_on_background_click : true,
+ close_on_esc : true,
+ dismiss_modal_class : 'close-reveal-modal',
+ multiple_opened : false,
+ bg_class : 'reveal-modal-bg',
+ root_element : 'body',
+ open : function(){},
+ opened : function(){},
+ close : function(){},
+ closed : function(){},
+ on_ajax_error: $.noop,
+ bg : $('.reveal-modal-bg'),
+ css : {
+ open : {
+ 'opacity' : 0,
+ 'visibility' : 'visible',
+ 'display' : 'block'
+ },
+ close : {
+ 'opacity' : 1,
+ 'visibility' : 'hidden',
+ 'display' : 'none'
+ }
+ }
+ },
+
+ init : function (scope, method, options) {
+ $.extend(true, this.settings, method, options);
+ this.bindings(method, options);
+ },
+
+ events : function (scope) {
+ var self = this,
+ S = self.S;
+
+ S(this.scope)
+ .off('.reveal')
+ .on('click.fndtn.reveal', '[' + this.add_namespace('data-reveal-id') + ']:not([disabled])', function (e) {
+ e.preventDefault();
+
+ if (!self.locked) {
+ var element = S(this),
+ ajax = element.data(self.data_attr('reveal-ajax')),
+ replaceContentSel = element.data(self.data_attr('reveal-replace-content'));
+
+ self.locked = true;
+
+ if (typeof ajax === 'undefined') {
+ self.open.call(self, element);
+ } else {
+ var url = ajax === true ? element.attr('href') : ajax;
+ self.open.call(self, element, {url : url}, { replaceContentSel : replaceContentSel });
+ }
+ }
+ });
+
+ S(document)
+ .on('click.fndtn.reveal', this.close_targets(), function (e) {
+ e.preventDefault();
+ if (!self.locked) {
+ var settings = S('[' + self.attr_name() + '].open').data(self.attr_name(true) + '-init') || self.settings,
+ bg_clicked = S(e.target)[0] === S('.' + settings.bg_class)[0];
+
+ if (bg_clicked) {
+ if (settings.close_on_background_click) {
+ e.stopPropagation();
+ } else {
+ return;
+ }
+ }
+
+ self.locked = true;
+ self.close.call(self, bg_clicked ? S('[' + self.attr_name() + '].open:not(.toback)') : S(this).closest('[' + self.attr_name() + ']'));
+ }
+ });
+
+ if (S('[' + self.attr_name() + ']', this.scope).length > 0) {
+ S(this.scope)
+ // .off('.reveal')
+ .on('open.fndtn.reveal', this.settings.open)
+ .on('opened.fndtn.reveal', this.settings.opened)
+ .on('opened.fndtn.reveal', this.open_video)
+ .on('close.fndtn.reveal', this.settings.close)
+ .on('closed.fndtn.reveal', this.settings.closed)
+ .on('closed.fndtn.reveal', this.close_video);
+ } else {
+ S(this.scope)
+ // .off('.reveal')
+ .on('open.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.open)
+ .on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.opened)
+ .on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.open_video)
+ .on('close.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.close)
+ .on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.closed)
+ .on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.close_video);
+ }
+
+ return true;
+ },
+
+ // PATCH #3: turning on key up capture only when a reveal window is open
+ key_up_on : function (scope) {
+ var self = this;
+
+ // PATCH #1: fixing multiple keyup event trigger from single key press
+ self.S('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal', function ( event ) {
+ var open_modal = self.S('[' + self.attr_name() + '].open'),
+ settings = open_modal.data(self.attr_name(true) + '-init') || self.settings ;
+ // PATCH #2: making sure that the close event can be called only while unlocked,
+ // so that multiple keyup.fndtn.reveal events don't prevent clean closing of the reveal window.
+ if ( settings && event.which === 27 && settings.close_on_esc && !self.locked) { // 27 is the keycode for the Escape key
+ self.close.call(self, open_modal);
+ }
+ });
+
+ return true;
+ },
+
+ // PATCH #3: turning on key up capture only when a reveal window is open
+ key_up_off : function (scope) {
+ this.S('body').off('keyup.fndtn.reveal');
+ return true;
+ },
+
+ open : function (target, ajax_settings) {
+ var self = this,
+ modal;
+
+ if (target) {
+ if (typeof target.selector !== 'undefined') {
+ // Find the named node; only use the first one found, since the rest of the code assumes there's only one node
+ modal = self.S('#' + target.data(self.data_attr('reveal-id'))).first();
+ } else {
+ modal = self.S(this.scope);
+
+ ajax_settings = target;
+ }
+ } else {
+ modal = self.S(this.scope);
+ }
+
+ var settings = modal.data(self.attr_name(true) + '-init');
+ settings = settings || this.settings;
+
+
+ if (modal.hasClass('open') && target.attr('data-reveal-id') == modal.attr('id')) {
+ return self.close(modal);
+ }
+
+ if (!modal.hasClass('open')) {
+ var open_modal = self.S('[' + self.attr_name() + '].open');
+
+ if (typeof modal.data('css-top') === 'undefined') {
+ modal.data('css-top', parseInt(modal.css('top'), 10))
+ .data('offset', this.cache_offset(modal));
+ }
+
+ modal.attr('tabindex','0').attr('aria-hidden','false');
+
+ this.key_up_on(modal); // PATCH #3: turning on key up capture only when a reveal window is open
+
+ // Prevent namespace event from triggering twice
+ modal.on('open.fndtn.reveal', function(e) {
+ if (e.namespace !== 'fndtn.reveal') return;
+ });
+
+ modal.on('open.fndtn.reveal').trigger('open.fndtn.reveal');
+
+ if (open_modal.length < 1) {
+ this.toggle_bg(modal, true);
+ }
+
+ if (typeof ajax_settings === 'string') {
+ ajax_settings = {
+ url : ajax_settings
+ };
+ }
+
+ if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
+ if (open_modal.length > 0) {
+ if (settings.multiple_opened) {
+ self.to_back(open_modal);
+ } else {
+ self.hide(open_modal, settings.css.close);
+ }
+ }
+
+ this.show(modal, settings.css.open);
+ } else {
+ var old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null;
+ $.extend(ajax_settings, {
+ success : function (data, textStatus, jqXHR) {
+ if ( $.isFunction(old_success) ) {
+ var result = old_success(data, textStatus, jqXHR);
+ if (typeof result == 'string') {
+ data = result;
+ }
+ }
+
+ if (typeof options !== 'undefined' && typeof options.replaceContentSel !== 'undefined') {
+ modal.find(options.replaceContentSel).html(data);
+ } else {
+ modal.html(data);
+ }
+
+ self.S(modal).foundation('section', 'reflow');
+ self.S(modal).children().foundation();
+
+ if (open_modal.length > 0) {
+ if (settings.multiple_opened) {
+ self.to_back(open_modal);
+ } else {
+ self.hide(open_modal, settings.css.close);
+ }
+ }
+ self.show(modal, settings.css.open);
+ }
+ });
+
+ // check for if user initalized with error callback
+ if (settings.on_ajax_error !== $.noop) {
+ $.extend(ajax_settings, {
+ error : settings.on_ajax_error
+ });
+ }
+
+ $.ajax(ajax_settings);
+ }
+ }
+ self.S(window).trigger('resize');
+ },
+
+ close : function (modal) {
+ var modal = modal && modal.length ? modal : this.S(this.scope),
+ open_modals = this.S('[' + this.attr_name() + '].open'),
+ settings = modal.data(this.attr_name(true) + '-init') || this.settings,
+ self = this;
+
+ if (open_modals.length > 0) {
+
+ modal.removeAttr('tabindex','0').attr('aria-hidden','true');
+
+ this.locked = true;
+ this.key_up_off(modal); // PATCH #3: turning on key up capture only when a reveal window is open
+
+ modal.trigger('close.fndtn.reveal');
+
+ if ((settings.multiple_opened && open_modals.length === 1) || !settings.multiple_opened || modal.length > 1) {
+ self.toggle_bg(modal, false);
+ self.to_front(modal);
+ }
+
+ if (settings.multiple_opened) {
+ self.hide(modal, settings.css.close, settings);
+ self.to_front($($.makeArray(open_modals).reverse()[1]));
+ } else {
+ self.hide(open_modals, settings.css.close, settings);
+ }
+ }
+ },
+
+ close_targets : function () {
+ var base = '.' + this.settings.dismiss_modal_class;
+
+ if (this.settings.close_on_background_click) {
+ return base + ', .' + this.settings.bg_class;
+ }
+
+ return base;
+ },
+
+ toggle_bg : function (modal, state) {
+ if (this.S('.' + this.settings.bg_class).length === 0) {
+ this.settings.bg = $('<div />', {'class': this.settings.bg_class})
+ .appendTo('body').hide();
+ }
+
+ var visible = this.settings.bg.filter(':visible').length > 0;
+ if ( state != visible ) {
+ if ( state == undefined ? visible : !state ) {
+ this.hide(this.settings.bg);
+ } else {
+ this.show(this.settings.bg);
+ }
+ }
+ },
+
+ show : function (el, css) {
+ // is modal
+ if (css) {
+ var settings = el.data(this.attr_name(true) + '-init') || this.settings,
+ root_element = settings.root_element,
+ context = this;
+
+ if (el.parent(root_element).length === 0) {
+ var placeholder = el.wrap('<div style="display: none;" />').parent();
+
+ el.on('closed.fndtn.reveal.wrapped', function () {
+ el.detach().appendTo(placeholder);
+ el.unwrap().unbind('closed.fndtn.reveal.wrapped');
+ });
+
+ el.detach().appendTo(root_element);
+ }
+
+ var animData = getAnimationData(settings.animation);
+ if (!animData.animate) {
+ this.locked = false;
+ }
+ if (animData.pop) {
+ css.top = $(window).scrollTop() - el.data('offset') + 'px';
+ var end_css = {
+ top: $(window).scrollTop() + el.data('css-top') + 'px',
+ opacity: 1
+ };
+
+ return setTimeout(function () {
+ return el
+ .css(css)
+ .animate(end_css, settings.animation_speed, 'linear', function () {
+ context.locked = false;
+ el.trigger('opened.fndtn.reveal');
+ })
+ .addClass('open');
+ }, settings.animation_speed / 2);
+ }
+
+ if (animData.fade) {
+ css.top = $(window).scrollTop() + el.data('css-top') + 'px';
+ var end_css = {opacity: 1};
+
+ return setTimeout(function () {
+ return el
+ .css(css)
+ .animate(end_css, settings.animation_speed, 'linear', function () {
+ context.locked = false;
+ el.trigger('opened.fndtn.reveal');
+ })
+ .addClass('open');
+ }, settings.animation_speed / 2);
+ }
+
+ return el.css(css).show().css({opacity : 1}).addClass('open').trigger('opened.fndtn.reveal');
+ }
+
+ var settings = this.settings;
+
+ // should we animate the background?
+ if (getAnimationData(settings.animation).fade) {
+ return el.fadeIn(settings.animation_speed / 2);
+ }
+
+ this.locked = false;
+
+ return el.show();
+ },
+
+ to_back : function(el) {
+ el.addClass('toback');
+ },
+
+ to_front : function(el) {
+ el.removeClass('toback');
+ },
+
+ hide : function (el, css) {
+ // is modal
+ if (css) {
+ var settings = el.data(this.attr_name(true) + '-init'),
+ context = this;
+ settings = settings || this.settings;
+
+ var animData = getAnimationData(settings.animation);
+ if (!animData.animate) {
+ this.locked = false;
+ }
+ if (animData.pop) {
+ var end_css = {
+ top: - $(window).scrollTop() - el.data('offset') + 'px',
+ opacity: 0
+ };
+
+ return setTimeout(function () {
+ return el
+ .animate(end_css, settings.animation_speed, 'linear', function () {
+ context.locked = false;
+ el.css(css).trigger('closed.fndtn.reveal');
+ })
+ .removeClass('open');
+ }, settings.animation_speed / 2);
+ }
+
+ if (animData.fade) {
+ var end_css = {opacity : 0};
+
+ return setTimeout(function () {
+ return el
+ .animate(end_css, settings.animation_speed, 'linear', function () {
+ context.locked = false;
+ el.css(css).trigger('closed.fndtn.reveal');
+ })
+ .removeClass('open');
+ }, settings.animation_speed / 2);
+ }
+
+ return el.hide().css(css).removeClass('open').trigger('closed.fndtn.reveal');
+ }
+
+ var settings = this.settings;
+
+ // should we animate the background?
+ if (getAnimationData(settings.animation).fade) {
+ return el.fadeOut(settings.animation_speed / 2);
+ }
+
+ return el.hide();
+ },
+
+ close_video : function (e) {
+ var video = $('.flex-video', e.target),
+ iframe = $('iframe', video);
+
+ if (iframe.length > 0) {
+ iframe.attr('data-src', iframe[0].src);
+ iframe.attr('src', iframe.attr('src'));
+ video.hide();
+ }
+ },
+
+ open_video : function (e) {
+ var video = $('.flex-video', e.target),
+ iframe = video.find('iframe');
+
+ if (iframe.length > 0) {
+ var data_src = iframe.attr('data-src');
+ if (typeof data_src === 'string') {
+ iframe[0].src = iframe.attr('data-src');
+ } else {
+ var src = iframe[0].src;
+ iframe[0].src = undefined;
+ iframe[0].src = src;
+ }
+ video.show();
+ }
+ },
+
+ data_attr : function (str) {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + str;
+ }
+
+ return str;
+ },
+
+ cache_offset : function (modal) {
+ var offset = modal.show().height() + parseInt(modal.css('top'), 10) + modal.scrollY;
+
+ modal.hide();
+
+ return offset;
+ },
+
+ off : function () {
+ $(this.scope).off('.fndtn.reveal');
+ },
+
+ reflow : function () {}
+ };
+
+ /*
+ * getAnimationData('popAndFade') // {animate: true, pop: true, fade: true}
+ * getAnimationData('fade') // {animate: true, pop: false, fade: true}
+ * getAnimationData('pop') // {animate: true, pop: true, fade: false}
+ * getAnimationData('foo') // {animate: false, pop: false, fade: false}
+ * getAnimationData(null) // {animate: false, pop: false, fade: false}
+ */
+ function getAnimationData(str) {
+ var fade = /fade/i.test(str);
+ var pop = /pop/i.test(str);
+ return {
+ animate : fade || pop,
+ pop : pop,
+ fade : fade
+ };
+ }
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.slider = {
+ name : 'slider',
+
+ version : '5.5.2',
+
+ settings : {
+ start : 0,
+ end : 100,
+ step : 1,
+ precision : null,
+ initial : null,
+ display_selector : '',
+ vertical : false,
+ trigger_input_change : false,
+ on_change : function () {}
+ },
+
+ cache : {},
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'throttle');
+ this.bindings(method, options);
+ this.reflow();
+ },
+
+ events : function () {
+ var self = this;
+
+ $(this.scope)
+ .off('.slider')
+ .on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider',
+ '[' + self.attr_name() + ']:not(.disabled, [disabled]) .range-slider-handle', function (e) {
+ if (!self.cache.active) {
+ e.preventDefault();
+ self.set_active_slider($(e.target));
+ }
+ })
+ .on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider', function (e) {
+ if (!!self.cache.active) {
+ e.preventDefault();
+ if ($.data(self.cache.active[0], 'settings').vertical) {
+ var scroll_offset = 0;
+ if (!e.pageY) {
+ scroll_offset = window.scrollY;
+ }
+ self.calculate_position(self.cache.active, self.get_cursor_position(e, 'y') + scroll_offset);
+ } else {
+ self.calculate_position(self.cache.active, self.get_cursor_position(e, 'x'));
+ }
+ }
+ })
+ .on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider', function (e) {
+ self.remove_active_slider();
+ })
+ .on('change.fndtn.slider', function (e) {
+ self.settings.on_change();
+ });
+
+ self.S(window)
+ .on('resize.fndtn.slider', self.throttle(function (e) {
+ self.reflow();
+ }, 300));
+
+ // update slider value as users change input value
+ this.S('[' + this.attr_name() + ']').each(function () {
+ var slider = $(this),
+ handle = slider.children('.range-slider-handle')[0],
+ settings = self.initialize_settings(handle);
+
+ if (settings.display_selector != '') {
+ $(settings.display_selector).each(function(){
+ if (this.hasOwnProperty('value')) {
+ $(this).change(function(){
+ // is there a better way to do this?
+ slider.foundation("slider", "set_value", $(this).val());
+ });
+ }
+ });
+ }
+ });
+ },
+
+ get_cursor_position : function (e, xy) {
+ var pageXY = 'page' + xy.toUpperCase(),
+ clientXY = 'client' + xy.toUpperCase(),
+ position;
+
+ if (typeof e[pageXY] !== 'undefined') {
+ position = e[pageXY];
+ } else if (typeof e.originalEvent[clientXY] !== 'undefined') {
+ position = e.originalEvent[clientXY];
+ } else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0][clientXY] !== 'undefined') {
+ position = e.originalEvent.touches[0][clientXY];
+ } else if (e.currentPoint && typeof e.currentPoint[xy] !== 'undefined') {
+ position = e.currentPoint[xy];
+ }
+
+ return position;
+ },
+
+ set_active_slider : function ($handle) {
+ this.cache.active = $handle;
+ },
+
+ remove_active_slider : function () {
+ this.cache.active = null;
+ },
+
+ calculate_position : function ($handle, cursor_x) {
+ var self = this,
+ settings = $.data($handle[0], 'settings'),
+ handle_l = $.data($handle[0], 'handle_l'),
+ handle_o = $.data($handle[0], 'handle_o'),
+ bar_l = $.data($handle[0], 'bar_l'),
+ bar_o = $.data($handle[0], 'bar_o');
+
+ requestAnimationFrame(function () {
+ var pct;
+
+ if (Foundation.rtl && !settings.vertical) {
+ pct = self.limit_to(((bar_o + bar_l - cursor_x) / bar_l), 0, 1);
+ } else {
+ pct = self.limit_to(((cursor_x - bar_o) / bar_l), 0, 1);
+ }
+
+ pct = settings.vertical ? 1 - pct : pct;
+
+ var norm = self.normalized_value(pct, settings.start, settings.end, settings.step, settings.precision);
+
+ self.set_ui($handle, norm);
+ });
+ },
+
+ set_ui : function ($handle, value) {
+ var settings = $.data($handle[0], 'settings'),
+ handle_l = $.data($handle[0], 'handle_l'),
+ bar_l = $.data($handle[0], 'bar_l'),
+ norm_pct = this.normalized_percentage(value, settings.start, settings.end),
+ handle_offset = norm_pct * (bar_l - handle_l) - 1,
+ progress_bar_length = norm_pct * 100,
+ $handle_parent = $handle.parent(),
+ $hidden_inputs = $handle.parent().children('input[type=hidden]');
+
+ if (Foundation.rtl && !settings.vertical) {
+ handle_offset = -handle_offset;
+ }
+
+ handle_offset = settings.vertical ? -handle_offset + bar_l - handle_l + 1 : handle_offset;
+ this.set_translate($handle, handle_offset, settings.vertical);
+
+ if (settings.vertical) {
+ $handle.siblings('.range-slider-active-segment').css('height', progress_bar_length + '%');
+ } else {
+ $handle.siblings('.range-slider-active-segment').css('width', progress_bar_length + '%');
+ }
+
+ $handle_parent.attr(this.attr_name(), value).trigger('change.fndtn.slider');
+
+ $hidden_inputs.val(value);
+ if (settings.trigger_input_change) {
+ $hidden_inputs.trigger('change.fndtn.slider');
+ }
+
+ if (!$handle[0].hasAttribute('aria-valuemin')) {
+ $handle.attr({
+ 'aria-valuemin' : settings.start,
+ 'aria-valuemax' : settings.end
+ });
+ }
+ $handle.attr('aria-valuenow', value);
+
+ if (settings.display_selector != '') {
+ $(settings.display_selector).each(function () {
+ if (this.hasAttribute('value')) {
+ $(this).val(value);
+ } else {
+ $(this).text(value);
+ }
+ });
+ }
+
+ },
+
+ normalized_percentage : function (val, start, end) {
+ return Math.min(1, (val - start) / (end - start));
+ },
+
+ normalized_value : function (val, start, end, step, precision) {
+ var range = end - start,
+ point = val * range,
+ mod = (point - (point % step)) / step,
+ rem = point % step,
+ round = ( rem >= step * 0.5 ? step : 0);
+ return ((mod * step + round) + start).toFixed(precision);
+ },
+
+ set_translate : function (ele, offset, vertical) {
+ if (vertical) {
+ $(ele)
+ .css('-webkit-transform', 'translateY(' + offset + 'px)')
+ .css('-moz-transform', 'translateY(' + offset + 'px)')
+ .css('-ms-transform', 'translateY(' + offset + 'px)')
+ .css('-o-transform', 'translateY(' + offset + 'px)')
+ .css('transform', 'translateY(' + offset + 'px)');
+ } else {
+ $(ele)
+ .css('-webkit-transform', 'translateX(' + offset + 'px)')
+ .css('-moz-transform', 'translateX(' + offset + 'px)')
+ .css('-ms-transform', 'translateX(' + offset + 'px)')
+ .css('-o-transform', 'translateX(' + offset + 'px)')
+ .css('transform', 'translateX(' + offset + 'px)');
+ }
+ },
+
+ limit_to : function (val, min, max) {
+ return Math.min(Math.max(val, min), max);
+ },
+
+ initialize_settings : function (handle) {
+ var settings = $.extend({}, this.settings, this.data_options($(handle).parent())),
+ decimal_places_match_result;
+
+ if (settings.precision === null) {
+ decimal_places_match_result = ('' + settings.step).match(/\.([\d]*)/);
+ settings.precision = decimal_places_match_result && decimal_places_match_result[1] ? decimal_places_match_result[1].length : 0;
+ }
+
+ if (settings.vertical) {
+ $.data(handle, 'bar_o', $(handle).parent().offset().top);
+ $.data(handle, 'bar_l', $(handle).parent().outerHeight());
+ $.data(handle, 'handle_o', $(handle).offset().top);
+ $.data(handle, 'handle_l', $(handle).outerHeight());
+ } else {
+ $.data(handle, 'bar_o', $(handle).parent().offset().left);
+ $.data(handle, 'bar_l', $(handle).parent().outerWidth());
+ $.data(handle, 'handle_o', $(handle).offset().left);
+ $.data(handle, 'handle_l', $(handle).outerWidth());
+ }
+
+ $.data(handle, 'bar', $(handle).parent());
+ return $.data(handle, 'settings', settings);
+ },
+
+ set_initial_position : function ($ele) {
+ var settings = $.data($ele.children('.range-slider-handle')[0], 'settings'),
+ initial = ((typeof settings.initial == 'number' && !isNaN(settings.initial)) ? settings.initial : Math.floor((settings.end - settings.start) * 0.5 / settings.step) * settings.step + settings.start),
+ $handle = $ele.children('.range-slider-handle');
+ this.set_ui($handle, initial);
+ },
+
+ set_value : function (value) {
+ var self = this;
+ $('[' + self.attr_name() + ']', this.scope).each(function () {
+ $(this).attr(self.attr_name(), value);
+ });
+ if (!!$(this.scope).attr(self.attr_name())) {
+ $(this.scope).attr(self.attr_name(), value);
+ }
+ self.reflow();
+ },
+
+ reflow : function () {
+ var self = this;
+ self.S('[' + this.attr_name() + ']').each(function () {
+ var handle = $(this).children('.range-slider-handle')[0],
+ val = $(this).attr(self.attr_name());
+ self.initialize_settings(handle);
+
+ if (val) {
+ self.set_ui($(handle), parseFloat(val));
+ } else {
+ self.set_initial_position($(this));
+ }
+ });
+ }
+ };
+
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.tab = {
+ name : 'tab',
+
+ version : '5.5.2',
+
+ settings : {
+ active_class : 'active',
+ callback : function () {},
+ deep_linking : false,
+ scroll_to_content : true,
+ is_hover : false
+ },
+
+ default_tab_hashes : [],
+
+ init : function (scope, method, options) {
+ var self = this,
+ S = this.S;
+
+ // Store the default active tabs which will be referenced when the
+ // location hash is absent, as in the case of navigating the tabs and
+ // returning to the first viewing via the browser Back button.
+ S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
+ self.default_tab_hashes.push(this.hash);
+ });
+
+ // store the initial href, which is used to allow correct behaviour of the
+ // browser back button when deep linking is turned on.
+ self.entry_location = window.location.href;
+
+ this.bindings(method, options);
+ this.handle_location_hash_change();
+ },
+
+ events : function () {
+ var self = this,
+ S = this.S;
+
+ var usual_tab_behavior = function (e, target) {
+ var settings = S(target).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
+ if (!settings.is_hover || Modernizr.touch) {
+ e.preventDefault();
+ e.stopPropagation();
+ self.toggle_active_tab(S(target).parent());
+ }
+ };
+
+ S(this.scope)
+ .off('.tab')
+ // Key event: focus/tab key
+ .on('keydown.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
+ var el = this;
+ var keyCode = e.keyCode || e.which;
+ // if user pressed tab key
+ if (keyCode == 9) {
+ e.preventDefault();
+ // TODO: Change usual_tab_behavior into accessibility function?
+ usual_tab_behavior(e, el);
+ }
+ })
+ // Click event: tab title
+ .on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
+ var el = this;
+ usual_tab_behavior(e, el);
+ })
+ // Hover event: tab title
+ .on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
+ var settings = S(this).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
+ if (settings.is_hover) {
+ self.toggle_active_tab(S(this).parent());
+ }
+ });
+
+ // Location hash change event
+ S(window).on('hashchange.fndtn.tab', function (e) {
+ e.preventDefault();
+ self.handle_location_hash_change();
+ });
+ },
+
+ handle_location_hash_change : function () {
+
+ var self = this,
+ S = this.S;
+
+ S('[' + this.attr_name() + ']', this.scope).each(function () {
+ var settings = S(this).data(self.attr_name(true) + '-init');
+ if (settings.deep_linking) {
+ // Match the location hash to a label
+ var hash;
+ if (settings.scroll_to_content) {
+ hash = self.scope.location.hash;
+ } else {
+ // prefix the hash to prevent anchor scrolling
+ hash = self.scope.location.hash.replace('fndtn-', '');
+ }
+ if (hash != '') {
+ // Check whether the location hash references a tab content div or
+ // another element on the page (inside or outside the tab content div)
+ var hash_element = S(hash);
+ if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
+ // Tab content div
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + hash + ']').parent());
+ } else {
+ // Not the tab content div. If inside the tab content, find the
+ // containing tab and toggle it as active.
+ var hash_tab_container_id = hash_element.closest('.content').attr('id');
+ if (hash_tab_container_id != undefined) {
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=#' + hash_tab_container_id + ']').parent(), hash);
+ }
+ }
+ } else {
+ // Reference the default tab hashes which were initialized in the init function
+ for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + self.default_tab_hashes[ind] + ']').parent());
+ }
+ }
+ }
+ });
+ },
+
+ toggle_active_tab : function (tab, location_hash) {
+ var self = this,
+ S = self.S,
+ tabs = tab.closest('[' + this.attr_name() + ']'),
+ tab_link = tab.find('a'),
+ anchor = tab.children('a').first(),
+ target_hash = '#' + anchor.attr('href').split('#')[1],
+ target = S(target_hash),
+ siblings = tab.siblings(),
+ settings = tabs.data(this.attr_name(true) + '-init'),
+ interpret_keyup_action = function (e) {
+ // Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
+
+ // define current, previous and next (possible) tabs
+
+ var $original = $(this);
+ var $prev = $(this).parents('li').prev().children('[role="tab"]');
+ var $next = $(this).parents('li').next().children('[role="tab"]');
+ var $target;
+
+ // find the direction (prev or next)
+
+ switch (e.keyCode) {
+ case 37:
+ $target = $prev;
+ break;
+ case 39:
+ $target = $next;
+ break;
+ default:
+ $target = false
+ break;
+ }
+
+ if ($target.length) {
+ $original.attr({
+ 'tabindex' : '-1',
+ 'aria-selected' : null
+ });
+ $target.attr({
+ 'tabindex' : '0',
+ 'aria-selected' : true
+ }).focus();
+ }
+
+ // Hide panels
+
+ $('[role="tabpanel"]')
+ .attr('aria-hidden', 'true');
+
+ // Show panel which corresponds to target
+
+ $('#' + $(document.activeElement).attr('href').substring(1))
+ .attr('aria-hidden', null);
+
+ },
+ go_to_hash = function(hash) {
+ // This function allows correct behaviour of the browser's back button when deep linking is enabled. Without it
+ // the user would get continually redirected to the default hash.
+ var is_entry_location = window.location.href === self.entry_location,
+ default_hash = settings.scroll_to_content ? self.default_tab_hashes[0] : is_entry_location ? window.location.hash :'fndtn-' + self.default_tab_hashes[0].replace('#', '')
+
+ if (!(is_entry_location && hash === default_hash)) {
+ window.location.hash = hash;
+ }
+ };
+
+ // allow usage of data-tab-content attribute instead of href
+ if (anchor.data('tab-content')) {
+ target_hash = '#' + anchor.data('tab-content').split('#')[1];
+ target = S(target_hash);
+ }
+
+ if (settings.deep_linking) {
+
+ if (settings.scroll_to_content) {
+
+ // retain current hash to scroll to content
+ go_to_hash(location_hash || target_hash);
+
+ if (location_hash == undefined || location_hash == target_hash) {
+ tab.parent()[0].scrollIntoView();
+ } else {
+ S(target_hash)[0].scrollIntoView();
+ }
+ } else {
+ // prefix the hashes so that the browser doesn't scroll down
+ if (location_hash != undefined) {
+ go_to_hash('fndtn-' + location_hash.replace('#', ''));
+ } else {
+ go_to_hash('fndtn-' + target_hash.replace('#', ''));
+ }
+ }
+ }
+
+ // WARNING: The activation and deactivation of the tab content must
+ // occur after the deep linking in order to properly refresh the browser
+ // window (notably in Chrome).
+ // Clean up multiple attr instances to done once
+ tab.addClass(settings.active_class).triggerHandler('opened');
+ tab_link.attr({'aria-selected' : 'true', tabindex : 0});
+ siblings.removeClass(settings.active_class)
+ siblings.find('a').attr({'aria-selected' : 'false', tabindex : -1});
+ target.siblings().removeClass(settings.active_class).attr({'aria-hidden' : 'true', tabindex : -1});
+ target.addClass(settings.active_class).attr('aria-hidden', 'false').removeAttr('tabindex');
+ settings.callback(tab);
+ target.triggerHandler('toggled', [target]);
+ tabs.triggerHandler('toggled', [tab]);
+
+ tab_link.off('keydown').on('keydown', interpret_keyup_action );
+ },
+
+ data_attr : function (str) {
+ if (this.namespace.length > 0) {
+ return this.namespace + '-' + str;
+ }
+
+ return str;
+ },
+
+ off : function () {},
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.tooltip = {
+ name : 'tooltip',
+
+ version : '5.5.2',
+
+ settings : {
+ additional_inheritable_classes : [],
+ tooltip_class : '.tooltip',
+ append_to : 'body',
+ touch_close_text : 'Tap To Close',
+ disable_for_touch : false,
+ hover_delay : 200,
+ show_on : 'all',
+ tip_template : function (selector, content) {
+ return '<span data-selector="' + selector + '" id="' + selector + '" class="'
+ + Foundation.libs.tooltip.settings.tooltip_class.substring(1)
+ + '" role="tooltip">' + content + '<span class="nub"></span></span>';
+ }
+ },
+
+ cache : {},
+
+ init : function (scope, method, options) {
+ Foundation.inherit(this, 'random_str');
+ this.bindings(method, options);
+ },
+
+ should_show : function (target, tip) {
+ var settings = $.extend({}, this.settings, this.data_options(target));
+
+ if (settings.show_on === 'all') {
+ return true;
+ } else if (this.small() && settings.show_on === 'small') {
+ return true;
+ } else if (this.medium() && settings.show_on === 'medium') {
+ return true;
+ } else if (this.large() && settings.show_on === 'large') {
+ return true;
+ }
+ return false;
+ },
+
+ medium : function () {
+ return matchMedia(Foundation.media_queries['medium']).matches;
+ },
+
+ large : function () {
+ return matchMedia(Foundation.media_queries['large']).matches;
+ },
+
+ events : function (instance) {
+ var self = this,
+ S = self.S;
+
+ self.create(this.S(instance));
+
+ function _startShow(elt, $this, immediate) {
+ if (elt.timer) {
+ return;
+ }
+
+ if (immediate) {
+ elt.timer = null;
+ self.showTip($this);
+ } else {
+ elt.timer = setTimeout(function () {
+ elt.timer = null;
+ self.showTip($this);
+ }.bind(elt), self.settings.hover_delay);
+ }
+ }
+
+ function _startHide(elt, $this) {
+ if (elt.timer) {
+ clearTimeout(elt.timer);
+ elt.timer = null;
+ }
+
+ self.hide($this);
+ }
+
+ $(this.scope)
+ .off('.tooltip')
+ .on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip',
+ '[' + this.attr_name() + ']', function (e) {
+ var $this = S(this),
+ settings = $.extend({}, self.settings, self.data_options($this)),
+ is_touch = false;
+
+ if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type) && S(e.target).is('a')) {
+ return false;
+ }
+
+ if (/mouse/i.test(e.type) && self.ie_touch(e)) {
+ return false;
+ }
+
+ if ($this.hasClass('open')) {
+ if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
+ e.preventDefault();
+ }
+ self.hide($this);
+ } else {
+ if (settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
+ return;
+ } else if (!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
+ e.preventDefault();
+ S(settings.tooltip_class + '.open').hide();
+ is_touch = true;
+ // close other open tooltips on touch
+ if ($('.open[' + self.attr_name() + ']').length > 0) {
+ var prevOpen = S($('.open[' + self.attr_name() + ']')[0]);
+ self.hide(prevOpen);
+ }
+ }
+
+ if (/enter|over/i.test(e.type)) {
+ _startShow(this, $this);
+
+ } else if (e.type === 'mouseout' || e.type === 'mouseleave') {
+ _startHide(this, $this);
+ } else {
+ _startShow(this, $this, true);
+ }
+ }
+ })
+ .on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', '[' + this.attr_name() + '].open', function (e) {
+ if (/mouse/i.test(e.type) && self.ie_touch(e)) {
+ return false;
+ }
+
+ if ($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
+ return;
+ } else if ($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
+ self.convert_to_touch($(this));
+ } else {
+ _startHide(this, $(this));
+ }
+ })
+ .on('DOMNodeRemoved DOMAttrModified', '[' + this.attr_name() + ']:not(a)', function (e) {
+ _startHide(this, S(this));
+ });
+ },
+
+ ie_touch : function (e) {
+ // How do I distinguish between IE11 and Windows Phone 8?????
+ return false;
+ },
+
+ showTip : function ($target) {
+ var $tip = this.getTip($target);
+ if (this.should_show($target, $tip)) {
+ return this.show($target);
+ }
+ return;
+ },
+
+ getTip : function ($target) {
+ var selector = this.selector($target),
+ settings = $.extend({}, this.settings, this.data_options($target)),
+ tip = null;
+
+ if (selector) {
+ tip = this.S('span[data-selector="' + selector + '"]' + settings.tooltip_class);
+ }
+
+ return (typeof tip === 'object') ? tip : false;
+ },
+
+ selector : function ($target) {
+ var dataSelector = $target.attr(this.attr_name()) || $target.attr('data-selector');
+
+ if (typeof dataSelector != 'string') {
+ dataSelector = this.random_str(6);
+ $target
+ .attr('data-selector', dataSelector)
+ .attr('aria-describedby', dataSelector);
+ }
+
+ return dataSelector;
+ },
+
+ create : function ($target) {
+ var self = this,
+ settings = $.extend({}, this.settings, this.data_options($target)),
+ tip_template = this.settings.tip_template;
+
+ if (typeof settings.tip_template === 'string' && window.hasOwnProperty(settings.tip_template)) {
+ tip_template = window[settings.tip_template];
+ }
+
+ var $tip = $(tip_template(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
+ classes = this.inheritable_classes($target);
+
+ $tip.addClass(classes).appendTo(settings.append_to);
+
+ if (Modernizr.touch) {
+ $tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
+ $tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function (e) {
+ self.hide($target);
+ });
+ }
+
+ $target.removeAttr('title').attr('title', '');
+ },
+
+ reposition : function (target, tip, classes) {
+ var width, nub, nubHeight, nubWidth, column, objPos;
+
+ tip.css('visibility', 'hidden').show();
+
+ width = target.data('width');
+ nub = tip.children('.nub');
+ nubHeight = nub.outerHeight();
+ nubWidth = nub.outerHeight();
+
+ if (this.small()) {
+ tip.css({'width' : '100%'});
+ } else {
+ tip.css({'width' : (width) ? width : 'auto'});
+ }
+
+ objPos = function (obj, top, right, bottom, left, width) {
+ return obj.css({
+ 'top' : (top) ? top : 'auto',
+ 'bottom' : (bottom) ? bottom : 'auto',
+ 'left' : (left) ? left : 'auto',
+ 'right' : (right) ? right : 'auto'
+ }).end();
+ };
+
+ objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', target.offset().left);
+
+ if (this.small()) {
+ objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', 12.5, $(this.scope).width());
+ tip.addClass('tip-override');
+ objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
+ } else {
+ var left = target.offset().left;
+ if (Foundation.rtl) {
+ nub.addClass('rtl');
+ left = target.offset().left + target.outerWidth() - tip.outerWidth();
+ }
+
+ objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', left);
+ // reset nub from small styles, if they've been applied
+ if (nub.attr('style')) {
+ nub.removeAttr('style');
+ }
+
+ tip.removeClass('tip-override');
+ if (classes && classes.indexOf('tip-top') > -1) {
+ if (Foundation.rtl) {
+ nub.addClass('rtl');
+ }
+ objPos(tip, (target.offset().top - tip.outerHeight()), 'auto', 'auto', left)
+ .removeClass('tip-override');
+ } else if (classes && classes.indexOf('tip-left') > -1) {
+ objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left - tip.outerWidth() - nubHeight))
+ .removeClass('tip-override');
+ nub.removeClass('rtl');
+ } else if (classes && classes.indexOf('tip-right') > -1) {
+ objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left + target.outerWidth() + nubHeight))
+ .removeClass('tip-override');
+ nub.removeClass('rtl');
+ }
+ }
+
+ tip.css('visibility', 'visible').hide();
+ },
+
+ small : function () {
+ return matchMedia(Foundation.media_queries.small).matches &&
+ !matchMedia(Foundation.media_queries.medium).matches;
+ },
+
+ inheritable_classes : function ($target) {
+ var settings = $.extend({}, this.settings, this.data_options($target)),
+ inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'radius', 'round'].concat(settings.additional_inheritable_classes),
+ classes = $target.attr('class'),
+ filtered = classes ? $.map(classes.split(' '), function (el, i) {
+ if ($.inArray(el, inheritables) !== -1) {
+ return el;
+ }
+ }).join(' ') : '';
+
+ return $.trim(filtered);
+ },
+
+ convert_to_touch : function ($target) {
+ var self = this,
+ $tip = self.getTip($target),
+ settings = $.extend({}, self.settings, self.data_options($target));
+
+ if ($tip.find('.tap-to-close').length === 0) {
+ $tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
+ $tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function (e) {
+ self.hide($target);
+ });
+ }
+
+ $target.data('tooltip-open-event-type', 'touch');
+ },
+
+ show : function ($target) {
+ var $tip = this.getTip($target);
+
+ if ($target.data('tooltip-open-event-type') == 'touch') {
+ this.convert_to_touch($target);
+ }
+
+ this.reposition($target, $tip, $target.attr('class'));
+ $target.addClass('open');
+ $tip.fadeIn(150);
+ },
+
+ hide : function ($target) {
+ var $tip = this.getTip($target);
+ $tip.fadeOut(150, function () {
+ $tip.find('.tap-to-close').remove();
+ $tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');
+ $target.removeClass('open');
+ });
+ },
+
+ off : function () {
+ var self = this;
+ this.S(this.scope).off('.fndtn.tooltip');
+ this.S(this.settings.tooltip_class).each(function (i) {
+ $('[' + self.attr_name() + ']').eq(i).attr('title', $(this).text());
+ }).remove();
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.topbar = {
+ name : 'topbar',
+
+ version : '5.5.2',
+
+ settings : {
+ index : 0,
+ start_offset : 0,
+ sticky_class : 'sticky',
+ custom_back_text : true,
+ back_text : 'Back',
+ mobile_show_parent_link : true,
+ is_hover : true,
+ scrolltop : true, // jump to top when sticky nav menu toggle is clicked
+ sticky_on : 'all',
+ dropdown_autoclose: true
+ },
+
+ init : function (section, method, options) {
+ Foundation.inherit(this, 'add_custom_rule register_media throttle');
+ var self = this;
+
+ self.register_media('topbar', 'foundation-mq-topbar');
+
+ this.bindings(method, options);
+
+ self.S('[' + this.attr_name() + ']', this.scope).each(function () {
+ var topbar = $(this),
+ settings = topbar.data(self.attr_name(true) + '-init'),
+ section = self.S('section, .top-bar-section', this);
+ topbar.data('index', 0);
+ var topbarContainer = topbar.parent();
+ if (topbarContainer.hasClass('fixed') || self.is_sticky(topbar, topbarContainer, settings) ) {
+ self.settings.sticky_class = settings.sticky_class;
+ self.settings.sticky_topbar = topbar;
+ topbar.data('height', topbarContainer.outerHeight());
+ topbar.data('stickyoffset', topbarContainer.offset().top);
+ } else {
+ topbar.data('height', topbar.outerHeight());
+ }
+
+ if (!settings.assembled) {
+ self.assemble(topbar);
+ }
+
+ if (settings.is_hover) {
+ self.S('.has-dropdown', topbar).addClass('not-click');
+ } else {
+ self.S('.has-dropdown', topbar).removeClass('not-click');
+ }
+
+ // Pad body when sticky (scrolled) or fixed.
+ self.add_custom_rule('.f-topbar-fixed { padding-top: ' + topbar.data('height') + 'px }');
+
+ if (topbarContainer.hasClass('fixed')) {
+ self.S('body').addClass('f-topbar-fixed');
+ }
+ });
+
+ },
+
+ is_sticky : function (topbar, topbarContainer, settings) {
+ var sticky = topbarContainer.hasClass(settings.sticky_class);
+ var smallMatch = matchMedia(Foundation.media_queries.small).matches;
+ var medMatch = matchMedia(Foundation.media_queries.medium).matches;
+ var lrgMatch = matchMedia(Foundation.media_queries.large).matches;
+
+ if (sticky && settings.sticky_on === 'all') {
+ return true;
+ }
+ if (sticky && this.small() && settings.sticky_on.indexOf('small') !== -1) {
+ if (smallMatch && !medMatch && !lrgMatch) { return true; }
+ }
+ if (sticky && this.medium() && settings.sticky_on.indexOf('medium') !== -1) {
+ if (smallMatch && medMatch && !lrgMatch) { return true; }
+ }
+ if (sticky && this.large() && settings.sticky_on.indexOf('large') !== -1) {
+ if (smallMatch && medMatch && lrgMatch) { return true; }
+ }
+
+ return false;
+ },
+
+ toggle : function (toggleEl) {
+ var self = this,
+ topbar;
+
+ if (toggleEl) {
+ topbar = self.S(toggleEl).closest('[' + this.attr_name() + ']');
+ } else {
+ topbar = self.S('[' + this.attr_name() + ']');
+ }
+
+ var settings = topbar.data(this.attr_name(true) + '-init');
+
+ var section = self.S('section, .top-bar-section', topbar);
+
+ if (self.breakpoint()) {
+ if (!self.rtl) {
+ section.css({left : '0%'});
+ $('>.name', section).css({left : '100%'});
+ } else {
+ section.css({right : '0%'});
+ $('>.name', section).css({right : '100%'});
+ }
+
+ self.S('li.moved', section).removeClass('moved');
+ topbar.data('index', 0);
+
+ topbar
+ .toggleClass('expanded')
+ .css('height', '');
+ }
+
+ if (settings.scrolltop) {
+ if (!topbar.hasClass('expanded')) {
+ if (topbar.hasClass('fixed')) {
+ topbar.parent().addClass('fixed');
+ topbar.removeClass('fixed');
+ self.S('body').addClass('f-topbar-fixed');
+ }
+ } else if (topbar.parent().hasClass('fixed')) {
+ if (settings.scrolltop) {
+ topbar.parent().removeClass('fixed');
+ topbar.addClass('fixed');
+ self.S('body').removeClass('f-topbar-fixed');
+
+ window.scrollTo(0, 0);
+ } else {
+ topbar.parent().removeClass('expanded');
+ }
+ }
+ } else {
+ if (self.is_sticky(topbar, topbar.parent(), settings)) {
+ topbar.parent().addClass('fixed');
+ }
+
+ if (topbar.parent().hasClass('fixed')) {
+ if (!topbar.hasClass('expanded')) {
+ topbar.removeClass('fixed');
+ topbar.parent().removeClass('expanded');
+ self.update_sticky_positioning();
+ } else {
+ topbar.addClass('fixed');
+ topbar.parent().addClass('expanded');
+ self.S('body').addClass('f-topbar-fixed');
+ }
+ }
+ }
+ },
+
+ timer : null,
+
+ events : function (bar) {
+ var self = this,
+ S = this.S;
+
+ S(this.scope)
+ .off('.topbar')
+ .on('click.fndtn.topbar', '[' + this.attr_name() + '] .toggle-topbar', function (e) {
+ e.preventDefault();
+ self.toggle(this);
+ })
+ .on('click.fndtn.topbar contextmenu.fndtn.topbar', '.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]', function (e) {
+ var li = $(this).closest('li'),
+ topbar = li.closest('[' + self.attr_name() + ']'),
+ settings = topbar.data(self.attr_name(true) + '-init');
+
+ if (settings.dropdown_autoclose && settings.is_hover) {
+ var hoverLi = $(this).closest('.hover');
+ hoverLi.removeClass('hover');
+ }
+ if (self.breakpoint() && !li.hasClass('back') && !li.hasClass('has-dropdown')) {
+ self.toggle();
+ }
+
+ })
+ .on('click.fndtn.topbar', '[' + this.attr_name() + '] li.has-dropdown', function (e) {
+ var li = S(this),
+ target = S(e.target),
+ topbar = li.closest('[' + self.attr_name() + ']'),
+ settings = topbar.data(self.attr_name(true) + '-init');
+
+ if (target.data('revealId')) {
+ self.toggle();
+ return;
+ }
+
+ if (self.breakpoint()) {
+ return;
+ }
+
+ if (settings.is_hover && !Modernizr.touch) {
+ return;
+ }
+
+ e.stopImmediatePropagation();
+
+ if (li.hasClass('hover')) {
+ li
+ .removeClass('hover')
+ .find('li')
+ .removeClass('hover');
+
+ li.parents('li.hover')
+ .removeClass('hover');
+ } else {
+ li.addClass('hover');
+
+ $(li).siblings().removeClass('hover');
+
+ if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) {
+ e.preventDefault();
+ }
+ }
+ })
+ .on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown>a', function (e) {
+ if (self.breakpoint()) {
+
+ e.preventDefault();
+
+ var $this = S(this),
+ topbar = $this.closest('[' + self.attr_name() + ']'),
+ section = topbar.find('section, .top-bar-section'),
+ dropdownHeight = $this.next('.dropdown').outerHeight(),
+ $selectedLi = $this.closest('li');
+
+ topbar.data('index', topbar.data('index') + 1);
+ $selectedLi.addClass('moved');
+
+ if (!self.rtl) {
+ section.css({left : -(100 * topbar.data('index')) + '%'});
+ section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
+ } else {
+ section.css({right : -(100 * topbar.data('index')) + '%'});
+ section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
+ }
+
+ topbar.css('height', $this.siblings('ul').outerHeight(true) + topbar.data('height'));
+ }
+ });
+
+ S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function () {
+ self.resize.call(self);
+ }, 50)).trigger('resize.fndtn.topbar').load(function () {
+ // Ensure that the offset is calculated after all of the pages resources have loaded
+ S(this).trigger('resize.fndtn.topbar');
+ });
+
+ S('body').off('.topbar').on('click.fndtn.topbar', function (e) {
+ var parent = S(e.target).closest('li').closest('li.hover');
+
+ if (parent.length > 0) {
+ return;
+ }
+
+ S('[' + self.attr_name() + '] li.hover').removeClass('hover');
+ });
+
+ // Go up a level on Click
+ S(this.scope).on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown .back', function (e) {
+ e.preventDefault();
+
+ var $this = S(this),
+ topbar = $this.closest('[' + self.attr_name() + ']'),
+ section = topbar.find('section, .top-bar-section'),
+ settings = topbar.data(self.attr_name(true) + '-init'),
+ $movedLi = $this.closest('li.moved'),
+ $previousLevelUl = $movedLi.parent();
+
+ topbar.data('index', topbar.data('index') - 1);
+
+ if (!self.rtl) {
+ section.css({left : -(100 * topbar.data('index')) + '%'});
+ section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
+ } else {
+ section.css({right : -(100 * topbar.data('index')) + '%'});
+ section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
+ }
+
+ if (topbar.data('index') === 0) {
+ topbar.css('height', '');
+ } else {
+ topbar.css('height', $previousLevelUl.outerHeight(true) + topbar.data('height'));
+ }
+
+ setTimeout(function () {
+ $movedLi.removeClass('moved');
+ }, 300);
+ });
+
+ // Show dropdown menus when their items are focused
+ S(this.scope).find('.dropdown a')
+ .focus(function () {
+ $(this).parents('.has-dropdown').addClass('hover');
+ })
+ .blur(function () {
+ $(this).parents('.has-dropdown').removeClass('hover');
+ });
+ },
+
+ resize : function () {
+ var self = this;
+ self.S('[' + this.attr_name() + ']').each(function () {
+ var topbar = self.S(this),
+ settings = topbar.data(self.attr_name(true) + '-init');
+
+ var stickyContainer = topbar.parent('.' + self.settings.sticky_class);
+ var stickyOffset;
+
+ if (!self.breakpoint()) {
+ var doToggle = topbar.hasClass('expanded');
+ topbar
+ .css('height', '')
+ .removeClass('expanded')
+ .find('li')
+ .removeClass('hover');
+
+ if (doToggle) {
+ self.toggle(topbar);
+ }
+ }
+
+ if (self.is_sticky(topbar, stickyContainer, settings)) {
+ if (stickyContainer.hasClass('fixed')) {
+ // Remove the fixed to allow for correct calculation of the offset.
+ stickyContainer.removeClass('fixed');
+
+ stickyOffset = stickyContainer.offset().top;
+ if (self.S(document.body).hasClass('f-topbar-fixed')) {
+ stickyOffset -= topbar.data('height');
+ }
+
+ topbar.data('stickyoffset', stickyOffset);
+ stickyContainer.addClass('fixed');
+ } else {
+ stickyOffset = stickyContainer.offset().top;
+ topbar.data('stickyoffset', stickyOffset);
+ }
+ }
+
+ });
+ },
+
+ breakpoint : function () {
+ return !matchMedia(Foundation.media_queries['topbar']).matches;
+ },
+
+ small : function () {
+ return matchMedia(Foundation.media_queries['small']).matches;
+ },
+
+ medium : function () {
+ return matchMedia(Foundation.media_queries['medium']).matches;
+ },
+
+ large : function () {
+ return matchMedia(Foundation.media_queries['large']).matches;
+ },
+
+ assemble : function (topbar) {
+ var self = this,
+ settings = topbar.data(this.attr_name(true) + '-init'),
+ section = self.S('section, .top-bar-section', topbar);
+
+ // Pull element out of the DOM for manipulation
+ section.detach();
+
+ self.S('.has-dropdown>a', section).each(function () {
+ var $link = self.S(this),
+ $dropdown = $link.siblings('.dropdown'),
+ url = $link.attr('href'),
+ $titleLi;
+
+ if (!$dropdown.find('.title.back').length) {
+
+ if (settings.mobile_show_parent_link == true && url) {
+ $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="' + url + '">' + $link.html() +'</a></li>');
+ } else {
+ $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>');
+ }
+
+ // Copy link to subnav
+ if (settings.custom_back_text == true) {
+ $('h5>a', $titleLi).html(settings.back_text);
+ } else {
+ $('h5>a', $titleLi).html('« ' + $link.html());
+ }
+ $dropdown.prepend($titleLi);
+ }
+ });
+
+ // Put element back in the DOM
+ section.appendTo(topbar);
+
+ // check for sticky
+ this.sticky();
+
+ this.assembled(topbar);
+ },
+
+ assembled : function (topbar) {
+ topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled : true}));
+ },
+
+ height : function (ul) {
+ var total = 0,
+ self = this;
+
+ $('> li', ul).each(function () {
+ total += self.S(this).outerHeight(true);
+ });
+
+ return total;
+ },
+
+ sticky : function () {
+ var self = this;
+
+ this.S(window).on('scroll', function () {
+ self.update_sticky_positioning();
+ });
+ },
+
+ update_sticky_positioning : function () {
+ var klass = '.' + this.settings.sticky_class,
+ $window = this.S(window),
+ self = this;
+
+ if (self.settings.sticky_topbar && self.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(), this.settings)) {
+ var distance = this.settings.sticky_topbar.data('stickyoffset') + this.settings.start_offset;
+ if (!self.S(klass).hasClass('expanded')) {
+ if ($window.scrollTop() > (distance)) {
+ if (!self.S(klass).hasClass('fixed')) {
+ self.S(klass).addClass('fixed');
+ self.S('body').addClass('f-topbar-fixed');
+ }
+ } else if ($window.scrollTop() <= distance) {
+ if (self.S(klass).hasClass('fixed')) {
+ self.S(klass).removeClass('fixed');
+ self.S('body').removeClass('f-topbar-fixed');
+ }
+ }
+ }
+ }
+ },
+
+ off : function () {
+ this.S(this.scope).off('.fndtn.topbar');
+ this.S(window).off('.fndtn.topbar');
+ },
+
+ reflow : function () {}
+ };
+}(jQuery, window, window.document));
--- /dev/null
+!function(){"use strict";/**
+ * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
+ *
+ * @codingstandard ftlabs-jsv2
+ * @copyright The Financial Times Limited [All Rights Reserved]
+ * @license MIT License (see LICENSE.txt)
+ */
+function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTime<this.tapDelay&&a.preventDefault(),!0},a.prototype.touchHasMoved=function(a){var b=a.changedTouches[0],c=this.touchBoundary;return Math.abs(b.pageX-this.touchStartX)>c||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(a.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}();
\ No newline at end of file
--- /dev/null
+/*!
+ * jQuery Cookie Plugin v1.4.1
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2013 Klaus Hartl
+ * Released under the MIT license
+ */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
\ No newline at end of file
--- /dev/null
+/*!
+ * jQuery JavaScript Library v2.1.4
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2015-04-28T16:01Z
+ */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c}catch(e){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Na[0].contentDocument,b.write(),b.close(),c=t(a,b),Na.detach()),Oa[a]=c),c}function v(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||_.contains(a.ownerDocument,a)||(g=_.style(a,b)),Qa.test(g)&&Pa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function w(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function x(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,e=Xa.length;e--;)if(b=Xa[e]+c,b in a)return b;return d}function y(a,b,c){var d=Ta.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function z(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=_.css(a,c+wa[f],!0,e)),d?("content"===c&&(g-=_.css(a,"padding"+wa[f],!0,e)),"margin"!==c&&(g-=_.css(a,"border"+wa[f]+"Width",!0,e))):(g+=_.css(a,"padding"+wa[f],!0,e),"padding"!==c&&(g+=_.css(a,"border"+wa[f]+"Width",!0,e)));return g}function A(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g="border-box"===_.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=v(a,b,f),(0>e||null==e)&&(e=a.style[b]),Qa.test(e))return e;d=g&&(Y.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+z(a,b,c||(g?"border":"content"),d,f)+"px"}function B(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=ra.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&xa(d)&&(f[g]=ra.access(d,"olddisplay",u(d.nodeName)))):(e=xa(d),"none"===c&&e||ra.set(d,"olddisplay",e?c:_.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function C(a,b,c,d,e){return new C.prototype.init(a,b,c,d,e)}function D(){return setTimeout(function(){Ya=void 0}),Ya=_.now()}function E(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=wa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function F(a,b,c){for(var d,e=(cb[b]||[]).concat(cb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function G(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},n=a.style,o=a.nodeType&&xa(a),p=ra.get(a,"fxshow");c.queue||(h=_._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,_.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],j=_.css(a,"display"),k="none"===j?ra.get(a,"olddisplay")||u(a.nodeName):j,"inline"===k&&"none"===_.css(a,"float")&&(n.display="inline-block")),c.overflow&&(n.overflow="hidden",l.always(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],$a.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(o?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;o=!0}m[d]=p&&p[d]||_.style(a,d)}else j=void 0;if(_.isEmptyObject(m))"inline"===("none"===j?u(a.nodeName):j)&&(n.display=j);else{p?"hidden"in p&&(o=p.hidden):p=ra.access(a,"fxshow",{}),f&&(p.hidden=!o),o?_(a).show():l.done(function(){_(a).hide()}),l.done(function(){var b;ra.remove(a,"fxshow");for(b in m)_.style(a,b,m[b])});for(d in m)g=F(o?p[d]:0,d,l),d in p||(p[d]=g.start,o&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function H(a,b){var c,d,e,f,g;for(c in a)if(d=_.camelCase(c),e=b[d],f=a[c],_.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=_.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function I(a,b,c){var d,e,f=0,g=bb.length,h=_.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Ya||D(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:_.extend({},b),opts:_.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Ya||D(),duration:c.duration,tweens:[],createTween:function(b,c){var d=_.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(H(k,j.opts.specialEasing);g>f;f++)if(d=bb[f].call(j,a,k,j.opts))return d;return _.map(k,F,j),_.isFunction(j.opts.start)&&j.opts.start.call(a,j),_.fx.timer(_.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function J(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(na)||[];if(_.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function K(a,b,c,d){function e(h){var i;return f[h]=!0,_.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===tb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function L(a,b){var c,d,e=_.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&_.extend(!0,a,d),a}function M(a,b,c){for(var d,e,f,g,h=a.contents,i=a.dataTypes;"*"===i[0];)i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function N(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function O(a,b,c,d){var e;if(_.isArray(b))_.each(b,function(b,e){c||yb.test(a)?d(a,e):O(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==_.type(b))d(a,b);else for(e in b)O(a+"["+e+"]",b[e],c,d)}function P(a){return _.isWindow(a)?a:9===a.nodeType&&a.defaultView}var Q=[],R=Q.slice,S=Q.concat,T=Q.push,U=Q.indexOf,V={},W=V.toString,X=V.hasOwnProperty,Y={},Z=a.document,$="2.1.4",_=function(a,b){return new _.fn.init(a,b)},aa=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ba=/^-ms-/,ca=/-([\da-z])/gi,da=function(a,b){return b.toUpperCase()};_.fn=_.prototype={jquery:$,constructor:_,selector:"",length:0,toArray:function(){return R.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:R.call(this)},pushStack:function(a){var b=_.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return _.each(this,a,b)},map:function(a){return this.pushStack(_.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(R.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:T,sort:Q.sort,splice:Q.splice},_.extend=_.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||_.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(_.isPlainObject(d)||(e=_.isArray(d)))?(e?(e=!1,f=c&&_.isArray(c)?c:[]):f=c&&_.isPlainObject(c)?c:{},g[b]=_.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},_.extend({expando:"jQuery"+($+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===_.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!_.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==_.type(a)||a.nodeType||_.isWindow(a)?!1:a.constructor&&!X.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?V[W.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=_.trim(a),a&&(1===a.indexOf("use strict")?(b=Z.createElement("script"),b.text=a,Z.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(ba,"ms-").replace(ca,da)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;g>f&&(e=b.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],d),e===!1)break}else if(h)for(;g>f&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(aa,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?_.merge(d,"string"==typeof a?[a]:a):T.call(d,a)),d},inArray:function(a,b,c){return null==b?-1:U.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];if(h)for(;g>f;f++)e=b(a[f],f,d),null!=e&&i.push(e);else for(f in a)e=b(a[f],f,d),null!=e&&i.push(e);return S.apply([],i)},guid:1,proxy:function(a,b){var c,d,e;return"string"==typeof b&&(c=a[b],b=a,a=c),_.isFunction(a)?(d=R.call(arguments,2),e=function(){return a.apply(b||this,d.concat(R.call(arguments)))},e.guid=a.guid=a.guid||_.guid++,e):void 0},now:Date.now,support:Y}),_.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){V["[object "+b+"]"]=b.toLowerCase()});var ea=/*!
+ * Sizzle CSS Selector Engine v2.2.0-pre
+ * http://sizzlejs.com/
+ *
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-16
+ */
+function(a){function b(a,b,c,d){var e,f,g,h,i,j,l,n,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],h=b.nodeType,"string"!=typeof a||!a||1!==h&&9!==h&&11!==h)return c;if(!d&&I){if(11!==h&&(e=sa.exec(a)))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return $.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&v.getElementsByClassName)return $.apply(c,b.getElementsByClassName(g)),c}if(v.qsa&&(!J||!J.test(a))){if(n=l=N,o=b,p=1!==h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=z(a),(l=b.getAttribute("id"))?n=l.replace(ua,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=ta.test(a)&&k(b.parentNode)||b,p=j.join(",")}if(p)try{return $.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{l||b.removeAttribute("id")}}}return B(a.replace(ia,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>w.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[N]=!0,a}function e(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=a.length;d--;)w.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||V)-(~a.sourceIndex||V);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}function l(){}function m(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[P,f];if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(i=b[N]||(b[N]={}),(h=i[d])&&h[0]===P&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function o(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,c,d){for(var e=0,f=c.length;f>e;e++)b(a,c[e],d);return d}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function r(a,b,c,e,f,g){return e&&!e[N]&&(e=r(e)),f&&!f[N]&&(f=r(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,r=d||p(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?r:q(r,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;if(c&&c(s,t,h,i),e)for(j=q(t,n),e(j,[],h,i),k=j.length;k--;)(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));if(d){if(f||a){if(f){for(j=[],k=t.length;k--;)(l=t[k])&&j.push(s[k]=l);f(null,t=[],j,i)}for(k=t.length;k--;)(l=t[k])&&(j=f?aa(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=q(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):$.apply(g,t)})}function s(a){for(var b,c,d,e=a.length,f=w.relative[a[0].type],g=f||w.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return aa(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==C)||((b=c).nodeType?i(a,c,d):j(a,c,d));return b=null,e}];e>h;h++)if(c=w.relative[a[h].type])k=[n(o(k),c)];else{if(c=w.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;e>d&&!w.relative[a[d].type];d++);return r(h>1&&o(k),h>1&&m(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,d>h&&s(a.slice(h,d)),e>d&&s(a=a.slice(d)),e>d&&m(a))}k.push(c)}return o(k)}function t(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],r=[],s=C,t=d||f&&w.find.TAG("*",j),u=P+=null==s?1:Math.random()||.1,v=t.length;for(j&&(C=g!==G&&g);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0;m=a[l++];)if(m(k,g,h)){i.push(k);break}j&&(P=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,r,g,h);if(d){if(n>0)for(;o--;)p[o]||r[o]||(r[o]=Y.call(i));r=q(r)}$.apply(i,r),j&&!d&&r.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(P=u,C=s),p};return e?d(g):g}var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+1*new Date,O=a.document,P=0,Q=0,R=c(),S=c(),T=c(),U=function(a,b){return a===b&&(E=!0),0},V=1<<31,W={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,$=X.push,_=X.slice,aa=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},ba="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ca="[\\x20\\t\\r\\n\\f]",da="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ea=da.replace("w","w#"),fa="\\["+ca+"*("+da+")(?:"+ca+"*([*^$|!~]?=)"+ca+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ea+"))|)"+ca+"*\\]",ga=":("+da+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+fa+")*)|.*)\\)|)",ha=new RegExp(ca+"+","g"),ia=new RegExp("^"+ca+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ca+"+$","g"),ja=new RegExp("^"+ca+"*,"+ca+"*"),ka=new RegExp("^"+ca+"*([>+~]|"+ca+")"+ca+"*"),la=new RegExp("="+ca+"*([^\\]'\"]*?)"+ca+"*\\]","g"),ma=new RegExp(ga),na=new RegExp("^"+ea+"$"),oa={ID:new RegExp("^#("+da+")"),CLASS:new RegExp("^\\.("+da+")"),TAG:new RegExp("^("+da.replace("w","w*")+")"),ATTR:new RegExp("^"+fa),PSEUDO:new RegExp("^"+ga),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ca+"*(even|odd|(([+-]|)(\\d*)n|)"+ca+"*(?:([+-]|)"+ca+"*(\\d+)|))"+ca+"*\\)|)","i"),bool:new RegExp("^(?:"+ba+")$","i"),needsContext:new RegExp("^"+ca+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ca+"*((?:-\\d)?\\d*)"+ca+"*\\)|)(?=[^-]|$)","i")},pa=/^(?:input|select|textarea|button)$/i,qa=/^h\d$/i,ra=/^[^{]+\{\s*\[native \w/,sa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ta=/[+~]/,ua=/'|\\/g,va=new RegExp("\\\\([\\da-f]{1,6}"+ca+"?|("+ca+")|.)","ig"),wa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},xa=function(){F()};try{$.apply(X=_.call(O.childNodes),O.childNodes),X[O.childNodes.length].nodeType}catch(ya){$={apply:X.length?function(a,b){Z.apply(a,_.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}v=b.support={},y=b.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},F=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:O;return d!==G&&9===d.nodeType&&d.documentElement?(G=d,H=d.documentElement,c=d.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",xa,!1):c.attachEvent&&c.attachEvent("onunload",xa)),I=!y(d),v.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),v.getElementsByTagName=e(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),v.getElementsByClassName=ra.test(d.getElementsByClassName),v.getById=e(function(a){return H.appendChild(a).id=N,!d.getElementsByName||!d.getElementsByName(N).length}),v.getById?(w.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){return a.getAttribute("id")===b}}):(delete w.find.ID,w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),w.find.TAG=v.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):v.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},w.find.CLASS=v.getElementsByClassName&&function(a,b){return I?b.getElementsByClassName(a):void 0},K=[],J=[],(v.qsa=ra.test(d.querySelectorAll))&&(e(function(a){H.appendChild(a).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&J.push("[*^$]="+ca+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||J.push("\\["+ca+"*(?:value|"+ba+")"),a.querySelectorAll("[id~="+N+"-]").length||J.push("~="),a.querySelectorAll(":checked").length||J.push(":checked"),a.querySelectorAll("a#"+N+"+*").length||J.push(".#.+[+~]")}),e(function(a){var b=d.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&J.push("name"+ca+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(v.matchesSelector=ra.test(L=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&e(function(a){v.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ga)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),b=ra.test(H.compareDocumentPosition),M=b||ra.test(H.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},U=b?function(a,b){if(a===b)return E=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!v.sortDetached&&b.compareDocumentPosition(a)===c?a===d||a.ownerDocument===O&&M(O,a)?-1:b===d||b.ownerDocument===O&&M(O,b)?1:D?aa(D,a)-aa(D,b):0:4&c?-1:1)}:function(a,b){if(a===b)return E=!0,0;var c,e=0,f=a.parentNode,h=b.parentNode,i=[a],j=[b];if(!f||!h)return a===d?-1:b===d?1:f?-1:h?1:D?aa(D,a)-aa(D,b):0;if(f===h)return g(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?g(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},d):G},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&F(a),c=c.replace(la,"='$1']"),!(!v.matchesSelector||!I||K&&K.test(c)||J&&J.test(c)))try{var d=L.call(a,c);if(d||v.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return b(c,G,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!==G&&F(a);var c=w.attrHandle[b.toLowerCase()],d=c&&W.call(w.attrHandle,b.toLowerCase())?c(a,b,!I):void 0;return void 0!==d?d:v.attributes||!I?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(E=!v.detectDuplicates,D=!v.sortStable&&a.slice(0),a.sort(U),E){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return D=null,a},x=b.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=x(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=x(b);return c},w=b.selectors={cacheLength:50,createPseudo:d,match:oa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(va,wa),a[3]=(a[3]||a[4]||a[5]||"").replace(va,wa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return oa.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ma.test(c)&&(b=z(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(va,wa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+ca+")"+a+"("+ca+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);return null==f?"!="===c:c?(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f.replace(ha," ")+" ").indexOf(d)>-1:"|="===c?f===d||f.slice(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,c){var e,f=w.pseudos[a]||w.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[N]?f(c):f.length>1?(e=[a,a,"",c],w.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;g--;)d=aa(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=A(a.replace(ia,"$1"));return e[N]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return a=a.replace(va,wa),function(b){return(b.textContent||b.innerText||x(b)).indexOf(a)>-1}}),lang:d(function(a){return na.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(va,wa).toLowerCase(),function(b){var c;do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!w.pseudos.empty(a)},header:function(a){return qa.test(a.nodeName)},input:function(a){return pa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:j(function(){return[0]}),last:j(function(a,b){return[b-1]}),eq:j(function(a,b,c){return[0>c?c+b:c]}),even:j(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:j(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:j(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:j(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},w.pseudos.nth=w.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[u]=h(u);for(u in{submit:!0,reset:!0})w.pseudos[u]=i(u);return l.prototype=w.filters=w.pseudos,w.setFilters=new l,z=b.tokenize=function(a,c){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return c?0:k.slice(0);for(h=a,i=[],j=w.preFilter;h;){(!d||(e=ja.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ka.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(ia," ")}),h=h.slice(d.length));for(g in w.filter)!(e=oa[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):S(a,i).slice(0)},A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=z(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&z(a=j.selector||a);if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&v.getById&&9===b.nodeType&&I&&w.relative[f[1].type]){if(b=(w.find.ID(g.matches[0].replace(va,wa),b)||[])[0],!b)return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=oa.needsContext.test(a)?0:f.length;e--&&(g=f[e],!w.relative[h=g.type]);)if((i=w.find[h])&&(d=i(g.matches[0].replace(va,wa),ta.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return $.apply(c,d),c;break}}return(j||A(a,l))(d,b,!I,c,ta.test(a)&&k(b.parentNode)||b),c},v.sortStable=N.split("").sort(U).join("")===N,v.detectDuplicates=!!E,F(),v.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),v.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ba,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(a);_.find=ea,_.expr=ea.selectors,_.expr[":"]=_.expr.pseudos,_.unique=ea.uniqueSort,_.text=ea.getText,_.isXMLDoc=ea.isXML,_.contains=ea.contains;var fa=_.expr.match.needsContext,ga=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ha=/^.[^:#\[\.,]*$/;_.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?_.find.matchesSelector(d,a)?[d]:[]:_.find.matches(a,_.grep(b,function(a){return 1===a.nodeType}))},_.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(_(a).filter(function(){for(b=0;c>b;b++)if(_.contains(e[b],this))return!0}));for(b=0;c>b;b++)_.find(a,e[b],d);return d=this.pushStack(c>1?_.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(d(this,a||[],!1))},not:function(a){return this.pushStack(d(this,a||[],!0))},is:function(a){return!!d(this,"string"==typeof a&&fa.test(a)?_(a):a||[],!1).length}});var ia,ja=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ka=_.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:ja.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||ia).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof _?b[0]:b,_.merge(this,_.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:Z,!0)),ga.test(c[1])&&_.isPlainObject(b))for(c in b)_.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=Z.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=Z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):_.isFunction(a)?"undefined"!=typeof ia.ready?ia.ready(a):a(_):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),_.makeArray(a,this))};ka.prototype=_.fn,ia=_(Z);var la=/^(?:parents|prev(?:Until|All))/,ma={children:!0,contents:!0,next:!0,prev:!0};_.extend({dir:function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&_(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),_.fn.extend({has:function(a){var b=_(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(_.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=fa.test(a)||"string"!=typeof a?_(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&_.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?_.unique(f):f)},index:function(a){return a?"string"==typeof a?U.call(_(a),this[0]):U.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(_.unique(_.merge(this.get(),_(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),_.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return _.dir(a,"parentNode")},parentsUntil:function(a,b,c){return _.dir(a,"parentNode",c)},next:function(a){return e(a,"nextSibling")},prev:function(a){return e(a,"previousSibling")},nextAll:function(a){return _.dir(a,"nextSibling")},prevAll:function(a){return _.dir(a,"previousSibling")},nextUntil:function(a,b,c){return _.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return _.dir(a,"previousSibling",c)},siblings:function(a){return _.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return _.sibling(a.firstChild)},contents:function(a){return a.contentDocument||_.merge([],a.childNodes)}},function(a,b){_.fn[a]=function(c,d){var e=_.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=_.filter(d,e)),this.length>1&&(ma[a]||_.unique(e),la.test(a)&&e.reverse()),this.pushStack(e)}});var na=/\S+/g,oa={};_.Callbacks=function(a){a="string"==typeof a?oa[a]||f(a):_.extend({},a);var b,c,d,e,g,h,i=[],j=!a.once&&[],k=function(f){for(b=a.memory&&f,c=!0,h=e||0,e=0,g=i.length,d=!0;i&&g>h;h++)if(i[h].apply(f[0],f[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,i&&(j?j.length&&k(j.shift()):b?i=[]:l.disable())},l={add:function(){if(i){var c=i.length;!function f(b){_.each(b,function(b,c){var d=_.type(c);"function"===d?a.unique&&l.has(c)||i.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),d?g=i.length:b&&(e=c,k(b))}return this},remove:function(){return i&&_.each(arguments,function(a,b){for(var c;(c=_.inArray(b,i,c))>-1;)i.splice(c,1),d&&(g>=c&&g--,h>=c&&h--)}),this},has:function(a){return a?_.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],g=0,this},disable:function(){return i=j=b=void 0,this},disabled:function(){return!i},lock:function(){return j=void 0,b||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return!i||c&&!j||(b=b||[],b=[a,b.slice?b.slice():b],d?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!c}};return l},_.extend({Deferred:function(a){var b=[["resolve","done",_.Callbacks("once memory"),"resolved"],["reject","fail",_.Callbacks("once memory"),"rejected"],["notify","progress",_.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return _.Deferred(function(c){_.each(b,function(b,f){var g=_.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&_.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?_.extend(a,d):d}},e={};return d.pipe=d.then,_.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=R.call(arguments),g=f.length,h=1!==g||a&&_.isFunction(a.promise)?g:0,i=1===h?a:_.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?R.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);g>e;e++)f[e]&&_.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}});var pa;_.fn.ready=function(a){return _.ready.promise().done(a),this},_.extend({isReady:!1,readyWait:1,holdReady:function(a){a?_.readyWait++:_.ready(!0)},ready:function(a){(a===!0?--_.readyWait:_.isReady)||(_.isReady=!0,a!==!0&&--_.readyWait>0||(pa.resolveWith(Z,[_]),_.fn.triggerHandler&&(_(Z).triggerHandler("ready"),_(Z).off("ready"))))}}),_.ready.promise=function(b){return pa||(pa=_.Deferred(),"complete"===Z.readyState?setTimeout(_.ready):(Z.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1))),pa.promise(b)},_.ready.promise();var qa=_.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===_.type(c)){e=!0;for(h in c)_.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,_.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(_(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};_.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType},h.uid=1,h.accepts=_.acceptData,h.prototype={key:function(a){if(!h.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=h.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,_.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(_.isEmptyObject(f))_.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,_.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{_.isArray(b)?d=b.concat(b.map(_.camelCase)):(e=_.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(na)||[])),c=d.length;for(;c--;)delete g[d[c]]}},hasData:function(a){return!_.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var ra=new h,sa=new h,ta=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ua=/([A-Z])/g;_.extend({hasData:function(a){return sa.hasData(a)||ra.hasData(a)},data:function(a,b,c){return sa.access(a,b,c)},removeData:function(a,b){sa.remove(a,b)},_data:function(a,b,c){return ra.access(a,b,c)},_removeData:function(a,b){ra.remove(a,b)}}),_.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=sa.get(f),1===f.nodeType&&!ra.get(f,"hasDataAttrs"))){for(c=g.length;c--;)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=_.camelCase(d.slice(5)),i(f,d,e[d])));ra.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){sa.set(this,a)}):qa(this,function(b){var c,d=_.camelCase(a);if(f&&void 0===b){if(c=sa.get(f,a),void 0!==c)return c;if(c=sa.get(f,d),void 0!==c)return c;if(c=i(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=sa.get(this,d);sa.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&sa.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){sa.remove(this,a)})}}),_.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=ra.get(a,b),c&&(!d||_.isArray(c)?d=ra.access(a,b,_.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=_.queue(a,b),d=c.length,e=c.shift(),f=_._queueHooks(a,b),g=function(){_.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ra.get(a,c)||ra.access(a,c,{empty:_.Callbacks("once memory").add(function(){ra.remove(a,[b+"queue",c])})})}}),_.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?_.queue(this[0],a):void 0===b?this:this.each(function(){var c=_.queue(this,a,b);_._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&_.dequeue(this,a)})},dequeue:function(a){return this.each(function(){_.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=_.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";g--;)c=ra.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var va=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,wa=["Top","Right","Bottom","Left"],xa=function(a,b){return a=b||a,"none"===_.css(a,"display")||!_.contains(a.ownerDocument,a)},ya=/^(?:checkbox|radio)$/i;!function(){var a=Z.createDocumentFragment(),b=a.appendChild(Z.createElement("div")),c=Z.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),Y.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",Y.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var za="undefined";Y.focusinBubbles="onfocusin"in a;var Aa=/^key/,Ba=/^(?:mouse|pointer|contextmenu)|click/,Ca=/^(?:focusinfocus|focusoutblur)$/,Da=/^([^.]*)(?:\.(.+)|)$/;_.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ra.get(a);if(q)for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=_.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return typeof _!==za&&_.event.triggered!==b.type?_.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(na)||[""],j=b.length;j--;)h=Da.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=_.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=_.event.special[n]||{},k=_.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&_.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),_.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ra.hasData(a)&&ra.get(a);if(q&&(i=q.events)){for(b=(b||"").match(na)||[""],j=b.length;j--;)if(h=Da.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=_.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||_.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)_.event.remove(a,n+b[j],c,d,!0);_.isEmptyObject(i)&&(delete q.handle,ra.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m=[d||Z],n=X.call(b,"type")?b.type:b,o=X.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||Z,3!==d.nodeType&&8!==d.nodeType&&!Ca.test(n+_.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),j=n.indexOf(":")<0&&"on"+n,b=b[_.expando]?b:new _.Event(n,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=o.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),
+c=null==c?[b]:_.makeArray(c,[b]),l=_.event.special[n]||{},e||!l.trigger||l.trigger.apply(d,c)!==!1)){if(!e&&!l.noBubble&&!_.isWindow(d)){for(i=l.delegateType||n,Ca.test(i+n)||(g=g.parentNode);g;g=g.parentNode)m.push(g),h=g;h===(d.ownerDocument||Z)&&m.push(h.defaultView||h.parentWindow||a)}for(f=0;(g=m[f++])&&!b.isPropagationStopped();)b.type=f>1?i:l.bindType||n,k=(ra.get(g,"events")||{})[b.type]&&ra.get(g,"handle"),k&&k.apply(g,c),k=j&&g[j],k&&k.apply&&_.acceptData(g)&&(b.result=k.apply(g,c),b.result===!1&&b.preventDefault());return b.type=n,e||b.isDefaultPrevented()||l._default&&l._default.apply(m.pop(),c)!==!1||!_.acceptData(d)||j&&_.isFunction(d[n])&&!_.isWindow(d)&&(h=d[j],h&&(d[j]=null),_.event.triggered=n,d[n](),_.event.triggered=void 0,h&&(d[j]=h)),b.result}},dispatch:function(a){a=_.event.fix(a);var b,c,d,e,f,g=[],h=R.call(arguments),i=(ra.get(this,"events")||{})[a.type]||[],j=_.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=_.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(f.namespace))&&(a.handleObj=f,a.data=f.data,d=((_.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?_(e,this).index(i)>=0:_.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||Z,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[_.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Ba.test(e)?this.mouseHooks:Aa.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new _.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=Z),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==l()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===l()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&_.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return _.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=_.extend(new _.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?_.event.trigger(e,null,b):_.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},_.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},_.Event=function(a,b){return this instanceof _.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?j:k):this.type=a,b&&_.extend(this,b),this.timeStamp=a&&a.timeStamp||_.now(),void(this[_.expando]=!0)):new _.Event(a,b)},_.Event.prototype={isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=j,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=j,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=j,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},_.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){_.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!_.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),Y.focusinBubbles||_.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){_.event.simulate(b,a.target,_.event.fix(a),!0)};_.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=ra.access(d,b);e||d.addEventListener(a,c,!0),ra.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=ra.access(d,b)-1;e?ra.access(d,b,e):(d.removeEventListener(a,c,!0),ra.remove(d,b))}}}),_.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=k;else if(!d)return this;return 1===e&&(f=d,d=function(a){return _().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=_.guid++)),this.each(function(){_.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,_(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=k),this.each(function(){_.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){_.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?_.event.trigger(a,b,c,!0):void 0}});var Ea=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fa=/<([\w:]+)/,Ga=/<|&#?\w+;/,Ha=/<(?:script|style|link)/i,Ia=/checked\s*(?:[^=]|=\s*.checked.)/i,Ja=/^$|\/(?:java|ecma)script/i,Ka=/^true\/(.*)/,La=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ma={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ma.optgroup=Ma.option,Ma.tbody=Ma.tfoot=Ma.colgroup=Ma.caption=Ma.thead,Ma.th=Ma.td,_.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=_.contains(a.ownerDocument,a);if(!(Y.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||_.isXMLDoc(a)))for(g=r(h),f=r(a),d=0,e=f.length;e>d;d++)s(f[d],g[d]);if(b)if(c)for(f=f||r(a),g=g||r(h),d=0,e=f.length;e>d;d++)q(f[d],g[d]);else q(a,h);return g=r(h,"script"),g.length>0&&p(g,!i&&r(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===_.type(e))_.merge(l,e.nodeType?[e]:e);else if(Ga.test(e)){for(f=f||k.appendChild(b.createElement("div")),g=(Fa.exec(e)||["",""])[1].toLowerCase(),h=Ma[g]||Ma._default,f.innerHTML=h[1]+e.replace(Ea,"<$1></$2>")+h[2],j=h[0];j--;)f=f.lastChild;_.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));for(k.textContent="",m=0;e=l[m++];)if((!d||-1===_.inArray(e,d))&&(i=_.contains(e.ownerDocument,e),f=r(k.appendChild(e),"script"),i&&p(f),c))for(j=0;e=f[j++];)Ja.test(e.type||"")&&c.push(e);return k},cleanData:function(a){for(var b,c,d,e,f=_.event.special,g=0;void 0!==(c=a[g]);g++){if(_.acceptData(c)&&(e=c[ra.expando],e&&(b=ra.cache[e]))){if(b.events)for(d in b.events)f[d]?_.event.remove(c,d):_.removeEvent(c,d,b.handle);ra.cache[e]&&delete ra.cache[e]}delete sa.cache[c[sa.expando]]}}}),_.fn.extend({text:function(a){return qa(this,function(a){return void 0===a?_.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=m(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=m(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?_.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||_.cleanData(r(c)),c.parentNode&&(b&&_.contains(c.ownerDocument,c)&&p(r(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(_.cleanData(r(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return _.clone(this,a,b)})},html:function(a){return qa(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Ha.test(a)&&!Ma[(Fa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ea,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(_.cleanData(r(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,_.cleanData(r(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=S.apply([],a);var c,d,e,f,g,h,i=0,j=this.length,k=this,l=j-1,m=a[0],p=_.isFunction(m);if(p||j>1&&"string"==typeof m&&!Y.checkClone&&Ia.test(m))return this.each(function(c){var d=k.eq(c);p&&(a[0]=m.call(this,c,d.html())),d.domManip(a,b)});if(j&&(c=_.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(e=_.map(r(c,"script"),n),f=e.length;j>i;i++)g=c,i!==l&&(g=_.clone(g,!0,!0),f&&_.merge(e,r(g,"script"))),b.call(this[i],g,i);if(f)for(h=e[e.length-1].ownerDocument,_.map(e,o),i=0;f>i;i++)g=e[i],Ja.test(g.type||"")&&!ra.access(g,"globalEval")&&_.contains(h,g)&&(g.src?_._evalUrl&&_._evalUrl(g.src):_.globalEval(g.textContent.replace(La,"")))}return this}}),_.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){_.fn[a]=function(a){for(var c,d=[],e=_(a),f=e.length-1,g=0;f>=g;g++)c=g===f?this:this.clone(!0),_(e[g])[b](c),T.apply(d,c.get());return this.pushStack(d)}});var Na,Oa={},Pa=/^margin/,Qa=new RegExp("^("+va+")(?!px)[a-z%]+$","i"),Ra=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};!function(){function b(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",g.innerHTML="",e.appendChild(f);var b=a.getComputedStyle(g,null);c="1%"!==b.top,d="4px"===b.width,e.removeChild(f)}var c,d,e=Z.documentElement,f=Z.createElement("div"),g=Z.createElement("div");g.style&&(g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",Y.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",f.appendChild(g),a.getComputedStyle&&_.extend(Y,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return null==d&&b(),d},reliableMarginRight:function(){var b,c=g.appendChild(Z.createElement("div"));return c.style.cssText=g.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.removeChild(c),b}}))}(),_.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Sa=/^(none|table(?!-c[ea]).+)/,Ta=new RegExp("^("+va+")(.*)$","i"),Ua=new RegExp("^([+-])=("+va+")","i"),Va={position:"absolute",visibility:"hidden",display:"block"},Wa={letterSpacing:"0",fontWeight:"400"},Xa=["Webkit","O","Moz","ms"];_.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=v(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=_.camelCase(b),i=a.style;return b=_.cssProps[h]||(_.cssProps[h]=x(i,h)),g=_.cssHooks[b]||_.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ua.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(_.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||_.cssNumber[h]||(c+="px"),Y.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=_.camelCase(b);return b=_.cssProps[h]||(_.cssProps[h]=x(a.style,h)),g=_.cssHooks[b]||_.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=v(a,b,d)),"normal"===e&&b in Wa&&(e=Wa[b]),""===c||c?(f=parseFloat(e),c===!0||_.isNumeric(f)?f||0:e):e}}),_.each(["height","width"],function(a,b){_.cssHooks[b]={get:function(a,c,d){return c?Sa.test(_.css(a,"display"))&&0===a.offsetWidth?_.swap(a,Va,function(){return A(a,b,d)}):A(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return y(a,c,d?z(a,b,d,"border-box"===_.css(a,"boxSizing",!1,e),e):0)}}}),_.cssHooks.marginRight=w(Y.reliableMarginRight,function(a,b){return b?_.swap(a,{display:"inline-block"},v,[a,"marginRight"]):void 0}),_.each({margin:"",padding:"",border:"Width"},function(a,b){_.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+wa[d]+b]=f[d]||f[d-2]||f[0];return e}},Pa.test(a)||(_.cssHooks[a+b].set=y)}),_.fn.extend({css:function(a,b){return qa(this,function(a,b,c){var d,e,f={},g=0;if(_.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=_.css(a,b[g],!1,d);return f}return void 0!==c?_.style(a,b,c):_.css(a,b)},a,b,arguments.length>1)},show:function(){return B(this,!0)},hide:function(){return B(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){xa(this)?_(this).show():_(this).hide()})}}),_.Tween=C,C.prototype={constructor:C,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(_.cssNumber[c]?"":"px")},cur:function(){var a=C.propHooks[this.prop];return a&&a.get?a.get(this):C.propHooks._default.get(this)},run:function(a){var b,c=C.propHooks[this.prop];return this.options.duration?this.pos=b=_.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):C.propHooks._default.set(this),this}},C.prototype.init.prototype=C.prototype,C.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=_.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){_.fx.step[a.prop]?_.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[_.cssProps[a.prop]]||_.cssHooks[a.prop])?_.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},C.propHooks.scrollTop=C.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},_.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},_.fx=C.prototype.init,_.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=new RegExp("^(?:([+-])=|)("+va+")([a-z%]*)$","i"),ab=/queueHooks$/,bb=[G],cb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=_a.exec(b),f=e&&e[3]||(_.cssNumber[a]?"":"px"),g=(_.cssNumber[a]||"px"!==f&&+d)&&_a.exec(_.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,_.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};_.Animation=_.extend(I,{tweener:function(a,b){_.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],cb[c]=cb[c]||[],cb[c].unshift(b)},prefilter:function(a,b){b?bb.unshift(a):bb.push(a)}}),_.speed=function(a,b,c){var d=a&&"object"==typeof a?_.extend({},a):{complete:c||!c&&b||_.isFunction(a)&&a,duration:a,easing:c&&b||b&&!_.isFunction(b)&&b};return d.duration=_.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in _.fx.speeds?_.fx.speeds[d.duration]:_.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){_.isFunction(d.old)&&d.old.call(this),d.queue&&_.dequeue(this,d.queue)},d},_.fn.extend({fadeTo:function(a,b,c,d){return this.filter(xa).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=_.isEmptyObject(a),f=_.speed(b,c,d),g=function(){var b=I(this,_.extend({},a),f);(e||ra.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=_.timers,g=ra.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&ab.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&_.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=ra.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=_.timers,g=d?d.length:0;for(c.finish=!0,_.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),_.each(["toggle","show","hide"],function(a,b){var c=_.fn[b];_.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(E(b,!0),a,d,e)}}),_.each({slideDown:E("show"),slideUp:E("hide"),slideToggle:E("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){_.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),_.timers=[],_.fx.tick=function(){var a,b=0,c=_.timers;for(Ya=_.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||_.fx.stop(),Ya=void 0},_.fx.timer=function(a){_.timers.push(a),a()?_.fx.start():_.timers.pop()},_.fx.interval=13,_.fx.start=function(){Za||(Za=setInterval(_.fx.tick,_.fx.interval))},_.fx.stop=function(){clearInterval(Za),Za=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(a,b){return a=_.fx?_.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=Z.createElement("input"),b=Z.createElement("select"),c=b.appendChild(Z.createElement("option"));a.type="checkbox",Y.checkOn=""!==a.value,Y.optSelected=c.selected,b.disabled=!0,Y.optDisabled=!c.disabled,a=Z.createElement("input"),a.value="t",a.type="radio",Y.radioValue="t"===a.value}();var db,eb,fb=_.expr.attrHandle;_.fn.extend({attr:function(a,b){return qa(this,_.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){_.removeAttr(this,a)})}}),_.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===za?_.prop(a,b,c):(1===f&&_.isXMLDoc(a)||(b=b.toLowerCase(),d=_.attrHooks[b]||(_.expr.match.bool.test(b)?eb:db)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=_.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void _.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(na);if(f&&1===a.nodeType)for(;c=f[e++];)d=_.propFix[c]||c,_.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!Y.radioValue&&"radio"===b&&_.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),eb={set:function(a,b,c){return b===!1?_.removeAttr(a,c):a.setAttribute(c,c),c}},_.each(_.expr.match.bool.source.match(/\w+/g),function(a,b){var c=fb[b]||_.find.attr;fb[b]=function(a,b,d){var e,f;return d||(f=fb[b],fb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,fb[b]=f),e}});var gb=/^(?:input|select|textarea|button)$/i;_.fn.extend({prop:function(a,b){return qa(this,_.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[_.propFix[a]||a]})}}),_.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!_.isXMLDoc(a),f&&(b=_.propFix[b]||b,e=_.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||gb.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),Y.optSelected||(_.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this});var hb=/[\t\r\n\f]/g;_.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(_.isFunction(a))return this.each(function(b){_(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(na)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(hb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=_.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(_.isFunction(a))return this.each(function(b){_(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(na)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(hb," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");g=a?_.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(_.isFunction(a)?function(c){_(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c)for(var b,d=0,e=_(this),f=a.match(na)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else(c===za||"boolean"===c)&&(this.className&&ra.set(this,"__className__",this.className),this.className=this.className||a===!1?"":ra.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(hb," ").indexOf(b)>=0)return!0;return!1}});var ib=/\r/g;_.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=_.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,_(this).val()):a,null==e?e="":"number"==typeof e?e+="":_.isArray(e)&&(e=_.map(e,function(a){return null==a?"":a+""})),b=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=_.valHooks[e.type]||_.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ib,""):null==c?"":c)}}}),_.extend({valHooks:{option:{get:function(a){var b=_.find.attr(a,"value");return null!=b?b:_.trim(_.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(Y.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&_.nodeName(c.parentNode,"optgroup"))){if(b=_(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=_.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=_.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(a,b){return _.isArray(b)?a.checked=_.inArray(_(a).val(),b)>=0:void 0}},Y.checkOn||(_.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),_.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){_.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),_.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var jb=_.now(),kb=/\?/;_.parseJSON=function(a){return JSON.parse(a+"")},_.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&_.error("Invalid XML: "+a),b};var lb=/#.*$/,mb=/([?&])_=[^&]*/,nb=/^(.*?):[ \t]*([^\r\n]*)$/gm,ob=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,pb=/^(?:GET|HEAD)$/,qb=/^\/\//,rb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,sb={},tb={},ub="*/".concat("*"),vb=a.location.href,wb=rb.exec(vb.toLowerCase())||[];_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:vb,type:"GET",isLocal:ob.test(wb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":_.parseJSON,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?L(L(a,_.ajaxSettings),b):L(_.ajaxSettings,a)},ajaxPrefilter:J(sb),ajaxTransport:J(tb),ajax:function(a,b){function c(a,b,c,g){var i,k,r,s,u,w=b;2!==t&&(t=2,h&&clearTimeout(h),d=void 0,f=g||"",v.readyState=a>0?4:0,i=a>=200&&300>a||304===a,c&&(s=M(l,v,c)),s=N(l,s,v,i),i?(l.ifModified&&(u=v.getResponseHeader("Last-Modified"),u&&(_.lastModified[e]=u),u=v.getResponseHeader("etag"),u&&(_.etag[e]=u)),204===a||"HEAD"===l.type?w="nocontent":304===a?w="notmodified":(w=s.state,k=s.data,r=s.error,i=!r)):(r=w,(a||!w)&&(w="error",0>a&&(a=0))),v.status=a,v.statusText=(b||w)+"",i?o.resolveWith(m,[k,w,v]):o.rejectWith(m,[v,w,r]),v.statusCode(q),q=void 0,j&&n.trigger(i?"ajaxSuccess":"ajaxError",[v,l,i?k:r]),p.fireWith(m,[v,w]),j&&(n.trigger("ajaxComplete",[v,l]),--_.active||_.event.trigger("ajaxStop")))}"object"==typeof a&&(b=a,a=void 0),b=b||{};var d,e,f,g,h,i,j,k,l=_.ajaxSetup({},b),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?_(m):_.event,o=_.Deferred(),p=_.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!g)for(g={};b=nb.exec(f);)g[b[1].toLowerCase()]=b[2];b=g[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return d&&d.abort(b),c(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,l.url=((a||l.url||vb)+"").replace(lb,"").replace(qb,wb[1]+"//"),l.type=b.method||b.type||l.method||l.type,l.dataTypes=_.trim(l.dataType||"*").toLowerCase().match(na)||[""],null==l.crossDomain&&(i=rb.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]===wb[1]&&i[2]===wb[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(wb[3]||("http:"===wb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=_.param(l.data,l.traditional)),K(sb,l,b,v),2===t)return v;j=_.event&&l.global,j&&0===_.active++&&_.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!pb.test(l.type),e=l.url,l.hasContent||(l.data&&(e=l.url+=(kb.test(e)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=mb.test(e)?e.replace(mb,"$1_="+jb++):e+(kb.test(e)?"&":"?")+"_="+jb++)),l.ifModified&&(_.lastModified[e]&&v.setRequestHeader("If-Modified-Since",_.lastModified[e]),_.etag[e]&&v.setRequestHeader("If-None-Match",_.etag[e])),(l.data&&l.hasContent&&l.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",l.contentType),v.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+ub+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)v.setRequestHeader(k,l.headers[k]);if(l.beforeSend&&(l.beforeSend.call(m,v,l)===!1||2===t))return v.abort();u="abort";for(k in{success:1,error:1,complete:1})v[k](l[k]);if(d=K(tb,l,b,v)){v.readyState=1,j&&n.trigger("ajaxSend",[v,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){v.abort("timeout")},l.timeout));try{t=1,d.send(r,c)}catch(w){if(!(2>t))throw w;c(-1,w)}}else c(-1,"No Transport");return v},getJSON:function(a,b,c){return _.get(a,b,c,"json")},getScript:function(a,b){return _.get(a,void 0,b,"script")}}),_.each(["get","post"],function(a,b){_[b]=function(a,c,d,e){return _.isFunction(c)&&(e=e||d,d=c,c=void 0),_.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),_._evalUrl=function(a){return _.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},_.fn.extend({wrapAll:function(a){var b;return _.isFunction(a)?this.each(function(b){_(this).wrapAll(a.call(this,b))}):(this[0]&&(b=_(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(_.isFunction(a)?function(b){_(this).wrapInner(a.call(this,b))}:function(){var b=_(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=_.isFunction(a);return this.each(function(c){_(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){_.nodeName(this,"body")||_(this).replaceWith(this.childNodes)}).end()}}),_.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},_.expr.filters.visible=function(a){return!_.expr.filters.hidden(a)};var xb=/%20/g,yb=/\[\]$/,zb=/\r?\n/g,Ab=/^(?:submit|button|image|reset|file)$/i,Bb=/^(?:input|select|textarea|keygen)/i;_.param=function(a,b){var c,d=[],e=function(a,b){b=_.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b);
+
+};if(void 0===b&&(b=_.ajaxSettings&&_.ajaxSettings.traditional),_.isArray(a)||a.jquery&&!_.isPlainObject(a))_.each(a,function(){e(this.name,this.value)});else for(c in a)O(c,a[c],b,e);return d.join("&").replace(xb,"+")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=_.prop(this,"elements");return a?_.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!_(this).is(":disabled")&&Bb.test(this.nodeName)&&!Ab.test(a)&&(this.checked||!ya.test(a))}).map(function(a,b){var c=_(this).val();return null==c?null:_.isArray(c)?_.map(c,function(a){return{name:b.name,value:a.replace(zb,"\r\n")}}):{name:b.name,value:c.replace(zb,"\r\n")}}).get()}}),_.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cb=0,Db={},Eb={0:200,1223:204},Fb=_.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Db)Db[a]()}),Y.cors=!!Fb&&"withCredentials"in Fb,Y.ajax=Fb=!!Fb,_.ajaxTransport(function(a){var b;return Y.cors||Fb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Db[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Eb[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Db[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return _.globalEval(a),a}}}),_.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),_.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=_("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),Z.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gb=[],Hb=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gb.pop()||_.expando+"_"+jb++;return this[a]=!0,a}}),_.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=_.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hb,"$1"+e):b.jsonp!==!1&&(b.url+=(kb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||_.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gb.push(e)),g&&_.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),_.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||Z;var d=ga.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=_.buildFragment([a],b,e),e&&e.length&&_(e).remove(),_.merge([],d.childNodes))};var Ib=_.fn.load;_.fn.load=function(a,b,c){if("string"!=typeof a&&Ib)return Ib.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=_.trim(a.slice(h)),a=a.slice(0,h)),_.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&_.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?_("<div>").append(_.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){_.fn[b]=function(a){return this.on(b,a)}}),_.expr.filters.animated=function(a){return _.grep(_.timers,function(b){return a===b.elem}).length};var Jb=a.document.documentElement;_.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=_.css(a,"position"),l=_(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=_.css(a,"top"),i=_.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),_.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},_.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){_.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,_.contains(b,d)?(typeof d.getBoundingClientRect!==za&&(e=d.getBoundingClientRect()),c=P(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===_.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),_.nodeName(a[0],"html")||(d=a.offset()),d.top+=_.css(a[0],"borderTopWidth",!0),d.left+=_.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-_.css(c,"marginTop",!0),left:b.left-d.left-_.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Jb;a&&!_.nodeName(a,"html")&&"static"===_.css(a,"position");)a=a.offsetParent;return a||Jb})}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;_.fn[b]=function(e){return qa(this,function(b,e,f){var g=P(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),_.each(["top","left"],function(a,b){_.cssHooks[b]=w(Y.pixelPosition,function(a,c){return c?(c=v(a,b),Qa.test(c)?_(a).position()[b]+"px":c):void 0})}),_.each({Height:"height",Width:"width"},function(a,b){_.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){_.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return qa(this,function(b,c,d){var e;return _.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?_.css(b,c,g):_.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),_.fn.size=function(){return this.length},_.fn.andSelf=_.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return _});var Kb=a.jQuery,Lb=a.$;return _.noConflict=function(b){return a.$===_&&(a.$=Lb),b&&a.jQuery===_&&(a.jQuery=Kb),_},typeof b===za&&(a.jQuery=a.$=_),_});
\ No newline at end of file
--- /dev/null
+/*!
+ * Modernizr v2.8.3
+ * www.modernizr.com
+ *
+ * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
+ * Available under the BSD and MIT licenses: www.modernizr.com/license/
+ */
+window.Modernizr=function(a,b,c){function d(a){t.cssText=a}function e(a,b){return d(x.join(a+";")+(b||""))}function f(a,b){return typeof a===b}function g(a,b){return!!~(""+a).indexOf(b)}function h(a,b){for(var d in a){var e=a[d];if(!g(e,"-")&&t[e]!==c)return"pfx"==b?e:!0}return!1}function i(a,b,d){for(var e in a){var g=b[a[e]];if(g!==c)return d===!1?a[e]:f(g,"function")?g.bind(d||b):g}return!1}function j(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+z.join(d+" ")+d).split(" ");return f(b,"string")||f(b,"undefined")?h(e,b):(e=(a+" "+A.join(d+" ")+d).split(" "),i(e,b,c))}function k(){o.input=function(c){for(var d=0,e=c.length;e>d;d++)E[c[d]]=!!(c[d]in u);return E.list&&(E.list=!(!b.createElement("datalist")||!a.HTMLDataListElement)),E}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),o.inputtypes=function(a){for(var d,e,f,g=0,h=a.length;h>g;g++)u.setAttribute("type",e=a[g]),d="text"!==u.type,d&&(u.value=v,u.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(e)&&u.style.WebkitAppearance!==c?(q.appendChild(u),f=b.defaultView,d=f.getComputedStyle&&"textfield"!==f.getComputedStyle(u,null).WebkitAppearance&&0!==u.offsetHeight,q.removeChild(u)):/^(search|tel)$/.test(e)||(d=/^(url|email)$/.test(e)?u.checkValidity&&u.checkValidity()===!1:u.value!=v)),D[a[g]]=!!d;return D}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var l,m,n="2.8.3",o={},p=!0,q=b.documentElement,r="modernizr",s=b.createElement(r),t=s.style,u=b.createElement("input"),v=":)",w={}.toString,x=" -webkit- -moz- -o- -ms- ".split(" "),y="Webkit Moz O ms",z=y.split(" "),A=y.toLowerCase().split(" "),B={svg:"http://www.w3.org/2000/svg"},C={},D={},E={},F=[],G=F.slice,H=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:r+(d+1),j.appendChild(h);return f=["­",'<style id="s',r,'">',a,"</style>"].join(""),j.id=r,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=q.style.overflow,q.style.overflow="hidden",q.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),q.style.overflow=i),!!g},I=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b)&&c(b).matches||!1;var d;return H("@media "+b+" { #"+r+" { position: absolute; } }",function(b){d="absolute"==(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position}),d},J=function(){function a(a,e){e=e||b.createElement(d[a]||"div"),a="on"+a;var g=a in e;return g||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(a,""),g=f(e[a],"function"),f(e[a],"undefined")||(e[a]=c),e.removeAttribute(a))),e=null,g}var d={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return a}(),K={}.hasOwnProperty;m=f(K,"undefined")||f(K.call,"undefined")?function(a,b){return b in a&&f(a.constructor.prototype[b],"undefined")}:function(a,b){return K.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=G.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(G.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(G.call(arguments)))};return d}),C.flexbox=function(){return j("flexWrap")},C.flexboxlegacy=function(){return j("boxDirection")},C.canvas=function(){var a=b.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))},C.canvastext=function(){return!(!o.canvas||!f(b.createElement("canvas").getContext("2d").fillText,"function"))},C.webgl=function(){return!!a.WebGLRenderingContext},C.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:H(["@media (",x.join("touch-enabled),("),r,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c},C.geolocation=function(){return"geolocation"in navigator},C.postmessage=function(){return!!a.postMessage},C.websqldatabase=function(){return!!a.openDatabase},C.indexedDB=function(){return!!j("indexedDB",a)},C.hashchange=function(){return J("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},C.history=function(){return!(!a.history||!history.pushState)},C.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},C.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},C.rgba=function(){return d("background-color:rgba(150,255,150,.5)"),g(t.backgroundColor,"rgba")},C.hsla=function(){return d("background-color:hsla(120,40%,100%,.5)"),g(t.backgroundColor,"rgba")||g(t.backgroundColor,"hsla")},C.multiplebgs=function(){return d("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(t.background)},C.backgroundsize=function(){return j("backgroundSize")},C.borderimage=function(){return j("borderImage")},C.borderradius=function(){return j("borderRadius")},C.boxshadow=function(){return j("boxShadow")},C.textshadow=function(){return""===b.createElement("div").style.textShadow},C.opacity=function(){return e("opacity:.55"),/^0.55$/.test(t.opacity)},C.cssanimations=function(){return j("animationName")},C.csscolumns=function(){return j("columnCount")},C.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return d((a+"-webkit- ".split(" ").join(b+a)+x.join(c+a)).slice(0,-a.length)),g(t.backgroundImage,"gradient")},C.cssreflections=function(){return j("boxReflect")},C.csstransforms=function(){return!!j("transform")},C.csstransforms3d=function(){var a=!!j("perspective");return a&&"webkitPerspective"in q.style&&H("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=9===b.offsetLeft&&3===b.offsetHeight}),a},C.csstransitions=function(){return j("transition")},C.fontface=function(){var a;return H('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&0===g.indexOf(d.split(" ")[0])}),a},C.generatedcontent=function(){var a;return H(["#",r,"{font:0/0 a}#",r,':after{content:"',v,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},C.video=function(){var a=b.createElement("video"),c=!1;try{(c=!!a.canPlayType)&&(c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(d){}return c},C.audio=function(){var a=b.createElement("audio"),c=!1;try{(c=!!a.canPlayType)&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(d){}return c},C.localstorage=function(){try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch(a){return!1}},C.sessionstorage=function(){try{return sessionStorage.setItem(r,r),sessionStorage.removeItem(r),!0}catch(a){return!1}},C.webworkers=function(){return!!a.Worker},C.applicationcache=function(){return!!a.applicationCache},C.svg=function(){return!!b.createElementNS&&!!b.createElementNS(B.svg,"svg").createSVGRect},C.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==B.svg},C.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(w.call(b.createElementNS(B.svg,"animate")))},C.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(w.call(b.createElementNS(B.svg,"clipPath")))};for(var L in C)m(C,L)&&(l=L.toLowerCase(),o[l]=C[L](),F.push((o[l]?"":"no-")+l));return o.input||k(),o.addTest=function(a,b){if("object"==typeof a)for(var d in a)m(a,d)&&o.addTest(d,a[d]);else{if(a=a.toLowerCase(),o[a]!==c)return o;b="function"==typeof b?b():b,"undefined"!=typeof p&&p&&(q.className+=" "+(b?"":"no-")+a),o[a]=b}return o},d(""),s=u=null,function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=s.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=r[a[p]];return b||(b={},q++,a[p]=q,r[q]=b),b}function f(a,c,d){if(c||(c=b),k)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():o.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!f.canHaveChildren||n.test(a)||f.tagUrn?f:d.frag.appendChild(f)}function g(a,c){if(a||(a=b),k)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)f.createElement(h[g]);return f}function h(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?f(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function i(a){a||(a=b);var d=e(a);return!s.shivCSS||j||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||h(a,d),a}var j,k,l="3.7.0",m=a.html5||{},n=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,o=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,p="_html5shiv",q=0,r={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",j="hidden"in a,k=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){j=!0,k=!0}}();var s={elements:m.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:l,shivCSS:m.shivCSS!==!1,supportsUnknownElements:k,shivMethods:m.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=s,i(b)}(this,b),o._version=n,o._prefixes=x,o._domPrefixes=A,o._cssomPrefixes=z,o.mq=I,o.hasEvent=J,o.testProp=function(a){return h([a])},o.testAllProps=j,o.testStyles=H,o.prefixed=function(a,b,c){return b?j(a,b,c):j(a,"pfx")},q.className=q.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+F.join(" "):""),o}(this,this.document);
\ No newline at end of file
--- /dev/null
+/*! http://mths.be/placeholder v2.0.9 by @mathias */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b){var c={},d=/^jQuery\d+$/;return a.each(b.attributes,function(a,b){b.specified&&!d.test(b.name)&&(c[b.name]=b.value)}),c}function c(b,c){var d=this,f=a(d);if(d.value==f.attr("placeholder")&&f.hasClass("placeholder"))if(f.data("placeholder-password")){if(f=f.hide().nextAll('input[type="password"]:first').show().attr("id",f.removeAttr("id").data("placeholder-id")),b===!0)return f[0].value=c;f.focus()}else d.value="",f.removeClass("placeholder"),d==e()&&d.select()}function d(){var d,e=this,f=a(e),g=this.id;if(""===e.value){if("password"===e.type){if(!f.data("placeholder-textinput")){try{d=f.clone().attr({type:"text"})}catch(h){d=a("<input>").attr(a.extend(b(this),{type:"text"}))}d.removeAttr("name").data({"placeholder-password":f,"placeholder-id":g}).bind("focus.placeholder",c),f.data({"placeholder-textinput":d,"placeholder-id":g}).before(d)}f=f.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",g).show()}f.addClass("placeholder"),f[0].value=f.attr("placeholder")}else f.removeClass("placeholder")}function e(){try{return document.activeElement}catch(a){}}var f,g,h="[object OperaMini]"==Object.prototype.toString.call(window.operamini),i="placeholder"in document.createElement("input")&&!h,j="placeholder"in document.createElement("textarea")&&!h,k=a.valHooks,l=a.propHooks;i&&j?(g=a.fn.placeholder=function(){return this},g.input=g.textarea=!0):(g=a.fn.placeholder=function(){var a=this;return a.filter((i?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":c,"blur.placeholder":d}).data("placeholder-enabled",!0).trigger("blur.placeholder"),a},g.input=i,g.textarea=j,f={get:function(b){var c=a(b),d=c.data("placeholder-password");return d?d[0].value:c.data("placeholder-enabled")&&c.hasClass("placeholder")?"":b.value},set:function(b,f){var g=a(b),h=g.data("placeholder-password");return h?h[0].value=f:g.data("placeholder-enabled")?(""===f?(b.value=f,b!=e()&&d.call(b)):g.hasClass("placeholder")?c.call(b,!0,f)||(b.value=f):b.value=f,g):b.value=f}},i||(k.input=f,l.value=f),j||(k.textarea=f,l.value=f),a(function(){a(document).delegate("form","submit.placeholder",function(){var b=a(".placeholder",this).each(c);setTimeout(function(){b.each(d)},10)})}),a(window).bind("beforeunload.placeholder",function(){a(".placeholder").each(function(){this.value=""})}))});
\ No newline at end of file
--- /dev/null
+/*! http://mths.be/placeholder v2.0.9 by @mathias */
+(function(factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD
+ define(['jquery'], factory);
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function($) {
+
+ // Opera Mini v7 doesn’t support placeholder although its DOM seems to indicate so
+ var isOperaMini = Object.prototype.toString.call(window.operamini) == '[object OperaMini]';
+ var isInputSupported = 'placeholder' in document.createElement('input') && !isOperaMini;
+ var isTextareaSupported = 'placeholder' in document.createElement('textarea') && !isOperaMini;
+ var valHooks = $.valHooks;
+ var propHooks = $.propHooks;
+ var hooks;
+ var placeholder;
+
+ if (isInputSupported && isTextareaSupported) {
+
+ placeholder = $.fn.placeholder = function() {
+ return this;
+ };
+
+ placeholder.input = placeholder.textarea = true;
+
+ } else {
+
+ placeholder = $.fn.placeholder = function() {
+ var $this = this;
+ $this
+ .filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
+ .not('.placeholder')
+ .bind({
+ 'focus.placeholder': clearPlaceholder,
+ 'blur.placeholder': setPlaceholder
+ })
+ .data('placeholder-enabled', true)
+ .trigger('blur.placeholder');
+ return $this;
+ };
+
+ placeholder.input = isInputSupported;
+ placeholder.textarea = isTextareaSupported;
+
+ hooks = {
+ 'get': function(element) {
+ var $element = $(element);
+
+ var $passwordInput = $element.data('placeholder-password');
+ if ($passwordInput) {
+ return $passwordInput[0].value;
+ }
+
+ return $element.data('placeholder-enabled') && $element.hasClass('placeholder') ? '' : element.value;
+ },
+ 'set': function(element, value) {
+ var $element = $(element);
+
+ var $passwordInput = $element.data('placeholder-password');
+ if ($passwordInput) {
+ return $passwordInput[0].value = value;
+ }
+
+ if (!$element.data('placeholder-enabled')) {
+ return element.value = value;
+ }
+ if (value === '') {
+ element.value = value;
+ // Issue #56: Setting the placeholder causes problems if the element continues to have focus.
+ if (element != safeActiveElement()) {
+ // We can't use `triggerHandler` here because of dummy text/password inputs :(
+ setPlaceholder.call(element);
+ }
+ } else if ($element.hasClass('placeholder')) {
+ clearPlaceholder.call(element, true, value) || (element.value = value);
+ } else {
+ element.value = value;
+ }
+ // `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363
+ return $element;
+ }
+ };
+
+ if (!isInputSupported) {
+ valHooks.input = hooks;
+ propHooks.value = hooks;
+ }
+ if (!isTextareaSupported) {
+ valHooks.textarea = hooks;
+ propHooks.value = hooks;
+ }
+
+ $(function() {
+ // Look for forms
+ $(document).delegate('form', 'submit.placeholder', function() {
+ // Clear the placeholder values so they don't get submitted
+ var $inputs = $('.placeholder', this).each(clearPlaceholder);
+ setTimeout(function() {
+ $inputs.each(setPlaceholder);
+ }, 10);
+ });
+ });
+
+ // Clear placeholder values upon page reload
+ $(window).bind('beforeunload.placeholder', function() {
+ $('.placeholder').each(function() {
+ this.value = '';
+ });
+ });
+
+ }
+
+ function args(elem) {
+ // Return an object of element attributes
+ var newAttrs = {};
+ var rinlinejQuery = /^jQuery\d+$/;
+ $.each(elem.attributes, function(i, attr) {
+ if (attr.specified && !rinlinejQuery.test(attr.name)) {
+ newAttrs[attr.name] = attr.value;
+ }
+ });
+ return newAttrs;
+ }
+
+ function clearPlaceholder(event, value) {
+ var input = this;
+ var $input = $(input);
+ if (input.value == $input.attr('placeholder') && $input.hasClass('placeholder')) {
+ if ($input.data('placeholder-password')) {
+ $input = $input.hide().nextAll('input[type="password"]:first').show().attr('id', $input.removeAttr('id').data('placeholder-id'));
+ // If `clearPlaceholder` was called from `$.valHooks.input.set`
+ if (event === true) {
+ return $input[0].value = value;
+ }
+ $input.focus();
+ } else {
+ input.value = '';
+ $input.removeClass('placeholder');
+ input == safeActiveElement() && input.select();
+ }
+ }
+ }
+
+ function setPlaceholder() {
+ var $replacement;
+ var input = this;
+ var $input = $(input);
+ var id = this.id;
+ if (input.value === '') {
+ if (input.type === 'password') {
+ if (!$input.data('placeholder-textinput')) {
+ try {
+ $replacement = $input.clone().attr({ 'type': 'text' });
+ } catch(e) {
+ $replacement = $('<input>').attr($.extend(args(this), { 'type': 'text' }));
+ }
+ $replacement
+ .removeAttr('name')
+ .data({
+ 'placeholder-password': $input,
+ 'placeholder-id': id
+ })
+ .bind('focus.placeholder', clearPlaceholder);
+ $input
+ .data({
+ 'placeholder-textinput': $replacement,
+ 'placeholder-id': id
+ })
+ .before($replacement);
+ }
+ $input = $input.removeAttr('id').hide().prevAll('input[type="text"]:first').attr('id', id).show();
+ // Note: `$input[0] != input` now!
+ }
+ $input.addClass('placeholder');
+ $input[0].value = $input.attr('placeholder');
+ } else {
+ $input.removeClass('placeholder');
+ }
+ }
+
+ function safeActiveElement() {
+ // Avoid IE9 `document.activeElement` of death
+ // https://github.com/mathiasbynens/jquery-placeholder/pull/99
+ try {
+ return document.activeElement;
+ } catch (exception) {}
+ }
+
+}));
--- /dev/null
+/*!
+ * jQuery Cookie Plugin v1.4.1
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2013 Klaus Hartl
+ * Released under the MIT license
+ */
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD
+ define(['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // CommonJS
+ factory(require('jquery'));
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function ($) {
+
+ var pluses = /\+/g;
+
+ function encode(s) {
+ return config.raw ? s : encodeURIComponent(s);
+ }
+
+ function decode(s) {
+ return config.raw ? s : decodeURIComponent(s);
+ }
+
+ function stringifyCookieValue(value) {
+ return encode(config.json ? JSON.stringify(value) : String(value));
+ }
+
+ function parseCookieValue(s) {
+ if (s.indexOf('"') === 0) {
+ // This is a quoted cookie as according to RFC2068, unescape...
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
+ }
+
+ try {
+ // Replace server-side written pluses with spaces.
+ // If we can't decode the cookie, ignore it, it's unusable.
+ // If we can't parse the cookie, ignore it, it's unusable.
+ s = decodeURIComponent(s.replace(pluses, ' '));
+ return config.json ? JSON.parse(s) : s;
+ } catch(e) {}
+ }
+
+ function read(s, converter) {
+ var value = config.raw ? s : parseCookieValue(s);
+ return $.isFunction(converter) ? converter(value) : value;
+ }
+
+ var config = $.cookie = function (key, value, options) {
+
+ // Write
+
+ if (value !== undefined && !$.isFunction(value)) {
+ options = $.extend({}, config.defaults, options);
+
+ if (typeof options.expires === 'number') {
+ var days = options.expires, t = options.expires = new Date();
+ t.setTime(+t + days * 864e+5);
+ }
+
+ return (document.cookie = [
+ encode(key), '=', stringifyCookieValue(value),
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+ options.path ? '; path=' + options.path : '',
+ options.domain ? '; domain=' + options.domain : '',
+ options.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // Read
+
+ var result = key ? undefined : {};
+
+ // To prevent the for loop in the first place assign an empty array
+ // in case there are no cookies at all. Also prevents odd result when
+ // calling $.cookie().
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
+
+ for (var i = 0, l = cookies.length; i < l; i++) {
+ var parts = cookies[i].split('=');
+ var name = decode(parts.shift());
+ var cookie = parts.join('=');
+
+ if (key && key === name) {
+ // If second argument (value) is a function it's a converter...
+ result = read(cookie, value);
+ break;
+ }
+
+ // Prevent storing a cookie that we couldn't decode.
+ if (!key && (cookie = read(cookie)) !== undefined) {
+ result[name] = cookie;
+ }
+ }
+
+ return result;
+ };
+
+ config.defaults = {};
+
+ $.removeCookie = function (key, options) {
+ if ($.cookie(key) === undefined) {
+ return false;
+ }
+
+ // Must not alter options, thus extending a fresh object...
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
+ return !$.cookie(key);
+ };
+
+}));
--- /dev/null
+/*!
+ * jQuery JavaScript Library v2.1.4
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2015-04-28T16:01Z
+ */
+
+(function( global, factory ) {
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get jQuery.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket #14549 for more info.
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Support: Firefox 18+
+// Can't be in strict mode, several libs including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+//
+
+var arr = [];
+
+var slice = arr.slice;
+
+var concat = arr.concat;
+
+var push = arr.push;
+
+var indexOf = arr.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var support = {};
+
+
+
+var
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ version = "2.1.4",
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Support: Android<4.1
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num != null ?
+
+ // Return just the one element from the set
+ ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+ // Return all the elements in a clean array
+ slice.call( this );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: arr.sort,
+ splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // Skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // Extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj === obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ // adding 1 corrects loss of precision from parseFloat (#15100)
+ return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
+ },
+
+ isPlainObject: function( obj ) {
+ // Not plain objects:
+ // - Any object or value whose internal [[Class]] property is not "[object Object]"
+ // - DOM nodes
+ // - window
+ if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.constructor &&
+ !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
+ return false;
+ }
+
+ // If the function hasn't returned already, we're confident that
+ // |obj| is a plain object, created by {} or constructed with new Object
+ return true;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+ // Support: Android<4.0, iOS<6 (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ globalEval: function( code ) {
+ var script,
+ indirect = eval;
+
+ code = jQuery.trim( code );
+
+ if ( code ) {
+ // If the code includes a valid, prologue position
+ // strict mode pragma, execute code by injecting a
+ // script tag into the document.
+ if ( code.indexOf("use strict") === 1 ) {
+ script = document.createElement("script");
+ script.text = code;
+ document.head.appendChild( script ).parentNode.removeChild( script );
+ } else {
+ // Otherwise, avoid the DOM node creation, insertion
+ // and removal by using an indirect global eval
+ indirect( code );
+ }
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Support: IE9-11+
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android<4.1
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : indexOf.call( arr, elem, i );
+ },
+
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ for ( ; j < len; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: Date.now,
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+
+ // Support: iOS 8.2 (not reproducible in simulator)
+ // `in` check used to prevent JIT error (gh-2145)
+ // hasOwn isn't used here due to false negatives
+ // regarding Nodelist length in IE
+ var length = "length" in obj && obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v2.2.0-pre
+ * http://sizzlejs.com/
+ *
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-16
+ */
+(function( window ) {
+
+var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + 1 * new Date(),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf as it's faster than native
+ // http://jsperf.com/thor-indexof-vs-for/5
+ indexOf = function( list, elem ) {
+ var i = 0,
+ len = list.length;
+ for ( ; i < len; i++ ) {
+ if ( list[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
+
+ pseudos = ":(" + characterEncoding + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ high < 0 ?
+ // BMP codepoint
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes
+ // See setDocument()
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE
+ unloadHandler = function() {
+ setDocument();
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+ nodeType = context.nodeType;
+
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+ return results;
+ }
+
+ if ( !seed && documentIsHTML ) {
+
+ // Try to shortcut find operations when possible (e.g., not under DocumentFragment)
+ if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document (jQuery #6963)
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType !== 1 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var hasCompare, parent,
+ doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+ parent = doc.defaultView;
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent !== parent.top ) {
+ // IE11 does not have attachEvent, so all must suffer
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", unloadHandler, false );
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", unloadHandler );
+ }
+ }
+
+ /* Support tests
+ ---------------------------------------------------------------------- */
+ documentIsHTML = !isXML( doc );
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties
+ // (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Support: IE<9
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [ m ] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
+
+ // DocumentFragment nodes don't have gEBTN
+ } else if ( support.qsa ) {
+ return context.querySelectorAll( tag );
+ }
+ } :
+
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
+ "<select id='" + expando + "-\f]' msallowcapture=''>" +
+ "<option selected=''></option></select>";
+
+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
+ if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push("~=");
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+
+ // Support: Safari 8+, iOS 8+
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibing-combinator selector` fails
+ if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push(".#.+[+~]");
+ }
+ });
+
+ assert(function( div ) {
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = hasCompare || rnative.test( docElem.contains ) ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = hasCompare ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ } :
+ function( a, b ) {
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Parentless nodes are either documents or disconnected
+ if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch (e) {}
+ }
+
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (jQuery #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[6] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ // Don't keep the element (issue #299)
+ input[0] = null;
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ text = text.replace( runescape, funescape );
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( (tokens = []) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (oldCache = outerCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
+ } else {
+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ // Avoid hanging onto element (issue #299)
+ checkContext = null;
+ return ret;
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is no seed and only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ });
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ });
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( risSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;
+ });
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ }));
+};
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i,
+ len = this.length,
+ ret = [],
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], false) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], true) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+});
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ init = jQuery.fn.init = function( selector, context ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // Option to run scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Support: Blackberry 4.6
+ // gEBID returns nodes no longer in the document (#6963)
+ if ( elem && elem.parentNode ) {
+ // Inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return typeof rootjQuery.ready !== "undefined" ?
+ rootjQuery.ready( selector ) :
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ // Methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.extend({
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ truncate = until !== undefined;
+
+ while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {
+ if ( elem.nodeType === 1 ) {
+ if ( truncate && jQuery( elem ).is( until ) ) {
+ break;
+ }
+ matched.push( elem );
+ }
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var matched = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ matched.push( n );
+ }
+ }
+
+ return matched;
+ }
+});
+
+jQuery.fn.extend({
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter(function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+ },
+
+ // Determine the position of an element within the set
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // Index in selector
+ if ( typeof elem === "string" ) {
+ return indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.unique(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+function sibling( cur, dir ) {
+ while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.unique( matched );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+});
+var rnotwhite = (/\S+/g);
+
+
+
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ firingLength = 0;
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( list && ( !fired || stack ) ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // Add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // If we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+
+
+// The deferred used on DOM ready
+var readyList;
+
+jQuery.fn.ready = function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+};
+
+jQuery.extend({
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
+ }
+ }
+});
+
+/**
+ * The ready event handler and self cleanup method
+ */
+function completed() {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+ jQuery.ready();
+}
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // We once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ } else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Kick off the DOM ready check even if the user does not
+jQuery.ready.promise();
+
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ len = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < len; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ len ? fn( elems[0], key ) : emptyGet;
+};
+
+
+/**
+ * Determines whether an object can have data
+ */
+jQuery.acceptData = function( owner ) {
+ // Accepts only:
+ // - Node
+ // - Node.ELEMENT_NODE
+ // - Node.DOCUMENT_NODE
+ // - Object
+ // - Any
+ /* jshint -W018 */
+ return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
+};
+
+
+function Data() {
+ // Support: Android<4,
+ // Old WebKit does not have Object.preventExtensions/freeze method,
+ // return new empty object instead with no [[set]] accessor
+ Object.defineProperty( this.cache = {}, 0, {
+ get: function() {
+ return {};
+ }
+ });
+
+ this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+Data.accepts = jQuery.acceptData;
+
+Data.prototype = {
+ key: function( owner ) {
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return the key for a frozen object.
+ if ( !Data.accepts( owner ) ) {
+ return 0;
+ }
+
+ var descriptor = {},
+ // Check if the owner object already has a cache key
+ unlock = owner[ this.expando ];
+
+ // If not, create one
+ if ( !unlock ) {
+ unlock = Data.uid++;
+
+ // Secure it in a non-enumerable, non-writable property
+ try {
+ descriptor[ this.expando ] = { value: unlock };
+ Object.defineProperties( owner, descriptor );
+
+ // Support: Android<4
+ // Fallback to a less secure definition
+ } catch ( e ) {
+ descriptor[ this.expando ] = unlock;
+ jQuery.extend( owner, descriptor );
+ }
+ }
+
+ // Ensure the cache object
+ if ( !this.cache[ unlock ] ) {
+ this.cache[ unlock ] = {};
+ }
+
+ return unlock;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ // There may be an unlock assigned to this node,
+ // if there is no entry for this "owner", create one inline
+ // and set the unlock as though an owner entry had always existed
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ // Handle: [ owner, key, value ] args
+ if ( typeof data === "string" ) {
+ cache[ data ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+ // Fresh assignments by object are shallow copied
+ if ( jQuery.isEmptyObject( cache ) ) {
+ jQuery.extend( this.cache[ unlock ], data );
+ // Otherwise, copy the properties one-by-one to the cache object
+ } else {
+ for ( prop in data ) {
+ cache[ prop ] = data[ prop ];
+ }
+ }
+ }
+ return cache;
+ },
+ get: function( owner, key ) {
+ // Either a valid cache is found, or will be created.
+ // New caches will be created and the unlock returned,
+ // allowing direct access to the newly created
+ // empty data object. A valid owner object must be provided.
+ var cache = this.cache[ this.key( owner ) ];
+
+ return key === undefined ?
+ cache : cache[ key ];
+ },
+ access: function( owner, key, value ) {
+ var stored;
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ((key && typeof key === "string") && value === undefined) ) {
+
+ stored = this.get( owner, key );
+
+ return stored !== undefined ?
+ stored : this.get( owner, jQuery.camelCase(key) );
+ }
+
+ // [*]When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i, name, camel,
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ if ( key === undefined ) {
+ this.cache[ unlock ] = {};
+
+ } else {
+ // Support array or space separated string of keys
+ if ( jQuery.isArray( key ) ) {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = key.concat( key.map( jQuery.camelCase ) );
+ } else {
+ camel = jQuery.camelCase( key );
+ // Try the string as a key before any manipulation
+ if ( key in cache ) {
+ name = [ key, camel ];
+ } else {
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ name = camel;
+ name = name in cache ?
+ [ name ] : ( name.match( rnotwhite ) || [] );
+ }
+ }
+
+ i = name.length;
+ while ( i-- ) {
+ delete cache[ name[ i ] ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ return !jQuery.isEmptyObject(
+ this.cache[ owner[ this.expando ] ] || {}
+ );
+ },
+ discard: function( owner ) {
+ if ( owner[ this.expando ] ) {
+ delete this.cache[ owner[ this.expando ] ];
+ }
+ }
+};
+var data_priv = new Data();
+
+var data_user = new Data();
+
+
+
+// Implementation Summary
+//
+// 1. Enforce API surface and semantic compatibility with 1.9.x branch
+// 2. Improve the module's maintainability by reducing the storage
+// paths to a single mechanism.
+// 3. Use the same single mechanism to support "private" and "user" data.
+// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+// 5. Avoid exposing implementation details on user objects (eg. expando properties)
+// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ data_user.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+
+jQuery.extend({
+ hasData: function( elem ) {
+ return data_user.hasData( elem ) || data_priv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return data_user.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ data_user.remove( elem, name );
+ },
+
+ // TODO: Now that all calls to _data and _removeData have been replaced
+ // with direct calls to data_priv methods, these can be deprecated.
+ _data: function( elem, name, data ) {
+ return data_priv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ data_priv.remove( elem, name );
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[ 0 ],
+ attrs = elem && elem.attributes;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = data_user.get( elem );
+
+ if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE11+
+ // The attrs elements can be null (#14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice(5) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ data_priv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ data_user.set( this, key );
+ });
+ }
+
+ return access( this, function( value ) {
+ var data,
+ camelKey = jQuery.camelCase( key );
+
+ // The calling jQuery object (element matches) is not empty
+ // (and therefore has an element appears at this[ 0 ]) and the
+ // `value` parameter was not undefined. An empty jQuery object
+ // will result in `undefined` for elem = this[ 0 ] which will
+ // throw an exception if an attempt to read a data cache is made.
+ if ( elem && value === undefined ) {
+ // Attempt to get data from the cache
+ // with the key as-is
+ data = data_user.get( elem, key );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to get data from the cache
+ // with the key camelized
+ data = data_user.get( elem, camelKey );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, camelKey, undefined );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return;
+ }
+
+ // Set the data...
+ this.each(function() {
+ // First, attempt to store a copy or reference of any
+ // data that might've been store with a camelCased key.
+ var data = data_user.get( this, camelKey );
+
+ // For HTML5 data-* attribute interop, we have to
+ // store property names with dashes in a camelCase form.
+ // This might not apply to all properties...*
+ data_user.set( this, camelKey, value );
+
+ // *... In the case of properties that might _actually_
+ // have dashes, we need to also store a copy of that
+ // unchanged property.
+ if ( key.indexOf("-") !== -1 && data !== undefined ) {
+ data_user.set( this, key, value );
+ }
+ });
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ data_user.remove( this, key );
+ });
+ }
+});
+
+
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = data_priv.get( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray( data ) ) {
+ queue = data_priv.access( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // Clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // Not public - generate a queueHooks object, or return the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return data_priv.get( elem, key ) || data_priv.access( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ data_priv.remove( elem, [ type + "queue", key ] );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // Ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = data_priv.get( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var isHidden = function( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+ };
+
+var rcheckableType = (/^(?:checkbox|radio)$/i);
+
+
+
+(function() {
+ var fragment = document.createDocumentFragment(),
+ div = fragment.appendChild( document.createElement( "div" ) ),
+ input = document.createElement( "input" );
+
+ // Support: Safari<=5.1
+ // Check state lost if the name is set (#11217)
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (#14901)
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+
+ // Support: Safari<=5.1, Android<4.2
+ // Older WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<=11+
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ div.innerHTML = "<textarea>x</textarea>";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+})();
+var strundefined = typeof undefined;
+
+
+
+support.focusinBubbles = "onfocusin" in window;
+
+
+var
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.get( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?
+ jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+ };
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.hasData( elem ) && data_priv.get( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+ data_priv.remove( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+
+ var i, cur, tmp, bubbleType, ontype, handle, special,
+ eventPath = [ elem || document ],
+ type = hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
+ event.result = handle.apply( cur, data );
+ if ( event.result === false ) {
+ event.preventDefault();
+ }
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+ jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, j, ret, matched, handleObj,
+ handlerQueue = [],
+ args = slice.call( arguments ),
+ handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or 2) have namespace(s)
+ // a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, matches, sel, handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: Cordova 2.5 (WebKit) (#13255)
+ // All events should have a target; Cordova deviceready doesn't
+ if ( !event.target ) {
+ event.target = document;
+ }
+
+ // Support: Safari 6.0+, Chrome<28
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ this.focus();
+ return false;
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+ // Support: Android<4.0
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e && e.preventDefault ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e && e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e && e.stopImmediatePropagation ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// Support: Chrome 15+
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// Support: Firefox, Chrome, Safari
+// Create "bubbling" focus and blur events
+if ( !support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler on the document while someone wants focusin/focusout
+ var handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ var doc = this.ownerDocument || this,
+ attaches = data_priv.access( doc, fix );
+
+ if ( !attaches ) {
+ doc.addEventListener( orig, handler, true );
+ }
+ data_priv.access( doc, fix, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this,
+ attaches = data_priv.access( doc, fix ) - 1;
+
+ if ( !attaches ) {
+ doc.removeEventListener( orig, handler, true );
+ data_priv.remove( doc, fix );
+
+ } else {
+ data_priv.access( doc, fix, attaches );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+
+
+var
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+
+ // Support: IE9
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+ thead: [ 1, "<table>", "</table>" ],
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ _default: [ 0, "", "" ]
+ };
+
+// Support: IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// Support: 1.x compatibility
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+ elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+
+ if ( match ) {
+ elem.type = match[ 1 ];
+ } else {
+ elem.removeAttribute("type");
+ }
+
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ data_priv.set(
+ elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+ var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // 1. Copy private data: events, handlers, etc.
+ if ( data_priv.hasData( src ) ) {
+ pdataOld = data_priv.access( src );
+ pdataCur = data_priv.set( dest, pdataOld );
+ events = pdataOld.events;
+
+ if ( events ) {
+ delete pdataCur.handle;
+ pdataCur.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+ }
+
+ // 2. Copy user data
+ if ( data_user.hasData( src ) ) {
+ udataOld = data_user.access( src );
+ udataCur = jQuery.extend( {}, udataOld );
+
+ data_user.set( dest, udataCur );
+ }
+}
+
+function getAll( context, tag ) {
+ var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
+ context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+// Fix IE bugs, see support tests
+function fixInput( src, dest ) {
+ var nodeName = dest.nodeName.toLowerCase();
+
+ // Fails to persist the checked state of a cloned checkbox or radio button.
+ if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ dest.checked = src.checked;
+
+ // Fails to return the selected option to the default selected state when cloning options
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var i, l, srcElements, destElements,
+ clone = elem.cloneNode( true ),
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ // Fix IE cloning issues
+ if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
+ !jQuery.isXMLDoc( elem ) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ fixInput( srcElements[ i ], destElements[ i ] );
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var elem, tmp, tag, wrap, contains, j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ // Support: QtWebKit, PhantomJS
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: QtWebKit, PhantomJS
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Ensure the created nodes are orphaned (#12392)
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+ },
+
+ cleanData: function( elems ) {
+ var data, elem, type, key,
+ special = jQuery.event.special,
+ i = 0;
+
+ for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
+ if ( jQuery.acceptData( elem ) ) {
+ key = elem[ data_priv.expando ];
+
+ if ( key && (data = data_priv.cache[ key ]) ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+ if ( data_priv.cache[ key ] ) {
+ // Discard any remaining `private` data
+ delete data_priv.cache[ key ];
+ }
+ }
+ }
+ // Discard any remaining `user` data
+ delete data_user.cache[ elem[ data_user.expando ] ];
+ }
+ }
+});
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().each(function() {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.textContent = value;
+ }
+ });
+ }, null, value, arguments.length );
+ },
+
+ append: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ remove: function( selector, keepData /* Internal Use Only */ ) {
+ var elem,
+ elems = selector ? jQuery.filter( selector, this ) : this,
+ i = 0;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( elem.nodeType === 1 ) {
+
+ // Prevent memory leaks
+ jQuery.cleanData( getAll( elem, false ) );
+
+ // Remove any remaining nodes
+ elem.textContent = "";
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map(function() {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined && elem.nodeType === 1 ) {
+ return elem.innerHTML;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for ( ; i < l; i++ ) {
+ elem = this[ i ] || {};
+
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch( e ) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function() {
+ var arg = arguments[ 0 ];
+
+ // Make the changes, replacing each context element with the new content
+ this.domManip( arguments, function( elem ) {
+ arg = this.parentNode;
+
+ jQuery.cleanData( getAll( this ) );
+
+ if ( arg ) {
+ arg.replaceChild( elem, this );
+ }
+ });
+
+ // Force removal if there was no new content (e.g., from empty arguments)
+ return arg && (arg.length || arg.nodeType) ? this : this.remove();
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, callback ) {
+
+ // Flatten any nested arrays
+ args = concat.apply( [], args );
+
+ var fragment, first, scripts, hasScripts, node, doc,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[ 0 ],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction ||
+ ( l > 1 && typeof value === "string" &&
+ !support.checkClone && rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[ 0 ] = value.call( this, index, self.html() );
+ }
+ self.domManip( args, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ // Support: QtWebKit
+ // jQuery.merge because push.apply(_, arraylike) throws
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call( this[ i ], node, i );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Optional AJAX dependency, but won't run scripts if not present
+ if ( jQuery._evalUrl ) {
+ jQuery._evalUrl( node.src );
+ }
+ } else {
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return this;
+ }
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1,
+ i = 0;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone( true );
+ jQuery( insert[ i ] )[ original ]( elems );
+
+ // Support: QtWebKit
+ // .get() because push.apply(_, arraylike) throws
+ push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+
+var iframe,
+ elemdisplay = {};
+
+/**
+ * Retrieve the actual display of a element
+ * @param {String} name nodeName of the element
+ * @param {Object} doc Document object
+ */
+// Called only from within defaultDisplay
+function actualDisplay( name, doc ) {
+ var style,
+ elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+
+ // getDefaultComputedStyle might be reliably used only on attached element
+ display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
+
+ // Use of this method is a temporary fix (more like optimization) until something better comes along,
+ // since it was removed from specification and supported only in FF
+ style.display : jQuery.css( elem[ 0 ], "display" );
+
+ // We don't have any data stored on the element,
+ // so use "detach" method as fast way to get rid of the element
+ elem.detach();
+
+ return display;
+}
+
+/**
+ * Try to determine the default display value of an element
+ * @param {String} nodeName
+ */
+function defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+
+ // Use the already-created iframe if possible
+ iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = iframe[ 0 ].contentDocument;
+
+ // Support: IE
+ doc.write();
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+var rmargin = (/^margin/);
+
+var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
+
+var getStyles = function( elem ) {
+ // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
+ // IE throws on elements created in popups
+ // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
+ if ( elem.ownerDocument.defaultView.opener ) {
+ return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
+ }
+
+ return window.getComputedStyle( elem, null );
+ };
+
+
+
+function curCSS( elem, name, computed ) {
+ var width, minWidth, maxWidth, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+
+ // Support: IE9
+ // getPropertyValue is only needed for .css('filter') (#12537)
+ if ( computed ) {
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+ }
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // Support: iOS < 6
+ // A tribute to the "awesome hack by Dean Edwards"
+ // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret !== undefined ?
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ ret + "" :
+ ret;
+}
+
+
+function addGetHookIf( conditionFn, hookFn ) {
+ // Define the hook, we'll check on the first run if it's really needed.
+ return {
+ get: function() {
+ if ( conditionFn() ) {
+ // Hook not needed (or it's not possible to use it due
+ // to missing dependency), remove it.
+ delete this.get;
+ return;
+ }
+
+ // Hook needed; redefine it so that the support test is not executed again.
+ return (this.get = hookFn).apply( this, arguments );
+ }
+ };
+}
+
+
+(function() {
+ var pixelPositionVal, boxSizingReliableVal,
+ docElem = document.documentElement,
+ container = document.createElement( "div" ),
+ div = document.createElement( "div" );
+
+ if ( !div.style ) {
+ return;
+ }
+
+ // Support: IE9-11+
+ // Style of cloned element affects source element cloned (#8908)
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
+ "position:absolute";
+ container.appendChild( div );
+
+ // Executing both pixelPosition & boxSizingReliable tests require only one layout
+ // so they're executed at the same time to save the second computation.
+ function computePixelPositionAndBoxSizingReliable() {
+ div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
+ "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
+ "border:1px;padding:1px;width:4px;position:absolute";
+ div.innerHTML = "";
+ docElem.appendChild( container );
+
+ var divStyle = window.getComputedStyle( div, null );
+ pixelPositionVal = divStyle.top !== "1%";
+ boxSizingReliableVal = divStyle.width === "4px";
+
+ docElem.removeChild( container );
+ }
+
+ // Support: node.js jsdom
+ // Don't assume that getComputedStyle is a property of the global object
+ if ( window.getComputedStyle ) {
+ jQuery.extend( support, {
+ pixelPosition: function() {
+
+ // This test is executed only once but we still do memoizing
+ // since we can use the boxSizingReliable pre-computing.
+ // No need to check if the test was already performed, though.
+ computePixelPositionAndBoxSizingReliable();
+ return pixelPositionVal;
+ },
+ boxSizingReliable: function() {
+ if ( boxSizingReliableVal == null ) {
+ computePixelPositionAndBoxSizingReliable();
+ }
+ return boxSizingReliableVal;
+ },
+ reliableMarginRight: function() {
+
+ // Support: Android 2.3
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // This support function is only executed once so no memoizing is needed.
+ var ret,
+ marginDiv = div.appendChild( document.createElement( "div" ) );
+
+ // Reset CSS: box-sizing; display; margin; border; padding
+ marginDiv.style.cssText = div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+ "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+ docElem.appendChild( container );
+
+ ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
+
+ docElem.removeChild( container );
+ div.removeChild( marginDiv );
+
+ return ret;
+ }
+ });
+ }
+})();
+
+
+// A method for quickly swapping in/out CSS properties to get correct calculations.
+jQuery.swap = function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+};
+
+
+var
+ // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: "0",
+ fontWeight: "400"
+ },
+
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// Return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // Shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // Check for vendor prefixed names
+ var capName = name[0].toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // Both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // At this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // At this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // At this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // Some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // Check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox &&
+ ( support.boxSizingReliable() || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // Use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = data_priv.get( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ hidden = isHidden( elem );
+
+ if ( display !== "none" || !hidden ) {
+ data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.extend({
+
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Don't automatically add "px" to these possibly-unitless properties
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "flexGrow": true,
+ "flexShrink": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "order": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ "float": "cssFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // Gets hook for the prefixed version, then unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // Convert "+=" or "-=" to relative numbers (#7345)
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that null and NaN values aren't set (#7116)
+ if ( value == null || value !== value ) {
+ return;
+ }
+
+ // If a number, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Support: IE9-11+
+ // background-* props affect original clone's values
+ if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ style[ name ] = value;
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // Try prefixed name followed by the unprefixed name
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ // Convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Make numeric if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ }
+});
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+
+ // Certain elements can have dimension info if we invisibly show them
+ // but it must have a current display style that would benefit
+ return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+// Support: Android 2.3
+jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
+ function( elem, computed ) {
+ if ( computed ) {
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // Assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each(function() {
+ if ( isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // Passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails.
+ // Simple values such as "10px" are parsed to Float;
+ // complex values such as "rotate(1rad)" are returned as-is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // Use step hook for back compat.
+ // Use cssHook if its there.
+ // Use .style if available and use plain properties where available.
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Support: IE9
+// Panic based approach to setting things on disconnected nodes
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p * Math.PI ) / 2;
+ }
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+
+
+
+var
+ fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [ function( prop, value ) {
+ var tween = this.createTween( prop, value ),
+ target = tween.cur(),
+ parts = rfxnum.exec( value ),
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+ scale = 1,
+ maxIterations = 20;
+
+ if ( start && start[ 3 ] !== unit ) {
+ // Trust units reported by jQuery.css
+ unit = unit || start[ 3 ];
+
+ // Make sure we update the tween properties later on
+ parts = parts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ start = +target || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*.
+ // Use string for doubling so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur(),
+ // break the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ // Update tween properties
+ if ( parts ) {
+ start = tween.start = +start || +target || 0;
+ tween.unit = unit;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[ 1 ] ?
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+ +parts[ 2 ];
+ }
+
+ return tween;
+ } ]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ i = 0,
+ attrs = { height: type };
+
+ // If we include width, step value is 1 to do all cssExpand values,
+ // otherwise step value is 2 to skip over Left and Right
+ includeWidth = includeWidth ? 1 : 0;
+ for ( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+ // We're done with this property
+ return tween;
+ }
+ }
+}
+
+function defaultPrefilter( elem, props, opts ) {
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
+ anim = this,
+ orig = {},
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = data_priv.get( elem, "fxshow" );
+
+ // Handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // Ensure the complete handler is called before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // Height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE9-10 do not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ display = jQuery.css( elem, "display" );
+
+ // Test default display if display is currently "none"
+ checkDisplay = display === "none" ?
+ data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+
+ if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
+ style.display = "inline-block";
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+
+ // show/hide pass
+ for ( prop in props ) {
+ value = props[ prop ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ prop ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+
+ // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+ hidden = true;
+ } else {
+ continue;
+ }
+ }
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+
+ // Any non-fx value stops us from restoring the original display value
+ } else {
+ display = undefined;
+ }
+ }
+
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = data_priv.access( elem, "fxshow", {} );
+ }
+
+ // Store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+
+ data_priv.remove( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+
+ // If this is a noop like .hide().hide(), restore an overwritten display value
+ } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
+ style.display = display;
+ }
+}
+
+function propFilter( props, specialEasing ) {
+ var index, name, easing, value, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // Not quite $.extend, this won't overwrite existing keys.
+ // Reusing 'index' because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // Don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // Support: Android 2.3
+ // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // If we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // Resolve when we played the last frame; otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ jQuery.map( props, createTween, animation );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // Normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // Show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // Animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+ // Empty animations, or finishing resolves immediately
+ if ( empty || data_priv.get( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = data_priv.get( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Start the next in the queue if the last step wasn't forced.
+ // Timers currently will call their complete callbacks, which
+ // will dequeue but only if they were gotoEnd.
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = data_priv.get( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // Enable finishing flag on private data
+ data.finish = true;
+
+ // Empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
+ }
+
+ // Look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // Turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+ var timer,
+ i = 0,
+ timers = jQuery.timers;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ jQuery.timers.push( timer );
+ if ( timer() ) {
+ jQuery.fx.start();
+ } else {
+ jQuery.timers.pop();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+
+// Based off of the plugin by Clint Helfers, with permission.
+// http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+};
+
+
+(function() {
+ var input = document.createElement( "input" ),
+ select = document.createElement( "select" ),
+ opt = select.appendChild( document.createElement( "option" ) );
+
+ input.type = "checkbox";
+
+ // Support: iOS<=5.1, Android<=4.2+
+ // Default value for a checkbox should be "on"
+ support.checkOn = input.value !== "";
+
+ // Support: IE<=11+
+ // Must access selectedIndex to make default options select
+ support.optSelected = opt.selected;
+
+ // Support: Android<=2.3
+ // Options inside disabled selects are incorrectly marked as disabled
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE<=11+
+ // An input loses its value after becoming a radio
+ input = document.createElement( "input" );
+ input.value = "t";
+ input.type = "radio";
+ support.radioValue = input.value === "t";
+})();
+
+
+var nodeHook, boolHook,
+ attrHandle = jQuery.expr.attrHandle;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ }
+});
+
+jQuery.extend({
+ attr: function( elem, name, value ) {
+ var hooks, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ ret = jQuery.find.attr( elem, name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( jQuery.expr.match.bool.test( name ) ) {
+ // Set corresponding property to false
+ elem[ propName ] = false;
+ }
+
+ elem.removeAttribute( name );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !support.radioValue && value === "radio" &&
+ jQuery.nodeName( elem, "input" ) ) {
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ }
+});
+
+// Hooks for boolean attributes
+boolHook = {
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ elem.setAttribute( name, name );
+ }
+ return name;
+ }
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+ var getter = attrHandle[ name ] || jQuery.find.attr;
+
+ attrHandle[ name ] = function( elem, name, isXML ) {
+ var ret, handle;
+ if ( !isXML ) {
+ // Avoid an infinite loop by temporarily removing this function from the getter
+ handle = attrHandle[ name ];
+ attrHandle[ name ] = ret;
+ ret = getter( elem, name, isXML ) != null ?
+ name.toLowerCase() :
+ null;
+ attrHandle[ name ] = handle;
+ }
+ return ret;
+ };
+});
+
+
+
+
+var rfocusable = /^(?:input|select|textarea|button)$/i;
+
+jQuery.fn.extend({
+ prop: function( name, value ) {
+ return access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ return this.each(function() {
+ delete this[ jQuery.propFix[ name ] || name ];
+ });
+ }
+});
+
+jQuery.extend({
+ propFix: {
+ "for": "htmlFor",
+ "class": "className"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // Don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+ ret :
+ ( elem[ name ] = value );
+
+ } else {
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+ ret :
+ elem[ name ];
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
+ elem.tabIndex :
+ -1;
+ }
+ }
+ }
+});
+
+if ( !support.optSelected ) {
+ jQuery.propHooks.selected = {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent && parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ return null;
+ }
+ };
+}
+
+jQuery.each([
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+
+
+
+var rclass = /[\t\r\n\f]/g;
+
+jQuery.fn.extend({
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ proceed = typeof value === "string" && value,
+ i = 0,
+ len = this.length;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+
+ // only assign if different to avoid unneeded rendering.
+ finalValue = jQuery.trim( cur );
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ proceed = arguments.length === 0 || typeof value === "string" && value,
+ i = 0,
+ len = this.length;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+
+ // Only assign if different to avoid unneeded rendering.
+ finalValue = value ? jQuery.trim( cur ) : "";
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // Toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ classNames = value.match( rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // Check each className given, space separated list
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
+ }
+
+ // Toggle whole class name
+ } else if ( type === strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ data_priv.set( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed `false`,
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+});
+
+
+
+
+var rreturn = /\r/g;
+
+jQuery.fn.extend({
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // Handle most common string cases
+ ret.replace(rreturn, "") :
+ // Handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, jQuery( this ).val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+
+ } else if ( typeof val === "number" ) {
+ val += "";
+
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map( val, function( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ var val = jQuery.find.attr( elem, "value" );
+ return val != null ?
+ val :
+ // Support: IE10-11+
+ // option.text throws exceptions (#14686, #14858)
+ jQuery.trim( jQuery.text( elem ) );
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // IE6-9 doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
+
+ while ( i-- ) {
+ option = options[ i ];
+ if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {
+ optionSet = true;
+ }
+ }
+
+ // Force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ }
+});
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ };
+ if ( !support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ };
+ }
+});
+
+
+
+
+// Return jQuery for attributes-only inclusion
+
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.extend({
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ }
+});
+
+
+var nonce = jQuery.now();
+
+var rquery = (/\?/);
+
+
+
+// Support: Android 2.3
+// Workaround failure to string-cast null input
+jQuery.parseJSON = function( data ) {
+ return JSON.parse( data + "" );
+};
+
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+
+ // Support: IE9
+ try {
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data, "text/xml" );
+ } catch ( e ) {
+ xml = undefined;
+ }
+
+ if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+};
+
+
+var
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat( "*" ),
+
+ // Document location
+ ajaxLocation = window.location.href,
+
+ // Segment location into parts
+ ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType[0] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var key, deep,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+ var ct, type, finalDataType, firstDataType,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while ( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s[ "throws" ] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var transport,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+ // timeout handle
+ timeoutTimer,
+ // Cross-domain detection vars
+ parts,
+ // To know if global events are to be dispatched
+ fireGlobals,
+ // Loop variable
+ i,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (prefilters might expect it)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
+ .replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+ fireGlobals = jQuery.event && s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // Aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 || s.type === "HEAD" ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+ // Extract error from statusText and normalize for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ }
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // Shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+
+jQuery._evalUrl = function( url ) {
+ return jQuery.ajax({
+ url: url,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+};
+
+
+jQuery.fn.extend({
+ wrapAll: function( html ) {
+ var wrap;
+
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[ 0 ] ) {
+
+ // The elements to wrap the target around
+ wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+ if ( this[ 0 ].parentNode ) {
+ wrap.insertBefore( this[ 0 ] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstElementChild ) {
+ elem = elem.firstElementChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ }
+});
+
+
+jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
+};
+jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+};
+
+
+
+
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function() {
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function() {
+ var type = this.type;
+
+ // Use .is( ":disabled" ) so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ) {
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ) {
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+
+jQuery.ajaxSettings.xhr = function() {
+ try {
+ return new XMLHttpRequest();
+ } catch( e ) {}
+};
+
+var xhrId = 0,
+ xhrCallbacks = {},
+ xhrSuccessStatus = {
+ // file protocol always yields status code 0, assume 200
+ 0: 200,
+ // Support: IE9
+ // #1450: sometimes IE returns 1223 when it should be 204
+ 1223: 204
+ },
+ xhrSupported = jQuery.ajaxSettings.xhr();
+
+// Support: IE9
+// Open requests must be manually aborted on unload (#5280)
+// See https://support.microsoft.com/kb/2856746 for more info
+if ( window.attachEvent ) {
+ window.attachEvent( "onunload", function() {
+ for ( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]();
+ }
+ });
+}
+
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+support.ajax = xhrSupported = !!xhrSupported;
+
+jQuery.ajaxTransport(function( options ) {
+ var callback;
+
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( support.cors || xhrSupported && !options.crossDomain ) {
+ return {
+ send: function( headers, complete ) {
+ var i,
+ xhr = options.xhr(),
+ id = ++xhrId;
+
+ xhr.open( options.type, options.url, options.async, options.username, options.password );
+
+ // Apply custom fields if provided
+ if ( options.xhrFields ) {
+ for ( i in options.xhrFields ) {
+ xhr[ i ] = options.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( options.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( options.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !options.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+
+ // Set headers
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+
+ // Callback
+ callback = function( type ) {
+ return function() {
+ if ( callback ) {
+ delete xhrCallbacks[ id ];
+ callback = xhr.onload = xhr.onerror = null;
+
+ if ( type === "abort" ) {
+ xhr.abort();
+ } else if ( type === "error" ) {
+ complete(
+ // file: protocol always yields status 0; see #8605, #14207
+ xhr.status,
+ xhr.statusText
+ );
+ } else {
+ complete(
+ xhrSuccessStatus[ xhr.status ] || xhr.status,
+ xhr.statusText,
+ // Support: IE9
+ // Accessing binary-data responseText throws an exception
+ // (#11426)
+ typeof xhr.responseText === "string" ? {
+ text: xhr.responseText
+ } : undefined,
+ xhr.getAllResponseHeaders()
+ );
+ }
+ }
+ };
+ };
+
+ // Listen to events
+ xhr.onload = callback();
+ xhr.onerror = callback("error");
+
+ // Create the abort callback
+ callback = xhrCallbacks[ id ] = callback("abort");
+
+ try {
+ // Do send the request (this may raise an exception)
+ xhr.send( options.hasContent && options.data || null );
+ } catch ( e ) {
+ // #14683: Only rethrow if this hasn't been notified as an error yet
+ if ( callback ) {
+ throw e;
+ }
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+ var script, callback;
+ return {
+ send: function( _, complete ) {
+ script = jQuery("<script>").prop({
+ async: true,
+ charset: s.scriptCharset,
+ src: s.url
+ }).on(
+ "load error",
+ callback = function( evt ) {
+ script.remove();
+ callback = null;
+ if ( evt ) {
+ complete( evt.type === "error" ? 404 : 200, evt.type );
+ }
+ }
+ );
+ document.head.appendChild( script[ 0 ] );
+ },
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+
+
+
+
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+
+
+
+
+// data: string of html
+// context (optional): If specified, the fragment will be created in this context, defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+
+ if ( scripts && scripts.length ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+};
+
+
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, type, response,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = jQuery.trim( url.slice( off ) );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+
+
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
+ jQuery.fn[ type ] = function( fn ) {
+ return this.on( type, fn );
+ };
+});
+
+
+
+
+jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+};
+
+
+
+
+var docElem = window.document.documentElement;
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
+}
+
+jQuery.offset = {
+ setOffset: function( elem, options, i ) {
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+ position = jQuery.css( elem, "position" ),
+ curElem = jQuery( elem ),
+ props = {};
+
+ // Set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ curOffset = curElem.offset();
+ curCSSTop = jQuery.css( elem, "top" );
+ curCSSLeft = jQuery.css( elem, "left" );
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+ ( curCSSTop + curCSSLeft ).indexOf("auto") > -1;
+
+ // Need to be able to calculate position if either
+ // top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+jQuery.fn.extend({
+ offset: function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ elem = this[ 0 ],
+ box = { top: 0, left: 0 },
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // Support: BlackBerry 5, iOS 3 (original iPhone)
+ // If we don't have gBCR, just use 0,0 rather than error
+ if ( typeof elem.getBoundingClientRect !== strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + win.pageYOffset - docElem.clientTop,
+ left: box.left + win.pageXOffset - docElem.clientLeft
+ };
+ },
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ elem = this[ 0 ],
+ parentOffset = { top: 0, left: 0 };
+
+ // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // Assume getBoundingClientRect is there when computed position is fixed
+ offset = elem.getBoundingClientRect();
+
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || docElem;
+
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+
+ return offsetParent || docElem;
+ });
+ }
+});
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+ var top = "pageYOffset" === prop;
+
+ jQuery.fn[ method ] = function( val ) {
+ return access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? win[ prop ] : elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : window.pageXOffset,
+ top ? val : window.pageYOffset
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+// Support: Safari<7+, Chrome<37+
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
+// getComputedStyle returns percent when specified for top/left/bottom/right;
+// rather than make the css module depend on the offset module, just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+ function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // If curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ );
+});
+
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // Margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+ // whichever is greatest
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+ return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+
+
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function() {
+ return jQuery;
+ });
+}
+
+
+
+
+var
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in AMD
+// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( typeof noGlobal === strundefined ) {
+ window.jQuery = window.$ = jQuery;
+}
+
+
+
+
+return jQuery;
+
+}));
--- /dev/null
+/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){
+return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qa[0].contentDocument,b.write(),b.close(),c=sa(a,b),qa.detach()),ra[a]=c),c}var ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xa(a,b,c){var d,e,f,g,h=a.style;return c=c||wa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),va.test(g)&&ua.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function ya(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];function Fa(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ea.length;while(e--)if(b=Ea[e]+c,b in a)return b;return d}function Ga(a,b,c){var d=Aa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Ha(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ia(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wa(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xa(a,b,f),(0>e||null==e)&&(e=a.style[b]),va.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Ha(a,b,c||(g?"border":"content"),d,f)+"px"}function Ja(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",ta(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xa(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fa(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ba.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fa(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xa(a,b,d)),"normal"===e&&b in Da&&(e=Da[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?za.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Ca,function(){return Ia(a,b,d)}):Ia(a,b,d):void 0},set:function(a,c,d){var e=d&&wa(a);return Ga(a,c,d?Ha(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ua.test(a)||(n.cssHooks[a+b].set=Ga)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wa(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Ka(a,b,c,d,e){return new Ka.prototype.init(a,b,c,d,e)}n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ka.propHooks[this.prop];return a&&a.get?a.get(this):Ka.propHooks._default.get(this)},run:function(a){var b,c=Ka.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Oa.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Oa.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ua(a,b,c){for(var d,e=(Ra[b]||[]).concat(Ra["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Va(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||ta(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Na.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?ta(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ua(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wa(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xa(a,b,c){var d,e,f=0,g=Qa.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=La||Sa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:La||Sa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wa(k,j.opts.specialEasing);g>f;f++)if(d=Qa[f].call(j,a,k,j.opts))return d;return n.map(k,Ua,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xa,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Ra[c]=Ra[c]||[],Ra[c].unshift(b)},prefilter:function(a,b){b?Qa.unshift(a):Qa.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xa(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pa.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Ta(b,!0),a,d,e)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(La=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),La=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Za:Ya)),
+void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Za={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$a[b]||n.find.attr;$a[b]=function(a,b,d){var e,f;return d||(f=$a[b],$a[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$a[b]=f),e}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_a.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ab," ").indexOf(b)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cb=n.now(),db=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];function qb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rb(a,b,c,d){var e={},f=a===mb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function ub(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sb(sb(a,n.ajaxSettings),b):sb(n.ajaxSettings,a)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kb.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pb[1]&&h[2]===pb[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rb(lb,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ib.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(db.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fb.test(d)?d.replace(fb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rb(mb,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tb(k,v,f)),u=ub(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(a){var b;return k.cors||Eb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||n.expando+"_"+cb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):b.jsonp!==!1&&(b.url+=(db.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;function Jb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ib;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jb(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=ya(k.pixelPosition,function(a,c){return c?(c=xa(a,b),va.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lb),b&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n});
+//# sourceMappingURL=jquery.min.map
\ No newline at end of file
--- /dev/null
+{"version":3,"file":"jquery.min.js","sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","slice","concat","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","support","version","jQuery","selector","context","fn","init","rtrim","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","prototype","jquery","constructor","length","toArray","call","get","num","pushStack","elems","ret","merge","prevObject","each","callback","args","map","elem","i","apply","arguments","first","eq","last","len","j","end","sort","splice","extend","options","name","src","copy","copyIsArray","clone","target","deep","isFunction","isPlainObject","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","obj","type","Array","isWindow","isNumeric","parseFloat","nodeType","isEmptyObject","globalEval","code","script","indirect","eval","trim","createElement","text","head","appendChild","parentNode","removeChild","camelCase","string","nodeName","toLowerCase","value","isArraylike","makeArray","results","Object","inArray","second","grep","invert","callbackInverse","matches","callbackExpect","arg","guid","proxy","tmp","now","Date","split","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","MAX_NEGATIVE","pop","push_native","list","booleans","whitespace","characterEncoding","identifier","attributes","pseudos","rwhitespace","RegExp","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","String","fromCharCode","unloadHandler","childNodes","e","els","seed","match","m","groups","old","nid","newContext","newSelector","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","getAttribute","setAttribute","toSelector","testContext","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","div","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","documentElement","node","hasCompare","parent","doc","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","find","filter","attrId","getAttributeNode","tag","innerHTML","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","xml","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","div1","defaultValue","unique","isXMLDoc","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","is","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","next","prev","until","truncate","sibling","n","targets","l","closest","pos","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","siblings","contentDocument","reverse","rnotwhite","optionsCache","createOptions","object","flag","Callbacks","memory","fired","firing","firingStart","firingLength","firingIndex","stack","once","fire","data","stopOnFalse","disable","remove","lock","locked","fireWith","Deferred","func","tuples","state","promise","always","deferred","fail","then","fns","newDefer","tuple","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","resolveWith","progressContexts","resolveContexts","readyList","readyWait","holdReady","hold","wait","triggerHandler","off","completed","removeEventListener","readyState","setTimeout","access","chainable","emptyGet","raw","bulk","acceptData","owner","Data","defineProperty","uid","accepts","descriptor","unlock","defineProperties","set","prop","stored","camel","hasData","discard","data_priv","data_user","rbrace","rmultiDash","dataAttr","parseJSON","removeData","_data","_removeData","camelKey","queue","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","cssExpand","isHidden","el","css","rcheckableType","fragment","createDocumentFragment","checkClone","cloneNode","noCloneChecked","strundefined","focusinBubbles","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","event","types","handleObjIn","eventHandle","events","t","handleObj","special","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","trigger","onlyHandlers","bubbleType","ontype","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","props","fixHooks","keyHooks","original","which","charCode","keyCode","mouseHooks","eventDoc","body","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","originalEvent","fixHook","load","blur","click","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","relatedTarget","attaches","on","one","origFn","rxhtmlTag","rtagName","rhtml","rnoInnerhtml","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","option","thead","col","tr","td","optgroup","tbody","tfoot","colgroup","caption","th","manipulationTarget","content","disableScript","restoreScript","setGlobalEval","refElements","cloneCopyEvent","dest","pdataOld","pdataCur","udataOld","udataCur","getAll","fixInput","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","buildFragment","scripts","selection","wrap","nodes","createTextNode","cleanData","append","domManip","prepend","insertBefore","before","after","keepData","html","replaceWith","replaceChild","detach","hasScripts","iNoClone","_evalUrl","appendTo","prependTo","insertAfter","replaceAll","insert","iframe","elemdisplay","actualDisplay","style","display","getDefaultComputedStyle","defaultDisplay","write","close","rmargin","rnumnonpx","getStyles","opener","getComputedStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","addGetHookIf","conditionFn","hookFn","pixelPositionVal","boxSizingReliableVal","container","backgroundClip","clearCloneStyle","cssText","computePixelPositionAndBoxSizingReliable","divStyle","pixelPosition","boxSizingReliable","reliableMarginRight","marginDiv","marginRight","swap","rdisplayswap","rnumsplit","rrelNum","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","vendorPropName","capName","origName","setPositiveNumber","subtract","max","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","offsetWidth","offsetHeight","showHide","show","hidden","cssHooks","opacity","cssNumber","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","zIndex","zoom","cssProps","float","margin","padding","border","prefix","suffix","expand","expanded","parts","hide","toggle","Tween","easing","unit","propHooks","run","percent","eased","duration","step","tween","fx","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","*","createTween","scale","maxIterations","createFxNow","genFx","includeWidth","height","animation","collection","opts","oldfire","checkDisplay","anim","dataShow","unqueued","overflow","overflowX","overflowY","propFilter","specialEasing","Animation","properties","stopped","tick","currentTime","startTime","tweens","originalProperties","originalOptions","gotoEnd","rejectWith","timer","complete","tweener","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","clearInterval","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","optDisabled","radioValue","nodeHook","boolHook","removeAttr","nType","attrHooks","propName","attrNames","propFix","getter","rfocusable","removeProp","for","class","notxml","hasAttribute","rclass","addClass","classes","clazz","finalValue","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","rreturn","valHooks","optionSet","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","nonce","rquery","JSON","parse","parseXML","DOMParser","parseFromString","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","prefilters","transports","allTypes","ajaxLocation","ajaxLocParts","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","s","responses","ct","finalDataType","firstDataType","mimeType","getResponseHeader","converters","ajaxConvert","response","isSuccess","conv2","current","conv","responseFields","dataFilter","active","lastModified","etag","url","isLocal","processData","async","contentType","json","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","fireGlobals","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","status","abort","statusText","finalText","success","method","crossDomain","param","traditional","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","modified","getJSON","getScript","throws","wrapAll","firstElementChild","wrapInner","unwrap","visible","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","v","encodeURIComponent","serialize","serializeArray","xhr","XMLHttpRequest","xhrId","xhrCallbacks","xhrSuccessStatus",1223,"xhrSupported","cors","open","username","xhrFields","onload","onerror","responseText","text script","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","_load","params","animated","getWindow","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","left","using","win","box","getBoundingClientRect","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","size","andSelf","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAcC,SAAUA,EAAQC,GAEK,gBAAXC,SAAiD,gBAAnBA,QAAOC,QAQhDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,KAAM,IAAIE,OAAO,2CAElB,OAAOL,GAASI,IAGlBJ,EAASD,IAIS,mBAAXO,QAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAQnE,GAAIC,MAEAC,EAAQD,EAAIC,MAEZC,EAASF,EAAIE,OAEbC,EAAOH,EAAIG,KAEXC,EAAUJ,EAAII,QAEdC,KAEAC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,KAMHf,EAAWG,EAAOH,SAElBgB,EAAU,QAGVC,EAAS,SAAUC,EAAUC,GAG5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No newline at end of file
--- /dev/null
+define([
+ "./core",
+ "./var/rnotwhite",
+ "./ajax/var/nonce",
+ "./ajax/var/rquery",
+ "./core/init",
+ "./ajax/parseJSON",
+ "./ajax/parseXML",
+ "./deferred"
+], function( jQuery, rnotwhite, nonce, rquery ) {
+
+var
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat( "*" ),
+
+ // Document location
+ ajaxLocation = window.location.href,
+
+ // Segment location into parts
+ ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType[0] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var key, deep,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+ var ct, type, finalDataType, firstDataType,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while ( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s[ "throws" ] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var transport,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+ // timeout handle
+ timeoutTimer,
+ // Cross-domain detection vars
+ parts,
+ // To know if global events are to be dispatched
+ fireGlobals,
+ // Loop variable
+ i,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (prefilters might expect it)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
+ .replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+ fireGlobals = jQuery.event && s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // Aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 || s.type === "HEAD" ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+ // Extract error from statusText and normalize for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ }
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // Shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "../core",
+ "./var/nonce",
+ "./var/rquery",
+ "../ajax"
+], function( jQuery, nonce, rquery ) {
+
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+
+});
--- /dev/null
+define([
+ "../core",
+ "../core/parseHTML",
+ "../ajax",
+ "../traversing",
+ "../manipulation",
+ "../selector",
+ // Optional event/alias dependency
+ "../event/alias"
+], function( jQuery ) {
+
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, type, response,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = jQuery.trim( url.slice( off ) );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+});
--- /dev/null
+define([
+ "../core"
+], function( jQuery ) {
+
+// Support: Android 2.3
+// Workaround failure to string-cast null input
+jQuery.parseJSON = function( data ) {
+ return JSON.parse( data + "" );
+};
+
+return jQuery.parseJSON;
+
+});
--- /dev/null
+define([
+ "../core"
+], function( jQuery ) {
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+
+ // Support: IE9
+ try {
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data, "text/xml" );
+ } catch ( e ) {
+ xml = undefined;
+ }
+
+ if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+};
+
+return jQuery.parseXML;
+
+});
--- /dev/null
+define([
+ "../core",
+ "../ajax"
+], function( jQuery ) {
+
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+ var script, callback;
+ return {
+ send: function( _, complete ) {
+ script = jQuery("<script>").prop({
+ async: true,
+ charset: s.scriptCharset,
+ src: s.url
+ }).on(
+ "load error",
+ callback = function( evt ) {
+ script.remove();
+ callback = null;
+ if ( evt ) {
+ complete( evt.type === "error" ? 404 : 200, evt.type );
+ }
+ }
+ );
+ document.head.appendChild( script[ 0 ] );
+ },
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+
+});
--- /dev/null
+define([
+ "../../core"
+], function( jQuery ) {
+ return jQuery.now();
+});
--- /dev/null
+define(function() {
+ return (/\?/);
+});
--- /dev/null
+define([
+ "../core",
+ "../var/support",
+ "../ajax"
+], function( jQuery, support ) {
+
+jQuery.ajaxSettings.xhr = function() {
+ try {
+ return new XMLHttpRequest();
+ } catch( e ) {}
+};
+
+var xhrId = 0,
+ xhrCallbacks = {},
+ xhrSuccessStatus = {
+ // file protocol always yields status code 0, assume 200
+ 0: 200,
+ // Support: IE9
+ // #1450: sometimes IE returns 1223 when it should be 204
+ 1223: 204
+ },
+ xhrSupported = jQuery.ajaxSettings.xhr();
+
+// Support: IE9
+// Open requests must be manually aborted on unload (#5280)
+// See https://support.microsoft.com/kb/2856746 for more info
+if ( window.attachEvent ) {
+ window.attachEvent( "onunload", function() {
+ for ( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]();
+ }
+ });
+}
+
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+support.ajax = xhrSupported = !!xhrSupported;
+
+jQuery.ajaxTransport(function( options ) {
+ var callback;
+
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( support.cors || xhrSupported && !options.crossDomain ) {
+ return {
+ send: function( headers, complete ) {
+ var i,
+ xhr = options.xhr(),
+ id = ++xhrId;
+
+ xhr.open( options.type, options.url, options.async, options.username, options.password );
+
+ // Apply custom fields if provided
+ if ( options.xhrFields ) {
+ for ( i in options.xhrFields ) {
+ xhr[ i ] = options.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( options.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( options.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !options.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+
+ // Set headers
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+
+ // Callback
+ callback = function( type ) {
+ return function() {
+ if ( callback ) {
+ delete xhrCallbacks[ id ];
+ callback = xhr.onload = xhr.onerror = null;
+
+ if ( type === "abort" ) {
+ xhr.abort();
+ } else if ( type === "error" ) {
+ complete(
+ // file: protocol always yields status 0; see #8605, #14207
+ xhr.status,
+ xhr.statusText
+ );
+ } else {
+ complete(
+ xhrSuccessStatus[ xhr.status ] || xhr.status,
+ xhr.statusText,
+ // Support: IE9
+ // Accessing binary-data responseText throws an exception
+ // (#11426)
+ typeof xhr.responseText === "string" ? {
+ text: xhr.responseText
+ } : undefined,
+ xhr.getAllResponseHeaders()
+ );
+ }
+ }
+ };
+ };
+
+ // Listen to events
+ xhr.onload = callback();
+ xhr.onerror = callback("error");
+
+ // Create the abort callback
+ callback = xhrCallbacks[ id ] = callback("abort");
+
+ try {
+ // Do send the request (this may raise an exception)
+ xhr.send( options.hasContent && options.data || null );
+ } catch ( e ) {
+ // #14683: Only rethrow if this hasn't been notified as an error yet
+ if ( callback ) {
+ throw e;
+ }
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+
+});
--- /dev/null
+define([
+ "./core",
+ "./attributes/attr",
+ "./attributes/prop",
+ "./attributes/classes",
+ "./attributes/val"
+], function( jQuery ) {
+
+// Return jQuery for attributes-only inclusion
+return jQuery;
+});
--- /dev/null
+define([
+ "../core",
+ "../var/rnotwhite",
+ "../var/strundefined",
+ "../core/access",
+ "./support",
+ "../selector"
+], function( jQuery, rnotwhite, strundefined, access, support ) {
+
+var nodeHook, boolHook,
+ attrHandle = jQuery.expr.attrHandle;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ }
+});
+
+jQuery.extend({
+ attr: function( elem, name, value ) {
+ var hooks, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ ret = jQuery.find.attr( elem, name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( jQuery.expr.match.bool.test( name ) ) {
+ // Set corresponding property to false
+ elem[ propName ] = false;
+ }
+
+ elem.removeAttribute( name );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !support.radioValue && value === "radio" &&
+ jQuery.nodeName( elem, "input" ) ) {
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ }
+});
+
+// Hooks for boolean attributes
+boolHook = {
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ elem.setAttribute( name, name );
+ }
+ return name;
+ }
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+ var getter = attrHandle[ name ] || jQuery.find.attr;
+
+ attrHandle[ name ] = function( elem, name, isXML ) {
+ var ret, handle;
+ if ( !isXML ) {
+ // Avoid an infinite loop by temporarily removing this function from the getter
+ handle = attrHandle[ name ];
+ attrHandle[ name ] = ret;
+ ret = getter( elem, name, isXML ) != null ?
+ name.toLowerCase() :
+ null;
+ attrHandle[ name ] = handle;
+ }
+ return ret;
+ };
+});
+
+});
--- /dev/null
+define([
+ "../core",
+ "../var/rnotwhite",
+ "../var/strundefined",
+ "../data/var/data_priv",
+ "../core/init"
+], function( jQuery, rnotwhite, strundefined, data_priv ) {
+
+var rclass = /[\t\r\n\f]/g;
+
+jQuery.fn.extend({
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ proceed = typeof value === "string" && value,
+ i = 0,
+ len = this.length;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+
+ // only assign if different to avoid unneeded rendering.
+ finalValue = jQuery.trim( cur );
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ proceed = arguments.length === 0 || typeof value === "string" && value,
+ i = 0,
+ len = this.length;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+
+ // Only assign if different to avoid unneeded rendering.
+ finalValue = value ? jQuery.trim( cur ) : "";
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // Toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ classNames = value.match( rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // Check each className given, space separated list
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
+ }
+
+ // Toggle whole class name
+ } else if ( type === strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ data_priv.set( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed `false`,
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+});
+
+});
--- /dev/null
+define([
+ "../core",
+ "../core/access",
+ "./support"
+], function( jQuery, access, support ) {
+
+var rfocusable = /^(?:input|select|textarea|button)$/i;
+
+jQuery.fn.extend({
+ prop: function( name, value ) {
+ return access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ return this.each(function() {
+ delete this[ jQuery.propFix[ name ] || name ];
+ });
+ }
+});
+
+jQuery.extend({
+ propFix: {
+ "for": "htmlFor",
+ "class": "className"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // Don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+ ret :
+ ( elem[ name ] = value );
+
+ } else {
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+ ret :
+ elem[ name ];
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
+ elem.tabIndex :
+ -1;
+ }
+ }
+ }
+});
+
+if ( !support.optSelected ) {
+ jQuery.propHooks.selected = {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent && parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ return null;
+ }
+ };
+}
+
+jQuery.each([
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+});
--- /dev/null
+define([
+ "../var/support"
+], function( support ) {
+
+(function() {
+ var input = document.createElement( "input" ),
+ select = document.createElement( "select" ),
+ opt = select.appendChild( document.createElement( "option" ) );
+
+ input.type = "checkbox";
+
+ // Support: iOS<=5.1, Android<=4.2+
+ // Default value for a checkbox should be "on"
+ support.checkOn = input.value !== "";
+
+ // Support: IE<=11+
+ // Must access selectedIndex to make default options select
+ support.optSelected = opt.selected;
+
+ // Support: Android<=2.3
+ // Options inside disabled selects are incorrectly marked as disabled
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE<=11+
+ // An input loses its value after becoming a radio
+ input = document.createElement( "input" );
+ input.value = "t";
+ input.type = "radio";
+ support.radioValue = input.value === "t";
+})();
+
+return support;
+
+});
--- /dev/null
+define([
+ "../core",
+ "./support",
+ "../core/init"
+], function( jQuery, support ) {
+
+var rreturn = /\r/g;
+
+jQuery.fn.extend({
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // Handle most common string cases
+ ret.replace(rreturn, "") :
+ // Handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, jQuery( this ).val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+
+ } else if ( typeof val === "number" ) {
+ val += "";
+
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map( val, function( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ var val = jQuery.find.attr( elem, "value" );
+ return val != null ?
+ val :
+ // Support: IE10-11+
+ // option.text throws exceptions (#14686, #14858)
+ jQuery.trim( jQuery.text( elem ) );
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // IE6-9 doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
+
+ while ( i-- ) {
+ option = options[ i ];
+ if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {
+ optionSet = true;
+ }
+ }
+
+ // Force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ }
+});
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ };
+ if ( !support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ };
+ }
+});
+
+});
--- /dev/null
+define([
+ "./core",
+ "./var/rnotwhite"
+], function( jQuery, rnotwhite ) {
+
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ firingLength = 0;
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( list && ( !fired || stack ) ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+return jQuery;
+});
--- /dev/null
+define([
+ "./var/arr",
+ "./var/slice",
+ "./var/concat",
+ "./var/push",
+ "./var/indexOf",
+ "./var/class2type",
+ "./var/toString",
+ "./var/hasOwn",
+ "./var/support"
+], function( arr, slice, concat, push, indexOf, class2type, toString, hasOwn, support ) {
+
+var
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ version = "@VERSION",
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Support: Android<4.1
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num != null ?
+
+ // Return just the one element from the set
+ ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+ // Return all the elements in a clean array
+ slice.call( this );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: arr.sort,
+ splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // Skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // Extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj === obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ // adding 1 corrects loss of precision from parseFloat (#15100)
+ return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
+ },
+
+ isPlainObject: function( obj ) {
+ // Not plain objects:
+ // - Any object or value whose internal [[Class]] property is not "[object Object]"
+ // - DOM nodes
+ // - window
+ if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.constructor &&
+ !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
+ return false;
+ }
+
+ // If the function hasn't returned already, we're confident that
+ // |obj| is a plain object, created by {} or constructed with new Object
+ return true;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+ // Support: Android<4.0, iOS<6 (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ globalEval: function( code ) {
+ var script,
+ indirect = eval;
+
+ code = jQuery.trim( code );
+
+ if ( code ) {
+ // If the code includes a valid, prologue position
+ // strict mode pragma, execute code by injecting a
+ // script tag into the document.
+ if ( code.indexOf("use strict") === 1 ) {
+ script = document.createElement("script");
+ script.text = code;
+ document.head.appendChild( script ).parentNode.removeChild( script );
+ } else {
+ // Otherwise, avoid the DOM node creation, insertion
+ // and removal by using an indirect global eval
+ indirect( code );
+ }
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Support: IE9-11+
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android<4.1
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : indexOf.call( arr, elem, i );
+ },
+
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ for ( ; j < len; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: Date.now,
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+
+ // Support: iOS 8.2 (not reproducible in simulator)
+ // `in` check used to prevent JIT error (gh-2145)
+ // hasOwn isn't used here due to false negatives
+ // regarding Nodelist length in IE
+ var length = "length" in obj && obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+
+return jQuery;
+});
--- /dev/null
+define([
+ "../core"
+], function( jQuery ) {
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ len = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < len; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ len ? fn( elems[0], key ) : emptyGet;
+};
+
+return access;
+
+});
--- /dev/null
+// Initialize a jQuery object
+define([
+ "../core",
+ "./var/rsingleTag",
+ "../traversing/findFilter"
+], function( jQuery, rsingleTag ) {
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ init = jQuery.fn.init = function( selector, context ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // Option to run scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Support: Blackberry 4.6
+ // gEBID returns nodes no longer in the document (#6963)
+ if ( elem && elem.parentNode ) {
+ // Inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return typeof rootjQuery.ready !== "undefined" ?
+ rootjQuery.ready( selector ) :
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+return init;
+
+});
--- /dev/null
+define([
+ "../core",
+ "./var/rsingleTag",
+ "../manipulation" // buildFragment
+], function( jQuery, rsingleTag ) {
+
+// data: string of html
+// context (optional): If specified, the fragment will be created in this context, defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+
+ if ( scripts && scripts.length ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+};
+
+return jQuery.parseHTML;
+
+});
--- /dev/null
+define([
+ "../core",
+ "../core/init",
+ "../deferred"
+], function( jQuery ) {
+
+// The deferred used on DOM ready
+var readyList;
+
+jQuery.fn.ready = function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+};
+
+jQuery.extend({
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
+ }
+ }
+});
+
+/**
+ * The ready event handler and self cleanup method
+ */
+function completed() {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+ jQuery.ready();
+}
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // We once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ } else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Kick off the DOM ready check even if the user does not
+jQuery.ready.promise();
+
+});
--- /dev/null
+define(function() {
+ // Match a standalone tag
+ return (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
+});
--- /dev/null
+define([
+ "./core",
+ "./var/pnum",
+ "./core/access",
+ "./css/var/rmargin",
+ "./css/var/rnumnonpx",
+ "./css/var/cssExpand",
+ "./css/var/isHidden",
+ "./css/var/getStyles",
+ "./css/curCSS",
+ "./css/defaultDisplay",
+ "./css/addGetHookIf",
+ "./css/support",
+ "./data/var/data_priv",
+
+ "./core/init",
+ "./css/swap",
+ "./core/ready",
+ "./selector" // contains
+], function( jQuery, pnum, access, rmargin, rnumnonpx, cssExpand, isHidden,
+ getStyles, curCSS, defaultDisplay, addGetHookIf, support, data_priv ) {
+
+var
+ // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: "0",
+ fontWeight: "400"
+ },
+
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// Return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // Shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // Check for vendor prefixed names
+ var capName = name[0].toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // Both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // At this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // At this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // At this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // Some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // Check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox &&
+ ( support.boxSizingReliable() || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // Use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = data_priv.get( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ hidden = isHidden( elem );
+
+ if ( display !== "none" || !hidden ) {
+ data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.extend({
+
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Don't automatically add "px" to these possibly-unitless properties
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "flexGrow": true,
+ "flexShrink": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "order": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ "float": "cssFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // Gets hook for the prefixed version, then unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // Convert "+=" or "-=" to relative numbers (#7345)
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that null and NaN values aren't set (#7116)
+ if ( value == null || value !== value ) {
+ return;
+ }
+
+ // If a number, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Support: IE9-11+
+ // background-* props affect original clone's values
+ if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ style[ name ] = value;
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // Try prefixed name followed by the unprefixed name
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ // Convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Make numeric if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ }
+});
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+
+ // Certain elements can have dimension info if we invisibly show them
+ // but it must have a current display style that would benefit
+ return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+// Support: Android 2.3
+jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
+ function( elem, computed ) {
+ if ( computed ) {
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // Assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each(function() {
+ if ( isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+return jQuery;
+});
--- /dev/null
+define(function() {
+
+function addGetHookIf( conditionFn, hookFn ) {
+ // Define the hook, we'll check on the first run if it's really needed.
+ return {
+ get: function() {
+ if ( conditionFn() ) {
+ // Hook not needed (or it's not possible to use it due
+ // to missing dependency), remove it.
+ delete this.get;
+ return;
+ }
+
+ // Hook needed; redefine it so that the support test is not executed again.
+ return (this.get = hookFn).apply( this, arguments );
+ }
+ };
+}
+
+return addGetHookIf;
+
+});
--- /dev/null
+define([
+ "../core",
+ "./var/rnumnonpx",
+ "./var/rmargin",
+ "./var/getStyles",
+ "../selector" // contains
+], function( jQuery, rnumnonpx, rmargin, getStyles ) {
+
+function curCSS( elem, name, computed ) {
+ var width, minWidth, maxWidth, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+
+ // Support: IE9
+ // getPropertyValue is only needed for .css('filter') (#12537)
+ if ( computed ) {
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+ }
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // Support: iOS < 6
+ // A tribute to the "awesome hack by Dean Edwards"
+ // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret !== undefined ?
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ ret + "" :
+ ret;
+}
+
+return curCSS;
+});
--- /dev/null
+define([
+ "../core",
+ "../manipulation" // appendTo
+], function( jQuery ) {
+
+var iframe,
+ elemdisplay = {};
+
+/**
+ * Retrieve the actual display of a element
+ * @param {String} name nodeName of the element
+ * @param {Object} doc Document object
+ */
+// Called only from within defaultDisplay
+function actualDisplay( name, doc ) {
+ var style,
+ elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+
+ // getDefaultComputedStyle might be reliably used only on attached element
+ display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
+
+ // Use of this method is a temporary fix (more like optimization) until something better comes along,
+ // since it was removed from specification and supported only in FF
+ style.display : jQuery.css( elem[ 0 ], "display" );
+
+ // We don't have any data stored on the element,
+ // so use "detach" method as fast way to get rid of the element
+ elem.detach();
+
+ return display;
+}
+
+/**
+ * Try to determine the default display value of an element
+ * @param {String} nodeName
+ */
+function defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+
+ // Use the already-created iframe if possible
+ iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = iframe[ 0 ].contentDocument;
+
+ // Support: IE
+ doc.write();
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+
+return defaultDisplay;
+
+});
--- /dev/null
+define([
+ "../core",
+ "../selector"
+], function( jQuery ) {
+
+jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
+};
+jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+};
+
+});
--- /dev/null
+define([
+ "../core",
+ "../var/support"
+], function( jQuery, support ) {
+
+(function() {
+ var pixelPositionVal, boxSizingReliableVal,
+ docElem = document.documentElement,
+ container = document.createElement( "div" ),
+ div = document.createElement( "div" );
+
+ if ( !div.style ) {
+ return;
+ }
+
+ // Support: IE9-11+
+ // Style of cloned element affects source element cloned (#8908)
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
+ "position:absolute";
+ container.appendChild( div );
+
+ // Executing both pixelPosition & boxSizingReliable tests require only one layout
+ // so they're executed at the same time to save the second computation.
+ function computePixelPositionAndBoxSizingReliable() {
+ div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
+ "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
+ "border:1px;padding:1px;width:4px;position:absolute";
+ div.innerHTML = "";
+ docElem.appendChild( container );
+
+ var divStyle = window.getComputedStyle( div, null );
+ pixelPositionVal = divStyle.top !== "1%";
+ boxSizingReliableVal = divStyle.width === "4px";
+
+ docElem.removeChild( container );
+ }
+
+ // Support: node.js jsdom
+ // Don't assume that getComputedStyle is a property of the global object
+ if ( window.getComputedStyle ) {
+ jQuery.extend( support, {
+ pixelPosition: function() {
+
+ // This test is executed only once but we still do memoizing
+ // since we can use the boxSizingReliable pre-computing.
+ // No need to check if the test was already performed, though.
+ computePixelPositionAndBoxSizingReliable();
+ return pixelPositionVal;
+ },
+ boxSizingReliable: function() {
+ if ( boxSizingReliableVal == null ) {
+ computePixelPositionAndBoxSizingReliable();
+ }
+ return boxSizingReliableVal;
+ },
+ reliableMarginRight: function() {
+
+ // Support: Android 2.3
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // This support function is only executed once so no memoizing is needed.
+ var ret,
+ marginDiv = div.appendChild( document.createElement( "div" ) );
+
+ // Reset CSS: box-sizing; display; margin; border; padding
+ marginDiv.style.cssText = div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+ "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+ docElem.appendChild( container );
+
+ ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
+
+ docElem.removeChild( container );
+ div.removeChild( marginDiv );
+
+ return ret;
+ }
+ });
+ }
+})();
+
+return support;
+
+});
--- /dev/null
+define([
+ "../core"
+], function( jQuery ) {
+
+// A method for quickly swapping in/out CSS properties to get correct calculations.
+jQuery.swap = function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+};
+
+return jQuery.swap;
+
+});
--- /dev/null
+define(function() {
+ return [ "Top", "Right", "Bottom", "Left" ];
+});
--- /dev/null
+define(function() {
+ return function( elem ) {
+ // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
+ // IE throws on elements created in popups
+ // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
+ if ( elem.ownerDocument.defaultView.opener ) {
+ return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
+ }
+
+ return window.getComputedStyle( elem, null );
+ };
+});
--- /dev/null
+define([
+ "../../core",
+ "../../selector"
+ // css is assumed
+], function( jQuery ) {
+
+ return function( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+ };
+});
--- /dev/null
+define(function() {
+ return (/^margin/);
+});
--- /dev/null
+define([
+ "../../var/pnum"
+], function( pnum ) {
+ return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
+});
--- /dev/null
+define([
+ "./core",
+ "./var/rnotwhite",
+ "./core/access",
+ "./data/var/data_priv",
+ "./data/var/data_user"
+], function( jQuery, rnotwhite, access, data_priv, data_user ) {
+
+// Implementation Summary
+//
+// 1. Enforce API surface and semantic compatibility with 1.9.x branch
+// 2. Improve the module's maintainability by reducing the storage
+// paths to a single mechanism.
+// 3. Use the same single mechanism to support "private" and "user" data.
+// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+// 5. Avoid exposing implementation details on user objects (eg. expando properties)
+// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ data_user.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+
+jQuery.extend({
+ hasData: function( elem ) {
+ return data_user.hasData( elem ) || data_priv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return data_user.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ data_user.remove( elem, name );
+ },
+
+ // TODO: Now that all calls to _data and _removeData have been replaced
+ // with direct calls to data_priv methods, these can be deprecated.
+ _data: function( elem, name, data ) {
+ return data_priv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ data_priv.remove( elem, name );
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[ 0 ],
+ attrs = elem && elem.attributes;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = data_user.get( elem );
+
+ if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE11+
+ // The attrs elements can be null (#14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice(5) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ data_priv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ data_user.set( this, key );
+ });
+ }
+
+ return access( this, function( value ) {
+ var data,
+ camelKey = jQuery.camelCase( key );
+
+ // The calling jQuery object (element matches) is not empty
+ // (and therefore has an element appears at this[ 0 ]) and the
+ // `value` parameter was not undefined. An empty jQuery object
+ // will result in `undefined` for elem = this[ 0 ] which will
+ // throw an exception if an attempt to read a data cache is made.
+ if ( elem && value === undefined ) {
+ // Attempt to get data from the cache
+ // with the key as-is
+ data = data_user.get( elem, key );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to get data from the cache
+ // with the key camelized
+ data = data_user.get( elem, camelKey );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, camelKey, undefined );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return;
+ }
+
+ // Set the data...
+ this.each(function() {
+ // First, attempt to store a copy or reference of any
+ // data that might've been store with a camelCased key.
+ var data = data_user.get( this, camelKey );
+
+ // For HTML5 data-* attribute interop, we have to
+ // store property names with dashes in a camelCase form.
+ // This might not apply to all properties...*
+ data_user.set( this, camelKey, value );
+
+ // *... In the case of properties that might _actually_
+ // have dashes, we need to also store a copy of that
+ // unchanged property.
+ if ( key.indexOf("-") !== -1 && data !== undefined ) {
+ data_user.set( this, key, value );
+ }
+ });
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ data_user.remove( this, key );
+ });
+ }
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "../core",
+ "../var/rnotwhite",
+ "./accepts"
+], function( jQuery, rnotwhite ) {
+
+function Data() {
+ // Support: Android<4,
+ // Old WebKit does not have Object.preventExtensions/freeze method,
+ // return new empty object instead with no [[set]] accessor
+ Object.defineProperty( this.cache = {}, 0, {
+ get: function() {
+ return {};
+ }
+ });
+
+ this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+Data.accepts = jQuery.acceptData;
+
+Data.prototype = {
+ key: function( owner ) {
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return the key for a frozen object.
+ if ( !Data.accepts( owner ) ) {
+ return 0;
+ }
+
+ var descriptor = {},
+ // Check if the owner object already has a cache key
+ unlock = owner[ this.expando ];
+
+ // If not, create one
+ if ( !unlock ) {
+ unlock = Data.uid++;
+
+ // Secure it in a non-enumerable, non-writable property
+ try {
+ descriptor[ this.expando ] = { value: unlock };
+ Object.defineProperties( owner, descriptor );
+
+ // Support: Android<4
+ // Fallback to a less secure definition
+ } catch ( e ) {
+ descriptor[ this.expando ] = unlock;
+ jQuery.extend( owner, descriptor );
+ }
+ }
+
+ // Ensure the cache object
+ if ( !this.cache[ unlock ] ) {
+ this.cache[ unlock ] = {};
+ }
+
+ return unlock;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ // There may be an unlock assigned to this node,
+ // if there is no entry for this "owner", create one inline
+ // and set the unlock as though an owner entry had always existed
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ // Handle: [ owner, key, value ] args
+ if ( typeof data === "string" ) {
+ cache[ data ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+ // Fresh assignments by object are shallow copied
+ if ( jQuery.isEmptyObject( cache ) ) {
+ jQuery.extend( this.cache[ unlock ], data );
+ // Otherwise, copy the properties one-by-one to the cache object
+ } else {
+ for ( prop in data ) {
+ cache[ prop ] = data[ prop ];
+ }
+ }
+ }
+ return cache;
+ },
+ get: function( owner, key ) {
+ // Either a valid cache is found, or will be created.
+ // New caches will be created and the unlock returned,
+ // allowing direct access to the newly created
+ // empty data object. A valid owner object must be provided.
+ var cache = this.cache[ this.key( owner ) ];
+
+ return key === undefined ?
+ cache : cache[ key ];
+ },
+ access: function( owner, key, value ) {
+ var stored;
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ((key && typeof key === "string") && value === undefined) ) {
+
+ stored = this.get( owner, key );
+
+ return stored !== undefined ?
+ stored : this.get( owner, jQuery.camelCase(key) );
+ }
+
+ // [*]When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i, name, camel,
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ if ( key === undefined ) {
+ this.cache[ unlock ] = {};
+
+ } else {
+ // Support array or space separated string of keys
+ if ( jQuery.isArray( key ) ) {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = key.concat( key.map( jQuery.camelCase ) );
+ } else {
+ camel = jQuery.camelCase( key );
+ // Try the string as a key before any manipulation
+ if ( key in cache ) {
+ name = [ key, camel ];
+ } else {
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ name = camel;
+ name = name in cache ?
+ [ name ] : ( name.match( rnotwhite ) || [] );
+ }
+ }
+
+ i = name.length;
+ while ( i-- ) {
+ delete cache[ name[ i ] ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ return !jQuery.isEmptyObject(
+ this.cache[ owner[ this.expando ] ] || {}
+ );
+ },
+ discard: function( owner ) {
+ if ( owner[ this.expando ] ) {
+ delete this.cache[ owner[ this.expando ] ];
+ }
+ }
+};
+
+return Data;
+});
--- /dev/null
+define([
+ "../core"
+], function( jQuery ) {
+
+/**
+ * Determines whether an object can have data
+ */
+jQuery.acceptData = function( owner ) {
+ // Accepts only:
+ // - Node
+ // - Node.ELEMENT_NODE
+ // - Node.DOCUMENT_NODE
+ // - Object
+ // - Any
+ /* jshint -W018 */
+ return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
+};
+
+return jQuery.acceptData;
+});
--- /dev/null
+define([
+ "../Data"
+], function( Data ) {
+ return new Data();
+});
--- /dev/null
+define([
+ "../Data"
+], function( Data ) {
+ return new Data();
+});
--- /dev/null
+define([
+ "./core",
+ "./var/slice",
+ "./callbacks"
+], function( jQuery, slice ) {
+
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // Add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // If we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "./core",
+ "./traversing"
+], function( jQuery ) {
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+ return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+});
--- /dev/null
+define([
+ "./core",
+ "./core/access",
+ "./css"
+], function( jQuery, access ) {
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // Margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+ // whichever is greatest
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "./core",
+ "./var/pnum",
+ "./css/var/cssExpand",
+ "./css/var/isHidden",
+ "./css/defaultDisplay",
+ "./data/var/data_priv",
+
+ "./core/init",
+ "./effects/Tween",
+ "./queue",
+ "./css",
+ "./deferred",
+ "./traversing"
+], function( jQuery, pnum, cssExpand, isHidden, defaultDisplay, data_priv ) {
+
+var
+ fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [ function( prop, value ) {
+ var tween = this.createTween( prop, value ),
+ target = tween.cur(),
+ parts = rfxnum.exec( value ),
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+ scale = 1,
+ maxIterations = 20;
+
+ if ( start && start[ 3 ] !== unit ) {
+ // Trust units reported by jQuery.css
+ unit = unit || start[ 3 ];
+
+ // Make sure we update the tween properties later on
+ parts = parts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ start = +target || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*.
+ // Use string for doubling so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur(),
+ // break the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ // Update tween properties
+ if ( parts ) {
+ start = tween.start = +start || +target || 0;
+ tween.unit = unit;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[ 1 ] ?
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+ +parts[ 2 ];
+ }
+
+ return tween;
+ } ]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ i = 0,
+ attrs = { height: type };
+
+ // If we include width, step value is 1 to do all cssExpand values,
+ // otherwise step value is 2 to skip over Left and Right
+ includeWidth = includeWidth ? 1 : 0;
+ for ( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+ // We're done with this property
+ return tween;
+ }
+ }
+}
+
+function defaultPrefilter( elem, props, opts ) {
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
+ anim = this,
+ orig = {},
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = data_priv.get( elem, "fxshow" );
+
+ // Handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // Ensure the complete handler is called before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // Height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE9-10 do not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ display = jQuery.css( elem, "display" );
+
+ // Test default display if display is currently "none"
+ checkDisplay = display === "none" ?
+ data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+
+ if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
+ style.display = "inline-block";
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+
+ // show/hide pass
+ for ( prop in props ) {
+ value = props[ prop ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ prop ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+
+ // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+ hidden = true;
+ } else {
+ continue;
+ }
+ }
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+
+ // Any non-fx value stops us from restoring the original display value
+ } else {
+ display = undefined;
+ }
+ }
+
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = data_priv.access( elem, "fxshow", {} );
+ }
+
+ // Store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+
+ data_priv.remove( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+
+ // If this is a noop like .hide().hide(), restore an overwritten display value
+ } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
+ style.display = display;
+ }
+}
+
+function propFilter( props, specialEasing ) {
+ var index, name, easing, value, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // Not quite $.extend, this won't overwrite existing keys.
+ // Reusing 'index' because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // Don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // Support: Android 2.3
+ // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // If we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // Resolve when we played the last frame; otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ jQuery.map( props, createTween, animation );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // Normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // Show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // Animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+ // Empty animations, or finishing resolves immediately
+ if ( empty || data_priv.get( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = data_priv.get( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Start the next in the queue if the last step wasn't forced.
+ // Timers currently will call their complete callbacks, which
+ // will dequeue but only if they were gotoEnd.
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = data_priv.get( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // Enable finishing flag on private data
+ data.finish = true;
+
+ // Empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
+ }
+
+ // Look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // Turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+ var timer,
+ i = 0,
+ timers = jQuery.timers;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ jQuery.timers.push( timer );
+ if ( timer() ) {
+ jQuery.fx.start();
+ } else {
+ jQuery.timers.pop();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+return jQuery;
+});
--- /dev/null
+define([
+ "../core",
+ "../css"
+], function( jQuery ) {
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // Passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails.
+ // Simple values such as "10px" are parsed to Float;
+ // complex values such as "rotate(1rad)" are returned as-is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // Use step hook for back compat.
+ // Use cssHook if its there.
+ // Use .style if available and use plain properties where available.
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Support: IE9
+// Panic based approach to setting things on disconnected nodes
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p * Math.PI ) / 2;
+ }
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+});
--- /dev/null
+define([
+ "../core",
+ "../selector",
+ "../effects"
+], function( jQuery ) {
+
+jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+};
+
+});
--- /dev/null
+define([
+ "./core",
+ "./var/strundefined",
+ "./var/rnotwhite",
+ "./var/hasOwn",
+ "./var/slice",
+ "./event/support",
+ "./data/var/data_priv",
+
+ "./core/init",
+ "./data/accepts",
+ "./selector"
+], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, data_priv ) {
+
+var
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.get( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?
+ jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+ };
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.hasData( elem ) && data_priv.get( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+ data_priv.remove( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+
+ var i, cur, tmp, bubbleType, ontype, handle, special,
+ eventPath = [ elem || document ],
+ type = hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
+ event.result = handle.apply( cur, data );
+ if ( event.result === false ) {
+ event.preventDefault();
+ }
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+ jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, j, ret, matched, handleObj,
+ handlerQueue = [],
+ args = slice.call( arguments ),
+ handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or 2) have namespace(s)
+ // a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, matches, sel, handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: Cordova 2.5 (WebKit) (#13255)
+ // All events should have a target; Cordova deviceready doesn't
+ if ( !event.target ) {
+ event.target = document;
+ }
+
+ // Support: Safari 6.0+, Chrome<28
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ this.focus();
+ return false;
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+ // Support: Android<4.0
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e && e.preventDefault ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e && e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e && e.stopImmediatePropagation ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// Support: Chrome 15+
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// Support: Firefox, Chrome, Safari
+// Create "bubbling" focus and blur events
+if ( !support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler on the document while someone wants focusin/focusout
+ var handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ var doc = this.ownerDocument || this,
+ attaches = data_priv.access( doc, fix );
+
+ if ( !attaches ) {
+ doc.addEventListener( orig, handler, true );
+ }
+ data_priv.access( doc, fix, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this,
+ attaches = data_priv.access( doc, fix ) - 1;
+
+ if ( !attaches ) {
+ doc.removeEventListener( orig, handler, true );
+ data_priv.remove( doc, fix );
+
+ } else {
+ data_priv.access( doc, fix, attaches );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "../core",
+ "../event"
+], function( jQuery ) {
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
+ jQuery.fn[ type ] = function( fn ) {
+ return this.on( type, fn );
+ };
+});
+
+});
--- /dev/null
+define([
+ "../core",
+ "../event"
+], function( jQuery ) {
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.extend({
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ }
+});
+
+});
--- /dev/null
+define([
+ "../var/support"
+], function( support ) {
+
+support.focusinBubbles = "onfocusin" in window;
+
+return support;
+
+});
--- /dev/null
+define([
+ "../core"
+], function( jQuery ) {
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function() {
+ return jQuery;
+ });
+}
+
+});
--- /dev/null
+define([
+ "../core",
+ "../var/strundefined"
+], function( jQuery, strundefined ) {
+
+var
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in AMD
+// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( typeof noGlobal === strundefined ) {
+ window.jQuery = window.$ = jQuery;
+}
+
+});
--- /dev/null
+/*!
+ * jQuery JavaScript Library v@VERSION
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: @DATE
+ */
+
+(function( global, factory ) {
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get jQuery.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket #14549 for more info.
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Support: Firefox 18+
+// Can't be in strict mode, several libs including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+//"use strict";
--- /dev/null
+define([
+ "./core",
+ "./selector",
+ "./traversing",
+ "./callbacks",
+ "./deferred",
+ "./core/ready",
+ "./data",
+ "./queue",
+ "./queue/delay",
+ "./attributes",
+ "./event",
+ "./event/alias",
+ "./manipulation",
+ "./manipulation/_evalUrl",
+ "./wrap",
+ "./css",
+ "./css/hiddenVisibleSelectors",
+ "./serialize",
+ "./ajax",
+ "./ajax/xhr",
+ "./ajax/script",
+ "./ajax/jsonp",
+ "./ajax/load",
+ "./event/ajax",
+ "./effects",
+ "./effects/animatedSelector",
+ "./offset",
+ "./dimensions",
+ "./deprecated",
+ "./exports/amd",
+ "./exports/global"
+], function( jQuery ) {
+
+return jQuery;
+
+});
--- /dev/null
+define([
+ "./core",
+ "./var/concat",
+ "./var/push",
+ "./core/access",
+ "./manipulation/var/rcheckableType",
+ "./manipulation/support",
+ "./data/var/data_priv",
+ "./data/var/data_user",
+
+ "./core/init",
+ "./data/accepts",
+ "./traversing",
+ "./selector",
+ "./event"
+], function( jQuery, concat, push, access, rcheckableType, support, data_priv, data_user ) {
+
+var
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+
+ // Support: IE9
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+ thead: [ 1, "<table>", "</table>" ],
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ _default: [ 0, "", "" ]
+ };
+
+// Support: IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// Support: 1.x compatibility
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+ elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+
+ if ( match ) {
+ elem.type = match[ 1 ];
+ } else {
+ elem.removeAttribute("type");
+ }
+
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ data_priv.set(
+ elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+ var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // 1. Copy private data: events, handlers, etc.
+ if ( data_priv.hasData( src ) ) {
+ pdataOld = data_priv.access( src );
+ pdataCur = data_priv.set( dest, pdataOld );
+ events = pdataOld.events;
+
+ if ( events ) {
+ delete pdataCur.handle;
+ pdataCur.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+ }
+
+ // 2. Copy user data
+ if ( data_user.hasData( src ) ) {
+ udataOld = data_user.access( src );
+ udataCur = jQuery.extend( {}, udataOld );
+
+ data_user.set( dest, udataCur );
+ }
+}
+
+function getAll( context, tag ) {
+ var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
+ context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+// Fix IE bugs, see support tests
+function fixInput( src, dest ) {
+ var nodeName = dest.nodeName.toLowerCase();
+
+ // Fails to persist the checked state of a cloned checkbox or radio button.
+ if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ dest.checked = src.checked;
+
+ // Fails to return the selected option to the default selected state when cloning options
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var i, l, srcElements, destElements,
+ clone = elem.cloneNode( true ),
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ // Fix IE cloning issues
+ if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
+ !jQuery.isXMLDoc( elem ) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ fixInput( srcElements[ i ], destElements[ i ] );
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var elem, tmp, tag, wrap, contains, j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ // Support: QtWebKit, PhantomJS
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: QtWebKit, PhantomJS
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Ensure the created nodes are orphaned (#12392)
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+ },
+
+ cleanData: function( elems ) {
+ var data, elem, type, key,
+ special = jQuery.event.special,
+ i = 0;
+
+ for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
+ if ( jQuery.acceptData( elem ) ) {
+ key = elem[ data_priv.expando ];
+
+ if ( key && (data = data_priv.cache[ key ]) ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+ if ( data_priv.cache[ key ] ) {
+ // Discard any remaining `private` data
+ delete data_priv.cache[ key ];
+ }
+ }
+ }
+ // Discard any remaining `user` data
+ delete data_user.cache[ elem[ data_user.expando ] ];
+ }
+ }
+});
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().each(function() {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.textContent = value;
+ }
+ });
+ }, null, value, arguments.length );
+ },
+
+ append: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ remove: function( selector, keepData /* Internal Use Only */ ) {
+ var elem,
+ elems = selector ? jQuery.filter( selector, this ) : this,
+ i = 0;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( elem.nodeType === 1 ) {
+
+ // Prevent memory leaks
+ jQuery.cleanData( getAll( elem, false ) );
+
+ // Remove any remaining nodes
+ elem.textContent = "";
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map(function() {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined && elem.nodeType === 1 ) {
+ return elem.innerHTML;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for ( ; i < l; i++ ) {
+ elem = this[ i ] || {};
+
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch( e ) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function() {
+ var arg = arguments[ 0 ];
+
+ // Make the changes, replacing each context element with the new content
+ this.domManip( arguments, function( elem ) {
+ arg = this.parentNode;
+
+ jQuery.cleanData( getAll( this ) );
+
+ if ( arg ) {
+ arg.replaceChild( elem, this );
+ }
+ });
+
+ // Force removal if there was no new content (e.g., from empty arguments)
+ return arg && (arg.length || arg.nodeType) ? this : this.remove();
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, callback ) {
+
+ // Flatten any nested arrays
+ args = concat.apply( [], args );
+
+ var fragment, first, scripts, hasScripts, node, doc,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[ 0 ],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction ||
+ ( l > 1 && typeof value === "string" &&
+ !support.checkClone && rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[ 0 ] = value.call( this, index, self.html() );
+ }
+ self.domManip( args, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ // Support: QtWebKit
+ // jQuery.merge because push.apply(_, arraylike) throws
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call( this[ i ], node, i );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Optional AJAX dependency, but won't run scripts if not present
+ if ( jQuery._evalUrl ) {
+ jQuery._evalUrl( node.src );
+ }
+ } else {
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return this;
+ }
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1,
+ i = 0;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone( true );
+ jQuery( insert[ i ] )[ original ]( elems );
+
+ // Support: QtWebKit
+ // .get() because push.apply(_, arraylike) throws
+ push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "../ajax"
+], function( jQuery ) {
+
+jQuery._evalUrl = function( url ) {
+ return jQuery.ajax({
+ url: url,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+};
+
+return jQuery._evalUrl;
+
+});
--- /dev/null
+define([
+ "../var/support"
+], function( support ) {
+
+(function() {
+ var fragment = document.createDocumentFragment(),
+ div = fragment.appendChild( document.createElement( "div" ) ),
+ input = document.createElement( "input" );
+
+ // Support: Safari<=5.1
+ // Check state lost if the name is set (#11217)
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (#14901)
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+
+ // Support: Safari<=5.1, Android<4.2
+ // Older WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<=11+
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ div.innerHTML = "<textarea>x</textarea>";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+})();
+
+return support;
+
+});
--- /dev/null
+define(function() {
+ return (/^(?:checkbox|radio)$/i);
+});
--- /dev/null
+define([
+ "./core",
+ "./var/strundefined",
+ "./core/access",
+ "./css/var/rnumnonpx",
+ "./css/curCSS",
+ "./css/addGetHookIf",
+ "./css/support",
+
+ "./core/init",
+ "./css",
+ "./selector" // contains
+], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {
+
+var docElem = window.document.documentElement;
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
+}
+
+jQuery.offset = {
+ setOffset: function( elem, options, i ) {
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+ position = jQuery.css( elem, "position" ),
+ curElem = jQuery( elem ),
+ props = {};
+
+ // Set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ curOffset = curElem.offset();
+ curCSSTop = jQuery.css( elem, "top" );
+ curCSSLeft = jQuery.css( elem, "left" );
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+ ( curCSSTop + curCSSLeft ).indexOf("auto") > -1;
+
+ // Need to be able to calculate position if either
+ // top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+jQuery.fn.extend({
+ offset: function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ elem = this[ 0 ],
+ box = { top: 0, left: 0 },
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // Support: BlackBerry 5, iOS 3 (original iPhone)
+ // If we don't have gBCR, just use 0,0 rather than error
+ if ( typeof elem.getBoundingClientRect !== strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + win.pageYOffset - docElem.clientTop,
+ left: box.left + win.pageXOffset - docElem.clientLeft
+ };
+ },
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ elem = this[ 0 ],
+ parentOffset = { top: 0, left: 0 };
+
+ // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // Assume getBoundingClientRect is there when computed position is fixed
+ offset = elem.getBoundingClientRect();
+
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || docElem;
+
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+
+ return offsetParent || docElem;
+ });
+ }
+});
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+ var top = "pageYOffset" === prop;
+
+ jQuery.fn[ method ] = function( val ) {
+ return access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? win[ prop ] : elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : window.pageXOffset,
+ top ? val : window.pageYOffset
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+// Support: Safari<7+, Chrome<37+
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
+// getComputedStyle returns percent when specified for top/left/bottom/right;
+// rather than make the css module depend on the offset module, just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+ function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // If curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ );
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "./core",
+ "./data/var/data_priv",
+ "./deferred",
+ "./callbacks"
+], function( jQuery, data_priv ) {
+
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = data_priv.get( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray( data ) ) {
+ queue = data_priv.access( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // Clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // Not public - generate a queueHooks object, or return the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return data_priv.get( elem, key ) || data_priv.access( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ data_priv.remove( elem, [ type + "queue", key ] );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // Ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = data_priv.get( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "../core",
+ "../queue",
+ "../effects" // Delay is optional because of this dependency
+], function( jQuery ) {
+
+// Based off of the plugin by Clint Helfers, with permission.
+// http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+};
+
+return jQuery.fn.delay;
+});
--- /dev/null
+define([
+ "./core"
+], function( jQuery ) {
+
+/*
+ * Optional (non-Sizzle) selector module for custom builds.
+ *
+ * Note that this DOES NOT SUPPORT many documented jQuery
+ * features in exchange for its smaller size:
+ *
+ * Attribute not equal selector
+ * Positional selectors (:first; :eq(n); :odd; etc.)
+ * Type selectors (:input; :checkbox; :button; etc.)
+ * State-based selectors (:animated; :visible; :hidden; etc.)
+ * :has(selector)
+ * :not(complex selector)
+ * custom selectors via Sizzle extensions
+ * Leading combinators (e.g., $collection.find("> *"))
+ * Reliable functionality on XML fragments
+ * Requiring all parts of a selector to match elements under context
+ * (e.g., $div.find("div > *") now matches children of $div)
+ * Matching against non-elements
+ * Reliable sorting of disconnected nodes
+ * querySelectorAll bug fixes (e.g., unreliable :focus on WebKit)
+ *
+ * If any of these are unacceptable tradeoffs, either use Sizzle or
+ * customize this stub for the project's specific needs.
+ */
+
+var docElem = window.document.documentElement,
+ selector_hasDuplicate,
+ matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector,
+ selector_sortOrder = function( a, b ) {
+ // Flag for duplicate removal
+ if ( a === b ) {
+ selector_hasDuplicate = true;
+ return 0;
+ }
+
+ var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+ if ( compare ) {
+ // Disconnected nodes
+ if ( compare & 1 ) {
+
+ // Choose the first element that is related to our document
+ if ( a === document || jQuery.contains(document, a) ) {
+ return -1;
+ }
+ if ( b === document || jQuery.contains(document, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ }
+
+ // Not directly comparable, sort on existence of method
+ return a.compareDocumentPosition ? -1 : 1;
+ };
+
+jQuery.extend({
+ find: function( selector, context, results, seed ) {
+ var elem, nodeType,
+ i = 0;
+
+ results = results || [];
+ context = context || document;
+
+ // Same basic safeguard as Sizzle
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ // Early return if context is not an element or document
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( seed ) {
+ while ( (elem = seed[i++]) ) {
+ if ( jQuery.find.matchesSelector(elem, selector) ) {
+ results.push( elem );
+ }
+ }
+ } else {
+ jQuery.merge( results, context.querySelectorAll(selector) );
+ }
+
+ return results;
+ },
+ unique: function( results ) {
+ var elem,
+ duplicates = [],
+ i = 0,
+ j = 0;
+
+ selector_hasDuplicate = false;
+ results.sort( selector_sortOrder );
+
+ if ( selector_hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ return results;
+ },
+ text: function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += jQuery.text( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ return elem.textContent;
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+ },
+ contains: function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && adown.contains(bup) );
+ },
+ isXMLDoc: function( elem ) {
+ return (elem.ownerDocument || elem).documentElement.nodeName !== "HTML";
+ },
+ expr: {
+ attrHandle: {},
+ match: {
+ bool: /^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,
+ needsContext: /^[\x20\t\r\n\f]*[>+~]/
+ }
+ }
+});
+
+jQuery.extend( jQuery.find, {
+ matches: function( expr, elements ) {
+ return jQuery.find( expr, null, null, elements );
+ },
+ matchesSelector: function( elem, expr ) {
+ return matches.call( elem, expr );
+ },
+ attr: function( elem, name ) {
+ return elem.getAttribute( name );
+ }
+});
+
+});
--- /dev/null
+define([
+ "./core",
+ "sizzle"
+], function( jQuery, Sizzle ) {
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+});
--- /dev/null
+define([ "./selector-sizzle" ]);
--- /dev/null
+define([
+ "./core",
+ "./manipulation/var/rcheckableType",
+ "./core/init",
+ "./traversing", // filter
+ "./attributes/prop"
+], function( jQuery, rcheckableType ) {
+
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function() {
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function() {
+ var type = this.type;
+
+ // Use .is( ":disabled" ) so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ) {
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ) {
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+return jQuery;
+});
--- /dev/null
+/*!
+ * Sizzle CSS Selector Engine v2.2.0-pre
+ * http://sizzlejs.com/
+ *
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-16
+ */
+(function( window ) {
+
+var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + 1 * new Date(),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf as it's faster than native
+ // http://jsperf.com/thor-indexof-vs-for/5
+ indexOf = function( list, elem ) {
+ var i = 0,
+ len = list.length;
+ for ( ; i < len; i++ ) {
+ if ( list[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
+
+ pseudos = ":(" + characterEncoding + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ high < 0 ?
+ // BMP codepoint
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes
+ // See setDocument()
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE
+ unloadHandler = function() {
+ setDocument();
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+ nodeType = context.nodeType;
+
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+ return results;
+ }
+
+ if ( !seed && documentIsHTML ) {
+
+ // Try to shortcut find operations when possible (e.g., not under DocumentFragment)
+ if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document (jQuery #6963)
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType !== 1 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var hasCompare, parent,
+ doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+ parent = doc.defaultView;
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent !== parent.top ) {
+ // IE11 does not have attachEvent, so all must suffer
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", unloadHandler, false );
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", unloadHandler );
+ }
+ }
+
+ /* Support tests
+ ---------------------------------------------------------------------- */
+ documentIsHTML = !isXML( doc );
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties
+ // (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Support: IE<9
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [ m ] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
+
+ // DocumentFragment nodes don't have gEBTN
+ } else if ( support.qsa ) {
+ return context.querySelectorAll( tag );
+ }
+ } :
+
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
+ "<select id='" + expando + "-\f]' msallowcapture=''>" +
+ "<option selected=''></option></select>";
+
+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
+ if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push("~=");
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+
+ // Support: Safari 8+, iOS 8+
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibing-combinator selector` fails
+ if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push(".#.+[+~]");
+ }
+ });
+
+ assert(function( div ) {
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = hasCompare || rnative.test( docElem.contains ) ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = hasCompare ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ } :
+ function( a, b ) {
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Parentless nodes are either documents or disconnected
+ if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch (e) {}
+ }
+
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (jQuery #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[6] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ // Don't keep the element (issue #299)
+ input[0] = null;
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ text = text.replace( runescape, funescape );
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( (tokens = []) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (oldCache = outerCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
+ } else {
+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ // Avoid hanging onto element (issue #299)
+ checkContext = null;
+ return ret;
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is no seed and only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
+// EXPOSE
+if ( typeof define === "function" && define.amd ) {
+ define(function() { return Sizzle; });
+// Sizzle requires that there be a global window in Common-JS like environments
+} else if ( typeof module !== "undefined" && module.exports ) {
+ module.exports = Sizzle;
+} else {
+ window.Sizzle = Sizzle;
+}
+// EXPOSE
+
+})( window );
--- /dev/null
+/*! Sizzle v2.2.0-pre | (c) 2008, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),"function"==typeof define&&define.amd?define(function(){return gb}):"undefined"!=typeof module&&module.exports?module.exports=gb:a.Sizzle=gb}(window);
+//# sourceMappingURL=sizzle.min.map
\ No newline at end of file
--- /dev/null
+{"version":3,"file":"sizzle.min.js","sources":["sizzle.js"],"names":["window","i","support","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","document","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","matches","contains","expando","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","MAX_NEGATIVE","hasOwn","hasOwnProperty","arr","pop","push_native","push","slice","indexOf","list","elem","len","length","booleans","whitespace","characterEncoding","identifier","replace","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","String","fromCharCode","unloadHandler","apply","call","childNodes","nodeType","e","target","els","j","Sizzle","selector","context","results","seed","match","m","groups","old","nid","newContext","newSelector","ownerDocument","exec","getElementById","parentNode","id","getElementsByTagName","getElementsByClassName","qsa","test","nodeName","toLowerCase","getAttribute","setAttribute","toSelector","testContext","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","value","cacheLength","shift","markFunction","fn","assert","div","createElement","removeChild","addHandle","attrs","handler","split","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","type","name","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","documentElement","node","hasCompare","parent","doc","defaultView","top","addEventListener","attachEvent","className","appendChild","createComment","getById","getElementsByName","find","filter","attrId","getAttributeNode","tag","tmp","innerHTML","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","ret","attr","val","undefined","specified","error","msg","Error","uniqueSort","duplicates","detectDuplicates","sortStable","sort","splice","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">","dir","first"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","last","simple","forward","ofType","xml","outerCache","nodeIndex","start","useCache","lastChild","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","text","innerText","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","eq","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","prototype","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","map","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","elems","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","concat","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","Math","random","token","compiled","div1","defaultValue","define","amd","module","exports"],"mappings":";CAUA,SAAWA,GAEX,GAAIC,GACHC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EAAU,SAAW,EAAI,GAAIC,MAC7BC,EAAetB,EAAOa,SACtBU,EAAU,EACVC,EAAO,EACPC,EAAaC,KACbC,EAAaD,KACbE,EAAgBF,KAChBG,EAAY,SAAUC,EAAGC,GAIxB,MAHKD,KAAMC,IACVpB,GAAe,GAET,GAIRqB,EAAe,GAAK,GAGpBC,KAAcC,eACdC,KACAC,EAAMD,EAAIC,IACVC,EAAcF,EAAIG,KAClBA,EAAOH,EAAIG,KACXC,EAAQJ,EAAII,MAGZC,EAAU,SAAUC,EAAMC,GAGzB,IAFA,GAAIzC,GAAI,EACP0C,EAAMF,EAAKG,OACAD,EAAJ1C,EAASA,IAChB,GAAKwC,EAAKxC,KAAOyC,EAChB,MAAOzC,EAGT,OAAO,IAGR4C,EAAW,6HAKXC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AAQuM,mBAAqB9L,EAG7BC,IAIAV,EAAQsL,aAAerD,GAAO,SAAUyM,GAEvC,MAAuE,GAAhEA,EAAKxJ,wBAAyBvK,EAASwH,cAAc,UAMvDF,GAAO,SAAUC,GAEtB,MADAA,GAAIwC,UAAY,mBAC+B,MAAxCxC,EAAI0E,WAAW3F,aAAa,WAEnCoB,GAAW,yBAA0B,SAAU7F,EAAMyG,EAAM9I,GAC1D,MAAMA,GAAN,OACQqC,EAAKyE,aAAcgC,EAA6B,SAAvBA,EAAKjC,cAA2B,EAAI,KAOjEhH,EAAQgD,YAAeiF,GAAO,SAAUC,GAG7C,MAFAA,GAAIwC,UAAY,WAChBxC,EAAI0E,WAAW1F,aAAc,QAAS,IACY,KAA3CgB,EAAI0E,WAAW3F,aAAc,YAEpCoB,GAAW,QAAS,SAAU7F,EAAMyG,EAAM9I,GACzC,MAAMA,IAAyC,UAAhCqC,EAAKuE,SAASC,cAA7B,OACQxE,EAAKmS,eAOT1M,GAAO,SAAUC,GACtB,MAAuC,OAAhCA,EAAIjB,aAAa,eAExBoB,GAAW1F,EAAU,SAAUH,EAAMyG,EAAM9I,GAC1C,GAAI4L,EACJ,OAAM5L,GAAN,OACQqC,EAAMyG,MAAW,EAAOA,EAAKjC,eACjC+E,EAAMvJ,EAAK+H,iBAAkBtB,KAAW8C,EAAIE,UAC7CF,EAAInE,MACL,OAMmB,kBAAXgN,SAAyBA,OAAOC,IAC3CD,OAAO,WAAa,MAAOlP,MAEE,mBAAXoP,SAA0BA,OAAOC,QACnDD,OAAOC,QAAUrP,GAEjB5F,EAAO4F,OAASA,IAIb5F"}
\ No newline at end of file
--- /dev/null
+define([
+ "./core",
+ "./var/indexOf",
+ "./traversing/var/rneedsContext",
+ "./core/init",
+ "./traversing/findFilter",
+ "./selector"
+], function( jQuery, indexOf, rneedsContext ) {
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ // Methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.extend({
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ truncate = until !== undefined;
+
+ while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {
+ if ( elem.nodeType === 1 ) {
+ if ( truncate && jQuery( elem ).is( until ) ) {
+ break;
+ }
+ matched.push( elem );
+ }
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var matched = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ matched.push( n );
+ }
+ }
+
+ return matched;
+ }
+});
+
+jQuery.fn.extend({
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter(function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+ },
+
+ // Determine the position of an element within the set
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // Index in selector
+ if ( typeof elem === "string" ) {
+ return indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.unique(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+function sibling( cur, dir ) {
+ while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.unique( matched );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+});
+
+return jQuery;
+});
--- /dev/null
+define([
+ "../core",
+ "../var/indexOf",
+ "./var/rneedsContext",
+ "../selector"
+], function( jQuery, indexOf, rneedsContext ) {
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ });
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ });
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( risSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;
+ });
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ }));
+};
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i,
+ len = this.length,
+ ret = [],
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], false) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], true) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+});
+
+});
--- /dev/null
+define([
+ "../../core",
+ "../../selector"
+], function( jQuery ) {
+ return jQuery.expr.match.needsContext;
+});
--- /dev/null
+define(function() {
+ return [];
+});
--- /dev/null
+define(function() {
+ // [[Class]] -> type pairs
+ return {};
+});
--- /dev/null
+define([
+ "./arr"
+], function( arr ) {
+ return arr.concat;
+});
--- /dev/null
+define([
+ "./class2type"
+], function( class2type ) {
+ return class2type.hasOwnProperty;
+});
--- /dev/null
+define([
+ "./arr"
+], function( arr ) {
+ return arr.indexOf;
+});
--- /dev/null
+define(function() {
+ return (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
+});
--- /dev/null
+define([
+ "./arr"
+], function( arr ) {
+ return arr.push;
+});
--- /dev/null
+define(function() {
+ return (/\S+/g);
+});
--- /dev/null
+define([
+ "./arr"
+], function( arr ) {
+ return arr.slice;
+});
--- /dev/null
+define(function() {
+ return typeof undefined;
+});
--- /dev/null
+define(function() {
+ // All support tests are defined in their respective modules.
+ return {};
+});
--- /dev/null
+define([
+ "./class2type"
+], function( class2type ) {
+ return class2type.toString;
+});
--- /dev/null
+define([
+ "./core",
+ "./core/init",
+ "./manipulation", // clone
+ "./traversing" // parent, contents
+], function( jQuery ) {
+
+jQuery.fn.extend({
+ wrapAll: function( html ) {
+ var wrap;
+
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[ 0 ] ) {
+
+ // The elements to wrap the target around
+ wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+ if ( this[ 0 ].parentNode ) {
+ wrap.insertBefore( this[ 0 ] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstElementChild ) {
+ elem = elem.firstElementChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ }
+});
+
+return jQuery;
+});
--- /dev/null
+/*global module */
+
+var browsers = require('./test/browser/sauce-browsers.json');
+
+module.exports = function(grunt) {
+ 'use strict';
+
+ // Load grunt dependencies
+ require('load-grunt-tasks')(grunt);
+
+ var browserTests = grunt.file.expand([
+ 'test/universal/**/*.js',
+ 'test/browser/**/*.js',
+ '!test/browser/setup.js',
+ '!test/browser/integration/*.js'
+ ]);
+
+ grunt.initConfig({
+ env: {
+ nodeTests: [
+ 'test/universal/**/*.js',
+ 'test/node/**/*.js'
+ ],
+ browserTests: browserTests,
+ coverage: {
+ APP_DIR_FOR_CODE_COVERAGE: 'test/coverage/instrument',
+ urls: [
+ 'http://localhost:9999/test/unit.html',
+ 'http://localhost:9999/test/index.html'
+ ]
+ }
+ },
+ generate: {
+ dest: './dist/modernizr-build.js'
+ },
+ copy: {
+ 'gh-pages': {
+ files: [
+ {
+ expand: true,
+ src: [
+ './**/*',
+ '!./test/coverage/**',
+ '!./node_modules/*grunt-*/**',
+ '!./node_modules/**/node_modules/**'
+ ],
+ dest: 'gh-pages'
+ }
+ ]
+ }
+ },
+ jscs: {
+ src: [
+ 'Gruntfile.js',
+ 'src/*.js',
+ 'lib/*.js',
+ 'test/**/*.js',
+ 'feature-detects/**/*.js',
+ '!src/html5printshiv.js',
+ '!test/coverage/**/*.js',
+ '!test/js/lib/**/*.js',
+ '!src/html5shiv.js'
+ ]
+ },
+ jshint: {
+ options: {
+ jshintrc: true,
+ ignores: [
+ 'src/html5printshiv.js',
+ 'src/html5shiv.js'
+ ]
+ },
+ files: [
+ 'Gruntfile.js',
+ 'src/*.js',
+ 'lib/*.js',
+ 'feature-detects/**/*.js'
+ ],
+ tests: {
+ options: {
+ jshintrc: true
+ },
+ files: {
+ src: [
+ '<%= env.nodeTests%>',
+ '<%= env.browserTests %>',
+ 'test/browser/setup.js',
+ 'test/browser/integration/*.js'
+ ]
+ }
+ }
+ },
+ clean: {
+ dist: [
+ 'dist',
+ 'test/coverage',
+ 'test/*.html',
+ 'gh-pages'
+ ]
+ },
+ jade: {
+ compile: {
+ options: {
+ data: {
+ unitTests: browserTests,
+ integrationTests: grunt.file.expand(['test/browser/integration/*.js'])
+ }
+ },
+ files: {
+ 'test/unit.html': 'test/browser/unit.jade',
+ 'test/iframe.html': 'test/browser/iframe.jade',
+ 'test/index.html': 'test/browser/integration.jade'
+ }
+ }
+ },
+ connect: {
+ server: {
+ options: {
+ middleware: function(connect, options) {
+ return [
+ function(req, res, next) {
+ // catchall middleware used in testing
+ var ua = req.headers['user-agent'];
+
+ // record code coverage results from browsers
+ if (req.url == '/coverage/client' && req.method == 'POST') {
+ var name = encodeURI(ua.replace(/\//g, '-'));
+ var body = '';
+
+ req.on('data', function(data) {
+ body = body + data;
+ });
+
+ req.on('end', function() {
+ grunt.file.write('test/coverage/reports/' + name + '.json', body);
+ res.end();
+ });
+
+ return;
+ }
+
+ // redirect requests form the `require`d components to their instrumented versions
+ if (req.url.match(/^\/(src|lib)\//)) {
+ req.url = '/test/coverage/instrument' + req.url;
+ }
+
+ next();
+ },
+ connect.static(options.base)
+ ];
+ },
+ base: '',
+ port: 9999
+ }
+ }
+ },
+ 'saucelabs-custom': {
+ all: {
+ options: {
+ urls: '<%= env.coverage.urls %>',
+ testname: process.env.CI_BUILD_NUMBER || 'Modernizr Test',
+ browsers: browsers,
+ maxRetries: 3
+ }
+ }
+ },
+ mocha: {
+ test: {
+ options: {
+ urls: '<%= env.coverage.urls %>',
+ log: true
+ },
+ },
+ },
+ // `mocha` runs browser tests, `mochaTest` runs node tests
+ mochaTest: {
+ test: {
+ options: {
+ reporter: 'dot'
+ },
+ src: ['<%= env.nodeTests%>']
+ }
+ },
+ instrument: {
+ files: [
+ 'src/**/*.js',
+ 'lib/**/*.js'
+ ],
+ options: {
+ basePath: 'test/coverage/instrument/'
+ }
+ },
+ storeCoverage: {
+ options: {
+ dir: 'test/coverage/reports'
+ }
+ },
+ makeReport: {
+ src: 'test/coverage/reports/**/*.json',
+ options: {
+ type: 'lcov',
+ dir: 'test/coverage/reports',
+ print: 'detail'
+ }
+ },
+ coveralls: {
+ all: {
+ src: 'test/coverage/reports/lcov.info',
+ options: {
+ force: true
+ }
+ }
+ }
+ });
+
+ grunt.registerMultiTask('generate', 'Create a version of Modernizr from Grunt', function() {
+ var done = this.async();
+ var config = require('./lib/config-all');
+ var modernizr = require('./lib/cli');
+ var dest = this.data;
+
+ modernizr.build(config, function(output) {
+ grunt.file.write(dest, output);
+ done();
+ });
+ });
+
+ grunt.registerTask('nodeTests', ['mochaTest']);
+
+ grunt.registerTask('browserTests', ['connect', 'mocha']);
+
+ grunt.registerTask('build', ['clean', 'generate']);
+
+ grunt.registerTask('lint', ['jshint', 'jscs']);
+
+ grunt.registerTask('default', ['lint', 'build']);
+
+ var tests = ['clean', 'lint', 'jade', 'instrument', 'env:coverage', 'nodeTests'];
+
+ if (process.env.APPVEYOR) {
+ grunt.registerTask('test', tests);
+ } else if (process.env.BROWSER_COVERAGE !== 'true') {
+ grunt.registerTask('test', tests.concat(['generate', 'browserTests']));
+ } else {
+ grunt.registerTask('test', tests.concat(['generate', 'storeCoverage', 'browserTests', 'saucelabs-custom', 'makeReport', 'coveralls']));
+ }
+};
--- /dev/null
+/*!
+ * modernizr v3.0.0
+ * Build http://modernizr.com/download?-adownload-ambientlight-animation-apng-appearance-applicationcache-audio-audioloop-audiopreload-backgroundblendmode-backgroundcliptext-backgroundsize-batteryapi-beacon-bgpositionshorthand-bgpositionxy-bgrepeatspace_bgrepeatround-bgsizecover-blobconstructor-bloburls-blobworkers-borderimage-borderradius-boxshadow-boxsizing-canvas-canvasblending-canvastext-canvaswinding-capture-checked-classlist-contains-contenteditable-contextmenu-cookies-cors-createelementattrs_createelement_attrs-cssall-cssanimations-csscalc-csschunit-csscolumns-cssescape-cssexunit-cssfilters-cssgradients-csshyphens_softhyphens_softhyphensfind-cssinvalid-cssmask-csspointerevents-csspositionsticky-csspseudoanimations-csspseudotransitions-cssreflections-cssremunit-cssresize-cssscrollbar-csstransforms-csstransforms3d-csstransitions-cssvalid-cssvhunit-cssvmaxunit-cssvminunit-cssvwunit-cubicbezierrange-customevent-customprotocolhandler-dart-datachannel-datalistelem-dataset-datauri-dataview-dataworkers-details-devicemotion_deviceorientation-directory-display_runin-displaytable-documentfragment-ellipsis-emoji-es5-es5array-es5date-es5function-es5object-es5string-es5syntax-es5undefined-es6array-es6math-es6number-es6object-es6string-eventlistener-eventsource-exiforientation-fetch-fileinput-filereader-filesystem-flash-flexbox-flexboxlegacy-flexboxtweener-flexwrap-fontface-formattribute-formvalidation-framed-fullscreen-gamepads-generatedcontent-generators-geolocation-getrandomvalues-getusermedia-hashchange-hidden-hiddenscroll-history-hsla-htmlimports-ie8compat-indexeddb-indexeddbblob-inlinesvg-input-inputformaction-inputformenctype-inputformmethod-inputformtarget-inputtypes-intl-jpegxr-json-lastchild-localizednumber-localstorage-lowbandwidth-lowbattery-mathml-mediaqueries-microdata-multiplebgs-mutationobserver-notification-nthchild-objectfit-olreversed-oninput-opacity-outputelem-overflowscrolling-pagevisibility-peerconnection-performance-picture-placeholder-pointerevents-pointerlock-postmessage-preserve3d-progressbar_meter-promises-proximity-queryselector-quotamanagement-regions-requestanimationframe-requestautocomplete-rgba-ruby-sandbox-scriptasync-scriptdefer-seamless-search-serviceworker-sessionstorage-shapes-sharedworkers-siblinggeneral-sizes-smil-speechrecognition-speechsynthesis-srcdoc-srcset-strictmode-stylescoped-subpixelfont-supports-svg-svgasimg-svgclippaths-svgfilters-svgforeignobject-target-template-templatestrings-textalignlast-textareamaxlength-textshadow-texttrackapi_track-time-todataurljpeg_todataurlpng_todataurlwebp-touchevents-transferables-typedarrays-unicode-unicoderange-unknownelements-urlparser-userdata-userselect-vibrate-video-videoautoplay-videoloop-videopreload-vml-webaudio-webgl-webglextensions-webintents-webp-webpalpha-webpanimation-webplossless_webp_lossless-websockets-websocketsbinary-websqldatabase-webworkers-willchange-wrapflow-xhr2-xhrresponsetype-xhrresponsetypearraybuffer-xhrresponsetypeblob-xhrresponsetypedocument-xhrresponsetypejson-xhrresponsetypetext-addtest-atrule-domprefixes-hasevent-load-mq-prefixed-prefixedcss-prefixes-printshiv-testallprops-testprop-teststyles-dontmin
+ *
+ * Copyright (c)
+ * Faruk Ates
+ * Paul Irish
+ * Alex Sexton
+ * Ryan Seddon
+ * Alexander Farkas
+ * Patrick Kettner
+ * Stu Cox
+ * Richard Herrera
+
+ * MIT License
+ */
+
+/*
+ * Modernizr tests which native CSS3 and HTML5 features are available in the
+ * current UA and makes the results available to you in two ways: as properties on
+ * a global `Modernizr` object, and as classes on the `<html>` element. This
+ * information allows you to progressively enhance your pages with a granular level
+ * of control over the experience.
+*/
+
+;(function(window, document, undefined){
+ var tests = [];
+
+
+ /**
+ *
+ * ModernizrProto is the constructor for Modernizr
+ *
+ * @class
+ * @access public
+ */
+
+ var ModernizrProto = {
+ // The current version, dummy
+ _version: '3.0.0',
+
+ // Any settings that don't work as separate modules
+ // can go in here as configuration.
+ _config: {
+ 'classPrefix' : '',
+ 'enableClasses' : true,
+ 'enableJSClass' : true,
+ 'usePrefixes' : true
+ },
+
+ // Queue of tests
+ _q: [],
+
+ // Stub these for people who are listening
+ on: function(test, cb) {
+ // I don't really think people should do this, but we can
+ // safe guard it a bit.
+ // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.
+ // This is in case people listen to synchronous tests. I would leave it out,
+ // but the code to *disallow* sync tests in the real version of this
+ // function is actually larger than this.
+ var self = this;
+ setTimeout(function() {
+ cb(self[test]);
+ }, 0);
+ },
+
+ addTest: function(name, fn, options) {
+ tests.push({name : name, fn : fn, options : options});
+ },
+
+ addAsyncTest: function(fn) {
+ tests.push({name : null, fn : fn});
+ }
+ };
+
+
+
+ // Fake some of Object.create so we can force non test results to be non "own" properties.
+ var Modernizr = function() {};
+ Modernizr.prototype = ModernizrProto;
+
+ // Leak modernizr globally when you `require` it rather than force it here.
+ // Overwrite name so constructor name is nicer :D
+ Modernizr = new Modernizr();
+
+
+
+ var classes = [];
+
+
+ /**
+ * is returns a boolean if the typeof an obj is exactly type.
+ *
+ * @access private
+ * @function is
+ * @param {*} obj - A thing we want to check the type of
+ * @param {string} type - A string to compare the typeof against
+ * @returns {boolean}
+ */
+
+ function is(obj, type) {
+ return typeof obj === type;
+ }
+ ;
+
+ /**
+ * Run through all tests and detect their support in the current UA.
+ *
+ * @access private
+ */
+
+ function testRunner() {
+ var featureNames;
+ var feature;
+ var aliasIdx;
+ var result;
+ var nameIdx;
+ var featureName;
+ var featureNameSplit;
+
+ for (var featureIdx in tests) {
+ featureNames = [];
+ feature = tests[featureIdx];
+ // run the test, throw the return value into the Modernizr,
+ // then based on that boolean, define an appropriate className
+ // and push it into an array of classes we'll join later.
+ //
+ // If there is no name, it's an 'async' test that is run,
+ // but not directly added to the object. That should
+ // be done with a post-run addTest call.
+ if (feature.name) {
+ featureNames.push(feature.name.toLowerCase());
+
+ if (feature.options && feature.options.aliases && feature.options.aliases.length) {
+ // Add all the aliases into the names list
+ for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {
+ featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());
+ }
+ }
+ }
+
+ // Run the test, or use the raw value if it's not a function
+ result = is(feature.fn, 'function') ? feature.fn() : feature.fn;
+
+
+ // Set each of the names on the Modernizr object
+ for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {
+ featureName = featureNames[nameIdx];
+ // Support dot properties as sub tests. We don't do checking to make sure
+ // that the implied parent tests have been added. You must call them in
+ // order (either in the test, or make the parent test a dependency).
+ //
+ // Cap it to TWO to make the logic simple and because who needs that kind of subtesting
+ // hashtag famous last words
+ featureNameSplit = featureName.split('.');
+
+ if (featureNameSplit.length === 1) {
+ Modernizr[featureNameSplit[0]] = result;
+ } else {
+ // cast to a Boolean, if not one already
+ /* jshint -W053 */
+ if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
+ Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
+ }
+
+ Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;
+ }
+
+ classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));
+ }
+ }
+ }
+
+ ;
+
+ /**
+ * docElement is a convenience wrapper to grab the root element of the document
+ *
+ * @access private
+ * @returns {HTMLElement|SVGElement} The root element of the document
+ */
+
+ var docElement = document.documentElement;
+
+
+ /**
+ * A convenience helper to check if the document we are running in is an SVG document
+ *
+ * @access private
+ * @returns {boolean}
+ */
+
+ var isSVG = docElement.nodeName.toLowerCase() === 'svg';
+
+
+ /**
+ * setClasses takes an array of class names and adds them to the root element
+ *
+ * @access private
+ * @function setClasses
+ * @param {string[]} classes - Array of class names
+ */
+
+ // Pass in an and array of class names, e.g.:
+ // ['no-webp', 'borderradius', ...]
+ function setClasses(classes) {
+ var className = docElement.className;
+ var classPrefix = Modernizr._config.classPrefix || '';
+
+ if (isSVG) {
+ className = className.baseVal;
+ }
+
+ // Change `no-js` to `js` (independently of the `enableClasses` option)
+ // Handle classPrefix on this too
+ if (Modernizr._config.enableJSClass) {
+ var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)');
+ className = className.replace(reJS, '$1' + classPrefix + 'js$2');
+ }
+
+ if (Modernizr._config.enableClasses) {
+ // Add the new classes
+ className += ' ' + classPrefix + classes.join(' ' + classPrefix);
+ isSVG ? docElement.className.baseVal = className : docElement.className = className;
+ }
+
+ }
+
+ ;
+
+ /**
+ * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support
+ *
+ * @author kangax
+ * @access private
+ * @function hasOwnProp
+ * @param {object} object - The object to check for a property
+ * @param {string} property - The property to check for
+ * @returns {boolean}
+ */
+
+ // hasOwnProperty shim by kangax needed for Safari 2.0 support
+ var hasOwnProp;
+
+ (function() {
+ var _hasOwnProperty = ({}).hasOwnProperty;
+ /* istanbul ignore else */
+ /* we have no way of testing IE 5.5 or safari 2,
+ * so just assume the else gets hit */
+ if (!is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined')) {
+ hasOwnProp = function(object, property) {
+ return _hasOwnProperty.call(object, property);
+ };
+ }
+ else {
+ hasOwnProp = function(object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
+ return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
+ };
+ }
+ })();
+
+
+
+
+ // _l tracks listeners for async tests, as well as tests that execute after the initial run
+ ModernizrProto._l = {};
+
+ /**
+ * Modernizr.on is a way to listen for the completion of async tests. Being
+ * asynchronous, they may not finish before your scripts run. As a result you
+ * will get a possibly false negative `undefined` value.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.on
+ * @access public
+ * @function on
+ * @param {string} feature - String name of the feature detect
+ * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not
+ * @example
+ *
+ * ```js
+ * Modernizr.on('flash', function( result ) {
+ * if (result) {
+ * // the browser has flash
+ * } else {
+ * // the browser does not have flash
+ * }
+ * });
+ * ```
+ */
+
+ ModernizrProto.on = function(feature, cb) {
+ // Create the list of listeners if it doesn't exist
+ if (!this._l[feature]) {
+ this._l[feature] = [];
+ }
+
+ // Push this test on to the listener list
+ this._l[feature].push(cb);
+
+ // If it's already been resolved, trigger it on next tick
+ if (Modernizr.hasOwnProperty(feature)) {
+ // Next Tick
+ setTimeout(function() {
+ Modernizr._trigger(feature, Modernizr[feature]);
+ }, 0);
+ }
+ };
+
+ /**
+ * _trigger is the private function used to signal test completion and run any
+ * callbacks registered through [Modernizr.on](#modernizr-on)
+ *
+ * @memberof Modernizr
+ * @name Modernizr._trigger
+ * @access private
+ * @function _trigger
+ * @param {string} feature - string name of the feature detect
+ * @param {function|boolean} [res] - A feature detection function, or the boolean =
+ * result of a feature detection function
+ */
+
+ ModernizrProto._trigger = function(feature, res) {
+ if (!this._l[feature]) {
+ return;
+ }
+
+ var cbs = this._l[feature];
+
+ // Force async
+ setTimeout(function() {
+ var i, cb;
+ for (i = 0; i < cbs.length; i++) {
+ cb = cbs[i];
+ cb(res);
+ }
+ }, 0);
+
+ // Don't trigger these again
+ delete this._l[feature];
+ };
+
+ /**
+ * addTest allows you to define your own feature detects that are not currently
+ * included in Modernizr (under the covers it's the exact same code Modernizr
+ * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result
+ * will be added onto the Modernizr object, as well as an appropriate className set on
+ * the html element when configured to do so
+ *
+ * @memberof Modernizr
+ * @name Modernizr.addTest
+ * @optionName Modernizr.addTest()
+ * @optionProp addTest
+ * @access public
+ * @function addTest
+ * @param {string|object} feature - The string name of the feature detect, or an
+ * object of feature detect names and test
+ * @param {function|boolean} test - Function returning true if feature is supported,
+ * false if not. Otherwise a boolean representing the results of a feature detection
+ * @example
+ *
+ * The most common way of creating your own feature detects is by calling
+ * `Modernizr.addTest` with a string (preferably just lowercase, without any
+ * punctuation), and a function you want executed that will return a boolean result
+ *
+ * ```js
+ * Modernizr.addTest('itsTuesday', function() {
+ * var d = new Date();
+ * return d.getDay() === 2;
+ * });
+ * ```
+ *
+ * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday,
+ * and to `false` every other day of the week. One thing to notice is that the names of
+ * feature detect functions are always lowercased when added to the Modernizr object. That
+ * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will.
+ *
+ *
+ * Since we only look at the returned value from any feature detection function,
+ * you do not need to actually use a function. For simple detections, just passing
+ * in a statement that will return a boolean value works just fine.
+ *
+ * ```js
+ * Modernizr.addTest('hasJquery', 'jQuery' in window);
+ * ```
+ *
+ * Just like before, when the above runs `Modernizr.hasjquery` will be true if
+ * jQuery has been included on the page. Not using a function saves a small amount
+ * of overhead for the browser, as well as making your code much more readable.
+ *
+ * Finally, you also have the ability to pass in an object of feature names and
+ * their tests. This is handy if you want to add multiple detections in one go.
+ * The keys should always be a string, and the value can be either a boolean or
+ * function that returns a boolean.
+ *
+ * ```js
+ * var detects = {
+ * 'hasjquery': 'jQuery' in window,
+ * 'itstuesday': function() {
+ * var d = new Date();
+ * return d.getDay() === 2;
+ * }
+ * }
+ *
+ * Modernizr.addTest(detects);
+ * ```
+ *
+ * There is really no difference between the first methods and this one, it is
+ * just a convenience to let you write more readable code.
+ */
+
+ function addTest(feature, test) {
+
+ if (typeof feature == 'object') {
+ for (var key in feature) {
+ if (hasOwnProp(feature, key)) {
+ addTest(key, feature[ key ]);
+ }
+ }
+ } else {
+
+ feature = feature.toLowerCase();
+ var featureNameSplit = feature.split('.');
+ var last = Modernizr[featureNameSplit[0]];
+
+ // Again, we don't check for parent test existence. Get that right, though.
+ if (featureNameSplit.length == 2) {
+ last = last[featureNameSplit[1]];
+ }
+
+ if (typeof last != 'undefined') {
+ // we're going to quit if you're trying to overwrite an existing test
+ // if we were to allow it, we'd do this:
+ // var re = new RegExp("\\b(no-)?" + feature + "\\b");
+ // docElement.className = docElement.className.replace( re, '' );
+ // but, no rly, stuff 'em.
+ return Modernizr;
+ }
+
+ test = typeof test == 'function' ? test() : test;
+
+ // Set the value (this is the magic, right here).
+ if (featureNameSplit.length == 1) {
+ Modernizr[featureNameSplit[0]] = test;
+ } else {
+ // cast to a Boolean, if not one already
+ /* jshint -W053 */
+ if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
+ Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
+ }
+
+ Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test;
+ }
+
+ // Set a single class (either `feature` or `no-feature`)
+ /* jshint -W041 */
+ setClasses([(!!test && test != false ? '' : 'no-') + featureNameSplit.join('-')]);
+ /* jshint +W041 */
+
+ // Trigger the event
+ Modernizr._trigger(feature, test);
+ }
+
+ return Modernizr; // allow chaining.
+ }
+
+ // After all the tests are run, add self to the Modernizr prototype
+ Modernizr._q.push(function() {
+ ModernizrProto.addTest = addTest;
+ });
+
+
+
+
+ /**
+ * If the browsers follow the spec, then they would expose vendor-specific style as:
+ * elem.style.WebkitBorderRadius
+ * instead of something like the following, which would be technically incorrect:
+ * elem.style.webkitBorderRadius
+
+ * Webkit ghosts their properties in lowercase but Opera & Moz do not.
+ * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
+ * erik.eae.net/archives/2008/03/10/21.48.10/
+
+ * More here: github.com/Modernizr/Modernizr/issues/issue/21
+ *
+ * @access private
+ * @returns {string} The string representing the vendor-specific style properties
+ */
+
+ var omPrefixes = 'Moz O ms Webkit';
+
+
+ var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);
+ ModernizrProto._cssomPrefixes = cssomPrefixes;
+
+
+ /**
+ * atRule returns a given CSS property at-rule (eg @keyframes), possibly in
+ * some prefixed form, or false, in the case of an unsupported rule
+ *
+ * @memberof Modernizr
+ * @name Modernizr.atRule
+ * @optionName Modernizr.atRule()
+ * @optionProp atRule
+ * @access public
+ * @function atRule
+ * @param {string} prop - String name of the @-rule to test for
+ * @returns {string|false} The string representing the (possibly prefixed)
+ * valid version of the @-rule, or `false` when it is unsupported.
+ * @example
+ * ```js
+ * var keyframes = Modernizr.atRule('@keyframes');
+ *
+ * if (keyframes) {
+ * // keyframes are supported
+ * // could be `@-webkit-keyframes` or `@keyframes`
+ * } else {
+ * // keyframes === `false`
+ * }
+ * ```
+ *
+ */
+
+ var atRule = function(prop) {
+ var length = prefixes.length;
+ var cssrule = window.CSSRule;
+ var rule;
+
+ if (typeof cssrule === 'undefined') {
+ return undefined;
+ }
+
+ if (!prop) {
+ return false;
+ }
+
+ // remove literal @ from beginning of provided property
+ prop = prop.replace(/^@/, '');
+
+ // CSSRules use underscores instead of dashes
+ rule = prop.replace(/-/g, '_').toUpperCase() + '_RULE';
+
+ if (rule in cssrule) {
+ return '@' + prop;
+ }
+
+ for (var i = 0; i < length; i++) {
+ // prefixes gives us something like -o-, and we want O_
+ var prefix = prefixes[i];
+ var thisRule = prefix.toUpperCase() + '_' + rule;
+
+ if (thisRule in cssrule) {
+ return '@-' + prefix.toLowerCase() + '-' + prop;
+ }
+ }
+
+ return false;
+ };
+
+ ModernizrProto.atRule = atRule;
+
+
+
+ /**
+ * List of JavaScript DOM values used for tests
+ *
+ * @memberof Modernizr
+ * @name Modernizr._domPrefixes
+ * @optionName Modernizr._domPrefixes
+ * @optionProp domPrefixes
+ * @access public
+ * @example
+ *
+ * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather
+ * than kebab-case properties, all properties are their Capitalized variant
+ *
+ * ```js
+ * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ];
+ * ```
+ */
+
+ var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);
+ ModernizrProto._domPrefixes = domPrefixes;
+
+
+ /**
+ * createElement is a convenience wrapper around document.createElement. Since we
+ * use createElement all over the place, this allows for (slightly) smaller code
+ * as well as abstracting away issues with creating elements in contexts other than
+ * HTML documents (e.g. SVG documents).
+ *
+ * @access private
+ * @function createElement
+ * @returns {HTMLElement|SVGElement} An HTML or SVG element
+ */
+
+ function createElement() {
+ if (typeof document.createElement !== 'function') {
+ // This is the case in IE7, where the type of createElement is "object".
+ // For this reason, we cannot call apply() as Object is not a Function.
+ return document.createElement(arguments[0]);
+ } else if (isSVG) {
+ return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);
+ } else {
+ return document.createElement.apply(document, arguments);
+ }
+ }
+
+ ;
+
+ /**
+ * Modernizr.hasEvent() detects support for a given event
+ *
+ * @memberof Modernizr
+ * @name Modernizr.hasEvent
+ * @optionName Modernizr.hasEvent()
+ * @optionProp hasEvent
+ * @access public
+ * @function hasEvent
+ * @param {string|*} eventName is the name of an event to test for (e.g. "resize")
+ * @param {Element|string} [element=HTMLDivElement] is the element|document|window|tagName to test on
+ * @returns {boolean}
+ * @example
+ * `Modernizr.hasEvent` lets you determine if the browser supports a supplied event.
+ * By default, it does this detection on a div element
+ *
+ * ```js
+ * hasEvent('blur') // true;
+ * ```
+ *
+ * However, you are able to give an object as a second argument to hasEvent to
+ * detect an event on something other than a div.
+ *
+ * ```js
+ * hasEvent('devicelight', window) // true;
+ * ```
+ *
+ */
+
+ var hasEvent = (function(undefined) {
+
+ // Detect whether event support can be detected via `in`. Test on a DOM element
+ // using the "blur" event b/c it should always exist. bit.ly/event-detection
+ var needsFallback = !('onblur' in document.documentElement);
+
+ function inner(eventName, element) {
+
+ var isSupported;
+ if (!eventName) { return false; }
+ if (!element || typeof element === 'string') {
+ element = createElement(element || 'div');
+ }
+
+ // Testing via the `in` operator is sufficient for modern browsers and IE.
+ // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and
+ // "resize", whereas `in` "catches" those.
+ eventName = 'on' + eventName;
+ isSupported = eventName in element;
+
+ // Fallback technique for old Firefox - bit.ly/event-detection
+ if (!isSupported && needsFallback) {
+ if (!element.setAttribute) {
+ // Switch to generic element if it lacks `setAttribute`.
+ // It could be the `document`, `window`, or something else.
+ element = createElement('div');
+ }
+
+ element.setAttribute(eventName, '');
+ isSupported = typeof element[eventName] === 'function';
+
+ if (element[eventName] !== undefined) {
+ // If property was created, "remove it" by setting value to `undefined`.
+ element[eventName] = undefined;
+ }
+ element.removeAttribute(eventName);
+ }
+
+ return isSupported;
+ }
+ return inner;
+ })();
+
+
+ ModernizrProto.hasEvent = hasEvent;
+
+
+/**
+ * @optionName html5printshiv
+ * @optionProp html5printshiv
+ */
+
+ // Take the html5 variable out of the html5shiv scope so we can return it.
+ var html5;
+ if (!isSVG) {
+
+ /**
+ * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+ */
+ ;(function(window, document) {
+ /*jshint evil:true */
+ /** version */
+ var version = '3.7.2';
+
+ /** Preset options */
+ var options = window.html5 || {};
+
+ /** Used to skip problem elements */
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+ /** Not all elements can be cloned in IE **/
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+ /** Detect whether the browser supports default html5 styles */
+ var supportsHtml5Styles;
+
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
+ var expando = '_html5shiv';
+
+ /** The id for the the documents expando */
+ var expanID = 0;
+
+ /** Cached data for each document */
+ var expandoData = {};
+
+ /** Detect whether the browser supports unknown elements */
+ var supportsUnknownElements;
+
+ (function() {
+ try {
+ var a = document.createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+ supportsHtml5Styles = ('hidden' in a);
+
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
+ // assign a false positive if unable to shiv
+ (document.createElement)('a');
+ var frag = document.createDocumentFragment();
+ return (
+ typeof frag.cloneNode == 'undefined' ||
+ typeof frag.createDocumentFragment == 'undefined' ||
+ typeof frag.createElement == 'undefined'
+ );
+ }());
+ } catch(e) {
+ // assign a false positive if detection fails => unable to shiv
+ supportsHtml5Styles = true;
+ supportsUnknownElements = true;
+ }
+
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a style sheet with the given CSS text and adds it to the document.
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @param {String} cssText The CSS text.
+ * @returns {StyleSheet} The style element.
+ */
+ function addStyleSheet(ownerDocument, cssText) {
+ var p = ownerDocument.createElement('p'),
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+ p.innerHTML = 'x<style>' + cssText + '</style>';
+ return parent.insertBefore(p.lastChild, parent.firstChild);
+ }
+
+ /**
+ * Returns the value of `html5.elements` as an array.
+ * @private
+ * @returns {Array} An array of shived element node names.
+ */
+ function getElements() {
+ var elements = html5.elements;
+ return typeof elements == 'string' ? elements.split(' ') : elements;
+ }
+
+ /**
+ * Extends the built-in list of html5 elements
+ * @memberOf html5
+ * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
+ * @param {Document} ownerDocument The context document.
+ */
+ function addElements(newElements, ownerDocument) {
+ var elements = html5.elements;
+ if(typeof elements != 'string'){
+ elements = elements.join(' ');
+ }
+ if(typeof newElements != 'string'){
+ newElements = newElements.join(' ');
+ }
+ html5.elements = elements +' '+ newElements;
+ shivDocument(ownerDocument);
+ }
+
+ /**
+ * Returns the data associated to the given document
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Object} An object of data.
+ */
+ function getExpandoData(ownerDocument) {
+ var data = expandoData[ownerDocument[expando]];
+ if (!data) {
+ data = {};
+ expanID++;
+ ownerDocument[expando] = expanID;
+ expandoData[expanID] = data;
+ }
+ return data;
+ }
+
+ /**
+ * returns a shived element for the given nodeName and document
+ * @memberOf html5
+ * @param {String} nodeName name of the element
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived element.
+ */
+ function createElement(nodeName, ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createElement(nodeName);
+ }
+ if (!data) {
+ data = getExpandoData(ownerDocument);
+ }
+ var node;
+
+ if (data.cache[nodeName]) {
+ node = data.cache[nodeName].cloneNode();
+ } else if (saveClones.test(nodeName)) {
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+ } else {
+ node = data.createElem(nodeName);
+ }
+
+ // Avoid adding some elements to fragments in IE < 9 because
+ // * Attributes like `name` or `type` cannot be set/changed once an element
+ // is inserted into a document/fragment
+ // * Link elements with `src` attributes that are inaccessible, as with
+ // a 403 response, will cause the tab/window to crash
+ // * Script elements appended to fragments will execute when their `src`
+ // or `text` property is set
+ return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
+ }
+
+ /**
+ * returns a shived DocumentFragment for the given document
+ * @memberOf html5
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived DocumentFragment.
+ */
+ function createDocumentFragment(ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createDocumentFragment();
+ }
+ data = data || getExpandoData(ownerDocument);
+ var clone = data.frag.cloneNode(),
+ i = 0,
+ elems = getElements(),
+ l = elems.length;
+ for(;i<l;i++){
+ clone.createElement(elems[i]);
+ }
+ return clone;
+ }
+
+ /**
+ * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+ * @private
+ * @param {Document|DocumentFragment} ownerDocument The document.
+ * @param {Object} data of the document.
+ */
+ function shivMethods(ownerDocument, data) {
+ if (!data.cache) {
+ data.cache = {};
+ data.createElem = ownerDocument.createElement;
+ data.createFrag = ownerDocument.createDocumentFragment;
+ data.frag = data.createFrag();
+ }
+
+
+ ownerDocument.createElement = function(nodeName) {
+ //abort shiv
+ if (!html5.shivMethods) {
+ return data.createElem(nodeName);
+ }
+ return createElement(nodeName, ownerDocument, data);
+ };
+
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+ 'var n=f.cloneNode(),c=n.createElement;' +
+ 'h.shivMethods&&(' +
+ // unroll the `createElement` calls
+ getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
+ data.createElem(nodeName);
+ data.frag.createElement(nodeName);
+ return 'c("' + nodeName + '")';
+ }) +
+ ');return n}'
+ )(html5, data.frag);
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivDocument(ownerDocument) {
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ var data = getExpandoData(ownerDocument);
+
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+ data.hasCSS = !!addStyleSheet(ownerDocument,
+ // corrects block display not defined in IE6/7/8/9
+ 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
+ // adds styling not present in IE6/7/8/9
+ 'mark{background:#FF0;color:#000}' +
+ // hides non-rendered elements
+ 'template{display:none}'
+ );
+ }
+ if (!supportsUnknownElements) {
+ shivMethods(ownerDocument, data);
+ }
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * The `html5` object is exposed so that more elements can be shived and
+ * existing shiving can be detected on iframes.
+ * @type Object
+ * @example
+ *
+ * // options can be changed before the script is included
+ * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+ */
+ var html5 = {
+
+ /**
+ * An array or space separated string of node names of the elements to shiv.
+ * @memberOf html5
+ * @type Array|String
+ */
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
+
+ /**
+ * current version of html5shiv
+ */
+ 'version': version,
+
+ /**
+ * A flag to indicate that the HTML5 style sheet should be inserted.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivCSS': (options.shivCSS !== false),
+
+ /**
+ * Is equal to true if a browser supports creating unknown/HTML5 elements
+ * @memberOf html5
+ * @type boolean
+ */
+ 'supportsUnknownElements': supportsUnknownElements,
+
+ /**
+ * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+ * methods should be overwritten.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivMethods': (options.shivMethods !== false),
+
+ /**
+ * A string to describe the type of `html5` object ("default" or "default print").
+ * @memberOf html5
+ * @type String
+ */
+ 'type': 'default',
+
+ // shivs the document according to the specified `html5` object options
+ 'shivDocument': shivDocument,
+
+ //creates a shived element
+ createElement: createElement,
+
+ //creates a shived documentFragment
+ createDocumentFragment: createDocumentFragment,
+
+ //extends list of elements
+ addElements: addElements
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose html5
+ window.html5 = html5;
+
+ // shiv the document
+ shivDocument(document);
+
+ /*------------------------------- Print Shiv -------------------------------*/
+
+ /** Used to filter media types */
+ var reMedia = /^$|\b(?:all|print)\b/;
+
+ /** Used to namespace printable elements */
+ var shivNamespace = 'html5shiv';
+
+ /** Detect whether the browser supports shivable style sheets */
+ var supportsShivableSheets = !supportsUnknownElements && (function() {
+ // assign a false negative if unable to shiv
+ var docEl = document.documentElement;
+ return !(
+ typeof document.namespaces == 'undefined' ||
+ typeof document.parentWindow == 'undefined' ||
+ typeof docEl.applyElement == 'undefined' ||
+ typeof docEl.removeNode == 'undefined' ||
+ typeof window.attachEvent == 'undefined'
+ );
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Wraps all HTML5 elements in the given document with printable elements.
+ * (eg. the "header" element is wrapped with the "html5shiv:header" element)
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Array} An array wrappers added.
+ */
+ function addWrappers(ownerDocument) {
+ var node,
+ nodes = ownerDocument.getElementsByTagName('*'),
+ index = nodes.length,
+ reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'),
+ result = [];
+
+ while (index--) {
+ node = nodes[index];
+ if (reElements.test(node.nodeName)) {
+ result.push(node.applyElement(createWrapper(node)));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a printable wrapper for the given element.
+ * @private
+ * @param {Element} element The element.
+ * @returns {Element} The wrapper.
+ */
+ function createWrapper(element) {
+ var node,
+ nodes = element.attributes,
+ index = nodes.length,
+ wrapper = element.ownerDocument.createElement(shivNamespace + ':' + element.nodeName);
+
+ // copy element attributes to the wrapper
+ while (index--) {
+ node = nodes[index];
+ node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue);
+ }
+ // copy element styles to the wrapper
+ wrapper.style.cssText = element.style.cssText;
+ return wrapper;
+ }
+
+ /**
+ * Shivs the given CSS text.
+ * (eg. header{} becomes html5shiv\:header{})
+ * @private
+ * @param {String} cssText The CSS text to shiv.
+ * @returns {String} The shived CSS text.
+ */
+ function shivCssText(cssText) {
+ var pair,
+ parts = cssText.split('{'),
+ index = parts.length,
+ reElements = RegExp('(^|[\\s,>+~])(' + getElements().join('|') + ')(?=[[\\s,>+~#.:]|$)', 'gi'),
+ replacement = '$1' + shivNamespace + '\\:$2';
+
+ while (index--) {
+ pair = parts[index] = parts[index].split('}');
+ pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement);
+ parts[index] = pair.join('}');
+ }
+ return parts.join('{');
+ }
+
+ /**
+ * Removes the given wrappers, leaving the original elements.
+ * @private
+ * @params {Array} wrappers An array of printable wrappers.
+ */
+ function removeWrappers(wrappers) {
+ var index = wrappers.length;
+ while (index--) {
+ wrappers[index].removeNode();
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document for print.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivPrint(ownerDocument) {
+ var shivedSheet,
+ wrappers,
+ data = getExpandoData(ownerDocument),
+ namespaces = ownerDocument.namespaces,
+ ownerWindow = ownerDocument.parentWindow;
+
+ if (!supportsShivableSheets || ownerDocument.printShived) {
+ return ownerDocument;
+ }
+ if (typeof namespaces[shivNamespace] == 'undefined') {
+ namespaces.add(shivNamespace);
+ }
+
+ function removeSheet() {
+ clearTimeout(data._removeSheetTimer);
+ if (shivedSheet) {
+ shivedSheet.removeNode(true);
+ }
+ shivedSheet= null;
+ }
+
+ ownerWindow.attachEvent('onbeforeprint', function() {
+
+ removeSheet();
+
+ var imports,
+ length,
+ sheet,
+ collection = ownerDocument.styleSheets,
+ cssText = [],
+ index = collection.length,
+ sheets = Array(index);
+
+ // convert styleSheets collection to an array
+ while (index--) {
+ sheets[index] = collection[index];
+ }
+ // concat all style sheet CSS text
+ while ((sheet = sheets.pop())) {
+ // IE does not enforce a same origin policy for external style sheets...
+ // but has trouble with some dynamically created stylesheets
+ if (!sheet.disabled && reMedia.test(sheet.media)) {
+
+ try {
+ imports = sheet.imports;
+ length = imports.length;
+ } catch(er){
+ length = 0;
+ }
+
+ for (index = 0; index < length; index++) {
+ sheets.push(imports[index]);
+ }
+
+ try {
+ cssText.push(sheet.cssText);
+ } catch(er){}
+ }
+ }
+
+ // wrap all HTML5 elements with printable elements and add the shived style sheet
+ cssText = shivCssText(cssText.reverse().join(''));
+ wrappers = addWrappers(ownerDocument);
+ shivedSheet = addStyleSheet(ownerDocument, cssText);
+
+ });
+
+ ownerWindow.attachEvent('onafterprint', function() {
+ // remove wrappers, leaving the original elements, and remove the shived style sheet
+ removeWrappers(wrappers);
+ clearTimeout(data._removeSheetTimer);
+ data._removeSheetTimer = setTimeout(removeSheet, 500);
+ });
+
+ ownerDocument.printShived = true;
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose API
+ html5.type += ' print';
+ html5.shivPrint = shivPrint;
+
+ // shiv for print
+ shivPrint(document);
+
+ }(this, document));
+ }
+
+ ;
+
+ /**
+ * Previously, Modernizr.load was an alias for yepnope. Since yepnope was
+ * deprecated, we removed it as well. It is not available on the website builder,
+ * this is only included as an improved warning to those who build a custom
+ * version locally.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.load
+ * @access private
+ * @function load
+ *
+ */
+
+ var err = function() {};
+ var warn = function() {};
+
+ if (window.console) {
+ err = function() {
+ var method = console.error ? 'error' : 'log';
+ window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
+ };
+
+ warn = function() {
+ var method = console.warn ? 'warn' : 'log';
+ window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
+ };
+ }
+
+ ModernizrProto.load = function() {
+ if ('yepnope' in window) {
+ warn('yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.\n See http://github.com/Modernizr/Modernizr/issues/1182 for more information.');
+ window.yepnope.apply(window, [].slice.call(arguments, 0));
+ } else {
+ err('yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com. See http://github.com/Modernizr/Modernizr/issues/1182 for more information.');
+ }
+ };
+
+
+
+ /**
+ * getBody returns the body of a document, or an element that can stand in for
+ * the body if a real body does not exist
+ *
+ * @access private
+ * @function getBody
+ * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an
+ * artificially created element that stands in for the body
+ */
+
+ function getBody() {
+ // After page load injecting a fake body doesn't work so check if body exists
+ var body = document.body;
+
+ if (!body) {
+ // Can't use the real body create a fake one.
+ body = createElement(isSVG ? 'svg' : 'body');
+ body.fake = true;
+ }
+
+ return body;
+ }
+
+ ;
+
+ /**
+ * injectElementWithStyles injects an element with style element and some CSS rules
+ *
+ * @access private
+ * @function injectElementWithStyles
+ * @param {string} rule - String representing a css rule
+ * @param {function} callback - A function that is used to test the injected element
+ * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
+ * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
+ * @returns {boolean}
+ */
+
+ function injectElementWithStyles(rule, callback, nodes, testnames) {
+ var mod = 'modernizr';
+ var style;
+ var ret;
+ var node;
+ var docOverflow;
+ var div = createElement('div');
+ var body = getBody();
+
+ if (parseInt(nodes, 10)) {
+ // In order not to give false positives we create a node for each test
+ // This also allows the method to scale for unspecified uses
+ while (nodes--) {
+ node = createElement('div');
+ node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
+ div.appendChild(node);
+ }
+ }
+
+ style = createElement('style');
+ style.type = 'text/css';
+ style.id = 's' + mod;
+
+ // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
+ // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
+ (!body.fake ? div : body).appendChild(style);
+ body.appendChild(div);
+
+ if (style.styleSheet) {
+ style.styleSheet.cssText = rule;
+ } else {
+ style.appendChild(document.createTextNode(rule));
+ }
+ div.id = mod;
+
+ if (body.fake) {
+ //avoid crashing IE8, if background image is used
+ body.style.background = '';
+ //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
+ body.style.overflow = 'hidden';
+ docOverflow = docElement.style.overflow;
+ docElement.style.overflow = 'hidden';
+ docElement.appendChild(body);
+ }
+
+ ret = callback(div, rule);
+ // If this is done after page load we don't want to remove the body so check if body exists
+ if (body.fake) {
+ body.parentNode.removeChild(body);
+ docElement.style.overflow = docOverflow;
+ // Trigger layout so kinetic scrolling isn't disabled in iOS6+
+ docElement.offsetHeight;
+ } else {
+ div.parentNode.removeChild(div);
+ }
+
+ return !!ret;
+
+ }
+
+ ;
+
+ /**
+ * Modernizr.mq tests a given media query, live against the current state of the window
+ * adapted from matchMedia polyfill by Scott Jehl and Paul Irish
+ * gist.github.com/786768
+ *
+ * @memberof Modernizr
+ * @name Modernizr.mq
+ * @optionName Modernizr.mq()
+ * @optionProp mq
+ * @access public
+ * @function mq
+ * @param {string} mq - String of the media query we want to test
+ * @returns {boolean}
+ * @example
+ * Modernizr.mq allows for you to programmatically check if the current browser
+ * window state matches a media query.
+ *
+ * ```js
+ * var query = Modernizr.mq('(min-width: 900px)');
+ *
+ * if (query) {
+ * // the browser window is larger than 900px
+ * }
+ * ```
+ *
+ * Only valid media queries are supported, therefore you must always include values
+ * with your media query
+ *
+ * ```js
+ * // good
+ * Modernizr.mq('(min-width: 900px)');
+ *
+ * // bad
+ * Modernizr.mq('min-width');
+ * ```
+ *
+ * If you would just like to test that media queries are supported in general, use
+ *
+ * ```js
+ * Modernizr.mq('only all'); // true if MQ are supported, false if not
+ * ```
+ *
+ *
+ * Note that if the browser does not support media queries (e.g. old IE) mq will
+ * always return false.
+ */
+
+ var mq = (function() {
+ var matchMedia = window.matchMedia || window.msMatchMedia;
+ if (matchMedia) {
+ return function(mq) {
+ var mql = matchMedia(mq);
+ return mql && mql.matches || false;
+ };
+ }
+
+ return function(mq) {
+ var bool = false;
+
+ injectElementWithStyles('@media ' + mq + ' { #modernizr { position: absolute; } }', function(node) {
+ bool = (window.getComputedStyle ?
+ window.getComputedStyle(node, null) :
+ node.currentStyle)['position'] == 'absolute';
+ });
+
+ return bool;
+ };
+ })();
+
+
+ ModernizrProto.mq = mq;
+
+
+
+
+ /**
+ * contains checks to see if a string contains another string
+ *
+ * @access private
+ * @function contains
+ * @param {string} str - The string we want to check for substrings
+ * @param {string} substr - The substring we want to search the first string for
+ * @returns {boolean}
+ */
+
+ function contains(str, substr) {
+ return !!~('' + str).indexOf(substr);
+ }
+
+ ;
+
+ /**
+ * Create our "modernizr" element that we do most feature tests on.
+ *
+ * @access private
+ */
+
+ var modElem = {
+ elem : createElement('modernizr')
+ };
+
+ // Clean up this element
+ Modernizr._q.push(function() {
+ delete modElem.elem;
+ });
+
+
+
+ var mStyle = {
+ style : modElem.elem.style
+ };
+
+ // kill ref for gc, must happen before mod.elem is removed, so we unshift on to
+ // the front of the queue.
+ Modernizr._q.unshift(function() {
+ delete mStyle.style;
+ });
+
+
+
+ /**
+ * domToCSS takes a camelCase string and converts it to kebab-case
+ * e.g. boxSizing -> box-sizing
+ *
+ * @access private
+ * @function domToCSS
+ * @param {string} name - String name of camelCase prop we want to convert
+ * @returns {string} The kebab-case version of the supplied name
+ */
+
+ function domToCSS(name) {
+ return name.replace(/([A-Z])/g, function(str, m1) {
+ return '-' + m1.toLowerCase();
+ }).replace(/^ms-/, '-ms-');
+ }
+ ;
+
+ /**
+ * nativeTestProps allows for us to use native feature detection functionality if available.
+ * some prefixed form, or false, in the case of an unsupported rule
+ *
+ * @access private
+ * @function nativeTestProps
+ * @param {array} props - An array of property names
+ * @param {string} value - A string representing the value we want to check via @supports
+ * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise
+ */
+
+ // Accepts a list of property names and a single value
+ // Returns `undefined` if native detection not available
+ function nativeTestProps (props, value) {
+ var i = props.length;
+ // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface
+ if ('CSS' in window && 'supports' in window.CSS) {
+ // Try every prefixed variant of the property
+ while (i--) {
+ if (window.CSS.supports(domToCSS(props[i]), value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ // Otherwise fall back to at-rule (for Opera 12.x)
+ else if ('CSSSupportsRule' in window) {
+ // Build a condition string for every prefixed variant
+ var conditionText = [];
+ while (i--) {
+ conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');
+ }
+ conditionText = conditionText.join(' or ');
+ return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {
+ return getComputedStyle(node, null).position == 'absolute';
+ });
+ }
+ return undefined;
+ }
+ ;
+
+ /**
+ * cssToDOM takes a kebab-case string and converts it to camelCase
+ * e.g. box-sizing -> boxSizing
+ *
+ * @access private
+ * @function cssToDOM
+ * @param {string} name - String name of kebab-case prop we want to convert
+ * @returns {string} The camelCase version of the supplied name
+ */
+
+ function cssToDOM(name) {
+ return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
+ return m1 + m2.toUpperCase();
+ }).replace(/^-/, '');
+ }
+ ;
+
+ // testProps is a generic CSS / DOM property test.
+
+ // In testing support for a given CSS property, it's legit to test:
+ // `elem.style[styleName] !== undefined`
+ // If the property is supported it will return an empty string,
+ // if unsupported it will return undefined.
+
+ // We'll take advantage of this quick test and skip setting a style
+ // on our modernizr element, but instead just testing undefined vs
+ // empty string.
+
+ // Property names can be provided in either camelCase or kebab-case.
+
+ function testProps(props, prefixed, value, skipValueTest) {
+ skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;
+
+ // Try native detect first
+ if (!is(value, 'undefined')) {
+ var result = nativeTestProps(props, value);
+ if (!is(result, 'undefined')) {
+ return result;
+ }
+ }
+
+ // Otherwise do it properly
+ var afterInit, i, propsLength, prop, before;
+
+ // If we don't have a style element, that means we're running async or after
+ // the core tests, so we'll need to create our own elements to use
+
+ // inside of an SVG element, in certain browsers, the `style` element is only
+ // defined for valid tags. Therefore, if `modernizr` does not have one, we
+ // fall back to a less used element and hope for the best.
+ var elems = ['modernizr', 'tspan'];
+ while (!mStyle.style) {
+ afterInit = true;
+ mStyle.modElem = createElement(elems.shift());
+ mStyle.style = mStyle.modElem.style;
+ }
+
+ // Delete the objects if we created them.
+ function cleanElems() {
+ if (afterInit) {
+ delete mStyle.style;
+ delete mStyle.modElem;
+ }
+ }
+
+ propsLength = props.length;
+ for (i = 0; i < propsLength; i++) {
+ prop = props[i];
+ before = mStyle.style[prop];
+
+ if (contains(prop, '-')) {
+ prop = cssToDOM(prop);
+ }
+
+ if (mStyle.style[prop] !== undefined) {
+
+ // If value to test has been passed in, do a set-and-check test.
+ // 0 (integer) is a valid property value, so check that `value` isn't
+ // undefined, rather than just checking it's truthy.
+ if (!skipValueTest && !is(value, 'undefined')) {
+
+ // Needs a try catch block because of old IE. This is slow, but will
+ // be avoided in most cases because `skipValueTest` will be used.
+ try {
+ mStyle.style[prop] = value;
+ } catch (e) {}
+
+ // If the property value has changed, we assume the value used is
+ // supported. If `value` is empty string, it'll fail here (because
+ // it hasn't changed), which matches how browsers have implemented
+ // CSS.supports()
+ if (mStyle.style[prop] != before) {
+ cleanElems();
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ // Otherwise just return true, or the property name if this is a
+ // `prefixed()` call
+ else {
+ cleanElems();
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ }
+ cleanElems();
+ return false;
+ }
+
+ ;
+
+ /**
+ * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.
+ *
+ * @access private
+ * @function fnBind
+ * @param {function} fn - a function you want to change `this` reference to
+ * @param {object} that - the `this` you want to call the function with
+ * @returns {function} The wrapped version of the supplied function
+ */
+
+ function fnBind(fn, that) {
+ return function() {
+ return fn.apply(that, arguments);
+ };
+ }
+
+ ;
+
+ /**
+ * testDOMProps is a generic DOM property test; if a browser supports
+ * a certain property, it won't return undefined for it.
+ */
+ function testDOMProps(props, obj, elem) {
+ var item;
+
+ for (var i in props) {
+ if (props[i] in obj) {
+
+ // return the property name as a string
+ if (elem === false) {
+ return props[i];
+ }
+
+ item = obj[props[i]];
+
+ // let's bind a function
+ if (is(item, 'function')) {
+ // bind to obj unless overriden
+ return fnBind(item, elem || obj);
+ }
+
+ // return the unbound function or obj or value
+ return item;
+ }
+ }
+ return false;
+ }
+
+ ;
+
+ /**
+ * testPropsAll tests a list of DOM properties we want to check against.
+ * We specify literally ALL possible (known and/or likely) properties on
+ * the element including the non-vendor prefixed one, for forward-
+ * compatibility.
+ */
+ function testPropsAll(prop, prefixed, elem, value, skipValueTest) {
+
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
+ props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
+
+ // did they call .prefixed('boxSizing') or are we just testing a prop?
+ if (is(prefixed, 'string') || is(prefixed, 'undefined')) {
+ return testProps(props, prefixed, value, skipValueTest);
+
+ // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
+ } else {
+ props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
+ return testDOMProps(props, prefixed, elem);
+ }
+ }
+
+ // Modernizr.testAllProps() investigates whether a given style property,
+ // or any of its vendor-prefixed variants, is recognized
+ //
+ // Note that the property names must be provided in the camelCase variant.
+ // Modernizr.testAllProps('boxSizing')
+ ModernizrProto.testAllProps = testPropsAll;
+
+
+
+ /**
+ * prefixed returns the prefixed or nonprefixed property name variant of your input
+ *
+ * @memberof Modernizr
+ * @name Modernizr.prefixed
+ * @optionName Modernizr.prefixed()
+ * @optionProp prefixed
+ * @access public
+ * @function prefixed
+ * @param {string} prop - String name of the property to test for
+ * @param {object} [obj]- An object to test for the prefixed properties on
+ * @returns {string|false} The string representing the (possibly prefixed) valid
+ * version of the property, or `false` when it is unsupported.
+ * @example
+ *
+ * Modernizr.prefixed takes a string css value in the DOM style camelCase (as
+ * opposed to the css style kebab-case) form and returns the (possibly prefixed)
+ * version of that property that the browser actually supports.
+ *
+ * For example, in older Firefox...
+ * ```js
+ * prefixed('boxSizing')
+ * ```
+ * returns 'MozBoxSizing'
+ *
+ * In newer Firefox, as well as any other browser that support the unprefixed
+ * version would simply return `boxSizing`. Any browser that does not support
+ * the property at all, it will return `false`.
+ *
+ * By default, prefixed is checked against a DOM element. If you want to check
+ * for a property on another object, just pass it as a second argument
+ *
+ * ```js
+ * var rAF = prefixed('requestAnimationFrame', window);
+ *
+ * raf(function() {
+ * renderFunction();
+ * })
+ * ```
+ *
+ * Note that this will return _the actual function_ - not the name of the function.
+ * If you need the actual name of the property, pass in `false` as a third argument
+ *
+ * ```js
+ * var rAFProp = prefixed('requestAnimationFrame', window, false);
+ *
+ * rafProp === 'WebkitRequestAnimationFrame' // in older webkit
+ * ```
+ *
+ * One common use case for prefixed is if you're trying to determine which transition
+ * end event to bind to, you might do something like...
+ * ```js
+ * var transEndEventNames = {
+ * 'WebkitTransition' : 'webkitTransitionEnd', * Saf 6, Android Browser
+ * 'MozTransition' : 'transitionend', * only for FF < 15
+ * 'transition' : 'transitionend' * IE10, Opera, Chrome, FF 15+, Saf 7+
+ * };
+ *
+ * var transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
+ * ```
+ *
+ * If you want a similar lookup, but in kebab-case, you can use [prefixedCSS](#modernizr-prefixedcss).
+ */
+
+ var prefixed = ModernizrProto.prefixed = function(prop, obj, elem) {
+ if (prop.indexOf('@') === 0) {
+ return atRule(prop);
+ }
+
+ if (prop.indexOf('-') != -1) {
+ // Convert kebab-case to camelCase
+ prop = cssToDOM(prop);
+ }
+ if (!obj) {
+ return testPropsAll(prop, 'pfx');
+ } else {
+ // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
+ return testPropsAll(prop, obj, elem);
+ }
+ };
+
+
+
+ /**
+ * List of property values to set for css tests. See ticket #21
+ * http://git.io/vUGl4
+ *
+ * @memberof Modernizr
+ * @name Modernizr._prefixes
+ * @optionName Modernizr._prefixes
+ * @optionProp prefixes
+ * @access public
+ * @example
+ *
+ * Modernizr._prefixes is the internal list of prefixes that we test against
+ * inside of things like [prefixed](#modernizr-prefixed) and [prefixedCSS](#-code-modernizr-prefixedcss). It is simply
+ * an array of kebab-case vendor prefixes you can use within your code.
+ *
+ * Some common use cases include
+ *
+ * Generating all possible prefixed version of a CSS property
+ * ```js
+ * var rule = Modernizr._prefixes.join('transform: rotate(20deg); ');
+ *
+ * rule === 'transform: rotate(20deg); webkit-transform: rotate(20deg); moz-transform: rotate(20deg); o-transform: rotate(20deg); ms-transform: rotate(20deg);'
+ * ```
+ *
+ * Generating all possible prefixed version of a CSS value
+ * ```js
+ * rule = 'display:' + Modernizr._prefixes.join('flex; display:') + 'flex';
+ *
+ * rule === 'display:flex; display:-webkit-flex; display:-moz-flex; display:-o-flex; display:-ms-flex; display:flex'
+ * ```
+ */
+
+ var prefixes = (ModernizrProto._config.usePrefixes ? ' -webkit- -moz- -o- -ms- '.split(' ') : []);
+
+ // expose these for the plugin API. Look in the source for how to join() them against your input
+ ModernizrProto._prefixes = prefixes;
+
+
+
+ /**
+ * prefixedCSS is just like [prefixed](#modernizr-prefixed), but the returned values are in
+ * kebab-case (e.g. `box-sizing`) rather than camelCase (boxSizing).
+ *
+ * @memberof Modernizr
+ * @name Modernizr.prefixedCSS
+ * @optionName Modernizr.prefixedCSS()
+ * @optionProp prefixedCSS
+ * @access public
+ * @function prefixedCSS
+ * @param {string} prop - String name of the property to test for
+ * @returns {string|false} The string representing the (possibly prefixed)
+ * valid version of the property, or `false` when it is unsupported.
+ * @example
+ *
+ * `Modernizr.prefixedCSS` is like `Modernizr.prefixed`, but returns the result
+ * in hyphenated form
+ *
+ * ```js
+ * Modernizr.prefixedCSS('transition') // '-moz-transition' in old Firefox
+ * ```
+ *
+ * Since it is only useful for CSS style properties, it can only be tested against
+ * an HTMLElement.
+ *
+ * Properties can be passed as both the DOM style camelCase or CSS style kebab-case.
+ */
+
+ var prefixedCSS = ModernizrProto.prefixedCSS = function(prop) {
+ var prefixedProp = prefixed(prop);
+ return prefixedProp && domToCSS(prefixedProp);
+ };
+
+
+ /**
+ * testAllProps determines whether a given CSS property is supported in the browser
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testAllProps
+ * @optionName Modernizr.testAllProps()
+ * @optionProp testAllProps
+ * @access public
+ * @function testAllProps
+ * @param {string} prop - String naming the property to test (either camelCase or kebab-case)
+ * @param {string} [value] - String of the value to test
+ * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection
+ * @example
+ *
+ * testAllProps determines whether a given CSS property, in some prefixed form,
+ * is supported by the browser.
+ *
+ * ```js
+ * testAllProps('boxSizing') // true
+ * ```
+ *
+ * It can optionally be given a CSS value in string form to test if a property
+ * value is valid
+ *
+ * ```js
+ * testAllProps('display', 'block') // true
+ * testAllProps('display', 'penguin') // false
+ * ```
+ *
+ * A boolean can be passed as a third parameter to skip the value check when
+ * native detection (@supports) isn't available.
+ *
+ * ```js
+ * testAllProps('shapeOutside', 'content-box', true);
+ * ```
+ */
+
+ function testAllProps (prop, value, skipValueTest) {
+ return testPropsAll(prop, undefined, undefined, value, skipValueTest);
+ }
+ ModernizrProto.testAllProps = testAllProps;
+
+
+ /**
+ * testProp() investigates whether a given style property is recognized
+ * Property names can be provided in either camelCase or kebab-case.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testProp
+ * @access public
+ * @optionName Modernizr.testProp()
+ * @optionProp testProp
+ * @function testProp
+ * @param {string} prop - Name of the CSS property to check
+ * @param {string} [value] - Name of the CSS value to check
+ * @param {boolean} [useValue] - Whether or not to check the value if @supports isn't supported
+ * @returns {boolean}
+ * @example
+ *
+ * Just like [testAllProps](#modernizr-testallprops), only it does not check any vendor prefixed
+ * version of the string.
+ *
+ * Note that the property name must be provided in camelCase (e.g. boxSizing not box-sizing)
+ *
+ * ```js
+ * Modernizr.testProp('pointerEvents') // true
+ * ```
+ *
+ * You can also provide a value as an optional second argument to check if a
+ * specific value is supported
+ *
+ * ```js
+ * Modernizr.testProp('pointerEvents', 'none') // true
+ * Modernizr.testProp('pointerEvents', 'penguin') // false
+ * ```
+ */
+
+ var testProp = ModernizrProto.testProp = function(prop, value, useValue) {
+ return testProps([prop], undefined, value, useValue);
+ };
+
+
+ /**
+ * testStyles injects an element with style element and some CSS rules
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testStyles
+ * @optionName Modernizr.testStyles()
+ * @optionProp testStyles
+ * @access public
+ * @function testStyles
+ * @param {string} rule - String representing a css rule
+ * @param {function} callback - A function that is used to test the injected element
+ * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
+ * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
+ * @returns {boolean}
+ * @example
+ *
+ * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page
+ * along with (possibly multiple) DOM elements. This lets you check for features
+ * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).
+ *
+ * ```js
+ * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {
+ * // elem is the first DOM node in the page (by default #modernizr)
+ * // rule is the first argument you supplied - the CSS rule in string form
+ *
+ * addTest('widthworks', elem.style.width === '9px')
+ * });
+ * ```
+ *
+ * If your test requires multiple nodes, you can include a third argument
+ * indicating how many additional div elements to include on the page. The
+ * additional nodes are injected as children of the `elem` that is returned as
+ * the first argument to the callback.
+ *
+ * ```js
+ * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {
+ * document.getElementById('modernizr').style.width === '1px'; // true
+ * document.getElementById('modernizr2').style.width === '2px'; // true
+ * elem.firstChild === document.getElementById('modernizr2'); // true
+ * }, 1);
+ * ```
+ *
+ * By default, all of the additional elements have an ID of `modernizr[n]`, where
+ * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,
+ * the second additional is `#modernizr3`, etc.).
+ * If you want to have more meaningful IDs for your function, you can provide
+ * them as the fourth argument, as an array of strings
+ *
+ * ```js
+ * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {
+ * elem.firstChild === document.getElementById('foo'); // true
+ * elem.lastChild === document.getElementById('bar'); // true
+ * }, 2, ['foo', 'bar']);
+ * ```
+ *
+ */
+
+ var testStyles = ModernizrProto.testStyles = injectElementWithStyles;
+
+/*!
+{
+ "name": "a[download] Attribute",
+ "property": "adownload",
+ "caniuse" : "download",
+ "tags": ["media", "attribute"],
+ "builderAliases": ["a_download"],
+ "notes": [{
+ "name": "WhatWG Reference",
+ "href": "http://developers.whatwg.org/links.html#downloading-resources"
+ }]
+}
+!*/
+/* DOC
+When used on an `<a>`, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigating to it.
+*/
+
+ Modernizr.addTest('adownload', !window.externalHost && 'download' in createElement('a'));
+
+/*!
+{
+ "name": "Ambient Light Events",
+ "property": "ambientlight",
+ "notes": [{
+ "name": "W3C Ambient Light Events",
+ "href": "http://www.w3.org/TR/ambient-light/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the API that provides information about the ambient light levels, as detected by the device's light detector, in terms of lux units.
+*/
+
+ Modernizr.addTest('ambientlight', hasEvent('devicelight', window));
+
+/*!
+{
+ "name": "Application Cache",
+ "property": "applicationcache",
+ "caniuse": "offline-apps",
+ "tags": ["storage", "offline"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/docs/HTML/Using_the_application_cache"
+ }],
+ "polyfills": ["html5gears"]
+}
+!*/
+/* DOC
+Detects support for the Application Cache, for storing data to enable web-based applications run offline.
+
+The API has been [heavily criticized](http://alistapart.com/article/application-cache-is-a-douchebag) and discussions are underway to address this.
+*/
+
+ Modernizr.addTest('applicationcache', 'applicationCache' in window);
+
+/*!
+{
+ "name" : "HTML5 Audio Element",
+ "property": "audio",
+ "tags" : ["html5", "audio", "media"]
+}
+!*/
+/* DOC
+Detects the audio element
+*/
+
+ // This tests evaluates support of the audio element, as well as
+ // testing what types of content it supports.
+ //
+ // We're using the Boolean constructor here, so that we can extend the value
+ // e.g. Modernizr.audio // true
+ // Modernizr.audio.ogg // 'probably'
+ //
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+ Modernizr.addTest('audio', function() {
+ /* jshint -W053 */
+ var elem = createElement('audio');
+ var bool = false;
+
+ try {
+ if (bool = !!elem.canPlayType) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, '');
+ bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/, '');
+ bool.opus = elem.canPlayType('audio/ogg; codecs="opus"') .replace(/^no$/, '');
+
+ // Mimetypes accepted:
+ // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
+ // bit.ly/iphoneoscodecs
+ bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/, '');
+ bool.m4a = (elem.canPlayType('audio/x-m4a;') ||
+ elem.canPlayType('audio/aac;')) .replace(/^no$/, '');
+ }
+ } catch (e) { }
+
+ return bool;
+ });
+
+/*!
+{
+ "name": "Audio Loop Attribute",
+ "property": "audioloop",
+ "tags": ["audio", "media"]
+}
+!*/
+/* DOC
+Detects if an audio element can automatically restart, once it has finished
+*/
+
+ Modernizr.addTest('audioloop', 'loop' in createElement('audio'));
+
+/*!
+{
+ "name": "Audio Preload Attribute",
+ "property": "audiopreload",
+ "tags": ["audio", "media"]
+}
+!*/
+/* DOC
+Detects if audio can be downloaded in the background before it starts playing in the `<audio>` element
+*/
+
+ Modernizr.addTest('audiopreload', 'preload' in createElement('audio'));
+
+/*!
+{
+ "name": "Web Audio API",
+ "property": "webaudio",
+ "caniuse": "audio-api",
+ "polyfills": ["xaudiojs", "dynamicaudiojs", "audiolibjs"],
+ "tags": ["audio", "media"],
+ "builderAliases": ["audio_webaudio_api"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3 Specification",
+ "href": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html"
+ }]
+}
+!*/
+/* DOC
+Detects the older non standard webaudio API, (as opposed to the standards based AudioContext API)
+*/
+
+ Modernizr.addTest('webaudio', function() {
+ var prefixed = 'webkitAudioContext' in window;
+ var unprefixed = 'AudioContext' in window;
+
+ if (Modernizr._config.usePrefixes) {
+ return prefixed || unprefixed;
+ }
+ return unprefixed;
+ });
+
+/*!
+{
+ "name": "Battery API",
+ "property": "batteryapi",
+ "aliases": ["battery-api"],
+ "builderAliases": ["battery_api"],
+ "tags": ["device", "media"],
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
+ }]
+}
+!*/
+/* DOC
+Detect support for the Battery API, for accessing information about the system's battery charge level.
+*/
+
+ Modernizr.addTest('batteryapi', !!prefixed('battery', navigator), {aliases: ['battery-api']});
+
+/*!
+{
+ "name": "Low Battery Level",
+ "property": "lowbattery",
+ "tags": ["hardware", "mobile"],
+ "builderAliases": ["battery_level"],
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
+ }]
+}
+!*/
+/* DOC
+Enable a developer to remove CPU intensive CSS/JS when battery is low
+*/
+
+ Modernizr.addTest('lowbattery', function() {
+ var minLevel = 0.20;
+ var battery = prefixed('battery', navigator);
+ return !!(battery && !battery.charging && battery.level <= minLevel);
+ });
+
+/*!
+{
+ "name": "Blob constructor",
+ "property": "blobconstructor",
+ "aliases": ["blob-constructor"],
+ "builderAliases": ["blob_constructor"],
+ "caniuse": "blobbuilder",
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob"
+ }],
+ "polyfills": ["blobjs"]
+}
+!*/
+/* DOC
+Detects support for the Blob constructor, for creating file-like objects of immutable, raw data.
+*/
+
+ Modernizr.addTest('blobconstructor', function() {
+ try {
+ return !!new Blob();
+ } catch (e) {
+ return false;
+ }
+ }, {
+ aliases: ['blob-constructor']
+ });
+
+/*!
+{
+ "name": "Canvas",
+ "property": "canvas",
+ "caniuse": "canvas",
+ "tags": ["canvas", "graphics"],
+ "polyfills": ["flashcanvas", "excanvas", "slcanvas", "fxcanvas"]
+}
+!*/
+/* DOC
+Detects support for the `<canvas>` element for 2D drawing.
+*/
+
+ // On the S60 and BB Storm, getContext exists, but always returns undefined
+ // so we actually have to call getContext() to verify
+ // github.com/Modernizr/Modernizr/issues/issue/97/
+ Modernizr.addTest('canvas', function() {
+ var elem = createElement('canvas');
+ return !!(elem.getContext && elem.getContext('2d'));
+ });
+
+/*!
+{
+ "name": "canvas blending support",
+ "property": "canvasblending",
+ "tags": ["canvas"],
+ "async" : false,
+ "notes": [{
+ "name": "HTML5 Spec",
+ "href": "https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending"
+ },
+ {
+ "name": "Article",
+ "href": "http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas"
+ }]
+}
+!*/
+/* DOC
+Detects if Photoshop style blending modes are available in canvas.
+*/
+
+
+ Modernizr.addTest('canvasblending', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ var ctx = createElement('canvas').getContext('2d');
+ // firefox 3 throws an error when setting an invalid `globalCompositeOperation`
+ try {
+ ctx.globalCompositeOperation = 'screen';
+ } catch (e) {}
+
+ return ctx.globalCompositeOperation === 'screen';
+ });
+
+
+/*!
+{
+ "name": "canvas.toDataURL type support",
+ "property": ["todataurljpeg", "todataurlpng", "todataurlwebp"],
+ "tags": ["canvas"],
+ "builderAliases": ["canvas_todataurl_type"],
+ "async" : false,
+ "notes": [{
+ "name": "MDN article",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement.toDataURL"
+ }]
+}
+!*/
+
+
+ var canvas = createElement('canvas');
+
+ Modernizr.addTest('todataurljpeg', function() {
+ return !!Modernizr.canvas && canvas.toDataURL('image/jpeg').indexOf('data:image/jpeg') === 0;
+ });
+ Modernizr.addTest('todataurlpng', function() {
+ return !!Modernizr.canvas && canvas.toDataURL('image/png').indexOf('data:image/png') === 0;
+ });
+ Modernizr.addTest('todataurlwebp', function() {
+ var supports = false;
+
+ // firefox 3 throws an error when you use an "invalid" toDataUrl
+ try {
+ supports = !!Modernizr.canvas && canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0;
+ } catch (e) {}
+
+ return supports;
+ });
+
+
+/*!
+{
+ "name": "canvas winding support",
+ "property": ["canvaswinding"],
+ "tags": ["canvas"],
+ "async" : false,
+ "notes": [{
+ "name": "Article",
+ "href": "http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/"
+ }]
+}
+!*/
+/* DOC
+Determines if winding rules, which controls if a path can go clockwise or counterclockwise
+*/
+
+
+ Modernizr.addTest('canvaswinding', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ var ctx = createElement('canvas').getContext('2d');
+
+ ctx.rect(0, 0, 10, 10);
+ ctx.rect(2, 2, 6, 6);
+ return ctx.isPointInPath(5, 5, 'evenodd') === false;
+ });
+
+
+/*!
+{
+ "name": "Canvas text",
+ "property": "canvastext",
+ "caniuse": "canvas-text",
+ "tags": ["canvas", "graphics"],
+ "polyfills": ["canvastext"]
+}
+!*/
+/* DOC
+Detects support for the text APIs for `<canvas>` elements.
+*/
+
+ Modernizr.addTest('canvastext', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ return typeof createElement('canvas').getContext('2d').fillText == 'function';
+ });
+
+/*!
+{
+ "name": "Content Editable",
+ "property": "contenteditable",
+ "caniuse": "contenteditable",
+ "notes": [{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `contenteditable` attribute of elements, allowing their DOM text contents to be edited directly by the user.
+*/
+
+ Modernizr.addTest('contenteditable', function() {
+ // early bail out
+ if (!('contentEditable' in docElement)) {
+ return;
+ }
+
+ // some mobile browsers (android < 3.0, iOS < 5) claim to support
+ // contentEditable, but but don't really. This test checks to see
+ // confirms whether or not it actually supports it.
+
+ var div = createElement('div');
+ div.contentEditable = true;
+ return div.contentEditable === 'true';
+ });
+
+/*!
+{
+ "name": "Context menus",
+ "property": "contextmenu",
+ "caniuse": "menu",
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/html5/interactive-elements.html#context-menus"
+ },{
+ "name": "thewebrocks.com Demo",
+ "href": "http://thewebrocks.com/demos/context-menu/"
+ }],
+ "polyfills": ["jquery-contextmenu"]
+}
+!*/
+/* DOC
+Detects support for custom context menus.
+*/
+
+ Modernizr.addTest(
+ 'contextmenu',
+ ('contextMenu' in docElement && 'HTMLMenuItemElement' in window)
+ );
+
+/*!
+{
+ "name": "Cookies",
+ "property": "cookies",
+ "tags": ["storage"],
+ "authors": ["tauren"]
+}
+!*/
+/* DOC
+Detects whether cookie support is enabled.
+*/
+
+ // https://github.com/Modernizr/Modernizr/issues/191
+
+ Modernizr.addTest('cookies', function() {
+ // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking
+ // configurations. For example, when blocking cookies via the Advanced
+ // Privacy Settings in IE9, it always returns true. And there have been
+ // issues in the past with site-specific exceptions.
+ // Don't rely on it.
+
+ // try..catch because some in situations `document.cookie` is exposed but throws a
+ // SecurityError if you try to access it; e.g. documents created from data URIs
+ // or in sandboxed iframes (depending on flags/context)
+ try {
+ // Create cookie
+ document.cookie = 'cookietest=1';
+ var ret = document.cookie.indexOf('cookietest=') != -1;
+ // Delete cookie
+ document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
+ return ret;
+ }
+ catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Cross-Origin Resource Sharing",
+ "property": "cors",
+ "caniuse": "cors",
+ "authors": ["Theodoor van Donge"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS"
+ }],
+ "polyfills": ["pmxdr", "ppx", "flxhr"]
+}
+!*/
+/* DOC
+Detects support for Cross-Origin Resource Sharing: method of performing XMLHttpRequests across domains.
+*/
+
+ Modernizr.addTest('cors', 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest());
+
+/*!
+{
+ "name": "getRandomValues",
+ "property": "getrandomvalues",
+ "caniuse": "window.crypto.getRandomValues",
+ "tags": ["crypto"],
+ "authors": ["komachi"],
+ "notes": [{
+ "name": "W3C Editor’s Draft",
+ "href": "https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#RandomSource-method-getRandomValues"
+ }],
+ "polyfills": [
+ "polycrypt"
+ ]
+}
+!*/
+/* DOC
+Detects support for the window.crypto.getRandomValues for generate cryptographically secure random numbers
+*/
+
+ // In Safari <=5.0 `window.crypto` exists (for some reason) but is `undefined`, so we have to check
+ // it’s truthy before checking for existence of `getRandomValues`
+ var crypto = prefixed('crypto', window);
+ var supportsGetRandomValues;
+
+ // Safari 6.0 supports crypto.getRandomValues, but does not return the array,
+ // which is required by the spec, so we need to actually check.
+ if (crypto && 'getRandomValues' in crypto && 'Uint32Array' in window) {
+ var array = new Uint32Array(10);
+ var values = crypto.getRandomValues(array);
+ supportsGetRandomValues = values && is(values[0], 'number');
+ }
+
+ Modernizr.addTest('getrandomvalues', !!supportsGetRandomValues);
+
+/*!
+{
+ "name": "cssall",
+ "property": "cssall",
+ "notes": [{
+ "name": "Spec",
+ "href": "http://dev.w3.org/csswg/css-cascade/#all-shorthand"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `all` css property, which is a shorthand to reset all css properties (except direction and unicode-bidi) to their original value
+*/
+
+
+ Modernizr.addTest('cssall', 'all' in docElement.style);
+
+/*!
+{
+ "name": "CSS Animations",
+ "property": "cssanimations",
+ "caniuse": "css-animation",
+ "polyfills": ["transformie", "csssandpaper"],
+ "tags": ["css"],
+ "warnings": ["Android < 4 will pass this test, but can only animate a single property at a time"],
+ "notes": [{
+ "name" : "Article: 'Dispelling the Android CSS animation myths'",
+ "href": "http://goo.gl/OGw5Gm"
+ }]
+}
+!*/
+/* DOC
+Detects whether or not elements can be animated using CSS
+*/
+
+ Modernizr.addTest('cssanimations', testAllProps('animationName', 'a', true));
+
+/*!
+{
+ "name": "Appearance",
+ "property": "appearance",
+ "caniuse": "css-appearance",
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance"
+ },{
+ "name": "CSS-Tricks CSS Almanac: appearance",
+ "href": "http://css-tricks.com/almanac/properties/a/appearance/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `appearance` css property, which is used to make an
+element inherit the style of a standard user interface element. It can also be
+used to remove the default styles of an element, such as input and buttons.
+*/
+
+ Modernizr.addTest('appearance', testAllProps('appearance'));
+
+/*!
+{
+ "name": "CSS Background Blend Mode",
+ "property": "backgroundblendmode",
+ "caniuse": "css-backgroundblendmode",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "CSS Blend Modes could be the next big thing in Web Design",
+ "href": " https://medium.com/@bennettfeely/css-blend-modes-could-be-the-next-big-thing-in-web-design-6b51bf53743a"
+ }, {
+ "name": "Demo",
+ "href": "http://bennettfeely.com/gradients/"
+ }
+ ]
+}
+!*/
+/* DOC
+Detects the ability for the browser to composite backgrounds using blending modes similar to ones found in Photoshop or Illustrator.
+*/
+
+ Modernizr.addTest('backgroundblendmode', prefixed('backgroundBlendMode', 'text'));
+
+/*!
+{
+ "name": "CSS Background Clip Text",
+ "property": "backgroundcliptext",
+ "authors": ["ausi"],
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/image-under-text/"
+ },
+ {
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-clip"
+ },
+ {
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/199"
+ }
+ ]
+}
+!*/
+/* DOC
+Detects the ability to control specifies whether or not an element's background
+extends beyond its border in CSS
+*/
+
+ Modernizr.addTest('backgroundcliptext', function() {
+ return testAllProps('backgroundClip', 'text');
+ });
+
+/*!
+{
+ "name": "Background Position Shorthand",
+ "property": "bgpositionshorthand",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundposition_shorthand"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/CSS/background-position"
+ }, {
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/css3-background/#background-position"
+ }, {
+ "name": "Demo",
+ "href": "http://jsfiddle.net/Blink/bBXvt/"
+ }]
+}
+!*/
+/* DOC
+Detects if you can use the shorthand method to define multiple parts of an
+element's background-position simultaniously.
+
+eg `background-position: right 10px bottom 10px`
+*/
+
+ Modernizr.addTest('bgpositionshorthand', function() {
+ var elem = createElement('a');
+ var eStyle = elem.style;
+ var val = 'right 10px bottom 10px';
+ eStyle.cssText = 'background-position: ' + val + ';';
+ return (eStyle.backgroundPosition === val);
+ });
+
+/*!
+{
+ "name": "Background Position XY",
+ "property": "bgpositionxy",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundposition_xy"],
+ "authors": ["Allan Lei", "Brandom Aaron"],
+ "notes": [{
+ "name": "Demo",
+ "href": "http://jsfiddle.net/allanlei/R8AYS/"
+ }, {
+ "name": "Adapted From",
+ "href": "https://github.com/brandonaaron/jquery-cssHooks/blob/master/bgpos.js"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to control an element's background position using css
+*/
+
+ Modernizr.addTest('bgpositionxy', function() {
+ return testAllProps('backgroundPositionX', '3px', true) && testAllProps('backgroundPositionY', '5px', true);
+ });
+
+/*!
+{
+ "name": "Background Repeat",
+ "property": ["bgrepeatspace", "bgrepeatround"],
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundrepeat"],
+ "authors": ["Ryan Seddon"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-repeat"
+ }, {
+ "name": "Test Page",
+ "href": "http://jsbin.com/uzesun/"
+ }, {
+ "name": "Demo",
+ "href": "http://jsfiddle.net/ryanseddon/yMLTQ/6/"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to use round and space as properties for background-repeat
+*/
+
+ // Must value-test these
+ Modernizr.addTest('bgrepeatround', testAllProps('backgroundRepeat', 'round'));
+ Modernizr.addTest('bgrepeatspace', testAllProps('backgroundRepeat', 'space'));
+
+/*!
+{
+ "name": "Background Size",
+ "property": "backgroundsize",
+ "tags": ["css"],
+ "knownBugs": ["This will false positive in Opera Mini - http://github.com/Modernizr/Modernizr/issues/396"],
+ "notes": [{
+ "name": "Related Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/396"
+ }]
+}
+!*/
+
+ Modernizr.addTest('backgroundsize', testAllProps('backgroundSize', '100%', true));
+
+/*!
+{
+ "name": "Background Size Cover",
+ "property": "bgsizecover",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundsizecover"],
+ "notes": [{
+ "name" : "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-size"
+ }]
+}
+!*/
+
+ // Must test value, as this specifically tests the `cover` value
+ Modernizr.addTest('bgsizecover', testAllProps('backgroundSize', 'cover'));
+
+/*!
+{
+ "name": "Border Image",
+ "property": "borderimage",
+ "caniuse": "border-image",
+ "polyfills": ["css3pie"],
+ "knownBugs": ["Android < 2.0 is true, but has a broken implementation"],
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('borderimage', testAllProps('borderImage', 'url() 1', true));
+
+/*!
+{
+ "name": "Border Radius",
+ "property": "borderradius",
+ "caniuse": "border-radius",
+ "polyfills": ["css3pie"],
+ "tags": ["css"],
+ "notes": [{
+ "name": "Comprehensive Compat Chart",
+ "href": "http://muddledramblings.com/table-of-css3-border-radius-compliance"
+ }]
+}
+!*/
+
+ Modernizr.addTest('borderradius', testAllProps('borderRadius', '0px', true));
+
+/*!
+{
+ "name": "Box Shadow",
+ "property": "boxshadow",
+ "caniuse": "css-boxshadow",
+ "tags": ["css"],
+ "knownBugs": [
+ "WebOS false positives on this test.",
+ "The Kindle Silk browser false positives"
+ ]
+}
+!*/
+
+ Modernizr.addTest('boxshadow', testAllProps('boxShadow', '1px 1px', true));
+
+/*!
+{
+ "name": "Box Sizing",
+ "property": "boxsizing",
+ "caniuse": "css3-boxsizing",
+ "polyfills": ["borderboxmodel", "boxsizingpolyfill", "borderbox"],
+ "tags": ["css"],
+ "builderAliases": ["css_boxsizing"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/box-sizing"
+ },{
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/248"
+ }]
+}
+!*/
+
+ Modernizr.addTest('boxsizing', testAllProps('boxSizing', 'border-box', true) && (document.documentMode === undefined || document.documentMode > 7));
+
+/*!
+{
+ "name": "CSS Calc",
+ "property": "csscalc",
+ "caniuse": "calc",
+ "tags": ["css"],
+ "builderAliases": ["css_calc"],
+ "authors": ["@calvein"]
+}
+!*/
+/* DOC
+Method of allowing calculated values for length units. For example:
+
+```css
+//lem {
+ width: calc(100% - 3em);
+}
+```
+*/
+
+ Modernizr.addTest('csscalc', function() {
+ var prop = 'width:';
+ var value = 'calc(10px);';
+ var el = createElement('a');
+
+ el.style.cssText = prop + prefixes.join(value + prop);
+
+ return !!el.style.length;
+ });
+
+/*!
+{
+ "name": "CSS :checked pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "checked",
+ "tags": ["css"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/879"
+ }]
+}
+!*/
+
+ Modernizr.addTest('checked', function() {
+ return testStyles('#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}', function(elem) {
+ var cb = createElement('input');
+ cb.setAttribute('type', 'checkbox');
+ cb.setAttribute('checked', 'checked');
+ elem.appendChild(cb);
+ return cb.offsetLeft === 20;
+ });
+ });
+
+/*!
+{
+ "name": "CSS Font ch Units",
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "property": "csschunit",
+ "tags": ["css"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#font-relative-lengths"
+ }]
+}
+!*/
+
+ Modernizr.addTest('csschunit', function() {
+ var elemStyle = modElem.elem.style;
+ var supports;
+ try {
+ elemStyle.fontSize = '3ch';
+ supports = elemStyle.fontSize.indexOf('ch') !== -1;
+ } catch (e) {
+ supports = false;
+ }
+ return supports;
+ });
+
+/*!
+{
+ "name": "CSS Columns",
+ "property": "csscolumns",
+ "caniuse": "multicolumn",
+ "polyfills": ["css3multicolumnjs"],
+ "tags": ["css"]
+}
+!*/
+
+
+ (function() {
+
+ /* jshint -W053 */
+ Modernizr.addTest('csscolumns', function() {
+ var bool = false;
+ var test = testAllProps('columnCount');
+ try {
+ if (bool = !!test) {
+ bool = new Boolean(bool);
+ }
+ } catch (e) {}
+
+ return bool;
+ });
+
+ var props = ['Width', 'Span', 'Fill', 'Gap', 'Rule', 'RuleColor', 'RuleStyle', 'RuleWidth', 'BreakBefore', 'BreakAfter', 'BreakInside'];
+ var name, test;
+
+ for (var i = 0; i < props.length; i++) {
+ name = props[i].toLowerCase();
+ test = testAllProps('column' + props[i]);
+
+ // break-before, break-after & break-inside are not "column"-prefixed in spec
+ if (name === 'breakbefore' || name === 'breakafter' || name == 'breakinside') {
+ test = test || testAllProps(props[i]);
+ }
+
+ Modernizr.addTest('csscolumns.' + name, test);
+ }
+
+
+ })();
+
+
+/*!
+{
+ "name": "CSS Cubic Bezier Range",
+ "property": "cubicbezierrange",
+ "tags": ["css"],
+ "builderAliases": ["css_cubicbezierrange"],
+ "doc" : null,
+ "authors": ["@calvein"],
+ "warnings": ["cubic-bezier values can't be > 1 for Webkit until [bug #45761](https://bugs.webkit.org/show_bug.cgi?id=45761) is fixed"],
+ "notes": [{
+ "name": "Comprehensive Compat Chart",
+ "href": "http://muddledramblings.com/table-of-css3-border-radius-compliance"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cubicbezierrange', function() {
+ var el = createElement('a');
+ el.style.cssText = prefixes.join('transition-timing-function:cubic-bezier(1,0,0,1.1); ');
+ return !!el.style.length;
+ });
+
+/*!
+{
+ "name": "CSS Display run-in",
+ "property": "display-runin",
+ "authors": ["alanhogan"],
+ "tags": ["css"],
+ "builderAliases": ["css_displayrunin"],
+ "notes": [{
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/596-run-in/"
+ },{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/198"
+ }]
+}
+!*/
+
+ Modernizr.addTest('displayrunin', testAllProps('display', 'run-in'),
+ {aliases: ['display-runin']});
+
+/*!
+{
+ "name": "CSS Display table",
+ "property": "displaytable",
+ "caniuse": "css-table",
+ "authors": ["scottjehl"],
+ "tags": ["css"],
+ "builderAliases": ["css_displaytable"],
+ "notes": [{
+ "name": "Detects for all additional table display values",
+ "href": "http://pastebin.com/Gk9PeVaQ"
+ }]
+}
+!*/
+/* DOC
+`display: table` and `table-cell` test. (both are tested under one name `table-cell` )
+*/
+
+ // If a document is in rtl mode this test will fail so we force ltr mode on the injeced
+ // element https://github.com/Modernizr/Modernizr/issues/716
+ testStyles('#modernizr{display: table; direction: ltr}#modernizr div{display: table-cell; padding: 10px}', function(elem) {
+ var ret;
+ var child = elem.childNodes;
+ ret = child[0].offsetLeft < child[1].offsetLeft;
+ Modernizr.addTest('displaytable', ret, {aliases: ['display-table']});
+ }, 2);
+
+/*!
+{
+ "name": "CSS text-overflow ellipsis",
+ "property": "ellipsis",
+ "caniuse": "text-overflow",
+ "polyfills": [
+ "text-overflow"
+ ],
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('ellipsis', testAllProps('textOverflow', 'ellipsis'));
+
+/*!
+{
+ "name": "CSS.escape()",
+ "property": "cssescape",
+ "polyfills": [
+ "css-escape"
+ ],
+ "tags": [
+ "css",
+ "cssom"
+ ]
+}
+!*/
+/* DOC
+Tests for `CSS.escape()` support.
+*/
+
+ var CSS = window.CSS;
+ Modernizr.addTest('cssescape', CSS ? typeof CSS.escape == 'function' : false);
+
+/*!
+{
+ "name": "CSS Font ex Units",
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "property": "cssexunit",
+ "tags": ["css"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#font-relative-lengths"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cssexunit', function() {
+ var elemStyle = modElem.elem.style;
+ var supports;
+ try {
+ elemStyle.fontSize = '3ex';
+ supports = elemStyle.fontSize.indexOf('ex') !== -1;
+ } catch (e) {
+ supports = false;
+ }
+ return supports;
+ });
+
+/*!
+{
+ "name": "CSS Supports",
+ "property": "supports",
+ "caniuse": "css-featurequeries",
+ "tags": ["css"],
+ "builderAliases": ["css_supports"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://dev.w3.org/csswg/css3-conditional/#at-supports"
+ },{
+ "name": "Related Github Issue",
+ "href": "github.com/Modernizr/Modernizr/issues/648"
+ },{
+ "name": "W3 Info",
+ "href": "http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface"
+ }]
+}
+!*/
+
+ var newSyntax = 'CSS' in window && 'supports' in window.CSS;
+ var oldSyntax = 'supportsCSS' in window;
+ Modernizr.addTest('supports', newSyntax || oldSyntax);
+
+/*!
+{
+ "name": "CSS Filters",
+ "property": "cssfilters",
+ "caniuse": "css-filters",
+ "polyfills": ["polyfilter"],
+ "tags": ["css"],
+ "builderAliases": ["css_filters"],
+ "notes": [{
+ "name": "MDN article on CSS filters",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/filter"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cssfilters', function() {
+ if (Modernizr.supports) {
+ return testAllProps('filter', 'blur(2px)');
+ } else {
+ var el = createElement('a');
+ el.style.cssText = prefixes.join('filter:blur(2px); ');
+ // https://github.com/Modernizr/Modernizr/issues/615
+ // documentMode is needed for false positives in oldIE, please see issue above
+ return !!el.style.length && ((document.documentMode === undefined || document.documentMode > 9));
+ }
+ });
+
+
+/*!
+{
+ "name": "Flexbox",
+ "property": "flexbox",
+ "caniuse": "flexbox",
+ "tags": ["css"],
+ "notes": [{
+ "name": "The _new_ flexbox",
+ "href": "http://dev.w3.org/csswg/css3-flexbox"
+ }],
+ "warnings": [
+ "A `true` result for this detect does not imply that the `flex-wrap` property is supported; see the `flexwrap` detect."
+ ]
+}
+!*/
+/* DOC
+Detects support for the Flexible Box Layout model, a.k.a. Flexbox, which allows easy manipulation of layout order and sizing within a container.
+*/
+
+ Modernizr.addTest('flexbox', testAllProps('flexBasis', '1px', true));
+
+/*!
+{
+ "name": "Flexbox (legacy)",
+ "property": "flexboxlegacy",
+ "tags": ["css"],
+ "polyfills": ["flexie"],
+ "notes": [{
+ "name": "The _old_ flexbox",
+ "href": "http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('flexboxlegacy', testAllProps('boxDirection', 'reverse', true));
+
+/*!
+{
+ "name": "Flexbox (tweener)",
+ "property": "flexboxtweener",
+ "tags": ["css"],
+ "polyfills": ["flexie"],
+ "notes": [{
+ "name": "The _inbetween_ flexbox",
+ "href": "http://www.w3.org/TR/2011/WD-css3-flexbox-20111129/"
+ }],
+ "warnings": ["This represents an old syntax, not the latest standard syntax."]
+}
+!*/
+
+ Modernizr.addTest('flexboxtweener', testAllProps('flexAlign', 'end', true));
+
+/*!
+{
+ "name": "Flex Line Wrapping",
+ "property": "flexwrap",
+ "tags": ["css", "flexbox"],
+ "notes": [{
+ "name": "W3C Flexible Box Layout spec",
+ "href": "http://dev.w3.org/csswg/css3-flexbox"
+ }],
+ "warnings": [
+ "Does not imply a modern implementation – see documentation."
+ ]
+}
+!*/
+/* DOC
+Detects support for the `flex-wrap` CSS property, part of Flexbox, which isn’t present in all Flexbox implementations (notably Firefox).
+
+This featured in both the 'tweener' syntax (implemented by IE10) and the 'modern' syntax (implemented by others). This detect will return `true` for either of these implementations, as long as the `flex-wrap` property is supported. So to ensure the modern syntax is supported, use together with `Modernizr.flexbox`:
+
+```javascript
+if (Modernizr.flexbox && Modernizr.flexwrap) {
+ // Modern Flexbox with `flex-wrap` supported
+}
+else {
+ // Either old Flexbox syntax, or `flex-wrap` not supported
+}
+```
+*/
+
+ Modernizr.addTest('flexwrap', testAllProps('flexWrap', 'wrap', true));
+
+/*!
+{
+ "name": "@font-face",
+ "property": "fontface",
+ "authors": ["Diego Perini", "Mat Marquis"],
+ "tags": ["css"],
+ "knownBugs": [
+ "False Positive: WebOS http://github.com/Modernizr/Modernizr/issues/342",
+ "False Postive: WP7 http://github.com/Modernizr/Modernizr/issues/538"
+ ],
+ "notes": [{
+ "name": "@font-face detection routine by Diego Perini",
+ "href": "http://javascript.nwbox.com/CSSSupport/"
+ },{
+ "name": "Filament Group @font-face compatibility research",
+ "href": "https://docs.google.com/presentation/d/1n4NyG4uPRjAA8zn_pSQ_Ket0RhcWC6QlZ6LMjKeECo0/edit#slide=id.p"
+ },{
+ "name": "Filament Grunticon/@font-face device testing results",
+ "href": "https://docs.google.com/spreadsheet/ccc?key=0Ag5_yGvxpINRdHFYeUJPNnZMWUZKR2ItMEpRTXZPdUE#gid=0"
+ },{
+ "name": "CSS fonts on Android",
+ "href": "http://stackoverflow.com/questions/3200069/css-fonts-on-android"
+ },{
+ "name": "@font-face and Android",
+ "href": "http://archivist.incutio.com/viewlist/css-discuss/115960"
+ }]
+}
+!*/
+
+ var blacklist = (function() {
+ var ua = navigator.userAgent;
+ var wkvers = ua.match(/applewebkit\/([0-9]+)/gi) && parseFloat(RegExp.$1);
+ var webos = ua.match(/w(eb)?osbrowser/gi);
+ var wppre8 = ua.match(/windows phone/gi) && ua.match(/iemobile\/([0-9])+/gi) && parseFloat(RegExp.$1) >= 9;
+ var oldandroid = wkvers < 533 && ua.match(/android/gi);
+ return webos || oldandroid || wppre8;
+ }());
+ if (blacklist) {
+ Modernizr.addTest('fontface', false);
+ } else {
+ testStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule) {
+ var style = document.getElementById('smodernizr');
+ var sheet = style.sheet || style.styleSheet;
+ var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
+ var bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
+ Modernizr.addTest('fontface', bool);
+ });
+ }
+;
+/*!
+{
+ "name": "CSS Generated Content",
+ "property": "generatedcontent",
+ "tags": ["css"],
+ "warnings": ["Android won't return correct height for anything below 7px #738"],
+ "notes": [{
+ "name": "W3C CSS Selectors Level 3 spec",
+ "href": "http://www.w3.org/TR/css3-selectors/#gen-content"
+ },{
+ "name": "MDN article on :before",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/::before"
+ },{
+ "name": "MDN article on :after",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/::before"
+ }]
+}
+!*/
+
+ testStyles('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}', function(node) {
+ Modernizr.addTest('generatedcontent', node.offsetHeight >= 7);
+ });
+
+/*!
+{
+ "name": "CSS Gradients",
+ "caniuse": "css-gradients",
+ "property": "cssgradients",
+ "tags": ["css"],
+ "knownBugs": ["False-positives on webOS (https://github.com/Modernizr/Modernizr/issues/202)"],
+ "notes": [{
+ "name": "Webkit Gradient Syntax",
+ "href": "http://webkit.org/blog/175/introducing-css-gradients/"
+ },{
+ "name": "Mozilla Linear Gradient Syntax",
+ "href": "http://developer.mozilla.org/en/CSS/-moz-linear-gradient"
+ },{
+ "name": "Mozilla Radial Gradient Syntax",
+ "href": "http://developer.mozilla.org/en/CSS/-moz-radial-gradient"
+ },{
+ "name": "W3C Gradient Spec",
+ "href": "dev.w3.org/csswg/css3-images/#gradients-"
+ }]
+}
+!*/
+
+
+ Modernizr.addTest('cssgradients', function() {
+
+ var str1 = 'background-image:';
+ var str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));';
+ var str3 = 'linear-gradient(left top,#9f9, white);';
+
+ // standard syntax // trailing 'background-image:'
+ var css = str1 + prefixes.join(str3 + str1).slice(0, -str1.length);
+ if (Modernizr._config.usePrefixes) {
+ // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
+ css += str1 + '-webkit-' + str2;
+ }
+
+ var elem = createElement('a');
+ var style = elem.style;
+ style.cssText = css;
+
+ // IE6 returns undefined so cast to string
+ return ('' + style.backgroundImage).indexOf('gradient') > -1;
+ });
+
+/*!
+{
+ "name": "CSS HSLA Colors",
+ "caniuse": "css3-colors",
+ "property": "hsla",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('hsla', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background-color:hsla(120,40%,100%,.5)';
+ return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
+ });
+
+/*!
+{
+ "name": "CSS Hyphens",
+ "caniuse": "css-hyphens",
+ "property": ["csshyphens", "softhyphens", "softhyphensfind"],
+ "tags": ["css"],
+ "builderAliases": ["css_hyphens"],
+ "async" : true,
+ "authors": ["David Newton"],
+ "warnings": [
+ "These tests currently require document.body to be present",
+ "If loading Hyphenator.js via yepnope, be cautious of issue 158: http://code.google.com/p/hyphenator/issues/detail?id=158",
+ "This is very large – only include it if you absolutely need it"
+ ],
+ "notes": [{
+ "name": "The Current State of Hyphenation on the Web.",
+ "href": "http://davidnewton.ca/the-current-state-of-hyphenation-on-the-web"
+ },{
+ "name": "Hyphenation Test Page",
+ "href": "http://davidnewton.ca/demos/hyphenation/test.html"
+ },{
+ "name": "Hyphenation is Language Specific",
+ "href": " http://code.google.com/p/hyphenator/source/diff?spec=svn975&r=975&format=side&path=/trunk/Hyphenator.js#sc_svn975_313"
+ },{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/312"
+ }]
+}
+!*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var waitTime = 300;
+ setTimeout(runHyphenTest, waitTime);
+ // Wait 1000ms so we can hope for document.body
+ function runHyphenTest() {
+ if (!document.body && !document.getElementsByTagName('body')[0]) {
+ setTimeout(runHyphenTest, waitTime);
+ return;
+ }
+
+ // functional test of adding hyphens:auto
+ function test_hyphens_css() {
+ try {
+ /* create a div container and a span within that
+ * these have to be appended to document.body, otherwise some browsers can give false negative */
+ var div = createElement('div');
+ var span = createElement('span');
+ var divStyle = div.style;
+ var spanHeight = 0;
+ var spanWidth = 0;
+ var result = false;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ div.appendChild(span);
+ span.innerHTML = 'Bacon ipsum dolor sit amet jerky velit in culpa hamburger et. Laborum dolor proident, enim dolore duis commodo et strip steak. Salami anim et, veniam consectetur dolore qui tenderloin jowl velit sirloin. Et ad culpa, fatback cillum jowl ball tip ham hock nulla short ribs pariatur aute. Pig pancetta ham bresaola, ut boudin nostrud commodo flank esse cow tongue culpa. Pork belly bresaola enim pig, ea consectetur nisi. Fugiat officia turkey, ea cow jowl pariatur ullamco proident do laborum velit sausage. Magna biltong sint tri-tip commodo sed bacon, esse proident aliquip. Ullamco ham sint fugiat, velit in enim sed mollit nulla cow ut adipisicing nostrud consectetur. Proident dolore beef ribs, laborum nostrud meatball ea laboris rump cupidatat labore culpa. Shankle minim beef, velit sint cupidatat fugiat tenderloin pig et ball tip. Ut cow fatback salami, bacon ball tip et in shank strip steak bresaola. In ut pork belly sed mollit tri-tip magna culpa veniam, short ribs qui in andouille ham consequat. Dolore bacon t-bone, velit short ribs enim strip steak nulla. Voluptate labore ut, biltong swine irure jerky. Cupidatat excepteur aliquip salami dolore. Ball tip strip steak in pork dolor. Ad in esse biltong. Dolore tenderloin exercitation ad pork loin t-bone, dolore in chicken ball tip qui pig. Ut culpa tongue, sint ribeye dolore ex shank voluptate hamburger. Jowl et tempor, boudin pork chop labore ham hock drumstick consectetur tri-tip elit swine meatball chicken ground round. Proident shankle mollit dolore. Shoulder ut duis t-bone quis reprehenderit. Meatloaf dolore minim strip steak, laboris ea aute bacon beef ribs elit shank in veniam drumstick qui. Ex laboris meatball cow tongue pork belly. Ea ball tip reprehenderit pig, sed fatback boudin dolore flank aliquip laboris eu quis. Beef ribs duis beef, cow corned beef adipisicing commodo nisi deserunt exercitation. Cillum dolor t-bone spare ribs, ham hock est sirloin. Brisket irure meatloaf in, boudin pork belly sirloin ball tip. Sirloin sint irure nisi nostrud aliqua. Nostrud nulla aute, enim officia culpa ham hock. Aliqua reprehenderit dolore sunt nostrud sausage, ea boudin pork loin ut t-bone ham tempor. Tri-tip et pancetta drumstick laborum. Ham hock magna do nostrud in proident. Ex ground round fatback, venison non ribeye in.';
+
+ document.body.insertBefore(div, firstChild);
+
+ /* get size of unhyphenated text */
+ divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;text-justification:newspaper;';
+ spanHeight = span.offsetHeight;
+ spanWidth = span.offsetWidth;
+
+ /* compare size with hyphenated text */
+ divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;' +
+ 'text-justification:newspaper;' +
+ prefixes.join('hyphens:auto; ');
+
+ result = (span.offsetHeight != spanHeight || span.offsetWidth != spanWidth);
+
+ /* results and cleanup */
+ document.body.removeChild(div);
+ div.removeChild(span);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ // for the softhyphens test
+ function test_hyphens(delimiter, testWidth) {
+ try {
+ /* create a div container and a span within that
+ * these have to be appended to document.body, otherwise some browsers can give false negative */
+ var div = createElement('div');
+ var span = createElement('span');
+ var divStyle = div.style;
+ var spanSize = 0;
+ var result = false;
+ var result1 = false;
+ var result2 = false;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ divStyle.cssText = 'position:absolute;top:0;left:0;overflow:visible;width:1.25em;';
+ div.appendChild(span);
+ document.body.insertBefore(div, firstChild);
+
+
+ /* get height of unwrapped text */
+ span.innerHTML = 'mm';
+ spanSize = span.offsetHeight;
+
+ /* compare height w/ delimiter, to see if it wraps to new line */
+ span.innerHTML = 'm' + delimiter + 'm';
+ result1 = (span.offsetHeight > spanSize);
+
+ /* if we're testing the width too (i.e. for soft-hyphen, not zws),
+ * this is because tested Blackberry devices will wrap the text but not display the hyphen */
+ if (testWidth) {
+ /* get width of wrapped, non-hyphenated text */
+ span.innerHTML = 'm<br />m';
+ spanSize = span.offsetWidth;
+
+ /* compare width w/ wrapped w/ delimiter to see if hyphen is present */
+ span.innerHTML = 'm' + delimiter + 'm';
+ result2 = (span.offsetWidth > spanSize);
+ } else {
+ result2 = true;
+ }
+
+ /* results and cleanup */
+ if (result1 === true && result2 === true) { result = true; }
+ document.body.removeChild(div);
+ div.removeChild(span);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ // testing if in-browser Find functionality will work on hyphenated text
+ function test_hyphens_find(delimiter) {
+ try {
+ /* create a dummy input for resetting selection location, and a div container
+ * these have to be appended to document.body, otherwise some browsers can give false negative
+ * div container gets the doubled testword, separated by the delimiter
+ * Note: giving a width to div gives false positive in iOS Safari */
+ var dummy = createElement('input');
+ var div = createElement('div');
+ var testword = 'lebowski';
+ var result = false;
+ var textrange;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ div.innerHTML = testword + delimiter + testword;
+
+ document.body.insertBefore(div, firstChild);
+ document.body.insertBefore(dummy, div);
+
+
+ /* reset the selection to the dummy input element, i.e. BEFORE the div container
+ * stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area */
+ if (dummy.setSelectionRange) {
+ dummy.focus();
+ dummy.setSelectionRange(0, 0);
+ } else if (dummy.createTextRange) {
+ textrange = dummy.createTextRange();
+ textrange.collapse(true);
+ textrange.moveEnd('character', 0);
+ textrange.moveStart('character', 0);
+ textrange.select();
+ }
+
+ /* try to find the doubled testword, without the delimiter */
+ if (window.find) {
+ result = window.find(testword + testword);
+ } else {
+ try {
+ textrange = window.self.document.body.createTextRange();
+ result = textrange.findText(testword + testword);
+ } catch (e) {
+ result = false;
+ }
+ }
+
+ document.body.removeChild(div);
+ document.body.removeChild(dummy);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ addTest('csshyphens', function() {
+
+ if (!testAllProps('hyphens', 'auto', true)) {
+ return false;
+ }
+
+ /* Chrome lies about its hyphens support so we need a more robust test
+ crbug.com/107111
+ */
+ try {
+ return test_hyphens_css();
+ } catch (e) {
+ return false;
+ }
+ });
+
+ addTest('softhyphens', function() {
+ try {
+ // use numeric entity instead of ­ in case it's XHTML
+ return test_hyphens('­', true) && test_hyphens('​', false);
+ } catch (e) {
+ return false;
+ }
+ });
+
+ addTest('softhyphensfind', function() {
+ try {
+ return test_hyphens_find('­') && test_hyphens_find('​');
+ } catch (e) {
+ return false;
+ }
+ });
+
+ }
+ });
+
+/*!
+{
+ "name": "CSS :invalid pseudo-class",
+ "property": "cssinvalid",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid"
+ }]
+}
+!*/
+/* DOC
+ Detects support for the ':invalid' CSS pseudo-class.
+*/
+
+ Modernizr.addTest('cssinvalid', function() {
+ return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:invalid{width:50px}', function(elem) {
+ var input = createElement('input');
+ input.required = true;
+ elem.appendChild(input);
+ return input.clientWidth > 10;
+ });
+ });
+
+/*!
+{
+ "name": "CSS :last-child pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "lastchild",
+ "tags": ["css"],
+ "builderAliases": ["css_lastchild"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/304"
+ }]
+}
+!*/
+
+ testStyles('#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}', function(elem) {
+ Modernizr.addTest('lastchild', elem.lastChild.offsetWidth > elem.firstChild.offsetWidth);
+ }, 2);
+
+/*!
+{
+ "name": "CSS Mask",
+ "caniuse": "css-masks",
+ "property": "cssmask",
+ "tags": ["css"],
+ "builderAliases": ["css_mask"],
+ "notes": [
+ {
+ "name": "Webkit blog on CSS Masks",
+ "href": "http://www.webkit.org/blog/181/css-masks/"
+ },
+ {
+ "name": "Safari Docs",
+ "href": "http://developer.apple.com/library/safari/#documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Masks/Masks.html"
+ },
+ {
+ "name": "Mozilla css svg mask (not this)",
+ "href": "http://developer.mozilla.org/en/CSS/mask"
+ },
+ {
+ "name": "Combine with clippaths for awesomeness",
+ "href": "http://generic.cx/for/webkit/test.html"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('cssmask', testAllProps('maskRepeat', 'repeat-x', true));
+
+/*!
+{
+ "name": "CSS Media Queries",
+ "caniuse": "css-mediaqueries",
+ "property": "mediaqueries",
+ "tags": ["css"],
+ "builderAliases": ["css_mediaqueries"]
+}
+!*/
+
+ Modernizr.addTest('mediaqueries', mq('only all'));
+
+/*!
+{
+ "name": "CSS Multiple Backgrounds",
+ "caniuse": "multibackgrounds",
+ "property": "multiplebgs",
+ "tags": ["css"]
+}
+!*/
+
+ // Setting multiple images AND a color on the background shorthand property
+ // and then querying the style.background property value for the number of
+ // occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
+
+ Modernizr.addTest('multiplebgs', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background:url(https://),url(https://),red url(https://)';
+
+ // If the UA supports multiple backgrounds, there should be three occurrences
+ // of the string "url(" in the return value for elemStyle.background
+ return (/(url\s*\(.*?){3}/).test(style.background);
+ });
+
+/*!
+{
+ "name": "CSS :nth-child pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "nthchild",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/685"
+ },
+ {
+ "name": "Sitepoint :nth-child documentation",
+ "href": "http://reference.sitepoint.com/css/pseudoclass-nthchild"
+ }
+ ],
+ "authors": ["@emilchristensen"],
+ "warnings": ["Known false negative in Safari 3.1 and Safari 3.2.2"]
+}
+!*/
+/* DOC
+Detects support for the ':nth-child()' CSS pseudo-selector.
+*/
+
+ // 5 `<div>` elements with `1px` width are created.
+ // Then every other element has its `width` set to `2px`.
+ // A Javascript loop then tests if the `<div>`s have the expected width
+ // using the modulus operator.
+ testStyles('#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}', function(elem) {
+ Modernizr.addTest('nthchild', function() {
+ var elems = elem.getElementsByTagName('div'),
+ test = true;
+
+ for (var i = 0; i < 5; i++) {
+ test = test && elems[i].offsetWidth === i % 2 + 1;
+ }
+
+ return test;
+ });
+ }, 5);
+
+/*!
+{
+ "name": "CSS Object Fit",
+ "caniuse": "object-fit",
+ "property": "objectfit",
+ "tags": ["css"],
+ "builderAliases": ["css_objectfit"],
+ "notes": [{
+ "name": "Opera Article on Object Fit",
+ "href": "http://dev.opera.com/articles/view/css3-object-fit-object-position/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('objectfit', !!prefixed('objectFit'), {aliases: ['object-fit']});
+
+/*!
+{
+ "name": "CSS Opacity",
+ "caniuse": "css-opacity",
+ "property": "opacity",
+ "tags": ["css"]
+}
+!*/
+
+ // Browsers that actually have CSS Opacity implemented have done so
+ // according to spec, which means their return values are within the
+ // range of [0.0,1.0] - including the leading zero.
+
+ Modernizr.addTest('opacity', function() {
+ var style = createElement('a').style;
+ style.cssText = prefixes.join('opacity:.55;');
+
+ // The non-literal . in this regex is intentional:
+ // German Chrome returns this value as 0,55
+ // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
+ return (/^0.55$/).test(style.opacity);
+ });
+
+/*!
+{
+ "name": "CSS Overflow Scrolling",
+ "property": "overflowscrolling",
+ "tags": ["css"],
+ "builderAliases": ["css_overflow_scrolling"],
+ "warnings": ["Introduced in iOS5b2. API is subject to change."],
+ "notes": [{
+ "name": "Article on iOS overflow scrolling",
+ "href": "http://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('overflowscrolling', testAllProps('overflowScrolling', 'touch', true));
+
+/*!
+{
+ "name": "CSS Pointer Events",
+ "caniuse": "pointer-events",
+ "property": "csspointerevents",
+ "authors": ["ausi"],
+ "tags": ["css"],
+ "builderAliases": ["css_pointerevents"],
+ "notes": [
+ {
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/pointer-events"
+ },{
+ "name": "Test Project Page",
+ "href": "http://ausi.github.com/Feature-detection-technique-for-pointer-events/"
+ },{
+ "name": "Test Project Wiki",
+ "href": "http://github.com/ausi/Feature-detection-technique-for-pointer-events/wiki"
+ },
+ {
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/80"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('csspointerevents', function() {
+ var style = createElement('a').style;
+ style.cssText = 'pointer-events:auto';
+ return style.pointerEvents === 'auto';
+ });
+
+/*!
+{
+ "name": "CSS position: sticky",
+ "property": "csspositionsticky",
+ "tags": ["css"],
+ "builderAliases": ["css_positionsticky"],
+ "notes": [{
+ "name": "Chrome bug report",
+ "href":"https://code.google.com/p/chromium/issues/detail?id=322972"
+ }],
+ "warnings": [ "using position:sticky on anything but top aligned elements is buggy in Chrome < 37 and iOS <=7+" ]
+}
+!*/
+
+ // Sticky positioning - constrains an element to be positioned inside the
+ // intersection of its container box, and the viewport.
+ Modernizr.addTest('csspositionsticky', function() {
+ var prop = 'position:';
+ var value = 'sticky';
+ var el = createElement('a');
+ var mStyle = el.style;
+
+ mStyle.cssText = prop + prefixes.join(value + ';' + prop).slice(0, -prop.length);
+
+ return mStyle.position.indexOf(value) !== -1;
+ });
+
+/*!
+{
+ "name": "CSS Generated Content Animations",
+ "property": "csspseudoanimations",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csspseudoanimations', function() {
+ var result = false;
+
+ if (!Modernizr.cssanimations || !window.getComputedStyle) {
+ return result;
+ }
+
+ var styles = [
+ '@', Modernizr._prefixes.join('keyframes csspseudoanimations { from { font-size: 10px; } }@').replace(/\@$/, ''),
+ '#modernizr:before { content:" "; font-size:5px;',
+ Modernizr._prefixes.join('animation:csspseudoanimations 1ms infinite;'),
+ '}'
+ ].join('');
+
+ Modernizr.testStyles(styles, function(elem) {
+ result = window.getComputedStyle(elem, ':before').getPropertyValue('font-size') === '10px';
+ });
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Transitions",
+ "property": "csstransitions",
+ "caniuse": "css-transitions",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csstransitions', testAllProps('transition', 'all', true));
+
+/*!
+{
+ "name": "CSS Generated Content Transitions",
+ "property": "csspseudotransitions",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csspseudotransitions', function() {
+ var result = false;
+
+ if (!Modernizr.csstransitions || !window.getComputedStyle) {
+ return result;
+ }
+
+ var styles =
+ '#modernizr:before { content:" "; font-size:5px;' + Modernizr._prefixes.join('transition:0s 100s;') + '}' +
+ '#modernizr.trigger:before { font-size:10px; }';
+
+ Modernizr.testStyles(styles, function(elem) {
+ // Force rendering of the element's styles so that the transition will trigger
+ window.getComputedStyle(elem, ':before').getPropertyValue('font-size');
+ elem.className += 'trigger';
+ result = window.getComputedStyle(elem, ':before').getPropertyValue('font-size') === '5px';
+ });
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Reflections",
+ "caniuse": "css-reflections",
+ "property": "cssreflections",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('cssreflections', testAllProps('boxReflect', 'above', true));
+
+/*!
+{
+ "name": "CSS Regions",
+ "caniuse": "css-regions",
+ "authors": ["Mihai Balan"],
+ "property": "regions",
+ "tags": ["css"],
+ "builderAliases": ["css_regions"],
+ "notes": [{
+ "name": "W3C Specification",
+ "href": "http://www.w3.org/TR/css3-regions/"
+ }]
+}
+!*/
+
+ // We start with a CSS parser test then we check page geometry to see if it's affected by regions
+ // Later we might be able to retire the second part, as WebKit builds with the false positives die out
+
+ Modernizr.addTest('regions', function() {
+
+ if (isSVG) {
+ // css regions don't work inside of SVG elements. Rather than update the
+ // below test to work in an SVG context, just exit early to save bytes
+ return false;
+ }
+
+ /* Get the 'flowFrom' property name available in the browser. Either default or vendor prefixed.
+ If the property name can't be found we'll get Boolean 'false' and fail quickly */
+ var flowFromProperty = Modernizr.prefixed('flowFrom');
+ var flowIntoProperty = Modernizr.prefixed('flowInto');
+ var result = false;
+
+ if (!flowFromProperty || !flowIntoProperty) {
+ return result;
+ }
+
+ /* If CSS parsing is there, try to determine if regions actually work. */
+ var iframeContainer = createElement('iframe');
+ var container = createElement('div');
+ var content = createElement('div');
+ var region = createElement('div');
+
+ /* we create a random, unlikely to be generated flow number to make sure we don't
+ clash with anything more vanilla, like 'flow', or 'article', or 'f1' */
+ var flowName = 'modernizr_flow_for_regions_check';
+
+ /* First create a div with two adjacent divs inside it. The first will be the
+ content, the second will be the region. To be able to distinguish between the two,
+ we'll give the region a particular padding */
+ content.innerText = 'M';
+ container.style.cssText = 'top: 150px; left: 150px; padding: 0px;';
+ region.style.cssText = 'width: 50px; height: 50px; padding: 42px;';
+
+ region.style[flowFromProperty] = flowName;
+ container.appendChild(content);
+ container.appendChild(region);
+ docElement.appendChild(container);
+
+ /* Now compute the bounding client rect, before and after attempting to flow the
+ content div in the region div. If regions are enabled, the after bounding rect
+ should reflect the padding of the region div.*/
+ var flowedRect, delta;
+ var plainRect = content.getBoundingClientRect();
+
+
+ content.style[flowIntoProperty] = flowName;
+ flowedRect = content.getBoundingClientRect();
+
+ delta = parseInt(flowedRect.left - plainRect.left, 10);
+ docElement.removeChild(container);
+
+ if (delta == 42) {
+ result = true;
+ } else {
+ /* IE only allows for the content to come from iframes. This has the
+ * side effect of automatic collapsing of iframes once they get the flow-into
+ * property set. checking for a change on the height allows us to detect this
+ * in a sync way, without having to wait for a frame to load */
+
+ docElement.appendChild(iframeContainer);
+ plainRect = iframeContainer.getBoundingClientRect();
+ iframeContainer.style[flowIntoProperty] = flowName;
+ flowedRect = iframeContainer.getBoundingClientRect();
+
+ if (plainRect.height > 0 && plainRect.height !== flowedRect.height && flowedRect.height === 0) {
+ result = true;
+ }
+ }
+
+ content = region = container = iframeContainer = undefined;
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Font rem Units",
+ "caniuse": "rem",
+ "authors": ["nsfmc"],
+ "property": "cssremunit",
+ "tags": ["css"],
+ "builderAliases": ["css_remunit"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#relative0"
+ },{
+ "name": "Font Size with rem by Jonathan Snook",
+ "href": "http://snook.ca/archives/html_and_css/font-size-with-rem"
+ }]
+}
+!*/
+
+ // "The 'rem' unit ('root em') is relative to the computed
+ // value of the 'font-size' value of the root element."
+ // you can test by checking if the prop was ditched
+
+ Modernizr.addTest('cssremunit', function() {
+ var style = createElement('a').style;
+ try {
+ style.fontSize = '3rem';
+ }
+ catch (e) {}
+ return (/rem/).test(style.fontSize);
+ });
+
+/*!
+{
+ "name": "CSS UI Resize",
+ "property": "cssresize",
+ "caniuse": "css-resize",
+ "tags": ["css"],
+ "builderAliases": ["css_resize"],
+ "notes": [{
+ "name": "W3C Specification",
+ "href": "http://www.w3.org/TR/css3-ui/#resize"
+ },{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/CSS/resize"
+ }]
+}
+!*/
+/* DOC
+Test for CSS 3 UI "resize" property
+*/
+
+ Modernizr.addTest('cssresize', testAllProps('resize', 'both', true));
+
+/*!
+{
+ "name": "CSS rgba",
+ "caniuse": "css3-colors",
+ "property": "rgba",
+ "tags": ["css"],
+ "notes": [{
+ "name": "CSSTricks Tutorial",
+ "href": "http://css-tricks.com/rgba-browser-support/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('rgba', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background-color:rgba(150,255,150,.5)';
+
+ return ('' + style.backgroundColor).indexOf('rgba') > -1;
+ });
+
+/*!
+{
+ "name": "CSS Stylable Scrollbars",
+ "property": "cssscrollbar",
+ "tags": ["css"],
+ "builderAliases": ["css_scrollbars"]
+}
+!*/
+
+ testStyles('#modernizr{overflow: scroll; width: 40px; height: 40px; }#' + prefixes
+ .join('scrollbar{width:0px}' + ' #modernizr::')
+ .split('#')
+ .slice(1)
+ .join('#') + 'scrollbar{width:0px}',
+ function(node) {
+ Modernizr.addTest('cssscrollbar', node.scrollWidth == 40);
+ });
+
+/*!
+{
+ "name": "CSS Shapes",
+ "property": "shapes",
+ "tags": ["css"],
+ "notes": [{
+ "name": "CSS Shapes W3C specification",
+ "href": "http://www.w3.org/TR/css-shapes"
+ },{
+ "name": "Examples from Adobe",
+ "href": "http://html.adobe.com/webplatform/layout/shapes"
+ }, {
+ "name": "Samples showcasing uses of Shapes",
+ "href": "http://codepen.io/collection/qFesk"
+ }]
+}
+!*/
+
+ Modernizr.addTest('shapes', testAllProps('shapeOutside', 'content-box', true));
+
+/*!
+{
+ "name": "CSS general sibling selector",
+ "caniuse": "css-sel3",
+ "property": "siblinggeneral",
+ "tags": ["css"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/889"
+ }]
+}
+!*/
+
+ Modernizr.addTest('siblinggeneral', function() {
+ return testStyles('#modernizr div {width:100px} #modernizr div ~ div {width:200px;display:block}', function(elem) {
+ return elem.lastChild.offsetWidth == 200;
+ }, 2);
+ });
+
+/*!
+{
+ "name": "CSS Subpixel Fonts",
+ "property": "subpixelfont",
+ "tags": ["css"],
+ "builderAliases": ["css_subpixelfont"],
+ "authors": [
+ "@derSchepp",
+ "@gerritvanaaken",
+ "@rodneyrehm",
+ "@yatil",
+ "@ryanseddon"
+ ],
+ "notes": [{
+ "name": "Origin Test",
+ "href": "https://github.com/gerritvanaaken/subpixeldetect"
+ }]
+}
+!*/
+
+ /*
+ * (to infer if GDI or DirectWrite is used on Windows)
+ */
+ testStyles(
+ '#modernizr{position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;}#subpixel{float: left; font-size: 33.3333%;}',
+ function(elem) {
+ var subpixel = elem.firstChild;
+ subpixel.innerHTML = 'This is a text written in Arial';
+ Modernizr.addTest('subpixelfont', window.getComputedStyle ?
+ window.getComputedStyle(subpixel, null).getPropertyValue('width') !== '44px'
+ : false);
+ }, 1, ['subpixel']);
+
+/*!
+{
+ "name": "CSS :target pseudo-class",
+ "caniuse": "css-sel3",
+ "property": "target",
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:target"
+ }],
+ "authors": ["@zachleat"],
+ "warnings": ["Opera Mini supports :target but doesn't update the hash for anchor links."]
+}
+!*/
+/* DOC
+Detects support for the ':target' CSS pseudo-class.
+*/
+
+ // querySelector
+ Modernizr.addTest('target', function() {
+ var doc = window.document;
+ if (!('querySelectorAll' in doc)) {
+ return false;
+ }
+
+ try {
+ doc.querySelectorAll(':target');
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "CSS text-align-last",
+ "property": "textalignlast",
+ "tags": ["css"],
+ "knownBugs": ["IE does not support the 'start' or 'end' values."],
+ "notes": [{
+ "name": "Quicksmode",
+ "href": "http://www.quirksmode.org/css/text/textalignlast.html"
+ },{
+ "name": "MDN",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last"
+ }]
+}
+!*/
+
+ Modernizr.addTest('textalignlast', testAllProps('textAlignLast'));
+
+/*!
+{
+ "name": "CSS textshadow",
+ "property": "textshadow",
+ "caniuse": "css-textshadow",
+ "tags": ["css"],
+ "knownBugs": ["FF3.0 will false positive on this test"]
+}
+!*/
+
+ Modernizr.addTest('textshadow', testProp('textShadow', '1px 1px'));
+
+/*!
+{
+ "name": "CSS Transforms",
+ "property": "csstransforms",
+ "caniuse": "transforms2d",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csstransforms', function() {
+ // Android < 3.0 is buggy, so we sniff and blacklist
+ // http://git.io/hHzL7w
+ return navigator.userAgent.indexOf('Android 2.') === -1 &&
+ testAllProps('transform', 'scale(1)', true);
+ });
+
+/*!
+{
+ "name": "CSS Transforms 3D",
+ "property": "csstransforms3d",
+ "caniuse": "transforms3d",
+ "tags": ["css"],
+ "warnings": [
+ "Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004"
+ ]
+}
+!*/
+
+ Modernizr.addTest('csstransforms3d', function() {
+ var ret = !!testAllProps('perspective', '1px', true);
+ var usePrefix = Modernizr._config.usePrefixes;
+
+ // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
+ // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
+ // some conditions. As a result, Webkit typically recognizes the syntax but
+ // will sometimes throw a false positive, thus we must do a more thorough check:
+ if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {
+ var mq;
+ // Use CSS Conditional Rules if available
+ if (Modernizr.supports) {
+ mq = '@supports (perspective: 1px)';
+ } else {
+ // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.
+ // `@media (transform-3d),(-webkit-transform-3d){ ... }`
+ mq = '@media (transform-3d)';
+ if (usePrefix) {
+ mq += ',(-webkit-transform-3d)';
+ }
+ }
+ // If loaded inside the body tag and the test element inherits any padding, margin or borders it will fail #740
+ mq += '{#modernizr{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0}}';
+
+ testStyles(mq, function(elem) {
+ ret = elem.offsetLeft === 9 && elem.offsetHeight === 5;
+ });
+ }
+
+ return ret;
+ });
+
+/*!
+{
+ "name": "CSS Transform Style preserve-3d",
+ "property": "preserve3d",
+ "authors": ["edmellum"],
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
+ },{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/762"
+ }]
+}
+!*/
+/* DOC
+Detects support for `transform-style: preserve-3d`, for getting a proper 3D perspective on elements.
+*/
+
+ Modernizr.addTest('preserve3d', testAllProps('transformStyle', 'preserve-3d'));
+
+/*!
+{
+ "name": "CSS user-select",
+ "property": "userselect",
+ "caniuse": "user-select-none",
+ "authors": ["ryan seddon"],
+ "tags": ["css"],
+ "builderAliases": ["css_userselect"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/250"
+ }]
+}
+!*/
+
+ //https://github.com/Modernizr/Modernizr/issues/250
+ Modernizr.addTest('userselect', testAllProps('userSelect', 'none', true));
+
+/*!
+{
+ "name": "CSS :valid pseudo-class",
+ "property": "cssvalid",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:valid"
+ }]
+}
+!*/
+/* DOC
+ Detects support for the ':valid' CSS pseudo-class.
+*/
+
+ Modernizr.addTest('cssvalid', function() {
+ return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:valid{width:50px}', function(elem) {
+ var input = createElement('input');
+ elem.appendChild(input);
+ return input.clientWidth > 10;
+ });
+ });
+
+/*!
+{
+ "name": "CSS vh unit",
+ "property": "cssvhunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vhunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "Similar JSFiddle",
+ "href": "http://jsfiddle.net/FWeinb/etnYC/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr { height: 50vh; }', function(elem) {
+ var height = parseInt(window.innerHeight / 2, 10);
+ var compStyle = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['height'], 10);
+ Modernizr.addTest('cssvhunit', compStyle == height);
+ });
+
+
+ /**
+ * roundedEquals takes two integers and checks if the first is within 1 of the second
+ *
+ * @access private
+ * @function roundedEquals
+ * @param {number} a
+ * @param {number} b
+ * @returns {boolean}
+ */
+
+ function roundedEquals(a, b) {
+ return a - 1 === b || a === b || a + 1 === b;
+ }
+
+ ;
+/*!
+{
+ "name": "CSS vmax unit",
+ "property": "cssvmaxunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vmaxunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/glsee/JDsWQ/4/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr1{width: 50vmax}#modernizr2{width:50px;height:50px;overflow:scroll}', function(node) {
+ var elem = node.childNodes[1];
+ var scroller = node.childNodes[0];
+ var scrollbarWidth = parseInt((scroller.offsetWidth - scroller.clientWidth) / 2, 10);
+
+ var one_vw = docElement.clientWidth / 100;
+ var one_vh = docElement.clientHeight / 100;
+ var expectedWidth = parseInt(Math.max(one_vw, one_vh) * 50, 10);
+ var compWidth = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['width'], 10);
+
+ Modernizr.addTest('cssvmaxunit', roundedEquals(expectedWidth, compWidth) || roundedEquals(expectedWidth, compWidth - scrollbarWidth));
+ }, 2);
+
+/*!
+{
+ "name": "CSS vmin unit",
+ "property": "cssvminunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vminunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/glsee/JRmdq/8/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr1{width: 50vm;width:50vmin}#modernizr2{width:50px;height:50px;overflow:scroll}', function(node) {
+ var elem = node.childNodes[1];
+ var scroller = node.childNodes[0];
+ var scrollbarWidth = parseInt((scroller.offsetWidth - scroller.clientWidth) / 2, 10);
+
+ var one_vw = docElement.clientWidth / 100;
+ var one_vh = docElement.clientHeight / 100;
+ var expectedWidth = parseInt(Math.min(one_vw, one_vh) * 50, 10);
+ var compWidth = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['width'], 10);
+
+ Modernizr.addTest('cssvminunit', roundedEquals(expectedWidth, compWidth) || roundedEquals(expectedWidth, compWidth - scrollbarWidth));
+ }, 2);
+
+/*!
+{
+ "name": "CSS vw unit",
+ "property": "cssvwunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vwunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/FWeinb/etnYC/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr { width: 50vw; }', function(elem) {
+ var width = parseInt(window.innerWidth / 2, 10);
+ var compStyle = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle).width, 10);
+
+ Modernizr.addTest('cssvwunit', compStyle == width);
+ });
+
+/*!
+{
+ "name": "will-change",
+ "property": "willchange",
+ "notes": [{
+ "name": "Spec",
+ "href": "http://tabatkins.github.io/specs/css-will-change/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `will-change` css property, which formally signals to the
+browser that an element will be animating.
+*/
+
+ Modernizr.addTest('willchange', 'willChange' in docElement.style);
+
+/*!
+{
+ "name": "CSS wrap-flow",
+ "property": "wrapflow",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "W3C Exclusions spec",
+ "href": "http://www.w3.org/TR/css3-exclusions"
+ },
+ {
+ "name": "Example by Adobe",
+ "href": "http://html.adobe.com/webstandards/cssexclusions"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('wrapflow', function() {
+ var prefixedProperty = prefixed('wrapFlow');
+ if (!prefixedProperty || isSVG) {
+ return false;
+ }
+
+ var wrapFlowProperty = prefixedProperty.replace(/([A-Z])/g, function(str, m1) { return '-' + m1.toLowerCase(); }).replace(/^ms-/, '-ms-');
+
+ /* If the CSS parsing is there we need to determine if wrap-flow actually works to avoid false positive cases, e.g. the browser parses
+ the property, but it hasn't got the implementation for the functionality yet. */
+ var container = createElement('div');
+ var exclusion = createElement('div');
+ var content = createElement('span');
+
+ /* First we create a div with two adjacent divs inside it. The first div will be the content, the second div will be the exclusion area.
+ We use the "wrap-flow: end" property to test the actual behavior. (http://dev.w3.org/csswg/css3-exclusions/#wrap-flow-property)
+ The wrap-flow property is applied to the exclusion area what has a 50px left offset and a 100px width.
+ If the wrap-flow property is working correctly then the content should start after the exclusion area, so the content's left offset should be 150px. */
+ exclusion.style.cssText = 'position: absolute; left: 50px; width: 100px; height: 20px;' + wrapFlowProperty + ':end;';
+ content.innerText = 'X';
+
+ container.appendChild(exclusion);
+ container.appendChild(content);
+ docElement.appendChild(container);
+
+ var leftOffset = content.offsetLeft;
+
+ docElement.removeChild(container);
+ exclusion = content = container = undefined;
+
+ return (leftOffset == 150);
+ });
+
+/*!
+{
+ "name": "CustomEvent",
+ "property": "customevent",
+ "tags": ["customevent"],
+ "authors": ["Alberto Elias"],
+ "notes": [{
+ "name": "W3C DOM reference",
+ "href": "http://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/docs/Web/API/CustomEvent"
+ }],
+ "polyfills": ["eventlistener"]
+}
+!*/
+/* DOC
+
+Detects support for CustomEvent.
+
+*/
+
+ Modernizr.addTest('customevent', 'CustomEvent' in window && typeof window.CustomEvent === 'function');
+
+/*!
+{
+ "name": "Custom protocol handler",
+ "property": "customprotocolhandler",
+ "authors": ["Ben Schwarz"],
+ "builderAliases": ["custom_protocol_handler"],
+ "notes": [{
+ "name": "WHATWG overview",
+ "href": "http://developers.whatwg.org/timers.html#custom-handlers"
+ },{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.registerProtocolHandler"
+ }],
+ "warnings": [],
+ "polyfills": []
+}
+!*/
+/* DOC
+Detects support for the `window.registerProtocolHandler()` API to allow websites to register themselves as possible handlers for particular protocols.
+*/
+
+ Modernizr.addTest('customprotocolhandler', function() {
+ // early bailout where it doesn't exist at all
+ if (!navigator.registerProtocolHandler) {
+ return false;
+ }
+
+ // registerProtocolHandler was stubbed in webkit for a while, and didn't
+ // actually do anything. We intentionally set it improperly to test for
+ // the proper sort of failure
+ try {
+ navigator.registerProtocolHandler('thisShouldFail');
+ }
+ catch (e) {
+ return e instanceof TypeError;
+ }
+
+ return false;
+ });
+
+/*!
+{
+ "name": "Dart",
+ "property": "dart",
+ "authors": ["Theodoor van Donge"],
+ "notes": [{
+ "name": "Language website",
+ "href": "http://www.dartlang.org/"
+ }]
+}
+!*/
+/* DOC
+Detects native support for the Dart programming language.
+*/
+
+ Modernizr.addTest('dart', !!prefixed('startDart', navigator));
+
+/*!
+{
+ "name": "DataView",
+ "property": "dataview",
+ "authors": ["Addy Osmani"],
+ "builderAliases": ["dataview_api"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/JavaScript_typed_arrays/DataView"
+ }],
+ "polyfills": ["jdataview"]
+}
+!*/
+/* DOC
+Detects support for the DataView interface for reading data from an ArrayBuffer as part of the Typed Array spec.
+*/
+
+ Modernizr.addTest('dataview', (typeof DataView !== 'undefined' && 'getFloat64' in DataView.prototype));
+
+/*!
+{
+ "name": "classList",
+ "caniuse": "classlist",
+ "property": "classlist",
+ "tags": ["dom"],
+ "builderAliases": ["dataview_api"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/DOM/element.classList"
+ }]
+}
+!*/
+
+ Modernizr.addTest('classlist', 'classList' in docElement);
+
+/*!
+{
+ "name": "createElement with Attributes",
+ "property": ["createelementattrs", "createelement-attrs"],
+ "tags": ["dom"],
+ "builderAliases": ["dom_createElement_attrs"],
+ "authors": ["James A. Rosen"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/258"
+ }]
+}
+!*/
+
+ Modernizr.addTest('createelementattrs', function() {
+ try {
+ return createElement('<input name="test" />').getAttribute('name') == 'test';
+ } catch (e) {
+ return false;
+ }
+ }, {
+ aliases: ['createelement-attrs']
+ });
+
+/*!
+{
+ "name": "dataset API",
+ "caniuse": "dataset",
+ "property": "dataset",
+ "tags": ["dom"],
+ "builderAliases": ["dom_dataset"],
+ "authors": ["@phiggins42"]
+}
+!*/
+
+ // dataset API for data-* attributes
+ Modernizr.addTest('dataset', function() {
+ var n = createElement('div');
+ n.setAttribute('data-a-b', 'c');
+ return !!(n.dataset && n.dataset.aB === 'c');
+ });
+
+/*!
+{
+ "name": "Document Fragment",
+ "property": "documentfragment",
+ "notes": [{
+ "name": "W3C DOM Level 1 Reference",
+ "href": "http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-B63ED1A3"
+ }, {
+ "name": "SitePoint Reference",
+ "href": "http://reference.sitepoint.com/javascript/DocumentFragment"
+ }, {
+ "name": "QuirksMode Compatibility Tables",
+ "href": "http://www.quirksmode.org/m/w3c_core.html#t112"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "knownBugs": ["false-positive on Blackberry 9500, see QuirksMode note"],
+ "tags": []
+}
+!*/
+/* DOC
+Append multiple elements to the DOM within a single insertion.
+*/
+
+ Modernizr.addTest('documentfragment', function() {
+ return 'createDocumentFragment' in document &&
+ 'appendChild' in docElement;
+ });
+
+/*!
+{
+ "name": "[hidden] Attribute",
+ "property": "hidden",
+ "tags": ["dom"],
+ "notes": [{
+ "name": "WHATWG: The hidden attribute",
+ "href": "http://developers.whatwg.org/editing.html#the-hidden-attribute"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "https://github.com/aFarkas/html5shiv/blob/bf4fcc4/src/html5shiv.js#L38"
+ }],
+ "polyfills": ["html5shiv"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Does the browser support the HTML5 [hidden] attribute?
+*/
+
+ Modernizr.addTest('hidden', 'hidden' in createElement('a'));
+
+/*!
+{
+ "name": "microdata",
+ "property": "microdata",
+ "tags": ["dom"],
+ "builderAliases": ["dom_microdata"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/html5/microdata.html"
+ }]
+}
+!*/
+
+ Modernizr.addTest('microdata', 'getItems' in document);
+
+/*!
+{
+ "name": "DOM4 MutationObserver",
+ "property": "mutationobserver",
+ "caniuse": "mutationobserver",
+ "tags": ["dom"],
+ "authors": ["Karel Sedláček (@ksdlck)"],
+ "polyfills": ["mutationobservers"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver"
+ }]
+}
+!*/
+/* DOC
+
+Determines if DOM4 MutationObserver support is available.
+
+*/
+
+ Modernizr.addTest('mutationobserver',
+ !!window.MutationObserver || !!window.WebKitMutationObserver);
+
+
+ /**
+ * since we have a fairly large number of input tests that don't mutate the input
+ * we create a single element that can be shared with all of those tests for a
+ * minor perf boost
+ *
+ * @access private
+ * @returns {HTMLInputElement}
+ */
+ var inputElem = createElement('input');
+
+/*!
+{
+ "name": "Input attributes",
+ "property": "input",
+ "tags": ["forms"],
+ "authors": ["Mike Taylor"],
+ "notes": [{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary"
+ }],
+ "knownBugs": ["Some blackberry devices report false positive for input.multiple"]
+}
+!*/
+/* DOC
+Detects support for HTML5 `<input>` element attributes and exposes Boolean subproperties with the results:
+
+```javascript
+Modernizr.input.autocomplete
+Modernizr.input.autofocus
+Modernizr.input.list
+Modernizr.input.max
+Modernizr.input.min
+Modernizr.input.multiple
+Modernizr.input.pattern
+Modernizr.input.placeholder
+Modernizr.input.required
+Modernizr.input.step
+```
+*/
+
+ // Run through HTML5's new input attributes to see if the UA understands any.
+ // Mike Taylr has created a comprehensive resource for testing these attributes
+ // when applied to all input types:
+ // miketaylr.com/code/input-type-attr.html
+
+ // Only input placeholder is tested while textarea's placeholder is not.
+ // Currently Safari 4 and Opera 11 have support only for the input placeholder
+ // Both tests are available in feature-detects/forms-placeholder.js
+
+ var inputattrs = 'autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ');
+ var attrs = {};
+
+ Modernizr['input'] = (function(props) {
+ for (var i = 0, len = props.length; i < len; i++) {
+ attrs[ props[i] ] = !!(props[i] in inputElem);
+ }
+ if (attrs.list) {
+ // safari false positive's on datalist: webk.it/74252
+ // see also github.com/Modernizr/Modernizr/issues/146
+ attrs.list = !!(createElement('datalist') && window.HTMLDataListElement);
+ }
+ return attrs;
+ })(inputattrs);
+
+/*!
+{
+ "name": "datalist Element",
+ "caniuse": "datalist",
+ "property": "datalistelem",
+ "tags": ["elem"],
+ "builderAliases": ["elem_datalist"],
+ "warnings": ["This test is a dupe of Modernizr.input.list. Only around for legacy reasons."],
+ "notes": [{
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/15346-relevant-dropdowns-polyfill-for-datalist/"
+ },{
+ "name": "Mike Taylor Test",
+ "href": "http://miketaylr.com/test/datalist.html"
+ },{
+ "name": "Mike Taylor Code",
+ "href": "http://miketaylr.com/code/datalist.html"
+ }]
+}
+!*/
+
+ // lol. we already have a test for datalist built in! silly you.
+ // Leaving it around in case anyone's using it
+
+ Modernizr.addTest('datalistelem', Modernizr.input.list);
+
+/*!
+{
+ "name": "details Element",
+ "caniuse": "details",
+ "property": "details",
+ "tags": ["elem"],
+ "builderAliases": ["elem_details"],
+ "authors": ["@mathias"],
+ "notes": [{
+ "name": "Mathias' Original",
+ "href": "http://mths.be/axh"
+ }]
+}
+!*/
+
+ Modernizr.addTest('details', function() {
+ var el = createElement('details');
+ var diff;
+
+ // return early if possible; thanks @aFarkas!
+ if (!('open' in el)) {
+ return false;
+ }
+
+ testStyles('#modernizr details{display:block}', function(node) {
+ node.appendChild(el);
+ el.innerHTML = '<summary>a</summary>b';
+ diff = el.offsetHeight;
+ el.open = true;
+ diff = diff != el.offsetHeight;
+ });
+
+
+ return diff;
+ });
+
+/*!
+{
+ "name": "output Element",
+ "property": "outputelem",
+ "tags": ["elem"],
+ "builderAliases": ["elem_output"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-output-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('outputelem', 'value' in createElement('output'));
+
+/*!
+{
+ "name": "picture Element",
+ "property": "picture",
+ "tags": ["elem"],
+ "authors": ["Scott Jehl", "Mat Marquis"],
+ "notes": [{
+ "name": "Specification",
+ "href": "http://picture.responsiveimages.org"
+ },{
+ "name": "Relevant spec issue",
+ "href": "https://github.com/ResponsiveImagesCG/picture-element/issues/87"
+ }]
+}
+!*/
+
+ Modernizr.addTest('picture', 'HTMLPictureElement' in window);
+
+/*!
+{
+ "name": "progress Element",
+ "caniuse": "progressmeter",
+ "property": ["progressbar", "meter"],
+ "tags": ["elem"],
+ "builderAliases": ["elem_progress_meter"],
+ "authors": ["Stefan Wallin"]
+}
+!*/
+
+ // Tests for progressbar-support. All browsers that don't support progressbar returns undefined =)
+ Modernizr.addTest('progressbar', createElement('progress').max !== undefined);
+
+ // Tests for meter-support. All browsers that don't support meters returns undefined =)
+ Modernizr.addTest('meter', createElement('meter').max !== undefined);
+
+/*!
+{
+ "name": "ruby, rp, rt Elements",
+ "caniuse": "ruby",
+ "property": "ruby",
+ "tags": ["elem"],
+ "builderAliases": ["elem_ruby"],
+ "authors": ["Cătălin Mariș"],
+ "notes": [{
+ "name": "WHATWG Specification",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-ruby-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('ruby', function() {
+
+ var ruby = createElement('ruby');
+ var rt = createElement('rt');
+ var rp = createElement('rp');
+ var displayStyleProperty = 'display';
+ // 'fontSize' - because it`s only used for IE6 and IE7
+ var fontSizeStyleProperty = 'fontSize';
+
+ ruby.appendChild(rp);
+ ruby.appendChild(rt);
+ docElement.appendChild(ruby);
+
+ // browsers that support <ruby> hide the <rp> via "display:none"
+ if (getStyle(rp, displayStyleProperty) == 'none' || // for non-IE browsers
+ // but in IE browsers <rp> has "display:inline" so, the test needs other conditions:
+ getStyle(ruby, displayStyleProperty) == 'ruby' && getStyle(rt, displayStyleProperty) == 'ruby-text' || // for IE8+
+ getStyle(rp, fontSizeStyleProperty) == '6pt' && getStyle(rt, fontSizeStyleProperty) == '6pt') { // for IE6 & IE7
+
+ cleanUp();
+ return true;
+
+ } else {
+ cleanUp();
+ return false;
+ }
+
+ function getStyle(element, styleProperty) {
+ var result;
+
+ if (window.getComputedStyle) { // for non-IE browsers
+ result = document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProperty);
+ } else if (element.currentStyle) { // for IE
+ result = element.currentStyle[styleProperty];
+ }
+
+ return result;
+ }
+
+ function cleanUp() {
+ docElement.removeChild(ruby);
+ // the removed child node still exists in memory, so ...
+ ruby = null;
+ rt = null;
+ rp = null;
+ }
+
+ });
+
+
+/*!
+{
+ "name": "Template Tag",
+ "property": "template",
+ "tags": ["elem"],
+ "notes": [{
+ "name": "HTML5Rocks Article",
+ "href": "http://www.html5rocks.com/en/tutorials/webcomponents/template/"
+ },{
+ "name": "W3 Spec",
+ "href": "https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html"
+ }]
+}
+!*/
+
+ Modernizr.addTest('template', 'content' in createElement('template'));
+
+/*!
+{
+ "name": "time Element",
+ "property": "time",
+ "tags": ["elem"],
+ "builderAliases": ["elem_time"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('time', 'valueAsDate' in createElement('time'));
+
+/*!
+{
+ "name": "Track element and Timed Text Track",
+ "property": ["texttrackapi", "track"],
+ "tags": ["elem"],
+ "builderAliases": ["elem_track"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3 track Element Spec",
+ "href": "http://www.w3.org/TR/html5/video.html#the-track-element"
+ },{
+ "name": "W3 track API Spec",
+ "href": "http://www.w3.org/TR/html5/media-elements.html#text-track-api"
+ }],
+ "warnings": ["While IE10 has implemented the track element, IE10 does not expose the underlying APIs to create timed text tracks by JS (really sad)"]
+}
+!*/
+
+ Modernizr.addTest('texttrackapi', typeof (createElement('video').addTextTrack) === 'function');
+
+ // a more strict test for track including UI support: document.createElement('track').kind === 'subtitles'
+ Modernizr.addTest('track', 'kind' in createElement('track'));
+
+/*!
+{
+ "name": "Unknown Elements",
+ "property": "unknownelements",
+ "tags": ["elem"],
+ "notes": [{
+ "name": "The Story of the HTML5 Shiv",
+ "href": "http://www.paulirish.com/2011/the-history-of-the-html5-shiv/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "https://github.com/aFarkas/html5shiv/blob/bf4fcc4/src/html5shiv.js#L36"
+ }],
+ "polyfills": ["html5shiv"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Does the browser support HTML with non-standard / new elements?
+*/
+
+ Modernizr.addTest('unknownelements', function() {
+ var a = createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ return a.childNodes.length === 1;
+ });
+
+/*!
+{
+ "name": "Emoji",
+ "property": "emoji"
+}
+!*/
+/* DOC
+Detects support for emoji character sets.
+*/
+
+ Modernizr.addTest('emoji', function() {
+ if (!Modernizr.canvastext) {
+ return false;
+ }
+ var pixelRatio = window.devicePixelRatio || 1;
+ var offset = 12 * pixelRatio;
+ var node = createElement('canvas');
+ var ctx = node.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.textBaseline = 'top';
+ ctx.font = '32px Arial';
+ ctx.fillText('\ud83d\udc28', 0, 0); // U+1F428 KOALA
+ return ctx.getImageData(offset, offset, 1, 1).data[0] !== 0;
+ });
+
+/*!
+{
+ "name": "ES5 Array",
+ "property": "es5array",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Array per specification.
+*/
+
+ Modernizr.addTest('es5array', function() {
+ return !!(Array.prototype &&
+ Array.prototype.every &&
+ Array.prototype.filter &&
+ Array.prototype.forEach &&
+ Array.prototype.indexOf &&
+ Array.prototype.lastIndexOf &&
+ Array.prototype.map &&
+ Array.prototype.some &&
+ Array.prototype.reduce &&
+ Array.prototype.reduceRight &&
+ Array.isArray);
+ });
+
+/*!
+{
+ "name": "ES5 Date",
+ "property": "es5date",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Date per specification.
+*/
+
+ Modernizr.addTest('es5date', function() {
+ var isoDate = '2013-04-12T06:06:37.307Z',
+ canParseISODate = false;
+ try {
+ canParseISODate = !!Date.parse(isoDate);
+ } catch (e) {
+ // no ISO date parsing yet
+ }
+ return !!(Date.now &&
+ Date.prototype &&
+ Date.prototype.toISOString &&
+ Date.prototype.toJSON &&
+ canParseISODate);
+ });
+
+/*!
+{
+ "name": "ES5 Function",
+ "property": "es5function",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Function per specification.
+*/
+
+ Modernizr.addTest('es5function', function() {
+ return !!(Function.prototype && Function.prototype.bind);
+ });
+
+/*!
+{
+ "name": "ES5 Object",
+ "property": "es5object",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim", "es5sham"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Object per specification.
+*/
+
+ Modernizr.addTest('es5object', function() {
+ return !!(Object.keys &&
+ Object.create &&
+ Object.getPrototypeOf &&
+ Object.getOwnPropertyNames &&
+ Object.isSealed &&
+ Object.isFrozen &&
+ Object.isExtensible &&
+ Object.getOwnPropertyDescriptor &&
+ Object.defineProperty &&
+ Object.defineProperties &&
+ Object.seal &&
+ Object.freeze &&
+ Object.preventExtensions);
+ });
+
+/*!
+{
+ "name": "ES5 Strict Mode",
+ "property": "strictmode",
+ "caniuse": "sctrict-mode",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "authors": ["@kangax"],
+ "tags": ["es5"],
+ "builderAliases": ["es5_strictmode"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Object strict mode.
+*/
+
+ Modernizr.addTest('strictmode', (function() {'use strict'; return !this; })());
+
+/*!
+{
+ "name": "ES5 String",
+ "property": "es5string",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 String per specification.
+*/
+
+ Modernizr.addTest('es5string', function() {
+ return !!(String.prototype && String.prototype.trim);
+ });
+
+/*!
+{
+ "name": "JSON",
+ "property": "json",
+ "caniuse": "json",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "http://developer.mozilla.org/en/JSON"
+ }],
+ "polyfills": ["json2"]
+}
+!*/
+/* DOC
+Detects native support for JSON handling functions.
+*/
+
+ // this will also succeed if you've loaded the JSON2.js polyfill ahead of time
+ // ... but that should be obvious. :)
+
+ Modernizr.addTest('json', 'JSON' in window && 'parse' in JSON && 'stringify' in JSON);
+
+/*!
+{
+ "name": "ES5 Syntax",
+ "property": "es5syntax",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "http://kangax.github.io/es5-compat-table/"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["This detect uses `eval()`, so CSP may be a problem."],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser accepts ECMAScript 5 syntax.
+*/
+
+ Modernizr.addTest('es5syntax', function() {
+ var value, obj, stringAccess, getter, setter, reservedWords, zeroWidthChars;
+ try {
+ // Property access on strings
+ stringAccess = eval('"foobar"[3] === "b"');
+ // Getter in property initializer
+ getter = eval('({ get x(){ return 1 } }).x === 1');
+ eval('({ set x(v){ value = v; } }).x = 1');
+ // Setter in property initializer
+ setter = value === 1;
+ // Reserved words as property names
+ eval('obj = ({ if: 1 })');
+ reservedWords = obj['if'] === 1;
+ // Zero-width characters in identifiers
+ zeroWidthChars = eval('_\u200c\u200d = true');
+
+ return stringAccess && getter && setter && reservedWords && zeroWidthChars;
+ } catch (ignore) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "ES5 Immutable Undefined",
+ "property": "es5undefined",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "http://kangax.github.io/es5-compat-table/"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser prevents assignment to global `undefined` per ECMAScript 5.
+*/
+
+ Modernizr.addTest('es5undefined', function() {
+ var result, originalUndefined;
+ try {
+ originalUndefined = window.undefined;
+ window.undefined = 12345;
+ result = typeof window.undefined === 'undefined';
+ window.undefined = originalUndefined;
+ } catch (e) {
+ return false;
+ }
+ return result;
+ });
+
+/*!
+{
+ "name": "ES5",
+ "property": "es5",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim", "es5sham"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements everything as specified in ECMAScript 5.
+*/
+
+ Modernizr.addTest('es5', function() {
+ return !!(
+ Modernizr.es5array &&
+ Modernizr.es5date &&
+ Modernizr.es5function &&
+ Modernizr.es5object &&
+ Modernizr.strictmode &&
+ Modernizr.es5string &&
+ Modernizr.json &&
+ Modernizr.es5syntax &&
+ Modernizr.es5undefined
+ );
+ });
+
+/*!
+{
+ "name": "ES6 Array",
+ "property": "es6array",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Array per specification.
+*/
+
+ Modernizr.addTest('es6array', !!(Array.prototype &&
+ Array.prototype.copyWithin &&
+ Array.prototype.fill &&
+ Array.prototype.find &&
+ Array.prototype.findIndex &&
+ Array.prototype.keys &&
+ Array.prototype.entries &&
+ Array.prototype.values &&
+ Array.from &&
+ Array.of));
+
+/*!
+{
+ "name": "ES5 String.prototype.contains",
+ "property": "contains",
+ "authors": ["Robert Kowalski"],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 `String.prototype.contains` per specification.
+*/
+
+ Modernizr.addTest('contains', is(String.prototype.contains, 'function'));
+
+/*!
+{
+ "name": "ES6 Generators",
+ "property": "generators",
+ "authors": ["Michael Kachanovskyi"],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Generators per specification.
+*/
+
+ Modernizr.addTest('generators', function() {
+ try {
+ /* jshint evil: true */
+ new Function('function* test() {}')();
+ } catch (e) {
+ return false;
+ }
+ return true;
+ });
+
+/*!
+{
+ "name": "ES6 Math",
+ "property": "es6math",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Math per specification.
+*/
+
+ Modernizr.addTest('es6math', !!(Math &&
+ Math.clz32 &&
+ Math.cbrt &&
+ Math.imul &&
+ Math.sign &&
+ Math.log10 &&
+ Math.log2 &&
+ Math.log1p &&
+ Math.expm1 &&
+ Math.cosh &&
+ Math.sinh &&
+ Math.tanh &&
+ Math.acosh &&
+ Math.asinh &&
+ Math.atanh &&
+ Math.hypot &&
+ Math.trunc &&
+ Math.fround));
+
+/*!
+{
+ "name": "ES6 Number",
+ "property": "es6number",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Number per specification.
+*/
+
+ Modernizr.addTest('es6number', !!(Number.isFinite &&
+ Number.isInteger &&
+ Number.isSafeInteger &&
+ Number.isNaN &&
+ Number.parseInt &&
+ Number.parseFloat &&
+ Number.isInteger(Number.MAX_SAFE_INTEGER) &&
+ Number.isInteger(Number.MIN_SAFE_INTEGER) &&
+ Number.isFinite(Number.EPSILON)));
+
+/*!
+{
+ "name": "ES6 Object",
+ "property": "es6object",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Object per specification.
+*/
+
+ Modernizr.addTest('es6object', !!(Object.assign &&
+ Object.is &&
+ Object.setPrototypeOf));
+
+/*!
+{
+ "name": "ES6 Promises",
+ "property": "promises",
+ "caniuse": "promises",
+ "polyfills": ["es6promises"],
+ "authors": ["Krister Kari", "Jake Archibald"],
+ "tags": ["es6"],
+ "notes": [{
+ "name": "The ES6 promises spec",
+ "href": "https://github.com/domenic/promises-unwrapping"
+ },{
+ "name": "Chromium dashboard - ES6 Promises",
+ "href": "http://www.chromestatus.com/features/5681726336532480"
+ },{
+ "name": "JavaScript Promises: There and back again - HTML5 Rocks",
+ "href": "http://www.html5rocks.com/en/tutorials/es6/promises/"
+ }]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Promises per specification.
+*/
+
+ Modernizr.addTest('promises', function() {
+ return 'Promise' in window &&
+ // Some of these methods are missing from
+ // Firefox/Chrome experimental implementations
+ 'resolve' in window.Promise &&
+ 'reject' in window.Promise &&
+ 'all' in window.Promise &&
+ 'race' in window.Promise &&
+ // Older version of the spec had a resolver object
+ // as the arg rather than a function
+ (function() {
+ var resolve;
+ new window.Promise(function(r) { resolve = r; });
+ return typeof resolve === 'function';
+ }());
+ });
+
+/*!
+{
+ "name": "ES6 String",
+ "property": "es6string",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 String per specification.
+*/
+
+ Modernizr.addTest('es6string', !!(String.fromCodePoint &&
+ String.raw &&
+ String.prototype.codePointAt &&
+ String.prototype.repeat &&
+ String.prototype.startsWith &&
+ String.prototype.endsWith &&
+ String.prototype.contains));
+
+/*!
+{
+ "name": "Orientation and Motion Events",
+ "property": ["devicemotion", "deviceorientation"],
+ "caniuse": "deviceorientation",
+ "notes": [{
+ "name": "W3C Editor's Draft",
+ "href": "http://dev.w3.org/geo/api/spec-source-orientation.html"
+ },{
+ "name": "Implementation by iOS Safari (Orientation)",
+ "href": "http://goo.gl/fhce3"
+ },{
+ "name": "Implementation by iOS Safari (Motion)",
+ "href": "http://goo.gl/rLKz8"
+ }],
+ "authors": ["Shi Chuan"],
+ "tags": ["event"],
+ "builderAliases": ["event_deviceorientation_motion"]
+}
+!*/
+/* DOC
+Part of Device Access aspect of HTML5, same category as geolocation.
+
+`devicemotion` tests for Device Motion Event support, returns boolean value true/false.
+
+`deviceorientation` tests for Device Orientation Event support, returns boolean value true/false
+*/
+
+ Modernizr.addTest('devicemotion', 'DeviceMotionEvent' in window);
+ Modernizr.addTest('deviceorientation', 'DeviceOrientationEvent' in window);
+
+/*!
+{
+ "name": "onInput Event",
+ "property": "oninput",
+ "notes": [{
+ "name": "MDN article",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.oninput"
+ },{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors"
+ },{
+ "name": "Detecting onInput support",
+ "href": "http://danielfriesen.name/blog/2010/02/16/html5-browser-maze-oninput-support"
+ }],
+ "authors": ["Patrick Kettner"],
+ "tags": ["event"]
+}
+!*/
+/* DOC
+`oninput` tests if the browser is able to detect the input event
+*/
+
+
+ Modernizr.addTest('oninput', function() {
+ var input = createElement('input');
+ var supportsOnInput;
+ input.setAttribute('oninput', 'return');
+
+ if (hasEvent('oninput', docElement) || typeof input.oninput == 'function') {
+ return true;
+ }
+
+ // IE doesn't support onInput, so we wrap up the non IE APIs
+ // (createEvent, addEventListener) in a try catch, rather than test for
+ // their trident equivalent.
+ try {
+ // Older Firefox didn't map oninput attribute to oninput property
+ var testEvent = document.createEvent('KeyboardEvent');
+ supportsOnInput = false;
+ var handler = function(e) {
+ supportsOnInput = true;
+ e.preventDefault();
+ e.stopPropagation();
+ };
+
+ testEvent.initKeyEvent('keypress', true, true, window, false, false, false, false, 0, 'e'.charCodeAt(0));
+ docElement.appendChild(input);
+ input.addEventListener('input', handler, false);
+ input.focus();
+ input.dispatchEvent(testEvent);
+ input.removeEventListener('input', handler, false);
+ docElement.removeChild(input);
+ } catch (e) {
+ supportsOnInput = false;
+ }
+ return supportsOnInput;
+ });
+
+/*!
+{
+ "name": "Event Listener",
+ "property": "eventlistener",
+ "authors": ["Andrew Betts (@triblondon)"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Registration-interfaces"
+ }],
+ "polyfills": ["eventlistener"]
+}
+!*/
+/* DOC
+Detects native support for addEventListener
+*/
+
+ Modernizr.addTest('eventlistener', 'addEventListener' in window);
+
+/*!
+{
+ "name": "EXIF Orientation",
+ "property": "exiforientation",
+ "tags": ["image"],
+ "builderAliases": ["exif_orientation"],
+ "async": true,
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "Article by Dave Perrett",
+ "href": "http://recursive-design.com/blog/2012/07/28/exif-orientation-handling-is-a-ghetto/"
+ },{
+ "name": "Article by Calvin Hass",
+ "href": "http://www.impulseadventure.com/photo/exif-orientation.html"
+ }]
+}
+!*/
+/* DOC
+Detects support for EXIF Orientation in JPEG images.
+
+iOS looks at the EXIF Orientation flag in JPEGs and rotates the image accordingly. Most desktop browsers just ignore this data.
+*/
+
+ // Bug trackers:
+ // bugzil.la/298619 (unimplemented)
+ // crbug.com/56845 (looks incomplete)
+ // webk.it/19688 (available upstream but its up all ports to turn on individually)
+ Modernizr.addAsyncTest(function() {
+ var img = new Image();
+
+ img.onerror = function() {
+ addTest('exiforientation', false, {aliases: ['exif-orientation']});
+ };
+
+ img.onload = function() {
+ addTest('exiforientation', img.width !== 2, {aliases: ['exif-orientation']});
+ };
+
+ // There may be a way to shrink this more, it's a 1x2 white jpg with the orientation flag set to 6
+ img.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q==';
+ });
+
+/*!
+{
+ "name": "File API",
+ "property": "filereader",
+ "caniuse": "fileapi",
+ "notes": [{
+ "name": "W3C Working Draft",
+ "href": "http://www.w3.org/TR/FileAPI/"
+ }],
+ "tags": ["file"],
+ "builderAliases": ["file_api"],
+ "knownBugs": ["Will fail in Safari 5 due to its lack of support for the standards defined FileReader object"]
+}
+!*/
+/* DOC
+`filereader` tests for the File API specification
+
+Tests for objects specific to the File API W3C specification without
+being redundant (don't bother testing for Blob since it is assumed
+to be the File object's prototype.)
+*/
+
+ Modernizr.addTest('filereader', !!(window.File && window.FileList && window.FileReader));
+
+/*!
+{
+ "name": "Filesystem API",
+ "property": "filesystem",
+ "caniuse": "filesystem",
+ "notes": [{
+ "name": "W3 Draft",
+ "href": "dev.w3.org/2009/dap/file-system/file-dir-sys.html"
+ }],
+ "authors": ["Eric Bidelman (@ebidel)"],
+ "tags": ["file"],
+ "builderAliases": ["file_filesystem"],
+ "knownBugs": ["The API will be present in Chrome incognito, but will throw an exception. See crbug.com/93417"]
+}
+!*/
+
+ Modernizr.addTest('filesystem', !!prefixed('requestFileSystem', window));
+
+/*!
+ {
+ "name": "Flash",
+ "property": "flash",
+ "tags": ["flash"],
+ "polyfills": ["shumway"]
+ }
+ !*/
+/* DOC
+Detects support flash, as well as flash blocking plugins
+*/
+
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ var removeFakeBody = function(body) {
+ // If we’re rockin’ an attached fake body, clean it up
+ if (body.fake && body.parentNode) {
+ body.parentNode.removeChild(body);
+ }
+ };
+ var runTest = function(result, embed) {
+ var bool = !!result;
+ if (bool) {
+ bool = new Boolean(bool);
+ bool.blocked = (result === 'blocked');
+ }
+ addTest('flash', function() { return bool; });
+
+ if (embed && body.contains(embed)) {
+
+ // in case embed has been wrapped, as with ClickToPlugin
+ while (embed.parentNode !== body) {
+ embed = embed.parentNode;
+ }
+
+ body.removeChild(embed);
+ }
+
+ };
+ var easy_detect;
+ var activex;
+ // we wrap activex in a try/catch because when flash is disabled through
+ // ActiveX controls, it throws an error.
+ try {
+ // Pan is an API that exists for flash objects.
+ activex = 'ActiveXObject' in window && 'Pan' in new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash');
+ } catch (e) {}
+
+ easy_detect = !(('plugins' in navigator && 'Shockwave Flash' in navigator.plugins) || activex);
+
+ if (easy_detect || isSVG) {
+ runTest(false);
+ }
+ else {
+ // flash seems to be installed, but it might be blocked. We have to
+ // actually create an element to see what happens to it.
+ var embed = createElement('embed');
+ var body = getBody();
+ var blockedDetect;
+ var inline_style;
+
+ embed.type = 'application/x-shockwave-flash';
+
+ // Need to do this in the body (fake or otherwise) otherwise IE8 complains
+ body.appendChild(embed);
+ docElement.appendChild(body);
+
+ // Pan doesn't exist in the embed if its IE (its on the ActiveXObjeect)
+ // so this check is for all other browsers.
+ if (!('Pan' in embed) && !activex) {
+ runTest('blocked', embed);
+ removeFakeBody(body);
+ return;
+ }
+
+ blockedDetect = function() {
+ // if we used a fake body originally, we need to restart this test, since
+ // we haven't been attached to the DOM, and therefore none of the blockers
+ // have had time to work.
+ if (!docElement.contains(body)) {
+ body = document.body || body;
+ embed = createElement('embed');
+ embed.type = 'application/x-shockwave-flash';
+ body.appendChild(embed);
+ return setTimeout(blockedDetect, 1000);
+ }
+ if (!docElement.contains(embed)) {
+ runTest('blocked');
+ }
+ else {
+ inline_style = embed.style.cssText;
+ if (inline_style !== '') {
+ // the style of the element has changed automatically. This is a
+ // really poor heuristic, but for lower end flash blocks, it the
+ // only change they can make.
+ runTest('blocked', embed);
+ }
+ else {
+ runTest(true, embed);
+ }
+ }
+ removeFakeBody(body);
+ };
+
+ // If we have got this far, there is still a chance a userland plugin
+ // is blocking us (either changing the styles, or automatically removing
+ // the element). Both of these require us to take a step back for a moment
+ // to allow for them to get time of the thread, hence a setTimeout.
+ //
+ setTimeout(blockedDetect, 10);
+ }
+ });
+
+/*!
+{
+ "name": "input[capture] Attribute",
+ "property": "capture",
+ "tags": ["video", "image", "audio", "media", "attribute"],
+ "notes": [{
+ "name": "W3C draft: HTML Media Capture",
+ "href": "http://www.w3.org/TR/html-media-capture/"
+ }]
+}
+!*/
+/* DOC
+When used on an `<input>`, this attribute signifies that the resource it takes should be generated via device's camera, camcorder, sound recorder.
+*/
+
+ // testing for capture attribute in inputs
+ Modernizr.addTest('capture', ('capture' in createElement('input')));
+
+/*!
+{
+ "name": "input[file] Attribute",
+ "property": "fileinput",
+ "caniuse" : "forms",
+ "tags": ["file", "forms", "input"],
+ "builderAliases": ["forms_fileinput"]
+}
+!*/
+/* DOC
+Detects whether input type="file" is available on the platform
+
+E.g. iOS < 6 and some android version don't support this
+*/
+
+ Modernizr.addTest('fileinput', function() {
+ if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) {
+ return false;
+ }
+ var elem = createElement('input');
+ elem.type = 'file';
+ return !elem.disabled;
+ });
+
+/*!
+{
+ "name": "input[directory] Attribute",
+ "property": "directory",
+ "authors": ["silverwind"],
+ "tags": ["file", "input", "attribute"]
+}
+!*/
+/* DOC
+When used on an `<input type="file">`, the `directory` attribute instructs
+the user agent to present a directory selection dialog instead of the usual
+file selection dialog.
+*/
+
+ Modernizr.addTest('fileinputdirectory', function() {
+ var elem = createElement('input'), dir = 'directory';
+ elem.type = 'file';
+ if (dir in elem) {
+ return true;
+ } else {
+ for (var i = 0, len = domPrefixes.length; i < len; i++) {
+ if (domPrefixes[i] + dir in elem) {
+ return true;
+ }
+ }
+ }
+ return false;
+ });
+
+/*!
+{
+ "name": "input[form] Attribute",
+ "property": "formattribute",
+ "tags": ["attribute", "forms", "input"],
+ "builderAliases": ["forms_formattribute"]
+}
+!*/
+/* DOC
+Detects whether input form="form_id" is available on the platform
+E.g. IE 10 (and below), don't support this
+*/
+
+
+ Modernizr.addTest('formattribute', function() {
+ var form = createElement('form');
+ var input = createElement('input');
+ var div = createElement('div');
+ var id = 'formtest' + (new Date()).getTime();
+ var attr;
+ var bool = false;
+
+ form.id = id;
+
+ //IE6/7 confuses the form idl attribute and the form content attribute, so we use document.createAttribute
+ try {
+ input.setAttribute('form', id);
+ }
+ catch (e) {
+ if (document.createAttribute) {
+ attr = document.createAttribute('form');
+ attr.nodeValue = id;
+ input.setAttributeNode(attr);
+ }
+ }
+
+ div.appendChild(form);
+ div.appendChild(input);
+
+ docElement.appendChild(div);
+
+ bool = form.elements && form.elements.length === 1 && input.form == form;
+
+ div.parentNode.removeChild(div);
+ return bool;
+ });
+
+/*!
+{
+ "name": "Form input types",
+ "property": "inputtypes",
+ "caniuse": "forms",
+ "tags": ["forms"],
+ "authors": ["Mike Taylor"],
+ "polyfills": [
+ "jquerytools",
+ "webshims",
+ "h5f",
+ "webforms2",
+ "nwxforms",
+ "fdslider",
+ "html5slider",
+ "galleryhtml5forms",
+ "jscolor",
+ "html5formshim",
+ "selectedoptionsjs",
+ "formvalidationjs"
+ ]
+}
+!*/
+/* DOC
+Detects support for HTML5 form input types and exposes Boolean subproperties with the results:
+
+```javascript
+Modernizr.inputtypes.color
+Modernizr.inputtypes.date
+Modernizr.inputtypes.datetime
+Modernizr.inputtypes['datetime-local']
+Modernizr.inputtypes.email
+Modernizr.inputtypes.month
+Modernizr.inputtypes.number
+Modernizr.inputtypes.range
+Modernizr.inputtypes.search
+Modernizr.inputtypes.tel
+Modernizr.inputtypes.time
+Modernizr.inputtypes.url
+Modernizr.inputtypes.week
+```
+*/
+
+ // Run through HTML5's new input types to see if the UA understands any.
+ // This is put behind the tests runloop because it doesn't return a
+ // true/false like all the other tests; instead, it returns an object
+ // containing each input type with its corresponding true/false value
+
+ // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
+ var inputtypes = 'search tel url email datetime date month week time datetime-local number range color'.split(' ');
+ var inputs = {};
+
+ Modernizr['inputtypes'] = (function(props) {
+ var len = props.length;
+ var smile = ':)';
+ var inputElemType;
+ var defaultView;
+ var bool;
+
+ for (var i = 0; i < len; i++) {
+
+ inputElem.setAttribute('type', inputElemType = props[i]);
+ bool = inputElem.type !== 'text' && 'style' in inputElem;
+
+ // We first check to see if the type we give it sticks..
+ // If the type does, we feed it a textual value, which shouldn't be valid.
+ // If the value doesn't stick, we know there's input sanitization which infers a custom UI
+ if (bool) {
+
+ inputElem.value = smile;
+ inputElem.style.cssText = 'position:absolute;visibility:hidden;';
+
+ if (/^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined) {
+
+ docElement.appendChild(inputElem);
+ defaultView = document.defaultView;
+
+ // Safari 2-4 allows the smiley as a value, despite making a slider
+ bool = defaultView.getComputedStyle &&
+ defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
+ // Mobile android web browser has false positive, so must
+ // check the height to see if the widget is actually there.
+ (inputElem.offsetHeight !== 0);
+
+ docElement.removeChild(inputElem);
+
+ } else if (/^(search|tel)$/.test(inputElemType)) {
+ // Spec doesn't define any special parsing or detectable UI
+ // behaviors so we pass these through as true
+
+ // Interestingly, opera fails the earlier test, so it doesn't
+ // even make it here.
+
+ } else if (/^(url|email|number)$/.test(inputElemType)) {
+ // Real url and email support comes with prebaked validation.
+ bool = inputElem.checkValidity && inputElem.checkValidity() === false;
+
+ } else {
+ // If the upgraded input compontent rejects the :) text, we got a winner
+ bool = inputElem.value != smile;
+ }
+ }
+
+ inputs[ props[i] ] = !!bool;
+ }
+ return inputs;
+ })(inputtypes);
+
+/*!
+{
+ "name": "Form Validation",
+ "property": "formvalidation",
+ "tags": ["forms", "validation", "attribute"],
+ "builderAliases": ["forms_validation"]
+}
+!*/
+/* DOC
+This implementation only tests support for interactive form validation.
+To check validation for a specific type or a specific other constraint,
+the test can be combined:
+
+- `Modernizr.inputtypes.number && Modernizr.formvalidation` (browser supports rangeOverflow, typeMismatch etc. for type=number)
+- `Modernizr.input.required && Modernizr.formvalidation` (browser supports valueMissing)
+*/
+
+ Modernizr.addTest('formvalidation', function() {
+ var form = createElement('form');
+ if (!('checkValidity' in form) || !('addEventListener' in form)) {
+ return false;
+ }
+ if ('reportValidity' in form) {
+ return true;
+ }
+ var invalidFired = false;
+ var input;
+
+ Modernizr.formvalidationapi = true;
+
+ // Prevent form from being submitted
+ form.addEventListener('submit', function(e) {
+ //Opera does not validate form, if submit is prevented
+ if (!window.opera) {
+ e.preventDefault();
+ }
+ e.stopPropagation();
+ }, false);
+
+ // Calling form.submit() doesn't trigger interactive validation,
+ // use a submit button instead
+ //older opera browsers need a name attribute
+ form.innerHTML = '<input name="modTest" required><button></button>';
+
+ testStyles('#modernizr form{position:absolute;top:-99999em}', function(node) {
+ node.appendChild(form);
+
+ input = form.getElementsByTagName('input')[0];
+
+ // Record whether "invalid" event is fired
+ input.addEventListener('invalid', function(e) {
+ invalidFired = true;
+ e.preventDefault();
+ e.stopPropagation();
+ }, false);
+
+ //Opera does not fully support the validationMessage property
+ Modernizr.formvalidationmessage = !!input.validationMessage;
+
+ // Submit form by clicking submit button
+ form.getElementsByTagName('button')[0].click();
+ });
+
+ return invalidFired;
+ });
+
+/*!
+{
+ "name": "input[type=\"number\"] Localization",
+ "property": "localizednumber",
+ "tags": ["forms", "localization", "attribute"],
+ "authors": ["Peter Janes"],
+ "notes": [{
+ "name": "Webkit Bug Tracker Listing",
+ "href": "https://bugs.webkit.org/show_bug.cgi?id=42484"
+ },{
+ "name": "Based on This",
+ "href": "http://trac.webkit.org/browser/trunk/LayoutTests/fast/forms/script-tests/input-number-keyoperation.js?rev=80096#L9"
+ }],
+ "knownBugs": ["Only ever returns true if the browser/OS is configured to use comma as a decimal separator. This is probably fine for most use cases."]
+}
+!*/
+/* DOC
+Detects whether input type="number" is capable of receiving and displaying localized numbers, e.g. with comma separator.
+*/
+
+ Modernizr.addTest('localizednumber', function() {
+ // this extends our testing of input[type=number], so bomb out if that's missing
+ if (!Modernizr.inputtypes.number) { return false; }
+ // we rely on checkValidity later, so bomb out early if we don't have it
+ if (!Modernizr.formvalidation) { return false; }
+
+ var el = createElement('div');
+ var diff;
+ var body = getBody();
+
+ var root = (function() {
+ return docElement.insertBefore(body, docElement.firstElementChild || docElement.firstChild);
+ }());
+ el.innerHTML = '<input type="number" value="1.0" step="0.1"/>';
+ var input = el.childNodes[0];
+ root.appendChild(el);
+ input.focus();
+ try {
+ document.execCommand('InsertText', false, '1,1');
+ } catch (e) { // prevent warnings in IE
+ }
+ diff = input.type === 'number' && input.valueAsNumber === 1.1 && input.checkValidity();
+ root.removeChild(el);
+ body.fake && root.parentNode.removeChild(root);
+ return diff;
+ });
+
+
+/*!
+{
+ "name": "placeholder attribute",
+ "property": "placeholder",
+ "tags": ["forms", "attribute"],
+ "builderAliases": ["forms_placeholder"]
+}
+!*/
+/* DOC
+Tests for placeholder attribute in inputs and textareas
+*/
+
+ Modernizr.addTest('placeholder', ('placeholder' in createElement('input') && 'placeholder' in createElement('textarea')));
+
+/*!
+{
+ "name": "form#requestAutocomplete()",
+ "property": "requestautocomplete",
+ "tags": ["form", "forms", "requestAutocomplete", "payments"],
+ "notes": [{
+ "name": "WHATWG proposed spec",
+ "href": "http://wiki.whatwg.org/wiki/RequestAutocomplete"
+ }]
+}
+!*/
+/* DOC
+When used with input[autocomplete] to annotate a form, form.requestAutocomplete() shows a dialog in Chrome that speeds up
+checkout flows (payments specific for now).
+*/
+
+ Modernizr.addTest('requestautocomplete', !!prefixed('requestAutocomplete', createElement('form')));
+
+/*!
+{
+ "name": "Fullscreen API",
+ "property": "fullscreen",
+ "caniuse": "fullscreen",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/API/Fullscreen"
+ }],
+ "polyfills": ["screenfulljs"],
+ "builderAliases": ["fullscreen_api"]
+}
+!*/
+/* DOC
+Detects support for the ability to make the current website take over the user's entire screen
+*/
+
+ // github.com/Modernizr/Modernizr/issues/739
+ Modernizr.addTest('fullscreen', !!(prefixed('exitFullscreen', document, false) || prefixed('cancelFullScreen', document, false)));
+
+/*!
+{
+ "name": "GamePad API",
+ "property": "gamepads",
+ "authors": ["Eric Bidelman"],
+ "tags": ["media"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/gamepad/"
+ },{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/doodles/gamepad/#toc-featuredetect"
+ }],
+ "warnings": [],
+ "polyfills": []
+}
+!*/
+/* DOC
+Detects support for the Gamepad API, for access to gamepads and controllers.
+*/
+
+
+ Modernizr.addTest('gamepads', !!prefixed('getGamepads', navigator));
+
+/*!
+{
+ "name": "Geolocation API",
+ "property": "geolocation",
+ "caniuse": "geolocation",
+ "tags": ["media"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation"
+ }],
+ "polyfills": [
+ "joshuabell-polyfill",
+ "webshims",
+ "geo-location-javascript",
+ "geolocation-api-polyfill"
+ ]
+}
+!*/
+/* DOC
+Detects support for the Geolocation API for users to provide their location to web applications.
+*/
+
+ // geolocation is often considered a trivial feature detect...
+ // Turns out, it's quite tricky to get right:
+ //
+ // Using !!navigator.geolocation does two things we don't want. It:
+ // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
+ // 2. Disables page caching in WebKit: webk.it/43956
+ //
+ // Meanwhile, in Firefox < 8, an about:config setting could expose
+ // a false positive that would throw an exception: bugzil.la/688158
+
+ Modernizr.addTest('geolocation', 'geolocation' in navigator);
+
+/*!
+{
+ "name": "Hashchange event",
+ "property": "hashchange",
+ "caniuse": "hashchange",
+ "tags": ["history"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.onhashchange"
+ }],
+ "polyfills": [
+ "jquery-hashchange",
+ "moo-historymanager",
+ "jquery-ajaxy",
+ "hasher",
+ "shistory"
+ ]
+}
+!*/
+/* DOC
+Detects support for the `hashchange` event, fired when the current location fragment changes.
+*/
+
+ Modernizr.addTest('hashchange', function() {
+ if (hasEvent('hashchange', window) === false) {
+ return false;
+ }
+
+ // documentMode logic from YUI to filter out IE8 Compat Mode
+ // which false positives.
+ return (document.documentMode === undefined || document.documentMode > 7);
+ });
+
+/*!
+{
+ "name": "Hidden Scrollbar",
+ "property": "hiddenscroll",
+ "authors": ["Oleg Korsunsky"]
+}
+!*/
+/* DOC
+Detects whether scrollbars on overflowed blocks are hidden (a-la iPhone)
+*/
+
+ Modernizr.addTest('hiddenscroll', function() {
+ return testStyles('#modernizr {width:100px;height:100px;overflow:scroll}', function(elem) {
+ return elem.offsetWidth === elem.clientWidth;
+ });
+ });
+
+/*!
+{
+ "name": "History API",
+ "property": "history",
+ "caniuse": "history",
+ "tags": ["history"],
+ "authors": ["Hay Kranen", "Alexander Farkas"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/html51/browsers.html#the-history-interface"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.history"
+ }],
+ "polyfills": ["historyjs", "html5historyapi"]
+}
+!*/
+/* DOC
+Detects support for the History API for manipulating the browser session history.
+*/
+
+ Modernizr.addTest('history', function() {
+ // Issue #733
+ // The stock browser on Android 2.2 & 2.3, and 4.0.x returns positive on history support
+ // Unfortunately support is really buggy and there is no clean way to detect
+ // these bugs, so we fall back to a user agent sniff :(
+ var ua = navigator.userAgent;
+
+ // We only want Android 2 and 4.0, stock browser, and not Chrome which identifies
+ // itself as 'Mobile Safari' as well, nor Windows Phone (issue #1471).
+ if ((ua.indexOf('Android 2.') !== -1 ||
+ (ua.indexOf('Android 4.0') !== -1)) &&
+ ua.indexOf('Mobile Safari') !== -1 &&
+ ua.indexOf('Chrome') === -1 &&
+ ua.indexOf('Windows Phone') === -1) {
+ return false;
+ }
+
+ // Return the regular check
+ return (window.history && 'pushState' in window.history);
+ });
+
+/*!
+{
+ "name": "HTML Imports",
+ "notes": [
+ {
+ "name": "W3C HTML Imports Specification",
+ "href": "http://w3c.github.io/webcomponents/spec/imports/"
+ },
+ {
+ "name": "HTML Imports - #include for the web",
+ "href": "http://www.html5rocks.com/en/tutorials/webcomponents/imports/"
+ }
+ ],
+ "polyfills": ["polymer-htmlimports"],
+ "property": "htmlimports",
+ "tags": ["html", "import"]
+}
+!*/
+/* DOC
+Detects support for HTML import, a feature that is used for loading in Web Components.
+ */
+
+
+ addTest('htmlimports', 'import' in createElement('link'));
+
+/*!
+{
+ "name": "IE8 compat mode",
+ "property": "ie8compat",
+ "authors": ["Erich Ocean"]
+}
+!*/
+/* DOC
+Detects whether or not the current browser is IE8 in compatibility mode (i.e. acting as IE7).
+*/
+
+ // In this case, IE8 will be acting as IE7. You may choose to remove features in this case.
+
+ // related:
+ // james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
+
+ Modernizr.addTest('ie8compat', (!window.addEventListener && !!document.documentMode && document.documentMode === 7));
+
+/*!
+{
+ "name": "iframe[sandbox] Attribute",
+ "property": "sandbox",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_sandbox"],
+ "notes": [
+ {
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox"
+ }],
+ "knownBugs": [ "False-positive on Firefox < 29" ]
+}
+!*/
+/* DOC
+Test for `sandbox` attribute in iframes.
+*/
+
+ Modernizr.addTest('sandbox', 'sandbox' in createElement('iframe'));
+
+/*!
+{
+ "name": "iframe[seamless] Attribute",
+ "property": "seamless",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_seamless"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-seamless"
+ }]
+}
+!*/
+/* DOC
+Test for `seamless` attribute in iframes.
+*/
+
+ Modernizr.addTest('seamless', 'seamless' in createElement('iframe'));
+
+/*!
+{
+ "name": "iframe[srcdoc] Attribute",
+ "property": "srcdoc",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_srcdoc"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-srcdoc"
+ }]
+}
+!*/
+/* DOC
+Test for `srcdoc` attribute in iframes.
+*/
+
+ Modernizr.addTest('srcdoc', 'srcdoc' in createElement('iframe'));
+
+/*!
+{
+ "name": "Animated PNG",
+ "async": true,
+ "property": "apng",
+ "tags": ["image"],
+ "builderAliases": ["img_apng"],
+ "notes": [{
+ "name": "Wikipedia Article",
+ "href": "http://en.wikipedia.org/wiki/APNG"
+ }]
+}
+!*/
+/* DOC
+Test for animated png support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ if (!Modernizr.canvas) {
+ return false;
+ }
+
+ var image = new Image();
+ var canvas = createElement('canvas');
+ var ctx = canvas.getContext('2d');
+
+ image.onload = function() {
+ addTest('apng', function() {
+ if (typeof canvas.getContext == 'undefined') {
+ return false;
+ }
+ else {
+ ctx.drawImage(image, 0, 0);
+ return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
+ }
+ });
+ };
+
+ image.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg==';
+ });
+
+/*!
+{
+ "name": "JPEG XR (extended range)",
+ "async": true,
+ "aliases": ["jpeg-xr"],
+ "property": "jpegxr",
+ "tags": ["image"],
+ "notes": [{
+ "name": "Wikipedia Article",
+ "href": "http://en.wikipedia.org/wiki/JPEG_XR"
+ }]
+}
+!*/
+/* DOC
+Test for JPEG XR support
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onload = image.onerror = function() {
+ addTest('jpegxr', image.width == 1, {aliases: ['jpeg-xr']});
+ };
+
+ image.src = 'data:image/vnd.ms-photo;base64,SUm8AQgAAAAFAAG8AQAQAAAASgAAAIC8BAABAAAAAQAAAIG8BAABAAAAAQAAAMC8BAABAAAAWgAAAMG8BAABAAAAHwAAAAAAAAAkw91vA07+S7GFPXd2jckNV01QSE9UTwAZAYBxAAAAABP/gAAEb/8AAQAAAQAAAA==';
+ });
+
+/*!
+{
+ "name": "sizes attribute",
+ "property": "sizes",
+ "tags": ["image"],
+ "authors": ["Mat Marquis"],
+ "notes": [{
+ "name": "Spec",
+ "href": "http://picture.responsiveimages.org/#parse-sizes-attr"
+ },{
+ "name": "Usage Details",
+ "href": "http://ericportis.com/posts/2014/srcset-sizes/"
+ }]
+}
+!*/
+/* DOC
+Test for the `sizes` attribute on images
+*/
+
+ Modernizr.addTest('sizes', 'sizes' in createElement('img'));
+
+/*!
+{
+ "name": "srcset attribute",
+ "property": "srcset",
+ "tags": ["image"],
+ "notes": [{
+ "name": "Smashing Magazine Article",
+ "href": "http://en.wikipedia.org/wiki/APNG"
+ },{
+ "name": "Generate multi-resolution images for srcset with Grunt",
+ "href": "http://addyosmani.com/blog/generate-multi-resolution-images-for-srcset-with-grunt/"
+ }]
+}
+!*/
+/* DOC
+Test for the srcset attribute of images
+*/
+
+ Modernizr.addTest('srcset', 'srcset' in createElement('img'));
+
+/*!
+{
+ "name": "Webp",
+ "async": true,
+ "property": "webp",
+ "tags": ["image"],
+ "builderAliases": ["img_webp"],
+ "authors": ["Krister Kari", "@amandeep", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "Webp Info",
+ "href": "http://code.google.com/speed/webp/"
+ }, {
+ "name": "Chormium blog - Chrome 32 Beta: Animated WebP images and faster Chrome for Android touch input",
+ "href": "http://blog.chromium.org/2013/11/chrome-32-beta-animated-webp-images-and.html"
+ }, {
+ "name": "Webp Lossless Spec",
+ "href": "https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification"
+ }, {
+ "name": "Article about WebP support on Android browsers",
+ "href": "http://www.wope-framework.com/en/2013/06/24/webp-support-on-android-browsers/"
+ }, {
+ "name": "Chormium WebP announcement",
+ "href": "http://blog.chromium.org/2011/11/lossless-and-transparency-encoding-in.html?m=1"
+ }]
+}
+!*/
+/* DOC
+Tests for lossy, non-alpha webp support.
+
+Tests for all forms of webp support (lossless, lossy, alpha, and animated)..
+
+ Modernizr.webp // Basic support (lossy)
+ Modernizr.webp.lossless // Lossless
+ Modernizr.webp.alpha // Alpha (both lossy and lossless)
+ Modernizr.webp.animation // Animated WebP
+
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+
+ var webpTests = [{
+ 'uri': 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=',
+ 'name': 'webp'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==',
+ 'name': 'webp.alpha'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA',
+ 'name': 'webp.animation'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=',
+ 'name': 'webp.lossless'
+ }];
+
+ var webp = webpTests.shift();
+ function test(name, uri, cb) {
+
+ var image = new Image();
+
+ function addResult(event) {
+ // if the event is from 'onload', check the see if the image's width is
+ // 1 pixel (which indiciates support). otherwise, it fails
+
+ var result = event && event.type === 'load' ? image.width == 1 : false;
+ var baseTest = name === 'webp';
+
+ /* jshint -W053 */
+ addTest(name, baseTest ? new Boolean(result) : result);
+
+ if (cb) {
+ cb(event);
+ }
+ }
+
+ image.onerror = addResult;
+ image.onload = addResult;
+
+ image.src = uri;
+ }
+
+ // test for webp support in general
+ test(webp.name, webp.uri, function(e) {
+ // if the webp test loaded, test everything else.
+ if (e && e.type === 'load') {
+ for (var i = 0; i < webpTests.length; i++) {
+ test(webpTests[i].name, webpTests[i].uri);
+ }
+ }
+ });
+
+ });
+
+
+/*!
+{
+ "name": "Webp Alpha",
+ "async": true,
+ "property": "webpalpha",
+ "aliases": ["webp-alpha"],
+ "tags": ["image"],
+ "authors": ["Krister Kari", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "WebP Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Article about WebP support on Android browsers",
+ "href": "http://www.wope-framework.com/en/2013/06/24/webp-support-on-android-browsers/"
+ },{
+ "name": "Chromium WebP announcement",
+ "href": "http://blog.chromium.org/2011/11/lossless-and-transparency-encoding-in.html?m=1"
+ }]
+}
+!*/
+/* DOC
+Tests for transparent webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webpalpha', false, {aliases: ['webp-alpha']});
+ };
+
+ image.onload = function() {
+ addTest('webpalpha', image.width == 1, {aliases: ['webp-alpha']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==';
+ });
+
+/*!
+{
+ "name": "Webp Animation",
+ "async": true,
+ "property": "webpanimation",
+ "aliases": ["webp-animation"],
+ "tags": ["image"],
+ "authors": ["Krister Kari", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "WebP Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Chromium blog - Chrome 32 Beta: Animated WebP images and faster Chrome for Android touch input",
+ "href": "http://blog.chromium.org/2013/11/chrome-32-beta-animated-webp-images-and.html"
+ }]
+}
+!*/
+/* DOC
+Tests for animated webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webpanimation', false, {aliases: ['webp-animation']});
+ };
+
+ image.onload = function() {
+ addTest('webpanimation', image.width == 1, {aliases: ['webp-animation']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA';
+ });
+
+/*!
+{
+ "name": "Webp Lossless",
+ "async": true,
+ "property": ["webplossless", "webp-lossless"],
+ "tags": ["image"],
+ "authors": ["@amandeep", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "Webp Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Webp Lossless Spec",
+ "href": "https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification"
+ }]
+}
+!*/
+/* DOC
+Tests for non-alpha lossless webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webplossless', false, {aliases: ['webp-lossless']});
+ };
+
+ image.onload = function() {
+ addTest('webplossless', image.width == 1, {aliases: ['webp-lossless']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=';
+ });
+
+/*!
+{
+ "name": "IndexedDB",
+ "property": "indexeddb",
+ "caniuse": "indexeddb",
+ "tags": ["storage"],
+ "polyfills": ["indexeddb"]
+}
+!*/
+/* DOC
+Detects support for the IndexedDB client-side storage API (final spec).
+*/
+
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+
+ var indexeddb = prefixed('indexedDB', window);
+ Modernizr.addTest('indexeddb', !!indexeddb);
+
+ if (!!indexeddb) {
+ Modernizr.addTest('indexeddb.deletedatabase', 'deleteDatabase' in indexeddb);
+ }
+;
+/*!
+{
+ "name": "IndexedDB Blob",
+ "property": "indexeddbblob"
+}
+!*/
+/* DOC
+Detects if the browser can save File/Blob objects to IndexedDB
+*/
+
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+ var indexeddb = prefixed('indexedDB', window);
+ var dbname = 'detect-blob-support';
+ var supportsBlob = false;
+ var request;
+ var db;
+
+ if (!(Modernizr.indexeddb && Modernizr.indexeddb.deleteDatabase)) {
+ return false;
+ }
+
+ // Calling `deleteDatabase` in a try…catch because some contexts (e.g. data URIs)
+ // will throw a `SecurityError`
+ try {
+ indexeddb.deleteDatabase(dbname).onsuccess = function() {
+ request = indexeddb.open(dbname, 1);
+ request.onupgradeneeded = function() {
+ request.result.createObjectStore('store');
+ };
+ request.onsuccess = function() {
+ db = request.result;
+ try {
+ db.transaction('store', 'readwrite').objectStore('store').put(new Blob(), 'key');
+ supportsBlob = true;
+ }
+ catch (e) {
+ supportsBlob = false;
+ }
+ finally {
+ addTest('indexeddbblob', supportsBlob);
+ db.close();
+ indexeddb.deleteDatabase(dbname);
+ }
+ };
+ };
+ }
+ catch (e) {
+ addTest('indexeddbblob', false);
+ }
+ });
+
+/*!
+{
+ "name": "input formaction",
+ "property": "inputformaction",
+ "aliases": ["input-formaction"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formaction"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/13-formaction.html"
+ }],
+ "polyfills": [
+ "webshims"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formaction attribute on form inputs
+*/
+
+ Modernizr.addTest('inputformaction', !!('formAction' in createElement('input')), {aliases: ['input-formaction']});
+
+/*!
+{
+ "name": "input formenctype",
+ "property": "inputformenctype",
+ "aliases": ["input-formenctype"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formenctype"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/16-formenctype.html"
+ }],
+ "polyfills": [
+ "html5formshim"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formenctype attribute on form inputs, which overrides the form enctype attribute
+*/
+
+ Modernizr.addTest('inputformenctype', !!('formEnctype' in createElement('input')), {aliases: ['input-formenctype']});
+
+/*!
+{
+ "name": "input formmethod",
+ "property": "inputformmethod",
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formmethod"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/14-formmethod.html"
+ }],
+ "polyfills": [
+ "webshims"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formmethod attribute on form inputs
+*/
+
+ Modernizr.addTest('inputformmethod', !!('formMethod' in createElement('input')));
+
+/*!
+{
+ "name": "input formtarget",
+ "property": "inputformtarget",
+ "aliases": ["input-formtarget"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formtarget"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/15-formtarget.html"
+ }],
+ "polyfills": [
+ "html5formshim"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formtarget attribute on form inputs, which overrides the form target attribute
+*/
+
+ Modernizr.addTest('inputformtarget', !!('formtarget' in createElement('input')), {aliases: ['input-formtarget']});
+
+/*!
+{
+ "name": "input[search] search event",
+ "property": "search",
+ "tags": ["input","search"],
+ "authors": ["Calvin Webster"],
+ "notes": [{
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/types/5-search.html?"
+ }, {
+ "name": "CSS Tricks",
+ "href": "http://css-tricks.com/webkit-html5-search-inputs/"
+ }]
+}
+!*/
+/* DOC
+There is a custom `search` event implemented in webkit browsers when using an `input[search]` element.
+*/
+
+ Modernizr.addTest('inputsearchevent', hasEvent('search'));
+
+/*!
+ {
+ "name": "Internationalization API",
+ "property": "intl",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl"
+ },{
+ "name": "ECMAScript spec",
+ "href": "http://www.ecma-international.org/ecma-402/1.0/"
+ }]
+ }
+ !*/
+/* DOC
+Detects support for the Internationalization API which allow easy formatting of number and dates and sorting string
+based on a locale
+*/
+
+ Modernizr.addTest('intl', !!prefixed('Intl', window));
+
+/*!
+{
+ "name": "Reverse Ordered Lists",
+ "property": "olreversed",
+ "notes": [{
+ "name": "Impressive Webs article",
+ "href": "http://impressivewebs.com/reverse-ordered-lists-html5"
+ }],
+ "builderAliases": ["lists_reversed"]
+}
+!*/
+/* DOC
+Detects support for the `reversed` attribute on the `<ol>` element.
+*/
+
+ Modernizr.addTest('olreversed', 'reversed' in createElement('ol'));
+
+/*!
+{
+ "name": "MathML",
+ "property": "mathml",
+ "caniuse": "mathml",
+ "authors": ["Addy Osmani", "Davide P. Cervone", "David Carlisle"],
+ "knownBugs": ["Firefox < 4 will likely return a false, however it does support MathML inside XHTML documents"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/Math/"
+ }],
+ "polyfills": ["mathjax"]
+}
+!*/
+/* DOC
+Detects support for MathML, for mathematic equations in web pages.
+*/
+
+ // Based on work by Davide (@dpvc) and David (@davidcarlisle)
+ // in https://github.com/mathjax/MathJax/issues/182
+
+ Modernizr.addTest('mathml', function() {
+ var ret;
+
+ testStyles('#modernizr{position:absolute;display:inline-block}', function(node) {
+ node.innerHTML += '<math><mfrac><mi>xx</mi><mi>yy</mi></mfrac></math>';
+
+ ret = node.offsetHeight > node.offsetWidth;
+ });
+
+ return ret;
+ });
+
+/*!
+{
+ "name": "Beacon API",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon"
+ },{
+ "name": "W3C specification",
+ "href": "https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html"
+ }],
+ "property": "beacon",
+ "tags": ["beacon", "network"],
+ "authors": ["Cătălin Mariș"]
+}
+!*/
+/* DOC
+Detects support for an API that allows for asynchronous transfer of small HTTP data from the client to a server.
+*/
+
+ Modernizr.addTest('beacon', 'sendBeacon' in navigator);
+
+/*!
+{
+ "name": "Low Bandwidth Connection",
+ "property": "lowbandwidth",
+ "tags": ["network"],
+ "builderAliases": ["network_connection"]
+}
+!*/
+/* DOC
+Tests for determining low-bandwidth via `navigator.connection`
+
+There are two iterations of the `navigator.connection` interface.
+
+The first is present in Android 2.2+ and only in the Browser (not WebView)
+
+- http://docs.phonegap.com/en/1.2.0/phonegap_connection_connection.md.html#connection.type
+- http://davidbcalhoun.com/2010/using-navigator-connection-android
+
+The second is specced at http://dev.w3.org/2009/dap/netinfo/ and perhaps landing in WebKit
+
+- http://bugs.webkit.org/show_bug.cgi?id=73528
+
+Unknown devices are assumed as fast
+
+For more rigorous network testing, consider boomerang.js: http://github.com/bluesmoon/boomerang/
+*/
+
+ Modernizr.addTest('lowbandwidth', function() {
+ // polyfill
+ var connection = navigator.connection || {type: 0};
+
+ return connection.type == 3 || // connection.CELL_2G
+ connection.type == 4 || // connection.CELL_3G
+ /^[23]g$/.test(connection.type); // string value in new spec
+ });
+
+/*!
+{
+ "name": "Server Sent Events",
+ "property": "eventsource",
+ "tags": ["network"],
+ "builderAliases": ["network_eventsource"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://dev.w3.org/html5/eventsource/"
+ }]
+}
+!*/
+/* DOC
+Tests for server sent events aka eventsource.
+*/
+
+ Modernizr.addTest('eventsource', 'EventSource' in window);
+
+/*!
+{
+ "name": "Fetch API",
+ "property": "fetch",
+ "tags": ["network"],
+ "caniuse": "fetch",
+ "notes": [{
+ "name": "Fetch Living Standard",
+ "href": "https://fetch.spec.whatwg.org/"
+ }],
+ "polyfills": ["fetch"]
+}
+!*/
+/* DOC
+Detects support for the fetch API, a modern replacement for XMLHttpRequest.
+*/
+
+ Modernizr.addTest('fetch', 'fetch' in window);
+
+/*!
+{
+ "name": "XHR responseType",
+ "property": "xhrresponsetype",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType.
+*/
+
+ Modernizr.addTest('xhrresponsetype', (function() {
+ if (typeof XMLHttpRequest == 'undefined') {
+ return false;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('get', '/', true);
+ return 'response' in xhr;
+ }()));
+
+
+ /**
+ * http://mathiasbynens.be/notes/xhr-responsetype-json#comment-4
+ *
+ * @access private
+ * @function testXhrType
+ * @param {string} type - String name of the XHR type you want to detect
+ * @returns {boolean}
+ * @author Mathias Bynens
+ */
+
+ /* istanbul ignore next */
+ var testXhrType = function(type) {
+ if (typeof XMLHttpRequest == 'undefined') {
+ return false;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('get', '/', true);
+ try {
+ xhr.responseType = type;
+ } catch (error) {
+ return false;
+ }
+ return 'response' in xhr && xhr.responseType == type;
+ };
+
+
+/*!
+{
+ "name": "XHR responseType='arraybuffer'",
+ "property": "xhrresponsetypearraybuffer",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='arraybuffer'.
+*/
+
+ Modernizr.addTest('xhrresponsetypearraybuffer', testXhrType('arraybuffer'));
+
+/*!
+{
+ "name": "XHR responseType='blob'",
+ "property": "xhrresponsetypeblob",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='blob'.
+*/
+
+ Modernizr.addTest('xhrresponsetypeblob', testXhrType('blob'));
+
+/*!
+{
+ "name": "XHR responseType='document'",
+ "property": "xhrresponsetypedocument",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='document'.
+*/
+
+ Modernizr.addTest('xhrresponsetypedocument', testXhrType('document'));
+
+/*!
+{
+ "name": "XHR responseType='json'",
+ "property": "xhrresponsetypejson",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ },{
+ "name": "Explanation of xhr.responseType='json'",
+ "href": "http://mathiasbynens.be/notes/xhr-responsetype-json"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='json'.
+*/
+
+ Modernizr.addTest('xhrresponsetypejson', testXhrType('json'));
+
+/*!
+{
+ "name": "XHR responseType='text'",
+ "property": "xhrresponsetypetext",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='text'.
+*/
+
+ Modernizr.addTest('xhrresponsetypetext', testXhrType('text'));
+
+/*!
+{
+ "name": "XML HTTP Request Level 2 XHR2",
+ "property": "xhr2",
+ "tags": ["network"],
+ "builderAliases": ["network_xhr2"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/XMLHttpRequest2/"
+ },{
+ "name": "Details on Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/385"
+ }]
+}
+!*/
+/* DOC
+Tests for XHR2.
+*/
+
+ // all three of these details report consistently across all target browsers:
+ // !!(window.ProgressEvent);
+ // 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest
+ Modernizr.addTest('xhr2', 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest());
+
+/*!
+{
+ "name": "Notification",
+ "property": "notification",
+ "caniuse": "notifications",
+ "authors": ["Theodoor van Donge", "Hendrik Beskow"],
+ "notes": [{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/notifications/quick/"
+ },{
+ "name": "W3C spec",
+ "href": "www.w3.org/TR/notifications/"
+ }],
+ "polyfills": ["desktop-notify", "html5-notifications"]
+}
+!*/
+/* DOC
+Detects support for the Notifications API
+*/
+
+ Modernizr.addTest('notification', 'Notification' in window && 'permission' in window.Notification && 'requestPermission' in window.Notification);
+
+/*!
+{
+ "name": "Page Visibility API",
+ "property": "pagevisibility",
+ "caniuse": "pagevisibility",
+ "tags": ["performance"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API"
+ },{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/2011/WD-page-visibility-20110602/"
+ },{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/pagevisibility/intro/"
+ }],
+ "polyfills": ["visibilityjs", "visiblyjs", "jquery-visibility"]
+}
+!*/
+/* DOC
+Detects support for the Page Visibility API, which can be used to disable unnecessary actions and otherwise improve user experience.
+*/
+
+ Modernizr.addTest('pagevisibility', !!prefixed('hidden', document, false));
+
+/*!
+{
+ "name": "Navigation Timing API",
+ "property": "performance",
+ "caniuse": "nav-timing",
+ "tags": ["performance"],
+ "authors": ["Scott Murphy (@uxder)"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/navigation-timing/"
+ },{
+ "name": "HTML5 Rocks article",
+ "href": "http://www.html5rocks.com/en/tutorials/webperformance/basics/"
+ }],
+ "polyfills": ["perfnow"]
+}
+!*/
+/* DOC
+Detects support for the Navigation Timing API, for measuring browser and connection performance.
+*/
+
+ Modernizr.addTest('performance', !!prefixed('performance', window));
+
+/*!
+{
+ "name": "DOM Pointer Events API",
+ "property": "pointerevents",
+ "tags": ["input"],
+ "authors": ["Stu Cox"],
+ "notes": [
+ {
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/pointerevents/"
+ }
+ ],
+ "warnings": ["This property name now refers to W3C DOM PointerEvents: https://github.com/Modernizr/Modernizr/issues/548#issuecomment-12812099"],
+ "polyfills": ["handjs"]
+}
+!*/
+/* DOC
+Detects support for the DOM Pointer Events API, which provides a unified event interface for pointing input devices, as implemented in IE10+.
+*/
+
+ // **Test name hijacked!**
+ // Now refers to W3C DOM PointerEvents spec rather than the CSS pointer-events property.
+ Modernizr.addTest('pointerevents', function() {
+ // Cannot use `.prefixed()` for events, so test each prefix
+ var bool = false,
+ i = domPrefixes.length;
+
+ // Don't forget un-prefixed...
+ bool = Modernizr.hasEvent('pointerdown');
+
+ while (i-- && !bool) {
+ if (hasEvent(domPrefixes[i] + 'pointerdown')) {
+ bool = true;
+ }
+ }
+ return bool;
+ });
+
+/*!
+{
+ "name": "Pointer Lock API",
+ "property": "pointerlock",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API"
+ }],
+ "builderAliases": ["pointerlock_api"]
+}
+!*/
+/* DOC
+Detects support the pointer lock API which allows you to lock the mouse cursor to the browser window.
+*/
+
+ // https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API
+ Modernizr.addTest('pointerlock', !!prefixed('exitPointerLock', document));
+
+/*!
+{
+ "name": "postMessage",
+ "property": "postmessage",
+ "caniuse": "x-doc-messaging",
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/html5/comms.html#posting-messages"
+ }],
+ "polyfills": ["easyxdm", "postmessage-jquery"]
+}
+!*/
+/* DOC
+Detects support for the `window.postMessage` protocol for cross-document messaging.
+*/
+
+ Modernizr.addTest('postmessage', 'postMessage' in window);
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "caniuse": "proximity",
+ "name": "Proximity API",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/Proximity_Events"
+ },{
+ "name": "W3C specification",
+ "href": "http://www.w3.org/TR/proximity/"
+ }],
+ "property": "proximity",
+ "tags": ["events", "proximity"]
+}
+!*/
+/* DOC
+Detects support for an API that allows users to get proximity related information from the device's proximity sensor.
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+
+ var timeout;
+ var timeoutTime = 300;
+
+ function advertiseSupport() {
+
+ // Clean up after ourselves
+ clearTimeout(timeout);
+ window.removeEventListener('deviceproximity', advertiseSupport);
+
+ // Advertise support as the browser supports
+ // the API and the device has a proximity sensor
+ addTest('proximity', true);
+
+ }
+
+ // Check if the browser has support for the API
+ if ('ondeviceproximity' in window && 'onuserproximity' in window) {
+
+ // Check if the device has a proximity sensor
+ // ( devices without such a sensor support the events but
+ // will never fire them resulting in a false positive )
+ window.addEventListener('deviceproximity', advertiseSupport);
+
+ // If the event doesn't fire in a reasonable amount of time,
+ // it means that the device doesn't have a proximity sensor,
+ // thus, we can advertise the "lack" of support
+ timeout = setTimeout(function() {
+ window.removeEventListener('deviceproximity', advertiseSupport);
+ addTest('proximity', false);
+ }, timeoutTime);
+
+ } else {
+ addTest('proximity', false);
+ }
+
+ });
+
+
+/*!
+{
+ "name": "QuerySelector",
+ "property": "queryselector",
+ "caniuse": "queryselector",
+ "tags": ["queryselector"],
+ "authors": ["Andrew Betts (@triblondon)"],
+ "notes": [{
+ "name" : "W3C Selectors reference",
+ "href": "http://www.w3.org/TR/selectors-api/#queryselectorall"
+ }],
+ "polyfills": ["css-selector-engine"]
+}
+!*/
+/* DOC
+Detects support for querySelector.
+*/
+
+ Modernizr.addTest('queryselector', 'querySelector' in document && 'querySelectorAll' in document);
+
+/*!
+{
+ "name": "Quota Storage Management API",
+ "property": "quotamanagement",
+ "tags": ["storage"],
+ "builderAliases": ["quota_management_api"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/quota-api/"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to request a specific amount of space for filesystem access
+*/
+
+ Modernizr.addTest('quotamanagement', function() {
+ var tempStorage = prefixed('temporaryStorage', navigator);
+ var persStorage = prefixed('persistentStorage', navigator);
+
+ return !!(tempStorage && persStorage);
+ });
+
+/*!
+{
+ "name": "requestAnimationFrame",
+ "property": "requestanimationframe",
+ "aliases": ["raf"],
+ "caniuse": "requestanimationframe",
+ "tags": ["animation"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/animation-timing/"
+ }],
+ "polyfills": ["raf"]
+}
+!*/
+/* DOC
+Detects support for the `window.requestAnimationFrame` API, for offloading animation repainting to the browser for optimized performance.
+*/
+
+ Modernizr.addTest('requestanimationframe', !!prefixed('requestAnimationFrame', window), {aliases: ['raf']});
+
+/*!
+{
+ "name": "script[async]",
+ "property": "scriptasync",
+ "caniuse": "script-async",
+ "tags": ["script"],
+ "builderAliases": ["script_async"],
+ "authors": ["Theodoor van Donge"]
+}
+!*/
+/* DOC
+Detects support for the `async` attribute on the `<script>` element.
+*/
+
+ Modernizr.addTest('scriptasync', 'async' in createElement('script'));
+
+/*!
+{
+ "name": "script[defer]",
+ "property": "scriptdefer",
+ "caniuse": "script-defer",
+ "tags": ["script"],
+ "builderAliases": ["script_defer"],
+ "authors": ["Theodoor van Donge"],
+ "warnings": ["Browser implementation of the `defer` attribute vary: http://stackoverflow.com/questions/3952009/defer-attribute-chrome#answer-3982619"],
+ "knownBugs": ["False positive in Opera 12"]
+}
+!*/
+/* DOC
+Detects support for the `defer` attribute on the `<script>` element.
+*/
+
+ Modernizr.addTest('scriptdefer', 'defer' in createElement('script'));
+
+/*!
+{
+ "name": "ServiceWorker API",
+ "property": "serviceworker",
+ "notes": [{
+ "name": "ServiceWorkers Explained",
+ "href": "https://github.com/slightlyoff/ServiceWorker/blob/master/explainer.md"
+ }]
+}
+!*/
+/* DOC
+ServiceWorkers (formerly Navigation Controllers) are a way to persistently cache resources to built apps that work better offline.
+*/
+
+ Modernizr.addTest('serviceworker', 'serviceWorker' in navigator);
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "name": "Speech Recognition API",
+ "notes": [
+ {
+ "name": "W3C Web Speech API Specification - The SpeechRecognition Interface",
+ "href": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-section"
+ },
+ {
+ "name": "Introduction to the Web Speech API",
+ "href": "http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API"
+ }
+ ],
+ "property": "speechrecognition",
+ "tags": ["input", "speech"]
+}
+!*/
+
+
+ Modernizr.addTest('speechrecognition', !!prefixed('SpeechRecognition', window));
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "name": "Speech Synthesis API",
+ "notes": [
+ {
+ "name": "W3C Web Speech API Specification - The SpeechSynthesis Interface",
+ "href": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#tts-section"
+ }
+ ],
+ "property": "speechsynthesis",
+ "tags": ["input", "speech"]
+}
+!*/
+
+
+ Modernizr.addTest('speechsynthesis', 'SpeechSynthesisUtterance' in window);
+
+/*!
+{
+ "name": "Local Storage",
+ "property": "localstorage",
+ "caniuse": "namevalue-storage",
+ "tags": ["storage"],
+ "knownBugs": [],
+ "notes": [],
+ "warnings": [],
+ "polyfills": [
+ "joshuabell-polyfill",
+ "cupcake",
+ "storagepolyfill",
+ "amplifyjs",
+ "yui-cacheoffline"
+ ]
+}
+!*/
+
+ // In FF4, if disabled, window.localStorage should === null.
+
+ // Normally, we could not test that directly and need to do a
+ // `('localStorage' in window) && ` test first because otherwise Firefox will
+ // throw bugzil.la/365772 if cookies are disabled
+
+ // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
+ // will throw the exception:
+ // QUOTA_EXCEEDED_ERROR DOM Exception 22.
+ // Peculiarly, getItem and removeItem calls do not throw.
+
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+
+ Modernizr.addTest('localstorage', function() {
+ var mod = 'modernizr';
+ try {
+ localStorage.setItem(mod, mod);
+ localStorage.removeItem(mod);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Session Storage",
+ "property": "sessionstorage",
+ "tags": ["storage"],
+ "polyfills": ["joshuabell-polyfill", "cupcake", "sessionstorage"]
+}
+!*/
+
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+ Modernizr.addTest('sessionstorage', function() {
+ var mod = 'modernizr';
+ try {
+ sessionStorage.setItem(mod, mod);
+ sessionStorage.removeItem(mod);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Web SQL Database",
+ "property": "websqldatabase",
+ "caniuse": "sql-storage",
+ "tags": ["storage"]
+}
+!*/
+
+ // Chrome incognito mode used to throw an exception when using openDatabase
+ // It doesn't anymore.
+ Modernizr.addTest('websqldatabase', 'openDatabase' in window);
+
+/*!
+{
+ "name": "style[scoped]",
+ "property": "stylescoped",
+ "caniuse": "style-scoped",
+ "tags": ["dom"],
+ "builderAliases": ["style_scoped"],
+ "authors": ["Cătălin Mariș"],
+ "notes": [{
+ "name": "WHATWG Specification",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#attr-style-scoped"
+ }],
+ "polyfills": ["scoped-styles"]
+}
+!*/
+/* DOC
+Support for the `scoped` attribute of the `<style>` element.
+*/
+
+ Modernizr.addTest('stylescoped', 'scoped' in createElement('style'));
+
+/*!
+{
+ "name": "SVG",
+ "property": "svg",
+ "caniuse": "svg",
+ "tags": ["svg"],
+ "authors": ["Erik Dahlstrom"],
+ "polyfills": [
+ "svgweb",
+ "raphael",
+ "amplesdk",
+ "canvg",
+ "svg-boilerplate",
+ "sie",
+ "dojogfx",
+ "fabricjs"
+ ]
+}
+!*/
+/* DOC
+Detects support for SVG in `<embed>` or `<object>` elements.
+*/
+
+ Modernizr.addTest('svg', !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect);
+
+/*!
+{
+ "name": "SVG as an <img> tag source",
+ "property": "svgasimg",
+ "caniuse" : "svg-img",
+ "tags": ["svg"],
+ "authors": ["Chris Coyier"],
+ "notes": [{
+ "name": "HTML5 Spec",
+ "href": "http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element"
+ }]
+}
+!*/
+
+
+ // Original Async test by Stu Cox
+ // https://gist.github.com/chriscoyier/8774501
+
+ // Now a Sync test based on good results here
+ // http://codepen.io/chriscoyier/pen/bADFx
+
+ // Note http://www.w3.org/TR/SVG11/feature#Image is *supposed* to represent
+ // support for the `<image>` tag in SVG, not an SVG file linked from an `<img>`
+ // tag in HTML – but it’s a heuristic which works
+ Modernizr.addTest('svgasimg', document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'));
+
+
+ /**
+ * Object.prototype.toString can be used with every object and allows you to
+ * get its class easily. Abstracting it off of an object prevents situations
+ * where the toString property has been overridden
+ *
+ * @access private
+ * @function toStringFn
+ * @returns {function} An abstracted toString function
+ */
+
+ var toStringFn = ({}).toString;
+
+/*!
+{
+ "name": "SVG clip paths",
+ "property": "svgclippaths",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "Demo",
+ "href": "http://srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg"
+ }]
+}
+!*/
+/* DOC
+Detects support for clip paths in SVG (only, not on HTML content).
+
+See [this discussion](http://github.com/Modernizr/Modernizr/issues/213) regarding applying SVG clip paths to HTML content.
+*/
+
+ Modernizr.addTest('svgclippaths', function() {
+ return !!document.createElementNS &&
+ /SVGClipPath/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'clipPath')));
+ });
+
+/*!
+{
+ "name": "SVG filters",
+ "property": "svgfilters",
+ "caniuse": "svg-filters",
+ "tags": ["svg"],
+ "builderAliases": ["svg_filters"],
+ "authors": ["Erik Dahlstrom"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/SVG11/filters.html"
+ }]
+}
+!*/
+
+ // Should fail in Safari: http://stackoverflow.com/questions/9739955/feature-detecting-support-for-svg-filters.
+ Modernizr.addTest('svgfilters', function() {
+ var result = false;
+ try {
+ result = 'SVGFEColorMatrixElement' in window &&
+ SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE == 2;
+ }
+ catch (e) {}
+ return result;
+ });
+
+/*!
+{
+ "name": "SVG foreignObject",
+ "property": "svgforeignobject",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/SVG11/extend.html"
+ }]
+}
+!*/
+/* DOC
+Detects support for foreignObject tag in SVG.
+*/
+
+ Modernizr.addTest('svgforeignobject', function() {
+ return !!document.createElementNS &&
+ /SVGForeignObject/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject')));
+ });
+
+/*!
+{
+ "name": "Inline SVG",
+ "property": "inlinesvg",
+ "caniuse": "svg-html5",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "Test page",
+ "href": "http://paulirish.com/demo/inline-svg"
+ }, {
+ "name": "Test page and results",
+ "href": "http://codepen.io/eltonmesquita/full/GgXbvo/"
+ }],
+ "polyfills": ["inline-svg-polyfill"],
+ "knownBugs": ["False negative on some Chromia browsers."]
+}
+!*/
+/* DOC
+Detects support for inline SVG in HTML (not within XHTML).
+*/
+
+ Modernizr.addTest('inlinesvg', function() {
+ var div = createElement('div');
+ div.innerHTML = '<svg/>';
+ return (typeof SVGRect != 'undefined' && div.firstChild && div.firstChild.namespaceURI) == 'http://www.w3.org/2000/svg';
+ });
+
+/*!
+{
+ "name": "SVG SMIL animation",
+ "property": "smil",
+ "caniuse": "svg-smil",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "W3C Synchronised Multimedia spec",
+ "href": "http://www.w3.org/AudioVideo/"
+ }]
+}
+!*/
+
+ // SVG SMIL animation
+ Modernizr.addTest('smil', function() {
+ return !!document.createElementNS &&
+ /SVGAnimate/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'animate')));
+ });
+
+/*!
+{
+ "name": "Template strings",
+ "property": "templatestrings",
+ "notes": [{
+ "name": "MDN Reference",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings#Browser_compatibility"
+ }]
+}
+!*/
+/* DOC
+Template strings are string literals allowing embedded expressions.
+*/
+
+ Modernizr.addTest('templatestrings', function() {
+ var supports;
+ try {
+ // A number of tools, including uglifyjs and require, break on a raw "`", so
+ // use an eval to get around that.
+ eval('``');
+ supports = true;
+ } catch (e) {}
+ return !!supports;
+ });
+
+/*!
+{
+ "name": "textarea maxlength",
+ "property": "textareamaxlength",
+ "aliases": ["textarea-maxlength"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea"
+ }],
+ "polyfills": [
+ "maxlength"
+ ]
+}
+!*/
+/* DOC
+Detect support for the maxlength attribute of a textarea element
+*/
+
+ Modernizr.addTest('textareamaxlength', !!('maxLength' in createElement('textarea')));
+
+/*!
+{
+ "name": "Touch Events",
+ "property": "touchevents",
+ "caniuse" : "touch",
+ "tags": ["media", "attribute"],
+ "notes": [{
+ "name": "Touch Events spec",
+ "href": "http://www.w3.org/TR/2013/WD-touch-events-20130124/"
+ }],
+ "warnings": [
+ "Indicates if the browser supports the Touch Events spec, and does not necessarily reflect a touchscreen device"
+ ],
+ "knownBugs": [
+ "False-positive on some configurations of Nokia N900",
+ "False-positive on some BlackBerry 6.0 builds – https://github.com/Modernizr/Modernizr/issues/372#issuecomment-3112695"
+ ]
+}
+!*/
+/* DOC
+Indicates if the browser supports the W3C Touch Events API.
+
+This *does not* necessarily reflect a touchscreen device:
+
+* Older touchscreen devices only emulate mouse events
+* Modern IE touch devices implement the Pointer Events API instead: use `Modernizr.pointerevents` to detect support for that
+* Some browsers & OS setups may enable touch APIs when no touchscreen is connected
+* Future browsers may implement other event models for touch interactions
+
+See this article: [You Can't Detect A Touchscreen](http://www.stucox.com/blog/you-cant-detect-a-touchscreen/).
+
+It's recommended to bind both mouse and touch/pointer events simultaneously – see [this HTML5 Rocks tutorial](http://www.html5rocks.com/en/mobile/touchandmouse/).
+
+This test will also return `true` for Firefox 4 Multitouch support.
+*/
+
+ // Chrome (desktop) used to lie about its support on this, but that has since been rectified: http://crbug.com/36415
+ Modernizr.addTest('touchevents', function() {
+ var bool;
+ if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
+ bool = true;
+ } else {
+ var query = ['@media (', prefixes.join('touch-enabled),('), 'heartz', ')', '{#modernizr{top:9px;position:absolute}}'].join('');
+ testStyles(query, function(node) {
+ bool = node.offsetTop === 9;
+ });
+ }
+ return bool;
+ });
+
+/*!
+{
+ "name": "Typed arrays",
+ "property": "typedarrays",
+ "caniuse": "typedarrays",
+ "tags": ["js"],
+ "authors": ["Stanley Stuart (@fivetanley)"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/JavaScript_typed_arrays"
+ },{
+ "name": "Kronos spec",
+ "href": "http://www.khronos.org/registry/typedarray/specs/latest/"
+ }],
+ "polyfills": ["joshuabell-polyfill"]
+}
+!*/
+/* DOC
+Detects support for native binary data manipulation via Typed Arrays in JavaScript.
+
+Does not check for DataView support; use `Modernizr.dataview` for that.
+*/
+
+ // Should fail in:
+ // Internet Explorer <= 9
+ // Firefox <= 3.6
+ // Chrome <= 6.0
+ // iOS Safari < 4.2
+ // Safari < 5.1
+ // Opera < 11.6
+ // Opera Mini, <= 7.0
+ // Android Browser < 4.0
+ // Blackberry Browser < 10.0
+
+ Modernizr.addTest('typedarrays', 'ArrayBuffer' in window);
+
+/*!
+{
+ "name": "Unicode characters",
+ "property": "unicode",
+ "tags": ["encoding"],
+ "warnings": [
+ "positive Unicode support doesn't mean you can use it inside <title>, this seems more related to OS & Language packs"
+ ]
+}
+!*/
+/* DOC
+Detects if unicode characters are supported in the current document.
+*/
+
+ /**
+ * Unicode special character support
+ *
+ * Detection is made by testing missing glyph box rendering against star character
+ * If widths are the same, this "probably" means the browser didn't support the star character and rendered a glyph box instead
+ * Just need to ensure the font characters have different widths
+ */
+ Modernizr.addTest('unicode', function() {
+ var bool;
+ var missingGlyph = createElement('span');
+ var star = createElement('span');
+
+ testStyles('#modernizr{font-family:Arial,sans;font-size:300em;}', function(node) {
+
+ missingGlyph.innerHTML = isSVG ? '\u5987' : 'ᝣ';
+ star.innerHTML = isSVG ? '\u2606' : '☆';
+
+ node.appendChild(missingGlyph);
+ node.appendChild(star);
+
+ bool = 'offsetWidth' in missingGlyph && missingGlyph.offsetWidth !== star.offsetWidth;
+ });
+
+ return bool;
+
+ });
+
+/*!
+{
+ "name": "Unicode Range",
+ "property": "unicoderange",
+ "notes": [{
+ "name" : "W3C reference",
+ "href": "http://www.w3.org/TR/2013/CR-css-fonts-3-20131003/#descdef-unicode-range"
+ }, {
+ "name" : "24 Way article",
+ "href": "http://24ways.org/2011/creating-custom-font-stacks-with-unicode-range"
+ }]
+}
+!*/
+
+ Modernizr.addTest('unicoderange', function() {
+
+ return Modernizr.testStyles('@font-face{font-family:"unicodeRange";src:local("Arial");unicode-range:U+0020,U+002E}#modernizr span{font-size:20px;display:inline-block;font-family:"unicodeRange",monospace}#modernizr .mono{font-family:monospace}', function(elem) {
+
+ // we use specify a unicode-range of 002E (the `.` glyph,
+ // and a monospace font as the fallback. If the first of
+ // these test glyphs is a different width than the other
+ // the other three (which are all monospace), then we
+ // have a winner.
+ var testGlyphs = ['.', '.', 'm', 'm'];
+
+ for (var i = 0; i < testGlyphs.length; i++) {
+ var elm = createElement('span');
+ elm.innerHTML = testGlyphs[i];
+ elm.className = i % 2 ? 'mono' : '';
+ elem.appendChild(elm);
+ testGlyphs[i] = elm.clientWidth;
+ }
+
+ return (testGlyphs[0] !== testGlyphs[1] && testGlyphs[2] === testGlyphs[3]);
+ });
+ });
+
+/*!
+{
+ "name": "Blob URLs",
+ "property": "bloburls",
+ "caniuse": "bloburls",
+ "notes": [{
+ "name": "W3C Working Draft",
+ "href": "http://www.w3.org/TR/FileAPI/#creating-revoking"
+ }],
+ "tags": ["file", "url"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Detects support for creating Blob URLs
+*/
+
+ var url = prefixed('URL', window, false);
+ url = url && window[url];
+ Modernizr.addTest('bloburls', url && 'revokeObjectURL' in url && 'createObjectURL' in url);
+
+/*!
+{
+ "name": "Data URI",
+ "property": "datauri",
+ "caniuse": "datauri",
+ "tags": ["url"],
+ "builderAliases": ["url_data_uri"],
+ "async": true,
+ "notes": [{
+ "name": "Wikipedia article",
+ "href": "http://en.wikipedia.org/wiki/Data_URI_scheme"
+ }],
+ "warnings": ["Support in Internet Explorer 8 is limited to images and linked resources like CSS files, not HTML files"]
+}
+!*/
+/* DOC
+Detects support for data URIs. Provides a subproperty to report support for data URIs over 32kb in size:
+
+```javascript
+Modernizr.datauri // true
+Modernizr.datauri.over32kb // false in IE8
+```
+*/
+
+ // https://github.com/Modernizr/Modernizr/issues/14
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ // IE7 throw a mixed content warning on HTTPS for this test, so we'll
+ // just blacklist it (we know it doesn't support data URIs anyway)
+ // https://github.com/Modernizr/Modernizr/issues/362
+ if (navigator.userAgent.indexOf('MSIE 7.') !== -1) {
+ // Keep the test async
+ setTimeout(function() {
+ addTest('datauri', false);
+ }, 10);
+ }
+
+ var datauri = new Image();
+
+ datauri.onerror = function() {
+ addTest('datauri', false);
+ };
+ datauri.onload = function() {
+ if (datauri.width == 1 && datauri.height == 1) {
+ testOver32kb();
+ }
+ else {
+ addTest('datauri', false);
+ }
+ };
+
+ datauri.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
+
+ // Once we have datauri, let's check to see if we can use data URIs over
+ // 32kb (IE8 can't). https://github.com/Modernizr/Modernizr/issues/321
+ function testOver32kb() {
+
+ var datauriBig = new Image();
+
+ datauriBig.onerror = function() {
+ addTest('datauri', true);
+ Modernizr.datauri = new Boolean(true);
+ Modernizr.datauri.over32kb = false;
+ };
+ datauriBig.onload = function() {
+ addTest('datauri', true);
+ Modernizr.datauri = new Boolean(true);
+ Modernizr.datauri.over32kb = (datauriBig.width == 1 && datauriBig.height == 1);
+ };
+
+ var base64str = 'R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
+ while (base64str.length < 33000) {
+ base64str = '\r\n' + base64str;
+ }
+ datauriBig.src = 'data:image/gif;base64,' + base64str;
+ }
+
+ });
+
+/*!
+{
+ "name": "URL parser",
+ "property": "urlparser",
+ "notes": [{
+ "name": "URL",
+ "href": "https://dvcs.w3.org/hg/url/raw-file/tip/Overview.html"
+ }],
+ "polyfills": ["urlparser"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["url"]
+}
+!*/
+/* DOC
+Check if browser implements the URL constructor for parsing URLs.
+*/
+
+ Modernizr.addTest('urlparser', function() {
+ var url;
+ try {
+ // have to actually try use it, because Safari defines a dud constructor
+ url = new URL('http://modernizr.com/');
+ return url.href === 'http://modernizr.com/';
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "IE User Data API",
+ "property": "userdata",
+ "tags": ["storage"],
+ "authors": ["@stereobooster"],
+ "notes": [{
+ "name": "MSDN Documentation",
+ "href": "http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx"
+ }]
+}
+!*/
+/* DOC
+Detects support for IE userData for persisting data, an API similar to localStorage but supported since IE5.
+*/
+
+ Modernizr.addTest('userdata', !!createElement('div').addBehavior);
+
+/*!
+{
+ "name": "Vibration API",
+ "property": "vibrate",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozVibrate"
+ },{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/vibration/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the API that provides access to the vibration mechanism of the hosting device, to provide tactile feedback.
+*/
+
+ Modernizr.addTest('vibrate', !!prefixed('vibrate', navigator));
+
+/*!
+{
+ "name": "HTML5 Video",
+ "property": "video",
+ "caniuse": "video",
+ "tags": ["html5"],
+ "knownBugs": [
+ "Without QuickTime, `Modernizr.video.h264` will be `undefined`; http://github.com/Modernizr/Modernizr/issues/546"
+ ],
+ "polyfills": [
+ "html5media",
+ "mediaelementjs",
+ "sublimevideo",
+ "videojs",
+ "leanbackplayer",
+ "videoforeverybody"
+ ]
+}
+!*/
+/* DOC
+Detects support for the video element, as well as testing what types of content it supports.
+
+Subproperties are provided to describe support for `ogg`, `h264` and `webm` formats, e.g.:
+
+```javascript
+Modernizr.video // true
+Modernizr.video.ogg // 'probably'
+```
+*/
+
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+
+ Modernizr.addTest('video', function() {
+ /* jshint -W053 */
+ var elem = createElement('video');
+ var bool = false;
+
+ // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
+ try {
+ if (bool = !!elem.canPlayType) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, '');
+
+ // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
+ bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, '');
+
+ bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, '');
+
+ bool.vp9 = elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, '');
+
+ bool.hls = elem.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, '');
+ }
+ } catch (e) {}
+
+ return bool;
+ });
+
+/*!
+{
+ "name": "Video Autoplay",
+ "property": "videoautoplay",
+ "tags": ["video"],
+ "async" : true,
+ "warnings": ["This test is very large – only include it if you absolutely need it"],
+ "knownBugs": ["crashes with an alert on iOS7 when added to homescreen"]
+}
+!*/
+/* DOC
+Checks for support of the autoplay attribute of the video element.
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var timeout;
+ var waitTime = 300;
+ var elem = createElement('video');
+ var elemStyle = elem.style;
+
+ function testAutoplay(arg) {
+ clearTimeout(timeout);
+ elem.removeEventListener('playing', testAutoplay, false);
+ addTest('videoautoplay', arg && arg.type === 'playing' || elem.currentTime !== 0);
+ elem.parentNode.removeChild(elem);
+ }
+
+ //skip the test if video itself, or the autoplay
+ //element on it isn't supported
+ if (!Modernizr.video || !('autoplay' in elem)) {
+ addTest('videoautoplay', false);
+ return;
+ }
+
+ elemStyle.position = 'absolute';
+ elemStyle.height = 0;
+ elemStyle.width = 0;
+
+ try {
+ if (Modernizr.video.ogg) {
+ elem.src = 'data:video/ogg;base64,T2dnUwACAAAAAAAAAABmnCATAAAAAHDEixYBKoB0aGVvcmEDAgEAAQABAAAQAAAQAAAAAAAFAAAAAQAAAAAAAAAAAGIAYE9nZ1MAAAAAAAAAAAAAZpwgEwEAAAACrA7TDlj///////////////+QgXRoZW9yYSsAAABYaXBoLk9yZyBsaWJ0aGVvcmEgMS4xIDIwMDkwODIyIChUaHVzbmVsZGEpAQAAABoAAABFTkNPREVSPWZmbXBlZzJ0aGVvcmEtMC4yOYJ0aGVvcmG+zSj3uc1rGLWpSUoQc5zmMYxSlKQhC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AAAAhaGRscgAAAAAAAAAAbWRpcgAAAAAAAAAAAAAAAAAAAAA6aWxzdAAAADKpdG9vAAAAKmRhdGEAAAABAAAAAEhhbmRCcmFrZSAwLjkuOCAyMDEyMDcxODAwAAACUm1kYXQAAAHkBgX/4NxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxMjAgLSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDExIC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9uczogY2FiYWM9MCByZWY9MSBkZWJsb2NrPTE6MDowIGFuYWx5c2U9MHgxOjAgbWU9ZXNhIHN1Ym1lPTkgcHN5PTAgbWl4ZWRfcmVmPTAgbWVfcmFuZ2U9NCBjaHJvbWFfbWU9MSB0cmVsbGlzPTAgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0wIGNocm9tYV9xcF9vZmZzZXQ9MCB0aHJlYWRzPTYgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTUwIGtleWludF9taW49NSBzY2VuZWN1dD00MCBpbnRyYV9yZWZyZXNoPTAgcmM9Y3FwIG1idHJlZT0wIHFwPTAAgAAAAD5liISscR8A+E4ACAACFoAAITAAAgsAAPgYCoKgoC+L4vi+KAvi+L4YfAEAACMzgABF9AAEUGUgABDJiXnf4AAAAARBmiKUAAAABEGaQpQAAAAEQZpilAAAAARBmoKU';
+ }
+ else {
+ addTest('videoautoplay', false);
+ return;
+ }
+ }
+
+ catch (e) {
+ addTest('videoautoplay', false);
+ return;
+ }
+
+ elem.setAttribute('autoplay', '');
+ elem.style.cssText = 'display:none';
+ docElement.appendChild(elem);
+ // wait for the next tick to add the listener, otherwise the element may
+ // not have time to play in high load situations (e.g. the test suite)
+ setTimeout(function() {
+ elem.addEventListener('playing', testAutoplay, false);
+ timeout = setTimeout(testAutoplay, waitTime);
+ }, 0);
+ });
+
+/*!
+{
+ "name": "Video Loop Attribute",
+ "property": "videoloop",
+ "tags": ["video", "media"]
+}
+!*/
+
+ Modernizr.addTest('videoloop', 'loop' in createElement('video'));
+
+/*!
+{
+ "name": "Video Preload Attribute",
+ "property": "videopreload",
+ "tags": ["video", "media"]
+}
+!*/
+
+ Modernizr.addTest('videopreload', 'preload' in createElement('video'));
+
+/*!
+{
+ "name": "VML",
+ "property": "vml",
+ "caniuse": "vml",
+ "tags": ["vml"],
+ "authors": ["Craig Andrews (@candrews)"],
+ "notes": [{
+ "name" : "W3C VML reference",
+ "href": "http://www.w3.org/TR/NOTE-VML"
+ },{
+ "name" : "Microsoft VML reference",
+ "href": "http://msdn.microsoft.com/en-us/library/bb263898%28VS.85%29.aspx"
+ }]
+}
+!*/
+/* DOC
+Detects support for VML.
+*/
+
+ Modernizr.addTest('vml', function() {
+ var containerDiv = createElement('div');
+ var supports = false;
+ var shape;
+
+ if (!isSVG) {
+ containerDiv.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
+ shape = containerDiv.firstChild;
+ shape.style.behavior = 'url(#default#VML)';
+ supports = shape ? typeof shape.adj == 'object' : true;
+ }
+
+ return supports;
+ });
+
+/*!
+{
+ "name": "Web Intents",
+ "property": "webintents",
+ "authors": ["Eric Bidelman"],
+ "notes": [{
+ "name": "Web Intents project site",
+ "href": "http://webintents.org/"
+ }],
+ "polyfills": ["webintents"],
+ "builderAliases": ["web_intents"]
+}
+!*/
+/* DOC
+Detects native support for the Web Intents APIs for service discovery and inter-application communication.
+
+Chrome added support for this in v19, but [removed it again in v24](http://lists.w3.org/Archives/Public/public-web-intents/2012Nov/0000.html) because of "a number of areas for
+development in both the API and specific user experience in Chrome". No other browsers currently support it, however a [JavaScript shim](http://webintents.org/#javascriptshim) is available.
+*/
+
+ Modernizr.addTest('webintents', !!prefixed('startActivity', navigator));
+
+/*!
+{
+ "name": "Web Animation API",
+ "property": "animation",
+ "tags": ["webanimations"],
+ "polyfills": ["webanimationsjs"],
+ "notes": [{
+ "name": "Introducing Web Animations",
+ "href": "http://brian.sol1.net/svg/2013/06/26/introducing-web-animations/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the Web Animation API, a way to create css animations in js
+*/
+
+ Modernizr.addTest('webanimations', 'animate' in createElement('div'));
+
+/*!
+{
+ "name": "WebGL",
+ "property": "webgl",
+ "caniuse": "webgl",
+ "tags": ["webgl", "graphics"],
+ "polyfills": ["jebgl", "cwebgl", "iewebgl"]
+}
+!*/
+
+ Modernizr.addTest('webgl', function() {
+ var canvas = createElement('canvas');
+ var supports = 'probablySupportsContext' in canvas ? 'probablySupportsContext' : 'supportsContext';
+ if (supports in canvas) {
+ return canvas[supports]('webgl') || canvas[supports]('experimental-webgl');
+ }
+ return 'WebGLRenderingContext' in window;
+ });
+
+/*!
+{
+ "name": "WebGL Extensions",
+ "property": "webglextensions",
+ "tags": ["webgl", "graphics"],
+ "builderAliases": ["webgl_extensions"],
+ "async" : true,
+ "authors": ["Ilmari Heikkinen"],
+ "knownBugs": [],
+ "notes": [{
+ "name": "Kronos extensions registry",
+ "href": "http://www.khronos.org/registry/webgl/extensions/"
+ }]
+}
+!*/
+/* DOC
+Detects support for OpenGL extensions in WebGL. It's `true` if the [WebGL extensions API](https://developer.mozilla.org/en-US/docs/Web/WebGL/Using_Extensions) is supported, then exposes the supported extensions as subproperties, e.g.:
+
+```javascript
+if (Modernizr.webglextensions) {
+ // WebGL extensions API supported
+}
+if ('OES_vertex_array_object' in Modernizr.webglextensions) {
+ // Vertex Array Objects extension supported
+}
+```
+*/
+
+ // based on code from ilmari heikkinen
+ // code.google.com/p/graphics-detect/source/browse/js/detect.js
+
+ // Not Async but handles it's own self
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ // Not a good candidate for css classes, so we avoid addTest stuff
+ Modernizr.webglextensions = new Boolean(false);
+
+ if (!Modernizr.webgl) {
+ return;
+ }
+
+ var canvas;
+ var ctx;
+ var exts;
+
+ try {
+ canvas = createElement('canvas');
+ ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
+ exts = ctx.getSupportedExtensions();
+ }
+ catch (e) {
+ return;
+ }
+
+ if (ctx !== undefined) {
+ Modernizr.webglextensions = new Boolean(true);
+ }
+
+ for (var i = -1, len = exts.length; ++i < len;) {
+ Modernizr.webglextensions[exts[i]] = true;
+ }
+
+ canvas = undefined;
+ });
+
+/*!
+{
+ "name": "RTC Peer Connection",
+ "property": "peerconnection",
+ "tags": ["webrtc"],
+ "authors": ["Ankur Oberoi"],
+ "notes": [{
+ "name": "W3C Web RTC spec",
+ "href": "http://www.w3.org/TR/webrtc/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('peerconnection', !!prefixed('RTCPeerConnection', window));
+
+/*!
+{
+ "name": "RTC Data Channel",
+ "property": "datachannel",
+ "notes": [{
+ "name": "HTML5 Rocks! Article",
+ "href": "http://www.html5rocks.com/en/tutorials/webrtc/datachannels/"
+ }]
+}
+!*/
+/* DOC
+Detect for the RTCDataChannel API that allows for transfer data directly from one peer to another
+*/
+
+
+ Modernizr.addTest('datachannel', function() {
+ if (!Modernizr.peerconnection) {
+ return false;
+ }
+ for (var i = 0, l = domPrefixes.length; i < l; i++) {
+ var peerConnectionConstructor = window[domPrefixes[i] + 'RTCPeerConnection'];
+
+ if (peerConnectionConstructor) {
+ var peerConnection = new peerConnectionConstructor({
+ 'iceServers': [{'url': 'stun:0'}]
+ });
+
+ return 'createDataChannel' in peerConnection;
+ }
+
+ }
+ return false;
+ });
+
+/*!
+{
+ "name": "getUserMedia",
+ "property": "getusermedia",
+ "caniuse": "stream",
+ "tags": ["webrtc"],
+ "authors": ["Eric Bidelman"],
+ "notes": [{
+ "name": "W3C Media Capture and Streams spec",
+ "href": "http://www.w3.org/TR/mediacapture-streams/"
+ }],
+ "polyfills": ["getusermedia"]
+}
+!*/
+
+ Modernizr.addTest('getusermedia', !!prefixed('getUserMedia', navigator));
+
+/*!
+{
+ "name": "WebSockets Support",
+ "property": "websockets",
+ "authors": ["Phread [fearphage]", "Mike Sherov [mikesherov]", "Burak Yigit Kaya [BYK]"],
+ "caniuse": "websockets",
+ "tags": ["html5"],
+ "warnings": [
+ "This test will reject any old version of WebSockets even if it is not prefixed such as in Safari 5.1"
+ ],
+ "notes": [{
+ "name": "CLOSING State and Spec",
+ "href": "http://www.w3.org/TR/websockets/#the-websocket-interface"
+ }],
+ "polyfills": [
+ "sockjs",
+ "socketio",
+ "kaazing-websocket-gateway",
+ "websocketjs",
+ "atmosphere",
+ "graceful-websocket",
+ "portal",
+ "datachannel"
+ ]
+}
+!*/
+
+ Modernizr.addTest('websockets', 'WebSocket' in window && window.WebSocket.CLOSING === 2);
+
+/*!
+{
+ "name": "Binary WebSockets",
+ "property": "websocketsbinary",
+ "tags": ["websockets"],
+ "builderAliases": ["websockets_binary"]
+}
+!*/
+
+ // binaryType is truthy if there is support.. returns "blob" in new-ish chrome.
+ // plus.google.com/115535723976198353696/posts/ERN6zYozENV
+ // github.com/Modernizr/Modernizr/issues/370
+
+ Modernizr.addTest('websocketsbinary', function() {
+ var protocol = 'https:' == location.protocol ? 'wss' : 'ws',
+ protoBin;
+
+ if ('WebSocket' in window) {
+ if (protoBin = 'binaryType' in WebSocket.prototype) {
+ return protoBin;
+ }
+ try {
+ return !!(new WebSocket(protocol + '://.').binaryType);
+ } catch (e) {}
+ }
+
+ return false;
+ });
+
+/*!
+{
+ "name": "Framed window",
+ "property": "framed",
+ "tags": ["window"],
+ "builderAliases": ["window_framed"]
+}
+!*/
+/* DOC
+Tests if page is iframed.
+*/
+
+ // github.com/Modernizr/Modernizr/issues/242
+
+ Modernizr.addTest('framed', window.location != top.location);
+
+/*!
+{
+ "name": "Workers from Blob URIs",
+ "property": "blobworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_blobworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }],
+ "knownBugs": ["This test may output garbage to console."],
+ "authors": ["Jussi Kalliokoski"],
+ "async": true
+}
+!*/
+/* DOC
+Detects support for creating Web Workers from Blob URIs.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ try {
+ // we're avoiding using Modernizr._domPrefixes as the prefix capitalization on
+ // these guys are notoriously peculiar.
+ var BlobBuilder = window.BlobBuilder;
+ var URL = window.URL;
+ if (Modernizr._config.usePrefix) {
+ BlobBuilder = BlobBuilder || window.MozBlobBuilder || window.WebKitBlobBuilder || window.MSBlobBuilder || window.OBlobBuilder;
+ URL = URL || window.MozURL || window.webkitURL || window.MSURL || window.OURL;
+ }
+ var data = 'Modernizr',
+ blob,
+ bb,
+ worker,
+ url,
+ timeout,
+ scriptText = 'this.onmessage=function(e){postMessage(e.data)}';
+
+ try {
+ blob = new Blob([scriptText], {type:'text/javascript'});
+ } catch (e) {
+ // we'll fall back to the deprecated BlobBuilder
+ }
+ if (!blob) {
+ bb = new BlobBuilder();
+ bb.append(scriptText);
+ blob = bb.getBlob();
+ }
+
+ url = URL.createObjectURL(blob);
+ worker = new Worker(url);
+
+ worker.onmessage = function(e) {
+ addTest('blobworkers', data === e.data);
+ cleanup();
+ };
+
+ // Just in case...
+ worker.onerror = fail;
+ timeout = setTimeout(fail, 200);
+
+ worker.postMessage(data);
+ } catch (e) {
+ fail();
+ }
+
+ function fail() {
+ addTest('blobworkers', false);
+ cleanup();
+ }
+
+ function cleanup() {
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ if (worker) {
+ worker.terminate();
+ }
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+ });
+
+/*!
+{
+ "name": "Workers from Data URIs",
+ "property": "dataworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_dataworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }],
+ "knownBugs": ["This test may output garbage to console."],
+ "authors": ["Jussi Kalliokoski"],
+ "async": true
+}
+!*/
+/* DOC
+Detects support for creating Web Workers from Data URIs.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ try {
+ var data = 'Modernizr',
+ worker = new Worker('data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=');
+
+ worker.onmessage = function(e) {
+ worker.terminate();
+ addTest('dataworkers', data === e.data);
+ worker = null;
+ };
+
+ // Just in case...
+ worker.onerror = function() {
+ addTest('dataworkers', false);
+ worker = null;
+ };
+
+ setTimeout(function() {
+ addTest('dataworkers', false);
+ }, 200);
+
+ worker.postMessage(data);
+ } catch (e) {
+ setTimeout(function() {
+ addTest('dataworkers', false);
+ }, 0);
+ }
+ });
+
+/*!
+{
+ "name": "Shared Workers",
+ "property": "sharedworkers",
+ "caniuse" : "sharedworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_sharedworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `SharedWorker` API from the Web Workers spec.
+*/
+
+ Modernizr.addTest('sharedworkers', 'SharedWorker' in window);
+
+/*!
+{
+ "name": "Web Workers",
+ "property": "webworkers",
+ "caniuse" : "webworkers",
+ "tags": ["performance", "workers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }, {
+ "name": "HTML5 Rocks article",
+ "href": "http://www.html5rocks.com/en/tutorials/workers/basics/"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/Guide/Performance/Using_web_workers"
+ }],
+ "polyfills": ["fakeworker", "html5shims"]
+}
+!*/
+/* DOC
+Detects support for the basic `Worker` API from the Web Workers spec. Web Workers provide a simple means for web content to run scripts in background threads.
+*/
+
+ Modernizr.addTest('webworkers', 'Worker' in window);
+
+/*!
+{
+ "name": "Transferables Objects",
+ "property": "transferables",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["transferables"],
+ "notes": [{
+ "name": "HTML5 Rocks article",
+ "href": "http://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast"
+ }],
+ "async": true
+}
+!*/
+/* DOC
+Detects whether web workers can use `transferables` objects.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var prerequisites = !!(Modernizr.blobconstructor &&
+ Modernizr.bloburls &&
+ Modernizr.webworkers &&
+ Modernizr.typedarrays);
+
+ // Early exit
+ if (!prerequisites) {
+ return addTest('transferables', false);
+ }
+
+ // Proper test if prerequisites are met
+ try {
+ var buffer,
+ scriptText = 'var hello = "world"',
+ blob = new Blob([scriptText], {type: 'text/javascript'}),
+ url = URL.createObjectURL(blob),
+ worker = new Worker(url),
+ timeout;
+
+ // Just in case...
+ worker.onerror = fail;
+ timeout = setTimeout(fail, 200);
+
+ // Building an minimal array buffer to send to the worker
+ buffer = new ArrayBuffer(1);
+
+ // Sending the buffer to the worker
+ worker.postMessage(buffer, [buffer]);
+
+ // If length of buffer is now 0, transferables are working
+ addTest('transferables', buffer.byteLength === 0);
+ cleanup();
+ } catch (e) {
+ fail();
+ }
+
+ function fail() {
+ addTest('transferables', false);
+ cleanup();
+ }
+
+ function cleanup() {
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ if (worker) {
+ worker.terminate();
+ }
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+ });
+
+
+ // Run each test
+ testRunner();
+
+ // Remove the "no-js" class if it exists
+ setClasses(classes);
+
+ delete ModernizrProto.addTest;
+ delete ModernizrProto.addAsyncTest;
+
+ // Run the things that are supposed to run after the tests
+ for (var i = 0; i < Modernizr._q.length; i++) {
+ Modernizr._q[i]();
+ }
+
+ // Leak Modernizr namespace
+ window.Modernizr = Modernizr;
+
+
+;
+
+})(window, document);
\ No newline at end of file
--- /dev/null
+/*!
+{
+ "name": "a[download] Attribute",
+ "property": "adownload",
+ "caniuse" : "download",
+ "tags": ["media", "attribute"],
+ "builderAliases": ["a_download"],
+ "notes": [{
+ "name": "WhatWG Reference",
+ "href": "http://developers.whatwg.org/links.html#downloading-resources"
+ }]
+}
+!*/
+/* DOC
+When used on an `<a>`, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigating to it.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('adownload', !window.externalHost && 'download' in createElement('a'));
+});
--- /dev/null
+/*!
+{
+ "name": "Ambient Light Events",
+ "property": "ambientlight",
+ "notes": [{
+ "name": "W3C Ambient Light Events",
+ "href": "http://www.w3.org/TR/ambient-light/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the API that provides information about the ambient light levels, as detected by the device's light detector, in terms of lux units.
+*/
+define(['Modernizr', 'hasEvent'], function(Modernizr, hasEvent) {
+ Modernizr.addTest('ambientlight', hasEvent('devicelight', window));
+});
--- /dev/null
+/*!
+{
+ "name": "Application Cache",
+ "property": "applicationcache",
+ "caniuse": "offline-apps",
+ "tags": ["storage", "offline"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/docs/HTML/Using_the_application_cache"
+ }],
+ "polyfills": ["html5gears"]
+}
+!*/
+/* DOC
+Detects support for the Application Cache, for storing data to enable web-based applications run offline.
+
+The API has been [heavily criticized](http://alistapart.com/article/application-cache-is-a-douchebag) and discussions are underway to address this.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('applicationcache', 'applicationCache' in window);
+});
--- /dev/null
+/*!
+{
+ "name" : "HTML5 Audio Element",
+ "property": "audio",
+ "tags" : ["html5", "audio", "media"]
+}
+!*/
+/* DOC
+Detects the audio element
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ // This tests evaluates support of the audio element, as well as
+ // testing what types of content it supports.
+ //
+ // We're using the Boolean constructor here, so that we can extend the value
+ // e.g. Modernizr.audio // true
+ // Modernizr.audio.ogg // 'probably'
+ //
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+ Modernizr.addTest('audio', function() {
+ /* jshint -W053 */
+ var elem = createElement('audio');
+ var bool = false;
+
+ try {
+ if (bool = !!elem.canPlayType) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, '');
+ bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/, '');
+ bool.opus = elem.canPlayType('audio/ogg; codecs="opus"') .replace(/^no$/, '');
+
+ // Mimetypes accepted:
+ // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
+ // bit.ly/iphoneoscodecs
+ bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/, '');
+ bool.m4a = (elem.canPlayType('audio/x-m4a;') ||
+ elem.canPlayType('audio/aac;')) .replace(/^no$/, '');
+ }
+ } catch (e) { }
+
+ return bool;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Audio Loop Attribute",
+ "property": "audioloop",
+ "tags": ["audio", "media"]
+}
+!*/
+/* DOC
+Detects if an audio element can automatically restart, once it has finished
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('audioloop', 'loop' in createElement('audio'));
+});
--- /dev/null
+/*!
+{
+ "name": "Audio Preload Attribute",
+ "property": "audiopreload",
+ "tags": ["audio", "media"]
+}
+!*/
+/* DOC
+Detects if audio can be downloaded in the background before it starts playing in the `<audio>` element
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('audiopreload', 'preload' in createElement('audio'));
+});
--- /dev/null
+/*!
+{
+ "name": "Web Audio API",
+ "property": "webaudio",
+ "caniuse": "audio-api",
+ "polyfills": ["xaudiojs", "dynamicaudiojs", "audiolibjs"],
+ "tags": ["audio", "media"],
+ "builderAliases": ["audio_webaudio_api"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3 Specification",
+ "href": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html"
+ }]
+}
+!*/
+/* DOC
+Detects the older non standard webaudio API, (as opposed to the standards based AudioContext API)
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('webaudio', function() {
+ var prefixed = 'webkitAudioContext' in window;
+ var unprefixed = 'AudioContext' in window;
+
+ if (Modernizr._config.usePrefixes) {
+ return prefixed || unprefixed;
+ }
+ return unprefixed;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Battery API",
+ "property": "batteryapi",
+ "aliases": ["battery-api"],
+ "builderAliases": ["battery_api"],
+ "tags": ["device", "media"],
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
+ }]
+}
+!*/
+/* DOC
+Detect support for the Battery API, for accessing information about the system's battery charge level.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('batteryapi', !!prefixed('battery', navigator), {aliases: ['battery-api']});
+});
--- /dev/null
+/*!
+{
+ "name": "Low Battery Level",
+ "property": "lowbattery",
+ "tags": ["hardware", "mobile"],
+ "builderAliases": ["battery_level"],
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
+ }]
+}
+!*/
+/* DOC
+Enable a developer to remove CPU intensive CSS/JS when battery is low
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('lowbattery', function() {
+ var minLevel = 0.20;
+ var battery = prefixed('battery', navigator);
+ return !!(battery && !battery.charging && battery.level <= minLevel);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Blob constructor",
+ "property": "blobconstructor",
+ "aliases": ["blob-constructor"],
+ "builderAliases": ["blob_constructor"],
+ "caniuse": "blobbuilder",
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob"
+ }],
+ "polyfills": ["blobjs"]
+}
+!*/
+/* DOC
+Detects support for the Blob constructor, for creating file-like objects of immutable, raw data.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('blobconstructor', function() {
+ try {
+ return !!new Blob();
+ } catch (e) {
+ return false;
+ }
+ }, {
+ aliases: ['blob-constructor']
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Canvas",
+ "property": "canvas",
+ "caniuse": "canvas",
+ "tags": ["canvas", "graphics"],
+ "polyfills": ["flashcanvas", "excanvas", "slcanvas", "fxcanvas"]
+}
+!*/
+/* DOC
+Detects support for the `<canvas>` element for 2D drawing.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ // On the S60 and BB Storm, getContext exists, but always returns undefined
+ // so we actually have to call getContext() to verify
+ // github.com/Modernizr/Modernizr/issues/issue/97/
+ Modernizr.addTest('canvas', function() {
+ var elem = createElement('canvas');
+ return !!(elem.getContext && elem.getContext('2d'));
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "canvas blending support",
+ "property": "canvasblending",
+ "tags": ["canvas"],
+ "async" : false,
+ "notes": [{
+ "name": "HTML5 Spec",
+ "href": "https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending"
+ },
+ {
+ "name": "Article",
+ "href": "http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas"
+ }]
+}
+!*/
+/* DOC
+Detects if Photoshop style blending modes are available in canvas.
+*/
+define(['Modernizr', 'createElement', 'test/canvas'], function(Modernizr, createElement) {
+
+ Modernizr.addTest('canvasblending', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ var ctx = createElement('canvas').getContext('2d');
+ // firefox 3 throws an error when setting an invalid `globalCompositeOperation`
+ try {
+ ctx.globalCompositeOperation = 'screen';
+ } catch (e) {}
+
+ return ctx.globalCompositeOperation === 'screen';
+ });
+
+});
--- /dev/null
+/*!
+{
+ "name": "canvas.toDataURL type support",
+ "property": ["todataurljpeg", "todataurlpng", "todataurlwebp"],
+ "tags": ["canvas"],
+ "builderAliases": ["canvas_todataurl_type"],
+ "async" : false,
+ "notes": [{
+ "name": "MDN article",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement.toDataURL"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement', 'test/canvas'], function(Modernizr, createElement) {
+
+ var canvas = createElement('canvas');
+
+ Modernizr.addTest('todataurljpeg', function() {
+ return !!Modernizr.canvas && canvas.toDataURL('image/jpeg').indexOf('data:image/jpeg') === 0;
+ });
+ Modernizr.addTest('todataurlpng', function() {
+ return !!Modernizr.canvas && canvas.toDataURL('image/png').indexOf('data:image/png') === 0;
+ });
+ Modernizr.addTest('todataurlwebp', function() {
+ var supports = false;
+
+ // firefox 3 throws an error when you use an "invalid" toDataUrl
+ try {
+ supports = !!Modernizr.canvas && canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0;
+ } catch (e) {}
+
+ return supports;
+ });
+
+});
--- /dev/null
+/*!
+{
+ "name": "canvas winding support",
+ "property": ["canvaswinding"],
+ "tags": ["canvas"],
+ "async" : false,
+ "notes": [{
+ "name": "Article",
+ "href": "http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/"
+ }]
+}
+!*/
+/* DOC
+Determines if winding rules, which controls if a path can go clockwise or counterclockwise
+*/
+define(['Modernizr', 'createElement', 'test/canvas'], function(Modernizr, createElement) {
+
+ Modernizr.addTest('canvaswinding', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ var ctx = createElement('canvas').getContext('2d');
+
+ ctx.rect(0, 0, 10, 10);
+ ctx.rect(2, 2, 6, 6);
+ return ctx.isPointInPath(5, 5, 'evenodd') === false;
+ });
+
+});
--- /dev/null
+/*!
+{
+ "name": "Canvas text",
+ "property": "canvastext",
+ "caniuse": "canvas-text",
+ "tags": ["canvas", "graphics"],
+ "polyfills": ["canvastext"]
+}
+!*/
+/* DOC
+Detects support for the text APIs for `<canvas>` elements.
+*/
+define(['Modernizr', 'createElement', 'test/canvas'], function(Modernizr, createElement) {
+ Modernizr.addTest('canvastext', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ return typeof createElement('canvas').getContext('2d').fillText == 'function';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Content Editable",
+ "property": "contenteditable",
+ "caniuse": "contenteditable",
+ "notes": [{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `contenteditable` attribute of elements, allowing their DOM text contents to be edited directly by the user.
+*/
+define(['Modernizr', 'createElement', 'docElement'], function(Modernizr, createElement, docElement) {
+ Modernizr.addTest('contenteditable', function() {
+ // early bail out
+ if (!('contentEditable' in docElement)) {
+ return;
+ }
+
+ // some mobile browsers (android < 3.0, iOS < 5) claim to support
+ // contentEditable, but but don't really. This test checks to see
+ // confirms whether or not it actually supports it.
+
+ var div = createElement('div');
+ div.contentEditable = true;
+ return div.contentEditable === 'true';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Context menus",
+ "property": "contextmenu",
+ "caniuse": "menu",
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/html5/interactive-elements.html#context-menus"
+ },{
+ "name": "thewebrocks.com Demo",
+ "href": "http://thewebrocks.com/demos/context-menu/"
+ }],
+ "polyfills": ["jquery-contextmenu"]
+}
+!*/
+/* DOC
+Detects support for custom context menus.
+*/
+define(['Modernizr', 'docElement'], function(Modernizr, docElement) {
+ Modernizr.addTest(
+ 'contextmenu',
+ ('contextMenu' in docElement && 'HTMLMenuItemElement' in window)
+ );
+});
--- /dev/null
+/*!
+{
+ "name": "Cookies",
+ "property": "cookies",
+ "tags": ["storage"],
+ "authors": ["tauren"]
+}
+!*/
+/* DOC
+Detects whether cookie support is enabled.
+*/
+define(['Modernizr'], function(Modernizr) {
+ // https://github.com/Modernizr/Modernizr/issues/191
+
+ Modernizr.addTest('cookies', function() {
+ // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking
+ // configurations. For example, when blocking cookies via the Advanced
+ // Privacy Settings in IE9, it always returns true. And there have been
+ // issues in the past with site-specific exceptions.
+ // Don't rely on it.
+
+ // try..catch because some in situations `document.cookie` is exposed but throws a
+ // SecurityError if you try to access it; e.g. documents created from data URIs
+ // or in sandboxed iframes (depending on flags/context)
+ try {
+ // Create cookie
+ document.cookie = 'cookietest=1';
+ var ret = document.cookie.indexOf('cookietest=') != -1;
+ // Delete cookie
+ document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
+ return ret;
+ }
+ catch (e) {
+ return false;
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Cross-Origin Resource Sharing",
+ "property": "cors",
+ "caniuse": "cors",
+ "authors": ["Theodoor van Donge"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS"
+ }],
+ "polyfills": ["pmxdr", "ppx", "flxhr"]
+}
+!*/
+/* DOC
+Detects support for Cross-Origin Resource Sharing: method of performing XMLHttpRequests across domains.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('cors', 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest());
+});
--- /dev/null
+/*!
+{
+ "name": "getRandomValues",
+ "property": "getrandomvalues",
+ "caniuse": "window.crypto.getRandomValues",
+ "tags": ["crypto"],
+ "authors": ["komachi"],
+ "notes": [{
+ "name": "W3C Editor’s Draft",
+ "href": "https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#RandomSource-method-getRandomValues"
+ }],
+ "polyfills": [
+ "polycrypt"
+ ]
+}
+!*/
+/* DOC
+Detects support for the window.crypto.getRandomValues for generate cryptographically secure random numbers
+*/
+define(['Modernizr', 'prefixed', 'is'], function(Modernizr, prefixed, is) {
+ // In Safari <=5.0 `window.crypto` exists (for some reason) but is `undefined`, so we have to check
+ // it’s truthy before checking for existence of `getRandomValues`
+ var crypto = prefixed('crypto', window);
+ var supportsGetRandomValues;
+
+ // Safari 6.0 supports crypto.getRandomValues, but does not return the array,
+ // which is required by the spec, so we need to actually check.
+ if (crypto && 'getRandomValues' in crypto && 'Uint32Array' in window) {
+ var array = new Uint32Array(10);
+ var values = crypto.getRandomValues(array);
+ supportsGetRandomValues = values && is(values[0], 'number');
+ }
+
+ Modernizr.addTest('getrandomvalues', !!supportsGetRandomValues);
+});
--- /dev/null
+/*!
+{
+ "name": "cssall",
+ "property": "cssall",
+ "notes": [{
+ "name": "Spec",
+ "href": "http://dev.w3.org/csswg/css-cascade/#all-shorthand"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `all` css property, which is a shorthand to reset all css properties (except direction and unicode-bidi) to their original value
+*/
+
+define(['Modernizr', 'docElement'], function(Modernizr, docElement) {
+ Modernizr.addTest('cssall', 'all' in docElement.style);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Animations",
+ "property": "cssanimations",
+ "caniuse": "css-animation",
+ "polyfills": ["transformie", "csssandpaper"],
+ "tags": ["css"],
+ "warnings": ["Android < 4 will pass this test, but can only animate a single property at a time"],
+ "notes": [{
+ "name" : "Article: 'Dispelling the Android CSS animation myths'",
+ "href": "http://goo.gl/OGw5Gm"
+ }]
+}
+!*/
+/* DOC
+Detects whether or not elements can be animated using CSS
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('cssanimations', testAllProps('animationName', 'a', true));
+});
--- /dev/null
+/*!
+{
+ "name": "Appearance",
+ "property": "appearance",
+ "caniuse": "css-appearance",
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance"
+ },{
+ "name": "CSS-Tricks CSS Almanac: appearance",
+ "href": "http://css-tricks.com/almanac/properties/a/appearance/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `appearance` css property, which is used to make an
+element inherit the style of a standard user interface element. It can also be
+used to remove the default styles of an element, such as input and buttons.
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('appearance', testAllProps('appearance'));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Background Blend Mode",
+ "property": "backgroundblendmode",
+ "caniuse": "css-backgroundblendmode",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "CSS Blend Modes could be the next big thing in Web Design",
+ "href": " https://medium.com/@bennettfeely/css-blend-modes-could-be-the-next-big-thing-in-web-design-6b51bf53743a"
+ }, {
+ "name": "Demo",
+ "href": "http://bennettfeely.com/gradients/"
+ }
+ ]
+}
+!*/
+/* DOC
+Detects the ability for the browser to composite backgrounds using blending modes similar to ones found in Photoshop or Illustrator.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('backgroundblendmode', prefixed('backgroundBlendMode', 'text'));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Background Clip Text",
+ "property": "backgroundcliptext",
+ "authors": ["ausi"],
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/image-under-text/"
+ },
+ {
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-clip"
+ },
+ {
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/199"
+ }
+ ]
+}
+!*/
+/* DOC
+Detects the ability to control specifies whether or not an element's background
+extends beyond its border in CSS
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('backgroundcliptext', function() {
+ return testAllProps('backgroundClip', 'text');
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Background Position Shorthand",
+ "property": "bgpositionshorthand",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundposition_shorthand"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/CSS/background-position"
+ }, {
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/css3-background/#background-position"
+ }, {
+ "name": "Demo",
+ "href": "http://jsfiddle.net/Blink/bBXvt/"
+ }]
+}
+!*/
+/* DOC
+Detects if you can use the shorthand method to define multiple parts of an
+element's background-position simultaniously.
+
+eg `background-position: right 10px bottom 10px`
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('bgpositionshorthand', function() {
+ var elem = createElement('a');
+ var eStyle = elem.style;
+ var val = 'right 10px bottom 10px';
+ eStyle.cssText = 'background-position: ' + val + ';';
+ return (eStyle.backgroundPosition === val);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Background Position XY",
+ "property": "bgpositionxy",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundposition_xy"],
+ "authors": ["Allan Lei", "Brandom Aaron"],
+ "notes": [{
+ "name": "Demo",
+ "href": "http://jsfiddle.net/allanlei/R8AYS/"
+ }, {
+ "name": "Adapted From",
+ "href": "https://github.com/brandonaaron/jquery-cssHooks/blob/master/bgpos.js"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to control an element's background position using css
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('bgpositionxy', function() {
+ return testAllProps('backgroundPositionX', '3px', true) && testAllProps('backgroundPositionY', '5px', true);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Background Repeat",
+ "property": ["bgrepeatspace", "bgrepeatround"],
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundrepeat"],
+ "authors": ["Ryan Seddon"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-repeat"
+ }, {
+ "name": "Test Page",
+ "href": "http://jsbin.com/uzesun/"
+ }, {
+ "name": "Demo",
+ "href": "http://jsfiddle.net/ryanseddon/yMLTQ/6/"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to use round and space as properties for background-repeat
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ // Must value-test these
+ Modernizr.addTest('bgrepeatround', testAllProps('backgroundRepeat', 'round'));
+ Modernizr.addTest('bgrepeatspace', testAllProps('backgroundRepeat', 'space'));
+});
--- /dev/null
+/*!
+{
+ "name": "Background Size",
+ "property": "backgroundsize",
+ "tags": ["css"],
+ "knownBugs": ["This will false positive in Opera Mini - http://github.com/Modernizr/Modernizr/issues/396"],
+ "notes": [{
+ "name": "Related Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/396"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('backgroundsize', testAllProps('backgroundSize', '100%', true));
+});
--- /dev/null
+/*!
+{
+ "name": "Background Size Cover",
+ "property": "bgsizecover",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundsizecover"],
+ "notes": [{
+ "name" : "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-size"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ // Must test value, as this specifically tests the `cover` value
+ Modernizr.addTest('bgsizecover', testAllProps('backgroundSize', 'cover'));
+});
--- /dev/null
+/*!
+{
+ "name": "Border Image",
+ "property": "borderimage",
+ "caniuse": "border-image",
+ "polyfills": ["css3pie"],
+ "knownBugs": ["Android < 2.0 is true, but has a broken implementation"],
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('borderimage', testAllProps('borderImage', 'url() 1', true));
+});
--- /dev/null
+/*!
+{
+ "name": "Border Radius",
+ "property": "borderradius",
+ "caniuse": "border-radius",
+ "polyfills": ["css3pie"],
+ "tags": ["css"],
+ "notes": [{
+ "name": "Comprehensive Compat Chart",
+ "href": "http://muddledramblings.com/table-of-css3-border-radius-compliance"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('borderradius', testAllProps('borderRadius', '0px', true));
+});
--- /dev/null
+/*!
+{
+ "name": "Box Shadow",
+ "property": "boxshadow",
+ "caniuse": "css-boxshadow",
+ "tags": ["css"],
+ "knownBugs": [
+ "WebOS false positives on this test.",
+ "The Kindle Silk browser false positives"
+ ]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('boxshadow', testAllProps('boxShadow', '1px 1px', true));
+});
--- /dev/null
+/*!
+{
+ "name": "Box Sizing",
+ "property": "boxsizing",
+ "caniuse": "css3-boxsizing",
+ "polyfills": ["borderboxmodel", "boxsizingpolyfill", "borderbox"],
+ "tags": ["css"],
+ "builderAliases": ["css_boxsizing"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/box-sizing"
+ },{
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/248"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('boxsizing', testAllProps('boxSizing', 'border-box', true) && (document.documentMode === undefined || document.documentMode > 7));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Calc",
+ "property": "csscalc",
+ "caniuse": "calc",
+ "tags": ["css"],
+ "builderAliases": ["css_calc"],
+ "authors": ["@calvein"]
+}
+!*/
+/* DOC
+Method of allowing calculated values for length units. For example:
+
+```css
+//lem {
+ width: calc(100% - 3em);
+}
+```
+*/
+define(['Modernizr', 'createElement', 'prefixes'], function(Modernizr, createElement, prefixes) {
+ Modernizr.addTest('csscalc', function() {
+ var prop = 'width:';
+ var value = 'calc(10px);';
+ var el = createElement('a');
+
+ el.style.cssText = prop + prefixes.join(value + prop);
+
+ return !!el.style.length;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS :checked pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "checked",
+ "tags": ["css"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/879"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement', 'testStyles'], function(Modernizr, createElement, testStyles) {
+ Modernizr.addTest('checked', function() {
+ return testStyles('#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}', function(elem) {
+ var cb = createElement('input');
+ cb.setAttribute('type', 'checkbox');
+ cb.setAttribute('checked', 'checked');
+ elem.appendChild(cb);
+ return cb.offsetLeft === 20;
+ });
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Font ch Units",
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "property": "csschunit",
+ "tags": ["css"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#font-relative-lengths"
+ }]
+}
+!*/
+define(['Modernizr', 'modElem'], function(Modernizr, modElem) {
+ Modernizr.addTest('csschunit', function() {
+ var elemStyle = modElem.elem.style;
+ var supports;
+ try {
+ elemStyle.fontSize = '3ch';
+ supports = elemStyle.fontSize.indexOf('ch') !== -1;
+ } catch (e) {
+ supports = false;
+ }
+ return supports;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Columns",
+ "property": "csscolumns",
+ "caniuse": "multicolumn",
+ "polyfills": ["css3multicolumnjs"],
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+
+ (function() {
+
+ /* jshint -W053 */
+ Modernizr.addTest('csscolumns', function() {
+ var bool = false;
+ var test = testAllProps('columnCount');
+ try {
+ if (bool = !!test) {
+ bool = new Boolean(bool);
+ }
+ } catch (e) {}
+
+ return bool;
+ });
+
+ var props = ['Width', 'Span', 'Fill', 'Gap', 'Rule', 'RuleColor', 'RuleStyle', 'RuleWidth', 'BreakBefore', 'BreakAfter', 'BreakInside'];
+ var name, test;
+
+ for (var i = 0; i < props.length; i++) {
+ name = props[i].toLowerCase();
+ test = testAllProps('column' + props[i]);
+
+ // break-before, break-after & break-inside are not "column"-prefixed in spec
+ if (name === 'breakbefore' || name === 'breakafter' || name == 'breakinside') {
+ test = test || testAllProps(props[i]);
+ }
+
+ Modernizr.addTest('csscolumns.' + name, test);
+ }
+
+
+ })();
+
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Cubic Bezier Range",
+ "property": "cubicbezierrange",
+ "tags": ["css"],
+ "builderAliases": ["css_cubicbezierrange"],
+ "doc" : null,
+ "authors": ["@calvein"],
+ "warnings": ["cubic-bezier values can't be > 1 for Webkit until [bug #45761](https://bugs.webkit.org/show_bug.cgi?id=45761) is fixed"],
+ "notes": [{
+ "name": "Comprehensive Compat Chart",
+ "href": "http://muddledramblings.com/table-of-css3-border-radius-compliance"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement', 'prefixes'], function(Modernizr, createElement, prefixes) {
+ Modernizr.addTest('cubicbezierrange', function() {
+ var el = createElement('a');
+ el.style.cssText = prefixes.join('transition-timing-function:cubic-bezier(1,0,0,1.1); ');
+ return !!el.style.length;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Display run-in",
+ "property": "display-runin",
+ "authors": ["alanhogan"],
+ "tags": ["css"],
+ "builderAliases": ["css_displayrunin"],
+ "notes": [{
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/596-run-in/"
+ },{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/198"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('displayrunin', testAllProps('display', 'run-in'),
+ {aliases: ['display-runin']});
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Display table",
+ "property": "displaytable",
+ "caniuse": "css-table",
+ "authors": ["scottjehl"],
+ "tags": ["css"],
+ "builderAliases": ["css_displaytable"],
+ "notes": [{
+ "name": "Detects for all additional table display values",
+ "href": "http://pastebin.com/Gk9PeVaQ"
+ }]
+}
+!*/
+/* DOC
+`display: table` and `table-cell` test. (both are tested under one name `table-cell` )
+*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ // If a document is in rtl mode this test will fail so we force ltr mode on the injeced
+ // element https://github.com/Modernizr/Modernizr/issues/716
+ testStyles('#modernizr{display: table; direction: ltr}#modernizr div{display: table-cell; padding: 10px}', function(elem) {
+ var ret;
+ var child = elem.childNodes;
+ ret = child[0].offsetLeft < child[1].offsetLeft;
+ Modernizr.addTest('displaytable', ret, {aliases: ['display-table']});
+ }, 2);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS text-overflow ellipsis",
+ "property": "ellipsis",
+ "caniuse": "text-overflow",
+ "polyfills": [
+ "text-overflow"
+ ],
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('ellipsis', testAllProps('textOverflow', 'ellipsis'));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS.escape()",
+ "property": "cssescape",
+ "polyfills": [
+ "css-escape"
+ ],
+ "tags": [
+ "css",
+ "cssom"
+ ]
+}
+!*/
+/* DOC
+Tests for `CSS.escape()` support.
+*/
+define(['Modernizr'], function(Modernizr) {
+ var CSS = window.CSS;
+ Modernizr.addTest('cssescape', CSS ? typeof CSS.escape == 'function' : false);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Font ex Units",
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "property": "cssexunit",
+ "tags": ["css"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#font-relative-lengths"
+ }]
+}
+!*/
+define(['Modernizr', 'modElem'], function(Modernizr, modElem) {
+ Modernizr.addTest('cssexunit', function() {
+ var elemStyle = modElem.elem.style;
+ var supports;
+ try {
+ elemStyle.fontSize = '3ex';
+ supports = elemStyle.fontSize.indexOf('ex') !== -1;
+ } catch (e) {
+ supports = false;
+ }
+ return supports;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Filters",
+ "property": "cssfilters",
+ "caniuse": "css-filters",
+ "polyfills": ["polyfilter"],
+ "tags": ["css"],
+ "builderAliases": ["css_filters"],
+ "notes": [{
+ "name": "MDN article on CSS filters",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/filter"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement', 'prefixes', 'testAllProps', 'test/css/supports'], function(Modernizr, createElement, testAllProps, prefixes) {
+ Modernizr.addTest('cssfilters', function() {
+ if (Modernizr.supports) {
+ return testAllProps('filter', 'blur(2px)');
+ } else {
+ var el = createElement('a');
+ el.style.cssText = prefixes.join('filter:blur(2px); ');
+ // https://github.com/Modernizr/Modernizr/issues/615
+ // documentMode is needed for false positives in oldIE, please see issue above
+ return !!el.style.length && ((document.documentMode === undefined || document.documentMode > 9));
+ }
+ });
+
+});
--- /dev/null
+/*!
+{
+ "name": "Flexbox",
+ "property": "flexbox",
+ "caniuse": "flexbox",
+ "tags": ["css"],
+ "notes": [{
+ "name": "The _new_ flexbox",
+ "href": "http://dev.w3.org/csswg/css3-flexbox"
+ }],
+ "warnings": [
+ "A `true` result for this detect does not imply that the `flex-wrap` property is supported; see the `flexwrap` detect."
+ ]
+}
+!*/
+/* DOC
+Detects support for the Flexible Box Layout model, a.k.a. Flexbox, which allows easy manipulation of layout order and sizing within a container.
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('flexbox', testAllProps('flexBasis', '1px', true));
+});
--- /dev/null
+/*!
+{
+ "name": "Flexbox (legacy)",
+ "property": "flexboxlegacy",
+ "tags": ["css"],
+ "polyfills": ["flexie"],
+ "notes": [{
+ "name": "The _old_ flexbox",
+ "href": "http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('flexboxlegacy', testAllProps('boxDirection', 'reverse', true));
+});
--- /dev/null
+/*!
+{
+ "name": "Flexbox (tweener)",
+ "property": "flexboxtweener",
+ "tags": ["css"],
+ "polyfills": ["flexie"],
+ "notes": [{
+ "name": "The _inbetween_ flexbox",
+ "href": "http://www.w3.org/TR/2011/WD-css3-flexbox-20111129/"
+ }],
+ "warnings": ["This represents an old syntax, not the latest standard syntax."]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('flexboxtweener', testAllProps('flexAlign', 'end', true));
+});
--- /dev/null
+/*!
+{
+ "name": "Flex Line Wrapping",
+ "property": "flexwrap",
+ "tags": ["css", "flexbox"],
+ "notes": [{
+ "name": "W3C Flexible Box Layout spec",
+ "href": "http://dev.w3.org/csswg/css3-flexbox"
+ }],
+ "warnings": [
+ "Does not imply a modern implementation – see documentation."
+ ]
+}
+!*/
+/* DOC
+Detects support for the `flex-wrap` CSS property, part of Flexbox, which isn’t present in all Flexbox implementations (notably Firefox).
+
+This featured in both the 'tweener' syntax (implemented by IE10) and the 'modern' syntax (implemented by others). This detect will return `true` for either of these implementations, as long as the `flex-wrap` property is supported. So to ensure the modern syntax is supported, use together with `Modernizr.flexbox`:
+
+```javascript
+if (Modernizr.flexbox && Modernizr.flexwrap) {
+ // Modern Flexbox with `flex-wrap` supported
+}
+else {
+ // Either old Flexbox syntax, or `flex-wrap` not supported
+}
+```
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('flexwrap', testAllProps('flexWrap', 'wrap', true));
+});
--- /dev/null
+/*!
+{
+ "name": "@font-face",
+ "property": "fontface",
+ "authors": ["Diego Perini", "Mat Marquis"],
+ "tags": ["css"],
+ "knownBugs": [
+ "False Positive: WebOS http://github.com/Modernizr/Modernizr/issues/342",
+ "False Postive: WP7 http://github.com/Modernizr/Modernizr/issues/538"
+ ],
+ "notes": [{
+ "name": "@font-face detection routine by Diego Perini",
+ "href": "http://javascript.nwbox.com/CSSSupport/"
+ },{
+ "name": "Filament Group @font-face compatibility research",
+ "href": "https://docs.google.com/presentation/d/1n4NyG4uPRjAA8zn_pSQ_Ket0RhcWC6QlZ6LMjKeECo0/edit#slide=id.p"
+ },{
+ "name": "Filament Grunticon/@font-face device testing results",
+ "href": "https://docs.google.com/spreadsheet/ccc?key=0Ag5_yGvxpINRdHFYeUJPNnZMWUZKR2ItMEpRTXZPdUE#gid=0"
+ },{
+ "name": "CSS fonts on Android",
+ "href": "http://stackoverflow.com/questions/3200069/css-fonts-on-android"
+ },{
+ "name": "@font-face and Android",
+ "href": "http://archivist.incutio.com/viewlist/css-discuss/115960"
+ }]
+}
+!*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ var blacklist = (function() {
+ var ua = navigator.userAgent;
+ var wkvers = ua.match(/applewebkit\/([0-9]+)/gi) && parseFloat(RegExp.$1);
+ var webos = ua.match(/w(eb)?osbrowser/gi);
+ var wppre8 = ua.match(/windows phone/gi) && ua.match(/iemobile\/([0-9])+/gi) && parseFloat(RegExp.$1) >= 9;
+ var oldandroid = wkvers < 533 && ua.match(/android/gi);
+ return webos || oldandroid || wppre8;
+ }());
+ if (blacklist) {
+ Modernizr.addTest('fontface', false);
+ } else {
+ testStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule) {
+ var style = document.getElementById('smodernizr');
+ var sheet = style.sheet || style.styleSheet;
+ var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
+ var bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
+ Modernizr.addTest('fontface', bool);
+ });
+ }
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Generated Content",
+ "property": "generatedcontent",
+ "tags": ["css"],
+ "warnings": ["Android won't return correct height for anything below 7px #738"],
+ "notes": [{
+ "name": "W3C CSS Selectors Level 3 spec",
+ "href": "http://www.w3.org/TR/css3-selectors/#gen-content"
+ },{
+ "name": "MDN article on :before",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/::before"
+ },{
+ "name": "MDN article on :after",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/::before"
+ }]
+}
+!*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ testStyles('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}', function(node) {
+ Modernizr.addTest('generatedcontent', node.offsetHeight >= 7);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Gradients",
+ "caniuse": "css-gradients",
+ "property": "cssgradients",
+ "tags": ["css"],
+ "knownBugs": ["False-positives on webOS (https://github.com/Modernizr/Modernizr/issues/202)"],
+ "notes": [{
+ "name": "Webkit Gradient Syntax",
+ "href": "http://webkit.org/blog/175/introducing-css-gradients/"
+ },{
+ "name": "Mozilla Linear Gradient Syntax",
+ "href": "http://developer.mozilla.org/en/CSS/-moz-linear-gradient"
+ },{
+ "name": "Mozilla Radial Gradient Syntax",
+ "href": "http://developer.mozilla.org/en/CSS/-moz-radial-gradient"
+ },{
+ "name": "W3C Gradient Spec",
+ "href": "dev.w3.org/csswg/css3-images/#gradients-"
+ }]
+}
+!*/
+define(['Modernizr', 'prefixes', 'createElement'], function(Modernizr, prefixes, createElement) {
+
+ Modernizr.addTest('cssgradients', function() {
+
+ var str1 = 'background-image:';
+ var str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));';
+ var str3 = 'linear-gradient(left top,#9f9, white);';
+
+ // standard syntax // trailing 'background-image:'
+ var css = str1 + prefixes.join(str3 + str1).slice(0, -str1.length);
+ if (Modernizr._config.usePrefixes) {
+ // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
+ css += str1 + '-webkit-' + str2;
+ }
+
+ var elem = createElement('a');
+ var style = elem.style;
+ style.cssText = css;
+
+ // IE6 returns undefined so cast to string
+ return ('' + style.backgroundImage).indexOf('gradient') > -1;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS HSLA Colors",
+ "caniuse": "css3-colors",
+ "property": "hsla",
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'createElement', 'contains'], function(Modernizr, createElement, contains) {
+ Modernizr.addTest('hsla', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background-color:hsla(120,40%,100%,.5)';
+ return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Hyphens",
+ "caniuse": "css-hyphens",
+ "property": ["csshyphens", "softhyphens", "softhyphensfind"],
+ "tags": ["css"],
+ "builderAliases": ["css_hyphens"],
+ "async" : true,
+ "authors": ["David Newton"],
+ "warnings": [
+ "These tests currently require document.body to be present",
+ "If loading Hyphenator.js via yepnope, be cautious of issue 158: http://code.google.com/p/hyphenator/issues/detail?id=158",
+ "This is very large – only include it if you absolutely need it"
+ ],
+ "notes": [{
+ "name": "The Current State of Hyphenation on the Web.",
+ "href": "http://davidnewton.ca/the-current-state-of-hyphenation-on-the-web"
+ },{
+ "name": "Hyphenation Test Page",
+ "href": "http://davidnewton.ca/demos/hyphenation/test.html"
+ },{
+ "name": "Hyphenation is Language Specific",
+ "href": " http://code.google.com/p/hyphenator/source/diff?spec=svn975&r=975&format=side&path=/trunk/Hyphenator.js#sc_svn975_313"
+ },{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/312"
+ }]
+}
+!*/
+define(['Modernizr', 'prefixes', 'createElement', 'testAllProps', 'addTest'], function(Modernizr, prefixes, createElement, testAllProps, addTest) {
+
+ Modernizr.addAsyncTest(function() {
+ var waitTime = 300;
+ setTimeout(runHyphenTest, waitTime);
+ // Wait 1000ms so we can hope for document.body
+ function runHyphenTest() {
+ if (!document.body && !document.getElementsByTagName('body')[0]) {
+ setTimeout(runHyphenTest, waitTime);
+ return;
+ }
+
+ // functional test of adding hyphens:auto
+ function test_hyphens_css() {
+ try {
+ /* create a div container and a span within that
+ * these have to be appended to document.body, otherwise some browsers can give false negative */
+ var div = createElement('div');
+ var span = createElement('span');
+ var divStyle = div.style;
+ var spanHeight = 0;
+ var spanWidth = 0;
+ var result = false;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ div.appendChild(span);
+ span.innerHTML = 'Bacon ipsum dolor sit amet jerky velit in culpa hamburger et. Laborum dolor proident, enim dolore duis commodo et strip steak. Salami anim et, veniam consectetur dolore qui tenderloin jowl velit sirloin. Et ad culpa, fatback cillum jowl ball tip ham hock nulla short ribs pariatur aute. Pig pancetta ham bresaola, ut boudin nostrud commodo flank esse cow tongue culpa. Pork belly bresaola enim pig, ea consectetur nisi. Fugiat officia turkey, ea cow jowl pariatur ullamco proident do laborum velit sausage. Magna biltong sint tri-tip commodo sed bacon, esse proident aliquip. Ullamco ham sint fugiat, velit in enim sed mollit nulla cow ut adipisicing nostrud consectetur. Proident dolore beef ribs, laborum nostrud meatball ea laboris rump cupidatat labore culpa. Shankle minim beef, velit sint cupidatat fugiat tenderloin pig et ball tip. Ut cow fatback salami, bacon ball tip et in shank strip steak bresaola. In ut pork belly sed mollit tri-tip magna culpa veniam, short ribs qui in andouille ham consequat. Dolore bacon t-bone, velit short ribs enim strip steak nulla. Voluptate labore ut, biltong swine irure jerky. Cupidatat excepteur aliquip salami dolore. Ball tip strip steak in pork dolor. Ad in esse biltong. Dolore tenderloin exercitation ad pork loin t-bone, dolore in chicken ball tip qui pig. Ut culpa tongue, sint ribeye dolore ex shank voluptate hamburger. Jowl et tempor, boudin pork chop labore ham hock drumstick consectetur tri-tip elit swine meatball chicken ground round. Proident shankle mollit dolore. Shoulder ut duis t-bone quis reprehenderit. Meatloaf dolore minim strip steak, laboris ea aute bacon beef ribs elit shank in veniam drumstick qui. Ex laboris meatball cow tongue pork belly. Ea ball tip reprehenderit pig, sed fatback boudin dolore flank aliquip laboris eu quis. Beef ribs duis beef, cow corned beef adipisicing commodo nisi deserunt exercitation. Cillum dolor t-bone spare ribs, ham hock est sirloin. Brisket irure meatloaf in, boudin pork belly sirloin ball tip. Sirloin sint irure nisi nostrud aliqua. Nostrud nulla aute, enim officia culpa ham hock. Aliqua reprehenderit dolore sunt nostrud sausage, ea boudin pork loin ut t-bone ham tempor. Tri-tip et pancetta drumstick laborum. Ham hock magna do nostrud in proident. Ex ground round fatback, venison non ribeye in.';
+
+ document.body.insertBefore(div, firstChild);
+
+ /* get size of unhyphenated text */
+ divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;text-justification:newspaper;';
+ spanHeight = span.offsetHeight;
+ spanWidth = span.offsetWidth;
+
+ /* compare size with hyphenated text */
+ divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;' +
+ 'text-justification:newspaper;' +
+ prefixes.join('hyphens:auto; ');
+
+ result = (span.offsetHeight != spanHeight || span.offsetWidth != spanWidth);
+
+ /* results and cleanup */
+ document.body.removeChild(div);
+ div.removeChild(span);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ // for the softhyphens test
+ function test_hyphens(delimiter, testWidth) {
+ try {
+ /* create a div container and a span within that
+ * these have to be appended to document.body, otherwise some browsers can give false negative */
+ var div = createElement('div');
+ var span = createElement('span');
+ var divStyle = div.style;
+ var spanSize = 0;
+ var result = false;
+ var result1 = false;
+ var result2 = false;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ divStyle.cssText = 'position:absolute;top:0;left:0;overflow:visible;width:1.25em;';
+ div.appendChild(span);
+ document.body.insertBefore(div, firstChild);
+
+
+ /* get height of unwrapped text */
+ span.innerHTML = 'mm';
+ spanSize = span.offsetHeight;
+
+ /* compare height w/ delimiter, to see if it wraps to new line */
+ span.innerHTML = 'm' + delimiter + 'm';
+ result1 = (span.offsetHeight > spanSize);
+
+ /* if we're testing the width too (i.e. for soft-hyphen, not zws),
+ * this is because tested Blackberry devices will wrap the text but not display the hyphen */
+ if (testWidth) {
+ /* get width of wrapped, non-hyphenated text */
+ span.innerHTML = 'm<br />m';
+ spanSize = span.offsetWidth;
+
+ /* compare width w/ wrapped w/ delimiter to see if hyphen is present */
+ span.innerHTML = 'm' + delimiter + 'm';
+ result2 = (span.offsetWidth > spanSize);
+ } else {
+ result2 = true;
+ }
+
+ /* results and cleanup */
+ if (result1 === true && result2 === true) { result = true; }
+ document.body.removeChild(div);
+ div.removeChild(span);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ // testing if in-browser Find functionality will work on hyphenated text
+ function test_hyphens_find(delimiter) {
+ try {
+ /* create a dummy input for resetting selection location, and a div container
+ * these have to be appended to document.body, otherwise some browsers can give false negative
+ * div container gets the doubled testword, separated by the delimiter
+ * Note: giving a width to div gives false positive in iOS Safari */
+ var dummy = createElement('input');
+ var div = createElement('div');
+ var testword = 'lebowski';
+ var result = false;
+ var textrange;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ div.innerHTML = testword + delimiter + testword;
+
+ document.body.insertBefore(div, firstChild);
+ document.body.insertBefore(dummy, div);
+
+
+ /* reset the selection to the dummy input element, i.e. BEFORE the div container
+ * stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area */
+ if (dummy.setSelectionRange) {
+ dummy.focus();
+ dummy.setSelectionRange(0, 0);
+ } else if (dummy.createTextRange) {
+ textrange = dummy.createTextRange();
+ textrange.collapse(true);
+ textrange.moveEnd('character', 0);
+ textrange.moveStart('character', 0);
+ textrange.select();
+ }
+
+ /* try to find the doubled testword, without the delimiter */
+ if (window.find) {
+ result = window.find(testword + testword);
+ } else {
+ try {
+ textrange = window.self.document.body.createTextRange();
+ result = textrange.findText(testword + testword);
+ } catch (e) {
+ result = false;
+ }
+ }
+
+ document.body.removeChild(div);
+ document.body.removeChild(dummy);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ addTest('csshyphens', function() {
+
+ if (!testAllProps('hyphens', 'auto', true)) {
+ return false;
+ }
+
+ /* Chrome lies about its hyphens support so we need a more robust test
+ crbug.com/107111
+ */
+ try {
+ return test_hyphens_css();
+ } catch (e) {
+ return false;
+ }
+ });
+
+ addTest('softhyphens', function() {
+ try {
+ // use numeric entity instead of ­ in case it's XHTML
+ return test_hyphens('­', true) && test_hyphens('​', false);
+ } catch (e) {
+ return false;
+ }
+ });
+
+ addTest('softhyphensfind', function() {
+ try {
+ return test_hyphens_find('­') && test_hyphens_find('​');
+ } catch (e) {
+ return false;
+ }
+ });
+
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS :invalid pseudo-class",
+ "property": "cssinvalid",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid"
+ }]
+}
+!*/
+/* DOC
+ Detects support for the ':invalid' CSS pseudo-class.
+*/
+define(['Modernizr', 'testStyles', 'createElement'], function(Modernizr, testStyles, createElement) {
+ Modernizr.addTest('cssinvalid', function() {
+ return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:invalid{width:50px}', function(elem) {
+ var input = createElement('input');
+ input.required = true;
+ elem.appendChild(input);
+ return input.clientWidth > 10;
+ });
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS :last-child pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "lastchild",
+ "tags": ["css"],
+ "builderAliases": ["css_lastchild"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/304"
+ }]
+}
+!*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ testStyles('#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}', function(elem) {
+ Modernizr.addTest('lastchild', elem.lastChild.offsetWidth > elem.firstChild.offsetWidth);
+ }, 2);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Mask",
+ "caniuse": "css-masks",
+ "property": "cssmask",
+ "tags": ["css"],
+ "builderAliases": ["css_mask"],
+ "notes": [
+ {
+ "name": "Webkit blog on CSS Masks",
+ "href": "http://www.webkit.org/blog/181/css-masks/"
+ },
+ {
+ "name": "Safari Docs",
+ "href": "http://developer.apple.com/library/safari/#documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Masks/Masks.html"
+ },
+ {
+ "name": "Mozilla css svg mask (not this)",
+ "href": "http://developer.mozilla.org/en/CSS/mask"
+ },
+ {
+ "name": "Combine with clippaths for awesomeness",
+ "href": "http://generic.cx/for/webkit/test.html"
+ }
+ ]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('cssmask', testAllProps('maskRepeat', 'repeat-x', true));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Media Queries",
+ "caniuse": "css-mediaqueries",
+ "property": "mediaqueries",
+ "tags": ["css"],
+ "builderAliases": ["css_mediaqueries"]
+}
+!*/
+define(['Modernizr', 'mq'], function(Modernizr, mq) {
+ Modernizr.addTest('mediaqueries', mq('only all'));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Multiple Backgrounds",
+ "caniuse": "multibackgrounds",
+ "property": "multiplebgs",
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ // Setting multiple images AND a color on the background shorthand property
+ // and then querying the style.background property value for the number of
+ // occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
+
+ Modernizr.addTest('multiplebgs', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background:url(https://),url(https://),red url(https://)';
+
+ // If the UA supports multiple backgrounds, there should be three occurrences
+ // of the string "url(" in the return value for elemStyle.background
+ return (/(url\s*\(.*?){3}/).test(style.background);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS :nth-child pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "nthchild",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/685"
+ },
+ {
+ "name": "Sitepoint :nth-child documentation",
+ "href": "http://reference.sitepoint.com/css/pseudoclass-nthchild"
+ }
+ ],
+ "authors": ["@emilchristensen"],
+ "warnings": ["Known false negative in Safari 3.1 and Safari 3.2.2"]
+}
+!*/
+/* DOC
+Detects support for the ':nth-child()' CSS pseudo-selector.
+*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ // 5 `<div>` elements with `1px` width are created.
+ // Then every other element has its `width` set to `2px`.
+ // A Javascript loop then tests if the `<div>`s have the expected width
+ // using the modulus operator.
+ testStyles('#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}', function(elem) {
+ Modernizr.addTest('nthchild', function() {
+ var elems = elem.getElementsByTagName('div'),
+ test = true;
+
+ for (var i = 0; i < 5; i++) {
+ test = test && elems[i].offsetWidth === i % 2 + 1;
+ }
+
+ return test;
+ });
+ }, 5);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Object Fit",
+ "caniuse": "object-fit",
+ "property": "objectfit",
+ "tags": ["css"],
+ "builderAliases": ["css_objectfit"],
+ "notes": [{
+ "name": "Opera Article on Object Fit",
+ "href": "http://dev.opera.com/articles/view/css3-object-fit-object-position/"
+ }]
+}
+!*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('objectfit', !!prefixed('objectFit'), {aliases: ['object-fit']});
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Opacity",
+ "caniuse": "css-opacity",
+ "property": "opacity",
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'createElement', 'prefixes'], function(Modernizr, createElement, prefixes) {
+ // Browsers that actually have CSS Opacity implemented have done so
+ // according to spec, which means their return values are within the
+ // range of [0.0,1.0] - including the leading zero.
+
+ Modernizr.addTest('opacity', function() {
+ var style = createElement('a').style;
+ style.cssText = prefixes.join('opacity:.55;');
+
+ // The non-literal . in this regex is intentional:
+ // German Chrome returns this value as 0,55
+ // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
+ return (/^0.55$/).test(style.opacity);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Overflow Scrolling",
+ "property": "overflowscrolling",
+ "tags": ["css"],
+ "builderAliases": ["css_overflow_scrolling"],
+ "warnings": ["Introduced in iOS5b2. API is subject to change."],
+ "notes": [{
+ "name": "Article on iOS overflow scrolling",
+ "href": "http://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('overflowscrolling', testAllProps('overflowScrolling', 'touch', true));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Pointer Events",
+ "caniuse": "pointer-events",
+ "property": "csspointerevents",
+ "authors": ["ausi"],
+ "tags": ["css"],
+ "builderAliases": ["css_pointerevents"],
+ "notes": [
+ {
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/pointer-events"
+ },{
+ "name": "Test Project Page",
+ "href": "http://ausi.github.com/Feature-detection-technique-for-pointer-events/"
+ },{
+ "name": "Test Project Wiki",
+ "href": "http://github.com/ausi/Feature-detection-technique-for-pointer-events/wiki"
+ },
+ {
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/80"
+ }
+ ]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('csspointerevents', function() {
+ var style = createElement('a').style;
+ style.cssText = 'pointer-events:auto';
+ return style.pointerEvents === 'auto';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS position: sticky",
+ "property": "csspositionsticky",
+ "tags": ["css"],
+ "builderAliases": ["css_positionsticky"],
+ "notes": [{
+ "name": "Chrome bug report",
+ "href":"https://code.google.com/p/chromium/issues/detail?id=322972"
+ }],
+ "warnings": [ "using position:sticky on anything but top aligned elements is buggy in Chrome < 37 and iOS <=7+" ]
+}
+!*/
+define(['Modernizr', 'createElement', 'prefixes'], function(Modernizr, createElement, prefixes) {
+ // Sticky positioning - constrains an element to be positioned inside the
+ // intersection of its container box, and the viewport.
+ Modernizr.addTest('csspositionsticky', function() {
+ var prop = 'position:';
+ var value = 'sticky';
+ var el = createElement('a');
+ var mStyle = el.style;
+
+ mStyle.cssText = prop + prefixes.join(value + ';' + prop).slice(0, -prop.length);
+
+ return mStyle.position.indexOf(value) !== -1;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Generated Content Animations",
+ "property": "csspseudoanimations",
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'testStyles', 'test/css/animations'], function(Modernizr) {
+ Modernizr.addTest('csspseudoanimations', function() {
+ var result = false;
+
+ if (!Modernizr.cssanimations || !window.getComputedStyle) {
+ return result;
+ }
+
+ var styles = [
+ '@', Modernizr._prefixes.join('keyframes csspseudoanimations { from { font-size: 10px; } }@').replace(/\@$/, ''),
+ '#modernizr:before { content:" "; font-size:5px;',
+ Modernizr._prefixes.join('animation:csspseudoanimations 1ms infinite;'),
+ '}'
+ ].join('');
+
+ Modernizr.testStyles(styles, function(elem) {
+ result = window.getComputedStyle(elem, ':before').getPropertyValue('font-size') === '10px';
+ });
+
+ return result;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Generated Content Transitions",
+ "property": "csspseudotransitions",
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'testStyles', 'test/css/transitions'], function(Modernizr) {
+ Modernizr.addTest('csspseudotransitions', function() {
+ var result = false;
+
+ if (!Modernizr.csstransitions || !window.getComputedStyle) {
+ return result;
+ }
+
+ var styles =
+ '#modernizr:before { content:" "; font-size:5px;' + Modernizr._prefixes.join('transition:0s 100s;') + '}' +
+ '#modernizr.trigger:before { font-size:10px; }';
+
+ Modernizr.testStyles(styles, function(elem) {
+ // Force rendering of the element's styles so that the transition will trigger
+ window.getComputedStyle(elem, ':before').getPropertyValue('font-size');
+ elem.className += 'trigger';
+ result = window.getComputedStyle(elem, ':before').getPropertyValue('font-size') === '5px';
+ });
+
+ return result;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Reflections",
+ "caniuse": "css-reflections",
+ "property": "cssreflections",
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('cssreflections', testAllProps('boxReflect', 'above', true));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Regions",
+ "caniuse": "css-regions",
+ "authors": ["Mihai Balan"],
+ "property": "regions",
+ "tags": ["css"],
+ "builderAliases": ["css_regions"],
+ "notes": [{
+ "name": "W3C Specification",
+ "href": "http://www.w3.org/TR/css3-regions/"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement', 'docElement', 'isSVG'], function(Modernizr, createElement, docElement, isSVG) {
+ // We start with a CSS parser test then we check page geometry to see if it's affected by regions
+ // Later we might be able to retire the second part, as WebKit builds with the false positives die out
+
+ Modernizr.addTest('regions', function() {
+
+ if (isSVG) {
+ // css regions don't work inside of SVG elements. Rather than update the
+ // below test to work in an SVG context, just exit early to save bytes
+ return false;
+ }
+
+ /* Get the 'flowFrom' property name available in the browser. Either default or vendor prefixed.
+ If the property name can't be found we'll get Boolean 'false' and fail quickly */
+ var flowFromProperty = Modernizr.prefixed('flowFrom');
+ var flowIntoProperty = Modernizr.prefixed('flowInto');
+ var result = false;
+
+ if (!flowFromProperty || !flowIntoProperty) {
+ return result;
+ }
+
+ /* If CSS parsing is there, try to determine if regions actually work. */
+ var iframeContainer = createElement('iframe');
+ var container = createElement('div');
+ var content = createElement('div');
+ var region = createElement('div');
+
+ /* we create a random, unlikely to be generated flow number to make sure we don't
+ clash with anything more vanilla, like 'flow', or 'article', or 'f1' */
+ var flowName = 'modernizr_flow_for_regions_check';
+
+ /* First create a div with two adjacent divs inside it. The first will be the
+ content, the second will be the region. To be able to distinguish between the two,
+ we'll give the region a particular padding */
+ content.innerText = 'M';
+ container.style.cssText = 'top: 150px; left: 150px; padding: 0px;';
+ region.style.cssText = 'width: 50px; height: 50px; padding: 42px;';
+
+ region.style[flowFromProperty] = flowName;
+ container.appendChild(content);
+ container.appendChild(region);
+ docElement.appendChild(container);
+
+ /* Now compute the bounding client rect, before and after attempting to flow the
+ content div in the region div. If regions are enabled, the after bounding rect
+ should reflect the padding of the region div.*/
+ var flowedRect, delta;
+ var plainRect = content.getBoundingClientRect();
+
+
+ content.style[flowIntoProperty] = flowName;
+ flowedRect = content.getBoundingClientRect();
+
+ delta = parseInt(flowedRect.left - plainRect.left, 10);
+ docElement.removeChild(container);
+
+ if (delta == 42) {
+ result = true;
+ } else {
+ /* IE only allows for the content to come from iframes. This has the
+ * side effect of automatic collapsing of iframes once they get the flow-into
+ * property set. checking for a change on the height allows us to detect this
+ * in a sync way, without having to wait for a frame to load */
+
+ docElement.appendChild(iframeContainer);
+ plainRect = iframeContainer.getBoundingClientRect();
+ iframeContainer.style[flowIntoProperty] = flowName;
+ flowedRect = iframeContainer.getBoundingClientRect();
+
+ if (plainRect.height > 0 && plainRect.height !== flowedRect.height && flowedRect.height === 0) {
+ result = true;
+ }
+ }
+
+ content = region = container = iframeContainer = undefined;
+
+ return result;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Font rem Units",
+ "caniuse": "rem",
+ "authors": ["nsfmc"],
+ "property": "cssremunit",
+ "tags": ["css"],
+ "builderAliases": ["css_remunit"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#relative0"
+ },{
+ "name": "Font Size with rem by Jonathan Snook",
+ "href": "http://snook.ca/archives/html_and_css/font-size-with-rem"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ // "The 'rem' unit ('root em') is relative to the computed
+ // value of the 'font-size' value of the root element."
+ // you can test by checking if the prop was ditched
+
+ Modernizr.addTest('cssremunit', function() {
+ var style = createElement('a').style;
+ try {
+ style.fontSize = '3rem';
+ }
+ catch (e) {}
+ return (/rem/).test(style.fontSize);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS UI Resize",
+ "property": "cssresize",
+ "caniuse": "css-resize",
+ "tags": ["css"],
+ "builderAliases": ["css_resize"],
+ "notes": [{
+ "name": "W3C Specification",
+ "href": "http://www.w3.org/TR/css3-ui/#resize"
+ },{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/CSS/resize"
+ }]
+}
+!*/
+/* DOC
+Test for CSS 3 UI "resize" property
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('cssresize', testAllProps('resize', 'both', true));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS rgba",
+ "caniuse": "css3-colors",
+ "property": "rgba",
+ "tags": ["css"],
+ "notes": [{
+ "name": "CSSTricks Tutorial",
+ "href": "http://css-tricks.com/rgba-browser-support/"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('rgba', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background-color:rgba(150,255,150,.5)';
+
+ return ('' + style.backgroundColor).indexOf('rgba') > -1;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Stylable Scrollbars",
+ "property": "cssscrollbar",
+ "tags": ["css"],
+ "builderAliases": ["css_scrollbars"]
+}
+!*/
+define(['Modernizr', 'testStyles', 'prefixes'], function(Modernizr, testStyles, prefixes) {
+ testStyles('#modernizr{overflow: scroll; width: 40px; height: 40px; }#' + prefixes
+ .join('scrollbar{width:0px}' + ' #modernizr::')
+ .split('#')
+ .slice(1)
+ .join('#') + 'scrollbar{width:0px}',
+ function(node) {
+ Modernizr.addTest('cssscrollbar', node.scrollWidth == 40);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Shapes",
+ "property": "shapes",
+ "tags": ["css"],
+ "notes": [{
+ "name": "CSS Shapes W3C specification",
+ "href": "http://www.w3.org/TR/css-shapes"
+ },{
+ "name": "Examples from Adobe",
+ "href": "http://html.adobe.com/webplatform/layout/shapes"
+ }, {
+ "name": "Samples showcasing uses of Shapes",
+ "href": "http://codepen.io/collection/qFesk"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('shapes', testAllProps('shapeOutside', 'content-box', true));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS general sibling selector",
+ "caniuse": "css-sel3",
+ "property": "siblinggeneral",
+ "tags": ["css"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/889"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement', 'testStyles'], function(Modernizr, createElement, testStyles) {
+ Modernizr.addTest('siblinggeneral', function() {
+ return testStyles('#modernizr div {width:100px} #modernizr div ~ div {width:200px;display:block}', function(elem) {
+ return elem.lastChild.offsetWidth == 200;
+ }, 2);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Subpixel Fonts",
+ "property": "subpixelfont",
+ "tags": ["css"],
+ "builderAliases": ["css_subpixelfont"],
+ "authors": [
+ "@derSchepp",
+ "@gerritvanaaken",
+ "@rodneyrehm",
+ "@yatil",
+ "@ryanseddon"
+ ],
+ "notes": [{
+ "name": "Origin Test",
+ "href": "https://github.com/gerritvanaaken/subpixeldetect"
+ }]
+}
+!*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ /*
+ * (to infer if GDI or DirectWrite is used on Windows)
+ */
+ testStyles(
+ '#modernizr{position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;}#subpixel{float: left; font-size: 33.3333%;}',
+ function(elem) {
+ var subpixel = elem.firstChild;
+ subpixel.innerHTML = 'This is a text written in Arial';
+ Modernizr.addTest('subpixelfont', window.getComputedStyle ?
+ window.getComputedStyle(subpixel, null).getPropertyValue('width') !== '44px'
+ : false);
+ }, 1, ['subpixel']);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Supports",
+ "property": "supports",
+ "caniuse": "css-featurequeries",
+ "tags": ["css"],
+ "builderAliases": ["css_supports"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://dev.w3.org/csswg/css3-conditional/#at-supports"
+ },{
+ "name": "Related Github Issue",
+ "href": "github.com/Modernizr/Modernizr/issues/648"
+ },{
+ "name": "W3 Info",
+ "href": "http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface"
+ }]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ var newSyntax = 'CSS' in window && 'supports' in window.CSS;
+ var oldSyntax = 'supportsCSS' in window;
+ Modernizr.addTest('supports', newSyntax || oldSyntax);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS :target pseudo-class",
+ "caniuse": "css-sel3",
+ "property": "target",
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:target"
+ }],
+ "authors": ["@zachleat"],
+ "warnings": ["Opera Mini supports :target but doesn't update the hash for anchor links."]
+}
+!*/
+/* DOC
+Detects support for the ':target' CSS pseudo-class.
+*/
+define(['Modernizr'], function(Modernizr) {
+ // querySelector
+ Modernizr.addTest('target', function() {
+ var doc = window.document;
+ if (!('querySelectorAll' in doc)) {
+ return false;
+ }
+
+ try {
+ doc.querySelectorAll(':target');
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS text-align-last",
+ "property": "textalignlast",
+ "tags": ["css"],
+ "knownBugs": ["IE does not support the 'start' or 'end' values."],
+ "notes": [{
+ "name": "Quicksmode",
+ "href": "http://www.quirksmode.org/css/text/textalignlast.html"
+ },{
+ "name": "MDN",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('textalignlast', testAllProps('textAlignLast'));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS textshadow",
+ "property": "textshadow",
+ "caniuse": "css-textshadow",
+ "tags": ["css"],
+ "knownBugs": ["FF3.0 will false positive on this test"]
+}
+!*/
+define(['Modernizr', 'testProp'], function(Modernizr, testProp) {
+ Modernizr.addTest('textshadow', testProp('textShadow', '1px 1px'));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Transforms",
+ "property": "csstransforms",
+ "caniuse": "transforms2d",
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('csstransforms', function() {
+ // Android < 3.0 is buggy, so we sniff and blacklist
+ // http://git.io/hHzL7w
+ return navigator.userAgent.indexOf('Android 2.') === -1 &&
+ testAllProps('transform', 'scale(1)', true);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Transforms 3D",
+ "property": "csstransforms3d",
+ "caniuse": "transforms3d",
+ "tags": ["css"],
+ "warnings": [
+ "Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004"
+ ]
+}
+!*/
+define(['Modernizr', 'testAllProps', 'testStyles', 'docElement', 'test/css/supports'], function(Modernizr, testAllProps, testStyles, docElement) {
+ Modernizr.addTest('csstransforms3d', function() {
+ var ret = !!testAllProps('perspective', '1px', true);
+ var usePrefix = Modernizr._config.usePrefixes;
+
+ // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
+ // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
+ // some conditions. As a result, Webkit typically recognizes the syntax but
+ // will sometimes throw a false positive, thus we must do a more thorough check:
+ if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {
+ var mq;
+ // Use CSS Conditional Rules if available
+ if (Modernizr.supports) {
+ mq = '@supports (perspective: 1px)';
+ } else {
+ // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.
+ // `@media (transform-3d),(-webkit-transform-3d){ ... }`
+ mq = '@media (transform-3d)';
+ if (usePrefix) {
+ mq += ',(-webkit-transform-3d)';
+ }
+ }
+ // If loaded inside the body tag and the test element inherits any padding, margin or borders it will fail #740
+ mq += '{#modernizr{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0}}';
+
+ testStyles(mq, function(elem) {
+ ret = elem.offsetLeft === 9 && elem.offsetHeight === 5;
+ });
+ }
+
+ return ret;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Transform Style preserve-3d",
+ "property": "preserve3d",
+ "authors": ["edmellum"],
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
+ },{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/762"
+ }]
+}
+!*/
+/* DOC
+Detects support for `transform-style: preserve-3d`, for getting a proper 3D perspective on elements.
+*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('preserve3d', testAllProps('transformStyle', 'preserve-3d'));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS Transitions",
+ "property": "csstransitions",
+ "caniuse": "css-transitions",
+ "tags": ["css"]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ Modernizr.addTest('csstransitions', testAllProps('transition', 'all', true));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS user-select",
+ "property": "userselect",
+ "caniuse": "user-select-none",
+ "authors": ["ryan seddon"],
+ "tags": ["css"],
+ "builderAliases": ["css_userselect"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/250"
+ }]
+}
+!*/
+define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
+ //https://github.com/Modernizr/Modernizr/issues/250
+ Modernizr.addTest('userselect', testAllProps('userSelect', 'none', true));
+});
--- /dev/null
+/*!
+{
+ "name": "CSS :valid pseudo-class",
+ "property": "cssvalid",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:valid"
+ }]
+}
+!*/
+/* DOC
+ Detects support for the ':valid' CSS pseudo-class.
+*/
+define(['Modernizr', 'testStyles', 'createElement'], function(Modernizr, testStyles, createElement) {
+ Modernizr.addTest('cssvalid', function() {
+ return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:valid{width:50px}', function(elem) {
+ var input = createElement('input');
+ elem.appendChild(input);
+ return input.clientWidth > 10;
+ });
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS vh unit",
+ "property": "cssvhunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vhunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "Similar JSFiddle",
+ "href": "http://jsfiddle.net/FWeinb/etnYC/"
+ }]
+}
+!*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ testStyles('#modernizr { height: 50vh; }', function(elem) {
+ var height = parseInt(window.innerHeight / 2, 10);
+ var compStyle = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['height'], 10);
+ Modernizr.addTest('cssvhunit', compStyle == height);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CSS vmax unit",
+ "property": "cssvmaxunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vmaxunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/glsee/JDsWQ/4/"
+ }]
+}
+!*/
+define(['Modernizr', 'docElement', 'testStyles', 'roundedEquals'], function(Modernizr, docElement, testStyles, roundedEquals) {
+ testStyles('#modernizr1{width: 50vmax}#modernizr2{width:50px;height:50px;overflow:scroll}', function(node) {
+ var elem = node.childNodes[1];
+ var scroller = node.childNodes[0];
+ var scrollbarWidth = parseInt((scroller.offsetWidth - scroller.clientWidth) / 2, 10);
+
+ var one_vw = docElement.clientWidth / 100;
+ var one_vh = docElement.clientHeight / 100;
+ var expectedWidth = parseInt(Math.max(one_vw, one_vh) * 50, 10);
+ var compWidth = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['width'], 10);
+
+ Modernizr.addTest('cssvmaxunit', roundedEquals(expectedWidth, compWidth) || roundedEquals(expectedWidth, compWidth - scrollbarWidth));
+ }, 2);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS vmin unit",
+ "property": "cssvminunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vminunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/glsee/JRmdq/8/"
+ }]
+}
+!*/
+define(['Modernizr', 'docElement', 'testStyles', 'roundedEquals'], function(Modernizr, docElement, testStyles, roundedEquals) {
+ testStyles('#modernizr1{width: 50vm;width:50vmin}#modernizr2{width:50px;height:50px;overflow:scroll}', function(node) {
+ var elem = node.childNodes[1];
+ var scroller = node.childNodes[0];
+ var scrollbarWidth = parseInt((scroller.offsetWidth - scroller.clientWidth) / 2, 10);
+
+ var one_vw = docElement.clientWidth / 100;
+ var one_vh = docElement.clientHeight / 100;
+ var expectedWidth = parseInt(Math.min(one_vw, one_vh) * 50, 10);
+ var compWidth = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['width'], 10);
+
+ Modernizr.addTest('cssvminunit', roundedEquals(expectedWidth, compWidth) || roundedEquals(expectedWidth, compWidth - scrollbarWidth));
+ }, 2);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS vw unit",
+ "property": "cssvwunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vwunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/FWeinb/etnYC/"
+ }]
+}
+!*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ testStyles('#modernizr { width: 50vw; }', function(elem) {
+ var width = parseInt(window.innerWidth / 2, 10);
+ var compStyle = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle).width, 10);
+
+ Modernizr.addTest('cssvwunit', compStyle == width);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "will-change",
+ "property": "willchange",
+ "notes": [{
+ "name": "Spec",
+ "href": "http://tabatkins.github.io/specs/css-will-change/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `will-change` css property, which formally signals to the
+browser that an element will be animating.
+*/
+define(['Modernizr', 'docElement'], function(Modernizr, docElement) {
+ Modernizr.addTest('willchange', 'willChange' in docElement.style);
+});
--- /dev/null
+/*!
+{
+ "name": "CSS wrap-flow",
+ "property": "wrapflow",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "W3C Exclusions spec",
+ "href": "http://www.w3.org/TR/css3-exclusions"
+ },
+ {
+ "name": "Example by Adobe",
+ "href": "http://html.adobe.com/webstandards/cssexclusions"
+ }
+ ]
+}
+!*/
+define(['Modernizr', 'prefixed', 'docElement', 'createElement', 'isSVG'], function(Modernizr, prefixed, docElement, createElement, isSVG) {
+ Modernizr.addTest('wrapflow', function() {
+ var prefixedProperty = prefixed('wrapFlow');
+ if (!prefixedProperty || isSVG) {
+ return false;
+ }
+
+ var wrapFlowProperty = prefixedProperty.replace(/([A-Z])/g, function(str, m1) { return '-' + m1.toLowerCase(); }).replace(/^ms-/, '-ms-');
+
+ /* If the CSS parsing is there we need to determine if wrap-flow actually works to avoid false positive cases, e.g. the browser parses
+ the property, but it hasn't got the implementation for the functionality yet. */
+ var container = createElement('div');
+ var exclusion = createElement('div');
+ var content = createElement('span');
+
+ /* First we create a div with two adjacent divs inside it. The first div will be the content, the second div will be the exclusion area.
+ We use the "wrap-flow: end" property to test the actual behavior. (http://dev.w3.org/csswg/css3-exclusions/#wrap-flow-property)
+ The wrap-flow property is applied to the exclusion area what has a 50px left offset and a 100px width.
+ If the wrap-flow property is working correctly then the content should start after the exclusion area, so the content's left offset should be 150px. */
+ exclusion.style.cssText = 'position: absolute; left: 50px; width: 100px; height: 20px;' + wrapFlowProperty + ':end;';
+ content.innerText = 'X';
+
+ container.appendChild(exclusion);
+ container.appendChild(content);
+ docElement.appendChild(container);
+
+ var leftOffset = content.offsetLeft;
+
+ docElement.removeChild(container);
+ exclusion = content = container = undefined;
+
+ return (leftOffset == 150);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Custom protocol handler",
+ "property": "customprotocolhandler",
+ "authors": ["Ben Schwarz"],
+ "builderAliases": ["custom_protocol_handler"],
+ "notes": [{
+ "name": "WHATWG overview",
+ "href": "http://developers.whatwg.org/timers.html#custom-handlers"
+ },{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.registerProtocolHandler"
+ }],
+ "warnings": [],
+ "polyfills": []
+}
+!*/
+/* DOC
+Detects support for the `window.registerProtocolHandler()` API to allow websites to register themselves as possible handlers for particular protocols.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('customprotocolhandler', function() {
+ // early bailout where it doesn't exist at all
+ if (!navigator.registerProtocolHandler) {
+ return false;
+ }
+
+ // registerProtocolHandler was stubbed in webkit for a while, and didn't
+ // actually do anything. We intentionally set it improperly to test for
+ // the proper sort of failure
+ try {
+ navigator.registerProtocolHandler('thisShouldFail');
+ }
+ catch (e) {
+ return e instanceof TypeError;
+ }
+
+ return false;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "CustomEvent",
+ "property": "customevent",
+ "tags": ["customevent"],
+ "authors": ["Alberto Elias"],
+ "notes": [{
+ "name": "W3C DOM reference",
+ "href": "http://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/docs/Web/API/CustomEvent"
+ }],
+ "polyfills": ["eventlistener"]
+}
+!*/
+/* DOC
+
+Detects support for CustomEvent.
+
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('customevent', 'CustomEvent' in window && typeof window.CustomEvent === 'function');
+});
--- /dev/null
+/*!
+{
+ "name": "Dart",
+ "property": "dart",
+ "authors": ["Theodoor van Donge"],
+ "notes": [{
+ "name": "Language website",
+ "href": "http://www.dartlang.org/"
+ }]
+}
+!*/
+/* DOC
+Detects native support for the Dart programming language.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('dart', !!prefixed('startDart', navigator));
+});
--- /dev/null
+/*!
+{
+ "name": "DataView",
+ "property": "dataview",
+ "authors": ["Addy Osmani"],
+ "builderAliases": ["dataview_api"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/JavaScript_typed_arrays/DataView"
+ }],
+ "polyfills": ["jdataview"]
+}
+!*/
+/* DOC
+Detects support for the DataView interface for reading data from an ArrayBuffer as part of the Typed Array spec.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('dataview', (typeof DataView !== 'undefined' && 'getFloat64' in DataView.prototype));
+});
--- /dev/null
+/*!
+{
+ "name": "classList",
+ "caniuse": "classlist",
+ "property": "classlist",
+ "tags": ["dom"],
+ "builderAliases": ["dataview_api"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/DOM/element.classList"
+ }]
+}
+!*/
+define(['Modernizr', 'docElement'], function(Modernizr, docElement) {
+ Modernizr.addTest('classlist', 'classList' in docElement);
+});
--- /dev/null
+/*!
+{
+ "name": "createElement with Attributes",
+ "property": ["createelementattrs", "createelement-attrs"],
+ "tags": ["dom"],
+ "builderAliases": ["dom_createElement_attrs"],
+ "authors": ["James A. Rosen"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/258"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('createelementattrs', function() {
+ try {
+ return createElement('<input name="test" />').getAttribute('name') == 'test';
+ } catch (e) {
+ return false;
+ }
+ }, {
+ aliases: ['createelement-attrs']
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "dataset API",
+ "caniuse": "dataset",
+ "property": "dataset",
+ "tags": ["dom"],
+ "builderAliases": ["dom_dataset"],
+ "authors": ["@phiggins42"]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ // dataset API for data-* attributes
+ Modernizr.addTest('dataset', function() {
+ var n = createElement('div');
+ n.setAttribute('data-a-b', 'c');
+ return !!(n.dataset && n.dataset.aB === 'c');
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Document Fragment",
+ "property": "documentfragment",
+ "notes": [{
+ "name": "W3C DOM Level 1 Reference",
+ "href": "http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-B63ED1A3"
+ }, {
+ "name": "SitePoint Reference",
+ "href": "http://reference.sitepoint.com/javascript/DocumentFragment"
+ }, {
+ "name": "QuirksMode Compatibility Tables",
+ "href": "http://www.quirksmode.org/m/w3c_core.html#t112"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "knownBugs": ["false-positive on Blackberry 9500, see QuirksMode note"],
+ "tags": []
+}
+!*/
+/* DOC
+Append multiple elements to the DOM within a single insertion.
+*/
+define(['Modernizr', 'docElement'], function(Modernizr, docElement) {
+ Modernizr.addTest('documentfragment', function() {
+ return 'createDocumentFragment' in document &&
+ 'appendChild' in docElement;
+ });
+});
+
--- /dev/null
+/*!
+{
+ "name": "[hidden] Attribute",
+ "property": "hidden",
+ "tags": ["dom"],
+ "notes": [{
+ "name": "WHATWG: The hidden attribute",
+ "href": "http://developers.whatwg.org/editing.html#the-hidden-attribute"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "https://github.com/aFarkas/html5shiv/blob/bf4fcc4/src/html5shiv.js#L38"
+ }],
+ "polyfills": ["html5shiv"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Does the browser support the HTML5 [hidden] attribute?
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('hidden', 'hidden' in createElement('a'));
+});
--- /dev/null
+/*!
+{
+ "name": "microdata",
+ "property": "microdata",
+ "tags": ["dom"],
+ "builderAliases": ["dom_microdata"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/html5/microdata.html"
+ }]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('microdata', 'getItems' in document);
+});
--- /dev/null
+/*!
+{
+ "name": "DOM4 MutationObserver",
+ "property": "mutationobserver",
+ "caniuse": "mutationobserver",
+ "tags": ["dom"],
+ "authors": ["Karel Sedláček (@ksdlck)"],
+ "polyfills": ["mutationobservers"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver"
+ }]
+}
+!*/
+/* DOC
+
+Determines if DOM4 MutationObserver support is available.
+
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('mutationobserver',
+ !!window.MutationObserver || !!window.WebKitMutationObserver);
+});
--- /dev/null
+/*!
+{
+ "name": "datalist Element",
+ "caniuse": "datalist",
+ "property": "datalistelem",
+ "tags": ["elem"],
+ "builderAliases": ["elem_datalist"],
+ "warnings": ["This test is a dupe of Modernizr.input.list. Only around for legacy reasons."],
+ "notes": [{
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/15346-relevant-dropdowns-polyfill-for-datalist/"
+ },{
+ "name": "Mike Taylor Test",
+ "href": "http://miketaylr.com/test/datalist.html"
+ },{
+ "name": "Mike Taylor Code",
+ "href": "http://miketaylr.com/code/datalist.html"
+ }]
+}
+!*/
+define(['Modernizr', 'test/input'], function(Modernizr) {
+ // lol. we already have a test for datalist built in! silly you.
+ // Leaving it around in case anyone's using it
+
+ Modernizr.addTest('datalistelem', Modernizr.input.list);
+});
--- /dev/null
+/*!
+{
+ "name": "details Element",
+ "caniuse": "details",
+ "property": "details",
+ "tags": ["elem"],
+ "builderAliases": ["elem_details"],
+ "authors": ["@mathias"],
+ "notes": [{
+ "name": "Mathias' Original",
+ "href": "http://mths.be/axh"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement', 'docElement', 'testStyles'], function(Modernizr, createElement, docElement, testStyles) {
+ Modernizr.addTest('details', function() {
+ var el = createElement('details');
+ var diff;
+
+ // return early if possible; thanks @aFarkas!
+ if (!('open' in el)) {
+ return false;
+ }
+
+ testStyles('#modernizr details{display:block}', function(node) {
+ node.appendChild(el);
+ el.innerHTML = '<summary>a</summary>b';
+ diff = el.offsetHeight;
+ el.open = true;
+ diff = diff != el.offsetHeight;
+ });
+
+
+ return diff;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "output Element",
+ "property": "outputelem",
+ "tags": ["elem"],
+ "builderAliases": ["elem_output"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-output-element"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('outputelem', 'value' in createElement('output'));
+});
--- /dev/null
+/*!
+{
+ "name": "picture Element",
+ "property": "picture",
+ "tags": ["elem"],
+ "authors": ["Scott Jehl", "Mat Marquis"],
+ "notes": [{
+ "name": "Specification",
+ "href": "http://picture.responsiveimages.org"
+ },{
+ "name": "Relevant spec issue",
+ "href": "https://github.com/ResponsiveImagesCG/picture-element/issues/87"
+ }]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('picture', 'HTMLPictureElement' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "progress Element",
+ "caniuse": "progressmeter",
+ "property": ["progressbar", "meter"],
+ "tags": ["elem"],
+ "builderAliases": ["elem_progress_meter"],
+ "authors": ["Stefan Wallin"]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ // Tests for progressbar-support. All browsers that don't support progressbar returns undefined =)
+ Modernizr.addTest('progressbar', createElement('progress').max !== undefined);
+
+ // Tests for meter-support. All browsers that don't support meters returns undefined =)
+ Modernizr.addTest('meter', createElement('meter').max !== undefined);
+});
--- /dev/null
+/*!
+{
+ "name": "ruby, rp, rt Elements",
+ "caniuse": "ruby",
+ "property": "ruby",
+ "tags": ["elem"],
+ "builderAliases": ["elem_ruby"],
+ "authors": ["Cătălin Mariș"],
+ "notes": [{
+ "name": "WHATWG Specification",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-ruby-element"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement', 'docElement'], function(Modernizr, createElement, docElement) {
+ Modernizr.addTest('ruby', function() {
+
+ var ruby = createElement('ruby');
+ var rt = createElement('rt');
+ var rp = createElement('rp');
+ var displayStyleProperty = 'display';
+ // 'fontSize' - because it`s only used for IE6 and IE7
+ var fontSizeStyleProperty = 'fontSize';
+
+ ruby.appendChild(rp);
+ ruby.appendChild(rt);
+ docElement.appendChild(ruby);
+
+ // browsers that support <ruby> hide the <rp> via "display:none"
+ if (getStyle(rp, displayStyleProperty) == 'none' || // for non-IE browsers
+ // but in IE browsers <rp> has "display:inline" so, the test needs other conditions:
+ getStyle(ruby, displayStyleProperty) == 'ruby' && getStyle(rt, displayStyleProperty) == 'ruby-text' || // for IE8+
+ getStyle(rp, fontSizeStyleProperty) == '6pt' && getStyle(rt, fontSizeStyleProperty) == '6pt') { // for IE6 & IE7
+
+ cleanUp();
+ return true;
+
+ } else {
+ cleanUp();
+ return false;
+ }
+
+ function getStyle(element, styleProperty) {
+ var result;
+
+ if (window.getComputedStyle) { // for non-IE browsers
+ result = document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProperty);
+ } else if (element.currentStyle) { // for IE
+ result = element.currentStyle[styleProperty];
+ }
+
+ return result;
+ }
+
+ function cleanUp() {
+ docElement.removeChild(ruby);
+ // the removed child node still exists in memory, so ...
+ ruby = null;
+ rt = null;
+ rp = null;
+ }
+
+ });
+
+});
--- /dev/null
+/*!
+{
+ "name": "Template Tag",
+ "property": "template",
+ "tags": ["elem"],
+ "notes": [{
+ "name": "HTML5Rocks Article",
+ "href": "http://www.html5rocks.com/en/tutorials/webcomponents/template/"
+ },{
+ "name": "W3 Spec",
+ "href": "https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('template', 'content' in createElement('template'));
+});
--- /dev/null
+/*!
+{
+ "name": "time Element",
+ "property": "time",
+ "tags": ["elem"],
+ "builderAliases": ["elem_time"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element"
+ }]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('time', 'valueAsDate' in createElement('time'));
+});
--- /dev/null
+/*!
+{
+ "name": "Track element and Timed Text Track",
+ "property": ["texttrackapi", "track"],
+ "tags": ["elem"],
+ "builderAliases": ["elem_track"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3 track Element Spec",
+ "href": "http://www.w3.org/TR/html5/video.html#the-track-element"
+ },{
+ "name": "W3 track API Spec",
+ "href": "http://www.w3.org/TR/html5/media-elements.html#text-track-api"
+ }],
+ "warnings": ["While IE10 has implemented the track element, IE10 does not expose the underlying APIs to create timed text tracks by JS (really sad)"]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('texttrackapi', typeof (createElement('video').addTextTrack) === 'function');
+
+ // a more strict test for track including UI support: document.createElement('track').kind === 'subtitles'
+ Modernizr.addTest('track', 'kind' in createElement('track'));
+});
--- /dev/null
+/*!
+{
+ "name": "Unknown Elements",
+ "property": "unknownelements",
+ "tags": ["elem"],
+ "notes": [{
+ "name": "The Story of the HTML5 Shiv",
+ "href": "http://www.paulirish.com/2011/the-history-of-the-html5-shiv/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "https://github.com/aFarkas/html5shiv/blob/bf4fcc4/src/html5shiv.js#L36"
+ }],
+ "polyfills": ["html5shiv"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Does the browser support HTML with non-standard / new elements?
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('unknownelements', function() {
+ var a = createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ return a.childNodes.length === 1;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Emoji",
+ "property": "emoji"
+}
+!*/
+/* DOC
+Detects support for emoji character sets.
+*/
+define(['Modernizr', 'createElement', 'test/canvastext'], function(Modernizr, createElement) {
+ Modernizr.addTest('emoji', function() {
+ if (!Modernizr.canvastext) {
+ return false;
+ }
+ var pixelRatio = window.devicePixelRatio || 1;
+ var offset = 12 * pixelRatio;
+ var node = createElement('canvas');
+ var ctx = node.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.textBaseline = 'top';
+ ctx.font = '32px Arial';
+ ctx.fillText('\ud83d\udc28', 0, 0); // U+1F428 KOALA
+ return ctx.getImageData(offset, offset, 1, 1).data[0] !== 0;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 Array",
+ "property": "es5array",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Array per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es5array', function() {
+ return !!(Array.prototype &&
+ Array.prototype.every &&
+ Array.prototype.filter &&
+ Array.prototype.forEach &&
+ Array.prototype.indexOf &&
+ Array.prototype.lastIndexOf &&
+ Array.prototype.map &&
+ Array.prototype.some &&
+ Array.prototype.reduce &&
+ Array.prototype.reduceRight &&
+ Array.isArray);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 Date",
+ "property": "es5date",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Date per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es5date', function() {
+ var isoDate = '2013-04-12T06:06:37.307Z',
+ canParseISODate = false;
+ try {
+ canParseISODate = !!Date.parse(isoDate);
+ } catch (e) {
+ // no ISO date parsing yet
+ }
+ return !!(Date.now &&
+ Date.prototype &&
+ Date.prototype.toISOString &&
+ Date.prototype.toJSON &&
+ canParseISODate);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 Function",
+ "property": "es5function",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Function per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es5function', function() {
+ return !!(Function.prototype && Function.prototype.bind);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 Object",
+ "property": "es5object",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim", "es5sham"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Object per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es5object', function() {
+ return !!(Object.keys &&
+ Object.create &&
+ Object.getPrototypeOf &&
+ Object.getOwnPropertyNames &&
+ Object.isSealed &&
+ Object.isFrozen &&
+ Object.isExtensible &&
+ Object.getOwnPropertyDescriptor &&
+ Object.defineProperty &&
+ Object.defineProperties &&
+ Object.seal &&
+ Object.freeze &&
+ Object.preventExtensions);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES5",
+ "property": "es5",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim", "es5sham"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements everything as specified in ECMAScript 5.
+*/
+define(['Modernizr', 'test/es5/array', 'test/es5/date', 'test/es5/function', 'test/es5/object', 'test/es5/strictmode', 'test/es5/string', 'test/json', 'test/es5/syntax', 'test/es5/undefined'], function(Modernizr) {
+ Modernizr.addTest('es5', function() {
+ return !!(
+ Modernizr.es5array &&
+ Modernizr.es5date &&
+ Modernizr.es5function &&
+ Modernizr.es5object &&
+ Modernizr.strictmode &&
+ Modernizr.es5string &&
+ Modernizr.json &&
+ Modernizr.es5syntax &&
+ Modernizr.es5undefined
+ );
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 Strict Mode",
+ "property": "strictmode",
+ "caniuse": "sctrict-mode",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "authors": ["@kangax"],
+ "tags": ["es5"],
+ "builderAliases": ["es5_strictmode"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Object strict mode.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('strictmode', (function() {'use strict'; return !this; })());
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 String",
+ "property": "es5string",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 String per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es5string', function() {
+ return !!(String.prototype && String.prototype.trim);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 Syntax",
+ "property": "es5syntax",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "http://kangax.github.io/es5-compat-table/"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["This detect uses `eval()`, so CSP may be a problem."],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser accepts ECMAScript 5 syntax.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es5syntax', function() {
+ var value, obj, stringAccess, getter, setter, reservedWords, zeroWidthChars;
+ try {
+ // Property access on strings
+ stringAccess = eval('"foobar"[3] === "b"');
+ // Getter in property initializer
+ getter = eval('({ get x(){ return 1 } }).x === 1');
+ eval('({ set x(v){ value = v; } }).x = 1');
+ // Setter in property initializer
+ setter = value === 1;
+ // Reserved words as property names
+ eval('obj = ({ if: 1 })');
+ reservedWords = obj['if'] === 1;
+ // Zero-width characters in identifiers
+ zeroWidthChars = eval('_\u200c\u200d = true');
+
+ return stringAccess && getter && setter && reservedWords && zeroWidthChars;
+ } catch (ignore) {
+ return false;
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 Immutable Undefined",
+ "property": "es5undefined",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "http://kangax.github.io/es5-compat-table/"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser prevents assignment to global `undefined` per ECMAScript 5.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es5undefined', function() {
+ var result, originalUndefined;
+ try {
+ originalUndefined = window.undefined;
+ window.undefined = 12345;
+ result = typeof window.undefined === 'undefined';
+ window.undefined = originalUndefined;
+ } catch (e) {
+ return false;
+ }
+ return result;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES6 Array",
+ "property": "es6array",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Array per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es6array', !!(Array.prototype &&
+ Array.prototype.copyWithin &&
+ Array.prototype.fill &&
+ Array.prototype.find &&
+ Array.prototype.findIndex &&
+ Array.prototype.keys &&
+ Array.prototype.entries &&
+ Array.prototype.values &&
+ Array.from &&
+ Array.of));
+});
--- /dev/null
+/*!
+{
+ "name": "ES5 String.prototype.contains",
+ "property": "contains",
+ "authors": ["Robert Kowalski"],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 `String.prototype.contains` per specification.
+*/
+define(['Modernizr', 'is'], function(Modernizr, is) {
+ Modernizr.addTest('contains', is(String.prototype.contains, 'function'));
+});
--- /dev/null
+/*!
+{
+ "name": "ES6 Generators",
+ "property": "generators",
+ "authors": ["Michael Kachanovskyi"],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Generators per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('generators', function() {
+ try {
+ /* jshint evil: true */
+ new Function('function* test() {}')();
+ } catch (e) {
+ return false;
+ }
+ return true;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES6 Math",
+ "property": "es6math",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Math per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es6math', !!(Math &&
+ Math.clz32 &&
+ Math.cbrt &&
+ Math.imul &&
+ Math.sign &&
+ Math.log10 &&
+ Math.log2 &&
+ Math.log1p &&
+ Math.expm1 &&
+ Math.cosh &&
+ Math.sinh &&
+ Math.tanh &&
+ Math.acosh &&
+ Math.asinh &&
+ Math.atanh &&
+ Math.hypot &&
+ Math.trunc &&
+ Math.fround));
+});
--- /dev/null
+/*!
+{
+ "name": "ES6 Number",
+ "property": "es6number",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Number per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es6number', !!(Number.isFinite &&
+ Number.isInteger &&
+ Number.isSafeInteger &&
+ Number.isNaN &&
+ Number.parseInt &&
+ Number.parseFloat &&
+ Number.isInteger(Number.MAX_SAFE_INTEGER) &&
+ Number.isInteger(Number.MIN_SAFE_INTEGER) &&
+ Number.isFinite(Number.EPSILON)));
+});
--- /dev/null
+/*!
+{
+ "name": "ES6 Object",
+ "property": "es6object",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Object per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es6object', !!(Object.assign &&
+ Object.is &&
+ Object.setPrototypeOf));
+});
--- /dev/null
+/*!
+{
+ "name": "ES6 Promises",
+ "property": "promises",
+ "caniuse": "promises",
+ "polyfills": ["es6promises"],
+ "authors": ["Krister Kari", "Jake Archibald"],
+ "tags": ["es6"],
+ "notes": [{
+ "name": "The ES6 promises spec",
+ "href": "https://github.com/domenic/promises-unwrapping"
+ },{
+ "name": "Chromium dashboard - ES6 Promises",
+ "href": "http://www.chromestatus.com/features/5681726336532480"
+ },{
+ "name": "JavaScript Promises: There and back again - HTML5 Rocks",
+ "href": "http://www.html5rocks.com/en/tutorials/es6/promises/"
+ }]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Promises per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('promises', function() {
+ return 'Promise' in window &&
+ // Some of these methods are missing from
+ // Firefox/Chrome experimental implementations
+ 'resolve' in window.Promise &&
+ 'reject' in window.Promise &&
+ 'all' in window.Promise &&
+ 'race' in window.Promise &&
+ // Older version of the spec had a resolver object
+ // as the arg rather than a function
+ (function() {
+ var resolve;
+ new window.Promise(function(r) { resolve = r; });
+ return typeof resolve === 'function';
+ }());
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "ES6 String",
+ "property": "es6string",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 String per specification.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('es6string', !!(String.fromCodePoint &&
+ String.raw &&
+ String.prototype.codePointAt &&
+ String.prototype.repeat &&
+ String.prototype.startsWith &&
+ String.prototype.endsWith &&
+ String.prototype.contains));
+});
--- /dev/null
+/*!
+{
+ "name": "Orientation and Motion Events",
+ "property": ["devicemotion", "deviceorientation"],
+ "caniuse": "deviceorientation",
+ "notes": [{
+ "name": "W3C Editor's Draft",
+ "href": "http://dev.w3.org/geo/api/spec-source-orientation.html"
+ },{
+ "name": "Implementation by iOS Safari (Orientation)",
+ "href": "http://goo.gl/fhce3"
+ },{
+ "name": "Implementation by iOS Safari (Motion)",
+ "href": "http://goo.gl/rLKz8"
+ }],
+ "authors": ["Shi Chuan"],
+ "tags": ["event"],
+ "builderAliases": ["event_deviceorientation_motion"]
+}
+!*/
+/* DOC
+Part of Device Access aspect of HTML5, same category as geolocation.
+
+`devicemotion` tests for Device Motion Event support, returns boolean value true/false.
+
+`deviceorientation` tests for Device Orientation Event support, returns boolean value true/false
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('devicemotion', 'DeviceMotionEvent' in window);
+ Modernizr.addTest('deviceorientation', 'DeviceOrientationEvent' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "onInput Event",
+ "property": "oninput",
+ "notes": [{
+ "name": "MDN article",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.oninput"
+ },{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors"
+ },{
+ "name": "Detecting onInput support",
+ "href": "http://danielfriesen.name/blog/2010/02/16/html5-browser-maze-oninput-support"
+ }],
+ "authors": ["Patrick Kettner"],
+ "tags": ["event"]
+}
+!*/
+/* DOC
+`oninput` tests if the browser is able to detect the input event
+*/
+define(['Modernizr', 'docElement', 'createElement', 'testStyles', 'hasEvent'], function(Modernizr, docElement, createElement, testStyles, hasEvent) {
+
+ Modernizr.addTest('oninput', function() {
+ var input = createElement('input');
+ var supportsOnInput;
+ input.setAttribute('oninput', 'return');
+
+ if (hasEvent('oninput', docElement) || typeof input.oninput == 'function') {
+ return true;
+ }
+
+ // IE doesn't support onInput, so we wrap up the non IE APIs
+ // (createEvent, addEventListener) in a try catch, rather than test for
+ // their trident equivalent.
+ try {
+ // Older Firefox didn't map oninput attribute to oninput property
+ var testEvent = document.createEvent('KeyboardEvent');
+ supportsOnInput = false;
+ var handler = function(e) {
+ supportsOnInput = true;
+ e.preventDefault();
+ e.stopPropagation();
+ };
+
+ testEvent.initKeyEvent('keypress', true, true, window, false, false, false, false, 0, 'e'.charCodeAt(0));
+ docElement.appendChild(input);
+ input.addEventListener('input', handler, false);
+ input.focus();
+ input.dispatchEvent(testEvent);
+ input.removeEventListener('input', handler, false);
+ docElement.removeChild(input);
+ } catch (e) {
+ supportsOnInput = false;
+ }
+ return supportsOnInput;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Event Listener",
+ "property": "eventlistener",
+ "authors": ["Andrew Betts (@triblondon)"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Registration-interfaces"
+ }],
+ "polyfills": ["eventlistener"]
+}
+!*/
+/* DOC
+Detects native support for addEventListener
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('eventlistener', 'addEventListener' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "EXIF Orientation",
+ "property": "exiforientation",
+ "tags": ["image"],
+ "builderAliases": ["exif_orientation"],
+ "async": true,
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "Article by Dave Perrett",
+ "href": "http://recursive-design.com/blog/2012/07/28/exif-orientation-handling-is-a-ghetto/"
+ },{
+ "name": "Article by Calvin Hass",
+ "href": "http://www.impulseadventure.com/photo/exif-orientation.html"
+ }]
+}
+!*/
+/* DOC
+Detects support for EXIF Orientation in JPEG images.
+
+iOS looks at the EXIF Orientation flag in JPEGs and rotates the image accordingly. Most desktop browsers just ignore this data.
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+ // Bug trackers:
+ // bugzil.la/298619 (unimplemented)
+ // crbug.com/56845 (looks incomplete)
+ // webk.it/19688 (available upstream but its up all ports to turn on individually)
+ Modernizr.addAsyncTest(function() {
+ var img = new Image();
+
+ img.onerror = function() {
+ addTest('exiforientation', false, {aliases: ['exif-orientation']});
+ };
+
+ img.onload = function() {
+ addTest('exiforientation', img.width !== 2, {aliases: ['exif-orientation']});
+ };
+
+ // There may be a way to shrink this more, it's a 1x2 white jpg with the orientation flag set to 6
+ img.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q==';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "File API",
+ "property": "filereader",
+ "caniuse": "fileapi",
+ "notes": [{
+ "name": "W3C Working Draft",
+ "href": "http://www.w3.org/TR/FileAPI/"
+ }],
+ "tags": ["file"],
+ "builderAliases": ["file_api"],
+ "knownBugs": ["Will fail in Safari 5 due to its lack of support for the standards defined FileReader object"]
+}
+!*/
+/* DOC
+`filereader` tests for the File API specification
+
+Tests for objects specific to the File API W3C specification without
+being redundant (don't bother testing for Blob since it is assumed
+to be the File object's prototype.)
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('filereader', !!(window.File && window.FileList && window.FileReader));
+});
--- /dev/null
+/*!
+{
+ "name": "Filesystem API",
+ "property": "filesystem",
+ "caniuse": "filesystem",
+ "notes": [{
+ "name": "W3 Draft",
+ "href": "dev.w3.org/2009/dap/file-system/file-dir-sys.html"
+ }],
+ "authors": ["Eric Bidelman (@ebidel)"],
+ "tags": ["file"],
+ "builderAliases": ["file_filesystem"],
+ "knownBugs": ["The API will be present in Chrome incognito, but will throw an exception. See crbug.com/93417"]
+}
+!*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('filesystem', !!prefixed('requestFileSystem', window));
+});
--- /dev/null
+/*!
+ {
+ "name": "Flash",
+ "property": "flash",
+ "tags": ["flash"],
+ "polyfills": ["shumway"]
+ }
+ !*/
+/* DOC
+Detects support flash, as well as flash blocking plugins
+*/
+define(['Modernizr', 'createElement', 'docElement', 'addTest', 'getBody', 'isSVG'], function(Modernizr, createElement, docElement, addTest, getBody, isSVG) {
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ var removeFakeBody = function(body) {
+ // If we’re rockin’ an attached fake body, clean it up
+ if (body.fake && body.parentNode) {
+ body.parentNode.removeChild(body);
+ }
+ };
+ var runTest = function(result, embed) {
+ var bool = !!result;
+ if (bool) {
+ bool = new Boolean(bool);
+ bool.blocked = (result === 'blocked');
+ }
+ addTest('flash', function() { return bool; });
+
+ if (embed && body.contains(embed)) {
+
+ // in case embed has been wrapped, as with ClickToPlugin
+ while (embed.parentNode !== body) {
+ embed = embed.parentNode;
+ }
+
+ body.removeChild(embed);
+ }
+
+ };
+ var easy_detect;
+ var activex;
+ // we wrap activex in a try/catch because when flash is disabled through
+ // ActiveX controls, it throws an error.
+ try {
+ // Pan is an API that exists for flash objects.
+ activex = 'ActiveXObject' in window && 'Pan' in new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash');
+ } catch (e) {}
+
+ easy_detect = !(('plugins' in navigator && 'Shockwave Flash' in navigator.plugins) || activex);
+
+ if (easy_detect || isSVG) {
+ runTest(false);
+ }
+ else {
+ // flash seems to be installed, but it might be blocked. We have to
+ // actually create an element to see what happens to it.
+ var embed = createElement('embed');
+ var body = getBody();
+ var blockedDetect;
+ var inline_style;
+
+ embed.type = 'application/x-shockwave-flash';
+
+ // Need to do this in the body (fake or otherwise) otherwise IE8 complains
+ body.appendChild(embed);
+ docElement.appendChild(body);
+
+ // Pan doesn't exist in the embed if its IE (its on the ActiveXObjeect)
+ // so this check is for all other browsers.
+ if (!('Pan' in embed) && !activex) {
+ runTest('blocked', embed);
+ removeFakeBody(body);
+ return;
+ }
+
+ blockedDetect = function() {
+ // if we used a fake body originally, we need to restart this test, since
+ // we haven't been attached to the DOM, and therefore none of the blockers
+ // have had time to work.
+ if (!docElement.contains(body)) {
+ body = document.body || body;
+ embed = createElement('embed');
+ embed.type = 'application/x-shockwave-flash';
+ body.appendChild(embed);
+ return setTimeout(blockedDetect, 1000);
+ }
+ if (!docElement.contains(embed)) {
+ runTest('blocked');
+ }
+ else {
+ inline_style = embed.style.cssText;
+ if (inline_style !== '') {
+ // the style of the element has changed automatically. This is a
+ // really poor heuristic, but for lower end flash blocks, it the
+ // only change they can make.
+ runTest('blocked', embed);
+ }
+ else {
+ runTest(true, embed);
+ }
+ }
+ removeFakeBody(body);
+ };
+
+ // If we have got this far, there is still a chance a userland plugin
+ // is blocking us (either changing the styles, or automatically removing
+ // the element). Both of these require us to take a step back for a moment
+ // to allow for them to get time of the thread, hence a setTimeout.
+ //
+ setTimeout(blockedDetect, 10);
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "input[capture] Attribute",
+ "property": "capture",
+ "tags": ["video", "image", "audio", "media", "attribute"],
+ "notes": [{
+ "name": "W3C draft: HTML Media Capture",
+ "href": "http://www.w3.org/TR/html-media-capture/"
+ }]
+}
+!*/
+/* DOC
+When used on an `<input>`, this attribute signifies that the resource it takes should be generated via device's camera, camcorder, sound recorder.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ // testing for capture attribute in inputs
+ Modernizr.addTest('capture', ('capture' in createElement('input')));
+});
--- /dev/null
+/*!
+{
+ "name": "input[file] Attribute",
+ "property": "fileinput",
+ "caniuse" : "forms",
+ "tags": ["file", "forms", "input"],
+ "builderAliases": ["forms_fileinput"]
+}
+!*/
+/* DOC
+Detects whether input type="file" is available on the platform
+
+E.g. iOS < 6 and some android version don't support this
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('fileinput', function() {
+ if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) {
+ return false;
+ }
+ var elem = createElement('input');
+ elem.type = 'file';
+ return !elem.disabled;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "input[directory] Attribute",
+ "property": "directory",
+ "authors": ["silverwind"],
+ "tags": ["file", "input", "attribute"]
+}
+!*/
+/* DOC
+When used on an `<input type="file">`, the `directory` attribute instructs
+the user agent to present a directory selection dialog instead of the usual
+file selection dialog.
+*/
+define(['Modernizr', 'createElement', 'domPrefixes'], function(Modernizr, createElement, domPrefixes) {
+ Modernizr.addTest('fileinputdirectory', function() {
+ var elem = createElement('input'), dir = 'directory';
+ elem.type = 'file';
+ if (dir in elem) {
+ return true;
+ } else {
+ for (var i = 0, len = domPrefixes.length; i < len; i++) {
+ if (domPrefixes[i] + dir in elem) {
+ return true;
+ }
+ }
+ }
+ return false;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "input[form] Attribute",
+ "property": "formattribute",
+ "tags": ["attribute", "forms", "input"],
+ "builderAliases": ["forms_formattribute"]
+}
+!*/
+/* DOC
+Detects whether input form="form_id" is available on the platform
+E.g. IE 10 (and below), don't support this
+*/
+define(['Modernizr', 'createElement', 'docElement'], function(Modernizr, createElement, docElement) {
+
+ Modernizr.addTest('formattribute', function() {
+ var form = createElement('form');
+ var input = createElement('input');
+ var div = createElement('div');
+ var id = 'formtest' + (new Date()).getTime();
+ var attr;
+ var bool = false;
+
+ form.id = id;
+
+ //IE6/7 confuses the form idl attribute and the form content attribute, so we use document.createAttribute
+ try {
+ input.setAttribute('form', id);
+ }
+ catch (e) {
+ if (document.createAttribute) {
+ attr = document.createAttribute('form');
+ attr.nodeValue = id;
+ input.setAttributeNode(attr);
+ }
+ }
+
+ div.appendChild(form);
+ div.appendChild(input);
+
+ docElement.appendChild(div);
+
+ bool = form.elements && form.elements.length === 1 && input.form == form;
+
+ div.parentNode.removeChild(div);
+ return bool;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "input[type=\"number\"] Localization",
+ "property": "localizednumber",
+ "tags": ["forms", "localization", "attribute"],
+ "authors": ["Peter Janes"],
+ "notes": [{
+ "name": "Webkit Bug Tracker Listing",
+ "href": "https://bugs.webkit.org/show_bug.cgi?id=42484"
+ },{
+ "name": "Based on This",
+ "href": "http://trac.webkit.org/browser/trunk/LayoutTests/fast/forms/script-tests/input-number-keyoperation.js?rev=80096#L9"
+ }],
+ "knownBugs": ["Only ever returns true if the browser/OS is configured to use comma as a decimal separator. This is probably fine for most use cases."]
+}
+!*/
+/* DOC
+Detects whether input type="number" is capable of receiving and displaying localized numbers, e.g. with comma separator.
+*/
+define(['Modernizr', 'createElement', 'docElement', 'getBody', 'test/inputtypes', 'test/forms/validation'], function(Modernizr, createElement, docElement, getBody) {
+ Modernizr.addTest('localizednumber', function() {
+ // this extends our testing of input[type=number], so bomb out if that's missing
+ if (!Modernizr.inputtypes.number) { return false; }
+ // we rely on checkValidity later, so bomb out early if we don't have it
+ if (!Modernizr.formvalidation) { return false; }
+
+ var el = createElement('div');
+ var diff;
+ var body = getBody();
+
+ var root = (function() {
+ return docElement.insertBefore(body, docElement.firstElementChild || docElement.firstChild);
+ }());
+ el.innerHTML = '<input type="number" value="1.0" step="0.1"/>';
+ var input = el.childNodes[0];
+ root.appendChild(el);
+ input.focus();
+ try {
+ document.execCommand('InsertText', false, '1,1');
+ } catch (e) { // prevent warnings in IE
+ }
+ diff = input.type === 'number' && input.valueAsNumber === 1.1 && input.checkValidity();
+ root.removeChild(el);
+ body.fake && root.parentNode.removeChild(root);
+ return diff;
+ });
+
+});
--- /dev/null
+/*!
+{
+ "name": "placeholder attribute",
+ "property": "placeholder",
+ "tags": ["forms", "attribute"],
+ "builderAliases": ["forms_placeholder"]
+}
+!*/
+/* DOC
+Tests for placeholder attribute in inputs and textareas
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('placeholder', ('placeholder' in createElement('input') && 'placeholder' in createElement('textarea')));
+});
--- /dev/null
+/*!
+{
+ "name": "form#requestAutocomplete()",
+ "property": "requestautocomplete",
+ "tags": ["form", "forms", "requestAutocomplete", "payments"],
+ "notes": [{
+ "name": "WHATWG proposed spec",
+ "href": "http://wiki.whatwg.org/wiki/RequestAutocomplete"
+ }]
+}
+!*/
+/* DOC
+When used with input[autocomplete] to annotate a form, form.requestAutocomplete() shows a dialog in Chrome that speeds up
+checkout flows (payments specific for now).
+*/
+define(['Modernizr', 'createElement', 'prefixed'], function(Modernizr, createElement, prefixed) {
+ Modernizr.addTest('requestautocomplete', !!prefixed('requestAutocomplete', createElement('form')));
+});
--- /dev/null
+/*!
+{
+ "name": "Form Validation",
+ "property": "formvalidation",
+ "tags": ["forms", "validation", "attribute"],
+ "builderAliases": ["forms_validation"]
+}
+!*/
+/* DOC
+This implementation only tests support for interactive form validation.
+To check validation for a specific type or a specific other constraint,
+the test can be combined:
+
+- `Modernizr.inputtypes.number && Modernizr.formvalidation` (browser supports rangeOverflow, typeMismatch etc. for type=number)
+- `Modernizr.input.required && Modernizr.formvalidation` (browser supports valueMissing)
+*/
+define(['Modernizr', 'createElement', 'docElement', 'testStyles'], function(Modernizr, createElement, docElement, testStyles) {
+ Modernizr.addTest('formvalidation', function() {
+ var form = createElement('form');
+ if (!('checkValidity' in form) || !('addEventListener' in form)) {
+ return false;
+ }
+ if ('reportValidity' in form) {
+ return true;
+ }
+ var invalidFired = false;
+ var input;
+
+ Modernizr.formvalidationapi = true;
+
+ // Prevent form from being submitted
+ form.addEventListener('submit', function(e) {
+ //Opera does not validate form, if submit is prevented
+ if (!window.opera) {
+ e.preventDefault();
+ }
+ e.stopPropagation();
+ }, false);
+
+ // Calling form.submit() doesn't trigger interactive validation,
+ // use a submit button instead
+ //older opera browsers need a name attribute
+ form.innerHTML = '<input name="modTest" required><button></button>';
+
+ testStyles('#modernizr form{position:absolute;top:-99999em}', function(node) {
+ node.appendChild(form);
+
+ input = form.getElementsByTagName('input')[0];
+
+ // Record whether "invalid" event is fired
+ input.addEventListener('invalid', function(e) {
+ invalidFired = true;
+ e.preventDefault();
+ e.stopPropagation();
+ }, false);
+
+ //Opera does not fully support the validationMessage property
+ Modernizr.formvalidationmessage = !!input.validationMessage;
+
+ // Submit form by clicking submit button
+ form.getElementsByTagName('button')[0].click();
+ });
+
+ return invalidFired;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Fullscreen API",
+ "property": "fullscreen",
+ "caniuse": "fullscreen",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/API/Fullscreen"
+ }],
+ "polyfills": ["screenfulljs"],
+ "builderAliases": ["fullscreen_api"]
+}
+!*/
+/* DOC
+Detects support for the ability to make the current website take over the user's entire screen
+*/
+define(['Modernizr', 'domPrefixes', 'prefixed'], function(Modernizr, domPrefixes, prefixed) {
+ // github.com/Modernizr/Modernizr/issues/739
+ Modernizr.addTest('fullscreen', !!(prefixed('exitFullscreen', document, false) || prefixed('cancelFullScreen', document, false)));
+});
--- /dev/null
+/*!
+{
+ "name": "GamePad API",
+ "property": "gamepads",
+ "authors": ["Eric Bidelman"],
+ "tags": ["media"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/gamepad/"
+ },{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/doodles/gamepad/#toc-featuredetect"
+ }],
+ "warnings": [],
+ "polyfills": []
+}
+!*/
+/* DOC
+Detects support for the Gamepad API, for access to gamepads and controllers.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+
+ Modernizr.addTest('gamepads', !!prefixed('getGamepads', navigator));
+});
--- /dev/null
+/*!
+{
+ "name": "Geolocation API",
+ "property": "geolocation",
+ "caniuse": "geolocation",
+ "tags": ["media"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation"
+ }],
+ "polyfills": [
+ "joshuabell-polyfill",
+ "webshims",
+ "geo-location-javascript",
+ "geolocation-api-polyfill"
+ ]
+}
+!*/
+/* DOC
+Detects support for the Geolocation API for users to provide their location to web applications.
+*/
+define(['Modernizr'], function(Modernizr) {
+ // geolocation is often considered a trivial feature detect...
+ // Turns out, it's quite tricky to get right:
+ //
+ // Using !!navigator.geolocation does two things we don't want. It:
+ // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
+ // 2. Disables page caching in WebKit: webk.it/43956
+ //
+ // Meanwhile, in Firefox < 8, an about:config setting could expose
+ // a false positive that would throw an exception: bugzil.la/688158
+
+ Modernizr.addTest('geolocation', 'geolocation' in navigator);
+});
--- /dev/null
+/*!
+{
+ "name": "Hashchange event",
+ "property": "hashchange",
+ "caniuse": "hashchange",
+ "tags": ["history"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.onhashchange"
+ }],
+ "polyfills": [
+ "jquery-hashchange",
+ "moo-historymanager",
+ "jquery-ajaxy",
+ "hasher",
+ "shistory"
+ ]
+}
+!*/
+/* DOC
+Detects support for the `hashchange` event, fired when the current location fragment changes.
+*/
+define(['Modernizr', 'hasEvent'], function(Modernizr, hasEvent) {
+ Modernizr.addTest('hashchange', function() {
+ if (hasEvent('hashchange', window) === false) {
+ return false;
+ }
+
+ // documentMode logic from YUI to filter out IE8 Compat Mode
+ // which false positives.
+ return (document.documentMode === undefined || document.documentMode > 7);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Hidden Scrollbar",
+ "property": "hiddenscroll",
+ "authors": ["Oleg Korsunsky"]
+}
+!*/
+/* DOC
+Detects whether scrollbars on overflowed blocks are hidden (a-la iPhone)
+*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ Modernizr.addTest('hiddenscroll', function() {
+ return testStyles('#modernizr {width:100px;height:100px;overflow:scroll}', function(elem) {
+ return elem.offsetWidth === elem.clientWidth;
+ });
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "History API",
+ "property": "history",
+ "caniuse": "history",
+ "tags": ["history"],
+ "authors": ["Hay Kranen", "Alexander Farkas"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/html51/browsers.html#the-history-interface"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.history"
+ }],
+ "polyfills": ["historyjs", "html5historyapi"]
+}
+!*/
+/* DOC
+Detects support for the History API for manipulating the browser session history.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('history', function() {
+ // Issue #733
+ // The stock browser on Android 2.2 & 2.3, and 4.0.x returns positive on history support
+ // Unfortunately support is really buggy and there is no clean way to detect
+ // these bugs, so we fall back to a user agent sniff :(
+ var ua = navigator.userAgent;
+
+ // We only want Android 2 and 4.0, stock browser, and not Chrome which identifies
+ // itself as 'Mobile Safari' as well, nor Windows Phone (issue #1471).
+ if ((ua.indexOf('Android 2.') !== -1 ||
+ (ua.indexOf('Android 4.0') !== -1)) &&
+ ua.indexOf('Mobile Safari') !== -1 &&
+ ua.indexOf('Chrome') === -1 &&
+ ua.indexOf('Windows Phone') === -1) {
+ return false;
+ }
+
+ // Return the regular check
+ return (window.history && 'pushState' in window.history);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "HTML Imports",
+ "notes": [
+ {
+ "name": "W3C HTML Imports Specification",
+ "href": "http://w3c.github.io/webcomponents/spec/imports/"
+ },
+ {
+ "name": "HTML Imports - #include for the web",
+ "href": "http://www.html5rocks.com/en/tutorials/webcomponents/imports/"
+ }
+ ],
+ "polyfills": ["polymer-htmlimports"],
+ "property": "htmlimports",
+ "tags": ["html", "import"]
+}
+!*/
+/* DOC
+Detects support for HTML import, a feature that is used for loading in Web Components.
+ */
+
+define(['addTest', 'createElement'], function(addTest, createElement) {
+ addTest('htmlimports', 'import' in createElement('link'));
+});
--- /dev/null
+/*!
+{
+ "name": "IE8 compat mode",
+ "property": "ie8compat",
+ "authors": ["Erich Ocean"]
+}
+!*/
+/* DOC
+Detects whether or not the current browser is IE8 in compatibility mode (i.e. acting as IE7).
+*/
+define(['Modernizr'], function(Modernizr) {
+ // In this case, IE8 will be acting as IE7. You may choose to remove features in this case.
+
+ // related:
+ // james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
+
+ Modernizr.addTest('ie8compat', (!window.addEventListener && !!document.documentMode && document.documentMode === 7));
+});
--- /dev/null
+/*!
+{
+ "name": "iframe[sandbox] Attribute",
+ "property": "sandbox",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_sandbox"],
+ "notes": [
+ {
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox"
+ }],
+ "knownBugs": [ "False-positive on Firefox < 29" ]
+}
+!*/
+/* DOC
+Test for `sandbox` attribute in iframes.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('sandbox', 'sandbox' in createElement('iframe'));
+});
--- /dev/null
+/*!
+{
+ "name": "iframe[seamless] Attribute",
+ "property": "seamless",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_seamless"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-seamless"
+ }]
+}
+!*/
+/* DOC
+Test for `seamless` attribute in iframes.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('seamless', 'seamless' in createElement('iframe'));
+});
--- /dev/null
+/*!
+{
+ "name": "iframe[srcdoc] Attribute",
+ "property": "srcdoc",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_srcdoc"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-srcdoc"
+ }]
+}
+!*/
+/* DOC
+Test for `srcdoc` attribute in iframes.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('srcdoc', 'srcdoc' in createElement('iframe'));
+});
--- /dev/null
+/*!
+{
+ "name": "Animated PNG",
+ "async": true,
+ "property": "apng",
+ "tags": ["image"],
+ "builderAliases": ["img_apng"],
+ "notes": [{
+ "name": "Wikipedia Article",
+ "href": "http://en.wikipedia.org/wiki/APNG"
+ }]
+}
+!*/
+/* DOC
+Test for animated png support.
+*/
+define(['Modernizr', 'createElement', 'addTest', 'test/canvas'], function(Modernizr, createElement, addTest) {
+ Modernizr.addAsyncTest(function() {
+ if (!Modernizr.canvas) {
+ return false;
+ }
+
+ var image = new Image();
+ var canvas = createElement('canvas');
+ var ctx = canvas.getContext('2d');
+
+ image.onload = function() {
+ addTest('apng', function() {
+ if (typeof canvas.getContext == 'undefined') {
+ return false;
+ }
+ else {
+ ctx.drawImage(image, 0, 0);
+ return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
+ }
+ });
+ };
+
+ image.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg==';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "JPEG XR (extended range)",
+ "async": true,
+ "aliases": ["jpeg-xr"],
+ "property": "jpegxr",
+ "tags": ["image"],
+ "notes": [{
+ "name": "Wikipedia Article",
+ "href": "http://en.wikipedia.org/wiki/JPEG_XR"
+ }]
+}
+!*/
+/* DOC
+Test for JPEG XR support
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onload = image.onerror = function() {
+ addTest('jpegxr', image.width == 1, {aliases: ['jpeg-xr']});
+ };
+
+ image.src = 'data:image/vnd.ms-photo;base64,SUm8AQgAAAAFAAG8AQAQAAAASgAAAIC8BAABAAAAAQAAAIG8BAABAAAAAQAAAMC8BAABAAAAWgAAAMG8BAABAAAAHwAAAAAAAAAkw91vA07+S7GFPXd2jckNV01QSE9UTwAZAYBxAAAAABP/gAAEb/8AAQAAAQAAAA==';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "sizes attribute",
+ "property": "sizes",
+ "tags": ["image"],
+ "authors": ["Mat Marquis"],
+ "notes": [{
+ "name": "Spec",
+ "href": "http://picture.responsiveimages.org/#parse-sizes-attr"
+ },{
+ "name": "Usage Details",
+ "href": "http://ericportis.com/posts/2014/srcset-sizes/"
+ }]
+}
+!*/
+/* DOC
+Test for the `sizes` attribute on images
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('sizes', 'sizes' in createElement('img'));
+});
--- /dev/null
+/*!
+{
+ "name": "srcset attribute",
+ "property": "srcset",
+ "tags": ["image"],
+ "notes": [{
+ "name": "Smashing Magazine Article",
+ "href": "http://en.wikipedia.org/wiki/APNG"
+ },{
+ "name": "Generate multi-resolution images for srcset with Grunt",
+ "href": "http://addyosmani.com/blog/generate-multi-resolution-images-for-srcset-with-grunt/"
+ }]
+}
+!*/
+/* DOC
+Test for the srcset attribute of images
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('srcset', 'srcset' in createElement('img'));
+});
--- /dev/null
+/*!
+{
+ "name": "Webp Alpha",
+ "async": true,
+ "property": "webpalpha",
+ "aliases": ["webp-alpha"],
+ "tags": ["image"],
+ "authors": ["Krister Kari", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "WebP Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Article about WebP support on Android browsers",
+ "href": "http://www.wope-framework.com/en/2013/06/24/webp-support-on-android-browsers/"
+ },{
+ "name": "Chromium WebP announcement",
+ "href": "http://blog.chromium.org/2011/11/lossless-and-transparency-encoding-in.html?m=1"
+ }]
+}
+!*/
+/* DOC
+Tests for transparent webp support.
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webpalpha', false, {aliases: ['webp-alpha']});
+ };
+
+ image.onload = function() {
+ addTest('webpalpha', image.width == 1, {aliases: ['webp-alpha']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Webp Animation",
+ "async": true,
+ "property": "webpanimation",
+ "aliases": ["webp-animation"],
+ "tags": ["image"],
+ "authors": ["Krister Kari", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "WebP Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Chromium blog - Chrome 32 Beta: Animated WebP images and faster Chrome for Android touch input",
+ "href": "http://blog.chromium.org/2013/11/chrome-32-beta-animated-webp-images-and.html"
+ }]
+}
+!*/
+/* DOC
+Tests for animated webp support.
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webpanimation', false, {aliases: ['webp-animation']});
+ };
+
+ image.onload = function() {
+ addTest('webpanimation', image.width == 1, {aliases: ['webp-animation']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Webp Lossless",
+ "async": true,
+ "property": ["webplossless", "webp-lossless"],
+ "tags": ["image"],
+ "authors": ["@amandeep", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "Webp Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Webp Lossless Spec",
+ "href": "https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification"
+ }]
+}
+!*/
+/* DOC
+Tests for non-alpha lossless webp support.
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webplossless', false, {aliases: ['webp-lossless']});
+ };
+
+ image.onload = function() {
+ addTest('webplossless', image.width == 1, {aliases: ['webp-lossless']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Webp",
+ "async": true,
+ "property": "webp",
+ "tags": ["image"],
+ "builderAliases": ["img_webp"],
+ "authors": ["Krister Kari", "@amandeep", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "Webp Info",
+ "href": "http://code.google.com/speed/webp/"
+ }, {
+ "name": "Chormium blog - Chrome 32 Beta: Animated WebP images and faster Chrome for Android touch input",
+ "href": "http://blog.chromium.org/2013/11/chrome-32-beta-animated-webp-images-and.html"
+ }, {
+ "name": "Webp Lossless Spec",
+ "href": "https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification"
+ }, {
+ "name": "Article about WebP support on Android browsers",
+ "href": "http://www.wope-framework.com/en/2013/06/24/webp-support-on-android-browsers/"
+ }, {
+ "name": "Chormium WebP announcement",
+ "href": "http://blog.chromium.org/2011/11/lossless-and-transparency-encoding-in.html?m=1"
+ }]
+}
+!*/
+/* DOC
+Tests for lossy, non-alpha webp support.
+
+Tests for all forms of webp support (lossless, lossy, alpha, and animated)..
+
+ Modernizr.webp // Basic support (lossy)
+ Modernizr.webp.lossless // Lossless
+ Modernizr.webp.alpha // Alpha (both lossy and lossless)
+ Modernizr.webp.animation // Animated WebP
+
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+
+ Modernizr.addAsyncTest(function() {
+
+ var webpTests = [{
+ 'uri': 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=',
+ 'name': 'webp'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==',
+ 'name': 'webp.alpha'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA',
+ 'name': 'webp.animation'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=',
+ 'name': 'webp.lossless'
+ }];
+
+ var webp = webpTests.shift();
+ function test(name, uri, cb) {
+
+ var image = new Image();
+
+ function addResult(event) {
+ // if the event is from 'onload', check the see if the image's width is
+ // 1 pixel (which indiciates support). otherwise, it fails
+
+ var result = event && event.type === 'load' ? image.width == 1 : false;
+ var baseTest = name === 'webp';
+
+ /* jshint -W053 */
+ addTest(name, baseTest ? new Boolean(result) : result);
+
+ if (cb) {
+ cb(event);
+ }
+ }
+
+ image.onerror = addResult;
+ image.onload = addResult;
+
+ image.src = uri;
+ }
+
+ // test for webp support in general
+ test(webp.name, webp.uri, function(e) {
+ // if the webp test loaded, test everything else.
+ if (e && e.type === 'load') {
+ for (var i = 0; i < webpTests.length; i++) {
+ test(webpTests[i].name, webpTests[i].uri);
+ }
+ }
+ });
+
+ });
+
+});
--- /dev/null
+/*!
+{
+ "name": "IndexedDB",
+ "property": "indexeddb",
+ "caniuse": "indexeddb",
+ "tags": ["storage"],
+ "polyfills": ["indexeddb"]
+}
+!*/
+/* DOC
+Detects support for the IndexedDB client-side storage API (final spec).
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+
+ var indexeddb = prefixed('indexedDB', window);
+ Modernizr.addTest('indexeddb', !!indexeddb);
+
+ if (!!indexeddb) {
+ Modernizr.addTest('indexeddb.deletedatabase', 'deleteDatabase' in indexeddb);
+ }
+});
--- /dev/null
+/*!
+{
+ "name": "IndexedDB Blob",
+ "property": "indexeddbblob"
+}
+!*/
+/* DOC
+Detects if the browser can save File/Blob objects to IndexedDB
+*/
+define(['Modernizr', 'addTest', 'prefixed', 'test/indexeddb'], function(Modernizr, addTest, prefixed) {
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+ var indexeddb = prefixed('indexedDB', window);
+ var dbname = 'detect-blob-support';
+ var supportsBlob = false;
+ var request;
+ var db;
+
+ if (!(Modernizr.indexeddb && Modernizr.indexeddb.deleteDatabase)) {
+ return false;
+ }
+
+ // Calling `deleteDatabase` in a try…catch because some contexts (e.g. data URIs)
+ // will throw a `SecurityError`
+ try {
+ indexeddb.deleteDatabase(dbname).onsuccess = function() {
+ request = indexeddb.open(dbname, 1);
+ request.onupgradeneeded = function() {
+ request.result.createObjectStore('store');
+ };
+ request.onsuccess = function() {
+ db = request.result;
+ try {
+ db.transaction('store', 'readwrite').objectStore('store').put(new Blob(), 'key');
+ supportsBlob = true;
+ }
+ catch (e) {
+ supportsBlob = false;
+ }
+ finally {
+ addTest('indexeddbblob', supportsBlob);
+ db.close();
+ indexeddb.deleteDatabase(dbname);
+ }
+ };
+ };
+ }
+ catch (e) {
+ addTest('indexeddbblob', false);
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Input attributes",
+ "property": "input",
+ "tags": ["forms"],
+ "authors": ["Mike Taylor"],
+ "notes": [{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary"
+ }],
+ "knownBugs": ["Some blackberry devices report false positive for input.multiple"]
+}
+!*/
+/* DOC
+Detects support for HTML5 `<input>` element attributes and exposes Boolean subproperties with the results:
+
+```javascript
+Modernizr.input.autocomplete
+Modernizr.input.autofocus
+Modernizr.input.list
+Modernizr.input.max
+Modernizr.input.min
+Modernizr.input.multiple
+Modernizr.input.pattern
+Modernizr.input.placeholder
+Modernizr.input.required
+Modernizr.input.step
+```
+*/
+define(['Modernizr', 'createElement', 'inputElem'], function(Modernizr, createElement, inputElem) {
+ // Run through HTML5's new input attributes to see if the UA understands any.
+ // Mike Taylr has created a comprehensive resource for testing these attributes
+ // when applied to all input types:
+ // miketaylr.com/code/input-type-attr.html
+
+ // Only input placeholder is tested while textarea's placeholder is not.
+ // Currently Safari 4 and Opera 11 have support only for the input placeholder
+ // Both tests are available in feature-detects/forms-placeholder.js
+
+ var inputattrs = 'autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ');
+ var attrs = {};
+
+ Modernizr['input'] = (function(props) {
+ for (var i = 0, len = props.length; i < len; i++) {
+ attrs[ props[i] ] = !!(props[i] in inputElem);
+ }
+ if (attrs.list) {
+ // safari false positive's on datalist: webk.it/74252
+ // see also github.com/Modernizr/Modernizr/issues/146
+ attrs.list = !!(createElement('datalist') && window.HTMLDataListElement);
+ }
+ return attrs;
+ })(inputattrs);
+});
--- /dev/null
+/*!
+{
+ "name": "input formaction",
+ "property": "inputformaction",
+ "aliases": ["input-formaction"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formaction"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/13-formaction.html"
+ }],
+ "polyfills": [
+ "webshims"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formaction attribute on form inputs
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('inputformaction', !!('formAction' in createElement('input')), {aliases: ['input-formaction']});
+});
--- /dev/null
+/*!
+{
+ "name": "input formenctype",
+ "property": "inputformenctype",
+ "aliases": ["input-formenctype"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formenctype"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/16-formenctype.html"
+ }],
+ "polyfills": [
+ "html5formshim"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formenctype attribute on form inputs, which overrides the form enctype attribute
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('inputformenctype', !!('formEnctype' in createElement('input')), {aliases: ['input-formenctype']});
+});
--- /dev/null
+/*!
+{
+ "name": "input formmethod",
+ "property": "inputformmethod",
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formmethod"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/14-formmethod.html"
+ }],
+ "polyfills": [
+ "webshims"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formmethod attribute on form inputs
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('inputformmethod', !!('formMethod' in createElement('input')));
+});
--- /dev/null
+/*!
+{
+ "name": "input formtarget",
+ "property": "inputformtarget",
+ "aliases": ["input-formtarget"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formtarget"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/15-formtarget.html"
+ }],
+ "polyfills": [
+ "html5formshim"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formtarget attribute on form inputs, which overrides the form target attribute
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('inputformtarget', !!('formtarget' in createElement('input')), {aliases: ['input-formtarget']});
+});
--- /dev/null
+/*!
+{
+ "name": "input[search] search event",
+ "property": "search",
+ "tags": ["input","search"],
+ "authors": ["Calvin Webster"],
+ "notes": [{
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/types/5-search.html?"
+ }, {
+ "name": "CSS Tricks",
+ "href": "http://css-tricks.com/webkit-html5-search-inputs/"
+ }]
+}
+!*/
+/* DOC
+There is a custom `search` event implemented in webkit browsers when using an `input[search]` element.
+*/
+define(['Modernizr', 'hasEvent'], function(Modernizr, hasEvent) {
+ Modernizr.addTest('inputsearchevent', hasEvent('search'));
+});
--- /dev/null
+/*!
+{
+ "name": "Form input types",
+ "property": "inputtypes",
+ "caniuse": "forms",
+ "tags": ["forms"],
+ "authors": ["Mike Taylor"],
+ "polyfills": [
+ "jquerytools",
+ "webshims",
+ "h5f",
+ "webforms2",
+ "nwxforms",
+ "fdslider",
+ "html5slider",
+ "galleryhtml5forms",
+ "jscolor",
+ "html5formshim",
+ "selectedoptionsjs",
+ "formvalidationjs"
+ ]
+}
+!*/
+/* DOC
+Detects support for HTML5 form input types and exposes Boolean subproperties with the results:
+
+```javascript
+Modernizr.inputtypes.color
+Modernizr.inputtypes.date
+Modernizr.inputtypes.datetime
+Modernizr.inputtypes['datetime-local']
+Modernizr.inputtypes.email
+Modernizr.inputtypes.month
+Modernizr.inputtypes.number
+Modernizr.inputtypes.range
+Modernizr.inputtypes.search
+Modernizr.inputtypes.tel
+Modernizr.inputtypes.time
+Modernizr.inputtypes.url
+Modernizr.inputtypes.week
+```
+*/
+define(['Modernizr', 'inputElem', 'docElement'], function(Modernizr, inputElem, docElement) {
+ // Run through HTML5's new input types to see if the UA understands any.
+ // This is put behind the tests runloop because it doesn't return a
+ // true/false like all the other tests; instead, it returns an object
+ // containing each input type with its corresponding true/false value
+
+ // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
+ var inputtypes = 'search tel url email datetime date month week time datetime-local number range color'.split(' ');
+ var inputs = {};
+
+ Modernizr['inputtypes'] = (function(props) {
+ var len = props.length;
+ var smile = ':)';
+ var inputElemType;
+ var defaultView;
+ var bool;
+
+ for (var i = 0; i < len; i++) {
+
+ inputElem.setAttribute('type', inputElemType = props[i]);
+ bool = inputElem.type !== 'text' && 'style' in inputElem;
+
+ // We first check to see if the type we give it sticks..
+ // If the type does, we feed it a textual value, which shouldn't be valid.
+ // If the value doesn't stick, we know there's input sanitization which infers a custom UI
+ if (bool) {
+
+ inputElem.value = smile;
+ inputElem.style.cssText = 'position:absolute;visibility:hidden;';
+
+ if (/^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined) {
+
+ docElement.appendChild(inputElem);
+ defaultView = document.defaultView;
+
+ // Safari 2-4 allows the smiley as a value, despite making a slider
+ bool = defaultView.getComputedStyle &&
+ defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
+ // Mobile android web browser has false positive, so must
+ // check the height to see if the widget is actually there.
+ (inputElem.offsetHeight !== 0);
+
+ docElement.removeChild(inputElem);
+
+ } else if (/^(search|tel)$/.test(inputElemType)) {
+ // Spec doesn't define any special parsing or detectable UI
+ // behaviors so we pass these through as true
+
+ // Interestingly, opera fails the earlier test, so it doesn't
+ // even make it here.
+
+ } else if (/^(url|email|number)$/.test(inputElemType)) {
+ // Real url and email support comes with prebaked validation.
+ bool = inputElem.checkValidity && inputElem.checkValidity() === false;
+
+ } else {
+ // If the upgraded input compontent rejects the :) text, we got a winner
+ bool = inputElem.value != smile;
+ }
+ }
+
+ inputs[ props[i] ] = !!bool;
+ }
+ return inputs;
+ })(inputtypes);
+});
--- /dev/null
+/*!
+ {
+ "name": "Internationalization API",
+ "property": "intl",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl"
+ },{
+ "name": "ECMAScript spec",
+ "href": "http://www.ecma-international.org/ecma-402/1.0/"
+ }]
+ }
+ !*/
+/* DOC
+Detects support for the Internationalization API which allow easy formatting of number and dates and sorting string
+based on a locale
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('intl', !!prefixed('Intl', window));
+});
--- /dev/null
+/*!
+{
+ "name": "JSON",
+ "property": "json",
+ "caniuse": "json",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "http://developer.mozilla.org/en/JSON"
+ }],
+ "polyfills": ["json2"]
+}
+!*/
+/* DOC
+Detects native support for JSON handling functions.
+*/
+define(['Modernizr'], function(Modernizr) {
+ // this will also succeed if you've loaded the JSON2.js polyfill ahead of time
+ // ... but that should be obvious. :)
+
+ Modernizr.addTest('json', 'JSON' in window && 'parse' in JSON && 'stringify' in JSON);
+});
--- /dev/null
+/*!
+{
+ "name": "Reverse Ordered Lists",
+ "property": "olreversed",
+ "notes": [{
+ "name": "Impressive Webs article",
+ "href": "http://impressivewebs.com/reverse-ordered-lists-html5"
+ }],
+ "builderAliases": ["lists_reversed"]
+}
+!*/
+/* DOC
+Detects support for the `reversed` attribute on the `<ol>` element.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('olreversed', 'reversed' in createElement('ol'));
+});
--- /dev/null
+/*!
+{
+ "name": "MathML",
+ "property": "mathml",
+ "caniuse": "mathml",
+ "authors": ["Addy Osmani", "Davide P. Cervone", "David Carlisle"],
+ "knownBugs": ["Firefox < 4 will likely return a false, however it does support MathML inside XHTML documents"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/Math/"
+ }],
+ "polyfills": ["mathjax"]
+}
+!*/
+/* DOC
+Detects support for MathML, for mathematic equations in web pages.
+*/
+define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
+ // Based on work by Davide (@dpvc) and David (@davidcarlisle)
+ // in https://github.com/mathjax/MathJax/issues/182
+
+ Modernizr.addTest('mathml', function() {
+ var ret;
+
+ testStyles('#modernizr{position:absolute;display:inline-block}', function(node) {
+ node.innerHTML += '<math><mfrac><mi>xx</mi><mi>yy</mi></mfrac></math>';
+
+ ret = node.offsetHeight > node.offsetWidth;
+ });
+
+ return ret;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Beacon API",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon"
+ },{
+ "name": "W3C specification",
+ "href": "https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html"
+ }],
+ "property": "beacon",
+ "tags": ["beacon", "network"],
+ "authors": ["Cătălin Mariș"]
+}
+!*/
+/* DOC
+Detects support for an API that allows for asynchronous transfer of small HTTP data from the client to a server.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('beacon', 'sendBeacon' in navigator);
+});
--- /dev/null
+/*!
+{
+ "name": "Low Bandwidth Connection",
+ "property": "lowbandwidth",
+ "tags": ["network"],
+ "builderAliases": ["network_connection"]
+}
+!*/
+/* DOC
+Tests for determining low-bandwidth via `navigator.connection`
+
+There are two iterations of the `navigator.connection` interface.
+
+The first is present in Android 2.2+ and only in the Browser (not WebView)
+
+- http://docs.phonegap.com/en/1.2.0/phonegap_connection_connection.md.html#connection.type
+- http://davidbcalhoun.com/2010/using-navigator-connection-android
+
+The second is specced at http://dev.w3.org/2009/dap/netinfo/ and perhaps landing in WebKit
+
+- http://bugs.webkit.org/show_bug.cgi?id=73528
+
+Unknown devices are assumed as fast
+
+For more rigorous network testing, consider boomerang.js: http://github.com/bluesmoon/boomerang/
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('lowbandwidth', function() {
+ // polyfill
+ var connection = navigator.connection || {type: 0};
+
+ return connection.type == 3 || // connection.CELL_2G
+ connection.type == 4 || // connection.CELL_3G
+ /^[23]g$/.test(connection.type); // string value in new spec
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Server Sent Events",
+ "property": "eventsource",
+ "tags": ["network"],
+ "builderAliases": ["network_eventsource"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://dev.w3.org/html5/eventsource/"
+ }]
+}
+!*/
+/* DOC
+Tests for server sent events aka eventsource.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('eventsource', 'EventSource' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "Fetch API",
+ "property": "fetch",
+ "tags": ["network"],
+ "caniuse": "fetch",
+ "notes": [{
+ "name": "Fetch Living Standard",
+ "href": "https://fetch.spec.whatwg.org/"
+ }],
+ "polyfills": ["fetch"]
+}
+!*/
+/* DOC
+Detects support for the fetch API, a modern replacement for XMLHttpRequest.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('fetch', 'fetch' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "XHR responseType='arraybuffer'",
+ "property": "xhrresponsetypearraybuffer",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='arraybuffer'.
+*/
+define(['Modernizr', 'testXhrType'], function(Modernizr, testXhrType) {
+ Modernizr.addTest('xhrresponsetypearraybuffer', testXhrType('arraybuffer'));
+});
--- /dev/null
+/*!
+{
+ "name": "XHR responseType='blob'",
+ "property": "xhrresponsetypeblob",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='blob'.
+*/
+define(['Modernizr', 'testXhrType'], function(Modernizr, testXhrType) {
+ Modernizr.addTest('xhrresponsetypeblob', testXhrType('blob'));
+});
--- /dev/null
+/*!
+{
+ "name": "XHR responseType='document'",
+ "property": "xhrresponsetypedocument",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='document'.
+*/
+define(['Modernizr', 'testXhrType'], function(Modernizr, testXhrType) {
+ Modernizr.addTest('xhrresponsetypedocument', testXhrType('document'));
+});
--- /dev/null
+/*!
+{
+ "name": "XHR responseType='json'",
+ "property": "xhrresponsetypejson",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ },{
+ "name": "Explanation of xhr.responseType='json'",
+ "href": "http://mathiasbynens.be/notes/xhr-responsetype-json"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='json'.
+*/
+define(['Modernizr', 'testXhrType'], function(Modernizr, testXhrType) {
+ Modernizr.addTest('xhrresponsetypejson', testXhrType('json'));
+});
--- /dev/null
+/*!
+{
+ "name": "XHR responseType='text'",
+ "property": "xhrresponsetypetext",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='text'.
+*/
+define(['Modernizr', 'testXhrType'], function(Modernizr, testXhrType) {
+ Modernizr.addTest('xhrresponsetypetext', testXhrType('text'));
+});
--- /dev/null
+/*!
+{
+ "name": "XHR responseType",
+ "property": "xhrresponsetype",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('xhrresponsetype', (function() {
+ if (typeof XMLHttpRequest == 'undefined') {
+ return false;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('get', '/', true);
+ return 'response' in xhr;
+ }()));
+});
--- /dev/null
+/*!
+{
+ "name": "XML HTTP Request Level 2 XHR2",
+ "property": "xhr2",
+ "tags": ["network"],
+ "builderAliases": ["network_xhr2"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/XMLHttpRequest2/"
+ },{
+ "name": "Details on Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/385"
+ }]
+}
+!*/
+/* DOC
+Tests for XHR2.
+*/
+define(['Modernizr'], function(Modernizr) {
+ // all three of these details report consistently across all target browsers:
+ // !!(window.ProgressEvent);
+ // 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest
+ Modernizr.addTest('xhr2', 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest());
+});
--- /dev/null
+/*!
+{
+ "name": "Notification",
+ "property": "notification",
+ "caniuse": "notifications",
+ "authors": ["Theodoor van Donge", "Hendrik Beskow"],
+ "notes": [{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/notifications/quick/"
+ },{
+ "name": "W3C spec",
+ "href": "www.w3.org/TR/notifications/"
+ }],
+ "polyfills": ["desktop-notify", "html5-notifications"]
+}
+!*/
+/* DOC
+Detects support for the Notifications API
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('notification', 'Notification' in window && 'permission' in window.Notification && 'requestPermission' in window.Notification);
+});
--- /dev/null
+/*!
+{
+ "name": "Page Visibility API",
+ "property": "pagevisibility",
+ "caniuse": "pagevisibility",
+ "tags": ["performance"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API"
+ },{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/2011/WD-page-visibility-20110602/"
+ },{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/pagevisibility/intro/"
+ }],
+ "polyfills": ["visibilityjs", "visiblyjs", "jquery-visibility"]
+}
+!*/
+/* DOC
+Detects support for the Page Visibility API, which can be used to disable unnecessary actions and otherwise improve user experience.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('pagevisibility', !!prefixed('hidden', document, false));
+});
--- /dev/null
+/*!
+{
+ "name": "Navigation Timing API",
+ "property": "performance",
+ "caniuse": "nav-timing",
+ "tags": ["performance"],
+ "authors": ["Scott Murphy (@uxder)"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/navigation-timing/"
+ },{
+ "name": "HTML5 Rocks article",
+ "href": "http://www.html5rocks.com/en/tutorials/webperformance/basics/"
+ }],
+ "polyfills": ["perfnow"]
+}
+!*/
+/* DOC
+Detects support for the Navigation Timing API, for measuring browser and connection performance.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('performance', !!prefixed('performance', window));
+});
--- /dev/null
+/*!
+{
+ "name": "DOM Pointer Events API",
+ "property": "pointerevents",
+ "tags": ["input"],
+ "authors": ["Stu Cox"],
+ "notes": [
+ {
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/pointerevents/"
+ }
+ ],
+ "warnings": ["This property name now refers to W3C DOM PointerEvents: https://github.com/Modernizr/Modernizr/issues/548#issuecomment-12812099"],
+ "polyfills": ["handjs"]
+}
+!*/
+/* DOC
+Detects support for the DOM Pointer Events API, which provides a unified event interface for pointing input devices, as implemented in IE10+.
+*/
+define(['Modernizr', 'domPrefixes', 'hasEvent'], function(Modernizr, domPrefixes, hasEvent) {
+ // **Test name hijacked!**
+ // Now refers to W3C DOM PointerEvents spec rather than the CSS pointer-events property.
+ Modernizr.addTest('pointerevents', function() {
+ // Cannot use `.prefixed()` for events, so test each prefix
+ var bool = false,
+ i = domPrefixes.length;
+
+ // Don't forget un-prefixed...
+ bool = Modernizr.hasEvent('pointerdown');
+
+ while (i-- && !bool) {
+ if (hasEvent(domPrefixes[i] + 'pointerdown')) {
+ bool = true;
+ }
+ }
+ return bool;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Pointer Lock API",
+ "property": "pointerlock",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API"
+ }],
+ "builderAliases": ["pointerlock_api"]
+}
+!*/
+/* DOC
+Detects support the pointer lock API which allows you to lock the mouse cursor to the browser window.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ // https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API
+ Modernizr.addTest('pointerlock', !!prefixed('exitPointerLock', document));
+});
--- /dev/null
+/*!
+{
+ "name": "postMessage",
+ "property": "postmessage",
+ "caniuse": "x-doc-messaging",
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/html5/comms.html#posting-messages"
+ }],
+ "polyfills": ["easyxdm", "postmessage-jquery"]
+}
+!*/
+/* DOC
+Detects support for the `window.postMessage` protocol for cross-document messaging.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('postmessage', 'postMessage' in window);
+});
--- /dev/null
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "caniuse": "proximity",
+ "name": "Proximity API",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/Proximity_Events"
+ },{
+ "name": "W3C specification",
+ "href": "http://www.w3.org/TR/proximity/"
+ }],
+ "property": "proximity",
+ "tags": ["events", "proximity"]
+}
+!*/
+/* DOC
+Detects support for an API that allows users to get proximity related information from the device's proximity sensor.
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+
+ Modernizr.addAsyncTest(function() {
+
+ var timeout;
+ var timeoutTime = 300;
+
+ function advertiseSupport() {
+
+ // Clean up after ourselves
+ clearTimeout(timeout);
+ window.removeEventListener('deviceproximity', advertiseSupport);
+
+ // Advertise support as the browser supports
+ // the API and the device has a proximity sensor
+ addTest('proximity', true);
+
+ }
+
+ // Check if the browser has support for the API
+ if ('ondeviceproximity' in window && 'onuserproximity' in window) {
+
+ // Check if the device has a proximity sensor
+ // ( devices without such a sensor support the events but
+ // will never fire them resulting in a false positive )
+ window.addEventListener('deviceproximity', advertiseSupport);
+
+ // If the event doesn't fire in a reasonable amount of time,
+ // it means that the device doesn't have a proximity sensor,
+ // thus, we can advertise the "lack" of support
+ timeout = setTimeout(function() {
+ window.removeEventListener('deviceproximity', advertiseSupport);
+ addTest('proximity', false);
+ }, timeoutTime);
+
+ } else {
+ addTest('proximity', false);
+ }
+
+ });
+
+});
--- /dev/null
+/*!
+{
+ "name": "QuerySelector",
+ "property": "queryselector",
+ "caniuse": "queryselector",
+ "tags": ["queryselector"],
+ "authors": ["Andrew Betts (@triblondon)"],
+ "notes": [{
+ "name" : "W3C Selectors reference",
+ "href": "http://www.w3.org/TR/selectors-api/#queryselectorall"
+ }],
+ "polyfills": ["css-selector-engine"]
+}
+!*/
+/* DOC
+Detects support for querySelector.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('queryselector', 'querySelector' in document && 'querySelectorAll' in document);
+});
--- /dev/null
+/*!
+{
+ "name": "Quota Storage Management API",
+ "property": "quotamanagement",
+ "tags": ["storage"],
+ "builderAliases": ["quota_management_api"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/quota-api/"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to request a specific amount of space for filesystem access
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('quotamanagement', function() {
+ var tempStorage = prefixed('temporaryStorage', navigator);
+ var persStorage = prefixed('persistentStorage', navigator);
+
+ return !!(tempStorage && persStorage);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "requestAnimationFrame",
+ "property": "requestanimationframe",
+ "aliases": ["raf"],
+ "caniuse": "requestanimationframe",
+ "tags": ["animation"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/animation-timing/"
+ }],
+ "polyfills": ["raf"]
+}
+!*/
+/* DOC
+Detects support for the `window.requestAnimationFrame` API, for offloading animation repainting to the browser for optimized performance.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('requestanimationframe', !!prefixed('requestAnimationFrame', window), {aliases: ['raf']});
+});
--- /dev/null
+/*!
+{
+ "name": "script[async]",
+ "property": "scriptasync",
+ "caniuse": "script-async",
+ "tags": ["script"],
+ "builderAliases": ["script_async"],
+ "authors": ["Theodoor van Donge"]
+}
+!*/
+/* DOC
+Detects support for the `async` attribute on the `<script>` element.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('scriptasync', 'async' in createElement('script'));
+});
--- /dev/null
+/*!
+{
+ "name": "script[defer]",
+ "property": "scriptdefer",
+ "caniuse": "script-defer",
+ "tags": ["script"],
+ "builderAliases": ["script_defer"],
+ "authors": ["Theodoor van Donge"],
+ "warnings": ["Browser implementation of the `defer` attribute vary: http://stackoverflow.com/questions/3952009/defer-attribute-chrome#answer-3982619"],
+ "knownBugs": ["False positive in Opera 12"]
+}
+!*/
+/* DOC
+Detects support for the `defer` attribute on the `<script>` element.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('scriptdefer', 'defer' in createElement('script'));
+});
--- /dev/null
+/*!
+{
+ "name": "ServiceWorker API",
+ "property": "serviceworker",
+ "notes": [{
+ "name": "ServiceWorkers Explained",
+ "href": "https://github.com/slightlyoff/ServiceWorker/blob/master/explainer.md"
+ }]
+}
+!*/
+/* DOC
+ServiceWorkers (formerly Navigation Controllers) are a way to persistently cache resources to built apps that work better offline.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('serviceworker', 'serviceWorker' in navigator);
+});
--- /dev/null
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "name": "Speech Recognition API",
+ "notes": [
+ {
+ "name": "W3C Web Speech API Specification - The SpeechRecognition Interface",
+ "href": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-section"
+ },
+ {
+ "name": "Introduction to the Web Speech API",
+ "href": "http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API"
+ }
+ ],
+ "property": "speechrecognition",
+ "tags": ["input", "speech"]
+}
+!*/
+
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('speechrecognition', !!prefixed('SpeechRecognition', window));
+});
--- /dev/null
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "name": "Speech Synthesis API",
+ "notes": [
+ {
+ "name": "W3C Web Speech API Specification - The SpeechSynthesis Interface",
+ "href": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#tts-section"
+ }
+ ],
+ "property": "speechsynthesis",
+ "tags": ["input", "speech"]
+}
+!*/
+
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('speechsynthesis', 'SpeechSynthesisUtterance' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "Local Storage",
+ "property": "localstorage",
+ "caniuse": "namevalue-storage",
+ "tags": ["storage"],
+ "knownBugs": [],
+ "notes": [],
+ "warnings": [],
+ "polyfills": [
+ "joshuabell-polyfill",
+ "cupcake",
+ "storagepolyfill",
+ "amplifyjs",
+ "yui-cacheoffline"
+ ]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ // In FF4, if disabled, window.localStorage should === null.
+
+ // Normally, we could not test that directly and need to do a
+ // `('localStorage' in window) && ` test first because otherwise Firefox will
+ // throw bugzil.la/365772 if cookies are disabled
+
+ // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
+ // will throw the exception:
+ // QUOTA_EXCEEDED_ERROR DOM Exception 22.
+ // Peculiarly, getItem and removeItem calls do not throw.
+
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+
+ Modernizr.addTest('localstorage', function() {
+ var mod = 'modernizr';
+ try {
+ localStorage.setItem(mod, mod);
+ localStorage.removeItem(mod);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Session Storage",
+ "property": "sessionstorage",
+ "tags": ["storage"],
+ "polyfills": ["joshuabell-polyfill", "cupcake", "sessionstorage"]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+ Modernizr.addTest('sessionstorage', function() {
+ var mod = 'modernizr';
+ try {
+ sessionStorage.setItem(mod, mod);
+ sessionStorage.removeItem(mod);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Web SQL Database",
+ "property": "websqldatabase",
+ "caniuse": "sql-storage",
+ "tags": ["storage"]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ // Chrome incognito mode used to throw an exception when using openDatabase
+ // It doesn't anymore.
+ Modernizr.addTest('websqldatabase', 'openDatabase' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "style[scoped]",
+ "property": "stylescoped",
+ "caniuse": "style-scoped",
+ "tags": ["dom"],
+ "builderAliases": ["style_scoped"],
+ "authors": ["Cătălin Mariș"],
+ "notes": [{
+ "name": "WHATWG Specification",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#attr-style-scoped"
+ }],
+ "polyfills": ["scoped-styles"]
+}
+!*/
+/* DOC
+Support for the `scoped` attribute of the `<style>` element.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('stylescoped', 'scoped' in createElement('style'));
+});
--- /dev/null
+/*!
+{
+ "name": "SVG",
+ "property": "svg",
+ "caniuse": "svg",
+ "tags": ["svg"],
+ "authors": ["Erik Dahlstrom"],
+ "polyfills": [
+ "svgweb",
+ "raphael",
+ "amplesdk",
+ "canvg",
+ "svg-boilerplate",
+ "sie",
+ "dojogfx",
+ "fabricjs"
+ ]
+}
+!*/
+/* DOC
+Detects support for SVG in `<embed>` or `<object>` elements.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('svg', !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect);
+});
--- /dev/null
+/*!
+{
+ "name": "SVG as an <img> tag source",
+ "property": "svgasimg",
+ "caniuse" : "svg-img",
+ "tags": ["svg"],
+ "authors": ["Chris Coyier"],
+ "notes": [{
+ "name": "HTML5 Spec",
+ "href": "http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element"
+ }]
+}
+!*/
+define(['Modernizr', 'addTest'], function(Modernizr) {
+
+ // Original Async test by Stu Cox
+ // https://gist.github.com/chriscoyier/8774501
+
+ // Now a Sync test based on good results here
+ // http://codepen.io/chriscoyier/pen/bADFx
+
+ // Note http://www.w3.org/TR/SVG11/feature#Image is *supposed* to represent
+ // support for the `<image>` tag in SVG, not an SVG file linked from an `<img>`
+ // tag in HTML – but it’s a heuristic which works
+ Modernizr.addTest('svgasimg', document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'));
+});
--- /dev/null
+/*!
+{
+ "name": "SVG clip paths",
+ "property": "svgclippaths",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "Demo",
+ "href": "http://srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg"
+ }]
+}
+!*/
+/* DOC
+Detects support for clip paths in SVG (only, not on HTML content).
+
+See [this discussion](http://github.com/Modernizr/Modernizr/issues/213) regarding applying SVG clip paths to HTML content.
+*/
+define(['Modernizr', 'toStringFn'], function(Modernizr, toStringFn) {
+ Modernizr.addTest('svgclippaths', function() {
+ return !!document.createElementNS &&
+ /SVGClipPath/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'clipPath')));
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "SVG filters",
+ "property": "svgfilters",
+ "caniuse": "svg-filters",
+ "tags": ["svg"],
+ "builderAliases": ["svg_filters"],
+ "authors": ["Erik Dahlstrom"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/SVG11/filters.html"
+ }]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ // Should fail in Safari: http://stackoverflow.com/questions/9739955/feature-detecting-support-for-svg-filters.
+ Modernizr.addTest('svgfilters', function() {
+ var result = false;
+ try {
+ result = 'SVGFEColorMatrixElement' in window &&
+ SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE == 2;
+ }
+ catch (e) {}
+ return result;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "SVG foreignObject",
+ "property": "svgforeignobject",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/SVG11/extend.html"
+ }]
+}
+!*/
+/* DOC
+Detects support for foreignObject tag in SVG.
+*/
+define(['Modernizr', 'toStringFn'], function(Modernizr, toStringFn) {
+ Modernizr.addTest('svgforeignobject', function() {
+ return !!document.createElementNS &&
+ /SVGForeignObject/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject')));
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Inline SVG",
+ "property": "inlinesvg",
+ "caniuse": "svg-html5",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "Test page",
+ "href": "http://paulirish.com/demo/inline-svg"
+ }, {
+ "name": "Test page and results",
+ "href": "http://codepen.io/eltonmesquita/full/GgXbvo/"
+ }],
+ "polyfills": ["inline-svg-polyfill"],
+ "knownBugs": ["False negative on some Chromia browsers."]
+}
+!*/
+/* DOC
+Detects support for inline SVG in HTML (not within XHTML).
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('inlinesvg', function() {
+ var div = createElement('div');
+ div.innerHTML = '<svg/>';
+ return (typeof SVGRect != 'undefined' && div.firstChild && div.firstChild.namespaceURI) == 'http://www.w3.org/2000/svg';
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "SVG SMIL animation",
+ "property": "smil",
+ "caniuse": "svg-smil",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "W3C Synchronised Multimedia spec",
+ "href": "http://www.w3.org/AudioVideo/"
+ }]
+}
+!*/
+define(['Modernizr', 'toStringFn'], function(Modernizr, toStringFn) {
+ // SVG SMIL animation
+ Modernizr.addTest('smil', function() {
+ return !!document.createElementNS &&
+ /SVGAnimate/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'animate')));
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Template strings",
+ "property": "templatestrings",
+ "notes": [{
+ "name": "MDN Reference",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings#Browser_compatibility"
+ }]
+}
+!*/
+/* DOC
+Template strings are string literals allowing embedded expressions.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('templatestrings', function() {
+ var supports;
+ try {
+ // A number of tools, including uglifyjs and require, break on a raw "`", so
+ // use an eval to get around that.
+ eval('``');
+ supports = true;
+ } catch (e) {}
+ return !!supports;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "textarea maxlength",
+ "property": "textareamaxlength",
+ "aliases": ["textarea-maxlength"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea"
+ }],
+ "polyfills": [
+ "maxlength"
+ ]
+}
+!*/
+/* DOC
+Detect support for the maxlength attribute of a textarea element
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('textareamaxlength', !!('maxLength' in createElement('textarea')));
+});
--- /dev/null
+/*!
+{
+ "name": "Touch Events",
+ "property": "touchevents",
+ "caniuse" : "touch",
+ "tags": ["media", "attribute"],
+ "notes": [{
+ "name": "Touch Events spec",
+ "href": "http://www.w3.org/TR/2013/WD-touch-events-20130124/"
+ }],
+ "warnings": [
+ "Indicates if the browser supports the Touch Events spec, and does not necessarily reflect a touchscreen device"
+ ],
+ "knownBugs": [
+ "False-positive on some configurations of Nokia N900",
+ "False-positive on some BlackBerry 6.0 builds – https://github.com/Modernizr/Modernizr/issues/372#issuecomment-3112695"
+ ]
+}
+!*/
+/* DOC
+Indicates if the browser supports the W3C Touch Events API.
+
+This *does not* necessarily reflect a touchscreen device:
+
+* Older touchscreen devices only emulate mouse events
+* Modern IE touch devices implement the Pointer Events API instead: use `Modernizr.pointerevents` to detect support for that
+* Some browsers & OS setups may enable touch APIs when no touchscreen is connected
+* Future browsers may implement other event models for touch interactions
+
+See this article: [You Can't Detect A Touchscreen](http://www.stucox.com/blog/you-cant-detect-a-touchscreen/).
+
+It's recommended to bind both mouse and touch/pointer events simultaneously – see [this HTML5 Rocks tutorial](http://www.html5rocks.com/en/mobile/touchandmouse/).
+
+This test will also return `true` for Firefox 4 Multitouch support.
+*/
+define(['Modernizr', 'prefixes', 'testStyles'], function(Modernizr, prefixes, testStyles) {
+ // Chrome (desktop) used to lie about its support on this, but that has since been rectified: http://crbug.com/36415
+ Modernizr.addTest('touchevents', function() {
+ var bool;
+ if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
+ bool = true;
+ } else {
+ var query = ['@media (', prefixes.join('touch-enabled),('), 'heartz', ')', '{#modernizr{top:9px;position:absolute}}'].join('');
+ testStyles(query, function(node) {
+ bool = node.offsetTop === 9;
+ });
+ }
+ return bool;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Typed arrays",
+ "property": "typedarrays",
+ "caniuse": "typedarrays",
+ "tags": ["js"],
+ "authors": ["Stanley Stuart (@fivetanley)"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/JavaScript_typed_arrays"
+ },{
+ "name": "Kronos spec",
+ "href": "http://www.khronos.org/registry/typedarray/specs/latest/"
+ }],
+ "polyfills": ["joshuabell-polyfill"]
+}
+!*/
+/* DOC
+Detects support for native binary data manipulation via Typed Arrays in JavaScript.
+
+Does not check for DataView support; use `Modernizr.dataview` for that.
+*/
+define(['Modernizr'], function(Modernizr) {
+ // Should fail in:
+ // Internet Explorer <= 9
+ // Firefox <= 3.6
+ // Chrome <= 6.0
+ // iOS Safari < 4.2
+ // Safari < 5.1
+ // Opera < 11.6
+ // Opera Mini, <= 7.0
+ // Android Browser < 4.0
+ // Blackberry Browser < 10.0
+
+ Modernizr.addTest('typedarrays', 'ArrayBuffer' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "Unicode Range",
+ "property": "unicoderange",
+ "notes": [{
+ "name" : "W3C reference",
+ "href": "http://www.w3.org/TR/2013/CR-css-fonts-3-20131003/#descdef-unicode-range"
+ }, {
+ "name" : "24 Way article",
+ "href": "http://24ways.org/2011/creating-custom-font-stacks-with-unicode-range"
+ }]
+}
+!*/
+define(['Modernizr', 'testStyles', 'createElement'], function(Modernizr, testStyles, createElement) {
+ Modernizr.addTest('unicoderange', function() {
+
+ return Modernizr.testStyles('@font-face{font-family:"unicodeRange";src:local("Arial");unicode-range:U+0020,U+002E}#modernizr span{font-size:20px;display:inline-block;font-family:"unicodeRange",monospace}#modernizr .mono{font-family:monospace}', function(elem) {
+
+ // we use specify a unicode-range of 002E (the `.` glyph,
+ // and a monospace font as the fallback. If the first of
+ // these test glyphs is a different width than the other
+ // the other three (which are all monospace), then we
+ // have a winner.
+ var testGlyphs = ['.', '.', 'm', 'm'];
+
+ for (var i = 0; i < testGlyphs.length; i++) {
+ var elm = createElement('span');
+ elm.innerHTML = testGlyphs[i];
+ elm.className = i % 2 ? 'mono' : '';
+ elem.appendChild(elm);
+ testGlyphs[i] = elm.clientWidth;
+ }
+
+ return (testGlyphs[0] !== testGlyphs[1] && testGlyphs[2] === testGlyphs[3]);
+ });
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Unicode characters",
+ "property": "unicode",
+ "tags": ["encoding"],
+ "warnings": [
+ "positive Unicode support doesn't mean you can use it inside <title>, this seems more related to OS & Language packs"
+ ]
+}
+!*/
+/* DOC
+Detects if unicode characters are supported in the current document.
+*/
+define(['Modernizr', 'createElement', 'testStyles', 'isSVG'], function(Modernizr, createElement, testStyles, isSVG) {
+ /**
+ * Unicode special character support
+ *
+ * Detection is made by testing missing glyph box rendering against star character
+ * If widths are the same, this "probably" means the browser didn't support the star character and rendered a glyph box instead
+ * Just need to ensure the font characters have different widths
+ */
+ Modernizr.addTest('unicode', function() {
+ var bool;
+ var missingGlyph = createElement('span');
+ var star = createElement('span');
+
+ testStyles('#modernizr{font-family:Arial,sans;font-size:300em;}', function(node) {
+
+ missingGlyph.innerHTML = isSVG ? '\u5987' : 'ᝣ';
+ star.innerHTML = isSVG ? '\u2606' : '☆';
+
+ node.appendChild(missingGlyph);
+ node.appendChild(star);
+
+ bool = 'offsetWidth' in missingGlyph && missingGlyph.offsetWidth !== star.offsetWidth;
+ });
+
+ return bool;
+
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Blob URLs",
+ "property": "bloburls",
+ "caniuse": "bloburls",
+ "notes": [{
+ "name": "W3C Working Draft",
+ "href": "http://www.w3.org/TR/FileAPI/#creating-revoking"
+ }],
+ "tags": ["file", "url"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Detects support for creating Blob URLs
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ var url = prefixed('URL', window, false);
+ url = url && window[url];
+ Modernizr.addTest('bloburls', url && 'revokeObjectURL' in url && 'createObjectURL' in url);
+});
--- /dev/null
+/*!
+{
+ "name": "Data URI",
+ "property": "datauri",
+ "caniuse": "datauri",
+ "tags": ["url"],
+ "builderAliases": ["url_data_uri"],
+ "async": true,
+ "notes": [{
+ "name": "Wikipedia article",
+ "href": "http://en.wikipedia.org/wiki/Data_URI_scheme"
+ }],
+ "warnings": ["Support in Internet Explorer 8 is limited to images and linked resources like CSS files, not HTML files"]
+}
+!*/
+/* DOC
+Detects support for data URIs. Provides a subproperty to report support for data URIs over 32kb in size:
+
+```javascript
+Modernizr.datauri // true
+Modernizr.datauri.over32kb // false in IE8
+```
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+ // https://github.com/Modernizr/Modernizr/issues/14
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ // IE7 throw a mixed content warning on HTTPS for this test, so we'll
+ // just blacklist it (we know it doesn't support data URIs anyway)
+ // https://github.com/Modernizr/Modernizr/issues/362
+ if (navigator.userAgent.indexOf('MSIE 7.') !== -1) {
+ // Keep the test async
+ setTimeout(function() {
+ addTest('datauri', false);
+ }, 10);
+ }
+
+ var datauri = new Image();
+
+ datauri.onerror = function() {
+ addTest('datauri', false);
+ };
+ datauri.onload = function() {
+ if (datauri.width == 1 && datauri.height == 1) {
+ testOver32kb();
+ }
+ else {
+ addTest('datauri', false);
+ }
+ };
+
+ datauri.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
+
+ // Once we have datauri, let's check to see if we can use data URIs over
+ // 32kb (IE8 can't). https://github.com/Modernizr/Modernizr/issues/321
+ function testOver32kb() {
+
+ var datauriBig = new Image();
+
+ datauriBig.onerror = function() {
+ addTest('datauri', true);
+ Modernizr.datauri = new Boolean(true);
+ Modernizr.datauri.over32kb = false;
+ };
+ datauriBig.onload = function() {
+ addTest('datauri', true);
+ Modernizr.datauri = new Boolean(true);
+ Modernizr.datauri.over32kb = (datauriBig.width == 1 && datauriBig.height == 1);
+ };
+
+ var base64str = 'R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
+ while (base64str.length < 33000) {
+ base64str = '\r\n' + base64str;
+ }
+ datauriBig.src = 'data:image/gif;base64,' + base64str;
+ }
+
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "URL parser",
+ "property": "urlparser",
+ "notes": [{
+ "name": "URL",
+ "href": "https://dvcs.w3.org/hg/url/raw-file/tip/Overview.html"
+ }],
+ "polyfills": ["urlparser"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["url"]
+}
+!*/
+/* DOC
+Check if browser implements the URL constructor for parsing URLs.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('urlparser', function() {
+ var url;
+ try {
+ // have to actually try use it, because Safari defines a dud constructor
+ url = new URL('http://modernizr.com/');
+ return url.href === 'http://modernizr.com/';
+ } catch (e) {
+ return false;
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "IE User Data API",
+ "property": "userdata",
+ "tags": ["storage"],
+ "authors": ["@stereobooster"],
+ "notes": [{
+ "name": "MSDN Documentation",
+ "href": "http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx"
+ }]
+}
+!*/
+/* DOC
+Detects support for IE userData for persisting data, an API similar to localStorage but supported since IE5.
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('userdata', !!createElement('div').addBehavior);
+});
--- /dev/null
+/*!
+{
+ "name": "Vibration API",
+ "property": "vibrate",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozVibrate"
+ },{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/vibration/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the API that provides access to the vibration mechanism of the hosting device, to provide tactile feedback.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('vibrate', !!prefixed('vibrate', navigator));
+});
--- /dev/null
+/*!
+{
+ "name": "HTML5 Video",
+ "property": "video",
+ "caniuse": "video",
+ "tags": ["html5"],
+ "knownBugs": [
+ "Without QuickTime, `Modernizr.video.h264` will be `undefined`; http://github.com/Modernizr/Modernizr/issues/546"
+ ],
+ "polyfills": [
+ "html5media",
+ "mediaelementjs",
+ "sublimevideo",
+ "videojs",
+ "leanbackplayer",
+ "videoforeverybody"
+ ]
+}
+!*/
+/* DOC
+Detects support for the video element, as well as testing what types of content it supports.
+
+Subproperties are provided to describe support for `ogg`, `h264` and `webm` formats, e.g.:
+
+```javascript
+Modernizr.video // true
+Modernizr.video.ogg // 'probably'
+```
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+
+ Modernizr.addTest('video', function() {
+ /* jshint -W053 */
+ var elem = createElement('video');
+ var bool = false;
+
+ // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
+ try {
+ if (bool = !!elem.canPlayType) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, '');
+
+ // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
+ bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, '');
+
+ bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, '');
+
+ bool.vp9 = elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, '');
+
+ bool.hls = elem.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, '');
+ }
+ } catch (e) {}
+
+ return bool;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Video Autoplay",
+ "property": "videoautoplay",
+ "tags": ["video"],
+ "async" : true,
+ "warnings": ["This test is very large – only include it if you absolutely need it"],
+ "knownBugs": ["crashes with an alert on iOS7 when added to homescreen"]
+}
+!*/
+/* DOC
+Checks for support of the autoplay attribute of the video element.
+*/
+define(['Modernizr', 'addTest', 'docElement', 'createElement', 'test/video'], function(Modernizr, addTest, docElement, createElement) {
+
+ Modernizr.addAsyncTest(function() {
+ var timeout;
+ var waitTime = 300;
+ var elem = createElement('video');
+ var elemStyle = elem.style;
+
+ function testAutoplay(arg) {
+ clearTimeout(timeout);
+ elem.removeEventListener('playing', testAutoplay, false);
+ addTest('videoautoplay', arg && arg.type === 'playing' || elem.currentTime !== 0);
+ elem.parentNode.removeChild(elem);
+ }
+
+ //skip the test if video itself, or the autoplay
+ //element on it isn't supported
+ if (!Modernizr.video || !('autoplay' in elem)) {
+ addTest('videoautoplay', false);
+ return;
+ }
+
+ elemStyle.position = 'absolute';
+ elemStyle.height = 0;
+ elemStyle.width = 0;
+
+ try {
+ if (Modernizr.video.ogg) {
+ elem.src = 'data:video/ogg;base64,T2dnUwACAAAAAAAAAABmnCATAAAAAHDEixYBKoB0aGVvcmEDAgEAAQABAAAQAAAQAAAAAAAFAAAAAQAAAAAAAAAAAGIAYE9nZ1MAAAAAAAAAAAAAZpwgEwEAAAACrA7TDlj///////////////+QgXRoZW9yYSsAAABYaXBoLk9yZyBsaWJ0aGVvcmEgMS4xIDIwMDkwODIyIChUaHVzbmVsZGEpAQAAABoAAABFTkNPREVSPWZmbXBlZzJ0aGVvcmEtMC4yOYJ0aGVvcmG+zSj3uc1rGLWpSUoQc5zmMYxSlKQhCDGMYhCEIQhAAAAAAAAAAAAAEW2uU2eSyPxWEvx4OVts5ir1aKtUKBMpJFoQ/nk5m41mUwl4slUpk4kkghkIfDwdjgajQYC8VioUCQRiIQh8PBwMhgLBQIg4FRba5TZ5LI/FYS/Hg5W2zmKvVoq1QoEykkWhD+eTmbjWZTCXiyVSmTiSSCGQh8PB2OBqNBgLxWKhQJBGIhCHw8HAyGAsFAiDgUCw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDAwPEhQUFQ0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WJsb2NrPTE6MDowIGFuYWx5c2U9MHgxOjAgbWU9ZXNhIHN1Ym1lPTkgcHN5PTAgbWl4ZWRfcmVmPTAgbWVfcmFuZ2U9NCBjaHJvbWFfbWU9MSB0cmVsbGlzPTAgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0wIGNocm9tYV9xcF9vZmZzZXQ9MCB0aHJlYWRzPTYgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTUwIGtleWludF9taW49NSBzY2VuZWN1dD00MCBpbnRyYV9yZWZyZXNoPTAgcmM9Y3FwIG1idHJlZT0wIHFwPTAAgAAAAD5liISscR8A+E4ACAACFoAAITAAAgsAAPgYCoKgoC+L4vi+KAvi+L4YfAEAACMzgABF9AAEUGUgABDJiXnf4AAAAARBmiKUAAAABEGaQpQAAAAEQZpilAAAAARBmoKU';
+ }
+ else {
+ addTest('videoautoplay', false);
+ return;
+ }
+ }
+
+ catch (e) {
+ addTest('videoautoplay', false);
+ return;
+ }
+
+ elem.setAttribute('autoplay', '');
+ elem.style.cssText = 'display:none';
+ docElement.appendChild(elem);
+ // wait for the next tick to add the listener, otherwise the element may
+ // not have time to play in high load situations (e.g. the test suite)
+ setTimeout(function() {
+ elem.addEventListener('playing', testAutoplay, false);
+ timeout = setTimeout(testAutoplay, waitTime);
+ }, 0);
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Video Loop Attribute",
+ "property": "videoloop",
+ "tags": ["video", "media"]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('videoloop', 'loop' in createElement('video'));
+});
--- /dev/null
+/*!
+{
+ "name": "Video Preload Attribute",
+ "property": "videopreload",
+ "tags": ["video", "media"]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('videopreload', 'preload' in createElement('video'));
+});
--- /dev/null
+/*!
+{
+ "name": "VML",
+ "property": "vml",
+ "caniuse": "vml",
+ "tags": ["vml"],
+ "authors": ["Craig Andrews (@candrews)"],
+ "notes": [{
+ "name" : "W3C VML reference",
+ "href": "http://www.w3.org/TR/NOTE-VML"
+ },{
+ "name" : "Microsoft VML reference",
+ "href": "http://msdn.microsoft.com/en-us/library/bb263898%28VS.85%29.aspx"
+ }]
+}
+!*/
+/* DOC
+Detects support for VML.
+*/
+define(['Modernizr', 'createElement', 'isSVG'], function(Modernizr, createElement, isSVG) {
+ Modernizr.addTest('vml', function() {
+ var containerDiv = createElement('div');
+ var supports = false;
+ var shape;
+
+ if (!isSVG) {
+ containerDiv.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
+ shape = containerDiv.firstChild;
+ shape.style.behavior = 'url(#default#VML)';
+ supports = shape ? typeof shape.adj == 'object' : true;
+ }
+
+ return supports;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Web Intents",
+ "property": "webintents",
+ "authors": ["Eric Bidelman"],
+ "notes": [{
+ "name": "Web Intents project site",
+ "href": "http://webintents.org/"
+ }],
+ "polyfills": ["webintents"],
+ "builderAliases": ["web_intents"]
+}
+!*/
+/* DOC
+Detects native support for the Web Intents APIs for service discovery and inter-application communication.
+
+Chrome added support for this in v19, but [removed it again in v24](http://lists.w3.org/Archives/Public/public-web-intents/2012Nov/0000.html) because of "a number of areas for
+development in both the API and specific user experience in Chrome". No other browsers currently support it, however a [JavaScript shim](http://webintents.org/#javascriptshim) is available.
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('webintents', !!prefixed('startActivity', navigator));
+});
--- /dev/null
+/*!
+{
+ "name": "Web Animation API",
+ "property": "animation",
+ "tags": ["webanimations"],
+ "polyfills": ["webanimationsjs"],
+ "notes": [{
+ "name": "Introducing Web Animations",
+ "href": "http://brian.sol1.net/svg/2013/06/26/introducing-web-animations/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the Web Animation API, a way to create css animations in js
+*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('webanimations', 'animate' in createElement('div'));
+});
--- /dev/null
+/*!
+{
+ "name": "WebGL",
+ "property": "webgl",
+ "caniuse": "webgl",
+ "tags": ["webgl", "graphics"],
+ "polyfills": ["jebgl", "cwebgl", "iewebgl"]
+}
+!*/
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ Modernizr.addTest('webgl', function() {
+ var canvas = createElement('canvas');
+ var supports = 'probablySupportsContext' in canvas ? 'probablySupportsContext' : 'supportsContext';
+ if (supports in canvas) {
+ return canvas[supports]('webgl') || canvas[supports]('experimental-webgl');
+ }
+ return 'WebGLRenderingContext' in window;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "WebGL Extensions",
+ "property": "webglextensions",
+ "tags": ["webgl", "graphics"],
+ "builderAliases": ["webgl_extensions"],
+ "async" : true,
+ "authors": ["Ilmari Heikkinen"],
+ "knownBugs": [],
+ "notes": [{
+ "name": "Kronos extensions registry",
+ "href": "http://www.khronos.org/registry/webgl/extensions/"
+ }]
+}
+!*/
+/* DOC
+Detects support for OpenGL extensions in WebGL. It's `true` if the [WebGL extensions API](https://developer.mozilla.org/en-US/docs/Web/WebGL/Using_Extensions) is supported, then exposes the supported extensions as subproperties, e.g.:
+
+```javascript
+if (Modernizr.webglextensions) {
+ // WebGL extensions API supported
+}
+if ('OES_vertex_array_object' in Modernizr.webglextensions) {
+ // Vertex Array Objects extension supported
+}
+```
+*/
+define(['Modernizr', 'createElement', 'test/webgl'], function(Modernizr, createElement) {
+ // based on code from ilmari heikkinen
+ // code.google.com/p/graphics-detect/source/browse/js/detect.js
+
+ // Not Async but handles it's own self
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ // Not a good candidate for css classes, so we avoid addTest stuff
+ Modernizr.webglextensions = new Boolean(false);
+
+ if (!Modernizr.webgl) {
+ return;
+ }
+
+ var canvas;
+ var ctx;
+ var exts;
+
+ try {
+ canvas = createElement('canvas');
+ ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
+ exts = ctx.getSupportedExtensions();
+ }
+ catch (e) {
+ return;
+ }
+
+ if (ctx !== undefined) {
+ Modernizr.webglextensions = new Boolean(true);
+ }
+
+ for (var i = -1, len = exts.length; ++i < len;) {
+ Modernizr.webglextensions[exts[i]] = true;
+ }
+
+ canvas = undefined;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "RTC Data Channel",
+ "property": "datachannel",
+ "notes": [{
+ "name": "HTML5 Rocks! Article",
+ "href": "http://www.html5rocks.com/en/tutorials/webrtc/datachannels/"
+ }]
+}
+!*/
+/* DOC
+Detect for the RTCDataChannel API that allows for transfer data directly from one peer to another
+*/
+define(['Modernizr', 'prefixed', 'domPrefixes', 'test/webrtc/peerconnection'], function(Modernizr, prefixed, domPrefixes) {
+
+ Modernizr.addTest('datachannel', function() {
+ if (!Modernizr.peerconnection) {
+ return false;
+ }
+ for (var i = 0, l = domPrefixes.length; i < l; i++) {
+ var peerConnectionConstructor = window[domPrefixes[i] + 'RTCPeerConnection'];
+
+ if (peerConnectionConstructor) {
+ var peerConnection = new peerConnectionConstructor({
+ 'iceServers': [{'url': 'stun:0'}]
+ });
+
+ return 'createDataChannel' in peerConnection;
+ }
+
+ }
+ return false;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "getUserMedia",
+ "property": "getusermedia",
+ "caniuse": "stream",
+ "tags": ["webrtc"],
+ "authors": ["Eric Bidelman"],
+ "notes": [{
+ "name": "W3C Media Capture and Streams spec",
+ "href": "http://www.w3.org/TR/mediacapture-streams/"
+ }],
+ "polyfills": ["getusermedia"]
+}
+!*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('getusermedia', !!prefixed('getUserMedia', navigator));
+});
--- /dev/null
+/*!
+{
+ "name": "RTC Peer Connection",
+ "property": "peerconnection",
+ "tags": ["webrtc"],
+ "authors": ["Ankur Oberoi"],
+ "notes": [{
+ "name": "W3C Web RTC spec",
+ "href": "http://www.w3.org/TR/webrtc/"
+ }]
+}
+!*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('peerconnection', !!prefixed('RTCPeerConnection', window));
+});
--- /dev/null
+/*!
+{
+ "name": "WebSockets Support",
+ "property": "websockets",
+ "authors": ["Phread [fearphage]", "Mike Sherov [mikesherov]", "Burak Yigit Kaya [BYK]"],
+ "caniuse": "websockets",
+ "tags": ["html5"],
+ "warnings": [
+ "This test will reject any old version of WebSockets even if it is not prefixed such as in Safari 5.1"
+ ],
+ "notes": [{
+ "name": "CLOSING State and Spec",
+ "href": "http://www.w3.org/TR/websockets/#the-websocket-interface"
+ }],
+ "polyfills": [
+ "sockjs",
+ "socketio",
+ "kaazing-websocket-gateway",
+ "websocketjs",
+ "atmosphere",
+ "graceful-websocket",
+ "portal",
+ "datachannel"
+ ]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('websockets', 'WebSocket' in window && window.WebSocket.CLOSING === 2);
+});
--- /dev/null
+/*!
+{
+ "name": "Binary WebSockets",
+ "property": "websocketsbinary",
+ "tags": ["websockets"],
+ "builderAliases": ["websockets_binary"]
+}
+!*/
+define(['Modernizr'], function(Modernizr) {
+ // binaryType is truthy if there is support.. returns "blob" in new-ish chrome.
+ // plus.google.com/115535723976198353696/posts/ERN6zYozENV
+ // github.com/Modernizr/Modernizr/issues/370
+
+ Modernizr.addTest('websocketsbinary', function() {
+ var protocol = 'https:' == location.protocol ? 'wss' : 'ws',
+ protoBin;
+
+ if ('WebSocket' in window) {
+ if (protoBin = 'binaryType' in WebSocket.prototype) {
+ return protoBin;
+ }
+ try {
+ return !!(new WebSocket(protocol + '://.').binaryType);
+ } catch (e) {}
+ }
+
+ return false;
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Framed window",
+ "property": "framed",
+ "tags": ["window"],
+ "builderAliases": ["window_framed"]
+}
+!*/
+/* DOC
+Tests if page is iframed.
+*/
+define(['Modernizr'], function(Modernizr) {
+ // github.com/Modernizr/Modernizr/issues/242
+
+ Modernizr.addTest('framed', window.location != top.location);
+});
--- /dev/null
+/*!
+{
+ "name": "matchMedia",
+ "property": "matchmedia",
+ "caniuse" : "matchmedia",
+ "tags": ["matchmedia"],
+ "authors": ["Alberto Elias"],
+ "notes": [{
+ "name": "W3C CSSOM View Module",
+ "href": "http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/Window.matchMedia"
+ }],
+ "polyfills": ["matchmediajs"]
+}
+!*/
+/* DOC
+
+Detects support for matchMedia.
+
+*/
+define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
+ Modernizr.addTest('matchmedia', !!prefixed('matchMedia', window));
+});
--- /dev/null
+/*!
+{
+ "name": "Workers from Blob URIs",
+ "property": "blobworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_blobworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }],
+ "knownBugs": ["This test may output garbage to console."],
+ "authors": ["Jussi Kalliokoski"],
+ "async": true
+}
+!*/
+/* DOC
+Detects support for creating Web Workers from Blob URIs.
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+ Modernizr.addAsyncTest(function() {
+ try {
+ // we're avoiding using Modernizr._domPrefixes as the prefix capitalization on
+ // these guys are notoriously peculiar.
+ var BlobBuilder = window.BlobBuilder;
+ var URL = window.URL;
+ if (Modernizr._config.usePrefix) {
+ BlobBuilder = BlobBuilder || window.MozBlobBuilder || window.WebKitBlobBuilder || window.MSBlobBuilder || window.OBlobBuilder;
+ URL = URL || window.MozURL || window.webkitURL || window.MSURL || window.OURL;
+ }
+ var data = 'Modernizr',
+ blob,
+ bb,
+ worker,
+ url,
+ timeout,
+ scriptText = 'this.onmessage=function(e){postMessage(e.data)}';
+
+ try {
+ blob = new Blob([scriptText], {type:'text/javascript'});
+ } catch (e) {
+ // we'll fall back to the deprecated BlobBuilder
+ }
+ if (!blob) {
+ bb = new BlobBuilder();
+ bb.append(scriptText);
+ blob = bb.getBlob();
+ }
+
+ url = URL.createObjectURL(blob);
+ worker = new Worker(url);
+
+ worker.onmessage = function(e) {
+ addTest('blobworkers', data === e.data);
+ cleanup();
+ };
+
+ // Just in case...
+ worker.onerror = fail;
+ timeout = setTimeout(fail, 200);
+
+ worker.postMessage(data);
+ } catch (e) {
+ fail();
+ }
+
+ function fail() {
+ addTest('blobworkers', false);
+ cleanup();
+ }
+
+ function cleanup() {
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ if (worker) {
+ worker.terminate();
+ }
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Workers from Data URIs",
+ "property": "dataworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_dataworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }],
+ "knownBugs": ["This test may output garbage to console."],
+ "authors": ["Jussi Kalliokoski"],
+ "async": true
+}
+!*/
+/* DOC
+Detects support for creating Web Workers from Data URIs.
+*/
+define(['Modernizr', 'addTest'], function(Modernizr, addTest) {
+ Modernizr.addAsyncTest(function() {
+ try {
+ var data = 'Modernizr',
+ worker = new Worker('data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=');
+
+ worker.onmessage = function(e) {
+ worker.terminate();
+ addTest('dataworkers', data === e.data);
+ worker = null;
+ };
+
+ // Just in case...
+ worker.onerror = function() {
+ addTest('dataworkers', false);
+ worker = null;
+ };
+
+ setTimeout(function() {
+ addTest('dataworkers', false);
+ }, 200);
+
+ worker.postMessage(data);
+ } catch (e) {
+ setTimeout(function() {
+ addTest('dataworkers', false);
+ }, 0);
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Shared Workers",
+ "property": "sharedworkers",
+ "caniuse" : "sharedworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_sharedworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `SharedWorker` API from the Web Workers spec.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('sharedworkers', 'SharedWorker' in window);
+});
--- /dev/null
+/*!
+{
+ "name": "Transferables Objects",
+ "property": "transferables",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["transferables"],
+ "notes": [{
+ "name": "HTML5 Rocks article",
+ "href": "http://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast"
+ }],
+ "async": true
+}
+!*/
+/* DOC
+Detects whether web workers can use `transferables` objects.
+*/
+define(['Modernizr', 'addTest', 'test/blob', 'test/url/bloburls', 'test/workers/webworkers', 'test/typed-arrays'], function(Modernizr, addTest) {
+ Modernizr.addAsyncTest(function() {
+ var prerequisites = !!(Modernizr.blobconstructor &&
+ Modernizr.bloburls &&
+ Modernizr.webworkers &&
+ Modernizr.typedarrays);
+
+ // Early exit
+ if (!prerequisites) {
+ return addTest('transferables', false);
+ }
+
+ // Proper test if prerequisites are met
+ try {
+ var buffer,
+ scriptText = 'var hello = "world"',
+ blob = new Blob([scriptText], {type: 'text/javascript'}),
+ url = URL.createObjectURL(blob),
+ worker = new Worker(url),
+ timeout;
+
+ // Just in case...
+ worker.onerror = fail;
+ timeout = setTimeout(fail, 200);
+
+ // Building an minimal array buffer to send to the worker
+ buffer = new ArrayBuffer(1);
+
+ // Sending the buffer to the worker
+ worker.postMessage(buffer, [buffer]);
+
+ // If length of buffer is now 0, transferables are working
+ addTest('transferables', buffer.byteLength === 0);
+ cleanup();
+ } catch (e) {
+ fail();
+ }
+
+ function fail() {
+ addTest('transferables', false);
+ cleanup();
+ }
+
+ function cleanup() {
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ if (worker) {
+ worker.terminate();
+ }
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+ });
+});
--- /dev/null
+/*!
+{
+ "name": "Web Workers",
+ "property": "webworkers",
+ "caniuse" : "webworkers",
+ "tags": ["performance", "workers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }, {
+ "name": "HTML5 Rocks article",
+ "href": "http://www.html5rocks.com/en/tutorials/workers/basics/"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/Guide/Performance/Using_web_workers"
+ }],
+ "polyfills": ["fakeworker", "html5shims"]
+}
+!*/
+/* DOC
+Detects support for the basic `Worker` API from the Web Workers spec. Web Workers provide a simple means for web content to run scripts in background threads.
+*/
+define(['Modernizr'], function(Modernizr) {
+ Modernizr.addTest('webworkers', 'Worker' in window);
+});
--- /dev/null
+/*global define*/
+define(['lodash', 'metadata'], function(_, metadata) {
+
+ function getDetectObjByAmdPath(amdPath) {
+ return _.find(metadata, function(detect) {
+ return detect.amdPath == amdPath || detect.amdPath == 'test/' + amdPath;
+ });
+ }
+
+ return function generateBuildQuery(config) {
+ // Format:
+ // ?-<prop1>-<prop2>-…-<propN>-<option1>-<option2>-…<optionN>[-dontmin][-cssclassprefix:<prefix>]
+ // where prop1…N and option1…N are sorted alphabetically (for consistency)
+ var dontmin = !config.minify;
+
+ // Config uses amdPaths, but build query uses property names
+ var props = _.map(config['feature-detects'], function(amdPath) {
+ var detect = getDetectObjByAmdPath(amdPath);
+ var property = detect && detect.property;
+ property = _.isArray(property) ?
+ property.join('_').replace('-', '_') :
+ property.replace('-', '_');
+ return property;
+ });
+
+ // Config uses amdPaths, but the option's just use their names.
+ // A few of the values have to be massaged in order to match
+ // the `value`
+ var opts = _.map(config.options, function(opt) {
+ if (opt == 'setClasses') {
+ return 'cssclasses';
+ }
+ if (opt.indexOf('html5') === 0) {
+ opt = opt.replace('html5', '');
+ }
+ return opt.toLowerCase();
+ });
+
+ var sortedProps = props.sort();
+ var sortedOpts = opts.sort();
+
+ // Options are AMD paths in the config, but need to be converted to
+ var buildQuery = '?-' + sortedProps.concat(sortedOpts).join('-') +
+ (dontmin ? '-dontmin' : '') +
+ ((config.classPrefix) ?
+ '-cssclassprefix:' + config.classPrefix : '');
+
+ return buildQuery;
+ };
+});
--- /dev/null
+// this file configures require.js based on enviroment
+'use strict';
+
+/* jshint -W117 */
+var inBrowser = typeof define == 'function' && typeof define.amd == 'object';
+/* jshint -W117 */
+
+var _extend = function(a, b) {
+ for (var prop in b) {
+ var supplied = b[prop];
+ if (typeof supplied === 'object') {
+ a[prop] == a[prop] || {};
+ _extend(a[prop], supplied);
+ } else {
+ a[prop] = b[prop];
+ }
+ }
+};
+
+
+var requireConfig = {
+ optimize: 'none',
+ generateSourceMaps: false,
+ optimizeCss: 'none',
+ useStrict: true,
+ include: ['modernizr-init'],
+ fileExclusionRegExp: /^(.git|node_modules|modulizr|media|test)$/,
+ wrap: {
+ start: '\n;(function(window, document, undefined){',
+ end: '})(window, document);'
+ },
+ onBuildWrite: function(id, path, contents) {
+ if (this.optimize === 'uglify2') {
+ // strip out documentation comments
+ contents = contents.replace(/\/\*\![\s\S]*\!\*\//m, '');
+ }
+
+ if ((/define\(.*?\{/).test(contents)) {
+ // remove AMD ceremony for use without require.js or almond.js
+ contents = contents.replace(/define\(.*?\{/, '');
+
+ contents = contents.replace(/\}\);\s*?$/, '');
+
+ if (!contents.match(/Modernizr\.add(Async)?Test\(/)) {
+ // remove last return statement and trailing })
+ contents = contents.replace(/return.*[^return]*$/, '');
+ }
+ } else if ((/require\([^\{]*?\{/).test(contents)) {
+ contents = contents.replace(/require[^\{]+\{/, '');
+ contents = contents.replace(/\}\);\s*$/, '');
+ }
+
+ contents = contents.replace(/return addTest;/, '');
+
+ return contents;
+ }
+};
+
+function build(generate, generateBanner, pkg) {
+ return function build(config, cb) {
+ config = config || {};
+ cb = cb || function noop() {};
+ var banner;
+
+ requireConfig.rawText = {
+ 'modernizr-init': generate(config)
+ };
+
+ if (config.minify) {
+ banner = generateBanner('compact', config);
+ requireConfig.optimize = 'uglify2';
+ requireConfig.uglify2 = {
+ mangle: {
+ except: ['Modernizr']
+ },
+ beautify: {
+ ascii_only: true
+ }
+ };
+ } else {
+ banner = generateBanner('full', config);
+ requireConfig.optimize = 'none';
+ }
+
+ requireConfig.out = function(output) {
+ output = banner + output;
+
+ // Remove `define('modernizr-init' ...)` and `define('modernizr-build' ...)`
+ output = output.replace(/(,\s*)?define\("modernizr-(init|build)",\s*function\(\)\{\};?\)/g, '');
+ output = output.replace(/__VERSION__/g, pkg.version);
+
+ // Hack the prefix into place. Anything is way too big for something so small.
+ if (config && config.classPrefix) {
+ output = output.replace(/(classPrefix'?\s?:\s?)['""']{2}(,)/, '$1"' + config.classPrefix.replace(/"/g, '\\"') + '"$2');
+ }
+
+ cb(output);
+
+ };
+
+ requirejs.optimize(requireConfig);
+ };
+}
+
+if (inBrowser) {
+ var suppliedConfig = self._modernizrConfig;
+ var metadataUrl = 'i/js/metadata.json';
+ var packageUrl = 'i/js/modernizr-git/package.json';
+ requireConfig.baseUrl = '/i/js/modernizr-git/src';
+ requireConfig.paths = {
+ text: '/i/js/requirejs-plugins/lib/text',
+ lib: '/i/js/modernizr-git/lib',
+ json: '/i/js/requirejs-plugins/src/json',
+ lodash: '/i/js/lodash',
+ test: '/i/js/modernizr-git/feature-detects'
+ };
+
+ if (suppliedConfig) {
+ metadataUrl = suppliedConfig.metadataUrl || metadataUrl;
+ packageUrl = suppliedConfig.packageUrl || packageUrl;
+ _extend(requireConfig, suppliedConfig);
+ }
+
+ if (self._modernizrMetadata) {
+ requirejs.define('metadata', [], function() {return self._modernizrMetadata;});
+ } else {
+ requirejs.define('metadata', ['json!' + metadataUrl], function(pkg) {return pkg;});
+ }
+ requirejs.define('package', ['json!' + packageUrl], function(pkg) {return pkg;});
+} else {
+ var requirejs = require('requirejs');
+ var metadata = require('./metadata')();
+ var pkg = require('../package.json');
+
+ requirejs.define('metadata', [], function() {return metadata;});
+ requirejs.define('package', function() {return pkg;});
+
+ requireConfig.baseUrl = __dirname + '/../src';
+ requireConfig.paths = {
+ lodash: __dirname + '/../node_modules/lodash/index',
+ test: __dirname + '/../feature-detects',
+ lib: __dirname
+ };
+}
+
+requirejs.config(requireConfig);
+
+if (inBrowser) {
+ define('build', ['generate', 'lib/generate-banner', 'package'], build);
+} else {
+ var generateBanner = requirejs(__dirname + '/generate-banner.js');
+ var generate = requirejs('generate');
+ var pkg = requirejs('package');
+ var _build = build;
+ module.exports = function build() {
+ return _build(generate, generateBanner, pkg).apply(undefined, arguments);
+ };
+}
--- /dev/null
+'use strict';
+
+module.exports = {
+ build: require('./build'),
+ metadata: require('./metadata'),
+ options: require('./options'),
+};
--- /dev/null
+/*global location, define*/
+define(['lodash', 'package', 'lib/build-query'], function(_, pkg, buildQuery) {
+ var domain = 'modernizr.com';
+ if (typeof location !== 'undefined' && 'host' in location) {
+ domain = location.host;
+ }
+
+ // Return a Modernizr file banner.
+ // Usage:
+ // require('banners')(type);
+ // Arguments:
+ // type (String, required): either 'compact' or 'full'.
+
+ return function banners(type, config) {
+ config = config || {};
+ var query = buildQuery(config);
+ if (!type || type === 'compact') {
+ return '/*! ' + pkg.name + ' ' + pkg.version + ' (Custom Build) | ' + pkg.license + ' *\n' +
+ ' * http://' + domain + '/download/' + query +
+ ' !*/\n';
+ }
+ else if (type === 'full') {
+ return '/*!\n' +
+ ' * ' + pkg.name + ' v' + pkg.version + '\n' +
+ ' * Build http://' + domain + '/download' + query + '\n' +
+ ' *\n' +
+ ' * Copyright (c)\n * ' + _.pluck(pkg.contributors, 'name').join('\n * ') + '\n\n' +
+ ' * ' + pkg.license + ' License\n */\n' +
+ '\n' +
+ '/*\n' +
+ ' * Modernizr tests which native CSS3 and HTML5 features are available in the\n' +
+ ' * current UA and makes the results available to you in two ways: as properties on\n' +
+ ' * a global `Modernizr` object, and as classes on the `<html>` element. This\n' +
+ ' * information allows you to progressively enhance your pages with a granular level\n' +
+ ' * of control over the experience.\n*/\n';
+ } else {
+ throw 'banners() must be passed "compact" or "full" as an argument.';
+ }
+ };
+});
--- /dev/null
+var fs = require('fs');
+var file = require('file');
+var marked = require('marked');
+var polyfills = require('./polyfills.json');
+var viewRoot = fs.realpathSync(__dirname + '/../feature-detects');
+
+function metadata(cb) {
+ var tests = [];
+ file.walkSync(viewRoot, function(start, dirs, files) {
+ files.forEach(function(file) {
+ if (file === '.DS_Store') {
+ return;
+ }
+ var test = fs.readFileSync(start + '/' + file, 'utf8');
+ // TODO :: make this regex not suck
+ var metaRE = /\/\*\!([\s\S]*)\!\*\//m;
+ var matches = test.match(metaRE);
+ var docRE = /\/\*\sDOC([\s\S]*?)\*\//m;
+ var docmatches = test.match(docRE);
+ var depRE = /define\((\[[^\]]*\]),/;
+ var depMatches = test.match(depRE);
+
+ var metadata;
+
+ if (matches && matches[1]) {
+ try {
+ metadata = JSON.parse(matches[1]);
+ } catch (e) {
+ throw new Error('Error Parsing Metadata: ' + file + '\nInput: `' + matches[1] + '`');
+ }
+ }
+ else {
+ metadata = {};
+ }
+
+ var docs = null;
+
+ if (docmatches && docmatches[1]) {
+ docs = marked(docmatches[1].trim());
+ }
+
+ metadata.doc = docs;
+
+ var deps = [];
+ var matchedDeps;
+
+ if (depMatches && depMatches[1]) {
+ try {
+ matchedDeps = JSON.parse(depMatches[1].replace(/'/g, '"'));
+ } catch (e) {
+ throw new Error('Couldn\'t parse dependencies for `' + file + '`:\n`' + depMatches[1] + '\n`');
+ }
+ matchedDeps.forEach(function(dep) {
+ if (dep === 'Modernizr') {
+ return;
+ }
+ deps.push(dep);
+ });
+ } else {
+ throw new Error('Couldn\'t find the define for `' + file + '`');
+ }
+ metadata.deps = deps;
+
+ var baseDir = __dirname.replace(/lib$/, '');
+ metadata.path = './' + (start + '/' + file).replace(baseDir, '').replace(/\\/g, '/');
+ metadata.amdPath = metadata.path.replace(/^\.\/feature\-detects/, 'test').replace(/\.js$/i, '');
+
+ if (!metadata.name) {
+ metadata.name = metadata.amdPath;
+ }
+
+ var pfs = [];
+ if (metadata.polyfills && metadata.polyfills.length) {
+ metadata.polyfills.forEach(function(polyname) {
+ if (polyfills[polyname]) {
+ pfs.push(polyfills[polyname]);
+ }
+ else {
+ throw new Error(metadata.name + ': Polyfill not found in `' + file + '`: ' + polyname);
+ }
+ });
+ }
+ metadata.polyfills = pfs;
+
+ if (!metadata.async) {
+ metadata.async = false;
+ }
+
+ if (!metadata.notes) {
+ metadata.notes = [];
+ }
+
+ if (!metadata.warnings) {
+ metadata.warnings = [];
+ }
+
+ if (!metadata.caniuse) {
+ metadata.caniuse = null;
+ }
+
+ if (!metadata.cssclass && metadata.property) {
+ metadata.cssclass = metadata.property;
+ } else {
+ metadata.cssclass = null;
+ }
+
+ // Maybe catch a bug
+ if (!metadata.doc && metadata.docs) {
+ metadata.doc = metadata.docs;
+ delete metadata.docs;
+ }
+
+ // If you want markdown parsed code minus the docs and metadata, this'll do it.
+ // Off by default for now.
+ // metadata.code = marked('```javascript\n' + test.replace(metaRE, '').replace(docRE, '') + '\n```');
+
+ if (!metadata.tags) {
+ metadata.tags = [];
+ }
+
+ if (!metadata.authors) {
+ metadata.authors = [];
+ }
+
+ if (!metadata.knownBugs) {
+ metadata.knownBugs = [];
+ }
+
+ tests.push(metadata);
+ });
+ });
+
+ if (cb && typeof cb == 'function') {
+ return cb(tests);
+ }
+ return tests;
+}
+
+
+module.exports = metadata;
--- /dev/null
+var fs = require('fs');
+var _ = require('lodash');
+var file = require('file');
+var jsdoc = require('doctrine');
+var srcRoot = fs.realpathSync(__dirname + '/../src');
+var commentRE = /^(\s+)?(\/\*)?\*(\/)?\s?/mg;
+var jsdocRE = /[^\S\r\n]*\/(?:\*{2})([\W\w]+?)\*\//mg;
+
+var stripComments = function(str) {
+ return str.replace(commentRE, '');
+};
+
+function options(cb, allMetadata) {
+ var opts;
+
+ file.walkSync(srcRoot, function(start, dirs, files) {
+ opts = _.chain(files)
+ .map(function(file) {
+ var srcFile = fs.readFileSync(start + '/' + file, 'utf8');
+ var docs = srcFile.match(jsdocRE);
+
+ if (docs) {
+ docs = docs
+ .map(stripComments)
+ .map(function(str) {
+ return jsdoc.parse(str, {
+ sloppy: true,
+ tags: [
+ 'access',
+ 'author',
+ 'class',
+ 'example',
+ 'function',
+ 'memberOf',
+ 'memberof',
+ 'name',
+ 'optionName',
+ 'optionProp',
+ 'param',
+ 'params',
+ 'preserve',
+ 'private',
+ 'returns',
+ 'type'
+ ]
+ });
+ });
+
+ var option = _.chain(docs)
+ .flatten()
+ .filter(function(doc) {
+ if (allMetadata) {
+ return true;
+ } else {
+ return doc && _.some(doc.tags, {title: 'optionName'});
+ }
+ })
+ .map(function(opt) {
+ if (allMetadata) {
+ return opt;
+ } else {
+ var tags = opt.tags.filter(function(tag) {
+ return tag.title.indexOf('option') === 0;
+ });
+
+ return {
+ name: _.where(tags, {title: 'optionName'})[0].description,
+ property: _.where(tags, {title: 'optionProp'})[0].description
+ };
+ }
+ })
+ .value();
+
+ return option;
+ }
+ })
+ .filter(function(doc) {
+ return doc && doc.length;
+ })
+ .flatten()
+ .value();
+
+ });
+
+ if (cb) {
+ cb(opts);
+ }
+
+ return opts;
+
+}
+
+module.exports = options;
--- /dev/null
+/*!
+ * modernizr v3.0.0
+ * Build http://modernizr.com/download?-adownload-ambientlight-animation-apng-appearance-applicationcache-audio-audioloop-audiopreload-backgroundblendmode-backgroundcliptext-backgroundsize-batteryapi-beacon-bgpositionshorthand-bgpositionxy-bgrepeatspace_bgrepeatround-bgsizecover-blobconstructor-bloburls-blobworkers-borderimage-borderradius-boxshadow-boxsizing-canvas-canvasblending-canvastext-canvaswinding-capture-checked-classlist-contains-contenteditable-contextmenu-cookies-cors-createelementattrs_createelement_attrs-cssall-cssanimations-csscalc-csschunit-csscolumns-cssescape-cssexunit-cssfilters-cssgradients-csshyphens_softhyphens_softhyphensfind-cssinvalid-cssmask-csspointerevents-csspositionsticky-csspseudoanimations-csspseudotransitions-cssreflections-cssremunit-cssresize-cssscrollbar-csstransforms-csstransforms3d-csstransitions-cssvalid-cssvhunit-cssvmaxunit-cssvminunit-cssvwunit-cubicbezierrange-customevent-customprotocolhandler-dart-datachannel-datalistelem-dataset-datauri-dataview-dataworkers-details-devicemotion_deviceorientation-directory-display_runin-displaytable-documentfragment-ellipsis-emoji-es5-es5array-es5date-es5function-es5object-es5string-es5syntax-es5undefined-es6array-es6math-es6number-es6object-es6string-eventlistener-eventsource-exiforientation-fetch-fileinput-filereader-filesystem-flash-flexbox-flexboxlegacy-flexboxtweener-flexwrap-fontface-formattribute-formvalidation-framed-fullscreen-gamepads-generatedcontent-generators-geolocation-getrandomvalues-getusermedia-hashchange-hidden-hiddenscroll-history-hsla-htmlimports-ie8compat-indexeddb-indexeddbblob-inlinesvg-input-inputformaction-inputformenctype-inputformmethod-inputformtarget-inputtypes-intl-jpegxr-json-lastchild-localizednumber-localstorage-lowbandwidth-lowbattery-mathml-mediaqueries-microdata-multiplebgs-mutationobserver-notification-nthchild-objectfit-olreversed-oninput-opacity-outputelem-overflowscrolling-pagevisibility-peerconnection-performance-picture-placeholder-pointerevents-pointerlock-postmessage-preserve3d-progressbar_meter-promises-proximity-queryselector-quotamanagement-regions-requestanimationframe-requestautocomplete-rgba-ruby-sandbox-scriptasync-scriptdefer-seamless-search-serviceworker-sessionstorage-shapes-sharedworkers-siblinggeneral-sizes-smil-speechrecognition-speechsynthesis-srcdoc-srcset-strictmode-stylescoped-subpixelfont-supports-svg-svgasimg-svgclippaths-svgfilters-svgforeignobject-target-template-templatestrings-textalignlast-textareamaxlength-textshadow-texttrackapi_track-time-todataurljpeg_todataurlpng_todataurlwebp-touchevents-transferables-typedarrays-unicode-unicoderange-unknownelements-urlparser-userdata-userselect-vibrate-video-videoautoplay-videoloop-videopreload-vml-webaudio-webgl-webglextensions-webintents-webp-webpalpha-webpanimation-webplossless_webp_lossless-websockets-websocketsbinary-websqldatabase-webworkers-willchange-wrapflow-xhr2-xhrresponsetype-xhrresponsetypearraybuffer-xhrresponsetypeblob-xhrresponsetypedocument-xhrresponsetypejson-xhrresponsetypetext-addtest-atrule-domprefixes-hasevent-load-mq-prefixed-prefixedcss-prefixes-printshiv-testallprops-testprop-teststyles-dontmin
+ *
+ * Copyright (c)
+ * Faruk Ates
+ * Paul Irish
+ * Alex Sexton
+ * Ryan Seddon
+ * Alexander Farkas
+ * Patrick Kettner
+ * Stu Cox
+ * Richard Herrera
+
+ * MIT License
+ */
+
+/*
+ * Modernizr tests which native CSS3 and HTML5 features are available in the
+ * current UA and makes the results available to you in two ways: as properties on
+ * a global `Modernizr` object, and as classes on the `<html>` element. This
+ * information allows you to progressively enhance your pages with a granular level
+ * of control over the experience.
+*/
+
+;(function(window, document, undefined){
+ var tests = [];
+
+
+ /**
+ *
+ * ModernizrProto is the constructor for Modernizr
+ *
+ * @class
+ * @access public
+ */
+
+ var ModernizrProto = {
+ // The current version, dummy
+ _version: '3.0.0',
+
+ // Any settings that don't work as separate modules
+ // can go in here as configuration.
+ _config: {
+ 'classPrefix' : '',
+ 'enableClasses' : true,
+ 'enableJSClass' : true,
+ 'usePrefixes' : true
+ },
+
+ // Queue of tests
+ _q: [],
+
+ // Stub these for people who are listening
+ on: function(test, cb) {
+ // I don't really think people should do this, but we can
+ // safe guard it a bit.
+ // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.
+ // This is in case people listen to synchronous tests. I would leave it out,
+ // but the code to *disallow* sync tests in the real version of this
+ // function is actually larger than this.
+ var self = this;
+ setTimeout(function() {
+ cb(self[test]);
+ }, 0);
+ },
+
+ addTest: function(name, fn, options) {
+ tests.push({name : name, fn : fn, options : options});
+ },
+
+ addAsyncTest: function(fn) {
+ tests.push({name : null, fn : fn});
+ }
+ };
+
+
+
+ // Fake some of Object.create so we can force non test results to be non "own" properties.
+ var Modernizr = function() {};
+ Modernizr.prototype = ModernizrProto;
+
+ // Leak modernizr globally when you `require` it rather than force it here.
+ // Overwrite name so constructor name is nicer :D
+ Modernizr = new Modernizr();
+
+
+
+ var classes = [];
+
+
+ /**
+ * is returns a boolean if the typeof an obj is exactly type.
+ *
+ * @access private
+ * @function is
+ * @param {*} obj - A thing we want to check the type of
+ * @param {string} type - A string to compare the typeof against
+ * @returns {boolean}
+ */
+
+ function is(obj, type) {
+ return typeof obj === type;
+ }
+ ;
+
+ /**
+ * Run through all tests and detect their support in the current UA.
+ *
+ * @access private
+ */
+
+ function testRunner() {
+ var featureNames;
+ var feature;
+ var aliasIdx;
+ var result;
+ var nameIdx;
+ var featureName;
+ var featureNameSplit;
+
+ for (var featureIdx in tests) {
+ featureNames = [];
+ feature = tests[featureIdx];
+ // run the test, throw the return value into the Modernizr,
+ // then based on that boolean, define an appropriate className
+ // and push it into an array of classes we'll join later.
+ //
+ // If there is no name, it's an 'async' test that is run,
+ // but not directly added to the object. That should
+ // be done with a post-run addTest call.
+ if (feature.name) {
+ featureNames.push(feature.name.toLowerCase());
+
+ if (feature.options && feature.options.aliases && feature.options.aliases.length) {
+ // Add all the aliases into the names list
+ for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {
+ featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());
+ }
+ }
+ }
+
+ // Run the test, or use the raw value if it's not a function
+ result = is(feature.fn, 'function') ? feature.fn() : feature.fn;
+
+
+ // Set each of the names on the Modernizr object
+ for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {
+ featureName = featureNames[nameIdx];
+ // Support dot properties as sub tests. We don't do checking to make sure
+ // that the implied parent tests have been added. You must call them in
+ // order (either in the test, or make the parent test a dependency).
+ //
+ // Cap it to TWO to make the logic simple and because who needs that kind of subtesting
+ // hashtag famous last words
+ featureNameSplit = featureName.split('.');
+
+ if (featureNameSplit.length === 1) {
+ Modernizr[featureNameSplit[0]] = result;
+ } else {
+ // cast to a Boolean, if not one already
+ /* jshint -W053 */
+ if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
+ Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
+ }
+
+ Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;
+ }
+
+ classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));
+ }
+ }
+ }
+
+ ;
+
+ /**
+ * docElement is a convenience wrapper to grab the root element of the document
+ *
+ * @access private
+ * @returns {HTMLElement|SVGElement} The root element of the document
+ */
+
+ var docElement = document.documentElement;
+
+
+ /**
+ * A convenience helper to check if the document we are running in is an SVG document
+ *
+ * @access private
+ * @returns {boolean}
+ */
+
+ var isSVG = docElement.nodeName.toLowerCase() === 'svg';
+
+
+ /**
+ * setClasses takes an array of class names and adds them to the root element
+ *
+ * @access private
+ * @function setClasses
+ * @param {string[]} classes - Array of class names
+ */
+
+ // Pass in an and array of class names, e.g.:
+ // ['no-webp', 'borderradius', ...]
+ function setClasses(classes) {
+ var className = docElement.className;
+ var classPrefix = Modernizr._config.classPrefix || '';
+
+ if (isSVG) {
+ className = className.baseVal;
+ }
+
+ // Change `no-js` to `js` (independently of the `enableClasses` option)
+ // Handle classPrefix on this too
+ if (Modernizr._config.enableJSClass) {
+ var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)');
+ className = className.replace(reJS, '$1' + classPrefix + 'js$2');
+ }
+
+ if (Modernizr._config.enableClasses) {
+ // Add the new classes
+ className += ' ' + classPrefix + classes.join(' ' + classPrefix);
+ isSVG ? docElement.className.baseVal = className : docElement.className = className;
+ }
+
+ }
+
+ ;
+
+ /**
+ * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support
+ *
+ * @author kangax
+ * @access private
+ * @function hasOwnProp
+ * @param {object} object - The object to check for a property
+ * @param {string} property - The property to check for
+ * @returns {boolean}
+ */
+
+ // hasOwnProperty shim by kangax needed for Safari 2.0 support
+ var hasOwnProp;
+
+ (function() {
+ var _hasOwnProperty = ({}).hasOwnProperty;
+ /* istanbul ignore else */
+ /* we have no way of testing IE 5.5 or safari 2,
+ * so just assume the else gets hit */
+ if (!is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined')) {
+ hasOwnProp = function(object, property) {
+ return _hasOwnProperty.call(object, property);
+ };
+ }
+ else {
+ hasOwnProp = function(object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
+ return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
+ };
+ }
+ })();
+
+
+
+
+ // _l tracks listeners for async tests, as well as tests that execute after the initial run
+ ModernizrProto._l = {};
+
+ /**
+ * Modernizr.on is a way to listen for the completion of async tests. Being
+ * asynchronous, they may not finish before your scripts run. As a result you
+ * will get a possibly false negative `undefined` value.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.on
+ * @access public
+ * @function on
+ * @param {string} feature - String name of the feature detect
+ * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not
+ * @example
+ *
+ * ```js
+ * Modernizr.on('flash', function( result ) {
+ * if (result) {
+ * // the browser has flash
+ * } else {
+ * // the browser does not have flash
+ * }
+ * });
+ * ```
+ */
+
+ ModernizrProto.on = function(feature, cb) {
+ // Create the list of listeners if it doesn't exist
+ if (!this._l[feature]) {
+ this._l[feature] = [];
+ }
+
+ // Push this test on to the listener list
+ this._l[feature].push(cb);
+
+ // If it's already been resolved, trigger it on next tick
+ if (Modernizr.hasOwnProperty(feature)) {
+ // Next Tick
+ setTimeout(function() {
+ Modernizr._trigger(feature, Modernizr[feature]);
+ }, 0);
+ }
+ };
+
+ /**
+ * _trigger is the private function used to signal test completion and run any
+ * callbacks registered through [Modernizr.on](#modernizr-on)
+ *
+ * @memberof Modernizr
+ * @name Modernizr._trigger
+ * @access private
+ * @function _trigger
+ * @param {string} feature - string name of the feature detect
+ * @param {function|boolean} [res] - A feature detection function, or the boolean =
+ * result of a feature detection function
+ */
+
+ ModernizrProto._trigger = function(feature, res) {
+ if (!this._l[feature]) {
+ return;
+ }
+
+ var cbs = this._l[feature];
+
+ // Force async
+ setTimeout(function() {
+ var i, cb;
+ for (i = 0; i < cbs.length; i++) {
+ cb = cbs[i];
+ cb(res);
+ }
+ }, 0);
+
+ // Don't trigger these again
+ delete this._l[feature];
+ };
+
+ /**
+ * addTest allows you to define your own feature detects that are not currently
+ * included in Modernizr (under the covers it's the exact same code Modernizr
+ * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result
+ * will be added onto the Modernizr object, as well as an appropriate className set on
+ * the html element when configured to do so
+ *
+ * @memberof Modernizr
+ * @name Modernizr.addTest
+ * @optionName Modernizr.addTest()
+ * @optionProp addTest
+ * @access public
+ * @function addTest
+ * @param {string|object} feature - The string name of the feature detect, or an
+ * object of feature detect names and test
+ * @param {function|boolean} test - Function returning true if feature is supported,
+ * false if not. Otherwise a boolean representing the results of a feature detection
+ * @example
+ *
+ * The most common way of creating your own feature detects is by calling
+ * `Modernizr.addTest` with a string (preferably just lowercase, without any
+ * punctuation), and a function you want executed that will return a boolean result
+ *
+ * ```js
+ * Modernizr.addTest('itsTuesday', function() {
+ * var d = new Date();
+ * return d.getDay() === 2;
+ * });
+ * ```
+ *
+ * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday,
+ * and to `false` every other day of the week. One thing to notice is that the names of
+ * feature detect functions are always lowercased when added to the Modernizr object. That
+ * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will.
+ *
+ *
+ * Since we only look at the returned value from any feature detection function,
+ * you do not need to actually use a function. For simple detections, just passing
+ * in a statement that will return a boolean value works just fine.
+ *
+ * ```js
+ * Modernizr.addTest('hasJquery', 'jQuery' in window);
+ * ```
+ *
+ * Just like before, when the above runs `Modernizr.hasjquery` will be true if
+ * jQuery has been included on the page. Not using a function saves a small amount
+ * of overhead for the browser, as well as making your code much more readable.
+ *
+ * Finally, you also have the ability to pass in an object of feature names and
+ * their tests. This is handy if you want to add multiple detections in one go.
+ * The keys should always be a string, and the value can be either a boolean or
+ * function that returns a boolean.
+ *
+ * ```js
+ * var detects = {
+ * 'hasjquery': 'jQuery' in window,
+ * 'itstuesday': function() {
+ * var d = new Date();
+ * return d.getDay() === 2;
+ * }
+ * }
+ *
+ * Modernizr.addTest(detects);
+ * ```
+ *
+ * There is really no difference between the first methods and this one, it is
+ * just a convenience to let you write more readable code.
+ */
+
+ function addTest(feature, test) {
+
+ if (typeof feature == 'object') {
+ for (var key in feature) {
+ if (hasOwnProp(feature, key)) {
+ addTest(key, feature[ key ]);
+ }
+ }
+ } else {
+
+ feature = feature.toLowerCase();
+ var featureNameSplit = feature.split('.');
+ var last = Modernizr[featureNameSplit[0]];
+
+ // Again, we don't check for parent test existence. Get that right, though.
+ if (featureNameSplit.length == 2) {
+ last = last[featureNameSplit[1]];
+ }
+
+ if (typeof last != 'undefined') {
+ // we're going to quit if you're trying to overwrite an existing test
+ // if we were to allow it, we'd do this:
+ // var re = new RegExp("\\b(no-)?" + feature + "\\b");
+ // docElement.className = docElement.className.replace( re, '' );
+ // but, no rly, stuff 'em.
+ return Modernizr;
+ }
+
+ test = typeof test == 'function' ? test() : test;
+
+ // Set the value (this is the magic, right here).
+ if (featureNameSplit.length == 1) {
+ Modernizr[featureNameSplit[0]] = test;
+ } else {
+ // cast to a Boolean, if not one already
+ /* jshint -W053 */
+ if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
+ Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
+ }
+
+ Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test;
+ }
+
+ // Set a single class (either `feature` or `no-feature`)
+ /* jshint -W041 */
+ setClasses([(!!test && test != false ? '' : 'no-') + featureNameSplit.join('-')]);
+ /* jshint +W041 */
+
+ // Trigger the event
+ Modernizr._trigger(feature, test);
+ }
+
+ return Modernizr; // allow chaining.
+ }
+
+ // After all the tests are run, add self to the Modernizr prototype
+ Modernizr._q.push(function() {
+ ModernizrProto.addTest = addTest;
+ });
+
+
+
+
+ /**
+ * If the browsers follow the spec, then they would expose vendor-specific style as:
+ * elem.style.WebkitBorderRadius
+ * instead of something like the following, which would be technically incorrect:
+ * elem.style.webkitBorderRadius
+
+ * Webkit ghosts their properties in lowercase but Opera & Moz do not.
+ * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
+ * erik.eae.net/archives/2008/03/10/21.48.10/
+
+ * More here: github.com/Modernizr/Modernizr/issues/issue/21
+ *
+ * @access private
+ * @returns {string} The string representing the vendor-specific style properties
+ */
+
+ var omPrefixes = 'Moz O ms Webkit';
+
+
+ var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);
+ ModernizrProto._cssomPrefixes = cssomPrefixes;
+
+
+ /**
+ * atRule returns a given CSS property at-rule (eg @keyframes), possibly in
+ * some prefixed form, or false, in the case of an unsupported rule
+ *
+ * @memberof Modernizr
+ * @name Modernizr.atRule
+ * @optionName Modernizr.atRule()
+ * @optionProp atRule
+ * @access public
+ * @function atRule
+ * @param {string} prop - String name of the @-rule to test for
+ * @returns {string|false} The string representing the (possibly prefixed)
+ * valid version of the @-rule, or `false` when it is unsupported.
+ * @example
+ * ```js
+ * var keyframes = Modernizr.atRule('@keyframes');
+ *
+ * if (keyframes) {
+ * // keyframes are supported
+ * // could be `@-webkit-keyframes` or `@keyframes`
+ * } else {
+ * // keyframes === `false`
+ * }
+ * ```
+ *
+ */
+
+ var atRule = function(prop) {
+ var length = prefixes.length;
+ var cssrule = window.CSSRule;
+ var rule;
+
+ if (typeof cssrule === 'undefined') {
+ return undefined;
+ }
+
+ if (!prop) {
+ return false;
+ }
+
+ // remove literal @ from beginning of provided property
+ prop = prop.replace(/^@/, '');
+
+ // CSSRules use underscores instead of dashes
+ rule = prop.replace(/-/g, '_').toUpperCase() + '_RULE';
+
+ if (rule in cssrule) {
+ return '@' + prop;
+ }
+
+ for (var i = 0; i < length; i++) {
+ // prefixes gives us something like -o-, and we want O_
+ var prefix = prefixes[i];
+ var thisRule = prefix.toUpperCase() + '_' + rule;
+
+ if (thisRule in cssrule) {
+ return '@-' + prefix.toLowerCase() + '-' + prop;
+ }
+ }
+
+ return false;
+ };
+
+ ModernizrProto.atRule = atRule;
+
+
+
+ /**
+ * List of JavaScript DOM values used for tests
+ *
+ * @memberof Modernizr
+ * @name Modernizr._domPrefixes
+ * @optionName Modernizr._domPrefixes
+ * @optionProp domPrefixes
+ * @access public
+ * @example
+ *
+ * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather
+ * than kebab-case properties, all properties are their Capitalized variant
+ *
+ * ```js
+ * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ];
+ * ```
+ */
+
+ var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);
+ ModernizrProto._domPrefixes = domPrefixes;
+
+
+ /**
+ * createElement is a convenience wrapper around document.createElement. Since we
+ * use createElement all over the place, this allows for (slightly) smaller code
+ * as well as abstracting away issues with creating elements in contexts other than
+ * HTML documents (e.g. SVG documents).
+ *
+ * @access private
+ * @function createElement
+ * @returns {HTMLElement|SVGElement} An HTML or SVG element
+ */
+
+ function createElement() {
+ if (typeof document.createElement !== 'function') {
+ // This is the case in IE7, where the type of createElement is "object".
+ // For this reason, we cannot call apply() as Object is not a Function.
+ return document.createElement(arguments[0]);
+ } else if (isSVG) {
+ return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);
+ } else {
+ return document.createElement.apply(document, arguments);
+ }
+ }
+
+ ;
+
+ /**
+ * Modernizr.hasEvent() detects support for a given event
+ *
+ * @memberof Modernizr
+ * @name Modernizr.hasEvent
+ * @optionName Modernizr.hasEvent()
+ * @optionProp hasEvent
+ * @access public
+ * @function hasEvent
+ * @param {string|*} eventName is the name of an event to test for (e.g. "resize")
+ * @param {Element|string} [element=HTMLDivElement] is the element|document|window|tagName to test on
+ * @returns {boolean}
+ * @example
+ * `Modernizr.hasEvent` lets you determine if the browser supports a supplied event.
+ * By default, it does this detection on a div element
+ *
+ * ```js
+ * hasEvent('blur') // true;
+ * ```
+ *
+ * However, you are able to give an object as a second argument to hasEvent to
+ * detect an event on something other than a div.
+ *
+ * ```js
+ * hasEvent('devicelight', window) // true;
+ * ```
+ *
+ */
+
+ var hasEvent = (function(undefined) {
+
+ // Detect whether event support can be detected via `in`. Test on a DOM element
+ // using the "blur" event b/c it should always exist. bit.ly/event-detection
+ var needsFallback = !('onblur' in document.documentElement);
+
+ function inner(eventName, element) {
+
+ var isSupported;
+ if (!eventName) { return false; }
+ if (!element || typeof element === 'string') {
+ element = createElement(element || 'div');
+ }
+
+ // Testing via the `in` operator is sufficient for modern browsers and IE.
+ // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and
+ // "resize", whereas `in` "catches" those.
+ eventName = 'on' + eventName;
+ isSupported = eventName in element;
+
+ // Fallback technique for old Firefox - bit.ly/event-detection
+ if (!isSupported && needsFallback) {
+ if (!element.setAttribute) {
+ // Switch to generic element if it lacks `setAttribute`.
+ // It could be the `document`, `window`, or something else.
+ element = createElement('div');
+ }
+
+ element.setAttribute(eventName, '');
+ isSupported = typeof element[eventName] === 'function';
+
+ if (element[eventName] !== undefined) {
+ // If property was created, "remove it" by setting value to `undefined`.
+ element[eventName] = undefined;
+ }
+ element.removeAttribute(eventName);
+ }
+
+ return isSupported;
+ }
+ return inner;
+ })();
+
+
+ ModernizrProto.hasEvent = hasEvent;
+
+
+/**
+ * @optionName html5printshiv
+ * @optionProp html5printshiv
+ */
+
+ // Take the html5 variable out of the html5shiv scope so we can return it.
+ var html5;
+ if (!isSVG) {
+
+ /**
+ * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+ */
+ ;(function(window, document) {
+ /*jshint evil:true */
+ /** version */
+ var version = '3.7.2';
+
+ /** Preset options */
+ var options = window.html5 || {};
+
+ /** Used to skip problem elements */
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+ /** Not all elements can be cloned in IE **/
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+ /** Detect whether the browser supports default html5 styles */
+ var supportsHtml5Styles;
+
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
+ var expando = '_html5shiv';
+
+ /** The id for the the documents expando */
+ var expanID = 0;
+
+ /** Cached data for each document */
+ var expandoData = {};
+
+ /** Detect whether the browser supports unknown elements */
+ var supportsUnknownElements;
+
+ (function() {
+ try {
+ var a = document.createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+ supportsHtml5Styles = ('hidden' in a);
+
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
+ // assign a false positive if unable to shiv
+ (document.createElement)('a');
+ var frag = document.createDocumentFragment();
+ return (
+ typeof frag.cloneNode == 'undefined' ||
+ typeof frag.createDocumentFragment == 'undefined' ||
+ typeof frag.createElement == 'undefined'
+ );
+ }());
+ } catch(e) {
+ // assign a false positive if detection fails => unable to shiv
+ supportsHtml5Styles = true;
+ supportsUnknownElements = true;
+ }
+
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a style sheet with the given CSS text and adds it to the document.
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @param {String} cssText The CSS text.
+ * @returns {StyleSheet} The style element.
+ */
+ function addStyleSheet(ownerDocument, cssText) {
+ var p = ownerDocument.createElement('p'),
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+ p.innerHTML = 'x<style>' + cssText + '</style>';
+ return parent.insertBefore(p.lastChild, parent.firstChild);
+ }
+
+ /**
+ * Returns the value of `html5.elements` as an array.
+ * @private
+ * @returns {Array} An array of shived element node names.
+ */
+ function getElements() {
+ var elements = html5.elements;
+ return typeof elements == 'string' ? elements.split(' ') : elements;
+ }
+
+ /**
+ * Extends the built-in list of html5 elements
+ * @memberOf html5
+ * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
+ * @param {Document} ownerDocument The context document.
+ */
+ function addElements(newElements, ownerDocument) {
+ var elements = html5.elements;
+ if(typeof elements != 'string'){
+ elements = elements.join(' ');
+ }
+ if(typeof newElements != 'string'){
+ newElements = newElements.join(' ');
+ }
+ html5.elements = elements +' '+ newElements;
+ shivDocument(ownerDocument);
+ }
+
+ /**
+ * Returns the data associated to the given document
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Object} An object of data.
+ */
+ function getExpandoData(ownerDocument) {
+ var data = expandoData[ownerDocument[expando]];
+ if (!data) {
+ data = {};
+ expanID++;
+ ownerDocument[expando] = expanID;
+ expandoData[expanID] = data;
+ }
+ return data;
+ }
+
+ /**
+ * returns a shived element for the given nodeName and document
+ * @memberOf html5
+ * @param {String} nodeName name of the element
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived element.
+ */
+ function createElement(nodeName, ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createElement(nodeName);
+ }
+ if (!data) {
+ data = getExpandoData(ownerDocument);
+ }
+ var node;
+
+ if (data.cache[nodeName]) {
+ node = data.cache[nodeName].cloneNode();
+ } else if (saveClones.test(nodeName)) {
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+ } else {
+ node = data.createElem(nodeName);
+ }
+
+ // Avoid adding some elements to fragments in IE < 9 because
+ // * Attributes like `name` or `type` cannot be set/changed once an element
+ // is inserted into a document/fragment
+ // * Link elements with `src` attributes that are inaccessible, as with
+ // a 403 response, will cause the tab/window to crash
+ // * Script elements appended to fragments will execute when their `src`
+ // or `text` property is set
+ return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
+ }
+
+ /**
+ * returns a shived DocumentFragment for the given document
+ * @memberOf html5
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived DocumentFragment.
+ */
+ function createDocumentFragment(ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createDocumentFragment();
+ }
+ data = data || getExpandoData(ownerDocument);
+ var clone = data.frag.cloneNode(),
+ i = 0,
+ elems = getElements(),
+ l = elems.length;
+ for(;i<l;i++){
+ clone.createElement(elems[i]);
+ }
+ return clone;
+ }
+
+ /**
+ * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+ * @private
+ * @param {Document|DocumentFragment} ownerDocument The document.
+ * @param {Object} data of the document.
+ */
+ function shivMethods(ownerDocument, data) {
+ if (!data.cache) {
+ data.cache = {};
+ data.createElem = ownerDocument.createElement;
+ data.createFrag = ownerDocument.createDocumentFragment;
+ data.frag = data.createFrag();
+ }
+
+
+ ownerDocument.createElement = function(nodeName) {
+ //abort shiv
+ if (!html5.shivMethods) {
+ return data.createElem(nodeName);
+ }
+ return createElement(nodeName, ownerDocument, data);
+ };
+
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+ 'var n=f.cloneNode(),c=n.createElement;' +
+ 'h.shivMethods&&(' +
+ // unroll the `createElement` calls
+ getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
+ data.createElem(nodeName);
+ data.frag.createElement(nodeName);
+ return 'c("' + nodeName + '")';
+ }) +
+ ');return n}'
+ )(html5, data.frag);
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivDocument(ownerDocument) {
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ var data = getExpandoData(ownerDocument);
+
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+ data.hasCSS = !!addStyleSheet(ownerDocument,
+ // corrects block display not defined in IE6/7/8/9
+ 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
+ // adds styling not present in IE6/7/8/9
+ 'mark{background:#FF0;color:#000}' +
+ // hides non-rendered elements
+ 'template{display:none}'
+ );
+ }
+ if (!supportsUnknownElements) {
+ shivMethods(ownerDocument, data);
+ }
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * The `html5` object is exposed so that more elements can be shived and
+ * existing shiving can be detected on iframes.
+ * @type Object
+ * @example
+ *
+ * // options can be changed before the script is included
+ * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+ */
+ var html5 = {
+
+ /**
+ * An array or space separated string of node names of the elements to shiv.
+ * @memberOf html5
+ * @type Array|String
+ */
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
+
+ /**
+ * current version of html5shiv
+ */
+ 'version': version,
+
+ /**
+ * A flag to indicate that the HTML5 style sheet should be inserted.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivCSS': (options.shivCSS !== false),
+
+ /**
+ * Is equal to true if a browser supports creating unknown/HTML5 elements
+ * @memberOf html5
+ * @type boolean
+ */
+ 'supportsUnknownElements': supportsUnknownElements,
+
+ /**
+ * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+ * methods should be overwritten.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivMethods': (options.shivMethods !== false),
+
+ /**
+ * A string to describe the type of `html5` object ("default" or "default print").
+ * @memberOf html5
+ * @type String
+ */
+ 'type': 'default',
+
+ // shivs the document according to the specified `html5` object options
+ 'shivDocument': shivDocument,
+
+ //creates a shived element
+ createElement: createElement,
+
+ //creates a shived documentFragment
+ createDocumentFragment: createDocumentFragment,
+
+ //extends list of elements
+ addElements: addElements
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose html5
+ window.html5 = html5;
+
+ // shiv the document
+ shivDocument(document);
+
+ /*------------------------------- Print Shiv -------------------------------*/
+
+ /** Used to filter media types */
+ var reMedia = /^$|\b(?:all|print)\b/;
+
+ /** Used to namespace printable elements */
+ var shivNamespace = 'html5shiv';
+
+ /** Detect whether the browser supports shivable style sheets */
+ var supportsShivableSheets = !supportsUnknownElements && (function() {
+ // assign a false negative if unable to shiv
+ var docEl = document.documentElement;
+ return !(
+ typeof document.namespaces == 'undefined' ||
+ typeof document.parentWindow == 'undefined' ||
+ typeof docEl.applyElement == 'undefined' ||
+ typeof docEl.removeNode == 'undefined' ||
+ typeof window.attachEvent == 'undefined'
+ );
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Wraps all HTML5 elements in the given document with printable elements.
+ * (eg. the "header" element is wrapped with the "html5shiv:header" element)
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Array} An array wrappers added.
+ */
+ function addWrappers(ownerDocument) {
+ var node,
+ nodes = ownerDocument.getElementsByTagName('*'),
+ index = nodes.length,
+ reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'),
+ result = [];
+
+ while (index--) {
+ node = nodes[index];
+ if (reElements.test(node.nodeName)) {
+ result.push(node.applyElement(createWrapper(node)));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a printable wrapper for the given element.
+ * @private
+ * @param {Element} element The element.
+ * @returns {Element} The wrapper.
+ */
+ function createWrapper(element) {
+ var node,
+ nodes = element.attributes,
+ index = nodes.length,
+ wrapper = element.ownerDocument.createElement(shivNamespace + ':' + element.nodeName);
+
+ // copy element attributes to the wrapper
+ while (index--) {
+ node = nodes[index];
+ node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue);
+ }
+ // copy element styles to the wrapper
+ wrapper.style.cssText = element.style.cssText;
+ return wrapper;
+ }
+
+ /**
+ * Shivs the given CSS text.
+ * (eg. header{} becomes html5shiv\:header{})
+ * @private
+ * @param {String} cssText The CSS text to shiv.
+ * @returns {String} The shived CSS text.
+ */
+ function shivCssText(cssText) {
+ var pair,
+ parts = cssText.split('{'),
+ index = parts.length,
+ reElements = RegExp('(^|[\\s,>+~])(' + getElements().join('|') + ')(?=[[\\s,>+~#.:]|$)', 'gi'),
+ replacement = '$1' + shivNamespace + '\\:$2';
+
+ while (index--) {
+ pair = parts[index] = parts[index].split('}');
+ pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement);
+ parts[index] = pair.join('}');
+ }
+ return parts.join('{');
+ }
+
+ /**
+ * Removes the given wrappers, leaving the original elements.
+ * @private
+ * @params {Array} wrappers An array of printable wrappers.
+ */
+ function removeWrappers(wrappers) {
+ var index = wrappers.length;
+ while (index--) {
+ wrappers[index].removeNode();
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document for print.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivPrint(ownerDocument) {
+ var shivedSheet,
+ wrappers,
+ data = getExpandoData(ownerDocument),
+ namespaces = ownerDocument.namespaces,
+ ownerWindow = ownerDocument.parentWindow;
+
+ if (!supportsShivableSheets || ownerDocument.printShived) {
+ return ownerDocument;
+ }
+ if (typeof namespaces[shivNamespace] == 'undefined') {
+ namespaces.add(shivNamespace);
+ }
+
+ function removeSheet() {
+ clearTimeout(data._removeSheetTimer);
+ if (shivedSheet) {
+ shivedSheet.removeNode(true);
+ }
+ shivedSheet= null;
+ }
+
+ ownerWindow.attachEvent('onbeforeprint', function() {
+
+ removeSheet();
+
+ var imports,
+ length,
+ sheet,
+ collection = ownerDocument.styleSheets,
+ cssText = [],
+ index = collection.length,
+ sheets = Array(index);
+
+ // convert styleSheets collection to an array
+ while (index--) {
+ sheets[index] = collection[index];
+ }
+ // concat all style sheet CSS text
+ while ((sheet = sheets.pop())) {
+ // IE does not enforce a same origin policy for external style sheets...
+ // but has trouble with some dynamically created stylesheets
+ if (!sheet.disabled && reMedia.test(sheet.media)) {
+
+ try {
+ imports = sheet.imports;
+ length = imports.length;
+ } catch(er){
+ length = 0;
+ }
+
+ for (index = 0; index < length; index++) {
+ sheets.push(imports[index]);
+ }
+
+ try {
+ cssText.push(sheet.cssText);
+ } catch(er){}
+ }
+ }
+
+ // wrap all HTML5 elements with printable elements and add the shived style sheet
+ cssText = shivCssText(cssText.reverse().join(''));
+ wrappers = addWrappers(ownerDocument);
+ shivedSheet = addStyleSheet(ownerDocument, cssText);
+
+ });
+
+ ownerWindow.attachEvent('onafterprint', function() {
+ // remove wrappers, leaving the original elements, and remove the shived style sheet
+ removeWrappers(wrappers);
+ clearTimeout(data._removeSheetTimer);
+ data._removeSheetTimer = setTimeout(removeSheet, 500);
+ });
+
+ ownerDocument.printShived = true;
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose API
+ html5.type += ' print';
+ html5.shivPrint = shivPrint;
+
+ // shiv for print
+ shivPrint(document);
+
+ }(this, document));
+ }
+
+ ;
+
+ /**
+ * Previously, Modernizr.load was an alias for yepnope. Since yepnope was
+ * deprecated, we removed it as well. It is not available on the website builder,
+ * this is only included as an improved warning to those who build a custom
+ * version locally.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.load
+ * @access private
+ * @function load
+ *
+ */
+
+ var err = function() {};
+ var warn = function() {};
+
+ if (window.console) {
+ err = function() {
+ var method = console.error ? 'error' : 'log';
+ window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
+ };
+
+ warn = function() {
+ var method = console.warn ? 'warn' : 'log';
+ window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
+ };
+ }
+
+ ModernizrProto.load = function() {
+ if ('yepnope' in window) {
+ warn('yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.\n See http://github.com/Modernizr/Modernizr/issues/1182 for more information.');
+ window.yepnope.apply(window, [].slice.call(arguments, 0));
+ } else {
+ err('yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com. See http://github.com/Modernizr/Modernizr/issues/1182 for more information.');
+ }
+ };
+
+
+
+ /**
+ * getBody returns the body of a document, or an element that can stand in for
+ * the body if a real body does not exist
+ *
+ * @access private
+ * @function getBody
+ * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an
+ * artificially created element that stands in for the body
+ */
+
+ function getBody() {
+ // After page load injecting a fake body doesn't work so check if body exists
+ var body = document.body;
+
+ if (!body) {
+ // Can't use the real body create a fake one.
+ body = createElement(isSVG ? 'svg' : 'body');
+ body.fake = true;
+ }
+
+ return body;
+ }
+
+ ;
+
+ /**
+ * injectElementWithStyles injects an element with style element and some CSS rules
+ *
+ * @access private
+ * @function injectElementWithStyles
+ * @param {string} rule - String representing a css rule
+ * @param {function} callback - A function that is used to test the injected element
+ * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
+ * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
+ * @returns {boolean}
+ */
+
+ function injectElementWithStyles(rule, callback, nodes, testnames) {
+ var mod = 'modernizr';
+ var style;
+ var ret;
+ var node;
+ var docOverflow;
+ var div = createElement('div');
+ var body = getBody();
+
+ if (parseInt(nodes, 10)) {
+ // In order not to give false positives we create a node for each test
+ // This also allows the method to scale for unspecified uses
+ while (nodes--) {
+ node = createElement('div');
+ node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
+ div.appendChild(node);
+ }
+ }
+
+ style = createElement('style');
+ style.type = 'text/css';
+ style.id = 's' + mod;
+
+ // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
+ // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
+ (!body.fake ? div : body).appendChild(style);
+ body.appendChild(div);
+
+ if (style.styleSheet) {
+ style.styleSheet.cssText = rule;
+ } else {
+ style.appendChild(document.createTextNode(rule));
+ }
+ div.id = mod;
+
+ if (body.fake) {
+ //avoid crashing IE8, if background image is used
+ body.style.background = '';
+ //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
+ body.style.overflow = 'hidden';
+ docOverflow = docElement.style.overflow;
+ docElement.style.overflow = 'hidden';
+ docElement.appendChild(body);
+ }
+
+ ret = callback(div, rule);
+ // If this is done after page load we don't want to remove the body so check if body exists
+ if (body.fake) {
+ body.parentNode.removeChild(body);
+ docElement.style.overflow = docOverflow;
+ // Trigger layout so kinetic scrolling isn't disabled in iOS6+
+ docElement.offsetHeight;
+ } else {
+ div.parentNode.removeChild(div);
+ }
+
+ return !!ret;
+
+ }
+
+ ;
+
+ /**
+ * Modernizr.mq tests a given media query, live against the current state of the window
+ * adapted from matchMedia polyfill by Scott Jehl and Paul Irish
+ * gist.github.com/786768
+ *
+ * @memberof Modernizr
+ * @name Modernizr.mq
+ * @optionName Modernizr.mq()
+ * @optionProp mq
+ * @access public
+ * @function mq
+ * @param {string} mq - String of the media query we want to test
+ * @returns {boolean}
+ * @example
+ * Modernizr.mq allows for you to programmatically check if the current browser
+ * window state matches a media query.
+ *
+ * ```js
+ * var query = Modernizr.mq('(min-width: 900px)');
+ *
+ * if (query) {
+ * // the browser window is larger than 900px
+ * }
+ * ```
+ *
+ * Only valid media queries are supported, therefore you must always include values
+ * with your media query
+ *
+ * ```js
+ * // good
+ * Modernizr.mq('(min-width: 900px)');
+ *
+ * // bad
+ * Modernizr.mq('min-width');
+ * ```
+ *
+ * If you would just like to test that media queries are supported in general, use
+ *
+ * ```js
+ * Modernizr.mq('only all'); // true if MQ are supported, false if not
+ * ```
+ *
+ *
+ * Note that if the browser does not support media queries (e.g. old IE) mq will
+ * always return false.
+ */
+
+ var mq = (function() {
+ var matchMedia = window.matchMedia || window.msMatchMedia;
+ if (matchMedia) {
+ return function(mq) {
+ var mql = matchMedia(mq);
+ return mql && mql.matches || false;
+ };
+ }
+
+ return function(mq) {
+ var bool = false;
+
+ injectElementWithStyles('@media ' + mq + ' { #modernizr { position: absolute; } }', function(node) {
+ bool = (window.getComputedStyle ?
+ window.getComputedStyle(node, null) :
+ node.currentStyle)['position'] == 'absolute';
+ });
+
+ return bool;
+ };
+ })();
+
+
+ ModernizrProto.mq = mq;
+
+
+
+
+ /**
+ * contains checks to see if a string contains another string
+ *
+ * @access private
+ * @function contains
+ * @param {string} str - The string we want to check for substrings
+ * @param {string} substr - The substring we want to search the first string for
+ * @returns {boolean}
+ */
+
+ function contains(str, substr) {
+ return !!~('' + str).indexOf(substr);
+ }
+
+ ;
+
+ /**
+ * Create our "modernizr" element that we do most feature tests on.
+ *
+ * @access private
+ */
+
+ var modElem = {
+ elem : createElement('modernizr')
+ };
+
+ // Clean up this element
+ Modernizr._q.push(function() {
+ delete modElem.elem;
+ });
+
+
+
+ var mStyle = {
+ style : modElem.elem.style
+ };
+
+ // kill ref for gc, must happen before mod.elem is removed, so we unshift on to
+ // the front of the queue.
+ Modernizr._q.unshift(function() {
+ delete mStyle.style;
+ });
+
+
+
+ /**
+ * domToCSS takes a camelCase string and converts it to kebab-case
+ * e.g. boxSizing -> box-sizing
+ *
+ * @access private
+ * @function domToCSS
+ * @param {string} name - String name of camelCase prop we want to convert
+ * @returns {string} The kebab-case version of the supplied name
+ */
+
+ function domToCSS(name) {
+ return name.replace(/([A-Z])/g, function(str, m1) {
+ return '-' + m1.toLowerCase();
+ }).replace(/^ms-/, '-ms-');
+ }
+ ;
+
+ /**
+ * nativeTestProps allows for us to use native feature detection functionality if available.
+ * some prefixed form, or false, in the case of an unsupported rule
+ *
+ * @access private
+ * @function nativeTestProps
+ * @param {array} props - An array of property names
+ * @param {string} value - A string representing the value we want to check via @supports
+ * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise
+ */
+
+ // Accepts a list of property names and a single value
+ // Returns `undefined` if native detection not available
+ function nativeTestProps (props, value) {
+ var i = props.length;
+ // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface
+ if ('CSS' in window && 'supports' in window.CSS) {
+ // Try every prefixed variant of the property
+ while (i--) {
+ if (window.CSS.supports(domToCSS(props[i]), value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ // Otherwise fall back to at-rule (for Opera 12.x)
+ else if ('CSSSupportsRule' in window) {
+ // Build a condition string for every prefixed variant
+ var conditionText = [];
+ while (i--) {
+ conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');
+ }
+ conditionText = conditionText.join(' or ');
+ return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {
+ return getComputedStyle(node, null).position == 'absolute';
+ });
+ }
+ return undefined;
+ }
+ ;
+
+ /**
+ * cssToDOM takes a kebab-case string and converts it to camelCase
+ * e.g. box-sizing -> boxSizing
+ *
+ * @access private
+ * @function cssToDOM
+ * @param {string} name - String name of kebab-case prop we want to convert
+ * @returns {string} The camelCase version of the supplied name
+ */
+
+ function cssToDOM(name) {
+ return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
+ return m1 + m2.toUpperCase();
+ }).replace(/^-/, '');
+ }
+ ;
+
+ // testProps is a generic CSS / DOM property test.
+
+ // In testing support for a given CSS property, it's legit to test:
+ // `elem.style[styleName] !== undefined`
+ // If the property is supported it will return an empty string,
+ // if unsupported it will return undefined.
+
+ // We'll take advantage of this quick test and skip setting a style
+ // on our modernizr element, but instead just testing undefined vs
+ // empty string.
+
+ // Property names can be provided in either camelCase or kebab-case.
+
+ function testProps(props, prefixed, value, skipValueTest) {
+ skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;
+
+ // Try native detect first
+ if (!is(value, 'undefined')) {
+ var result = nativeTestProps(props, value);
+ if (!is(result, 'undefined')) {
+ return result;
+ }
+ }
+
+ // Otherwise do it properly
+ var afterInit, i, propsLength, prop, before;
+
+ // If we don't have a style element, that means we're running async or after
+ // the core tests, so we'll need to create our own elements to use
+
+ // inside of an SVG element, in certain browsers, the `style` element is only
+ // defined for valid tags. Therefore, if `modernizr` does not have one, we
+ // fall back to a less used element and hope for the best.
+ var elems = ['modernizr', 'tspan'];
+ while (!mStyle.style) {
+ afterInit = true;
+ mStyle.modElem = createElement(elems.shift());
+ mStyle.style = mStyle.modElem.style;
+ }
+
+ // Delete the objects if we created them.
+ function cleanElems() {
+ if (afterInit) {
+ delete mStyle.style;
+ delete mStyle.modElem;
+ }
+ }
+
+ propsLength = props.length;
+ for (i = 0; i < propsLength; i++) {
+ prop = props[i];
+ before = mStyle.style[prop];
+
+ if (contains(prop, '-')) {
+ prop = cssToDOM(prop);
+ }
+
+ if (mStyle.style[prop] !== undefined) {
+
+ // If value to test has been passed in, do a set-and-check test.
+ // 0 (integer) is a valid property value, so check that `value` isn't
+ // undefined, rather than just checking it's truthy.
+ if (!skipValueTest && !is(value, 'undefined')) {
+
+ // Needs a try catch block because of old IE. This is slow, but will
+ // be avoided in most cases because `skipValueTest` will be used.
+ try {
+ mStyle.style[prop] = value;
+ } catch (e) {}
+
+ // If the property value has changed, we assume the value used is
+ // supported. If `value` is empty string, it'll fail here (because
+ // it hasn't changed), which matches how browsers have implemented
+ // CSS.supports()
+ if (mStyle.style[prop] != before) {
+ cleanElems();
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ // Otherwise just return true, or the property name if this is a
+ // `prefixed()` call
+ else {
+ cleanElems();
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ }
+ cleanElems();
+ return false;
+ }
+
+ ;
+
+ /**
+ * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.
+ *
+ * @access private
+ * @function fnBind
+ * @param {function} fn - a function you want to change `this` reference to
+ * @param {object} that - the `this` you want to call the function with
+ * @returns {function} The wrapped version of the supplied function
+ */
+
+ function fnBind(fn, that) {
+ return function() {
+ return fn.apply(that, arguments);
+ };
+ }
+
+ ;
+
+ /**
+ * testDOMProps is a generic DOM property test; if a browser supports
+ * a certain property, it won't return undefined for it.
+ */
+ function testDOMProps(props, obj, elem) {
+ var item;
+
+ for (var i in props) {
+ if (props[i] in obj) {
+
+ // return the property name as a string
+ if (elem === false) {
+ return props[i];
+ }
+
+ item = obj[props[i]];
+
+ // let's bind a function
+ if (is(item, 'function')) {
+ // bind to obj unless overriden
+ return fnBind(item, elem || obj);
+ }
+
+ // return the unbound function or obj or value
+ return item;
+ }
+ }
+ return false;
+ }
+
+ ;
+
+ /**
+ * testPropsAll tests a list of DOM properties we want to check against.
+ * We specify literally ALL possible (known and/or likely) properties on
+ * the element including the non-vendor prefixed one, for forward-
+ * compatibility.
+ */
+ function testPropsAll(prop, prefixed, elem, value, skipValueTest) {
+
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
+ props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
+
+ // did they call .prefixed('boxSizing') or are we just testing a prop?
+ if (is(prefixed, 'string') || is(prefixed, 'undefined')) {
+ return testProps(props, prefixed, value, skipValueTest);
+
+ // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
+ } else {
+ props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
+ return testDOMProps(props, prefixed, elem);
+ }
+ }
+
+ // Modernizr.testAllProps() investigates whether a given style property,
+ // or any of its vendor-prefixed variants, is recognized
+ //
+ // Note that the property names must be provided in the camelCase variant.
+ // Modernizr.testAllProps('boxSizing')
+ ModernizrProto.testAllProps = testPropsAll;
+
+
+
+ /**
+ * prefixed returns the prefixed or nonprefixed property name variant of your input
+ *
+ * @memberof Modernizr
+ * @name Modernizr.prefixed
+ * @optionName Modernizr.prefixed()
+ * @optionProp prefixed
+ * @access public
+ * @function prefixed
+ * @param {string} prop - String name of the property to test for
+ * @param {object} [obj]- An object to test for the prefixed properties on
+ * @returns {string|false} The string representing the (possibly prefixed) valid
+ * version of the property, or `false` when it is unsupported.
+ * @example
+ *
+ * Modernizr.prefixed takes a string css value in the DOM style camelCase (as
+ * opposed to the css style kebab-case) form and returns the (possibly prefixed)
+ * version of that property that the browser actually supports.
+ *
+ * For example, in older Firefox...
+ * ```js
+ * prefixed('boxSizing')
+ * ```
+ * returns 'MozBoxSizing'
+ *
+ * In newer Firefox, as well as any other browser that support the unprefixed
+ * version would simply return `boxSizing`. Any browser that does not support
+ * the property at all, it will return `false`.
+ *
+ * By default, prefixed is checked against a DOM element. If you want to check
+ * for a property on another object, just pass it as a second argument
+ *
+ * ```js
+ * var rAF = prefixed('requestAnimationFrame', window);
+ *
+ * raf(function() {
+ * renderFunction();
+ * })
+ * ```
+ *
+ * Note that this will return _the actual function_ - not the name of the function.
+ * If you need the actual name of the property, pass in `false` as a third argument
+ *
+ * ```js
+ * var rAFProp = prefixed('requestAnimationFrame', window, false);
+ *
+ * rafProp === 'WebkitRequestAnimationFrame' // in older webkit
+ * ```
+ *
+ * One common use case for prefixed is if you're trying to determine which transition
+ * end event to bind to, you might do something like...
+ * ```js
+ * var transEndEventNames = {
+ * 'WebkitTransition' : 'webkitTransitionEnd', * Saf 6, Android Browser
+ * 'MozTransition' : 'transitionend', * only for FF < 15
+ * 'transition' : 'transitionend' * IE10, Opera, Chrome, FF 15+, Saf 7+
+ * };
+ *
+ * var transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
+ * ```
+ *
+ * If you want a similar lookup, but in kebab-case, you can use [prefixedCSS](#modernizr-prefixedcss).
+ */
+
+ var prefixed = ModernizrProto.prefixed = function(prop, obj, elem) {
+ if (prop.indexOf('@') === 0) {
+ return atRule(prop);
+ }
+
+ if (prop.indexOf('-') != -1) {
+ // Convert kebab-case to camelCase
+ prop = cssToDOM(prop);
+ }
+ if (!obj) {
+ return testPropsAll(prop, 'pfx');
+ } else {
+ // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
+ return testPropsAll(prop, obj, elem);
+ }
+ };
+
+
+
+ /**
+ * List of property values to set for css tests. See ticket #21
+ * http://git.io/vUGl4
+ *
+ * @memberof Modernizr
+ * @name Modernizr._prefixes
+ * @optionName Modernizr._prefixes
+ * @optionProp prefixes
+ * @access public
+ * @example
+ *
+ * Modernizr._prefixes is the internal list of prefixes that we test against
+ * inside of things like [prefixed](#modernizr-prefixed) and [prefixedCSS](#-code-modernizr-prefixedcss). It is simply
+ * an array of kebab-case vendor prefixes you can use within your code.
+ *
+ * Some common use cases include
+ *
+ * Generating all possible prefixed version of a CSS property
+ * ```js
+ * var rule = Modernizr._prefixes.join('transform: rotate(20deg); ');
+ *
+ * rule === 'transform: rotate(20deg); webkit-transform: rotate(20deg); moz-transform: rotate(20deg); o-transform: rotate(20deg); ms-transform: rotate(20deg);'
+ * ```
+ *
+ * Generating all possible prefixed version of a CSS value
+ * ```js
+ * rule = 'display:' + Modernizr._prefixes.join('flex; display:') + 'flex';
+ *
+ * rule === 'display:flex; display:-webkit-flex; display:-moz-flex; display:-o-flex; display:-ms-flex; display:flex'
+ * ```
+ */
+
+ var prefixes = (ModernizrProto._config.usePrefixes ? ' -webkit- -moz- -o- -ms- '.split(' ') : []);
+
+ // expose these for the plugin API. Look in the source for how to join() them against your input
+ ModernizrProto._prefixes = prefixes;
+
+
+
+ /**
+ * prefixedCSS is just like [prefixed](#modernizr-prefixed), but the returned values are in
+ * kebab-case (e.g. `box-sizing`) rather than camelCase (boxSizing).
+ *
+ * @memberof Modernizr
+ * @name Modernizr.prefixedCSS
+ * @optionName Modernizr.prefixedCSS()
+ * @optionProp prefixedCSS
+ * @access public
+ * @function prefixedCSS
+ * @param {string} prop - String name of the property to test for
+ * @returns {string|false} The string representing the (possibly prefixed)
+ * valid version of the property, or `false` when it is unsupported.
+ * @example
+ *
+ * `Modernizr.prefixedCSS` is like `Modernizr.prefixed`, but returns the result
+ * in hyphenated form
+ *
+ * ```js
+ * Modernizr.prefixedCSS('transition') // '-moz-transition' in old Firefox
+ * ```
+ *
+ * Since it is only useful for CSS style properties, it can only be tested against
+ * an HTMLElement.
+ *
+ * Properties can be passed as both the DOM style camelCase or CSS style kebab-case.
+ */
+
+ var prefixedCSS = ModernizrProto.prefixedCSS = function(prop) {
+ var prefixedProp = prefixed(prop);
+ return prefixedProp && domToCSS(prefixedProp);
+ };
+
+
+ /**
+ * testAllProps determines whether a given CSS property is supported in the browser
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testAllProps
+ * @optionName Modernizr.testAllProps()
+ * @optionProp testAllProps
+ * @access public
+ * @function testAllProps
+ * @param {string} prop - String naming the property to test (either camelCase or kebab-case)
+ * @param {string} [value] - String of the value to test
+ * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection
+ * @example
+ *
+ * testAllProps determines whether a given CSS property, in some prefixed form,
+ * is supported by the browser.
+ *
+ * ```js
+ * testAllProps('boxSizing') // true
+ * ```
+ *
+ * It can optionally be given a CSS value in string form to test if a property
+ * value is valid
+ *
+ * ```js
+ * testAllProps('display', 'block') // true
+ * testAllProps('display', 'penguin') // false
+ * ```
+ *
+ * A boolean can be passed as a third parameter to skip the value check when
+ * native detection (@supports) isn't available.
+ *
+ * ```js
+ * testAllProps('shapeOutside', 'content-box', true);
+ * ```
+ */
+
+ function testAllProps (prop, value, skipValueTest) {
+ return testPropsAll(prop, undefined, undefined, value, skipValueTest);
+ }
+ ModernizrProto.testAllProps = testAllProps;
+
+
+ /**
+ * testProp() investigates whether a given style property is recognized
+ * Property names can be provided in either camelCase or kebab-case.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testProp
+ * @access public
+ * @optionName Modernizr.testProp()
+ * @optionProp testProp
+ * @function testProp
+ * @param {string} prop - Name of the CSS property to check
+ * @param {string} [value] - Name of the CSS value to check
+ * @param {boolean} [useValue] - Whether or not to check the value if @supports isn't supported
+ * @returns {boolean}
+ * @example
+ *
+ * Just like [testAllProps](#modernizr-testallprops), only it does not check any vendor prefixed
+ * version of the string.
+ *
+ * Note that the property name must be provided in camelCase (e.g. boxSizing not box-sizing)
+ *
+ * ```js
+ * Modernizr.testProp('pointerEvents') // true
+ * ```
+ *
+ * You can also provide a value as an optional second argument to check if a
+ * specific value is supported
+ *
+ * ```js
+ * Modernizr.testProp('pointerEvents', 'none') // true
+ * Modernizr.testProp('pointerEvents', 'penguin') // false
+ * ```
+ */
+
+ var testProp = ModernizrProto.testProp = function(prop, value, useValue) {
+ return testProps([prop], undefined, value, useValue);
+ };
+
+
+ /**
+ * testStyles injects an element with style element and some CSS rules
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testStyles
+ * @optionName Modernizr.testStyles()
+ * @optionProp testStyles
+ * @access public
+ * @function testStyles
+ * @param {string} rule - String representing a css rule
+ * @param {function} callback - A function that is used to test the injected element
+ * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
+ * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
+ * @returns {boolean}
+ * @example
+ *
+ * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page
+ * along with (possibly multiple) DOM elements. This lets you check for features
+ * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).
+ *
+ * ```js
+ * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {
+ * // elem is the first DOM node in the page (by default #modernizr)
+ * // rule is the first argument you supplied - the CSS rule in string form
+ *
+ * addTest('widthworks', elem.style.width === '9px')
+ * });
+ * ```
+ *
+ * If your test requires multiple nodes, you can include a third argument
+ * indicating how many additional div elements to include on the page. The
+ * additional nodes are injected as children of the `elem` that is returned as
+ * the first argument to the callback.
+ *
+ * ```js
+ * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {
+ * document.getElementById('modernizr').style.width === '1px'; // true
+ * document.getElementById('modernizr2').style.width === '2px'; // true
+ * elem.firstChild === document.getElementById('modernizr2'); // true
+ * }, 1);
+ * ```
+ *
+ * By default, all of the additional elements have an ID of `modernizr[n]`, where
+ * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,
+ * the second additional is `#modernizr3`, etc.).
+ * If you want to have more meaningful IDs for your function, you can provide
+ * them as the fourth argument, as an array of strings
+ *
+ * ```js
+ * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {
+ * elem.firstChild === document.getElementById('foo'); // true
+ * elem.lastChild === document.getElementById('bar'); // true
+ * }, 2, ['foo', 'bar']);
+ * ```
+ *
+ */
+
+ var testStyles = ModernizrProto.testStyles = injectElementWithStyles;
+
+/*!
+{
+ "name": "a[download] Attribute",
+ "property": "adownload",
+ "caniuse" : "download",
+ "tags": ["media", "attribute"],
+ "builderAliases": ["a_download"],
+ "notes": [{
+ "name": "WhatWG Reference",
+ "href": "http://developers.whatwg.org/links.html#downloading-resources"
+ }]
+}
+!*/
+/* DOC
+When used on an `<a>`, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigating to it.
+*/
+
+ Modernizr.addTest('adownload', !window.externalHost && 'download' in createElement('a'));
+
+/*!
+{
+ "name": "Ambient Light Events",
+ "property": "ambientlight",
+ "notes": [{
+ "name": "W3C Ambient Light Events",
+ "href": "http://www.w3.org/TR/ambient-light/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the API that provides information about the ambient light levels, as detected by the device's light detector, in terms of lux units.
+*/
+
+ Modernizr.addTest('ambientlight', hasEvent('devicelight', window));
+
+/*!
+{
+ "name": "Application Cache",
+ "property": "applicationcache",
+ "caniuse": "offline-apps",
+ "tags": ["storage", "offline"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/docs/HTML/Using_the_application_cache"
+ }],
+ "polyfills": ["html5gears"]
+}
+!*/
+/* DOC
+Detects support for the Application Cache, for storing data to enable web-based applications run offline.
+
+The API has been [heavily criticized](http://alistapart.com/article/application-cache-is-a-douchebag) and discussions are underway to address this.
+*/
+
+ Modernizr.addTest('applicationcache', 'applicationCache' in window);
+
+/*!
+{
+ "name" : "HTML5 Audio Element",
+ "property": "audio",
+ "tags" : ["html5", "audio", "media"]
+}
+!*/
+/* DOC
+Detects the audio element
+*/
+
+ // This tests evaluates support of the audio element, as well as
+ // testing what types of content it supports.
+ //
+ // We're using the Boolean constructor here, so that we can extend the value
+ // e.g. Modernizr.audio // true
+ // Modernizr.audio.ogg // 'probably'
+ //
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+ Modernizr.addTest('audio', function() {
+ /* jshint -W053 */
+ var elem = createElement('audio');
+ var bool = false;
+
+ try {
+ if (bool = !!elem.canPlayType) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, '');
+ bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/, '');
+ bool.opus = elem.canPlayType('audio/ogg; codecs="opus"') .replace(/^no$/, '');
+
+ // Mimetypes accepted:
+ // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
+ // bit.ly/iphoneoscodecs
+ bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/, '');
+ bool.m4a = (elem.canPlayType('audio/x-m4a;') ||
+ elem.canPlayType('audio/aac;')) .replace(/^no$/, '');
+ }
+ } catch (e) { }
+
+ return bool;
+ });
+
+/*!
+{
+ "name": "Audio Loop Attribute",
+ "property": "audioloop",
+ "tags": ["audio", "media"]
+}
+!*/
+/* DOC
+Detects if an audio element can automatically restart, once it has finished
+*/
+
+ Modernizr.addTest('audioloop', 'loop' in createElement('audio'));
+
+/*!
+{
+ "name": "Audio Preload Attribute",
+ "property": "audiopreload",
+ "tags": ["audio", "media"]
+}
+!*/
+/* DOC
+Detects if audio can be downloaded in the background before it starts playing in the `<audio>` element
+*/
+
+ Modernizr.addTest('audiopreload', 'preload' in createElement('audio'));
+
+/*!
+{
+ "name": "Web Audio API",
+ "property": "webaudio",
+ "caniuse": "audio-api",
+ "polyfills": ["xaudiojs", "dynamicaudiojs", "audiolibjs"],
+ "tags": ["audio", "media"],
+ "builderAliases": ["audio_webaudio_api"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3 Specification",
+ "href": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html"
+ }]
+}
+!*/
+/* DOC
+Detects the older non standard webaudio API, (as opposed to the standards based AudioContext API)
+*/
+
+ Modernizr.addTest('webaudio', function() {
+ var prefixed = 'webkitAudioContext' in window;
+ var unprefixed = 'AudioContext' in window;
+
+ if (Modernizr._config.usePrefixes) {
+ return prefixed || unprefixed;
+ }
+ return unprefixed;
+ });
+
+/*!
+{
+ "name": "Battery API",
+ "property": "batteryapi",
+ "aliases": ["battery-api"],
+ "builderAliases": ["battery_api"],
+ "tags": ["device", "media"],
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
+ }]
+}
+!*/
+/* DOC
+Detect support for the Battery API, for accessing information about the system's battery charge level.
+*/
+
+ Modernizr.addTest('batteryapi', !!prefixed('battery', navigator), {aliases: ['battery-api']});
+
+/*!
+{
+ "name": "Low Battery Level",
+ "property": "lowbattery",
+ "tags": ["hardware", "mobile"],
+ "builderAliases": ["battery_level"],
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
+ }]
+}
+!*/
+/* DOC
+Enable a developer to remove CPU intensive CSS/JS when battery is low
+*/
+
+ Modernizr.addTest('lowbattery', function() {
+ var minLevel = 0.20;
+ var battery = prefixed('battery', navigator);
+ return !!(battery && !battery.charging && battery.level <= minLevel);
+ });
+
+/*!
+{
+ "name": "Blob constructor",
+ "property": "blobconstructor",
+ "aliases": ["blob-constructor"],
+ "builderAliases": ["blob_constructor"],
+ "caniuse": "blobbuilder",
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob"
+ }],
+ "polyfills": ["blobjs"]
+}
+!*/
+/* DOC
+Detects support for the Blob constructor, for creating file-like objects of immutable, raw data.
+*/
+
+ Modernizr.addTest('blobconstructor', function() {
+ try {
+ return !!new Blob();
+ } catch (e) {
+ return false;
+ }
+ }, {
+ aliases: ['blob-constructor']
+ });
+
+/*!
+{
+ "name": "Canvas",
+ "property": "canvas",
+ "caniuse": "canvas",
+ "tags": ["canvas", "graphics"],
+ "polyfills": ["flashcanvas", "excanvas", "slcanvas", "fxcanvas"]
+}
+!*/
+/* DOC
+Detects support for the `<canvas>` element for 2D drawing.
+*/
+
+ // On the S60 and BB Storm, getContext exists, but always returns undefined
+ // so we actually have to call getContext() to verify
+ // github.com/Modernizr/Modernizr/issues/issue/97/
+ Modernizr.addTest('canvas', function() {
+ var elem = createElement('canvas');
+ return !!(elem.getContext && elem.getContext('2d'));
+ });
+
+/*!
+{
+ "name": "canvas blending support",
+ "property": "canvasblending",
+ "tags": ["canvas"],
+ "async" : false,
+ "notes": [{
+ "name": "HTML5 Spec",
+ "href": "https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending"
+ },
+ {
+ "name": "Article",
+ "href": "http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas"
+ }]
+}
+!*/
+/* DOC
+Detects if Photoshop style blending modes are available in canvas.
+*/
+
+
+ Modernizr.addTest('canvasblending', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ var ctx = createElement('canvas').getContext('2d');
+ // firefox 3 throws an error when setting an invalid `globalCompositeOperation`
+ try {
+ ctx.globalCompositeOperation = 'screen';
+ } catch (e) {}
+
+ return ctx.globalCompositeOperation === 'screen';
+ });
+
+
+/*!
+{
+ "name": "canvas.toDataURL type support",
+ "property": ["todataurljpeg", "todataurlpng", "todataurlwebp"],
+ "tags": ["canvas"],
+ "builderAliases": ["canvas_todataurl_type"],
+ "async" : false,
+ "notes": [{
+ "name": "MDN article",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement.toDataURL"
+ }]
+}
+!*/
+
+
+ var canvas = createElement('canvas');
+
+ Modernizr.addTest('todataurljpeg', function() {
+ return !!Modernizr.canvas && canvas.toDataURL('image/jpeg').indexOf('data:image/jpeg') === 0;
+ });
+ Modernizr.addTest('todataurlpng', function() {
+ return !!Modernizr.canvas && canvas.toDataURL('image/png').indexOf('data:image/png') === 0;
+ });
+ Modernizr.addTest('todataurlwebp', function() {
+ var supports = false;
+
+ // firefox 3 throws an error when you use an "invalid" toDataUrl
+ try {
+ supports = !!Modernizr.canvas && canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0;
+ } catch (e) {}
+
+ return supports;
+ });
+
+
+/*!
+{
+ "name": "canvas winding support",
+ "property": ["canvaswinding"],
+ "tags": ["canvas"],
+ "async" : false,
+ "notes": [{
+ "name": "Article",
+ "href": "http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/"
+ }]
+}
+!*/
+/* DOC
+Determines if winding rules, which controls if a path can go clockwise or counterclockwise
+*/
+
+
+ Modernizr.addTest('canvaswinding', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ var ctx = createElement('canvas').getContext('2d');
+
+ ctx.rect(0, 0, 10, 10);
+ ctx.rect(2, 2, 6, 6);
+ return ctx.isPointInPath(5, 5, 'evenodd') === false;
+ });
+
+
+/*!
+{
+ "name": "Canvas text",
+ "property": "canvastext",
+ "caniuse": "canvas-text",
+ "tags": ["canvas", "graphics"],
+ "polyfills": ["canvastext"]
+}
+!*/
+/* DOC
+Detects support for the text APIs for `<canvas>` elements.
+*/
+
+ Modernizr.addTest('canvastext', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ return typeof createElement('canvas').getContext('2d').fillText == 'function';
+ });
+
+/*!
+{
+ "name": "Content Editable",
+ "property": "contenteditable",
+ "caniuse": "contenteditable",
+ "notes": [{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `contenteditable` attribute of elements, allowing their DOM text contents to be edited directly by the user.
+*/
+
+ Modernizr.addTest('contenteditable', function() {
+ // early bail out
+ if (!('contentEditable' in docElement)) {
+ return;
+ }
+
+ // some mobile browsers (android < 3.0, iOS < 5) claim to support
+ // contentEditable, but but don't really. This test checks to see
+ // confirms whether or not it actually supports it.
+
+ var div = createElement('div');
+ div.contentEditable = true;
+ return div.contentEditable === 'true';
+ });
+
+/*!
+{
+ "name": "Context menus",
+ "property": "contextmenu",
+ "caniuse": "menu",
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/html5/interactive-elements.html#context-menus"
+ },{
+ "name": "thewebrocks.com Demo",
+ "href": "http://thewebrocks.com/demos/context-menu/"
+ }],
+ "polyfills": ["jquery-contextmenu"]
+}
+!*/
+/* DOC
+Detects support for custom context menus.
+*/
+
+ Modernizr.addTest(
+ 'contextmenu',
+ ('contextMenu' in docElement && 'HTMLMenuItemElement' in window)
+ );
+
+/*!
+{
+ "name": "Cookies",
+ "property": "cookies",
+ "tags": ["storage"],
+ "authors": ["tauren"]
+}
+!*/
+/* DOC
+Detects whether cookie support is enabled.
+*/
+
+ // https://github.com/Modernizr/Modernizr/issues/191
+
+ Modernizr.addTest('cookies', function() {
+ // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking
+ // configurations. For example, when blocking cookies via the Advanced
+ // Privacy Settings in IE9, it always returns true. And there have been
+ // issues in the past with site-specific exceptions.
+ // Don't rely on it.
+
+ // try..catch because some in situations `document.cookie` is exposed but throws a
+ // SecurityError if you try to access it; e.g. documents created from data URIs
+ // or in sandboxed iframes (depending on flags/context)
+ try {
+ // Create cookie
+ document.cookie = 'cookietest=1';
+ var ret = document.cookie.indexOf('cookietest=') != -1;
+ // Delete cookie
+ document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
+ return ret;
+ }
+ catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Cross-Origin Resource Sharing",
+ "property": "cors",
+ "caniuse": "cors",
+ "authors": ["Theodoor van Donge"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS"
+ }],
+ "polyfills": ["pmxdr", "ppx", "flxhr"]
+}
+!*/
+/* DOC
+Detects support for Cross-Origin Resource Sharing: method of performing XMLHttpRequests across domains.
+*/
+
+ Modernizr.addTest('cors', 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest());
+
+/*!
+{
+ "name": "getRandomValues",
+ "property": "getrandomvalues",
+ "caniuse": "window.crypto.getRandomValues",
+ "tags": ["crypto"],
+ "authors": ["komachi"],
+ "notes": [{
+ "name": "W3C Editor’s Draft",
+ "href": "https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#RandomSource-method-getRandomValues"
+ }],
+ "polyfills": [
+ "polycrypt"
+ ]
+}
+!*/
+/* DOC
+Detects support for the window.crypto.getRandomValues for generate cryptographically secure random numbers
+*/
+
+ // In Safari <=5.0 `window.crypto` exists (for some reason) but is `undefined`, so we have to check
+ // it’s truthy before checking for existence of `getRandomValues`
+ var crypto = prefixed('crypto', window);
+ var supportsGetRandomValues;
+
+ // Safari 6.0 supports crypto.getRandomValues, but does not return the array,
+ // which is required by the spec, so we need to actually check.
+ if (crypto && 'getRandomValues' in crypto && 'Uint32Array' in window) {
+ var array = new Uint32Array(10);
+ var values = crypto.getRandomValues(array);
+ supportsGetRandomValues = values && is(values[0], 'number');
+ }
+
+ Modernizr.addTest('getrandomvalues', !!supportsGetRandomValues);
+
+/*!
+{
+ "name": "cssall",
+ "property": "cssall",
+ "notes": [{
+ "name": "Spec",
+ "href": "http://dev.w3.org/csswg/css-cascade/#all-shorthand"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `all` css property, which is a shorthand to reset all css properties (except direction and unicode-bidi) to their original value
+*/
+
+
+ Modernizr.addTest('cssall', 'all' in docElement.style);
+
+/*!
+{
+ "name": "CSS Animations",
+ "property": "cssanimations",
+ "caniuse": "css-animation",
+ "polyfills": ["transformie", "csssandpaper"],
+ "tags": ["css"],
+ "warnings": ["Android < 4 will pass this test, but can only animate a single property at a time"],
+ "notes": [{
+ "name" : "Article: 'Dispelling the Android CSS animation myths'",
+ "href": "http://goo.gl/OGw5Gm"
+ }]
+}
+!*/
+/* DOC
+Detects whether or not elements can be animated using CSS
+*/
+
+ Modernizr.addTest('cssanimations', testAllProps('animationName', 'a', true));
+
+/*!
+{
+ "name": "Appearance",
+ "property": "appearance",
+ "caniuse": "css-appearance",
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance"
+ },{
+ "name": "CSS-Tricks CSS Almanac: appearance",
+ "href": "http://css-tricks.com/almanac/properties/a/appearance/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `appearance` css property, which is used to make an
+element inherit the style of a standard user interface element. It can also be
+used to remove the default styles of an element, such as input and buttons.
+*/
+
+ Modernizr.addTest('appearance', testAllProps('appearance'));
+
+/*!
+{
+ "name": "CSS Background Blend Mode",
+ "property": "backgroundblendmode",
+ "caniuse": "css-backgroundblendmode",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "CSS Blend Modes could be the next big thing in Web Design",
+ "href": " https://medium.com/@bennettfeely/css-blend-modes-could-be-the-next-big-thing-in-web-design-6b51bf53743a"
+ }, {
+ "name": "Demo",
+ "href": "http://bennettfeely.com/gradients/"
+ }
+ ]
+}
+!*/
+/* DOC
+Detects the ability for the browser to composite backgrounds using blending modes similar to ones found in Photoshop or Illustrator.
+*/
+
+ Modernizr.addTest('backgroundblendmode', prefixed('backgroundBlendMode', 'text'));
+
+/*!
+{
+ "name": "CSS Background Clip Text",
+ "property": "backgroundcliptext",
+ "authors": ["ausi"],
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/image-under-text/"
+ },
+ {
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-clip"
+ },
+ {
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/199"
+ }
+ ]
+}
+!*/
+/* DOC
+Detects the ability to control specifies whether or not an element's background
+extends beyond its border in CSS
+*/
+
+ Modernizr.addTest('backgroundcliptext', function() {
+ return testAllProps('backgroundClip', 'text');
+ });
+
+/*!
+{
+ "name": "Background Position Shorthand",
+ "property": "bgpositionshorthand",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundposition_shorthand"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/CSS/background-position"
+ }, {
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/css3-background/#background-position"
+ }, {
+ "name": "Demo",
+ "href": "http://jsfiddle.net/Blink/bBXvt/"
+ }]
+}
+!*/
+/* DOC
+Detects if you can use the shorthand method to define multiple parts of an
+element's background-position simultaniously.
+
+eg `background-position: right 10px bottom 10px`
+*/
+
+ Modernizr.addTest('bgpositionshorthand', function() {
+ var elem = createElement('a');
+ var eStyle = elem.style;
+ var val = 'right 10px bottom 10px';
+ eStyle.cssText = 'background-position: ' + val + ';';
+ return (eStyle.backgroundPosition === val);
+ });
+
+/*!
+{
+ "name": "Background Position XY",
+ "property": "bgpositionxy",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundposition_xy"],
+ "authors": ["Allan Lei", "Brandom Aaron"],
+ "notes": [{
+ "name": "Demo",
+ "href": "http://jsfiddle.net/allanlei/R8AYS/"
+ }, {
+ "name": "Adapted From",
+ "href": "https://github.com/brandonaaron/jquery-cssHooks/blob/master/bgpos.js"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to control an element's background position using css
+*/
+
+ Modernizr.addTest('bgpositionxy', function() {
+ return testAllProps('backgroundPositionX', '3px', true) && testAllProps('backgroundPositionY', '5px', true);
+ });
+
+/*!
+{
+ "name": "Background Repeat",
+ "property": ["bgrepeatspace", "bgrepeatround"],
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundrepeat"],
+ "authors": ["Ryan Seddon"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-repeat"
+ }, {
+ "name": "Test Page",
+ "href": "http://jsbin.com/uzesun/"
+ }, {
+ "name": "Demo",
+ "href": "http://jsfiddle.net/ryanseddon/yMLTQ/6/"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to use round and space as properties for background-repeat
+*/
+
+ // Must value-test these
+ Modernizr.addTest('bgrepeatround', testAllProps('backgroundRepeat', 'round'));
+ Modernizr.addTest('bgrepeatspace', testAllProps('backgroundRepeat', 'space'));
+
+/*!
+{
+ "name": "Background Size",
+ "property": "backgroundsize",
+ "tags": ["css"],
+ "knownBugs": ["This will false positive in Opera Mini - http://github.com/Modernizr/Modernizr/issues/396"],
+ "notes": [{
+ "name": "Related Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/396"
+ }]
+}
+!*/
+
+ Modernizr.addTest('backgroundsize', testAllProps('backgroundSize', '100%', true));
+
+/*!
+{
+ "name": "Background Size Cover",
+ "property": "bgsizecover",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundsizecover"],
+ "notes": [{
+ "name" : "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-size"
+ }]
+}
+!*/
+
+ // Must test value, as this specifically tests the `cover` value
+ Modernizr.addTest('bgsizecover', testAllProps('backgroundSize', 'cover'));
+
+/*!
+{
+ "name": "Border Image",
+ "property": "borderimage",
+ "caniuse": "border-image",
+ "polyfills": ["css3pie"],
+ "knownBugs": ["Android < 2.0 is true, but has a broken implementation"],
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('borderimage', testAllProps('borderImage', 'url() 1', true));
+
+/*!
+{
+ "name": "Border Radius",
+ "property": "borderradius",
+ "caniuse": "border-radius",
+ "polyfills": ["css3pie"],
+ "tags": ["css"],
+ "notes": [{
+ "name": "Comprehensive Compat Chart",
+ "href": "http://muddledramblings.com/table-of-css3-border-radius-compliance"
+ }]
+}
+!*/
+
+ Modernizr.addTest('borderradius', testAllProps('borderRadius', '0px', true));
+
+/*!
+{
+ "name": "Box Shadow",
+ "property": "boxshadow",
+ "caniuse": "css-boxshadow",
+ "tags": ["css"],
+ "knownBugs": [
+ "WebOS false positives on this test.",
+ "The Kindle Silk browser false positives"
+ ]
+}
+!*/
+
+ Modernizr.addTest('boxshadow', testAllProps('boxShadow', '1px 1px', true));
+
+/*!
+{
+ "name": "Box Sizing",
+ "property": "boxsizing",
+ "caniuse": "css3-boxsizing",
+ "polyfills": ["borderboxmodel", "boxsizingpolyfill", "borderbox"],
+ "tags": ["css"],
+ "builderAliases": ["css_boxsizing"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/box-sizing"
+ },{
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/248"
+ }]
+}
+!*/
+
+ Modernizr.addTest('boxsizing', testAllProps('boxSizing', 'border-box', true) && (document.documentMode === undefined || document.documentMode > 7));
+
+/*!
+{
+ "name": "CSS Calc",
+ "property": "csscalc",
+ "caniuse": "calc",
+ "tags": ["css"],
+ "builderAliases": ["css_calc"],
+ "authors": ["@calvein"]
+}
+!*/
+/* DOC
+Method of allowing calculated values for length units. For example:
+
+```css
+//lem {
+ width: calc(100% - 3em);
+}
+```
+*/
+
+ Modernizr.addTest('csscalc', function() {
+ var prop = 'width:';
+ var value = 'calc(10px);';
+ var el = createElement('a');
+
+ el.style.cssText = prop + prefixes.join(value + prop);
+
+ return !!el.style.length;
+ });
+
+/*!
+{
+ "name": "CSS :checked pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "checked",
+ "tags": ["css"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/879"
+ }]
+}
+!*/
+
+ Modernizr.addTest('checked', function() {
+ return testStyles('#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}', function(elem) {
+ var cb = createElement('input');
+ cb.setAttribute('type', 'checkbox');
+ cb.setAttribute('checked', 'checked');
+ elem.appendChild(cb);
+ return cb.offsetLeft === 20;
+ });
+ });
+
+/*!
+{
+ "name": "CSS Font ch Units",
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "property": "csschunit",
+ "tags": ["css"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#font-relative-lengths"
+ }]
+}
+!*/
+
+ Modernizr.addTest('csschunit', function() {
+ var elemStyle = modElem.elem.style;
+ var supports;
+ try {
+ elemStyle.fontSize = '3ch';
+ supports = elemStyle.fontSize.indexOf('ch') !== -1;
+ } catch (e) {
+ supports = false;
+ }
+ return supports;
+ });
+
+/*!
+{
+ "name": "CSS Columns",
+ "property": "csscolumns",
+ "caniuse": "multicolumn",
+ "polyfills": ["css3multicolumnjs"],
+ "tags": ["css"]
+}
+!*/
+
+
+ (function() {
+
+ /* jshint -W053 */
+ Modernizr.addTest('csscolumns', function() {
+ var bool = false;
+ var test = testAllProps('columnCount');
+ try {
+ if (bool = !!test) {
+ bool = new Boolean(bool);
+ }
+ } catch (e) {}
+
+ return bool;
+ });
+
+ var props = ['Width', 'Span', 'Fill', 'Gap', 'Rule', 'RuleColor', 'RuleStyle', 'RuleWidth', 'BreakBefore', 'BreakAfter', 'BreakInside'];
+ var name, test;
+
+ for (var i = 0; i < props.length; i++) {
+ name = props[i].toLowerCase();
+ test = testAllProps('column' + props[i]);
+
+ // break-before, break-after & break-inside are not "column"-prefixed in spec
+ if (name === 'breakbefore' || name === 'breakafter' || name == 'breakinside') {
+ test = test || testAllProps(props[i]);
+ }
+
+ Modernizr.addTest('csscolumns.' + name, test);
+ }
+
+
+ })();
+
+
+/*!
+{
+ "name": "CSS Cubic Bezier Range",
+ "property": "cubicbezierrange",
+ "tags": ["css"],
+ "builderAliases": ["css_cubicbezierrange"],
+ "doc" : null,
+ "authors": ["@calvein"],
+ "warnings": ["cubic-bezier values can't be > 1 for Webkit until [bug #45761](https://bugs.webkit.org/show_bug.cgi?id=45761) is fixed"],
+ "notes": [{
+ "name": "Comprehensive Compat Chart",
+ "href": "http://muddledramblings.com/table-of-css3-border-radius-compliance"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cubicbezierrange', function() {
+ var el = createElement('a');
+ el.style.cssText = prefixes.join('transition-timing-function:cubic-bezier(1,0,0,1.1); ');
+ return !!el.style.length;
+ });
+
+/*!
+{
+ "name": "CSS Display run-in",
+ "property": "display-runin",
+ "authors": ["alanhogan"],
+ "tags": ["css"],
+ "builderAliases": ["css_displayrunin"],
+ "notes": [{
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/596-run-in/"
+ },{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/198"
+ }]
+}
+!*/
+
+ Modernizr.addTest('displayrunin', testAllProps('display', 'run-in'),
+ {aliases: ['display-runin']});
+
+/*!
+{
+ "name": "CSS Display table",
+ "property": "displaytable",
+ "caniuse": "css-table",
+ "authors": ["scottjehl"],
+ "tags": ["css"],
+ "builderAliases": ["css_displaytable"],
+ "notes": [{
+ "name": "Detects for all additional table display values",
+ "href": "http://pastebin.com/Gk9PeVaQ"
+ }]
+}
+!*/
+/* DOC
+`display: table` and `table-cell` test. (both are tested under one name `table-cell` )
+*/
+
+ // If a document is in rtl mode this test will fail so we force ltr mode on the injeced
+ // element https://github.com/Modernizr/Modernizr/issues/716
+ testStyles('#modernizr{display: table; direction: ltr}#modernizr div{display: table-cell; padding: 10px}', function(elem) {
+ var ret;
+ var child = elem.childNodes;
+ ret = child[0].offsetLeft < child[1].offsetLeft;
+ Modernizr.addTest('displaytable', ret, {aliases: ['display-table']});
+ }, 2);
+
+/*!
+{
+ "name": "CSS text-overflow ellipsis",
+ "property": "ellipsis",
+ "caniuse": "text-overflow",
+ "polyfills": [
+ "text-overflow"
+ ],
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('ellipsis', testAllProps('textOverflow', 'ellipsis'));
+
+/*!
+{
+ "name": "CSS.escape()",
+ "property": "cssescape",
+ "polyfills": [
+ "css-escape"
+ ],
+ "tags": [
+ "css",
+ "cssom"
+ ]
+}
+!*/
+/* DOC
+Tests for `CSS.escape()` support.
+*/
+
+ var CSS = window.CSS;
+ Modernizr.addTest('cssescape', CSS ? typeof CSS.escape == 'function' : false);
+
+/*!
+{
+ "name": "CSS Font ex Units",
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "property": "cssexunit",
+ "tags": ["css"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#font-relative-lengths"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cssexunit', function() {
+ var elemStyle = modElem.elem.style;
+ var supports;
+ try {
+ elemStyle.fontSize = '3ex';
+ supports = elemStyle.fontSize.indexOf('ex') !== -1;
+ } catch (e) {
+ supports = false;
+ }
+ return supports;
+ });
+
+/*!
+{
+ "name": "CSS Supports",
+ "property": "supports",
+ "caniuse": "css-featurequeries",
+ "tags": ["css"],
+ "builderAliases": ["css_supports"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://dev.w3.org/csswg/css3-conditional/#at-supports"
+ },{
+ "name": "Related Github Issue",
+ "href": "github.com/Modernizr/Modernizr/issues/648"
+ },{
+ "name": "W3 Info",
+ "href": "http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface"
+ }]
+}
+!*/
+
+ var newSyntax = 'CSS' in window && 'supports' in window.CSS;
+ var oldSyntax = 'supportsCSS' in window;
+ Modernizr.addTest('supports', newSyntax || oldSyntax);
+
+/*!
+{
+ "name": "CSS Filters",
+ "property": "cssfilters",
+ "caniuse": "css-filters",
+ "polyfills": ["polyfilter"],
+ "tags": ["css"],
+ "builderAliases": ["css_filters"],
+ "notes": [{
+ "name": "MDN article on CSS filters",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/filter"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cssfilters', function() {
+ if (Modernizr.supports) {
+ return testAllProps('filter', 'blur(2px)');
+ } else {
+ var el = createElement('a');
+ el.style.cssText = prefixes.join('filter:blur(2px); ');
+ // https://github.com/Modernizr/Modernizr/issues/615
+ // documentMode is needed for false positives in oldIE, please see issue above
+ return !!el.style.length && ((document.documentMode === undefined || document.documentMode > 9));
+ }
+ });
+
+
+/*!
+{
+ "name": "Flexbox",
+ "property": "flexbox",
+ "caniuse": "flexbox",
+ "tags": ["css"],
+ "notes": [{
+ "name": "The _new_ flexbox",
+ "href": "http://dev.w3.org/csswg/css3-flexbox"
+ }],
+ "warnings": [
+ "A `true` result for this detect does not imply that the `flex-wrap` property is supported; see the `flexwrap` detect."
+ ]
+}
+!*/
+/* DOC
+Detects support for the Flexible Box Layout model, a.k.a. Flexbox, which allows easy manipulation of layout order and sizing within a container.
+*/
+
+ Modernizr.addTest('flexbox', testAllProps('flexBasis', '1px', true));
+
+/*!
+{
+ "name": "Flexbox (legacy)",
+ "property": "flexboxlegacy",
+ "tags": ["css"],
+ "polyfills": ["flexie"],
+ "notes": [{
+ "name": "The _old_ flexbox",
+ "href": "http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('flexboxlegacy', testAllProps('boxDirection', 'reverse', true));
+
+/*!
+{
+ "name": "Flexbox (tweener)",
+ "property": "flexboxtweener",
+ "tags": ["css"],
+ "polyfills": ["flexie"],
+ "notes": [{
+ "name": "The _inbetween_ flexbox",
+ "href": "http://www.w3.org/TR/2011/WD-css3-flexbox-20111129/"
+ }],
+ "warnings": ["This represents an old syntax, not the latest standard syntax."]
+}
+!*/
+
+ Modernizr.addTest('flexboxtweener', testAllProps('flexAlign', 'end', true));
+
+/*!
+{
+ "name": "Flex Line Wrapping",
+ "property": "flexwrap",
+ "tags": ["css", "flexbox"],
+ "notes": [{
+ "name": "W3C Flexible Box Layout spec",
+ "href": "http://dev.w3.org/csswg/css3-flexbox"
+ }],
+ "warnings": [
+ "Does not imply a modern implementation – see documentation."
+ ]
+}
+!*/
+/* DOC
+Detects support for the `flex-wrap` CSS property, part of Flexbox, which isn’t present in all Flexbox implementations (notably Firefox).
+
+This featured in both the 'tweener' syntax (implemented by IE10) and the 'modern' syntax (implemented by others). This detect will return `true` for either of these implementations, as long as the `flex-wrap` property is supported. So to ensure the modern syntax is supported, use together with `Modernizr.flexbox`:
+
+```javascript
+if (Modernizr.flexbox && Modernizr.flexwrap) {
+ // Modern Flexbox with `flex-wrap` supported
+}
+else {
+ // Either old Flexbox syntax, or `flex-wrap` not supported
+}
+```
+*/
+
+ Modernizr.addTest('flexwrap', testAllProps('flexWrap', 'wrap', true));
+
+/*!
+{
+ "name": "@font-face",
+ "property": "fontface",
+ "authors": ["Diego Perini", "Mat Marquis"],
+ "tags": ["css"],
+ "knownBugs": [
+ "False Positive: WebOS http://github.com/Modernizr/Modernizr/issues/342",
+ "False Postive: WP7 http://github.com/Modernizr/Modernizr/issues/538"
+ ],
+ "notes": [{
+ "name": "@font-face detection routine by Diego Perini",
+ "href": "http://javascript.nwbox.com/CSSSupport/"
+ },{
+ "name": "Filament Group @font-face compatibility research",
+ "href": "https://docs.google.com/presentation/d/1n4NyG4uPRjAA8zn_pSQ_Ket0RhcWC6QlZ6LMjKeECo0/edit#slide=id.p"
+ },{
+ "name": "Filament Grunticon/@font-face device testing results",
+ "href": "https://docs.google.com/spreadsheet/ccc?key=0Ag5_yGvxpINRdHFYeUJPNnZMWUZKR2ItMEpRTXZPdUE#gid=0"
+ },{
+ "name": "CSS fonts on Android",
+ "href": "http://stackoverflow.com/questions/3200069/css-fonts-on-android"
+ },{
+ "name": "@font-face and Android",
+ "href": "http://archivist.incutio.com/viewlist/css-discuss/115960"
+ }]
+}
+!*/
+
+ var blacklist = (function() {
+ var ua = navigator.userAgent;
+ var wkvers = ua.match(/applewebkit\/([0-9]+)/gi) && parseFloat(RegExp.$1);
+ var webos = ua.match(/w(eb)?osbrowser/gi);
+ var wppre8 = ua.match(/windows phone/gi) && ua.match(/iemobile\/([0-9])+/gi) && parseFloat(RegExp.$1) >= 9;
+ var oldandroid = wkvers < 533 && ua.match(/android/gi);
+ return webos || oldandroid || wppre8;
+ }());
+ if (blacklist) {
+ Modernizr.addTest('fontface', false);
+ } else {
+ testStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule) {
+ var style = document.getElementById('smodernizr');
+ var sheet = style.sheet || style.styleSheet;
+ var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
+ var bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
+ Modernizr.addTest('fontface', bool);
+ });
+ }
+;
+/*!
+{
+ "name": "CSS Generated Content",
+ "property": "generatedcontent",
+ "tags": ["css"],
+ "warnings": ["Android won't return correct height for anything below 7px #738"],
+ "notes": [{
+ "name": "W3C CSS Selectors Level 3 spec",
+ "href": "http://www.w3.org/TR/css3-selectors/#gen-content"
+ },{
+ "name": "MDN article on :before",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/::before"
+ },{
+ "name": "MDN article on :after",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/::before"
+ }]
+}
+!*/
+
+ testStyles('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}', function(node) {
+ Modernizr.addTest('generatedcontent', node.offsetHeight >= 7);
+ });
+
+/*!
+{
+ "name": "CSS Gradients",
+ "caniuse": "css-gradients",
+ "property": "cssgradients",
+ "tags": ["css"],
+ "knownBugs": ["False-positives on webOS (https://github.com/Modernizr/Modernizr/issues/202)"],
+ "notes": [{
+ "name": "Webkit Gradient Syntax",
+ "href": "http://webkit.org/blog/175/introducing-css-gradients/"
+ },{
+ "name": "Mozilla Linear Gradient Syntax",
+ "href": "http://developer.mozilla.org/en/CSS/-moz-linear-gradient"
+ },{
+ "name": "Mozilla Radial Gradient Syntax",
+ "href": "http://developer.mozilla.org/en/CSS/-moz-radial-gradient"
+ },{
+ "name": "W3C Gradient Spec",
+ "href": "dev.w3.org/csswg/css3-images/#gradients-"
+ }]
+}
+!*/
+
+
+ Modernizr.addTest('cssgradients', function() {
+
+ var str1 = 'background-image:';
+ var str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));';
+ var str3 = 'linear-gradient(left top,#9f9, white);';
+
+ // standard syntax // trailing 'background-image:'
+ var css = str1 + prefixes.join(str3 + str1).slice(0, -str1.length);
+ if (Modernizr._config.usePrefixes) {
+ // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
+ css += str1 + '-webkit-' + str2;
+ }
+
+ var elem = createElement('a');
+ var style = elem.style;
+ style.cssText = css;
+
+ // IE6 returns undefined so cast to string
+ return ('' + style.backgroundImage).indexOf('gradient') > -1;
+ });
+
+/*!
+{
+ "name": "CSS HSLA Colors",
+ "caniuse": "css3-colors",
+ "property": "hsla",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('hsla', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background-color:hsla(120,40%,100%,.5)';
+ return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
+ });
+
+/*!
+{
+ "name": "CSS Hyphens",
+ "caniuse": "css-hyphens",
+ "property": ["csshyphens", "softhyphens", "softhyphensfind"],
+ "tags": ["css"],
+ "builderAliases": ["css_hyphens"],
+ "async" : true,
+ "authors": ["David Newton"],
+ "warnings": [
+ "These tests currently require document.body to be present",
+ "If loading Hyphenator.js via yepnope, be cautious of issue 158: http://code.google.com/p/hyphenator/issues/detail?id=158",
+ "This is very large – only include it if you absolutely need it"
+ ],
+ "notes": [{
+ "name": "The Current State of Hyphenation on the Web.",
+ "href": "http://davidnewton.ca/the-current-state-of-hyphenation-on-the-web"
+ },{
+ "name": "Hyphenation Test Page",
+ "href": "http://davidnewton.ca/demos/hyphenation/test.html"
+ },{
+ "name": "Hyphenation is Language Specific",
+ "href": " http://code.google.com/p/hyphenator/source/diff?spec=svn975&r=975&format=side&path=/trunk/Hyphenator.js#sc_svn975_313"
+ },{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/312"
+ }]
+}
+!*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var waitTime = 300;
+ setTimeout(runHyphenTest, waitTime);
+ // Wait 1000ms so we can hope for document.body
+ function runHyphenTest() {
+ if (!document.body && !document.getElementsByTagName('body')[0]) {
+ setTimeout(runHyphenTest, waitTime);
+ return;
+ }
+
+ // functional test of adding hyphens:auto
+ function test_hyphens_css() {
+ try {
+ /* create a div container and a span within that
+ * these have to be appended to document.body, otherwise some browsers can give false negative */
+ var div = createElement('div');
+ var span = createElement('span');
+ var divStyle = div.style;
+ var spanHeight = 0;
+ var spanWidth = 0;
+ var result = false;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ div.appendChild(span);
+ span.innerHTML = 'Bacon ipsum dolor sit amet jerky velit in culpa hamburger et. Laborum dolor proident, enim dolore duis commodo et strip steak. Salami anim et, veniam consectetur dolore qui tenderloin jowl velit sirloin. Et ad culpa, fatback cillum jowl ball tip ham hock nulla short ribs pariatur aute. Pig pancetta ham bresaola, ut boudin nostrud commodo flank esse cow tongue culpa. Pork belly bresaola enim pig, ea consectetur nisi. Fugiat officia turkey, ea cow jowl pariatur ullamco proident do laborum velit sausage. Magna biltong sint tri-tip commodo sed bacon, esse proident aliquip. Ullamco ham sint fugiat, velit in enim sed mollit nulla cow ut adipisicing nostrud consectetur. Proident dolore beef ribs, laborum nostrud meatball ea laboris rump cupidatat labore culpa. Shankle minim beef, velit sint cupidatat fugiat tenderloin pig et ball tip. Ut cow fatback salami, bacon ball tip et in shank strip steak bresaola. In ut pork belly sed mollit tri-tip magna culpa veniam, short ribs qui in andouille ham consequat. Dolore bacon t-bone, velit short ribs enim strip steak nulla. Voluptate labore ut, biltong swine irure jerky. Cupidatat excepteur aliquip salami dolore. Ball tip strip steak in pork dolor. Ad in esse biltong. Dolore tenderloin exercitation ad pork loin t-bone, dolore in chicken ball tip qui pig. Ut culpa tongue, sint ribeye dolore ex shank voluptate hamburger. Jowl et tempor, boudin pork chop labore ham hock drumstick consectetur tri-tip elit swine meatball chicken ground round. Proident shankle mollit dolore. Shoulder ut duis t-bone quis reprehenderit. Meatloaf dolore minim strip steak, laboris ea aute bacon beef ribs elit shank in veniam drumstick qui. Ex laboris meatball cow tongue pork belly. Ea ball tip reprehenderit pig, sed fatback boudin dolore flank aliquip laboris eu quis. Beef ribs duis beef, cow corned beef adipisicing commodo nisi deserunt exercitation. Cillum dolor t-bone spare ribs, ham hock est sirloin. Brisket irure meatloaf in, boudin pork belly sirloin ball tip. Sirloin sint irure nisi nostrud aliqua. Nostrud nulla aute, enim officia culpa ham hock. Aliqua reprehenderit dolore sunt nostrud sausage, ea boudin pork loin ut t-bone ham tempor. Tri-tip et pancetta drumstick laborum. Ham hock magna do nostrud in proident. Ex ground round fatback, venison non ribeye in.';
+
+ document.body.insertBefore(div, firstChild);
+
+ /* get size of unhyphenated text */
+ divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;text-justification:newspaper;';
+ spanHeight = span.offsetHeight;
+ spanWidth = span.offsetWidth;
+
+ /* compare size with hyphenated text */
+ divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;' +
+ 'text-justification:newspaper;' +
+ prefixes.join('hyphens:auto; ');
+
+ result = (span.offsetHeight != spanHeight || span.offsetWidth != spanWidth);
+
+ /* results and cleanup */
+ document.body.removeChild(div);
+ div.removeChild(span);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ // for the softhyphens test
+ function test_hyphens(delimiter, testWidth) {
+ try {
+ /* create a div container and a span within that
+ * these have to be appended to document.body, otherwise some browsers can give false negative */
+ var div = createElement('div');
+ var span = createElement('span');
+ var divStyle = div.style;
+ var spanSize = 0;
+ var result = false;
+ var result1 = false;
+ var result2 = false;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ divStyle.cssText = 'position:absolute;top:0;left:0;overflow:visible;width:1.25em;';
+ div.appendChild(span);
+ document.body.insertBefore(div, firstChild);
+
+
+ /* get height of unwrapped text */
+ span.innerHTML = 'mm';
+ spanSize = span.offsetHeight;
+
+ /* compare height w/ delimiter, to see if it wraps to new line */
+ span.innerHTML = 'm' + delimiter + 'm';
+ result1 = (span.offsetHeight > spanSize);
+
+ /* if we're testing the width too (i.e. for soft-hyphen, not zws),
+ * this is because tested Blackberry devices will wrap the text but not display the hyphen */
+ if (testWidth) {
+ /* get width of wrapped, non-hyphenated text */
+ span.innerHTML = 'm<br />m';
+ spanSize = span.offsetWidth;
+
+ /* compare width w/ wrapped w/ delimiter to see if hyphen is present */
+ span.innerHTML = 'm' + delimiter + 'm';
+ result2 = (span.offsetWidth > spanSize);
+ } else {
+ result2 = true;
+ }
+
+ /* results and cleanup */
+ if (result1 === true && result2 === true) { result = true; }
+ document.body.removeChild(div);
+ div.removeChild(span);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ // testing if in-browser Find functionality will work on hyphenated text
+ function test_hyphens_find(delimiter) {
+ try {
+ /* create a dummy input for resetting selection location, and a div container
+ * these have to be appended to document.body, otherwise some browsers can give false negative
+ * div container gets the doubled testword, separated by the delimiter
+ * Note: giving a width to div gives false positive in iOS Safari */
+ var dummy = createElement('input');
+ var div = createElement('div');
+ var testword = 'lebowski';
+ var result = false;
+ var textrange;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ div.innerHTML = testword + delimiter + testword;
+
+ document.body.insertBefore(div, firstChild);
+ document.body.insertBefore(dummy, div);
+
+
+ /* reset the selection to the dummy input element, i.e. BEFORE the div container
+ * stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area */
+ if (dummy.setSelectionRange) {
+ dummy.focus();
+ dummy.setSelectionRange(0, 0);
+ } else if (dummy.createTextRange) {
+ textrange = dummy.createTextRange();
+ textrange.collapse(true);
+ textrange.moveEnd('character', 0);
+ textrange.moveStart('character', 0);
+ textrange.select();
+ }
+
+ /* try to find the doubled testword, without the delimiter */
+ if (window.find) {
+ result = window.find(testword + testword);
+ } else {
+ try {
+ textrange = window.self.document.body.createTextRange();
+ result = textrange.findText(testword + testword);
+ } catch (e) {
+ result = false;
+ }
+ }
+
+ document.body.removeChild(div);
+ document.body.removeChild(dummy);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ addTest('csshyphens', function() {
+
+ if (!testAllProps('hyphens', 'auto', true)) {
+ return false;
+ }
+
+ /* Chrome lies about its hyphens support so we need a more robust test
+ crbug.com/107111
+ */
+ try {
+ return test_hyphens_css();
+ } catch (e) {
+ return false;
+ }
+ });
+
+ addTest('softhyphens', function() {
+ try {
+ // use numeric entity instead of ­ in case it's XHTML
+ return test_hyphens('­', true) && test_hyphens('​', false);
+ } catch (e) {
+ return false;
+ }
+ });
+
+ addTest('softhyphensfind', function() {
+ try {
+ return test_hyphens_find('­') && test_hyphens_find('​');
+ } catch (e) {
+ return false;
+ }
+ });
+
+ }
+ });
+
+/*!
+{
+ "name": "CSS :invalid pseudo-class",
+ "property": "cssinvalid",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid"
+ }]
+}
+!*/
+/* DOC
+ Detects support for the ':invalid' CSS pseudo-class.
+*/
+
+ Modernizr.addTest('cssinvalid', function() {
+ return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:invalid{width:50px}', function(elem) {
+ var input = createElement('input');
+ input.required = true;
+ elem.appendChild(input);
+ return input.clientWidth > 10;
+ });
+ });
+
+/*!
+{
+ "name": "CSS :last-child pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "lastchild",
+ "tags": ["css"],
+ "builderAliases": ["css_lastchild"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/304"
+ }]
+}
+!*/
+
+ testStyles('#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}', function(elem) {
+ Modernizr.addTest('lastchild', elem.lastChild.offsetWidth > elem.firstChild.offsetWidth);
+ }, 2);
+
+/*!
+{
+ "name": "CSS Mask",
+ "caniuse": "css-masks",
+ "property": "cssmask",
+ "tags": ["css"],
+ "builderAliases": ["css_mask"],
+ "notes": [
+ {
+ "name": "Webkit blog on CSS Masks",
+ "href": "http://www.webkit.org/blog/181/css-masks/"
+ },
+ {
+ "name": "Safari Docs",
+ "href": "http://developer.apple.com/library/safari/#documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Masks/Masks.html"
+ },
+ {
+ "name": "Mozilla css svg mask (not this)",
+ "href": "http://developer.mozilla.org/en/CSS/mask"
+ },
+ {
+ "name": "Combine with clippaths for awesomeness",
+ "href": "http://generic.cx/for/webkit/test.html"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('cssmask', testAllProps('maskRepeat', 'repeat-x', true));
+
+/*!
+{
+ "name": "CSS Media Queries",
+ "caniuse": "css-mediaqueries",
+ "property": "mediaqueries",
+ "tags": ["css"],
+ "builderAliases": ["css_mediaqueries"]
+}
+!*/
+
+ Modernizr.addTest('mediaqueries', mq('only all'));
+
+/*!
+{
+ "name": "CSS Multiple Backgrounds",
+ "caniuse": "multibackgrounds",
+ "property": "multiplebgs",
+ "tags": ["css"]
+}
+!*/
+
+ // Setting multiple images AND a color on the background shorthand property
+ // and then querying the style.background property value for the number of
+ // occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
+
+ Modernizr.addTest('multiplebgs', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background:url(https://),url(https://),red url(https://)';
+
+ // If the UA supports multiple backgrounds, there should be three occurrences
+ // of the string "url(" in the return value for elemStyle.background
+ return (/(url\s*\(.*?){3}/).test(style.background);
+ });
+
+/*!
+{
+ "name": "CSS :nth-child pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "nthchild",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/685"
+ },
+ {
+ "name": "Sitepoint :nth-child documentation",
+ "href": "http://reference.sitepoint.com/css/pseudoclass-nthchild"
+ }
+ ],
+ "authors": ["@emilchristensen"],
+ "warnings": ["Known false negative in Safari 3.1 and Safari 3.2.2"]
+}
+!*/
+/* DOC
+Detects support for the ':nth-child()' CSS pseudo-selector.
+*/
+
+ // 5 `<div>` elements with `1px` width are created.
+ // Then every other element has its `width` set to `2px`.
+ // A Javascript loop then tests if the `<div>`s have the expected width
+ // using the modulus operator.
+ testStyles('#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}', function(elem) {
+ Modernizr.addTest('nthchild', function() {
+ var elems = elem.getElementsByTagName('div'),
+ test = true;
+
+ for (var i = 0; i < 5; i++) {
+ test = test && elems[i].offsetWidth === i % 2 + 1;
+ }
+
+ return test;
+ });
+ }, 5);
+
+/*!
+{
+ "name": "CSS Object Fit",
+ "caniuse": "object-fit",
+ "property": "objectfit",
+ "tags": ["css"],
+ "builderAliases": ["css_objectfit"],
+ "notes": [{
+ "name": "Opera Article on Object Fit",
+ "href": "http://dev.opera.com/articles/view/css3-object-fit-object-position/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('objectfit', !!prefixed('objectFit'), {aliases: ['object-fit']});
+
+/*!
+{
+ "name": "CSS Opacity",
+ "caniuse": "css-opacity",
+ "property": "opacity",
+ "tags": ["css"]
+}
+!*/
+
+ // Browsers that actually have CSS Opacity implemented have done so
+ // according to spec, which means their return values are within the
+ // range of [0.0,1.0] - including the leading zero.
+
+ Modernizr.addTest('opacity', function() {
+ var style = createElement('a').style;
+ style.cssText = prefixes.join('opacity:.55;');
+
+ // The non-literal . in this regex is intentional:
+ // German Chrome returns this value as 0,55
+ // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
+ return (/^0.55$/).test(style.opacity);
+ });
+
+/*!
+{
+ "name": "CSS Overflow Scrolling",
+ "property": "overflowscrolling",
+ "tags": ["css"],
+ "builderAliases": ["css_overflow_scrolling"],
+ "warnings": ["Introduced in iOS5b2. API is subject to change."],
+ "notes": [{
+ "name": "Article on iOS overflow scrolling",
+ "href": "http://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('overflowscrolling', testAllProps('overflowScrolling', 'touch', true));
+
+/*!
+{
+ "name": "CSS Pointer Events",
+ "caniuse": "pointer-events",
+ "property": "csspointerevents",
+ "authors": ["ausi"],
+ "tags": ["css"],
+ "builderAliases": ["css_pointerevents"],
+ "notes": [
+ {
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/pointer-events"
+ },{
+ "name": "Test Project Page",
+ "href": "http://ausi.github.com/Feature-detection-technique-for-pointer-events/"
+ },{
+ "name": "Test Project Wiki",
+ "href": "http://github.com/ausi/Feature-detection-technique-for-pointer-events/wiki"
+ },
+ {
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/80"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('csspointerevents', function() {
+ var style = createElement('a').style;
+ style.cssText = 'pointer-events:auto';
+ return style.pointerEvents === 'auto';
+ });
+
+/*!
+{
+ "name": "CSS position: sticky",
+ "property": "csspositionsticky",
+ "tags": ["css"],
+ "builderAliases": ["css_positionsticky"],
+ "notes": [{
+ "name": "Chrome bug report",
+ "href":"https://code.google.com/p/chromium/issues/detail?id=322972"
+ }],
+ "warnings": [ "using position:sticky on anything but top aligned elements is buggy in Chrome < 37 and iOS <=7+" ]
+}
+!*/
+
+ // Sticky positioning - constrains an element to be positioned inside the
+ // intersection of its container box, and the viewport.
+ Modernizr.addTest('csspositionsticky', function() {
+ var prop = 'position:';
+ var value = 'sticky';
+ var el = createElement('a');
+ var mStyle = el.style;
+
+ mStyle.cssText = prop + prefixes.join(value + ';' + prop).slice(0, -prop.length);
+
+ return mStyle.position.indexOf(value) !== -1;
+ });
+
+/*!
+{
+ "name": "CSS Generated Content Animations",
+ "property": "csspseudoanimations",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csspseudoanimations', function() {
+ var result = false;
+
+ if (!Modernizr.cssanimations || !window.getComputedStyle) {
+ return result;
+ }
+
+ var styles = [
+ '@', Modernizr._prefixes.join('keyframes csspseudoanimations { from { font-size: 10px; } }@').replace(/\@$/, ''),
+ '#modernizr:before { content:" "; font-size:5px;',
+ Modernizr._prefixes.join('animation:csspseudoanimations 1ms infinite;'),
+ '}'
+ ].join('');
+
+ Modernizr.testStyles(styles, function(elem) {
+ result = window.getComputedStyle(elem, ':before').getPropertyValue('font-size') === '10px';
+ });
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Transitions",
+ "property": "csstransitions",
+ "caniuse": "css-transitions",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csstransitions', testAllProps('transition', 'all', true));
+
+/*!
+{
+ "name": "CSS Generated Content Transitions",
+ "property": "csspseudotransitions",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csspseudotransitions', function() {
+ var result = false;
+
+ if (!Modernizr.csstransitions || !window.getComputedStyle) {
+ return result;
+ }
+
+ var styles =
+ '#modernizr:before { content:" "; font-size:5px;' + Modernizr._prefixes.join('transition:0s 100s;') + '}' +
+ '#modernizr.trigger:before { font-size:10px; }';
+
+ Modernizr.testStyles(styles, function(elem) {
+ // Force rendering of the element's styles so that the transition will trigger
+ window.getComputedStyle(elem, ':before').getPropertyValue('font-size');
+ elem.className += 'trigger';
+ result = window.getComputedStyle(elem, ':before').getPropertyValue('font-size') === '5px';
+ });
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Reflections",
+ "caniuse": "css-reflections",
+ "property": "cssreflections",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('cssreflections', testAllProps('boxReflect', 'above', true));
+
+/*!
+{
+ "name": "CSS Regions",
+ "caniuse": "css-regions",
+ "authors": ["Mihai Balan"],
+ "property": "regions",
+ "tags": ["css"],
+ "builderAliases": ["css_regions"],
+ "notes": [{
+ "name": "W3C Specification",
+ "href": "http://www.w3.org/TR/css3-regions/"
+ }]
+}
+!*/
+
+ // We start with a CSS parser test then we check page geometry to see if it's affected by regions
+ // Later we might be able to retire the second part, as WebKit builds with the false positives die out
+
+ Modernizr.addTest('regions', function() {
+
+ if (isSVG) {
+ // css regions don't work inside of SVG elements. Rather than update the
+ // below test to work in an SVG context, just exit early to save bytes
+ return false;
+ }
+
+ /* Get the 'flowFrom' property name available in the browser. Either default or vendor prefixed.
+ If the property name can't be found we'll get Boolean 'false' and fail quickly */
+ var flowFromProperty = Modernizr.prefixed('flowFrom');
+ var flowIntoProperty = Modernizr.prefixed('flowInto');
+ var result = false;
+
+ if (!flowFromProperty || !flowIntoProperty) {
+ return result;
+ }
+
+ /* If CSS parsing is there, try to determine if regions actually work. */
+ var iframeContainer = createElement('iframe');
+ var container = createElement('div');
+ var content = createElement('div');
+ var region = createElement('div');
+
+ /* we create a random, unlikely to be generated flow number to make sure we don't
+ clash with anything more vanilla, like 'flow', or 'article', or 'f1' */
+ var flowName = 'modernizr_flow_for_regions_check';
+
+ /* First create a div with two adjacent divs inside it. The first will be the
+ content, the second will be the region. To be able to distinguish between the two,
+ we'll give the region a particular padding */
+ content.innerText = 'M';
+ container.style.cssText = 'top: 150px; left: 150px; padding: 0px;';
+ region.style.cssText = 'width: 50px; height: 50px; padding: 42px;';
+
+ region.style[flowFromProperty] = flowName;
+ container.appendChild(content);
+ container.appendChild(region);
+ docElement.appendChild(container);
+
+ /* Now compute the bounding client rect, before and after attempting to flow the
+ content div in the region div. If regions are enabled, the after bounding rect
+ should reflect the padding of the region div.*/
+ var flowedRect, delta;
+ var plainRect = content.getBoundingClientRect();
+
+
+ content.style[flowIntoProperty] = flowName;
+ flowedRect = content.getBoundingClientRect();
+
+ delta = parseInt(flowedRect.left - plainRect.left, 10);
+ docElement.removeChild(container);
+
+ if (delta == 42) {
+ result = true;
+ } else {
+ /* IE only allows for the content to come from iframes. This has the
+ * side effect of automatic collapsing of iframes once they get the flow-into
+ * property set. checking for a change on the height allows us to detect this
+ * in a sync way, without having to wait for a frame to load */
+
+ docElement.appendChild(iframeContainer);
+ plainRect = iframeContainer.getBoundingClientRect();
+ iframeContainer.style[flowIntoProperty] = flowName;
+ flowedRect = iframeContainer.getBoundingClientRect();
+
+ if (plainRect.height > 0 && plainRect.height !== flowedRect.height && flowedRect.height === 0) {
+ result = true;
+ }
+ }
+
+ content = region = container = iframeContainer = undefined;
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Font rem Units",
+ "caniuse": "rem",
+ "authors": ["nsfmc"],
+ "property": "cssremunit",
+ "tags": ["css"],
+ "builderAliases": ["css_remunit"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#relative0"
+ },{
+ "name": "Font Size with rem by Jonathan Snook",
+ "href": "http://snook.ca/archives/html_and_css/font-size-with-rem"
+ }]
+}
+!*/
+
+ // "The 'rem' unit ('root em') is relative to the computed
+ // value of the 'font-size' value of the root element."
+ // you can test by checking if the prop was ditched
+
+ Modernizr.addTest('cssremunit', function() {
+ var style = createElement('a').style;
+ try {
+ style.fontSize = '3rem';
+ }
+ catch (e) {}
+ return (/rem/).test(style.fontSize);
+ });
+
+/*!
+{
+ "name": "CSS UI Resize",
+ "property": "cssresize",
+ "caniuse": "css-resize",
+ "tags": ["css"],
+ "builderAliases": ["css_resize"],
+ "notes": [{
+ "name": "W3C Specification",
+ "href": "http://www.w3.org/TR/css3-ui/#resize"
+ },{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/CSS/resize"
+ }]
+}
+!*/
+/* DOC
+Test for CSS 3 UI "resize" property
+*/
+
+ Modernizr.addTest('cssresize', testAllProps('resize', 'both', true));
+
+/*!
+{
+ "name": "CSS rgba",
+ "caniuse": "css3-colors",
+ "property": "rgba",
+ "tags": ["css"],
+ "notes": [{
+ "name": "CSSTricks Tutorial",
+ "href": "http://css-tricks.com/rgba-browser-support/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('rgba', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background-color:rgba(150,255,150,.5)';
+
+ return ('' + style.backgroundColor).indexOf('rgba') > -1;
+ });
+
+/*!
+{
+ "name": "CSS Stylable Scrollbars",
+ "property": "cssscrollbar",
+ "tags": ["css"],
+ "builderAliases": ["css_scrollbars"]
+}
+!*/
+
+ testStyles('#modernizr{overflow: scroll; width: 40px; height: 40px; }#' + prefixes
+ .join('scrollbar{width:0px}' + ' #modernizr::')
+ .split('#')
+ .slice(1)
+ .join('#') + 'scrollbar{width:0px}',
+ function(node) {
+ Modernizr.addTest('cssscrollbar', node.scrollWidth == 40);
+ });
+
+/*!
+{
+ "name": "CSS Shapes",
+ "property": "shapes",
+ "tags": ["css"],
+ "notes": [{
+ "name": "CSS Shapes W3C specification",
+ "href": "http://www.w3.org/TR/css-shapes"
+ },{
+ "name": "Examples from Adobe",
+ "href": "http://html.adobe.com/webplatform/layout/shapes"
+ }, {
+ "name": "Samples showcasing uses of Shapes",
+ "href": "http://codepen.io/collection/qFesk"
+ }]
+}
+!*/
+
+ Modernizr.addTest('shapes', testAllProps('shapeOutside', 'content-box', true));
+
+/*!
+{
+ "name": "CSS general sibling selector",
+ "caniuse": "css-sel3",
+ "property": "siblinggeneral",
+ "tags": ["css"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/889"
+ }]
+}
+!*/
+
+ Modernizr.addTest('siblinggeneral', function() {
+ return testStyles('#modernizr div {width:100px} #modernizr div ~ div {width:200px;display:block}', function(elem) {
+ return elem.lastChild.offsetWidth == 200;
+ }, 2);
+ });
+
+/*!
+{
+ "name": "CSS Subpixel Fonts",
+ "property": "subpixelfont",
+ "tags": ["css"],
+ "builderAliases": ["css_subpixelfont"],
+ "authors": [
+ "@derSchepp",
+ "@gerritvanaaken",
+ "@rodneyrehm",
+ "@yatil",
+ "@ryanseddon"
+ ],
+ "notes": [{
+ "name": "Origin Test",
+ "href": "https://github.com/gerritvanaaken/subpixeldetect"
+ }]
+}
+!*/
+
+ /*
+ * (to infer if GDI or DirectWrite is used on Windows)
+ */
+ testStyles(
+ '#modernizr{position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;}#subpixel{float: left; font-size: 33.3333%;}',
+ function(elem) {
+ var subpixel = elem.firstChild;
+ subpixel.innerHTML = 'This is a text written in Arial';
+ Modernizr.addTest('subpixelfont', window.getComputedStyle ?
+ window.getComputedStyle(subpixel, null).getPropertyValue('width') !== '44px'
+ : false);
+ }, 1, ['subpixel']);
+
+/*!
+{
+ "name": "CSS :target pseudo-class",
+ "caniuse": "css-sel3",
+ "property": "target",
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:target"
+ }],
+ "authors": ["@zachleat"],
+ "warnings": ["Opera Mini supports :target but doesn't update the hash for anchor links."]
+}
+!*/
+/* DOC
+Detects support for the ':target' CSS pseudo-class.
+*/
+
+ // querySelector
+ Modernizr.addTest('target', function() {
+ var doc = window.document;
+ if (!('querySelectorAll' in doc)) {
+ return false;
+ }
+
+ try {
+ doc.querySelectorAll(':target');
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "CSS text-align-last",
+ "property": "textalignlast",
+ "tags": ["css"],
+ "knownBugs": ["IE does not support the 'start' or 'end' values."],
+ "notes": [{
+ "name": "Quicksmode",
+ "href": "http://www.quirksmode.org/css/text/textalignlast.html"
+ },{
+ "name": "MDN",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last"
+ }]
+}
+!*/
+
+ Modernizr.addTest('textalignlast', testAllProps('textAlignLast'));
+
+/*!
+{
+ "name": "CSS textshadow",
+ "property": "textshadow",
+ "caniuse": "css-textshadow",
+ "tags": ["css"],
+ "knownBugs": ["FF3.0 will false positive on this test"]
+}
+!*/
+
+ Modernizr.addTest('textshadow', testProp('textShadow', '1px 1px'));
+
+/*!
+{
+ "name": "CSS Transforms",
+ "property": "csstransforms",
+ "caniuse": "transforms2d",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csstransforms', function() {
+ // Android < 3.0 is buggy, so we sniff and blacklist
+ // http://git.io/hHzL7w
+ return navigator.userAgent.indexOf('Android 2.') === -1 &&
+ testAllProps('transform', 'scale(1)', true);
+ });
+
+/*!
+{
+ "name": "CSS Transforms 3D",
+ "property": "csstransforms3d",
+ "caniuse": "transforms3d",
+ "tags": ["css"],
+ "warnings": [
+ "Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004"
+ ]
+}
+!*/
+
+ Modernizr.addTest('csstransforms3d', function() {
+ var ret = !!testAllProps('perspective', '1px', true);
+ var usePrefix = Modernizr._config.usePrefixes;
+
+ // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
+ // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
+ // some conditions. As a result, Webkit typically recognizes the syntax but
+ // will sometimes throw a false positive, thus we must do a more thorough check:
+ if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {
+ var mq;
+ // Use CSS Conditional Rules if available
+ if (Modernizr.supports) {
+ mq = '@supports (perspective: 1px)';
+ } else {
+ // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.
+ // `@media (transform-3d),(-webkit-transform-3d){ ... }`
+ mq = '@media (transform-3d)';
+ if (usePrefix) {
+ mq += ',(-webkit-transform-3d)';
+ }
+ }
+ // If loaded inside the body tag and the test element inherits any padding, margin or borders it will fail #740
+ mq += '{#modernizr{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0}}';
+
+ testStyles(mq, function(elem) {
+ ret = elem.offsetLeft === 9 && elem.offsetHeight === 5;
+ });
+ }
+
+ return ret;
+ });
+
+/*!
+{
+ "name": "CSS Transform Style preserve-3d",
+ "property": "preserve3d",
+ "authors": ["edmellum"],
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
+ },{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/762"
+ }]
+}
+!*/
+/* DOC
+Detects support for `transform-style: preserve-3d`, for getting a proper 3D perspective on elements.
+*/
+
+ Modernizr.addTest('preserve3d', testAllProps('transformStyle', 'preserve-3d'));
+
+/*!
+{
+ "name": "CSS user-select",
+ "property": "userselect",
+ "caniuse": "user-select-none",
+ "authors": ["ryan seddon"],
+ "tags": ["css"],
+ "builderAliases": ["css_userselect"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/250"
+ }]
+}
+!*/
+
+ //https://github.com/Modernizr/Modernizr/issues/250
+ Modernizr.addTest('userselect', testAllProps('userSelect', 'none', true));
+
+/*!
+{
+ "name": "CSS :valid pseudo-class",
+ "property": "cssvalid",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:valid"
+ }]
+}
+!*/
+/* DOC
+ Detects support for the ':valid' CSS pseudo-class.
+*/
+
+ Modernizr.addTest('cssvalid', function() {
+ return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:valid{width:50px}', function(elem) {
+ var input = createElement('input');
+ elem.appendChild(input);
+ return input.clientWidth > 10;
+ });
+ });
+
+/*!
+{
+ "name": "CSS vh unit",
+ "property": "cssvhunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vhunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "Similar JSFiddle",
+ "href": "http://jsfiddle.net/FWeinb/etnYC/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr { height: 50vh; }', function(elem) {
+ var height = parseInt(window.innerHeight / 2, 10);
+ var compStyle = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['height'], 10);
+ Modernizr.addTest('cssvhunit', compStyle == height);
+ });
+
+
+ /**
+ * roundedEquals takes two integers and checks if the first is within 1 of the second
+ *
+ * @access private
+ * @function roundedEquals
+ * @param {number} a
+ * @param {number} b
+ * @returns {boolean}
+ */
+
+ function roundedEquals(a, b) {
+ return a - 1 === b || a === b || a + 1 === b;
+ }
+
+ ;
+/*!
+{
+ "name": "CSS vmax unit",
+ "property": "cssvmaxunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vmaxunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/glsee/JDsWQ/4/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr1{width: 50vmax}#modernizr2{width:50px;height:50px;overflow:scroll}', function(node) {
+ var elem = node.childNodes[1];
+ var scroller = node.childNodes[0];
+ var scrollbarWidth = parseInt((scroller.offsetWidth - scroller.clientWidth) / 2, 10);
+
+ var one_vw = docElement.clientWidth / 100;
+ var one_vh = docElement.clientHeight / 100;
+ var expectedWidth = parseInt(Math.max(one_vw, one_vh) * 50, 10);
+ var compWidth = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['width'], 10);
+
+ Modernizr.addTest('cssvmaxunit', roundedEquals(expectedWidth, compWidth) || roundedEquals(expectedWidth, compWidth - scrollbarWidth));
+ }, 2);
+
+/*!
+{
+ "name": "CSS vmin unit",
+ "property": "cssvminunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vminunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/glsee/JRmdq/8/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr1{width: 50vm;width:50vmin}#modernizr2{width:50px;height:50px;overflow:scroll}', function(node) {
+ var elem = node.childNodes[1];
+ var scroller = node.childNodes[0];
+ var scrollbarWidth = parseInt((scroller.offsetWidth - scroller.clientWidth) / 2, 10);
+
+ var one_vw = docElement.clientWidth / 100;
+ var one_vh = docElement.clientHeight / 100;
+ var expectedWidth = parseInt(Math.min(one_vw, one_vh) * 50, 10);
+ var compWidth = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['width'], 10);
+
+ Modernizr.addTest('cssvminunit', roundedEquals(expectedWidth, compWidth) || roundedEquals(expectedWidth, compWidth - scrollbarWidth));
+ }, 2);
+
+/*!
+{
+ "name": "CSS vw unit",
+ "property": "cssvwunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vwunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/FWeinb/etnYC/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr { width: 50vw; }', function(elem) {
+ var width = parseInt(window.innerWidth / 2, 10);
+ var compStyle = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle).width, 10);
+
+ Modernizr.addTest('cssvwunit', compStyle == width);
+ });
+
+/*!
+{
+ "name": "will-change",
+ "property": "willchange",
+ "notes": [{
+ "name": "Spec",
+ "href": "http://tabatkins.github.io/specs/css-will-change/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `will-change` css property, which formally signals to the
+browser that an element will be animating.
+*/
+
+ Modernizr.addTest('willchange', 'willChange' in docElement.style);
+
+/*!
+{
+ "name": "CSS wrap-flow",
+ "property": "wrapflow",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "W3C Exclusions spec",
+ "href": "http://www.w3.org/TR/css3-exclusions"
+ },
+ {
+ "name": "Example by Adobe",
+ "href": "http://html.adobe.com/webstandards/cssexclusions"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('wrapflow', function() {
+ var prefixedProperty = prefixed('wrapFlow');
+ if (!prefixedProperty || isSVG) {
+ return false;
+ }
+
+ var wrapFlowProperty = prefixedProperty.replace(/([A-Z])/g, function(str, m1) { return '-' + m1.toLowerCase(); }).replace(/^ms-/, '-ms-');
+
+ /* If the CSS parsing is there we need to determine if wrap-flow actually works to avoid false positive cases, e.g. the browser parses
+ the property, but it hasn't got the implementation for the functionality yet. */
+ var container = createElement('div');
+ var exclusion = createElement('div');
+ var content = createElement('span');
+
+ /* First we create a div with two adjacent divs inside it. The first div will be the content, the second div will be the exclusion area.
+ We use the "wrap-flow: end" property to test the actual behavior. (http://dev.w3.org/csswg/css3-exclusions/#wrap-flow-property)
+ The wrap-flow property is applied to the exclusion area what has a 50px left offset and a 100px width.
+ If the wrap-flow property is working correctly then the content should start after the exclusion area, so the content's left offset should be 150px. */
+ exclusion.style.cssText = 'position: absolute; left: 50px; width: 100px; height: 20px;' + wrapFlowProperty + ':end;';
+ content.innerText = 'X';
+
+ container.appendChild(exclusion);
+ container.appendChild(content);
+ docElement.appendChild(container);
+
+ var leftOffset = content.offsetLeft;
+
+ docElement.removeChild(container);
+ exclusion = content = container = undefined;
+
+ return (leftOffset == 150);
+ });
+
+/*!
+{
+ "name": "CustomEvent",
+ "property": "customevent",
+ "tags": ["customevent"],
+ "authors": ["Alberto Elias"],
+ "notes": [{
+ "name": "W3C DOM reference",
+ "href": "http://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/docs/Web/API/CustomEvent"
+ }],
+ "polyfills": ["eventlistener"]
+}
+!*/
+/* DOC
+
+Detects support for CustomEvent.
+
+*/
+
+ Modernizr.addTest('customevent', 'CustomEvent' in window && typeof window.CustomEvent === 'function');
+
+/*!
+{
+ "name": "Custom protocol handler",
+ "property": "customprotocolhandler",
+ "authors": ["Ben Schwarz"],
+ "builderAliases": ["custom_protocol_handler"],
+ "notes": [{
+ "name": "WHATWG overview",
+ "href": "http://developers.whatwg.org/timers.html#custom-handlers"
+ },{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.registerProtocolHandler"
+ }],
+ "warnings": [],
+ "polyfills": []
+}
+!*/
+/* DOC
+Detects support for the `window.registerProtocolHandler()` API to allow websites to register themselves as possible handlers for particular protocols.
+*/
+
+ Modernizr.addTest('customprotocolhandler', function() {
+ // early bailout where it doesn't exist at all
+ if (!navigator.registerProtocolHandler) {
+ return false;
+ }
+
+ // registerProtocolHandler was stubbed in webkit for a while, and didn't
+ // actually do anything. We intentionally set it improperly to test for
+ // the proper sort of failure
+ try {
+ navigator.registerProtocolHandler('thisShouldFail');
+ }
+ catch (e) {
+ return e instanceof TypeError;
+ }
+
+ return false;
+ });
+
+/*!
+{
+ "name": "Dart",
+ "property": "dart",
+ "authors": ["Theodoor van Donge"],
+ "notes": [{
+ "name": "Language website",
+ "href": "http://www.dartlang.org/"
+ }]
+}
+!*/
+/* DOC
+Detects native support for the Dart programming language.
+*/
+
+ Modernizr.addTest('dart', !!prefixed('startDart', navigator));
+
+/*!
+{
+ "name": "DataView",
+ "property": "dataview",
+ "authors": ["Addy Osmani"],
+ "builderAliases": ["dataview_api"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/JavaScript_typed_arrays/DataView"
+ }],
+ "polyfills": ["jdataview"]
+}
+!*/
+/* DOC
+Detects support for the DataView interface for reading data from an ArrayBuffer as part of the Typed Array spec.
+*/
+
+ Modernizr.addTest('dataview', (typeof DataView !== 'undefined' && 'getFloat64' in DataView.prototype));
+
+/*!
+{
+ "name": "classList",
+ "caniuse": "classlist",
+ "property": "classlist",
+ "tags": ["dom"],
+ "builderAliases": ["dataview_api"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/DOM/element.classList"
+ }]
+}
+!*/
+
+ Modernizr.addTest('classlist', 'classList' in docElement);
+
+/*!
+{
+ "name": "createElement with Attributes",
+ "property": ["createelementattrs", "createelement-attrs"],
+ "tags": ["dom"],
+ "builderAliases": ["dom_createElement_attrs"],
+ "authors": ["James A. Rosen"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/258"
+ }]
+}
+!*/
+
+ Modernizr.addTest('createelementattrs', function() {
+ try {
+ return createElement('<input name="test" />').getAttribute('name') == 'test';
+ } catch (e) {
+ return false;
+ }
+ }, {
+ aliases: ['createelement-attrs']
+ });
+
+/*!
+{
+ "name": "dataset API",
+ "caniuse": "dataset",
+ "property": "dataset",
+ "tags": ["dom"],
+ "builderAliases": ["dom_dataset"],
+ "authors": ["@phiggins42"]
+}
+!*/
+
+ // dataset API for data-* attributes
+ Modernizr.addTest('dataset', function() {
+ var n = createElement('div');
+ n.setAttribute('data-a-b', 'c');
+ return !!(n.dataset && n.dataset.aB === 'c');
+ });
+
+/*!
+{
+ "name": "Document Fragment",
+ "property": "documentfragment",
+ "notes": [{
+ "name": "W3C DOM Level 1 Reference",
+ "href": "http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-B63ED1A3"
+ }, {
+ "name": "SitePoint Reference",
+ "href": "http://reference.sitepoint.com/javascript/DocumentFragment"
+ }, {
+ "name": "QuirksMode Compatibility Tables",
+ "href": "http://www.quirksmode.org/m/w3c_core.html#t112"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "knownBugs": ["false-positive on Blackberry 9500, see QuirksMode note"],
+ "tags": []
+}
+!*/
+/* DOC
+Append multiple elements to the DOM within a single insertion.
+*/
+
+ Modernizr.addTest('documentfragment', function() {
+ return 'createDocumentFragment' in document &&
+ 'appendChild' in docElement;
+ });
+
+/*!
+{
+ "name": "[hidden] Attribute",
+ "property": "hidden",
+ "tags": ["dom"],
+ "notes": [{
+ "name": "WHATWG: The hidden attribute",
+ "href": "http://developers.whatwg.org/editing.html#the-hidden-attribute"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "https://github.com/aFarkas/html5shiv/blob/bf4fcc4/src/html5shiv.js#L38"
+ }],
+ "polyfills": ["html5shiv"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Does the browser support the HTML5 [hidden] attribute?
+*/
+
+ Modernizr.addTest('hidden', 'hidden' in createElement('a'));
+
+/*!
+{
+ "name": "microdata",
+ "property": "microdata",
+ "tags": ["dom"],
+ "builderAliases": ["dom_microdata"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/html5/microdata.html"
+ }]
+}
+!*/
+
+ Modernizr.addTest('microdata', 'getItems' in document);
+
+/*!
+{
+ "name": "DOM4 MutationObserver",
+ "property": "mutationobserver",
+ "caniuse": "mutationobserver",
+ "tags": ["dom"],
+ "authors": ["Karel Sedláček (@ksdlck)"],
+ "polyfills": ["mutationobservers"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver"
+ }]
+}
+!*/
+/* DOC
+
+Determines if DOM4 MutationObserver support is available.
+
+*/
+
+ Modernizr.addTest('mutationobserver',
+ !!window.MutationObserver || !!window.WebKitMutationObserver);
+
+
+ /**
+ * since we have a fairly large number of input tests that don't mutate the input
+ * we create a single element that can be shared with all of those tests for a
+ * minor perf boost
+ *
+ * @access private
+ * @returns {HTMLInputElement}
+ */
+ var inputElem = createElement('input');
+
+/*!
+{
+ "name": "Input attributes",
+ "property": "input",
+ "tags": ["forms"],
+ "authors": ["Mike Taylor"],
+ "notes": [{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary"
+ }],
+ "knownBugs": ["Some blackberry devices report false positive for input.multiple"]
+}
+!*/
+/* DOC
+Detects support for HTML5 `<input>` element attributes and exposes Boolean subproperties with the results:
+
+```javascript
+Modernizr.input.autocomplete
+Modernizr.input.autofocus
+Modernizr.input.list
+Modernizr.input.max
+Modernizr.input.min
+Modernizr.input.multiple
+Modernizr.input.pattern
+Modernizr.input.placeholder
+Modernizr.input.required
+Modernizr.input.step
+```
+*/
+
+ // Run through HTML5's new input attributes to see if the UA understands any.
+ // Mike Taylr has created a comprehensive resource for testing these attributes
+ // when applied to all input types:
+ // miketaylr.com/code/input-type-attr.html
+
+ // Only input placeholder is tested while textarea's placeholder is not.
+ // Currently Safari 4 and Opera 11 have support only for the input placeholder
+ // Both tests are available in feature-detects/forms-placeholder.js
+
+ var inputattrs = 'autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ');
+ var attrs = {};
+
+ Modernizr['input'] = (function(props) {
+ for (var i = 0, len = props.length; i < len; i++) {
+ attrs[ props[i] ] = !!(props[i] in inputElem);
+ }
+ if (attrs.list) {
+ // safari false positive's on datalist: webk.it/74252
+ // see also github.com/Modernizr/Modernizr/issues/146
+ attrs.list = !!(createElement('datalist') && window.HTMLDataListElement);
+ }
+ return attrs;
+ })(inputattrs);
+
+/*!
+{
+ "name": "datalist Element",
+ "caniuse": "datalist",
+ "property": "datalistelem",
+ "tags": ["elem"],
+ "builderAliases": ["elem_datalist"],
+ "warnings": ["This test is a dupe of Modernizr.input.list. Only around for legacy reasons."],
+ "notes": [{
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/15346-relevant-dropdowns-polyfill-for-datalist/"
+ },{
+ "name": "Mike Taylor Test",
+ "href": "http://miketaylr.com/test/datalist.html"
+ },{
+ "name": "Mike Taylor Code",
+ "href": "http://miketaylr.com/code/datalist.html"
+ }]
+}
+!*/
+
+ // lol. we already have a test for datalist built in! silly you.
+ // Leaving it around in case anyone's using it
+
+ Modernizr.addTest('datalistelem', Modernizr.input.list);
+
+/*!
+{
+ "name": "details Element",
+ "caniuse": "details",
+ "property": "details",
+ "tags": ["elem"],
+ "builderAliases": ["elem_details"],
+ "authors": ["@mathias"],
+ "notes": [{
+ "name": "Mathias' Original",
+ "href": "http://mths.be/axh"
+ }]
+}
+!*/
+
+ Modernizr.addTest('details', function() {
+ var el = createElement('details');
+ var diff;
+
+ // return early if possible; thanks @aFarkas!
+ if (!('open' in el)) {
+ return false;
+ }
+
+ testStyles('#modernizr details{display:block}', function(node) {
+ node.appendChild(el);
+ el.innerHTML = '<summary>a</summary>b';
+ diff = el.offsetHeight;
+ el.open = true;
+ diff = diff != el.offsetHeight;
+ });
+
+
+ return diff;
+ });
+
+/*!
+{
+ "name": "output Element",
+ "property": "outputelem",
+ "tags": ["elem"],
+ "builderAliases": ["elem_output"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-output-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('outputelem', 'value' in createElement('output'));
+
+/*!
+{
+ "name": "picture Element",
+ "property": "picture",
+ "tags": ["elem"],
+ "authors": ["Scott Jehl", "Mat Marquis"],
+ "notes": [{
+ "name": "Specification",
+ "href": "http://picture.responsiveimages.org"
+ },{
+ "name": "Relevant spec issue",
+ "href": "https://github.com/ResponsiveImagesCG/picture-element/issues/87"
+ }]
+}
+!*/
+
+ Modernizr.addTest('picture', 'HTMLPictureElement' in window);
+
+/*!
+{
+ "name": "progress Element",
+ "caniuse": "progressmeter",
+ "property": ["progressbar", "meter"],
+ "tags": ["elem"],
+ "builderAliases": ["elem_progress_meter"],
+ "authors": ["Stefan Wallin"]
+}
+!*/
+
+ // Tests for progressbar-support. All browsers that don't support progressbar returns undefined =)
+ Modernizr.addTest('progressbar', createElement('progress').max !== undefined);
+
+ // Tests for meter-support. All browsers that don't support meters returns undefined =)
+ Modernizr.addTest('meter', createElement('meter').max !== undefined);
+
+/*!
+{
+ "name": "ruby, rp, rt Elements",
+ "caniuse": "ruby",
+ "property": "ruby",
+ "tags": ["elem"],
+ "builderAliases": ["elem_ruby"],
+ "authors": ["Cătălin Mariș"],
+ "notes": [{
+ "name": "WHATWG Specification",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-ruby-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('ruby', function() {
+
+ var ruby = createElement('ruby');
+ var rt = createElement('rt');
+ var rp = createElement('rp');
+ var displayStyleProperty = 'display';
+ // 'fontSize' - because it`s only used for IE6 and IE7
+ var fontSizeStyleProperty = 'fontSize';
+
+ ruby.appendChild(rp);
+ ruby.appendChild(rt);
+ docElement.appendChild(ruby);
+
+ // browsers that support <ruby> hide the <rp> via "display:none"
+ if (getStyle(rp, displayStyleProperty) == 'none' || // for non-IE browsers
+ // but in IE browsers <rp> has "display:inline" so, the test needs other conditions:
+ getStyle(ruby, displayStyleProperty) == 'ruby' && getStyle(rt, displayStyleProperty) == 'ruby-text' || // for IE8+
+ getStyle(rp, fontSizeStyleProperty) == '6pt' && getStyle(rt, fontSizeStyleProperty) == '6pt') { // for IE6 & IE7
+
+ cleanUp();
+ return true;
+
+ } else {
+ cleanUp();
+ return false;
+ }
+
+ function getStyle(element, styleProperty) {
+ var result;
+
+ if (window.getComputedStyle) { // for non-IE browsers
+ result = document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProperty);
+ } else if (element.currentStyle) { // for IE
+ result = element.currentStyle[styleProperty];
+ }
+
+ return result;
+ }
+
+ function cleanUp() {
+ docElement.removeChild(ruby);
+ // the removed child node still exists in memory, so ...
+ ruby = null;
+ rt = null;
+ rp = null;
+ }
+
+ });
+
+
+/*!
+{
+ "name": "Template Tag",
+ "property": "template",
+ "tags": ["elem"],
+ "notes": [{
+ "name": "HTML5Rocks Article",
+ "href": "http://www.html5rocks.com/en/tutorials/webcomponents/template/"
+ },{
+ "name": "W3 Spec",
+ "href": "https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html"
+ }]
+}
+!*/
+
+ Modernizr.addTest('template', 'content' in createElement('template'));
+
+/*!
+{
+ "name": "time Element",
+ "property": "time",
+ "tags": ["elem"],
+ "builderAliases": ["elem_time"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('time', 'valueAsDate' in createElement('time'));
+
+/*!
+{
+ "name": "Track element and Timed Text Track",
+ "property": ["texttrackapi", "track"],
+ "tags": ["elem"],
+ "builderAliases": ["elem_track"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3 track Element Spec",
+ "href": "http://www.w3.org/TR/html5/video.html#the-track-element"
+ },{
+ "name": "W3 track API Spec",
+ "href": "http://www.w3.org/TR/html5/media-elements.html#text-track-api"
+ }],
+ "warnings": ["While IE10 has implemented the track element, IE10 does not expose the underlying APIs to create timed text tracks by JS (really sad)"]
+}
+!*/
+
+ Modernizr.addTest('texttrackapi', typeof (createElement('video').addTextTrack) === 'function');
+
+ // a more strict test for track including UI support: document.createElement('track').kind === 'subtitles'
+ Modernizr.addTest('track', 'kind' in createElement('track'));
+
+/*!
+{
+ "name": "Unknown Elements",
+ "property": "unknownelements",
+ "tags": ["elem"],
+ "notes": [{
+ "name": "The Story of the HTML5 Shiv",
+ "href": "http://www.paulirish.com/2011/the-history-of-the-html5-shiv/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "https://github.com/aFarkas/html5shiv/blob/bf4fcc4/src/html5shiv.js#L36"
+ }],
+ "polyfills": ["html5shiv"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Does the browser support HTML with non-standard / new elements?
+*/
+
+ Modernizr.addTest('unknownelements', function() {
+ var a = createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ return a.childNodes.length === 1;
+ });
+
+/*!
+{
+ "name": "Emoji",
+ "property": "emoji"
+}
+!*/
+/* DOC
+Detects support for emoji character sets.
+*/
+
+ Modernizr.addTest('emoji', function() {
+ if (!Modernizr.canvastext) {
+ return false;
+ }
+ var pixelRatio = window.devicePixelRatio || 1;
+ var offset = 12 * pixelRatio;
+ var node = createElement('canvas');
+ var ctx = node.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.textBaseline = 'top';
+ ctx.font = '32px Arial';
+ ctx.fillText('\ud83d\udc28', 0, 0); // U+1F428 KOALA
+ return ctx.getImageData(offset, offset, 1, 1).data[0] !== 0;
+ });
+
+/*!
+{
+ "name": "ES5 Array",
+ "property": "es5array",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Array per specification.
+*/
+
+ Modernizr.addTest('es5array', function() {
+ return !!(Array.prototype &&
+ Array.prototype.every &&
+ Array.prototype.filter &&
+ Array.prototype.forEach &&
+ Array.prototype.indexOf &&
+ Array.prototype.lastIndexOf &&
+ Array.prototype.map &&
+ Array.prototype.some &&
+ Array.prototype.reduce &&
+ Array.prototype.reduceRight &&
+ Array.isArray);
+ });
+
+/*!
+{
+ "name": "ES5 Date",
+ "property": "es5date",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Date per specification.
+*/
+
+ Modernizr.addTest('es5date', function() {
+ var isoDate = '2013-04-12T06:06:37.307Z',
+ canParseISODate = false;
+ try {
+ canParseISODate = !!Date.parse(isoDate);
+ } catch (e) {
+ // no ISO date parsing yet
+ }
+ return !!(Date.now &&
+ Date.prototype &&
+ Date.prototype.toISOString &&
+ Date.prototype.toJSON &&
+ canParseISODate);
+ });
+
+/*!
+{
+ "name": "ES5 Function",
+ "property": "es5function",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Function per specification.
+*/
+
+ Modernizr.addTest('es5function', function() {
+ return !!(Function.prototype && Function.prototype.bind);
+ });
+
+/*!
+{
+ "name": "ES5 Object",
+ "property": "es5object",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim", "es5sham"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Object per specification.
+*/
+
+ Modernizr.addTest('es5object', function() {
+ return !!(Object.keys &&
+ Object.create &&
+ Object.getPrototypeOf &&
+ Object.getOwnPropertyNames &&
+ Object.isSealed &&
+ Object.isFrozen &&
+ Object.isExtensible &&
+ Object.getOwnPropertyDescriptor &&
+ Object.defineProperty &&
+ Object.defineProperties &&
+ Object.seal &&
+ Object.freeze &&
+ Object.preventExtensions);
+ });
+
+/*!
+{
+ "name": "ES5 Strict Mode",
+ "property": "strictmode",
+ "caniuse": "sctrict-mode",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "authors": ["@kangax"],
+ "tags": ["es5"],
+ "builderAliases": ["es5_strictmode"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Object strict mode.
+*/
+
+ Modernizr.addTest('strictmode', (function() {'use strict'; return !this; })());
+
+/*!
+{
+ "name": "ES5 String",
+ "property": "es5string",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 String per specification.
+*/
+
+ Modernizr.addTest('es5string', function() {
+ return !!(String.prototype && String.prototype.trim);
+ });
+
+/*!
+{
+ "name": "JSON",
+ "property": "json",
+ "caniuse": "json",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "http://developer.mozilla.org/en/JSON"
+ }],
+ "polyfills": ["json2"]
+}
+!*/
+/* DOC
+Detects native support for JSON handling functions.
+*/
+
+ // this will also succeed if you've loaded the JSON2.js polyfill ahead of time
+ // ... but that should be obvious. :)
+
+ Modernizr.addTest('json', 'JSON' in window && 'parse' in JSON && 'stringify' in JSON);
+
+/*!
+{
+ "name": "ES5 Syntax",
+ "property": "es5syntax",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "http://kangax.github.io/es5-compat-table/"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["This detect uses `eval()`, so CSP may be a problem."],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser accepts ECMAScript 5 syntax.
+*/
+
+ Modernizr.addTest('es5syntax', function() {
+ var value, obj, stringAccess, getter, setter, reservedWords, zeroWidthChars;
+ try {
+ // Property access on strings
+ stringAccess = eval('"foobar"[3] === "b"');
+ // Getter in property initializer
+ getter = eval('({ get x(){ return 1 } }).x === 1');
+ eval('({ set x(v){ value = v; } }).x = 1');
+ // Setter in property initializer
+ setter = value === 1;
+ // Reserved words as property names
+ eval('obj = ({ if: 1 })');
+ reservedWords = obj['if'] === 1;
+ // Zero-width characters in identifiers
+ zeroWidthChars = eval('_\u200c\u200d = true');
+
+ return stringAccess && getter && setter && reservedWords && zeroWidthChars;
+ } catch (ignore) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "ES5 Immutable Undefined",
+ "property": "es5undefined",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "http://kangax.github.io/es5-compat-table/"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser prevents assignment to global `undefined` per ECMAScript 5.
+*/
+
+ Modernizr.addTest('es5undefined', function() {
+ var result, originalUndefined;
+ try {
+ originalUndefined = window.undefined;
+ window.undefined = 12345;
+ result = typeof window.undefined === 'undefined';
+ window.undefined = originalUndefined;
+ } catch (e) {
+ return false;
+ }
+ return result;
+ });
+
+/*!
+{
+ "name": "ES5",
+ "property": "es5",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim", "es5sham"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements everything as specified in ECMAScript 5.
+*/
+
+ Modernizr.addTest('es5', function() {
+ return !!(
+ Modernizr.es5array &&
+ Modernizr.es5date &&
+ Modernizr.es5function &&
+ Modernizr.es5object &&
+ Modernizr.strictmode &&
+ Modernizr.es5string &&
+ Modernizr.json &&
+ Modernizr.es5syntax &&
+ Modernizr.es5undefined
+ );
+ });
+
+/*!
+{
+ "name": "ES6 Array",
+ "property": "es6array",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Array per specification.
+*/
+
+ Modernizr.addTest('es6array', !!(Array.prototype &&
+ Array.prototype.copyWithin &&
+ Array.prototype.fill &&
+ Array.prototype.find &&
+ Array.prototype.findIndex &&
+ Array.prototype.keys &&
+ Array.prototype.entries &&
+ Array.prototype.values &&
+ Array.from &&
+ Array.of));
+
+/*!
+{
+ "name": "ES5 String.prototype.contains",
+ "property": "contains",
+ "authors": ["Robert Kowalski"],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 `String.prototype.contains` per specification.
+*/
+
+ Modernizr.addTest('contains', is(String.prototype.contains, 'function'));
+
+/*!
+{
+ "name": "ES6 Generators",
+ "property": "generators",
+ "authors": ["Michael Kachanovskyi"],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Generators per specification.
+*/
+
+ Modernizr.addTest('generators', function() {
+ try {
+ /* jshint evil: true */
+ new Function('function* test() {}')();
+ } catch (e) {
+ return false;
+ }
+ return true;
+ });
+
+/*!
+{
+ "name": "ES6 Math",
+ "property": "es6math",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Math per specification.
+*/
+
+ Modernizr.addTest('es6math', !!(Math &&
+ Math.clz32 &&
+ Math.cbrt &&
+ Math.imul &&
+ Math.sign &&
+ Math.log10 &&
+ Math.log2 &&
+ Math.log1p &&
+ Math.expm1 &&
+ Math.cosh &&
+ Math.sinh &&
+ Math.tanh &&
+ Math.acosh &&
+ Math.asinh &&
+ Math.atanh &&
+ Math.hypot &&
+ Math.trunc &&
+ Math.fround));
+
+/*!
+{
+ "name": "ES6 Number",
+ "property": "es6number",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Number per specification.
+*/
+
+ Modernizr.addTest('es6number', !!(Number.isFinite &&
+ Number.isInteger &&
+ Number.isSafeInteger &&
+ Number.isNaN &&
+ Number.parseInt &&
+ Number.parseFloat &&
+ Number.isInteger(Number.MAX_SAFE_INTEGER) &&
+ Number.isInteger(Number.MIN_SAFE_INTEGER) &&
+ Number.isFinite(Number.EPSILON)));
+
+/*!
+{
+ "name": "ES6 Object",
+ "property": "es6object",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Object per specification.
+*/
+
+ Modernizr.addTest('es6object', !!(Object.assign &&
+ Object.is &&
+ Object.setPrototypeOf));
+
+/*!
+{
+ "name": "ES6 Promises",
+ "property": "promises",
+ "caniuse": "promises",
+ "polyfills": ["es6promises"],
+ "authors": ["Krister Kari", "Jake Archibald"],
+ "tags": ["es6"],
+ "notes": [{
+ "name": "The ES6 promises spec",
+ "href": "https://github.com/domenic/promises-unwrapping"
+ },{
+ "name": "Chromium dashboard - ES6 Promises",
+ "href": "http://www.chromestatus.com/features/5681726336532480"
+ },{
+ "name": "JavaScript Promises: There and back again - HTML5 Rocks",
+ "href": "http://www.html5rocks.com/en/tutorials/es6/promises/"
+ }]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Promises per specification.
+*/
+
+ Modernizr.addTest('promises', function() {
+ return 'Promise' in window &&
+ // Some of these methods are missing from
+ // Firefox/Chrome experimental implementations
+ 'resolve' in window.Promise &&
+ 'reject' in window.Promise &&
+ 'all' in window.Promise &&
+ 'race' in window.Promise &&
+ // Older version of the spec had a resolver object
+ // as the arg rather than a function
+ (function() {
+ var resolve;
+ new window.Promise(function(r) { resolve = r; });
+ return typeof resolve === 'function';
+ }());
+ });
+
+/*!
+{
+ "name": "ES6 String",
+ "property": "es6string",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 String per specification.
+*/
+
+ Modernizr.addTest('es6string', !!(String.fromCodePoint &&
+ String.raw &&
+ String.prototype.codePointAt &&
+ String.prototype.repeat &&
+ String.prototype.startsWith &&
+ String.prototype.endsWith &&
+ String.prototype.contains));
+
+/*!
+{
+ "name": "Orientation and Motion Events",
+ "property": ["devicemotion", "deviceorientation"],
+ "caniuse": "deviceorientation",
+ "notes": [{
+ "name": "W3C Editor's Draft",
+ "href": "http://dev.w3.org/geo/api/spec-source-orientation.html"
+ },{
+ "name": "Implementation by iOS Safari (Orientation)",
+ "href": "http://goo.gl/fhce3"
+ },{
+ "name": "Implementation by iOS Safari (Motion)",
+ "href": "http://goo.gl/rLKz8"
+ }],
+ "authors": ["Shi Chuan"],
+ "tags": ["event"],
+ "builderAliases": ["event_deviceorientation_motion"]
+}
+!*/
+/* DOC
+Part of Device Access aspect of HTML5, same category as geolocation.
+
+`devicemotion` tests for Device Motion Event support, returns boolean value true/false.
+
+`deviceorientation` tests for Device Orientation Event support, returns boolean value true/false
+*/
+
+ Modernizr.addTest('devicemotion', 'DeviceMotionEvent' in window);
+ Modernizr.addTest('deviceorientation', 'DeviceOrientationEvent' in window);
+
+/*!
+{
+ "name": "onInput Event",
+ "property": "oninput",
+ "notes": [{
+ "name": "MDN article",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.oninput"
+ },{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors"
+ },{
+ "name": "Detecting onInput support",
+ "href": "http://danielfriesen.name/blog/2010/02/16/html5-browser-maze-oninput-support"
+ }],
+ "authors": ["Patrick Kettner"],
+ "tags": ["event"]
+}
+!*/
+/* DOC
+`oninput` tests if the browser is able to detect the input event
+*/
+
+
+ Modernizr.addTest('oninput', function() {
+ var input = createElement('input');
+ var supportsOnInput;
+ input.setAttribute('oninput', 'return');
+
+ if (hasEvent('oninput', docElement) || typeof input.oninput == 'function') {
+ return true;
+ }
+
+ // IE doesn't support onInput, so we wrap up the non IE APIs
+ // (createEvent, addEventListener) in a try catch, rather than test for
+ // their trident equivalent.
+ try {
+ // Older Firefox didn't map oninput attribute to oninput property
+ var testEvent = document.createEvent('KeyboardEvent');
+ supportsOnInput = false;
+ var handler = function(e) {
+ supportsOnInput = true;
+ e.preventDefault();
+ e.stopPropagation();
+ };
+
+ testEvent.initKeyEvent('keypress', true, true, window, false, false, false, false, 0, 'e'.charCodeAt(0));
+ docElement.appendChild(input);
+ input.addEventListener('input', handler, false);
+ input.focus();
+ input.dispatchEvent(testEvent);
+ input.removeEventListener('input', handler, false);
+ docElement.removeChild(input);
+ } catch (e) {
+ supportsOnInput = false;
+ }
+ return supportsOnInput;
+ });
+
+/*!
+{
+ "name": "Event Listener",
+ "property": "eventlistener",
+ "authors": ["Andrew Betts (@triblondon)"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Registration-interfaces"
+ }],
+ "polyfills": ["eventlistener"]
+}
+!*/
+/* DOC
+Detects native support for addEventListener
+*/
+
+ Modernizr.addTest('eventlistener', 'addEventListener' in window);
+
+/*!
+{
+ "name": "EXIF Orientation",
+ "property": "exiforientation",
+ "tags": ["image"],
+ "builderAliases": ["exif_orientation"],
+ "async": true,
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "Article by Dave Perrett",
+ "href": "http://recursive-design.com/blog/2012/07/28/exif-orientation-handling-is-a-ghetto/"
+ },{
+ "name": "Article by Calvin Hass",
+ "href": "http://www.impulseadventure.com/photo/exif-orientation.html"
+ }]
+}
+!*/
+/* DOC
+Detects support for EXIF Orientation in JPEG images.
+
+iOS looks at the EXIF Orientation flag in JPEGs and rotates the image accordingly. Most desktop browsers just ignore this data.
+*/
+
+ // Bug trackers:
+ // bugzil.la/298619 (unimplemented)
+ // crbug.com/56845 (looks incomplete)
+ // webk.it/19688 (available upstream but its up all ports to turn on individually)
+ Modernizr.addAsyncTest(function() {
+ var img = new Image();
+
+ img.onerror = function() {
+ addTest('exiforientation', false, {aliases: ['exif-orientation']});
+ };
+
+ img.onload = function() {
+ addTest('exiforientation', img.width !== 2, {aliases: ['exif-orientation']});
+ };
+
+ // There may be a way to shrink this more, it's a 1x2 white jpg with the orientation flag set to 6
+ img.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q==';
+ });
+
+/*!
+{
+ "name": "File API",
+ "property": "filereader",
+ "caniuse": "fileapi",
+ "notes": [{
+ "name": "W3C Working Draft",
+ "href": "http://www.w3.org/TR/FileAPI/"
+ }],
+ "tags": ["file"],
+ "builderAliases": ["file_api"],
+ "knownBugs": ["Will fail in Safari 5 due to its lack of support for the standards defined FileReader object"]
+}
+!*/
+/* DOC
+`filereader` tests for the File API specification
+
+Tests for objects specific to the File API W3C specification without
+being redundant (don't bother testing for Blob since it is assumed
+to be the File object's prototype.)
+*/
+
+ Modernizr.addTest('filereader', !!(window.File && window.FileList && window.FileReader));
+
+/*!
+{
+ "name": "Filesystem API",
+ "property": "filesystem",
+ "caniuse": "filesystem",
+ "notes": [{
+ "name": "W3 Draft",
+ "href": "dev.w3.org/2009/dap/file-system/file-dir-sys.html"
+ }],
+ "authors": ["Eric Bidelman (@ebidel)"],
+ "tags": ["file"],
+ "builderAliases": ["file_filesystem"],
+ "knownBugs": ["The API will be present in Chrome incognito, but will throw an exception. See crbug.com/93417"]
+}
+!*/
+
+ Modernizr.addTest('filesystem', !!prefixed('requestFileSystem', window));
+
+/*!
+ {
+ "name": "Flash",
+ "property": "flash",
+ "tags": ["flash"],
+ "polyfills": ["shumway"]
+ }
+ !*/
+/* DOC
+Detects support flash, as well as flash blocking plugins
+*/
+
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ var removeFakeBody = function(body) {
+ // If we’re rockin’ an attached fake body, clean it up
+ if (body.fake && body.parentNode) {
+ body.parentNode.removeChild(body);
+ }
+ };
+ var runTest = function(result, embed) {
+ var bool = !!result;
+ if (bool) {
+ bool = new Boolean(bool);
+ bool.blocked = (result === 'blocked');
+ }
+ addTest('flash', function() { return bool; });
+
+ if (embed && body.contains(embed)) {
+
+ // in case embed has been wrapped, as with ClickToPlugin
+ while (embed.parentNode !== body) {
+ embed = embed.parentNode;
+ }
+
+ body.removeChild(embed);
+ }
+
+ };
+ var easy_detect;
+ var activex;
+ // we wrap activex in a try/catch because when flash is disabled through
+ // ActiveX controls, it throws an error.
+ try {
+ // Pan is an API that exists for flash objects.
+ activex = 'ActiveXObject' in window && 'Pan' in new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash');
+ } catch (e) {}
+
+ easy_detect = !(('plugins' in navigator && 'Shockwave Flash' in navigator.plugins) || activex);
+
+ if (easy_detect || isSVG) {
+ runTest(false);
+ }
+ else {
+ // flash seems to be installed, but it might be blocked. We have to
+ // actually create an element to see what happens to it.
+ var embed = createElement('embed');
+ var body = getBody();
+ var blockedDetect;
+ var inline_style;
+
+ embed.type = 'application/x-shockwave-flash';
+
+ // Need to do this in the body (fake or otherwise) otherwise IE8 complains
+ body.appendChild(embed);
+ docElement.appendChild(body);
+
+ // Pan doesn't exist in the embed if its IE (its on the ActiveXObjeect)
+ // so this check is for all other browsers.
+ if (!('Pan' in embed) && !activex) {
+ runTest('blocked', embed);
+ removeFakeBody(body);
+ return;
+ }
+
+ blockedDetect = function() {
+ // if we used a fake body originally, we need to restart this test, since
+ // we haven't been attached to the DOM, and therefore none of the blockers
+ // have had time to work.
+ if (!docElement.contains(body)) {
+ body = document.body || body;
+ embed = createElement('embed');
+ embed.type = 'application/x-shockwave-flash';
+ body.appendChild(embed);
+ return setTimeout(blockedDetect, 1000);
+ }
+ if (!docElement.contains(embed)) {
+ runTest('blocked');
+ }
+ else {
+ inline_style = embed.style.cssText;
+ if (inline_style !== '') {
+ // the style of the element has changed automatically. This is a
+ // really poor heuristic, but for lower end flash blocks, it the
+ // only change they can make.
+ runTest('blocked', embed);
+ }
+ else {
+ runTest(true, embed);
+ }
+ }
+ removeFakeBody(body);
+ };
+
+ // If we have got this far, there is still a chance a userland plugin
+ // is blocking us (either changing the styles, or automatically removing
+ // the element). Both of these require us to take a step back for a moment
+ // to allow for them to get time of the thread, hence a setTimeout.
+ //
+ setTimeout(blockedDetect, 10);
+ }
+ });
+
+/*!
+{
+ "name": "input[capture] Attribute",
+ "property": "capture",
+ "tags": ["video", "image", "audio", "media", "attribute"],
+ "notes": [{
+ "name": "W3C draft: HTML Media Capture",
+ "href": "http://www.w3.org/TR/html-media-capture/"
+ }]
+}
+!*/
+/* DOC
+When used on an `<input>`, this attribute signifies that the resource it takes should be generated via device's camera, camcorder, sound recorder.
+*/
+
+ // testing for capture attribute in inputs
+ Modernizr.addTest('capture', ('capture' in createElement('input')));
+
+/*!
+{
+ "name": "input[file] Attribute",
+ "property": "fileinput",
+ "caniuse" : "forms",
+ "tags": ["file", "forms", "input"],
+ "builderAliases": ["forms_fileinput"]
+}
+!*/
+/* DOC
+Detects whether input type="file" is available on the platform
+
+E.g. iOS < 6 and some android version don't support this
+*/
+
+ Modernizr.addTest('fileinput', function() {
+ if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) {
+ return false;
+ }
+ var elem = createElement('input');
+ elem.type = 'file';
+ return !elem.disabled;
+ });
+
+/*!
+{
+ "name": "input[directory] Attribute",
+ "property": "directory",
+ "authors": ["silverwind"],
+ "tags": ["file", "input", "attribute"]
+}
+!*/
+/* DOC
+When used on an `<input type="file">`, the `directory` attribute instructs
+the user agent to present a directory selection dialog instead of the usual
+file selection dialog.
+*/
+
+ Modernizr.addTest('fileinputdirectory', function() {
+ var elem = createElement('input'), dir = 'directory';
+ elem.type = 'file';
+ if (dir in elem) {
+ return true;
+ } else {
+ for (var i = 0, len = domPrefixes.length; i < len; i++) {
+ if (domPrefixes[i] + dir in elem) {
+ return true;
+ }
+ }
+ }
+ return false;
+ });
+
+/*!
+{
+ "name": "input[form] Attribute",
+ "property": "formattribute",
+ "tags": ["attribute", "forms", "input"],
+ "builderAliases": ["forms_formattribute"]
+}
+!*/
+/* DOC
+Detects whether input form="form_id" is available on the platform
+E.g. IE 10 (and below), don't support this
+*/
+
+
+ Modernizr.addTest('formattribute', function() {
+ var form = createElement('form');
+ var input = createElement('input');
+ var div = createElement('div');
+ var id = 'formtest' + (new Date()).getTime();
+ var attr;
+ var bool = false;
+
+ form.id = id;
+
+ //IE6/7 confuses the form idl attribute and the form content attribute, so we use document.createAttribute
+ try {
+ input.setAttribute('form', id);
+ }
+ catch (e) {
+ if (document.createAttribute) {
+ attr = document.createAttribute('form');
+ attr.nodeValue = id;
+ input.setAttributeNode(attr);
+ }
+ }
+
+ div.appendChild(form);
+ div.appendChild(input);
+
+ docElement.appendChild(div);
+
+ bool = form.elements && form.elements.length === 1 && input.form == form;
+
+ div.parentNode.removeChild(div);
+ return bool;
+ });
+
+/*!
+{
+ "name": "Form input types",
+ "property": "inputtypes",
+ "caniuse": "forms",
+ "tags": ["forms"],
+ "authors": ["Mike Taylor"],
+ "polyfills": [
+ "jquerytools",
+ "webshims",
+ "h5f",
+ "webforms2",
+ "nwxforms",
+ "fdslider",
+ "html5slider",
+ "galleryhtml5forms",
+ "jscolor",
+ "html5formshim",
+ "selectedoptionsjs",
+ "formvalidationjs"
+ ]
+}
+!*/
+/* DOC
+Detects support for HTML5 form input types and exposes Boolean subproperties with the results:
+
+```javascript
+Modernizr.inputtypes.color
+Modernizr.inputtypes.date
+Modernizr.inputtypes.datetime
+Modernizr.inputtypes['datetime-local']
+Modernizr.inputtypes.email
+Modernizr.inputtypes.month
+Modernizr.inputtypes.number
+Modernizr.inputtypes.range
+Modernizr.inputtypes.search
+Modernizr.inputtypes.tel
+Modernizr.inputtypes.time
+Modernizr.inputtypes.url
+Modernizr.inputtypes.week
+```
+*/
+
+ // Run through HTML5's new input types to see if the UA understands any.
+ // This is put behind the tests runloop because it doesn't return a
+ // true/false like all the other tests; instead, it returns an object
+ // containing each input type with its corresponding true/false value
+
+ // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
+ var inputtypes = 'search tel url email datetime date month week time datetime-local number range color'.split(' ');
+ var inputs = {};
+
+ Modernizr['inputtypes'] = (function(props) {
+ var len = props.length;
+ var smile = ':)';
+ var inputElemType;
+ var defaultView;
+ var bool;
+
+ for (var i = 0; i < len; i++) {
+
+ inputElem.setAttribute('type', inputElemType = props[i]);
+ bool = inputElem.type !== 'text' && 'style' in inputElem;
+
+ // We first check to see if the type we give it sticks..
+ // If the type does, we feed it a textual value, which shouldn't be valid.
+ // If the value doesn't stick, we know there's input sanitization which infers a custom UI
+ if (bool) {
+
+ inputElem.value = smile;
+ inputElem.style.cssText = 'position:absolute;visibility:hidden;';
+
+ if (/^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined) {
+
+ docElement.appendChild(inputElem);
+ defaultView = document.defaultView;
+
+ // Safari 2-4 allows the smiley as a value, despite making a slider
+ bool = defaultView.getComputedStyle &&
+ defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
+ // Mobile android web browser has false positive, so must
+ // check the height to see if the widget is actually there.
+ (inputElem.offsetHeight !== 0);
+
+ docElement.removeChild(inputElem);
+
+ } else if (/^(search|tel)$/.test(inputElemType)) {
+ // Spec doesn't define any special parsing or detectable UI
+ // behaviors so we pass these through as true
+
+ // Interestingly, opera fails the earlier test, so it doesn't
+ // even make it here.
+
+ } else if (/^(url|email|number)$/.test(inputElemType)) {
+ // Real url and email support comes with prebaked validation.
+ bool = inputElem.checkValidity && inputElem.checkValidity() === false;
+
+ } else {
+ // If the upgraded input compontent rejects the :) text, we got a winner
+ bool = inputElem.value != smile;
+ }
+ }
+
+ inputs[ props[i] ] = !!bool;
+ }
+ return inputs;
+ })(inputtypes);
+
+/*!
+{
+ "name": "Form Validation",
+ "property": "formvalidation",
+ "tags": ["forms", "validation", "attribute"],
+ "builderAliases": ["forms_validation"]
+}
+!*/
+/* DOC
+This implementation only tests support for interactive form validation.
+To check validation for a specific type or a specific other constraint,
+the test can be combined:
+
+- `Modernizr.inputtypes.number && Modernizr.formvalidation` (browser supports rangeOverflow, typeMismatch etc. for type=number)
+- `Modernizr.input.required && Modernizr.formvalidation` (browser supports valueMissing)
+*/
+
+ Modernizr.addTest('formvalidation', function() {
+ var form = createElement('form');
+ if (!('checkValidity' in form) || !('addEventListener' in form)) {
+ return false;
+ }
+ if ('reportValidity' in form) {
+ return true;
+ }
+ var invalidFired = false;
+ var input;
+
+ Modernizr.formvalidationapi = true;
+
+ // Prevent form from being submitted
+ form.addEventListener('submit', function(e) {
+ //Opera does not validate form, if submit is prevented
+ if (!window.opera) {
+ e.preventDefault();
+ }
+ e.stopPropagation();
+ }, false);
+
+ // Calling form.submit() doesn't trigger interactive validation,
+ // use a submit button instead
+ //older opera browsers need a name attribute
+ form.innerHTML = '<input name="modTest" required><button></button>';
+
+ testStyles('#modernizr form{position:absolute;top:-99999em}', function(node) {
+ node.appendChild(form);
+
+ input = form.getElementsByTagName('input')[0];
+
+ // Record whether "invalid" event is fired
+ input.addEventListener('invalid', function(e) {
+ invalidFired = true;
+ e.preventDefault();
+ e.stopPropagation();
+ }, false);
+
+ //Opera does not fully support the validationMessage property
+ Modernizr.formvalidationmessage = !!input.validationMessage;
+
+ // Submit form by clicking submit button
+ form.getElementsByTagName('button')[0].click();
+ });
+
+ return invalidFired;
+ });
+
+/*!
+{
+ "name": "input[type=\"number\"] Localization",
+ "property": "localizednumber",
+ "tags": ["forms", "localization", "attribute"],
+ "authors": ["Peter Janes"],
+ "notes": [{
+ "name": "Webkit Bug Tracker Listing",
+ "href": "https://bugs.webkit.org/show_bug.cgi?id=42484"
+ },{
+ "name": "Based on This",
+ "href": "http://trac.webkit.org/browser/trunk/LayoutTests/fast/forms/script-tests/input-number-keyoperation.js?rev=80096#L9"
+ }],
+ "knownBugs": ["Only ever returns true if the browser/OS is configured to use comma as a decimal separator. This is probably fine for most use cases."]
+}
+!*/
+/* DOC
+Detects whether input type="number" is capable of receiving and displaying localized numbers, e.g. with comma separator.
+*/
+
+ Modernizr.addTest('localizednumber', function() {
+ // this extends our testing of input[type=number], so bomb out if that's missing
+ if (!Modernizr.inputtypes.number) { return false; }
+ // we rely on checkValidity later, so bomb out early if we don't have it
+ if (!Modernizr.formvalidation) { return false; }
+
+ var el = createElement('div');
+ var diff;
+ var body = getBody();
+
+ var root = (function() {
+ return docElement.insertBefore(body, docElement.firstElementChild || docElement.firstChild);
+ }());
+ el.innerHTML = '<input type="number" value="1.0" step="0.1"/>';
+ var input = el.childNodes[0];
+ root.appendChild(el);
+ input.focus();
+ try {
+ document.execCommand('InsertText', false, '1,1');
+ } catch (e) { // prevent warnings in IE
+ }
+ diff = input.type === 'number' && input.valueAsNumber === 1.1 && input.checkValidity();
+ root.removeChild(el);
+ body.fake && root.parentNode.removeChild(root);
+ return diff;
+ });
+
+
+/*!
+{
+ "name": "placeholder attribute",
+ "property": "placeholder",
+ "tags": ["forms", "attribute"],
+ "builderAliases": ["forms_placeholder"]
+}
+!*/
+/* DOC
+Tests for placeholder attribute in inputs and textareas
+*/
+
+ Modernizr.addTest('placeholder', ('placeholder' in createElement('input') && 'placeholder' in createElement('textarea')));
+
+/*!
+{
+ "name": "form#requestAutocomplete()",
+ "property": "requestautocomplete",
+ "tags": ["form", "forms", "requestAutocomplete", "payments"],
+ "notes": [{
+ "name": "WHATWG proposed spec",
+ "href": "http://wiki.whatwg.org/wiki/RequestAutocomplete"
+ }]
+}
+!*/
+/* DOC
+When used with input[autocomplete] to annotate a form, form.requestAutocomplete() shows a dialog in Chrome that speeds up
+checkout flows (payments specific for now).
+*/
+
+ Modernizr.addTest('requestautocomplete', !!prefixed('requestAutocomplete', createElement('form')));
+
+/*!
+{
+ "name": "Fullscreen API",
+ "property": "fullscreen",
+ "caniuse": "fullscreen",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/API/Fullscreen"
+ }],
+ "polyfills": ["screenfulljs"],
+ "builderAliases": ["fullscreen_api"]
+}
+!*/
+/* DOC
+Detects support for the ability to make the current website take over the user's entire screen
+*/
+
+ // github.com/Modernizr/Modernizr/issues/739
+ Modernizr.addTest('fullscreen', !!(prefixed('exitFullscreen', document, false) || prefixed('cancelFullScreen', document, false)));
+
+/*!
+{
+ "name": "GamePad API",
+ "property": "gamepads",
+ "authors": ["Eric Bidelman"],
+ "tags": ["media"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/gamepad/"
+ },{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/doodles/gamepad/#toc-featuredetect"
+ }],
+ "warnings": [],
+ "polyfills": []
+}
+!*/
+/* DOC
+Detects support for the Gamepad API, for access to gamepads and controllers.
+*/
+
+
+ Modernizr.addTest('gamepads', !!prefixed('getGamepads', navigator));
+
+/*!
+{
+ "name": "Geolocation API",
+ "property": "geolocation",
+ "caniuse": "geolocation",
+ "tags": ["media"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation"
+ }],
+ "polyfills": [
+ "joshuabell-polyfill",
+ "webshims",
+ "geo-location-javascript",
+ "geolocation-api-polyfill"
+ ]
+}
+!*/
+/* DOC
+Detects support for the Geolocation API for users to provide their location to web applications.
+*/
+
+ // geolocation is often considered a trivial feature detect...
+ // Turns out, it's quite tricky to get right:
+ //
+ // Using !!navigator.geolocation does two things we don't want. It:
+ // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
+ // 2. Disables page caching in WebKit: webk.it/43956
+ //
+ // Meanwhile, in Firefox < 8, an about:config setting could expose
+ // a false positive that would throw an exception: bugzil.la/688158
+
+ Modernizr.addTest('geolocation', 'geolocation' in navigator);
+
+/*!
+{
+ "name": "Hashchange event",
+ "property": "hashchange",
+ "caniuse": "hashchange",
+ "tags": ["history"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.onhashchange"
+ }],
+ "polyfills": [
+ "jquery-hashchange",
+ "moo-historymanager",
+ "jquery-ajaxy",
+ "hasher",
+ "shistory"
+ ]
+}
+!*/
+/* DOC
+Detects support for the `hashchange` event, fired when the current location fragment changes.
+*/
+
+ Modernizr.addTest('hashchange', function() {
+ if (hasEvent('hashchange', window) === false) {
+ return false;
+ }
+
+ // documentMode logic from YUI to filter out IE8 Compat Mode
+ // which false positives.
+ return (document.documentMode === undefined || document.documentMode > 7);
+ });
+
+/*!
+{
+ "name": "Hidden Scrollbar",
+ "property": "hiddenscroll",
+ "authors": ["Oleg Korsunsky"]
+}
+!*/
+/* DOC
+Detects whether scrollbars on overflowed blocks are hidden (a-la iPhone)
+*/
+
+ Modernizr.addTest('hiddenscroll', function() {
+ return testStyles('#modernizr {width:100px;height:100px;overflow:scroll}', function(elem) {
+ return elem.offsetWidth === elem.clientWidth;
+ });
+ });
+
+/*!
+{
+ "name": "History API",
+ "property": "history",
+ "caniuse": "history",
+ "tags": ["history"],
+ "authors": ["Hay Kranen", "Alexander Farkas"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/html51/browsers.html#the-history-interface"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.history"
+ }],
+ "polyfills": ["historyjs", "html5historyapi"]
+}
+!*/
+/* DOC
+Detects support for the History API for manipulating the browser session history.
+*/
+
+ Modernizr.addTest('history', function() {
+ // Issue #733
+ // The stock browser on Android 2.2 & 2.3, and 4.0.x returns positive on history support
+ // Unfortunately support is really buggy and there is no clean way to detect
+ // these bugs, so we fall back to a user agent sniff :(
+ var ua = navigator.userAgent;
+
+ // We only want Android 2 and 4.0, stock browser, and not Chrome which identifies
+ // itself as 'Mobile Safari' as well, nor Windows Phone (issue #1471).
+ if ((ua.indexOf('Android 2.') !== -1 ||
+ (ua.indexOf('Android 4.0') !== -1)) &&
+ ua.indexOf('Mobile Safari') !== -1 &&
+ ua.indexOf('Chrome') === -1 &&
+ ua.indexOf('Windows Phone') === -1) {
+ return false;
+ }
+
+ // Return the regular check
+ return (window.history && 'pushState' in window.history);
+ });
+
+/*!
+{
+ "name": "HTML Imports",
+ "notes": [
+ {
+ "name": "W3C HTML Imports Specification",
+ "href": "http://w3c.github.io/webcomponents/spec/imports/"
+ },
+ {
+ "name": "HTML Imports - #include for the web",
+ "href": "http://www.html5rocks.com/en/tutorials/webcomponents/imports/"
+ }
+ ],
+ "polyfills": ["polymer-htmlimports"],
+ "property": "htmlimports",
+ "tags": ["html", "import"]
+}
+!*/
+/* DOC
+Detects support for HTML import, a feature that is used for loading in Web Components.
+ */
+
+
+ addTest('htmlimports', 'import' in createElement('link'));
+
+/*!
+{
+ "name": "IE8 compat mode",
+ "property": "ie8compat",
+ "authors": ["Erich Ocean"]
+}
+!*/
+/* DOC
+Detects whether or not the current browser is IE8 in compatibility mode (i.e. acting as IE7).
+*/
+
+ // In this case, IE8 will be acting as IE7. You may choose to remove features in this case.
+
+ // related:
+ // james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
+
+ Modernizr.addTest('ie8compat', (!window.addEventListener && !!document.documentMode && document.documentMode === 7));
+
+/*!
+{
+ "name": "iframe[sandbox] Attribute",
+ "property": "sandbox",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_sandbox"],
+ "notes": [
+ {
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox"
+ }],
+ "knownBugs": [ "False-positive on Firefox < 29" ]
+}
+!*/
+/* DOC
+Test for `sandbox` attribute in iframes.
+*/
+
+ Modernizr.addTest('sandbox', 'sandbox' in createElement('iframe'));
+
+/*!
+{
+ "name": "iframe[seamless] Attribute",
+ "property": "seamless",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_seamless"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-seamless"
+ }]
+}
+!*/
+/* DOC
+Test for `seamless` attribute in iframes.
+*/
+
+ Modernizr.addTest('seamless', 'seamless' in createElement('iframe'));
+
+/*!
+{
+ "name": "iframe[srcdoc] Attribute",
+ "property": "srcdoc",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_srcdoc"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-srcdoc"
+ }]
+}
+!*/
+/* DOC
+Test for `srcdoc` attribute in iframes.
+*/
+
+ Modernizr.addTest('srcdoc', 'srcdoc' in createElement('iframe'));
+
+/*!
+{
+ "name": "Animated PNG",
+ "async": true,
+ "property": "apng",
+ "tags": ["image"],
+ "builderAliases": ["img_apng"],
+ "notes": [{
+ "name": "Wikipedia Article",
+ "href": "http://en.wikipedia.org/wiki/APNG"
+ }]
+}
+!*/
+/* DOC
+Test for animated png support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ if (!Modernizr.canvas) {
+ return false;
+ }
+
+ var image = new Image();
+ var canvas = createElement('canvas');
+ var ctx = canvas.getContext('2d');
+
+ image.onload = function() {
+ addTest('apng', function() {
+ if (typeof canvas.getContext == 'undefined') {
+ return false;
+ }
+ else {
+ ctx.drawImage(image, 0, 0);
+ return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
+ }
+ });
+ };
+
+ image.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg==';
+ });
+
+/*!
+{
+ "name": "JPEG XR (extended range)",
+ "async": true,
+ "aliases": ["jpeg-xr"],
+ "property": "jpegxr",
+ "tags": ["image"],
+ "notes": [{
+ "name": "Wikipedia Article",
+ "href": "http://en.wikipedia.org/wiki/JPEG_XR"
+ }]
+}
+!*/
+/* DOC
+Test for JPEG XR support
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onload = image.onerror = function() {
+ addTest('jpegxr', image.width == 1, {aliases: ['jpeg-xr']});
+ };
+
+ image.src = 'data:image/vnd.ms-photo;base64,SUm8AQgAAAAFAAG8AQAQAAAASgAAAIC8BAABAAAAAQAAAIG8BAABAAAAAQAAAMC8BAABAAAAWgAAAMG8BAABAAAAHwAAAAAAAAAkw91vA07+S7GFPXd2jckNV01QSE9UTwAZAYBxAAAAABP/gAAEb/8AAQAAAQAAAA==';
+ });
+
+/*!
+{
+ "name": "sizes attribute",
+ "property": "sizes",
+ "tags": ["image"],
+ "authors": ["Mat Marquis"],
+ "notes": [{
+ "name": "Spec",
+ "href": "http://picture.responsiveimages.org/#parse-sizes-attr"
+ },{
+ "name": "Usage Details",
+ "href": "http://ericportis.com/posts/2014/srcset-sizes/"
+ }]
+}
+!*/
+/* DOC
+Test for the `sizes` attribute on images
+*/
+
+ Modernizr.addTest('sizes', 'sizes' in createElement('img'));
+
+/*!
+{
+ "name": "srcset attribute",
+ "property": "srcset",
+ "tags": ["image"],
+ "notes": [{
+ "name": "Smashing Magazine Article",
+ "href": "http://en.wikipedia.org/wiki/APNG"
+ },{
+ "name": "Generate multi-resolution images for srcset with Grunt",
+ "href": "http://addyosmani.com/blog/generate-multi-resolution-images-for-srcset-with-grunt/"
+ }]
+}
+!*/
+/* DOC
+Test for the srcset attribute of images
+*/
+
+ Modernizr.addTest('srcset', 'srcset' in createElement('img'));
+
+/*!
+{
+ "name": "Webp",
+ "async": true,
+ "property": "webp",
+ "tags": ["image"],
+ "builderAliases": ["img_webp"],
+ "authors": ["Krister Kari", "@amandeep", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "Webp Info",
+ "href": "http://code.google.com/speed/webp/"
+ }, {
+ "name": "Chormium blog - Chrome 32 Beta: Animated WebP images and faster Chrome for Android touch input",
+ "href": "http://blog.chromium.org/2013/11/chrome-32-beta-animated-webp-images-and.html"
+ }, {
+ "name": "Webp Lossless Spec",
+ "href": "https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification"
+ }, {
+ "name": "Article about WebP support on Android browsers",
+ "href": "http://www.wope-framework.com/en/2013/06/24/webp-support-on-android-browsers/"
+ }, {
+ "name": "Chormium WebP announcement",
+ "href": "http://blog.chromium.org/2011/11/lossless-and-transparency-encoding-in.html?m=1"
+ }]
+}
+!*/
+/* DOC
+Tests for lossy, non-alpha webp support.
+
+Tests for all forms of webp support (lossless, lossy, alpha, and animated)..
+
+ Modernizr.webp // Basic support (lossy)
+ Modernizr.webp.lossless // Lossless
+ Modernizr.webp.alpha // Alpha (both lossy and lossless)
+ Modernizr.webp.animation // Animated WebP
+
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+
+ var webpTests = [{
+ 'uri': 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=',
+ 'name': 'webp'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==',
+ 'name': 'webp.alpha'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA',
+ 'name': 'webp.animation'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=',
+ 'name': 'webp.lossless'
+ }];
+
+ var webp = webpTests.shift();
+ function test(name, uri, cb) {
+
+ var image = new Image();
+
+ function addResult(event) {
+ // if the event is from 'onload', check the see if the image's width is
+ // 1 pixel (which indiciates support). otherwise, it fails
+
+ var result = event && event.type === 'load' ? image.width == 1 : false;
+ var baseTest = name === 'webp';
+
+ /* jshint -W053 */
+ addTest(name, baseTest ? new Boolean(result) : result);
+
+ if (cb) {
+ cb(event);
+ }
+ }
+
+ image.onerror = addResult;
+ image.onload = addResult;
+
+ image.src = uri;
+ }
+
+ // test for webp support in general
+ test(webp.name, webp.uri, function(e) {
+ // if the webp test loaded, test everything else.
+ if (e && e.type === 'load') {
+ for (var i = 0; i < webpTests.length; i++) {
+ test(webpTests[i].name, webpTests[i].uri);
+ }
+ }
+ });
+
+ });
+
+
+/*!
+{
+ "name": "Webp Alpha",
+ "async": true,
+ "property": "webpalpha",
+ "aliases": ["webp-alpha"],
+ "tags": ["image"],
+ "authors": ["Krister Kari", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "WebP Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Article about WebP support on Android browsers",
+ "href": "http://www.wope-framework.com/en/2013/06/24/webp-support-on-android-browsers/"
+ },{
+ "name": "Chromium WebP announcement",
+ "href": "http://blog.chromium.org/2011/11/lossless-and-transparency-encoding-in.html?m=1"
+ }]
+}
+!*/
+/* DOC
+Tests for transparent webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webpalpha', false, {aliases: ['webp-alpha']});
+ };
+
+ image.onload = function() {
+ addTest('webpalpha', image.width == 1, {aliases: ['webp-alpha']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==';
+ });
+
+/*!
+{
+ "name": "Webp Animation",
+ "async": true,
+ "property": "webpanimation",
+ "aliases": ["webp-animation"],
+ "tags": ["image"],
+ "authors": ["Krister Kari", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "WebP Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Chromium blog - Chrome 32 Beta: Animated WebP images and faster Chrome for Android touch input",
+ "href": "http://blog.chromium.org/2013/11/chrome-32-beta-animated-webp-images-and.html"
+ }]
+}
+!*/
+/* DOC
+Tests for animated webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webpanimation', false, {aliases: ['webp-animation']});
+ };
+
+ image.onload = function() {
+ addTest('webpanimation', image.width == 1, {aliases: ['webp-animation']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA';
+ });
+
+/*!
+{
+ "name": "Webp Lossless",
+ "async": true,
+ "property": ["webplossless", "webp-lossless"],
+ "tags": ["image"],
+ "authors": ["@amandeep", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "Webp Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Webp Lossless Spec",
+ "href": "https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification"
+ }]
+}
+!*/
+/* DOC
+Tests for non-alpha lossless webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webplossless', false, {aliases: ['webp-lossless']});
+ };
+
+ image.onload = function() {
+ addTest('webplossless', image.width == 1, {aliases: ['webp-lossless']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=';
+ });
+
+/*!
+{
+ "name": "IndexedDB",
+ "property": "indexeddb",
+ "caniuse": "indexeddb",
+ "tags": ["storage"],
+ "polyfills": ["indexeddb"]
+}
+!*/
+/* DOC
+Detects support for the IndexedDB client-side storage API (final spec).
+*/
+
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+
+ var indexeddb = prefixed('indexedDB', window);
+ Modernizr.addTest('indexeddb', !!indexeddb);
+
+ if (!!indexeddb) {
+ Modernizr.addTest('indexeddb.deletedatabase', 'deleteDatabase' in indexeddb);
+ }
+;
+/*!
+{
+ "name": "IndexedDB Blob",
+ "property": "indexeddbblob"
+}
+!*/
+/* DOC
+Detects if the browser can save File/Blob objects to IndexedDB
+*/
+
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+ var indexeddb = prefixed('indexedDB', window);
+ var dbname = 'detect-blob-support';
+ var supportsBlob = false;
+ var request;
+ var db;
+
+ if (!(Modernizr.indexeddb && Modernizr.indexeddb.deleteDatabase)) {
+ return false;
+ }
+
+ // Calling `deleteDatabase` in a try…catch because some contexts (e.g. data URIs)
+ // will throw a `SecurityError`
+ try {
+ indexeddb.deleteDatabase(dbname).onsuccess = function() {
+ request = indexeddb.open(dbname, 1);
+ request.onupgradeneeded = function() {
+ request.result.createObjectStore('store');
+ };
+ request.onsuccess = function() {
+ db = request.result;
+ try {
+ db.transaction('store', 'readwrite').objectStore('store').put(new Blob(), 'key');
+ supportsBlob = true;
+ }
+ catch (e) {
+ supportsBlob = false;
+ }
+ finally {
+ addTest('indexeddbblob', supportsBlob);
+ db.close();
+ indexeddb.deleteDatabase(dbname);
+ }
+ };
+ };
+ }
+ catch (e) {
+ addTest('indexeddbblob', false);
+ }
+ });
+
+/*!
+{
+ "name": "input formaction",
+ "property": "inputformaction",
+ "aliases": ["input-formaction"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formaction"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/13-formaction.html"
+ }],
+ "polyfills": [
+ "webshims"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formaction attribute on form inputs
+*/
+
+ Modernizr.addTest('inputformaction', !!('formAction' in createElement('input')), {aliases: ['input-formaction']});
+
+/*!
+{
+ "name": "input formenctype",
+ "property": "inputformenctype",
+ "aliases": ["input-formenctype"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formenctype"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/16-formenctype.html"
+ }],
+ "polyfills": [
+ "html5formshim"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formenctype attribute on form inputs, which overrides the form enctype attribute
+*/
+
+ Modernizr.addTest('inputformenctype', !!('formEnctype' in createElement('input')), {aliases: ['input-formenctype']});
+
+/*!
+{
+ "name": "input formmethod",
+ "property": "inputformmethod",
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formmethod"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/14-formmethod.html"
+ }],
+ "polyfills": [
+ "webshims"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formmethod attribute on form inputs
+*/
+
+ Modernizr.addTest('inputformmethod', !!('formMethod' in createElement('input')));
+
+/*!
+{
+ "name": "input formtarget",
+ "property": "inputformtarget",
+ "aliases": ["input-formtarget"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formtarget"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/15-formtarget.html"
+ }],
+ "polyfills": [
+ "html5formshim"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formtarget attribute on form inputs, which overrides the form target attribute
+*/
+
+ Modernizr.addTest('inputformtarget', !!('formtarget' in createElement('input')), {aliases: ['input-formtarget']});
+
+/*!
+{
+ "name": "input[search] search event",
+ "property": "search",
+ "tags": ["input","search"],
+ "authors": ["Calvin Webster"],
+ "notes": [{
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/types/5-search.html?"
+ }, {
+ "name": "CSS Tricks",
+ "href": "http://css-tricks.com/webkit-html5-search-inputs/"
+ }]
+}
+!*/
+/* DOC
+There is a custom `search` event implemented in webkit browsers when using an `input[search]` element.
+*/
+
+ Modernizr.addTest('inputsearchevent', hasEvent('search'));
+
+/*!
+ {
+ "name": "Internationalization API",
+ "property": "intl",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl"
+ },{
+ "name": "ECMAScript spec",
+ "href": "http://www.ecma-international.org/ecma-402/1.0/"
+ }]
+ }
+ !*/
+/* DOC
+Detects support for the Internationalization API which allow easy formatting of number and dates and sorting string
+based on a locale
+*/
+
+ Modernizr.addTest('intl', !!prefixed('Intl', window));
+
+/*!
+{
+ "name": "Reverse Ordered Lists",
+ "property": "olreversed",
+ "notes": [{
+ "name": "Impressive Webs article",
+ "href": "http://impressivewebs.com/reverse-ordered-lists-html5"
+ }],
+ "builderAliases": ["lists_reversed"]
+}
+!*/
+/* DOC
+Detects support for the `reversed` attribute on the `<ol>` element.
+*/
+
+ Modernizr.addTest('olreversed', 'reversed' in createElement('ol'));
+
+/*!
+{
+ "name": "MathML",
+ "property": "mathml",
+ "caniuse": "mathml",
+ "authors": ["Addy Osmani", "Davide P. Cervone", "David Carlisle"],
+ "knownBugs": ["Firefox < 4 will likely return a false, however it does support MathML inside XHTML documents"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/Math/"
+ }],
+ "polyfills": ["mathjax"]
+}
+!*/
+/* DOC
+Detects support for MathML, for mathematic equations in web pages.
+*/
+
+ // Based on work by Davide (@dpvc) and David (@davidcarlisle)
+ // in https://github.com/mathjax/MathJax/issues/182
+
+ Modernizr.addTest('mathml', function() {
+ var ret;
+
+ testStyles('#modernizr{position:absolute;display:inline-block}', function(node) {
+ node.innerHTML += '<math><mfrac><mi>xx</mi><mi>yy</mi></mfrac></math>';
+
+ ret = node.offsetHeight > node.offsetWidth;
+ });
+
+ return ret;
+ });
+
+/*!
+{
+ "name": "Beacon API",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon"
+ },{
+ "name": "W3C specification",
+ "href": "https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html"
+ }],
+ "property": "beacon",
+ "tags": ["beacon", "network"],
+ "authors": ["Cătălin Mariș"]
+}
+!*/
+/* DOC
+Detects support for an API that allows for asynchronous transfer of small HTTP data from the client to a server.
+*/
+
+ Modernizr.addTest('beacon', 'sendBeacon' in navigator);
+
+/*!
+{
+ "name": "Low Bandwidth Connection",
+ "property": "lowbandwidth",
+ "tags": ["network"],
+ "builderAliases": ["network_connection"]
+}
+!*/
+/* DOC
+Tests for determining low-bandwidth via `navigator.connection`
+
+There are two iterations of the `navigator.connection` interface.
+
+The first is present in Android 2.2+ and only in the Browser (not WebView)
+
+- http://docs.phonegap.com/en/1.2.0/phonegap_connection_connection.md.html#connection.type
+- http://davidbcalhoun.com/2010/using-navigator-connection-android
+
+The second is specced at http://dev.w3.org/2009/dap/netinfo/ and perhaps landing in WebKit
+
+- http://bugs.webkit.org/show_bug.cgi?id=73528
+
+Unknown devices are assumed as fast
+
+For more rigorous network testing, consider boomerang.js: http://github.com/bluesmoon/boomerang/
+*/
+
+ Modernizr.addTest('lowbandwidth', function() {
+ // polyfill
+ var connection = navigator.connection || {type: 0};
+
+ return connection.type == 3 || // connection.CELL_2G
+ connection.type == 4 || // connection.CELL_3G
+ /^[23]g$/.test(connection.type); // string value in new spec
+ });
+
+/*!
+{
+ "name": "Server Sent Events",
+ "property": "eventsource",
+ "tags": ["network"],
+ "builderAliases": ["network_eventsource"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://dev.w3.org/html5/eventsource/"
+ }]
+}
+!*/
+/* DOC
+Tests for server sent events aka eventsource.
+*/
+
+ Modernizr.addTest('eventsource', 'EventSource' in window);
+
+/*!
+{
+ "name": "Fetch API",
+ "property": "fetch",
+ "tags": ["network"],
+ "caniuse": "fetch",
+ "notes": [{
+ "name": "Fetch Living Standard",
+ "href": "https://fetch.spec.whatwg.org/"
+ }],
+ "polyfills": ["fetch"]
+}
+!*/
+/* DOC
+Detects support for the fetch API, a modern replacement for XMLHttpRequest.
+*/
+
+ Modernizr.addTest('fetch', 'fetch' in window);
+
+/*!
+{
+ "name": "XHR responseType",
+ "property": "xhrresponsetype",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType.
+*/
+
+ Modernizr.addTest('xhrresponsetype', (function() {
+ if (typeof XMLHttpRequest == 'undefined') {
+ return false;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('get', '/', true);
+ return 'response' in xhr;
+ }()));
+
+
+ /**
+ * http://mathiasbynens.be/notes/xhr-responsetype-json#comment-4
+ *
+ * @access private
+ * @function testXhrType
+ * @param {string} type - String name of the XHR type you want to detect
+ * @returns {boolean}
+ * @author Mathias Bynens
+ */
+
+ /* istanbul ignore next */
+ var testXhrType = function(type) {
+ if (typeof XMLHttpRequest == 'undefined') {
+ return false;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('get', '/', true);
+ try {
+ xhr.responseType = type;
+ } catch (error) {
+ return false;
+ }
+ return 'response' in xhr && xhr.responseType == type;
+ };
+
+
+/*!
+{
+ "name": "XHR responseType='arraybuffer'",
+ "property": "xhrresponsetypearraybuffer",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='arraybuffer'.
+*/
+
+ Modernizr.addTest('xhrresponsetypearraybuffer', testXhrType('arraybuffer'));
+
+/*!
+{
+ "name": "XHR responseType='blob'",
+ "property": "xhrresponsetypeblob",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='blob'.
+*/
+
+ Modernizr.addTest('xhrresponsetypeblob', testXhrType('blob'));
+
+/*!
+{
+ "name": "XHR responseType='document'",
+ "property": "xhrresponsetypedocument",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='document'.
+*/
+
+ Modernizr.addTest('xhrresponsetypedocument', testXhrType('document'));
+
+/*!
+{
+ "name": "XHR responseType='json'",
+ "property": "xhrresponsetypejson",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ },{
+ "name": "Explanation of xhr.responseType='json'",
+ "href": "http://mathiasbynens.be/notes/xhr-responsetype-json"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='json'.
+*/
+
+ Modernizr.addTest('xhrresponsetypejson', testXhrType('json'));
+
+/*!
+{
+ "name": "XHR responseType='text'",
+ "property": "xhrresponsetypetext",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='text'.
+*/
+
+ Modernizr.addTest('xhrresponsetypetext', testXhrType('text'));
+
+/*!
+{
+ "name": "XML HTTP Request Level 2 XHR2",
+ "property": "xhr2",
+ "tags": ["network"],
+ "builderAliases": ["network_xhr2"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/XMLHttpRequest2/"
+ },{
+ "name": "Details on Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/385"
+ }]
+}
+!*/
+/* DOC
+Tests for XHR2.
+*/
+
+ // all three of these details report consistently across all target browsers:
+ // !!(window.ProgressEvent);
+ // 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest
+ Modernizr.addTest('xhr2', 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest());
+
+/*!
+{
+ "name": "Notification",
+ "property": "notification",
+ "caniuse": "notifications",
+ "authors": ["Theodoor van Donge", "Hendrik Beskow"],
+ "notes": [{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/notifications/quick/"
+ },{
+ "name": "W3C spec",
+ "href": "www.w3.org/TR/notifications/"
+ }],
+ "polyfills": ["desktop-notify", "html5-notifications"]
+}
+!*/
+/* DOC
+Detects support for the Notifications API
+*/
+
+ Modernizr.addTest('notification', 'Notification' in window && 'permission' in window.Notification && 'requestPermission' in window.Notification);
+
+/*!
+{
+ "name": "Page Visibility API",
+ "property": "pagevisibility",
+ "caniuse": "pagevisibility",
+ "tags": ["performance"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API"
+ },{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/2011/WD-page-visibility-20110602/"
+ },{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/pagevisibility/intro/"
+ }],
+ "polyfills": ["visibilityjs", "visiblyjs", "jquery-visibility"]
+}
+!*/
+/* DOC
+Detects support for the Page Visibility API, which can be used to disable unnecessary actions and otherwise improve user experience.
+*/
+
+ Modernizr.addTest('pagevisibility', !!prefixed('hidden', document, false));
+
+/*!
+{
+ "name": "Navigation Timing API",
+ "property": "performance",
+ "caniuse": "nav-timing",
+ "tags": ["performance"],
+ "authors": ["Scott Murphy (@uxder)"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/navigation-timing/"
+ },{
+ "name": "HTML5 Rocks article",
+ "href": "http://www.html5rocks.com/en/tutorials/webperformance/basics/"
+ }],
+ "polyfills": ["perfnow"]
+}
+!*/
+/* DOC
+Detects support for the Navigation Timing API, for measuring browser and connection performance.
+*/
+
+ Modernizr.addTest('performance', !!prefixed('performance', window));
+
+/*!
+{
+ "name": "DOM Pointer Events API",
+ "property": "pointerevents",
+ "tags": ["input"],
+ "authors": ["Stu Cox"],
+ "notes": [
+ {
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/pointerevents/"
+ }
+ ],
+ "warnings": ["This property name now refers to W3C DOM PointerEvents: https://github.com/Modernizr/Modernizr/issues/548#issuecomment-12812099"],
+ "polyfills": ["handjs"]
+}
+!*/
+/* DOC
+Detects support for the DOM Pointer Events API, which provides a unified event interface for pointing input devices, as implemented in IE10+.
+*/
+
+ // **Test name hijacked!**
+ // Now refers to W3C DOM PointerEvents spec rather than the CSS pointer-events property.
+ Modernizr.addTest('pointerevents', function() {
+ // Cannot use `.prefixed()` for events, so test each prefix
+ var bool = false,
+ i = domPrefixes.length;
+
+ // Don't forget un-prefixed...
+ bool = Modernizr.hasEvent('pointerdown');
+
+ while (i-- && !bool) {
+ if (hasEvent(domPrefixes[i] + 'pointerdown')) {
+ bool = true;
+ }
+ }
+ return bool;
+ });
+
+/*!
+{
+ "name": "Pointer Lock API",
+ "property": "pointerlock",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API"
+ }],
+ "builderAliases": ["pointerlock_api"]
+}
+!*/
+/* DOC
+Detects support the pointer lock API which allows you to lock the mouse cursor to the browser window.
+*/
+
+ // https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API
+ Modernizr.addTest('pointerlock', !!prefixed('exitPointerLock', document));
+
+/*!
+{
+ "name": "postMessage",
+ "property": "postmessage",
+ "caniuse": "x-doc-messaging",
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/html5/comms.html#posting-messages"
+ }],
+ "polyfills": ["easyxdm", "postmessage-jquery"]
+}
+!*/
+/* DOC
+Detects support for the `window.postMessage` protocol for cross-document messaging.
+*/
+
+ Modernizr.addTest('postmessage', 'postMessage' in window);
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "caniuse": "proximity",
+ "name": "Proximity API",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/Proximity_Events"
+ },{
+ "name": "W3C specification",
+ "href": "http://www.w3.org/TR/proximity/"
+ }],
+ "property": "proximity",
+ "tags": ["events", "proximity"]
+}
+!*/
+/* DOC
+Detects support for an API that allows users to get proximity related information from the device's proximity sensor.
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+
+ var timeout;
+ var timeoutTime = 300;
+
+ function advertiseSupport() {
+
+ // Clean up after ourselves
+ clearTimeout(timeout);
+ window.removeEventListener('deviceproximity', advertiseSupport);
+
+ // Advertise support as the browser supports
+ // the API and the device has a proximity sensor
+ addTest('proximity', true);
+
+ }
+
+ // Check if the browser has support for the API
+ if ('ondeviceproximity' in window && 'onuserproximity' in window) {
+
+ // Check if the device has a proximity sensor
+ // ( devices without such a sensor support the events but
+ // will never fire them resulting in a false positive )
+ window.addEventListener('deviceproximity', advertiseSupport);
+
+ // If the event doesn't fire in a reasonable amount of time,
+ // it means that the device doesn't have a proximity sensor,
+ // thus, we can advertise the "lack" of support
+ timeout = setTimeout(function() {
+ window.removeEventListener('deviceproximity', advertiseSupport);
+ addTest('proximity', false);
+ }, timeoutTime);
+
+ } else {
+ addTest('proximity', false);
+ }
+
+ });
+
+
+/*!
+{
+ "name": "QuerySelector",
+ "property": "queryselector",
+ "caniuse": "queryselector",
+ "tags": ["queryselector"],
+ "authors": ["Andrew Betts (@triblondon)"],
+ "notes": [{
+ "name" : "W3C Selectors reference",
+ "href": "http://www.w3.org/TR/selectors-api/#queryselectorall"
+ }],
+ "polyfills": ["css-selector-engine"]
+}
+!*/
+/* DOC
+Detects support for querySelector.
+*/
+
+ Modernizr.addTest('queryselector', 'querySelector' in document && 'querySelectorAll' in document);
+
+/*!
+{
+ "name": "Quota Storage Management API",
+ "property": "quotamanagement",
+ "tags": ["storage"],
+ "builderAliases": ["quota_management_api"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/quota-api/"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to request a specific amount of space for filesystem access
+*/
+
+ Modernizr.addTest('quotamanagement', function() {
+ var tempStorage = prefixed('temporaryStorage', navigator);
+ var persStorage = prefixed('persistentStorage', navigator);
+
+ return !!(tempStorage && persStorage);
+ });
+
+/*!
+{
+ "name": "requestAnimationFrame",
+ "property": "requestanimationframe",
+ "aliases": ["raf"],
+ "caniuse": "requestanimationframe",
+ "tags": ["animation"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/animation-timing/"
+ }],
+ "polyfills": ["raf"]
+}
+!*/
+/* DOC
+Detects support for the `window.requestAnimationFrame` API, for offloading animation repainting to the browser for optimized performance.
+*/
+
+ Modernizr.addTest('requestanimationframe', !!prefixed('requestAnimationFrame', window), {aliases: ['raf']});
+
+/*!
+{
+ "name": "script[async]",
+ "property": "scriptasync",
+ "caniuse": "script-async",
+ "tags": ["script"],
+ "builderAliases": ["script_async"],
+ "authors": ["Theodoor van Donge"]
+}
+!*/
+/* DOC
+Detects support for the `async` attribute on the `<script>` element.
+*/
+
+ Modernizr.addTest('scriptasync', 'async' in createElement('script'));
+
+/*!
+{
+ "name": "script[defer]",
+ "property": "scriptdefer",
+ "caniuse": "script-defer",
+ "tags": ["script"],
+ "builderAliases": ["script_defer"],
+ "authors": ["Theodoor van Donge"],
+ "warnings": ["Browser implementation of the `defer` attribute vary: http://stackoverflow.com/questions/3952009/defer-attribute-chrome#answer-3982619"],
+ "knownBugs": ["False positive in Opera 12"]
+}
+!*/
+/* DOC
+Detects support for the `defer` attribute on the `<script>` element.
+*/
+
+ Modernizr.addTest('scriptdefer', 'defer' in createElement('script'));
+
+/*!
+{
+ "name": "ServiceWorker API",
+ "property": "serviceworker",
+ "notes": [{
+ "name": "ServiceWorkers Explained",
+ "href": "https://github.com/slightlyoff/ServiceWorker/blob/master/explainer.md"
+ }]
+}
+!*/
+/* DOC
+ServiceWorkers (formerly Navigation Controllers) are a way to persistently cache resources to built apps that work better offline.
+*/
+
+ Modernizr.addTest('serviceworker', 'serviceWorker' in navigator);
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "name": "Speech Recognition API",
+ "notes": [
+ {
+ "name": "W3C Web Speech API Specification - The SpeechRecognition Interface",
+ "href": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-section"
+ },
+ {
+ "name": "Introduction to the Web Speech API",
+ "href": "http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API"
+ }
+ ],
+ "property": "speechrecognition",
+ "tags": ["input", "speech"]
+}
+!*/
+
+
+ Modernizr.addTest('speechrecognition', !!prefixed('SpeechRecognition', window));
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "name": "Speech Synthesis API",
+ "notes": [
+ {
+ "name": "W3C Web Speech API Specification - The SpeechSynthesis Interface",
+ "href": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#tts-section"
+ }
+ ],
+ "property": "speechsynthesis",
+ "tags": ["input", "speech"]
+}
+!*/
+
+
+ Modernizr.addTest('speechsynthesis', 'SpeechSynthesisUtterance' in window);
+
+/*!
+{
+ "name": "Local Storage",
+ "property": "localstorage",
+ "caniuse": "namevalue-storage",
+ "tags": ["storage"],
+ "knownBugs": [],
+ "notes": [],
+ "warnings": [],
+ "polyfills": [
+ "joshuabell-polyfill",
+ "cupcake",
+ "storagepolyfill",
+ "amplifyjs",
+ "yui-cacheoffline"
+ ]
+}
+!*/
+
+ // In FF4, if disabled, window.localStorage should === null.
+
+ // Normally, we could not test that directly and need to do a
+ // `('localStorage' in window) && ` test first because otherwise Firefox will
+ // throw bugzil.la/365772 if cookies are disabled
+
+ // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
+ // will throw the exception:
+ // QUOTA_EXCEEDED_ERROR DOM Exception 22.
+ // Peculiarly, getItem and removeItem calls do not throw.
+
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+
+ Modernizr.addTest('localstorage', function() {
+ var mod = 'modernizr';
+ try {
+ localStorage.setItem(mod, mod);
+ localStorage.removeItem(mod);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Session Storage",
+ "property": "sessionstorage",
+ "tags": ["storage"],
+ "polyfills": ["joshuabell-polyfill", "cupcake", "sessionstorage"]
+}
+!*/
+
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+ Modernizr.addTest('sessionstorage', function() {
+ var mod = 'modernizr';
+ try {
+ sessionStorage.setItem(mod, mod);
+ sessionStorage.removeItem(mod);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Web SQL Database",
+ "property": "websqldatabase",
+ "caniuse": "sql-storage",
+ "tags": ["storage"]
+}
+!*/
+
+ // Chrome incognito mode used to throw an exception when using openDatabase
+ // It doesn't anymore.
+ Modernizr.addTest('websqldatabase', 'openDatabase' in window);
+
+/*!
+{
+ "name": "style[scoped]",
+ "property": "stylescoped",
+ "caniuse": "style-scoped",
+ "tags": ["dom"],
+ "builderAliases": ["style_scoped"],
+ "authors": ["Cătălin Mariș"],
+ "notes": [{
+ "name": "WHATWG Specification",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#attr-style-scoped"
+ }],
+ "polyfills": ["scoped-styles"]
+}
+!*/
+/* DOC
+Support for the `scoped` attribute of the `<style>` element.
+*/
+
+ Modernizr.addTest('stylescoped', 'scoped' in createElement('style'));
+
+/*!
+{
+ "name": "SVG",
+ "property": "svg",
+ "caniuse": "svg",
+ "tags": ["svg"],
+ "authors": ["Erik Dahlstrom"],
+ "polyfills": [
+ "svgweb",
+ "raphael",
+ "amplesdk",
+ "canvg",
+ "svg-boilerplate",
+ "sie",
+ "dojogfx",
+ "fabricjs"
+ ]
+}
+!*/
+/* DOC
+Detects support for SVG in `<embed>` or `<object>` elements.
+*/
+
+ Modernizr.addTest('svg', !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect);
+
+/*!
+{
+ "name": "SVG as an <img> tag source",
+ "property": "svgasimg",
+ "caniuse" : "svg-img",
+ "tags": ["svg"],
+ "authors": ["Chris Coyier"],
+ "notes": [{
+ "name": "HTML5 Spec",
+ "href": "http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element"
+ }]
+}
+!*/
+
+
+ // Original Async test by Stu Cox
+ // https://gist.github.com/chriscoyier/8774501
+
+ // Now a Sync test based on good results here
+ // http://codepen.io/chriscoyier/pen/bADFx
+
+ // Note http://www.w3.org/TR/SVG11/feature#Image is *supposed* to represent
+ // support for the `<image>` tag in SVG, not an SVG file linked from an `<img>`
+ // tag in HTML – but it’s a heuristic which works
+ Modernizr.addTest('svgasimg', document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'));
+
+
+ /**
+ * Object.prototype.toString can be used with every object and allows you to
+ * get its class easily. Abstracting it off of an object prevents situations
+ * where the toString property has been overridden
+ *
+ * @access private
+ * @function toStringFn
+ * @returns {function} An abstracted toString function
+ */
+
+ var toStringFn = ({}).toString;
+
+/*!
+{
+ "name": "SVG clip paths",
+ "property": "svgclippaths",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "Demo",
+ "href": "http://srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg"
+ }]
+}
+!*/
+/* DOC
+Detects support for clip paths in SVG (only, not on HTML content).
+
+See [this discussion](http://github.com/Modernizr/Modernizr/issues/213) regarding applying SVG clip paths to HTML content.
+*/
+
+ Modernizr.addTest('svgclippaths', function() {
+ return !!document.createElementNS &&
+ /SVGClipPath/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'clipPath')));
+ });
+
+/*!
+{
+ "name": "SVG filters",
+ "property": "svgfilters",
+ "caniuse": "svg-filters",
+ "tags": ["svg"],
+ "builderAliases": ["svg_filters"],
+ "authors": ["Erik Dahlstrom"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/SVG11/filters.html"
+ }]
+}
+!*/
+
+ // Should fail in Safari: http://stackoverflow.com/questions/9739955/feature-detecting-support-for-svg-filters.
+ Modernizr.addTest('svgfilters', function() {
+ var result = false;
+ try {
+ result = 'SVGFEColorMatrixElement' in window &&
+ SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE == 2;
+ }
+ catch (e) {}
+ return result;
+ });
+
+/*!
+{
+ "name": "SVG foreignObject",
+ "property": "svgforeignobject",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/SVG11/extend.html"
+ }]
+}
+!*/
+/* DOC
+Detects support for foreignObject tag in SVG.
+*/
+
+ Modernizr.addTest('svgforeignobject', function() {
+ return !!document.createElementNS &&
+ /SVGForeignObject/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject')));
+ });
+
+/*!
+{
+ "name": "Inline SVG",
+ "property": "inlinesvg",
+ "caniuse": "svg-html5",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "Test page",
+ "href": "http://paulirish.com/demo/inline-svg"
+ }, {
+ "name": "Test page and results",
+ "href": "http://codepen.io/eltonmesquita/full/GgXbvo/"
+ }],
+ "polyfills": ["inline-svg-polyfill"],
+ "knownBugs": ["False negative on some Chromia browsers."]
+}
+!*/
+/* DOC
+Detects support for inline SVG in HTML (not within XHTML).
+*/
+
+ Modernizr.addTest('inlinesvg', function() {
+ var div = createElement('div');
+ div.innerHTML = '<svg/>';
+ return (typeof SVGRect != 'undefined' && div.firstChild && div.firstChild.namespaceURI) == 'http://www.w3.org/2000/svg';
+ });
+
+/*!
+{
+ "name": "SVG SMIL animation",
+ "property": "smil",
+ "caniuse": "svg-smil",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "W3C Synchronised Multimedia spec",
+ "href": "http://www.w3.org/AudioVideo/"
+ }]
+}
+!*/
+
+ // SVG SMIL animation
+ Modernizr.addTest('smil', function() {
+ return !!document.createElementNS &&
+ /SVGAnimate/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'animate')));
+ });
+
+/*!
+{
+ "name": "Template strings",
+ "property": "templatestrings",
+ "notes": [{
+ "name": "MDN Reference",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings#Browser_compatibility"
+ }]
+}
+!*/
+/* DOC
+Template strings are string literals allowing embedded expressions.
+*/
+
+ Modernizr.addTest('templatestrings', function() {
+ var supports;
+ try {
+ // A number of tools, including uglifyjs and require, break on a raw "`", so
+ // use an eval to get around that.
+ eval('``');
+ supports = true;
+ } catch (e) {}
+ return !!supports;
+ });
+
+/*!
+{
+ "name": "textarea maxlength",
+ "property": "textareamaxlength",
+ "aliases": ["textarea-maxlength"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea"
+ }],
+ "polyfills": [
+ "maxlength"
+ ]
+}
+!*/
+/* DOC
+Detect support for the maxlength attribute of a textarea element
+*/
+
+ Modernizr.addTest('textareamaxlength', !!('maxLength' in createElement('textarea')));
+
+/*!
+{
+ "name": "Touch Events",
+ "property": "touchevents",
+ "caniuse" : "touch",
+ "tags": ["media", "attribute"],
+ "notes": [{
+ "name": "Touch Events spec",
+ "href": "http://www.w3.org/TR/2013/WD-touch-events-20130124/"
+ }],
+ "warnings": [
+ "Indicates if the browser supports the Touch Events spec, and does not necessarily reflect a touchscreen device"
+ ],
+ "knownBugs": [
+ "False-positive on some configurations of Nokia N900",
+ "False-positive on some BlackBerry 6.0 builds – https://github.com/Modernizr/Modernizr/issues/372#issuecomment-3112695"
+ ]
+}
+!*/
+/* DOC
+Indicates if the browser supports the W3C Touch Events API.
+
+This *does not* necessarily reflect a touchscreen device:
+
+* Older touchscreen devices only emulate mouse events
+* Modern IE touch devices implement the Pointer Events API instead: use `Modernizr.pointerevents` to detect support for that
+* Some browsers & OS setups may enable touch APIs when no touchscreen is connected
+* Future browsers may implement other event models for touch interactions
+
+See this article: [You Can't Detect A Touchscreen](http://www.stucox.com/blog/you-cant-detect-a-touchscreen/).
+
+It's recommended to bind both mouse and touch/pointer events simultaneously – see [this HTML5 Rocks tutorial](http://www.html5rocks.com/en/mobile/touchandmouse/).
+
+This test will also return `true` for Firefox 4 Multitouch support.
+*/
+
+ // Chrome (desktop) used to lie about its support on this, but that has since been rectified: http://crbug.com/36415
+ Modernizr.addTest('touchevents', function() {
+ var bool;
+ if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
+ bool = true;
+ } else {
+ var query = ['@media (', prefixes.join('touch-enabled),('), 'heartz', ')', '{#modernizr{top:9px;position:absolute}}'].join('');
+ testStyles(query, function(node) {
+ bool = node.offsetTop === 9;
+ });
+ }
+ return bool;
+ });
+
+/*!
+{
+ "name": "Typed arrays",
+ "property": "typedarrays",
+ "caniuse": "typedarrays",
+ "tags": ["js"],
+ "authors": ["Stanley Stuart (@fivetanley)"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/JavaScript_typed_arrays"
+ },{
+ "name": "Kronos spec",
+ "href": "http://www.khronos.org/registry/typedarray/specs/latest/"
+ }],
+ "polyfills": ["joshuabell-polyfill"]
+}
+!*/
+/* DOC
+Detects support for native binary data manipulation via Typed Arrays in JavaScript.
+
+Does not check for DataView support; use `Modernizr.dataview` for that.
+*/
+
+ // Should fail in:
+ // Internet Explorer <= 9
+ // Firefox <= 3.6
+ // Chrome <= 6.0
+ // iOS Safari < 4.2
+ // Safari < 5.1
+ // Opera < 11.6
+ // Opera Mini, <= 7.0
+ // Android Browser < 4.0
+ // Blackberry Browser < 10.0
+
+ Modernizr.addTest('typedarrays', 'ArrayBuffer' in window);
+
+/*!
+{
+ "name": "Unicode characters",
+ "property": "unicode",
+ "tags": ["encoding"],
+ "warnings": [
+ "positive Unicode support doesn't mean you can use it inside <title>, this seems more related to OS & Language packs"
+ ]
+}
+!*/
+/* DOC
+Detects if unicode characters are supported in the current document.
+*/
+
+ /**
+ * Unicode special character support
+ *
+ * Detection is made by testing missing glyph box rendering against star character
+ * If widths are the same, this "probably" means the browser didn't support the star character and rendered a glyph box instead
+ * Just need to ensure the font characters have different widths
+ */
+ Modernizr.addTest('unicode', function() {
+ var bool;
+ var missingGlyph = createElement('span');
+ var star = createElement('span');
+
+ testStyles('#modernizr{font-family:Arial,sans;font-size:300em;}', function(node) {
+
+ missingGlyph.innerHTML = isSVG ? '\u5987' : 'ᝣ';
+ star.innerHTML = isSVG ? '\u2606' : '☆';
+
+ node.appendChild(missingGlyph);
+ node.appendChild(star);
+
+ bool = 'offsetWidth' in missingGlyph && missingGlyph.offsetWidth !== star.offsetWidth;
+ });
+
+ return bool;
+
+ });
+
+/*!
+{
+ "name": "Unicode Range",
+ "property": "unicoderange",
+ "notes": [{
+ "name" : "W3C reference",
+ "href": "http://www.w3.org/TR/2013/CR-css-fonts-3-20131003/#descdef-unicode-range"
+ }, {
+ "name" : "24 Way article",
+ "href": "http://24ways.org/2011/creating-custom-font-stacks-with-unicode-range"
+ }]
+}
+!*/
+
+ Modernizr.addTest('unicoderange', function() {
+
+ return Modernizr.testStyles('@font-face{font-family:"unicodeRange";src:local("Arial");unicode-range:U+0020,U+002E}#modernizr span{font-size:20px;display:inline-block;font-family:"unicodeRange",monospace}#modernizr .mono{font-family:monospace}', function(elem) {
+
+ // we use specify a unicode-range of 002E (the `.` glyph,
+ // and a monospace font as the fallback. If the first of
+ // these test glyphs is a different width than the other
+ // the other three (which are all monospace), then we
+ // have a winner.
+ var testGlyphs = ['.', '.', 'm', 'm'];
+
+ for (var i = 0; i < testGlyphs.length; i++) {
+ var elm = createElement('span');
+ elm.innerHTML = testGlyphs[i];
+ elm.className = i % 2 ? 'mono' : '';
+ elem.appendChild(elm);
+ testGlyphs[i] = elm.clientWidth;
+ }
+
+ return (testGlyphs[0] !== testGlyphs[1] && testGlyphs[2] === testGlyphs[3]);
+ });
+ });
+
+/*!
+{
+ "name": "Blob URLs",
+ "property": "bloburls",
+ "caniuse": "bloburls",
+ "notes": [{
+ "name": "W3C Working Draft",
+ "href": "http://www.w3.org/TR/FileAPI/#creating-revoking"
+ }],
+ "tags": ["file", "url"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Detects support for creating Blob URLs
+*/
+
+ var url = prefixed('URL', window, false);
+ url = url && window[url];
+ Modernizr.addTest('bloburls', url && 'revokeObjectURL' in url && 'createObjectURL' in url);
+
+/*!
+{
+ "name": "Data URI",
+ "property": "datauri",
+ "caniuse": "datauri",
+ "tags": ["url"],
+ "builderAliases": ["url_data_uri"],
+ "async": true,
+ "notes": [{
+ "name": "Wikipedia article",
+ "href": "http://en.wikipedia.org/wiki/Data_URI_scheme"
+ }],
+ "warnings": ["Support in Internet Explorer 8 is limited to images and linked resources like CSS files, not HTML files"]
+}
+!*/
+/* DOC
+Detects support for data URIs. Provides a subproperty to report support for data URIs over 32kb in size:
+
+```javascript
+Modernizr.datauri // true
+Modernizr.datauri.over32kb // false in IE8
+```
+*/
+
+ // https://github.com/Modernizr/Modernizr/issues/14
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ // IE7 throw a mixed content warning on HTTPS for this test, so we'll
+ // just blacklist it (we know it doesn't support data URIs anyway)
+ // https://github.com/Modernizr/Modernizr/issues/362
+ if (navigator.userAgent.indexOf('MSIE 7.') !== -1) {
+ // Keep the test async
+ setTimeout(function() {
+ addTest('datauri', false);
+ }, 10);
+ }
+
+ var datauri = new Image();
+
+ datauri.onerror = function() {
+ addTest('datauri', false);
+ };
+ datauri.onload = function() {
+ if (datauri.width == 1 && datauri.height == 1) {
+ testOver32kb();
+ }
+ else {
+ addTest('datauri', false);
+ }
+ };
+
+ datauri.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
+
+ // Once we have datauri, let's check to see if we can use data URIs over
+ // 32kb (IE8 can't). https://github.com/Modernizr/Modernizr/issues/321
+ function testOver32kb() {
+
+ var datauriBig = new Image();
+
+ datauriBig.onerror = function() {
+ addTest('datauri', true);
+ Modernizr.datauri = new Boolean(true);
+ Modernizr.datauri.over32kb = false;
+ };
+ datauriBig.onload = function() {
+ addTest('datauri', true);
+ Modernizr.datauri = new Boolean(true);
+ Modernizr.datauri.over32kb = (datauriBig.width == 1 && datauriBig.height == 1);
+ };
+
+ var base64str = 'R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
+ while (base64str.length < 33000) {
+ base64str = '\r\n' + base64str;
+ }
+ datauriBig.src = 'data:image/gif;base64,' + base64str;
+ }
+
+ });
+
+/*!
+{
+ "name": "URL parser",
+ "property": "urlparser",
+ "notes": [{
+ "name": "URL",
+ "href": "https://dvcs.w3.org/hg/url/raw-file/tip/Overview.html"
+ }],
+ "polyfills": ["urlparser"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["url"]
+}
+!*/
+/* DOC
+Check if browser implements the URL constructor for parsing URLs.
+*/
+
+ Modernizr.addTest('urlparser', function() {
+ var url;
+ try {
+ // have to actually try use it, because Safari defines a dud constructor
+ url = new URL('http://modernizr.com/');
+ return url.href === 'http://modernizr.com/';
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "IE User Data API",
+ "property": "userdata",
+ "tags": ["storage"],
+ "authors": ["@stereobooster"],
+ "notes": [{
+ "name": "MSDN Documentation",
+ "href": "http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx"
+ }]
+}
+!*/
+/* DOC
+Detects support for IE userData for persisting data, an API similar to localStorage but supported since IE5.
+*/
+
+ Modernizr.addTest('userdata', !!createElement('div').addBehavior);
+
+/*!
+{
+ "name": "Vibration API",
+ "property": "vibrate",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozVibrate"
+ },{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/vibration/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the API that provides access to the vibration mechanism of the hosting device, to provide tactile feedback.
+*/
+
+ Modernizr.addTest('vibrate', !!prefixed('vibrate', navigator));
+
+/*!
+{
+ "name": "HTML5 Video",
+ "property": "video",
+ "caniuse": "video",
+ "tags": ["html5"],
+ "knownBugs": [
+ "Without QuickTime, `Modernizr.video.h264` will be `undefined`; http://github.com/Modernizr/Modernizr/issues/546"
+ ],
+ "polyfills": [
+ "html5media",
+ "mediaelementjs",
+ "sublimevideo",
+ "videojs",
+ "leanbackplayer",
+ "videoforeverybody"
+ ]
+}
+!*/
+/* DOC
+Detects support for the video element, as well as testing what types of content it supports.
+
+Subproperties are provided to describe support for `ogg`, `h264` and `webm` formats, e.g.:
+
+```javascript
+Modernizr.video // true
+Modernizr.video.ogg // 'probably'
+```
+*/
+
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+
+ Modernizr.addTest('video', function() {
+ /* jshint -W053 */
+ var elem = createElement('video');
+ var bool = false;
+
+ // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
+ try {
+ if (bool = !!elem.canPlayType) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, '');
+
+ // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
+ bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, '');
+
+ bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, '');
+
+ bool.vp9 = elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, '');
+
+ bool.hls = elem.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, '');
+ }
+ } catch (e) {}
+
+ return bool;
+ });
+
+/*!
+{
+ "name": "Video Autoplay",
+ "property": "videoautoplay",
+ "tags": ["video"],
+ "async" : true,
+ "warnings": ["This test is very large – only include it if you absolutely need it"],
+ "knownBugs": ["crashes with an alert on iOS7 when added to homescreen"]
+}
+!*/
+/* DOC
+Checks for support of the autoplay attribute of the video element.
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var timeout;
+ var waitTime = 300;
+ var elem = createElement('video');
+ var elemStyle = elem.style;
+
+ function testAutoplay(arg) {
+ clearTimeout(timeout);
+ elem.removeEventListener('playing', testAutoplay, false);
+ addTest('videoautoplay', arg && arg.type === 'playing' || elem.currentTime !== 0);
+ elem.parentNode.removeChild(elem);
+ }
+
+ //skip the test if video itself, or the autoplay
+ //element on it isn't supported
+ if (!Modernizr.video || !('autoplay' in elem)) {
+ addTest('videoautoplay', false);
+ return;
+ }
+
+ elemStyle.position = 'absolute';
+ elemStyle.height = 0;
+ elemStyle.width = 0;
+
+ try {
+ if (Modernizr.video.ogg) {
+ elem.src = 'data:video/ogg;base64,T2dnUwACAAAAAAAAAABmnCATAAAAAHDEixYBKoB0aGVvcmEDAgEAAQABAAAQAAAQAAAAAAAFAAAAAQAAAAAAAAAAAGIAYE9nZ1MAAAAAAAAAAAAAZpwgEwEAAAACrA7TDlj///////////////+QgXRoZW9yYSsAAABYaXBoLk9yZyBsaWJ0aGVvcmEgMS4xIDIwMDkwODIyIChUaHVzbmVsZGEpAQAAABoAAABFTkNPREVSPWZmbXBlZzJ0aGVvcmEtMC4yOYJ0aGVvcmG+zSj3uc1rGLWpSUoQc5zmMYxSlKQhCDGMYhCEIQhAAAAAAAAAAAAAEW2uU2eSyPxWEvx4OVts5ir1aKtUKBMpJFoQ/nk5m41mUwl4slUpk4kkghkIfDwdjgajQYC8VioUCQRiIQh8PBwMhgLBQIg4FRba5TZ5LI/FYS/Hg5W2zmKvVoq1QoEykkWhD+eTmbjWZTCXiyVSmTiSSCGQh8PB2OBqNBgLxWKhQJBGIhCHw8HAyGAsFAiDgUCw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDAwPEhQUFQ0NDhESFRUUDg4PEhQVFRUOEBETFBUVFRARFBUVFRUVEhMUFRUVFRUUFRUVFRUVFRUVFRUVFRUVEAwLEBQZGxwNDQ4SFRwcGw4NEBQZHBwcDhATFhsdHRwRExkcHB4eHRQYGxwdHh4dGxwdHR4eHh4dHR0dHh4eHRALChAYKDM9DAwOExo6PDcODRA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2tpcD0wIGNocm9tYV9xcF9vZmZzZXQ9MCB0aHJlYWRzPTYgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTUwIGtleWludF9taW49NSBzY2VuZWN1dD00MCBpbnRyYV9yZWZyZXNoPTAgcmM9Y3FwIG1idHJlZT0wIHFwPTAAgAAAAD5liISscR8A+E4ACAACFoAAITAAAgsAAPgYCoKgoC+L4vi+KAvi+L4YfAEAACMzgABF9AAEUGUgABDJiXnf4AAAAARBmiKUAAAABEGaQpQAAAAEQZpilAAAAARBmoKU';
+ }
+ else {
+ addTest('videoautoplay', false);
+ return;
+ }
+ }
+
+ catch (e) {
+ addTest('videoautoplay', false);
+ return;
+ }
+
+ elem.setAttribute('autoplay', '');
+ elem.style.cssText = 'display:none';
+ docElement.appendChild(elem);
+ // wait for the next tick to add the listener, otherwise the element may
+ // not have time to play in high load situations (e.g. the test suite)
+ setTimeout(function() {
+ elem.addEventListener('playing', testAutoplay, false);
+ timeout = setTimeout(testAutoplay, waitTime);
+ }, 0);
+ });
+
+/*!
+{
+ "name": "Video Loop Attribute",
+ "property": "videoloop",
+ "tags": ["video", "media"]
+}
+!*/
+
+ Modernizr.addTest('videoloop', 'loop' in createElement('video'));
+
+/*!
+{
+ "name": "Video Preload Attribute",
+ "property": "videopreload",
+ "tags": ["video", "media"]
+}
+!*/
+
+ Modernizr.addTest('videopreload', 'preload' in createElement('video'));
+
+/*!
+{
+ "name": "VML",
+ "property": "vml",
+ "caniuse": "vml",
+ "tags": ["vml"],
+ "authors": ["Craig Andrews (@candrews)"],
+ "notes": [{
+ "name" : "W3C VML reference",
+ "href": "http://www.w3.org/TR/NOTE-VML"
+ },{
+ "name" : "Microsoft VML reference",
+ "href": "http://msdn.microsoft.com/en-us/library/bb263898%28VS.85%29.aspx"
+ }]
+}
+!*/
+/* DOC
+Detects support for VML.
+*/
+
+ Modernizr.addTest('vml', function() {
+ var containerDiv = createElement('div');
+ var supports = false;
+ var shape;
+
+ if (!isSVG) {
+ containerDiv.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
+ shape = containerDiv.firstChild;
+ shape.style.behavior = 'url(#default#VML)';
+ supports = shape ? typeof shape.adj == 'object' : true;
+ }
+
+ return supports;
+ });
+
+/*!
+{
+ "name": "Web Intents",
+ "property": "webintents",
+ "authors": ["Eric Bidelman"],
+ "notes": [{
+ "name": "Web Intents project site",
+ "href": "http://webintents.org/"
+ }],
+ "polyfills": ["webintents"],
+ "builderAliases": ["web_intents"]
+}
+!*/
+/* DOC
+Detects native support for the Web Intents APIs for service discovery and inter-application communication.
+
+Chrome added support for this in v19, but [removed it again in v24](http://lists.w3.org/Archives/Public/public-web-intents/2012Nov/0000.html) because of "a number of areas for
+development in both the API and specific user experience in Chrome". No other browsers currently support it, however a [JavaScript shim](http://webintents.org/#javascriptshim) is available.
+*/
+
+ Modernizr.addTest('webintents', !!prefixed('startActivity', navigator));
+
+/*!
+{
+ "name": "Web Animation API",
+ "property": "animation",
+ "tags": ["webanimations"],
+ "polyfills": ["webanimationsjs"],
+ "notes": [{
+ "name": "Introducing Web Animations",
+ "href": "http://brian.sol1.net/svg/2013/06/26/introducing-web-animations/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the Web Animation API, a way to create css animations in js
+*/
+
+ Modernizr.addTest('webanimations', 'animate' in createElement('div'));
+
+/*!
+{
+ "name": "WebGL",
+ "property": "webgl",
+ "caniuse": "webgl",
+ "tags": ["webgl", "graphics"],
+ "polyfills": ["jebgl", "cwebgl", "iewebgl"]
+}
+!*/
+
+ Modernizr.addTest('webgl', function() {
+ var canvas = createElement('canvas');
+ var supports = 'probablySupportsContext' in canvas ? 'probablySupportsContext' : 'supportsContext';
+ if (supports in canvas) {
+ return canvas[supports]('webgl') || canvas[supports]('experimental-webgl');
+ }
+ return 'WebGLRenderingContext' in window;
+ });
+
+/*!
+{
+ "name": "WebGL Extensions",
+ "property": "webglextensions",
+ "tags": ["webgl", "graphics"],
+ "builderAliases": ["webgl_extensions"],
+ "async" : true,
+ "authors": ["Ilmari Heikkinen"],
+ "knownBugs": [],
+ "notes": [{
+ "name": "Kronos extensions registry",
+ "href": "http://www.khronos.org/registry/webgl/extensions/"
+ }]
+}
+!*/
+/* DOC
+Detects support for OpenGL extensions in WebGL. It's `true` if the [WebGL extensions API](https://developer.mozilla.org/en-US/docs/Web/WebGL/Using_Extensions) is supported, then exposes the supported extensions as subproperties, e.g.:
+
+```javascript
+if (Modernizr.webglextensions) {
+ // WebGL extensions API supported
+}
+if ('OES_vertex_array_object' in Modernizr.webglextensions) {
+ // Vertex Array Objects extension supported
+}
+```
+*/
+
+ // based on code from ilmari heikkinen
+ // code.google.com/p/graphics-detect/source/browse/js/detect.js
+
+ // Not Async but handles it's own self
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ // Not a good candidate for css classes, so we avoid addTest stuff
+ Modernizr.webglextensions = new Boolean(false);
+
+ if (!Modernizr.webgl) {
+ return;
+ }
+
+ var canvas;
+ var ctx;
+ var exts;
+
+ try {
+ canvas = createElement('canvas');
+ ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
+ exts = ctx.getSupportedExtensions();
+ }
+ catch (e) {
+ return;
+ }
+
+ if (ctx !== undefined) {
+ Modernizr.webglextensions = new Boolean(true);
+ }
+
+ for (var i = -1, len = exts.length; ++i < len;) {
+ Modernizr.webglextensions[exts[i]] = true;
+ }
+
+ canvas = undefined;
+ });
+
+/*!
+{
+ "name": "RTC Peer Connection",
+ "property": "peerconnection",
+ "tags": ["webrtc"],
+ "authors": ["Ankur Oberoi"],
+ "notes": [{
+ "name": "W3C Web RTC spec",
+ "href": "http://www.w3.org/TR/webrtc/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('peerconnection', !!prefixed('RTCPeerConnection', window));
+
+/*!
+{
+ "name": "RTC Data Channel",
+ "property": "datachannel",
+ "notes": [{
+ "name": "HTML5 Rocks! Article",
+ "href": "http://www.html5rocks.com/en/tutorials/webrtc/datachannels/"
+ }]
+}
+!*/
+/* DOC
+Detect for the RTCDataChannel API that allows for transfer data directly from one peer to another
+*/
+
+
+ Modernizr.addTest('datachannel', function() {
+ if (!Modernizr.peerconnection) {
+ return false;
+ }
+ for (var i = 0, l = domPrefixes.length; i < l; i++) {
+ var peerConnectionConstructor = window[domPrefixes[i] + 'RTCPeerConnection'];
+
+ if (peerConnectionConstructor) {
+ var peerConnection = new peerConnectionConstructor({
+ 'iceServers': [{'url': 'stun:0'}]
+ });
+
+ return 'createDataChannel' in peerConnection;
+ }
+
+ }
+ return false;
+ });
+
+/*!
+{
+ "name": "getUserMedia",
+ "property": "getusermedia",
+ "caniuse": "stream",
+ "tags": ["webrtc"],
+ "authors": ["Eric Bidelman"],
+ "notes": [{
+ "name": "W3C Media Capture and Streams spec",
+ "href": "http://www.w3.org/TR/mediacapture-streams/"
+ }],
+ "polyfills": ["getusermedia"]
+}
+!*/
+
+ Modernizr.addTest('getusermedia', !!prefixed('getUserMedia', navigator));
+
+/*!
+{
+ "name": "WebSockets Support",
+ "property": "websockets",
+ "authors": ["Phread [fearphage]", "Mike Sherov [mikesherov]", "Burak Yigit Kaya [BYK]"],
+ "caniuse": "websockets",
+ "tags": ["html5"],
+ "warnings": [
+ "This test will reject any old version of WebSockets even if it is not prefixed such as in Safari 5.1"
+ ],
+ "notes": [{
+ "name": "CLOSING State and Spec",
+ "href": "http://www.w3.org/TR/websockets/#the-websocket-interface"
+ }],
+ "polyfills": [
+ "sockjs",
+ "socketio",
+ "kaazing-websocket-gateway",
+ "websocketjs",
+ "atmosphere",
+ "graceful-websocket",
+ "portal",
+ "datachannel"
+ ]
+}
+!*/
+
+ Modernizr.addTest('websockets', 'WebSocket' in window && window.WebSocket.CLOSING === 2);
+
+/*!
+{
+ "name": "Binary WebSockets",
+ "property": "websocketsbinary",
+ "tags": ["websockets"],
+ "builderAliases": ["websockets_binary"]
+}
+!*/
+
+ // binaryType is truthy if there is support.. returns "blob" in new-ish chrome.
+ // plus.google.com/115535723976198353696/posts/ERN6zYozENV
+ // github.com/Modernizr/Modernizr/issues/370
+
+ Modernizr.addTest('websocketsbinary', function() {
+ var protocol = 'https:' == location.protocol ? 'wss' : 'ws',
+ protoBin;
+
+ if ('WebSocket' in window) {
+ if (protoBin = 'binaryType' in WebSocket.prototype) {
+ return protoBin;
+ }
+ try {
+ return !!(new WebSocket(protocol + '://.').binaryType);
+ } catch (e) {}
+ }
+
+ return false;
+ });
+
+/*!
+{
+ "name": "Framed window",
+ "property": "framed",
+ "tags": ["window"],
+ "builderAliases": ["window_framed"]
+}
+!*/
+/* DOC
+Tests if page is iframed.
+*/
+
+ // github.com/Modernizr/Modernizr/issues/242
+
+ Modernizr.addTest('framed', window.location != top.location);
+
+/*!
+{
+ "name": "Workers from Blob URIs",
+ "property": "blobworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_blobworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }],
+ "knownBugs": ["This test may output garbage to console."],
+ "authors": ["Jussi Kalliokoski"],
+ "async": true
+}
+!*/
+/* DOC
+Detects support for creating Web Workers from Blob URIs.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ try {
+ // we're avoiding using Modernizr._domPrefixes as the prefix capitalization on
+ // these guys are notoriously peculiar.
+ var BlobBuilder = window.BlobBuilder;
+ var URL = window.URL;
+ if (Modernizr._config.usePrefix) {
+ BlobBuilder = BlobBuilder || window.MozBlobBuilder || window.WebKitBlobBuilder || window.MSBlobBuilder || window.OBlobBuilder;
+ URL = URL || window.MozURL || window.webkitURL || window.MSURL || window.OURL;
+ }
+ var data = 'Modernizr',
+ blob,
+ bb,
+ worker,
+ url,
+ timeout,
+ scriptText = 'this.onmessage=function(e){postMessage(e.data)}';
+
+ try {
+ blob = new Blob([scriptText], {type:'text/javascript'});
+ } catch (e) {
+ // we'll fall back to the deprecated BlobBuilder
+ }
+ if (!blob) {
+ bb = new BlobBuilder();
+ bb.append(scriptText);
+ blob = bb.getBlob();
+ }
+
+ url = URL.createObjectURL(blob);
+ worker = new Worker(url);
+
+ worker.onmessage = function(e) {
+ addTest('blobworkers', data === e.data);
+ cleanup();
+ };
+
+ // Just in case...
+ worker.onerror = fail;
+ timeout = setTimeout(fail, 200);
+
+ worker.postMessage(data);
+ } catch (e) {
+ fail();
+ }
+
+ function fail() {
+ addTest('blobworkers', false);
+ cleanup();
+ }
+
+ function cleanup() {
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ if (worker) {
+ worker.terminate();
+ }
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+ });
+
+/*!
+{
+ "name": "Workers from Data URIs",
+ "property": "dataworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_dataworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }],
+ "knownBugs": ["This test may output garbage to console."],
+ "authors": ["Jussi Kalliokoski"],
+ "async": true
+}
+!*/
+/* DOC
+Detects support for creating Web Workers from Data URIs.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ try {
+ var data = 'Modernizr',
+ worker = new Worker('data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=');
+
+ worker.onmessage = function(e) {
+ worker.terminate();
+ addTest('dataworkers', data === e.data);
+ worker = null;
+ };
+
+ // Just in case...
+ worker.onerror = function() {
+ addTest('dataworkers', false);
+ worker = null;
+ };
+
+ setTimeout(function() {
+ addTest('dataworkers', false);
+ }, 200);
+
+ worker.postMessage(data);
+ } catch (e) {
+ setTimeout(function() {
+ addTest('dataworkers', false);
+ }, 0);
+ }
+ });
+
+/*!
+{
+ "name": "Shared Workers",
+ "property": "sharedworkers",
+ "caniuse" : "sharedworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_sharedworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `SharedWorker` API from the Web Workers spec.
+*/
+
+ Modernizr.addTest('sharedworkers', 'SharedWorker' in window);
+
+/*!
+{
+ "name": "Web Workers",
+ "property": "webworkers",
+ "caniuse" : "webworkers",
+ "tags": ["performance", "workers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }, {
+ "name": "HTML5 Rocks article",
+ "href": "http://www.html5rocks.com/en/tutorials/workers/basics/"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/Guide/Performance/Using_web_workers"
+ }],
+ "polyfills": ["fakeworker", "html5shims"]
+}
+!*/
+/* DOC
+Detects support for the basic `Worker` API from the Web Workers spec. Web Workers provide a simple means for web content to run scripts in background threads.
+*/
+
+ Modernizr.addTest('webworkers', 'Worker' in window);
+
+/*!
+{
+ "name": "Transferables Objects",
+ "property": "transferables",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["transferables"],
+ "notes": [{
+ "name": "HTML5 Rocks article",
+ "href": "http://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast"
+ }],
+ "async": true
+}
+!*/
+/* DOC
+Detects whether web workers can use `transferables` objects.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var prerequisites = !!(Modernizr.blobconstructor &&
+ Modernizr.bloburls &&
+ Modernizr.webworkers &&
+ Modernizr.typedarrays);
+
+ // Early exit
+ if (!prerequisites) {
+ return addTest('transferables', false);
+ }
+
+ // Proper test if prerequisites are met
+ try {
+ var buffer,
+ scriptText = 'var hello = "world"',
+ blob = new Blob([scriptText], {type: 'text/javascript'}),
+ url = URL.createObjectURL(blob),
+ worker = new Worker(url),
+ timeout;
+
+ // Just in case...
+ worker.onerror = fail;
+ timeout = setTimeout(fail, 200);
+
+ // Building an minimal array buffer to send to the worker
+ buffer = new ArrayBuffer(1);
+
+ // Sending the buffer to the worker
+ worker.postMessage(buffer, [buffer]);
+
+ // If length of buffer is now 0, transferables are working
+ addTest('transferables', buffer.byteLength === 0);
+ cleanup();
+ } catch (e) {
+ fail();
+ }
+
+ function fail() {
+ addTest('transferables', false);
+ cleanup();
+ }
+
+ function cleanup() {
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ if (worker) {
+ worker.terminate();
+ }
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+ });
+
+
+ // Run each test
+ testRunner();
+
+ // Remove the "no-js" class if it exists
+ setClasses(classes);
+
+ delete ModernizrProto.addTest;
+ delete ModernizrProto.addAsyncTest;
+
+ // Run the things that are supposed to run after the tests
+ for (var i = 0; i < Modernizr._q.length; i++) {
+ Modernizr._q[i]();
+ }
+
+ // Leak Modernizr namespace
+ window.Modernizr = Modernizr;
+
+
+;
+
+})(window, document);
\ No newline at end of file
--- /dev/null
+/*!
+ * modernizr v3.0.0
+ * Build http://modernizr.com/download?-adownload-ambientlight-animation-apng-appearance-applicationcache-audio-audioloop-audiopreload-backgroundblendmode-backgroundcliptext-backgroundsize-batteryapi-beacon-bgpositionshorthand-bgpositionxy-bgrepeatspace_bgrepeatround-bgsizecover-blobconstructor-bloburls-blobworkers-borderimage-borderradius-boxshadow-boxsizing-canvas-canvasblending-canvastext-canvaswinding-capture-checked-classlist-contains-contenteditable-contextmenu-cookies-cors-createelementattrs_createelement_attrs-cssall-cssanimations-csscalc-csschunit-csscolumns-cssescape-cssexunit-cssfilters-cssgradients-csshyphens_softhyphens_softhyphensfind-cssinvalid-cssmask-csspointerevents-csspositionsticky-csspseudoanimations-csspseudotransitions-cssreflections-cssremunit-cssresize-cssscrollbar-csstransforms-csstransforms3d-csstransitions-cssvalid-cssvhunit-cssvmaxunit-cssvminunit-cssvwunit-cubicbezierrange-customevent-customprotocolhandler-dart-datachannel-datalistelem-dataset-datauri-dataview-dataworkers-details-devicemotion_deviceorientation-directory-display_runin-displaytable-documentfragment-ellipsis-emoji-es5-es5array-es5date-es5function-es5object-es5string-es5syntax-es5undefined-es6array-es6math-es6number-es6object-es6string-eventlistener-eventsource-exiforientation-fetch-fileinput-filereader-filesystem-flash-flexbox-flexboxlegacy-flexboxtweener-flexwrap-fontface-formattribute-formvalidation-framed-fullscreen-gamepads-generatedcontent-generators-geolocation-getrandomvalues-getusermedia-hashchange-hidden-hiddenscroll-history-hsla-htmlimports-ie8compat-indexeddb-indexeddbblob-inlinesvg-input-inputformaction-inputformenctype-inputformmethod-inputformtarget-inputtypes-intl-jpegxr-json-lastchild-localizednumber-localstorage-lowbandwidth-lowbattery-mathml-mediaqueries-microdata-multiplebgs-mutationobserver-notification-nthchild-objectfit-olreversed-oninput-opacity-outputelem-overflowscrolling-pagevisibility-peerconnection-performance-picture-placeholder-pointerevents-pointerlock-postmessage-preserve3d-progressbar_meter-promises-proximity-queryselector-quotamanagement-regions-requestanimationframe-requestautocomplete-rgba-ruby-sandbox-scriptasync-scriptdefer-seamless-search-serviceworker-sessionstorage-shapes-sharedworkers-siblinggeneral-sizes-smil-speechrecognition-speechsynthesis-srcdoc-srcset-strictmode-stylescoped-subpixelfont-supports-svg-svgasimg-svgclippaths-svgfilters-svgforeignobject-target-template-templatestrings-textalignlast-textareamaxlength-textshadow-texttrackapi_track-time-todataurljpeg_todataurlpng_todataurlwebp-touchevents-transferables-typedarrays-unicode-unicoderange-unknownelements-urlparser-userdata-userselect-vibrate-video-videoautoplay-videoloop-videopreload-vml-webaudio-webgl-webglextensions-webintents-webp-webpalpha-webpanimation-webplossless_webp_lossless-websockets-websocketsbinary-websqldatabase-webworkers-willchange-wrapflow-xhr2-xhrresponsetype-xhrresponsetypearraybuffer-xhrresponsetypeblob-xhrresponsetypedocument-xhrresponsetypejson-xhrresponsetypetext-addtest-atrule-domprefixes-hasevent-load-mq-prefixed-prefixedcss-prefixes-printshiv-testallprops-testprop-teststyles-dontmin
+ *
+ * Copyright (c)
+ * Faruk Ates
+ * Paul Irish
+ * Alex Sexton
+ * Ryan Seddon
+ * Alexander Farkas
+ * Patrick Kettner
+ * Stu Cox
+ * Richard Herrera
+
+ * MIT License
+ */
+
+/*
+ * Modernizr tests which native CSS3 and HTML5 features are available in the
+ * current UA and makes the results available to you in two ways: as properties on
+ * a global `Modernizr` object, and as classes on the `<html>` element. This
+ * information allows you to progressively enhance your pages with a granular level
+ * of control over the experience.
+*/
+
+;(function(window, document, undefined){
+ var tests = [];
+
+
+ /**
+ *
+ * ModernizrProto is the constructor for Modernizr
+ *
+ * @class
+ * @access public
+ */
+
+ var ModernizrProto = {
+ // The current version, dummy
+ _version: '3.0.0',
+
+ // Any settings that don't work as separate modules
+ // can go in here as configuration.
+ _config: {
+ 'classPrefix' : '',
+ 'enableClasses' : true,
+ 'enableJSClass' : true,
+ 'usePrefixes' : true
+ },
+
+ // Queue of tests
+ _q: [],
+
+ // Stub these for people who are listening
+ on: function(test, cb) {
+ // I don't really think people should do this, but we can
+ // safe guard it a bit.
+ // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.
+ // This is in case people listen to synchronous tests. I would leave it out,
+ // but the code to *disallow* sync tests in the real version of this
+ // function is actually larger than this.
+ var self = this;
+ setTimeout(function() {
+ cb(self[test]);
+ }, 0);
+ },
+
+ addTest: function(name, fn, options) {
+ tests.push({name : name, fn : fn, options : options});
+ },
+
+ addAsyncTest: function(fn) {
+ tests.push({name : null, fn : fn});
+ }
+ };
+
+
+
+ // Fake some of Object.create so we can force non test results to be non "own" properties.
+ var Modernizr = function() {};
+ Modernizr.prototype = ModernizrProto;
+
+ // Leak modernizr globally when you `require` it rather than force it here.
+ // Overwrite name so constructor name is nicer :D
+ Modernizr = new Modernizr();
+
+
+
+ var classes = [];
+
+
+ /**
+ * is returns a boolean if the typeof an obj is exactly type.
+ *
+ * @access private
+ * @function is
+ * @param {*} obj - A thing we want to check the type of
+ * @param {string} type - A string to compare the typeof against
+ * @returns {boolean}
+ */
+
+ function is(obj, type) {
+ return typeof obj === type;
+ }
+ ;
+
+ /**
+ * Run through all tests and detect their support in the current UA.
+ *
+ * @access private
+ */
+
+ function testRunner() {
+ var featureNames;
+ var feature;
+ var aliasIdx;
+ var result;
+ var nameIdx;
+ var featureName;
+ var featureNameSplit;
+
+ for (var featureIdx in tests) {
+ featureNames = [];
+ feature = tests[featureIdx];
+ // run the test, throw the return value into the Modernizr,
+ // then based on that boolean, define an appropriate className
+ // and push it into an array of classes we'll join later.
+ //
+ // If there is no name, it's an 'async' test that is run,
+ // but not directly added to the object. That should
+ // be done with a post-run addTest call.
+ if (feature.name) {
+ featureNames.push(feature.name.toLowerCase());
+
+ if (feature.options && feature.options.aliases && feature.options.aliases.length) {
+ // Add all the aliases into the names list
+ for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {
+ featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());
+ }
+ }
+ }
+
+ // Run the test, or use the raw value if it's not a function
+ result = is(feature.fn, 'function') ? feature.fn() : feature.fn;
+
+
+ // Set each of the names on the Modernizr object
+ for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {
+ featureName = featureNames[nameIdx];
+ // Support dot properties as sub tests. We don't do checking to make sure
+ // that the implied parent tests have been added. You must call them in
+ // order (either in the test, or make the parent test a dependency).
+ //
+ // Cap it to TWO to make the logic simple and because who needs that kind of subtesting
+ // hashtag famous last words
+ featureNameSplit = featureName.split('.');
+
+ if (featureNameSplit.length === 1) {
+ Modernizr[featureNameSplit[0]] = result;
+ } else {
+ // cast to a Boolean, if not one already
+ /* jshint -W053 */
+ if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
+ Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
+ }
+
+ Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;
+ }
+
+ classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));
+ }
+ }
+ }
+
+ ;
+
+ /**
+ * docElement is a convenience wrapper to grab the root element of the document
+ *
+ * @access private
+ * @returns {HTMLElement|SVGElement} The root element of the document
+ */
+
+ var docElement = document.documentElement;
+
+
+ /**
+ * A convenience helper to check if the document we are running in is an SVG document
+ *
+ * @access private
+ * @returns {boolean}
+ */
+
+ var isSVG = docElement.nodeName.toLowerCase() === 'svg';
+
+
+ /**
+ * setClasses takes an array of class names and adds them to the root element
+ *
+ * @access private
+ * @function setClasses
+ * @param {string[]} classes - Array of class names
+ */
+
+ // Pass in an and array of class names, e.g.:
+ // ['no-webp', 'borderradius', ...]
+ function setClasses(classes) {
+ var className = docElement.className;
+ var classPrefix = Modernizr._config.classPrefix || '';
+
+ if (isSVG) {
+ className = className.baseVal;
+ }
+
+ // Change `no-js` to `js` (independently of the `enableClasses` option)
+ // Handle classPrefix on this too
+ if (Modernizr._config.enableJSClass) {
+ var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)');
+ className = className.replace(reJS, '$1' + classPrefix + 'js$2');
+ }
+
+ if (Modernizr._config.enableClasses) {
+ // Add the new classes
+ className += ' ' + classPrefix + classes.join(' ' + classPrefix);
+ isSVG ? docElement.className.baseVal = className : docElement.className = className;
+ }
+
+ }
+
+ ;
+
+ /**
+ * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support
+ *
+ * @author kangax
+ * @access private
+ * @function hasOwnProp
+ * @param {object} object - The object to check for a property
+ * @param {string} property - The property to check for
+ * @returns {boolean}
+ */
+
+ // hasOwnProperty shim by kangax needed for Safari 2.0 support
+ var hasOwnProp;
+
+ (function() {
+ var _hasOwnProperty = ({}).hasOwnProperty;
+ /* istanbul ignore else */
+ /* we have no way of testing IE 5.5 or safari 2,
+ * so just assume the else gets hit */
+ if (!is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined')) {
+ hasOwnProp = function(object, property) {
+ return _hasOwnProperty.call(object, property);
+ };
+ }
+ else {
+ hasOwnProp = function(object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
+ return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
+ };
+ }
+ })();
+
+
+
+
+ // _l tracks listeners for async tests, as well as tests that execute after the initial run
+ ModernizrProto._l = {};
+
+ /**
+ * Modernizr.on is a way to listen for the completion of async tests. Being
+ * asynchronous, they may not finish before your scripts run. As a result you
+ * will get a possibly false negative `undefined` value.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.on
+ * @access public
+ * @function on
+ * @param {string} feature - String name of the feature detect
+ * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not
+ * @example
+ *
+ * ```js
+ * Modernizr.on('flash', function( result ) {
+ * if (result) {
+ * // the browser has flash
+ * } else {
+ * // the browser does not have flash
+ * }
+ * });
+ * ```
+ */
+
+ ModernizrProto.on = function(feature, cb) {
+ // Create the list of listeners if it doesn't exist
+ if (!this._l[feature]) {
+ this._l[feature] = [];
+ }
+
+ // Push this test on to the listener list
+ this._l[feature].push(cb);
+
+ // If it's already been resolved, trigger it on next tick
+ if (Modernizr.hasOwnProperty(feature)) {
+ // Next Tick
+ setTimeout(function() {
+ Modernizr._trigger(feature, Modernizr[feature]);
+ }, 0);
+ }
+ };
+
+ /**
+ * _trigger is the private function used to signal test completion and run any
+ * callbacks registered through [Modernizr.on](#modernizr-on)
+ *
+ * @memberof Modernizr
+ * @name Modernizr._trigger
+ * @access private
+ * @function _trigger
+ * @param {string} feature - string name of the feature detect
+ * @param {function|boolean} [res] - A feature detection function, or the boolean =
+ * result of a feature detection function
+ */
+
+ ModernizrProto._trigger = function(feature, res) {
+ if (!this._l[feature]) {
+ return;
+ }
+
+ var cbs = this._l[feature];
+
+ // Force async
+ setTimeout(function() {
+ var i, cb;
+ for (i = 0; i < cbs.length; i++) {
+ cb = cbs[i];
+ cb(res);
+ }
+ }, 0);
+
+ // Don't trigger these again
+ delete this._l[feature];
+ };
+
+ /**
+ * addTest allows you to define your own feature detects that are not currently
+ * included in Modernizr (under the covers it's the exact same code Modernizr
+ * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result
+ * will be added onto the Modernizr object, as well as an appropriate className set on
+ * the html element when configured to do so
+ *
+ * @memberof Modernizr
+ * @name Modernizr.addTest
+ * @optionName Modernizr.addTest()
+ * @optionProp addTest
+ * @access public
+ * @function addTest
+ * @param {string|object} feature - The string name of the feature detect, or an
+ * object of feature detect names and test
+ * @param {function|boolean} test - Function returning true if feature is supported,
+ * false if not. Otherwise a boolean representing the results of a feature detection
+ * @example
+ *
+ * The most common way of creating your own feature detects is by calling
+ * `Modernizr.addTest` with a string (preferably just lowercase, without any
+ * punctuation), and a function you want executed that will return a boolean result
+ *
+ * ```js
+ * Modernizr.addTest('itsTuesday', function() {
+ * var d = new Date();
+ * return d.getDay() === 2;
+ * });
+ * ```
+ *
+ * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday,
+ * and to `false` every other day of the week. One thing to notice is that the names of
+ * feature detect functions are always lowercased when added to the Modernizr object. That
+ * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will.
+ *
+ *
+ * Since we only look at the returned value from any feature detection function,
+ * you do not need to actually use a function. For simple detections, just passing
+ * in a statement that will return a boolean value works just fine.
+ *
+ * ```js
+ * Modernizr.addTest('hasJquery', 'jQuery' in window);
+ * ```
+ *
+ * Just like before, when the above runs `Modernizr.hasjquery` will be true if
+ * jQuery has been included on the page. Not using a function saves a small amount
+ * of overhead for the browser, as well as making your code much more readable.
+ *
+ * Finally, you also have the ability to pass in an object of feature names and
+ * their tests. This is handy if you want to add multiple detections in one go.
+ * The keys should always be a string, and the value can be either a boolean or
+ * function that returns a boolean.
+ *
+ * ```js
+ * var detects = {
+ * 'hasjquery': 'jQuery' in window,
+ * 'itstuesday': function() {
+ * var d = new Date();
+ * return d.getDay() === 2;
+ * }
+ * }
+ *
+ * Modernizr.addTest(detects);
+ * ```
+ *
+ * There is really no difference between the first methods and this one, it is
+ * just a convenience to let you write more readable code.
+ */
+
+ function addTest(feature, test) {
+
+ if (typeof feature == 'object') {
+ for (var key in feature) {
+ if (hasOwnProp(feature, key)) {
+ addTest(key, feature[ key ]);
+ }
+ }
+ } else {
+
+ feature = feature.toLowerCase();
+ var featureNameSplit = feature.split('.');
+ var last = Modernizr[featureNameSplit[0]];
+
+ // Again, we don't check for parent test existence. Get that right, though.
+ if (featureNameSplit.length == 2) {
+ last = last[featureNameSplit[1]];
+ }
+
+ if (typeof last != 'undefined') {
+ // we're going to quit if you're trying to overwrite an existing test
+ // if we were to allow it, we'd do this:
+ // var re = new RegExp("\\b(no-)?" + feature + "\\b");
+ // docElement.className = docElement.className.replace( re, '' );
+ // but, no rly, stuff 'em.
+ return Modernizr;
+ }
+
+ test = typeof test == 'function' ? test() : test;
+
+ // Set the value (this is the magic, right here).
+ if (featureNameSplit.length == 1) {
+ Modernizr[featureNameSplit[0]] = test;
+ } else {
+ // cast to a Boolean, if not one already
+ /* jshint -W053 */
+ if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
+ Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
+ }
+
+ Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test;
+ }
+
+ // Set a single class (either `feature` or `no-feature`)
+ /* jshint -W041 */
+ setClasses([(!!test && test != false ? '' : 'no-') + featureNameSplit.join('-')]);
+ /* jshint +W041 */
+
+ // Trigger the event
+ Modernizr._trigger(feature, test);
+ }
+
+ return Modernizr; // allow chaining.
+ }
+
+ // After all the tests are run, add self to the Modernizr prototype
+ Modernizr._q.push(function() {
+ ModernizrProto.addTest = addTest;
+ });
+
+
+
+
+ /**
+ * If the browsers follow the spec, then they would expose vendor-specific style as:
+ * elem.style.WebkitBorderRadius
+ * instead of something like the following, which would be technically incorrect:
+ * elem.style.webkitBorderRadius
+
+ * Webkit ghosts their properties in lowercase but Opera & Moz do not.
+ * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
+ * erik.eae.net/archives/2008/03/10/21.48.10/
+
+ * More here: github.com/Modernizr/Modernizr/issues/issue/21
+ *
+ * @access private
+ * @returns {string} The string representing the vendor-specific style properties
+ */
+
+ var omPrefixes = 'Moz O ms Webkit';
+
+
+ var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);
+ ModernizrProto._cssomPrefixes = cssomPrefixes;
+
+
+ /**
+ * atRule returns a given CSS property at-rule (eg @keyframes), possibly in
+ * some prefixed form, or false, in the case of an unsupported rule
+ *
+ * @memberof Modernizr
+ * @name Modernizr.atRule
+ * @optionName Modernizr.atRule()
+ * @optionProp atRule
+ * @access public
+ * @function atRule
+ * @param {string} prop - String name of the @-rule to test for
+ * @returns {string|false} The string representing the (possibly prefixed)
+ * valid version of the @-rule, or `false` when it is unsupported.
+ * @example
+ * ```js
+ * var keyframes = Modernizr.atRule('@keyframes');
+ *
+ * if (keyframes) {
+ * // keyframes are supported
+ * // could be `@-webkit-keyframes` or `@keyframes`
+ * } else {
+ * // keyframes === `false`
+ * }
+ * ```
+ *
+ */
+
+ var atRule = function(prop) {
+ var length = prefixes.length;
+ var cssrule = window.CSSRule;
+ var rule;
+
+ if (typeof cssrule === 'undefined') {
+ return undefined;
+ }
+
+ if (!prop) {
+ return false;
+ }
+
+ // remove literal @ from beginning of provided property
+ prop = prop.replace(/^@/, '');
+
+ // CSSRules use underscores instead of dashes
+ rule = prop.replace(/-/g, '_').toUpperCase() + '_RULE';
+
+ if (rule in cssrule) {
+ return '@' + prop;
+ }
+
+ for (var i = 0; i < length; i++) {
+ // prefixes gives us something like -o-, and we want O_
+ var prefix = prefixes[i];
+ var thisRule = prefix.toUpperCase() + '_' + rule;
+
+ if (thisRule in cssrule) {
+ return '@-' + prefix.toLowerCase() + '-' + prop;
+ }
+ }
+
+ return false;
+ };
+
+ ModernizrProto.atRule = atRule;
+
+
+
+ /**
+ * List of JavaScript DOM values used for tests
+ *
+ * @memberof Modernizr
+ * @name Modernizr._domPrefixes
+ * @optionName Modernizr._domPrefixes
+ * @optionProp domPrefixes
+ * @access public
+ * @example
+ *
+ * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather
+ * than kebab-case properties, all properties are their Capitalized variant
+ *
+ * ```js
+ * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ];
+ * ```
+ */
+
+ var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);
+ ModernizrProto._domPrefixes = domPrefixes;
+
+
+ /**
+ * createElement is a convenience wrapper around document.createElement. Since we
+ * use createElement all over the place, this allows for (slightly) smaller code
+ * as well as abstracting away issues with creating elements in contexts other than
+ * HTML documents (e.g. SVG documents).
+ *
+ * @access private
+ * @function createElement
+ * @returns {HTMLElement|SVGElement} An HTML or SVG element
+ */
+
+ function createElement() {
+ if (typeof document.createElement !== 'function') {
+ // This is the case in IE7, where the type of createElement is "object".
+ // For this reason, we cannot call apply() as Object is not a Function.
+ return document.createElement(arguments[0]);
+ } else if (isSVG) {
+ return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);
+ } else {
+ return document.createElement.apply(document, arguments);
+ }
+ }
+
+ ;
+
+ /**
+ * Modernizr.hasEvent() detects support for a given event
+ *
+ * @memberof Modernizr
+ * @name Modernizr.hasEvent
+ * @optionName Modernizr.hasEvent()
+ * @optionProp hasEvent
+ * @access public
+ * @function hasEvent
+ * @param {string|*} eventName is the name of an event to test for (e.g. "resize")
+ * @param {Element|string} [element=HTMLDivElement] is the element|document|window|tagName to test on
+ * @returns {boolean}
+ * @example
+ * `Modernizr.hasEvent` lets you determine if the browser supports a supplied event.
+ * By default, it does this detection on a div element
+ *
+ * ```js
+ * hasEvent('blur') // true;
+ * ```
+ *
+ * However, you are able to give an object as a second argument to hasEvent to
+ * detect an event on something other than a div.
+ *
+ * ```js
+ * hasEvent('devicelight', window) // true;
+ * ```
+ *
+ */
+
+ var hasEvent = (function(undefined) {
+
+ // Detect whether event support can be detected via `in`. Test on a DOM element
+ // using the "blur" event b/c it should always exist. bit.ly/event-detection
+ var needsFallback = !('onblur' in document.documentElement);
+
+ function inner(eventName, element) {
+
+ var isSupported;
+ if (!eventName) { return false; }
+ if (!element || typeof element === 'string') {
+ element = createElement(element || 'div');
+ }
+
+ // Testing via the `in` operator is sufficient for modern browsers and IE.
+ // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and
+ // "resize", whereas `in` "catches" those.
+ eventName = 'on' + eventName;
+ isSupported = eventName in element;
+
+ // Fallback technique for old Firefox - bit.ly/event-detection
+ if (!isSupported && needsFallback) {
+ if (!element.setAttribute) {
+ // Switch to generic element if it lacks `setAttribute`.
+ // It could be the `document`, `window`, or something else.
+ element = createElement('div');
+ }
+
+ element.setAttribute(eventName, '');
+ isSupported = typeof element[eventName] === 'function';
+
+ if (element[eventName] !== undefined) {
+ // If property was created, "remove it" by setting value to `undefined`.
+ element[eventName] = undefined;
+ }
+ element.removeAttribute(eventName);
+ }
+
+ return isSupported;
+ }
+ return inner;
+ })();
+
+
+ ModernizrProto.hasEvent = hasEvent;
+
+
+/**
+ * @optionName html5printshiv
+ * @optionProp html5printshiv
+ */
+
+ // Take the html5 variable out of the html5shiv scope so we can return it.
+ var html5;
+ if (!isSVG) {
+
+ /**
+ * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+ */
+ ;(function(window, document) {
+ /*jshint evil:true */
+ /** version */
+ var version = '3.7.2';
+
+ /** Preset options */
+ var options = window.html5 || {};
+
+ /** Used to skip problem elements */
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+ /** Not all elements can be cloned in IE **/
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+ /** Detect whether the browser supports default html5 styles */
+ var supportsHtml5Styles;
+
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
+ var expando = '_html5shiv';
+
+ /** The id for the the documents expando */
+ var expanID = 0;
+
+ /** Cached data for each document */
+ var expandoData = {};
+
+ /** Detect whether the browser supports unknown elements */
+ var supportsUnknownElements;
+
+ (function() {
+ try {
+ var a = document.createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+ supportsHtml5Styles = ('hidden' in a);
+
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
+ // assign a false positive if unable to shiv
+ (document.createElement)('a');
+ var frag = document.createDocumentFragment();
+ return (
+ typeof frag.cloneNode == 'undefined' ||
+ typeof frag.createDocumentFragment == 'undefined' ||
+ typeof frag.createElement == 'undefined'
+ );
+ }());
+ } catch(e) {
+ // assign a false positive if detection fails => unable to shiv
+ supportsHtml5Styles = true;
+ supportsUnknownElements = true;
+ }
+
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a style sheet with the given CSS text and adds it to the document.
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @param {String} cssText The CSS text.
+ * @returns {StyleSheet} The style element.
+ */
+ function addStyleSheet(ownerDocument, cssText) {
+ var p = ownerDocument.createElement('p'),
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+ p.innerHTML = 'x<style>' + cssText + '</style>';
+ return parent.insertBefore(p.lastChild, parent.firstChild);
+ }
+
+ /**
+ * Returns the value of `html5.elements` as an array.
+ * @private
+ * @returns {Array} An array of shived element node names.
+ */
+ function getElements() {
+ var elements = html5.elements;
+ return typeof elements == 'string' ? elements.split(' ') : elements;
+ }
+
+ /**
+ * Extends the built-in list of html5 elements
+ * @memberOf html5
+ * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
+ * @param {Document} ownerDocument The context document.
+ */
+ function addElements(newElements, ownerDocument) {
+ var elements = html5.elements;
+ if(typeof elements != 'string'){
+ elements = elements.join(' ');
+ }
+ if(typeof newElements != 'string'){
+ newElements = newElements.join(' ');
+ }
+ html5.elements = elements +' '+ newElements;
+ shivDocument(ownerDocument);
+ }
+
+ /**
+ * Returns the data associated to the given document
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Object} An object of data.
+ */
+ function getExpandoData(ownerDocument) {
+ var data = expandoData[ownerDocument[expando]];
+ if (!data) {
+ data = {};
+ expanID++;
+ ownerDocument[expando] = expanID;
+ expandoData[expanID] = data;
+ }
+ return data;
+ }
+
+ /**
+ * returns a shived element for the given nodeName and document
+ * @memberOf html5
+ * @param {String} nodeName name of the element
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived element.
+ */
+ function createElement(nodeName, ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createElement(nodeName);
+ }
+ if (!data) {
+ data = getExpandoData(ownerDocument);
+ }
+ var node;
+
+ if (data.cache[nodeName]) {
+ node = data.cache[nodeName].cloneNode();
+ } else if (saveClones.test(nodeName)) {
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+ } else {
+ node = data.createElem(nodeName);
+ }
+
+ // Avoid adding some elements to fragments in IE < 9 because
+ // * Attributes like `name` or `type` cannot be set/changed once an element
+ // is inserted into a document/fragment
+ // * Link elements with `src` attributes that are inaccessible, as with
+ // a 403 response, will cause the tab/window to crash
+ // * Script elements appended to fragments will execute when their `src`
+ // or `text` property is set
+ return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
+ }
+
+ /**
+ * returns a shived DocumentFragment for the given document
+ * @memberOf html5
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived DocumentFragment.
+ */
+ function createDocumentFragment(ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createDocumentFragment();
+ }
+ data = data || getExpandoData(ownerDocument);
+ var clone = data.frag.cloneNode(),
+ i = 0,
+ elems = getElements(),
+ l = elems.length;
+ for(;i<l;i++){
+ clone.createElement(elems[i]);
+ }
+ return clone;
+ }
+
+ /**
+ * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+ * @private
+ * @param {Document|DocumentFragment} ownerDocument The document.
+ * @param {Object} data of the document.
+ */
+ function shivMethods(ownerDocument, data) {
+ if (!data.cache) {
+ data.cache = {};
+ data.createElem = ownerDocument.createElement;
+ data.createFrag = ownerDocument.createDocumentFragment;
+ data.frag = data.createFrag();
+ }
+
+
+ ownerDocument.createElement = function(nodeName) {
+ //abort shiv
+ if (!html5.shivMethods) {
+ return data.createElem(nodeName);
+ }
+ return createElement(nodeName, ownerDocument, data);
+ };
+
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+ 'var n=f.cloneNode(),c=n.createElement;' +
+ 'h.shivMethods&&(' +
+ // unroll the `createElement` calls
+ getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
+ data.createElem(nodeName);
+ data.frag.createElement(nodeName);
+ return 'c("' + nodeName + '")';
+ }) +
+ ');return n}'
+ )(html5, data.frag);
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivDocument(ownerDocument) {
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ var data = getExpandoData(ownerDocument);
+
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+ data.hasCSS = !!addStyleSheet(ownerDocument,
+ // corrects block display not defined in IE6/7/8/9
+ 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
+ // adds styling not present in IE6/7/8/9
+ 'mark{background:#FF0;color:#000}' +
+ // hides non-rendered elements
+ 'template{display:none}'
+ );
+ }
+ if (!supportsUnknownElements) {
+ shivMethods(ownerDocument, data);
+ }
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * The `html5` object is exposed so that more elements can be shived and
+ * existing shiving can be detected on iframes.
+ * @type Object
+ * @example
+ *
+ * // options can be changed before the script is included
+ * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+ */
+ var html5 = {
+
+ /**
+ * An array or space separated string of node names of the elements to shiv.
+ * @memberOf html5
+ * @type Array|String
+ */
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
+
+ /**
+ * current version of html5shiv
+ */
+ 'version': version,
+
+ /**
+ * A flag to indicate that the HTML5 style sheet should be inserted.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivCSS': (options.shivCSS !== false),
+
+ /**
+ * Is equal to true if a browser supports creating unknown/HTML5 elements
+ * @memberOf html5
+ * @type boolean
+ */
+ 'supportsUnknownElements': supportsUnknownElements,
+
+ /**
+ * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+ * methods should be overwritten.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivMethods': (options.shivMethods !== false),
+
+ /**
+ * A string to describe the type of `html5` object ("default" or "default print").
+ * @memberOf html5
+ * @type String
+ */
+ 'type': 'default',
+
+ // shivs the document according to the specified `html5` object options
+ 'shivDocument': shivDocument,
+
+ //creates a shived element
+ createElement: createElement,
+
+ //creates a shived documentFragment
+ createDocumentFragment: createDocumentFragment,
+
+ //extends list of elements
+ addElements: addElements
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose html5
+ window.html5 = html5;
+
+ // shiv the document
+ shivDocument(document);
+
+ /*------------------------------- Print Shiv -------------------------------*/
+
+ /** Used to filter media types */
+ var reMedia = /^$|\b(?:all|print)\b/;
+
+ /** Used to namespace printable elements */
+ var shivNamespace = 'html5shiv';
+
+ /** Detect whether the browser supports shivable style sheets */
+ var supportsShivableSheets = !supportsUnknownElements && (function() {
+ // assign a false negative if unable to shiv
+ var docEl = document.documentElement;
+ return !(
+ typeof document.namespaces == 'undefined' ||
+ typeof document.parentWindow == 'undefined' ||
+ typeof docEl.applyElement == 'undefined' ||
+ typeof docEl.removeNode == 'undefined' ||
+ typeof window.attachEvent == 'undefined'
+ );
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Wraps all HTML5 elements in the given document with printable elements.
+ * (eg. the "header" element is wrapped with the "html5shiv:header" element)
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Array} An array wrappers added.
+ */
+ function addWrappers(ownerDocument) {
+ var node,
+ nodes = ownerDocument.getElementsByTagName('*'),
+ index = nodes.length,
+ reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'),
+ result = [];
+
+ while (index--) {
+ node = nodes[index];
+ if (reElements.test(node.nodeName)) {
+ result.push(node.applyElement(createWrapper(node)));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a printable wrapper for the given element.
+ * @private
+ * @param {Element} element The element.
+ * @returns {Element} The wrapper.
+ */
+ function createWrapper(element) {
+ var node,
+ nodes = element.attributes,
+ index = nodes.length,
+ wrapper = element.ownerDocument.createElement(shivNamespace + ':' + element.nodeName);
+
+ // copy element attributes to the wrapper
+ while (index--) {
+ node = nodes[index];
+ node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue);
+ }
+ // copy element styles to the wrapper
+ wrapper.style.cssText = element.style.cssText;
+ return wrapper;
+ }
+
+ /**
+ * Shivs the given CSS text.
+ * (eg. header{} becomes html5shiv\:header{})
+ * @private
+ * @param {String} cssText The CSS text to shiv.
+ * @returns {String} The shived CSS text.
+ */
+ function shivCssText(cssText) {
+ var pair,
+ parts = cssText.split('{'),
+ index = parts.length,
+ reElements = RegExp('(^|[\\s,>+~])(' + getElements().join('|') + ')(?=[[\\s,>+~#.:]|$)', 'gi'),
+ replacement = '$1' + shivNamespace + '\\:$2';
+
+ while (index--) {
+ pair = parts[index] = parts[index].split('}');
+ pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement);
+ parts[index] = pair.join('}');
+ }
+ return parts.join('{');
+ }
+
+ /**
+ * Removes the given wrappers, leaving the original elements.
+ * @private
+ * @params {Array} wrappers An array of printable wrappers.
+ */
+ function removeWrappers(wrappers) {
+ var index = wrappers.length;
+ while (index--) {
+ wrappers[index].removeNode();
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document for print.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivPrint(ownerDocument) {
+ var shivedSheet,
+ wrappers,
+ data = getExpandoData(ownerDocument),
+ namespaces = ownerDocument.namespaces,
+ ownerWindow = ownerDocument.parentWindow;
+
+ if (!supportsShivableSheets || ownerDocument.printShived) {
+ return ownerDocument;
+ }
+ if (typeof namespaces[shivNamespace] == 'undefined') {
+ namespaces.add(shivNamespace);
+ }
+
+ function removeSheet() {
+ clearTimeout(data._removeSheetTimer);
+ if (shivedSheet) {
+ shivedSheet.removeNode(true);
+ }
+ shivedSheet= null;
+ }
+
+ ownerWindow.attachEvent('onbeforeprint', function() {
+
+ removeSheet();
+
+ var imports,
+ length,
+ sheet,
+ collection = ownerDocument.styleSheets,
+ cssText = [],
+ index = collection.length,
+ sheets = Array(index);
+
+ // convert styleSheets collection to an array
+ while (index--) {
+ sheets[index] = collection[index];
+ }
+ // concat all style sheet CSS text
+ while ((sheet = sheets.pop())) {
+ // IE does not enforce a same origin policy for external style sheets...
+ // but has trouble with some dynamically created stylesheets
+ if (!sheet.disabled && reMedia.test(sheet.media)) {
+
+ try {
+ imports = sheet.imports;
+ length = imports.length;
+ } catch(er){
+ length = 0;
+ }
+
+ for (index = 0; index < length; index++) {
+ sheets.push(imports[index]);
+ }
+
+ try {
+ cssText.push(sheet.cssText);
+ } catch(er){}
+ }
+ }
+
+ // wrap all HTML5 elements with printable elements and add the shived style sheet
+ cssText = shivCssText(cssText.reverse().join(''));
+ wrappers = addWrappers(ownerDocument);
+ shivedSheet = addStyleSheet(ownerDocument, cssText);
+
+ });
+
+ ownerWindow.attachEvent('onafterprint', function() {
+ // remove wrappers, leaving the original elements, and remove the shived style sheet
+ removeWrappers(wrappers);
+ clearTimeout(data._removeSheetTimer);
+ data._removeSheetTimer = setTimeout(removeSheet, 500);
+ });
+
+ ownerDocument.printShived = true;
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose API
+ html5.type += ' print';
+ html5.shivPrint = shivPrint;
+
+ // shiv for print
+ shivPrint(document);
+
+ }(this, document));
+ }
+
+ ;
+
+ /**
+ * Previously, Modernizr.load was an alias for yepnope. Since yepnope was
+ * deprecated, we removed it as well. It is not available on the website builder,
+ * this is only included as an improved warning to those who build a custom
+ * version locally.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.load
+ * @access private
+ * @function load
+ *
+ */
+
+ var err = function() {};
+ var warn = function() {};
+
+ if (window.console) {
+ err = function() {
+ var method = console.error ? 'error' : 'log';
+ window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
+ };
+
+ warn = function() {
+ var method = console.warn ? 'warn' : 'log';
+ window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
+ };
+ }
+
+ ModernizrProto.load = function() {
+ if ('yepnope' in window) {
+ warn('yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.\n See http://github.com/Modernizr/Modernizr/issues/1182 for more information.');
+ window.yepnope.apply(window, [].slice.call(arguments, 0));
+ } else {
+ err('yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com. See http://github.com/Modernizr/Modernizr/issues/1182 for more information.');
+ }
+ };
+
+
+
+ /**
+ * getBody returns the body of a document, or an element that can stand in for
+ * the body if a real body does not exist
+ *
+ * @access private
+ * @function getBody
+ * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an
+ * artificially created element that stands in for the body
+ */
+
+ function getBody() {
+ // After page load injecting a fake body doesn't work so check if body exists
+ var body = document.body;
+
+ if (!body) {
+ // Can't use the real body create a fake one.
+ body = createElement(isSVG ? 'svg' : 'body');
+ body.fake = true;
+ }
+
+ return body;
+ }
+
+ ;
+
+ /**
+ * injectElementWithStyles injects an element with style element and some CSS rules
+ *
+ * @access private
+ * @function injectElementWithStyles
+ * @param {string} rule - String representing a css rule
+ * @param {function} callback - A function that is used to test the injected element
+ * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
+ * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
+ * @returns {boolean}
+ */
+
+ function injectElementWithStyles(rule, callback, nodes, testnames) {
+ var mod = 'modernizr';
+ var style;
+ var ret;
+ var node;
+ var docOverflow;
+ var div = createElement('div');
+ var body = getBody();
+
+ if (parseInt(nodes, 10)) {
+ // In order not to give false positives we create a node for each test
+ // This also allows the method to scale for unspecified uses
+ while (nodes--) {
+ node = createElement('div');
+ node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
+ div.appendChild(node);
+ }
+ }
+
+ style = createElement('style');
+ style.type = 'text/css';
+ style.id = 's' + mod;
+
+ // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
+ // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
+ (!body.fake ? div : body).appendChild(style);
+ body.appendChild(div);
+
+ if (style.styleSheet) {
+ style.styleSheet.cssText = rule;
+ } else {
+ style.appendChild(document.createTextNode(rule));
+ }
+ div.id = mod;
+
+ if (body.fake) {
+ //avoid crashing IE8, if background image is used
+ body.style.background = '';
+ //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
+ body.style.overflow = 'hidden';
+ docOverflow = docElement.style.overflow;
+ docElement.style.overflow = 'hidden';
+ docElement.appendChild(body);
+ }
+
+ ret = callback(div, rule);
+ // If this is done after page load we don't want to remove the body so check if body exists
+ if (body.fake) {
+ body.parentNode.removeChild(body);
+ docElement.style.overflow = docOverflow;
+ // Trigger layout so kinetic scrolling isn't disabled in iOS6+
+ docElement.offsetHeight;
+ } else {
+ div.parentNode.removeChild(div);
+ }
+
+ return !!ret;
+
+ }
+
+ ;
+
+ /**
+ * Modernizr.mq tests a given media query, live against the current state of the window
+ * adapted from matchMedia polyfill by Scott Jehl and Paul Irish
+ * gist.github.com/786768
+ *
+ * @memberof Modernizr
+ * @name Modernizr.mq
+ * @optionName Modernizr.mq()
+ * @optionProp mq
+ * @access public
+ * @function mq
+ * @param {string} mq - String of the media query we want to test
+ * @returns {boolean}
+ * @example
+ * Modernizr.mq allows for you to programmatically check if the current browser
+ * window state matches a media query.
+ *
+ * ```js
+ * var query = Modernizr.mq('(min-width: 900px)');
+ *
+ * if (query) {
+ * // the browser window is larger than 900px
+ * }
+ * ```
+ *
+ * Only valid media queries are supported, therefore you must always include values
+ * with your media query
+ *
+ * ```js
+ * // good
+ * Modernizr.mq('(min-width: 900px)');
+ *
+ * // bad
+ * Modernizr.mq('min-width');
+ * ```
+ *
+ * If you would just like to test that media queries are supported in general, use
+ *
+ * ```js
+ * Modernizr.mq('only all'); // true if MQ are supported, false if not
+ * ```
+ *
+ *
+ * Note that if the browser does not support media queries (e.g. old IE) mq will
+ * always return false.
+ */
+
+ var mq = (function() {
+ var matchMedia = window.matchMedia || window.msMatchMedia;
+ if (matchMedia) {
+ return function(mq) {
+ var mql = matchMedia(mq);
+ return mql && mql.matches || false;
+ };
+ }
+
+ return function(mq) {
+ var bool = false;
+
+ injectElementWithStyles('@media ' + mq + ' { #modernizr { position: absolute; } }', function(node) {
+ bool = (window.getComputedStyle ?
+ window.getComputedStyle(node, null) :
+ node.currentStyle)['position'] == 'absolute';
+ });
+
+ return bool;
+ };
+ })();
+
+
+ ModernizrProto.mq = mq;
+
+
+
+
+ /**
+ * contains checks to see if a string contains another string
+ *
+ * @access private
+ * @function contains
+ * @param {string} str - The string we want to check for substrings
+ * @param {string} substr - The substring we want to search the first string for
+ * @returns {boolean}
+ */
+
+ function contains(str, substr) {
+ return !!~('' + str).indexOf(substr);
+ }
+
+ ;
+
+ /**
+ * Create our "modernizr" element that we do most feature tests on.
+ *
+ * @access private
+ */
+
+ var modElem = {
+ elem : createElement('modernizr')
+ };
+
+ // Clean up this element
+ Modernizr._q.push(function() {
+ delete modElem.elem;
+ });
+
+
+
+ var mStyle = {
+ style : modElem.elem.style
+ };
+
+ // kill ref for gc, must happen before mod.elem is removed, so we unshift on to
+ // the front of the queue.
+ Modernizr._q.unshift(function() {
+ delete mStyle.style;
+ });
+
+
+
+ /**
+ * domToCSS takes a camelCase string and converts it to kebab-case
+ * e.g. boxSizing -> box-sizing
+ *
+ * @access private
+ * @function domToCSS
+ * @param {string} name - String name of camelCase prop we want to convert
+ * @returns {string} The kebab-case version of the supplied name
+ */
+
+ function domToCSS(name) {
+ return name.replace(/([A-Z])/g, function(str, m1) {
+ return '-' + m1.toLowerCase();
+ }).replace(/^ms-/, '-ms-');
+ }
+ ;
+
+ /**
+ * nativeTestProps allows for us to use native feature detection functionality if available.
+ * some prefixed form, or false, in the case of an unsupported rule
+ *
+ * @access private
+ * @function nativeTestProps
+ * @param {array} props - An array of property names
+ * @param {string} value - A string representing the value we want to check via @supports
+ * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise
+ */
+
+ // Accepts a list of property names and a single value
+ // Returns `undefined` if native detection not available
+ function nativeTestProps (props, value) {
+ var i = props.length;
+ // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface
+ if ('CSS' in window && 'supports' in window.CSS) {
+ // Try every prefixed variant of the property
+ while (i--) {
+ if (window.CSS.supports(domToCSS(props[i]), value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ // Otherwise fall back to at-rule (for Opera 12.x)
+ else if ('CSSSupportsRule' in window) {
+ // Build a condition string for every prefixed variant
+ var conditionText = [];
+ while (i--) {
+ conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');
+ }
+ conditionText = conditionText.join(' or ');
+ return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {
+ return getComputedStyle(node, null).position == 'absolute';
+ });
+ }
+ return undefined;
+ }
+ ;
+
+ /**
+ * cssToDOM takes a kebab-case string and converts it to camelCase
+ * e.g. box-sizing -> boxSizing
+ *
+ * @access private
+ * @function cssToDOM
+ * @param {string} name - String name of kebab-case prop we want to convert
+ * @returns {string} The camelCase version of the supplied name
+ */
+
+ function cssToDOM(name) {
+ return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
+ return m1 + m2.toUpperCase();
+ }).replace(/^-/, '');
+ }
+ ;
+
+ // testProps is a generic CSS / DOM property test.
+
+ // In testing support for a given CSS property, it's legit to test:
+ // `elem.style[styleName] !== undefined`
+ // If the property is supported it will return an empty string,
+ // if unsupported it will return undefined.
+
+ // We'll take advantage of this quick test and skip setting a style
+ // on our modernizr element, but instead just testing undefined vs
+ // empty string.
+
+ // Property names can be provided in either camelCase or kebab-case.
+
+ function testProps(props, prefixed, value, skipValueTest) {
+ skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;
+
+ // Try native detect first
+ if (!is(value, 'undefined')) {
+ var result = nativeTestProps(props, value);
+ if (!is(result, 'undefined')) {
+ return result;
+ }
+ }
+
+ // Otherwise do it properly
+ var afterInit, i, propsLength, prop, before;
+
+ // If we don't have a style element, that means we're running async or after
+ // the core tests, so we'll need to create our own elements to use
+
+ // inside of an SVG element, in certain browsers, the `style` element is only
+ // defined for valid tags. Therefore, if `modernizr` does not have one, we
+ // fall back to a less used element and hope for the best.
+ var elems = ['modernizr', 'tspan'];
+ while (!mStyle.style) {
+ afterInit = true;
+ mStyle.modElem = createElement(elems.shift());
+ mStyle.style = mStyle.modElem.style;
+ }
+
+ // Delete the objects if we created them.
+ function cleanElems() {
+ if (afterInit) {
+ delete mStyle.style;
+ delete mStyle.modElem;
+ }
+ }
+
+ propsLength = props.length;
+ for (i = 0; i < propsLength; i++) {
+ prop = props[i];
+ before = mStyle.style[prop];
+
+ if (contains(prop, '-')) {
+ prop = cssToDOM(prop);
+ }
+
+ if (mStyle.style[prop] !== undefined) {
+
+ // If value to test has been passed in, do a set-and-check test.
+ // 0 (integer) is a valid property value, so check that `value` isn't
+ // undefined, rather than just checking it's truthy.
+ if (!skipValueTest && !is(value, 'undefined')) {
+
+ // Needs a try catch block because of old IE. This is slow, but will
+ // be avoided in most cases because `skipValueTest` will be used.
+ try {
+ mStyle.style[prop] = value;
+ } catch (e) {}
+
+ // If the property value has changed, we assume the value used is
+ // supported. If `value` is empty string, it'll fail here (because
+ // it hasn't changed), which matches how browsers have implemented
+ // CSS.supports()
+ if (mStyle.style[prop] != before) {
+ cleanElems();
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ // Otherwise just return true, or the property name if this is a
+ // `prefixed()` call
+ else {
+ cleanElems();
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ }
+ cleanElems();
+ return false;
+ }
+
+ ;
+
+ /**
+ * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.
+ *
+ * @access private
+ * @function fnBind
+ * @param {function} fn - a function you want to change `this` reference to
+ * @param {object} that - the `this` you want to call the function with
+ * @returns {function} The wrapped version of the supplied function
+ */
+
+ function fnBind(fn, that) {
+ return function() {
+ return fn.apply(that, arguments);
+ };
+ }
+
+ ;
+
+ /**
+ * testDOMProps is a generic DOM property test; if a browser supports
+ * a certain property, it won't return undefined for it.
+ */
+ function testDOMProps(props, obj, elem) {
+ var item;
+
+ for (var i in props) {
+ if (props[i] in obj) {
+
+ // return the property name as a string
+ if (elem === false) {
+ return props[i];
+ }
+
+ item = obj[props[i]];
+
+ // let's bind a function
+ if (is(item, 'function')) {
+ // bind to obj unless overriden
+ return fnBind(item, elem || obj);
+ }
+
+ // return the unbound function or obj or value
+ return item;
+ }
+ }
+ return false;
+ }
+
+ ;
+
+ /**
+ * testPropsAll tests a list of DOM properties we want to check against.
+ * We specify literally ALL possible (known and/or likely) properties on
+ * the element including the non-vendor prefixed one, for forward-
+ * compatibility.
+ */
+ function testPropsAll(prop, prefixed, elem, value, skipValueTest) {
+
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
+ props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
+
+ // did they call .prefixed('boxSizing') or are we just testing a prop?
+ if (is(prefixed, 'string') || is(prefixed, 'undefined')) {
+ return testProps(props, prefixed, value, skipValueTest);
+
+ // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
+ } else {
+ props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
+ return testDOMProps(props, prefixed, elem);
+ }
+ }
+
+ // Modernizr.testAllProps() investigates whether a given style property,
+ // or any of its vendor-prefixed variants, is recognized
+ //
+ // Note that the property names must be provided in the camelCase variant.
+ // Modernizr.testAllProps('boxSizing')
+ ModernizrProto.testAllProps = testPropsAll;
+
+
+
+ /**
+ * prefixed returns the prefixed or nonprefixed property name variant of your input
+ *
+ * @memberof Modernizr
+ * @name Modernizr.prefixed
+ * @optionName Modernizr.prefixed()
+ * @optionProp prefixed
+ * @access public
+ * @function prefixed
+ * @param {string} prop - String name of the property to test for
+ * @param {object} [obj]- An object to test for the prefixed properties on
+ * @returns {string|false} The string representing the (possibly prefixed) valid
+ * version of the property, or `false` when it is unsupported.
+ * @example
+ *
+ * Modernizr.prefixed takes a string css value in the DOM style camelCase (as
+ * opposed to the css style kebab-case) form and returns the (possibly prefixed)
+ * version of that property that the browser actually supports.
+ *
+ * For example, in older Firefox...
+ * ```js
+ * prefixed('boxSizing')
+ * ```
+ * returns 'MozBoxSizing'
+ *
+ * In newer Firefox, as well as any other browser that support the unprefixed
+ * version would simply return `boxSizing`. Any browser that does not support
+ * the property at all, it will return `false`.
+ *
+ * By default, prefixed is checked against a DOM element. If you want to check
+ * for a property on another object, just pass it as a second argument
+ *
+ * ```js
+ * var rAF = prefixed('requestAnimationFrame', window);
+ *
+ * raf(function() {
+ * renderFunction();
+ * })
+ * ```
+ *
+ * Note that this will return _the actual function_ - not the name of the function.
+ * If you need the actual name of the property, pass in `false` as a third argument
+ *
+ * ```js
+ * var rAFProp = prefixed('requestAnimationFrame', window, false);
+ *
+ * rafProp === 'WebkitRequestAnimationFrame' // in older webkit
+ * ```
+ *
+ * One common use case for prefixed is if you're trying to determine which transition
+ * end event to bind to, you might do something like...
+ * ```js
+ * var transEndEventNames = {
+ * 'WebkitTransition' : 'webkitTransitionEnd', * Saf 6, Android Browser
+ * 'MozTransition' : 'transitionend', * only for FF < 15
+ * 'transition' : 'transitionend' * IE10, Opera, Chrome, FF 15+, Saf 7+
+ * };
+ *
+ * var transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
+ * ```
+ *
+ * If you want a similar lookup, but in kebab-case, you can use [prefixedCSS](#modernizr-prefixedcss).
+ */
+
+ var prefixed = ModernizrProto.prefixed = function(prop, obj, elem) {
+ if (prop.indexOf('@') === 0) {
+ return atRule(prop);
+ }
+
+ if (prop.indexOf('-') != -1) {
+ // Convert kebab-case to camelCase
+ prop = cssToDOM(prop);
+ }
+ if (!obj) {
+ return testPropsAll(prop, 'pfx');
+ } else {
+ // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
+ return testPropsAll(prop, obj, elem);
+ }
+ };
+
+
+
+ /**
+ * List of property values to set for css tests. See ticket #21
+ * http://git.io/vUGl4
+ *
+ * @memberof Modernizr
+ * @name Modernizr._prefixes
+ * @optionName Modernizr._prefixes
+ * @optionProp prefixes
+ * @access public
+ * @example
+ *
+ * Modernizr._prefixes is the internal list of prefixes that we test against
+ * inside of things like [prefixed](#modernizr-prefixed) and [prefixedCSS](#-code-modernizr-prefixedcss). It is simply
+ * an array of kebab-case vendor prefixes you can use within your code.
+ *
+ * Some common use cases include
+ *
+ * Generating all possible prefixed version of a CSS property
+ * ```js
+ * var rule = Modernizr._prefixes.join('transform: rotate(20deg); ');
+ *
+ * rule === 'transform: rotate(20deg); webkit-transform: rotate(20deg); moz-transform: rotate(20deg); o-transform: rotate(20deg); ms-transform: rotate(20deg);'
+ * ```
+ *
+ * Generating all possible prefixed version of a CSS value
+ * ```js
+ * rule = 'display:' + Modernizr._prefixes.join('flex; display:') + 'flex';
+ *
+ * rule === 'display:flex; display:-webkit-flex; display:-moz-flex; display:-o-flex; display:-ms-flex; display:flex'
+ * ```
+ */
+
+ var prefixes = (ModernizrProto._config.usePrefixes ? ' -webkit- -moz- -o- -ms- '.split(' ') : []);
+
+ // expose these for the plugin API. Look in the source for how to join() them against your input
+ ModernizrProto._prefixes = prefixes;
+
+
+
+ /**
+ * prefixedCSS is just like [prefixed](#modernizr-prefixed), but the returned values are in
+ * kebab-case (e.g. `box-sizing`) rather than camelCase (boxSizing).
+ *
+ * @memberof Modernizr
+ * @name Modernizr.prefixedCSS
+ * @optionName Modernizr.prefixedCSS()
+ * @optionProp prefixedCSS
+ * @access public
+ * @function prefixedCSS
+ * @param {string} prop - String name of the property to test for
+ * @returns {string|false} The string representing the (possibly prefixed)
+ * valid version of the property, or `false` when it is unsupported.
+ * @example
+ *
+ * `Modernizr.prefixedCSS` is like `Modernizr.prefixed`, but returns the result
+ * in hyphenated form
+ *
+ * ```js
+ * Modernizr.prefixedCSS('transition') // '-moz-transition' in old Firefox
+ * ```
+ *
+ * Since it is only useful for CSS style properties, it can only be tested against
+ * an HTMLElement.
+ *
+ * Properties can be passed as both the DOM style camelCase or CSS style kebab-case.
+ */
+
+ var prefixedCSS = ModernizrProto.prefixedCSS = function(prop) {
+ var prefixedProp = prefixed(prop);
+ return prefixedProp && domToCSS(prefixedProp);
+ };
+
+
+ /**
+ * testAllProps determines whether a given CSS property is supported in the browser
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testAllProps
+ * @optionName Modernizr.testAllProps()
+ * @optionProp testAllProps
+ * @access public
+ * @function testAllProps
+ * @param {string} prop - String naming the property to test (either camelCase or kebab-case)
+ * @param {string} [value] - String of the value to test
+ * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection
+ * @example
+ *
+ * testAllProps determines whether a given CSS property, in some prefixed form,
+ * is supported by the browser.
+ *
+ * ```js
+ * testAllProps('boxSizing') // true
+ * ```
+ *
+ * It can optionally be given a CSS value in string form to test if a property
+ * value is valid
+ *
+ * ```js
+ * testAllProps('display', 'block') // true
+ * testAllProps('display', 'penguin') // false
+ * ```
+ *
+ * A boolean can be passed as a third parameter to skip the value check when
+ * native detection (@supports) isn't available.
+ *
+ * ```js
+ * testAllProps('shapeOutside', 'content-box', true);
+ * ```
+ */
+
+ function testAllProps (prop, value, skipValueTest) {
+ return testPropsAll(prop, undefined, undefined, value, skipValueTest);
+ }
+ ModernizrProto.testAllProps = testAllProps;
+
+
+ /**
+ * testProp() investigates whether a given style property is recognized
+ * Property names can be provided in either camelCase or kebab-case.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testProp
+ * @access public
+ * @optionName Modernizr.testProp()
+ * @optionProp testProp
+ * @function testProp
+ * @param {string} prop - Name of the CSS property to check
+ * @param {string} [value] - Name of the CSS value to check
+ * @param {boolean} [useValue] - Whether or not to check the value if @supports isn't supported
+ * @returns {boolean}
+ * @example
+ *
+ * Just like [testAllProps](#modernizr-testallprops), only it does not check any vendor prefixed
+ * version of the string.
+ *
+ * Note that the property name must be provided in camelCase (e.g. boxSizing not box-sizing)
+ *
+ * ```js
+ * Modernizr.testProp('pointerEvents') // true
+ * ```
+ *
+ * You can also provide a value as an optional second argument to check if a
+ * specific value is supported
+ *
+ * ```js
+ * Modernizr.testProp('pointerEvents', 'none') // true
+ * Modernizr.testProp('pointerEvents', 'penguin') // false
+ * ```
+ */
+
+ var testProp = ModernizrProto.testProp = function(prop, value, useValue) {
+ return testProps([prop], undefined, value, useValue);
+ };
+
+
+ /**
+ * testStyles injects an element with style element and some CSS rules
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testStyles
+ * @optionName Modernizr.testStyles()
+ * @optionProp testStyles
+ * @access public
+ * @function testStyles
+ * @param {string} rule - String representing a css rule
+ * @param {function} callback - A function that is used to test the injected element
+ * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
+ * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
+ * @returns {boolean}
+ * @example
+ *
+ * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page
+ * along with (possibly multiple) DOM elements. This lets you check for features
+ * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).
+ *
+ * ```js
+ * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {
+ * // elem is the first DOM node in the page (by default #modernizr)
+ * // rule is the first argument you supplied - the CSS rule in string form
+ *
+ * addTest('widthworks', elem.style.width === '9px')
+ * });
+ * ```
+ *
+ * If your test requires multiple nodes, you can include a third argument
+ * indicating how many additional div elements to include on the page. The
+ * additional nodes are injected as children of the `elem` that is returned as
+ * the first argument to the callback.
+ *
+ * ```js
+ * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {
+ * document.getElementById('modernizr').style.width === '1px'; // true
+ * document.getElementById('modernizr2').style.width === '2px'; // true
+ * elem.firstChild === document.getElementById('modernizr2'); // true
+ * }, 1);
+ * ```
+ *
+ * By default, all of the additional elements have an ID of `modernizr[n]`, where
+ * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,
+ * the second additional is `#modernizr3`, etc.).
+ * If you want to have more meaningful IDs for your function, you can provide
+ * them as the fourth argument, as an array of strings
+ *
+ * ```js
+ * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {
+ * elem.firstChild === document.getElementById('foo'); // true
+ * elem.lastChild === document.getElementById('bar'); // true
+ * }, 2, ['foo', 'bar']);
+ * ```
+ *
+ */
+
+ var testStyles = ModernizrProto.testStyles = injectElementWithStyles;
+
+/*!
+{
+ "name": "a[download] Attribute",
+ "property": "adownload",
+ "caniuse" : "download",
+ "tags": ["media", "attribute"],
+ "builderAliases": ["a_download"],
+ "notes": [{
+ "name": "WhatWG Reference",
+ "href": "http://developers.whatwg.org/links.html#downloading-resources"
+ }]
+}
+!*/
+/* DOC
+When used on an `<a>`, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigating to it.
+*/
+
+ Modernizr.addTest('adownload', !window.externalHost && 'download' in createElement('a'));
+
+/*!
+{
+ "name": "Ambient Light Events",
+ "property": "ambientlight",
+ "notes": [{
+ "name": "W3C Ambient Light Events",
+ "href": "http://www.w3.org/TR/ambient-light/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the API that provides information about the ambient light levels, as detected by the device's light detector, in terms of lux units.
+*/
+
+ Modernizr.addTest('ambientlight', hasEvent('devicelight', window));
+
+/*!
+{
+ "name": "Application Cache",
+ "property": "applicationcache",
+ "caniuse": "offline-apps",
+ "tags": ["storage", "offline"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/docs/HTML/Using_the_application_cache"
+ }],
+ "polyfills": ["html5gears"]
+}
+!*/
+/* DOC
+Detects support for the Application Cache, for storing data to enable web-based applications run offline.
+
+The API has been [heavily criticized](http://alistapart.com/article/application-cache-is-a-douchebag) and discussions are underway to address this.
+*/
+
+ Modernizr.addTest('applicationcache', 'applicationCache' in window);
+
+/*!
+{
+ "name" : "HTML5 Audio Element",
+ "property": "audio",
+ "tags" : ["html5", "audio", "media"]
+}
+!*/
+/* DOC
+Detects the audio element
+*/
+
+ // This tests evaluates support of the audio element, as well as
+ // testing what types of content it supports.
+ //
+ // We're using the Boolean constructor here, so that we can extend the value
+ // e.g. Modernizr.audio // true
+ // Modernizr.audio.ogg // 'probably'
+ //
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+ Modernizr.addTest('audio', function() {
+ /* jshint -W053 */
+ var elem = createElement('audio');
+ var bool = false;
+
+ try {
+ if (bool = !!elem.canPlayType) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, '');
+ bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/, '');
+ bool.opus = elem.canPlayType('audio/ogg; codecs="opus"') .replace(/^no$/, '');
+
+ // Mimetypes accepted:
+ // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
+ // bit.ly/iphoneoscodecs
+ bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/, '');
+ bool.m4a = (elem.canPlayType('audio/x-m4a;') ||
+ elem.canPlayType('audio/aac;')) .replace(/^no$/, '');
+ }
+ } catch (e) { }
+
+ return bool;
+ });
+
+/*!
+{
+ "name": "Audio Loop Attribute",
+ "property": "audioloop",
+ "tags": ["audio", "media"]
+}
+!*/
+/* DOC
+Detects if an audio element can automatically restart, once it has finished
+*/
+
+ Modernizr.addTest('audioloop', 'loop' in createElement('audio'));
+
+/*!
+{
+ "name": "Audio Preload Attribute",
+ "property": "audiopreload",
+ "tags": ["audio", "media"]
+}
+!*/
+/* DOC
+Detects if audio can be downloaded in the background before it starts playing in the `<audio>` element
+*/
+
+ Modernizr.addTest('audiopreload', 'preload' in createElement('audio'));
+
+/*!
+{
+ "name": "Web Audio API",
+ "property": "webaudio",
+ "caniuse": "audio-api",
+ "polyfills": ["xaudiojs", "dynamicaudiojs", "audiolibjs"],
+ "tags": ["audio", "media"],
+ "builderAliases": ["audio_webaudio_api"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3 Specification",
+ "href": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html"
+ }]
+}
+!*/
+/* DOC
+Detects the older non standard webaudio API, (as opposed to the standards based AudioContext API)
+*/
+
+ Modernizr.addTest('webaudio', function() {
+ var prefixed = 'webkitAudioContext' in window;
+ var unprefixed = 'AudioContext' in window;
+
+ if (Modernizr._config.usePrefixes) {
+ return prefixed || unprefixed;
+ }
+ return unprefixed;
+ });
+
+/*!
+{
+ "name": "Battery API",
+ "property": "batteryapi",
+ "aliases": ["battery-api"],
+ "builderAliases": ["battery_api"],
+ "tags": ["device", "media"],
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
+ }]
+}
+!*/
+/* DOC
+Detect support for the Battery API, for accessing information about the system's battery charge level.
+*/
+
+ Modernizr.addTest('batteryapi', !!prefixed('battery', navigator), {aliases: ['battery-api']});
+
+/*!
+{
+ "name": "Low Battery Level",
+ "property": "lowbattery",
+ "tags": ["hardware", "mobile"],
+ "builderAliases": ["battery_level"],
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
+ }]
+}
+!*/
+/* DOC
+Enable a developer to remove CPU intensive CSS/JS when battery is low
+*/
+
+ Modernizr.addTest('lowbattery', function() {
+ var minLevel = 0.20;
+ var battery = prefixed('battery', navigator);
+ return !!(battery && !battery.charging && battery.level <= minLevel);
+ });
+
+/*!
+{
+ "name": "Blob constructor",
+ "property": "blobconstructor",
+ "aliases": ["blob-constructor"],
+ "builderAliases": ["blob_constructor"],
+ "caniuse": "blobbuilder",
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob"
+ }],
+ "polyfills": ["blobjs"]
+}
+!*/
+/* DOC
+Detects support for the Blob constructor, for creating file-like objects of immutable, raw data.
+*/
+
+ Modernizr.addTest('blobconstructor', function() {
+ try {
+ return !!new Blob();
+ } catch (e) {
+ return false;
+ }
+ }, {
+ aliases: ['blob-constructor']
+ });
+
+/*!
+{
+ "name": "Canvas",
+ "property": "canvas",
+ "caniuse": "canvas",
+ "tags": ["canvas", "graphics"],
+ "polyfills": ["flashcanvas", "excanvas", "slcanvas", "fxcanvas"]
+}
+!*/
+/* DOC
+Detects support for the `<canvas>` element for 2D drawing.
+*/
+
+ // On the S60 and BB Storm, getContext exists, but always returns undefined
+ // so we actually have to call getContext() to verify
+ // github.com/Modernizr/Modernizr/issues/issue/97/
+ Modernizr.addTest('canvas', function() {
+ var elem = createElement('canvas');
+ return !!(elem.getContext && elem.getContext('2d'));
+ });
+
+/*!
+{
+ "name": "canvas blending support",
+ "property": "canvasblending",
+ "tags": ["canvas"],
+ "async" : false,
+ "notes": [{
+ "name": "HTML5 Spec",
+ "href": "https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending"
+ },
+ {
+ "name": "Article",
+ "href": "http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas"
+ }]
+}
+!*/
+/* DOC
+Detects if Photoshop style blending modes are available in canvas.
+*/
+
+
+ Modernizr.addTest('canvasblending', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ var ctx = createElement('canvas').getContext('2d');
+ // firefox 3 throws an error when setting an invalid `globalCompositeOperation`
+ try {
+ ctx.globalCompositeOperation = 'screen';
+ } catch (e) {}
+
+ return ctx.globalCompositeOperation === 'screen';
+ });
+
+
+/*!
+{
+ "name": "canvas.toDataURL type support",
+ "property": ["todataurljpeg", "todataurlpng", "todataurlwebp"],
+ "tags": ["canvas"],
+ "builderAliases": ["canvas_todataurl_type"],
+ "async" : false,
+ "notes": [{
+ "name": "MDN article",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement.toDataURL"
+ }]
+}
+!*/
+
+
+ var canvas = createElement('canvas');
+
+ Modernizr.addTest('todataurljpeg', function() {
+ return !!Modernizr.canvas && canvas.toDataURL('image/jpeg').indexOf('data:image/jpeg') === 0;
+ });
+ Modernizr.addTest('todataurlpng', function() {
+ return !!Modernizr.canvas && canvas.toDataURL('image/png').indexOf('data:image/png') === 0;
+ });
+ Modernizr.addTest('todataurlwebp', function() {
+ var supports = false;
+
+ // firefox 3 throws an error when you use an "invalid" toDataUrl
+ try {
+ supports = !!Modernizr.canvas && canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0;
+ } catch (e) {}
+
+ return supports;
+ });
+
+
+/*!
+{
+ "name": "canvas winding support",
+ "property": ["canvaswinding"],
+ "tags": ["canvas"],
+ "async" : false,
+ "notes": [{
+ "name": "Article",
+ "href": "http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/"
+ }]
+}
+!*/
+/* DOC
+Determines if winding rules, which controls if a path can go clockwise or counterclockwise
+*/
+
+
+ Modernizr.addTest('canvaswinding', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ var ctx = createElement('canvas').getContext('2d');
+
+ ctx.rect(0, 0, 10, 10);
+ ctx.rect(2, 2, 6, 6);
+ return ctx.isPointInPath(5, 5, 'evenodd') === false;
+ });
+
+
+/*!
+{
+ "name": "Canvas text",
+ "property": "canvastext",
+ "caniuse": "canvas-text",
+ "tags": ["canvas", "graphics"],
+ "polyfills": ["canvastext"]
+}
+!*/
+/* DOC
+Detects support for the text APIs for `<canvas>` elements.
+*/
+
+ Modernizr.addTest('canvastext', function() {
+ if (Modernizr.canvas === false) {
+ return false;
+ }
+ return typeof createElement('canvas').getContext('2d').fillText == 'function';
+ });
+
+/*!
+{
+ "name": "Content Editable",
+ "property": "contenteditable",
+ "caniuse": "contenteditable",
+ "notes": [{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `contenteditable` attribute of elements, allowing their DOM text contents to be edited directly by the user.
+*/
+
+ Modernizr.addTest('contenteditable', function() {
+ // early bail out
+ if (!('contentEditable' in docElement)) {
+ return;
+ }
+
+ // some mobile browsers (android < 3.0, iOS < 5) claim to support
+ // contentEditable, but but don't really. This test checks to see
+ // confirms whether or not it actually supports it.
+
+ var div = createElement('div');
+ div.contentEditable = true;
+ return div.contentEditable === 'true';
+ });
+
+/*!
+{
+ "name": "Context menus",
+ "property": "contextmenu",
+ "caniuse": "menu",
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/html5/interactive-elements.html#context-menus"
+ },{
+ "name": "thewebrocks.com Demo",
+ "href": "http://thewebrocks.com/demos/context-menu/"
+ }],
+ "polyfills": ["jquery-contextmenu"]
+}
+!*/
+/* DOC
+Detects support for custom context menus.
+*/
+
+ Modernizr.addTest(
+ 'contextmenu',
+ ('contextMenu' in docElement && 'HTMLMenuItemElement' in window)
+ );
+
+/*!
+{
+ "name": "Cookies",
+ "property": "cookies",
+ "tags": ["storage"],
+ "authors": ["tauren"]
+}
+!*/
+/* DOC
+Detects whether cookie support is enabled.
+*/
+
+ // https://github.com/Modernizr/Modernizr/issues/191
+
+ Modernizr.addTest('cookies', function() {
+ // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking
+ // configurations. For example, when blocking cookies via the Advanced
+ // Privacy Settings in IE9, it always returns true. And there have been
+ // issues in the past with site-specific exceptions.
+ // Don't rely on it.
+
+ // try..catch because some in situations `document.cookie` is exposed but throws a
+ // SecurityError if you try to access it; e.g. documents created from data URIs
+ // or in sandboxed iframes (depending on flags/context)
+ try {
+ // Create cookie
+ document.cookie = 'cookietest=1';
+ var ret = document.cookie.indexOf('cookietest=') != -1;
+ // Delete cookie
+ document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
+ return ret;
+ }
+ catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Cross-Origin Resource Sharing",
+ "property": "cors",
+ "caniuse": "cors",
+ "authors": ["Theodoor van Donge"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS"
+ }],
+ "polyfills": ["pmxdr", "ppx", "flxhr"]
+}
+!*/
+/* DOC
+Detects support for Cross-Origin Resource Sharing: method of performing XMLHttpRequests across domains.
+*/
+
+ Modernizr.addTest('cors', 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest());
+
+/*!
+{
+ "name": "getRandomValues",
+ "property": "getrandomvalues",
+ "caniuse": "window.crypto.getRandomValues",
+ "tags": ["crypto"],
+ "authors": ["komachi"],
+ "notes": [{
+ "name": "W3C Editor’s Draft",
+ "href": "https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#RandomSource-method-getRandomValues"
+ }],
+ "polyfills": [
+ "polycrypt"
+ ]
+}
+!*/
+/* DOC
+Detects support for the window.crypto.getRandomValues for generate cryptographically secure random numbers
+*/
+
+ // In Safari <=5.0 `window.crypto` exists (for some reason) but is `undefined`, so we have to check
+ // it’s truthy before checking for existence of `getRandomValues`
+ var crypto = prefixed('crypto', window);
+ var supportsGetRandomValues;
+
+ // Safari 6.0 supports crypto.getRandomValues, but does not return the array,
+ // which is required by the spec, so we need to actually check.
+ if (crypto && 'getRandomValues' in crypto && 'Uint32Array' in window) {
+ var array = new Uint32Array(10);
+ var values = crypto.getRandomValues(array);
+ supportsGetRandomValues = values && is(values[0], 'number');
+ }
+
+ Modernizr.addTest('getrandomvalues', !!supportsGetRandomValues);
+
+/*!
+{
+ "name": "cssall",
+ "property": "cssall",
+ "notes": [{
+ "name": "Spec",
+ "href": "http://dev.w3.org/csswg/css-cascade/#all-shorthand"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `all` css property, which is a shorthand to reset all css properties (except direction and unicode-bidi) to their original value
+*/
+
+
+ Modernizr.addTest('cssall', 'all' in docElement.style);
+
+/*!
+{
+ "name": "CSS Animations",
+ "property": "cssanimations",
+ "caniuse": "css-animation",
+ "polyfills": ["transformie", "csssandpaper"],
+ "tags": ["css"],
+ "warnings": ["Android < 4 will pass this test, but can only animate a single property at a time"],
+ "notes": [{
+ "name" : "Article: 'Dispelling the Android CSS animation myths'",
+ "href": "http://goo.gl/OGw5Gm"
+ }]
+}
+!*/
+/* DOC
+Detects whether or not elements can be animated using CSS
+*/
+
+ Modernizr.addTest('cssanimations', testAllProps('animationName', 'a', true));
+
+/*!
+{
+ "name": "Appearance",
+ "property": "appearance",
+ "caniuse": "css-appearance",
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance"
+ },{
+ "name": "CSS-Tricks CSS Almanac: appearance",
+ "href": "http://css-tricks.com/almanac/properties/a/appearance/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `appearance` css property, which is used to make an
+element inherit the style of a standard user interface element. It can also be
+used to remove the default styles of an element, such as input and buttons.
+*/
+
+ Modernizr.addTest('appearance', testAllProps('appearance'));
+
+/*!
+{
+ "name": "CSS Background Blend Mode",
+ "property": "backgroundblendmode",
+ "caniuse": "css-backgroundblendmode",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "CSS Blend Modes could be the next big thing in Web Design",
+ "href": " https://medium.com/@bennettfeely/css-blend-modes-could-be-the-next-big-thing-in-web-design-6b51bf53743a"
+ }, {
+ "name": "Demo",
+ "href": "http://bennettfeely.com/gradients/"
+ }
+ ]
+}
+!*/
+/* DOC
+Detects the ability for the browser to composite backgrounds using blending modes similar to ones found in Photoshop or Illustrator.
+*/
+
+ Modernizr.addTest('backgroundblendmode', prefixed('backgroundBlendMode', 'text'));
+
+/*!
+{
+ "name": "CSS Background Clip Text",
+ "property": "backgroundcliptext",
+ "authors": ["ausi"],
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/image-under-text/"
+ },
+ {
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-clip"
+ },
+ {
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/199"
+ }
+ ]
+}
+!*/
+/* DOC
+Detects the ability to control specifies whether or not an element's background
+extends beyond its border in CSS
+*/
+
+ Modernizr.addTest('backgroundcliptext', function() {
+ return testAllProps('backgroundClip', 'text');
+ });
+
+/*!
+{
+ "name": "Background Position Shorthand",
+ "property": "bgpositionshorthand",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundposition_shorthand"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/CSS/background-position"
+ }, {
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/css3-background/#background-position"
+ }, {
+ "name": "Demo",
+ "href": "http://jsfiddle.net/Blink/bBXvt/"
+ }]
+}
+!*/
+/* DOC
+Detects if you can use the shorthand method to define multiple parts of an
+element's background-position simultaniously.
+
+eg `background-position: right 10px bottom 10px`
+*/
+
+ Modernizr.addTest('bgpositionshorthand', function() {
+ var elem = createElement('a');
+ var eStyle = elem.style;
+ var val = 'right 10px bottom 10px';
+ eStyle.cssText = 'background-position: ' + val + ';';
+ return (eStyle.backgroundPosition === val);
+ });
+
+/*!
+{
+ "name": "Background Position XY",
+ "property": "bgpositionxy",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundposition_xy"],
+ "authors": ["Allan Lei", "Brandom Aaron"],
+ "notes": [{
+ "name": "Demo",
+ "href": "http://jsfiddle.net/allanlei/R8AYS/"
+ }, {
+ "name": "Adapted From",
+ "href": "https://github.com/brandonaaron/jquery-cssHooks/blob/master/bgpos.js"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to control an element's background position using css
+*/
+
+ Modernizr.addTest('bgpositionxy', function() {
+ return testAllProps('backgroundPositionX', '3px', true) && testAllProps('backgroundPositionY', '5px', true);
+ });
+
+/*!
+{
+ "name": "Background Repeat",
+ "property": ["bgrepeatspace", "bgrepeatround"],
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundrepeat"],
+ "authors": ["Ryan Seddon"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-repeat"
+ }, {
+ "name": "Test Page",
+ "href": "http://jsbin.com/uzesun/"
+ }, {
+ "name": "Demo",
+ "href": "http://jsfiddle.net/ryanseddon/yMLTQ/6/"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to use round and space as properties for background-repeat
+*/
+
+ // Must value-test these
+ Modernizr.addTest('bgrepeatround', testAllProps('backgroundRepeat', 'round'));
+ Modernizr.addTest('bgrepeatspace', testAllProps('backgroundRepeat', 'space'));
+
+/*!
+{
+ "name": "Background Size",
+ "property": "backgroundsize",
+ "tags": ["css"],
+ "knownBugs": ["This will false positive in Opera Mini - http://github.com/Modernizr/Modernizr/issues/396"],
+ "notes": [{
+ "name": "Related Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/396"
+ }]
+}
+!*/
+
+ Modernizr.addTest('backgroundsize', testAllProps('backgroundSize', '100%', true));
+
+/*!
+{
+ "name": "Background Size Cover",
+ "property": "bgsizecover",
+ "tags": ["css"],
+ "builderAliases": ["css_backgroundsizecover"],
+ "notes": [{
+ "name" : "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/background-size"
+ }]
+}
+!*/
+
+ // Must test value, as this specifically tests the `cover` value
+ Modernizr.addTest('bgsizecover', testAllProps('backgroundSize', 'cover'));
+
+/*!
+{
+ "name": "Border Image",
+ "property": "borderimage",
+ "caniuse": "border-image",
+ "polyfills": ["css3pie"],
+ "knownBugs": ["Android < 2.0 is true, but has a broken implementation"],
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('borderimage', testAllProps('borderImage', 'url() 1', true));
+
+/*!
+{
+ "name": "Border Radius",
+ "property": "borderradius",
+ "caniuse": "border-radius",
+ "polyfills": ["css3pie"],
+ "tags": ["css"],
+ "notes": [{
+ "name": "Comprehensive Compat Chart",
+ "href": "http://muddledramblings.com/table-of-css3-border-radius-compliance"
+ }]
+}
+!*/
+
+ Modernizr.addTest('borderradius', testAllProps('borderRadius', '0px', true));
+
+/*!
+{
+ "name": "Box Shadow",
+ "property": "boxshadow",
+ "caniuse": "css-boxshadow",
+ "tags": ["css"],
+ "knownBugs": [
+ "WebOS false positives on this test.",
+ "The Kindle Silk browser false positives"
+ ]
+}
+!*/
+
+ Modernizr.addTest('boxshadow', testAllProps('boxShadow', '1px 1px', true));
+
+/*!
+{
+ "name": "Box Sizing",
+ "property": "boxsizing",
+ "caniuse": "css3-boxsizing",
+ "polyfills": ["borderboxmodel", "boxsizingpolyfill", "borderbox"],
+ "tags": ["css"],
+ "builderAliases": ["css_boxsizing"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/box-sizing"
+ },{
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/248"
+ }]
+}
+!*/
+
+ Modernizr.addTest('boxsizing', testAllProps('boxSizing', 'border-box', true) && (document.documentMode === undefined || document.documentMode > 7));
+
+/*!
+{
+ "name": "CSS Calc",
+ "property": "csscalc",
+ "caniuse": "calc",
+ "tags": ["css"],
+ "builderAliases": ["css_calc"],
+ "authors": ["@calvein"]
+}
+!*/
+/* DOC
+Method of allowing calculated values for length units. For example:
+
+```css
+//lem {
+ width: calc(100% - 3em);
+}
+```
+*/
+
+ Modernizr.addTest('csscalc', function() {
+ var prop = 'width:';
+ var value = 'calc(10px);';
+ var el = createElement('a');
+
+ el.style.cssText = prop + prefixes.join(value + prop);
+
+ return !!el.style.length;
+ });
+
+/*!
+{
+ "name": "CSS :checked pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "checked",
+ "tags": ["css"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/879"
+ }]
+}
+!*/
+
+ Modernizr.addTest('checked', function() {
+ return testStyles('#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}', function(elem) {
+ var cb = createElement('input');
+ cb.setAttribute('type', 'checkbox');
+ cb.setAttribute('checked', 'checked');
+ elem.appendChild(cb);
+ return cb.offsetLeft === 20;
+ });
+ });
+
+/*!
+{
+ "name": "CSS Font ch Units",
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "property": "csschunit",
+ "tags": ["css"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#font-relative-lengths"
+ }]
+}
+!*/
+
+ Modernizr.addTest('csschunit', function() {
+ var elemStyle = modElem.elem.style;
+ var supports;
+ try {
+ elemStyle.fontSize = '3ch';
+ supports = elemStyle.fontSize.indexOf('ch') !== -1;
+ } catch (e) {
+ supports = false;
+ }
+ return supports;
+ });
+
+/*!
+{
+ "name": "CSS Columns",
+ "property": "csscolumns",
+ "caniuse": "multicolumn",
+ "polyfills": ["css3multicolumnjs"],
+ "tags": ["css"]
+}
+!*/
+
+
+ (function() {
+
+ /* jshint -W053 */
+ Modernizr.addTest('csscolumns', function() {
+ var bool = false;
+ var test = testAllProps('columnCount');
+ try {
+ if (bool = !!test) {
+ bool = new Boolean(bool);
+ }
+ } catch (e) {}
+
+ return bool;
+ });
+
+ var props = ['Width', 'Span', 'Fill', 'Gap', 'Rule', 'RuleColor', 'RuleStyle', 'RuleWidth', 'BreakBefore', 'BreakAfter', 'BreakInside'];
+ var name, test;
+
+ for (var i = 0; i < props.length; i++) {
+ name = props[i].toLowerCase();
+ test = testAllProps('column' + props[i]);
+
+ // break-before, break-after & break-inside are not "column"-prefixed in spec
+ if (name === 'breakbefore' || name === 'breakafter' || name == 'breakinside') {
+ test = test || testAllProps(props[i]);
+ }
+
+ Modernizr.addTest('csscolumns.' + name, test);
+ }
+
+
+ })();
+
+
+/*!
+{
+ "name": "CSS Cubic Bezier Range",
+ "property": "cubicbezierrange",
+ "tags": ["css"],
+ "builderAliases": ["css_cubicbezierrange"],
+ "doc" : null,
+ "authors": ["@calvein"],
+ "warnings": ["cubic-bezier values can't be > 1 for Webkit until [bug #45761](https://bugs.webkit.org/show_bug.cgi?id=45761) is fixed"],
+ "notes": [{
+ "name": "Comprehensive Compat Chart",
+ "href": "http://muddledramblings.com/table-of-css3-border-radius-compliance"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cubicbezierrange', function() {
+ var el = createElement('a');
+ el.style.cssText = prefixes.join('transition-timing-function:cubic-bezier(1,0,0,1.1); ');
+ return !!el.style.length;
+ });
+
+/*!
+{
+ "name": "CSS Display run-in",
+ "property": "display-runin",
+ "authors": ["alanhogan"],
+ "tags": ["css"],
+ "builderAliases": ["css_displayrunin"],
+ "notes": [{
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/596-run-in/"
+ },{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/198"
+ }]
+}
+!*/
+
+ Modernizr.addTest('displayrunin', testAllProps('display', 'run-in'),
+ {aliases: ['display-runin']});
+
+/*!
+{
+ "name": "CSS Display table",
+ "property": "displaytable",
+ "caniuse": "css-table",
+ "authors": ["scottjehl"],
+ "tags": ["css"],
+ "builderAliases": ["css_displaytable"],
+ "notes": [{
+ "name": "Detects for all additional table display values",
+ "href": "http://pastebin.com/Gk9PeVaQ"
+ }]
+}
+!*/
+/* DOC
+`display: table` and `table-cell` test. (both are tested under one name `table-cell` )
+*/
+
+ // If a document is in rtl mode this test will fail so we force ltr mode on the injeced
+ // element https://github.com/Modernizr/Modernizr/issues/716
+ testStyles('#modernizr{display: table; direction: ltr}#modernizr div{display: table-cell; padding: 10px}', function(elem) {
+ var ret;
+ var child = elem.childNodes;
+ ret = child[0].offsetLeft < child[1].offsetLeft;
+ Modernizr.addTest('displaytable', ret, {aliases: ['display-table']});
+ }, 2);
+
+/*!
+{
+ "name": "CSS text-overflow ellipsis",
+ "property": "ellipsis",
+ "caniuse": "text-overflow",
+ "polyfills": [
+ "text-overflow"
+ ],
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('ellipsis', testAllProps('textOverflow', 'ellipsis'));
+
+/*!
+{
+ "name": "CSS.escape()",
+ "property": "cssescape",
+ "polyfills": [
+ "css-escape"
+ ],
+ "tags": [
+ "css",
+ "cssom"
+ ]
+}
+!*/
+/* DOC
+Tests for `CSS.escape()` support.
+*/
+
+ var CSS = window.CSS;
+ Modernizr.addTest('cssescape', CSS ? typeof CSS.escape == 'function' : false);
+
+/*!
+{
+ "name": "CSS Font ex Units",
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "property": "cssexunit",
+ "tags": ["css"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#font-relative-lengths"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cssexunit', function() {
+ var elemStyle = modElem.elem.style;
+ var supports;
+ try {
+ elemStyle.fontSize = '3ex';
+ supports = elemStyle.fontSize.indexOf('ex') !== -1;
+ } catch (e) {
+ supports = false;
+ }
+ return supports;
+ });
+
+/*!
+{
+ "name": "CSS Supports",
+ "property": "supports",
+ "caniuse": "css-featurequeries",
+ "tags": ["css"],
+ "builderAliases": ["css_supports"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://dev.w3.org/csswg/css3-conditional/#at-supports"
+ },{
+ "name": "Related Github Issue",
+ "href": "github.com/Modernizr/Modernizr/issues/648"
+ },{
+ "name": "W3 Info",
+ "href": "http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface"
+ }]
+}
+!*/
+
+ var newSyntax = 'CSS' in window && 'supports' in window.CSS;
+ var oldSyntax = 'supportsCSS' in window;
+ Modernizr.addTest('supports', newSyntax || oldSyntax);
+
+/*!
+{
+ "name": "CSS Filters",
+ "property": "cssfilters",
+ "caniuse": "css-filters",
+ "polyfills": ["polyfilter"],
+ "tags": ["css"],
+ "builderAliases": ["css_filters"],
+ "notes": [{
+ "name": "MDN article on CSS filters",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/filter"
+ }]
+}
+!*/
+
+ Modernizr.addTest('cssfilters', function() {
+ if (Modernizr.supports) {
+ return testAllProps('filter', 'blur(2px)');
+ } else {
+ var el = createElement('a');
+ el.style.cssText = prefixes.join('filter:blur(2px); ');
+ // https://github.com/Modernizr/Modernizr/issues/615
+ // documentMode is needed for false positives in oldIE, please see issue above
+ return !!el.style.length && ((document.documentMode === undefined || document.documentMode > 9));
+ }
+ });
+
+
+/*!
+{
+ "name": "Flexbox",
+ "property": "flexbox",
+ "caniuse": "flexbox",
+ "tags": ["css"],
+ "notes": [{
+ "name": "The _new_ flexbox",
+ "href": "http://dev.w3.org/csswg/css3-flexbox"
+ }],
+ "warnings": [
+ "A `true` result for this detect does not imply that the `flex-wrap` property is supported; see the `flexwrap` detect."
+ ]
+}
+!*/
+/* DOC
+Detects support for the Flexible Box Layout model, a.k.a. Flexbox, which allows easy manipulation of layout order and sizing within a container.
+*/
+
+ Modernizr.addTest('flexbox', testAllProps('flexBasis', '1px', true));
+
+/*!
+{
+ "name": "Flexbox (legacy)",
+ "property": "flexboxlegacy",
+ "tags": ["css"],
+ "polyfills": ["flexie"],
+ "notes": [{
+ "name": "The _old_ flexbox",
+ "href": "http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('flexboxlegacy', testAllProps('boxDirection', 'reverse', true));
+
+/*!
+{
+ "name": "Flexbox (tweener)",
+ "property": "flexboxtweener",
+ "tags": ["css"],
+ "polyfills": ["flexie"],
+ "notes": [{
+ "name": "The _inbetween_ flexbox",
+ "href": "http://www.w3.org/TR/2011/WD-css3-flexbox-20111129/"
+ }],
+ "warnings": ["This represents an old syntax, not the latest standard syntax."]
+}
+!*/
+
+ Modernizr.addTest('flexboxtweener', testAllProps('flexAlign', 'end', true));
+
+/*!
+{
+ "name": "Flex Line Wrapping",
+ "property": "flexwrap",
+ "tags": ["css", "flexbox"],
+ "notes": [{
+ "name": "W3C Flexible Box Layout spec",
+ "href": "http://dev.w3.org/csswg/css3-flexbox"
+ }],
+ "warnings": [
+ "Does not imply a modern implementation – see documentation."
+ ]
+}
+!*/
+/* DOC
+Detects support for the `flex-wrap` CSS property, part of Flexbox, which isn’t present in all Flexbox implementations (notably Firefox).
+
+This featured in both the 'tweener' syntax (implemented by IE10) and the 'modern' syntax (implemented by others). This detect will return `true` for either of these implementations, as long as the `flex-wrap` property is supported. So to ensure the modern syntax is supported, use together with `Modernizr.flexbox`:
+
+```javascript
+if (Modernizr.flexbox && Modernizr.flexwrap) {
+ // Modern Flexbox with `flex-wrap` supported
+}
+else {
+ // Either old Flexbox syntax, or `flex-wrap` not supported
+}
+```
+*/
+
+ Modernizr.addTest('flexwrap', testAllProps('flexWrap', 'wrap', true));
+
+/*!
+{
+ "name": "@font-face",
+ "property": "fontface",
+ "authors": ["Diego Perini", "Mat Marquis"],
+ "tags": ["css"],
+ "knownBugs": [
+ "False Positive: WebOS http://github.com/Modernizr/Modernizr/issues/342",
+ "False Postive: WP7 http://github.com/Modernizr/Modernizr/issues/538"
+ ],
+ "notes": [{
+ "name": "@font-face detection routine by Diego Perini",
+ "href": "http://javascript.nwbox.com/CSSSupport/"
+ },{
+ "name": "Filament Group @font-face compatibility research",
+ "href": "https://docs.google.com/presentation/d/1n4NyG4uPRjAA8zn_pSQ_Ket0RhcWC6QlZ6LMjKeECo0/edit#slide=id.p"
+ },{
+ "name": "Filament Grunticon/@font-face device testing results",
+ "href": "https://docs.google.com/spreadsheet/ccc?key=0Ag5_yGvxpINRdHFYeUJPNnZMWUZKR2ItMEpRTXZPdUE#gid=0"
+ },{
+ "name": "CSS fonts on Android",
+ "href": "http://stackoverflow.com/questions/3200069/css-fonts-on-android"
+ },{
+ "name": "@font-face and Android",
+ "href": "http://archivist.incutio.com/viewlist/css-discuss/115960"
+ }]
+}
+!*/
+
+ var blacklist = (function() {
+ var ua = navigator.userAgent;
+ var wkvers = ua.match(/applewebkit\/([0-9]+)/gi) && parseFloat(RegExp.$1);
+ var webos = ua.match(/w(eb)?osbrowser/gi);
+ var wppre8 = ua.match(/windows phone/gi) && ua.match(/iemobile\/([0-9])+/gi) && parseFloat(RegExp.$1) >= 9;
+ var oldandroid = wkvers < 533 && ua.match(/android/gi);
+ return webos || oldandroid || wppre8;
+ }());
+ if (blacklist) {
+ Modernizr.addTest('fontface', false);
+ } else {
+ testStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule) {
+ var style = document.getElementById('smodernizr');
+ var sheet = style.sheet || style.styleSheet;
+ var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
+ var bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
+ Modernizr.addTest('fontface', bool);
+ });
+ }
+;
+/*!
+{
+ "name": "CSS Generated Content",
+ "property": "generatedcontent",
+ "tags": ["css"],
+ "warnings": ["Android won't return correct height for anything below 7px #738"],
+ "notes": [{
+ "name": "W3C CSS Selectors Level 3 spec",
+ "href": "http://www.w3.org/TR/css3-selectors/#gen-content"
+ },{
+ "name": "MDN article on :before",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/::before"
+ },{
+ "name": "MDN article on :after",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/::before"
+ }]
+}
+!*/
+
+ testStyles('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}', function(node) {
+ Modernizr.addTest('generatedcontent', node.offsetHeight >= 7);
+ });
+
+/*!
+{
+ "name": "CSS Gradients",
+ "caniuse": "css-gradients",
+ "property": "cssgradients",
+ "tags": ["css"],
+ "knownBugs": ["False-positives on webOS (https://github.com/Modernizr/Modernizr/issues/202)"],
+ "notes": [{
+ "name": "Webkit Gradient Syntax",
+ "href": "http://webkit.org/blog/175/introducing-css-gradients/"
+ },{
+ "name": "Mozilla Linear Gradient Syntax",
+ "href": "http://developer.mozilla.org/en/CSS/-moz-linear-gradient"
+ },{
+ "name": "Mozilla Radial Gradient Syntax",
+ "href": "http://developer.mozilla.org/en/CSS/-moz-radial-gradient"
+ },{
+ "name": "W3C Gradient Spec",
+ "href": "dev.w3.org/csswg/css3-images/#gradients-"
+ }]
+}
+!*/
+
+
+ Modernizr.addTest('cssgradients', function() {
+
+ var str1 = 'background-image:';
+ var str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));';
+ var str3 = 'linear-gradient(left top,#9f9, white);';
+
+ // standard syntax // trailing 'background-image:'
+ var css = str1 + prefixes.join(str3 + str1).slice(0, -str1.length);
+ if (Modernizr._config.usePrefixes) {
+ // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
+ css += str1 + '-webkit-' + str2;
+ }
+
+ var elem = createElement('a');
+ var style = elem.style;
+ style.cssText = css;
+
+ // IE6 returns undefined so cast to string
+ return ('' + style.backgroundImage).indexOf('gradient') > -1;
+ });
+
+/*!
+{
+ "name": "CSS HSLA Colors",
+ "caniuse": "css3-colors",
+ "property": "hsla",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('hsla', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background-color:hsla(120,40%,100%,.5)';
+ return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
+ });
+
+/*!
+{
+ "name": "CSS Hyphens",
+ "caniuse": "css-hyphens",
+ "property": ["csshyphens", "softhyphens", "softhyphensfind"],
+ "tags": ["css"],
+ "builderAliases": ["css_hyphens"],
+ "async" : true,
+ "authors": ["David Newton"],
+ "warnings": [
+ "These tests currently require document.body to be present",
+ "If loading Hyphenator.js via yepnope, be cautious of issue 158: http://code.google.com/p/hyphenator/issues/detail?id=158",
+ "This is very large – only include it if you absolutely need it"
+ ],
+ "notes": [{
+ "name": "The Current State of Hyphenation on the Web.",
+ "href": "http://davidnewton.ca/the-current-state-of-hyphenation-on-the-web"
+ },{
+ "name": "Hyphenation Test Page",
+ "href": "http://davidnewton.ca/demos/hyphenation/test.html"
+ },{
+ "name": "Hyphenation is Language Specific",
+ "href": " http://code.google.com/p/hyphenator/source/diff?spec=svn975&r=975&format=side&path=/trunk/Hyphenator.js#sc_svn975_313"
+ },{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/312"
+ }]
+}
+!*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var waitTime = 300;
+ setTimeout(runHyphenTest, waitTime);
+ // Wait 1000ms so we can hope for document.body
+ function runHyphenTest() {
+ if (!document.body && !document.getElementsByTagName('body')[0]) {
+ setTimeout(runHyphenTest, waitTime);
+ return;
+ }
+
+ // functional test of adding hyphens:auto
+ function test_hyphens_css() {
+ try {
+ /* create a div container and a span within that
+ * these have to be appended to document.body, otherwise some browsers can give false negative */
+ var div = createElement('div');
+ var span = createElement('span');
+ var divStyle = div.style;
+ var spanHeight = 0;
+ var spanWidth = 0;
+ var result = false;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ div.appendChild(span);
+ span.innerHTML = 'Bacon ipsum dolor sit amet jerky velit in culpa hamburger et. Laborum dolor proident, enim dolore duis commodo et strip steak. Salami anim et, veniam consectetur dolore qui tenderloin jowl velit sirloin. Et ad culpa, fatback cillum jowl ball tip ham hock nulla short ribs pariatur aute. Pig pancetta ham bresaola, ut boudin nostrud commodo flank esse cow tongue culpa. Pork belly bresaola enim pig, ea consectetur nisi. Fugiat officia turkey, ea cow jowl pariatur ullamco proident do laborum velit sausage. Magna biltong sint tri-tip commodo sed bacon, esse proident aliquip. Ullamco ham sint fugiat, velit in enim sed mollit nulla cow ut adipisicing nostrud consectetur. Proident dolore beef ribs, laborum nostrud meatball ea laboris rump cupidatat labore culpa. Shankle minim beef, velit sint cupidatat fugiat tenderloin pig et ball tip. Ut cow fatback salami, bacon ball tip et in shank strip steak bresaola. In ut pork belly sed mollit tri-tip magna culpa veniam, short ribs qui in andouille ham consequat. Dolore bacon t-bone, velit short ribs enim strip steak nulla. Voluptate labore ut, biltong swine irure jerky. Cupidatat excepteur aliquip salami dolore. Ball tip strip steak in pork dolor. Ad in esse biltong. Dolore tenderloin exercitation ad pork loin t-bone, dolore in chicken ball tip qui pig. Ut culpa tongue, sint ribeye dolore ex shank voluptate hamburger. Jowl et tempor, boudin pork chop labore ham hock drumstick consectetur tri-tip elit swine meatball chicken ground round. Proident shankle mollit dolore. Shoulder ut duis t-bone quis reprehenderit. Meatloaf dolore minim strip steak, laboris ea aute bacon beef ribs elit shank in veniam drumstick qui. Ex laboris meatball cow tongue pork belly. Ea ball tip reprehenderit pig, sed fatback boudin dolore flank aliquip laboris eu quis. Beef ribs duis beef, cow corned beef adipisicing commodo nisi deserunt exercitation. Cillum dolor t-bone spare ribs, ham hock est sirloin. Brisket irure meatloaf in, boudin pork belly sirloin ball tip. Sirloin sint irure nisi nostrud aliqua. Nostrud nulla aute, enim officia culpa ham hock. Aliqua reprehenderit dolore sunt nostrud sausage, ea boudin pork loin ut t-bone ham tempor. Tri-tip et pancetta drumstick laborum. Ham hock magna do nostrud in proident. Ex ground round fatback, venison non ribeye in.';
+
+ document.body.insertBefore(div, firstChild);
+
+ /* get size of unhyphenated text */
+ divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;text-justification:newspaper;';
+ spanHeight = span.offsetHeight;
+ spanWidth = span.offsetWidth;
+
+ /* compare size with hyphenated text */
+ divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;' +
+ 'text-justification:newspaper;' +
+ prefixes.join('hyphens:auto; ');
+
+ result = (span.offsetHeight != spanHeight || span.offsetWidth != spanWidth);
+
+ /* results and cleanup */
+ document.body.removeChild(div);
+ div.removeChild(span);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ // for the softhyphens test
+ function test_hyphens(delimiter, testWidth) {
+ try {
+ /* create a div container and a span within that
+ * these have to be appended to document.body, otherwise some browsers can give false negative */
+ var div = createElement('div');
+ var span = createElement('span');
+ var divStyle = div.style;
+ var spanSize = 0;
+ var result = false;
+ var result1 = false;
+ var result2 = false;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ divStyle.cssText = 'position:absolute;top:0;left:0;overflow:visible;width:1.25em;';
+ div.appendChild(span);
+ document.body.insertBefore(div, firstChild);
+
+
+ /* get height of unwrapped text */
+ span.innerHTML = 'mm';
+ spanSize = span.offsetHeight;
+
+ /* compare height w/ delimiter, to see if it wraps to new line */
+ span.innerHTML = 'm' + delimiter + 'm';
+ result1 = (span.offsetHeight > spanSize);
+
+ /* if we're testing the width too (i.e. for soft-hyphen, not zws),
+ * this is because tested Blackberry devices will wrap the text but not display the hyphen */
+ if (testWidth) {
+ /* get width of wrapped, non-hyphenated text */
+ span.innerHTML = 'm<br />m';
+ spanSize = span.offsetWidth;
+
+ /* compare width w/ wrapped w/ delimiter to see if hyphen is present */
+ span.innerHTML = 'm' + delimiter + 'm';
+ result2 = (span.offsetWidth > spanSize);
+ } else {
+ result2 = true;
+ }
+
+ /* results and cleanup */
+ if (result1 === true && result2 === true) { result = true; }
+ document.body.removeChild(div);
+ div.removeChild(span);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ // testing if in-browser Find functionality will work on hyphenated text
+ function test_hyphens_find(delimiter) {
+ try {
+ /* create a dummy input for resetting selection location, and a div container
+ * these have to be appended to document.body, otherwise some browsers can give false negative
+ * div container gets the doubled testword, separated by the delimiter
+ * Note: giving a width to div gives false positive in iOS Safari */
+ var dummy = createElement('input');
+ var div = createElement('div');
+ var testword = 'lebowski';
+ var result = false;
+ var textrange;
+ var firstChild = document.body.firstElementChild || document.body.firstChild;
+
+ div.innerHTML = testword + delimiter + testword;
+
+ document.body.insertBefore(div, firstChild);
+ document.body.insertBefore(dummy, div);
+
+
+ /* reset the selection to the dummy input element, i.e. BEFORE the div container
+ * stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area */
+ if (dummy.setSelectionRange) {
+ dummy.focus();
+ dummy.setSelectionRange(0, 0);
+ } else if (dummy.createTextRange) {
+ textrange = dummy.createTextRange();
+ textrange.collapse(true);
+ textrange.moveEnd('character', 0);
+ textrange.moveStart('character', 0);
+ textrange.select();
+ }
+
+ /* try to find the doubled testword, without the delimiter */
+ if (window.find) {
+ result = window.find(testword + testword);
+ } else {
+ try {
+ textrange = window.self.document.body.createTextRange();
+ result = textrange.findText(testword + testword);
+ } catch (e) {
+ result = false;
+ }
+ }
+
+ document.body.removeChild(div);
+ document.body.removeChild(dummy);
+
+ return result;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ addTest('csshyphens', function() {
+
+ if (!testAllProps('hyphens', 'auto', true)) {
+ return false;
+ }
+
+ /* Chrome lies about its hyphens support so we need a more robust test
+ crbug.com/107111
+ */
+ try {
+ return test_hyphens_css();
+ } catch (e) {
+ return false;
+ }
+ });
+
+ addTest('softhyphens', function() {
+ try {
+ // use numeric entity instead of ­ in case it's XHTML
+ return test_hyphens('­', true) && test_hyphens('​', false);
+ } catch (e) {
+ return false;
+ }
+ });
+
+ addTest('softhyphensfind', function() {
+ try {
+ return test_hyphens_find('­') && test_hyphens_find('​');
+ } catch (e) {
+ return false;
+ }
+ });
+
+ }
+ });
+
+/*!
+{
+ "name": "CSS :invalid pseudo-class",
+ "property": "cssinvalid",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid"
+ }]
+}
+!*/
+/* DOC
+ Detects support for the ':invalid' CSS pseudo-class.
+*/
+
+ Modernizr.addTest('cssinvalid', function() {
+ return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:invalid{width:50px}', function(elem) {
+ var input = createElement('input');
+ input.required = true;
+ elem.appendChild(input);
+ return input.clientWidth > 10;
+ });
+ });
+
+/*!
+{
+ "name": "CSS :last-child pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "lastchild",
+ "tags": ["css"],
+ "builderAliases": ["css_lastchild"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/304"
+ }]
+}
+!*/
+
+ testStyles('#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}', function(elem) {
+ Modernizr.addTest('lastchild', elem.lastChild.offsetWidth > elem.firstChild.offsetWidth);
+ }, 2);
+
+/*!
+{
+ "name": "CSS Mask",
+ "caniuse": "css-masks",
+ "property": "cssmask",
+ "tags": ["css"],
+ "builderAliases": ["css_mask"],
+ "notes": [
+ {
+ "name": "Webkit blog on CSS Masks",
+ "href": "http://www.webkit.org/blog/181/css-masks/"
+ },
+ {
+ "name": "Safari Docs",
+ "href": "http://developer.apple.com/library/safari/#documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Masks/Masks.html"
+ },
+ {
+ "name": "Mozilla css svg mask (not this)",
+ "href": "http://developer.mozilla.org/en/CSS/mask"
+ },
+ {
+ "name": "Combine with clippaths for awesomeness",
+ "href": "http://generic.cx/for/webkit/test.html"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('cssmask', testAllProps('maskRepeat', 'repeat-x', true));
+
+/*!
+{
+ "name": "CSS Media Queries",
+ "caniuse": "css-mediaqueries",
+ "property": "mediaqueries",
+ "tags": ["css"],
+ "builderAliases": ["css_mediaqueries"]
+}
+!*/
+
+ Modernizr.addTest('mediaqueries', mq('only all'));
+
+/*!
+{
+ "name": "CSS Multiple Backgrounds",
+ "caniuse": "multibackgrounds",
+ "property": "multiplebgs",
+ "tags": ["css"]
+}
+!*/
+
+ // Setting multiple images AND a color on the background shorthand property
+ // and then querying the style.background property value for the number of
+ // occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
+
+ Modernizr.addTest('multiplebgs', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background:url(https://),url(https://),red url(https://)';
+
+ // If the UA supports multiple backgrounds, there should be three occurrences
+ // of the string "url(" in the return value for elemStyle.background
+ return (/(url\s*\(.*?){3}/).test(style.background);
+ });
+
+/*!
+{
+ "name": "CSS :nth-child pseudo-selector",
+ "caniuse": "css-sel3",
+ "property": "nthchild",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/685"
+ },
+ {
+ "name": "Sitepoint :nth-child documentation",
+ "href": "http://reference.sitepoint.com/css/pseudoclass-nthchild"
+ }
+ ],
+ "authors": ["@emilchristensen"],
+ "warnings": ["Known false negative in Safari 3.1 and Safari 3.2.2"]
+}
+!*/
+/* DOC
+Detects support for the ':nth-child()' CSS pseudo-selector.
+*/
+
+ // 5 `<div>` elements with `1px` width are created.
+ // Then every other element has its `width` set to `2px`.
+ // A Javascript loop then tests if the `<div>`s have the expected width
+ // using the modulus operator.
+ testStyles('#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}', function(elem) {
+ Modernizr.addTest('nthchild', function() {
+ var elems = elem.getElementsByTagName('div'),
+ test = true;
+
+ for (var i = 0; i < 5; i++) {
+ test = test && elems[i].offsetWidth === i % 2 + 1;
+ }
+
+ return test;
+ });
+ }, 5);
+
+/*!
+{
+ "name": "CSS Object Fit",
+ "caniuse": "object-fit",
+ "property": "objectfit",
+ "tags": ["css"],
+ "builderAliases": ["css_objectfit"],
+ "notes": [{
+ "name": "Opera Article on Object Fit",
+ "href": "http://dev.opera.com/articles/view/css3-object-fit-object-position/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('objectfit', !!prefixed('objectFit'), {aliases: ['object-fit']});
+
+/*!
+{
+ "name": "CSS Opacity",
+ "caniuse": "css-opacity",
+ "property": "opacity",
+ "tags": ["css"]
+}
+!*/
+
+ // Browsers that actually have CSS Opacity implemented have done so
+ // according to spec, which means their return values are within the
+ // range of [0.0,1.0] - including the leading zero.
+
+ Modernizr.addTest('opacity', function() {
+ var style = createElement('a').style;
+ style.cssText = prefixes.join('opacity:.55;');
+
+ // The non-literal . in this regex is intentional:
+ // German Chrome returns this value as 0,55
+ // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
+ return (/^0.55$/).test(style.opacity);
+ });
+
+/*!
+{
+ "name": "CSS Overflow Scrolling",
+ "property": "overflowscrolling",
+ "tags": ["css"],
+ "builderAliases": ["css_overflow_scrolling"],
+ "warnings": ["Introduced in iOS5b2. API is subject to change."],
+ "notes": [{
+ "name": "Article on iOS overflow scrolling",
+ "href": "http://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('overflowscrolling', testAllProps('overflowScrolling', 'touch', true));
+
+/*!
+{
+ "name": "CSS Pointer Events",
+ "caniuse": "pointer-events",
+ "property": "csspointerevents",
+ "authors": ["ausi"],
+ "tags": ["css"],
+ "builderAliases": ["css_pointerevents"],
+ "notes": [
+ {
+ "name": "MDN Docs",
+ "href": "http://developer.mozilla.org/en/CSS/pointer-events"
+ },{
+ "name": "Test Project Page",
+ "href": "http://ausi.github.com/Feature-detection-technique-for-pointer-events/"
+ },{
+ "name": "Test Project Wiki",
+ "href": "http://github.com/ausi/Feature-detection-technique-for-pointer-events/wiki"
+ },
+ {
+ "name": "Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/80"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('csspointerevents', function() {
+ var style = createElement('a').style;
+ style.cssText = 'pointer-events:auto';
+ return style.pointerEvents === 'auto';
+ });
+
+/*!
+{
+ "name": "CSS position: sticky",
+ "property": "csspositionsticky",
+ "tags": ["css"],
+ "builderAliases": ["css_positionsticky"],
+ "notes": [{
+ "name": "Chrome bug report",
+ "href":"https://code.google.com/p/chromium/issues/detail?id=322972"
+ }],
+ "warnings": [ "using position:sticky on anything but top aligned elements is buggy in Chrome < 37 and iOS <=7+" ]
+}
+!*/
+
+ // Sticky positioning - constrains an element to be positioned inside the
+ // intersection of its container box, and the viewport.
+ Modernizr.addTest('csspositionsticky', function() {
+ var prop = 'position:';
+ var value = 'sticky';
+ var el = createElement('a');
+ var mStyle = el.style;
+
+ mStyle.cssText = prop + prefixes.join(value + ';' + prop).slice(0, -prop.length);
+
+ return mStyle.position.indexOf(value) !== -1;
+ });
+
+/*!
+{
+ "name": "CSS Generated Content Animations",
+ "property": "csspseudoanimations",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csspseudoanimations', function() {
+ var result = false;
+
+ if (!Modernizr.cssanimations || !window.getComputedStyle) {
+ return result;
+ }
+
+ var styles = [
+ '@', Modernizr._prefixes.join('keyframes csspseudoanimations { from { font-size: 10px; } }@').replace(/\@$/, ''),
+ '#modernizr:before { content:" "; font-size:5px;',
+ Modernizr._prefixes.join('animation:csspseudoanimations 1ms infinite;'),
+ '}'
+ ].join('');
+
+ Modernizr.testStyles(styles, function(elem) {
+ result = window.getComputedStyle(elem, ':before').getPropertyValue('font-size') === '10px';
+ });
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Transitions",
+ "property": "csstransitions",
+ "caniuse": "css-transitions",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csstransitions', testAllProps('transition', 'all', true));
+
+/*!
+{
+ "name": "CSS Generated Content Transitions",
+ "property": "csspseudotransitions",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csspseudotransitions', function() {
+ var result = false;
+
+ if (!Modernizr.csstransitions || !window.getComputedStyle) {
+ return result;
+ }
+
+ var styles =
+ '#modernizr:before { content:" "; font-size:5px;' + Modernizr._prefixes.join('transition:0s 100s;') + '}' +
+ '#modernizr.trigger:before { font-size:10px; }';
+
+ Modernizr.testStyles(styles, function(elem) {
+ // Force rendering of the element's styles so that the transition will trigger
+ window.getComputedStyle(elem, ':before').getPropertyValue('font-size');
+ elem.className += 'trigger';
+ result = window.getComputedStyle(elem, ':before').getPropertyValue('font-size') === '5px';
+ });
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Reflections",
+ "caniuse": "css-reflections",
+ "property": "cssreflections",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('cssreflections', testAllProps('boxReflect', 'above', true));
+
+/*!
+{
+ "name": "CSS Regions",
+ "caniuse": "css-regions",
+ "authors": ["Mihai Balan"],
+ "property": "regions",
+ "tags": ["css"],
+ "builderAliases": ["css_regions"],
+ "notes": [{
+ "name": "W3C Specification",
+ "href": "http://www.w3.org/TR/css3-regions/"
+ }]
+}
+!*/
+
+ // We start with a CSS parser test then we check page geometry to see if it's affected by regions
+ // Later we might be able to retire the second part, as WebKit builds with the false positives die out
+
+ Modernizr.addTest('regions', function() {
+
+ if (isSVG) {
+ // css regions don't work inside of SVG elements. Rather than update the
+ // below test to work in an SVG context, just exit early to save bytes
+ return false;
+ }
+
+ /* Get the 'flowFrom' property name available in the browser. Either default or vendor prefixed.
+ If the property name can't be found we'll get Boolean 'false' and fail quickly */
+ var flowFromProperty = Modernizr.prefixed('flowFrom');
+ var flowIntoProperty = Modernizr.prefixed('flowInto');
+ var result = false;
+
+ if (!flowFromProperty || !flowIntoProperty) {
+ return result;
+ }
+
+ /* If CSS parsing is there, try to determine if regions actually work. */
+ var iframeContainer = createElement('iframe');
+ var container = createElement('div');
+ var content = createElement('div');
+ var region = createElement('div');
+
+ /* we create a random, unlikely to be generated flow number to make sure we don't
+ clash with anything more vanilla, like 'flow', or 'article', or 'f1' */
+ var flowName = 'modernizr_flow_for_regions_check';
+
+ /* First create a div with two adjacent divs inside it. The first will be the
+ content, the second will be the region. To be able to distinguish between the two,
+ we'll give the region a particular padding */
+ content.innerText = 'M';
+ container.style.cssText = 'top: 150px; left: 150px; padding: 0px;';
+ region.style.cssText = 'width: 50px; height: 50px; padding: 42px;';
+
+ region.style[flowFromProperty] = flowName;
+ container.appendChild(content);
+ container.appendChild(region);
+ docElement.appendChild(container);
+
+ /* Now compute the bounding client rect, before and after attempting to flow the
+ content div in the region div. If regions are enabled, the after bounding rect
+ should reflect the padding of the region div.*/
+ var flowedRect, delta;
+ var plainRect = content.getBoundingClientRect();
+
+
+ content.style[flowIntoProperty] = flowName;
+ flowedRect = content.getBoundingClientRect();
+
+ delta = parseInt(flowedRect.left - plainRect.left, 10);
+ docElement.removeChild(container);
+
+ if (delta == 42) {
+ result = true;
+ } else {
+ /* IE only allows for the content to come from iframes. This has the
+ * side effect of automatic collapsing of iframes once they get the flow-into
+ * property set. checking for a change on the height allows us to detect this
+ * in a sync way, without having to wait for a frame to load */
+
+ docElement.appendChild(iframeContainer);
+ plainRect = iframeContainer.getBoundingClientRect();
+ iframeContainer.style[flowIntoProperty] = flowName;
+ flowedRect = iframeContainer.getBoundingClientRect();
+
+ if (plainRect.height > 0 && plainRect.height !== flowedRect.height && flowedRect.height === 0) {
+ result = true;
+ }
+ }
+
+ content = region = container = iframeContainer = undefined;
+
+ return result;
+ });
+
+/*!
+{
+ "name": "CSS Font rem Units",
+ "caniuse": "rem",
+ "authors": ["nsfmc"],
+ "property": "cssremunit",
+ "tags": ["css"],
+ "builderAliases": ["css_remunit"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/css3-values/#relative0"
+ },{
+ "name": "Font Size with rem by Jonathan Snook",
+ "href": "http://snook.ca/archives/html_and_css/font-size-with-rem"
+ }]
+}
+!*/
+
+ // "The 'rem' unit ('root em') is relative to the computed
+ // value of the 'font-size' value of the root element."
+ // you can test by checking if the prop was ditched
+
+ Modernizr.addTest('cssremunit', function() {
+ var style = createElement('a').style;
+ try {
+ style.fontSize = '3rem';
+ }
+ catch (e) {}
+ return (/rem/).test(style.fontSize);
+ });
+
+/*!
+{
+ "name": "CSS UI Resize",
+ "property": "cssresize",
+ "caniuse": "css-resize",
+ "tags": ["css"],
+ "builderAliases": ["css_resize"],
+ "notes": [{
+ "name": "W3C Specification",
+ "href": "http://www.w3.org/TR/css3-ui/#resize"
+ },{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/CSS/resize"
+ }]
+}
+!*/
+/* DOC
+Test for CSS 3 UI "resize" property
+*/
+
+ Modernizr.addTest('cssresize', testAllProps('resize', 'both', true));
+
+/*!
+{
+ "name": "CSS rgba",
+ "caniuse": "css3-colors",
+ "property": "rgba",
+ "tags": ["css"],
+ "notes": [{
+ "name": "CSSTricks Tutorial",
+ "href": "http://css-tricks.com/rgba-browser-support/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('rgba', function() {
+ var style = createElement('a').style;
+ style.cssText = 'background-color:rgba(150,255,150,.5)';
+
+ return ('' + style.backgroundColor).indexOf('rgba') > -1;
+ });
+
+/*!
+{
+ "name": "CSS Stylable Scrollbars",
+ "property": "cssscrollbar",
+ "tags": ["css"],
+ "builderAliases": ["css_scrollbars"]
+}
+!*/
+
+ testStyles('#modernizr{overflow: scroll; width: 40px; height: 40px; }#' + prefixes
+ .join('scrollbar{width:0px}' + ' #modernizr::')
+ .split('#')
+ .slice(1)
+ .join('#') + 'scrollbar{width:0px}',
+ function(node) {
+ Modernizr.addTest('cssscrollbar', node.scrollWidth == 40);
+ });
+
+/*!
+{
+ "name": "CSS Shapes",
+ "property": "shapes",
+ "tags": ["css"],
+ "notes": [{
+ "name": "CSS Shapes W3C specification",
+ "href": "http://www.w3.org/TR/css-shapes"
+ },{
+ "name": "Examples from Adobe",
+ "href": "http://html.adobe.com/webplatform/layout/shapes"
+ }, {
+ "name": "Samples showcasing uses of Shapes",
+ "href": "http://codepen.io/collection/qFesk"
+ }]
+}
+!*/
+
+ Modernizr.addTest('shapes', testAllProps('shapeOutside', 'content-box', true));
+
+/*!
+{
+ "name": "CSS general sibling selector",
+ "caniuse": "css-sel3",
+ "property": "siblinggeneral",
+ "tags": ["css"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/pull/889"
+ }]
+}
+!*/
+
+ Modernizr.addTest('siblinggeneral', function() {
+ return testStyles('#modernizr div {width:100px} #modernizr div ~ div {width:200px;display:block}', function(elem) {
+ return elem.lastChild.offsetWidth == 200;
+ }, 2);
+ });
+
+/*!
+{
+ "name": "CSS Subpixel Fonts",
+ "property": "subpixelfont",
+ "tags": ["css"],
+ "builderAliases": ["css_subpixelfont"],
+ "authors": [
+ "@derSchepp",
+ "@gerritvanaaken",
+ "@rodneyrehm",
+ "@yatil",
+ "@ryanseddon"
+ ],
+ "notes": [{
+ "name": "Origin Test",
+ "href": "https://github.com/gerritvanaaken/subpixeldetect"
+ }]
+}
+!*/
+
+ /*
+ * (to infer if GDI or DirectWrite is used on Windows)
+ */
+ testStyles(
+ '#modernizr{position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;}#subpixel{float: left; font-size: 33.3333%;}',
+ function(elem) {
+ var subpixel = elem.firstChild;
+ subpixel.innerHTML = 'This is a text written in Arial';
+ Modernizr.addTest('subpixelfont', window.getComputedStyle ?
+ window.getComputedStyle(subpixel, null).getPropertyValue('width') !== '44px'
+ : false);
+ }, 1, ['subpixel']);
+
+/*!
+{
+ "name": "CSS :target pseudo-class",
+ "caniuse": "css-sel3",
+ "property": "target",
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:target"
+ }],
+ "authors": ["@zachleat"],
+ "warnings": ["Opera Mini supports :target but doesn't update the hash for anchor links."]
+}
+!*/
+/* DOC
+Detects support for the ':target' CSS pseudo-class.
+*/
+
+ // querySelector
+ Modernizr.addTest('target', function() {
+ var doc = window.document;
+ if (!('querySelectorAll' in doc)) {
+ return false;
+ }
+
+ try {
+ doc.querySelectorAll(':target');
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "CSS text-align-last",
+ "property": "textalignlast",
+ "tags": ["css"],
+ "knownBugs": ["IE does not support the 'start' or 'end' values."],
+ "notes": [{
+ "name": "Quicksmode",
+ "href": "http://www.quirksmode.org/css/text/textalignlast.html"
+ },{
+ "name": "MDN",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last"
+ }]
+}
+!*/
+
+ Modernizr.addTest('textalignlast', testAllProps('textAlignLast'));
+
+/*!
+{
+ "name": "CSS textshadow",
+ "property": "textshadow",
+ "caniuse": "css-textshadow",
+ "tags": ["css"],
+ "knownBugs": ["FF3.0 will false positive on this test"]
+}
+!*/
+
+ Modernizr.addTest('textshadow', testProp('textShadow', '1px 1px'));
+
+/*!
+{
+ "name": "CSS Transforms",
+ "property": "csstransforms",
+ "caniuse": "transforms2d",
+ "tags": ["css"]
+}
+!*/
+
+ Modernizr.addTest('csstransforms', function() {
+ // Android < 3.0 is buggy, so we sniff and blacklist
+ // http://git.io/hHzL7w
+ return navigator.userAgent.indexOf('Android 2.') === -1 &&
+ testAllProps('transform', 'scale(1)', true);
+ });
+
+/*!
+{
+ "name": "CSS Transforms 3D",
+ "property": "csstransforms3d",
+ "caniuse": "transforms3d",
+ "tags": ["css"],
+ "warnings": [
+ "Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004"
+ ]
+}
+!*/
+
+ Modernizr.addTest('csstransforms3d', function() {
+ var ret = !!testAllProps('perspective', '1px', true);
+ var usePrefix = Modernizr._config.usePrefixes;
+
+ // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
+ // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
+ // some conditions. As a result, Webkit typically recognizes the syntax but
+ // will sometimes throw a false positive, thus we must do a more thorough check:
+ if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {
+ var mq;
+ // Use CSS Conditional Rules if available
+ if (Modernizr.supports) {
+ mq = '@supports (perspective: 1px)';
+ } else {
+ // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.
+ // `@media (transform-3d),(-webkit-transform-3d){ ... }`
+ mq = '@media (transform-3d)';
+ if (usePrefix) {
+ mq += ',(-webkit-transform-3d)';
+ }
+ }
+ // If loaded inside the body tag and the test element inherits any padding, margin or borders it will fail #740
+ mq += '{#modernizr{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0}}';
+
+ testStyles(mq, function(elem) {
+ ret = elem.offsetLeft === 9 && elem.offsetHeight === 5;
+ });
+ }
+
+ return ret;
+ });
+
+/*!
+{
+ "name": "CSS Transform Style preserve-3d",
+ "property": "preserve3d",
+ "authors": ["edmellum"],
+ "tags": ["css"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
+ },{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/762"
+ }]
+}
+!*/
+/* DOC
+Detects support for `transform-style: preserve-3d`, for getting a proper 3D perspective on elements.
+*/
+
+ Modernizr.addTest('preserve3d', testAllProps('transformStyle', 'preserve-3d'));
+
+/*!
+{
+ "name": "CSS user-select",
+ "property": "userselect",
+ "caniuse": "user-select-none",
+ "authors": ["ryan seddon"],
+ "tags": ["css"],
+ "builderAliases": ["css_userselect"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/250"
+ }]
+}
+!*/
+
+ //https://github.com/Modernizr/Modernizr/issues/250
+ Modernizr.addTest('userselect', testAllProps('userSelect', 'none', true));
+
+/*!
+{
+ "name": "CSS :valid pseudo-class",
+ "property": "cssvalid",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/:valid"
+ }]
+}
+!*/
+/* DOC
+ Detects support for the ':valid' CSS pseudo-class.
+*/
+
+ Modernizr.addTest('cssvalid', function() {
+ return testStyles('#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:valid{width:50px}', function(elem) {
+ var input = createElement('input');
+ elem.appendChild(input);
+ return input.clientWidth > 10;
+ });
+ });
+
+/*!
+{
+ "name": "CSS vh unit",
+ "property": "cssvhunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vhunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "Similar JSFiddle",
+ "href": "http://jsfiddle.net/FWeinb/etnYC/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr { height: 50vh; }', function(elem) {
+ var height = parseInt(window.innerHeight / 2, 10);
+ var compStyle = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['height'], 10);
+ Modernizr.addTest('cssvhunit', compStyle == height);
+ });
+
+
+ /**
+ * roundedEquals takes two integers and checks if the first is within 1 of the second
+ *
+ * @access private
+ * @function roundedEquals
+ * @param {number} a
+ * @param {number} b
+ * @returns {boolean}
+ */
+
+ function roundedEquals(a, b) {
+ return a - 1 === b || a === b || a + 1 === b;
+ }
+
+ ;
+/*!
+{
+ "name": "CSS vmax unit",
+ "property": "cssvmaxunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vmaxunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/glsee/JDsWQ/4/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr1{width: 50vmax}#modernizr2{width:50px;height:50px;overflow:scroll}', function(node) {
+ var elem = node.childNodes[1];
+ var scroller = node.childNodes[0];
+ var scrollbarWidth = parseInt((scroller.offsetWidth - scroller.clientWidth) / 2, 10);
+
+ var one_vw = docElement.clientWidth / 100;
+ var one_vh = docElement.clientHeight / 100;
+ var expectedWidth = parseInt(Math.max(one_vw, one_vh) * 50, 10);
+ var compWidth = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['width'], 10);
+
+ Modernizr.addTest('cssvmaxunit', roundedEquals(expectedWidth, compWidth) || roundedEquals(expectedWidth, compWidth - scrollbarWidth));
+ }, 2);
+
+/*!
+{
+ "name": "CSS vmin unit",
+ "property": "cssvminunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vminunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/glsee/JRmdq/8/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr1{width: 50vm;width:50vmin}#modernizr2{width:50px;height:50px;overflow:scroll}', function(node) {
+ var elem = node.childNodes[1];
+ var scroller = node.childNodes[0];
+ var scrollbarWidth = parseInt((scroller.offsetWidth - scroller.clientWidth) / 2, 10);
+
+ var one_vw = docElement.clientWidth / 100;
+ var one_vh = docElement.clientHeight / 100;
+ var expectedWidth = parseInt(Math.min(one_vw, one_vh) * 50, 10);
+ var compWidth = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle)['width'], 10);
+
+ Modernizr.addTest('cssvminunit', roundedEquals(expectedWidth, compWidth) || roundedEquals(expectedWidth, compWidth - scrollbarWidth));
+ }, 2);
+
+/*!
+{
+ "name": "CSS vw unit",
+ "property": "cssvwunit",
+ "caniuse": "viewport-units",
+ "tags": ["css"],
+ "builderAliases": ["css_vwunit"],
+ "notes": [{
+ "name": "Related Modernizr Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/572"
+ },{
+ "name": "JSFiddle Example",
+ "href": "http://jsfiddle.net/FWeinb/etnYC/"
+ }]
+}
+!*/
+
+ testStyles('#modernizr { width: 50vw; }', function(elem) {
+ var width = parseInt(window.innerWidth / 2, 10);
+ var compStyle = parseInt((window.getComputedStyle ?
+ getComputedStyle(elem, null) :
+ elem.currentStyle).width, 10);
+
+ Modernizr.addTest('cssvwunit', compStyle == width);
+ });
+
+/*!
+{
+ "name": "will-change",
+ "property": "willchange",
+ "notes": [{
+ "name": "Spec",
+ "href": "http://tabatkins.github.io/specs/css-will-change/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `will-change` css property, which formally signals to the
+browser that an element will be animating.
+*/
+
+ Modernizr.addTest('willchange', 'willChange' in docElement.style);
+
+/*!
+{
+ "name": "CSS wrap-flow",
+ "property": "wrapflow",
+ "tags": ["css"],
+ "notes": [
+ {
+ "name": "W3C Exclusions spec",
+ "href": "http://www.w3.org/TR/css3-exclusions"
+ },
+ {
+ "name": "Example by Adobe",
+ "href": "http://html.adobe.com/webstandards/cssexclusions"
+ }
+ ]
+}
+!*/
+
+ Modernizr.addTest('wrapflow', function() {
+ var prefixedProperty = prefixed('wrapFlow');
+ if (!prefixedProperty || isSVG) {
+ return false;
+ }
+
+ var wrapFlowProperty = prefixedProperty.replace(/([A-Z])/g, function(str, m1) { return '-' + m1.toLowerCase(); }).replace(/^ms-/, '-ms-');
+
+ /* If the CSS parsing is there we need to determine if wrap-flow actually works to avoid false positive cases, e.g. the browser parses
+ the property, but it hasn't got the implementation for the functionality yet. */
+ var container = createElement('div');
+ var exclusion = createElement('div');
+ var content = createElement('span');
+
+ /* First we create a div with two adjacent divs inside it. The first div will be the content, the second div will be the exclusion area.
+ We use the "wrap-flow: end" property to test the actual behavior. (http://dev.w3.org/csswg/css3-exclusions/#wrap-flow-property)
+ The wrap-flow property is applied to the exclusion area what has a 50px left offset and a 100px width.
+ If the wrap-flow property is working correctly then the content should start after the exclusion area, so the content's left offset should be 150px. */
+ exclusion.style.cssText = 'position: absolute; left: 50px; width: 100px; height: 20px;' + wrapFlowProperty + ':end;';
+ content.innerText = 'X';
+
+ container.appendChild(exclusion);
+ container.appendChild(content);
+ docElement.appendChild(container);
+
+ var leftOffset = content.offsetLeft;
+
+ docElement.removeChild(container);
+ exclusion = content = container = undefined;
+
+ return (leftOffset == 150);
+ });
+
+/*!
+{
+ "name": "CustomEvent",
+ "property": "customevent",
+ "tags": ["customevent"],
+ "authors": ["Alberto Elias"],
+ "notes": [{
+ "name": "W3C DOM reference",
+ "href": "http://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/docs/Web/API/CustomEvent"
+ }],
+ "polyfills": ["eventlistener"]
+}
+!*/
+/* DOC
+
+Detects support for CustomEvent.
+
+*/
+
+ Modernizr.addTest('customevent', 'CustomEvent' in window && typeof window.CustomEvent === 'function');
+
+/*!
+{
+ "name": "Custom protocol handler",
+ "property": "customprotocolhandler",
+ "authors": ["Ben Schwarz"],
+ "builderAliases": ["custom_protocol_handler"],
+ "notes": [{
+ "name": "WHATWG overview",
+ "href": "http://developers.whatwg.org/timers.html#custom-handlers"
+ },{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.registerProtocolHandler"
+ }],
+ "warnings": [],
+ "polyfills": []
+}
+!*/
+/* DOC
+Detects support for the `window.registerProtocolHandler()` API to allow websites to register themselves as possible handlers for particular protocols.
+*/
+
+ Modernizr.addTest('customprotocolhandler', function() {
+ // early bailout where it doesn't exist at all
+ if (!navigator.registerProtocolHandler) {
+ return false;
+ }
+
+ // registerProtocolHandler was stubbed in webkit for a while, and didn't
+ // actually do anything. We intentionally set it improperly to test for
+ // the proper sort of failure
+ try {
+ navigator.registerProtocolHandler('thisShouldFail');
+ }
+ catch (e) {
+ return e instanceof TypeError;
+ }
+
+ return false;
+ });
+
+/*!
+{
+ "name": "Dart",
+ "property": "dart",
+ "authors": ["Theodoor van Donge"],
+ "notes": [{
+ "name": "Language website",
+ "href": "http://www.dartlang.org/"
+ }]
+}
+!*/
+/* DOC
+Detects native support for the Dart programming language.
+*/
+
+ Modernizr.addTest('dart', !!prefixed('startDart', navigator));
+
+/*!
+{
+ "name": "DataView",
+ "property": "dataview",
+ "authors": ["Addy Osmani"],
+ "builderAliases": ["dataview_api"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/JavaScript_typed_arrays/DataView"
+ }],
+ "polyfills": ["jdataview"]
+}
+!*/
+/* DOC
+Detects support for the DataView interface for reading data from an ArrayBuffer as part of the Typed Array spec.
+*/
+
+ Modernizr.addTest('dataview', (typeof DataView !== 'undefined' && 'getFloat64' in DataView.prototype));
+
+/*!
+{
+ "name": "classList",
+ "caniuse": "classlist",
+ "property": "classlist",
+ "tags": ["dom"],
+ "builderAliases": ["dataview_api"],
+ "notes": [{
+ "name": "MDN Docs",
+ "href": "https://developer.mozilla.org/en/DOM/element.classList"
+ }]
+}
+!*/
+
+ Modernizr.addTest('classlist', 'classList' in docElement);
+
+/*!
+{
+ "name": "createElement with Attributes",
+ "property": ["createelementattrs", "createelement-attrs"],
+ "tags": ["dom"],
+ "builderAliases": ["dom_createElement_attrs"],
+ "authors": ["James A. Rosen"],
+ "notes": [{
+ "name": "Related Github Issue",
+ "href": "https://github.com/Modernizr/Modernizr/issues/258"
+ }]
+}
+!*/
+
+ Modernizr.addTest('createelementattrs', function() {
+ try {
+ return createElement('<input name="test" />').getAttribute('name') == 'test';
+ } catch (e) {
+ return false;
+ }
+ }, {
+ aliases: ['createelement-attrs']
+ });
+
+/*!
+{
+ "name": "dataset API",
+ "caniuse": "dataset",
+ "property": "dataset",
+ "tags": ["dom"],
+ "builderAliases": ["dom_dataset"],
+ "authors": ["@phiggins42"]
+}
+!*/
+
+ // dataset API for data-* attributes
+ Modernizr.addTest('dataset', function() {
+ var n = createElement('div');
+ n.setAttribute('data-a-b', 'c');
+ return !!(n.dataset && n.dataset.aB === 'c');
+ });
+
+/*!
+{
+ "name": "Document Fragment",
+ "property": "documentfragment",
+ "notes": [{
+ "name": "W3C DOM Level 1 Reference",
+ "href": "http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-B63ED1A3"
+ }, {
+ "name": "SitePoint Reference",
+ "href": "http://reference.sitepoint.com/javascript/DocumentFragment"
+ }, {
+ "name": "QuirksMode Compatibility Tables",
+ "href": "http://www.quirksmode.org/m/w3c_core.html#t112"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "knownBugs": ["false-positive on Blackberry 9500, see QuirksMode note"],
+ "tags": []
+}
+!*/
+/* DOC
+Append multiple elements to the DOM within a single insertion.
+*/
+
+ Modernizr.addTest('documentfragment', function() {
+ return 'createDocumentFragment' in document &&
+ 'appendChild' in docElement;
+ });
+
+/*!
+{
+ "name": "[hidden] Attribute",
+ "property": "hidden",
+ "tags": ["dom"],
+ "notes": [{
+ "name": "WHATWG: The hidden attribute",
+ "href": "http://developers.whatwg.org/editing.html#the-hidden-attribute"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "https://github.com/aFarkas/html5shiv/blob/bf4fcc4/src/html5shiv.js#L38"
+ }],
+ "polyfills": ["html5shiv"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Does the browser support the HTML5 [hidden] attribute?
+*/
+
+ Modernizr.addTest('hidden', 'hidden' in createElement('a'));
+
+/*!
+{
+ "name": "microdata",
+ "property": "microdata",
+ "tags": ["dom"],
+ "builderAliases": ["dom_microdata"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/html5/microdata.html"
+ }]
+}
+!*/
+
+ Modernizr.addTest('microdata', 'getItems' in document);
+
+/*!
+{
+ "name": "DOM4 MutationObserver",
+ "property": "mutationobserver",
+ "caniuse": "mutationobserver",
+ "tags": ["dom"],
+ "authors": ["Karel Sedláček (@ksdlck)"],
+ "polyfills": ["mutationobservers"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver"
+ }]
+}
+!*/
+/* DOC
+
+Determines if DOM4 MutationObserver support is available.
+
+*/
+
+ Modernizr.addTest('mutationobserver',
+ !!window.MutationObserver || !!window.WebKitMutationObserver);
+
+
+ /**
+ * since we have a fairly large number of input tests that don't mutate the input
+ * we create a single element that can be shared with all of those tests for a
+ * minor perf boost
+ *
+ * @access private
+ * @returns {HTMLInputElement}
+ */
+ var inputElem = createElement('input');
+
+/*!
+{
+ "name": "Input attributes",
+ "property": "input",
+ "tags": ["forms"],
+ "authors": ["Mike Taylor"],
+ "notes": [{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary"
+ }],
+ "knownBugs": ["Some blackberry devices report false positive for input.multiple"]
+}
+!*/
+/* DOC
+Detects support for HTML5 `<input>` element attributes and exposes Boolean subproperties with the results:
+
+```javascript
+Modernizr.input.autocomplete
+Modernizr.input.autofocus
+Modernizr.input.list
+Modernizr.input.max
+Modernizr.input.min
+Modernizr.input.multiple
+Modernizr.input.pattern
+Modernizr.input.placeholder
+Modernizr.input.required
+Modernizr.input.step
+```
+*/
+
+ // Run through HTML5's new input attributes to see if the UA understands any.
+ // Mike Taylr has created a comprehensive resource for testing these attributes
+ // when applied to all input types:
+ // miketaylr.com/code/input-type-attr.html
+
+ // Only input placeholder is tested while textarea's placeholder is not.
+ // Currently Safari 4 and Opera 11 have support only for the input placeholder
+ // Both tests are available in feature-detects/forms-placeholder.js
+
+ var inputattrs = 'autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ');
+ var attrs = {};
+
+ Modernizr['input'] = (function(props) {
+ for (var i = 0, len = props.length; i < len; i++) {
+ attrs[ props[i] ] = !!(props[i] in inputElem);
+ }
+ if (attrs.list) {
+ // safari false positive's on datalist: webk.it/74252
+ // see also github.com/Modernizr/Modernizr/issues/146
+ attrs.list = !!(createElement('datalist') && window.HTMLDataListElement);
+ }
+ return attrs;
+ })(inputattrs);
+
+/*!
+{
+ "name": "datalist Element",
+ "caniuse": "datalist",
+ "property": "datalistelem",
+ "tags": ["elem"],
+ "builderAliases": ["elem_datalist"],
+ "warnings": ["This test is a dupe of Modernizr.input.list. Only around for legacy reasons."],
+ "notes": [{
+ "name": "CSS Tricks Article",
+ "href": "http://css-tricks.com/15346-relevant-dropdowns-polyfill-for-datalist/"
+ },{
+ "name": "Mike Taylor Test",
+ "href": "http://miketaylr.com/test/datalist.html"
+ },{
+ "name": "Mike Taylor Code",
+ "href": "http://miketaylr.com/code/datalist.html"
+ }]
+}
+!*/
+
+ // lol. we already have a test for datalist built in! silly you.
+ // Leaving it around in case anyone's using it
+
+ Modernizr.addTest('datalistelem', Modernizr.input.list);
+
+/*!
+{
+ "name": "details Element",
+ "caniuse": "details",
+ "property": "details",
+ "tags": ["elem"],
+ "builderAliases": ["elem_details"],
+ "authors": ["@mathias"],
+ "notes": [{
+ "name": "Mathias' Original",
+ "href": "http://mths.be/axh"
+ }]
+}
+!*/
+
+ Modernizr.addTest('details', function() {
+ var el = createElement('details');
+ var diff;
+
+ // return early if possible; thanks @aFarkas!
+ if (!('open' in el)) {
+ return false;
+ }
+
+ testStyles('#modernizr details{display:block}', function(node) {
+ node.appendChild(el);
+ el.innerHTML = '<summary>a</summary>b';
+ diff = el.offsetHeight;
+ el.open = true;
+ diff = diff != el.offsetHeight;
+ });
+
+
+ return diff;
+ });
+
+/*!
+{
+ "name": "output Element",
+ "property": "outputelem",
+ "tags": ["elem"],
+ "builderAliases": ["elem_output"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-output-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('outputelem', 'value' in createElement('output'));
+
+/*!
+{
+ "name": "picture Element",
+ "property": "picture",
+ "tags": ["elem"],
+ "authors": ["Scott Jehl", "Mat Marquis"],
+ "notes": [{
+ "name": "Specification",
+ "href": "http://picture.responsiveimages.org"
+ },{
+ "name": "Relevant spec issue",
+ "href": "https://github.com/ResponsiveImagesCG/picture-element/issues/87"
+ }]
+}
+!*/
+
+ Modernizr.addTest('picture', 'HTMLPictureElement' in window);
+
+/*!
+{
+ "name": "progress Element",
+ "caniuse": "progressmeter",
+ "property": ["progressbar", "meter"],
+ "tags": ["elem"],
+ "builderAliases": ["elem_progress_meter"],
+ "authors": ["Stefan Wallin"]
+}
+!*/
+
+ // Tests for progressbar-support. All browsers that don't support progressbar returns undefined =)
+ Modernizr.addTest('progressbar', createElement('progress').max !== undefined);
+
+ // Tests for meter-support. All browsers that don't support meters returns undefined =)
+ Modernizr.addTest('meter', createElement('meter').max !== undefined);
+
+/*!
+{
+ "name": "ruby, rp, rt Elements",
+ "caniuse": "ruby",
+ "property": "ruby",
+ "tags": ["elem"],
+ "builderAliases": ["elem_ruby"],
+ "authors": ["Cătălin Mariș"],
+ "notes": [{
+ "name": "WHATWG Specification",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-ruby-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('ruby', function() {
+
+ var ruby = createElement('ruby');
+ var rt = createElement('rt');
+ var rp = createElement('rp');
+ var displayStyleProperty = 'display';
+ // 'fontSize' - because it`s only used for IE6 and IE7
+ var fontSizeStyleProperty = 'fontSize';
+
+ ruby.appendChild(rp);
+ ruby.appendChild(rt);
+ docElement.appendChild(ruby);
+
+ // browsers that support <ruby> hide the <rp> via "display:none"
+ if (getStyle(rp, displayStyleProperty) == 'none' || // for non-IE browsers
+ // but in IE browsers <rp> has "display:inline" so, the test needs other conditions:
+ getStyle(ruby, displayStyleProperty) == 'ruby' && getStyle(rt, displayStyleProperty) == 'ruby-text' || // for IE8+
+ getStyle(rp, fontSizeStyleProperty) == '6pt' && getStyle(rt, fontSizeStyleProperty) == '6pt') { // for IE6 & IE7
+
+ cleanUp();
+ return true;
+
+ } else {
+ cleanUp();
+ return false;
+ }
+
+ function getStyle(element, styleProperty) {
+ var result;
+
+ if (window.getComputedStyle) { // for non-IE browsers
+ result = document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProperty);
+ } else if (element.currentStyle) { // for IE
+ result = element.currentStyle[styleProperty];
+ }
+
+ return result;
+ }
+
+ function cleanUp() {
+ docElement.removeChild(ruby);
+ // the removed child node still exists in memory, so ...
+ ruby = null;
+ rt = null;
+ rp = null;
+ }
+
+ });
+
+
+/*!
+{
+ "name": "Template Tag",
+ "property": "template",
+ "tags": ["elem"],
+ "notes": [{
+ "name": "HTML5Rocks Article",
+ "href": "http://www.html5rocks.com/en/tutorials/webcomponents/template/"
+ },{
+ "name": "W3 Spec",
+ "href": "https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html"
+ }]
+}
+!*/
+
+ Modernizr.addTest('template', 'content' in createElement('template'));
+
+/*!
+{
+ "name": "time Element",
+ "property": "time",
+ "tags": ["elem"],
+ "builderAliases": ["elem_time"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element"
+ }]
+}
+!*/
+
+ Modernizr.addTest('time', 'valueAsDate' in createElement('time'));
+
+/*!
+{
+ "name": "Track element and Timed Text Track",
+ "property": ["texttrackapi", "track"],
+ "tags": ["elem"],
+ "builderAliases": ["elem_track"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3 track Element Spec",
+ "href": "http://www.w3.org/TR/html5/video.html#the-track-element"
+ },{
+ "name": "W3 track API Spec",
+ "href": "http://www.w3.org/TR/html5/media-elements.html#text-track-api"
+ }],
+ "warnings": ["While IE10 has implemented the track element, IE10 does not expose the underlying APIs to create timed text tracks by JS (really sad)"]
+}
+!*/
+
+ Modernizr.addTest('texttrackapi', typeof (createElement('video').addTextTrack) === 'function');
+
+ // a more strict test for track including UI support: document.createElement('track').kind === 'subtitles'
+ Modernizr.addTest('track', 'kind' in createElement('track'));
+
+/*!
+{
+ "name": "Unknown Elements",
+ "property": "unknownelements",
+ "tags": ["elem"],
+ "notes": [{
+ "name": "The Story of the HTML5 Shiv",
+ "href": "http://www.paulirish.com/2011/the-history-of-the-html5-shiv/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "https://github.com/aFarkas/html5shiv/blob/bf4fcc4/src/html5shiv.js#L36"
+ }],
+ "polyfills": ["html5shiv"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Does the browser support HTML with non-standard / new elements?
+*/
+
+ Modernizr.addTest('unknownelements', function() {
+ var a = createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ return a.childNodes.length === 1;
+ });
+
+/*!
+{
+ "name": "Emoji",
+ "property": "emoji"
+}
+!*/
+/* DOC
+Detects support for emoji character sets.
+*/
+
+ Modernizr.addTest('emoji', function() {
+ if (!Modernizr.canvastext) {
+ return false;
+ }
+ var pixelRatio = window.devicePixelRatio || 1;
+ var offset = 12 * pixelRatio;
+ var node = createElement('canvas');
+ var ctx = node.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.textBaseline = 'top';
+ ctx.font = '32px Arial';
+ ctx.fillText('\ud83d\udc28', 0, 0); // U+1F428 KOALA
+ return ctx.getImageData(offset, offset, 1, 1).data[0] !== 0;
+ });
+
+/*!
+{
+ "name": "ES5 Array",
+ "property": "es5array",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Array per specification.
+*/
+
+ Modernizr.addTest('es5array', function() {
+ return !!(Array.prototype &&
+ Array.prototype.every &&
+ Array.prototype.filter &&
+ Array.prototype.forEach &&
+ Array.prototype.indexOf &&
+ Array.prototype.lastIndexOf &&
+ Array.prototype.map &&
+ Array.prototype.some &&
+ Array.prototype.reduce &&
+ Array.prototype.reduceRight &&
+ Array.isArray);
+ });
+
+/*!
+{
+ "name": "ES5 Date",
+ "property": "es5date",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Date per specification.
+*/
+
+ Modernizr.addTest('es5date', function() {
+ var isoDate = '2013-04-12T06:06:37.307Z',
+ canParseISODate = false;
+ try {
+ canParseISODate = !!Date.parse(isoDate);
+ } catch (e) {
+ // no ISO date parsing yet
+ }
+ return !!(Date.now &&
+ Date.prototype &&
+ Date.prototype.toISOString &&
+ Date.prototype.toJSON &&
+ canParseISODate);
+ });
+
+/*!
+{
+ "name": "ES5 Function",
+ "property": "es5function",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Function per specification.
+*/
+
+ Modernizr.addTest('es5function', function() {
+ return !!(Function.prototype && Function.prototype.bind);
+ });
+
+/*!
+{
+ "name": "ES5 Object",
+ "property": "es5object",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim", "es5sham"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Object per specification.
+*/
+
+ Modernizr.addTest('es5object', function() {
+ return !!(Object.keys &&
+ Object.create &&
+ Object.getPrototypeOf &&
+ Object.getOwnPropertyNames &&
+ Object.isSealed &&
+ Object.isFrozen &&
+ Object.isExtensible &&
+ Object.getOwnPropertyDescriptor &&
+ Object.defineProperty &&
+ Object.defineProperties &&
+ Object.seal &&
+ Object.freeze &&
+ Object.preventExtensions);
+ });
+
+/*!
+{
+ "name": "ES5 Strict Mode",
+ "property": "strictmode",
+ "caniuse": "sctrict-mode",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "authors": ["@kangax"],
+ "tags": ["es5"],
+ "builderAliases": ["es5_strictmode"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 Object strict mode.
+*/
+
+ Modernizr.addTest('strictmode', (function() {'use strict'; return !this; })());
+
+/*!
+{
+ "name": "ES5 String",
+ "property": "es5string",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 5 String per specification.
+*/
+
+ Modernizr.addTest('es5string', function() {
+ return !!(String.prototype && String.prototype.trim);
+ });
+
+/*!
+{
+ "name": "JSON",
+ "property": "json",
+ "caniuse": "json",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "http://developer.mozilla.org/en/JSON"
+ }],
+ "polyfills": ["json2"]
+}
+!*/
+/* DOC
+Detects native support for JSON handling functions.
+*/
+
+ // this will also succeed if you've loaded the JSON2.js polyfill ahead of time
+ // ... but that should be obvious. :)
+
+ Modernizr.addTest('json', 'JSON' in window && 'parse' in JSON && 'stringify' in JSON);
+
+/*!
+{
+ "name": "ES5 Syntax",
+ "property": "es5syntax",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "http://kangax.github.io/es5-compat-table/"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["This detect uses `eval()`, so CSP may be a problem."],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser accepts ECMAScript 5 syntax.
+*/
+
+ Modernizr.addTest('es5syntax', function() {
+ var value, obj, stringAccess, getter, setter, reservedWords, zeroWidthChars;
+ try {
+ // Property access on strings
+ stringAccess = eval('"foobar"[3] === "b"');
+ // Getter in property initializer
+ getter = eval('({ get x(){ return 1 } }).x === 1');
+ eval('({ set x(v){ value = v; } }).x = 1');
+ // Setter in property initializer
+ setter = value === 1;
+ // Reserved words as property names
+ eval('obj = ({ if: 1 })');
+ reservedWords = obj['if'] === 1;
+ // Zero-width characters in identifiers
+ zeroWidthChars = eval('_\u200c\u200d = true');
+
+ return stringAccess && getter && setter && reservedWords && zeroWidthChars;
+ } catch (ignore) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "ES5 Immutable Undefined",
+ "property": "es5undefined",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }, {
+ "name": "original implementation of detect code",
+ "href": "http://kangax.github.io/es5-compat-table/"
+ }],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser prevents assignment to global `undefined` per ECMAScript 5.
+*/
+
+ Modernizr.addTest('es5undefined', function() {
+ var result, originalUndefined;
+ try {
+ originalUndefined = window.undefined;
+ window.undefined = 12345;
+ result = typeof window.undefined === 'undefined';
+ window.undefined = originalUndefined;
+ } catch (e) {
+ return false;
+ }
+ return result;
+ });
+
+/*!
+{
+ "name": "ES5",
+ "property": "es5",
+ "notes": [{
+ "name": "ECMAScript 5.1 Language Specification",
+ "href": "http://www.ecma-international.org/ecma-262/5.1/"
+ }],
+ "polyfills": ["es5shim", "es5sham"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["es5"]
+}
+!*/
+/* DOC
+Check if browser implements everything as specified in ECMAScript 5.
+*/
+
+ Modernizr.addTest('es5', function() {
+ return !!(
+ Modernizr.es5array &&
+ Modernizr.es5date &&
+ Modernizr.es5function &&
+ Modernizr.es5object &&
+ Modernizr.strictmode &&
+ Modernizr.es5string &&
+ Modernizr.json &&
+ Modernizr.es5syntax &&
+ Modernizr.es5undefined
+ );
+ });
+
+/*!
+{
+ "name": "ES6 Array",
+ "property": "es6array",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Array per specification.
+*/
+
+ Modernizr.addTest('es6array', !!(Array.prototype &&
+ Array.prototype.copyWithin &&
+ Array.prototype.fill &&
+ Array.prototype.find &&
+ Array.prototype.findIndex &&
+ Array.prototype.keys &&
+ Array.prototype.entries &&
+ Array.prototype.values &&
+ Array.from &&
+ Array.of));
+
+/*!
+{
+ "name": "ES5 String.prototype.contains",
+ "property": "contains",
+ "authors": ["Robert Kowalski"],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 `String.prototype.contains` per specification.
+*/
+
+ Modernizr.addTest('contains', is(String.prototype.contains, 'function'));
+
+/*!
+{
+ "name": "ES6 Generators",
+ "property": "generators",
+ "authors": ["Michael Kachanovskyi"],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Generators per specification.
+*/
+
+ Modernizr.addTest('generators', function() {
+ try {
+ /* jshint evil: true */
+ new Function('function* test() {}')();
+ } catch (e) {
+ return false;
+ }
+ return true;
+ });
+
+/*!
+{
+ "name": "ES6 Math",
+ "property": "es6math",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Math per specification.
+*/
+
+ Modernizr.addTest('es6math', !!(Math &&
+ Math.clz32 &&
+ Math.cbrt &&
+ Math.imul &&
+ Math.sign &&
+ Math.log10 &&
+ Math.log2 &&
+ Math.log1p &&
+ Math.expm1 &&
+ Math.cosh &&
+ Math.sinh &&
+ Math.tanh &&
+ Math.acosh &&
+ Math.asinh &&
+ Math.atanh &&
+ Math.hypot &&
+ Math.trunc &&
+ Math.fround));
+
+/*!
+{
+ "name": "ES6 Number",
+ "property": "es6number",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Number per specification.
+*/
+
+ Modernizr.addTest('es6number', !!(Number.isFinite &&
+ Number.isInteger &&
+ Number.isSafeInteger &&
+ Number.isNaN &&
+ Number.parseInt &&
+ Number.parseFloat &&
+ Number.isInteger(Number.MAX_SAFE_INTEGER) &&
+ Number.isInteger(Number.MIN_SAFE_INTEGER) &&
+ Number.isFinite(Number.EPSILON)));
+
+/*!
+{
+ "name": "ES6 Object",
+ "property": "es6object",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Object per specification.
+*/
+
+ Modernizr.addTest('es6object', !!(Object.assign &&
+ Object.is &&
+ Object.setPrototypeOf));
+
+/*!
+{
+ "name": "ES6 Promises",
+ "property": "promises",
+ "caniuse": "promises",
+ "polyfills": ["es6promises"],
+ "authors": ["Krister Kari", "Jake Archibald"],
+ "tags": ["es6"],
+ "notes": [{
+ "name": "The ES6 promises spec",
+ "href": "https://github.com/domenic/promises-unwrapping"
+ },{
+ "name": "Chromium dashboard - ES6 Promises",
+ "href": "http://www.chromestatus.com/features/5681726336532480"
+ },{
+ "name": "JavaScript Promises: There and back again - HTML5 Rocks",
+ "href": "http://www.html5rocks.com/en/tutorials/es6/promises/"
+ }]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 Promises per specification.
+*/
+
+ Modernizr.addTest('promises', function() {
+ return 'Promise' in window &&
+ // Some of these methods are missing from
+ // Firefox/Chrome experimental implementations
+ 'resolve' in window.Promise &&
+ 'reject' in window.Promise &&
+ 'all' in window.Promise &&
+ 'race' in window.Promise &&
+ // Older version of the spec had a resolver object
+ // as the arg rather than a function
+ (function() {
+ var resolve;
+ new window.Promise(function(r) { resolve = r; });
+ return typeof resolve === 'function';
+ }());
+ });
+
+/*!
+{
+ "name": "ES6 String",
+ "property": "es6string",
+ "notes": [{
+ "name": "unofficial ECMAScript 6 draft specification",
+ "href": "http://people.mozilla.org/~jorendorff/es6-draft.html"
+ }],
+ "polyfills": ["es6shim"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "warnings": ["ECMAScript 6 is still a only a draft, so this detect may not match the final specification or implementations."],
+ "tags": ["es6"]
+}
+!*/
+/* DOC
+Check if browser implements ECMAScript 6 String per specification.
+*/
+
+ Modernizr.addTest('es6string', !!(String.fromCodePoint &&
+ String.raw &&
+ String.prototype.codePointAt &&
+ String.prototype.repeat &&
+ String.prototype.startsWith &&
+ String.prototype.endsWith &&
+ String.prototype.contains));
+
+/*!
+{
+ "name": "Orientation and Motion Events",
+ "property": ["devicemotion", "deviceorientation"],
+ "caniuse": "deviceorientation",
+ "notes": [{
+ "name": "W3C Editor's Draft",
+ "href": "http://dev.w3.org/geo/api/spec-source-orientation.html"
+ },{
+ "name": "Implementation by iOS Safari (Orientation)",
+ "href": "http://goo.gl/fhce3"
+ },{
+ "name": "Implementation by iOS Safari (Motion)",
+ "href": "http://goo.gl/rLKz8"
+ }],
+ "authors": ["Shi Chuan"],
+ "tags": ["event"],
+ "builderAliases": ["event_deviceorientation_motion"]
+}
+!*/
+/* DOC
+Part of Device Access aspect of HTML5, same category as geolocation.
+
+`devicemotion` tests for Device Motion Event support, returns boolean value true/false.
+
+`deviceorientation` tests for Device Orientation Event support, returns boolean value true/false
+*/
+
+ Modernizr.addTest('devicemotion', 'DeviceMotionEvent' in window);
+ Modernizr.addTest('deviceorientation', 'DeviceOrientationEvent' in window);
+
+/*!
+{
+ "name": "onInput Event",
+ "property": "oninput",
+ "notes": [{
+ "name": "MDN article",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.oninput"
+ },{
+ "name": "WHATWG spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors"
+ },{
+ "name": "Detecting onInput support",
+ "href": "http://danielfriesen.name/blog/2010/02/16/html5-browser-maze-oninput-support"
+ }],
+ "authors": ["Patrick Kettner"],
+ "tags": ["event"]
+}
+!*/
+/* DOC
+`oninput` tests if the browser is able to detect the input event
+*/
+
+
+ Modernizr.addTest('oninput', function() {
+ var input = createElement('input');
+ var supportsOnInput;
+ input.setAttribute('oninput', 'return');
+
+ if (hasEvent('oninput', docElement) || typeof input.oninput == 'function') {
+ return true;
+ }
+
+ // IE doesn't support onInput, so we wrap up the non IE APIs
+ // (createEvent, addEventListener) in a try catch, rather than test for
+ // their trident equivalent.
+ try {
+ // Older Firefox didn't map oninput attribute to oninput property
+ var testEvent = document.createEvent('KeyboardEvent');
+ supportsOnInput = false;
+ var handler = function(e) {
+ supportsOnInput = true;
+ e.preventDefault();
+ e.stopPropagation();
+ };
+
+ testEvent.initKeyEvent('keypress', true, true, window, false, false, false, false, 0, 'e'.charCodeAt(0));
+ docElement.appendChild(input);
+ input.addEventListener('input', handler, false);
+ input.focus();
+ input.dispatchEvent(testEvent);
+ input.removeEventListener('input', handler, false);
+ docElement.removeChild(input);
+ } catch (e) {
+ supportsOnInput = false;
+ }
+ return supportsOnInput;
+ });
+
+/*!
+{
+ "name": "Event Listener",
+ "property": "eventlistener",
+ "authors": ["Andrew Betts (@triblondon)"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Registration-interfaces"
+ }],
+ "polyfills": ["eventlistener"]
+}
+!*/
+/* DOC
+Detects native support for addEventListener
+*/
+
+ Modernizr.addTest('eventlistener', 'addEventListener' in window);
+
+/*!
+{
+ "name": "EXIF Orientation",
+ "property": "exiforientation",
+ "tags": ["image"],
+ "builderAliases": ["exif_orientation"],
+ "async": true,
+ "authors": ["Paul Sayre"],
+ "notes": [{
+ "name": "Article by Dave Perrett",
+ "href": "http://recursive-design.com/blog/2012/07/28/exif-orientation-handling-is-a-ghetto/"
+ },{
+ "name": "Article by Calvin Hass",
+ "href": "http://www.impulseadventure.com/photo/exif-orientation.html"
+ }]
+}
+!*/
+/* DOC
+Detects support for EXIF Orientation in JPEG images.
+
+iOS looks at the EXIF Orientation flag in JPEGs and rotates the image accordingly. Most desktop browsers just ignore this data.
+*/
+
+ // Bug trackers:
+ // bugzil.la/298619 (unimplemented)
+ // crbug.com/56845 (looks incomplete)
+ // webk.it/19688 (available upstream but its up all ports to turn on individually)
+ Modernizr.addAsyncTest(function() {
+ var img = new Image();
+
+ img.onerror = function() {
+ addTest('exiforientation', false, {aliases: ['exif-orientation']});
+ };
+
+ img.onload = function() {
+ addTest('exiforientation', img.width !== 2, {aliases: ['exif-orientation']});
+ };
+
+ // There may be a way to shrink this more, it's a 1x2 white jpg with the orientation flag set to 6
+ img.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q==';
+ });
+
+/*!
+{
+ "name": "File API",
+ "property": "filereader",
+ "caniuse": "fileapi",
+ "notes": [{
+ "name": "W3C Working Draft",
+ "href": "http://www.w3.org/TR/FileAPI/"
+ }],
+ "tags": ["file"],
+ "builderAliases": ["file_api"],
+ "knownBugs": ["Will fail in Safari 5 due to its lack of support for the standards defined FileReader object"]
+}
+!*/
+/* DOC
+`filereader` tests for the File API specification
+
+Tests for objects specific to the File API W3C specification without
+being redundant (don't bother testing for Blob since it is assumed
+to be the File object's prototype.)
+*/
+
+ Modernizr.addTest('filereader', !!(window.File && window.FileList && window.FileReader));
+
+/*!
+{
+ "name": "Filesystem API",
+ "property": "filesystem",
+ "caniuse": "filesystem",
+ "notes": [{
+ "name": "W3 Draft",
+ "href": "dev.w3.org/2009/dap/file-system/file-dir-sys.html"
+ }],
+ "authors": ["Eric Bidelman (@ebidel)"],
+ "tags": ["file"],
+ "builderAliases": ["file_filesystem"],
+ "knownBugs": ["The API will be present in Chrome incognito, but will throw an exception. See crbug.com/93417"]
+}
+!*/
+
+ Modernizr.addTest('filesystem', !!prefixed('requestFileSystem', window));
+
+/*!
+ {
+ "name": "Flash",
+ "property": "flash",
+ "tags": ["flash"],
+ "polyfills": ["shumway"]
+ }
+ !*/
+/* DOC
+Detects support flash, as well as flash blocking plugins
+*/
+
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ var removeFakeBody = function(body) {
+ // If we’re rockin’ an attached fake body, clean it up
+ if (body.fake && body.parentNode) {
+ body.parentNode.removeChild(body);
+ }
+ };
+ var runTest = function(result, embed) {
+ var bool = !!result;
+ if (bool) {
+ bool = new Boolean(bool);
+ bool.blocked = (result === 'blocked');
+ }
+ addTest('flash', function() { return bool; });
+
+ if (embed && body.contains(embed)) {
+
+ // in case embed has been wrapped, as with ClickToPlugin
+ while (embed.parentNode !== body) {
+ embed = embed.parentNode;
+ }
+
+ body.removeChild(embed);
+ }
+
+ };
+ var easy_detect;
+ var activex;
+ // we wrap activex in a try/catch because when flash is disabled through
+ // ActiveX controls, it throws an error.
+ try {
+ // Pan is an API that exists for flash objects.
+ activex = 'ActiveXObject' in window && 'Pan' in new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash');
+ } catch (e) {}
+
+ easy_detect = !(('plugins' in navigator && 'Shockwave Flash' in navigator.plugins) || activex);
+
+ if (easy_detect || isSVG) {
+ runTest(false);
+ }
+ else {
+ // flash seems to be installed, but it might be blocked. We have to
+ // actually create an element to see what happens to it.
+ var embed = createElement('embed');
+ var body = getBody();
+ var blockedDetect;
+ var inline_style;
+
+ embed.type = 'application/x-shockwave-flash';
+
+ // Need to do this in the body (fake or otherwise) otherwise IE8 complains
+ body.appendChild(embed);
+ docElement.appendChild(body);
+
+ // Pan doesn't exist in the embed if its IE (its on the ActiveXObjeect)
+ // so this check is for all other browsers.
+ if (!('Pan' in embed) && !activex) {
+ runTest('blocked', embed);
+ removeFakeBody(body);
+ return;
+ }
+
+ blockedDetect = function() {
+ // if we used a fake body originally, we need to restart this test, since
+ // we haven't been attached to the DOM, and therefore none of the blockers
+ // have had time to work.
+ if (!docElement.contains(body)) {
+ body = document.body || body;
+ embed = createElement('embed');
+ embed.type = 'application/x-shockwave-flash';
+ body.appendChild(embed);
+ return setTimeout(blockedDetect, 1000);
+ }
+ if (!docElement.contains(embed)) {
+ runTest('blocked');
+ }
+ else {
+ inline_style = embed.style.cssText;
+ if (inline_style !== '') {
+ // the style of the element has changed automatically. This is a
+ // really poor heuristic, but for lower end flash blocks, it the
+ // only change they can make.
+ runTest('blocked', embed);
+ }
+ else {
+ runTest(true, embed);
+ }
+ }
+ removeFakeBody(body);
+ };
+
+ // If we have got this far, there is still a chance a userland plugin
+ // is blocking us (either changing the styles, or automatically removing
+ // the element). Both of these require us to take a step back for a moment
+ // to allow for them to get time of the thread, hence a setTimeout.
+ //
+ setTimeout(blockedDetect, 10);
+ }
+ });
+
+/*!
+{
+ "name": "input[capture] Attribute",
+ "property": "capture",
+ "tags": ["video", "image", "audio", "media", "attribute"],
+ "notes": [{
+ "name": "W3C draft: HTML Media Capture",
+ "href": "http://www.w3.org/TR/html-media-capture/"
+ }]
+}
+!*/
+/* DOC
+When used on an `<input>`, this attribute signifies that the resource it takes should be generated via device's camera, camcorder, sound recorder.
+*/
+
+ // testing for capture attribute in inputs
+ Modernizr.addTest('capture', ('capture' in createElement('input')));
+
+/*!
+{
+ "name": "input[file] Attribute",
+ "property": "fileinput",
+ "caniuse" : "forms",
+ "tags": ["file", "forms", "input"],
+ "builderAliases": ["forms_fileinput"]
+}
+!*/
+/* DOC
+Detects whether input type="file" is available on the platform
+
+E.g. iOS < 6 and some android version don't support this
+*/
+
+ Modernizr.addTest('fileinput', function() {
+ if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) {
+ return false;
+ }
+ var elem = createElement('input');
+ elem.type = 'file';
+ return !elem.disabled;
+ });
+
+/*!
+{
+ "name": "input[directory] Attribute",
+ "property": "directory",
+ "authors": ["silverwind"],
+ "tags": ["file", "input", "attribute"]
+}
+!*/
+/* DOC
+When used on an `<input type="file">`, the `directory` attribute instructs
+the user agent to present a directory selection dialog instead of the usual
+file selection dialog.
+*/
+
+ Modernizr.addTest('fileinputdirectory', function() {
+ var elem = createElement('input'), dir = 'directory';
+ elem.type = 'file';
+ if (dir in elem) {
+ return true;
+ } else {
+ for (var i = 0, len = domPrefixes.length; i < len; i++) {
+ if (domPrefixes[i] + dir in elem) {
+ return true;
+ }
+ }
+ }
+ return false;
+ });
+
+/*!
+{
+ "name": "input[form] Attribute",
+ "property": "formattribute",
+ "tags": ["attribute", "forms", "input"],
+ "builderAliases": ["forms_formattribute"]
+}
+!*/
+/* DOC
+Detects whether input form="form_id" is available on the platform
+E.g. IE 10 (and below), don't support this
+*/
+
+
+ Modernizr.addTest('formattribute', function() {
+ var form = createElement('form');
+ var input = createElement('input');
+ var div = createElement('div');
+ var id = 'formtest' + (new Date()).getTime();
+ var attr;
+ var bool = false;
+
+ form.id = id;
+
+ //IE6/7 confuses the form idl attribute and the form content attribute, so we use document.createAttribute
+ try {
+ input.setAttribute('form', id);
+ }
+ catch (e) {
+ if (document.createAttribute) {
+ attr = document.createAttribute('form');
+ attr.nodeValue = id;
+ input.setAttributeNode(attr);
+ }
+ }
+
+ div.appendChild(form);
+ div.appendChild(input);
+
+ docElement.appendChild(div);
+
+ bool = form.elements && form.elements.length === 1 && input.form == form;
+
+ div.parentNode.removeChild(div);
+ return bool;
+ });
+
+/*!
+{
+ "name": "Form input types",
+ "property": "inputtypes",
+ "caniuse": "forms",
+ "tags": ["forms"],
+ "authors": ["Mike Taylor"],
+ "polyfills": [
+ "jquerytools",
+ "webshims",
+ "h5f",
+ "webforms2",
+ "nwxforms",
+ "fdslider",
+ "html5slider",
+ "galleryhtml5forms",
+ "jscolor",
+ "html5formshim",
+ "selectedoptionsjs",
+ "formvalidationjs"
+ ]
+}
+!*/
+/* DOC
+Detects support for HTML5 form input types and exposes Boolean subproperties with the results:
+
+```javascript
+Modernizr.inputtypes.color
+Modernizr.inputtypes.date
+Modernizr.inputtypes.datetime
+Modernizr.inputtypes['datetime-local']
+Modernizr.inputtypes.email
+Modernizr.inputtypes.month
+Modernizr.inputtypes.number
+Modernizr.inputtypes.range
+Modernizr.inputtypes.search
+Modernizr.inputtypes.tel
+Modernizr.inputtypes.time
+Modernizr.inputtypes.url
+Modernizr.inputtypes.week
+```
+*/
+
+ // Run through HTML5's new input types to see if the UA understands any.
+ // This is put behind the tests runloop because it doesn't return a
+ // true/false like all the other tests; instead, it returns an object
+ // containing each input type with its corresponding true/false value
+
+ // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
+ var inputtypes = 'search tel url email datetime date month week time datetime-local number range color'.split(' ');
+ var inputs = {};
+
+ Modernizr['inputtypes'] = (function(props) {
+ var len = props.length;
+ var smile = ':)';
+ var inputElemType;
+ var defaultView;
+ var bool;
+
+ for (var i = 0; i < len; i++) {
+
+ inputElem.setAttribute('type', inputElemType = props[i]);
+ bool = inputElem.type !== 'text' && 'style' in inputElem;
+
+ // We first check to see if the type we give it sticks..
+ // If the type does, we feed it a textual value, which shouldn't be valid.
+ // If the value doesn't stick, we know there's input sanitization which infers a custom UI
+ if (bool) {
+
+ inputElem.value = smile;
+ inputElem.style.cssText = 'position:absolute;visibility:hidden;';
+
+ if (/^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined) {
+
+ docElement.appendChild(inputElem);
+ defaultView = document.defaultView;
+
+ // Safari 2-4 allows the smiley as a value, despite making a slider
+ bool = defaultView.getComputedStyle &&
+ defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
+ // Mobile android web browser has false positive, so must
+ // check the height to see if the widget is actually there.
+ (inputElem.offsetHeight !== 0);
+
+ docElement.removeChild(inputElem);
+
+ } else if (/^(search|tel)$/.test(inputElemType)) {
+ // Spec doesn't define any special parsing or detectable UI
+ // behaviors so we pass these through as true
+
+ // Interestingly, opera fails the earlier test, so it doesn't
+ // even make it here.
+
+ } else if (/^(url|email|number)$/.test(inputElemType)) {
+ // Real url and email support comes with prebaked validation.
+ bool = inputElem.checkValidity && inputElem.checkValidity() === false;
+
+ } else {
+ // If the upgraded input compontent rejects the :) text, we got a winner
+ bool = inputElem.value != smile;
+ }
+ }
+
+ inputs[ props[i] ] = !!bool;
+ }
+ return inputs;
+ })(inputtypes);
+
+/*!
+{
+ "name": "Form Validation",
+ "property": "formvalidation",
+ "tags": ["forms", "validation", "attribute"],
+ "builderAliases": ["forms_validation"]
+}
+!*/
+/* DOC
+This implementation only tests support for interactive form validation.
+To check validation for a specific type or a specific other constraint,
+the test can be combined:
+
+- `Modernizr.inputtypes.number && Modernizr.formvalidation` (browser supports rangeOverflow, typeMismatch etc. for type=number)
+- `Modernizr.input.required && Modernizr.formvalidation` (browser supports valueMissing)
+*/
+
+ Modernizr.addTest('formvalidation', function() {
+ var form = createElement('form');
+ if (!('checkValidity' in form) || !('addEventListener' in form)) {
+ return false;
+ }
+ if ('reportValidity' in form) {
+ return true;
+ }
+ var invalidFired = false;
+ var input;
+
+ Modernizr.formvalidationapi = true;
+
+ // Prevent form from being submitted
+ form.addEventListener('submit', function(e) {
+ //Opera does not validate form, if submit is prevented
+ if (!window.opera) {
+ e.preventDefault();
+ }
+ e.stopPropagation();
+ }, false);
+
+ // Calling form.submit() doesn't trigger interactive validation,
+ // use a submit button instead
+ //older opera browsers need a name attribute
+ form.innerHTML = '<input name="modTest" required><button></button>';
+
+ testStyles('#modernizr form{position:absolute;top:-99999em}', function(node) {
+ node.appendChild(form);
+
+ input = form.getElementsByTagName('input')[0];
+
+ // Record whether "invalid" event is fired
+ input.addEventListener('invalid', function(e) {
+ invalidFired = true;
+ e.preventDefault();
+ e.stopPropagation();
+ }, false);
+
+ //Opera does not fully support the validationMessage property
+ Modernizr.formvalidationmessage = !!input.validationMessage;
+
+ // Submit form by clicking submit button
+ form.getElementsByTagName('button')[0].click();
+ });
+
+ return invalidFired;
+ });
+
+/*!
+{
+ "name": "input[type=\"number\"] Localization",
+ "property": "localizednumber",
+ "tags": ["forms", "localization", "attribute"],
+ "authors": ["Peter Janes"],
+ "notes": [{
+ "name": "Webkit Bug Tracker Listing",
+ "href": "https://bugs.webkit.org/show_bug.cgi?id=42484"
+ },{
+ "name": "Based on This",
+ "href": "http://trac.webkit.org/browser/trunk/LayoutTests/fast/forms/script-tests/input-number-keyoperation.js?rev=80096#L9"
+ }],
+ "knownBugs": ["Only ever returns true if the browser/OS is configured to use comma as a decimal separator. This is probably fine for most use cases."]
+}
+!*/
+/* DOC
+Detects whether input type="number" is capable of receiving and displaying localized numbers, e.g. with comma separator.
+*/
+
+ Modernizr.addTest('localizednumber', function() {
+ // this extends our testing of input[type=number], so bomb out if that's missing
+ if (!Modernizr.inputtypes.number) { return false; }
+ // we rely on checkValidity later, so bomb out early if we don't have it
+ if (!Modernizr.formvalidation) { return false; }
+
+ var el = createElement('div');
+ var diff;
+ var body = getBody();
+
+ var root = (function() {
+ return docElement.insertBefore(body, docElement.firstElementChild || docElement.firstChild);
+ }());
+ el.innerHTML = '<input type="number" value="1.0" step="0.1"/>';
+ var input = el.childNodes[0];
+ root.appendChild(el);
+ input.focus();
+ try {
+ document.execCommand('InsertText', false, '1,1');
+ } catch (e) { // prevent warnings in IE
+ }
+ diff = input.type === 'number' && input.valueAsNumber === 1.1 && input.checkValidity();
+ root.removeChild(el);
+ body.fake && root.parentNode.removeChild(root);
+ return diff;
+ });
+
+
+/*!
+{
+ "name": "placeholder attribute",
+ "property": "placeholder",
+ "tags": ["forms", "attribute"],
+ "builderAliases": ["forms_placeholder"]
+}
+!*/
+/* DOC
+Tests for placeholder attribute in inputs and textareas
+*/
+
+ Modernizr.addTest('placeholder', ('placeholder' in createElement('input') && 'placeholder' in createElement('textarea')));
+
+/*!
+{
+ "name": "form#requestAutocomplete()",
+ "property": "requestautocomplete",
+ "tags": ["form", "forms", "requestAutocomplete", "payments"],
+ "notes": [{
+ "name": "WHATWG proposed spec",
+ "href": "http://wiki.whatwg.org/wiki/RequestAutocomplete"
+ }]
+}
+!*/
+/* DOC
+When used with input[autocomplete] to annotate a form, form.requestAutocomplete() shows a dialog in Chrome that speeds up
+checkout flows (payments specific for now).
+*/
+
+ Modernizr.addTest('requestautocomplete', !!prefixed('requestAutocomplete', createElement('form')));
+
+/*!
+{
+ "name": "Fullscreen API",
+ "property": "fullscreen",
+ "caniuse": "fullscreen",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/API/Fullscreen"
+ }],
+ "polyfills": ["screenfulljs"],
+ "builderAliases": ["fullscreen_api"]
+}
+!*/
+/* DOC
+Detects support for the ability to make the current website take over the user's entire screen
+*/
+
+ // github.com/Modernizr/Modernizr/issues/739
+ Modernizr.addTest('fullscreen', !!(prefixed('exitFullscreen', document, false) || prefixed('cancelFullScreen', document, false)));
+
+/*!
+{
+ "name": "GamePad API",
+ "property": "gamepads",
+ "authors": ["Eric Bidelman"],
+ "tags": ["media"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/gamepad/"
+ },{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/doodles/gamepad/#toc-featuredetect"
+ }],
+ "warnings": [],
+ "polyfills": []
+}
+!*/
+/* DOC
+Detects support for the Gamepad API, for access to gamepads and controllers.
+*/
+
+
+ Modernizr.addTest('gamepads', !!prefixed('getGamepads', navigator));
+
+/*!
+{
+ "name": "Geolocation API",
+ "property": "geolocation",
+ "caniuse": "geolocation",
+ "tags": ["media"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation"
+ }],
+ "polyfills": [
+ "joshuabell-polyfill",
+ "webshims",
+ "geo-location-javascript",
+ "geolocation-api-polyfill"
+ ]
+}
+!*/
+/* DOC
+Detects support for the Geolocation API for users to provide their location to web applications.
+*/
+
+ // geolocation is often considered a trivial feature detect...
+ // Turns out, it's quite tricky to get right:
+ //
+ // Using !!navigator.geolocation does two things we don't want. It:
+ // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
+ // 2. Disables page caching in WebKit: webk.it/43956
+ //
+ // Meanwhile, in Firefox < 8, an about:config setting could expose
+ // a false positive that would throw an exception: bugzil.la/688158
+
+ Modernizr.addTest('geolocation', 'geolocation' in navigator);
+
+/*!
+{
+ "name": "Hashchange event",
+ "property": "hashchange",
+ "caniuse": "hashchange",
+ "tags": ["history"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.onhashchange"
+ }],
+ "polyfills": [
+ "jquery-hashchange",
+ "moo-historymanager",
+ "jquery-ajaxy",
+ "hasher",
+ "shistory"
+ ]
+}
+!*/
+/* DOC
+Detects support for the `hashchange` event, fired when the current location fragment changes.
+*/
+
+ Modernizr.addTest('hashchange', function() {
+ if (hasEvent('hashchange', window) === false) {
+ return false;
+ }
+
+ // documentMode logic from YUI to filter out IE8 Compat Mode
+ // which false positives.
+ return (document.documentMode === undefined || document.documentMode > 7);
+ });
+
+/*!
+{
+ "name": "Hidden Scrollbar",
+ "property": "hiddenscroll",
+ "authors": ["Oleg Korsunsky"]
+}
+!*/
+/* DOC
+Detects whether scrollbars on overflowed blocks are hidden (a-la iPhone)
+*/
+
+ Modernizr.addTest('hiddenscroll', function() {
+ return testStyles('#modernizr {width:100px;height:100px;overflow:scroll}', function(elem) {
+ return elem.offsetWidth === elem.clientWidth;
+ });
+ });
+
+/*!
+{
+ "name": "History API",
+ "property": "history",
+ "caniuse": "history",
+ "tags": ["history"],
+ "authors": ["Hay Kranen", "Alexander Farkas"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/html51/browsers.html#the-history-interface"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.history"
+ }],
+ "polyfills": ["historyjs", "html5historyapi"]
+}
+!*/
+/* DOC
+Detects support for the History API for manipulating the browser session history.
+*/
+
+ Modernizr.addTest('history', function() {
+ // Issue #733
+ // The stock browser on Android 2.2 & 2.3, and 4.0.x returns positive on history support
+ // Unfortunately support is really buggy and there is no clean way to detect
+ // these bugs, so we fall back to a user agent sniff :(
+ var ua = navigator.userAgent;
+
+ // We only want Android 2 and 4.0, stock browser, and not Chrome which identifies
+ // itself as 'Mobile Safari' as well, nor Windows Phone (issue #1471).
+ if ((ua.indexOf('Android 2.') !== -1 ||
+ (ua.indexOf('Android 4.0') !== -1)) &&
+ ua.indexOf('Mobile Safari') !== -1 &&
+ ua.indexOf('Chrome') === -1 &&
+ ua.indexOf('Windows Phone') === -1) {
+ return false;
+ }
+
+ // Return the regular check
+ return (window.history && 'pushState' in window.history);
+ });
+
+/*!
+{
+ "name": "HTML Imports",
+ "notes": [
+ {
+ "name": "W3C HTML Imports Specification",
+ "href": "http://w3c.github.io/webcomponents/spec/imports/"
+ },
+ {
+ "name": "HTML Imports - #include for the web",
+ "href": "http://www.html5rocks.com/en/tutorials/webcomponents/imports/"
+ }
+ ],
+ "polyfills": ["polymer-htmlimports"],
+ "property": "htmlimports",
+ "tags": ["html", "import"]
+}
+!*/
+/* DOC
+Detects support for HTML import, a feature that is used for loading in Web Components.
+ */
+
+
+ addTest('htmlimports', 'import' in createElement('link'));
+
+/*!
+{
+ "name": "IE8 compat mode",
+ "property": "ie8compat",
+ "authors": ["Erich Ocean"]
+}
+!*/
+/* DOC
+Detects whether or not the current browser is IE8 in compatibility mode (i.e. acting as IE7).
+*/
+
+ // In this case, IE8 will be acting as IE7. You may choose to remove features in this case.
+
+ // related:
+ // james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
+
+ Modernizr.addTest('ie8compat', (!window.addEventListener && !!document.documentMode && document.documentMode === 7));
+
+/*!
+{
+ "name": "iframe[sandbox] Attribute",
+ "property": "sandbox",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_sandbox"],
+ "notes": [
+ {
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox"
+ }],
+ "knownBugs": [ "False-positive on Firefox < 29" ]
+}
+!*/
+/* DOC
+Test for `sandbox` attribute in iframes.
+*/
+
+ Modernizr.addTest('sandbox', 'sandbox' in createElement('iframe'));
+
+/*!
+{
+ "name": "iframe[seamless] Attribute",
+ "property": "seamless",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_seamless"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-seamless"
+ }]
+}
+!*/
+/* DOC
+Test for `seamless` attribute in iframes.
+*/
+
+ Modernizr.addTest('seamless', 'seamless' in createElement('iframe'));
+
+/*!
+{
+ "name": "iframe[srcdoc] Attribute",
+ "property": "srcdoc",
+ "tags": ["iframe"],
+ "builderAliases": ["iframe_srcdoc"],
+ "notes": [{
+ "name": "WhatWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-srcdoc"
+ }]
+}
+!*/
+/* DOC
+Test for `srcdoc` attribute in iframes.
+*/
+
+ Modernizr.addTest('srcdoc', 'srcdoc' in createElement('iframe'));
+
+/*!
+{
+ "name": "Animated PNG",
+ "async": true,
+ "property": "apng",
+ "tags": ["image"],
+ "builderAliases": ["img_apng"],
+ "notes": [{
+ "name": "Wikipedia Article",
+ "href": "http://en.wikipedia.org/wiki/APNG"
+ }]
+}
+!*/
+/* DOC
+Test for animated png support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ if (!Modernizr.canvas) {
+ return false;
+ }
+
+ var image = new Image();
+ var canvas = createElement('canvas');
+ var ctx = canvas.getContext('2d');
+
+ image.onload = function() {
+ addTest('apng', function() {
+ if (typeof canvas.getContext == 'undefined') {
+ return false;
+ }
+ else {
+ ctx.drawImage(image, 0, 0);
+ return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
+ }
+ });
+ };
+
+ image.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg==';
+ });
+
+/*!
+{
+ "name": "JPEG XR (extended range)",
+ "async": true,
+ "aliases": ["jpeg-xr"],
+ "property": "jpegxr",
+ "tags": ["image"],
+ "notes": [{
+ "name": "Wikipedia Article",
+ "href": "http://en.wikipedia.org/wiki/JPEG_XR"
+ }]
+}
+!*/
+/* DOC
+Test for JPEG XR support
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onload = image.onerror = function() {
+ addTest('jpegxr', image.width == 1, {aliases: ['jpeg-xr']});
+ };
+
+ image.src = 'data:image/vnd.ms-photo;base64,SUm8AQgAAAAFAAG8AQAQAAAASgAAAIC8BAABAAAAAQAAAIG8BAABAAAAAQAAAMC8BAABAAAAWgAAAMG8BAABAAAAHwAAAAAAAAAkw91vA07+S7GFPXd2jckNV01QSE9UTwAZAYBxAAAAABP/gAAEb/8AAQAAAQAAAA==';
+ });
+
+/*!
+{
+ "name": "sizes attribute",
+ "property": "sizes",
+ "tags": ["image"],
+ "authors": ["Mat Marquis"],
+ "notes": [{
+ "name": "Spec",
+ "href": "http://picture.responsiveimages.org/#parse-sizes-attr"
+ },{
+ "name": "Usage Details",
+ "href": "http://ericportis.com/posts/2014/srcset-sizes/"
+ }]
+}
+!*/
+/* DOC
+Test for the `sizes` attribute on images
+*/
+
+ Modernizr.addTest('sizes', 'sizes' in createElement('img'));
+
+/*!
+{
+ "name": "srcset attribute",
+ "property": "srcset",
+ "tags": ["image"],
+ "notes": [{
+ "name": "Smashing Magazine Article",
+ "href": "http://en.wikipedia.org/wiki/APNG"
+ },{
+ "name": "Generate multi-resolution images for srcset with Grunt",
+ "href": "http://addyosmani.com/blog/generate-multi-resolution-images-for-srcset-with-grunt/"
+ }]
+}
+!*/
+/* DOC
+Test for the srcset attribute of images
+*/
+
+ Modernizr.addTest('srcset', 'srcset' in createElement('img'));
+
+/*!
+{
+ "name": "Webp",
+ "async": true,
+ "property": "webp",
+ "tags": ["image"],
+ "builderAliases": ["img_webp"],
+ "authors": ["Krister Kari", "@amandeep", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "Webp Info",
+ "href": "http://code.google.com/speed/webp/"
+ }, {
+ "name": "Chormium blog - Chrome 32 Beta: Animated WebP images and faster Chrome for Android touch input",
+ "href": "http://blog.chromium.org/2013/11/chrome-32-beta-animated-webp-images-and.html"
+ }, {
+ "name": "Webp Lossless Spec",
+ "href": "https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification"
+ }, {
+ "name": "Article about WebP support on Android browsers",
+ "href": "http://www.wope-framework.com/en/2013/06/24/webp-support-on-android-browsers/"
+ }, {
+ "name": "Chormium WebP announcement",
+ "href": "http://blog.chromium.org/2011/11/lossless-and-transparency-encoding-in.html?m=1"
+ }]
+}
+!*/
+/* DOC
+Tests for lossy, non-alpha webp support.
+
+Tests for all forms of webp support (lossless, lossy, alpha, and animated)..
+
+ Modernizr.webp // Basic support (lossy)
+ Modernizr.webp.lossless // Lossless
+ Modernizr.webp.alpha // Alpha (both lossy and lossless)
+ Modernizr.webp.animation // Animated WebP
+
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+
+ var webpTests = [{
+ 'uri': 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=',
+ 'name': 'webp'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==',
+ 'name': 'webp.alpha'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA',
+ 'name': 'webp.animation'
+ }, {
+ 'uri': 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=',
+ 'name': 'webp.lossless'
+ }];
+
+ var webp = webpTests.shift();
+ function test(name, uri, cb) {
+
+ var image = new Image();
+
+ function addResult(event) {
+ // if the event is from 'onload', check the see if the image's width is
+ // 1 pixel (which indiciates support). otherwise, it fails
+
+ var result = event && event.type === 'load' ? image.width == 1 : false;
+ var baseTest = name === 'webp';
+
+ /* jshint -W053 */
+ addTest(name, baseTest ? new Boolean(result) : result);
+
+ if (cb) {
+ cb(event);
+ }
+ }
+
+ image.onerror = addResult;
+ image.onload = addResult;
+
+ image.src = uri;
+ }
+
+ // test for webp support in general
+ test(webp.name, webp.uri, function(e) {
+ // if the webp test loaded, test everything else.
+ if (e && e.type === 'load') {
+ for (var i = 0; i < webpTests.length; i++) {
+ test(webpTests[i].name, webpTests[i].uri);
+ }
+ }
+ });
+
+ });
+
+
+/*!
+{
+ "name": "Webp Alpha",
+ "async": true,
+ "property": "webpalpha",
+ "aliases": ["webp-alpha"],
+ "tags": ["image"],
+ "authors": ["Krister Kari", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "WebP Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Article about WebP support on Android browsers",
+ "href": "http://www.wope-framework.com/en/2013/06/24/webp-support-on-android-browsers/"
+ },{
+ "name": "Chromium WebP announcement",
+ "href": "http://blog.chromium.org/2011/11/lossless-and-transparency-encoding-in.html?m=1"
+ }]
+}
+!*/
+/* DOC
+Tests for transparent webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webpalpha', false, {aliases: ['webp-alpha']});
+ };
+
+ image.onload = function() {
+ addTest('webpalpha', image.width == 1, {aliases: ['webp-alpha']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==';
+ });
+
+/*!
+{
+ "name": "Webp Animation",
+ "async": true,
+ "property": "webpanimation",
+ "aliases": ["webp-animation"],
+ "tags": ["image"],
+ "authors": ["Krister Kari", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "WebP Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Chromium blog - Chrome 32 Beta: Animated WebP images and faster Chrome for Android touch input",
+ "href": "http://blog.chromium.org/2013/11/chrome-32-beta-animated-webp-images-and.html"
+ }]
+}
+!*/
+/* DOC
+Tests for animated webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webpanimation', false, {aliases: ['webp-animation']});
+ };
+
+ image.onload = function() {
+ addTest('webpanimation', image.width == 1, {aliases: ['webp-animation']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA';
+ });
+
+/*!
+{
+ "name": "Webp Lossless",
+ "async": true,
+ "property": ["webplossless", "webp-lossless"],
+ "tags": ["image"],
+ "authors": ["@amandeep", "Rich Bradshaw", "Ryan Seddon", "Paul Irish"],
+ "notes": [{
+ "name": "Webp Info",
+ "href": "http://code.google.com/speed/webp/"
+ },{
+ "name": "Webp Lossless Spec",
+ "href": "https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification"
+ }]
+}
+!*/
+/* DOC
+Tests for non-alpha lossless webp support.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var image = new Image();
+
+ image.onerror = function() {
+ addTest('webplossless', false, {aliases: ['webp-lossless']});
+ };
+
+ image.onload = function() {
+ addTest('webplossless', image.width == 1, {aliases: ['webp-lossless']});
+ };
+
+ image.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=';
+ });
+
+/*!
+{
+ "name": "IndexedDB",
+ "property": "indexeddb",
+ "caniuse": "indexeddb",
+ "tags": ["storage"],
+ "polyfills": ["indexeddb"]
+}
+!*/
+/* DOC
+Detects support for the IndexedDB client-side storage API (final spec).
+*/
+
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+
+ var indexeddb = prefixed('indexedDB', window);
+ Modernizr.addTest('indexeddb', !!indexeddb);
+
+ if (!!indexeddb) {
+ Modernizr.addTest('indexeddb.deletedatabase', 'deleteDatabase' in indexeddb);
+ }
+;
+/*!
+{
+ "name": "IndexedDB Blob",
+ "property": "indexeddbblob"
+}
+!*/
+/* DOC
+Detects if the browser can save File/Blob objects to IndexedDB
+*/
+
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+ var indexeddb = prefixed('indexedDB', window);
+ var dbname = 'detect-blob-support';
+ var supportsBlob = false;
+ var request;
+ var db;
+
+ if (!(Modernizr.indexeddb && Modernizr.indexeddb.deleteDatabase)) {
+ return false;
+ }
+
+ // Calling `deleteDatabase` in a try…catch because some contexts (e.g. data URIs)
+ // will throw a `SecurityError`
+ try {
+ indexeddb.deleteDatabase(dbname).onsuccess = function() {
+ request = indexeddb.open(dbname, 1);
+ request.onupgradeneeded = function() {
+ request.result.createObjectStore('store');
+ };
+ request.onsuccess = function() {
+ db = request.result;
+ try {
+ db.transaction('store', 'readwrite').objectStore('store').put(new Blob(), 'key');
+ supportsBlob = true;
+ }
+ catch (e) {
+ supportsBlob = false;
+ }
+ finally {
+ addTest('indexeddbblob', supportsBlob);
+ db.close();
+ indexeddb.deleteDatabase(dbname);
+ }
+ };
+ };
+ }
+ catch (e) {
+ addTest('indexeddbblob', false);
+ }
+ });
+
+/*!
+{
+ "name": "input formaction",
+ "property": "inputformaction",
+ "aliases": ["input-formaction"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formaction"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/13-formaction.html"
+ }],
+ "polyfills": [
+ "webshims"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formaction attribute on form inputs
+*/
+
+ Modernizr.addTest('inputformaction', !!('formAction' in createElement('input')), {aliases: ['input-formaction']});
+
+/*!
+{
+ "name": "input formenctype",
+ "property": "inputformenctype",
+ "aliases": ["input-formenctype"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formenctype"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/16-formenctype.html"
+ }],
+ "polyfills": [
+ "html5formshim"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formenctype attribute on form inputs, which overrides the form enctype attribute
+*/
+
+ Modernizr.addTest('inputformenctype', !!('formEnctype' in createElement('input')), {aliases: ['input-formenctype']});
+
+/*!
+{
+ "name": "input formmethod",
+ "property": "inputformmethod",
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formmethod"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/14-formmethod.html"
+ }],
+ "polyfills": [
+ "webshims"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formmethod attribute on form inputs
+*/
+
+ Modernizr.addTest('inputformmethod', !!('formMethod' in createElement('input')));
+
+/*!
+{
+ "name": "input formtarget",
+ "property": "inputformtarget",
+ "aliases": ["input-formtarget"],
+ "notes": [{
+ "name": "WHATWG Spec",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fs-formtarget"
+ }, {
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/attributes/15-formtarget.html"
+ }],
+ "polyfills": [
+ "html5formshim"
+ ]
+}
+!*/
+/* DOC
+Detect support for the formtarget attribute on form inputs, which overrides the form target attribute
+*/
+
+ Modernizr.addTest('inputformtarget', !!('formtarget' in createElement('input')), {aliases: ['input-formtarget']});
+
+/*!
+{
+ "name": "input[search] search event",
+ "property": "search",
+ "tags": ["input","search"],
+ "authors": ["Calvin Webster"],
+ "notes": [{
+ "name": "Wufoo demo",
+ "href": "http://www.wufoo.com/html5/types/5-search.html?"
+ }, {
+ "name": "CSS Tricks",
+ "href": "http://css-tricks.com/webkit-html5-search-inputs/"
+ }]
+}
+!*/
+/* DOC
+There is a custom `search` event implemented in webkit browsers when using an `input[search]` element.
+*/
+
+ Modernizr.addTest('inputsearchevent', hasEvent('search'));
+
+/*!
+ {
+ "name": "Internationalization API",
+ "property": "intl",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl"
+ },{
+ "name": "ECMAScript spec",
+ "href": "http://www.ecma-international.org/ecma-402/1.0/"
+ }]
+ }
+ !*/
+/* DOC
+Detects support for the Internationalization API which allow easy formatting of number and dates and sorting string
+based on a locale
+*/
+
+ Modernizr.addTest('intl', !!prefixed('Intl', window));
+
+/*!
+{
+ "name": "Reverse Ordered Lists",
+ "property": "olreversed",
+ "notes": [{
+ "name": "Impressive Webs article",
+ "href": "http://impressivewebs.com/reverse-ordered-lists-html5"
+ }],
+ "builderAliases": ["lists_reversed"]
+}
+!*/
+/* DOC
+Detects support for the `reversed` attribute on the `<ol>` element.
+*/
+
+ Modernizr.addTest('olreversed', 'reversed' in createElement('ol'));
+
+/*!
+{
+ "name": "MathML",
+ "property": "mathml",
+ "caniuse": "mathml",
+ "authors": ["Addy Osmani", "Davide P. Cervone", "David Carlisle"],
+ "knownBugs": ["Firefox < 4 will likely return a false, however it does support MathML inside XHTML documents"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/Math/"
+ }],
+ "polyfills": ["mathjax"]
+}
+!*/
+/* DOC
+Detects support for MathML, for mathematic equations in web pages.
+*/
+
+ // Based on work by Davide (@dpvc) and David (@davidcarlisle)
+ // in https://github.com/mathjax/MathJax/issues/182
+
+ Modernizr.addTest('mathml', function() {
+ var ret;
+
+ testStyles('#modernizr{position:absolute;display:inline-block}', function(node) {
+ node.innerHTML += '<math><mfrac><mi>xx</mi><mi>yy</mi></mfrac></math>';
+
+ ret = node.offsetHeight > node.offsetWidth;
+ });
+
+ return ret;
+ });
+
+/*!
+{
+ "name": "Beacon API",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon"
+ },{
+ "name": "W3C specification",
+ "href": "https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html"
+ }],
+ "property": "beacon",
+ "tags": ["beacon", "network"],
+ "authors": ["Cătălin Mariș"]
+}
+!*/
+/* DOC
+Detects support for an API that allows for asynchronous transfer of small HTTP data from the client to a server.
+*/
+
+ Modernizr.addTest('beacon', 'sendBeacon' in navigator);
+
+/*!
+{
+ "name": "Low Bandwidth Connection",
+ "property": "lowbandwidth",
+ "tags": ["network"],
+ "builderAliases": ["network_connection"]
+}
+!*/
+/* DOC
+Tests for determining low-bandwidth via `navigator.connection`
+
+There are two iterations of the `navigator.connection` interface.
+
+The first is present in Android 2.2+ and only in the Browser (not WebView)
+
+- http://docs.phonegap.com/en/1.2.0/phonegap_connection_connection.md.html#connection.type
+- http://davidbcalhoun.com/2010/using-navigator-connection-android
+
+The second is specced at http://dev.w3.org/2009/dap/netinfo/ and perhaps landing in WebKit
+
+- http://bugs.webkit.org/show_bug.cgi?id=73528
+
+Unknown devices are assumed as fast
+
+For more rigorous network testing, consider boomerang.js: http://github.com/bluesmoon/boomerang/
+*/
+
+ Modernizr.addTest('lowbandwidth', function() {
+ // polyfill
+ var connection = navigator.connection || {type: 0};
+
+ return connection.type == 3 || // connection.CELL_2G
+ connection.type == 4 || // connection.CELL_3G
+ /^[23]g$/.test(connection.type); // string value in new spec
+ });
+
+/*!
+{
+ "name": "Server Sent Events",
+ "property": "eventsource",
+ "tags": ["network"],
+ "builderAliases": ["network_eventsource"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://dev.w3.org/html5/eventsource/"
+ }]
+}
+!*/
+/* DOC
+Tests for server sent events aka eventsource.
+*/
+
+ Modernizr.addTest('eventsource', 'EventSource' in window);
+
+/*!
+{
+ "name": "Fetch API",
+ "property": "fetch",
+ "tags": ["network"],
+ "caniuse": "fetch",
+ "notes": [{
+ "name": "Fetch Living Standard",
+ "href": "https://fetch.spec.whatwg.org/"
+ }],
+ "polyfills": ["fetch"]
+}
+!*/
+/* DOC
+Detects support for the fetch API, a modern replacement for XMLHttpRequest.
+*/
+
+ Modernizr.addTest('fetch', 'fetch' in window);
+
+/*!
+{
+ "name": "XHR responseType",
+ "property": "xhrresponsetype",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType.
+*/
+
+ Modernizr.addTest('xhrresponsetype', (function() {
+ if (typeof XMLHttpRequest == 'undefined') {
+ return false;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('get', '/', true);
+ return 'response' in xhr;
+ }()));
+
+
+ /**
+ * http://mathiasbynens.be/notes/xhr-responsetype-json#comment-4
+ *
+ * @access private
+ * @function testXhrType
+ * @param {string} type - String name of the XHR type you want to detect
+ * @returns {boolean}
+ * @author Mathias Bynens
+ */
+
+ /* istanbul ignore next */
+ var testXhrType = function(type) {
+ if (typeof XMLHttpRequest == 'undefined') {
+ return false;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('get', '/', true);
+ try {
+ xhr.responseType = type;
+ } catch (error) {
+ return false;
+ }
+ return 'response' in xhr && xhr.responseType == type;
+ };
+
+
+/*!
+{
+ "name": "XHR responseType='arraybuffer'",
+ "property": "xhrresponsetypearraybuffer",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='arraybuffer'.
+*/
+
+ Modernizr.addTest('xhrresponsetypearraybuffer', testXhrType('arraybuffer'));
+
+/*!
+{
+ "name": "XHR responseType='blob'",
+ "property": "xhrresponsetypeblob",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='blob'.
+*/
+
+ Modernizr.addTest('xhrresponsetypeblob', testXhrType('blob'));
+
+/*!
+{
+ "name": "XHR responseType='document'",
+ "property": "xhrresponsetypedocument",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='document'.
+*/
+
+ Modernizr.addTest('xhrresponsetypedocument', testXhrType('document'));
+
+/*!
+{
+ "name": "XHR responseType='json'",
+ "property": "xhrresponsetypejson",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ },{
+ "name": "Explanation of xhr.responseType='json'",
+ "href": "http://mathiasbynens.be/notes/xhr-responsetype-json"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='json'.
+*/
+
+ Modernizr.addTest('xhrresponsetypejson', testXhrType('json'));
+
+/*!
+{
+ "name": "XHR responseType='text'",
+ "property": "xhrresponsetypetext",
+ "tags": ["network"],
+ "notes": [{
+ "name": "XMLHttpRequest Living Standard",
+ "href": "http://xhr.spec.whatwg.org/#the-responsetype-attribute"
+ }]
+}
+!*/
+/* DOC
+Tests for XMLHttpRequest xhr.responseType='text'.
+*/
+
+ Modernizr.addTest('xhrresponsetypetext', testXhrType('text'));
+
+/*!
+{
+ "name": "XML HTTP Request Level 2 XHR2",
+ "property": "xhr2",
+ "tags": ["network"],
+ "builderAliases": ["network_xhr2"],
+ "notes": [{
+ "name": "W3 Spec",
+ "href": "http://www.w3.org/TR/XMLHttpRequest2/"
+ },{
+ "name": "Details on Related Github Issue",
+ "href": "http://github.com/Modernizr/Modernizr/issues/385"
+ }]
+}
+!*/
+/* DOC
+Tests for XHR2.
+*/
+
+ // all three of these details report consistently across all target browsers:
+ // !!(window.ProgressEvent);
+ // 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest
+ Modernizr.addTest('xhr2', 'XMLHttpRequest' in window && 'withCredentials' in new XMLHttpRequest());
+
+/*!
+{
+ "name": "Notification",
+ "property": "notification",
+ "caniuse": "notifications",
+ "authors": ["Theodoor van Donge", "Hendrik Beskow"],
+ "notes": [{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/notifications/quick/"
+ },{
+ "name": "W3C spec",
+ "href": "www.w3.org/TR/notifications/"
+ }],
+ "polyfills": ["desktop-notify", "html5-notifications"]
+}
+!*/
+/* DOC
+Detects support for the Notifications API
+*/
+
+ Modernizr.addTest('notification', 'Notification' in window && 'permission' in window.Notification && 'requestPermission' in window.Notification);
+
+/*!
+{
+ "name": "Page Visibility API",
+ "property": "pagevisibility",
+ "caniuse": "pagevisibility",
+ "tags": ["performance"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API"
+ },{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/2011/WD-page-visibility-20110602/"
+ },{
+ "name": "HTML5 Rocks tutorial",
+ "href": "http://www.html5rocks.com/en/tutorials/pagevisibility/intro/"
+ }],
+ "polyfills": ["visibilityjs", "visiblyjs", "jquery-visibility"]
+}
+!*/
+/* DOC
+Detects support for the Page Visibility API, which can be used to disable unnecessary actions and otherwise improve user experience.
+*/
+
+ Modernizr.addTest('pagevisibility', !!prefixed('hidden', document, false));
+
+/*!
+{
+ "name": "Navigation Timing API",
+ "property": "performance",
+ "caniuse": "nav-timing",
+ "tags": ["performance"],
+ "authors": ["Scott Murphy (@uxder)"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/navigation-timing/"
+ },{
+ "name": "HTML5 Rocks article",
+ "href": "http://www.html5rocks.com/en/tutorials/webperformance/basics/"
+ }],
+ "polyfills": ["perfnow"]
+}
+!*/
+/* DOC
+Detects support for the Navigation Timing API, for measuring browser and connection performance.
+*/
+
+ Modernizr.addTest('performance', !!prefixed('performance', window));
+
+/*!
+{
+ "name": "DOM Pointer Events API",
+ "property": "pointerevents",
+ "tags": ["input"],
+ "authors": ["Stu Cox"],
+ "notes": [
+ {
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/pointerevents/"
+ }
+ ],
+ "warnings": ["This property name now refers to W3C DOM PointerEvents: https://github.com/Modernizr/Modernizr/issues/548#issuecomment-12812099"],
+ "polyfills": ["handjs"]
+}
+!*/
+/* DOC
+Detects support for the DOM Pointer Events API, which provides a unified event interface for pointing input devices, as implemented in IE10+.
+*/
+
+ // **Test name hijacked!**
+ // Now refers to W3C DOM PointerEvents spec rather than the CSS pointer-events property.
+ Modernizr.addTest('pointerevents', function() {
+ // Cannot use `.prefixed()` for events, so test each prefix
+ var bool = false,
+ i = domPrefixes.length;
+
+ // Don't forget un-prefixed...
+ bool = Modernizr.hasEvent('pointerdown');
+
+ while (i-- && !bool) {
+ if (hasEvent(domPrefixes[i] + 'pointerdown')) {
+ bool = true;
+ }
+ }
+ return bool;
+ });
+
+/*!
+{
+ "name": "Pointer Lock API",
+ "property": "pointerlock",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API"
+ }],
+ "builderAliases": ["pointerlock_api"]
+}
+!*/
+/* DOC
+Detects support the pointer lock API which allows you to lock the mouse cursor to the browser window.
+*/
+
+ // https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API
+ Modernizr.addTest('pointerlock', !!prefixed('exitPointerLock', document));
+
+/*!
+{
+ "name": "postMessage",
+ "property": "postmessage",
+ "caniuse": "x-doc-messaging",
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/html5/comms.html#posting-messages"
+ }],
+ "polyfills": ["easyxdm", "postmessage-jquery"]
+}
+!*/
+/* DOC
+Detects support for the `window.postMessage` protocol for cross-document messaging.
+*/
+
+ Modernizr.addTest('postmessage', 'postMessage' in window);
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "caniuse": "proximity",
+ "name": "Proximity API",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/API/Proximity_Events"
+ },{
+ "name": "W3C specification",
+ "href": "http://www.w3.org/TR/proximity/"
+ }],
+ "property": "proximity",
+ "tags": ["events", "proximity"]
+}
+!*/
+/* DOC
+Detects support for an API that allows users to get proximity related information from the device's proximity sensor.
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+
+ var timeout;
+ var timeoutTime = 300;
+
+ function advertiseSupport() {
+
+ // Clean up after ourselves
+ clearTimeout(timeout);
+ window.removeEventListener('deviceproximity', advertiseSupport);
+
+ // Advertise support as the browser supports
+ // the API and the device has a proximity sensor
+ addTest('proximity', true);
+
+ }
+
+ // Check if the browser has support for the API
+ if ('ondeviceproximity' in window && 'onuserproximity' in window) {
+
+ // Check if the device has a proximity sensor
+ // ( devices without such a sensor support the events but
+ // will never fire them resulting in a false positive )
+ window.addEventListener('deviceproximity', advertiseSupport);
+
+ // If the event doesn't fire in a reasonable amount of time,
+ // it means that the device doesn't have a proximity sensor,
+ // thus, we can advertise the "lack" of support
+ timeout = setTimeout(function() {
+ window.removeEventListener('deviceproximity', advertiseSupport);
+ addTest('proximity', false);
+ }, timeoutTime);
+
+ } else {
+ addTest('proximity', false);
+ }
+
+ });
+
+
+/*!
+{
+ "name": "QuerySelector",
+ "property": "queryselector",
+ "caniuse": "queryselector",
+ "tags": ["queryselector"],
+ "authors": ["Andrew Betts (@triblondon)"],
+ "notes": [{
+ "name" : "W3C Selectors reference",
+ "href": "http://www.w3.org/TR/selectors-api/#queryselectorall"
+ }],
+ "polyfills": ["css-selector-engine"]
+}
+!*/
+/* DOC
+Detects support for querySelector.
+*/
+
+ Modernizr.addTest('queryselector', 'querySelector' in document && 'querySelectorAll' in document);
+
+/*!
+{
+ "name": "Quota Storage Management API",
+ "property": "quotamanagement",
+ "tags": ["storage"],
+ "builderAliases": ["quota_management_api"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/quota-api/"
+ }]
+}
+!*/
+/* DOC
+Detects the ability to request a specific amount of space for filesystem access
+*/
+
+ Modernizr.addTest('quotamanagement', function() {
+ var tempStorage = prefixed('temporaryStorage', navigator);
+ var persStorage = prefixed('persistentStorage', navigator);
+
+ return !!(tempStorage && persStorage);
+ });
+
+/*!
+{
+ "name": "requestAnimationFrame",
+ "property": "requestanimationframe",
+ "aliases": ["raf"],
+ "caniuse": "requestanimationframe",
+ "tags": ["animation"],
+ "authors": ["Addy Osmani"],
+ "notes": [{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/animation-timing/"
+ }],
+ "polyfills": ["raf"]
+}
+!*/
+/* DOC
+Detects support for the `window.requestAnimationFrame` API, for offloading animation repainting to the browser for optimized performance.
+*/
+
+ Modernizr.addTest('requestanimationframe', !!prefixed('requestAnimationFrame', window), {aliases: ['raf']});
+
+/*!
+{
+ "name": "script[async]",
+ "property": "scriptasync",
+ "caniuse": "script-async",
+ "tags": ["script"],
+ "builderAliases": ["script_async"],
+ "authors": ["Theodoor van Donge"]
+}
+!*/
+/* DOC
+Detects support for the `async` attribute on the `<script>` element.
+*/
+
+ Modernizr.addTest('scriptasync', 'async' in createElement('script'));
+
+/*!
+{
+ "name": "script[defer]",
+ "property": "scriptdefer",
+ "caniuse": "script-defer",
+ "tags": ["script"],
+ "builderAliases": ["script_defer"],
+ "authors": ["Theodoor van Donge"],
+ "warnings": ["Browser implementation of the `defer` attribute vary: http://stackoverflow.com/questions/3952009/defer-attribute-chrome#answer-3982619"],
+ "knownBugs": ["False positive in Opera 12"]
+}
+!*/
+/* DOC
+Detects support for the `defer` attribute on the `<script>` element.
+*/
+
+ Modernizr.addTest('scriptdefer', 'defer' in createElement('script'));
+
+/*!
+{
+ "name": "ServiceWorker API",
+ "property": "serviceworker",
+ "notes": [{
+ "name": "ServiceWorkers Explained",
+ "href": "https://github.com/slightlyoff/ServiceWorker/blob/master/explainer.md"
+ }]
+}
+!*/
+/* DOC
+ServiceWorkers (formerly Navigation Controllers) are a way to persistently cache resources to built apps that work better offline.
+*/
+
+ Modernizr.addTest('serviceworker', 'serviceWorker' in navigator);
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "name": "Speech Recognition API",
+ "notes": [
+ {
+ "name": "W3C Web Speech API Specification - The SpeechRecognition Interface",
+ "href": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-section"
+ },
+ {
+ "name": "Introduction to the Web Speech API",
+ "href": "http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API"
+ }
+ ],
+ "property": "speechrecognition",
+ "tags": ["input", "speech"]
+}
+!*/
+
+
+ Modernizr.addTest('speechrecognition', !!prefixed('SpeechRecognition', window));
+
+/*!
+{
+ "authors": ["Cătălin Mariș"],
+ "name": "Speech Synthesis API",
+ "notes": [
+ {
+ "name": "W3C Web Speech API Specification - The SpeechSynthesis Interface",
+ "href": "https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#tts-section"
+ }
+ ],
+ "property": "speechsynthesis",
+ "tags": ["input", "speech"]
+}
+!*/
+
+
+ Modernizr.addTest('speechsynthesis', 'SpeechSynthesisUtterance' in window);
+
+/*!
+{
+ "name": "Local Storage",
+ "property": "localstorage",
+ "caniuse": "namevalue-storage",
+ "tags": ["storage"],
+ "knownBugs": [],
+ "notes": [],
+ "warnings": [],
+ "polyfills": [
+ "joshuabell-polyfill",
+ "cupcake",
+ "storagepolyfill",
+ "amplifyjs",
+ "yui-cacheoffline"
+ ]
+}
+!*/
+
+ // In FF4, if disabled, window.localStorage should === null.
+
+ // Normally, we could not test that directly and need to do a
+ // `('localStorage' in window) && ` test first because otherwise Firefox will
+ // throw bugzil.la/365772 if cookies are disabled
+
+ // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
+ // will throw the exception:
+ // QUOTA_EXCEEDED_ERROR DOM Exception 22.
+ // Peculiarly, getItem and removeItem calls do not throw.
+
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+
+ Modernizr.addTest('localstorage', function() {
+ var mod = 'modernizr';
+ try {
+ localStorage.setItem(mod, mod);
+ localStorage.removeItem(mod);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Session Storage",
+ "property": "sessionstorage",
+ "tags": ["storage"],
+ "polyfills": ["joshuabell-polyfill", "cupcake", "sessionstorage"]
+}
+!*/
+
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+ Modernizr.addTest('sessionstorage', function() {
+ var mod = 'modernizr';
+ try {
+ sessionStorage.setItem(mod, mod);
+ sessionStorage.removeItem(mod);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "Web SQL Database",
+ "property": "websqldatabase",
+ "caniuse": "sql-storage",
+ "tags": ["storage"]
+}
+!*/
+
+ // Chrome incognito mode used to throw an exception when using openDatabase
+ // It doesn't anymore.
+ Modernizr.addTest('websqldatabase', 'openDatabase' in window);
+
+/*!
+{
+ "name": "style[scoped]",
+ "property": "stylescoped",
+ "caniuse": "style-scoped",
+ "tags": ["dom"],
+ "builderAliases": ["style_scoped"],
+ "authors": ["Cătălin Mariș"],
+ "notes": [{
+ "name": "WHATWG Specification",
+ "href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#attr-style-scoped"
+ }],
+ "polyfills": ["scoped-styles"]
+}
+!*/
+/* DOC
+Support for the `scoped` attribute of the `<style>` element.
+*/
+
+ Modernizr.addTest('stylescoped', 'scoped' in createElement('style'));
+
+/*!
+{
+ "name": "SVG",
+ "property": "svg",
+ "caniuse": "svg",
+ "tags": ["svg"],
+ "authors": ["Erik Dahlstrom"],
+ "polyfills": [
+ "svgweb",
+ "raphael",
+ "amplesdk",
+ "canvg",
+ "svg-boilerplate",
+ "sie",
+ "dojogfx",
+ "fabricjs"
+ ]
+}
+!*/
+/* DOC
+Detects support for SVG in `<embed>` or `<object>` elements.
+*/
+
+ Modernizr.addTest('svg', !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect);
+
+/*!
+{
+ "name": "SVG as an <img> tag source",
+ "property": "svgasimg",
+ "caniuse" : "svg-img",
+ "tags": ["svg"],
+ "authors": ["Chris Coyier"],
+ "notes": [{
+ "name": "HTML5 Spec",
+ "href": "http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element"
+ }]
+}
+!*/
+
+
+ // Original Async test by Stu Cox
+ // https://gist.github.com/chriscoyier/8774501
+
+ // Now a Sync test based on good results here
+ // http://codepen.io/chriscoyier/pen/bADFx
+
+ // Note http://www.w3.org/TR/SVG11/feature#Image is *supposed* to represent
+ // support for the `<image>` tag in SVG, not an SVG file linked from an `<img>`
+ // tag in HTML – but it’s a heuristic which works
+ Modernizr.addTest('svgasimg', document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'));
+
+
+ /**
+ * Object.prototype.toString can be used with every object and allows you to
+ * get its class easily. Abstracting it off of an object prevents situations
+ * where the toString property has been overridden
+ *
+ * @access private
+ * @function toStringFn
+ * @returns {function} An abstracted toString function
+ */
+
+ var toStringFn = ({}).toString;
+
+/*!
+{
+ "name": "SVG clip paths",
+ "property": "svgclippaths",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "Demo",
+ "href": "http://srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg"
+ }]
+}
+!*/
+/* DOC
+Detects support for clip paths in SVG (only, not on HTML content).
+
+See [this discussion](http://github.com/Modernizr/Modernizr/issues/213) regarding applying SVG clip paths to HTML content.
+*/
+
+ Modernizr.addTest('svgclippaths', function() {
+ return !!document.createElementNS &&
+ /SVGClipPath/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'clipPath')));
+ });
+
+/*!
+{
+ "name": "SVG filters",
+ "property": "svgfilters",
+ "caniuse": "svg-filters",
+ "tags": ["svg"],
+ "builderAliases": ["svg_filters"],
+ "authors": ["Erik Dahlstrom"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/SVG11/filters.html"
+ }]
+}
+!*/
+
+ // Should fail in Safari: http://stackoverflow.com/questions/9739955/feature-detecting-support-for-svg-filters.
+ Modernizr.addTest('svgfilters', function() {
+ var result = false;
+ try {
+ result = 'SVGFEColorMatrixElement' in window &&
+ SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE == 2;
+ }
+ catch (e) {}
+ return result;
+ });
+
+/*!
+{
+ "name": "SVG foreignObject",
+ "property": "svgforeignobject",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "W3C Spec",
+ "href": "http://www.w3.org/TR/SVG11/extend.html"
+ }]
+}
+!*/
+/* DOC
+Detects support for foreignObject tag in SVG.
+*/
+
+ Modernizr.addTest('svgforeignobject', function() {
+ return !!document.createElementNS &&
+ /SVGForeignObject/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject')));
+ });
+
+/*!
+{
+ "name": "Inline SVG",
+ "property": "inlinesvg",
+ "caniuse": "svg-html5",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "Test page",
+ "href": "http://paulirish.com/demo/inline-svg"
+ }, {
+ "name": "Test page and results",
+ "href": "http://codepen.io/eltonmesquita/full/GgXbvo/"
+ }],
+ "polyfills": ["inline-svg-polyfill"],
+ "knownBugs": ["False negative on some Chromia browsers."]
+}
+!*/
+/* DOC
+Detects support for inline SVG in HTML (not within XHTML).
+*/
+
+ Modernizr.addTest('inlinesvg', function() {
+ var div = createElement('div');
+ div.innerHTML = '<svg/>';
+ return (typeof SVGRect != 'undefined' && div.firstChild && div.firstChild.namespaceURI) == 'http://www.w3.org/2000/svg';
+ });
+
+/*!
+{
+ "name": "SVG SMIL animation",
+ "property": "smil",
+ "caniuse": "svg-smil",
+ "tags": ["svg"],
+ "notes": [{
+ "name": "W3C Synchronised Multimedia spec",
+ "href": "http://www.w3.org/AudioVideo/"
+ }]
+}
+!*/
+
+ // SVG SMIL animation
+ Modernizr.addTest('smil', function() {
+ return !!document.createElementNS &&
+ /SVGAnimate/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'animate')));
+ });
+
+/*!
+{
+ "name": "Template strings",
+ "property": "templatestrings",
+ "notes": [{
+ "name": "MDN Reference",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings#Browser_compatibility"
+ }]
+}
+!*/
+/* DOC
+Template strings are string literals allowing embedded expressions.
+*/
+
+ Modernizr.addTest('templatestrings', function() {
+ var supports;
+ try {
+ // A number of tools, including uglifyjs and require, break on a raw "`", so
+ // use an eval to get around that.
+ eval('``');
+ supports = true;
+ } catch (e) {}
+ return !!supports;
+ });
+
+/*!
+{
+ "name": "textarea maxlength",
+ "property": "textareamaxlength",
+ "aliases": ["textarea-maxlength"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea"
+ }],
+ "polyfills": [
+ "maxlength"
+ ]
+}
+!*/
+/* DOC
+Detect support for the maxlength attribute of a textarea element
+*/
+
+ Modernizr.addTest('textareamaxlength', !!('maxLength' in createElement('textarea')));
+
+/*!
+{
+ "name": "Touch Events",
+ "property": "touchevents",
+ "caniuse" : "touch",
+ "tags": ["media", "attribute"],
+ "notes": [{
+ "name": "Touch Events spec",
+ "href": "http://www.w3.org/TR/2013/WD-touch-events-20130124/"
+ }],
+ "warnings": [
+ "Indicates if the browser supports the Touch Events spec, and does not necessarily reflect a touchscreen device"
+ ],
+ "knownBugs": [
+ "False-positive on some configurations of Nokia N900",
+ "False-positive on some BlackBerry 6.0 builds – https://github.com/Modernizr/Modernizr/issues/372#issuecomment-3112695"
+ ]
+}
+!*/
+/* DOC
+Indicates if the browser supports the W3C Touch Events API.
+
+This *does not* necessarily reflect a touchscreen device:
+
+* Older touchscreen devices only emulate mouse events
+* Modern IE touch devices implement the Pointer Events API instead: use `Modernizr.pointerevents` to detect support for that
+* Some browsers & OS setups may enable touch APIs when no touchscreen is connected
+* Future browsers may implement other event models for touch interactions
+
+See this article: [You Can't Detect A Touchscreen](http://www.stucox.com/blog/you-cant-detect-a-touchscreen/).
+
+It's recommended to bind both mouse and touch/pointer events simultaneously – see [this HTML5 Rocks tutorial](http://www.html5rocks.com/en/mobile/touchandmouse/).
+
+This test will also return `true` for Firefox 4 Multitouch support.
+*/
+
+ // Chrome (desktop) used to lie about its support on this, but that has since been rectified: http://crbug.com/36415
+ Modernizr.addTest('touchevents', function() {
+ var bool;
+ if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
+ bool = true;
+ } else {
+ var query = ['@media (', prefixes.join('touch-enabled),('), 'heartz', ')', '{#modernizr{top:9px;position:absolute}}'].join('');
+ testStyles(query, function(node) {
+ bool = node.offsetTop === 9;
+ });
+ }
+ return bool;
+ });
+
+/*!
+{
+ "name": "Typed arrays",
+ "property": "typedarrays",
+ "caniuse": "typedarrays",
+ "tags": ["js"],
+ "authors": ["Stanley Stuart (@fivetanley)"],
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/JavaScript_typed_arrays"
+ },{
+ "name": "Kronos spec",
+ "href": "http://www.khronos.org/registry/typedarray/specs/latest/"
+ }],
+ "polyfills": ["joshuabell-polyfill"]
+}
+!*/
+/* DOC
+Detects support for native binary data manipulation via Typed Arrays in JavaScript.
+
+Does not check for DataView support; use `Modernizr.dataview` for that.
+*/
+
+ // Should fail in:
+ // Internet Explorer <= 9
+ // Firefox <= 3.6
+ // Chrome <= 6.0
+ // iOS Safari < 4.2
+ // Safari < 5.1
+ // Opera < 11.6
+ // Opera Mini, <= 7.0
+ // Android Browser < 4.0
+ // Blackberry Browser < 10.0
+
+ Modernizr.addTest('typedarrays', 'ArrayBuffer' in window);
+
+/*!
+{
+ "name": "Unicode characters",
+ "property": "unicode",
+ "tags": ["encoding"],
+ "warnings": [
+ "positive Unicode support doesn't mean you can use it inside <title>, this seems more related to OS & Language packs"
+ ]
+}
+!*/
+/* DOC
+Detects if unicode characters are supported in the current document.
+*/
+
+ /**
+ * Unicode special character support
+ *
+ * Detection is made by testing missing glyph box rendering against star character
+ * If widths are the same, this "probably" means the browser didn't support the star character and rendered a glyph box instead
+ * Just need to ensure the font characters have different widths
+ */
+ Modernizr.addTest('unicode', function() {
+ var bool;
+ var missingGlyph = createElement('span');
+ var star = createElement('span');
+
+ testStyles('#modernizr{font-family:Arial,sans;font-size:300em;}', function(node) {
+
+ missingGlyph.innerHTML = isSVG ? '\u5987' : 'ᝣ';
+ star.innerHTML = isSVG ? '\u2606' : '☆';
+
+ node.appendChild(missingGlyph);
+ node.appendChild(star);
+
+ bool = 'offsetWidth' in missingGlyph && missingGlyph.offsetWidth !== star.offsetWidth;
+ });
+
+ return bool;
+
+ });
+
+/*!
+{
+ "name": "Unicode Range",
+ "property": "unicoderange",
+ "notes": [{
+ "name" : "W3C reference",
+ "href": "http://www.w3.org/TR/2013/CR-css-fonts-3-20131003/#descdef-unicode-range"
+ }, {
+ "name" : "24 Way article",
+ "href": "http://24ways.org/2011/creating-custom-font-stacks-with-unicode-range"
+ }]
+}
+!*/
+
+ Modernizr.addTest('unicoderange', function() {
+
+ return Modernizr.testStyles('@font-face{font-family:"unicodeRange";src:local("Arial");unicode-range:U+0020,U+002E}#modernizr span{font-size:20px;display:inline-block;font-family:"unicodeRange",monospace}#modernizr .mono{font-family:monospace}', function(elem) {
+
+ // we use specify a unicode-range of 002E (the `.` glyph,
+ // and a monospace font as the fallback. If the first of
+ // these test glyphs is a different width than the other
+ // the other three (which are all monospace), then we
+ // have a winner.
+ var testGlyphs = ['.', '.', 'm', 'm'];
+
+ for (var i = 0; i < testGlyphs.length; i++) {
+ var elm = createElement('span');
+ elm.innerHTML = testGlyphs[i];
+ elm.className = i % 2 ? 'mono' : '';
+ elem.appendChild(elm);
+ testGlyphs[i] = elm.clientWidth;
+ }
+
+ return (testGlyphs[0] !== testGlyphs[1] && testGlyphs[2] === testGlyphs[3]);
+ });
+ });
+
+/*!
+{
+ "name": "Blob URLs",
+ "property": "bloburls",
+ "caniuse": "bloburls",
+ "notes": [{
+ "name": "W3C Working Draft",
+ "href": "http://www.w3.org/TR/FileAPI/#creating-revoking"
+ }],
+ "tags": ["file", "url"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"]
+}
+!*/
+/* DOC
+Detects support for creating Blob URLs
+*/
+
+ var url = prefixed('URL', window, false);
+ url = url && window[url];
+ Modernizr.addTest('bloburls', url && 'revokeObjectURL' in url && 'createObjectURL' in url);
+
+/*!
+{
+ "name": "Data URI",
+ "property": "datauri",
+ "caniuse": "datauri",
+ "tags": ["url"],
+ "builderAliases": ["url_data_uri"],
+ "async": true,
+ "notes": [{
+ "name": "Wikipedia article",
+ "href": "http://en.wikipedia.org/wiki/Data_URI_scheme"
+ }],
+ "warnings": ["Support in Internet Explorer 8 is limited to images and linked resources like CSS files, not HTML files"]
+}
+!*/
+/* DOC
+Detects support for data URIs. Provides a subproperty to report support for data URIs over 32kb in size:
+
+```javascript
+Modernizr.datauri // true
+Modernizr.datauri.over32kb // false in IE8
+```
+*/
+
+ // https://github.com/Modernizr/Modernizr/issues/14
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ // IE7 throw a mixed content warning on HTTPS for this test, so we'll
+ // just blacklist it (we know it doesn't support data URIs anyway)
+ // https://github.com/Modernizr/Modernizr/issues/362
+ if (navigator.userAgent.indexOf('MSIE 7.') !== -1) {
+ // Keep the test async
+ setTimeout(function() {
+ addTest('datauri', false);
+ }, 10);
+ }
+
+ var datauri = new Image();
+
+ datauri.onerror = function() {
+ addTest('datauri', false);
+ };
+ datauri.onload = function() {
+ if (datauri.width == 1 && datauri.height == 1) {
+ testOver32kb();
+ }
+ else {
+ addTest('datauri', false);
+ }
+ };
+
+ datauri.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
+
+ // Once we have datauri, let's check to see if we can use data URIs over
+ // 32kb (IE8 can't). https://github.com/Modernizr/Modernizr/issues/321
+ function testOver32kb() {
+
+ var datauriBig = new Image();
+
+ datauriBig.onerror = function() {
+ addTest('datauri', true);
+ Modernizr.datauri = new Boolean(true);
+ Modernizr.datauri.over32kb = false;
+ };
+ datauriBig.onload = function() {
+ addTest('datauri', true);
+ Modernizr.datauri = new Boolean(true);
+ Modernizr.datauri.over32kb = (datauriBig.width == 1 && datauriBig.height == 1);
+ };
+
+ var base64str = 'R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
+ while (base64str.length < 33000) {
+ base64str = '\r\n' + base64str;
+ }
+ datauriBig.src = 'data:image/gif;base64,' + base64str;
+ }
+
+ });
+
+/*!
+{
+ "name": "URL parser",
+ "property": "urlparser",
+ "notes": [{
+ "name": "URL",
+ "href": "https://dvcs.w3.org/hg/url/raw-file/tip/Overview.html"
+ }],
+ "polyfills": ["urlparser"],
+ "authors": ["Ron Waldon (@jokeyrhyme)"],
+ "tags": ["url"]
+}
+!*/
+/* DOC
+Check if browser implements the URL constructor for parsing URLs.
+*/
+
+ Modernizr.addTest('urlparser', function() {
+ var url;
+ try {
+ // have to actually try use it, because Safari defines a dud constructor
+ url = new URL('http://modernizr.com/');
+ return url.href === 'http://modernizr.com/';
+ } catch (e) {
+ return false;
+ }
+ });
+
+/*!
+{
+ "name": "IE User Data API",
+ "property": "userdata",
+ "tags": ["storage"],
+ "authors": ["@stereobooster"],
+ "notes": [{
+ "name": "MSDN Documentation",
+ "href": "http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx"
+ }]
+}
+!*/
+/* DOC
+Detects support for IE userData for persisting data, an API similar to localStorage but supported since IE5.
+*/
+
+ Modernizr.addTest('userdata', !!createElement('div').addBehavior);
+
+/*!
+{
+ "name": "Vibration API",
+ "property": "vibrate",
+ "notes": [{
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozVibrate"
+ },{
+ "name": "W3C spec",
+ "href": "http://www.w3.org/TR/vibration/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the API that provides access to the vibration mechanism of the hosting device, to provide tactile feedback.
+*/
+
+ Modernizr.addTest('vibrate', !!prefixed('vibrate', navigator));
+
+/*!
+{
+ "name": "HTML5 Video",
+ "property": "video",
+ "caniuse": "video",
+ "tags": ["html5"],
+ "knownBugs": [
+ "Without QuickTime, `Modernizr.video.h264` will be `undefined`; http://github.com/Modernizr/Modernizr/issues/546"
+ ],
+ "polyfills": [
+ "html5media",
+ "mediaelementjs",
+ "sublimevideo",
+ "videojs",
+ "leanbackplayer",
+ "videoforeverybody"
+ ]
+}
+!*/
+/* DOC
+Detects support for the video element, as well as testing what types of content it supports.
+
+Subproperties are provided to describe support for `ogg`, `h264` and `webm` formats, e.g.:
+
+```javascript
+Modernizr.video // true
+Modernizr.video.ogg // 'probably'
+```
+*/
+
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+
+ Modernizr.addTest('video', function() {
+ /* jshint -W053 */
+ var elem = createElement('video');
+ var bool = false;
+
+ // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
+ try {
+ if (bool = !!elem.canPlayType) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, '');
+
+ // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
+ bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, '');
+
+ bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, '');
+
+ bool.vp9 = elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, '');
+
+ bool.hls = elem.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, '');
+ }
+ } catch (e) {}
+
+ return bool;
+ });
+
+/*!
+{
+ "name": "Video Autoplay",
+ "property": "videoautoplay",
+ "tags": ["video"],
+ "async" : true,
+ "warnings": ["This test is very large – only include it if you absolutely need it"],
+ "knownBugs": ["crashes with an alert on iOS7 when added to homescreen"]
+}
+!*/
+/* DOC
+Checks for support of the autoplay attribute of the video element.
+*/
+
+
+ Modernizr.addAsyncTest(function() {
+ var timeout;
+ var waitTime = 300;
+ var elem = createElement('video');
+ var elemStyle = elem.style;
+
+ function testAutoplay(arg) {
+ clearTimeout(timeout);
+ elem.removeEventListener('playing', testAutoplay, false);
+ addTest('videoautoplay', arg && arg.type === 'playing' || elem.currentTime !== 0);
+ elem.parentNode.removeChild(elem);
+ }
+
+ //skip the test if video itself, or the autoplay
+ //element on it isn't supported
+ if (!Modernizr.video || !('autoplay' in elem)) {
+ addTest('videoautoplay', false);
+ return;
+ }
+
+ elemStyle.position = 'absolute';
+ elemStyle.height = 0;
+ elemStyle.width = 0;
+
+ try {
+ if (Mod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BpbnRyYV9yZWZyZXNoPTAgcmM9Y3FwIG1idHJlZT0wIHFwPTAAgAAAAD5liISscR8A+E4ACAACFoAAITAAAgsAAPgYCoKgoC+L4vi+KAvi+L4YfAEAACMzgABF9AAEUGUgABDJiXnf4AAAAARBmiKUAAAABEGaQpQAAAAEQZpilAAAAARBmoKU';
+ }
+ else {
+ addTest('videoautoplay', false);
+ return;
+ }
+ }
+
+ catch (e) {
+ addTest('videoautoplay', false);
+ return;
+ }
+
+ elem.setAttribute('autoplay', '');
+ elem.style.cssText = 'display:none';
+ docElement.appendChild(elem);
+ // wait for the next tick to add the listener, otherwise the element may
+ // not have time to play in high load situations (e.g. the test suite)
+ setTimeout(function() {
+ elem.addEventListener('playing', testAutoplay, false);
+ timeout = setTimeout(testAutoplay, waitTime);
+ }, 0);
+ });
+
+/*!
+{
+ "name": "Video Loop Attribute",
+ "property": "videoloop",
+ "tags": ["video", "media"]
+}
+!*/
+
+ Modernizr.addTest('videoloop', 'loop' in createElement('video'));
+
+/*!
+{
+ "name": "Video Preload Attribute",
+ "property": "videopreload",
+ "tags": ["video", "media"]
+}
+!*/
+
+ Modernizr.addTest('videopreload', 'preload' in createElement('video'));
+
+/*!
+{
+ "name": "VML",
+ "property": "vml",
+ "caniuse": "vml",
+ "tags": ["vml"],
+ "authors": ["Craig Andrews (@candrews)"],
+ "notes": [{
+ "name" : "W3C VML reference",
+ "href": "http://www.w3.org/TR/NOTE-VML"
+ },{
+ "name" : "Microsoft VML reference",
+ "href": "http://msdn.microsoft.com/en-us/library/bb263898%28VS.85%29.aspx"
+ }]
+}
+!*/
+/* DOC
+Detects support for VML.
+*/
+
+ Modernizr.addTest('vml', function() {
+ var containerDiv = createElement('div');
+ var supports = false;
+ var shape;
+
+ if (!isSVG) {
+ containerDiv.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
+ shape = containerDiv.firstChild;
+ shape.style.behavior = 'url(#default#VML)';
+ supports = shape ? typeof shape.adj == 'object' : true;
+ }
+
+ return supports;
+ });
+
+/*!
+{
+ "name": "Web Intents",
+ "property": "webintents",
+ "authors": ["Eric Bidelman"],
+ "notes": [{
+ "name": "Web Intents project site",
+ "href": "http://webintents.org/"
+ }],
+ "polyfills": ["webintents"],
+ "builderAliases": ["web_intents"]
+}
+!*/
+/* DOC
+Detects native support for the Web Intents APIs for service discovery and inter-application communication.
+
+Chrome added support for this in v19, but [removed it again in v24](http://lists.w3.org/Archives/Public/public-web-intents/2012Nov/0000.html) because of "a number of areas for
+development in both the API and specific user experience in Chrome". No other browsers currently support it, however a [JavaScript shim](http://webintents.org/#javascriptshim) is available.
+*/
+
+ Modernizr.addTest('webintents', !!prefixed('startActivity', navigator));
+
+/*!
+{
+ "name": "Web Animation API",
+ "property": "animation",
+ "tags": ["webanimations"],
+ "polyfills": ["webanimationsjs"],
+ "notes": [{
+ "name": "Introducing Web Animations",
+ "href": "http://brian.sol1.net/svg/2013/06/26/introducing-web-animations/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the Web Animation API, a way to create css animations in js
+*/
+
+ Modernizr.addTest('webanimations', 'animate' in createElement('div'));
+
+/*!
+{
+ "name": "WebGL",
+ "property": "webgl",
+ "caniuse": "webgl",
+ "tags": ["webgl", "graphics"],
+ "polyfills": ["jebgl", "cwebgl", "iewebgl"]
+}
+!*/
+
+ Modernizr.addTest('webgl', function() {
+ var canvas = createElement('canvas');
+ var supports = 'probablySupportsContext' in canvas ? 'probablySupportsContext' : 'supportsContext';
+ if (supports in canvas) {
+ return canvas[supports]('webgl') || canvas[supports]('experimental-webgl');
+ }
+ return 'WebGLRenderingContext' in window;
+ });
+
+/*!
+{
+ "name": "WebGL Extensions",
+ "property": "webglextensions",
+ "tags": ["webgl", "graphics"],
+ "builderAliases": ["webgl_extensions"],
+ "async" : true,
+ "authors": ["Ilmari Heikkinen"],
+ "knownBugs": [],
+ "notes": [{
+ "name": "Kronos extensions registry",
+ "href": "http://www.khronos.org/registry/webgl/extensions/"
+ }]
+}
+!*/
+/* DOC
+Detects support for OpenGL extensions in WebGL. It's `true` if the [WebGL extensions API](https://developer.mozilla.org/en-US/docs/Web/WebGL/Using_Extensions) is supported, then exposes the supported extensions as subproperties, e.g.:
+
+```javascript
+if (Modernizr.webglextensions) {
+ // WebGL extensions API supported
+}
+if ('OES_vertex_array_object' in Modernizr.webglextensions) {
+ // Vertex Array Objects extension supported
+}
+```
+*/
+
+ // based on code from ilmari heikkinen
+ // code.google.com/p/graphics-detect/source/browse/js/detect.js
+
+ // Not Async but handles it's own self
+ Modernizr.addAsyncTest(function() {
+ /* jshint -W053 */
+
+ // Not a good candidate for css classes, so we avoid addTest stuff
+ Modernizr.webglextensions = new Boolean(false);
+
+ if (!Modernizr.webgl) {
+ return;
+ }
+
+ var canvas;
+ var ctx;
+ var exts;
+
+ try {
+ canvas = createElement('canvas');
+ ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
+ exts = ctx.getSupportedExtensions();
+ }
+ catch (e) {
+ return;
+ }
+
+ if (ctx !== undefined) {
+ Modernizr.webglextensions = new Boolean(true);
+ }
+
+ for (var i = -1, len = exts.length; ++i < len;) {
+ Modernizr.webglextensions[exts[i]] = true;
+ }
+
+ canvas = undefined;
+ });
+
+/*!
+{
+ "name": "RTC Peer Connection",
+ "property": "peerconnection",
+ "tags": ["webrtc"],
+ "authors": ["Ankur Oberoi"],
+ "notes": [{
+ "name": "W3C Web RTC spec",
+ "href": "http://www.w3.org/TR/webrtc/"
+ }]
+}
+!*/
+
+ Modernizr.addTest('peerconnection', !!prefixed('RTCPeerConnection', window));
+
+/*!
+{
+ "name": "RTC Data Channel",
+ "property": "datachannel",
+ "notes": [{
+ "name": "HTML5 Rocks! Article",
+ "href": "http://www.html5rocks.com/en/tutorials/webrtc/datachannels/"
+ }]
+}
+!*/
+/* DOC
+Detect for the RTCDataChannel API that allows for transfer data directly from one peer to another
+*/
+
+
+ Modernizr.addTest('datachannel', function() {
+ if (!Modernizr.peerconnection) {
+ return false;
+ }
+ for (var i = 0, l = domPrefixes.length; i < l; i++) {
+ var peerConnectionConstructor = window[domPrefixes[i] + 'RTCPeerConnection'];
+
+ if (peerConnectionConstructor) {
+ var peerConnection = new peerConnectionConstructor({
+ 'iceServers': [{'url': 'stun:0'}]
+ });
+
+ return 'createDataChannel' in peerConnection;
+ }
+
+ }
+ return false;
+ });
+
+/*!
+{
+ "name": "getUserMedia",
+ "property": "getusermedia",
+ "caniuse": "stream",
+ "tags": ["webrtc"],
+ "authors": ["Eric Bidelman"],
+ "notes": [{
+ "name": "W3C Media Capture and Streams spec",
+ "href": "http://www.w3.org/TR/mediacapture-streams/"
+ }],
+ "polyfills": ["getusermedia"]
+}
+!*/
+
+ Modernizr.addTest('getusermedia', !!prefixed('getUserMedia', navigator));
+
+/*!
+{
+ "name": "WebSockets Support",
+ "property": "websockets",
+ "authors": ["Phread [fearphage]", "Mike Sherov [mikesherov]", "Burak Yigit Kaya [BYK]"],
+ "caniuse": "websockets",
+ "tags": ["html5"],
+ "warnings": [
+ "This test will reject any old version of WebSockets even if it is not prefixed such as in Safari 5.1"
+ ],
+ "notes": [{
+ "name": "CLOSING State and Spec",
+ "href": "http://www.w3.org/TR/websockets/#the-websocket-interface"
+ }],
+ "polyfills": [
+ "sockjs",
+ "socketio",
+ "kaazing-websocket-gateway",
+ "websocketjs",
+ "atmosphere",
+ "graceful-websocket",
+ "portal",
+ "datachannel"
+ ]
+}
+!*/
+
+ Modernizr.addTest('websockets', 'WebSocket' in window && window.WebSocket.CLOSING === 2);
+
+/*!
+{
+ "name": "Binary WebSockets",
+ "property": "websocketsbinary",
+ "tags": ["websockets"],
+ "builderAliases": ["websockets_binary"]
+}
+!*/
+
+ // binaryType is truthy if there is support.. returns "blob" in new-ish chrome.
+ // plus.google.com/115535723976198353696/posts/ERN6zYozENV
+ // github.com/Modernizr/Modernizr/issues/370
+
+ Modernizr.addTest('websocketsbinary', function() {
+ var protocol = 'https:' == location.protocol ? 'wss' : 'ws',
+ protoBin;
+
+ if ('WebSocket' in window) {
+ if (protoBin = 'binaryType' in WebSocket.prototype) {
+ return protoBin;
+ }
+ try {
+ return !!(new WebSocket(protocol + '://.').binaryType);
+ } catch (e) {}
+ }
+
+ return false;
+ });
+
+/*!
+{
+ "name": "Framed window",
+ "property": "framed",
+ "tags": ["window"],
+ "builderAliases": ["window_framed"]
+}
+!*/
+/* DOC
+Tests if page is iframed.
+*/
+
+ // github.com/Modernizr/Modernizr/issues/242
+
+ Modernizr.addTest('framed', window.location != top.location);
+
+/*!
+{
+ "name": "Workers from Blob URIs",
+ "property": "blobworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_blobworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }],
+ "knownBugs": ["This test may output garbage to console."],
+ "authors": ["Jussi Kalliokoski"],
+ "async": true
+}
+!*/
+/* DOC
+Detects support for creating Web Workers from Blob URIs.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ try {
+ // we're avoiding using Modernizr._domPrefixes as the prefix capitalization on
+ // these guys are notoriously peculiar.
+ var BlobBuilder = window.BlobBuilder;
+ var URL = window.URL;
+ if (Modernizr._config.usePrefix) {
+ BlobBuilder = BlobBuilder || window.MozBlobBuilder || window.WebKitBlobBuilder || window.MSBlobBuilder || window.OBlobBuilder;
+ URL = URL || window.MozURL || window.webkitURL || window.MSURL || window.OURL;
+ }
+ var data = 'Modernizr',
+ blob,
+ bb,
+ worker,
+ url,
+ timeout,
+ scriptText = 'this.onmessage=function(e){postMessage(e.data)}';
+
+ try {
+ blob = new Blob([scriptText], {type:'text/javascript'});
+ } catch (e) {
+ // we'll fall back to the deprecated BlobBuilder
+ }
+ if (!blob) {
+ bb = new BlobBuilder();
+ bb.append(scriptText);
+ blob = bb.getBlob();
+ }
+
+ url = URL.createObjectURL(blob);
+ worker = new Worker(url);
+
+ worker.onmessage = function(e) {
+ addTest('blobworkers', data === e.data);
+ cleanup();
+ };
+
+ // Just in case...
+ worker.onerror = fail;
+ timeout = setTimeout(fail, 200);
+
+ worker.postMessage(data);
+ } catch (e) {
+ fail();
+ }
+
+ function fail() {
+ addTest('blobworkers', false);
+ cleanup();
+ }
+
+ function cleanup() {
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ if (worker) {
+ worker.terminate();
+ }
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+ });
+
+/*!
+{
+ "name": "Workers from Data URIs",
+ "property": "dataworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_dataworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }],
+ "knownBugs": ["This test may output garbage to console."],
+ "authors": ["Jussi Kalliokoski"],
+ "async": true
+}
+!*/
+/* DOC
+Detects support for creating Web Workers from Data URIs.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ try {
+ var data = 'Modernizr',
+ worker = new Worker('data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=');
+
+ worker.onmessage = function(e) {
+ worker.terminate();
+ addTest('dataworkers', data === e.data);
+ worker = null;
+ };
+
+ // Just in case...
+ worker.onerror = function() {
+ addTest('dataworkers', false);
+ worker = null;
+ };
+
+ setTimeout(function() {
+ addTest('dataworkers', false);
+ }, 200);
+
+ worker.postMessage(data);
+ } catch (e) {
+ setTimeout(function() {
+ addTest('dataworkers', false);
+ }, 0);
+ }
+ });
+
+/*!
+{
+ "name": "Shared Workers",
+ "property": "sharedworkers",
+ "caniuse" : "sharedworkers",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["workers_sharedworkers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }]
+}
+!*/
+/* DOC
+Detects support for the `SharedWorker` API from the Web Workers spec.
+*/
+
+ Modernizr.addTest('sharedworkers', 'SharedWorker' in window);
+
+/*!
+{
+ "name": "Web Workers",
+ "property": "webworkers",
+ "caniuse" : "webworkers",
+ "tags": ["performance", "workers"],
+ "notes": [{
+ "name": "W3C Reference",
+ "href": "http://www.w3.org/TR/workers/"
+ }, {
+ "name": "HTML5 Rocks article",
+ "href": "http://www.html5rocks.com/en/tutorials/workers/basics/"
+ }, {
+ "name": "MDN documentation",
+ "href": "https://developer.mozilla.org/en-US/docs/Web/Guide/Performance/Using_web_workers"
+ }],
+ "polyfills": ["fakeworker", "html5shims"]
+}
+!*/
+/* DOC
+Detects support for the basic `Worker` API from the Web Workers spec. Web Workers provide a simple means for web content to run scripts in background threads.
+*/
+
+ Modernizr.addTest('webworkers', 'Worker' in window);
+
+/*!
+{
+ "name": "Transferables Objects",
+ "property": "transferables",
+ "tags": ["performance", "workers"],
+ "builderAliases": ["transferables"],
+ "notes": [{
+ "name": "HTML5 Rocks article",
+ "href": "http://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast"
+ }],
+ "async": true
+}
+!*/
+/* DOC
+Detects whether web workers can use `transferables` objects.
+*/
+
+ Modernizr.addAsyncTest(function() {
+ var prerequisites = !!(Modernizr.blobconstructor &&
+ Modernizr.bloburls &&
+ Modernizr.webworkers &&
+ Modernizr.typedarrays);
+
+ // Early exit
+ if (!prerequisites) {
+ return addTest('transferables', false);
+ }
+
+ // Proper test if prerequisites are met
+ try {
+ var buffer,
+ scriptText = 'var hello = "world"',
+ blob = new Blob([scriptText], {type: 'text/javascript'}),
+ url = URL.createObjectURL(blob),
+ worker = new Worker(url),
+ timeout;
+
+ // Just in case...
+ worker.onerror = fail;
+ timeout = setTimeout(fail, 200);
+
+ // Building an minimal array buffer to send to the worker
+ buffer = new ArrayBuffer(1);
+
+ // Sending the buffer to the worker
+ worker.postMessage(buffer, [buffer]);
+
+ // If length of buffer is now 0, transferables are working
+ addTest('transferables', buffer.byteLength === 0);
+ cleanup();
+ } catch (e) {
+ fail();
+ }
+
+ function fail() {
+ addTest('transferables', false);
+ cleanup();
+ }
+
+ function cleanup() {
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ if (worker) {
+ worker.terminate();
+ }
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+ });
+
+
+ // Run each test
+ testRunner();
+
+ // Remove the "no-js" class if it exists
+ setClasses(classes);
+
+ delete ModernizrProto.addTest;
+ delete ModernizrProto.addAsyncTest;
+
+ // Run the things that are supposed to run after the tests
+ for (var i = 0; i < Modernizr._q.length; i++) {
+ Modernizr._q[i]();
+ }
+
+ // Leak Modernizr namespace
+ window.Modernizr = Modernizr;
+
+
+;
+
+})(window, document);
\ No newline at end of file
--- /dev/null
+!function(window,document,undefined){function is(a,b){return typeof a===b}function testRunner(){var a,b,c,d,e,f,g;for(var h in tests){if(a=[],b=tests[h],b.name&&(a.push(b.name.toLowerCase()),b.options&&b.options.aliases&&b.options.aliases.length))for(c=0;c<b.options.aliases.length;c++)a.push(b.options.aliases[c].toLowerCase());for(d=is(b.fn,"function")?b.fn():b.fn,e=0;e<a.length;e++)f=a[e],g=f.split("."),1===g.length?Modernizr[g[0]]=d:(!Modernizr[g[0]]||Modernizr[g[0]]instanceof Boolean||(Modernizr[g[0]]=new Boolean(Modernizr[g[0]])),Modernizr[g[0]][g[1]]=d),classes.push((d?"":"no-")+g.join("-"))}}function setClasses(a){var b=docElement.className,c=Modernizr._config.classPrefix||"";if(isSVG&&(b=b.baseVal),Modernizr._config.enableJSClass){var d=new RegExp("(^|\\s)"+c+"no-js(\\s|$)");b=b.replace(d,"$1"+c+"js$2")}Modernizr._config.enableClasses&&(b+=" "+c+a.join(" "+c),isSVG?docElement.className.baseVal=b:docElement.className=b)}function addTest(a,b){if("object"==typeof a)for(var c in a)hasOwnProp(a,c)&&addTest(c,a[c]);else{a=a.toLowerCase();var d=a.split("."),e=Modernizr[d[0]];if(2==d.length&&(e=e[d[1]]),"undefined"!=typeof e)return Modernizr;b="function"==typeof b?b():b,1==d.length?Modernizr[d[0]]=b:(!Modernizr[d[0]]||Modernizr[d[0]]instanceof Boolean||(Modernizr[d[0]]=new Boolean(Modernizr[d[0]])),Modernizr[d[0]][d[1]]=b),setClasses([(b&&0!=b?"":"no-")+d.join("-")]),Modernizr._trigger(a,b)}return Modernizr}function createElement(){return"function"!=typeof document.createElement?document.createElement(arguments[0]):isSVG?document.createElementNS.call(document,"http://www.w3.org/2000/svg",arguments[0]):document.createElement.apply(document,arguments)}function getBody(){var a=document.body;return a||(a=createElement(isSVG?"svg":"body"),a.fake=!0),a}function injectElementWithStyles(a,b,c,d){var e,f,g,h,i="modernizr",j=createElement("div"),k=getBody();if(parseInt(c,10))for(;c--;)g=createElement("div"),g.id=d?d[c]:i+(c+1),j.appendChild(g);return e=createElement("style"),e.type="text/css",e.id="s"+i,(k.fake?k:j).appendChild(e),k.appendChild(j),e.styleSheet?e.styleSheet.cssText=a:e.appendChild(document.createTextNode(a)),j.id=i,k.fake&&(k.style.background="",k.style.overflow="hidden",h=docElement.style.overflow,docElement.style.overflow="hidden",docElement.appendChild(k)),f=b(j,a),k.fake?(k.parentNode.removeChild(k),docElement.style.overflow=h,docElement.offsetHeight):j.parentNode.removeChild(j),!!f}function contains(a,b){return!!~(""+a).indexOf(b)}function domToCSS(a){return a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()}).replace(/^ms-/,"-ms-")}function nativeTestProps(a,b){var c=a.length;if("CSS"in window&&"supports"in window.CSS){for(;c--;)if(window.CSS.supports(domToCSS(a[c]),b))return!0;return!1}if("CSSSupportsRule"in window){for(var d=[];c--;)d.push("("+domToCSS(a[c])+":"+b+")");return d=d.join(" or "),injectElementWithStyles("@supports ("+d+") { #modernizr { position: absolute; } }",function(a){return"absolute"==getComputedStyle(a,null).position})}return undefined}function cssToDOM(a){return a.replace(/([a-z])-([a-z])/g,function(a,b,c){return b+c.toUpperCase()}).replace(/^-/,"")}function testProps(a,b,c,d){function e(){g&&(delete mStyle.style,delete mStyle.modElem)}if(d=is(d,"undefined")?!1:d,!is(c,"undefined")){var f=nativeTestProps(a,c);if(!is(f,"undefined"))return f}for(var g,h,i,j,k,l=["modernizr","tspan"];!mStyle.style;)g=!0,mStyle.modElem=createElement(l.shift()),mStyle.style=mStyle.modElem.style;for(i=a.length,h=0;i>h;h++)if(j=a[h],k=mStyle.style[j],contains(j,"-")&&(j=cssToDOM(j)),mStyle.style[j]!==undefined){if(d||is(c,"undefined"))return e(),"pfx"==b?j:!0;try{mStyle.style[j]=c}catch(m){}if(mStyle.style[j]!=k)return e(),"pfx"==b?j:!0}return e(),!1}function fnBind(a,b){return function(){return a.apply(b,arguments)}}function testDOMProps(a,b,c){var d;for(var e in a)if(a[e]in b)return c===!1?a[e]:(d=b[a[e]],is(d,"function")?fnBind(d,c||b):d);return!1}function testPropsAll(a,b,c,d,e){var f=a.charAt(0).toUpperCase()+a.slice(1),g=(a+" "+cssomPrefixes.join(f+" ")+f).split(" ");return is(b,"string")||is(b,"undefined")?testProps(g,b,d,e):(g=(a+" "+domPrefixes.join(f+" ")+f).split(" "),testDOMProps(g,b,c))}function testAllProps(a,b,c){return testPropsAll(a,undefined,undefined,b,c)}function roundedEquals(a,b){return a-1===b||a===b||a+1===b}var tests=[],ModernizrProto={_version:"3.0.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(a,b){var c=this;setTimeout(function(){b(c[a])},0)},addTest:function(a,b,c){tests.push({name:a,fn:b,options:c})},addAsyncTest:function(a){tests.push({name:null,fn:a})}},Modernizr=function(){};Modernizr.prototype=ModernizrProto,Modernizr=new Modernizr;var classes=[],docElement=document.documentElement,isSVG="svg"===docElement.nodeName.toLowerCase(),hasOwnProp;!function(){var a={}.hasOwnProperty;hasOwnProp=is(a,"undefined")||is(a.call,"undefined")?function(a,b){return b in a&&is(a.constructor.prototype[b],"undefined")}:function(b,c){return a.call(b,c)}}(),ModernizrProto._l={},ModernizrProto.on=function(a,b){this._l[a]||(this._l[a]=[]),this._l[a].push(b),Modernizr.hasOwnProperty(a)&&setTimeout(function(){Modernizr._trigger(a,Modernizr[a])},0)},ModernizrProto._trigger=function(a,b){if(this._l[a]){var c=this._l[a];setTimeout(function(){var a,d;for(a=0;a<c.length;a++)(d=c[a])(b)},0),delete this._l[a]}},Modernizr._q.push(function(){ModernizrProto.addTest=addTest});var omPrefixes="Moz O ms Webkit",cssomPrefixes=ModernizrProto._config.usePrefixes?omPrefixes.split(" "):[];ModernizrProto._cssomPrefixes=cssomPrefixes;var atRule=function(a){var b,c=prefixes.length,d=window.CSSRule;if("undefined"==typeof d)return undefined;if(!a)return!1;if(a=a.replace(/^@/,""),b=a.replace(/-/g,"_").toUpperCase()+"_RULE",b in d)return"@"+a;for(var e=0;c>e;e++){var f=prefixes[e],g=f.toUpperCase()+"_"+b;if(g in d)return"@-"+f.toLowerCase()+"-"+a}return!1};ModernizrProto.atRule=atRule;var domPrefixes=ModernizrProto._config.usePrefixes?omPrefixes.toLowerCase().split(" "):[];ModernizrProto._domPrefixes=domPrefixes;var hasEvent=function(a){function b(b,d){var e;return b?(d&&"string"!=typeof d||(d=createElement(d||"div")),b="on"+b,e=b in d,!e&&c&&(d.setAttribute||(d=createElement("div")),d.setAttribute(b,""),e="function"==typeof d[b],d[b]!==a&&(d[b]=a),d.removeAttribute(b)),e):!1}var c=!("onblur"in document.documentElement);return b}();ModernizrProto.hasEvent=hasEvent;var html5;isSVG||!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.2",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b)}(this,document);var err=function(){},warn=function(){};window.console&&(err=function(){var a=console.error?"error":"log";window.console[a].apply(window.console,Array.prototype.slice.call(arguments))},warn=function(){var a=console.warn?"warn":"log";window.console[a].apply(window.console,Array.prototype.slice.call(arguments))}),ModernizrProto.load=function(){"yepnope"in window?(warn("yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.\n See http://github.com/Modernizr/Modernizr/issues/1182 for more information."),window.yepnope.apply(window,[].slice.call(arguments,0))):err("yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com. See http://github.com/Modernizr/Modernizr/issues/1182 for more information.")};var mq=function(){var a=window.matchMedia||window.msMatchMedia;return a?function(b){var c=a(b);return c&&c.matches||!1}:function(a){var b=!1;return injectElementWithStyles("@media "+a+" { #modernizr { position: absolute; } }",function(a){b="absolute"==(window.getComputedStyle?window.getComputedStyle(a,null):a.currentStyle).position}),b}}();ModernizrProto.mq=mq;var modElem={elem:createElement("modernizr")};Modernizr._q.push(function(){delete modElem.elem});var mStyle={style:modElem.elem.style};Modernizr._q.unshift(function(){delete mStyle.style}),ModernizrProto.testAllProps=testPropsAll;var prefixed=ModernizrProto.prefixed=function(a,b,c){return 0===a.indexOf("@")?atRule(a):(-1!=a.indexOf("-")&&(a=cssToDOM(a)),b?testPropsAll(a,b,c):testPropsAll(a,"pfx"))},prefixes=ModernizrProto._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[];ModernizrProto._prefixes=prefixes;var prefixedCSS=ModernizrProto.prefixedCSS=function(a){var b=prefixed(a);return b&&domToCSS(b)};ModernizrProto.testAllProps=testAllProps;var testProp=ModernizrProto.testProp=function(a,b,c){return testProps([a],undefined,b,c)},testStyles=ModernizrProto.testStyles=injectElementWithStyles;Modernizr.addTest("adownload",!window.externalHost&&"download"in createElement("a")),Modernizr.addTest("ambientlight",hasEvent("devicelight",window)),Modernizr.addTest("applicationcache","applicationCache"in window),Modernizr.addTest("audio",function(){var a=createElement("audio"),b=!1;try{(b=!!a.canPlayType)&&(b=new Boolean(b),b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),b.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),b.opus=a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),b.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),b.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(c){}return b}),Modernizr.addTest("audioloop","loop"in createElement("audio")),Modernizr.addTest("audiopreload","preload"in createElement("audio")),Modernizr.addTest("webaudio",function(){var a="webkitAudioContext"in window,b="AudioContext"in window;return Modernizr._config.usePrefixes?a||b:b}),Modernizr.addTest("batteryapi",!!prefixed("battery",navigator),{aliases:["battery-api"]}),Modernizr.addTest("lowbattery",function(){var a=.2,b=prefixed("battery",navigator);return!!(b&&!b.charging&&b.level<=a)}),Modernizr.addTest("blobconstructor",function(){try{return!!new Blob}catch(a){return!1}},{aliases:["blob-constructor"]}),Modernizr.addTest("canvas",function(){var a=createElement("canvas");return!(!a.getContext||!a.getContext("2d"))}),Modernizr.addTest("canvasblending",function(){if(Modernizr.canvas===!1)return!1;var a=createElement("canvas").getContext("2d");try{a.globalCompositeOperation="screen"}catch(b){}return"screen"===a.globalCompositeOperation});var canvas=createElement("canvas");Modernizr.addTest("todataurljpeg",function(){return!!Modernizr.canvas&&0===canvas.toDataURL("image/jpeg").indexOf("data:image/jpeg")}),Modernizr.addTest("todataurlpng",function(){return!!Modernizr.canvas&&0===canvas.toDataURL("image/png").indexOf("data:image/png")}),Modernizr.addTest("todataurlwebp",function(){var a=!1;try{a=!!Modernizr.canvas&&0===canvas.toDataURL("image/webp").indexOf("data:image/webp")}catch(b){}return a}),Modernizr.addTest("canvaswinding",function(){if(Modernizr.canvas===!1)return!1;var a=createElement("canvas").getContext("2d");return a.rect(0,0,10,10),a.rect(2,2,6,6),a.isPointInPath(5,5,"evenodd")===!1}),Modernizr.addTest("canvastext",function(){return Modernizr.canvas===!1?!1:"function"==typeof createElement("canvas").getContext("2d").fillText}),Modernizr.addTest("contenteditable",function(){if("contentEditable"in docElement){var a=createElement("div");return a.contentEditable=!0,"true"===a.contentEditable}}),Modernizr.addTest("contextmenu","contextMenu"in docElement&&"HTMLMenuItemElement"in window),Modernizr.addTest("cookies",function(){try{document.cookie="cookietest=1";var a=-1!=document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",a}catch(b){return!1}}),Modernizr.addTest("cors","XMLHttpRequest"in window&&"withCredentials"in new XMLHttpRequest);var crypto=prefixed("crypto",window),supportsGetRandomValues;if(crypto&&"getRandomValues"in crypto&&"Uint32Array"in window){var array=new Uint32Array(10),values=crypto.getRandomValues(array);supportsGetRandomValues=values&&is(values[0],"number")}Modernizr.addTest("getrandomvalues",!!supportsGetRandomValues),Modernizr.addTest("cssall","all"in docElement.style),Modernizr.addTest("cssanimations",testAllProps("animationName","a",!0)),Modernizr.addTest("appearance",testAllProps("appearance")),Modernizr.addTest("backgroundblendmode",prefixed("backgroundBlendMode","text")),Modernizr.addTest("backgroundcliptext",function(){return testAllProps("backgroundClip","text")}),Modernizr.addTest("bgpositionshorthand",function(){var a=createElement("a"),b=a.style,c="right 10px bottom 10px";return b.cssText="background-position: "+c+";",b.backgroundPosition===c}),Modernizr.addTest("bgpositionxy",function(){return testAllProps("backgroundPositionX","3px",!0)&&testAllProps("backgroundPositionY","5px",!0)}),Modernizr.addTest("bgrepeatround",testAllProps("backgroundRepeat","round")),Modernizr.addTest("bgrepeatspace",testAllProps("backgroundRepeat","space")),Modernizr.addTest("backgroundsize",testAllProps("backgroundSize","100%",!0)),Modernizr.addTest("bgsizecover",testAllProps("backgroundSize","cover")),Modernizr.addTest("borderimage",testAllProps("borderImage","url() 1",!0)),Modernizr.addTest("borderradius",testAllProps("borderRadius","0px",!0)),Modernizr.addTest("boxshadow",testAllProps("boxShadow","1px 1px",!0)),Modernizr.addTest("boxsizing",testAllProps("boxSizing","border-box",!0)&&(document.documentMode===undefined||document.documentMode>7)),Modernizr.addTest("csscalc",function(){var a="width:",b="calc(10px);",c=createElement("a");return c.style.cssText=a+prefixes.join(b+a),!!c.style.length}),Modernizr.addTest("checked",function(){return testStyles("#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;display:block}",function(a){var b=createElement("input");return b.setAttribute("type","checkbox"),b.setAttribute("checked","checked"),a.appendChild(b),20===b.offsetLeft})}),Modernizr.addTest("csschunit",function(){var a,b=modElem.elem.style;try{b.fontSize="3ch",a=-1!==b.fontSize.indexOf("ch")}catch(c){a=!1}return a}),function(){Modernizr.addTest("csscolumns",function(){var a=!1,b=testAllProps("columnCount");try{(a=!!b)&&(a=new Boolean(a))}catch(c){}return a});for(var a,b,c=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],d=0;d<c.length;d++)a=c[d].toLowerCase(),b=testAllProps("column"+c[d]),("breakbefore"===a||"breakafter"===a||"breakinside"==a)&&(b=b||testAllProps(c[d])),Modernizr.addTest("csscolumns."+a,b)}(),Modernizr.addTest("cubicbezierrange",function(){var a=createElement("a");return a.style.cssText=prefixes.join("transition-timing-function:cubic-bezier(1,0,0,1.1); "),!!a.style.length}),Modernizr.addTest("displayrunin",testAllProps("display","run-in"),{aliases:["display-runin"]}),testStyles("#modernizr{display: table; direction: ltr}#modernizr div{display: table-cell; padding: 10px}",function(a){var b,c=a.childNodes;b=c[0].offsetLeft<c[1].offsetLeft,Modernizr.addTest("displaytable",b,{aliases:["display-table"]})},2),Modernizr.addTest("ellipsis",testAllProps("textOverflow","ellipsis"));var CSS=window.CSS;Modernizr.addTest("cssescape",CSS?"function"==typeof CSS.escape:!1),Modernizr.addTest("cssexunit",function(){var a,b=modElem.elem.style;try{b.fontSize="3ex",a=-1!==b.fontSize.indexOf("ex")}catch(c){a=!1}return a});var newSyntax="CSS"in window&&"supports"in window.CSS,oldSyntax="supportsCSS"in window;Modernizr.addTest("supports",newSyntax||oldSyntax),Modernizr.addTest("cssfilters",function(){if(Modernizr.supports)return testAllProps("filter","blur(2px)");var a=createElement("a");return a.style.cssText=prefixes.join("filter:blur(2px); "),!!a.style.length&&(document.documentMode===undefined||document.documentMode>9)}),Modernizr.addTest("flexbox",testAllProps("flexBasis","1px",!0)),Modernizr.addTest("flexboxlegacy",testAllProps("boxDirection","reverse",!0)),Modernizr.addTest("flexboxtweener",testAllProps("flexAlign","end",!0)),Modernizr.addTest("flexwrap",testAllProps("flexWrap","wrap",!0));var blacklist=function(){var a=navigator.userAgent,b=a.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),c=a.match(/w(eb)?osbrowser/gi),d=a.match(/windows phone/gi)&&a.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,e=533>b&&a.match(/android/gi);return c||e||d}();blacklist?Modernizr.addTest("fontface",!1):testStyles('@font-face {font-family:"font";src:url("https://")}',function(a,b){var c=document.getElementById("smodernizr"),d=c.sheet||c.styleSheet,e=d?d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"":"",f=/src/i.test(e)&&0===e.indexOf(b.split(" ")[0]);Modernizr.addTest("fontface",f)}),testStyles('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}',function(a){Modernizr.addTest("generatedcontent",a.offsetHeight>=7)}),Modernizr.addTest("cssgradients",function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);",d=a+prefixes.join(c+a).slice(0,-a.length);Modernizr._config.usePrefixes&&(d+=a+"-webkit-"+b);var e=createElement("a"),f=e.style;return f.cssText=d,(""+f.backgroundImage).indexOf("gradient")>-1}),Modernizr.addTest("hsla",function(){var a=createElement("a").style;return a.cssText="background-color:hsla(120,40%,100%,.5)",contains(a.backgroundColor,"rgba")||contains(a.backgroundColor,"hsla")}),Modernizr.addAsyncTest(function(){function a(){function c(){try{var a=createElement("div"),b=createElement("span"),c=a.style,d=0,e=0,f=!1,g=document.body.firstElementChild||document.body.firstChild;return a.appendChild(b),b.innerHTML="Bacon ipsum dolor sit amet jerky velit in culpa hamburger et. Laborum dolor proident, enim dolore duis commodo et strip steak. Salami anim et, veniam consectetur dolore qui tenderloin jowl velit sirloin. Et ad culpa, fatback cillum jowl ball tip ham hock nulla short ribs pariatur aute. Pig pancetta ham bresaola, ut boudin nostrud commodo flank esse cow tongue culpa. Pork belly bresaola enim pig, ea consectetur nisi. Fugiat officia turkey, ea cow jowl pariatur ullamco proident do laborum velit sausage. Magna biltong sint tri-tip commodo sed bacon, esse proident aliquip. Ullamco ham sint fugiat, velit in enim sed mollit nulla cow ut adipisicing nostrud consectetur. Proident dolore beef ribs, laborum nostrud meatball ea laboris rump cupidatat labore culpa. Shankle minim beef, velit sint cupidatat fugiat tenderloin pig et ball tip. Ut cow fatback salami, bacon ball tip et in shank strip steak bresaola. In ut pork belly sed mollit tri-tip magna culpa veniam, short ribs qui in andouille ham consequat. Dolore bacon t-bone, velit short ribs enim strip steak nulla. Voluptate labore ut, biltong swine irure jerky. Cupidatat excepteur aliquip salami dolore. Ball tip strip steak in pork dolor. Ad in esse biltong. Dolore tenderloin exercitation ad pork loin t-bone, dolore in chicken ball tip qui pig. Ut culpa tongue, sint ribeye dolore ex shank voluptate hamburger. Jowl et tempor, boudin pork chop labore ham hock drumstick consectetur tri-tip elit swine meatball chicken ground round. Proident shankle mollit dolore. Shoulder ut duis t-bone quis reprehenderit. Meatloaf dolore minim strip steak, laboris ea aute bacon beef ribs elit shank in veniam drumstick qui. Ex laboris meatball cow tongue pork belly. Ea ball tip reprehenderit pig, sed fatback boudin dolore flank aliquip laboris eu quis. Beef ribs duis beef, cow corned beef adipisicing commodo nisi deserunt exercitation. Cillum dolor t-bone spare ribs, ham hock est sirloin. Brisket irure meatloaf in, boudin pork belly sirloin ball tip. Sirloin sint irure nisi nostrud aliqua. Nostrud nulla aute, enim officia culpa ham hock. Aliqua reprehenderit dolore sunt nostrud sausage, ea boudin pork loin ut t-bone ham tempor. Tri-tip et pancetta drumstick laborum. Ham hock magna do nostrud in proident. Ex ground round fatback, venison non ribeye in.",document.body.insertBefore(a,g),c.cssText="position:absolute;top:0;left:0;width:5em;text-align:justify;text-justification:newspaper;",d=b.offsetHeight,e=b.offsetWidth,c.cssText="position:absolute;top:0;left:0;width:5em;text-align:justify;text-justification:newspaper;"+prefixes.join("hyphens:auto; "),f=b.offsetHeight!=d||b.offsetWidth!=e,document.body.removeChild(a),a.removeChild(b),f}catch(h){return!1}}function d(a,b){try{var c=createElement("div"),d=createElement("span"),e=c.style,f=0,g=!1,h=!1,i=!1,j=document.body.firstElementChild||document.body.firstChild;return e.cssText="position:absolute;top:0;left:0;overflow:visible;width:1.25em;",c.appendChild(d),document.body.insertBefore(c,j),d.innerHTML="mm",f=d.offsetHeight,d.innerHTML="m"+a+"m",h=d.offsetHeight>f,b?(d.innerHTML="m<br />m",f=d.offsetWidth,d.innerHTML="m"+a+"m",i=d.offsetWidth>f):i=!0,h===!0&&i===!0&&(g=!0),document.body.removeChild(c),c.removeChild(d),g}catch(k){return!1}}function e(a){try{var b,c=createElement("input"),d=createElement("div"),e="lebowski",f=!1,g=document.body.firstElementChild||document.body.firstChild;if(d.innerHTML=e+a+e,document.body.insertBefore(d,g),document.body.insertBefore(c,d),c.setSelectionRange?(c.focus(),c.setSelectionRange(0,0)):c.createTextRange&&(b=c.createTextRange(),b.collapse(!0),b.moveEnd("character",0),b.moveStart("character",0),b.select()),window.find)f=window.find(e+e);else try{b=window.self.document.body.createTextRange(),f=b.findText(e+e)}catch(h){f=!1}return document.body.removeChild(d),document.body.removeChild(c),f}catch(h){return!1}}return document.body||document.getElementsByTagName("body")[0]?(addTest("csshyphens",function(){if(!testAllProps("hyphens","auto",!0))return!1;try{return c()}catch(a){return!1}}),addTest("softhyphens",function(){try{return d("­",!0)&&d("​",!1)}catch(a){return!1}}),void addTest("softhyphensfind",function(){try{return e("­")&&e("​")}catch(a){return!1}})):void setTimeout(a,b)}var b=300;setTimeout(a,b)}),Modernizr.addTest("cssinvalid",function(){return testStyles("#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:invalid{width:50px}",function(a){var b=createElement("input");return b.required=!0,a.appendChild(b),b.clientWidth>10})}),testStyles("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}",function(a){Modernizr.addTest("lastchild",a.lastChild.offsetWidth>a.firstChild.offsetWidth)},2),Modernizr.addTest("cssmask",testAllProps("maskRepeat","repeat-x",!0)),Modernizr.addTest("mediaqueries",mq("only all")),Modernizr.addTest("multiplebgs",function(){var a=createElement("a").style;return a.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(a.background)}),testStyles("#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}",function(a){Modernizr.addTest("nthchild",function(){for(var b=a.getElementsByTagName("div"),c=!0,d=0;5>d;d++)c=c&&b[d].offsetWidth===d%2+1;return c})},5),Modernizr.addTest("objectfit",!!prefixed("objectFit"),{aliases:["object-fit"]}),Modernizr.addTest("opacity",function(){var a=createElement("a").style;return a.cssText=prefixes.join("opacity:.55;"),/^0.55$/.test(a.opacity)}),Modernizr.addTest("overflowscrolling",testAllProps("overflowScrolling","touch",!0)),Modernizr.addTest("csspointerevents",function(){var a=createElement("a").style;return a.cssText="pointer-events:auto","auto"===a.pointerEvents}),Modernizr.addTest("csspositionsticky",function(){var a="position:",b="sticky",c=createElement("a"),d=c.style;return d.cssText=a+prefixes.join(b+";"+a).slice(0,-a.length),-1!==d.position.indexOf(b)}),Modernizr.addTest("csspseudoanimations",function(){var a=!1;if(!Modernizr.cssanimations||!window.getComputedStyle)return a;var b=["@",Modernizr._prefixes.join("keyframes csspseudoanimations { from { font-size: 10px; } }@").replace(/\@$/,""),'#modernizr:before { content:" "; font-size:5px;',Modernizr._prefixes.join("animation:csspseudoanimations 1ms infinite;"),"}"].join("");return Modernizr.testStyles(b,function(b){a="10px"===window.getComputedStyle(b,":before").getPropertyValue("font-size")}),a}),Modernizr.addTest("csstransitions",testAllProps("transition","all",!0)),Modernizr.addTest("csspseudotransitions",function(){var a=!1;if(!Modernizr.csstransitions||!window.getComputedStyle)return a;var b='#modernizr:before { content:" "; font-size:5px;'+Modernizr._prefixes.join("transition:0s 100s;")+"}#modernizr.trigger:before { font-size:10px; }";return Modernizr.testStyles(b,function(b){window.getComputedStyle(b,":before").getPropertyValue("font-size"),b.className+="trigger",a="5px"===window.getComputedStyle(b,":before").getPropertyValue("font-size")}),a}),Modernizr.addTest("cssreflections",testAllProps("boxReflect","above",!0)),Modernizr.addTest("regions",function(){if(isSVG)return!1;var a=Modernizr.prefixed("flowFrom"),b=Modernizr.prefixed("flowInto"),c=!1;if(!a||!b)return c;var d=createElement("iframe"),e=createElement("div"),f=createElement("div"),g=createElement("div"),h="modernizr_flow_for_regions_check";f.innerText="M",e.style.cssText="top: 150px; left: 150px; padding: 0px;",g.style.cssText="width: 50px; height: 50px; padding: 42px;",g.style[a]=h,e.appendChild(f),e.appendChild(g),docElement.appendChild(e);var i,j,k=f.getBoundingClientRect();return f.style[b]=h,i=f.getBoundingClientRect(),j=parseInt(i.left-k.left,10),docElement.removeChild(e),42==j?c=!0:(docElement.appendChild(d),k=d.getBoundingClientRect(),d.style[b]=h,i=d.getBoundingClientRect(),k.height>0&&k.height!==i.height&&0===i.height&&(c=!0)),f=g=e=d=undefined,c}),Modernizr.addTest("cssremunit",function(){var a=createElement("a").style;try{a.fontSize="3rem"}catch(b){}return/rem/.test(a.fontSize)}),Modernizr.addTest("cssresize",testAllProps("resize","both",!0)),Modernizr.addTest("rgba",function(){var a=createElement("a").style;return a.cssText="background-color:rgba(150,255,150,.5)",(""+a.backgroundColor).indexOf("rgba")>-1}),testStyles("#modernizr{overflow: scroll; width: 40px; height: 40px; }#"+prefixes.join("scrollbar{width:0px} #modernizr::").split("#").slice(1).join("#")+"scrollbar{width:0px}",function(a){Modernizr.addTest("cssscrollbar",40==a.scrollWidth)}),Modernizr.addTest("shapes",testAllProps("shapeOutside","content-box",!0)),Modernizr.addTest("siblinggeneral",function(){return testStyles("#modernizr div {width:100px} #modernizr div ~ div {width:200px;display:block}",function(a){return 200==a.lastChild.offsetWidth},2)}),testStyles("#modernizr{position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;}#subpixel{float: left; font-size: 33.3333%;}",function(a){var b=a.firstChild;b.innerHTML="This is a text written in Arial",Modernizr.addTest("subpixelfont",window.getComputedStyle?"44px"!==window.getComputedStyle(b,null).getPropertyValue("width"):!1)},1,["subpixel"]),Modernizr.addTest("target",function(){var a=window.document;if(!("querySelectorAll"in a))return!1;try{return a.querySelectorAll(":target"),!0}catch(b){return!1}}),Modernizr.addTest("textalignlast",testAllProps("textAlignLast")),Modernizr.addTest("textshadow",testProp("textShadow","1px 1px")),Modernizr.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&testAllProps("transform","scale(1)",!0)}),Modernizr.addTest("csstransforms3d",function(){var a=!!testAllProps("perspective","1px",!0),b=Modernizr._config.usePrefixes;if(a&&(!b||"webkitPerspective"in docElement.style)){var c;Modernizr.supports?c="@supports (perspective: 1px)":(c="@media (transform-3d)",b&&(c+=",(-webkit-transform-3d)")),c+="{#modernizr{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0}}",testStyles(c,function(b){a=9===b.offsetLeft&&5===b.offsetHeight})}return a}),Modernizr.addTest("preserve3d",testAllProps("transformStyle","preserve-3d")),Modernizr.addTest("userselect",testAllProps("userSelect","none",!0)),Modernizr.addTest("cssvalid",function(){return testStyles("#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:valid{width:50px}",function(a){var b=createElement("input");
+return a.appendChild(b),b.clientWidth>10})}),testStyles("#modernizr { height: 50vh; }",function(a){var b=parseInt(window.innerHeight/2,10),c=parseInt((window.getComputedStyle?getComputedStyle(a,null):a.currentStyle).height,10);Modernizr.addTest("cssvhunit",c==b)}),testStyles("#modernizr1{width: 50vmax}#modernizr2{width:50px;height:50px;overflow:scroll}",function(a){var b=a.childNodes[1],c=a.childNodes[0],d=parseInt((c.offsetWidth-c.clientWidth)/2,10),e=docElement.clientWidth/100,f=docElement.clientHeight/100,g=parseInt(50*Math.max(e,f),10),h=parseInt((window.getComputedStyle?getComputedStyle(b,null):b.currentStyle).width,10);Modernizr.addTest("cssvmaxunit",roundedEquals(g,h)||roundedEquals(g,h-d))},2),testStyles("#modernizr1{width: 50vm;width:50vmin}#modernizr2{width:50px;height:50px;overflow:scroll}",function(a){var b=a.childNodes[1],c=a.childNodes[0],d=parseInt((c.offsetWidth-c.clientWidth)/2,10),e=docElement.clientWidth/100,f=docElement.clientHeight/100,g=parseInt(50*Math.min(e,f),10),h=parseInt((window.getComputedStyle?getComputedStyle(b,null):b.currentStyle).width,10);Modernizr.addTest("cssvminunit",roundedEquals(g,h)||roundedEquals(g,h-d))},2),testStyles("#modernizr { width: 50vw; }",function(a){var b=parseInt(window.innerWidth/2,10),c=parseInt((window.getComputedStyle?getComputedStyle(a,null):a.currentStyle).width,10);Modernizr.addTest("cssvwunit",c==b)}),Modernizr.addTest("willchange","willChange"in docElement.style),Modernizr.addTest("wrapflow",function(){var a=prefixed("wrapFlow");if(!a||isSVG)return!1;var b=a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()}).replace(/^ms-/,"-ms-"),c=createElement("div"),d=createElement("div"),e=createElement("span");d.style.cssText="position: absolute; left: 50px; width: 100px; height: 20px;"+b+":end;",e.innerText="X",c.appendChild(d),c.appendChild(e),docElement.appendChild(c);var f=e.offsetLeft;return docElement.removeChild(c),d=e=c=undefined,150==f}),Modernizr.addTest("customevent","CustomEvent"in window&&"function"==typeof window.CustomEvent),Modernizr.addTest("customprotocolhandler",function(){if(!navigator.registerProtocolHandler)return!1;try{navigator.registerProtocolHandler("thisShouldFail")}catch(a){return a instanceof TypeError}return!1}),Modernizr.addTest("dart",!!prefixed("startDart",navigator)),Modernizr.addTest("dataview","undefined"!=typeof DataView&&"getFloat64"in DataView.prototype),Modernizr.addTest("classlist","classList"in docElement),Modernizr.addTest("createelementattrs",function(){try{return"test"==createElement('<input name="test" />').getAttribute("name")}catch(a){return!1}},{aliases:["createelement-attrs"]}),Modernizr.addTest("dataset",function(){var a=createElement("div");return a.setAttribute("data-a-b","c"),!(!a.dataset||"c"!==a.dataset.aB)}),Modernizr.addTest("documentfragment",function(){return"createDocumentFragment"in document&&"appendChild"in docElement}),Modernizr.addTest("hidden","hidden"in createElement("a")),Modernizr.addTest("microdata","getItems"in document),Modernizr.addTest("mutationobserver",!!window.MutationObserver||!!window.WebKitMutationObserver);var inputElem=createElement("input"),inputattrs="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),attrs={};Modernizr.input=function(a){for(var b=0,c=a.length;c>b;b++)attrs[a[b]]=!!(a[b]in inputElem);return attrs.list&&(attrs.list=!(!createElement("datalist")||!window.HTMLDataListElement)),attrs}(inputattrs),Modernizr.addTest("datalistelem",Modernizr.input.list),Modernizr.addTest("details",function(){var a,b=createElement("details");return"open"in b?(testStyles("#modernizr details{display:block}",function(c){c.appendChild(b),b.innerHTML="<summary>a</summary>b",a=b.offsetHeight,b.open=!0,a=a!=b.offsetHeight}),a):!1}),Modernizr.addTest("outputelem","value"in createElement("output")),Modernizr.addTest("picture","HTMLPictureElement"in window),Modernizr.addTest("progressbar",createElement("progress").max!==undefined),Modernizr.addTest("meter",createElement("meter").max!==undefined),Modernizr.addTest("ruby",function(){function a(a,b){var c;return window.getComputedStyle?c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b):a.currentStyle&&(c=a.currentStyle[b]),c}function b(){docElement.removeChild(c),c=null,d=null,e=null}var c=createElement("ruby"),d=createElement("rt"),e=createElement("rp"),f="display",g="fontSize";return c.appendChild(e),c.appendChild(d),docElement.appendChild(c),"none"==a(e,f)||"ruby"==a(c,f)&&"ruby-text"==a(d,f)||"6pt"==a(e,g)&&"6pt"==a(d,g)?(b(),!0):(b(),!1)}),Modernizr.addTest("template","content"in createElement("template")),Modernizr.addTest("time","valueAsDate"in createElement("time")),Modernizr.addTest("texttrackapi","function"==typeof createElement("video").addTextTrack),Modernizr.addTest("track","kind"in createElement("track")),Modernizr.addTest("unknownelements",function(){var a=createElement("a");return a.innerHTML="<xyz></xyz>",1===a.childNodes.length}),Modernizr.addTest("emoji",function(){if(!Modernizr.canvastext)return!1;var a=window.devicePixelRatio||1,b=12*a,c=createElement("canvas"),d=c.getContext("2d");return d.fillStyle="#f00",d.textBaseline="top",d.font="32px Arial",d.fillText("🐨",0,0),0!==d.getImageData(b,b,1,1).data[0]}),Modernizr.addTest("es5array",function(){return!!(Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray)}),Modernizr.addTest("es5date",function(){var a="2013-04-12T06:06:37.307Z",b=!1;try{b=!!Date.parse(a)}catch(c){}return!!(Date.now&&Date.prototype&&Date.prototype.toISOString&&Date.prototype.toJSON&&b)}),Modernizr.addTest("es5function",function(){return!(!Function.prototype||!Function.prototype.bind)}),Modernizr.addTest("es5object",function(){return!!(Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions)}),Modernizr.addTest("strictmode",function(){"use strict";return!this}()),Modernizr.addTest("es5string",function(){return!(!String.prototype||!String.prototype.trim)}),Modernizr.addTest("json","JSON"in window&&"parse"in JSON&&"stringify"in JSON),Modernizr.addTest("es5syntax",function(){var value,obj,stringAccess,getter,setter,reservedWords,zeroWidthChars;try{return stringAccess=eval('"foobar"[3] === "b"'),getter=eval("({ get x(){ return 1 } }).x === 1"),eval("({ set x(v){ value = v; } }).x = 1"),setter=1===value,eval("obj = ({ if: 1 })"),reservedWords=1===obj["if"],zeroWidthChars=eval("_ = true"),stringAccess&&getter&&setter&&reservedWords&&zeroWidthChars}catch(ignore){return!1}}),Modernizr.addTest("es5undefined",function(){var a,b;try{b=window.undefined,window.undefined=12345,a="undefined"==typeof window.undefined,window.undefined=b}catch(c){return!1}return a}),Modernizr.addTest("es5",function(){return!!(Modernizr.es5array&&Modernizr.es5date&&Modernizr.es5function&&Modernizr.es5object&&Modernizr.strictmode&&Modernizr.es5string&&Modernizr.json&&Modernizr.es5syntax&&Modernizr.es5undefined)}),Modernizr.addTest("es6array",!!(Array.prototype&&Array.prototype.copyWithin&&Array.prototype.fill&&Array.prototype.find&&Array.prototype.findIndex&&Array.prototype.keys&&Array.prototype.entries&&Array.prototype.values&&Array.from&&Array.of)),Modernizr.addTest("contains",is(String.prototype.contains,"function")),Modernizr.addTest("generators",function(){try{new Function("function* test() {}")()}catch(a){return!1}return!0}),Modernizr.addTest("es6math",!!(Math&&Math.clz32&&Math.cbrt&&Math.imul&&Math.sign&&Math.log10&&Math.log2&&Math.log1p&&Math.expm1&&Math.cosh&&Math.sinh&&Math.tanh&&Math.acosh&&Math.asinh&&Math.atanh&&Math.hypot&&Math.trunc&&Math.fround)),Modernizr.addTest("es6number",!!(Number.isFinite&&Number.isInteger&&Number.isSafeInteger&&Number.isNaN&&Number.parseInt&&Number.parseFloat&&Number.isInteger(Number.MAX_SAFE_INTEGER)&&Number.isInteger(Number.MIN_SAFE_INTEGER)&&Number.isFinite(Number.EPSILON))),Modernizr.addTest("es6object",!!(Object.assign&&Object.is&&Object.setPrototypeOf)),Modernizr.addTest("promises",function(){return"Promise"in window&&"resolve"in window.Promise&&"reject"in window.Promise&&"all"in window.Promise&&"race"in window.Promise&&function(){var a;return new window.Promise(function(b){a=b}),"function"==typeof a}()}),Modernizr.addTest("es6string",!!(String.fromCodePoint&&String.raw&&String.prototype.codePointAt&&String.prototype.repeat&&String.prototype.startsWith&&String.prototype.endsWith&&String.prototype.contains)),Modernizr.addTest("devicemotion","DeviceMotionEvent"in window),Modernizr.addTest("deviceorientation","DeviceOrientationEvent"in window),Modernizr.addTest("oninput",function(){var a,b=createElement("input");if(b.setAttribute("oninput","return"),hasEvent("oninput",docElement)||"function"==typeof b.oninput)return!0;try{var c=document.createEvent("KeyboardEvent");a=!1;var d=function(b){a=!0,b.preventDefault(),b.stopPropagation()};c.initKeyEvent("keypress",!0,!0,window,!1,!1,!1,!1,0,"e".charCodeAt(0)),docElement.appendChild(b),b.addEventListener("input",d,!1),b.focus(),b.dispatchEvent(c),b.removeEventListener("input",d,!1),docElement.removeChild(b)}catch(e){a=!1}return a}),Modernizr.addTest("eventlistener","addEventListener"in window),Modernizr.addAsyncTest(function(){var a=new Image;a.onerror=function(){addTest("exiforientation",!1,{aliases:["exif-orientation"]})},a.onload=function(){addTest("exiforientation",2!==a.width,{aliases:["exif-orientation"]})},a.src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q=="}),Modernizr.addTest("filereader",!!(window.File&&window.FileList&&window.FileReader)),Modernizr.addTest("filesystem",!!prefixed("requestFileSystem",window)),Modernizr.addAsyncTest(function(){var a,b,c=function(a){a.fake&&a.parentNode&&a.parentNode.removeChild(a)},d=function(a,b){var c=!!a;if(c&&(c=new Boolean(c),c.blocked="blocked"===a),addTest("flash",function(){return c}),b&&i.contains(b)){for(;b.parentNode!==i;)b=b.parentNode;i.removeChild(b)}};try{b="ActiveXObject"in window&&"Pan"in new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}if(a=!("plugins"in navigator&&"Shockwave Flash"in navigator.plugins||b),a||isSVG)d(!1);else{var f,g,h=createElement("embed"),i=getBody();if(h.type="application/x-shockwave-flash",i.appendChild(h),docElement.appendChild(i),!("Pan"in h||b))return d("blocked",h),void c(i);f=function(){return docElement.contains(i)?(docElement.contains(h)?(g=h.style.cssText,""!==g?d("blocked",h):d(!0,h)):d("blocked"),void c(i)):(i=document.body||i,h=createElement("embed"),h.type="application/x-shockwave-flash",i.appendChild(h),setTimeout(f,1e3))},setTimeout(f,10)}}),Modernizr.addTest("capture","capture"in createElement("input")),Modernizr.addTest("fileinput",function(){if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/))return!1;var a=createElement("input");return a.type="file",!a.disabled}),Modernizr.addTest("fileinputdirectory",function(){var a=createElement("input"),b="directory";if(a.type="file",b in a)return!0;for(var c=0,d=domPrefixes.length;d>c;c++)if(domPrefixes[c]+b in a)return!0;return!1}),Modernizr.addTest("formattribute",function(){var a,b=createElement("form"),c=createElement("input"),d=createElement("div"),e="formtest"+(new Date).getTime(),f=!1;b.id=e;try{c.setAttribute("form",e)}catch(g){document.createAttribute&&(a=document.createAttribute("form"),a.nodeValue=e,c.setAttributeNode(a))}return d.appendChild(b),d.appendChild(c),docElement.appendChild(d),f=b.elements&&1===b.elements.length&&c.form==b,d.parentNode.removeChild(d),f});var inputtypes="search tel url email datetime date month week time datetime-local number range color".split(" "),inputs={};Modernizr.inputtypes=function(a){for(var b,c,d,e=a.length,f=":)",g=0;e>g;g++)inputElem.setAttribute("type",b=a[g]),d="text"!==inputElem.type&&"style"in inputElem,d&&(inputElem.value=f,inputElem.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(b)&&inputElem.style.WebkitAppearance!==undefined?(docElement.appendChild(inputElem),c=document.defaultView,d=c.getComputedStyle&&"textfield"!==c.getComputedStyle(inputElem,null).WebkitAppearance&&0!==inputElem.offsetHeight,docElement.removeChild(inputElem)):/^(search|tel)$/.test(b)||(d=/^(url|email|number)$/.test(b)?inputElem.checkValidity&&inputElem.checkValidity()===!1:inputElem.value!=f)),inputs[a[g]]=!!d;return inputs}(inputtypes),Modernizr.addTest("formvalidation",function(){var a=createElement("form");if(!("checkValidity"in a&&"addEventListener"in a))return!1;if("reportValidity"in a)return!0;var b,c=!1;return Modernizr.formvalidationapi=!0,a.addEventListener("submit",function(a){window.opera||a.preventDefault(),a.stopPropagation()},!1),a.innerHTML='<input name="modTest" required><button></button>',testStyles("#modernizr form{position:absolute;top:-99999em}",function(d){d.appendChild(a),b=a.getElementsByTagName("input")[0],b.addEventListener("invalid",function(a){c=!0,a.preventDefault(),a.stopPropagation()},!1),Modernizr.formvalidationmessage=!!b.validationMessage,a.getElementsByTagName("button")[0].click()}),c}),Modernizr.addTest("localizednumber",function(){if(!Modernizr.inputtypes.number)return!1;if(!Modernizr.formvalidation)return!1;var a,b=createElement("div"),c=getBody(),d=function(){return docElement.insertBefore(c,docElement.firstElementChild||docElement.firstChild)}();b.innerHTML='<input type="number" value="1.0" step="0.1"/>';var e=b.childNodes[0];d.appendChild(b),e.focus();try{document.execCommand("InsertText",!1,"1,1")}catch(f){}return a="number"===e.type&&1.1===e.valueAsNumber&&e.checkValidity(),d.removeChild(b),c.fake&&d.parentNode.removeChild(d),a}),Modernizr.addTest("placeholder","placeholder"in createElement("input")&&"placeholder"in createElement("textarea")),Modernizr.addTest("requestautocomplete",!!prefixed("requestAutocomplete",createElement("form"))),Modernizr.addTest("fullscreen",!(!prefixed("exitFullscreen",document,!1)&&!prefixed("cancelFullScreen",document,!1))),Modernizr.addTest("gamepads",!!prefixed("getGamepads",navigator)),Modernizr.addTest("geolocation","geolocation"in navigator),Modernizr.addTest("hashchange",function(){return hasEvent("hashchange",window)===!1?!1:document.documentMode===undefined||document.documentMode>7}),Modernizr.addTest("hiddenscroll",function(){return testStyles("#modernizr {width:100px;height:100px;overflow:scroll}",function(a){return a.offsetWidth===a.clientWidth})}),Modernizr.addTest("history",function(){var a=navigator.userAgent;return-1===a.indexOf("Android 2.")&&-1===a.indexOf("Android 4.0")||-1===a.indexOf("Mobile Safari")||-1!==a.indexOf("Chrome")||-1!==a.indexOf("Windows Phone")?window.history&&"pushState"in window.history:!1}),addTest("htmlimports","import"in createElement("link")),Modernizr.addTest("ie8compat",!window.addEventListener&&!!document.documentMode&&7===document.documentMode),Modernizr.addTest("sandbox","sandbox"in createElement("iframe")),Modernizr.addTest("seamless","seamless"in createElement("iframe")),Modernizr.addTest("srcdoc","srcdoc"in createElement("iframe")),Modernizr.addAsyncTest(function(){if(!Modernizr.canvas)return!1;var a=new Image,b=createElement("canvas"),c=b.getContext("2d");a.onload=function(){addTest("apng",function(){return"undefined"==typeof b.getContext?!1:(c.drawImage(a,0,0),0===c.getImageData(0,0,1,1).data[3])})},a.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="}),Modernizr.addAsyncTest(function(){var a=new Image;a.onload=a.onerror=function(){addTest("jpegxr",1==a.width,{aliases:["jpeg-xr"]})},a.src="data:image/vnd.ms-photo;base64,SUm8AQgAAAAFAAG8AQAQAAAASgAAAIC8BAABAAAAAQAAAIG8BAABAAAAAQAAAMC8BAABAAAAWgAAAMG8BAABAAAAHwAAAAAAAAAkw91vA07+S7GFPXd2jckNV01QSE9UTwAZAYBxAAAAABP/gAAEb/8AAQAAAQAAAA=="}),Modernizr.addTest("sizes","sizes"in createElement("img")),Modernizr.addTest("srcset","srcset"in createElement("img")),Modernizr.addAsyncTest(function(){function a(a,b,c){function d(b){var d=b&&"load"===b.type?1==e.width:!1,f="webp"===a;addTest(a,f?new Boolean(d):d),c&&c(b)}var e=new Image;e.onerror=d,e.onload=d,e.src=b}var b=[{uri:"data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=",name:"webp"},{uri:"data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==",name:"webp.alpha"},{uri:"data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",name:"webp.animation"},{uri:"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",name:"webp.lossless"}],c=b.shift();a(c.name,c.uri,function(c){if(c&&"load"===c.type)for(var d=0;d<b.length;d++)a(b[d].name,b[d].uri)})}),Modernizr.addAsyncTest(function(){var a=new Image;a.onerror=function(){addTest("webpalpha",!1,{aliases:["webp-alpha"]})},a.onload=function(){addTest("webpalpha",1==a.width,{aliases:["webp-alpha"]})},a.src="data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="}),Modernizr.addAsyncTest(function(){var a=new Image;a.onerror=function(){addTest("webpanimation",!1,{aliases:["webp-animation"]})},a.onload=function(){addTest("webpanimation",1==a.width,{aliases:["webp-animation"]})},a.src="data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}),Modernizr.addAsyncTest(function(){var a=new Image;a.onerror=function(){addTest("webplossless",!1,{aliases:["webp-lossless"]})},a.onload=function(){addTest("webplossless",1==a.width,{aliases:["webp-lossless"]})},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="});var indexeddb=prefixed("indexedDB",window);Modernizr.addTest("indexeddb",!!indexeddb),indexeddb&&Modernizr.addTest("indexeddb.deletedatabase","deleteDatabase"in indexeddb),Modernizr.addAsyncTest(function(){var a,b,c=prefixed("indexedDB",window),d="detect-blob-support",e=!1;if(!Modernizr.indexeddb||!Modernizr.indexeddb.deleteDatabase)return!1;try{c.deleteDatabase(d).onsuccess=function(){a=c.open(d,1),a.onupgradeneeded=function(){a.result.createObjectStore("store")},a.onsuccess=function(){b=a.result;try{b.transaction("store","readwrite").objectStore("store").put(new Blob,"key"),e=!0}catch(f){e=!1}finally{addTest("indexeddbblob",e),b.close(),c.deleteDatabase(d)}}}}catch(f){addTest("indexeddbblob",!1)}}),Modernizr.addTest("inputformaction",!!("formAction"in createElement("input")),{aliases:["input-formaction"]}),Modernizr.addTest("inputformenctype",!!("formEnctype"in createElement("input")),{aliases:["input-formenctype"]}),Modernizr.addTest("inputformmethod",!!("formMethod"in createElement("input"))),Modernizr.addTest("inputformtarget",!!("formtarget"in createElement("input")),{aliases:["input-formtarget"]}),Modernizr.addTest("inputsearchevent",hasEvent("search")),Modernizr.addTest("intl",!!prefixed("Intl",window)),Modernizr.addTest("olreversed","reversed"in createElement("ol")),Modernizr.addTest("mathml",function(){var a;return testStyles("#modernizr{position:absolute;display:inline-block}",function(b){b.innerHTML+="<math><mfrac><mi>xx</mi><mi>yy</mi></mfrac></math>",a=b.offsetHeight>b.offsetWidth}),a}),Modernizr.addTest("beacon","sendBeacon"in navigator),Modernizr.addTest("lowbandwidth",function(){var a=navigator.connection||{type:0};return 3==a.type||4==a.type||/^[23]g$/.test(a.type)}),Modernizr.addTest("eventsource","EventSource"in window),Modernizr.addTest("fetch","fetch"in window),Modernizr.addTest("xhrresponsetype",function(){if("undefined"==typeof XMLHttpRequest)return!1;var a=new XMLHttpRequest;return a.open("get","/",!0),"response"in a}());var testXhrType=function(a){if("undefined"==typeof XMLHttpRequest)return!1;var b=new XMLHttpRequest;b.open("get","/",!0);try{b.responseType=a}catch(c){return!1}return"response"in b&&b.responseType==a};Modernizr.addTest("xhrresponsetypearraybuffer",testXhrType("arraybuffer")),Modernizr.addTest("xhrresponsetypeblob",testXhrType("blob")),Modernizr.addTest("xhrresponsetypedocument",testXhrType("document")),Modernizr.addTest("xhrresponsetypejson",testXhrType("json")),Modernizr.addTest("xhrresponsetypetext",testXhrType("text")),Modernizr.addTest("xhr2","XMLHttpRequest"in window&&"withCredentials"in new XMLHttpRequest),Modernizr.addTest("notification","Notification"in window&&"permission"in window.Notification&&"requestPermission"in window.Notification),Modernizr.addTest("pagevisibility",!!prefixed("hidden",document,!1)),Modernizr.addTest("performance",!!prefixed("performance",window)),Modernizr.addTest("pointerevents",function(){var a=!1,b=domPrefixes.length;for(a=Modernizr.hasEvent("pointerdown");b--&&!a;)hasEvent(domPrefixes[b]+"pointerdown")&&(a=!0);return a}),Modernizr.addTest("pointerlock",!!prefixed("exitPointerLock",document)),Modernizr.addTest("postmessage","postMessage"in window),Modernizr.addAsyncTest(function(){function a(){clearTimeout(b),window.removeEventListener("deviceproximity",a),addTest("proximity",!0)}var b,c=300;"ondeviceproximity"in window&&"onuserproximity"in window?(window.addEventListener("deviceproximity",a),b=setTimeout(function(){window.removeEventListener("deviceproximity",a),addTest("proximity",!1)},c)):addTest("proximity",!1)}),Modernizr.addTest("queryselector","querySelector"in document&&"querySelectorAll"in document),Modernizr.addTest("quotamanagement",function(){var a=prefixed("temporaryStorage",navigator),b=prefixed("persistentStorage",navigator);return!(!a||!b)}),Modernizr.addTest("requestanimationframe",!!prefixed("requestAnimationFrame",window),{aliases:["raf"]}),Modernizr.addTest("scriptasync","async"in createElement("script")),Modernizr.addTest("scriptdefer","defer"in createElement("script")),Modernizr.addTest("serviceworker","serviceWorker"in navigator),Modernizr.addTest("speechrecognition",!!prefixed("SpeechRecognition",window)),Modernizr.addTest("speechsynthesis","SpeechSynthesisUtterance"in window),Modernizr.addTest("localstorage",function(){var a="modernizr";try{return localStorage.setItem(a,a),localStorage.removeItem(a),!0}catch(b){return!1}}),Modernizr.addTest("sessionstorage",function(){var a="modernizr";try{return sessionStorage.setItem(a,a),sessionStorage.removeItem(a),!0}catch(b){return!1}}),Modernizr.addTest("websqldatabase","openDatabase"in window),Modernizr.addTest("stylescoped","scoped"in createElement("style")),Modernizr.addTest("svg",!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),Modernizr.addTest("svgasimg",document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"));var toStringFn={}.toString;Modernizr.addTest("svgclippaths",function(){return!!document.createElementNS&&/SVGClipPath/.test(toStringFn.call(document.createElementNS("http://www.w3.org/2000/svg","clipPath")))}),Modernizr.addTest("svgfilters",function(){var a=!1;try{a="SVGFEColorMatrixElement"in window&&2==SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE}catch(b){}return a}),Modernizr.addTest("svgforeignobject",function(){return!!document.createElementNS&&/SVGForeignObject/.test(toStringFn.call(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")))}),Modernizr.addTest("inlinesvg",function(){var a=createElement("div");return a.innerHTML="<svg/>","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&a.firstChild&&a.firstChild.namespaceURI)}),Modernizr.addTest("smil",function(){return!!document.createElementNS&&/SVGAnimate/.test(toStringFn.call(document.createElementNS("http://www.w3.org/2000/svg","animate")))}),Modernizr.addTest("templatestrings",function(){var supports;try{eval("``"),supports=!0}catch(e){}return!!supports}),Modernizr.addTest("textareamaxlength",!!("maxLength"in createElement("textarea"))),Modernizr.addTest("touchevents",function(){var a;if("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)a=!0;else{var b=["@media (",prefixes.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");testStyles(b,function(b){a=9===b.offsetTop})}return a}),Modernizr.addTest("typedarrays","ArrayBuffer"in window),Modernizr.addTest("unicode",function(){var a,b=createElement("span"),c=createElement("span");return testStyles("#modernizr{font-family:Arial,sans;font-size:300em;}",function(d){b.innerHTML=isSVG?"妇":"ᝣ",c.innerHTML=isSVG?"☆":"☆",d.appendChild(b),d.appendChild(c),a="offsetWidth"in b&&b.offsetWidth!==c.offsetWidth}),a}),Modernizr.addTest("unicoderange",function(){return Modernizr.testStyles('@font-face{font-family:"unicodeRange";src:local("Arial");unicode-range:U+0020,U+002E}#modernizr span{font-size:20px;display:inline-block;font-family:"unicodeRange",monospace}#modernizr .mono{font-family:monospace}',function(a){for(var b=[".",".","m","m"],c=0;c<b.length;c++){var d=createElement("span");d.innerHTML=b[c],d.className=c%2?"mono":"",a.appendChild(d),b[c]=d.clientWidth}return b[0]!==b[1]&&b[2]===b[3]})});var url=prefixed("URL",window,!1);url=url&&window[url],Modernizr.addTest("bloburls",url&&"revokeObjectURL"in url&&"createObjectURL"in url),Modernizr.addAsyncTest(function(){function a(){var a=new Image;a.onerror=function(){addTest("datauri",!0),Modernizr.datauri=new Boolean(!0),Modernizr.datauri.over32kb=!1},a.onload=function(){addTest("datauri",!0),Modernizr.datauri=new Boolean(!0),Modernizr.datauri.over32kb=1==a.width&&1==a.height};for(var b="R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";b.length<33e3;)b="\r\n"+b;a.src="data:image/gif;base64,"+b}-1!==navigator.userAgent.indexOf("MSIE 7.")&&setTimeout(function(){addTest("datauri",!1)},10);var b=new Image;b.onerror=function(){addTest("datauri",!1)},b.onload=function(){1==b.width&&1==b.height?a():addTest("datauri",!1)},b.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="}),Modernizr.addTest("urlparser",function(){var a;try{return a=new URL("http://modernizr.com/"),"http://modernizr.com/"===a.href}catch(b){return!1}}),Modernizr.addTest("userdata",!!createElement("div").addBehavior),Modernizr.addTest("vibrate",!!prefixed("vibrate",navigator)),Modernizr.addTest("video",function(){var a=createElement("video"),b=!1;try{(b=!!a.canPlayType)&&(b=new Boolean(b),b.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),b.vp9=a.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),b.hls=a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(c){}return b}),Modernizr.addAsyncTest(function(){function a(c){clearTimeout(b),d.removeEventListener("playing",a,!1),addTest("videoautoplay",c&&"playing"===c.type||0!==d.currentTime),d.parentNode.removeChild(d)}var b,c=300,d=createElement("video"),e=d.style;if(!(Modernizr.video&&"autoplay"in d))return void addTest("videoautoplay",!1);e.position="absolute",e.height=0,e.width=0;try{if(Modernizr.video.ogg)d.src="data:video/ogg;base64,T2dnUwACAAAAAAAAAABmnCATAAAAAHDEixYBKoB0aGVvcmEDAgEAAQABAAAQAAAQAAAAAAAFAAAAAQAAAAAAAAAAAGIAYE9nZ1MAAAAAAAAAAAAAZpwgEwEAAAACrA7TDlj///////////////+QgXRoZW9yYSsAAABYaXBoLk9yZyBsaWJ0aGVvcmEgMS4xIDIwMDkwODIyIChUaHVzbmVsZGEpAQAAABoAAABFTkNPREVSPWZmbXBlZzJ0aGVvcmEtMC4yOYJ0aGVvcmG+zSj3uc1rGLWpSUoQc5zmMYxSlKQhCDGMYhCEIQhAAAAAAAAAAAAAEW2uU2eSyPxWEvx4OVts5ir1aKtUKBMpJFoQ/nk5m41mUwl4slUpk4kkghkIfDwdjgajQYC8VioUCQRiIQh8PBwMhgLBQIg4FRba5TZ5LI/FYS/Hg5W2zmKvVoq1QoEykkWhD+eTmbjWZTCXiyVSmTiSSCGQh8PB2OBqNBgLxWKhQJBGIhCHw8HAyGAsFAiDgUCw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDAwPEhQUFQ0NDhESFRUUDg4PEhQVFRUOEBETFBUVFRARFBUVFRUVEhMUFRUVFRUUFRUVFRUVFRUVFRUVFRUVEAwLEBQZGxwNDQ4SFRwcGw4NEBQZHBwcDhATFhsdHRwRExkcHB4eHRQYGxwdHh4dGxwdHR4eHh4dHR0dHh4eHRALChAYKDM9DAwOExo6PDcODRAYKDlFOA4RFh0zV1A+EhYlOkRtZ00YIzdAUWhxXDFATldneXhlSFxfYnBkZ2MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEhIVGRoaGhoSFBYaGhoaGhUWGRoa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A6DHBnkWzr7kz410f7cqO/Syt5KqpFVJwn6gBEvBM0zNtZcpGOEPiysW8vvRd2R0f7gtjhqUvXL+gWVwHm4XJDBiMpmmZtrLfPwd/IugP5+fKVSysH1EXreFAcEhelGmbbUmZY4Xdo1vQWVnK19P4RuEnbf0gQnR+lDCZlivNM22t1ESmopPIgfT0duOfQrsjgG4tPxli0zJmF5trdL1JDUIUT1ZXSqQDeR4B8mX3TrRro/2McGeUvLtwo6jIEKMkCUXWsLyZROd9P/rFYNtXPBli0z398iVUlVKAjFlY437JXImUTm2r/4ZYtMy61hf16RPJIU9nZ1MABAwAAAAAAAAAZpwgEwIAAABhp658BScAAAAAAADnUFBQXIDGXLhwtttNHDhw5OcpQRMETBEwRPduylKVB0HRdF0A";else{
+if(!Modernizr.video.h264)return void addTest("videoautoplay",!1);d.src="data:video/mp4;base64,AAAAHGZ0eXBtcDQyAAAAAG1wNDJpc29tYXZjMQAAAz5tb292AAAAbG12aGQAAAAAzaNacc2jWnEAAV+QAAFfkAABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAGGlvZHMAAAAAEICAgAcAT////3//AAACQ3RyYWsAAABcdGtoZAAAAAHNo1pxzaNacQAAAAEAAAAAAAFfkAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAEAAAABAAAAAAAd9tZGlhAAAAIG1kaGQAAAAAzaNacc2jWnEAAV+QAAFfkFXEAAAAAAAhaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAAAAAAGWbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABVnN0YmwAAACpc3RzZAAAAAAAAAABAAAAmWF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAA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nRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTUwIGtleWludF9taW49NSBzY2VuZWN1dD00MCBpbnRyYV9yZWZyZXNoPTAgcmM9Y3FwIG1idHJlZT0wIHFwPTAAgAAAAD5liISscR8A+E4ACAACFoAAITAAAgsAAPgYCoKgoC+L4vi+KAvi+L4YfAEAACMzgABF9AAEUGUgABDJiXnf4AAAAARBmiKUAAAABEGaQpQAAAAEQZpilAAAAARBmoKU"}}catch(f){return void addTest("videoautoplay",!1)}d.setAttribute("autoplay",""),d.style.cssText="display:none",docElement.appendChild(d),setTimeout(function(){d.addEventListener("playing",a,!1),b=setTimeout(a,c)},0)}),Modernizr.addTest("videoloop","loop"in createElement("video")),Modernizr.addTest("videopreload","preload"in createElement("video")),Modernizr.addTest("vml",function(){var a,b=createElement("div"),c=!1;return isSVG||(b.innerHTML='<v:shape id="vml_flag1" adj="1" />',a=b.firstChild,a.style.behavior="url(#default#VML)",c=a?"object"==typeof a.adj:!0),c}),Modernizr.addTest("webintents",!!prefixed("startActivity",navigator)),Modernizr.addTest("webanimations","animate"in createElement("div")),Modernizr.addTest("webgl",function(){var a=createElement("canvas"),b="probablySupportsContext"in a?"probablySupportsContext":"supportsContext";return b in a?a[b]("webgl")||a[b]("experimental-webgl"):"WebGLRenderingContext"in window}),Modernizr.addAsyncTest(function(){if(Modernizr.webglextensions=new Boolean(!1),Modernizr.webgl){var a,b,c;try{a=createElement("canvas"),b=a.getContext("webgl")||a.getContext("experimental-webgl"),c=b.getSupportedExtensions()}catch(d){return}b!==undefined&&(Modernizr.webglextensions=new Boolean(!0));for(var e=-1,f=c.length;++e<f;)Modernizr.webglextensions[c[e]]=!0;a=undefined}}),Modernizr.addTest("peerconnection",!!prefixed("RTCPeerConnection",window)),Modernizr.addTest("datachannel",function(){if(!Modernizr.peerconnection)return!1;for(var a=0,b=domPrefixes.length;b>a;a++){var c=window[domPrefixes[a]+"RTCPeerConnection"];if(c){var d=new c({iceServers:[{url:"stun:0"}]});return"createDataChannel"in d}}return!1}),Modernizr.addTest("getusermedia",!!prefixed("getUserMedia",navigator)),Modernizr.addTest("websockets","WebSocket"in window&&2===window.WebSocket.CLOSING),Modernizr.addTest("websocketsbinary",function(){var a,b="https:"==location.protocol?"wss":"ws";if("WebSocket"in window){if(a="binaryType"in WebSocket.prototype)return a;try{return!!new WebSocket(b+"://.").binaryType}catch(c){}}return!1}),Modernizr.addTest("framed",window.location!=top.location),Modernizr.addAsyncTest(function(){function a(){addTest("blobworkers",!1),b()}function b(){h&&d.revokeObjectURL(h),g&&g.terminate(),i&&clearTimeout(i)}try{var c=window.BlobBuilder,d=window.URL;Modernizr._config.usePrefix&&(c=c||window.MozBlobBuilder||window.WebKitBlobBuilder||window.MSBlobBuilder||window.OBlobBuilder,d=d||window.MozURL||window.webkitURL||window.MSURL||window.OURL);var e,f,g,h,i,j="Modernizr",k="this.onmessage=function(e){postMessage(e.data)}";try{e=new Blob([k],{type:"text/javascript"})}catch(l){}e||(f=new c,f.append(k),e=f.getBlob()),h=d.createObjectURL(e),g=new Worker(h),g.onmessage=function(a){addTest("blobworkers",j===a.data),b()},g.onerror=a,i=setTimeout(a,200),g.postMessage(j)}catch(l){a()}}),Modernizr.addAsyncTest(function(){try{var a="Modernizr",b=new Worker("data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=");b.onmessage=function(c){b.terminate(),addTest("dataworkers",a===c.data),b=null},b.onerror=function(){addTest("dataworkers",!1),b=null},setTimeout(function(){addTest("dataworkers",!1)},200),b.postMessage(a)}catch(c){setTimeout(function(){addTest("dataworkers",!1)},0)}}),Modernizr.addTest("sharedworkers","SharedWorker"in window),Modernizr.addTest("webworkers","Worker"in window),Modernizr.addAsyncTest(function(){function a(){addTest("transferables",!1),b()}function b(){h&&URL.revokeObjectURL(h),i&&i.terminate(),e&&clearTimeout(e)}var c=!!(Modernizr.blobconstructor&&Modernizr.bloburls&&Modernizr.webworkers&&Modernizr.typedarrays);if(!c)return addTest("transferables",!1);try{var d,e,f='var hello = "world"',g=new Blob([f],{type:"text/javascript"}),h=URL.createObjectURL(g),i=new Worker(h);i.onerror=a,e=setTimeout(a,200),d=new ArrayBuffer(1),i.postMessage(d,[d]),addTest("transferables",0===d.byteLength),b()}catch(j){a()}}),testRunner(),setClasses(classes),delete ModernizrProto.addTest,delete ModernizrProto.addAsyncTest;for(var i=0;i<Modernizr._q.length;i++)Modernizr._q[i]();window.Modernizr=Modernizr}(window,document);
\ No newline at end of file
--- /dev/null
+define(['ModernizrProto'], function(ModernizrProto) {
+ // Fake some of Object.create so we can force non test results to be non "own" properties.
+ var Modernizr = function() {};
+ Modernizr.prototype = ModernizrProto;
+
+ // Leak modernizr globally when you `require` it rather than force it here.
+ // Overwrite name so constructor name is nicer :D
+ Modernizr = new Modernizr();
+
+ return Modernizr;
+});
--- /dev/null
+define(['tests'], function(tests) {
+ /**
+ *
+ * ModernizrProto is the constructor for Modernizr
+ *
+ * @class
+ * @access public
+ */
+
+ var ModernizrProto = {
+ // The current version, dummy
+ _version: '__VERSION__',
+
+ // Any settings that don't work as separate modules
+ // can go in here as configuration.
+ _config: {
+ 'classPrefix' : '',
+ 'enableClasses' : true,
+ 'enableJSClass' : true,
+ 'usePrefixes' : true
+ },
+
+ // Queue of tests
+ _q: [],
+
+ // Stub these for people who are listening
+ on: function(test, cb) {
+ // I don't really think people should do this, but we can
+ // safe guard it a bit.
+ // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.
+ // This is in case people listen to synchronous tests. I would leave it out,
+ // but the code to *disallow* sync tests in the real version of this
+ // function is actually larger than this.
+ var self = this;
+ setTimeout(function() {
+ cb(self[test]);
+ }, 0);
+ },
+
+ addTest: function(name, fn, options) {
+ tests.push({name : name, fn : fn, options : options});
+ },
+
+ addAsyncTest: function(fn) {
+ tests.push({name : null, fn : fn});
+ }
+ };
+
+ return ModernizrProto;
+});
--- /dev/null
+define(['ModernizrProto', 'Modernizr', 'hasOwnProp', 'setClasses'], function(ModernizrProto, Modernizr, hasOwnProp, setClasses) {
+
+ // _l tracks listeners for async tests, as well as tests that execute after the initial run
+ ModernizrProto._l = {};
+
+ /**
+ * Modernizr.on is a way to listen for the completion of async tests. Being
+ * asynchronous, they may not finish before your scripts run. As a result you
+ * will get a possibly false negative `undefined` value.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.on
+ * @access public
+ * @function on
+ * @param {string} feature - String name of the feature detect
+ * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not
+ * @example
+ *
+ * ```js
+ * Modernizr.on('flash', function( result ) {
+ * if (result) {
+ * // the browser has flash
+ * } else {
+ * // the browser does not have flash
+ * }
+ * });
+ * ```
+ */
+
+ ModernizrProto.on = function(feature, cb) {
+ // Create the list of listeners if it doesn't exist
+ if (!this._l[feature]) {
+ this._l[feature] = [];
+ }
+
+ // Push this test on to the listener list
+ this._l[feature].push(cb);
+
+ // If it's already been resolved, trigger it on next tick
+ if (Modernizr.hasOwnProperty(feature)) {
+ // Next Tick
+ setTimeout(function() {
+ Modernizr._trigger(feature, Modernizr[feature]);
+ }, 0);
+ }
+ };
+
+ /**
+ * _trigger is the private function used to signal test completion and run any
+ * callbacks registered through [Modernizr.on](#modernizr-on)
+ *
+ * @memberof Modernizr
+ * @name Modernizr._trigger
+ * @access private
+ * @function _trigger
+ * @param {string} feature - string name of the feature detect
+ * @param {function|boolean} [res] - A feature detection function, or the boolean =
+ * result of a feature detection function
+ */
+
+ ModernizrProto._trigger = function(feature, res) {
+ if (!this._l[feature]) {
+ return;
+ }
+
+ var cbs = this._l[feature];
+
+ // Force async
+ setTimeout(function() {
+ var i, cb;
+ for (i = 0; i < cbs.length; i++) {
+ cb = cbs[i];
+ cb(res);
+ }
+ }, 0);
+
+ // Don't trigger these again
+ delete this._l[feature];
+ };
+
+ /**
+ * addTest allows you to define your own feature detects that are not currently
+ * included in Modernizr (under the covers it's the exact same code Modernizr
+ * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result
+ * will be added onto the Modernizr object, as well as an appropriate className set on
+ * the html element when configured to do so
+ *
+ * @memberof Modernizr
+ * @name Modernizr.addTest
+ * @optionName Modernizr.addTest()
+ * @optionProp addTest
+ * @access public
+ * @function addTest
+ * @param {string|object} feature - The string name of the feature detect, or an
+ * object of feature detect names and test
+ * @param {function|boolean} test - Function returning true if feature is supported,
+ * false if not. Otherwise a boolean representing the results of a feature detection
+ * @example
+ *
+ * The most common way of creating your own feature detects is by calling
+ * `Modernizr.addTest` with a string (preferably just lowercase, without any
+ * punctuation), and a function you want executed that will return a boolean result
+ *
+ * ```js
+ * Modernizr.addTest('itsTuesday', function() {
+ * var d = new Date();
+ * return d.getDay() === 2;
+ * });
+ * ```
+ *
+ * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday,
+ * and to `false` every other day of the week. One thing to notice is that the names of
+ * feature detect functions are always lowercased when added to the Modernizr object. That
+ * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will.
+ *
+ *
+ * Since we only look at the returned value from any feature detection function,
+ * you do not need to actually use a function. For simple detections, just passing
+ * in a statement that will return a boolean value works just fine.
+ *
+ * ```js
+ * Modernizr.addTest('hasJquery', 'jQuery' in window);
+ * ```
+ *
+ * Just like before, when the above runs `Modernizr.hasjquery` will be true if
+ * jQuery has been included on the page. Not using a function saves a small amount
+ * of overhead for the browser, as well as making your code much more readable.
+ *
+ * Finally, you also have the ability to pass in an object of feature names and
+ * their tests. This is handy if you want to add multiple detections in one go.
+ * The keys should always be a string, and the value can be either a boolean or
+ * function that returns a boolean.
+ *
+ * ```js
+ * var detects = {
+ * 'hasjquery': 'jQuery' in window,
+ * 'itstuesday': function() {
+ * var d = new Date();
+ * return d.getDay() === 2;
+ * }
+ * }
+ *
+ * Modernizr.addTest(detects);
+ * ```
+ *
+ * There is really no difference between the first methods and this one, it is
+ * just a convenience to let you write more readable code.
+ */
+
+ function addTest(feature, test) {
+
+ if (typeof feature == 'object') {
+ for (var key in feature) {
+ if (hasOwnProp(feature, key)) {
+ addTest(key, feature[ key ]);
+ }
+ }
+ } else {
+
+ feature = feature.toLowerCase();
+ var featureNameSplit = feature.split('.');
+ var last = Modernizr[featureNameSplit[0]];
+
+ // Again, we don't check for parent test existence. Get that right, though.
+ if (featureNameSplit.length == 2) {
+ last = last[featureNameSplit[1]];
+ }
+
+ if (typeof last != 'undefined') {
+ // we're going to quit if you're trying to overwrite an existing test
+ // if we were to allow it, we'd do this:
+ // var re = new RegExp("\\b(no-)?" + feature + "\\b");
+ // docElement.className = docElement.className.replace( re, '' );
+ // but, no rly, stuff 'em.
+ return Modernizr;
+ }
+
+ test = typeof test == 'function' ? test() : test;
+
+ // Set the value (this is the magic, right here).
+ if (featureNameSplit.length == 1) {
+ Modernizr[featureNameSplit[0]] = test;
+ } else {
+ // cast to a Boolean, if not one already
+ /* jshint -W053 */
+ if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
+ Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
+ }
+
+ Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test;
+ }
+
+ // Set a single class (either `feature` or `no-feature`)
+ /* jshint -W041 */
+ setClasses([(!!test && test != false ? '' : 'no-') + featureNameSplit.join('-')]);
+ /* jshint +W041 */
+
+ // Trigger the event
+ Modernizr._trigger(feature, test);
+ }
+
+ return Modernizr; // allow chaining.
+ }
+
+ // After all the tests are run, add self to the Modernizr prototype
+ Modernizr._q.push(function() {
+ ModernizrProto.addTest = addTest;
+ });
+
+ return addTest;
+});
--- /dev/null
+define(['ModernizrProto', 'cssomPrefixes'], function(ModernizrProto, prefixes) {
+ /**
+ * atRule returns a given CSS property at-rule (eg @keyframes), possibly in
+ * some prefixed form, or false, in the case of an unsupported rule
+ *
+ * @memberof Modernizr
+ * @name Modernizr.atRule
+ * @optionName Modernizr.atRule()
+ * @optionProp atRule
+ * @access public
+ * @function atRule
+ * @param {string} prop - String name of the @-rule to test for
+ * @returns {string|false} The string representing the (possibly prefixed)
+ * valid version of the @-rule, or `false` when it is unsupported.
+ * @example
+ * ```js
+ * var keyframes = Modernizr.atRule('@keyframes');
+ *
+ * if (keyframes) {
+ * // keyframes are supported
+ * // could be `@-webkit-keyframes` or `@keyframes`
+ * } else {
+ * // keyframes === `false`
+ * }
+ * ```
+ *
+ */
+
+ var atRule = function(prop) {
+ var length = prefixes.length;
+ var cssrule = window.CSSRule;
+ var rule;
+
+ if (typeof cssrule === 'undefined') {
+ return undefined;
+ }
+
+ if (!prop) {
+ return false;
+ }
+
+ // remove literal @ from beginning of provided property
+ prop = prop.replace(/^@/, '');
+
+ // CSSRules use underscores instead of dashes
+ rule = prop.replace(/-/g, '_').toUpperCase() + '_RULE';
+
+ if (rule in cssrule) {
+ return '@' + prop;
+ }
+
+ for (var i = 0; i < length; i++) {
+ // prefixes gives us something like -o-, and we want O_
+ var prefix = prefixes[i];
+ var thisRule = prefix.toUpperCase() + '_' + rule;
+
+ if (thisRule in cssrule) {
+ return '@-' + prefix.toLowerCase() + '-' + prop;
+ }
+ }
+
+ return false;
+ };
+
+ ModernizrProto.atRule = atRule;
+
+ return atRule;
+});
--- /dev/null
+define(function() {
+ var classes = [];
+ return classes;
+});
--- /dev/null
+define(function() {
+
+ /**
+ * contains checks to see if a string contains another string
+ *
+ * @access private
+ * @function contains
+ * @param {string} str - The string we want to check for substrings
+ * @param {string} substr - The substring we want to search the first string for
+ * @returns {boolean}
+ */
+
+ function contains(str, substr) {
+ return !!~('' + str).indexOf(substr);
+ }
+
+ return contains;
+});
--- /dev/null
+define(['isSVG'], function(isSVG) {
+ /**
+ * createElement is a convenience wrapper around document.createElement. Since we
+ * use createElement all over the place, this allows for (slightly) smaller code
+ * as well as abstracting away issues with creating elements in contexts other than
+ * HTML documents (e.g. SVG documents).
+ *
+ * @access private
+ * @function createElement
+ * @returns {HTMLElement|SVGElement} An HTML or SVG element
+ */
+
+ function createElement() {
+ if (typeof document.createElement !== 'function') {
+ // This is the case in IE7, where the type of createElement is "object".
+ // For this reason, we cannot call apply() as Object is not a Function.
+ return document.createElement(arguments[0]);
+ } else if (isSVG) {
+ return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);
+ } else {
+ return document.createElement.apply(document, arguments);
+ }
+ }
+
+ return createElement;
+});
--- /dev/null
+define(function() {
+ /**
+ * cssToDOM takes a kebab-case string and converts it to camelCase
+ * e.g. box-sizing -> boxSizing
+ *
+ * @access private
+ * @function cssToDOM
+ * @param {string} name - String name of kebab-case prop we want to convert
+ * @returns {string} The camelCase version of the supplied name
+ */
+
+ function cssToDOM(name) {
+ return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
+ return m1 + m2.toUpperCase();
+ }).replace(/^-/, '');
+ }
+ return cssToDOM;
+});
--- /dev/null
+define(['ModernizrProto', 'omPrefixes'], function(ModernizrProto, omPrefixes) {
+ var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);
+ ModernizrProto._cssomPrefixes = cssomPrefixes;
+ return cssomPrefixes;
+});
--- /dev/null
+define(function() {
+ /**
+ * docElement is a convenience wrapper to grab the root element of the document
+ *
+ * @access private
+ * @returns {HTMLElement|SVGElement} The root element of the document
+ */
+
+ var docElement = document.documentElement;
+ return docElement;
+});
--- /dev/null
+define(['ModernizrProto', 'omPrefixes'], function(ModernizrProto, omPrefixes) {
+ /**
+ * List of JavaScript DOM values used for tests
+ *
+ * @memberof Modernizr
+ * @name Modernizr._domPrefixes
+ * @optionName Modernizr._domPrefixes
+ * @optionProp domPrefixes
+ * @access public
+ * @example
+ *
+ * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather
+ * than kebab-case properties, all properties are their Capitalized variant
+ *
+ * ```js
+ * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ];
+ * ```
+ */
+
+ var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);
+ ModernizrProto._domPrefixes = domPrefixes;
+ return domPrefixes;
+});
--- /dev/null
+define(function() {
+ /**
+ * domToCSS takes a camelCase string and converts it to kebab-case
+ * e.g. boxSizing -> box-sizing
+ *
+ * @access private
+ * @function domToCSS
+ * @param {string} name - String name of camelCase prop we want to convert
+ * @returns {string} The kebab-case version of the supplied name
+ */
+
+ function domToCSS(name) {
+ return name.replace(/([A-Z])/g, function(str, m1) {
+ return '-' + m1.toLowerCase();
+ }).replace(/^ms-/, '-ms-');
+ }
+ return domToCSS;
+});
--- /dev/null
+define(function() {
+ /**
+ * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.
+ *
+ * @access private
+ * @function fnBind
+ * @param {function} fn - a function you want to change `this` reference to
+ * @param {object} that - the `this` you want to call the function with
+ * @returns {function} The wrapped version of the supplied function
+ */
+
+ function fnBind(fn, that) {
+ return function() {
+ return fn.apply(that, arguments);
+ };
+ }
+
+ return fnBind;
+});
--- /dev/null
+define(['lodash'], function(_) {
+ /**
+ * generate creates the base version of a Modernizr build, before the r.js
+ * optimizer actually generates the final code
+ *
+ * @access private
+ * @function generate
+ * @param {object} [config] - A configuration object
+ * @param {array} [config.options[]] - An array of options to include in the build
+ * @param {array} [config.feature-detects[]] - An array of the feature detects to include
+ * @returns {string} A string of the require.js build
+ */
+
+ return function generate(config) {
+ // Set some defaults
+ if (!config) {
+ config = {};
+ }
+
+ config.options = config.options || [];
+ config['feature-detects'] = config['feature-detects'] || [];
+
+ // Some special cases
+ var setClasses = _.contains(config.options, 'setClasses');
+
+ // Remove the special cases
+ config.options = _.without(config.options, 'setClasses');
+
+ var output = 'require(["ModernizrProto", "Modernizr", "testRunner"';
+
+ // Needed named module requires
+ if (setClasses) {
+ output += ', "setClasses", "classes"';
+ }
+
+ // Only allow one shiv at a time
+ if (_.includes(config.options, 'html5printshiv')) {
+ config.options = _.without(config.options, 'html5shiv');
+ }
+
+ // Load in the rest of the options (they dont return values, so they aren't declared
+ _.forEach(config.options, function(option) {
+ output += ', "' + option + '"';
+ });
+
+ // Load in all the detects
+ _.forEach(config['feature-detects'], function(detect) {
+ detect = detect.indexOf('test/') === 0 ? detect : 'test/' + detect;
+ output += ', "' + detect + '"';
+ });
+
+ output += '], function( ModernizrProto, Modernizr, testRunner';
+
+ // Needed named module declarations
+ if (setClasses) {
+ output += ', setClasses, classes';
+ }
+
+ output += ') {\n' +
+ ' // Run each test\n' +
+ ' testRunner();\n' +
+ '\n';
+
+ // Actually run the setClasses function
+ if (setClasses) {
+ output += ' // Remove the "no-js" class if it exists\n' +
+ ' setClasses(classes);\n' +
+ '\n';
+ }
+
+ output += ' delete ModernizrProto.addTest;\n';
+ output += ' delete ModernizrProto.addAsyncTest;\n' +
+ '\n';
+
+ // TODO:: if there's a way to figure out if there will be no
+ // items in this queue, then we could avoid the code.
+ output += ' // Run the things that are supposed to run after the tests\n' +
+ ' for (var i = 0; i < Modernizr._q.length; i++) {\n' +
+ ' Modernizr._q[i]();\n' +
+ ' }\n\n';
+
+ output += ' // Leak Modernizr namespace\n' +
+ ' window.Modernizr = Modernizr;\n' +
+ '\n' +
+ '});';
+
+ return output;
+ };
+});
--- /dev/null
+define(['createElement', 'isSVG'], function(createElement, isSVG) {
+ /**
+ * getBody returns the body of a document, or an element that can stand in for
+ * the body if a real body does not exist
+ *
+ * @access private
+ * @function getBody
+ * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an
+ * artificially created element that stands in for the body
+ */
+
+ function getBody() {
+ // After page load injecting a fake body doesn't work so check if body exists
+ var body = document.body;
+
+ if (!body) {
+ // Can't use the real body create a fake one.
+ body = createElement(isSVG ? 'svg' : 'body');
+ body.fake = true;
+ }
+
+ return body;
+ }
+
+ return getBody;
+});
--- /dev/null
+define(['ModernizrProto', 'createElement'], function(ModernizrProto, createElement) {
+ /**
+ * Modernizr.hasEvent() detects support for a given event
+ *
+ * @memberof Modernizr
+ * @name Modernizr.hasEvent
+ * @optionName Modernizr.hasEvent()
+ * @optionProp hasEvent
+ * @access public
+ * @function hasEvent
+ * @param {string|*} eventName is the name of an event to test for (e.g. "resize")
+ * @param {Element|string} [element=HTMLDivElement] is the element|document|window|tagName to test on
+ * @returns {boolean}
+ * @example
+ * `Modernizr.hasEvent` lets you determine if the browser supports a supplied event.
+ * By default, it does this detection on a div element
+ *
+ * ```js
+ * hasEvent('blur') // true;
+ * ```
+ *
+ * However, you are able to give an object as a second argument to hasEvent to
+ * detect an event on something other than a div.
+ *
+ * ```js
+ * hasEvent('devicelight', window) // true;
+ * ```
+ *
+ */
+
+ var hasEvent = (function(undefined) {
+
+ // Detect whether event support can be detected via `in`. Test on a DOM element
+ // using the "blur" event b/c it should always exist. bit.ly/event-detection
+ var needsFallback = !('onblur' in document.documentElement);
+
+ function inner(eventName, element) {
+
+ var isSupported;
+ if (!eventName) { return false; }
+ if (!element || typeof element === 'string') {
+ element = createElement(element || 'div');
+ }
+
+ // Testing via the `in` operator is sufficient for modern browsers and IE.
+ // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and
+ // "resize", whereas `in` "catches" those.
+ eventName = 'on' + eventName;
+ isSupported = eventName in element;
+
+ // Fallback technique for old Firefox - bit.ly/event-detection
+ if (!isSupported && needsFallback) {
+ if (!element.setAttribute) {
+ // Switch to generic element if it lacks `setAttribute`.
+ // It could be the `document`, `window`, or something else.
+ element = createElement('div');
+ }
+
+ element.setAttribute(eventName, '');
+ isSupported = typeof element[eventName] === 'function';
+
+ if (element[eventName] !== undefined) {
+ // If property was created, "remove it" by setting value to `undefined`.
+ element[eventName] = undefined;
+ }
+ element.removeAttribute(eventName);
+ }
+
+ return isSupported;
+ }
+ return inner;
+ })();
+
+
+ ModernizrProto.hasEvent = hasEvent;
+ return hasEvent;
+});
--- /dev/null
+define(['is'], function(is) {
+ /**
+ * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support
+ *
+ * @author kangax
+ * @access private
+ * @function hasOwnProp
+ * @param {object} object - The object to check for a property
+ * @param {string} property - The property to check for
+ * @returns {boolean}
+ */
+
+ // hasOwnProperty shim by kangax needed for Safari 2.0 support
+ var hasOwnProp;
+
+ (function() {
+ var _hasOwnProperty = ({}).hasOwnProperty;
+ /* istanbul ignore else */
+ /* we have no way of testing IE 5.5 or safari 2,
+ * so just assume the else gets hit */
+ if (!is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined')) {
+ hasOwnProp = function(object, property) {
+ return _hasOwnProperty.call(object, property);
+ };
+ }
+ else {
+ hasOwnProp = function(object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
+ return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
+ };
+ }
+ })();
+
+ return hasOwnProp;
+});
--- /dev/null
+define(['isSVG'], function(isSVG) {
+/**
+ * @optionName html5printshiv
+ * @optionProp html5printshiv
+ */
+
+ // Take the html5 variable out of the html5shiv scope so we can return it.
+ var html5;
+ if (!isSVG) {
+
+ /**
+ * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+ */
+ ;(function(window, document) {
+ /*jshint evil:true */
+ /** version */
+ var version = '3.7.2';
+
+ /** Preset options */
+ var options = window.html5 || {};
+
+ /** Used to skip problem elements */
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+ /** Not all elements can be cloned in IE **/
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+ /** Detect whether the browser supports default html5 styles */
+ var supportsHtml5Styles;
+
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
+ var expando = '_html5shiv';
+
+ /** The id for the the documents expando */
+ var expanID = 0;
+
+ /** Cached data for each document */
+ var expandoData = {};
+
+ /** Detect whether the browser supports unknown elements */
+ var supportsUnknownElements;
+
+ (function() {
+ try {
+ var a = document.createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+ supportsHtml5Styles = ('hidden' in a);
+
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
+ // assign a false positive if unable to shiv
+ (document.createElement)('a');
+ var frag = document.createDocumentFragment();
+ return (
+ typeof frag.cloneNode == 'undefined' ||
+ typeof frag.createDocumentFragment == 'undefined' ||
+ typeof frag.createElement == 'undefined'
+ );
+ }());
+ } catch(e) {
+ // assign a false positive if detection fails => unable to shiv
+ supportsHtml5Styles = true;
+ supportsUnknownElements = true;
+ }
+
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a style sheet with the given CSS text and adds it to the document.
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @param {String} cssText The CSS text.
+ * @returns {StyleSheet} The style element.
+ */
+ function addStyleSheet(ownerDocument, cssText) {
+ var p = ownerDocument.createElement('p'),
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+ p.innerHTML = 'x<style>' + cssText + '</style>';
+ return parent.insertBefore(p.lastChild, parent.firstChild);
+ }
+
+ /**
+ * Returns the value of `html5.elements` as an array.
+ * @private
+ * @returns {Array} An array of shived element node names.
+ */
+ function getElements() {
+ var elements = html5.elements;
+ return typeof elements == 'string' ? elements.split(' ') : elements;
+ }
+
+ /**
+ * Extends the built-in list of html5 elements
+ * @memberOf html5
+ * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
+ * @param {Document} ownerDocument The context document.
+ */
+ function addElements(newElements, ownerDocument) {
+ var elements = html5.elements;
+ if(typeof elements != 'string'){
+ elements = elements.join(' ');
+ }
+ if(typeof newElements != 'string'){
+ newElements = newElements.join(' ');
+ }
+ html5.elements = elements +' '+ newElements;
+ shivDocument(ownerDocument);
+ }
+
+ /**
+ * Returns the data associated to the given document
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Object} An object of data.
+ */
+ function getExpandoData(ownerDocument) {
+ var data = expandoData[ownerDocument[expando]];
+ if (!data) {
+ data = {};
+ expanID++;
+ ownerDocument[expando] = expanID;
+ expandoData[expanID] = data;
+ }
+ return data;
+ }
+
+ /**
+ * returns a shived element for the given nodeName and document
+ * @memberOf html5
+ * @param {String} nodeName name of the element
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived element.
+ */
+ function createElement(nodeName, ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createElement(nodeName);
+ }
+ if (!data) {
+ data = getExpandoData(ownerDocument);
+ }
+ var node;
+
+ if (data.cache[nodeName]) {
+ node = data.cache[nodeName].cloneNode();
+ } else if (saveClones.test(nodeName)) {
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+ } else {
+ node = data.createElem(nodeName);
+ }
+
+ // Avoid adding some elements to fragments in IE < 9 because
+ // * Attributes like `name` or `type` cannot be set/changed once an element
+ // is inserted into a document/fragment
+ // * Link elements with `src` attributes that are inaccessible, as with
+ // a 403 response, will cause the tab/window to crash
+ // * Script elements appended to fragments will execute when their `src`
+ // or `text` property is set
+ return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
+ }
+
+ /**
+ * returns a shived DocumentFragment for the given document
+ * @memberOf html5
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived DocumentFragment.
+ */
+ function createDocumentFragment(ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createDocumentFragment();
+ }
+ data = data || getExpandoData(ownerDocument);
+ var clone = data.frag.cloneNode(),
+ i = 0,
+ elems = getElements(),
+ l = elems.length;
+ for(;i<l;i++){
+ clone.createElement(elems[i]);
+ }
+ return clone;
+ }
+
+ /**
+ * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+ * @private
+ * @param {Document|DocumentFragment} ownerDocument The document.
+ * @param {Object} data of the document.
+ */
+ function shivMethods(ownerDocument, data) {
+ if (!data.cache) {
+ data.cache = {};
+ data.createElem = ownerDocument.createElement;
+ data.createFrag = ownerDocument.createDocumentFragment;
+ data.frag = data.createFrag();
+ }
+
+
+ ownerDocument.createElement = function(nodeName) {
+ //abort shiv
+ if (!html5.shivMethods) {
+ return data.createElem(nodeName);
+ }
+ return createElement(nodeName, ownerDocument, data);
+ };
+
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+ 'var n=f.cloneNode(),c=n.createElement;' +
+ 'h.shivMethods&&(' +
+ // unroll the `createElement` calls
+ getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
+ data.createElem(nodeName);
+ data.frag.createElement(nodeName);
+ return 'c("' + nodeName + '")';
+ }) +
+ ');return n}'
+ )(html5, data.frag);
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivDocument(ownerDocument) {
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ var data = getExpandoData(ownerDocument);
+
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+ data.hasCSS = !!addStyleSheet(ownerDocument,
+ // corrects block display not defined in IE6/7/8/9
+ 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
+ // adds styling not present in IE6/7/8/9
+ 'mark{background:#FF0;color:#000}' +
+ // hides non-rendered elements
+ 'template{display:none}'
+ );
+ }
+ if (!supportsUnknownElements) {
+ shivMethods(ownerDocument, data);
+ }
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * The `html5` object is exposed so that more elements can be shived and
+ * existing shiving can be detected on iframes.
+ * @type Object
+ * @example
+ *
+ * // options can be changed before the script is included
+ * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+ */
+ var html5 = {
+
+ /**
+ * An array or space separated string of node names of the elements to shiv.
+ * @memberOf html5
+ * @type Array|String
+ */
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
+
+ /**
+ * current version of html5shiv
+ */
+ 'version': version,
+
+ /**
+ * A flag to indicate that the HTML5 style sheet should be inserted.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivCSS': (options.shivCSS !== false),
+
+ /**
+ * Is equal to true if a browser supports creating unknown/HTML5 elements
+ * @memberOf html5
+ * @type boolean
+ */
+ 'supportsUnknownElements': supportsUnknownElements,
+
+ /**
+ * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+ * methods should be overwritten.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivMethods': (options.shivMethods !== false),
+
+ /**
+ * A string to describe the type of `html5` object ("default" or "default print").
+ * @memberOf html5
+ * @type String
+ */
+ 'type': 'default',
+
+ // shivs the document according to the specified `html5` object options
+ 'shivDocument': shivDocument,
+
+ //creates a shived element
+ createElement: createElement,
+
+ //creates a shived documentFragment
+ createDocumentFragment: createDocumentFragment,
+
+ //extends list of elements
+ addElements: addElements
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose html5
+ window.html5 = html5;
+
+ // shiv the document
+ shivDocument(document);
+
+ /*------------------------------- Print Shiv -------------------------------*/
+
+ /** Used to filter media types */
+ var reMedia = /^$|\b(?:all|print)\b/;
+
+ /** Used to namespace printable elements */
+ var shivNamespace = 'html5shiv';
+
+ /** Detect whether the browser supports shivable style sheets */
+ var supportsShivableSheets = !supportsUnknownElements && (function() {
+ // assign a false negative if unable to shiv
+ var docEl = document.documentElement;
+ return !(
+ typeof document.namespaces == 'undefined' ||
+ typeof document.parentWindow == 'undefined' ||
+ typeof docEl.applyElement == 'undefined' ||
+ typeof docEl.removeNode == 'undefined' ||
+ typeof window.attachEvent == 'undefined'
+ );
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Wraps all HTML5 elements in the given document with printable elements.
+ * (eg. the "header" element is wrapped with the "html5shiv:header" element)
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Array} An array wrappers added.
+ */
+ function addWrappers(ownerDocument) {
+ var node,
+ nodes = ownerDocument.getElementsByTagName('*'),
+ index = nodes.length,
+ reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'),
+ result = [];
+
+ while (index--) {
+ node = nodes[index];
+ if (reElements.test(node.nodeName)) {
+ result.push(node.applyElement(createWrapper(node)));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a printable wrapper for the given element.
+ * @private
+ * @param {Element} element The element.
+ * @returns {Element} The wrapper.
+ */
+ function createWrapper(element) {
+ var node,
+ nodes = element.attributes,
+ index = nodes.length,
+ wrapper = element.ownerDocument.createElement(shivNamespace + ':' + element.nodeName);
+
+ // copy element attributes to the wrapper
+ while (index--) {
+ node = nodes[index];
+ node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue);
+ }
+ // copy element styles to the wrapper
+ wrapper.style.cssText = element.style.cssText;
+ return wrapper;
+ }
+
+ /**
+ * Shivs the given CSS text.
+ * (eg. header{} becomes html5shiv\:header{})
+ * @private
+ * @param {String} cssText The CSS text to shiv.
+ * @returns {String} The shived CSS text.
+ */
+ function shivCssText(cssText) {
+ var pair,
+ parts = cssText.split('{'),
+ index = parts.length,
+ reElements = RegExp('(^|[\\s,>+~])(' + getElements().join('|') + ')(?=[[\\s,>+~#.:]|$)', 'gi'),
+ replacement = '$1' + shivNamespace + '\\:$2';
+
+ while (index--) {
+ pair = parts[index] = parts[index].split('}');
+ pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement);
+ parts[index] = pair.join('}');
+ }
+ return parts.join('{');
+ }
+
+ /**
+ * Removes the given wrappers, leaving the original elements.
+ * @private
+ * @params {Array} wrappers An array of printable wrappers.
+ */
+ function removeWrappers(wrappers) {
+ var index = wrappers.length;
+ while (index--) {
+ wrappers[index].removeNode();
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document for print.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivPrint(ownerDocument) {
+ var shivedSheet,
+ wrappers,
+ data = getExpandoData(ownerDocument),
+ namespaces = ownerDocument.namespaces,
+ ownerWindow = ownerDocument.parentWindow;
+
+ if (!supportsShivableSheets || ownerDocument.printShived) {
+ return ownerDocument;
+ }
+ if (typeof namespaces[shivNamespace] == 'undefined') {
+ namespaces.add(shivNamespace);
+ }
+
+ function removeSheet() {
+ clearTimeout(data._removeSheetTimer);
+ if (shivedSheet) {
+ shivedSheet.removeNode(true);
+ }
+ shivedSheet= null;
+ }
+
+ ownerWindow.attachEvent('onbeforeprint', function() {
+
+ removeSheet();
+
+ var imports,
+ length,
+ sheet,
+ collection = ownerDocument.styleSheets,
+ cssText = [],
+ index = collection.length,
+ sheets = Array(index);
+
+ // convert styleSheets collection to an array
+ while (index--) {
+ sheets[index] = collection[index];
+ }
+ // concat all style sheet CSS text
+ while ((sheet = sheets.pop())) {
+ // IE does not enforce a same origin policy for external style sheets...
+ // but has trouble with some dynamically created stylesheets
+ if (!sheet.disabled && reMedia.test(sheet.media)) {
+
+ try {
+ imports = sheet.imports;
+ length = imports.length;
+ } catch(er){
+ length = 0;
+ }
+
+ for (index = 0; index < length; index++) {
+ sheets.push(imports[index]);
+ }
+
+ try {
+ cssText.push(sheet.cssText);
+ } catch(er){}
+ }
+ }
+
+ // wrap all HTML5 elements with printable elements and add the shived style sheet
+ cssText = shivCssText(cssText.reverse().join(''));
+ wrappers = addWrappers(ownerDocument);
+ shivedSheet = addStyleSheet(ownerDocument, cssText);
+
+ });
+
+ ownerWindow.attachEvent('onafterprint', function() {
+ // remove wrappers, leaving the original elements, and remove the shived style sheet
+ removeWrappers(wrappers);
+ clearTimeout(data._removeSheetTimer);
+ data._removeSheetTimer = setTimeout(removeSheet, 500);
+ });
+
+ ownerDocument.printShived = true;
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose API
+ html5.type += ' print';
+ html5.shivPrint = shivPrint;
+
+ // shiv for print
+ shivPrint(document);
+
+ }(this, document));
+ }
+
+ return html5;
+});
--- /dev/null
+define(['isSVG'], function(isSVG) {
+/**
+ * @optionName html5shiv
+ * @optionProp html5shiv
+ */
+
+ // Take the html5 variable out of the html5shiv scope so we can return it.
+ var html5;
+ if (!isSVG) {
+ /**
+ * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+ */
+ ;(function(window, document) {
+ /*jshint evil:true */
+ /** version */
+ var version = '3.7.2';
+
+ /** Preset options */
+ var options = window.html5 || {};
+
+ /** Used to skip problem elements */
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+ /** Not all elements can be cloned in IE **/
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+ /** Detect whether the browser supports default html5 styles */
+ var supportsHtml5Styles;
+
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
+ var expando = '_html5shiv';
+
+ /** The id for the the documents expando */
+ var expanID = 0;
+
+ /** Cached data for each document */
+ var expandoData = {};
+
+ /** Detect whether the browser supports unknown elements */
+ var supportsUnknownElements;
+
+ (function() {
+ try {
+ var a = document.createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+ supportsHtml5Styles = ('hidden' in a);
+
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
+ // assign a false positive if unable to shiv
+ (document.createElement)('a');
+ var frag = document.createDocumentFragment();
+ return (
+ typeof frag.cloneNode == 'undefined' ||
+ typeof frag.createDocumentFragment == 'undefined' ||
+ typeof frag.createElement == 'undefined'
+ );
+ }());
+ } catch(e) {
+ // assign a false positive if detection fails => unable to shiv
+ supportsHtml5Styles = true;
+ supportsUnknownElements = true;
+ }
+
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a style sheet with the given CSS text and adds it to the document.
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @param {String} cssText The CSS text.
+ * @returns {StyleSheet} The style element.
+ */
+ function addStyleSheet(ownerDocument, cssText) {
+ var p = ownerDocument.createElement('p'),
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+ p.innerHTML = 'x<style>' + cssText + '</style>';
+ return parent.insertBefore(p.lastChild, parent.firstChild);
+ }
+
+ /**
+ * Returns the value of `html5.elements` as an array.
+ * @private
+ * @returns {Array} An array of shived element node names.
+ */
+ function getElements() {
+ var elements = html5.elements;
+ return typeof elements == 'string' ? elements.split(' ') : elements;
+ }
+
+ /**
+ * Extends the built-in list of html5 elements
+ * @memberOf html5
+ * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
+ * @param {Document} ownerDocument The context document.
+ */
+ function addElements(newElements, ownerDocument) {
+ var elements = html5.elements;
+ if(typeof elements != 'string'){
+ elements = elements.join(' ');
+ }
+ if(typeof newElements != 'string'){
+ newElements = newElements.join(' ');
+ }
+ html5.elements = elements +' '+ newElements;
+ shivDocument(ownerDocument);
+ }
+
+ /**
+ * Returns the data associated to the given document
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Object} An object of data.
+ */
+ function getExpandoData(ownerDocument) {
+ var data = expandoData[ownerDocument[expando]];
+ if (!data) {
+ data = {};
+ expanID++;
+ ownerDocument[expando] = expanID;
+ expandoData[expanID] = data;
+ }
+ return data;
+ }
+
+ /**
+ * returns a shived element for the given nodeName and document
+ * @memberOf html5
+ * @param {String} nodeName name of the element
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived element.
+ */
+ function createElement(nodeName, ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createElement(nodeName);
+ }
+ if (!data) {
+ data = getExpandoData(ownerDocument);
+ }
+ var node;
+
+ if (data.cache[nodeName]) {
+ node = data.cache[nodeName].cloneNode();
+ } else if (saveClones.test(nodeName)) {
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+ } else {
+ node = data.createElem(nodeName);
+ }
+
+ // Avoid adding some elements to fragments in IE < 9 because
+ // * Attributes like `name` or `type` cannot be set/changed once an element
+ // is inserted into a document/fragment
+ // * Link elements with `src` attributes that are inaccessible, as with
+ // a 403 response, will cause the tab/window to crash
+ // * Script elements appended to fragments will execute when their `src`
+ // or `text` property is set
+ return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
+ }
+
+ /**
+ * returns a shived DocumentFragment for the given document
+ * @memberOf html5
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived DocumentFragment.
+ */
+ function createDocumentFragment(ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createDocumentFragment();
+ }
+ data = data || getExpandoData(ownerDocument);
+ var clone = data.frag.cloneNode(),
+ i = 0,
+ elems = getElements(),
+ l = elems.length;
+ for(;i<l;i++){
+ clone.createElement(elems[i]);
+ }
+ return clone;
+ }
+
+ /**
+ * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+ * @private
+ * @param {Document|DocumentFragment} ownerDocument The document.
+ * @param {Object} data of the document.
+ */
+ function shivMethods(ownerDocument, data) {
+ if (!data.cache) {
+ data.cache = {};
+ data.createElem = ownerDocument.createElement;
+ data.createFrag = ownerDocument.createDocumentFragment;
+ data.frag = data.createFrag();
+ }
+
+
+ ownerDocument.createElement = function(nodeName) {
+ //abort shiv
+ if (!html5.shivMethods) {
+ return data.createElem(nodeName);
+ }
+ return createElement(nodeName, ownerDocument, data);
+ };
+
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+ 'var n=f.cloneNode(),c=n.createElement;' +
+ 'h.shivMethods&&(' +
+ // unroll the `createElement` calls
+ getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
+ data.createElem(nodeName);
+ data.frag.createElement(nodeName);
+ return 'c("' + nodeName + '")';
+ }) +
+ ');return n}'
+ )(html5, data.frag);
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivDocument(ownerDocument) {
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ var data = getExpandoData(ownerDocument);
+
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+ data.hasCSS = !!addStyleSheet(ownerDocument,
+ // corrects block display not defined in IE6/7/8/9
+ 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
+ // adds styling not present in IE6/7/8/9
+ 'mark{background:#FF0;color:#000}' +
+ // hides non-rendered elements
+ 'template{display:none}'
+ );
+ }
+ if (!supportsUnknownElements) {
+ shivMethods(ownerDocument, data);
+ }
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * The `html5` object is exposed so that more elements can be shived and
+ * existing shiving can be detected on iframes.
+ * @type Object
+ * @example
+ *
+ * // options can be changed before the script is included
+ * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+ */
+ var html5 = {
+
+ /**
+ * An array or space separated string of node names of the elements to shiv.
+ * @memberOf html5
+ * @type Array|String
+ */
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
+
+ /**
+ * current version of html5shiv
+ */
+ 'version': version,
+
+ /**
+ * A flag to indicate that the HTML5 style sheet should be inserted.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivCSS': (options.shivCSS !== false),
+
+ /**
+ * Is equal to true if a browser supports creating unknown/HTML5 elements
+ * @memberOf html5
+ * @type boolean
+ */
+ 'supportsUnknownElements': supportsUnknownElements,
+
+ /**
+ * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+ * methods should be overwritten.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivMethods': (options.shivMethods !== false),
+
+ /**
+ * A string to describe the type of `html5` object ("default" or "default print").
+ * @memberOf html5
+ * @type String
+ */
+ 'type': 'default',
+
+ // shivs the document according to the specified `html5` object options
+ 'shivDocument': shivDocument,
+
+ //creates a shived element
+ createElement: createElement,
+
+ //creates a shived documentFragment
+ createDocumentFragment: createDocumentFragment,
+
+ //extends list of elements
+ addElements: addElements
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose html5
+ window.html5 = html5;
+
+ // shiv the document
+ shivDocument(document);
+
+ }(this, document));
+ }
+return html5;
+});
--- /dev/null
+define(['ModernizrProto', 'docElement', 'createElement', 'getBody'], function(ModernizrProto, docElement, createElement, getBody) {
+ /**
+ * injectElementWithStyles injects an element with style element and some CSS rules
+ *
+ * @access private
+ * @function injectElementWithStyles
+ * @param {string} rule - String representing a css rule
+ * @param {function} callback - A function that is used to test the injected element
+ * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
+ * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
+ * @returns {boolean}
+ */
+
+ function injectElementWithStyles(rule, callback, nodes, testnames) {
+ var mod = 'modernizr';
+ var style;
+ var ret;
+ var node;
+ var docOverflow;
+ var div = createElement('div');
+ var body = getBody();
+
+ if (parseInt(nodes, 10)) {
+ // In order not to give false positives we create a node for each test
+ // This also allows the method to scale for unspecified uses
+ while (nodes--) {
+ node = createElement('div');
+ node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
+ div.appendChild(node);
+ }
+ }
+
+ style = createElement('style');
+ style.type = 'text/css';
+ style.id = 's' + mod;
+
+ // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
+ // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
+ (!body.fake ? div : body).appendChild(style);
+ body.appendChild(div);
+
+ if (style.styleSheet) {
+ style.styleSheet.cssText = rule;
+ } else {
+ style.appendChild(document.createTextNode(rule));
+ }
+ div.id = mod;
+
+ if (body.fake) {
+ //avoid crashing IE8, if background image is used
+ body.style.background = '';
+ //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
+ body.style.overflow = 'hidden';
+ docOverflow = docElement.style.overflow;
+ docElement.style.overflow = 'hidden';
+ docElement.appendChild(body);
+ }
+
+ ret = callback(div, rule);
+ // If this is done after page load we don't want to remove the body so check if body exists
+ if (body.fake) {
+ body.parentNode.removeChild(body);
+ docElement.style.overflow = docOverflow;
+ // Trigger layout so kinetic scrolling isn't disabled in iOS6+
+ docElement.offsetHeight;
+ } else {
+ div.parentNode.removeChild(div);
+ }
+
+ return !!ret;
+
+ }
+
+ return injectElementWithStyles;
+});
--- /dev/null
+define(['createElement'], function(createElement) {
+ /**
+ * since we have a fairly large number of input tests that don't mutate the input
+ * we create a single element that can be shared with all of those tests for a
+ * minor perf boost
+ *
+ * @access private
+ * @returns {HTMLInputElement}
+ */
+ var inputElem = createElement('input');
+ return inputElem;
+});
--- /dev/null
+define(function() {
+ /**
+ * is returns a boolean if the typeof an obj is exactly type.
+ *
+ * @access private
+ * @function is
+ * @param {*} obj - A thing we want to check the type of
+ * @param {string} type - A string to compare the typeof against
+ * @returns {boolean}
+ */
+
+ function is(obj, type) {
+ return typeof obj === type;
+ }
+ return is;
+});
--- /dev/null
+define(['docElement'], function(docElement) {
+ /**
+ * A convenience helper to check if the document we are running in is an SVG document
+ *
+ * @access private
+ * @returns {boolean}
+ */
+
+ var isSVG = docElement.nodeName.toLowerCase() === 'svg';
+ return isSVG;
+});
--- /dev/null
+define(['ModernizrProto'], function(ModernizrProto) {
+ /**
+ * Previously, Modernizr.load was an alias for yepnope. Since yepnope was
+ * deprecated, we removed it as well. It is not available on the website builder,
+ * this is only included as an improved warning to those who build a custom
+ * version locally.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.load
+ * @access private
+ * @function load
+ *
+ */
+
+ var err = function() {};
+ var warn = function() {};
+
+ if (window.console) {
+ err = function() {
+ var method = console.error ? 'error' : 'log';
+ window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
+ };
+
+ warn = function() {
+ var method = console.warn ? 'warn' : 'log';
+ window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
+ };
+ }
+
+ ModernizrProto.load = function() {
+ if ('yepnope' in window) {
+ warn('yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.\n See http://github.com/Modernizr/Modernizr/issues/1182 for more information.');
+ window.yepnope.apply(window, [].slice.call(arguments, 0));
+ } else {
+ err('yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com. See http://github.com/Modernizr/Modernizr/issues/1182 for more information.');
+ }
+ };
+
+});
--- /dev/null
+define(['Modernizr', 'modElem'], function(Modernizr, modElem) {
+ var mStyle = {
+ style : modElem.elem.style
+ };
+
+ // kill ref for gc, must happen before mod.elem is removed, so we unshift on to
+ // the front of the queue.
+ Modernizr._q.unshift(function() {
+ delete mStyle.style;
+ });
+
+ return mStyle;
+});
--- /dev/null
+define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
+ /**
+ * Create our "modernizr" element that we do most feature tests on.
+ *
+ * @access private
+ */
+
+ var modElem = {
+ elem : createElement('modernizr')
+ };
+
+ // Clean up this element
+ Modernizr._q.push(function() {
+ delete modElem.elem;
+ });
+
+ return modElem;
+});
--- /dev/null
+define(['ModernizrProto', 'injectElementWithStyles'], function(ModernizrProto, injectElementWithStyles) {
+ /**
+ * Modernizr.mq tests a given media query, live against the current state of the window
+ * adapted from matchMedia polyfill by Scott Jehl and Paul Irish
+ * gist.github.com/786768
+ *
+ * @memberof Modernizr
+ * @name Modernizr.mq
+ * @optionName Modernizr.mq()
+ * @optionProp mq
+ * @access public
+ * @function mq
+ * @param {string} mq - String of the media query we want to test
+ * @returns {boolean}
+ * @example
+ * Modernizr.mq allows for you to programmatically check if the current browser
+ * window state matches a media query.
+ *
+ * ```js
+ * var query = Modernizr.mq('(min-width: 900px)');
+ *
+ * if (query) {
+ * // the browser window is larger than 900px
+ * }
+ * ```
+ *
+ * Only valid media queries are supported, therefore you must always include values
+ * with your media query
+ *
+ * ```js
+ * // good
+ * Modernizr.mq('(min-width: 900px)');
+ *
+ * // bad
+ * Modernizr.mq('min-width');
+ * ```
+ *
+ * If you would just like to test that media queries are supported in general, use
+ *
+ * ```js
+ * Modernizr.mq('only all'); // true if MQ are supported, false if not
+ * ```
+ *
+ *
+ * Note that if the browser does not support media queries (e.g. old IE) mq will
+ * always return false.
+ */
+
+ var mq = (function() {
+ var matchMedia = window.matchMedia || window.msMatchMedia;
+ if (matchMedia) {
+ return function(mq) {
+ var mql = matchMedia(mq);
+ return mql && mql.matches || false;
+ };
+ }
+
+ return function(mq) {
+ var bool = false;
+
+ injectElementWithStyles('@media ' + mq + ' { #modernizr { position: absolute; } }', function(node) {
+ bool = (window.getComputedStyle ?
+ window.getComputedStyle(node, null) :
+ node.currentStyle)['position'] == 'absolute';
+ });
+
+ return bool;
+ };
+ })();
+
+
+ ModernizrProto.mq = mq;
+
+ return mq;
+});
--- /dev/null
+define(['injectElementWithStyles', 'domToCSS'], function(injectElementWithStyles, domToCSS) {
+ /**
+ * nativeTestProps allows for us to use native feature detection functionality if available.
+ * some prefixed form, or false, in the case of an unsupported rule
+ *
+ * @access private
+ * @function nativeTestProps
+ * @param {array} props - An array of property names
+ * @param {string} value - A string representing the value we want to check via @supports
+ * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise
+ */
+
+ // Accepts a list of property names and a single value
+ // Returns `undefined` if native detection not available
+ function nativeTestProps (props, value) {
+ var i = props.length;
+ // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface
+ if ('CSS' in window && 'supports' in window.CSS) {
+ // Try every prefixed variant of the property
+ while (i--) {
+ if (window.CSS.supports(domToCSS(props[i]), value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ // Otherwise fall back to at-rule (for Opera 12.x)
+ else if ('CSSSupportsRule' in window) {
+ // Build a condition string for every prefixed variant
+ var conditionText = [];
+ while (i--) {
+ conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');
+ }
+ conditionText = conditionText.join(' or ');
+ return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {
+ return getComputedStyle(node, null).position == 'absolute';
+ });
+ }
+ return undefined;
+ }
+ return nativeTestProps;
+});
--- /dev/null
+define(function() {
+ /**
+ * If the browsers follow the spec, then they would expose vendor-specific style as:
+ * elem.style.WebkitBorderRadius
+ * instead of something like the following, which would be technically incorrect:
+ * elem.style.webkitBorderRadius
+
+ * Webkit ghosts their properties in lowercase but Opera & Moz do not.
+ * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
+ * erik.eae.net/archives/2008/03/10/21.48.10/
+
+ * More here: github.com/Modernizr/Modernizr/issues/issue/21
+ *
+ * @access private
+ * @returns {string} The string representing the vendor-specific style properties
+ */
+
+ var omPrefixes = 'Moz O ms Webkit';
+ return omPrefixes;
+});
--- /dev/null
+define(['ModernizrProto', 'testPropsAll', 'cssToDOM', 'atRule'], function(ModernizrProto, testPropsAll, cssToDOM, atRule) {
+ /**
+ * prefixed returns the prefixed or nonprefixed property name variant of your input
+ *
+ * @memberof Modernizr
+ * @name Modernizr.prefixed
+ * @optionName Modernizr.prefixed()
+ * @optionProp prefixed
+ * @access public
+ * @function prefixed
+ * @param {string} prop - String name of the property to test for
+ * @param {object} [obj]- An object to test for the prefixed properties on
+ * @returns {string|false} The string representing the (possibly prefixed) valid
+ * version of the property, or `false` when it is unsupported.
+ * @example
+ *
+ * Modernizr.prefixed takes a string css value in the DOM style camelCase (as
+ * opposed to the css style kebab-case) form and returns the (possibly prefixed)
+ * version of that property that the browser actually supports.
+ *
+ * For example, in older Firefox...
+ * ```js
+ * prefixed('boxSizing')
+ * ```
+ * returns 'MozBoxSizing'
+ *
+ * In newer Firefox, as well as any other browser that support the unprefixed
+ * version would simply return `boxSizing`. Any browser that does not support
+ * the property at all, it will return `false`.
+ *
+ * By default, prefixed is checked against a DOM element. If you want to check
+ * for a property on another object, just pass it as a second argument
+ *
+ * ```js
+ * var rAF = prefixed('requestAnimationFrame', window);
+ *
+ * raf(function() {
+ * renderFunction();
+ * })
+ * ```
+ *
+ * Note that this will return _the actual function_ - not the name of the function.
+ * If you need the actual name of the property, pass in `false` as a third argument
+ *
+ * ```js
+ * var rAFProp = prefixed('requestAnimationFrame', window, false);
+ *
+ * rafProp === 'WebkitRequestAnimationFrame' // in older webkit
+ * ```
+ *
+ * One common use case for prefixed is if you're trying to determine which transition
+ * end event to bind to, you might do something like...
+ * ```js
+ * var transEndEventNames = {
+ * 'WebkitTransition' : 'webkitTransitionEnd', * Saf 6, Android Browser
+ * 'MozTransition' : 'transitionend', * only for FF < 15
+ * 'transition' : 'transitionend' * IE10, Opera, Chrome, FF 15+, Saf 7+
+ * };
+ *
+ * var transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
+ * ```
+ *
+ * If you want a similar lookup, but in kebab-case, you can use [prefixedCSS](#modernizr-prefixedcss).
+ */
+
+ var prefixed = ModernizrProto.prefixed = function(prop, obj, elem) {
+ if (prop.indexOf('@') === 0) {
+ return atRule(prop);
+ }
+
+ if (prop.indexOf('-') != -1) {
+ // Convert kebab-case to camelCase
+ prop = cssToDOM(prop);
+ }
+ if (!obj) {
+ return testPropsAll(prop, 'pfx');
+ } else {
+ // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
+ return testPropsAll(prop, obj, elem);
+ }
+ };
+
+ return prefixed;
+});
--- /dev/null
+define(['ModernizrProto', 'prefixed', 'domToCSS'], function(ModernizrProto, prefixed, domToCSS) {
+ /**
+ * prefixedCSS is just like [prefixed](#modernizr-prefixed), but the returned values are in
+ * kebab-case (e.g. `box-sizing`) rather than camelCase (boxSizing).
+ *
+ * @memberof Modernizr
+ * @name Modernizr.prefixedCSS
+ * @optionName Modernizr.prefixedCSS()
+ * @optionProp prefixedCSS
+ * @access public
+ * @function prefixedCSS
+ * @param {string} prop - String name of the property to test for
+ * @returns {string|false} The string representing the (possibly prefixed)
+ * valid version of the property, or `false` when it is unsupported.
+ * @example
+ *
+ * `Modernizr.prefixedCSS` is like `Modernizr.prefixed`, but returns the result
+ * in hyphenated form
+ *
+ * ```js
+ * Modernizr.prefixedCSS('transition') // '-moz-transition' in old Firefox
+ * ```
+ *
+ * Since it is only useful for CSS style properties, it can only be tested against
+ * an HTMLElement.
+ *
+ * Properties can be passed as both the DOM style camelCase or CSS style kebab-case.
+ */
+
+ var prefixedCSS = ModernizrProto.prefixedCSS = function(prop) {
+ var prefixedProp = prefixed(prop);
+ return prefixedProp && domToCSS(prefixedProp);
+ };
+ return prefixedCSS;
+});
--- /dev/null
+define(['ModernizrProto'], function(ModernizrProto) {
+ /**
+ * List of property values to set for css tests. See ticket #21
+ * http://git.io/vUGl4
+ *
+ * @memberof Modernizr
+ * @name Modernizr._prefixes
+ * @optionName Modernizr._prefixes
+ * @optionProp prefixes
+ * @access public
+ * @example
+ *
+ * Modernizr._prefixes is the internal list of prefixes that we test against
+ * inside of things like [prefixed](#modernizr-prefixed) and [prefixedCSS](#-code-modernizr-prefixedcss). It is simply
+ * an array of kebab-case vendor prefixes you can use within your code.
+ *
+ * Some common use cases include
+ *
+ * Generating all possible prefixed version of a CSS property
+ * ```js
+ * var rule = Modernizr._prefixes.join('transform: rotate(20deg); ');
+ *
+ * rule === 'transform: rotate(20deg); webkit-transform: rotate(20deg); moz-transform: rotate(20deg); o-transform: rotate(20deg); ms-transform: rotate(20deg);'
+ * ```
+ *
+ * Generating all possible prefixed version of a CSS value
+ * ```js
+ * rule = 'display:' + Modernizr._prefixes.join('flex; display:') + 'flex';
+ *
+ * rule === 'display:flex; display:-webkit-flex; display:-moz-flex; display:-o-flex; display:-ms-flex; display:flex'
+ * ```
+ */
+
+ var prefixes = (ModernizrProto._config.usePrefixes ? ' -webkit- -moz- -o- -ms- '.split(' ') : []);
+
+ // expose these for the plugin API. Look in the source for how to join() them against your input
+ ModernizrProto._prefixes = prefixes;
+
+ return prefixes;
+});
--- /dev/null
+define(function() {
+ /**
+ * roundedEquals takes two integers and checks if the first is within 1 of the second
+ *
+ * @access private
+ * @function roundedEquals
+ * @param {number} a
+ * @param {number} b
+ * @returns {boolean}
+ */
+
+ function roundedEquals(a, b) {
+ return a - 1 === b || a === b || a + 1 === b;
+ }
+
+ return roundedEquals;
+});
--- /dev/null
+define(['Modernizr', 'docElement', 'isSVG'], function(Modernizr, docElement, isSVG) {
+ /**
+ * setClasses takes an array of class names and adds them to the root element
+ *
+ * @access private
+ * @function setClasses
+ * @param {string[]} classes - Array of class names
+ */
+
+ // Pass in an and array of class names, e.g.:
+ // ['no-webp', 'borderradius', ...]
+ function setClasses(classes) {
+ var className = docElement.className;
+ var classPrefix = Modernizr._config.classPrefix || '';
+
+ if (isSVG) {
+ className = className.baseVal;
+ }
+
+ // Change `no-js` to `js` (independently of the `enableClasses` option)
+ // Handle classPrefix on this too
+ if (Modernizr._config.enableJSClass) {
+ var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)');
+ className = className.replace(reJS, '$1' + classPrefix + 'js$2');
+ }
+
+ if (Modernizr._config.enableClasses) {
+ // Add the new classes
+ className += ' ' + classPrefix + classes.join(' ' + classPrefix);
+ isSVG ? docElement.className.baseVal = className : docElement.className = className;
+ }
+
+ }
+
+ return setClasses;
+});
--- /dev/null
+define(['classes'], function(classes) {
+ /**
+ * slice exposes Array.prototype.slice to convert array-like objects to actual
+ * arrays in a compact format without recreating new arrays over and over again
+ * (which leads to decreased performance)
+ *
+ * @access private
+ */
+
+ var slice = classes.slice;
+ return slice;
+});
--- /dev/null
+define(['ModernizrProto', 'testPropsAll'], function(ModernizrProto, testPropsAll) {
+ /**
+ * testAllProps determines whether a given CSS property is supported in the browser
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testAllProps
+ * @optionName Modernizr.testAllProps()
+ * @optionProp testAllProps
+ * @access public
+ * @function testAllProps
+ * @param {string} prop - String naming the property to test (either camelCase or kebab-case)
+ * @param {string} [value] - String of the value to test
+ * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection
+ * @example
+ *
+ * testAllProps determines whether a given CSS property, in some prefixed form,
+ * is supported by the browser.
+ *
+ * ```js
+ * testAllProps('boxSizing') // true
+ * ```
+ *
+ * It can optionally be given a CSS value in string form to test if a property
+ * value is valid
+ *
+ * ```js
+ * testAllProps('display', 'block') // true
+ * testAllProps('display', 'penguin') // false
+ * ```
+ *
+ * A boolean can be passed as a third parameter to skip the value check when
+ * native detection (@supports) isn't available.
+ *
+ * ```js
+ * testAllProps('shapeOutside', 'content-box', true);
+ * ```
+ */
+
+ function testAllProps (prop, value, skipValueTest) {
+ return testPropsAll(prop, undefined, undefined, value, skipValueTest);
+ }
+ ModernizrProto.testAllProps = testAllProps;
+ return testAllProps;
+});
--- /dev/null
+define(['is', 'fnBind'], function(is, fnBind) {
+ /**
+ * testDOMProps is a generic DOM property test; if a browser supports
+ * a certain property, it won't return undefined for it.
+ */
+ function testDOMProps(props, obj, elem) {
+ var item;
+
+ for (var i in props) {
+ if (props[i] in obj) {
+
+ // return the property name as a string
+ if (elem === false) {
+ return props[i];
+ }
+
+ item = obj[props[i]];
+
+ // let's bind a function
+ if (is(item, 'function')) {
+ // bind to obj unless overriden
+ return fnBind(item, elem || obj);
+ }
+
+ // return the unbound function or obj or value
+ return item;
+ }
+ }
+ return false;
+ }
+
+ return testDOMProps;
+});
--- /dev/null
+define(['ModernizrProto', 'testProps'], function(ModernizrProto, testProps) {
+ /**
+ * testProp() investigates whether a given style property is recognized
+ * Property names can be provided in either camelCase or kebab-case.
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testProp
+ * @access public
+ * @optionName Modernizr.testProp()
+ * @optionProp testProp
+ * @function testProp
+ * @param {string} prop - Name of the CSS property to check
+ * @param {string} [value] - Name of the CSS value to check
+ * @param {boolean} [useValue] - Whether or not to check the value if @supports isn't supported
+ * @returns {boolean}
+ * @example
+ *
+ * Just like [testAllProps](#modernizr-testallprops), only it does not check any vendor prefixed
+ * version of the string.
+ *
+ * Note that the property name must be provided in camelCase (e.g. boxSizing not box-sizing)
+ *
+ * ```js
+ * Modernizr.testProp('pointerEvents') // true
+ * ```
+ *
+ * You can also provide a value as an optional second argument to check if a
+ * specific value is supported
+ *
+ * ```js
+ * Modernizr.testProp('pointerEvents', 'none') // true
+ * Modernizr.testProp('pointerEvents', 'penguin') // false
+ * ```
+ */
+
+ var testProp = ModernizrProto.testProp = function(prop, value, useValue) {
+ return testProps([prop], undefined, value, useValue);
+ };
+ return testProp;
+});
--- /dev/null
+define(['contains', 'mStyle', 'createElement', 'nativeTestProps', 'is', 'cssToDOM'], function(contains, mStyle, createElement, nativeTestProps, is, cssToDOM) {
+ // testProps is a generic CSS / DOM property test.
+
+ // In testing support for a given CSS property, it's legit to test:
+ // `elem.style[styleName] !== undefined`
+ // If the property is supported it will return an empty string,
+ // if unsupported it will return undefined.
+
+ // We'll take advantage of this quick test and skip setting a style
+ // on our modernizr element, but instead just testing undefined vs
+ // empty string.
+
+ // Property names can be provided in either camelCase or kebab-case.
+
+ function testProps(props, prefixed, value, skipValueTest) {
+ skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;
+
+ // Try native detect first
+ if (!is(value, 'undefined')) {
+ var result = nativeTestProps(props, value);
+ if (!is(result, 'undefined')) {
+ return result;
+ }
+ }
+
+ // Otherwise do it properly
+ var afterInit, i, propsLength, prop, before;
+
+ // If we don't have a style element, that means we're running async or after
+ // the core tests, so we'll need to create our own elements to use
+
+ // inside of an SVG element, in certain browsers, the `style` element is only
+ // defined for valid tags. Therefore, if `modernizr` does not have one, we
+ // fall back to a less used element and hope for the best.
+ var elems = ['modernizr', 'tspan'];
+ while (!mStyle.style) {
+ afterInit = true;
+ mStyle.modElem = createElement(elems.shift());
+ mStyle.style = mStyle.modElem.style;
+ }
+
+ // Delete the objects if we created them.
+ function cleanElems() {
+ if (afterInit) {
+ delete mStyle.style;
+ delete mStyle.modElem;
+ }
+ }
+
+ propsLength = props.length;
+ for (i = 0; i < propsLength; i++) {
+ prop = props[i];
+ before = mStyle.style[prop];
+
+ if (contains(prop, '-')) {
+ prop = cssToDOM(prop);
+ }
+
+ if (mStyle.style[prop] !== undefined) {
+
+ // If value to test has been passed in, do a set-and-check test.
+ // 0 (integer) is a valid property value, so check that `value` isn't
+ // undefined, rather than just checking it's truthy.
+ if (!skipValueTest && !is(value, 'undefined')) {
+
+ // Needs a try catch block because of old IE. This is slow, but will
+ // be avoided in most cases because `skipValueTest` will be used.
+ try {
+ mStyle.style[prop] = value;
+ } catch (e) {}
+
+ // If the property value has changed, we assume the value used is
+ // supported. If `value` is empty string, it'll fail here (because
+ // it hasn't changed), which matches how browsers have implemented
+ // CSS.supports()
+ if (mStyle.style[prop] != before) {
+ cleanElems();
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ // Otherwise just return true, or the property name if this is a
+ // `prefixed()` call
+ else {
+ cleanElems();
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ }
+ cleanElems();
+ return false;
+ }
+
+ return testProps;
+});
--- /dev/null
+define(['ModernizrProto', 'cssomPrefixes', 'is', 'testProps', 'domPrefixes', 'testDOMProps'], function(ModernizrProto, cssomPrefixes, is, testProps, domPrefixes, testDOMProps) {
+ /**
+ * testPropsAll tests a list of DOM properties we want to check against.
+ * We specify literally ALL possible (known and/or likely) properties on
+ * the element including the non-vendor prefixed one, for forward-
+ * compatibility.
+ */
+ function testPropsAll(prop, prefixed, elem, value, skipValueTest) {
+
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
+ props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
+
+ // did they call .prefixed('boxSizing') or are we just testing a prop?
+ if (is(prefixed, 'string') || is(prefixed, 'undefined')) {
+ return testProps(props, prefixed, value, skipValueTest);
+
+ // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
+ } else {
+ props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
+ return testDOMProps(props, prefixed, elem);
+ }
+ }
+
+ // Modernizr.testAllProps() investigates whether a given style property,
+ // or any of its vendor-prefixed variants, is recognized
+ //
+ // Note that the property names must be provided in the camelCase variant.
+ // Modernizr.testAllProps('boxSizing')
+ ModernizrProto.testAllProps = testPropsAll;
+
+ return testPropsAll;
+});
--- /dev/null
+define(['tests', 'Modernizr', 'classes', 'is'], function(tests, Modernizr, classes, is) {
+ /**
+ * Run through all tests and detect their support in the current UA.
+ *
+ * @access private
+ */
+
+ function testRunner() {
+ var featureNames;
+ var feature;
+ var aliasIdx;
+ var result;
+ var nameIdx;
+ var featureName;
+ var featureNameSplit;
+
+ for (var featureIdx in tests) {
+ featureNames = [];
+ feature = tests[featureIdx];
+ // run the test, throw the return value into the Modernizr,
+ // then based on that boolean, define an appropriate className
+ // and push it into an array of classes we'll join later.
+ //
+ // If there is no name, it's an 'async' test that is run,
+ // but not directly added to the object. That should
+ // be done with a post-run addTest call.
+ if (feature.name) {
+ featureNames.push(feature.name.toLowerCase());
+
+ if (feature.options && feature.options.aliases && feature.options.aliases.length) {
+ // Add all the aliases into the names list
+ for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {
+ featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());
+ }
+ }
+ }
+
+ // Run the test, or use the raw value if it's not a function
+ result = is(feature.fn, 'function') ? feature.fn() : feature.fn;
+
+
+ // Set each of the names on the Modernizr object
+ for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {
+ featureName = featureNames[nameIdx];
+ // Support dot properties as sub tests. We don't do checking to make sure
+ // that the implied parent tests have been added. You must call them in
+ // order (either in the test, or make the parent test a dependency).
+ //
+ // Cap it to TWO to make the logic simple and because who needs that kind of subtesting
+ // hashtag famous last words
+ featureNameSplit = featureName.split('.');
+
+ if (featureNameSplit.length === 1) {
+ Modernizr[featureNameSplit[0]] = result;
+ } else {
+ // cast to a Boolean, if not one already
+ /* jshint -W053 */
+ if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
+ Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
+ }
+
+ Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;
+ }
+
+ classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));
+ }
+ }
+ }
+
+ return testRunner;
+});
--- /dev/null
+define(['ModernizrProto', 'injectElementWithStyles'], function(ModernizrProto, injectElementWithStyles) {
+ /**
+ * testStyles injects an element with style element and some CSS rules
+ *
+ * @memberof Modernizr
+ * @name Modernizr.testStyles
+ * @optionName Modernizr.testStyles()
+ * @optionProp testStyles
+ * @access public
+ * @function testStyles
+ * @param {string} rule - String representing a css rule
+ * @param {function} callback - A function that is used to test the injected element
+ * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
+ * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
+ * @returns {boolean}
+ * @example
+ *
+ * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page
+ * along with (possibly multiple) DOM elements. This lets you check for features
+ * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).
+ *
+ * ```js
+ * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {
+ * // elem is the first DOM node in the page (by default #modernizr)
+ * // rule is the first argument you supplied - the CSS rule in string form
+ *
+ * addTest('widthworks', elem.style.width === '9px')
+ * });
+ * ```
+ *
+ * If your test requires multiple nodes, you can include a third argument
+ * indicating how many additional div elements to include on the page. The
+ * additional nodes are injected as children of the `elem` that is returned as
+ * the first argument to the callback.
+ *
+ * ```js
+ * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {
+ * document.getElementById('modernizr').style.width === '1px'; // true
+ * document.getElementById('modernizr2').style.width === '2px'; // true
+ * elem.firstChild === document.getElementById('modernizr2'); // true
+ * }, 1);
+ * ```
+ *
+ * By default, all of the additional elements have an ID of `modernizr[n]`, where
+ * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,
+ * the second additional is `#modernizr3`, etc.).
+ * If you want to have more meaningful IDs for your function, you can provide
+ * them as the fourth argument, as an array of strings
+ *
+ * ```js
+ * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {
+ * elem.firstChild === document.getElementById('foo'); // true
+ * elem.lastChild === document.getElementById('bar'); // true
+ * }, 2, ['foo', 'bar']);
+ * ```
+ *
+ */
+
+ var testStyles = ModernizrProto.testStyles = injectElementWithStyles;
+ return testStyles;
+});
--- /dev/null
+define(function() {
+ /**
+ * http://mathiasbynens.be/notes/xhr-responsetype-json#comment-4
+ *
+ * @access private
+ * @function testXhrType
+ * @param {string} type - String name of the XHR type you want to detect
+ * @returns {boolean}
+ * @author Mathias Bynens
+ */
+
+ /* istanbul ignore next */
+ var testXhrType = function(type) {
+ if (typeof XMLHttpRequest == 'undefined') {
+ return false;
+ }
+ var xhr = new XMLHttpRequest();
+ xhr.open('get', '/', true);
+ try {
+ xhr.responseType = type;
+ } catch (error) {
+ return false;
+ }
+ return 'response' in xhr && xhr.responseType == type;
+ };
+
+ return testXhrType;
+});
--- /dev/null
+define(function() {
+ var tests = [];
+ return tests;
+});
--- /dev/null
+define(function() {
+ /**
+ * Object.prototype.toString can be used with every object and allows you to
+ * get its class easily. Abstracting it off of an object prevents situations
+ * where the toString property has been overridden
+ *
+ * @access private
+ * @function toStringFn
+ * @returns {function} An abstracted toString function
+ */
+
+ var toStringFn = ({}).toString;
+ return toStringFn;
+});
--- /dev/null
+describe('bools', function() {
+ it('all properties are lower case', function() {
+ _.every(Modernizr, function(result, name) {
+ return expect(name).to.not.match(/[A-Z]/);
+ });
+ });
+
+ describe('everythings ship shape', function() {
+ _.chain(Modernizr)
+ .keys()
+ .filter()
+ .sort()
+ .forEach(function(name) {
+ var result = Modernizr[name];
+ if (name === 'input' || name === 'inputtypes') {
+ return;
+ }
+
+ it(name + ' is a boolean value or Boolean object', function() {
+ expect(
+ result instanceof Boolean ||
+ result === true ||
+ result === false
+ ).to.be(true);
+ });
+ })
+ .value();
+ });
+
+});
--- /dev/null
+/* global uaparse */
+window.caniusecb = function(caniuse) {
+ // So Phantom doesn't kill the caniuse.com matching exit out as it's useless anyway within PhantomJS
+ if (window._phantom) {
+ return;
+ }
+ describe('caniuse', function() {
+
+ var ua = uaparse(navigator.userAgent);
+ var unusedModernizr = [];
+ var unusedCaniuse = _.keys(caniuse.data);
+ var map = {
+ adownload: 'download',
+ ambientlight: 'ambient-light',
+ apng: 'apng',
+ appearance: 'css-appearance',
+ applicationcache: 'offline-apps',
+ audio: 'audio',
+ backgroundblendmode: 'css-backgroundblendmode',
+ blobconstructor: 'blobbuilder',
+ bloburls: 'bloburls',
+ borderimage: 'border-image',
+ borderradius: 'border-radius',
+ boxshadow: 'css-boxshadow',
+ boxsizing: 'css3-boxsizing',
+ canvas: 'canvas',
+ canvasblending: 'canvas-blending',
+ canvastext: 'canvas-text',
+ classlist: 'classlist',
+ contenteditable: 'contenteditable',
+ contextmenu: 'menu',
+ cors: 'cors',
+ cssanimations: 'css-animation',
+ csscalc: 'calc',
+ csscolumns: 'multicolumn',
+ cssfilters: 'css-filters',
+ cssgradients: 'css-gradients',
+ csspointerevents: 'pointer-events',
+ csspositionsticky: 'css-sticky',
+ cssreflections: 'css-reflections',
+ cssremunit: 'rem',
+ cssresize: 'css-resize',
+ csstransforms3d: 'transforms3d',
+ csstransforms: 'transforms2d',
+ csstransitions: 'css-transitions',
+ cssvhunit: 'viewport-units',
+ cssvmaxunit: 'viewport-units',
+ cssvminunit: 'viewport-units',
+ cssvwunit: 'viewport-units',
+ datalistelem: 'datalist',
+ datauri: 'datauri',
+ details: 'details',
+ deviceorientation: 'deviceorientation',
+ displaytable: 'css-table',
+ eventsource: 'eventsource',
+ filereader: 'fileapi',
+ filesystem: 'filesystem',
+ flexbox: 'flexbox',
+ flexboxlegacy: 'flexbox',
+ flexboxtweener: 'flexbox',
+ fontface: 'fontface',
+ formvalidationapi: 'form-validation',
+ fullscreen: 'fullscreen',
+ gamepads: 'gamepad',
+ geolocation: 'geolocation',
+ getrandomvalues: 'getrandomvalues',
+ getusermedia: 'stream',
+ hashchange: 'hashchange',
+ hidden: 'hidden',
+ history: 'history',
+ hsla: 'css3-colors',
+ htmlimports: 'imports',
+ indexeddb: 'indexeddb',
+ inlinesvg: 'svg-html5',
+ inputtypes: 'forms',
+ jpegxr: 'jpegxr',
+ json: 'json',
+ localstorage: 'namevalue-storage',
+ mathml: 'mathml',
+ mediaqueries: 'css-mediaqueries',
+ meter: 'progressmeter',
+ multiplebgs: 'multibackgrounds',
+ mutationobserver: 'mutationobserver',
+ notification: 'notifications',
+ objectfit: 'object-fit',
+ opacity: 'css-opacity',
+ pagevisibility: 'pagevisibility',
+ performance: 'nav-timing',
+ picture: 'picture',
+ postmessage: 'x-doc-messaging',
+ progressbar: 'progressmeter',
+ promises: 'promises',
+ queryselector: 'queryselector',
+ regions: 'css-regions',
+ requestanimationframe: 'requestanimationframe',
+ rgba: 'css3-colors',
+ ruby: 'ruby',
+ sandbox: 'iframe-sandbox',
+ scriptasync: 'script-async',
+ scriptdefer: 'script-defer',
+ seamless: 'iframe-seamless',
+ shapes: 'css-shapes',
+ sharedworkers: 'sharedworkers',
+ smil: 'svg-smil',
+ strictmode: 'use-strict',
+ stylescoped: 'style-scoped',
+ supports: 'css-featurequeries',
+ svg: 'svg',
+ svgasimg: 'svg-img',
+ svgfilters: 'svg-filters',
+ template: 'template',
+ textalignlast: 'css-text-align-last',
+ textshadow: 'css-textshadow',
+ typedarrays: 'typedarrays',
+ unicoderange: 'font-unicode-range',
+ userselect: 'user-select-none',
+ vibrate: 'vibration',
+ video: 'video',
+ webanimations: 'web-animation',
+ webaudio: 'audio-api',
+ webgl: 'webgl',
+ webp: 'webp',
+ websockets: 'websockets',
+ websqldatabase: 'sql-storage',
+ webworkers: 'webworkers',
+ willchange: 'will-change',
+ xhr2: 'xhr2'
+ };
+
+ // translate 'y' 'n' or 'a' into a boolean that Modernizr uses
+ function bool(result) {
+ // To handle correctly things like 'y #1' or 'a #2'
+ if (result.indexOf('y') === 0 || result.indexOf('a') === 0) {
+ return true;
+ }
+ // 'p' is for polyfill
+ if (result.indexOf('n') === 0 || result.indexOf('p') === 0) {
+ return false;
+ }
+ throw 'unknown return value from can i use - ' + result;
+ }
+
+ function testify(o) {
+
+ var ciubool = bool(o.caniuseResult);
+
+ /**************************************************************
+ * `o.caniuseResult` maps to the caniuse `stat` property
+ *
+ * y - (Y)es, supported by default
+ * a - (A)lmost supported (aka Partial support)
+ * n - (N)o support, or disabled by default
+ * p - No support, but has (P)olyfill
+ * u - Support (u)nknown
+ * x - Requires prefi(x) to work
+ * d - (D)isabled by default (need to enable flag or something)
+ **************************************************************/
+
+ // caniuse says audio/video are yes/no, Modernizr has more detail which we'll dumb down.
+ if (_.contains(['video', 'audio', 'webglextensions'], o.feature)) {
+ o.result = o.result.valueOf();
+ }
+
+ // webgl `partial` support means that not all users with these browsers have
+ // WebGL access, so we just ignore this test, and only check if the browser
+ // either fully supports or does not support
+ if (o.feature === 'webgl' && o.caniuseResult.indexOf('a') === 0) {
+ return;
+ }
+
+ // change the *documented* false positives
+ if (!ciubool && (o.feature == 'textshadow' && o.browser == 'Firefox' && o.version == 3)) {
+ ciubool = o.fp = true;
+ }
+
+ // firefox does not support unicode-range without a flag
+ if (o.feature === 'unicoderange' && o.caniuseResult.indexOf('y') === 0 && o.browser == 'Firefox' && o.version <= 40) {
+ return;
+ }
+
+ // firefox only supports web animation when a flag is enabled, which we
+ // don't do on sauce
+ if (o.feature === 'webanimations' && o.caniuseResult.indexOf('a d') === 0) {
+ return;
+ }
+
+ // firefox only supports the `url` version of css-filters, which we don't
+ // consider support
+ if (o.feature === 'cssfilters' && o.browser == 'Firefox' && o.caniuseResult.indexOf('a') === 0) {
+ return;
+ }
+
+ // before 4.0, firefox only supports MathML on XHTML documents. Since we
+ // don't run inside of one, we will have a technically false negative
+ if (o.feature === 'mathml' && o.browser == 'Firefox' && o.version < 4) {
+ return;
+ }
+
+ // caniuse bundles viewport units, all of which work in IE 9+, save for vmax
+ // we skip this comparison with a version gate, hoping its fixed in later versions.
+ if (o.feature === 'cssvmaxunit' && o.caniuseResult.indexOf('a') === 0) {
+ return;
+ }
+
+ // safari 5 does not support the `FileReader` API, which we test as a requirement
+ if (o.feature === 'filereader' && o.caniuseResult.indexOf('a') === 0) {
+ return;
+ }
+
+ // safari 5 and 6 only support the old version of WebSockets, which breaks most servers.
+ // As a result, we mark it as not supported, and ignore the caniuse match
+ if (o.feature === 'websockets' && o.caniuseResult.indexOf('a') === 0) {
+ return;
+ }
+
+ // safari 7 recognizes the `seamless` attribute but does not actually support it
+ if (o.feature === 'seamless' && o.browser === 'Safari' && o.version === 7) {
+ return;
+ }
+
+
+ // caniuse counts a partial support for CORS via the XDomainRequest,
+ // but thats not really cors - so skip the comparison.
+ if (o.feature === 'cors' && o.browser == 'IE' && o.version < 10) {
+ return;
+ }
+
+ // Opera 12 has a false positive for `defer`
+ if (o.feature === 'scriptdefer' && o.browser == 'Opera' && parseInt(o.version, 10) === 12) {
+ return;
+ }
+
+ // caniuse bundles forms into one big wad of detects. we check to see if their result matches
+ // atleast some of our inputtypes.
+ if (o.ciufeature === 'forms') {
+ return it('Caniuse result for forms matches Modernizr\'s result for inputtypes', function() {
+ return expect(ciubool).to.be(_.some(Modernizr.inputtypes, function(modernizrResult) {
+ return modernizrResult;
+ }));
+ });
+ }
+
+
+ // we breakout flexbox sniffing into three seperate detects, which borks the caniuse mappings,
+ // since no browser supports all three
+ if (o.ciufeature === 'flexbox') {
+ return it('Caniuse result for flexbox matches Modernizr\'s result for flexbox', function() {
+ return expect([
+ Modernizr.flexbox,
+ Modernizr.flexboxlegacy,
+ Modernizr.flexboxtweener
+ ]).to.contain(ciubool);
+ });
+ }
+
+ // caniuse bundles progress and meter elements, so we do too.
+ if (_.contains(['meter', 'progressbar'], o.feature)) {
+ return it('Caniuse result for ' + o.ciufeature + ' matches Modernizr\'s result for ' + o.feature, function() {
+ return expect([
+ Modernizr.meter,
+ Modernizr.progressbar
+ ]).to.contain(ciubool);
+ });
+ }
+
+ // caniuse counts `filter` opacity as partial support - we don't.
+ if (o.feature === 'opacity' && o.browser === 'IE' && o.version < 9) {
+ return;
+ }
+
+ // if caniuse gave us a 'partial', lets let it pass with a note.
+ if (o.caniuseResult.indexOf('a') === 0) {
+ return it(o.browser + o.version + ': Caniuse reported partial support for ' + o.ciufeature, function() {
+ var modernizrResult = o.result instanceof Boolean ? o.result.valueOf() : !!o.result;
+ expect(ciubool).to.equal(modernizrResult);
+ });
+ }
+
+ // where we actually do most our assertions
+ it(o.browser + o.version + ': Caniuse result for ' + o.ciufeature + ' matches Modernizr\'s ' + (o.fp ? '*false positive*' : 'result') + ' for ' + o.feature, function() {
+ var modernizrResult = o.result instanceof Boolean ? o.result.valueOf() : !!o.result;
+ expect(ciubool).to.equal(modernizrResult);
+ });
+ }
+
+ _.forEach(Modernizr, function(result, feature) {
+
+ var caniuseFeatureName = map[feature];
+
+ if (_.isUndefined(caniuseFeatureName)) {
+ return unusedModernizr.push(feature);
+ }
+
+ var caniuseFeatureData = caniuse.data[caniuseFeatureName];
+
+ if (caniuseFeatureData === undefined) {
+ throw 'unknown key of caniusedata - ' + caniuseFeatureName;
+ }
+
+ unusedCaniuse = _.without(unusedCaniuse, caniuseFeatureName);
+
+ // get results for this feature for all versions of this browser
+ var browserResults = caniuseFeatureData.stats[ua.family.toLowerCase()];
+
+ // let's get our versions in order..
+ var minorver = ua.minor && // caniuse doesn't use two digit minors
+ ua.minor.toString().replace(/(\d)\d$/, '$1'); // but opera does.
+
+
+ var majorminor = (ua.major + '.' + minorver)
+ // opera gets grouped in some cases by caniuse
+ .replace(/(9\.(6|5))/ , ua.family == 'opera' ? '9.5-9.6' : '$1')
+ .replace(/(10\.(0|1))/, ua.family == 'opera' ? '10.0-10.1' : '$1');
+
+ var mmResult = browserResults[majorminor];
+ var mResult = browserResults[ua.major];
+
+
+ // check it against the major.minor: eg. FF 3.6
+ if (mmResult && mmResult != 'u') { // 'y' 'n' or 'a'
+
+ // data ends w/ ` x` if its still prefixed in the imp
+ mmResult = mmResult.replace(' x', '');
+
+ // match it against our data.
+ testify({
+ feature: feature,
+ ciufeature: caniuseFeatureName,
+ result: Modernizr[feature],
+ caniuseResult: mmResult,
+ browser: ua.family,
+ version: majorminor
+ });
+
+ return; // don't check the major version
+ }
+
+ // check it against just the major version: eg. FF 3
+ if (mResult) {
+
+ // unknown support from caniuse... He would probably like to know our data, though!
+ if (mResult == 'u') {
+ return;
+ }
+
+ // data ends w/ ` x` if its still prefixed in the imp
+ mResult = mResult.replace(' x', '');
+
+ testify({
+ feature: feature,
+ ciufeature: caniuseFeatureName,
+ result: Modernizr[feature],
+ caniuseResult: mResult,
+ browser: ua.family,
+ version: ua.major
+ });
+ }
+ });
+
+ });
+};
--- /dev/null
+describe('classes', function() {
+ var classes = document.documentElement.className.split(' ');
+
+ it('_version exists', function() {
+ expect(Modernizr._version).to.not.be(undefined);
+ });
+
+ it('_version did not add a class', function() {
+ expect(document.documentElement).to.not.contain('_version');
+ });
+
+ it('all classes are lower case', function() {
+ expect(document.documentElement.className).to.not.match(/[A-Z]/);
+ });
+
+ describe('everythings ship shape', function() {
+ _.chain(classes)
+ .filter()
+ .sort()
+ .forEach(function(name) {
+ var result = name.indexOf('no-') === -1;
+ name = name.replace(/no-/, '');
+ it(name + ' is correctly ' + result + ' in the classes and object', function() {
+ if (_.contains(name, '-')) {
+
+ if (name.replace('-', '') in Modernizr) {
+ name = name.replace('-', '');
+ expect(Modernizr[name]).to.be(result);
+ } else {
+ name = name.split('-');
+ expect(Modernizr[name[0]]).to.not.be(undefined);
+ expect(!!Modernizr[name[0]][name[1]]).to.equal(result);
+ }
+ } else {
+ var test = Modernizr[name];
+ var modernizrResult = test instanceof Boolean ? test.valueOf() : !!test;
+ expect(modernizrResult).to.equal(result);
+ }
+ });
+ })
+ .value();
+ });
+
+});
--- /dev/null
+describe('basics', function() {
+
+ it('creates a global modernizr object', function() {
+ expect(Modernizr).to.not.be(undefined);
+ });
+
+});
--- /dev/null
+describe('iframe context', function() {
+
+ this.timeout(20000);
+ var iframeWindow;
+ var $iframe;
+
+ before(function(done) {
+ var url = './iframe.html?id=modernizrIframeContext';
+ $iframe = $('<iframe>');
+
+ $(document.body).append($iframe);
+
+ $iframe
+ .css({
+ 'height':10,
+ 'width':10,
+ 'position':'absolute',
+ 'top': 0,
+ 'left': 0
+ })
+ .attr({
+ 'src': url,
+ 'id': 'modernizrIframeContext'
+ })
+ .on('lockedAndLoaded', function() {
+ iframeWindow = $(this)[0].contentWindow;
+ done();
+ });
+ });
+
+ it('is able to be loaded in an iframe', function(done) {
+ iframeWindow.$.getScript('../dist/modernizr-build.js')
+ .done(function(build, status) {
+ expect(status).to.equal('success');
+ expect(iframeWindow.Modernizr).to.not.be(undefined);
+ done();
+ })
+ .fail(function(ajaxResponse, errorType, err) {
+ if (err && err.message) {
+ expect(err.message).to.be(undefined);
+ } else {
+ expect(errorType).to.be(undefined);
+ }
+ done();
+ });
+ });
+
+ after(function() {
+ $iframe.remove();
+ iframeWindow = $iframe = undefined;
+ });
+});
--- /dev/null
+describe('prefixed @rule', function() {
+ it('(Almost) Everyone supports import', function() {
+ expect(['@import', undefined]).to.contain(Modernizr.prefixed('@import'));
+ });
+
+ it('Nobody supports @penguin', function() {
+ expect(!!Modernizr.prefixed('@penguin')).to.equal(false);
+ });
+});
--- /dev/null
+describe('prefixed autobind', function() {
+ var rAFName;
+
+ // quick sniff to find the local rAF prefixed name.
+ var vendors = ['r', 'msR', 'mozR', 'webkitR', 'oR'];
+ _.forEach(vendors, function(vendor) {
+ rAFName = rAFName || (window[vendor + 'equestAnimationFrame'] && vendor + 'equestAnimationFrame');
+ });
+
+ if (rAFName) {
+ // rAF returns a function
+ it('Modernizr.prefixed("requestAnimationFrame", window) returns a function', function() {
+ expect(Modernizr.prefixed('requestAnimationFrame', window)).to.be.a('function');
+ });
+
+ // unless we false it to a string
+ it('Modernizr.prefixed("requestAnimationFrame", window, false) returns a string (the prop name)', function() {
+ expect(Modernizr.prefixed('requestAnimationFrame', window, false)).to.be(rAFName);
+ });
+ }
+
+ if (document.body.webkitMatchesSelector || document.body.mozMatchesSelector) {
+
+ var fn = Modernizr.prefixed('matchesSelector', HTMLElement.prototype, document.body);
+
+ //returns function
+ it('Modernizr.prefixed("matchesSelector", HTMLElement.prototype, document.body) returns a function', function() {
+ expect(fn).to.be.a('function');
+ });
+
+ // fn scoping
+ it('Modernizr.prefixed("matchesSelector", HTMLElement.prototype, document.body) is scoped to the body', function() {
+ expect(fn('body')).to.be(true);
+ });
+ }
+
+ // Webkit only: are there other objects that are prefixed?
+ if (window.webkitNotifications) {
+ // should be an object.
+ it('Modernizr.prefixed("Notifications") returns an object', function() {
+ expect(Modernizr.prefixed('Notifications', window)).to.be.an('object');
+ });
+ }
+
+ // Webkit only:
+ if (!_.isUndefined(document.webkitIsFullScreen)) {
+ // boolean
+ it('Modernizr.prefixed("isFullScreen") returns a boolean', function() {
+ expect(Modernizr.prefixed('isFullScreen', document)).to.be.a('boolean');
+ });
+ }
+
+
+
+ // Moz only:
+ if (!_.isUndefined(document.mozFullScreen)) {
+ // boolean
+
+ it('Modernizr.prefixed("isFullScreen") returns a boolean', function() {
+ expect(Modernizr.prefixed('fullScreen', document)).to.be.a('boolean');
+ });
+ }
+
+
+ // Webkit-only.. takes advantage of Webkit's mixed case of prefixes
+ if (document.body.style.WebkitAnimation) {
+ // string
+
+ it('Modernizr.prefixed("animation", document.body.style) returns value of that, as a string', function() {
+ expect(Modernizr.prefixed('animation', document.body.style)).to.be.a('string');
+ });
+
+ it('Modernizr.prefixed("animation", document.body.style, false) returns the name of the property: webkitAnimation', function() {
+ expect(Modernizr.prefixed('animation', document.body.style, false)).to.equal('webkitAnimation');
+ });
+ }
+
+ it('Modernizr.prefixed("doSomethingAmazing$#$", window) : Gobbledygook with prefixed(str,obj) returns false', function() {
+ expect(Modernizr.prefixed('doSomethingAmazing$#$', window)).to.be(false);
+ });
+
+ it('Modernizr.prefixed("doSomethingAmazing$#$", window) : Gobbledygook with prefixed(str,obj, scope) returns false', function() {
+ expect(Modernizr.prefixed('doSomethingAmazing$#$', window, document.body)).to.be(false);
+ });
+
+ it('Modernizr.prefixed("doSomethingAmazing$#$", window) : Gobbledygook with prefixed(str,obj, false) returns false', function() {
+ expect(Modernizr.prefixed('doSomethingAmazing$#$', window, false)).to.be(false);
+ });
+});
--- /dev/null
+describe('prefixed()', function() {
+
+ // Generic control function used for prefixed() and prefixedCSS() tests
+ // https://gist.github.com/523692
+ function gimmePrefix(prop, obj) {
+ var prefixes = ['Moz', 'Khtml', 'Webkit', 'O', 'ms'],
+ domPrefixes = ['moz', 'khtml', 'webkit', 'o', 'ms'],
+ elem = document.createElement('div'),
+ upper = prop.charAt(0).toUpperCase() + prop.slice(1),
+ len;
+
+ if (!obj) {
+ if (prop in elem.style) {
+ return prop;
+ }
+
+ for (len = prefixes.length; len--;) {
+ if ((prefixes[len] + upper) in elem.style) {
+ return (prefixes[len] + upper);
+ }
+ }
+ } else {
+ if (prop in obj) {
+ return prop;
+ }
+
+ for (len = domPrefixes.length; len--;) {
+ if ((domPrefixes[len] + upper) in obj) {
+ return (domPrefixes[len] + upper);
+ }
+ }
+ }
+
+ return false;
+ }
+
+ function domToCSS (name) {
+ return name.replace(/([A-Z])/g, function(str, m1) {
+ return '-' + m1.toLowerCase();
+ }).replace(/^ms-/, '-ms-');
+ }
+
+ var propArr = ['transition', 'backgroundSize', 'boxSizing', 'borderImage',
+ 'borderRadius', 'boxShadow', 'columnCount'];
+
+ var domPropArr = [
+ {'prop': 'requestAnimationFrame', 'obj': window},
+ {'prop': 'querySelectorAll', 'obj': document},
+ {'prop': 'matchesSelector', 'obj': document.createElement('div')}];
+
+ _.forEach(propArr, function(prop) {
+ it('results for ' + prop + ' match the homebaked prefix finder', function() {
+ expect(Modernizr.prefixed(prop)).to.equal(gimmePrefix(prop));
+ });
+ });
+
+ _.forEach(propArr, function(prop) {
+ it('results for ' + prop + ' match the homebaked prefix finder', function() {
+ expect(Modernizr.prefixed(domToCSS(prop))).to.equal(gimmePrefix(prop));
+ });
+ });
+
+ _.forEach(domPropArr, function(prop) {
+ it('results for ' + prop.prop + ' match the homebaked prefix finder', function() {
+ var modernizrVersion = Modernizr.prefixed(prop.prop, prop.obj, false);
+ var localVersion = gimmePrefix(prop.prop, prop.obj);
+ expect(modernizrVersion).to[(_.isString(localVersion) ? 'contain' : 'equal')](localVersion);
+ });
+ });
+});
--- /dev/null
+describe('prefixedCSS', function() {
+ function gimmePrefix(prop, obj) {
+ var prefixes = ['Moz', 'Khtml', 'Webkit', 'O', 'ms'],
+ domPrefixes = ['moz', 'khtml', 'webkit', 'o', 'ms'],
+ elem = document.createElement('div'),
+ upper = prop.charAt(0).toUpperCase() + prop.slice(1),
+ len;
+
+ if (!obj) {
+ if (prop in elem.style) {
+ return prop;
+ }
+
+ for (len = prefixes.length; len--;) {
+ if ((prefixes[len] + upper) in elem.style) {
+ return (prefixes[len] + upper);
+ }
+ }
+ } else {
+ if (prop in obj) {
+ return prop;
+ }
+
+ for (len = domPrefixes.length; len--;) {
+ if ((domPrefixes[len] + upper) in obj) {
+ return (domPrefixes[len] + upper);
+ }
+ }
+ }
+
+ return false;
+ }
+
+ function domToCSS (name) {
+ return name.replace(/([A-Z])/g, function(str, m1) {
+ return '-' + m1.toLowerCase();
+ }).replace(/^ms-/, '-ms-');
+ }
+
+ function cssToDOM(name) {
+ return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
+ return m1 + m2.toUpperCase();
+ }).replace(/^-/, '');
+ }
+
+ function testProp (prop) {
+ var prefixed = gimmePrefix(cssToDOM(prop));
+ if (prefixed) {
+ it('results for ' + prop + ' match the homebaked prefix finder', function() {
+ expect(Modernizr.prefixedCSS(prop)).to.be(domToCSS(prefixed));
+ });
+ } else {
+ it('results for ' + prop + ' match the homebaked prefix finder', function() {
+ expect(Modernizr.prefixedCSS(prop)).to.be(false);
+ });
+ }
+ }
+
+ testProp('animationProperty');
+ testProp('fontFeatureSettings');
+ testProp('flexWrap');
+ testProp('boxSizing');
+ testProp('textShadow');
+ testProp('resize');
+ testProp('animation-property');
+ testProp('font-feature-settings');
+ testProp('flex-wrap');
+ testProp('box-sizing');
+ testProp('text-shadow');
+});
--- /dev/null
+describe('svg context', function() {
+ var object;
+
+ this.timeout(20000);
+
+ if ('createElementNS' in document) {
+
+ it('is able to be loaded in a SVG file', function(done) {
+ object = document.createElement('object');
+
+ object.data = '../test/img/integration.svg';
+ object.type = 'image/svg+xml';
+ object.id = 'svgContext';
+
+ object.onerror = function() {
+ var arg = Array.prototype.slice.call(arguments).join(' ');
+ try {
+ if (arg.length) {
+ expect(arg).to.be(undefined);
+ }
+ } catch (e) {
+ done(e);
+ }
+ };
+
+ object.onsuccess = function(modernizrRef) {
+ expect(modernizrRef).to.not.be(undefined);
+ done();
+ };
+
+ document.body.appendChild(object);
+ });
+
+ afterEach(function() {
+ object.parentNode.removeChild(object);
+ });
+ }
+
+});
--- /dev/null
+/* globals mocha, __coverage__ */
+$(document).ready(function() {
+ var runner = mocha.run();
+
+ var results = {
+ passed: 0,
+ failed: 0,
+ total: 0,
+ tests: []
+ };
+
+ runner.once('suite', function() {
+ mocha.suite.afterAll('send coverage', function(done) {
+ // ensure timeout errors block normal reporting, to ensure the entire suite is retried
+ if (!window.global_test_results) {
+ // opera 12 can't handle the defualt `window.mochaResults`, so we build
+ // generic test data instead
+ window.global_test_results = results;
+ }
+
+ if (window.__coverage__) {
+ $.ajax({
+ type: 'POST',
+ url: '/coverage/client',
+ data: JSON.stringify(__coverage__),
+ success: function() {
+ done();
+ }
+ });
+ } else {
+ done();
+ }
+ });
+ });
+
+ runner.on('fail', logFailure);
+
+ function logFailure(test, err) {
+ var isTimeout = _.contains(err.toString(), 'Ensure the done() callback is being called in this test.');
+
+ if (isTimeout) {
+ return window.global_test_results = {message: err};
+ }
+
+ if (err) {
+ results.failed += 1;
+ } else {
+ results.passed += 1;
+ }
+
+ results.total += 1;
+
+ var flattenTitles = function(test) {
+ var titles = [];
+ while (test.parent.title) {
+ titles.push(test.parent.title);
+ test = test.parent;
+ }
+ return titles.reverse();
+ };
+
+ results.tests.push({
+ name: test.title,
+ result: err ? false : true,
+ message: err ? err.message : 'passe',
+ stack: err ? err.stack : undefined,
+ titles: flattenTitles(test)
+ });
+ }
+});
+
--- /dev/null
+describe('Modernizr Base', function() {
+ var modernizrBase;
+ var cleanup;
+
+ before(function(done) {
+
+ define('package', [], function() {return {};});
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['Modernizr', 'cleanup'], function(_ModernizrBase, _cleanup) {
+ modernizrBase = _ModernizrBase;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('should return an object', function() {
+ expect(modernizrBase).to.be.an('object');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('ModernizrProto', function() {
+ var ModernizrProto;
+ var cleanup;
+ var tests;
+ var req;
+
+ before(function() {
+ define('package', [], function() {return {version: 'v9999'};});
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cleanup'], function(_cleanup) {
+ cleanup = _cleanup;
+ });
+ });
+
+ beforeEach(function(done) {
+
+ tests = [];
+ define('tests', function() {return tests;});
+
+ req(['ModernizrProto', 'tests'], function(_ModernizrProto, _tests) {
+ ModernizrProto = _ModernizrProto;
+ tests = _tests;
+ done();
+ });
+
+ });
+
+ afterEach(function() {
+ req.undef('tests');
+ req.undef('ModernizrProto');
+ });
+
+ it('should define a version', function() {
+ expect(ModernizrProto._version).to.be.a('string');
+ });
+
+ it('should set a default config', function() {
+ var config = ModernizrProto._config;
+
+ expect(config.classPrefix).to.be.a('string');
+ expect(config.enableClasses).to.be.a('boolean');
+ expect(config.enableJSClass).to.be.a('boolean');
+ expect(config.usePrefixes).to.be.a('boolean');
+ });
+
+ it('should define a working stub for `Modernizr.on`', function(done) {
+ ModernizrProto.on('fakeDetect', done);
+ });
+
+ it('should define `Modernizr.addTest` and have it pushed to the internal `tests` queue', function() {
+ var name = 'fakeDetect';
+ var fn = function fakeCallback() {};
+ var options = {opt: 'opt'};
+
+ ModernizrProto.addTest(name, fn, options);
+ expect(tests).to.have.length(1);
+ expect(tests[0].name).to.be(name);
+ expect(tests[0].fn).to.be(fn);
+ expect(tests[0].options).to.be(options);
+ });
+
+ it('should define `Modernizr.addAsyncTest` and have it pushed to the internal `tests` queue', function() {
+ var fn = function fakeCallback() {};
+
+ ModernizrProto.addAsyncTest(fn);
+ expect(tests).to.have.length(1);
+ expect(tests[0].fn).to.be(fn);
+ });
+
+ after(function() {
+ cleanup();
+ });
+
+});
--- /dev/null
+describe('addTest', function() {
+ var ModernizrProto;
+ var setClasses;
+ var Modernizr;
+ var addTest;
+ var cleanup;
+ var sinon;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ cleanup: '../test/cleanup',
+ sinon: '../test/js/lib/sinon'
+ }
+ });
+
+ req(['cleanup', 'sinon'], function(_cleanup, _sinon) {
+ cleanup = _cleanup;
+ sinon = _sinon;
+ done();
+ });
+
+ });
+
+ beforeEach(function(done) {
+
+ ModernizrProto = {};
+ Modernizr = {_q: [], _config: {}};
+ setClasses = sinon.spy();
+
+ define('ModernizrProto', [], function() {return ModernizrProto;});
+ define('Modernizr', [], function() {return Modernizr;});
+ define('setClasses', [], function() {return setClasses;});
+ define('package', [], function() {return {};});
+
+ req(['addTest'], function(_addTest) {
+ addTest = _addTest;
+ done();
+ });
+ });
+
+ afterEach(function() {
+ req.undef('ModernizrProto');
+ req.undef('setClasses');
+ req.undef('Modernizr');
+ req.undef('package');
+ req.undef('addTest');
+ });
+
+ describe('setup', function() {
+
+ it('adds an object for test listeners', function() {
+ expect(ModernizrProto._l).to.be.an('object');
+ });
+
+ it('should define the `ModernizrProto._trigger` function', function() {
+ expect(ModernizrProto._trigger).to.be.an('function');
+ });
+
+ it('should push the Modernizr.addTest definition to the `_q`', function() {
+ expect(Modernizr._q).to.have.length(1);
+ expect(Modernizr._q[0]).to.be.a('function');
+ });
+
+ it('should define Modernizr.addTest at the end of the _q', function() {
+ Modernizr._q[0]();
+ expect(ModernizrProto.addTest).to.be(addTest);
+ });
+ });
+
+ describe('Modernizr.on', function() {
+ var fakeDetect = function() {};
+
+ it('keeps track of requests', function() {
+ ModernizrProto.on('fakeDetect', fakeDetect);
+ expect(ModernizrProto._l.fakeDetect).to.be.an('array');
+ expect(ModernizrProto._l.fakeDetect[0]).to.be(fakeDetect);
+ });
+
+ it('does not recreate the queue with duplicate requests', function() {
+ ModernizrProto.on('fakeDetect', fakeDetect);
+ ModernizrProto.on('fakeDetect', fakeDetect);
+ expect(ModernizrProto._l.fakeDetect.length).to.be(2);
+ });
+
+
+ it('triggers results if the detect already ran', function(done) {
+ Modernizr.fakeDetect = 'fake';
+ Modernizr._trigger = sinon.spy();
+ ModernizrProto.on('fakeDetect', fakeDetect);
+
+ setTimeout(function() {
+ expect(Modernizr._trigger.calledOnce).to.be(true);
+ expect(Modernizr._trigger.calledWith('fakeDetect', Modernizr.fakeDetect)).to.be(true);
+ done();
+ }, 0);
+ });
+
+ });
+
+ describe('Modernizr._trigger', function() {
+
+ it('skips the callback if it does not exist', function() {
+ expect(function() {ModernizrProto._trigger('fakeDetect');}).to.not.throwError();
+ });
+
+ it('runs the listener calledback if it does exist', function(done) {
+ var spy = sinon.spy();
+
+ ModernizrProto.on('fakeDetect', spy);
+ ModernizrProto._trigger('fakeDetect', 'fakeRes');
+
+ setTimeout(function() {
+ expect(spy.calledOnce).to.be(true);
+ done();
+ });
+ });
+
+ it('deletes the listener after it runs', function(done) {
+
+ ModernizrProto.on('fakeDetect', function() {});
+
+ expect(ModernizrProto._l.fakeDetect).to.be.an('array');
+
+ ModernizrProto._trigger('fakeDetect', 'fakeRes');
+
+ setTimeout(function() {
+ expect(ModernizrProto._l.fakeDetect).to.be(undefined);
+ done();
+ });
+ });
+ });
+
+ describe('Modernizr.addTest', function() {
+
+ beforeEach(function() {
+ Modernizr._trigger = sinon.spy();
+ Modernizr._trigger = sinon.spy();
+ expect(Modernizr.fakedetect).to.be(undefined);
+ expect(Modernizr.fake).to.be(undefined);
+ expect(Modernizr.detect).to.be(undefined);
+ });
+
+ it('sets the proper bool on the Modernizr object with a function', function() {
+ addTest('fakedetect', function() {return true;});
+ expect(Modernizr.fakedetect).to.be(true);
+ });
+
+ it('sets the proper bool on the Modernizr object with a bool', function() {
+ addTest('fakedetect', false);
+ expect(Modernizr.fakedetect).to.be(false);
+ });
+
+ it('does not cast to a bool on the Modernizr object with a truthy value', function() {
+ addTest('fakedetect', function() {return 100;});
+ expect(Modernizr.fakedetect).to.be(100);
+ });
+
+ it('sets a true class for a true value', function() {
+ addTest('fakedetect', function() {return 100;});
+ expect(setClasses.callCount).to.be(1);
+ expect(setClasses.calledWith(['fakedetect'])).to.be(true);
+ });
+
+ it('sets a truthy class for a truthy value', function() {
+ addTest('fakedetect', function() {return 100;});
+ expect(setClasses.callCount).to.be(1);
+ expect(setClasses.calledWith(['fakedetect'])).to.be(true);
+ });
+
+ it('sets a negative class for a false value', function() {
+ addTest('fakedetect', function() {return false;});
+ expect(setClasses.callCount).to.be(1);
+ expect(setClasses.calledWith(['no-fakedetect'])).to.be(true);
+ });
+
+ it('sets a negative class for a falsey value', function() {
+ addTest('fakedetect', function() {return undefined;});
+ expect(setClasses.callCount).to.be(1);
+ expect(setClasses.calledWith(['no-fakedetect'])).to.be(true);
+ });
+
+ it('does not cast to a bool on the Modernizr object with a falsy value', function() {
+ addTest('fakedetect', function() {return undefined;});
+ expect('fakedetect' in Modernizr).to.be(true);
+ expect(Modernizr.fakedetect).to.be(undefined);
+ });
+
+ it('forces detect names are lowercase', function() {
+ addTest('FaKeDeTeCt', true);
+ expect(Modernizr.fakedetect).to.be(true);
+ });
+
+ it('supports nested properties with a bool base', function() {
+ /* jshint -W053 */
+ addTest('fake', new Boolean(true));
+ /* jshint +W053 */
+ addTest('fake.detect', true);
+ expect(Modernizr.fake).to.be.an('object');
+ expect(Modernizr.fake.detect).to.be(true);
+ });
+
+ it('supports nested properties', function() {
+ addTest('fake', true);
+ addTest('fake.detect', true);
+ expect(Modernizr.fake).to.be.an('object');
+ expect(Modernizr.fake.detect).to.be(true);
+ });
+
+ it('does not overwrite values once they are set', function() {
+ addTest('fakeDetect', false);
+ expect(Modernizr.fakedetect).to.be(false);
+ expect(Modernizr._trigger.calledOnce).to.be(true);
+
+ addTest('fakeDetect', true);
+ expect(Modernizr.fakedetect).to.be(false);
+ expect(Modernizr._trigger.calledOnce).to.be(true);
+ });
+
+ it('allows feature to be an object of features', function() {
+ addTest({fake: true, detect: false});
+ expect(Modernizr.fake).to.be(true);
+ expect(Modernizr.detect).to.be(false);
+ expect(setClasses.callCount).to.be(2);
+ expect(setClasses.calledWith(['fake'])).to.be(true);
+ expect(setClasses.calledWith(['no-detect'])).to.be(true);
+ });
+
+ it('properly filters out monkey patched object properties', function() {
+ var noop = function() {};
+ Object.prototype.MOD_FAKE_VALUE = noop;
+ var config = {detect: false};
+
+ expect(config.MOD_FAKE_VALUE).to.be(noop);
+ addTest(config);
+
+ delete Object.prototype.MOD_FAKE_VALUE;
+
+ expect(Modernizr.MOD_FAKE_VALUE).to.be(undefined);
+ expect(Modernizr.mod_fake_value).to.be(undefined);
+ expect(Modernizr.detect).to.be(false);
+ expect(setClasses.callCount).to.be(1);
+ });
+
+ it('returns an instance of Modernizr for chaining', function() {
+ expect(addTest('fakeDetect', true)).to.be(Modernizr);
+ });
+
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('atRule', function() {
+ var atRule;
+ var cleanup;
+
+ before(function(done) {
+
+ if (window.CSSRule) {
+ window.CSSRule.MODERNIZR_FAKE_RULE = 999;
+ }
+
+ var prefixes = ['Modernizr'];
+
+ define('cssomPrefixes', [], function() {return prefixes;});
+ define('package', [], function() {return {};});
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['atRule', 'cleanup'], function(_atRule, _cleanup) {
+ atRule = _atRule;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('returns undefined when the browser does not support CSSRule', function() {
+ var ref = window.CSSRule;
+ window.CSSRule = undefined;
+
+ expect(atRule('charset')).to.be(undefined);
+
+ window.CSSRule = ref;
+ });
+
+ if (window.CSSRule) {
+ it('detects `@rule`s', function() {
+ expect(atRule('charset')).to.be('@charset');
+ });
+
+ it('returns false when a property is not given', function() {
+ expect(atRule()).to.be(false);
+ });
+
+ it('returns false when a property is not found', function() {
+ expect(atRule('fart')).to.be(false);
+ });
+
+ it('detects prefixed properties', function() {
+ expect(atRule('fake')).to.be('@-modernizr-fake');
+ });
+ }
+
+ after(function() {
+ if (window.CSSRule) {
+ delete window.CSSRule.MODERNIZR_FAKE_RULE;
+ }
+ cleanup();
+ });
+});
--- /dev/null
+describe('classes', function() {
+ var classes;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['classes', 'cleanup'], function(_classes, _cleanup) {
+ classes = _classes;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+
+ it('is an array', function() {
+ expect(classes).to.be.an('array');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('contains', function() {
+ var contains;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['contains', 'cleanup'], function(_contains, _cleanup) {
+ contains = _contains;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('finds substrings', function() {
+ expect(contains('fakeDetect', 'akeDet')).to.be(true);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('createElement', function() {
+ var createElement;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['createElement', 'cleanup'], function(_createElement, _cleanup) {
+ createElement = _createElement;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+
+ it('is a function', function() {
+ expect(createElement).to.be.a('function');
+ });
+
+ it('creates an element', function() {
+ var element = createElement('modernizr');
+ expect(element.nodeName.toUpperCase()).to.be('MODERNIZR');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('cssToDOM', function() {
+ var cssToDOM;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cssToDOM', 'cleanup'], function(_cssToDOM, _cleanup) {
+ cssToDOM = _cssToDOM;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('converts kebab to camel', function() {
+ expect(cssToDOM('fake-detect')).to.equal('fakeDetect');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('cssomPrefixes', function() {
+ var setup = function(done, bool) {
+ return (function() {
+ define('ModernizrProto', [], function() {return {_config: {usePrefixes: bool}};});
+
+ req(['cssomPrefixes'], function(_cssomPrefixes) {
+ cssomPrefixes = _cssomPrefixes;
+ done();
+ });
+ })();
+ };
+
+ var teardown = function() {
+ cssomPrefixes = undefined;
+ req.undef('cssomPrefixes');
+ req.undef('ModernizrProto');
+ };
+
+ var cssomPrefixes;
+ var cleanup;
+ var req;
+
+ before(function(done) {
+ define('package', [], function() {return {version: 'v9999'};});
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cleanup'], function(_cleanup) {
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ describe('prefixes enabled', function() {
+ before(function(done) {
+ setup(done, true);
+ });
+
+ after(teardown);
+
+ it('returns prefixes', function(done) {
+ req(['cssomPrefixes'], function(cssomPrefixes) {
+ expect(cssomPrefixes).to.not.have.length(0);
+ done();
+ });
+ });
+ });
+
+ describe('prefixes disabled', function() {
+ before(function(done) {
+ setup(done, false);
+ });
+
+ after(teardown);
+
+ it('returns no prefixes', function(done) {
+ req(['cssomPrefixes'], function(cssomPrefixes) {
+ expect(cssomPrefixes).to.have.length(0);
+ done();
+ });
+ });
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('docElement', function() {
+ var docElement;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['docElement', 'cleanup'], function(_docElement, _cleanup) {
+ docElement = _docElement;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('is an alias to document.documentElement', function() {
+ expect(docElement).to.equal(document.documentElement);
+ });
+
+ it('is valid and correct', function() {
+ expect(docElement).to.equal(document.getElementsByTagName('html')[0]);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('domPrefixes', function() {
+ var req;
+
+ var setup = function(done, bool) {
+ return (function() {
+ define('ModernizrProto', [], function() {return {_config: {usePrefixes: bool}};});
+
+ req(['domPrefixes'], function(_domPrefixes) {
+ domPrefixes = _domPrefixes;
+ done();
+ });
+ })();
+ };
+
+ var teardown = function() {
+ domPrefixes = undefined;
+ req.undef('domPrefixes');
+ req.undef('ModernizrProto');
+ };
+ var domPrefixes;
+ var cleanup;
+
+ before(function(done) {
+ define('package', [], function() {return {version: 'v9999'};});
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cleanup'], function(_cleanup) {
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ describe('prefixes enabled', function() {
+ before(function(done) {
+ setup(done, true);
+ });
+
+ after(teardown);
+
+ it('returns prefixes', function(done) {
+ req(['domPrefixes'], function(domPrefixes) {
+ expect(domPrefixes).to.not.have.length(0);
+ done();
+ });
+ });
+ });
+
+ describe('prefixes disabled', function() {
+ before(function(done) {
+ setup(done, false);
+ });
+
+ after(teardown);
+
+ it('returns no prefixes', function(done) {
+ req(['domPrefixes'], function(domPrefixes) {
+ expect(domPrefixes).to.have.length(0);
+ done();
+ });
+ });
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('domToCSS', function() {
+ var domToCSS;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['domToCSS', 'cleanup'], function(_domToCSS, _cleanup) {
+ domToCSS = _domToCSS;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('converts kebab to camel', function() {
+ expect(domToCSS('fakeDetect')).to.equal('fake-detect');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('fnBind', function() {
+ var fnBind;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['fnBind', 'cleanup'], function(_fnBind, _cleanup) {
+ fnBind = _fnBind;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('binds to `this`', function() {
+ var foo = {x: 1};
+ var bar = function() {
+ return this.x;
+ };
+
+ expect(fnBind(bar, foo)()).to.equal(1);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('generate', function() {
+ var generate;
+ var cleanup;
+
+ before(function(done) {
+
+ define('package', [], function() {return {};});
+ define('Modernizr', [], function() {return {};});
+ define('testRunner', [], function() {return {};});
+ define('lodash', [], function() {return window._;});
+ define('ModernizrProto', [], function() {return {};});
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['generate', 'cleanup'], function(_generate, _cleanup) {
+ generate = _generate;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('is a function', function() {
+ expect(generate).to.be.a('function');
+ });
+
+ it('does not blow up when no config is given', function() {
+ expect(function() {generate();}).to.not.throwError();
+ });
+
+ it('defines `feature-detects` if it is not on the config already', function() {
+ var config = {};
+ generate(config);
+ expect(config['feature-detects']).to.not.be(undefined);
+ });
+
+ it('does not overwrite `feature-detects` if it is defined already', function() {
+ var config = {'feature-detects': ['fake']};
+ generate(config);
+ expect(config['feature-detects'][0]).to.be('fake');
+ });
+
+ describe('outputs feature detects when they are requested', function() {
+
+ it('with amd prefix', function() {
+ var config = {'feature-detects': ['test/fake']};
+ var output = generate(config);
+ expect(output).to.contain('test/fake');
+ });
+
+ it('without amd prefix', function() {
+ var config = {'feature-detects': ['fake']};
+ var output = generate(config);
+ expect(output).to.contain('test/fake');
+ });
+ });
+
+ it('adds `setClasses` and `classes` when defined', function() {
+ var config = {'options': ['setClasses']};
+ var output = generate(config);
+ expect(output).to.contain('setClasses", "classes');
+ });
+
+ it('adds options when defined', function() {
+ var config = {'options': ['fakeOption']};
+ var output = generate(config);
+ expect(output).to.contain('fakeOption');
+ });
+
+ it('only adds one of the shivs if both are defined', function() {
+ var config = {'options': ['html5shiv', 'html5printshiv']};
+ var output = generate(config);
+ expect(output).to.contain('html5printshiv');
+ expect(output).to.not.contain('html5shiv');
+ });
+
+ it('outputs a valid function', function() {
+ var output = generate({});
+ var stashedRequire = window.require;
+ window.require = function() {};
+ expect(function() {eval(output);}).to.not.throwError();
+ window.require = stashedRequire;
+ });
+
+ it('outputs a valid function when minified', function() {
+ var output = generate({minify: true});
+ var stashedRequire = window.require;
+ window.require = function() {};
+ expect(function() {eval(output);}).to.not.throwError();
+ window.require = stashedRequire;
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('getBody', function() {
+ var getBody;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['getBody', 'cleanup'], function(_getBody, _cleanup) {
+ getBody = _getBody;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('returns document.body', function() {
+ var body = getBody();
+ expect(body).to.equal(document.body);
+ expect(body.fake).to.be(undefined);
+ });
+
+ it('returns a fake when document.body does not exist', function() {
+ var originalBody = document.body;
+ var parentNode = originalBody.parentNode;
+ parentNode.removeChild(originalBody);
+ var body = getBody();
+ parentNode.appendChild(originalBody);
+
+ expect(body).to.not.equal(document.body);
+ expect(body.fake).to.be(true);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('hasEvent', function() {
+ var hasEvent;
+ var cleanup;
+ var req;
+
+ before(function(done) {
+
+ define('package', [], function() {return {};});
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['hasEvent', 'cleanup'], function(_hasEvent, _cleanup) {
+ hasEvent = _hasEvent;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('allows you to pass an element to test against', function() {
+ expect(hasEvent('click'), document.createElement('a')).to.be(true);
+ });
+
+ it('allows you to pass an string name for an element to test against', function() {
+ expect(hasEvent('click', 'a')).to.be(true);
+ });
+
+ it('allows you to pass something other then a DOM element or string', function() {
+ expect(hasEvent('click', document)).to.be(true);
+ });
+
+
+ it('returns false when no event name is provided', function() {
+ expect(hasEvent()).to.be(false);
+ });
+
+
+ it('returns true when the event exists', function() {
+ expect(hasEvent('click')).to.be(true);
+ });
+
+ it('returns false when the event does not exists', function() {
+ expect(hasEvent('fart')).to.be(false);
+ });
+
+ describe('fallback', function() {
+ var onblur = document.documentElement.onblur;
+ var called;
+
+ before(function(done) {
+ try {
+ // IE 7 fails if we try to delete properties that don't exist
+ delete document.documentElement.onblur;
+ } catch (e) {}
+
+ req.undef('hasEvent');
+ req.undef('createElement');
+
+ define('createElement', [], function() {
+ return function() {
+
+ var elm = typeof document.createElement !== 'function' ?
+ document.createElement(arguments[0]) :
+ document.createElement.apply(document, arguments);
+
+ // logic added to get simulate old firefox's behavior
+ if (!called) {
+ try {
+ delete elm.onclick;
+ } catch (e) {}
+
+ elm.setAttribute = undefined;
+ called = true;
+ }
+ return elm;
+ };
+ });
+
+ req(['hasEvent'], function(_hasEvent) {
+ hasEvent = _hasEvent;
+ done();
+ });
+
+ });
+
+ it('fallsback properly with no element', function() {
+ expect(hasEvent('click')).to.be(true);
+ });
+
+ it('fallsback properly when testing with a global element', function() {
+ expect(hasEvent('click', document)).to.be(true);
+ });
+
+ after(function() {
+ document.documentElement.onblur = onblur;
+ });
+
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('hasOwnProp', function() {
+ var hasOwnProp;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['hasOwnProp', 'cleanup'], function(_hasOwnProp, _cleanup) {
+ hasOwnProp = _hasOwnProp;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('is a function', function() {
+ expect(hasOwnProp).to.be.an('function');
+ });
+
+ it('works', function() {
+ var obj = {};
+ obj.prop = true;
+ expect(hasOwnProp(obj, 'prop')).to.be(true);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('html5printshiv', function() {
+ this.timeout(10000);
+ var iframeWindow;
+ var $iframe;
+
+ before(function(done) {
+ var url = './iframe.html?id=printshiv';
+ $iframe = $('<iframe>');
+
+ $(document.body).append($iframe);
+
+ $iframe
+ .css({
+ 'height':10,
+ 'width':10,
+ 'position':'absolute',
+ 'top': 0,
+ 'left': 0
+ })
+ .attr({
+ 'src': url,
+ 'id': 'printshiv'
+ })
+ .on('lockedAndLoaded', function() {
+ iframeWindow = $(this)[0].contentWindow;
+ iframeWindow.requirejs.config({
+ baseUrl: '../src'
+ });
+ done();
+ });
+
+ });
+
+ it('shivs the document', function(done) {
+ try {
+ iframeWindow.requirejs(['html5printshiv'], function() {
+ expect('html5' in iframeWindow).to.be(true);
+ expect(iframeWindow.html5.type).to.equal('default print');
+ done();
+ });
+ } catch (e) {
+ done(e);
+ }
+ });
+
+ after(function() {
+ $iframe.remove();
+ iframeWindow = $iframe = undefined;
+ });
+});
--- /dev/null
+describe('html5shiv', function() {
+ this.timeout(30000);
+ var iframeWindow;
+ var $iframe;
+
+ before(function(done) {
+ var url = './iframe.html?id=shiv';
+ $iframe = $('<iframe>');
+
+ $(document.body).append($iframe);
+
+ $iframe
+ .css({
+ 'height':10,
+ 'width':10,
+ 'position':'absolute',
+ 'top': 0,
+ 'left': 0
+ })
+ .attr({
+ 'src': url,
+ 'id': 'shiv'
+ })
+ .on('lockedAndLoaded', function() {
+ iframeWindow = $(this)[0].contentWindow;
+ iframeWindow.requirejs.config({
+ baseUrl: '../src'
+ });
+ done();
+ });
+
+ });
+
+ it('shivs the document', function(done) {
+ try {
+ iframeWindow.requirejs(['html5shiv'], function() {
+ expect('html5' in iframeWindow).to.be(true);
+ expect(iframeWindow.html5.type).to.equal('default');
+ done();
+ });
+ }
+ catch (e) {
+ done(e);
+ }
+ });
+
+ after(function() {
+ $iframe.remove();
+ iframeWindow = $iframe = undefined;
+ });
+
+});
--- /dev/null
+describe('injectElementWithStyles', function() {
+ var injectElementWithStyles;
+ var originalBody;
+ var parentNode;
+ var cleanup;
+ var sinon;
+
+ before(function(done) {
+
+ define('package', [], function() {return {};});
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ cleanup: '../test/cleanup',
+ sinon: '../test/js/lib/sinon'
+ }
+ });
+
+ req(['injectElementWithStyles', 'sinon', 'cleanup'], function(_injectElementWithStyles, _sinon, _cleanup) {
+ injectElementWithStyles = _injectElementWithStyles;
+ sinon = _sinon;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('is a function', function() {
+ expect(injectElementWithStyles).to.be.a('function');
+ });
+
+ it('styles an injected element', function() {
+ var callback = function() {
+ var modernizr = document.getElementById('modernizr');
+ return modernizr.clientWidth === 10;
+ };
+
+ var result = injectElementWithStyles('#modernizr{width: 10px}', callback);
+ expect(result).to.be(true);
+ });
+
+ it('passes back a rule matching what we gave it', function(done) {
+ var style = '#modernizr{width: 10px}';
+ var callback = function(elm, rule) {
+ expect(rule).to.be(style);
+ done();
+ };
+
+ injectElementWithStyles(style, callback);
+ });
+
+ it('passes the #modernizr element in the callback', function(done) {
+ var style = '#modernizr{width: 10px}';
+ var callback = function(elm) {
+ expect(elm.id).to.be('modernizr');
+ done();
+ };
+
+ injectElementWithStyles(style, callback);
+ });
+
+ it('deletes an element after the test', function() {
+ expect(document.getElementById('modernizr')).to.be(null);
+
+ var callback = function() {
+ expect(document.getElementById('modernizr')).to.not.be(null);
+ };
+
+ injectElementWithStyles('', callback);
+
+ expect(document.getElementById('modernizr')).to.be(null);
+ });
+
+ it('creates multiple nodes when requested', function(done) {
+
+ var callback = function(elm) {
+ expect(elm.childNodes.length).to.be(9);
+ done();
+ };
+
+ injectElementWithStyles('', callback, 8);
+ });
+
+ it('names multiple nodes based on `testname` when configured', function(done) {
+
+ var callback = function() {
+ var test = document.getElementById('test');
+ var element = document.getElementById('element');
+
+ expect(test).to.not.be(null);
+ expect(element).to.not.be(null);
+ done();
+ };
+
+ injectElementWithStyles('', callback, 2, ['test', 'element']);
+ });
+
+
+ it('copes with a fake body', function(done) {
+
+ originalBody = document.body;
+ parentNode = originalBody.parentNode;
+
+ var callback = function() {
+ var body = document.body;
+
+ expect(body.fake).to.be(true);
+
+ // injectElementWithStyles overrides the background value for fake body to
+ // an empty string, however old IE changes this to the following string.
+ if (body.style.background != 'none transparent scroll repeat 0% 0%') {
+ expect(body.style.background.length).to.be(0);
+ }
+
+ expect(body.style.overflow).to.be('hidden');
+ done();
+ };
+
+ expect(document.body.fake).to.not.be(true);
+ parentNode.removeChild(originalBody);
+ injectElementWithStyles('', callback);
+
+ });
+
+ after(function() {
+ if (!$.contains(parentNode, originalBody)) {
+ parentNode.appendChild(originalBody);
+ }
+ expect(document.body.fake).to.not.be(true);
+ cleanup();
+ });
+});
--- /dev/null
+describe('inputElem', function() {
+ var inputElem;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['inputElem', 'cleanup'], function(_inputElem, _cleanup) {
+ inputElem = _inputElem;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('returns an input element', function() {
+ expect(inputElem.nodeName).to.equal('INPUT');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('is', function() {
+ var cleanup;
+ var is;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['is', 'cleanup'], function(_is, _cleanup) {
+ is = _is;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+
+ it('is a function', function() {
+ expect(is).to.be.a('function');
+ });
+
+ it('recognizes all types', function() {
+ var _undefined = is(undefined, 'undefined');
+ var _func = is(function() {}, 'function');
+ var _bool = is(true, 'boolean');
+ var _null = is(null, 'object');
+ var _str = is('1', 'string');
+
+ expect(_undefined).to.be(true);
+ expect(_func).to.be(true);
+ expect(_bool).to.be(true);
+ expect(_null).to.be(true);
+ expect(_str).to.be(true);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('load', function() {
+ var ModernizrProto;
+ var cleanup;
+ var sinon;
+ var load;
+
+
+ before(function(done) {
+
+ define('ModernizrProto', [], function() {return {};});
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ sinon: '../test/js/lib/sinon',
+ cleanup: '../test/cleanup'
+ }
+ });
+
+ req(['ModernizrProto', 'sinon', 'load', 'cleanup'], function(_ModernizrProto, _sinon, _load, _cleanup) {
+ ModernizrProto = _ModernizrProto;
+ cleanup = _cleanup;
+ sinon = _sinon;
+ load = _load;
+ done();
+ });
+ });
+
+ it('creates a reference on `ModernizrProto`', function() {
+ expect(ModernizrProto.load).to.be.a('function');
+ });
+
+
+ if (window.console && console.error) {
+ describe('errors', function() {
+
+ it('reports that `load` has been removed', function() {
+ var err = console.error;
+ console.error = sinon.spy();
+ ModernizrProto.load();
+ expect(console.error.calledOnce).to.be(true);
+ console.error = err;
+ });
+
+ it('fallsback to log when `console.error` is not defined', function() {
+ var err;
+ var log;
+ err = console.error;
+ log = console.log;
+ console.error = undefined;
+ console.log = sinon.spy();
+
+ ModernizrProto.load();
+
+ expect(console.log.calledOnce).to.be(true);
+
+ console.log = log;
+ console.error = err;
+ });
+
+ });
+ }
+
+ if (window.console && console.log) {
+
+ describe('warnings', function() {
+ var yepnope;
+
+ beforeEach(function() {
+ yepnope = sinon.spy();
+ window.yepnope = yepnope;
+ });
+
+ it('reports that `load` has been removed, but still calls if yepnope is on the page', function() {
+ var warn = console.warn;
+ console.warn = sinon.spy();
+ ModernizrProto.load();
+ expect(console.warn.calledOnce).to.be(true);
+ expect(yepnope.calledOnce).to.be(true);
+ console.warn = warn;
+ });
+
+ it('fallsback to log when `console.warn` is not defined', function() {
+ var warn;
+ var log;
+ warn = console.warn;
+ log = console.log;
+ console.warn = undefined;
+ console.log = sinon.spy();
+
+ ModernizrProto.load();
+
+ expect(console.log.calledOnce).to.be(true);
+ expect(yepnope.calledOnce).to.be(true);
+
+ console.log = log;
+ console.warn = warn;
+ });
+
+ afterEach(function() {
+ yepnope = undefined;
+ // ie <= 8 doesn't support deleting window properties,
+ // so we fallback to setting it to undefiend
+ try {
+ delete window.yepnope;
+ } catch (e) {
+ window.yepnope = undefined;
+ }
+ });
+
+ });
+
+ }
+
+ if (!window.console) {
+ describe('browsers without a console', function() {
+
+ it('doesn\'t blow up when calling console.error', function() {
+ expect(ModernizrProto.load).to.not.throwError();
+ });
+
+ it('doesn\'t blow up when calling console.warn', function() {
+ var yepnope = sinon.spy();
+ window.yepnope = yepnope;
+ expect(ModernizrProto.load).to.not.throwError();
+ expect(yepnope.calledOnce).to.be(true);
+ });
+
+ });
+ }
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('mStyle', function() {
+ var Modernizr;
+ var mStyle;
+ var cleanup;
+ var req;
+
+ before(function() {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ });
+
+ beforeEach(function(done) {
+ Modernizr = {_q: []};
+ define('Modernizr', [], function() {return Modernizr;});
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['mStyle', 'cleanup'], function(_mStyle, _cleanup) {
+ mStyle = _mStyle;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('returns an object with a style prop', function() {
+ expect(mStyle).to.be.an('object');
+ expect(mStyle.style).to.not.be(undefined);
+ });
+
+ it('pushes a function onto the Modernizr._q', function() {
+ expect(Modernizr._q[0]).to.be.a('function');
+ });
+
+ it('deletes mStyle.style after the `_q` runs', function() {
+ expect(mStyle.style).to.not.be(undefined);
+ Modernizr._q[0]();
+ expect(mStyle.style).to.be(undefined);
+ });
+
+ afterEach(function() {
+ req.undef('Modernizr');
+ req.undef('mStyle');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('modElem', function() {
+ var Modernizr;
+ var modElem;
+ var cleanup;
+ var req;
+
+ beforeEach(function(done) {
+ Modernizr = {_q: []};
+ define('Modernizr', [], function() {return Modernizr;});
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['modElem', 'cleanup'], function(_modElem, _cleanup) {
+ modElem = _modElem;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('returns an object with an `elem` prop', function() {
+ expect(modElem).to.be.an('object');
+ expect(modElem.elem).to.not.be(undefined);
+ expect(modElem.elem.nodeName.toUpperCase()).to.be('MODERNIZR');
+ });
+
+ it('pushes a function onto the Modernizr._q', function() {
+ expect(Modernizr._q[0]).to.be.a('function');
+ });
+
+ it('deletes modElem.style after the `_q` runs', function() {
+ expect(modElem.elem).to.not.be(undefined);
+ Modernizr._q[0]();
+ expect(modElem.elem).to.be(undefined);
+ });
+
+ afterEach(function() {
+ req.undef('Modernizr');
+ req.undef('modElem');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('mq', function() {
+ var injectElementWithStyles;
+ var mq;
+ var cleanup;
+ var sinon;
+ var req;
+
+ var media = window.matchMedia || (function() {
+ // adapted from jQuery Mobile
+ // http://git.io/NFWo
+
+ var bool;
+ var docElem = document.documentElement;
+ var refNode = docElem.firstElementChild || docElem.firstChild;
+ // fakeBody required for <FF4 when executed in <head>
+ var fakeBody = document.createElement('body');
+ var div = document.createElement('div');
+
+ div.id = 'mq-test-1';
+ div.style.cssText = 'position:absolute;top:-100em';
+ fakeBody.style.background = 'none';
+ fakeBody.appendChild(div);
+
+ return function(q) {
+
+ div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
+
+ docElem.insertBefore(fakeBody, refNode);
+ bool = div.offsetWidth === 42;
+ docElem.removeChild(fakeBody);
+
+ return {
+ matches: bool,
+ media: q
+ };
+ };
+ })();
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ sinon: '../test/js/lib/sinon',
+ cleanup: '../test/cleanup'
+ }
+ });
+
+ req(['injectElementWithStyles', 'cleanup', 'sinon'], function(_injectElementWithStyles, _cleanup, _sinon) {
+ injectElementWithStyles = _injectElementWithStyles;
+ cleanup = _cleanup;
+ sinon = _sinon;
+ done();
+ });
+
+ });
+
+ if (window.matchMedia || window.msMatchMedia) {
+ describe('matchMedia version', function() {
+ before(function(done) {
+ req(['mq'], function(_mq) {
+ mq = _mq;
+ done();
+ });
+ });
+
+ it('works', function() {
+ expect(mq('only screen')).to.equal(media('only screen').matches);
+ expect(mq('only fake rule')).to.equal(media('only fake rule').matches);
+ });
+ });
+ } else {
+ describe('fallback version', function() {
+
+ before(function(done) {
+ injectElementWithStyles = sinon.spy(injectElementWithStyles);
+ req.undef('injectElementWithStyles');
+ req.undef('mq');
+
+ define('injectElementWithStyles', [], function() {return injectElementWithStyles;});
+
+ req(['mq'], function(_mq) {
+ mq = _mq;
+ done();
+ });
+ });
+
+ it('works', function() {
+
+ expect(mq('only screen')).to.equal(media('only screen').matches);
+ expect(mq('only fake rule')).to.equal(media('only fake rule').matches);
+ expect(injectElementWithStyles.called).to.be(true);
+ });
+
+ });
+
+ }
+
+ afterEach(function() {
+ req.undef('mq');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('nativeTestProps', function() {
+ var nativeTestProps;
+ var cleanup;
+
+ before(function(done) {
+
+ define('package', [], function() {return {};});
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['nativeTestProps', 'cleanup'], function(_nativeTestProps, _cleanup) {
+ nativeTestProps = _nativeTestProps;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('is a function', function() {
+ expect(nativeTestProps).to.be.a('function');
+ });
+
+ if (window.CSS && window.CSS.supports) {
+ it('looks up if the value is supported', function() {
+ expect(nativeTestProps(['display'], 'block')).to.be(true);
+ expect(nativeTestProps(['display'], 'fart')).to.be(false);
+ });
+ } else if ('CSSSupportsRule' in window) {
+ it('supports the old version of the lookup', function() {
+ expect(nativeTestProps(['display'], 'block')).to.be(true);
+ });
+ } else {
+ it('returns undefined for browsers lacking support', function() {
+ expect(nativeTestProps(['display'], 'block')).to.be(undefined);
+ });
+ }
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('omPrefixes', function() {
+ var omPrefixes;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['omPrefixes', 'cleanup'], function(_omPrefixes, _cleanup) {
+ omPrefixes = _omPrefixes;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('returns a string', function() {
+ expect(omPrefixes).to.be.a('string');
+ expect(omPrefixes.length).to.not.be(0);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('prefixed', function() {
+ var ModernizrProto;
+ var testPropsAll;
+ var prefixed;
+ var cssToDOM;
+ var cleanup;
+ var atRule;
+ var sinon;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ sinon: '../test/js/lib/sinon',
+ cleanup: '../test/cleanup'
+ }
+ });
+
+ req(['sinon', 'cleanup'], function(_sinon, _cleanup) {
+ sinon = _sinon;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ beforeEach(function(done) {
+
+ testPropsAll = sinon.spy(function() {return 'fakeRule';});
+ cssToDOM = sinon.spy(function() {return 'fakeRule';});
+ atRule = sinon.spy(function() {return '@fakeRule';});
+ ModernizrProto = {};
+
+ define('ModernizrProto', [], function() {return ModernizrProto;});
+ define('testPropsAll', [], function() {return testPropsAll;});
+ define('cssToDOM', [], function() {return cssToDOM;});
+ define('atRule', [], function() {return atRule;});
+
+
+ req(['prefixed'], function(_prefixed) {
+ prefixed = _prefixed;
+
+ done();
+ });
+ });
+
+ it('is a function', function() {
+ expect(prefixed).to.be.a('function');
+ });
+
+ it('creates a reference on `ModernizrProto`', function() {
+ expect(prefixed).to.equal(ModernizrProto.prefixed);
+ });
+
+ it('uses atRule to lookup rules starting with "@"', function() {
+ expect(prefixed('@fakeRule')).to.equal('@fakeRule');
+ expect(atRule.calledOnce).to.be(true);
+ });
+
+ it('uses cssToDOM to lookup rules with "-"', function() {
+ expect(prefixed('fake-rule')).to.equal('fakeRule');
+ expect(cssToDOM.calledOnce).to.be(true);
+ expect(testPropsAll.calledOnce).to.be(true);
+ });
+
+ it('looks up properties on an element, when one is provided', function() {
+ var elm = document.createElement('div');
+ expect(prefixed('children', elm)).to.equal('fakeRule');
+ expect(testPropsAll.calledOnce).to.be(true);
+ });
+
+ afterEach(function() {
+ req.undef('ModernizrProto');
+ req.undef('testPropsAll');
+ req.undef('cssToDOM');
+ req.undef('prefixed');
+ req.undef('atRule');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('prefixedCSS', function() {
+ var ModernizrProto = {_config: {usePrefixes: true}, _q: []};
+ var prefixedCSS;
+ var cleanup;
+
+ before(function(done) {
+ define('ModernizrProto', [], function() {return ModernizrProto;});
+ define('package', [], function() {return {version: 'v9999'};});
+
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cleanup', 'prefixedCSS'], function(_cleanup, _prefixedCSS) {
+ prefixedCSS = _prefixedCSS;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('creates a reference on `ModernizrProto`', function() {
+ expect(prefixedCSS).to.equal(ModernizrProto.prefixedCSS);
+ });
+
+ it('returns false on unknown properties', function() {
+ expect(prefixedCSS('fart')).to.equal(false);
+ });
+
+ it('returns known values without prefix', function() {
+ expect(prefixedCSS('display')).to.equal('display');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('prefixes', function() {
+ var setup = function(done, bool) {
+ return (function() {
+ define('ModernizrProto', [], function() {return {_config: {usePrefixes: bool}};});
+
+ req(['prefixes'], function(_prefixes) {
+ prefixes = _prefixes;
+ done();
+ });
+ })();
+ };
+ var teardown = function() {
+ prefixes = undefined;
+ req.undef('prefixes');
+ req.undef('ModernizrProto');
+ };
+ var prefixes;
+ var cleanup;
+ var req;
+
+
+ before(function(done) {
+ define('package', [], function() {return {};});
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cleanup'], function(_cleanup) {
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ describe('prefixes enabled', function() {
+ before(function(done) {
+ setup(done, true);
+ });
+
+ after(teardown);
+
+ it('returns prefixes', function(done) {
+ req(['prefixes'], function(prefixes) {
+ expect(prefixes).to.be.an('array');
+ expect(prefixes).to.not.have.length(0);
+ done();
+ });
+ });
+ });
+
+ describe('prefixes disabled', function() {
+ before(function(done) {
+ setup(done, false);
+ });
+
+ after(teardown);
+
+ it('returns no prefixes', function(done) {
+ req(['prefixes'], function(prefixes) {
+ expect(prefixes).to.be.an('array');
+ expect(prefixes).to.have.length(0);
+ done();
+ });
+ });
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('roundedEquals', function() {
+ var roundedEquals;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['roundedEquals', 'cleanup'], function(_roundedEquals, _cleanup) {
+ roundedEquals = _roundedEquals;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('works', function() {
+ expect(roundedEquals(1, 2)).to.be(true);
+ expect(roundedEquals(2, 2)).to.be(true);
+ expect(roundedEquals(3, 2)).to.be(true);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('setClasses', function() {
+ var setClasses;
+ var cleanup;
+ var elm;
+ var req;
+
+ var setup = function(done, config, defaultClassName) {
+ return (function() {
+ var modConfig = {_config: config};
+
+ elm = document.createElement('div');
+ if (defaultClassName) {
+ elm.className = defaultClassName;
+ }
+
+ define('Modernizr', [], function() {return modConfig;});
+ define('docElement', [], function() {return elm;});
+
+ req(['setClasses'], function(_setClasses) {
+ setClasses = _setClasses;
+ done();
+ });
+ })();
+ };
+ var teardown = function() {
+ setClasses = undefined;
+ req.undef('setClasses');
+ req.undef('docElement');
+ req.undef('Modernizr');
+ };
+
+
+ before(function(done) {
+ define('package', [], function() {return {};});
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cleanup'], function(_cleanup) {
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ describe('cssClasses disabled', function() {
+ before(function(done) {
+ setup(done, {
+ 'classPrefix': 'fake',
+ 'enableClasses': false
+ });
+ });
+
+ it('should not add anything', function(done) {
+ req(['setClasses'], function(setClasses) {
+ setClasses(['detect']);
+ expect(elm.className).to.not.contain('fakedetect');
+ done();
+ });
+ });
+
+ after(teardown);
+ });
+
+ describe('cssClasses enabled, with prefix', function() {
+ before(function(done) {
+ setup(done, {
+ 'classPrefix': 'fake',
+ 'enableClasses': true
+ });
+ });
+
+ it('adds a class with a prefix', function(done) {
+ req(['setClasses'], function(setClasses) {
+ setClasses(['detect']);
+ expect(elm.className).to.contain('fakedetect');
+ done();
+ });
+ });
+
+ after(teardown);
+ });
+
+ describe('cssClasses enabled, without prefix', function() {
+ before(function(done) {
+ setup(done, {
+ 'enableClasses': true
+ });
+ });
+
+ after(teardown);
+
+ it('adds a class without a prefix', function(done) {
+ req(['setClasses'], function(setClasses) {
+ setClasses(['detect']);
+ expect(elm.className).to.contain('detect');
+ done();
+ });
+ });
+ });
+
+
+ describe('enableJSClass enabled, with prefix', function() {
+ before(function(done) {
+ setup(done, {
+ 'classPrefix': 'fake',
+ 'enableClasses': true,
+ 'enableJSClass': true
+ }, ' fakeno-js +fakeno-js fakeno-js- i-has-fakeno-js');
+ });
+
+ it('changes the `js` class, and adds a class with a prefix', function(done) {
+ req(['setClasses'], function(setClasses) {
+ var classNames = elm.className.split(' ');
+ expect(classNames).to.contain('fakeno-js');
+ setClasses(['detect']);
+
+ classNames = elm.className.split(' ');
+ expect(elm.className).to.contain('fakejs');
+ expect(elm.className).to.contain('+fakeno-js');
+ expect(elm.className).to.contain('fakeno-js-');
+ expect(elm.className).to.contain('i-has-fakeno-js');
+ expect(elm.className).to.contain('fakedetect');
+ done();
+ });
+ });
+
+ after(teardown);
+
+ });
+
+ describe('enableJSClass enabled, without prefix', function() {
+ before(function(done) {
+ setup(done, {
+ 'enableJSClass': true,
+ 'enableClasses': true
+ }, ' no-js +no-js no-js- i-has-no-js');
+ });
+
+ after(teardown);
+
+ it('changes the `js` class, and adds a class without a prefix', function(done) {
+ req(['setClasses'], function(setClasses) {
+ var classNames = elm.className.split(' ');
+ expect(classNames).to.contain('no-js');
+ setClasses(['detect']);
+
+ classNames = elm.className.split(' ');
+ expect(elm.className).to.contain('js');
+ expect(elm.className).to.contain('+no-js');
+ expect(elm.className).to.contain('no-js-');
+ expect(elm.className).to.contain('i-has-no-js');
+ expect(elm.className).to.contain('detect');
+ done();
+ });
+ });
+
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('slice', function() {
+ var slice;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['slice', 'cleanup'], function(_slice, _cleanup) {
+ slice = _slice;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('returns an instance of `slice`', function() {
+ expect(slice).to.equal([].slice);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('testAllProps', function() {
+ var ModernizrProto = {};
+ var testAllProps;
+ var testPropsAll;
+ var cleanup;
+ var sinon;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ sinon: '../test/js/lib/sinon',
+ cleanup: '../test/cleanup'
+ }
+ });
+
+ define('ModernizrProto', [], function() {return ModernizrProto;});
+ define('package', [], function() {return {};});
+
+ req(['cleanup', 'sinon'], function(_cleanup, _sinon) {
+ cleanup = _cleanup;
+ sinon = _sinon;
+ done();
+ });
+ });
+
+ beforeEach(function(done) {
+ testPropsAll = sinon.spy();
+
+ define('testPropsAll', function() {return testPropsAll;});
+
+ req(['testAllProps'], function(_testAllProps) {
+ testAllProps = _testAllProps;
+ done();
+ });
+ });
+
+ it('is a curried version of `testPropsAll`', function() {
+ testAllProps('flexAlign', 'end', true);
+ expect(testPropsAll.calledOnce).to.be(true);
+
+ expect(testPropsAll.calledWithExactly(
+ 'flexAlign',
+ undefined,
+ undefined,
+ 'end',
+ true
+ )).to.be(true);
+ });
+
+ it('is added to ModernizrProto', function() {
+ expect(testAllProps).to.equal(ModernizrProto.testAllProps);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('testDOMProps', function() {
+ var elm = document.createElement('div');
+ var testDOMProps;
+ var cleanup;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cleanup'], function(_cleanup) {
+ cleanup = _cleanup;
+ done();
+ });
+
+ });
+
+ beforeEach(function(done) {
+ req(['testDOMProps'], function(_testDOMProps) {
+ testDOMProps = _testDOMProps;
+ done();
+ });
+ });
+
+ it('returns known values', function() {
+ expect(testDOMProps(['clientHeight'], elm)).to.equal(elm.clientHeight);
+ });
+
+ it('returns false for unknown values', function() {
+ expect(testDOMProps(['fart'], elm)).to.equal(false);
+ });
+
+ it('bind a value to to the object', function() {
+ elm.answer = function() {return 42;};
+ expect(testDOMProps(['answer'], elm)()).to.equal(elm.answer());
+ });
+
+ it('bind a value to the element, if it is provided', function() {
+ elm.answer = function() {return 42;};
+ expect(testDOMProps(['answer'], {}, elm)).to.equal(false);
+ });
+
+ it('return the property name as a string if elem is false', function() {
+ elm.answer = function() {return 42;};
+ expect(testDOMProps(['answer'], {'answer': 42}, false)).to.equal('answer');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('testProp', function() {
+ var ModernizrProto = {};
+ var testProp;
+ var testProps;
+ var cleanup;
+ var sinon;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ sinon: '../test/js/lib/sinon',
+ cleanup: '../test/cleanup'
+ }
+ });
+
+ define('ModernizrProto', [], function() {return ModernizrProto;});
+ define('package', [], function() {return {};});
+
+ req(['cleanup', 'sinon'], function(_cleanup, _sinon) {
+ cleanup = _cleanup;
+ sinon = _sinon;
+ done();
+ });
+ });
+
+ beforeEach(function(done) {
+ testProps = sinon.spy();
+
+ define('testProps', function() {return testProps;});
+
+ req(['testProp'], function(_testProp) {
+ testProp = _testProp;
+ done();
+ });
+ });
+
+ it('is a curried version of `testProps`', function() {
+ testProp('flexAlign', 'end', true);
+ expect(testProps.calledOnce).to.be(true);
+
+ expect(testProps.calledWithExactly(
+ ['flexAlign'],
+ undefined,
+ 'end',
+ true
+ )).to.be(true);
+ });
+
+ it('is added to ModernizrProto', function() {
+ expect(testProp).to.equal(ModernizrProto.testProp);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('testProps', function() {
+ var ModernizrProto = {foo: 7};
+ var Modernizr = {_q: []};
+ var testProps;
+ var cleanup;
+ var sinon;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ sinon: '../test/js/lib/sinon',
+ cleanup: '../test/cleanup'
+ }
+ });
+
+ define('ModernizrProto', [], function() {return ModernizrProto;});
+ define('Modernizr', function() {return Modernizr;});
+ define('package', [], function() {return {};});
+
+ req(['cleanup', 'sinon'], function(_cleanup, _sinon) {
+ cleanup = _cleanup;
+ sinon = _sinon;
+ done();
+ });
+ });
+
+ describe('native detect', function() {
+ var nativeTestProps = function(props, value) {
+ return !!value ? true : undefined;
+ };
+ var contains;
+
+ beforeEach(function(done) {
+ contains = sinon.spy();
+
+ nativeTestProps = sinon.spy(nativeTestProps);
+
+ define('contains', function() {return contains;});
+ define('nativeTestProps', sinon.spy(function() {return nativeTestProps;}));
+
+ req(['testProps'], function(_testProps) {
+ testProps = _testProps;
+ done();
+ });
+ });
+
+ it('returns the value from nativeTestProp if not undefined', function() {
+ expect(testProps(['fake'], undefined, true));
+ expect(nativeTestProps.callCount).to.be(1);
+ expect(contains.callCount).to.be(0);
+ });
+
+ it('does not return the value from nativeTestProp when undefined', function() {
+ expect(testProps(['fake'], undefined, false));
+ expect(nativeTestProps.callCount).to.be(1);
+ expect(contains.callCount).to.not.be(0);
+ });
+
+ afterEach(function() {
+ req.undef('mStyle');
+ req.undef('cssToDOM');
+ req.undef('contains');
+ req.undef('testProps');
+ req.undef('nativeTestProps');
+ });
+ });
+
+ describe('nonnative detect', function() {
+ var contains = function(a, b) {return a.indexOf(b) > -1;};
+ var nativeTestProps = function() { return; };
+ var cssToDOM;
+ var mStyle;
+
+ beforeEach(function(done) {
+ nativeTestProps = sinon.spy(nativeTestProps);
+ contains = sinon.spy(contains);
+ cssToDOM = sinon.spy();
+ mStyle = {};
+
+ define('nativeTestProps', sinon.spy(function() {return nativeTestProps;}));
+ define('cssToDOM', function() {return cssToDOM;});
+ define('contains', function() {return contains;});
+ define('mStyle', function() {return mStyle;});
+
+ req(['testProps'], function(_testProps) {
+ testProps = _testProps;
+ done();
+ });
+ });
+
+ it('cleans up mStyle changes', function() {
+ expect(testProps(['fake'], undefined, true));
+ expect(contains.callCount).to.be(1);
+ expect(mStyle.style).to.equal(undefined);
+ expect(mStyle.modElem).to.equal(undefined);
+ });
+
+ it('calls cssToDOM when props have a `-`', function() {
+ expect(testProps(['fake-detect'], undefined, true));
+ expect(cssToDOM.called).to.be(true);
+ });
+
+ it('returns true for valid prop, and skipValueTest', function() {
+ expect(testProps(['display'], undefined, true, true)).to.be(true);
+ });
+
+ it('returns true for valid prop, and good value', function() {
+ expect(testProps(['display'], undefined, 'block')).to.be(true);
+ });
+
+ it('returns false for valid prop and bad value', function() {
+ expect(testProps(['display'], undefined, 'penguin')).to.be(false);
+ });
+
+ it('returns the prop if a prefixed lookup', function() {
+ expect(testProps(['display'], 'pfx', 'block')).to.be('display');
+ });
+
+ it('returns the prop if a prefixed lookup with skipValueTest', function() {
+ expect(testProps(['display'], 'pfx', 'block', true)).to.be('display');
+ });
+
+ it('works properly', function() {
+ // Everyone supports margin
+ expect(testProps(['margin'])).to.equal(true);
+ // Nobody supports the happiness style. :(
+ expect(testProps(['happiness'])).to.equal(false);
+ // Everyone supports fontSize
+ expect(testProps(['fontSize'])).to.equal(true);
+ // kebab-case should work too
+ });
+
+
+ afterEach(function() {
+ req.undef('mStyle');
+ req.undef('cssToDOM');
+ req.undef('contains');
+ req.undef('testProps');
+ req.undef('ModernizrProto');
+ req.undef('nativeTestProps');
+ });
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('testPropsAll', function() {
+ var ModernizrProto = {_config: {}};
+ var Modernizr = {_q: []};
+ var testPropsAll;
+ var testDOMProps;
+ var testProps;
+ var cleanup;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ sinon: '../test/js/lib/sinon',
+ cleanup: '../test/cleanup'
+ }
+ });
+
+ define('ModernizrProto', [], function() {return ModernizrProto;});
+ define('Modernizr', [], function() {return Modernizr;});
+ define('package', [], function() {return {};});
+
+ req(['testDOMProps', 'testProps', 'cleanup', 'sinon'], function(_testDOMProps, _testProps, _cleanup, _sinon) {
+ testDOMProps = _sinon.spy(_testDOMProps);
+ testProps = _sinon.spy(_testProps);
+ cleanup = _cleanup;
+
+ done();
+ });
+
+ });
+
+ beforeEach(function(done) {
+ req.undef('testDOMProps');
+ req.undef('testProps');
+
+ testDOMProps.reset();
+ testProps.reset();
+
+ define('testDOMProps', function() {return testDOMProps;});
+ define('testProps', function() {return testProps;});
+
+ req(['testPropsAll'], function(_testPropsAll) {
+ testPropsAll = _testPropsAll;
+
+ expect(testDOMProps.callCount).to.be(0);
+ expect(testProps.callCount).to.be(0);
+ done();
+ });
+
+ });
+
+ it('`testProps` is called if `prefixed` is a string', function() {
+ testPropsAll('display', 'pfx', undefined, 'block');
+ expect(testProps.callCount).to.be(1);
+ });
+
+ it('`testProps` is called if `prefixed` is undefined', function() {
+ testPropsAll('display', undefined, undefined, 'block');
+ expect(testProps.callCount).to.be(1);
+ });
+
+ it('`testDOMProps` is called if `prefixed` is anything else', function() {
+ testPropsAll('display', [], undefined, 'block');
+ expect(testDOMProps.callCount).to.be(1);
+ });
+
+ it('is added to ModernizrProto as `testAllProps`', function() {
+ expect(testPropsAll).to.equal(ModernizrProto.testAllProps);
+ });
+
+ afterEach(function() {
+ req.undef('testPropsAll');
+ req.undef('testDOMProps');
+ req.undef('testProps');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('testRunner', function() {
+ var Modernizr = {};
+ var cleanup;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ define('Modernizr', [], function() {return Modernizr;});
+ define('tests', [], function() {
+ return [
+ {
+ 'name': 'fakeFn',
+ 'fn': function() {return true;}
+ }, {
+ 'name': 'fakeBool',
+ 'fn': false
+ }, {
+ 'name': 'newFakeDetect',
+ 'fn': function() {return 10;},
+ 'options': {
+ 'aliases': ['fakeDetect']
+ }
+ }, {
+ 'name': 'fake',
+ 'fn': true
+ }, {
+ 'name': 'fake.detect',
+ 'fn': 99
+ }, {
+ 'name': 'fakeBoolDeep',
+ /* jshint -W053 */
+ 'fn': new Boolean(true)
+ /* jshint +W053 */
+ }, {
+ 'name': 'fakeBoolDeep.detect',
+ 'fn': false
+ }, {
+ 'fn': function() {
+ return !!'async test';
+ }
+ }
+ ];
+ });
+
+ req(['testRunner', 'cleanup'], function(_testRunner, _cleanup) {
+ _testRunner();
+ cleanup = _cleanup;
+ done();
+ });
+
+ });
+
+ it('returns true if fn returns true', function() {
+ expect('fakefn' in Modernizr).to.be(true);
+ });
+
+ it('returns true if fn is a bool', function() {
+ expect(Modernizr.fakebool).to.be(false);
+ });
+
+ it('assigns aliased values', function() {
+ expect(Modernizr.newfakedetect).to.equal(Modernizr.fakedetect);
+ });
+
+ it('deep assignments are valid', function() {
+ expect(Modernizr.fake.detect).to.equal(99);
+ });
+
+ it('deep assignments are true with bool base', function() {
+ expect(Modernizr.fakebooldeep instanceof Boolean).to.be(true);
+ expect(Modernizr.fakebooldeep.detect).to.equal(false);
+ });
+
+ afterEach(function() {
+ req.undef('testRunner');
+ req.undef('Modernizr');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('testStyles', function() {
+ var injectElementWithStyles;
+ var ModernizrProto;
+ var cleanup;
+ var testStyles;
+
+
+ before(function(done) {
+
+ define('ModernizrProto', [], function() {return {};});
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['ModernizrProto', 'testStyles', 'injectElementWithStyles', 'cleanup'], function(_ModernizrProto, _testStyles, _injectElementWithStyles, _cleanup) {
+ injectElementWithStyles = _injectElementWithStyles;
+ ModernizrProto = _ModernizrProto;
+ testStyles = _testStyles;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('creates a reference on `ModernizrProto`', function() {
+ expect(ModernizrProto.testStyles).to.be.a('function');
+ });
+
+ it('is just an alias to injectElementWithStyles', function() {
+ expect(ModernizrProto.testStyles).to.equal(injectElementWithStyles);
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('testXhrType', function() {
+ var cleanup;
+ var req;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {
+ cleanup: '../test/cleanup'
+ }
+ });
+
+ req(['cleanup'], function(_cleanup) {
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ /*jshint -W020 */
+ it('returns false when XHR is undefined', function(done) {
+ var originalXhr = XMLHttpRequest;
+ XMLHttpRequest = undefined;
+
+ req(['testXhrType'], function(testXhrType) {
+ expect(testXhrType('json')).to.equal(false);
+ XMLHttpRequest = originalXhr;
+ done();
+ });
+ });
+ /*jshint +W020 */
+
+ // TODO add more tests once sinon's XHR2 features land
+ // http://git.io/AemZ
+
+ afterEach(function() {
+ req.undef('testXhrType');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('tests', function() {
+ var tests;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['tests', 'cleanup'], function(_tests, _cleanup) {
+ tests = _tests;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+
+ it('is an array', function() {
+ expect(tests).to.be.an('array');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('toStringFn', function() {
+ var toStringFn;
+ var cleanup;
+
+ before(function(done) {
+
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['toStringFn', 'cleanup'], function(_toStringFn, _cleanup) {
+ toStringFn = _toStringFn;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+
+ it('is an function', function() {
+ expect(toStringFn).to.be.an('function');
+ });
+
+ it('toStrings stuff', function() {
+ expect(toStringFn.call([])).to.equal('[object Array]');
+ expect(toStringFn.call({})).to.equal('[object Object]');
+ expect(toStringFn.call(true)).to.equal('[object Boolean]');
+ expect(toStringFn.call(new Date())).to.equal('[object Date]');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+describe('svg context unit tests', function() {
+ var svgContext;
+ var cleanup;
+ var object;
+ var req;
+
+ if ('createElementNS' in document) {
+
+ var setup = function(settings) {
+ var stringified = settings.stringified;
+ var instrumented = !!stringified.match(/__cov_/);
+
+ if (instrumented) {
+ settings.coverageObjName = stringified.match(/(?:^[^{]*{)([^.]*)/)[1];
+ svgContext[settings.coverageObjName] = window[settings.coverageObjName];
+ }
+
+ _.extend(svgContext, settings.setup);
+
+ svgContext.eval(stringified);
+
+ settings.cleanup = function() {
+ if (instrumented) {
+ window[settings.coverageObjName] = svgContext[settings.coverageObjName] ;
+ }
+ };
+
+ return settings;
+ };
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src',
+ paths: {cleanup: '../test/cleanup'}
+ });
+
+ req(['cleanup'], function(_cleanup) {
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ beforeEach(function(done) {
+ object = document.createElement('object');
+
+ object.data = '../test/img/unit.svg';
+ object.type = 'image/svg+xml';
+ object.id = 'svgContext';
+
+ object.onerror = function() {
+ var arg = Array.prototype.slice.call(arguments).join(' ');
+ try {
+ expect(arg).to.be(undefined);
+ } catch (e) {
+ done(e);
+ }
+ };
+
+ object.runUnitTests = function(thisRef) {
+ svgContext = thisRef;
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ baseUrl: '../src'
+ });
+
+ done();
+ };
+
+ document.body.appendChild(object);
+ });
+
+ it('is still able to set classNames correctly', function(done) {
+ req(['setClasses'], function(setClasses) {
+ try {
+ var testInstance = setup({
+ stringified: setClasses.toString(),
+ setup: {
+ Modernizr: {_config: {enableClasses: true}},
+ docElement: svgContext.document.documentElement,
+ isSVG: true
+ }
+ });
+
+ svgContext.test(function() {
+ setClasses(['svgdetect']);
+ });
+
+ expect(svgContext.document.documentElement.className.baseVal).to.contain('svgdetect');
+
+ testInstance.cleanup();
+
+ done();
+ }
+ catch (e) { done(e); }
+ });
+ });
+
+ it('uses the correct namespace when creating elements', function(done) {
+ req(['createElement'], function(createElement) {
+ try {
+ var testInstance = setup({
+ stringified: createElement.toString(),
+ setup: {
+ isSVG: true
+ }
+ });
+
+ svgContext.test(function() {
+ window._testElem = createElement('a');
+ });
+
+ expect(svgContext._testElem.namespaceURI).to.equal('http://www.w3.org/2000/svg');
+
+ testInstance.cleanup();
+
+ done();
+ }
+ catch (e) { done(e); }
+ });
+ });
+
+ it('uses a SVG element for when making a fake body', function(done) {
+ req(['getBody'], function(getBody) {
+ try {
+ var testInstance = setup({
+ stringified: getBody.toString(),
+ setup: {
+ isSVG: true,
+ createElement: function() {
+ return svgContext.document.createElement.apply(svgContext.document, arguments);
+ }
+ }
+ });
+
+ svgContext.test(function() {
+ window._body = getBody();
+ });
+
+ expect(svgContext._body.nodeName.toLowerCase()).to.equal('svg');
+
+ testInstance.cleanup();
+
+ done();
+ }
+ catch (e) { done(e); }
+ });
+ });
+
+
+ afterEach(function() {
+ object.parentNode.removeChild(object);
+ cleanup();
+ });
+ }
+});
--- /dev/null
+/*jshint: globals __coverage__ */
+if (typeof define !== 'function') {
+ var requirejs = require('requirejs');
+}
+
+define([], function() {
+ return function() {
+ var contexts = requirejs.s.contexts;
+
+ for (var context in contexts) {
+ if (contexts.hasOwnProperty(context)) {
+ var defined = contexts[context].defined;
+ for (var module in defined) {
+ if (defined.hasOwnProperty(module) && !module.match(/cleanup|sinon/)) {
+ requirejs.undef(module);
+ }
+ }
+ }
+ }
+ };
+});
--- /dev/null
+/**
+ * Sinon.JS 1.12.2, 2015/02/15
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS
+ *
+ * (The BSD License)
+ *
+ * Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Christian Johansen nor the names of his contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ define([], function () {
+ return (root.sinon = factory());
+ });
+ } else if (typeof exports === 'object') {
+ module.exports = factory();
+ } else {
+ root.sinon = factory();
+ }
+}(this, function () {
+ var samsam, formatio;
+ (function () {
+ function define(mod, deps, fn) {
+ if (mod == "samsam") {
+ samsam = deps();
+ } else if (typeof deps === "function" && mod.length === 0) {
+ lolex = deps();
+ } else if (typeof fn === "function") {
+ formatio = fn(samsam);
+ }
+ }
+ define.amd = {};
+((typeof define === "function" && define.amd && function (m) { define("samsam", m); }) ||
+ (typeof module === "object" &&
+ function (m) { module.exports = m(); }) || // Node
+ function (m) { this.samsam = m(); } // Browser globals
+)(function () {
+ var o = Object.prototype;
+ var div = typeof document !== "undefined" && document.createElement("div");
+
+ function isNaN(value) {
+ // Unlike global isNaN, this avoids type coercion
+ // typeof check avoids IE host object issues, hat tip to
+ // lodash
+ var val = value; // JsLint thinks value !== value is "weird"
+ return typeof value === "number" && value !== val;
+ }
+
+ function getClass(value) {
+ // Returns the internal [[Class]] by calling Object.prototype.toString
+ // with the provided value as this. Return value is a string, naming the
+ // internal class, e.g. "Array"
+ return o.toString.call(value).split(/[ \]]/)[1];
+ }
+
+ /**
+ * @name samsam.isArguments
+ * @param Object object
+ *
+ * Returns ``true`` if ``object`` is an ``arguments`` object,
+ * ``false`` otherwise.
+ */
+ function isArguments(object) {
+ if (getClass(object) === 'Arguments') { return true; }
+ if (typeof object !== "object" || typeof object.length !== "number" ||
+ getClass(object) === "Array") {
+ return false;
+ }
+ if (typeof object.callee == "function") { return true; }
+ try {
+ object[object.length] = 6;
+ delete object[object.length];
+ } catch (e) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @name samsam.isElement
+ * @param Object object
+ *
+ * Returns ``true`` if ``object`` is a DOM element node. Unlike
+ * Underscore.js/lodash, this function will return ``false`` if ``object``
+ * is an *element-like* object, i.e. a regular object with a ``nodeType``
+ * property that holds the value ``1``.
+ */
+ function isElement(object) {
+ if (!object || object.nodeType !== 1 || !div) { return false; }
+ try {
+ object.appendChild(div);
+ object.removeChild(div);
+ } catch (e) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @name samsam.keys
+ * @param Object object
+ *
+ * Return an array of own property names.
+ */
+ function keys(object) {
+ var ks = [], prop;
+ for (prop in object) {
+ if (o.hasOwnProperty.call(object, prop)) { ks.push(prop); }
+ }
+ return ks;
+ }
+
+ /**
+ * @name samsam.isDate
+ * @param Object value
+ *
+ * Returns true if the object is a ``Date``, or *date-like*. Duck typing
+ * of date objects work by checking that the object has a ``getTime``
+ * function whose return value equals the return value from the object's
+ * ``valueOf``.
+ */
+ function isDate(value) {
+ return typeof value.getTime == "function" &&
+ value.getTime() == value.valueOf();
+ }
+
+ /**
+ * @name samsam.isNegZero
+ * @param Object value
+ *
+ * Returns ``true`` if ``value`` is ``-0``.
+ */
+ function isNegZero(value) {
+ return value === 0 && 1 / value === -Infinity;
+ }
+
+ /**
+ * @name samsam.equal
+ * @param Object obj1
+ * @param Object obj2
+ *
+ * Returns ``true`` if two objects are strictly equal. Compared to
+ * ``===`` there are two exceptions:
+ *
+ * - NaN is considered equal to NaN
+ * - -0 and +0 are not considered equal
+ */
+ function identical(obj1, obj2) {
+ if (obj1 === obj2 || (isNaN(obj1) && isNaN(obj2))) {
+ return obj1 !== 0 || isNegZero(obj1) === isNegZero(obj2);
+ }
+ }
+
+
+ /**
+ * @name samsam.deepEqual
+ * @param Object obj1
+ * @param Object obj2
+ *
+ * Deep equal comparison. Two values are "deep equal" if:
+ *
+ * - They are equal, according to samsam.identical
+ * - They are both date objects representing the same time
+ * - They are both arrays containing elements that are all deepEqual
+ * - They are objects with the same set of properties, and each property
+ * in ``obj1`` is deepEqual to the corresponding property in ``obj2``
+ *
+ * Supports cyclic objects.
+ */
+ function deepEqualCyclic(obj1, obj2) {
+
+ // used for cyclic comparison
+ // contain already visited objects
+ var objects1 = [],
+ objects2 = [],
+ // contain pathes (position in the object structure)
+ // of the already visited objects
+ // indexes same as in objects arrays
+ paths1 = [],
+ paths2 = [],
+ // contains combinations of already compared objects
+ // in the manner: { "$1['ref']$2['ref']": true }
+ compared = {};
+
+ /**
+ * used to check, if the value of a property is an object
+ * (cyclic logic is only needed for objects)
+ * only needed for cyclic logic
+ */
+ function isObject(value) {
+
+ if (typeof value === 'object' && value !== null &&
+ !(value instanceof Boolean) &&
+ !(value instanceof Date) &&
+ !(value instanceof Number) &&
+ !(value instanceof RegExp) &&
+ !(value instanceof String)) {
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * returns the index of the given object in the
+ * given objects array, -1 if not contained
+ * only needed for cyclic logic
+ */
+ function getIndex(objects, obj) {
+
+ var i;
+ for (i = 0; i < objects.length; i++) {
+ if (objects[i] === obj) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ // does the recursion for the deep equal check
+ return (function deepEqual(obj1, obj2, path1, path2) {
+ var type1 = typeof obj1;
+ var type2 = typeof obj2;
+
+ // == null also matches undefined
+ if (obj1 === obj2 ||
+ isNaN(obj1) || isNaN(obj2) ||
+ obj1 == null || obj2 == null ||
+ type1 !== "object" || type2 !== "object") {
+
+ return identical(obj1, obj2);
+ }
+
+ // Elements are only equal if identical(expected, actual)
+ if (isElement(obj1) || isElement(obj2)) { return false; }
+
+ var isDate1 = isDate(obj1), isDate2 = isDate(obj2);
+ if (isDate1 || isDate2) {
+ if (!isDate1 || !isDate2 || obj1.getTime() !== obj2.getTime()) {
+ return false;
+ }
+ }
+
+ if (obj1 instanceof RegExp && obj2 instanceof RegExp) {
+ if (obj1.toString() !== obj2.toString()) { return false; }
+ }
+
+ var class1 = getClass(obj1);
+ var class2 = getClass(obj2);
+ var keys1 = keys(obj1);
+ var keys2 = keys(obj2);
+
+ if (isArguments(obj1) || isArguments(obj2)) {
+ if (obj1.length !== obj2.length) { return false; }
+ } else {
+ if (type1 !== type2 || class1 !== class2 ||
+ keys1.length !== keys2.length) {
+ return false;
+ }
+ }
+
+ var key, i, l,
+ // following vars are used for the cyclic logic
+ value1, value2,
+ isObject1, isObject2,
+ index1, index2,
+ newPath1, newPath2;
+
+ for (i = 0, l = keys1.length; i < l; i++) {
+ key = keys1[i];
+ if (!o.hasOwnProperty.call(obj2, key)) {
+ return false;
+ }
+
+ // Start of the cyclic logic
+
+ value1 = obj1[key];
+ value2 = obj2[key];
+
+ isObject1 = isObject(value1);
+ isObject2 = isObject(value2);
+
+ // determine, if the objects were already visited
+ // (it's faster to check for isObject first, than to
+ // get -1 from getIndex for non objects)
+ index1 = isObject1 ? getIndex(objects1, value1) : -1;
+ index2 = isObject2 ? getIndex(objects2, value2) : -1;
+
+ // determine the new pathes of the objects
+ // - for non cyclic objects the current path will be extended
+ // by current property name
+ // - for cyclic objects the stored path is taken
+ newPath1 = index1 !== -1
+ ? paths1[index1]
+ : path1 + '[' + JSON.stringify(key) + ']';
+ newPath2 = index2 !== -1
+ ? paths2[index2]
+ : path2 + '[' + JSON.stringify(key) + ']';
+
+ // stop recursion if current objects are already compared
+ if (compared[newPath1 + newPath2]) {
+ return true;
+ }
+
+ // remember the current objects and their pathes
+ if (index1 === -1 && isObject1) {
+ objects1.push(value1);
+ paths1.push(newPath1);
+ }
+ if (index2 === -1 && isObject2) {
+ objects2.push(value2);
+ paths2.push(newPath2);
+ }
+
+ // remember that the current objects are already compared
+ if (isObject1 && isObject2) {
+ compared[newPath1 + newPath2] = true;
+ }
+
+ // End of cyclic logic
+
+ // neither value1 nor value2 is a cycle
+ // continue with next level
+ if (!deepEqual(value1, value2, newPath1, newPath2)) {
+ return false;
+ }
+ }
+
+ return true;
+
+ }(obj1, obj2, '$1', '$2'));
+ }
+
+ var match;
+
+ function arrayContains(array, subset) {
+ if (subset.length === 0) { return true; }
+ var i, l, j, k;
+ for (i = 0, l = array.length; i < l; ++i) {
+ if (match(array[i], subset[0])) {
+ for (j = 0, k = subset.length; j < k; ++j) {
+ if (!match(array[i + j], subset[j])) { return false; }
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @name samsam.match
+ * @param Object object
+ * @param Object matcher
+ *
+ * Compare arbitrary value ``object`` with matcher.
+ */
+ match = function match(object, matcher) {
+ if (matcher && typeof matcher.test === "function") {
+ return matcher.test(object);
+ }
+
+ if (typeof matcher === "function") {
+ return matcher(object) === true;
+ }
+
+ if (typeof matcher === "string") {
+ matcher = matcher.toLowerCase();
+ var notNull = typeof object === "string" || !!object;
+ return notNull &&
+ (String(object)).toLowerCase().indexOf(matcher) >= 0;
+ }
+
+ if (typeof matcher === "number") {
+ return matcher === object;
+ }
+
+ if (typeof matcher === "boolean") {
+ return matcher === object;
+ }
+
+ if (typeof(matcher) === "undefined") {
+ return typeof(object) === "undefined";
+ }
+
+ if (matcher === null) {
+ return object === null;
+ }
+
+ if (getClass(object) === "Array" && getClass(matcher) === "Array") {
+ return arrayContains(object, matcher);
+ }
+
+ if (matcher && typeof matcher === "object") {
+ if (matcher === object) {
+ return true;
+ }
+ var prop;
+ for (prop in matcher) {
+ var value = object[prop];
+ if (typeof value === "undefined" &&
+ typeof object.getAttribute === "function") {
+ value = object.getAttribute(prop);
+ }
+ if (matcher[prop] === null || typeof matcher[prop] === 'undefined') {
+ if (value !== matcher[prop]) {
+ return false;
+ }
+ } else if (typeof value === "undefined" || !match(value, matcher[prop])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ throw new Error("Matcher was not a string, a number, a " +
+ "function, a boolean or an object");
+ };
+
+ return {
+ isArguments: isArguments,
+ isElement: isElement,
+ isDate: isDate,
+ isNegZero: isNegZero,
+ identical: identical,
+ deepEqual: deepEqualCyclic,
+ match: match,
+ keys: keys
+ };
+});
+((typeof define === "function" && define.amd && function (m) {
+ define("formatio", ["samsam"], m);
+}) || (typeof module === "object" && function (m) {
+ module.exports = m(require("samsam"));
+}) || function (m) { this.formatio = m(this.samsam); }
+)(function (samsam) {
+
+ var formatio = {
+ excludeConstructors: ["Object", /^.$/],
+ quoteStrings: true,
+ limitChildrenCount: 0
+ };
+
+ var hasOwn = Object.prototype.hasOwnProperty;
+
+ var specialObjects = [];
+ if (typeof global !== "undefined") {
+ specialObjects.push({ object: global, value: "[object global]" });
+ }
+ if (typeof document !== "undefined") {
+ specialObjects.push({
+ object: document,
+ value: "[object HTMLDocument]"
+ });
+ }
+ if (typeof window !== "undefined") {
+ specialObjects.push({ object: window, value: "[object Window]" });
+ }
+
+ function functionName(func) {
+ if (!func) { return ""; }
+ if (func.displayName) { return func.displayName; }
+ if (func.name) { return func.name; }
+ var matches = func.toString().match(/function\s+([^\(]+)/m);
+ return (matches && matches[1]) || "";
+ }
+
+ function constructorName(f, object) {
+ var name = functionName(object && object.constructor);
+ var excludes = f.excludeConstructors ||
+ formatio.excludeConstructors || [];
+
+ var i, l;
+ for (i = 0, l = excludes.length; i < l; ++i) {
+ if (typeof excludes[i] === "string" && excludes[i] === name) {
+ return "";
+ } else if (excludes[i].test && excludes[i].test(name)) {
+ return "";
+ }
+ }
+
+ return name;
+ }
+
+ function isCircular(object, objects) {
+ if (typeof object !== "object") { return false; }
+ var i, l;
+ for (i = 0, l = objects.length; i < l; ++i) {
+ if (objects[i] === object) { return true; }
+ }
+ return false;
+ }
+
+ function ascii(f, object, processed, indent) {
+ if (typeof object === "string") {
+ var qs = f.quoteStrings;
+ var quote = typeof qs !== "boolean" || qs;
+ return processed || quote ? '"' + object + '"' : object;
+ }
+
+ if (typeof object === "function" && !(object instanceof RegExp)) {
+ return ascii.func(object);
+ }
+
+ processed = processed || [];
+
+ if (isCircular(object, processed)) { return "[Circular]"; }
+
+ if (Object.prototype.toString.call(object) === "[object Array]") {
+ return ascii.array.call(f, object, processed);
+ }
+
+ if (!object) { return String((1/object) === -Infinity ? "-0" : object); }
+ if (samsam.isElement(object)) { return ascii.element(object); }
+
+ if (typeof object.toString === "function" &&
+ object.toString !== Object.prototype.toString) {
+ return object.toString();
+ }
+
+ var i, l;
+ for (i = 0, l = specialObjects.length; i < l; i++) {
+ if (object === specialObjects[i].object) {
+ return specialObjects[i].value;
+ }
+ }
+
+ return ascii.object.call(f, object, processed, indent);
+ }
+
+ ascii.func = function (func) {
+ return "function " + functionName(func) + "() {}";
+ };
+
+ ascii.array = function (array, processed) {
+ processed = processed || [];
+ processed.push(array);
+ var pieces = [];
+ var i, l;
+ l = (this.limitChildrenCount > 0) ?
+ Math.min(this.limitChildrenCount, array.length) : array.length;
+
+ for (i = 0; i < l; ++i) {
+ pieces.push(ascii(this, array[i], processed));
+ }
+
+ if(l < array.length)
+ pieces.push("[... " + (array.length - l) + " more elements]");
+
+ return "[" + pieces.join(", ") + "]";
+ };
+
+ ascii.object = function (object, processed, indent) {
+ processed = processed || [];
+ processed.push(object);
+ indent = indent || 0;
+ var pieces = [], properties = samsam.keys(object).sort();
+ var length = 3;
+ var prop, str, obj, i, k, l;
+ l = (this.limitChildrenCount > 0) ?
+ Math.min(this.limitChildrenCount, properties.length) : properties.length;
+
+ for (i = 0; i < l; ++i) {
+ prop = properties[i];
+ obj = object[prop];
+
+ if (isCircular(obj, processed)) {
+ str = "[Circular]";
+ } else {
+ str = ascii(this, obj, processed, indent + 2);
+ }
+
+ str = (/\s/.test(prop) ? '"' + prop + '"' : prop) + ": " + str;
+ length += str.length;
+ pieces.push(str);
+ }
+
+ var cons = constructorName(this, object);
+ var prefix = cons ? "[" + cons + "] " : "";
+ var is = "";
+ for (i = 0, k = indent; i < k; ++i) { is += " "; }
+
+ if(l < properties.length)
+ pieces.push("[... " + (properties.length - l) + " more elements]");
+
+ if (length + indent > 80) {
+ return prefix + "{\n " + is + pieces.join(",\n " + is) + "\n" +
+ is + "}";
+ }
+ return prefix + "{ " + pieces.join(", ") + " }";
+ };
+
+ ascii.element = function (element) {
+ var tagName = element.tagName.toLowerCase();
+ var attrs = element.attributes, attr, pairs = [], attrName, i, l, val;
+
+ for (i = 0, l = attrs.length; i < l; ++i) {
+ attr = attrs.item(i);
+ attrName = attr.nodeName.toLowerCase().replace("html:", "");
+ val = attr.nodeValue;
+ if (attrName !== "contenteditable" || val !== "inherit") {
+ if (!!val) { pairs.push(attrName + "=\"" + val + "\""); }
+ }
+ }
+
+ var formatted = "<" + tagName + (pairs.length > 0 ? " " : "");
+ var content = element.innerHTML;
+
+ if (content.length > 20) {
+ content = content.substr(0, 20) + "[...]";
+ }
+
+ var res = formatted + pairs.join(" ") + ">" + content +
+ "</" + tagName + ">";
+
+ return res.replace(/ contentEditable="inherit"/, "");
+ };
+
+ function Formatio(options) {
+ for (var opt in options) {
+ this[opt] = options[opt];
+ }
+ }
+
+ Formatio.prototype = {
+ functionName: functionName,
+
+ configure: function (options) {
+ return new Formatio(options);
+ },
+
+ constructorName: function (object) {
+ return constructorName(this, object);
+ },
+
+ ascii: function (object, processed, indent) {
+ return ascii(this, object, processed, indent);
+ }
+ };
+
+ return Formatio.prototype;
+});
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.lolex=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+(function (global){
+/*jslint eqeqeq: false, plusplus: false, evil: true, onevar: false, browser: true, forin: false*/
+/*global global*/
+/**
+ * @author Christian Johansen (christian@cjohansen.no) and contributors
+ * @license BSD
+ *
+ * Copyright (c) 2010-2014 Christian Johansen
+ */
+
+// node expects setTimeout/setInterval to return a fn object w/ .ref()/.unref()
+// browsers, a number.
+// see https://github.com/cjohansen/Sinon.JS/pull/436
+var timeoutResult = setTimeout(function() {}, 0);
+var addTimerReturnsObject = typeof timeoutResult === "object";
+clearTimeout(timeoutResult);
+
+var NativeDate = Date;
+var id = 1;
+
+/**
+ * Parse strings like "01:10:00" (meaning 1 hour, 10 minutes, 0 seconds) into
+ * number of milliseconds. This is used to support human-readable strings passed
+ * to clock.tick()
+ */
+function parseTime(str) {
+ if (!str) {
+ return 0;
+ }
+
+ var strings = str.split(":");
+ var l = strings.length, i = l;
+ var ms = 0, parsed;
+
+ if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) {
+ throw new Error("tick only understands numbers and 'h:m:s'");
+ }
+
+ while (i--) {
+ parsed = parseInt(strings[i], 10);
+
+ if (parsed >= 60) {
+ throw new Error("Invalid time " + str);
+ }
+
+ ms += parsed * Math.pow(60, (l - i - 1));
+ }
+
+ return ms * 1000;
+}
+
+/**
+ * Used to grok the `now` parameter to createClock.
+ */
+function getEpoch(epoch) {
+ if (!epoch) { return 0; }
+ if (typeof epoch.getTime === "function") { return epoch.getTime(); }
+ if (typeof epoch === "number") { return epoch; }
+ throw new TypeError("now should be milliseconds since UNIX epoch");
+}
+
+function inRange(from, to, timer) {
+ return timer && timer.callAt >= from && timer.callAt <= to;
+}
+
+function mirrorDateProperties(target, source) {
+ if (source.now) {
+ target.now = function now() {
+ return target.clock.now;
+ };
+ } else {
+ delete target.now;
+ }
+
+ if (source.toSource) {
+ target.toSource = function toSource() {
+ return source.toSource();
+ };
+ } else {
+ delete target.toSource;
+ }
+
+ target.toString = function toString() {
+ return source.toString();
+ };
+
+ target.prototype = source.prototype;
+ target.parse = source.parse;
+ target.UTC = source.UTC;
+ target.prototype.toUTCString = source.prototype.toUTCString;
+
+ for (var prop in source) {
+ if (source.hasOwnProperty(prop)) {
+ target[prop] = source[prop];
+ }
+ }
+
+ return target;
+}
+
+function createDate() {
+ function ClockDate(year, month, date, hour, minute, second, ms) {
+ // Defensive and verbose to avoid potential harm in passing
+ // explicit undefined when user does not pass argument
+ switch (arguments.length) {
+ case 0:
+ return new NativeDate(ClockDate.clock.now);
+ case 1:
+ return new NativeDate(year);
+ case 2:
+ return new NativeDate(year, month);
+ case 3:
+ return new NativeDate(year, month, date);
+ case 4:
+ return new NativeDate(year, month, date, hour);
+ case 5:
+ return new NativeDate(year, month, date, hour, minute);
+ case 6:
+ return new NativeDate(year, month, date, hour, minute, second);
+ default:
+ return new NativeDate(year, month, date, hour, minute, second, ms);
+ }
+ }
+
+ return mirrorDateProperties(ClockDate, NativeDate);
+}
+
+function addTimer(clock, timer) {
+ if (typeof timer.func === "undefined") {
+ throw new Error("Callback must be provided to timer calls");
+ }
+
+ if (!clock.timers) {
+ clock.timers = {};
+ }
+
+ timer.id = id++;
+ timer.createdAt = clock.now;
+ timer.callAt = clock.now + (timer.delay || 0);
+
+ clock.timers[timer.id] = timer;
+
+ if (addTimerReturnsObject) {
+ return {
+ id: timer.id,
+ ref: function() {},
+ unref: function() {}
+ };
+ }
+ else {
+ return timer.id;
+ }
+}
+
+function firstTimerInRange(clock, from, to) {
+ var timers = clock.timers, timer = null;
+
+ for (var id in timers) {
+ if (!inRange(from, to, timers[id])) {
+ continue;
+ }
+
+ if (!timer || ~compareTimers(timer, timers[id])) {
+ timer = timers[id];
+ }
+ }
+
+ return timer;
+}
+
+function compareTimers(a, b) {
+ // Sort first by absolute timing
+ if (a.callAt < b.callAt) {
+ return -1;
+ }
+ if (a.callAt > b.callAt) {
+ return 1;
+ }
+
+ // Sort next by immediate, immediate timers take precedence
+ if (a.immediate && !b.immediate) {
+ return -1;
+ }
+ if (!a.immediate && b.immediate) {
+ return 1;
+ }
+
+ // Sort next by creation time, earlier-created timers take precedence
+ if (a.createdAt < b.createdAt) {
+ return -1;
+ }
+ if (a.createdAt > b.createdAt) {
+ return 1;
+ }
+
+ // Sort next by id, lower-id timers take precedence
+ if (a.id < b.id) {
+ return -1;
+ }
+ if (a.id > b.id) {
+ return 1;
+ }
+
+ // As timer ids are unique, no fallback `0` is necessary
+}
+
+function callTimer(clock, timer) {
+ if (typeof timer.interval == "number") {
+ clock.timers[timer.id].callAt += timer.interval;
+ } else {
+ delete clock.timers[timer.id];
+ }
+
+ try {
+ if (typeof timer.func == "function") {
+ timer.func.apply(null, timer.args);
+ } else {
+ eval(timer.func);
+ }
+ } catch (e) {
+ var exception = e;
+ }
+
+ if (!clock.timers[timer.id]) {
+ if (exception) {
+ throw exception;
+ }
+ return;
+ }
+
+ if (exception) {
+ throw exception;
+ }
+}
+
+function uninstall(clock, target) {
+ var method;
+
+ for (var i = 0, l = clock.methods.length; i < l; i++) {
+ method = clock.methods[i];
+
+ if (target[method].hadOwnProperty) {
+ target[method] = clock["_" + method];
+ } else {
+ try {
+ delete target[method];
+ } catch (e) {}
+ }
+ }
+
+ // Prevent multiple executions which will completely remove these props
+ clock.methods = [];
+}
+
+function hijackMethod(target, method, clock) {
+ clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(target, method);
+ clock["_" + method] = target[method];
+
+ if (method == "Date") {
+ var date = mirrorDateProperties(clock[method], target[method]);
+ target[method] = date;
+ } else {
+ target[method] = function () {
+ return clock[method].apply(clock, arguments);
+ };
+
+ for (var prop in clock[method]) {
+ if (clock[method].hasOwnProperty(prop)) {
+ target[method][prop] = clock[method][prop];
+ }
+ }
+ }
+
+ target[method].clock = clock;
+}
+
+var timers = {
+ setTimeout: setTimeout,
+ clearTimeout: clearTimeout,
+ setImmediate: (typeof setImmediate !== "undefined" ? setImmediate : undefined),
+ clearImmediate: (typeof clearImmediate !== "undefined" ? clearImmediate: undefined),
+ setInterval: setInterval,
+ clearInterval: clearInterval,
+ Date: Date
+};
+
+var keys = Object.keys || function (obj) {
+ var ks = [];
+ for (var key in obj) {
+ ks.push(key);
+ }
+ return ks;
+};
+
+exports.timers = timers;
+
+var createClock = exports.createClock = function (now) {
+ var clock = {
+ now: getEpoch(now),
+ timeouts: {},
+ Date: createDate()
+ };
+
+ clock.Date.clock = clock;
+
+ clock.setTimeout = function setTimeout(func, timeout) {
+ return addTimer(clock, {
+ func: func,
+ args: Array.prototype.slice.call(arguments, 2),
+ delay: timeout
+ });
+ };
+
+ clock.clearTimeout = function clearTimeout(timerId) {
+ if (!timerId) {
+ // null appears to be allowed in most browsers, and appears to be
+ // relied upon by some libraries, like Bootstrap carousel
+ return;
+ }
+ if (!clock.timers) {
+ clock.timers = [];
+ }
+ // in Node, timerId is an object with .ref()/.unref(), and
+ // its .id field is the actual timer id.
+ if (typeof timerId === "object") {
+ timerId = timerId.id
+ }
+ if (timerId in clock.timers) {
+ delete clock.timers[timerId];
+ }
+ };
+
+ clock.setInterval = function setInterval(func, timeout) {
+ return addTimer(clock, {
+ func: func,
+ args: Array.prototype.slice.call(arguments, 2),
+ delay: timeout,
+ interval: timeout
+ });
+ };
+
+ clock.clearInterval = function clearInterval(timerId) {
+ clock.clearTimeout(timerId);
+ };
+
+ clock.setImmediate = function setImmediate(func) {
+ return addTimer(clock, {
+ func: func,
+ args: Array.prototype.slice.call(arguments, 1),
+ immediate: true
+ });
+ };
+
+ clock.clearImmediate = function clearImmediate(timerId) {
+ clock.clearTimeout(timerId);
+ };
+
+ clock.tick = function tick(ms) {
+ ms = typeof ms == "number" ? ms : parseTime(ms);
+ var tickFrom = clock.now, tickTo = clock.now + ms, previous = clock.now;
+ var timer = firstTimerInRange(clock, tickFrom, tickTo);
+
+ var firstException;
+ while (timer && tickFrom <= tickTo) {
+ if (clock.timers[timer.id]) {
+ tickFrom = clock.now = timer.callAt;
+ try {
+ callTimer(clock, timer);
+ } catch (e) {
+ firstException = firstException || e;
+ }
+ }
+
+ timer = firstTimerInRange(clock, previous, tickTo);
+ previous = tickFrom;
+ }
+
+ clock.now = tickTo;
+
+ if (firstException) {
+ throw firstException;
+ }
+
+ return clock.now;
+ };
+
+ clock.reset = function reset() {
+ clock.timers = {};
+ };
+
+ return clock;
+};
+
+exports.install = function install(target, now, toFake) {
+ if (typeof target === "number") {
+ toFake = now;
+ now = target;
+ target = null;
+ }
+
+ if (!target) {
+ target = global;
+ }
+
+ var clock = createClock(now);
+
+ clock.uninstall = function () {
+ uninstall(clock, target);
+ };
+
+ clock.methods = toFake || [];
+
+ if (clock.methods.length === 0) {
+ clock.methods = keys(timers);
+ }
+
+ for (var i = 0, l = clock.methods.length; i < l; i++) {
+ hijackMethod(target, clock.methods[i], clock);
+ }
+
+ return clock;
+};
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}]},{},[1])(1)
+});
+ })();
+ var define;
+/**
+ * Sinon core utilities. For internal use only.
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+var sinon = (function () {
+"use strict";
+
+ var sinon;
+ var isNode = typeof module !== "undefined" && module.exports && typeof require === "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ sinon = module.exports = require("./sinon/util/core");
+ require("./sinon/extend");
+ require("./sinon/typeOf");
+ require("./sinon/times_in_words");
+ require("./sinon/spy");
+ require("./sinon/call");
+ require("./sinon/behavior");
+ require("./sinon/stub");
+ require("./sinon/mock");
+ require("./sinon/collection");
+ require("./sinon/assert");
+ require("./sinon/sandbox");
+ require("./sinon/test");
+ require("./sinon/test_case");
+ require("./sinon/match");
+ require("./sinon/format");
+ require("./sinon/log_error");
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ sinon = module.exports;
+ } else {
+ sinon = {};
+ }
+
+ return sinon;
+}());
+
+/**
+ * @depend ../../sinon.js
+ */
+/**
+ * Sinon core utilities. For internal use only.
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon) {
+ var div = typeof document != "undefined" && document.createElement("div");
+ var hasOwn = Object.prototype.hasOwnProperty;
+
+ function isDOMNode(obj) {
+ var success = false;
+
+ try {
+ obj.appendChild(div);
+ success = div.parentNode == obj;
+ } catch (e) {
+ return false;
+ } finally {
+ try {
+ obj.removeChild(div);
+ } catch (e) {
+ // Remove failed, not much we can do about that
+ }
+ }
+
+ return success;
+ }
+
+ function isElement(obj) {
+ return div && obj && obj.nodeType === 1 && isDOMNode(obj);
+ }
+
+ function isFunction(obj) {
+ return typeof obj === "function" || !!(obj && obj.constructor && obj.call && obj.apply);
+ }
+
+ function isReallyNaN(val) {
+ return typeof val === "number" && isNaN(val);
+ }
+
+ function mirrorProperties(target, source) {
+ for (var prop in source) {
+ if (!hasOwn.call(target, prop)) {
+ target[prop] = source[prop];
+ }
+ }
+ }
+
+ function isRestorable(obj) {
+ return typeof obj === "function" && typeof obj.restore === "function" && obj.restore.sinon;
+ }
+
+ function makeApi(sinon) {
+ sinon.wrapMethod = function wrapMethod(object, property, method) {
+ if (!object) {
+ throw new TypeError("Should wrap property of object");
+ }
+
+ if (typeof method != "function") {
+ throw new TypeError("Method wrapper should be function");
+ }
+
+ var wrappedMethod = object[property],
+ error;
+
+ if (!isFunction(wrappedMethod)) {
+ error = new TypeError("Attempted to wrap " + (typeof wrappedMethod) + " property " +
+ property + " as function");
+ } else if (wrappedMethod.restore && wrappedMethod.restore.sinon) {
+ error = new TypeError("Attempted to wrap " + property + " which is already wrapped");
+ } else if (wrappedMethod.calledBefore) {
+ var verb = !!wrappedMethod.returns ? "stubbed" : "spied on";
+ error = new TypeError("Attempted to wrap " + property + " which is already " + verb);
+ }
+
+ if (error) {
+ if (wrappedMethod && wrappedMethod.stackTrace) {
+ error.stack += "\n--------------\n" + wrappedMethod.stackTrace;
+ }
+ throw error;
+ }
+
+ // IE 8 does not support hasOwnProperty on the window object and Firefox has a problem
+ // when using hasOwn.call on objects from other frames.
+ var owned = object.hasOwnProperty ? object.hasOwnProperty(property) : hasOwn.call(object, property);
+ object[property] = method;
+ method.displayName = property;
+ // Set up a stack trace which can be used later to find what line of
+ // code the original method was created on.
+ method.stackTrace = (new Error("Stack Trace for original")).stack;
+
+ method.restore = function () {
+ // For prototype properties try to reset by delete first.
+ // If this fails (ex: localStorage on mobile safari) then force a reset
+ // via direct assignment.
+ if (!owned) {
+ delete object[property];
+ }
+ if (object[property] === method) {
+ object[property] = wrappedMethod;
+ }
+ };
+
+ method.restore.sinon = true;
+ mirrorProperties(method, wrappedMethod);
+
+ return method;
+ };
+
+ sinon.create = function create(proto) {
+ var F = function () {};
+ F.prototype = proto;
+ return new F();
+ };
+
+ sinon.deepEqual = function deepEqual(a, b) {
+ if (sinon.match && sinon.match.isMatcher(a)) {
+ return a.test(b);
+ }
+
+ if (typeof a != "object" || typeof b != "object") {
+ if (isReallyNaN(a) && isReallyNaN(b)) {
+ return true;
+ } else {
+ return a === b;
+ }
+ }
+
+ if (isElement(a) || isElement(b)) {
+ return a === b;
+ }
+
+ if (a === b) {
+ return true;
+ }
+
+ if ((a === null && b !== null) || (a !== null && b === null)) {
+ return false;
+ }
+
+ if (a instanceof RegExp && b instanceof RegExp) {
+ return (a.source === b.source) && (a.global === b.global) &&
+ (a.ignoreCase === b.ignoreCase) && (a.multiline === b.multiline);
+ }
+
+ var aString = Object.prototype.toString.call(a);
+ if (aString != Object.prototype.toString.call(b)) {
+ return false;
+ }
+
+ if (aString == "[object Date]") {
+ return a.valueOf() === b.valueOf();
+ }
+
+ var prop, aLength = 0, bLength = 0;
+
+ if (aString == "[object Array]" && a.length !== b.length) {
+ return false;
+ }
+
+ for (prop in a) {
+ aLength += 1;
+
+ if (!(prop in b)) {
+ return false;
+ }
+
+ if (!deepEqual(a[prop], b[prop])) {
+ return false;
+ }
+ }
+
+ for (prop in b) {
+ bLength += 1;
+ }
+
+ return aLength == bLength;
+ };
+
+ sinon.functionName = function functionName(func) {
+ var name = func.displayName || func.name;
+
+ // Use function decomposition as a last resort to get function
+ // name. Does not rely on function decomposition to work - if it
+ // doesn't debugging will be slightly less informative
+ // (i.e. toString will say 'spy' rather than 'myFunc').
+ if (!name) {
+ var matches = func.toString().match(/function ([^\s\(]+)/);
+ name = matches && matches[1];
+ }
+
+ return name;
+ };
+
+ sinon.functionToString = function toString() {
+ if (this.getCall && this.callCount) {
+ var thisValue, prop, i = this.callCount;
+
+ while (i--) {
+ thisValue = this.getCall(i).thisValue;
+
+ for (prop in thisValue) {
+ if (thisValue[prop] === this) {
+ return prop;
+ }
+ }
+ }
+ }
+
+ return this.displayName || "sinon fake";
+ };
+
+ sinon.getConfig = function (custom) {
+ var config = {};
+ custom = custom || {};
+ var defaults = sinon.defaultConfig;
+
+ for (var prop in defaults) {
+ if (defaults.hasOwnProperty(prop)) {
+ config[prop] = custom.hasOwnProperty(prop) ? custom[prop] : defaults[prop];
+ }
+ }
+
+ return config;
+ };
+
+ sinon.defaultConfig = {
+ injectIntoThis: true,
+ injectInto: null,
+ properties: ["spy", "stub", "mock", "clock", "server", "requests"],
+ useFakeTimers: true,
+ useFakeServer: true
+ };
+
+ sinon.timesInWords = function timesInWords(count) {
+ return count == 1 && "once" ||
+ count == 2 && "twice" ||
+ count == 3 && "thrice" ||
+ (count || 0) + " times";
+ };
+
+ sinon.calledInOrder = function (spies) {
+ for (var i = 1, l = spies.length; i < l; i++) {
+ if (!spies[i - 1].calledBefore(spies[i]) || !spies[i].called) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ sinon.orderByFirstCall = function (spies) {
+ return spies.sort(function (a, b) {
+ // uuid, won't ever be equal
+ var aCall = a.getCall(0);
+ var bCall = b.getCall(0);
+ var aId = aCall && aCall.callId || -1;
+ var bId = bCall && bCall.callId || -1;
+
+ return aId < bId ? -1 : 1;
+ });
+ };
+
+ sinon.createStubInstance = function (constructor) {
+ if (typeof constructor !== "function") {
+ throw new TypeError("The constructor should be a function.");
+ }
+ return sinon.stub(sinon.create(constructor.prototype));
+ };
+
+ sinon.restore = function (object) {
+ if (object !== null && typeof object === "object") {
+ for (var prop in object) {
+ if (isRestorable(object[prop])) {
+ object[prop].restore();
+ }
+ }
+ } else if (isRestorable(object)) {
+ object.restore();
+ }
+ };
+
+ return sinon;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports) {
+ makeApi(exports);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend ../sinon.js
+ */
+
+(function (sinon) {
+ function makeApi(sinon) {
+
+ // Adapted from https://developer.mozilla.org/en/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug
+ var hasDontEnumBug = (function () {
+ var obj = {
+ constructor: function () {
+ return "0";
+ },
+ toString: function () {
+ return "1";
+ },
+ valueOf: function () {
+ return "2";
+ },
+ toLocaleString: function () {
+ return "3";
+ },
+ prototype: function () {
+ return "4";
+ },
+ isPrototypeOf: function () {
+ return "5";
+ },
+ propertyIsEnumerable: function () {
+ return "6";
+ },
+ hasOwnProperty: function () {
+ return "7";
+ },
+ length: function () {
+ return "8";
+ },
+ unique: function () {
+ return "9"
+ }
+ };
+
+ var result = [];
+ for (var prop in obj) {
+ result.push(obj[prop]());
+ }
+ return result.join("") !== "0123456789";
+ })();
+
+ /* Public: Extend target in place with all (own) properties from sources in-order. Thus, last source will
+ * override properties in previous sources.
+ *
+ * target - The Object to extend
+ * sources - Objects to copy properties from.
+ *
+ * Returns the extended target
+ */
+ function extend(target /*, sources */) {
+ var sources = Array.prototype.slice.call(arguments, 1),
+ source, i, prop;
+
+ for (i = 0; i < sources.length; i++) {
+ source = sources[i];
+
+ for (prop in source) {
+ if (source.hasOwnProperty(prop)) {
+ target[prop] = source[prop];
+ }
+ }
+
+ // Make sure we copy (own) toString method even when in JScript with DontEnum bug
+ // See https://developer.mozilla.org/en/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug
+ if (hasDontEnumBug && source.hasOwnProperty("toString") && source.toString !== target.toString) {
+ target.toString = source.toString;
+ }
+ }
+
+ return target;
+ };
+
+ sinon.extend = extend;
+ return sinon.extend;
+ }
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ module.exports = makeApi(sinon);
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend ../sinon.js
+ */
+
+(function (sinon) {
+ function makeApi(sinon) {
+
+ function timesInWords(count) {
+ switch (count) {
+ case 1:
+ return "once";
+ case 2:
+ return "twice";
+ case 3:
+ return "thrice";
+ default:
+ return (count || 0) + " times";
+ }
+ }
+
+ sinon.timesInWords = timesInWords;
+ return sinon.timesInWords;
+ }
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ module.exports = makeApi(sinon);
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend ../sinon.js
+ */
+/**
+ * Format functions
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2014 Christian Johansen
+ */
+
+(function (sinon, formatio) {
+ function makeApi(sinon) {
+ function typeOf(value) {
+ if (value === null) {
+ return "null";
+ } else if (value === undefined) {
+ return "undefined";
+ }
+ var string = Object.prototype.toString.call(value);
+ return string.substring(8, string.length - 1).toLowerCase();
+ };
+
+ sinon.typeOf = typeOf;
+ return sinon.typeOf;
+ }
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ module.exports = makeApi(sinon);
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(
+ (typeof sinon == "object" && sinon || null),
+ (typeof formatio == "object" && formatio)
+));
+
+/**
+ * @depend util/core.js
+ * @depend typeOf.js
+ */
+/*jslint eqeqeq: false, onevar: false, plusplus: false*/
+/*global module, require, sinon*/
+/**
+ * Match functions
+ *
+ * @author Maximilian Antoni (mail@maxantoni.de)
+ * @license BSD
+ *
+ * Copyright (c) 2012 Maximilian Antoni
+ */
+
+(function (sinon) {
+ function makeApi(sinon) {
+ function assertType(value, type, name) {
+ var actual = sinon.typeOf(value);
+ if (actual !== type) {
+ throw new TypeError("Expected type of " + name + " to be " +
+ type + ", but was " + actual);
+ }
+ }
+
+ var matcher = {
+ toString: function () {
+ return this.message;
+ }
+ };
+
+ function isMatcher(object) {
+ return matcher.isPrototypeOf(object);
+ }
+
+ function matchObject(expectation, actual) {
+ if (actual === null || actual === undefined) {
+ return false;
+ }
+ for (var key in expectation) {
+ if (expectation.hasOwnProperty(key)) {
+ var exp = expectation[key];
+ var act = actual[key];
+ if (match.isMatcher(exp)) {
+ if (!exp.test(act)) {
+ return false;
+ }
+ } else if (sinon.typeOf(exp) === "object") {
+ if (!matchObject(exp, act)) {
+ return false;
+ }
+ } else if (!sinon.deepEqual(exp, act)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ matcher.or = function (m2) {
+ if (!arguments.length) {
+ throw new TypeError("Matcher expected");
+ } else if (!isMatcher(m2)) {
+ m2 = match(m2);
+ }
+ var m1 = this;
+ var or = sinon.create(matcher);
+ or.test = function (actual) {
+ return m1.test(actual) || m2.test(actual);
+ };
+ or.message = m1.message + ".or(" + m2.message + ")";
+ return or;
+ };
+
+ matcher.and = function (m2) {
+ if (!arguments.length) {
+ throw new TypeError("Matcher expected");
+ } else if (!isMatcher(m2)) {
+ m2 = match(m2);
+ }
+ var m1 = this;
+ var and = sinon.create(matcher);
+ and.test = function (actual) {
+ return m1.test(actual) && m2.test(actual);
+ };
+ and.message = m1.message + ".and(" + m2.message + ")";
+ return and;
+ };
+
+ var match = function (expectation, message) {
+ var m = sinon.create(matcher);
+ var type = sinon.typeOf(expectation);
+ switch (type) {
+ case "object":
+ if (typeof expectation.test === "function") {
+ m.test = function (actual) {
+ return expectation.test(actual) === true;
+ };
+ m.message = "match(" + sinon.functionName(expectation.test) + ")";
+ return m;
+ }
+ var str = [];
+ for (var key in expectation) {
+ if (expectation.hasOwnProperty(key)) {
+ str.push(key + ": " + expectation[key]);
+ }
+ }
+ m.test = function (actual) {
+ return matchObject(expectation, actual);
+ };
+ m.message = "match(" + str.join(", ") + ")";
+ break;
+ case "number":
+ m.test = function (actual) {
+ return expectation == actual;
+ };
+ break;
+ case "string":
+ m.test = function (actual) {
+ if (typeof actual !== "string") {
+ return false;
+ }
+ return actual.indexOf(expectation) !== -1;
+ };
+ m.message = "match(\"" + expectation + "\")";
+ break;
+ case "regexp":
+ m.test = function (actual) {
+ if (typeof actual !== "string") {
+ return false;
+ }
+ return expectation.test(actual);
+ };
+ break;
+ case "function":
+ m.test = expectation;
+ if (message) {
+ m.message = message;
+ } else {
+ m.message = "match(" + sinon.functionName(expectation) + ")";
+ }
+ break;
+ default:
+ m.test = function (actual) {
+ return sinon.deepEqual(expectation, actual);
+ };
+ }
+ if (!m.message) {
+ m.message = "match(" + expectation + ")";
+ }
+ return m;
+ };
+
+ match.isMatcher = isMatcher;
+
+ match.any = match(function () {
+ return true;
+ }, "any");
+
+ match.defined = match(function (actual) {
+ return actual !== null && actual !== undefined;
+ }, "defined");
+
+ match.truthy = match(function (actual) {
+ return !!actual;
+ }, "truthy");
+
+ match.falsy = match(function (actual) {
+ return !actual;
+ }, "falsy");
+
+ match.same = function (expectation) {
+ return match(function (actual) {
+ return expectation === actual;
+ }, "same(" + expectation + ")");
+ };
+
+ match.typeOf = function (type) {
+ assertType(type, "string", "type");
+ return match(function (actual) {
+ return sinon.typeOf(actual) === type;
+ }, "typeOf(\"" + type + "\")");
+ };
+
+ match.instanceOf = function (type) {
+ assertType(type, "function", "type");
+ return match(function (actual) {
+ return actual instanceof type;
+ }, "instanceOf(" + sinon.functionName(type) + ")");
+ };
+
+ function createPropertyMatcher(propertyTest, messagePrefix) {
+ return function (property, value) {
+ assertType(property, "string", "property");
+ var onlyProperty = arguments.length === 1;
+ var message = messagePrefix + "(\"" + property + "\"";
+ if (!onlyProperty) {
+ message += ", " + value;
+ }
+ message += ")";
+ return match(function (actual) {
+ if (actual === undefined || actual === null ||
+ !propertyTest(actual, property)) {
+ return false;
+ }
+ return onlyProperty || sinon.deepEqual(value, actual[property]);
+ }, message);
+ };
+ }
+
+ match.has = createPropertyMatcher(function (actual, property) {
+ if (typeof actual === "object") {
+ return property in actual;
+ }
+ return actual[property] !== undefined;
+ }, "has");
+
+ match.hasOwn = createPropertyMatcher(function (actual, property) {
+ return actual.hasOwnProperty(property);
+ }, "hasOwn");
+
+ match.bool = match.typeOf("boolean");
+ match.number = match.typeOf("number");
+ match.string = match.typeOf("string");
+ match.object = match.typeOf("object");
+ match.func = match.typeOf("function");
+ match.array = match.typeOf("array");
+ match.regexp = match.typeOf("regexp");
+ match.date = match.typeOf("date");
+
+ sinon.match = match;
+ return match;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend ../sinon.js
+ */
+/**
+ * Format functions
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2014 Christian Johansen
+ */
+
+(function (sinon, formatio) {
+ function makeApi(sinon) {
+ function valueFormatter(value) {
+ return "" + value;
+ }
+
+ function getFormatioFormatter() {
+ var formatter = formatio.configure({
+ quoteStrings: false,
+ limitChildrenCount: 250
+ });
+
+ function format() {
+ return formatter.ascii.apply(formatter, arguments);
+ };
+
+ return format;
+ }
+
+ function getNodeFormatter(value) {
+ function format(value) {
+ return typeof value == "object" && value.toString === Object.prototype.toString ? util.inspect(value) : value;
+ };
+
+ try {
+ var util = require("util");
+ } catch (e) {
+ /* Node, but no util module - would be very old, but better safe than sorry */
+ }
+
+ return util ? format : valueFormatter;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function",
+ formatter;
+
+ if (isNode) {
+ try {
+ formatio = require("formatio");
+ } catch (e) {}
+ }
+
+ if (formatio) {
+ formatter = getFormatioFormatter()
+ } else if (isNode) {
+ formatter = getNodeFormatter();
+ } else {
+ formatter = valueFormatter;
+ }
+
+ sinon.format = formatter;
+ return sinon.format;
+ }
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ module.exports = makeApi(sinon);
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(
+ (typeof sinon == "object" && sinon || null),
+ (typeof formatio == "object" && formatio)
+));
+
+/**
+ * @depend util/core.js
+ * @depend match.js
+ * @depend format.js
+ */
+/**
+ * Spy calls
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @author Maximilian Antoni (mail@maxantoni.de)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ * Copyright (c) 2013 Maximilian Antoni
+ */
+
+(function (sinon) {
+ function makeApi(sinon) {
+ function throwYieldError(proxy, text, args) {
+ var msg = sinon.functionName(proxy) + text;
+ if (args.length) {
+ msg += " Received [" + slice.call(args).join(", ") + "]";
+ }
+ throw new Error(msg);
+ }
+
+ var slice = Array.prototype.slice;
+
+ var callProto = {
+ calledOn: function calledOn(thisValue) {
+ if (sinon.match && sinon.match.isMatcher(thisValue)) {
+ return thisValue.test(this.thisValue);
+ }
+ return this.thisValue === thisValue;
+ },
+
+ calledWith: function calledWith() {
+ for (var i = 0, l = arguments.length; i < l; i += 1) {
+ if (!sinon.deepEqual(arguments[i], this.args[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ },
+
+ calledWithMatch: function calledWithMatch() {
+ for (var i = 0, l = arguments.length; i < l; i += 1) {
+ var actual = this.args[i];
+ var expectation = arguments[i];
+ if (!sinon.match || !sinon.match(expectation).test(actual)) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ calledWithExactly: function calledWithExactly() {
+ return arguments.length == this.args.length &&
+ this.calledWith.apply(this, arguments);
+ },
+
+ notCalledWith: function notCalledWith() {
+ return !this.calledWith.apply(this, arguments);
+ },
+
+ notCalledWithMatch: function notCalledWithMatch() {
+ return !this.calledWithMatch.apply(this, arguments);
+ },
+
+ returned: function returned(value) {
+ return sinon.deepEqual(value, this.returnValue);
+ },
+
+ threw: function threw(error) {
+ if (typeof error === "undefined" || !this.exception) {
+ return !!this.exception;
+ }
+
+ return this.exception === error || this.exception.name === error;
+ },
+
+ calledWithNew: function calledWithNew() {
+ return this.proxy.prototype && this.thisValue instanceof this.proxy;
+ },
+
+ calledBefore: function (other) {
+ return this.callId < other.callId;
+ },
+
+ calledAfter: function (other) {
+ return this.callId > other.callId;
+ },
+
+ callArg: function (pos) {
+ this.args[pos]();
+ },
+
+ callArgOn: function (pos, thisValue) {
+ this.args[pos].apply(thisValue);
+ },
+
+ callArgWith: function (pos) {
+ this.callArgOnWith.apply(this, [pos, null].concat(slice.call(arguments, 1)));
+ },
+
+ callArgOnWith: function (pos, thisValue) {
+ var args = slice.call(arguments, 2);
+ this.args[pos].apply(thisValue, args);
+ },
+
+ yield: function () {
+ this.yieldOn.apply(this, [null].concat(slice.call(arguments, 0)));
+ },
+
+ yieldOn: function (thisValue) {
+ var args = this.args;
+ for (var i = 0, l = args.length; i < l; ++i) {
+ if (typeof args[i] === "function") {
+ args[i].apply(thisValue, slice.call(arguments, 1));
+ return;
+ }
+ }
+ throwYieldError(this.proxy, " cannot yield since no callback was passed.", args);
+ },
+
+ yieldTo: function (prop) {
+ this.yieldToOn.apply(this, [prop, null].concat(slice.call(arguments, 1)));
+ },
+
+ yieldToOn: function (prop, thisValue) {
+ var args = this.args;
+ for (var i = 0, l = args.length; i < l; ++i) {
+ if (args[i] && typeof args[i][prop] === "function") {
+ args[i][prop].apply(thisValue, slice.call(arguments, 2));
+ return;
+ }
+ }
+ throwYieldError(this.proxy, " cannot yield to '" + prop +
+ "' since no callback was passed.", args);
+ },
+
+ toString: function () {
+ var callStr = this.proxy.toString() + "(";
+ var args = [];
+
+ for (var i = 0, l = this.args.length; i < l; ++i) {
+ args.push(sinon.format(this.args[i]));
+ }
+
+ callStr = callStr + args.join(", ") + ")";
+
+ if (typeof this.returnValue != "undefined") {
+ callStr += " => " + sinon.format(this.returnValue);
+ }
+
+ if (this.exception) {
+ callStr += " !" + this.exception.name;
+
+ if (this.exception.message) {
+ callStr += "(" + this.exception.message + ")";
+ }
+ }
+
+ return callStr;
+ }
+ };
+
+ callProto.invokeCallback = callProto.yield;
+
+ function createSpyCall(spy, thisValue, args, returnValue, exception, id) {
+ if (typeof id !== "number") {
+ throw new TypeError("Call id is not a number");
+ }
+ var proxyCall = sinon.create(callProto);
+ proxyCall.proxy = spy;
+ proxyCall.thisValue = thisValue;
+ proxyCall.args = args;
+ proxyCall.returnValue = returnValue;
+ proxyCall.exception = exception;
+ proxyCall.callId = id;
+
+ return proxyCall;
+ }
+ createSpyCall.toString = callProto.toString; // used by mocks
+
+ sinon.spyCall = createSpyCall;
+ return createSpyCall;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./match");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend times_in_words.js
+ * @depend util/core.js
+ * @depend extend.js
+ * @depend call.js
+ * @depend format.js
+ */
+/**
+ * Spy functions
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon) {
+ function makeApi(sinon) {
+ var push = Array.prototype.push;
+ var slice = Array.prototype.slice;
+ var callId = 0;
+
+ function spy(object, property) {
+ if (!property && typeof object == "function") {
+ return spy.create(object);
+ }
+
+ if (!object && !property) {
+ return spy.create(function () { });
+ }
+
+ var method = object[property];
+ return sinon.wrapMethod(object, property, spy.create(method));
+ }
+
+ function matchingFake(fakes, args, strict) {
+ if (!fakes) {
+ return;
+ }
+
+ for (var i = 0, l = fakes.length; i < l; i++) {
+ if (fakes[i].matches(args, strict)) {
+ return fakes[i];
+ }
+ }
+ }
+
+ function incrementCallCount() {
+ this.called = true;
+ this.callCount += 1;
+ this.notCalled = false;
+ this.calledOnce = this.callCount == 1;
+ this.calledTwice = this.callCount == 2;
+ this.calledThrice = this.callCount == 3;
+ }
+
+ function createCallProperties() {
+ this.firstCall = this.getCall(0);
+ this.secondCall = this.getCall(1);
+ this.thirdCall = this.getCall(2);
+ this.lastCall = this.getCall(this.callCount - 1);
+ }
+
+ var vars = "a,b,c,d,e,f,g,h,i,j,k,l";
+ function createProxy(func, proxyLength) {
+ // Retain the function length:
+ var p;
+ if (proxyLength) {
+ eval("p = (function proxy(" + vars.substring(0, proxyLength * 2 - 1) +
+ ") { return p.invoke(func, this, slice.call(arguments)); });");
+ } else {
+ p = function proxy() {
+ return p.invoke(func, this, slice.call(arguments));
+ };
+ }
+ return p;
+ }
+
+ var uuid = 0;
+
+ // Public API
+ var spyApi = {
+ reset: function () {
+ if (this.invoking) {
+ var err = new Error("Cannot reset Sinon function while invoking it. " +
+ "Move the call to .reset outside of the callback.");
+ err.name = "InvalidResetException";
+ throw err;
+ }
+
+ this.called = false;
+ this.notCalled = true;
+ this.calledOnce = false;
+ this.calledTwice = false;
+ this.calledThrice = false;
+ this.callCount = 0;
+ this.firstCall = null;
+ this.secondCall = null;
+ this.thirdCall = null;
+ this.lastCall = null;
+ this.args = [];
+ this.returnValues = [];
+ this.thisValues = [];
+ this.exceptions = [];
+ this.callIds = [];
+ if (this.fakes) {
+ for (var i = 0; i < this.fakes.length; i++) {
+ this.fakes[i].reset();
+ }
+ }
+
+ return this;
+ },
+
+ create: function create(func, spyLength) {
+ var name;
+
+ if (typeof func != "function") {
+ func = function () { };
+ } else {
+ name = sinon.functionName(func);
+ }
+
+ if (!spyLength) {
+ spyLength = func.length;
+ }
+
+ var proxy = createProxy(func, spyLength);
+
+ sinon.extend(proxy, spy);
+ delete proxy.create;
+ sinon.extend(proxy, func);
+
+ proxy.reset();
+ proxy.prototype = func.prototype;
+ proxy.displayName = name || "spy";
+ proxy.toString = sinon.functionToString;
+ proxy.instantiateFake = sinon.spy.create;
+ proxy.id = "spy#" + uuid++;
+
+ return proxy;
+ },
+
+ invoke: function invoke(func, thisValue, args) {
+ var matching = matchingFake(this.fakes, args);
+ var exception, returnValue;
+
+ incrementCallCount.call(this);
+ push.call(this.thisValues, thisValue);
+ push.call(this.args, args);
+ push.call(this.callIds, callId++);
+
+ // Make call properties available from within the spied function:
+ createCallProperties.call(this);
+
+ try {
+ this.invoking = true;
+
+ if (matching) {
+ returnValue = matching.invoke(func, thisValue, args);
+ } else {
+ returnValue = (this.func || func).apply(thisValue, args);
+ }
+
+ var thisCall = this.getCall(this.callCount - 1);
+ if (thisCall.calledWithNew() && typeof returnValue !== "object") {
+ returnValue = thisValue;
+ }
+ } catch (e) {
+ exception = e;
+ } finally {
+ delete this.invoking;
+ }
+
+ push.call(this.exceptions, exception);
+ push.call(this.returnValues, returnValue);
+
+ // Make return value and exception available in the calls:
+ createCallProperties.call(this);
+
+ if (exception !== undefined) {
+ throw exception;
+ }
+
+ return returnValue;
+ },
+
+ named: function named(name) {
+ this.displayName = name;
+ return this;
+ },
+
+ getCall: function getCall(i) {
+ if (i < 0 || i >= this.callCount) {
+ return null;
+ }
+
+ return sinon.spyCall(this, this.thisValues[i], this.args[i],
+ this.returnValues[i], this.exceptions[i],
+ this.callIds[i]);
+ },
+
+ getCalls: function () {
+ var calls = [];
+ var i;
+
+ for (i = 0; i < this.callCount; i++) {
+ calls.push(this.getCall(i));
+ }
+
+ return calls;
+ },
+
+ calledBefore: function calledBefore(spyFn) {
+ if (!this.called) {
+ return false;
+ }
+
+ if (!spyFn.called) {
+ return true;
+ }
+
+ return this.callIds[0] < spyFn.callIds[spyFn.callIds.length - 1];
+ },
+
+ calledAfter: function calledAfter(spyFn) {
+ if (!this.called || !spyFn.called) {
+ return false;
+ }
+
+ return this.callIds[this.callCount - 1] > spyFn.callIds[spyFn.callCount - 1];
+ },
+
+ withArgs: function () {
+ var args = slice.call(arguments);
+
+ if (this.fakes) {
+ var match = matchingFake(this.fakes, args, true);
+
+ if (match) {
+ return match;
+ }
+ } else {
+ this.fakes = [];
+ }
+
+ var original = this;
+ var fake = this.instantiateFake();
+ fake.matchingAguments = args;
+ fake.parent = this;
+ push.call(this.fakes, fake);
+
+ fake.withArgs = function () {
+ return original.withArgs.apply(original, arguments);
+ };
+
+ for (var i = 0; i < this.args.length; i++) {
+ if (fake.matches(this.args[i])) {
+ incrementCallCount.call(fake);
+ push.call(fake.thisValues, this.thisValues[i]);
+ push.call(fake.args, this.args[i]);
+ push.call(fake.returnValues, this.returnValues[i]);
+ push.call(fake.exceptions, this.exceptions[i]);
+ push.call(fake.callIds, this.callIds[i]);
+ }
+ }
+ createCallProperties.call(fake);
+
+ return fake;
+ },
+
+ matches: function (args, strict) {
+ var margs = this.matchingAguments;
+
+ if (margs.length <= args.length &&
+ sinon.deepEqual(margs, args.slice(0, margs.length))) {
+ return !strict || margs.length == args.length;
+ }
+ },
+
+ printf: function (format) {
+ var spy = this;
+ var args = slice.call(arguments, 1);
+ var formatter;
+
+ return (format || "").replace(/%(.)/g, function (match, specifyer) {
+ formatter = spyApi.formatters[specifyer];
+
+ if (typeof formatter == "function") {
+ return formatter.call(null, spy, args);
+ } else if (!isNaN(parseInt(specifyer, 10))) {
+ return sinon.format(args[specifyer - 1]);
+ }
+
+ return "%" + specifyer;
+ });
+ }
+ };
+
+ function delegateToCalls(method, matchAny, actual, notCalled) {
+ spyApi[method] = function () {
+ if (!this.called) {
+ if (notCalled) {
+ return notCalled.apply(this, arguments);
+ }
+ return false;
+ }
+
+ var currentCall;
+ var matches = 0;
+
+ for (var i = 0, l = this.callCount; i < l; i += 1) {
+ currentCall = this.getCall(i);
+
+ if (currentCall[actual || method].apply(currentCall, arguments)) {
+ matches += 1;
+
+ if (matchAny) {
+ return true;
+ }
+ }
+ }
+
+ return matches === this.callCount;
+ };
+ }
+
+ delegateToCalls("calledOn", true);
+ delegateToCalls("alwaysCalledOn", false, "calledOn");
+ delegateToCalls("calledWith", true);
+ delegateToCalls("calledWithMatch", true);
+ delegateToCalls("alwaysCalledWith", false, "calledWith");
+ delegateToCalls("alwaysCalledWithMatch", false, "calledWithMatch");
+ delegateToCalls("calledWithExactly", true);
+ delegateToCalls("alwaysCalledWithExactly", false, "calledWithExactly");
+ delegateToCalls("neverCalledWith", false, "notCalledWith",
+ function () { return true; });
+ delegateToCalls("neverCalledWithMatch", false, "notCalledWithMatch",
+ function () { return true; });
+ delegateToCalls("threw", true);
+ delegateToCalls("alwaysThrew", false, "threw");
+ delegateToCalls("returned", true);
+ delegateToCalls("alwaysReturned", false, "returned");
+ delegateToCalls("calledWithNew", true);
+ delegateToCalls("alwaysCalledWithNew", false, "calledWithNew");
+ delegateToCalls("callArg", false, "callArgWith", function () {
+ throw new Error(this.toString() + " cannot call arg since it was not yet invoked.");
+ });
+ spyApi.callArgWith = spyApi.callArg;
+ delegateToCalls("callArgOn", false, "callArgOnWith", function () {
+ throw new Error(this.toString() + " cannot call arg since it was not yet invoked.");
+ });
+ spyApi.callArgOnWith = spyApi.callArgOn;
+ delegateToCalls("yield", false, "yield", function () {
+ throw new Error(this.toString() + " cannot yield since it was not yet invoked.");
+ });
+ // "invokeCallback" is an alias for "yield" since "yield" is invalid in strict mode.
+ spyApi.invokeCallback = spyApi.yield;
+ delegateToCalls("yieldOn", false, "yieldOn", function () {
+ throw new Error(this.toString() + " cannot yield since it was not yet invoked.");
+ });
+ delegateToCalls("yieldTo", false, "yieldTo", function (property) {
+ throw new Error(this.toString() + " cannot yield to '" + property +
+ "' since it was not yet invoked.");
+ });
+ delegateToCalls("yieldToOn", false, "yieldToOn", function (property) {
+ throw new Error(this.toString() + " cannot yield to '" + property +
+ "' since it was not yet invoked.");
+ });
+
+ spyApi.formatters = {
+ c: function (spy) {
+ return sinon.timesInWords(spy.callCount);
+ },
+
+ n: function (spy) {
+ return spy.toString();
+ },
+
+ C: function (spy) {
+ var calls = [];
+
+ for (var i = 0, l = spy.callCount; i < l; ++i) {
+ var stringifiedCall = " " + spy.getCall(i).toString();
+ if (/\n/.test(calls[i - 1])) {
+ stringifiedCall = "\n" + stringifiedCall;
+ }
+ push.call(calls, stringifiedCall);
+ }
+
+ return calls.length > 0 ? "\n" + calls.join("\n") : "";
+ },
+
+ t: function (spy) {
+ var objects = [];
+
+ for (var i = 0, l = spy.callCount; i < l; ++i) {
+ push.call(objects, sinon.format(spy.thisValues[i]));
+ }
+
+ return objects.join(", ");
+ },
+
+ "*": function (spy, args) {
+ var formatted = [];
+
+ for (var i = 0, l = args.length; i < l; ++i) {
+ push.call(formatted, sinon.format(args[i]));
+ }
+
+ return formatted.join(", ");
+ }
+ };
+
+ sinon.extend(spy, spyApi);
+
+ spy.spyCall = sinon.spyCall;
+ sinon.spy = spy;
+
+ return spy;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./call");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend util/core.js
+ * @depend extend.js
+ */
+/**
+ * Stub behavior
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @author Tim Fischbach (mail@timfischbach.de)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon) {
+ var slice = Array.prototype.slice;
+ var join = Array.prototype.join;
+
+ var nextTick = (function () {
+ if (typeof process === "object" && typeof process.nextTick === "function") {
+ return process.nextTick;
+ } else if (typeof setImmediate === "function") {
+ return setImmediate;
+ } else {
+ return function (callback) {
+ setTimeout(callback, 0);
+ };
+ }
+ })();
+
+ function throwsException(error, message) {
+ if (typeof error == "string") {
+ this.exception = new Error(message || "");
+ this.exception.name = error;
+ } else if (!error) {
+ this.exception = new Error("Error");
+ } else {
+ this.exception = error;
+ }
+
+ return this;
+ }
+
+ function getCallback(behavior, args) {
+ var callArgAt = behavior.callArgAt;
+
+ if (callArgAt < 0) {
+ var callArgProp = behavior.callArgProp;
+
+ for (var i = 0, l = args.length; i < l; ++i) {
+ if (!callArgProp && typeof args[i] == "function") {
+ return args[i];
+ }
+
+ if (callArgProp && args[i] &&
+ typeof args[i][callArgProp] == "function") {
+ return args[i][callArgProp];
+ }
+ }
+
+ return null;
+ }
+
+ return args[callArgAt];
+ }
+
+ function makeApi(sinon) {
+ function getCallbackError(behavior, func, args) {
+ if (behavior.callArgAt < 0) {
+ var msg;
+
+ if (behavior.callArgProp) {
+ msg = sinon.functionName(behavior.stub) +
+ " expected to yield to '" + behavior.callArgProp +
+ "', but no object with such a property was passed.";
+ } else {
+ msg = sinon.functionName(behavior.stub) +
+ " expected to yield, but no callback was passed.";
+ }
+
+ if (args.length > 0) {
+ msg += " Received [" + join.call(args, ", ") + "]";
+ }
+
+ return msg;
+ }
+
+ return "argument at index " + behavior.callArgAt + " is not a function: " + func;
+ }
+
+ function callCallback(behavior, args) {
+ if (typeof behavior.callArgAt == "number") {
+ var func = getCallback(behavior, args);
+
+ if (typeof func != "function") {
+ throw new TypeError(getCallbackError(behavior, func, args));
+ }
+
+ if (behavior.callbackAsync) {
+ nextTick(function () {
+ func.apply(behavior.callbackContext, behavior.callbackArguments);
+ });
+ } else {
+ func.apply(behavior.callbackContext, behavior.callbackArguments);
+ }
+ }
+ }
+
+ var proto = {
+ create: function create(stub) {
+ var behavior = sinon.extend({}, sinon.behavior);
+ delete behavior.create;
+ behavior.stub = stub;
+
+ return behavior;
+ },
+
+ isPresent: function isPresent() {
+ return (typeof this.callArgAt == "number" ||
+ this.exception ||
+ typeof this.returnArgAt == "number" ||
+ this.returnThis ||
+ this.returnValueDefined);
+ },
+
+ invoke: function invoke(context, args) {
+ callCallback(this, args);
+
+ if (this.exception) {
+ throw this.exception;
+ } else if (typeof this.returnArgAt == "number") {
+ return args[this.returnArgAt];
+ } else if (this.returnThis) {
+ return context;
+ }
+
+ return this.returnValue;
+ },
+
+ onCall: function onCall(index) {
+ return this.stub.onCall(index);
+ },
+
+ onFirstCall: function onFirstCall() {
+ return this.stub.onFirstCall();
+ },
+
+ onSecondCall: function onSecondCall() {
+ return this.stub.onSecondCall();
+ },
+
+ onThirdCall: function onThirdCall() {
+ return this.stub.onThirdCall();
+ },
+
+ withArgs: function withArgs(/* arguments */) {
+ throw new Error("Defining a stub by invoking \"stub.onCall(...).withArgs(...)\" is not supported. " +
+ "Use \"stub.withArgs(...).onCall(...)\" to define sequential behavior for calls with certain arguments.");
+ },
+
+ callsArg: function callsArg(pos) {
+ if (typeof pos != "number") {
+ throw new TypeError("argument index is not number");
+ }
+
+ this.callArgAt = pos;
+ this.callbackArguments = [];
+ this.callbackContext = undefined;
+ this.callArgProp = undefined;
+ this.callbackAsync = false;
+
+ return this;
+ },
+
+ callsArgOn: function callsArgOn(pos, context) {
+ if (typeof pos != "number") {
+ throw new TypeError("argument index is not number");
+ }
+ if (typeof context != "object") {
+ throw new TypeError("argument context is not an object");
+ }
+
+ this.callArgAt = pos;
+ this.callbackArguments = [];
+ this.callbackContext = context;
+ this.callArgProp = undefined;
+ this.callbackAsync = false;
+
+ return this;
+ },
+
+ callsArgWith: function callsArgWith(pos) {
+ if (typeof pos != "number") {
+ throw new TypeError("argument index is not number");
+ }
+
+ this.callArgAt = pos;
+ this.callbackArguments = slice.call(arguments, 1);
+ this.callbackContext = undefined;
+ this.callArgProp = undefined;
+ this.callbackAsync = false;
+
+ return this;
+ },
+
+ callsArgOnWith: function callsArgWith(pos, context) {
+ if (typeof pos != "number") {
+ throw new TypeError("argument index is not number");
+ }
+ if (typeof context != "object") {
+ throw new TypeError("argument context is not an object");
+ }
+
+ this.callArgAt = pos;
+ this.callbackArguments = slice.call(arguments, 2);
+ this.callbackContext = context;
+ this.callArgProp = undefined;
+ this.callbackAsync = false;
+
+ return this;
+ },
+
+ yields: function () {
+ this.callArgAt = -1;
+ this.callbackArguments = slice.call(arguments, 0);
+ this.callbackContext = undefined;
+ this.callArgProp = undefined;
+ this.callbackAsync = false;
+
+ return this;
+ },
+
+ yieldsOn: function (context) {
+ if (typeof context != "object") {
+ throw new TypeError("argument context is not an object");
+ }
+
+ this.callArgAt = -1;
+ this.callbackArguments = slice.call(arguments, 1);
+ this.callbackContext = context;
+ this.callArgProp = undefined;
+ this.callbackAsync = false;
+
+ return this;
+ },
+
+ yieldsTo: function (prop) {
+ this.callArgAt = -1;
+ this.callbackArguments = slice.call(arguments, 1);
+ this.callbackContext = undefined;
+ this.callArgProp = prop;
+ this.callbackAsync = false;
+
+ return this;
+ },
+
+ yieldsToOn: function (prop, context) {
+ if (typeof context != "object") {
+ throw new TypeError("argument context is not an object");
+ }
+
+ this.callArgAt = -1;
+ this.callbackArguments = slice.call(arguments, 2);
+ this.callbackContext = context;
+ this.callArgProp = prop;
+ this.callbackAsync = false;
+
+ return this;
+ },
+
+ throws: throwsException,
+ throwsException: throwsException,
+
+ returns: function returns(value) {
+ this.returnValue = value;
+ this.returnValueDefined = true;
+
+ return this;
+ },
+
+ returnsArg: function returnsArg(pos) {
+ if (typeof pos != "number") {
+ throw new TypeError("argument index is not number");
+ }
+
+ this.returnArgAt = pos;
+
+ return this;
+ },
+
+ returnsThis: function returnsThis() {
+ this.returnThis = true;
+
+ return this;
+ }
+ };
+
+ // create asynchronous versions of callsArg* and yields* methods
+ for (var method in proto) {
+ // need to avoid creating anotherasync versions of the newly added async methods
+ if (proto.hasOwnProperty(method) &&
+ method.match(/^(callsArg|yields)/) &&
+ !method.match(/Async/)) {
+ proto[method + "Async"] = (function (syncFnName) {
+ return function () {
+ var result = this[syncFnName].apply(this, arguments);
+ this.callbackAsync = true;
+ return result;
+ };
+ })(method);
+ }
+ }
+
+ sinon.behavior = proto;
+ return proto;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend util/core.js
+ * @depend extend.js
+ * @depend spy.js
+ * @depend behavior.js
+ */
+/**
+ * Stub functions
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon) {
+ function makeApi(sinon) {
+ function stub(object, property, func) {
+ if (!!func && typeof func != "function") {
+ throw new TypeError("Custom stub should be function");
+ }
+
+ var wrapper;
+
+ if (func) {
+ wrapper = sinon.spy && sinon.spy.create ? sinon.spy.create(func) : func;
+ } else {
+ var stubLength = 0;
+ if (typeof object == "object" && typeof object[property] == "function") {
+ stubLength = object[property].length;
+ }
+ wrapper = stub.create(stubLength);
+ }
+
+ if (!object && typeof property === "undefined") {
+ return sinon.stub.create();
+ }
+
+ if (typeof property === "undefined" && typeof object == "object") {
+ for (var prop in object) {
+ if (typeof object[prop] === "function") {
+ stub(object, prop);
+ }
+ }
+
+ return object;
+ }
+
+ return sinon.wrapMethod(object, property, wrapper);
+ }
+
+ function getDefaultBehavior(stub) {
+ return stub.defaultBehavior || getParentBehaviour(stub) || sinon.behavior.create(stub);
+ }
+
+ function getParentBehaviour(stub) {
+ return (stub.parent && getCurrentBehavior(stub.parent));
+ }
+
+ function getCurrentBehavior(stub) {
+ var behavior = stub.behaviors[stub.callCount - 1];
+ return behavior && behavior.isPresent() ? behavior : getDefaultBehavior(stub);
+ }
+
+ var uuid = 0;
+
+ var proto = {
+ create: function create(stubLength) {
+ var functionStub = function () {
+ return getCurrentBehavior(functionStub).invoke(this, arguments);
+ };
+
+ functionStub.id = "stub#" + uuid++;
+ var orig = functionStub;
+ functionStub = sinon.spy.create(functionStub, stubLength);
+ functionStub.func = orig;
+
+ sinon.extend(functionStub, stub);
+ functionStub.instantiateFake = sinon.stub.create;
+ functionStub.displayName = "stub";
+ functionStub.toString = sinon.functionToString;
+
+ functionStub.defaultBehavior = null;
+ functionStub.behaviors = [];
+
+ return functionStub;
+ },
+
+ resetBehavior: function () {
+ var i;
+
+ this.defaultBehavior = null;
+ this.behaviors = [];
+
+ delete this.returnValue;
+ delete this.returnArgAt;
+ this.returnThis = false;
+
+ if (this.fakes) {
+ for (i = 0; i < this.fakes.length; i++) {
+ this.fakes[i].resetBehavior();
+ }
+ }
+ },
+
+ onCall: function onCall(index) {
+ if (!this.behaviors[index]) {
+ this.behaviors[index] = sinon.behavior.create(this);
+ }
+
+ return this.behaviors[index];
+ },
+
+ onFirstCall: function onFirstCall() {
+ return this.onCall(0);
+ },
+
+ onSecondCall: function onSecondCall() {
+ return this.onCall(1);
+ },
+
+ onThirdCall: function onThirdCall() {
+ return this.onCall(2);
+ }
+ };
+
+ for (var method in sinon.behavior) {
+ if (sinon.behavior.hasOwnProperty(method) &&
+ !proto.hasOwnProperty(method) &&
+ method != "create" &&
+ method != "withArgs" &&
+ method != "invoke") {
+ proto[method] = (function (behaviorMethod) {
+ return function () {
+ this.defaultBehavior = this.defaultBehavior || sinon.behavior.create(this);
+ this.defaultBehavior[behaviorMethod].apply(this.defaultBehavior, arguments);
+ return this;
+ };
+ }(method));
+ }
+ }
+
+ sinon.extend(stub, proto);
+ sinon.stub = stub;
+
+ return stub;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./behavior");
+ require("./spy");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend times_in_words.js
+ * @depend util/core.js
+ * @depend extend.js
+ * @depend stub.js
+ * @depend format.js
+ */
+/**
+ * Mock functions.
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon) {
+ function makeApi(sinon) {
+ var push = [].push;
+ var match = sinon.match;
+
+ function mock(object) {
+ if (!object) {
+ return sinon.expectation.create("Anonymous mock");
+ }
+
+ return mock.create(object);
+ }
+
+ function each(collection, callback) {
+ if (!collection) {
+ return;
+ }
+
+ for (var i = 0, l = collection.length; i < l; i += 1) {
+ callback(collection[i]);
+ }
+ }
+
+ sinon.extend(mock, {
+ create: function create(object) {
+ if (!object) {
+ throw new TypeError("object is null");
+ }
+
+ var mockObject = sinon.extend({}, mock);
+ mockObject.object = object;
+ delete mockObject.create;
+
+ return mockObject;
+ },
+
+ expects: function expects(method) {
+ if (!method) {
+ throw new TypeError("method is falsy");
+ }
+
+ if (!this.expectations) {
+ this.expectations = {};
+ this.proxies = [];
+ }
+
+ if (!this.expectations[method]) {
+ this.expectations[method] = [];
+ var mockObject = this;
+
+ sinon.wrapMethod(this.object, method, function () {
+ return mockObject.invokeMethod(method, this, arguments);
+ });
+
+ push.call(this.proxies, method);
+ }
+
+ var expectation = sinon.expectation.create(method);
+ push.call(this.expectations[method], expectation);
+
+ return expectation;
+ },
+
+ restore: function restore() {
+ var object = this.object;
+
+ each(this.proxies, function (proxy) {
+ if (typeof object[proxy].restore == "function") {
+ object[proxy].restore();
+ }
+ });
+ },
+
+ verify: function verify() {
+ var expectations = this.expectations || {};
+ var messages = [], met = [];
+
+ each(this.proxies, function (proxy) {
+ each(expectations[proxy], function (expectation) {
+ if (!expectation.met()) {
+ push.call(messages, expectation.toString());
+ } else {
+ push.call(met, expectation.toString());
+ }
+ });
+ });
+
+ this.restore();
+
+ if (messages.length > 0) {
+ sinon.expectation.fail(messages.concat(met).join("\n"));
+ } else if (met.length > 0) {
+ sinon.expectation.pass(messages.concat(met).join("\n"));
+ }
+
+ return true;
+ },
+
+ invokeMethod: function invokeMethod(method, thisValue, args) {
+ var expectations = this.expectations && this.expectations[method];
+ var length = expectations && expectations.length || 0, i;
+
+ for (i = 0; i < length; i += 1) {
+ if (!expectations[i].met() &&
+ expectations[i].allowsCall(thisValue, args)) {
+ return expectations[i].apply(thisValue, args);
+ }
+ }
+
+ var messages = [], available, exhausted = 0;
+
+ for (i = 0; i < length; i += 1) {
+ if (expectations[i].allowsCall(thisValue, args)) {
+ available = available || expectations[i];
+ } else {
+ exhausted += 1;
+ }
+ push.call(messages, " " + expectations[i].toString());
+ }
+
+ if (exhausted === 0) {
+ return available.apply(thisValue, args);
+ }
+
+ messages.unshift("Unexpected call: " + sinon.spyCall.toString.call({
+ proxy: method,
+ args: args
+ }));
+
+ sinon.expectation.fail(messages.join("\n"));
+ }
+ });
+
+ var times = sinon.timesInWords;
+ var slice = Array.prototype.slice;
+
+ function callCountInWords(callCount) {
+ if (callCount == 0) {
+ return "never called";
+ } else {
+ return "called " + times(callCount);
+ }
+ }
+
+ function expectedCallCountInWords(expectation) {
+ var min = expectation.minCalls;
+ var max = expectation.maxCalls;
+
+ if (typeof min == "number" && typeof max == "number") {
+ var str = times(min);
+
+ if (min != max) {
+ str = "at least " + str + " and at most " + times(max);
+ }
+
+ return str;
+ }
+
+ if (typeof min == "number") {
+ return "at least " + times(min);
+ }
+
+ return "at most " + times(max);
+ }
+
+ function receivedMinCalls(expectation) {
+ var hasMinLimit = typeof expectation.minCalls == "number";
+ return !hasMinLimit || expectation.callCount >= expectation.minCalls;
+ }
+
+ function receivedMaxCalls(expectation) {
+ if (typeof expectation.maxCalls != "number") {
+ return false;
+ }
+
+ return expectation.callCount == expectation.maxCalls;
+ }
+
+ function verifyMatcher(possibleMatcher, arg) {
+ if (match && match.isMatcher(possibleMatcher)) {
+ return possibleMatcher.test(arg);
+ } else {
+ return true;
+ }
+ }
+
+ sinon.expectation = {
+ minCalls: 1,
+ maxCalls: 1,
+
+ create: function create(methodName) {
+ var expectation = sinon.extend(sinon.stub.create(), sinon.expectation);
+ delete expectation.create;
+ expectation.method = methodName;
+
+ return expectation;
+ },
+
+ invoke: function invoke(func, thisValue, args) {
+ this.verifyCallAllowed(thisValue, args);
+
+ return sinon.spy.invoke.apply(this, arguments);
+ },
+
+ atLeast: function atLeast(num) {
+ if (typeof num != "number") {
+ throw new TypeError("'" + num + "' is not number");
+ }
+
+ if (!this.limitsSet) {
+ this.maxCalls = null;
+ this.limitsSet = true;
+ }
+
+ this.minCalls = num;
+
+ return this;
+ },
+
+ atMost: function atMost(num) {
+ if (typeof num != "number") {
+ throw new TypeError("'" + num + "' is not number");
+ }
+
+ if (!this.limitsSet) {
+ this.minCalls = null;
+ this.limitsSet = true;
+ }
+
+ this.maxCalls = num;
+
+ return this;
+ },
+
+ never: function never() {
+ return this.exactly(0);
+ },
+
+ once: function once() {
+ return this.exactly(1);
+ },
+
+ twice: function twice() {
+ return this.exactly(2);
+ },
+
+ thrice: function thrice() {
+ return this.exactly(3);
+ },
+
+ exactly: function exactly(num) {
+ if (typeof num != "number") {
+ throw new TypeError("'" + num + "' is not a number");
+ }
+
+ this.atLeast(num);
+ return this.atMost(num);
+ },
+
+ met: function met() {
+ return !this.failed && receivedMinCalls(this);
+ },
+
+ verifyCallAllowed: function verifyCallAllowed(thisValue, args) {
+ if (receivedMaxCalls(this)) {
+ this.failed = true;
+ sinon.expectation.fail(this.method + " already called " + times(this.maxCalls));
+ }
+
+ if ("expectedThis" in this && this.expectedThis !== thisValue) {
+ sinon.expectation.fail(this.method + " called with " + thisValue + " as thisValue, expected " +
+ this.expectedThis);
+ }
+
+ if (!("expectedArguments" in this)) {
+ return;
+ }
+
+ if (!args) {
+ sinon.expectation.fail(this.method + " received no arguments, expected " +
+ sinon.format(this.expectedArguments));
+ }
+
+ if (args.length < this.expectedArguments.length) {
+ sinon.expectation.fail(this.method + " received too few arguments (" + sinon.format(args) +
+ "), expected " + sinon.format(this.expectedArguments));
+ }
+
+ if (this.expectsExactArgCount &&
+ args.length != this.expectedArguments.length) {
+ sinon.expectation.fail(this.method + " received too many arguments (" + sinon.format(args) +
+ "), expected " + sinon.format(this.expectedArguments));
+ }
+
+ for (var i = 0, l = this.expectedArguments.length; i < l; i += 1) {
+
+ if (!verifyMatcher(this.expectedArguments[i], args[i])) {
+ sinon.expectation.fail(this.method + " received wrong arguments " + sinon.format(args) +
+ ", didn't match " + this.expectedArguments.toString());
+ }
+
+ if (!sinon.deepEqual(this.expectedArguments[i], args[i])) {
+ sinon.expectation.fail(this.method + " received wrong arguments " + sinon.format(args) +
+ ", expected " + sinon.format(this.expectedArguments));
+ }
+ }
+ },
+
+ allowsCall: function allowsCall(thisValue, args) {
+ if (this.met() && receivedMaxCalls(this)) {
+ return false;
+ }
+
+ if ("expectedThis" in this && this.expectedThis !== thisValue) {
+ return false;
+ }
+
+ if (!("expectedArguments" in this)) {
+ return true;
+ }
+
+ args = args || [];
+
+ if (args.length < this.expectedArguments.length) {
+ return false;
+ }
+
+ if (this.expectsExactArgCount &&
+ args.length != this.expectedArguments.length) {
+ return false;
+ }
+
+ for (var i = 0, l = this.expectedArguments.length; i < l; i += 1) {
+ if (!verifyMatcher(this.expectedArguments[i], args[i])) {
+ return false;
+ }
+
+ if (!sinon.deepEqual(this.expectedArguments[i], args[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ },
+
+ withArgs: function withArgs() {
+ this.expectedArguments = slice.call(arguments);
+ return this;
+ },
+
+ withExactArgs: function withExactArgs() {
+ this.withArgs.apply(this, arguments);
+ this.expectsExactArgCount = true;
+ return this;
+ },
+
+ on: function on(thisValue) {
+ this.expectedThis = thisValue;
+ return this;
+ },
+
+ toString: function () {
+ var args = (this.expectedArguments || []).slice();
+
+ if (!this.expectsExactArgCount) {
+ push.call(args, "[...]");
+ }
+
+ var callStr = sinon.spyCall.toString.call({
+ proxy: this.method || "anonymous mock expectation",
+ args: args
+ });
+
+ var message = callStr.replace(", [...", "[, ...") + " " +
+ expectedCallCountInWords(this);
+
+ if (this.met()) {
+ return "Expectation met: " + message;
+ }
+
+ return "Expected " + message + " (" +
+ callCountInWords(this.callCount) + ")";
+ },
+
+ verify: function verify() {
+ if (!this.met()) {
+ sinon.expectation.fail(this.toString());
+ } else {
+ sinon.expectation.pass(this.toString());
+ }
+
+ return true;
+ },
+
+ pass: function pass(message) {
+ sinon.assert.pass(message);
+ },
+
+ fail: function fail(message) {
+ var exception = new Error(message);
+ exception.name = "ExpectationError";
+
+ throw exception;
+ }
+ };
+
+ sinon.mock = mock;
+ return mock;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./call");
+ require("./match");
+ require("./spy");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend util/core.js
+ * @depend stub.js
+ * @depend mock.js
+ */
+/**
+ * Collections of stubs, spies and mocks.
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon) {
+ var push = [].push;
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+ function getFakes(fakeCollection) {
+ if (!fakeCollection.fakes) {
+ fakeCollection.fakes = [];
+ }
+
+ return fakeCollection.fakes;
+ }
+
+ function each(fakeCollection, method) {
+ var fakes = getFakes(fakeCollection);
+
+ for (var i = 0, l = fakes.length; i < l; i += 1) {
+ if (typeof fakes[i][method] == "function") {
+ fakes[i][method]();
+ }
+ }
+ }
+
+ function compact(fakeCollection) {
+ var fakes = getFakes(fakeCollection);
+ var i = 0;
+ while (i < fakes.length) {
+ fakes.splice(i, 1);
+ }
+ }
+
+ function makeApi(sinon) {
+ var collection = {
+ verify: function resolve() {
+ each(this, "verify");
+ },
+
+ restore: function restore() {
+ each(this, "restore");
+ compact(this);
+ },
+
+ reset: function restore() {
+ each(this, "reset");
+ },
+
+ verifyAndRestore: function verifyAndRestore() {
+ var exception;
+
+ try {
+ this.verify();
+ } catch (e) {
+ exception = e;
+ }
+
+ this.restore();
+
+ if (exception) {
+ throw exception;
+ }
+ },
+
+ add: function add(fake) {
+ push.call(getFakes(this), fake);
+ return fake;
+ },
+
+ spy: function spy() {
+ return this.add(sinon.spy.apply(sinon, arguments));
+ },
+
+ stub: function stub(object, property, value) {
+ if (property) {
+ var original = object[property];
+
+ if (typeof original != "function") {
+ if (!hasOwnProperty.call(object, property)) {
+ throw new TypeError("Cannot stub non-existent own property " + property);
+ }
+
+ object[property] = value;
+
+ return this.add({
+ restore: function () {
+ object[property] = original;
+ }
+ });
+ }
+ }
+ if (!property && !!object && typeof object == "object") {
+ var stubbedObj = sinon.stub.apply(sinon, arguments);
+
+ for (var prop in stubbedObj) {
+ if (typeof stubbedObj[prop] === "function") {
+ this.add(stubbedObj[prop]);
+ }
+ }
+
+ return stubbedObj;
+ }
+
+ return this.add(sinon.stub.apply(sinon, arguments));
+ },
+
+ mock: function mock() {
+ return this.add(sinon.mock.apply(sinon, arguments));
+ },
+
+ inject: function inject(obj) {
+ var col = this;
+
+ obj.spy = function () {
+ return col.spy.apply(col, arguments);
+ };
+
+ obj.stub = function () {
+ return col.stub.apply(col, arguments);
+ };
+
+ obj.mock = function () {
+ return col.mock.apply(col, arguments);
+ };
+
+ return obj;
+ }
+ };
+
+ sinon.collection = collection;
+ return collection;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./mock");
+ require("./spy");
+ require("./stub");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/*global lolex */
+
+/**
+ * Fake timer API
+ * setTimeout
+ * setInterval
+ * clearTimeout
+ * clearInterval
+ * tick
+ * reset
+ * Date
+ *
+ * Inspired by jsUnitMockTimeOut from JsUnit
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+if (typeof sinon == "undefined") {
+ var sinon = {};
+}
+
+(function (global) {
+ function makeApi(sinon, lol) {
+ var llx = typeof lolex !== "undefined" ? lolex : lol;
+
+ sinon.useFakeTimers = function () {
+ var now, methods = Array.prototype.slice.call(arguments);
+
+ if (typeof methods[0] === "string") {
+ now = 0;
+ } else {
+ now = methods.shift();
+ }
+
+ var clock = llx.install(now || 0, methods);
+ clock.restore = clock.uninstall;
+ return clock;
+ };
+
+ sinon.clock = {
+ create: function (now) {
+ return llx.createClock(now);
+ }
+ };
+
+ sinon.timers = {
+ setTimeout: setTimeout,
+ clearTimeout: clearTimeout,
+ setImmediate: (typeof setImmediate !== "undefined" ? setImmediate : undefined),
+ clearImmediate: (typeof clearImmediate !== "undefined" ? clearImmediate : undefined),
+ setInterval: setInterval,
+ clearInterval: clearInterval,
+ Date: Date
+ };
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, epxorts, module) {
+ var sinon = require("./core");
+ makeApi(sinon, require("lolex"));
+ module.exports = sinon;
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else {
+ makeApi(sinon);
+ }
+}(typeof global != "undefined" && typeof global !== "function" ? global : this));
+
+/**
+ * Minimal Event interface implementation
+ *
+ * Original implementation by Sven Fuchs: https://gist.github.com/995028
+ * Modifications and tests by Christian Johansen.
+ *
+ * @author Sven Fuchs (svenfuchs@artweb-design.de)
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2011 Sven Fuchs, Christian Johansen
+ */
+
+if (typeof sinon == "undefined") {
+ this.sinon = {};
+}
+
+(function () {
+ var push = [].push;
+
+ function makeApi(sinon) {
+ sinon.Event = function Event(type, bubbles, cancelable, target) {
+ this.initEvent(type, bubbles, cancelable, target);
+ };
+
+ sinon.Event.prototype = {
+ initEvent: function (type, bubbles, cancelable, target) {
+ this.type = type;
+ this.bubbles = bubbles;
+ this.cancelable = cancelable;
+ this.target = target;
+ },
+
+ stopPropagation: function () {},
+
+ preventDefault: function () {
+ this.defaultPrevented = true;
+ }
+ };
+
+ sinon.ProgressEvent = function ProgressEvent(type, progressEventRaw, target) {
+ this.initEvent(type, false, false, target);
+ this.loaded = progressEventRaw.loaded || null;
+ this.total = progressEventRaw.total || null;
+ this.lengthComputable = !!progressEventRaw.total;
+ };
+
+ sinon.ProgressEvent.prototype = new sinon.Event();
+
+ sinon.ProgressEvent.prototype.constructor = sinon.ProgressEvent;
+
+ sinon.CustomEvent = function CustomEvent(type, customData, target) {
+ this.initEvent(type, false, false, target);
+ this.detail = customData.detail || null;
+ };
+
+ sinon.CustomEvent.prototype = new sinon.Event();
+
+ sinon.CustomEvent.prototype.constructor = sinon.CustomEvent;
+
+ sinon.EventTarget = {
+ addEventListener: function addEventListener(event, listener) {
+ this.eventListeners = this.eventListeners || {};
+ this.eventListeners[event] = this.eventListeners[event] || [];
+ push.call(this.eventListeners[event], listener);
+ },
+
+ removeEventListener: function removeEventListener(event, listener) {
+ var listeners = this.eventListeners && this.eventListeners[event] || [];
+
+ for (var i = 0, l = listeners.length; i < l; ++i) {
+ if (listeners[i] == listener) {
+ return listeners.splice(i, 1);
+ }
+ }
+ },
+
+ dispatchEvent: function dispatchEvent(event) {
+ var type = event.type;
+ var listeners = this.eventListeners && this.eventListeners[type] || [];
+
+ for (var i = 0; i < listeners.length; i++) {
+ if (typeof listeners[i] == "function") {
+ listeners[i].call(this, event);
+ } else {
+ listeners[i].handleEvent(event);
+ }
+ }
+
+ return !!event.defaultPrevented;
+ }
+ };
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require) {
+ var sinon = require("./core");
+ makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require);
+ } else {
+ makeApi(sinon);
+ }
+}());
+
+/**
+ * @depend ../sinon.js
+ */
+/**
+ * Logs errors
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2014 Christian Johansen
+ */
+
+(function (sinon) {
+ // cache a reference to setTimeout, so that our reference won't be stubbed out
+ // when using fake timers and errors will still get logged
+ // https://github.com/cjohansen/Sinon.JS/issues/381
+ var realSetTimeout = setTimeout;
+
+ function makeApi(sinon) {
+
+ function log() {}
+
+ function logError(label, err) {
+ var msg = label + " threw exception: ";
+
+ sinon.log(msg + "[" + err.name + "] " + err.message);
+
+ if (err.stack) {
+ sinon.log(err.stack);
+ }
+
+ logError.setTimeout(function () {
+ err.message = msg + err.message;
+ throw err;
+ }, 0);
+ };
+
+ // wrap realSetTimeout with something we can stub in tests
+ logError.setTimeout = function (func, timeout) {
+ realSetTimeout(func, timeout);
+ }
+
+ var exports = {};
+ exports.log = sinon.log = log;
+ exports.logError = sinon.logError = logError;
+
+ return exports;
+ }
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ module.exports = makeApi(sinon);
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend core.js
+ * @depend ../extend.js
+ * @depend event.js
+ * @depend ../log_error.js
+ */
+/**
+ * Fake XDomainRequest object
+ */
+
+if (typeof sinon == "undefined") {
+ this.sinon = {};
+}
+
+// wrapper for global
+(function (global) {
+ var xdr = { XDomainRequest: global.XDomainRequest };
+ xdr.GlobalXDomainRequest = global.XDomainRequest;
+ xdr.supportsXDR = typeof xdr.GlobalXDomainRequest != "undefined";
+ xdr.workingXDR = xdr.supportsXDR ? xdr.GlobalXDomainRequest : false;
+
+ function makeApi(sinon) {
+ sinon.xdr = xdr;
+
+ function FakeXDomainRequest() {
+ this.readyState = FakeXDomainRequest.UNSENT;
+ this.requestBody = null;
+ this.requestHeaders = {};
+ this.status = 0;
+ this.timeout = null;
+
+ if (typeof FakeXDomainRequest.onCreate == "function") {
+ FakeXDomainRequest.onCreate(this);
+ }
+ }
+
+ function verifyState(xdr) {
+ if (xdr.readyState !== FakeXDomainRequest.OPENED) {
+ throw new Error("INVALID_STATE_ERR");
+ }
+
+ if (xdr.sendFlag) {
+ throw new Error("INVALID_STATE_ERR");
+ }
+ }
+
+ function verifyRequestSent(xdr) {
+ if (xdr.readyState == FakeXDomainRequest.UNSENT) {
+ throw new Error("Request not sent");
+ }
+ if (xdr.readyState == FakeXDomainRequest.DONE) {
+ throw new Error("Request done");
+ }
+ }
+
+ function verifyResponseBodyType(body) {
+ if (typeof body != "string") {
+ var error = new Error("Attempted to respond to fake XDomainRequest with " +
+ body + ", which is not a string.");
+ error.name = "InvalidBodyException";
+ throw error;
+ }
+ }
+
+ sinon.extend(FakeXDomainRequest.prototype, sinon.EventTarget, {
+ open: function open(method, url) {
+ this.method = method;
+ this.url = url;
+
+ this.responseText = null;
+ this.sendFlag = false;
+
+ this.readyStateChange(FakeXDomainRequest.OPENED);
+ },
+
+ readyStateChange: function readyStateChange(state) {
+ this.readyState = state;
+ var eventName = "";
+ switch (this.readyState) {
+ case FakeXDomainRequest.UNSENT:
+ break;
+ case FakeXDomainRequest.OPENED:
+ break;
+ case FakeXDomainRequest.LOADING:
+ if (this.sendFlag) {
+ //raise the progress event
+ eventName = "onprogress";
+ }
+ break;
+ case FakeXDomainRequest.DONE:
+ if (this.isTimeout) {
+ eventName = "ontimeout"
+ } else if (this.errorFlag || (this.status < 200 || this.status > 299)) {
+ eventName = "onerror";
+ } else {
+ eventName = "onload"
+ }
+ break;
+ }
+
+ // raising event (if defined)
+ if (eventName) {
+ if (typeof this[eventName] == "function") {
+ try {
+ this[eventName]();
+ } catch (e) {
+ sinon.logError("Fake XHR " + eventName + " handler", e);
+ }
+ }
+ }
+ },
+
+ send: function send(data) {
+ verifyState(this);
+
+ if (!/^(get|head)$/i.test(this.method)) {
+ this.requestBody = data;
+ }
+ this.requestHeaders["Content-Type"] = "text/plain;charset=utf-8";
+
+ this.errorFlag = false;
+ this.sendFlag = true;
+ this.readyStateChange(FakeXDomainRequest.OPENED);
+
+ if (typeof this.onSend == "function") {
+ this.onSend(this);
+ }
+ },
+
+ abort: function abort() {
+ this.aborted = true;
+ this.responseText = null;
+ this.errorFlag = true;
+
+ if (this.readyState > sinon.FakeXDomainRequest.UNSENT && this.sendFlag) {
+ this.readyStateChange(sinon.FakeXDomainRequest.DONE);
+ this.sendFlag = false;
+ }
+ },
+
+ setResponseBody: function setResponseBody(body) {
+ verifyRequestSent(this);
+ verifyResponseBodyType(body);
+
+ var chunkSize = this.chunkSize || 10;
+ var index = 0;
+ this.responseText = "";
+
+ do {
+ this.readyStateChange(FakeXDomainRequest.LOADING);
+ this.responseText += body.substring(index, index + chunkSize);
+ index += chunkSize;
+ } while (index < body.length);
+
+ this.readyStateChange(FakeXDomainRequest.DONE);
+ },
+
+ respond: function respond(status, contentType, body) {
+ // content-type ignored, since XDomainRequest does not carry this
+ // we keep the same syntax for respond(...) as for FakeXMLHttpRequest to ease
+ // test integration across browsers
+ this.status = typeof status == "number" ? status : 200;
+ this.setResponseBody(body || "");
+ },
+
+ simulatetimeout: function simulatetimeout() {
+ this.status = 0;
+ this.isTimeout = true;
+ // Access to this should actually throw an error
+ this.responseText = undefined;
+ this.readyStateChange(FakeXDomainRequest.DONE);
+ }
+ });
+
+ sinon.extend(FakeXDomainRequest, {
+ UNSENT: 0,
+ OPENED: 1,
+ LOADING: 3,
+ DONE: 4
+ });
+
+ sinon.useFakeXDomainRequest = function useFakeXDomainRequest() {
+ sinon.FakeXDomainRequest.restore = function restore(keepOnCreate) {
+ if (xdr.supportsXDR) {
+ global.XDomainRequest = xdr.GlobalXDomainRequest;
+ }
+
+ delete sinon.FakeXDomainRequest.restore;
+
+ if (keepOnCreate !== true) {
+ delete sinon.FakeXDomainRequest.onCreate;
+ }
+ };
+ if (xdr.supportsXDR) {
+ global.XDomainRequest = sinon.FakeXDomainRequest;
+ }
+ return sinon.FakeXDomainRequest;
+ };
+
+ sinon.FakeXDomainRequest = FakeXDomainRequest;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./core");
+ require("./event");
+ makeApi(sinon);
+ module.exports = sinon;
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else {
+ makeApi(sinon);
+ }
+})(this);
+
+/**
+ * @depend core.js
+ * @depend ../extend.js
+ * @depend event.js
+ * @depend ../log_error.js
+ */
+/**
+ * Fake XMLHttpRequest object
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (global) {
+
+ var supportsProgress = typeof ProgressEvent !== "undefined";
+ var supportsCustomEvent = typeof CustomEvent !== "undefined";
+ var sinonXhr = { XMLHttpRequest: global.XMLHttpRequest };
+ sinonXhr.GlobalXMLHttpRequest = global.XMLHttpRequest;
+ sinonXhr.GlobalActiveXObject = global.ActiveXObject;
+ sinonXhr.supportsActiveX = typeof sinonXhr.GlobalActiveXObject != "undefined";
+ sinonXhr.supportsXHR = typeof sinonXhr.GlobalXMLHttpRequest != "undefined";
+ sinonXhr.workingXHR = sinonXhr.supportsXHR ? sinonXhr.GlobalXMLHttpRequest : sinonXhr.supportsActiveX
+ ? function () { return new sinonXhr.GlobalActiveXObject("MSXML2.XMLHTTP.3.0") } : false;
+ sinonXhr.supportsCORS = sinonXhr.supportsXHR && "withCredentials" in (new sinonXhr.GlobalXMLHttpRequest());
+
+ /*jsl:ignore*/
+ var unsafeHeaders = {
+ "Accept-Charset": true,
+ "Accept-Encoding": true,
+ Connection: true,
+ "Content-Length": true,
+ Cookie: true,
+ Cookie2: true,
+ "Content-Transfer-Encoding": true,
+ Date: true,
+ Expect: true,
+ Host: true,
+ "Keep-Alive": true,
+ Referer: true,
+ TE: true,
+ Trailer: true,
+ "Transfer-Encoding": true,
+ Upgrade: true,
+ "User-Agent": true,
+ Via: true
+ };
+ /*jsl:end*/
+
+ function FakeXMLHttpRequest() {
+ this.readyState = FakeXMLHttpRequest.UNSENT;
+ this.requestHeaders = {};
+ this.requestBody = null;
+ this.status = 0;
+ this.statusText = "";
+ this.upload = new UploadProgress();
+ if (sinonXhr.supportsCORS) {
+ this.withCredentials = false;
+ }
+
+ var xhr = this;
+ var events = ["loadstart", "load", "abort", "loadend"];
+
+ function addEventListener(eventName) {
+ xhr.addEventListener(eventName, function (event) {
+ var listener = xhr["on" + eventName];
+
+ if (listener && typeof listener == "function") {
+ listener.call(this, event);
+ }
+ });
+ }
+
+ for (var i = events.length - 1; i >= 0; i--) {
+ addEventListener(events[i]);
+ }
+
+ if (typeof FakeXMLHttpRequest.onCreate == "function") {
+ FakeXMLHttpRequest.onCreate(this);
+ }
+ }
+
+ // An upload object is created for each
+ // FakeXMLHttpRequest and allows upload
+ // events to be simulated using uploadProgress
+ // and uploadError.
+ function UploadProgress() {
+ this.eventListeners = {
+ progress: [],
+ load: [],
+ abort: [],
+ error: []
+ }
+ }
+
+ UploadProgress.prototype.addEventListener = function addEventListener(event, listener) {
+ this.eventListeners[event].push(listener);
+ };
+
+ UploadProgress.prototype.removeEventListener = function removeEventListener(event, listener) {
+ var listeners = this.eventListeners[event] || [];
+
+ for (var i = 0, l = listeners.length; i < l; ++i) {
+ if (listeners[i] == listener) {
+ return listeners.splice(i, 1);
+ }
+ }
+ };
+
+ UploadProgress.prototype.dispatchEvent = function dispatchEvent(event) {
+ var listeners = this.eventListeners[event.type] || [];
+
+ for (var i = 0, listener; (listener = listeners[i]) != null; i++) {
+ listener(event);
+ }
+ };
+
+ function verifyState(xhr) {
+ if (xhr.readyState !== FakeXMLHttpRequest.OPENED) {
+ throw new Error("INVALID_STATE_ERR");
+ }
+
+ if (xhr.sendFlag) {
+ throw new Error("INVALID_STATE_ERR");
+ }
+ }
+
+ function getHeader(headers, header) {
+ header = header.toLowerCase();
+
+ for (var h in headers) {
+ if (h.toLowerCase() == header) {
+ return h;
+ }
+ }
+
+ return null;
+ }
+
+ // filtering to enable a white-list version of Sinon FakeXhr,
+ // where whitelisted requests are passed through to real XHR
+ function each(collection, callback) {
+ if (!collection) {
+ return;
+ }
+
+ for (var i = 0, l = collection.length; i < l; i += 1) {
+ callback(collection[i]);
+ }
+ }
+ function some(collection, callback) {
+ for (var index = 0; index < collection.length; index++) {
+ if (callback(collection[index]) === true) {
+ return true;
+ }
+ }
+ return false;
+ }
+ // largest arity in XHR is 5 - XHR#open
+ var apply = function (obj, method, args) {
+ switch (args.length) {
+ case 0: return obj[method]();
+ case 1: return obj[method](args[0]);
+ case 2: return obj[method](args[0], args[1]);
+ case 3: return obj[method](args[0], args[1], args[2]);
+ case 4: return obj[method](args[0], args[1], args[2], args[3]);
+ case 5: return obj[method](args[0], args[1], args[2], args[3], args[4]);
+ }
+ };
+
+ FakeXMLHttpRequest.filters = [];
+ FakeXMLHttpRequest.addFilter = function addFilter(fn) {
+ this.filters.push(fn)
+ };
+ var IE6Re = /MSIE 6/;
+ FakeXMLHttpRequest.defake = function defake(fakeXhr, xhrArgs) {
+ var xhr = new sinonXhr.workingXHR();
+ each([
+ "open",
+ "setRequestHeader",
+ "send",
+ "abort",
+ "getResponseHeader",
+ "getAllResponseHeaders",
+ "addEventListener",
+ "overrideMimeType",
+ "removeEventListener"
+ ], function (method) {
+ fakeXhr[method] = function () {
+ return apply(xhr, method, arguments);
+ };
+ });
+
+ var copyAttrs = function (args) {
+ each(args, function (attr) {
+ try {
+ fakeXhr[attr] = xhr[attr]
+ } catch (e) {
+ if (!IE6Re.test(navigator.userAgent)) {
+ throw e;
+ }
+ }
+ });
+ };
+
+ var stateChange = function stateChange() {
+ fakeXhr.readyState = xhr.readyState;
+ if (xhr.readyState >= FakeXMLHttpRequest.HEADERS_RECEIVED) {
+ copyAttrs(["status", "statusText"]);
+ }
+ if (xhr.readyState >= FakeXMLHttpRequest.LOADING) {
+ copyAttrs(["responseText", "response"]);
+ }
+ if (xhr.readyState === FakeXMLHttpRequest.DONE) {
+ copyAttrs(["responseXML"]);
+ }
+ if (fakeXhr.onreadystatechange) {
+ fakeXhr.onreadystatechange.call(fakeXhr, { target: fakeXhr });
+ }
+ };
+
+ if (xhr.addEventListener) {
+ for (var event in fakeXhr.eventListeners) {
+ if (fakeXhr.eventListeners.hasOwnProperty(event)) {
+ each(fakeXhr.eventListeners[event], function (handler) {
+ xhr.addEventListener(event, handler);
+ });
+ }
+ }
+ xhr.addEventListener("readystatechange", stateChange);
+ } else {
+ xhr.onreadystatechange = stateChange;
+ }
+ apply(xhr, "open", xhrArgs);
+ };
+ FakeXMLHttpRequest.useFilters = false;
+
+ function verifyRequestOpened(xhr) {
+ if (xhr.readyState != FakeXMLHttpRequest.OPENED) {
+ throw new Error("INVALID_STATE_ERR - " + xhr.readyState);
+ }
+ }
+
+ function verifyRequestSent(xhr) {
+ if (xhr.readyState == FakeXMLHttpRequest.DONE) {
+ throw new Error("Request done");
+ }
+ }
+
+ function verifyHeadersReceived(xhr) {
+ if (xhr.async && xhr.readyState != FakeXMLHttpRequest.HEADERS_RECEIVED) {
+ throw new Error("No headers received");
+ }
+ }
+
+ function verifyResponseBodyType(body) {
+ if (typeof body != "string") {
+ var error = new Error("Attempted to respond to fake XMLHttpRequest with " +
+ body + ", which is not a string.");
+ error.name = "InvalidBodyException";
+ throw error;
+ }
+ }
+
+ FakeXMLHttpRequest.parseXML = function parseXML(text) {
+ var xmlDoc;
+
+ if (typeof DOMParser != "undefined") {
+ var parser = new DOMParser();
+ xmlDoc = parser.parseFromString(text, "text/xml");
+ } else {
+ xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
+ xmlDoc.async = "false";
+ xmlDoc.loadXML(text);
+ }
+
+ return xmlDoc;
+ };
+
+ FakeXMLHttpRequest.statusCodes = {
+ 100: "Continue",
+ 101: "Switching Protocols",
+ 200: "OK",
+ 201: "Created",
+ 202: "Accepted",
+ 203: "Non-Authoritative Information",
+ 204: "No Content",
+ 205: "Reset Content",
+ 206: "Partial Content",
+ 207: "Multi-Status",
+ 300: "Multiple Choice",
+ 301: "Moved Permanently",
+ 302: "Found",
+ 303: "See Other",
+ 304: "Not Modified",
+ 305: "Use Proxy",
+ 307: "Temporary Redirect",
+ 400: "Bad Request",
+ 401: "Unauthorized",
+ 402: "Payment Required",
+ 403: "Forbidden",
+ 404: "Not Found",
+ 405: "Method Not Allowed",
+ 406: "Not Acceptable",
+ 407: "Proxy Authentication Required",
+ 408: "Request Timeout",
+ 409: "Conflict",
+ 410: "Gone",
+ 411: "Length Required",
+ 412: "Precondition Failed",
+ 413: "Request Entity Too Large",
+ 414: "Request-URI Too Long",
+ 415: "Unsupported Media Type",
+ 416: "Requested Range Not Satisfiable",
+ 417: "Expectation Failed",
+ 422: "Unprocessable Entity",
+ 500: "Internal Server Error",
+ 501: "Not Implemented",
+ 502: "Bad Gateway",
+ 503: "Service Unavailable",
+ 504: "Gateway Timeout",
+ 505: "HTTP Version Not Supported"
+ };
+
+ function makeApi(sinon) {
+ sinon.xhr = sinonXhr;
+
+ sinon.extend(FakeXMLHttpRequest.prototype, sinon.EventTarget, {
+ async: true,
+
+ open: function open(method, url, async, username, password) {
+ this.method = method;
+ this.url = url;
+ this.async = typeof async == "boolean" ? async : true;
+ this.username = username;
+ this.password = password;
+ this.responseText = null;
+ this.responseXML = null;
+ this.requestHeaders = {};
+ this.sendFlag = false;
+
+ if (FakeXMLHttpRequest.useFilters === true) {
+ var xhrArgs = arguments;
+ var defake = some(FakeXMLHttpRequest.filters, function (filter) {
+ return filter.apply(this, xhrArgs)
+ });
+ if (defake) {
+ return FakeXMLHttpRequest.defake(this, arguments);
+ }
+ }
+ this.readyStateChange(FakeXMLHttpRequest.OPENED);
+ },
+
+ readyStateChange: function readyStateChange(state) {
+ this.readyState = state;
+
+ if (typeof this.onreadystatechange == "function") {
+ try {
+ this.onreadystatechange();
+ } catch (e) {
+ sinon.logError("Fake XHR onreadystatechange handler", e);
+ }
+ }
+
+ this.dispatchEvent(new sinon.Event("readystatechange"));
+
+ switch (this.readyState) {
+ case FakeXMLHttpRequest.DONE:
+ this.dispatchEvent(new sinon.Event("load", false, false, this));
+ this.dispatchEvent(new sinon.Event("loadend", false, false, this));
+ this.upload.dispatchEvent(new sinon.Event("load", false, false, this));
+ if (supportsProgress) {
+ this.upload.dispatchEvent(new sinon.ProgressEvent("progress", {loaded: 100, total: 100}));
+ this.dispatchEvent(new sinon.ProgressEvent("progress", {loaded: 100, total: 100}));
+ }
+ break;
+ }
+ },
+
+ setRequestHeader: function setRequestHeader(header, value) {
+ verifyState(this);
+
+ if (unsafeHeaders[header] || /^(Sec-|Proxy-)/.test(header)) {
+ throw new Error("Refused to set unsafe header \"" + header + "\"");
+ }
+
+ if (this.requestHeaders[header]) {
+ this.requestHeaders[header] += "," + value;
+ } else {
+ this.requestHeaders[header] = value;
+ }
+ },
+
+ // Helps testing
+ setResponseHeaders: function setResponseHeaders(headers) {
+ verifyRequestOpened(this);
+ this.responseHeaders = {};
+
+ for (var header in headers) {
+ if (headers.hasOwnProperty(header)) {
+ this.responseHeaders[header] = headers[header];
+ }
+ }
+
+ if (this.async) {
+ this.readyStateChange(FakeXMLHttpRequest.HEADERS_RECEIVED);
+ } else {
+ this.readyState = FakeXMLHttpRequest.HEADERS_RECEIVED;
+ }
+ },
+
+ // Currently treats ALL data as a DOMString (i.e. no Document)
+ send: function send(data) {
+ verifyState(this);
+
+ if (!/^(get|head)$/i.test(this.method)) {
+ var contentType = getHeader(this.requestHeaders, "Content-Type");
+ if (this.requestHeaders[contentType]) {
+ var value = this.requestHeaders[contentType].split(";");
+ this.requestHeaders[contentType] = value[0] + ";charset=utf-8";
+ } else if (!(data instanceof FormData)) {
+ this.requestHeaders["Content-Type"] = "text/plain;charset=utf-8";
+ }
+
+ this.requestBody = data;
+ }
+
+ this.errorFlag = false;
+ this.sendFlag = this.async;
+ this.readyStateChange(FakeXMLHttpRequest.OPENED);
+
+ if (typeof this.onSend == "function") {
+ this.onSend(this);
+ }
+
+ this.dispatchEvent(new sinon.Event("loadstart", false, false, this));
+ },
+
+ abort: function abort() {
+ this.aborted = true;
+ this.responseText = null;
+ this.errorFlag = true;
+ this.requestHeaders = {};
+
+ if (this.readyState > FakeXMLHttpRequest.UNSENT && this.sendFlag) {
+ this.readyStateChange(FakeXMLHttpRequest.DONE);
+ this.sendFlag = false;
+ }
+
+ this.readyState = FakeXMLHttpRequest.UNSENT;
+
+ this.dispatchEvent(new sinon.Event("abort", false, false, this));
+
+ this.upload.dispatchEvent(new sinon.Event("abort", false, false, this));
+
+ if (typeof this.onerror === "function") {
+ this.onerror();
+ }
+ },
+
+ getResponseHeader: function getResponseHeader(header) {
+ if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {
+ return null;
+ }
+
+ if (/^Set-Cookie2?$/i.test(header)) {
+ return null;
+ }
+
+ header = getHeader(this.responseHeaders, header);
+
+ return this.responseHeaders[header] || null;
+ },
+
+ getAllResponseHeaders: function getAllResponseHeaders() {
+ if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {
+ return "";
+ }
+
+ var headers = "";
+
+ for (var header in this.responseHeaders) {
+ if (this.responseHeaders.hasOwnProperty(header) &&
+ !/^Set-Cookie2?$/i.test(header)) {
+ headers += header + ": " + this.responseHeaders[header] + "\r\n";
+ }
+ }
+
+ return headers;
+ },
+
+ setResponseBody: function setResponseBody(body) {
+ verifyRequestSent(this);
+ verifyHeadersReceived(this);
+ verifyResponseBodyType(body);
+
+ var chunkSize = this.chunkSize || 10;
+ var index = 0;
+ this.responseText = "";
+
+ do {
+ if (this.async) {
+ this.readyStateChange(FakeXMLHttpRequest.LOADING);
+ }
+
+ this.responseText += body.substring(index, index + chunkSize);
+ index += chunkSize;
+ } while (index < body.length);
+
+ var type = this.getResponseHeader("Content-Type");
+
+ if (this.responseText &&
+ (!type || /(text\/xml)|(application\/xml)|(\+xml)/.test(type))) {
+ try {
+ this.responseXML = FakeXMLHttpRequest.parseXML(this.responseText);
+ } catch (e) {
+ // Unable to parse XML - no biggie
+ }
+ }
+
+ this.readyStateChange(FakeXMLHttpRequest.DONE);
+ },
+
+ respond: function respond(status, headers, body) {
+ this.status = typeof status == "number" ? status : 200;
+ this.statusText = FakeXMLHttpRequest.statusCodes[this.status];
+ this.setResponseHeaders(headers || {});
+ this.setResponseBody(body || "");
+ },
+
+ uploadProgress: function uploadProgress(progressEventRaw) {
+ if (supportsProgress) {
+ this.upload.dispatchEvent(new sinon.ProgressEvent("progress", progressEventRaw));
+ }
+ },
+
+ downloadProgress: function downloadProgress(progressEventRaw) {
+ if (supportsProgress) {
+ this.dispatchEvent(new sinon.ProgressEvent("progress", progressEventRaw));
+ }
+ },
+
+ uploadError: function uploadError(error) {
+ if (supportsCustomEvent) {
+ this.upload.dispatchEvent(new sinon.CustomEvent("error", {detail: error}));
+ }
+ }
+ });
+
+ sinon.extend(FakeXMLHttpRequest, {
+ UNSENT: 0,
+ OPENED: 1,
+ HEADERS_RECEIVED: 2,
+ LOADING: 3,
+ DONE: 4
+ });
+
+ sinon.useFakeXMLHttpRequest = function () {
+ FakeXMLHttpRequest.restore = function restore(keepOnCreate) {
+ if (sinonXhr.supportsXHR) {
+ global.XMLHttpRequest = sinonXhr.GlobalXMLHttpRequest;
+ }
+
+ if (sinonXhr.supportsActiveX) {
+ global.ActiveXObject = sinonXhr.GlobalActiveXObject;
+ }
+
+ delete FakeXMLHttpRequest.restore;
+
+ if (keepOnCreate !== true) {
+ delete FakeXMLHttpRequest.onCreate;
+ }
+ };
+ if (sinonXhr.supportsXHR) {
+ global.XMLHttpRequest = FakeXMLHttpRequest;
+ }
+
+ if (sinonXhr.supportsActiveX) {
+ global.ActiveXObject = function ActiveXObject(objId) {
+ if (objId == "Microsoft.XMLHTTP" || /^Msxml2\.XMLHTTP/i.test(objId)) {
+
+ return new FakeXMLHttpRequest();
+ }
+
+ return new sinonXhr.GlobalActiveXObject(objId);
+ };
+ }
+
+ return FakeXMLHttpRequest;
+ };
+
+ sinon.FakeXMLHttpRequest = FakeXMLHttpRequest;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./core");
+ require("./event");
+ makeApi(sinon);
+ module.exports = sinon;
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (typeof sinon === "undefined") {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+
+})(typeof global !== "undefined" ? global : this);
+
+/**
+ * @depend fake_xdomain_request.js
+ * @depend fake_xml_http_request.js
+ * @depend ../format.js
+ * @depend ../log_error.js
+ */
+/**
+ * The Sinon "server" mimics a web server that receives requests from
+ * sinon.FakeXMLHttpRequest and provides an API to respond to those requests,
+ * both synchronously and asynchronously. To respond synchronuously, canned
+ * answers have to be provided upfront.
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+if (typeof sinon == "undefined") {
+ var sinon = {};
+}
+
+(function () {
+ var push = [].push;
+ function F() {}
+
+ function create(proto) {
+ F.prototype = proto;
+ return new F();
+ }
+
+ function responseArray(handler) {
+ var response = handler;
+
+ if (Object.prototype.toString.call(handler) != "[object Array]") {
+ response = [200, {}, handler];
+ }
+
+ if (typeof response[2] != "string") {
+ throw new TypeError("Fake server response body should be string, but was " +
+ typeof response[2]);
+ }
+
+ return response;
+ }
+
+ var wloc = typeof window !== "undefined" ? window.location : {};
+ var rCurrLoc = new RegExp("^" + wloc.protocol + "//" + wloc.host);
+
+ function matchOne(response, reqMethod, reqUrl) {
+ var rmeth = response.method;
+ var matchMethod = !rmeth || rmeth.toLowerCase() == reqMethod.toLowerCase();
+ var url = response.url;
+ var matchUrl = !url || url == reqUrl || (typeof url.test == "function" && url.test(reqUrl));
+
+ return matchMethod && matchUrl;
+ }
+
+ function match(response, request) {
+ var requestUrl = request.url;
+
+ if (!/^https?:\/\//.test(requestUrl) || rCurrLoc.test(requestUrl)) {
+ requestUrl = requestUrl.replace(rCurrLoc, "");
+ }
+
+ if (matchOne(response, this.getHTTPMethod(request), requestUrl)) {
+ if (typeof response.response == "function") {
+ var ru = response.url;
+ var args = [request].concat(ru && typeof ru.exec == "function" ? ru.exec(requestUrl).slice(1) : []);
+ return response.response.apply(response, args);
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ function makeApi(sinon) {
+ sinon.fakeServer = {
+ create: function () {
+ var server = create(this);
+ if (!sinon.xhr.supportsCORS) {
+ this.xhr = sinon.useFakeXDomainRequest();
+ } else {
+ this.xhr = sinon.useFakeXMLHttpRequest();
+ }
+ server.requests = [];
+
+ this.xhr.onCreate = function (xhrObj) {
+ server.addRequest(xhrObj);
+ };
+
+ return server;
+ },
+
+ addRequest: function addRequest(xhrObj) {
+ var server = this;
+ push.call(this.requests, xhrObj);
+
+ xhrObj.onSend = function () {
+ server.handleRequest(this);
+
+ if (server.autoRespond && !server.responding) {
+ setTimeout(function () {
+ server.responding = false;
+ server.respond();
+ }, server.autoRespondAfter || 10);
+
+ server.responding = true;
+ }
+ };
+ },
+
+ getHTTPMethod: function getHTTPMethod(request) {
+ if (this.fakeHTTPMethods && /post/i.test(request.method)) {
+ var matches = (request.requestBody || "").match(/_method=([^\b;]+)/);
+ return !!matches ? matches[1] : request.method;
+ }
+
+ return request.method;
+ },
+
+ handleRequest: function handleRequest(xhr) {
+ if (xhr.async) {
+ if (!this.queue) {
+ this.queue = [];
+ }
+
+ push.call(this.queue, xhr);
+ } else {
+ this.processRequest(xhr);
+ }
+ },
+
+ log: function log(response, request) {
+ var str;
+
+ str = "Request:\n" + sinon.format(request) + "\n\n";
+ str += "Response:\n" + sinon.format(response) + "\n\n";
+
+ sinon.log(str);
+ },
+
+ respondWith: function respondWith(method, url, body) {
+ if (arguments.length == 1 && typeof method != "function") {
+ this.response = responseArray(method);
+ return;
+ }
+
+ if (!this.responses) { this.responses = []; }
+
+ if (arguments.length == 1) {
+ body = method;
+ url = method = null;
+ }
+
+ if (arguments.length == 2) {
+ body = url;
+ url = method;
+ method = null;
+ }
+
+ push.call(this.responses, {
+ method: method,
+ url: url,
+ response: typeof body == "function" ? body : responseArray(body)
+ });
+ },
+
+ respond: function respond() {
+ if (arguments.length > 0) {
+ this.respondWith.apply(this, arguments);
+ }
+
+ var queue = this.queue || [];
+ var requests = queue.splice(0, queue.length);
+ var request;
+
+ while (request = requests.shift()) {
+ this.processRequest(request);
+ }
+ },
+
+ processRequest: function processRequest(request) {
+ try {
+ if (request.aborted) {
+ return;
+ }
+
+ var response = this.response || [404, {}, ""];
+
+ if (this.responses) {
+ for (var l = this.responses.length, i = l - 1; i >= 0; i--) {
+ if (match.call(this, this.responses[i], request)) {
+ response = this.responses[i].response;
+ break;
+ }
+ }
+ }
+
+ if (request.readyState != 4) {
+ this.log(response, request);
+
+ request.respond(response[0], response[1], response[2]);
+ }
+ } catch (e) {
+ sinon.logError("Fake server request processing", e);
+ }
+ },
+
+ restore: function restore() {
+ return this.xhr.restore && this.xhr.restore.apply(this.xhr, arguments);
+ }
+ };
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./core");
+ require("./fake_xdomain_request");
+ require("./fake_xml_http_request");
+ makeApi(sinon);
+ module.exports = sinon;
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else {
+ makeApi(sinon);
+ }
+}());
+
+/**
+ * @depend fake_server.js
+ * @depend fake_timers.js
+ */
+/**
+ * Add-on for sinon.fakeServer that automatically handles a fake timer along with
+ * the FakeXMLHttpRequest. The direct inspiration for this add-on is jQuery
+ * 1.3.x, which does not use xhr object's onreadystatehandler at all - instead,
+ * it polls the object for completion with setInterval. Dispite the direct
+ * motivation, there is nothing jQuery-specific in this file, so it can be used
+ * in any environment where the ajax implementation depends on setInterval or
+ * setTimeout.
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function () {
+ function makeApi(sinon) {
+ function Server() {}
+ Server.prototype = sinon.fakeServer;
+
+ sinon.fakeServerWithClock = new Server();
+
+ sinon.fakeServerWithClock.addRequest = function addRequest(xhr) {
+ if (xhr.async) {
+ if (typeof setTimeout.clock == "object") {
+ this.clock = setTimeout.clock;
+ } else {
+ this.clock = sinon.useFakeTimers();
+ this.resetClock = true;
+ }
+
+ if (!this.longestTimeout) {
+ var clockSetTimeout = this.clock.setTimeout;
+ var clockSetInterval = this.clock.setInterval;
+ var server = this;
+
+ this.clock.setTimeout = function (fn, timeout) {
+ server.longestTimeout = Math.max(timeout, server.longestTimeout || 0);
+
+ return clockSetTimeout.apply(this, arguments);
+ };
+
+ this.clock.setInterval = function (fn, timeout) {
+ server.longestTimeout = Math.max(timeout, server.longestTimeout || 0);
+
+ return clockSetInterval.apply(this, arguments);
+ };
+ }
+ }
+
+ return sinon.fakeServer.addRequest.call(this, xhr);
+ };
+
+ sinon.fakeServerWithClock.respond = function respond() {
+ var returnVal = sinon.fakeServer.respond.apply(this, arguments);
+
+ if (this.clock) {
+ this.clock.tick(this.longestTimeout || 0);
+ this.longestTimeout = 0;
+
+ if (this.resetClock) {
+ this.clock.restore();
+ this.resetClock = false;
+ }
+ }
+
+ return returnVal;
+ };
+
+ sinon.fakeServerWithClock.restore = function restore() {
+ if (this.clock) {
+ this.clock.restore();
+ }
+
+ return sinon.fakeServer.restore.apply(this, arguments);
+ };
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require) {
+ var sinon = require("./core");
+ require("./fake_server");
+ require("./fake_timers");
+ makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require);
+ } else {
+ makeApi(sinon);
+ }
+}());
+
+/**
+ * @depend util/core.js
+ * @depend extend.js
+ * @depend collection.js
+ * @depend util/fake_timers.js
+ * @depend util/fake_server_with_clock.js
+ */
+/**
+ * Manages fake collections as well as fake utilities such as Sinon's
+ * timers and fake XHR implementation in one convenient object.
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function () {
+ function makeApi(sinon) {
+ var push = [].push;
+
+ function exposeValue(sandbox, config, key, value) {
+ if (!value) {
+ return;
+ }
+
+ if (config.injectInto && !(key in config.injectInto)) {
+ config.injectInto[key] = value;
+ sandbox.injectedKeys.push(key);
+ } else {
+ push.call(sandbox.args, value);
+ }
+ }
+
+ function prepareSandboxFromConfig(config) {
+ var sandbox = sinon.create(sinon.sandbox);
+
+ if (config.useFakeServer) {
+ if (typeof config.useFakeServer == "object") {
+ sandbox.serverPrototype = config.useFakeServer;
+ }
+
+ sandbox.useFakeServer();
+ }
+
+ if (config.useFakeTimers) {
+ if (typeof config.useFakeTimers == "object") {
+ sandbox.useFakeTimers.apply(sandbox, config.useFakeTimers);
+ } else {
+ sandbox.useFakeTimers();
+ }
+ }
+
+ return sandbox;
+ }
+
+ sinon.sandbox = sinon.extend(sinon.create(sinon.collection), {
+ useFakeTimers: function useFakeTimers() {
+ this.clock = sinon.useFakeTimers.apply(sinon, arguments);
+
+ return this.add(this.clock);
+ },
+
+ serverPrototype: sinon.fakeServer,
+
+ useFakeServer: function useFakeServer() {
+ var proto = this.serverPrototype || sinon.fakeServer;
+
+ if (!proto || !proto.create) {
+ return null;
+ }
+
+ this.server = proto.create();
+ return this.add(this.server);
+ },
+
+ inject: function (obj) {
+ sinon.collection.inject.call(this, obj);
+
+ if (this.clock) {
+ obj.clock = this.clock;
+ }
+
+ if (this.server) {
+ obj.server = this.server;
+ obj.requests = this.server.requests;
+ }
+
+ obj.match = sinon.match;
+
+ return obj;
+ },
+
+ restore: function () {
+ sinon.collection.restore.apply(this, arguments);
+ this.restoreContext();
+ },
+
+ restoreContext: function () {
+ if (this.injectedKeys) {
+ for (var i = 0, j = this.injectedKeys.length; i < j; i++) {
+ delete this.injectInto[this.injectedKeys[i]];
+ }
+ this.injectedKeys = [];
+ }
+ },
+
+ create: function (config) {
+ if (!config) {
+ return sinon.create(sinon.sandbox);
+ }
+
+ var sandbox = prepareSandboxFromConfig(config);
+ sandbox.args = sandbox.args || [];
+ sandbox.injectedKeys = [];
+ sandbox.injectInto = config.injectInto;
+ var prop, value, exposed = sandbox.inject({});
+
+ if (config.properties) {
+ for (var i = 0, l = config.properties.length; i < l; i++) {
+ prop = config.properties[i];
+ value = exposed[prop] || prop == "sandbox" && sandbox;
+ exposeValue(sandbox, config, prop, value);
+ }
+ } else {
+ exposeValue(sandbox, config, "sandbox", value);
+ }
+
+ return sandbox;
+ },
+
+ match: sinon.match
+ });
+
+ sinon.sandbox.useFakeXMLHttpRequest = sinon.sandbox.useFakeServer;
+
+ return sinon.sandbox;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./util/fake_server");
+ require("./util/fake_timers");
+ require("./collection");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}());
+
+/**
+ * @depend util/core.js
+ * @depend stub.js
+ * @depend mock.js
+ * @depend sandbox.js
+ */
+/**
+ * Test function, sandboxes fakes
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon) {
+ function makeApi(sinon) {
+ function test(callback) {
+ var type = typeof callback;
+
+ if (type != "function") {
+ throw new TypeError("sinon.test needs to wrap a test function, got " + type);
+ }
+
+ function sinonSandboxedTest() {
+ var config = sinon.getConfig(sinon.config);
+ config.injectInto = config.injectIntoThis && this || config.injectInto;
+ var sandbox = sinon.sandbox.create(config);
+ var exception, result;
+ var doneIsWrapped = false;
+ var argumentsCopy = Array.prototype.slice.call(arguments);
+ if (argumentsCopy.length > 0 && typeof argumentsCopy[arguments.length - 1] == "function") {
+ var oldDone = argumentsCopy[arguments.length - 1];
+ argumentsCopy[arguments.length - 1] = function done(result) {
+ if (result) {
+ sandbox.restore();
+ throw exception;
+ } else {
+ sandbox.verifyAndRestore();
+ }
+ oldDone(result);
+ }
+ doneIsWrapped = true;
+ }
+
+ var args = argumentsCopy.concat(sandbox.args);
+
+ try {
+ result = callback.apply(this, args);
+ } catch (e) {
+ exception = e;
+ }
+
+ if (!doneIsWrapped) {
+ if (typeof exception !== "undefined") {
+ sandbox.restore();
+ throw exception;
+ } else {
+ sandbox.verifyAndRestore();
+ }
+ }
+
+ return result;
+ };
+
+ if (callback.length) {
+ return function sinonAsyncSandboxedTest(callback) {
+ return sinonSandboxedTest.apply(this, arguments);
+ };
+ }
+
+ return sinonSandboxedTest;
+ }
+
+ test.config = {
+ injectIntoThis: true,
+ injectInto: null,
+ properties: ["spy", "stub", "mock", "clock", "server", "requests"],
+ useFakeTimers: true,
+ useFakeServer: true
+ };
+
+ sinon.test = test;
+ return test;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./sandbox");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend util/core.js
+ * @depend test.js
+ */
+/**
+ * Test case, sandboxes all test functions
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon) {
+ function createTest(property, setUp, tearDown) {
+ return function () {
+ if (setUp) {
+ setUp.apply(this, arguments);
+ }
+
+ var exception, result;
+
+ try {
+ result = property.apply(this, arguments);
+ } catch (e) {
+ exception = e;
+ }
+
+ if (tearDown) {
+ tearDown.apply(this, arguments);
+ }
+
+ if (exception) {
+ throw exception;
+ }
+
+ return result;
+ };
+ }
+
+ function makeApi(sinon) {
+ function testCase(tests, prefix) {
+ /*jsl:ignore*/
+ if (!tests || typeof tests != "object") {
+ throw new TypeError("sinon.testCase needs an object with test functions");
+ }
+ /*jsl:end*/
+
+ prefix = prefix || "test";
+ var rPrefix = new RegExp("^" + prefix);
+ var methods = {}, testName, property, method;
+ var setUp = tests.setUp;
+ var tearDown = tests.tearDown;
+
+ for (testName in tests) {
+ if (tests.hasOwnProperty(testName)) {
+ property = tests[testName];
+
+ if (/^(setUp|tearDown)$/.test(testName)) {
+ continue;
+ }
+
+ if (typeof property == "function" && rPrefix.test(testName)) {
+ method = property;
+
+ if (setUp || tearDown) {
+ method = createTest(property, setUp, tearDown);
+ }
+
+ methods[testName] = sinon.test(method);
+ } else {
+ methods[testName] = tests[testName];
+ }
+ }
+ }
+
+ return methods;
+ }
+
+ sinon.testCase = testCase;
+ return testCase;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./test");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+}(typeof sinon == "object" && sinon || null));
+
+/**
+ * @depend times_in_words.js
+ * @depend util/core.js
+ * @depend stub.js
+ * @depend format.js
+ */
+/**
+ * Assertions matching the test spy retrieval interface.
+ *
+ * @author Christian Johansen (christian@cjohansen.no)
+ * @license BSD
+ *
+ * Copyright (c) 2010-2013 Christian Johansen
+ */
+
+(function (sinon, global) {
+ var slice = Array.prototype.slice;
+
+ function makeApi(sinon) {
+ var assert;
+
+ function verifyIsStub() {
+ var method;
+
+ for (var i = 0, l = arguments.length; i < l; ++i) {
+ method = arguments[i];
+
+ if (!method) {
+ assert.fail("fake is not a spy");
+ }
+
+ if (method.proxy) {
+ verifyIsStub(method.proxy);
+ } else {
+ if (typeof method != "function") {
+ assert.fail(method + " is not a function");
+ }
+
+ if (typeof method.getCall != "function") {
+ assert.fail(method + " is not stubbed");
+ }
+ }
+
+ }
+ }
+
+ function failAssertion(object, msg) {
+ object = object || global;
+ var failMethod = object.fail || assert.fail;
+ failMethod.call(object, msg);
+ }
+
+ function mirrorPropAsAssertion(name, method, message) {
+ if (arguments.length == 2) {
+ message = method;
+ method = name;
+ }
+
+ assert[name] = function (fake) {
+ verifyIsStub(fake);
+
+ var args = slice.call(arguments, 1);
+ var failed = false;
+
+ if (typeof method == "function") {
+ failed = !method(fake);
+ } else {
+ failed = typeof fake[method] == "function" ?
+ !fake[method].apply(fake, args) : !fake[method];
+ }
+
+ if (failed) {
+ failAssertion(this, (fake.printf || fake.proxy.printf).apply(fake, [message].concat(args)));
+ } else {
+ assert.pass(name);
+ }
+ };
+ }
+
+ function exposedName(prefix, prop) {
+ return !prefix || /^fail/.test(prop) ? prop :
+ prefix + prop.slice(0, 1).toUpperCase() + prop.slice(1);
+ }
+
+ assert = {
+ failException: "AssertError",
+
+ fail: function fail(message) {
+ var error = new Error(message);
+ error.name = this.failException || assert.failException;
+
+ throw error;
+ },
+
+ pass: function pass(assertion) {},
+
+ callOrder: function assertCallOrder() {
+ verifyIsStub.apply(null, arguments);
+ var expected = "", actual = "";
+
+ if (!sinon.calledInOrder(arguments)) {
+ try {
+ expected = [].join.call(arguments, ", ");
+ var calls = slice.call(arguments);
+ var i = calls.length;
+ while (i) {
+ if (!calls[--i].called) {
+ calls.splice(i, 1);
+ }
+ }
+ actual = sinon.orderByFirstCall(calls).join(", ");
+ } catch (e) {
+ // If this fails, we'll just fall back to the blank string
+ }
+
+ failAssertion(this, "expected " + expected + " to be " +
+ "called in order but were called as " + actual);
+ } else {
+ assert.pass("callOrder");
+ }
+ },
+
+ callCount: function assertCallCount(method, count) {
+ verifyIsStub(method);
+
+ if (method.callCount != count) {
+ var msg = "expected %n to be called " + sinon.timesInWords(count) +
+ " but was called %c%C";
+ failAssertion(this, method.printf(msg));
+ } else {
+ assert.pass("callCount");
+ }
+ },
+
+ expose: function expose(target, options) {
+ if (!target) {
+ throw new TypeError("target is null or undefined");
+ }
+
+ var o = options || {};
+ var prefix = typeof o.prefix == "undefined" && "assert" || o.prefix;
+ var includeFail = typeof o.includeFail == "undefined" || !!o.includeFail;
+
+ for (var method in this) {
+ if (method != "expose" && (includeFail || !/^(fail)/.test(method))) {
+ target[exposedName(prefix, method)] = this[method];
+ }
+ }
+
+ return target;
+ },
+
+ match: function match(actual, expectation) {
+ var matcher = sinon.match(expectation);
+ if (matcher.test(actual)) {
+ assert.pass("match");
+ } else {
+ var formatted = [
+ "expected value to match",
+ " expected = " + sinon.format(expectation),
+ " actual = " + sinon.format(actual)
+ ]
+ failAssertion(this, formatted.join("\n"));
+ }
+ }
+ };
+
+ mirrorPropAsAssertion("called", "expected %n to have been called at least once but was never called");
+ mirrorPropAsAssertion("notCalled", function (spy) { return !spy.called; },
+ "expected %n to not have been called but was called %c%C");
+ mirrorPropAsAssertion("calledOnce", "expected %n to be called once but was called %c%C");
+ mirrorPropAsAssertion("calledTwice", "expected %n to be called twice but was called %c%C");
+ mirrorPropAsAssertion("calledThrice", "expected %n to be called thrice but was called %c%C");
+ mirrorPropAsAssertion("calledOn", "expected %n to be called with %1 as this but was called with %t");
+ mirrorPropAsAssertion("alwaysCalledOn", "expected %n to always be called with %1 as this but was called with %t");
+ mirrorPropAsAssertion("calledWithNew", "expected %n to be called with new");
+ mirrorPropAsAssertion("alwaysCalledWithNew", "expected %n to always be called with new");
+ mirrorPropAsAssertion("calledWith", "expected %n to be called with arguments %*%C");
+ mirrorPropAsAssertion("calledWithMatch", "expected %n to be called with match %*%C");
+ mirrorPropAsAssertion("alwaysCalledWith", "expected %n to always be called with arguments %*%C");
+ mirrorPropAsAssertion("alwaysCalledWithMatch", "expected %n to always be called with match %*%C");
+ mirrorPropAsAssertion("calledWithExactly", "expected %n to be called with exact arguments %*%C");
+ mirrorPropAsAssertion("alwaysCalledWithExactly", "expected %n to always be called with exact arguments %*%C");
+ mirrorPropAsAssertion("neverCalledWith", "expected %n to never be called with arguments %*%C");
+ mirrorPropAsAssertion("neverCalledWithMatch", "expected %n to never be called with match %*%C");
+ mirrorPropAsAssertion("threw", "%n did not throw exception%C");
+ mirrorPropAsAssertion("alwaysThrew", "%n did not always throw exception%C");
+
+ sinon.assert = assert;
+ return assert;
+ }
+
+ var isNode = typeof module !== "undefined" && module.exports && typeof require == "function";
+ var isAMD = typeof define === "function" && typeof define.amd === "object" && define.amd;
+
+ function loadDependencies(require, exports, module) {
+ var sinon = require("./util/core");
+ require("./match");
+ module.exports = makeApi(sinon);
+ }
+
+ if (isAMD) {
+ define(loadDependencies);
+ } else if (isNode) {
+ loadDependencies(require, module.exports, module);
+ } else if (!sinon) {
+ return;
+ } else {
+ makeApi(sinon);
+ }
+
+}(typeof sinon == "object" && sinon || null, typeof window != "undefined" ? window : (typeof self != "undefined") ? self : global));
+
+ return sinon;
+}));
--- /dev/null
+// uaparser by lindsey simon,
+// ported to node by tobie
+// https://github.com/tobie/ua-parser/
+
+// browserized by paul irish
+
+(function(exports){
+
+ exports.uaparse = parse;
+
+ function parse(ua) {
+ for (var i=0; i < parsers.length; i++) {
+ var result = parsers[i](ua);
+ if (result) { return result; }
+ }
+ return new UserAgent();
+ }
+
+ function UserAgent(family) {
+ this.family = family || 'Other';
+ }
+
+ UserAgent.prototype.toVersionString = function() {
+ var output = '';
+ if (this.major != null) {
+ output += this.major;
+ if (this.minor != null) {
+ output += '.' + this.minor;
+ if (this.patch != null) {
+ output += '.' + this.patch;
+ }
+ }
+ }
+ return output;
+ };
+
+ UserAgent.prototype.toString = function() {
+ var suffix = this.toVersionString();
+ if (suffix) { suffix = ' ' + suffix; }
+ return this.family + suffix;
+ };
+
+
+ var regexes = [
+ {"pattern":"^(Opera)/(\\d+)\\.(\\d+) \\(Nintendo Wii",
+ "v1_replacement":null,
+ "family_replacement":"Wii"},
+ {"pattern":"(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?)",
+ "v1_replacement":null,
+ "family_replacement":"Firefox ($1)"},
+ {"pattern":"(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?",
+ "v1_replacement":null,
+ "family_replacement":"Firefox ($1)"},
+ {"pattern":"(SeaMonkey|Fennec|Camino)/(\\d+)\\.(\\d+)([ab]?\\d+[a-z]*)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Flock)/(\\d+)\\.(\\d+)(b\\d+?)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Fennec)/(\\d+)\\.(\\d+)(pre)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Navigator)/(\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Netscape"},
+ {"pattern":"(Navigator)/(\\d+)\\.(\\d+)([ab]\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Netscape"},
+ {"pattern":"(Netscape6)/(\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Netscape"},
+ {"pattern":"(MyIBrow)/(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"My Internet Browser"},
+ {"pattern":"(Firefox).*Tablet browser (\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"MicroB"},
+ {"pattern":"(Opera)/9.80.*Version\\/(\\d+)\\.(\\d+)(?:\\.(\\d+))?",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?) \\(Swiftfox\\)",
+ "v1_replacement":null,
+ "family_replacement":"Swiftfox"},
+ {"pattern":"(Firefox)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)? \\(Swiftfox\\)",
+ "v1_replacement":null,
+ "family_replacement":"Swiftfox"},
+ {"pattern":"(konqueror)/(\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Konqueror"},
+ {"pattern":"(Edge)/(\\d+)\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"IE"},
+ {"pattern":"(Jasmine|ANTGalio|Midori|Fresco|Lobo|Maxthon|Lynx|OmniWeb|Dillo|Camino|Demeter|Fluid|Fennec|Shiira|Sunrise|Chrome|Flock|Netscape|Lunascape|Epiphany|WebPilot|Vodafone|NetFront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|Opera Mini|iCab|NetNewsWire|Iron|Iris)/(\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Bolt|Jasmine|Maxthon|Lynx|Arora|IBrowse|Dillo|Camino|Shiira|Fennec|Phoenix|Chrome|Flock|Netscape|Lunascape|Epiphany|WebPilot|Opera Mini|Opera|Vodafone|NetFront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|iCab|NetNewsWire|Iron|Space Bison|Stainless|Orca)/(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(iRider|Crazy Browser|SkipStone|iCab|Lunascape|Sleipnir|Maemo Browser) (\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(iCab|Lunascape|Opera|Android) (\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(IEMobile) (\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"IE Mobile"},
+ {"pattern":"(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Firefox)/(\\d+)\\.(\\d+)(pre|[ab]\\d+[a-z]*)?",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Obigo|OBIGO)[^\\d]*(\\d+)(?:.(\\d+))?",
+ "v1_replacement":null,
+ "family_replacement":"Obigo"},
+ {"pattern":"(MAXTHON|Maxthon) (\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Maxthon"},
+ {"pattern":"(Maxthon|MyIE2|Uzbl|Shiira)",
+ "v1_replacement":"0",
+ "family_replacement":null},
+ {"pattern":"(PLAYSTATION) (\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"PlayStation"},
+ {"pattern":"(PlayStation Portable)[^\\d]+(\\d+).(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(BrowseX) \\((\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Opera)/(\\d+)\\.(\\d+).*Opera Mobi",
+ "v1_replacement":null,
+ "family_replacement":"Opera Mobile"},
+ {"pattern":"(POLARIS)/(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Polaris"},
+ {"pattern":"(BonEcho)/(\\d+)\\.(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Bon Echo"},
+ {"pattern":"(iPhone) OS (\\d+)_(\\d+)(?:_(\\d+))?",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Avant)",
+ "v1_replacement":"1",
+ "family_replacement":null},
+ {"pattern":"(Nokia)[EN]?(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Black[bB]erry)(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Blackberry"},
+ {"pattern":"(OmniWeb)/v(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Blazer)/(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Palm Blazer"},
+ {"pattern":"(Pre)/(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"Palm Pre"},
+ {"pattern":"(Links) \\((\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(QtWeb) Internet Browser/(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(Version)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*Safari/",
+ "v1_replacement":null,
+ "family_replacement":"Safari"},
+ {"pattern":"(OLPC)/Update(\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"(OLPC)/Update()\\.(\\d+)",
+ "v1_replacement":"0",
+ "family_replacement":null},
+ {"pattern":"(SamsungSGHi560)",
+ "v1_replacement":null,
+ "family_replacement":"Samsung SGHi560"},
+ {"pattern":"^(SonyEricssonK800i)",
+ "v1_replacement":null,
+ "family_replacement":"Sony Ericsson K800i"},
+ {"pattern":"(Teleca Q7)",
+ "v1_replacement":null,
+ "family_replacement":null},
+ {"pattern":"Trident(.*)rv.(\\d+)\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"IE"},
+ {"pattern":"(MSIE) (\\d+)\\.(\\d+)",
+ "v1_replacement":null,
+ "family_replacement":"IE"}
+
+ ];
+
+ var parsers = _.map(regexes, function(obj) {
+ var regexp = new RegExp(obj.pattern),
+ famRep = obj.family_replacement,
+ v1Rep = obj.v1_replacement;
+
+ function parser(ua) {
+ var m = ua.match(regexp);
+
+ if (!m) { return null; }
+
+ var familly = famRep ? famRep.replace('$1', m[1]) : m[1];
+
+ var obj = new UserAgent(familly);
+ obj.major = parseInt(v1Rep ? v1Rep : m[2]);
+ obj.minor = m[3] ? parseInt(m[3]) : null;
+ obj.patch = m[4] ? parseInt(m[4]) : null;
+
+ return obj;
+ }
+
+ return parser;
+ });
+
+
+})(window);
+
+
--- /dev/null
+define([], function() {
+ return function() {
+ return '?--dontmin';
+ }
+});
--- /dev/null
+define([], [
+ {
+ 'name': 'Box Sizing',
+ 'property': 'boxsizing',
+ 'caniuse': 'css3-boxsizing',
+ 'polyfills': [],
+ 'tags': [],
+ 'builderAliases': [ ],
+ 'notes': [{
+ 'name': 'MDN Docs',
+ 'href': 'http://developer.mozilla.org/en/CSS/box-sizing'
+ }],
+ 'doc': '<p>Detects support for the ability to control the css box model</p>\n',
+ 'deps': [
+ 'testAllProps'
+ ],
+ 'path': './feature-detects/css/boxsizing.js',
+ 'amdPath': 'test/css/boxsizing',
+ 'async': false,
+ 'warnings': [],
+ 'cssclass': 'boxsizing',
+ 'authors': [],
+ 'knownBugs': []
+ }, {
+ 'name': 'createElement with Attributes',
+ 'property': [
+ 'createelementattrs',
+ 'createelement-attrs'
+ ],
+ 'tags': [
+ 'dom'
+ ],
+ 'builderAliases': [
+ 'dom_createElement_attrs'
+ ],
+ 'authors': [
+ 'James A. Rosen'
+ ],
+ 'notes': [
+ {
+ 'name': 'Related Github Issue',
+ 'href': 'https://github.com/Modernizr/Modernizr/issues/258'
+ }
+ ],
+ 'doc': null,
+ 'deps': [
+ 'createElement'
+ ],
+ 'path': './feature-detects/dom/createElement-attrs.js',
+ 'amdPath': 'test/dom/createElement-attrs',
+ 'polyfills': [],
+ 'async': false,
+ 'warnings': [],
+ 'caniuse': null,
+ 'cssclass': [
+ 'createelementattrs',
+ 'createelement-attrs'
+ ],
+ 'knownBugs': []
+ }
+])
--- /dev/null
+var root = require('find-parent-dir').sync(__dirname, 'package.json');
+var build = require(root + 'lib/build');
+var expect = require('expect.js');
+
+describe('cli/build', function() {
+
+ it('should build without error', function() {
+ expect(function() {build();}).to.not.throwError();
+ });
+
+ describe('custom builds', function(done) {
+
+ it('should build without errors when using a custom build', function() {
+ expect(function() {
+ build({'feature-detects': ['css/boxsizing']}, done);
+ }).to.not.throwError();
+ });
+
+ it('should include the requested options', function(done) {
+ build({'feature-detects': ['css/boxsizing']}, function(file) {
+ expect(file).to.contain('boxsizing');
+ done();
+ });
+ });
+
+ it('should exclude options that are not requested', function(done) {
+ build({'feature-detects': ['dom/classlist']}, function(file) {
+ expect(file).to.contain('classlist');
+ expect(file).to.not.contain('boxsizing');
+ done();
+ });
+ });
+
+ it('should strip out DOC comments when `uglify`ing', function(done) {
+ var config = {
+ minify: true,
+ 'feature-detects': ['css/boxsizing']
+ };
+
+ build(config, function(file) {
+ expect(file).to.not.contain('Box Sizing');
+ done();
+ });
+ });
+
+ it('should inject the proper classPath when configured', function(done) {
+ var prefix = 'TEST_PREFIX';
+ var config = {
+ classPrefix: prefix,
+ setClasses: true
+ };
+ var configRE = /_config:\s*?({[^}]*})/m;
+
+ build(config, function(file) {
+ var parsedConfig = file.match(configRE);
+ parsedConfig = JSON.parse(parsedConfig[1].replace(/'/g, '"'));
+ expect(parsedConfig.classPrefix).to.be(prefix);
+ done();
+ });
+ });
+
+ it('should inject the proper classPath when configured and minified', function(done) {
+ var prefix = 'TEST_PREFIX';
+ var config = {
+ classPrefix: prefix,
+ setClasses: true,
+ minify: true
+ };
+ var configRE = /_config:\s*?({[^}]*})/m;
+
+ build(config, function(file) {
+ var parsedConfig = file.match(configRE);
+ //use eval becuase the minified code creates non valid JSON.
+ parsedConfig = eval('(' + parsedConfig[1].replace(/'/g, '"') + ')');
+ expect(parsedConfig.classPrefix).to.be(prefix);
+ done();
+ });
+ });
+
+ describe('unminified', function() {
+ var output;
+
+ before(function(done) {
+ var config = {
+ 'feature-detects': ['css/boxsizing']
+ };
+
+ build(config, function(file) {
+ output = file;
+ done();
+ });
+ });
+
+ it('strips out the modernizr-init/build `define` section', function() {
+ var defineRe = /define\("modernizr-(init|build)"\)/m;
+ expect(defineRe.test(output)).to.be(false);
+ });
+
+ it('strips out the `define` section', function() {
+ var docRe = /define\(.*?\{/;
+ expect(docRe.test(output)).to.be(false);
+ });
+
+ it('strips out the `require` section', function() {
+ var requireRe = /require[^\{\r\n]+\{/;
+ expect(requireRe.test(output)).to.be(false);
+ });
+
+ it('replaces __VERSION__ ', function() {
+ expect(output).to.not.contain('__VERSION__');
+ });
+
+ });
+
+ describe('minified', function() {
+ var output;
+
+ before(function(done) {
+ var config = {
+ 'feature-detects': ['css/boxsizing'],
+ minify: true
+ };
+
+ build(config, function(file) {
+ output = file;
+ done();
+ });
+ });
+
+ it('strips out the modernizr-init/build `define` section', function() {
+ var defineRe = /define\("modernizr-(init|build)"\)/m;
+ expect(defineRe.test(output)).to.be(false);
+ });
+
+ it('strips out the `define` section', function() {
+ var docRe = /define\(.*?\{/;
+ expect(docRe.test(output)).to.be(false);
+ });
+
+ it('strips out the `require` section', function() {
+ var requireRe = /require[^\{\r\n]+\{/;
+ expect(requireRe.test(output)).to.be(false);
+ });
+
+ it('replaces __VERSION__ ', function() {
+ expect(output).to.not.contain('__VERSION__');
+ });
+
+ });
+
+ });
+
+});
--- /dev/null
+var root = require('find-parent-dir').sync(__dirname, 'package.json');
+var expect = require('expect.js');
+var Modernizr = require(root + 'lib/cli');
+
+
+describe('cli', function() {
+
+ it('exposes a build function', function() {
+ expect(Modernizr.build).to.be.a('function');
+ });
+
+ it('exposes a metadata function', function() {
+ expect(Modernizr.metadata).to.be.a('function');
+ });
+
+});
--- /dev/null
+var root = require('find-parent-dir').sync(__dirname, 'package.json');
+var proxyquire = require('proxyquire').noPreserveCache();
+var metadata = require(root + 'lib/metadata');
+var expect = require('expect.js');
+var Joi = require('joi');
+
+describe('cli/metadata', function() {
+
+ it('should ignore .DS_STORE files', function(done) {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'file': {
+ 'walkSync': function(dir, cb) {
+ cb('/', [], ['.DS_Store']);
+ }
+ }
+ });
+
+ metadata(function(data) {
+ expect(data).to.be.an('array');
+ expect(data).to.have.length(0);
+ done();
+ });
+ });
+
+ it('should throw on malformed metadata', function() {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'fs': {
+ 'readFileSync': function() {
+ return '/*! { !*/';
+ }
+ }
+ });
+
+ expect(metadata).to.throwException(/Error Parsing Metadata/);
+ });
+
+ it('should not throw when metadata is missing', function() {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'fs': {
+ 'readFileSync': function() {
+ return 'sup dude';
+ }
+ }
+ });
+
+ expect(metadata).to.not.throwException(/Error Parsing Metadata/);
+ });
+
+ it('should throw on malformed deps', function() {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'fs': {
+ 'readFileSync': function() {
+ return 'define([[],';
+ }
+ }
+ });
+
+ expect(metadata).to.throwException(/Couldn't parse dependencies/);
+ });
+
+ it('should throw if we can\'t find the define', function() {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'fs': {
+ 'readFileSync': function() {
+ return 'defin([]),';
+ }
+ }
+ });
+
+ expect(metadata).to.throwException(/Couldn't find the define/);
+ });
+
+ it('should use amdPath as a fallback for name', function() {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'file': {
+ 'walkSync': function(dir, cb) {
+ cb('/', [], ['fakeDetect.js']);
+ }
+ },
+ 'fs': {
+ 'readFileSync': function() {
+ return '/*! { "property": "fake"}!*/ define([],';
+ }
+ }
+ });
+ var result = metadata();
+
+ expect(result.name).to.equal(result.amdPath);
+ });
+
+ it('should throw if we can\'t find the define', function() {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'fs': {
+ 'readFileSync': function() {
+ return '/*! { "polyfills": ["fake"]}!*/ define([],';
+ }
+ }
+ });
+
+ expect(metadata).to.throwException(/Polyfill not found/);
+ });
+
+ it('should throw if we can\'t find the define', function() {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'fs': {
+ 'readFileSync': function() {
+ return '/*! { "property": "fake", "cssclass": "realFake"}!*/ define([],';
+ }
+ }
+ });
+
+ var firstResult = metadata()[0];
+
+ expect(firstResult.cssclass).to.be(null);
+ });
+
+ it('should rename `docs` to `doc` when found', function() {
+
+ var metadata = proxyquire(root + 'lib/metadata', {
+ 'fs': {
+ 'readFileSync': function() {
+ return '/*! { "docs": "originally docs" }!*/ define([],';
+ }
+ }
+ });
+
+ var firstResult = metadata()[0];
+
+ expect(firstResult.docs).to.be(undefined);
+ expect(firstResult.doc).to.match(/originally docs/);
+ });
+
+ it('returns a json blob when invoked without callback', function() {
+ expect(metadata()).to.be.an('array');
+ });
+
+ it('return nothing when given a callback', function() {
+ expect(metadata(function noop() {})).to.be(undefined);
+ });
+
+ it('pass the json blob when given a callback', function(done) {
+ metadata(function(data) {
+ expect(data).to.be.an('array');
+ done();
+ });
+ });
+
+ describe('returns an array of valid objects', function() {
+ var schema = Joi.object().keys({
+ amdPath : Joi.string().required(),
+ name : Joi.string().required(),
+ path : Joi.string().required(),
+ doc : Joi.alternatives().try(Joi.string(), null),
+
+ caniuse : Joi.alternatives().try(Joi.string(), null),
+
+ async : Joi.boolean(),
+
+ aliases : Joi.array().items(Joi.string()),
+ builderAliases : Joi.array().items(Joi.string()),
+ knownBugs : Joi.array().items(Joi.string()),
+ warnings : Joi.array().items(Joi.string()),
+ authors : Joi.array().items(Joi.string()),
+ tags : Joi.array().items(Joi.string()),
+ deps : Joi.array().items(Joi.string()),
+
+ notes : Joi.array().items(
+ Joi.object().keys({
+ name: Joi.string().required(),
+ href: Joi.string().required()
+ })
+ ).unique(),
+
+ cssclass : Joi.alternatives().try(
+ Joi.string().lowercase(),
+ Joi.array().items(Joi.string().lowercase())
+ ).required(),
+
+ property : Joi.alternatives().try(
+ Joi.string().lowercase(),
+ Joi.array().items(Joi.string().lowercase())
+ ).required(),
+
+ polyfills : Joi.array().items(
+ Joi.object().keys({
+ name : Joi.string().required(),
+ authors : Joi.array().items(Joi.string()),
+ notes : Joi.array().items(Joi.string()),
+ href : Joi.string().required(),
+ licenses : Joi.array().items(Joi.string()).required()
+ })
+ ).unique()
+ });
+
+ metadata(function(data) {
+ data.forEach(function(obj) {
+ var err = schema.validate(obj).error;
+ it('for ' + obj.name, function() {
+ expect(err).to.be(null);
+ });
+ });
+ });
+ });
+});
--- /dev/null
+var root = require('find-parent-dir').sync(__dirname, 'package.json');
+var options = require(root + 'lib/options');
+var expect = require('expect.js');
+var Joi = require('joi');
+
+var schema = Joi.array().items(
+ Joi.object().keys({
+ name: Joi.string(),
+ property: Joi.string()
+ })
+);
+
+
+describe('cli/options', function() {
+ this.timeout(20000);
+
+ it('should return an array of objects in a callback', function(done) {
+ options(function(opts) {
+ var err = schema.validate(opts).error;
+ expect(err).to.be(null);
+ done(err);
+ });
+ });
+
+ it('should return the array of objects immediately after the first run', function() {
+ var err = schema.validate(options()).error;
+ expect(err).to.be(null);
+ });
+
+ it('should return all jsdoc info when the second arg is true', function() {
+ expect(options(null, true) !== options(null)).to.be(true);
+ expect(options(null, true)[0].description).to.not.be(undefined);
+ });
+});
--- /dev/null
+if (typeof define !== 'function') {
+ var projectRoot = require('find-parent-dir').sync(__dirname, 'package.json');
+ var filesRoot = projectRoot;
+ if (process.env.APP_DIR_FOR_CODE_COVERAGE) {
+ filesRoot = filesRoot + process.env.APP_DIR_FOR_CODE_COVERAGE;
+ }
+ var requirejs = require('requirejs');
+ var expect = require('expect.js');
+} else {
+ var projectRoot = '..';
+ var filesRoot = '..';
+}
+var cleanup;
+var req;
+
+
+describe('build-query', function() {
+ var buildQuery;
+
+ before(function(done) {
+
+ req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ paths: {
+ lib: filesRoot + '/lib',
+ lodash: projectRoot + '/node_modules/lodash/index',
+ metadata: projectRoot + '/test/mocks/lib/metadata',
+ cleanup: projectRoot + '/test/cleanup'
+ }
+ });
+
+ req(['lib/build-query', 'cleanup'], function(_buildQuery, _cleanup) {
+ buildQuery = _buildQuery;
+ cleanup = _cleanup;
+ done();
+ });
+ });
+
+ it('builds a query from a feature-detect', function() {
+ var query = buildQuery({
+ 'feature-detects': ['css/boxsizing']
+ });
+ expect(query).to.be('?-boxsizing-dontmin');
+ });
+
+ it('properly formats detects with multiple properties', function() {
+ var query = buildQuery({
+ 'feature-detects': ['dom/createElement-attrs']
+ });
+ expect(query).to.be('?-createelementattrs_createelement_attrs-dontmin');
+ });
+
+ it('adds options to the query', function() {
+ var query = buildQuery({
+ options: ['mq']
+ });
+ expect(query).to.be('?-mq-dontmin');
+ });
+
+ it('adds classPrefix when setClasses is true as well', function() {
+ var query = buildQuery({
+ classPrefix: 'TEST_PREFIX',
+ options: ['setClasses']
+ });
+ expect(query).to.be('?-cssclasses-dontmin-cssclassprefix:TEST_PREFIX');
+ });
+
+ it('strips `html5` from the shiv options', function() {
+ var query = buildQuery({
+ options: ['html5shiv']
+ });
+ expect(query).to.be('?-shiv-dontmin');
+ });
+
+ it('removes the dontmin option when minify is true', function() {
+ var query = buildQuery({
+ minify: true
+ });
+ expect(query).to.be('?-');
+ });
+
+ after(function() {
+ cleanup();
+ });
+
+});
--- /dev/null
+if (typeof define !== 'function') {
+ var projectRoot = require('find-parent-dir').sync(__dirname, 'package.json');
+ var filesRoot = projectRoot;
+ if (process.env.APP_DIR_FOR_CODE_COVERAGE) {
+ filesRoot = filesRoot + process.env.APP_DIR_FOR_CODE_COVERAGE;
+ }
+ var requirejs = require('requirejs');
+ var pkg = require(projectRoot + '/package');
+ var expect = require('expect.js');
+ var domain = 'modernizr.com';
+ var _ = require('lodash');
+ var def = function() {
+ return requirejs.define.apply(this, arguments);
+ };
+} else {
+ var domain = location.host;
+ var projectRoot = '..';
+ var filesRoot = '..';
+ var pkg = {};
+ var _ = window.lodash;
+ var def = function() {
+ return define.apply(this, arguments);
+ };
+}
+var generateBanner;
+var cleanup;
+
+describe('generate-banner', function() {
+
+ before(function(done) {
+ var req = requirejs.config({
+ context: Math.random().toString().slice(2),
+ paths: {
+ lib: projectRoot + '/test/mocks/lib',
+ generateBanner: filesRoot + '/lib/generate-banner',
+ cleanup: projectRoot + '/test/cleanup'
+ }
+ });
+
+ def('package', [], function() {return pkg;});
+ def('lodash', [], function() {return _;});
+
+ req(['generateBanner', 'package', 'cleanup'], function(_generateBanner, _pkg, _cleanup) {
+ generateBanner = _generateBanner;
+ cleanup = _cleanup;
+ pkg = _pkg;
+ done();
+ });
+ });
+
+ it('should produce a compact banner when requested', function() {
+ var banner = generateBanner('compact');
+ var test = '/*! ' + pkg.name + ' ' + pkg.version + ' (Custom Build) | ' + pkg.license + ' *';
+ expect(banner).to.contain(test);
+ });
+
+ it('should produce a full banner when requested', function() {
+ var banner = generateBanner('full');
+ var test = 'Modernizr tests which native CSS3 and HTML5 features are available';
+ expect(banner).to.contain(test);
+ });
+
+ it('should include a build url', function() {
+ var banner = generateBanner();
+ var test = ' * http://' + domain + '/download/?--dontmin';
+ expect(banner).to.contain(test);
+ });
+
+ it('should only accept "full" and "compact" as type arguments', function() {
+ expect(function() {generateBanner('sup');}).to.throwError('banners() must be passed "compact" or "full" as an argument.');
+ });
+
+ after(function() {
+ cleanup();
+ });
+});
--- /dev/null
+<?php
+/**
+Template Page for the album overview
+
+Follow variables are useable :
+
+ $album : Contain information about the first album
+ $albums : Contain information about all albums
+ $galleries : Contain all galleries inside this album
+ $pagination : Contain the pagination content
+
+ You can check the content when you insert the tag <?php var_dump($variable) ?>
+ If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
+**/
+?>
+<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($galleries)) : ?>
+
+<div class="ngg-albumoverview">
+
+ <!-- List of galleries -->
+ <?php foreach ($galleries as $gallery) : ?>
+
+ <div class="ngg-glmalbums ngg-album-compact small-6 medium-4 large-3">
+ <div class="ngg-album-compactbox">
+ <div class="ngg-album-link">
+ <a class="Link" href="<?php echo nextgen_esc_url($gallery->pagelink) ?>">
+ <img class="Thumb" alt="<?php echo esc_attr($gallery->title) ?>" src="<?php echo nextgen_esc_url($gallery->previewurl) ?>"/>
+ </a>
+ </div>
+ </div>
+ <?php if (!empty($image_gen_params)) {
+ $max_width = 'style="max-width: ' . ($image_gen_params['width'] + 20) . 'px"';
+ } else {
+ $max_width = '';
+ } ?>
+ <section class="album-meta-wrapper">
+ <h4>
+ <a class="ngg-album-desc"
+ title="<?php echo esc_attr($gallery->title); ?>"
+ href="<?php echo nextgen_esc_url($gallery->pagelink); ?>"
+ <?php echo $max_width; ?>>
+ <?php echo_safe_html($gallery->title); ?>
+ </a>
+ </h4>
+ <p class="ngg-album-gallery-image-counter">
+ <?php if ($gallery->counter > 0) { ?>
+ <strong><?php echo $gallery->counter; ?></strong> <?php _e('Photos', 'nggallery'); ?>
+ <?php } else { ?>
+
+ <?php } ?>
+ </p>
+ </section>
+ </div>
+ <?php endforeach; ?>
+ <!-- Pagination -->
+ <br class="ngg-clear"/>
+ <?php echo $pagination ?>
+</div>
+
+<?php endif; ?>
--- /dev/null
+<?php
+/**
+Template Page for the gallery overview
+
+Follow variables are useable :
+
+ $gallery : Contain all about the gallery
+ $images : Contain all images, path, title
+ $pagination : Contain the pagination content
+
+ You can check the content when you insert the tag <?php var_dump($variable) ?>
+ If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
+**/
+?>
+<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
+
+ <!-- Thumbnails -->
+ <?php $i = 0; ?>
+ <ul class="gallery row small-block-grid-3 medium-block-grid-6 large-block-grid-8">
+ <?php foreach ( $images as $image ) : ?>
+ <li>
+ <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box imgBorderMe" <?php echo $image->style ?> >
+
+ <div class="ngg-gallery-thumbnail" >
+ <a href="<?php echo nextgen_esc_url($image->imageURL) ?>"
+ title="<?php echo esc_attr($image->description) ?>"
+ data-src="<?php echo nextgen_esc_url($image->imageURL) ?>"
+ data-thumbnail="<?php echo nextgen_esc_url($image->thumbnailURL); ?>"
+ data-image-id="<?php echo esc_attr($image->pid); ?>"
+ data-title="<?php echo esc_attr($image->alttext); ?>"
+ data-description="<?php echo esc_attr($image->description); ?>"
+ <?php echo $image->thumbcode ?> >
+ <?php if ( !$image->hidden ) { ?>
+
+ <div class="image_overlay">
+ <img title="<?php echo esc_attr($image->alttext) ?>" alt="<?php echo esc_attr($image->alttext) ?>" src="<?php echo nextgen_esc_url($image->thumbnailURL) ?>" <?php echo $image->size ?> />
+ </div>
+ <span class="photoTitle" title="<?php echo esc_attr($image->alttext) ?>"><?php if (!$image->hidden) { echo esc_attr($image->alttext); }?></span>
+ <?php } ?>
+ </a>
+ </div>
+
+ </div>
+ </li>
+ <?php if ( $image->hidden ) continue; ?>
+ <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
+ <br style="clear: both" />
+ <?php } ?>
+ <?php endforeach; ?>
+ </ul>
+ <!-- Pagination -->
+ <?php echo $pagination ?>
+</ul>
+
+<?php endif; ?>
--- /dev/null
+<?php
+/**
+Template Page for the gallery overview
+
+Follow variables are useable :
+
+ $gallery : Contain all about the gallery
+ $images : Contain all images, path, title
+ $pagination : Contain the pagination content
+
+ You can check the content when you insert the tag <?php var_dump($variable) ?>
+ If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
+**/
+?>
+<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
+
+ <!-- Thumbnails -->
+ <?php $i = 0; ?>
+ <ul class="gallery row small-block-grid-1 medium-block-grid-2 large-block-grid-3">
+ <?php foreach ( $images as $image ) : ?>
+ <li>
+ <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box imgBorderMe" <?php echo $image->style ?> >
+
+ <div class="ngg-gallery-thumbnail" >
+ <a href="<?php echo nextgen_esc_url($image->imageURL) ?>"
+ title="<?php echo esc_attr($image->description) ?>"
+ data-src="<?php echo nextgen_esc_url($image->imageURL) ?>"
+ data-thumbnail="<?php echo nextgen_esc_url($image->thumbnailURL); ?>"
+ data-image-id="<?php echo esc_attr($image->pid); ?>"
+ data-title="<?php echo esc_attr($image->alttext); ?>"
+ data-description="<?php echo esc_attr($image->description); ?>"
+ <?php echo $image->thumbcode ?> >
+ <?php if ( !$image->hidden ) { ?>
+
+ <div class="image_overlay">
+ <img title="<?php echo esc_attr($image->alttext) ?>" alt="<?php echo esc_attr($image->alttext) ?>" src="<?php echo nextgen_esc_url($image->thumbnailURL) ?>" <?php echo $image->size ?> />
+ </div>
+ <span class="photoTitle" title="<?php echo esc_attr($image->alttext) ?>"><?php if (!$image->hidden) { echo esc_attr($image->alttext); }?></span>
+ <?php } ?>
+ </a>
+ </div>
+
+ </div>
+ </li>
+ <?php if ( $image->hidden ) continue; ?>
+ <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
+ <br style="clear: both" />
+ <?php } ?>
+ <?php endforeach; ?>
+ </ul>
+ <!-- Pagination -->
+ <?php echo $pagination ?>
+</ul>
+
+<?php endif; ?>
--- /dev/null
+<?php
+/**
+Template Page for the gallery overview
+
+Follow variables are useable :
+
+ $gallery : Contain all about the gallery
+ $images : Contain all images, path, title
+ $pagination : Contain the pagination content
+
+ You can check the content when you insert the tag <?php var_dump($variable) ?>
+ If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
+**/
+?>
+<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
+
+<div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>">
+ <!-- Thumbnails -->
+ <?php $i = 0; ?>
+ <ul class="gallery row small-block-grid-2 medium-block-grid-3 large-block-grid-4">
+ <?php foreach ( $images as $image ) : ?>
+ <li>
+ <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box imgBorderMe" <?php echo $image->style ?> >
+
+ <div class="ngg-gallery-thumbnail" >
+ <a href="<?php echo nextgen_esc_url($image->imageURL) ?>"
+ title="<?php echo esc_attr($image->description) ?>"
+ data-src="<?php echo nextgen_esc_url($image->imageURL) ?>"
+ data-thumbnail="<?php echo nextgen_esc_url($image->thumbnailURL); ?>"
+ data-image-id="<?php echo esc_attr($image->pid); ?>"
+ data-title="<?php echo esc_attr($image->alttext); ?>"
+ data-description="<?php echo esc_attr($image->description); ?>"
+ <?php echo $image->thumbcode ?> >
+ <?php if ( !$image->hidden ) { ?>
+
+ <div class="image_overlay">
+ <img
+ title="<?php echo esc_attr($image->alttext) ?>"
+ alt="<?php echo esc_attr($image->alttext) ?>"
+ src="<?php echo nextgen_esc_url($image->thumbnailURL) ?>"
+ <?php echo $image->size ?> />
+ </div>
+ <?php
+ $imageTitle = !preg_match(';is\d{2,}-\d{10,}-\d{5,}$;', $image->alttext) ? $image->alttext: '';
+ ?>
+ <span class="photoTitle" title="<?php echo esc_attr($imageTitle) ?>">
+ <?php if (!$image->hidden) { echo esc_attr($imageTitle); }?>
+ </span>
+ <?php } ?>
+ </a>
+ </div>
+
+ </div>
+ </li>
+ <?php if ( $image->hidden ) continue; ?>
+ <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
+ <br style="clear: both" />
+ <?php } ?>
+ <?php endforeach; ?>
+ </ul>
+ <!-- Pagination -->
+ <?php echo $pagination ?>
+</ul>
+</div>
+
+<?php endif; ?>
--- /dev/null
+<?php
+/**
+Template Page for the gallery overview
+
+Follow variables are useable :
+
+ $gallery : Contain all about the gallery
+ $images : Contain all images, path, title
+ $pagination : Contain the pagination content
+
+ You can check the content when you insert the tag <?php var_dump($variable) ?>
+ If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
+**/
+?>
+<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
+
+<ul id='gallery' class='gallery row small-block-grid-2 medium-block-grid-3 large-block-grid-4'>
+<?php if ($gallery->show_slideshow) { ?>
+ <!-- Slideshow link -->
+ <div class="slideshowlink">
+ <a class="slideshowlink" href="<?php echo nextgen_esc_url($gallery->slideshow_link) ?>">
+ <?php echo $gallery->slideshow_link_text ?>
+ </a>
+ </div>
+<?php } ?>
+ <!-- Thumbnails -->
+ <?php $i = 0; ?>
+ <?php foreach ( $images as $image ) : ?>
+ <li>
+ <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box imgBorderMe" <?php echo $image->style ?> >
+
+ <div class="ngg-gallery-thumbnail" >
+ <a href="<?php echo nggcf_get_field($image->pid, "video_url"); ?>"
+ title="<?php echo esc_attr($image->description); ?>"
+ data-src="<?php echo nextgen_esc_url($image->imageURL); ?>"
+ data-thumbnail="<?php echo nextgen_esc_url($image->thumbnailURL); ?>"
+ data-image-id="<?php echo esc_attr($image->pid); ?>"
+ data-title="<?php echo esc_attr($image->alttext); ?>"
+ data-description="<?php echo esc_attr($image->description); ?>"
+ data-url="<?php echo nggcf_get_field($image->pid, "video_url"); ?>"
+ <?php echo $image->thumbcode ?> >
+ <?php if ( !$image->hidden ) { ?>
+
+ <div class="image_overlay">
+ <img title="<?php echo esc_attr($image->alttext) ?>" alt="<?php echo esc_attr($image->alttext) ?>" src="<?php echo nextgen_esc_url($image->thumbnailURL) ?>" <?php echo $image->size ?> />
+ </div>
+ <span class="photoTitle"><?php if (!$image->hidden) { echo esc_attr($image->alttext); }?></span>
+
+ <?php } ?>
+ </a>
+ </div>
+
+ </div>
+ </li>
+ <?php if ( $image->hidden ) continue; ?>
+ <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
+ <br style="clear: both" />
+ <?php } ?>
+ <?php endforeach; ?>
+
+ <!-- Pagination -->
+ <?php echo $pagination ?>
+</ul>
+<script>
+ jQuery(document).ready(function(){
+ jQuery(".ngg-fancybox").each(function (){
+ jQuery(this).addClass("various iframe");
+ jQuery(this).attr("href",jQuery(this).children("img").attr("title"));
+ });
+ });
+</script>
+<?php endif; ?>
--- /dev/null
+{
+ "name": "LittleFieldTownshipBoardOfTrustees",
+ "description": "Gaslight Media",
+ "version": "0.0.1",
+ "devDependencies": {
+ "node-sass": "~2.0.1",
+ "grunt": "~0.4.5",
+ "grunt-contrib-watch": "~0.6.1",
+ "grunt-sass": "~0.18.0",
+ "grunt-contrib-uglify": "~0.7.0",
+ "grunt-contrib-concat": "~0.5.0",
+ "grunt-contrib-copy": "~0.7.0"
+ }
+}
\ No newline at end of file
--- /dev/null
+<?php get_header(); ?>
+<main class="page-inside">
+ <?php if (is_page("kitchensink")) {
+ get_template_part('parts/glm-kitchen-sink');
+ } else { ?>
+ <div id="content-wrapper">
+ <div class="row">
+ <?php
+ get_template_part('parts/bread-crumbs');
+ ?>
+ </div>
+ <!-- kitchensink check - delete me before going live -->
+ <div class="row">
+ <div id="main-content" class="small-12 medium-8 large-9 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <?php the_content();?>
+ <?php endwhile; else:?>
+ <p><?php _e('Sorry, no results found.');?></p>
+ <?php endif;?>
+ </div>
+ <div class="small-12 medium-4 large-3 columns text-center">
+ <?php get_sidebar(); ?>
+ </div>
+ </div>
+ </div>
+ <?php } ?> <!-- end kitchensink check - delete me before going live -->
+<?php get_footer(); ?>
--- /dev/null
+ <div id="blog-side-info-wrapper" class="small-11 small-only-text-center medium-3 columns">
+ <div id="blog-side-info">
+ <form id="searchform" action="<?php bloginfo('url'); ?>" method="get">
+ <div><input id="s" class="text" type="text" name="s" value="" />
+ <input class="submit blogbutton" type="submit" name="submit" value="Search" />
+ <input type="hidden" name="searchType" value="blog" /> </div>
+ </form>
+ <p>Recent Posts</p>
+ <ul>
+ <?php
+ $args = array( 'numberposts' => '5' );
+ $recent_posts = wp_get_recent_posts( $args );
+ foreach( $recent_posts as $recent ){
+ echo '<li><a href="' . get_permalink($recent["ID"]) . '">' . $recent["post_title"].'</a> </li> ';
+ }
+ ?>
+ </ul>
+ <p>Archive</p>
+ <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul>
+ <p>Categories</p>
+ <ul>
+ <?php
+ $args = array(
+ 'orderby' => 'name',
+ 'order' => 'ASC'
+ );
+ $categories = get_categories($args);
+ foreach($categories as $category) {
+ echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> '; }
+ ?>
+ </ul>
+ </div>
+ </div>
\ No newline at end of file
--- /dev/null
+<?php if(function_exists('bcn_display') && !is_front_page())
+{
+ echo "<div class=\"breadcrumbs\">";
+ bcn_display();
+ echo "</div>";
+}
+?>
--- /dev/null
+<div id="footer_address" class="row small-centered small-11 medium-6 columns">
+ <?php if (function_exists('glm_get_clientinfo_option')) :?>
+ <h2><?php echo glm_get_clientinfo_option('businessName');?></h2>
+ <?php if (glm_get_clientinfo_option('address')):?>
+ <span><?php echo glm_get_clientinfo_option('address');?></span>
+ <span class="bullet"> • </span>
+ <span><?php echo glm_get_clientinfo_option('city');?>, <?php echo glm_get_clientinfo_option('state');?>
+ <?php echo glm_get_clientinfo_option('zip');?></span>
+ <?php endif;?>
+ <?php if (glm_get_clientinfo_option('address2')):?>
+ <span class="bullet"> • </span>
+ <span><?php echo glm_get_clientinfo_option('address2');?></span>
+ <span class="bullet"> • </span>
+ <span><?php echo glm_get_clientinfo_option('city2');?>, <?php echo glm_get_clientinfo_option('state2');?>
+ <?php echo glm_get_clientinfo_option('zip2');?></span>
+ <?php endif;?>
+ <?php if (glm_get_clientinfo_option('phone')) :?>
+ <span class="bullet"> • </span><span><?php echo glm_get_clientinfo_option('phone');?></span>
+ <?php endif;?>
+ <?php if (glm_get_clientinfo_option('fax')) :?>
+ <span class="bullet"> • </span><span><?php echo glm_get_clientinfo_option('fax');?></span>
+ <?php endif;?>
+ <?php if (glm_get_clientinfo_option('extra')) :?>
+ <span class="bullet"> • </span><span><?php echo glm_get_clientinfo_option('extra');?></span>
+ <?php endif;?>
+ <?php endif;?>
+</div>
+
--- /dev/null
+<?php if (function_exists('glm_get_clientinfo_option')) :?>
+<ul>
+ <li><?php echo glm_get_clientinfo_option('businessName');?></li>
+ <?php if (glm_get_clientinfo_option('address')):?>
+ <li><?php echo glm_get_clientinfo_option('address');?></li>
+ <li><?php echo glm_get_clientinfo_option('city');?>, <?php echo glm_get_clientinfo_option('state');?>
+ <?php echo glm_get_clientinfo_option('zip');?></li>
+ <?php endif;?>
+ <?php if (glm_get_clientinfo_option('address2')):?>
+ <li><?php echo glm_get_clientinfo_option('address2');?></li>
+ <li><?php echo glm_get_clientinfo_option('city2');?>, <?php echo glm_get_clientinfo_option('state2');?>
+ <?php echo glm_get_clientinfo_option('zip2');?></li>
+ <?php endif;?>
+ <?php if (glm_get_clientinfo_option('phone')) :?>
+ <li><?php echo glm_get_clientinfo_option('phone');?></li>
+ <?php endif;?>
+ <?php if (glm_get_clientinfo_option('fax')) :?>
+ <li><?php echo glm_get_clientinfo_option('fax');?></li>
+ <?php endif;?>
+ <?php if (glm_get_clientinfo_option('extra')) :?>
+ <li><?php echo glm_get_clientinfo_option('extra');?></li>
+ <?php endif;?>
+</ul>
+<?php endif;?>
--- /dev/null
+<?php if(function_exists('fetch_all_glm_blocks')):?>
+<?php $blocks = fetch_all_glm_blocks();?>
+<div class="blocks">
+ <?php foreach ($blocks as $block):?>
+ <div class="text-center small-6 medium-2 columns blocks">
+ <?php if($block->url):?>
+ <a href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
+ <?php endif;?>
+ <?php echo $block->thumbnail;?>
+ <?php if($block->url):?>
+ </a>
+ <?php endif;?>
+ <?php if($block->url):?>
+ <a class="title-posts" href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
+ <?php endif;?>
+ <h1><?php echo $block->post_title;?></h1>
+ <?php if($block->url):?>
+ </a>
+ <?php endif;?>
+ <p><?php echo $block->post_content . $block->post_excerpt;?></p>
+ <a class="blocks-readmore" href="<?php echo $block->url;?>">Read More...</a>
+ </div>
+ <?php endforeach;?>
+</div>
+<div class="separator"><hr></div>
+<?php endif;?>
--- /dev/null
+
+<div style="background:rgba(0,0,0,0.4);border:1px solid black;border-radius:5px;display:block;margin:5px auto;width:90%;max-width:500px">
+ <ul style="columns: 2; -webkit-columns: 2; -moz-columns: 2;">
+ <li><a href="#social">social</a></li>
+ <li><a href="#header">header</a></li>
+ <li><a href="#search">search</a></li>
+ <li><a href="#slideshow">slideshow</a></li>
+ <li><a href="#featured">featured</a></li>
+ <li><a href="#breacrumbs">breadcrumbs</a></li>
+ <li><a href="#glm-blocks">glm-blocks</a></li>
+ <li><a href="#paragraphs">paragraphs</a></li>
+ <li><a href="#images-background">images-background</a></li>
+ <li><a href="#images-captions">images-captions</a></li>
+ <li><a href="#images">images</a></li>
+ <li><a href="#paragraphs">paragraphs</a></li>
+ <li><a href="#test-header-fonts">test-header-fonts</a></li>
+ <li><a href="#test-lists">test-lists</a></li>
+ <li><a href="#test-table">test-table</a></li>
+ <li><a href="#ninja-form">ninja-form</a></li>
+ <li><a href="#image-gallery">image-gallery</a></li>
+ <li><a href="#video-gallery">video-gallery</a></li>
+ <li><a href="#event-calendar">event-calendar</a></li>
+ <li><a href="#footer">footer</a></li>
+ <li><a href="#address">address</a></li>
+ <li><a href="#copyright">copyright</a></li>
+ <li><a href="#"></a></li>
+
+ <br><a name=""></a>
+ </ul>
+</div>
+
+<header></header>
+
+ <br><a name="social">social</a>
+ <p>temporary inline style: height 32, width 32, float left.</p>
+<div id="testsocial" class="row">
+ <style>
+ #testsocial .soc_icon {
+ height: 32px; width:32px; float: left;
+ }
+ </style>
+</div>
+
+<br><a name="header">header</a>
+<div id="header" class="row"></div>
+
+<br><a name="search">search</a>
+<div id="search" class="row">
+ <?php
+ get_template_part('parts/search');
+ ?>
+</div>
+
+<div id="sample-content" class="row">
+ <div id="main-content" class="small-12 medium-6 large-8 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <?php the_content();?>
+ <p> <h2>sample Text in case there is no content</h2>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+ <?php endwhile; else:?>
+ <p><?php _e('Sorry, no posts yet');?></p>
+ <?php endif;?>
+ </div>
+ <div class="small-12 medium-6 large-4 columns small-text-center medium-text-left">
+ <?php get_sidebar(); ?>
+ </div>
+</div>
+
+ <br><a name="slideshow">slideshow</a>
+<div id="slideshow" class="row">
+ <?php get_template_part('parts/slide-show'); ?>
+</div>
+
+ <br><a name="featured">featured</a>
+<div id="featured" class="row">
+</div>
+
+ <br><a name="breadcrumbs">breadcrumbs</a>
+<div id="breadcrumbs" class="row">
+ <?php get_template_part('parts/bread-crumbs'); ?>
+</div>
+
+ <br><a name="paragraphs">paragraphs</a>
+<div id="test-paragraphs" class="row">
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+</div>
+
+ <br><a name="glm-blocks">glm-blocks</a>
+<div id="glm-blocks" class="row">
+ <?php get_template_part('parts/glm-blocks'); ?>
+</div>
+
+ <br><a name="images-background">images-background</a>
+<div id="background-images" class="row">
+ <div background-image="src: '../assets/logo.png'"></div>
+ <div background-image="src: '../assets/logo.png'">
+ some text on an image?
+ </div>
+</div>
+
+ <br><a name="images-captions">images-captions</a>
+<div id="test-images-captions" class="row">
+
+ <div class="wp-caption alignright">
+ <img alt="This is alt text for the image" src="http://placehold.it/250x250">
+ <p class="wp-caption-text">Guests and staff join for a farewell photo</p>
+ </div>
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+ <div class="wp-caption alignleft">
+ <img alt="This is alt text for the image" src="http://placehold.it/250x250">
+ <p class="wp-caption-text">Guests and staff join for a farewell photo</p>
+ </div>
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+ <div class="wp-caption aligncenter">
+ <img alt="This is alt text for the image" src="http://placehold.it/250x250">
+ <p class="wp-caption-text">Guests and staff join for a farewell photo</p>
+ </div>
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+ <div class="wp-caption">
+ <img alt="This is alt text for the image" src="http://placehold.it/250x250">
+ <p class="wp-caption-text">Guests and staff join for a farewell photo</p>
+ </div>
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+</div>
+
+ <br><a name="images">images</a>
+<div id="test-images" class="row">
+ <div class="alignright">
+ <img alt="This is alt text for the image" src="http://placehold.it/250x250">
+ </div>
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+ <hr>
+ <div class="alignleft">
+ <img alt="This is alt text for the image" src="http://placehold.it/250x250">
+ </div>
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+ <hr>
+ <div class="aligncenter">
+ <img alt="This is alt text for the image" src="http://placehold.it/250x250">
+ </div>
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+ <hr>
+ <div class="">
+ <img alt="This is alt text for the image" src="http://placehold.it/250x250">
+ </div>
+ <p>
+ Yúyo tihta atalantëa wen nu. Lau nú engë rotelë, telpë ananta ré llo. San ré yávë ohtatyaro. Vén sú telpë yanen laira. Mel ehtë teren tanga nu. Hwarma tareldar at ëar, ep man norna carcassë.
+ </p>
+</div>
+
+ <br><a name="test-header-fonts">test-header-fonts</a>
+<div id="test-header-fonts" class="row">
+ <p> this is a paragraph for reference. Be sure to keep an eye on the line-height below</p>
+ <h1>This is a H1 element and should be large, prominent, and sparse, likely used only once on a page at the top.</h1>
+ <p> this is a paragraph for reference.</p>
+ <h2>This is a H2 element and should be prominent, likely used as headers for paragraphs.</h2>
+ <p> this is a paragraph for reference.</p>
+ <h3>This is a h3 element and should stand out, may be used as headers for paragraphs or drawing attention to certain elements</h3>
+ <p> this is a paragraph for reference.</p>
+ <h4>This is a h4 element and will likely not be used or be the same size as the surrounding P elements.</h4>
+ <p> this is a paragraph for reference.</p>
+ <h5>This is a h5 element and will likely not be used or be the same size as the surrounding P elements.</h5>
+ <p> this is a paragraph for reference.</p>
+</div>
+
+ <br><a name="test-lists">test-lists</a>
+<div id="test-lists" class="row">
+ UL, bulleted
+ <ul>
+ <li>content</li>
+ <li>content</li>
+ <li>content</li>
+ <li>content</li>
+ <li>content</li>
+ <li>content</li>
+ <li>
+ oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized contented
+ </li>
+ </ul>
+ <br>
+ OL, numbered
+ <ol>
+ <li>content</li>
+ <li>content</li>
+ <li>content</li>
+ <li>content</li>
+ <li>content</li>
+ <li>content</li>
+ <li>
+ oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized content oversized contented
+ </li>
+ </ol>
+</div>
+
+ <br><a name="test-table">test-table</a>
+<div id="test-table" class="row">
+ <table>
+ <thead>
+ <tr>
+ <td>head data0,0</td>
+ <td>head data0,1</td>
+ <td>head data0,2</td>
+ <td>head data0,3</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>body data1,0</td>
+ <td>body data1,1</td>
+ <td>body data1,2</td>
+ <td>body data1,3</td>
+ </tr>
+ <tr>
+ <td>body data2,0</td>
+ <td>body data2,1</td>
+ <td>body data2,2</td>
+ <td>body data2,3</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+ <br><a name="ninja-form">ninja-form</a>
+<div id="ninja-form" class="row">
+ Insert ninja form here.
+</div>
+
+ <br><a name="image-gallery">image-gallery</a>
+ <h2> below momentarily won't work, nextgen might not use shortcodes anymore</h2>
+<div id="image-gallery" class="row">
+ <?php do_shortcode('[ngg_images gallery_ids="23" template=glmphotos display_type="photocrati-nextgen_basic_slideshow"]');?>
+ <?php do_shortcode('[nggallery gallery_ids="1" template=glmphotos display_type="photocrati-nextgen_basic_slideshow"]');?>
+</div>
+
+ <br><a name="video-gallery">video-gallery</a>
+<div id="video-gallery" class="row">
+ <h2>this will only work with nextgen custom fields plugin installed</h2>
+ <h2>but below won't work at all at the moment</h2>
+
+ <?php do_shortcode('[ngg_images gallery_ids="24" template=glmphotos display_type="photocrati-nextgen_basic_slideshow"]');?>
+ <?php do_shortcode('[nggallery id=24 template="glmvideos" display_type="photocrati-nextgen_basic_slideshow"]');?>
+</div>
+
+ <br><a name="event-calendar">event-calendar</a>
+<div id="event-calendar" class="row">
+ <h2>this will only work with ai1ec time.ly event calendar plugin installed</h2>
+ <?php do_shortcode('[ai1ec view="agenda" events_limit="3"]');?>
+ <?php do_shortcode('[ai1ec view="stream" events_limit="3"]');?>
+</div>
+
+ <br><a name="footer">footer</a>
+<footer>
+ Example footer.
+</footer>
+
+ <br><a name="address">address</a>
+<div id="address">
+ <span>Business Name</span>
+ <span class="bullet"> • </span>
+ <span>123 Lane Street, P.O. Box 321</span>
+ <span class="bullet"> • </span>
+ <span>Village City, MI 49586</span>
+ <span class="bullet"> • </span>
+ <span>231-123-1231</span>
+ <span class="bullet"></span>
+ <span><a href="<?php bloginfo('url');?>/contact-us">Contact Us</a></span>
+</div>
+
+ <br><a name="copyright">copyright</a>
+<div id="copyright" class="row">
+ <span>© <?php echo date('Y');?> </span>
+ <span class="bullet"> • </span>
+ <span> All Rights Reserved.</span>
+ <span class="bullet"> • </span>
+ <span> Produced by <a target="_blank" href="http://www.gaslightmedia.com">Gaslight Media</a></span>
+</div>
\ No newline at end of file
--- /dev/null
+<aside class="left-off-canvas-menu hide-for-large-up">
+ <?php glm_offcanvas_menu(); ?>
+ <?php get_template_part('parts/client-info-offcanvas');?>
+</aside>
--- /dev/null
+<form role="search" method="get" id="searchform" action="<?php echo home_url('/'); ?>">
+ <input class="search-input" type="text" placeholder="Search" value="" name="s" id="lar-search">
+ <input class="search-button" type="image"
+ src="<?php bloginfo('template_url'); ?>/assets/search_button.png"
+ value="submit" name="searchButton">
+</form>
\ No newline at end of file
--- /dev/null
+<?php if (is_front_page()) {
+ echo '<div id="slideshow">';
+ echo do_shortcode("[metaslider id=27]");
+ echo '</div>';
+}
+?>
--- /dev/null
+<nav class="tab-bar show-for-medium-down">
+ <section class="left-small">
+ <a class="left-off-canvas-toggle menu-icon" href="#"><span>Menu</span></a>
+ </section>
+</nav>
\ No newline at end of file
--- /dev/null
+<nav class="top-bar show-for-large-up" data-topbar role="navigation">
+ <section class="top-bar-section">
+ <?php glm_page_menu(); ?>
+ </section>
+</nav>
+
--- /dev/null
+# www.robotstxt.org/
+# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
+
+User-agent: *
--- /dev/null
+#front {
+ padding: 20px;
+ .row.collapse {
+ h1 {
+ border-bottom: 1px solid #d1d2d4;
+ }
+ .row {
+ margin-bottom: 20px;
+ img {
+ margin-top: 5px;
+ border: 3px solid $white;
+ -webkit-box-shadow: 0px 0px 5px 0px #ababab;
+ -moz-box-shadow: 0px 0px 5px 0px #ababab;
+ -ms-box-shadow: 0px 0px 5px 0px #ababab;
+ box-shadow: 0px 0px 5px 0px #ababab;
+ }
+ .detail {
+ padding-left: 40px;
+ margin: 0 auto;
+ h2 {
+ margin: 0;
+ }
+ p {
+ font-size: rem-calc(12);
+ margin: 0;
+ }
+ a {
+ font-size: rem-calc(12);
+ }
+ }
+ }
+ .row.collapse {
+ img {
+ margin-left: 15px;
+ margin-top: 5px;
+ border: 3px solid $white;
+ -webkit-box-shadow: 0px 0px 5px 0px #ababab;
+ -moz-box-shadow: 0px 0px 5px 0px #ababab;
+ -ms-box-shadow: 0px 0px 5px 0px #ababab;
+ box-shadow: 0px 0px 5px 0px #ababab;
+ }
+ }
+ h4 {
+ line-height: 1.3;
+ }
+ ul {
+ list-style: none;
+ margin: 10px 0;
+ li {
+ font-size: rem-calc(10);
+ color: grey;
+ padding: 0 0 5px;
+ a {
+ font-size: rem-calc(11);
+ &.more {
+ color: darkblue;
+ font-weight: bold;
+ text-transform: uppercase;
+ }
+ }
+ }
+ }
+ #video {
+ padding: 0;
+ margin-top: 30px;
+ float: left;
+ h2 {
+ margin-top: 20px;
+ font-size: rem-calc(18);
+ @media #{$medium-only} {
+ margin-top: 15px;
+ }
+ @media #{$small-only} {
+ margin: 0;
+ }
+ }
+ a {
+ font-size: 12px;
+ }
+ img {
+ margin-left: 25px;
+ @media #{$small-only} {
+ margin: 0;
+ }
+ }
+ }
+ }
+}
+.home-feed-post {
+ padding-bottom: 25px;
+ @media #{$small-only} {
+ > * {
+ text-align: center;
+ }
+ }
+}
+input[type="submit"].blogbutton {
+ border-radius: 3px;
+ color: $white;
+ border: 2px solid $white;
+ font-weight: bold;
+ font-size: 13px;
+ padding: 2px 5px;
+ margin-top: -10px;
+ text-transform: uppercase;
+ &:hover {
+ cursor: pointer;
+ background: $white;
+ border: 2px solid #035C84;
+ color: white;
+ }
+}
+#blog-posts-over article {
+ padding-top: 10px;
+ margin-bottom: 15px;
+ display: inline-block;
+ width: 100%;
+ .entry-header {
+ background: transparent;
+ }
+ p {
+ padding-bottom: 15px;
+ }
+ a.read-more {
+ border: 2px solid $white;
+ font-weight: bold;
+ font-size: 13px;
+ padding: 0 3px;
+ text-transform: uppercase;
+ &:hover {
+ background: $white;
+ border: 2px solid #035C84;
+ color: #035C84;
+ }
+ }
+ .entry-header {
+ margin-bottom: 10px;
+ .entry-title {
+ margin-bottom: 0;
+ }
+ .meta.date {
+ font-size: 13px;
+ font-weight: bold;
+ }
+ }
+}
+/*#searchform div input &[type="text"] {
+ width: 95%;
+}*/
+#blog-posts-over .entry-meta {
+ text-align: center;
+ color: #757575;
+ font-size: 12px;
+}
+#blog-posts-over > div {
+ margin: 25px 0;
+}
+#blog-side-info {
+ #searchform {
+ margin-bottom: 30px;
+ }
+ p {
+ margin-bottom: 0;
+ }
+}
+@media #{$small-only} {
+ #blog-side-info-wrapper {
+ float: none;
+ margin: 0 auto;
+ clear: both;
+ }
+ #blog-side-info {
+ padding-left: 0;
+ border-left: 0;
+ ul {
+ margin-left: 0;
+ margin-top:10px;
+ }
+ #searchform {
+ padding: 35px 0;
+ #s {
+ width: 100%;
+ }
+ }
+ }
+}
+#blog-side-info {
+ padding-right: 10px;
+ ul {
+ list-style-type: none;
+ }
+}
\ No newline at end of file
--- /dev/null
+body {
+ background: url(../assets/bkgrd.jpg) no-repeat fixed;
+ background-size: cover;
+ .shadow-wrapper {
+ margin: 0 auto;
+ background: $white;
+ box-shadow: 0 0 15px -6px $black;
+ -ms-box-shadow: 0 0 15px -6px $black;
+ -moz-box-shadow: 0 0 15px -6px $black;
+ -webkit-box-shadow: 0 0 15px -6px $black;
+
+ max-width: 1000px;
+ padding-top: rem-calc(20);
+ }
+}
--- /dev/null
+#copyright {
+ padding: 20px 0;
+ margin: 0 auto;
+ float: none;
+ p {
+ font-size: rem-calc(10);
+ }
+ a {
+ color: $black;
+ }
+}
+#footer_address span.bullet,
+#copyright span.bullet {
+ margin: 0 5px;
+ @media #{$small-only} {
+ display: none !important;
+ }
+}
--- /dev/null
+// This document will contain all the styles that we want to apply to every
+// site. Make sure this is placed before _structures (if that is still the
+// primary css file).
+
+h1,h2,h3,h4,h5,h6 {
+ clear: both;
+}
+
+/* PLUGINS */
+/* Nextgen */
+.gallery li a img { // without this images will overlap each other at certain widths
+ display: block;
+ width: 100%;
+}
+.ngg-gallery-thumbnail, .ngg-gallery-thumbnail-box {
+ float: none !important;
+}
+.ngg-album-compact h4 .ngg-album-desc {
+ height: auto !important;
+ font-family: $font-family-serif;
+ font-weight: 400;
+}
+.ngg-album-compact .album-meta-wrapper h4 a {
+ font-style: normal;
+}
+.album-meta-wrapper {
+ display: block;
+ height: 54px;
+ margin-bottom: 20px;
+}
+.ngg-glmalbums {
+ margin: 10px 0;
+ min-height: 260px;
+ @media #{$small-only} {
+ min-height: 180px;
+ }
+}
+.ngg-album-link {
+ text-align: center;
+}
+/* Ninja Forms */
+.ninja-forms-form-wrap {
+ max-width: 600px;
+ margin: 0 auto;
+ input[type=submit] {
+ @include button();
+ display: block;
+ margin: 0 auto;
+ }
+}
+/* For fixing cellphones not showing phone numbers because of /helpful/ auto-coloring */
+a[href^=tel]{
+ color:inherit;
+ text-decoration:none;
+}
\ No newline at end of file
--- /dev/null
+/* for the mobile menu */
+aside.left-off-canvas-menu {
+ background-color: rgba(0, 0, 0, 0.7);
+ color: white;
+}
+aside.left-off-canvas-menu li.page_item {
+ display: block;
+ overflow: hidden;
+ position: relative;
+ padding: 4px 8px;
+}
+aside.left-off-canvas-menu .off-canvas-list ul li a {
+ line-height: 20px;
+ color: white;
+ border-bottom: 1px solid #b1b3b6;
+ background-repeat: no-repeat;
+ background-position: 3px 50%;
+}
+aside.left-off-canvas-menu li.page_item_has_children a.toggle {
+ @include off-canvas-arrow(down, $secondary-color);
+ font-size: 0;
+ height: 0;
+ line-height: 0;
+ padding: 0;
+ position: absolute;
+ right: 10px;
+ top: 13px;
+ width: 0;
+}
+aside.left-off-canvas-menu li.page_item_has_children a.toggle.open {
+ @include off-canvas-arrow(up, $secondary-color);
+}
+aside.left-off-canvas-menu ul.children {
+ display: none;
+}
+aside.left-off-canvas-menu .off-canvas-list ul li > ul li > a {
+ padding-left: 10px;
+ margin-left: 25px;
+ line-height: 18px;
+}
+aside.left-off-canvas-menu ul.open {
+ display: block;
+}
+.left-off-canvas-menu {
+ list-style: none;
+ li {
+ a {
+ color: $white;
+ font-size: rem-calc(20);
+ line-height: 150%;
+ border-color: white;
+ }
+ a:hover {
+ color: black;
+ }
+ .dropdown {
+ list-style: none;
+ }
+ }
+ ul {
+ list-style: none;
+
+ padding: 10px 0;
+ li {
+ a {
+ color: $white;
+ }
+ ul {
+ list-style: none;
+ }
+ }
+ }
+}
+.offcavas-social-list {
+ @include inline-list;
+ margin-left: auto;
+}
+/* End Mobile Menu */
--- /dev/null
+.breadcrumbs {
+ margin-top: 10px;
+}
+#content-bulk {
+ #con {
+ margin: 0;
+ }
+ h2 {
+ text-transform: uppercase;
+ font-size: 25px;
+ }
+ footer {
+ margin: 35px 0;
+ #address {
+ margin-top: 25px;
+ p {
+ font-size: 12px;
+ margin-top: 5px;
+ }
+ img {
+ margin: 0;
+ padding-right: 5px;
+ }
+ a {
+ font-size: 12px;
+ }
+ }
+ img {
+ box-shadow: none;
+ }
+ }
+}
--- /dev/null
+ @import "mixins/gradient";
+ @import "mixins/off-canvas-arrow";
\ No newline at end of file
--- /dev/null
+#connect {
+ padding-top: 20px;
+ background: #4c4d4f;
+ ul{
+ margin: 0;
+ list-style: none;
+ li {
+ background: none;
+ padding: 0 5px;
+ display: inline-block;
+ & > a {
+ display: block;
+ font-family: Open Sans, sans-serif;
+ font-size: 12px;
+ color: #fff;
+ padding: 20px 18px;
+ line-height: 1.2;
+ }
+ a {
+ &#current {
+ background: $l-blue;
+ }
+ }
+ }
+ }
+}
--- /dev/null
+header {
+ height: auto;
+ & #logo {
+ img {
+ margin-bottom: 15px;
+ }
+ }
+ & .search {
+ input {
+ height: 20px;
+ width: 167px;
+ padding: 0 8px;
+ margin: 13px 0px 0px 18px;
+ border-radius: 3px;
+ font-size: 10px;
+ color: $black;
+ display: inline-block;
+ }
+ a {
+ &.magnifying-glass {
+ font-size: 10em; /* This controls the size. */
+ display: inline-block;
+ width: rem-calc(10);
+ height: rem-calc(10);
+ border: rem-calc(2) solid $d-blue;
+ position: relative;
+ border-radius: 0.35em;
+ margin: 0 0 0 -25px;
+ &:before {
+ content: "";
+ display: inline-block;
+ position: absolute;
+ right: rem-calc(-7);
+ bottom: rem-calc(-4);
+ border-width: 0;
+ background: $d-blue;
+ width: rem-calc(8);
+ height: rem-calc(2);
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+ transform: rotate(45deg);
+ }
+ }
+ }
+ }
+ #sec-nav {
+ position: relative;
+ text-align: left;
+ padding: 10px 0;
+ margin: 0 0 15px 45px;
+ ul {
+ margin: 0;
+ li {
+ display: inline;
+ a {
+ font-size: 12px;
+ color: $d-blue;
+ padding: 0 5px;
+ font-weight: bold;
+ }
+ }
+ }
+ & > ul > li {
+ position: relative;
+ &:before {
+ color: $aluminum;
+ content: "|";
+ position: absolute;
+ top: 2px;
+ left: -15px;
+ font-size: 14px;
+ font-weight: bold;
+ display:block;
+ padding: 0 10px;
+ }
+ &:first-child:before {
+ content: none;
+ }
+ }
+ }
+ img {
+ margin-left: 5px;
+ }
+ .social {
+ margin-top: -25px;
+ padding-right: 0;
+ a {
+ float: right;
+ margin: 0 5px;
+ img {
+ margin: 0;
+ }
+ }
+ }
+}
--- /dev/null
+ @import "plugins/nextgen";
\ No newline at end of file
--- /dev/null
+/* for the mobile menu */
+aside.right-off-canvas-menu {
+ background-color: $primary-color;
+ color: white;
+}
+aside.right-off-canvas-menu li.page_item {
+ display: block;
+ overflow: hidden;
+ position: relative;
+ padding: 4px 8px;
+}
+aside.right-off-canvas-menu .off-canvas-list ul li a {
+ line-height: 20px;
+ color: white;
+ border-bottom: 1px solid #b1b3b6;
+ background-repeat: no-repeat;
+ background-position: 3px 50%;
+}
+aside.right-off-canvas-menu li.page_item_has_children a.toggle {
+ @include off-canvas-arrow(down, $secondary-color);
+ font-size: 0;
+ height: 0;
+ line-height: 0;
+ padding: 0;
+ position: absolute;
+ right: 10px;
+ top: 13px;
+ width: 0;
+}
+aside.right-off-canvas-menu li.page_item_has_children a.toggle.open {
+ @include off-canvas-arrow(up, $secondary-color);
+}
+aside.right-off-canvas-menu ul.children {
+ display: none;
+}
+aside.right--menu .off-canvas-list ul li > ul li > a {
+ padding-left: 10px;
+ margin-left: 25px;
+ line-height: 18px;
+}
+aside.right-off-canvas-menu ul.open {
+ display: block;
+}
+.right-off-canvas-menu {
+ list-style: none;
+ li {
+ a {
+ color: $white;
+ font-size: rem-calc(20);
+ line-height: 150%;
+ border-color: white;
+ }
+ a:hover {
+ color: black;
+ }
+ .dropdown {
+ list-style: none;
+ }
+ }
+ ul {
+ list-style: none;
+
+ padding: 10px 0;
+ li {
+ a {
+ color: $white;
+ }
+ ul {
+ list-style: none;
+ }
+ }
+ }
+}
+.offcavas-social-list {
+ @include inline-list;
+ margin-right: auto;
+}
+/* End Mobile Menu */
--- /dev/null
+.search-top {
+ #searchform {
+ text-align: left;
+ display: inline-block;
+ position: relative;
+ #search-button {
+ width: 22px;
+ right: 0px;
+ position: absolute;
+ padding: 0;
+ border: 1px solid lightgray;
+ }
+ }
+ input {
+ height: 20px;
+ width: 167px;
+ padding: 0 8px;
+ margin: 13px 0px 0px 18px;
+ border-radius: 3px;
+ font-size: 10px;
+ color: $black;
+ display: inline-block;
+ }
+ a {
+ &.magnifying-glass {
+ font-size: 10em; /* This controls the size. */
+ width: rem-calc(12);
+ height: rem-calc(12);
+ border: rem-calc(2) solid darkblue;
+ position: absolute;
+ top: 15px;
+ border-radius: 0.35em;
+ margin: 0 0 0 -20px;
+ &:before {
+ content: "";
+ display: inline-block;
+ position: absolute;
+ right: rem-calc(-7);
+ bottom: rem-calc(-4);
+ border-width: 0;
+ background: darkblue;
+ width: rem-calc(8);
+ height: rem-calc(2);
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+ transform: rotate(45deg);
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+// Foundation by ZURB
+// foundation.zurb.com
+// Licensed under MIT Open Source
+
+//
+
+// Table of Contents
+// Foundation Settings
+//
+// a. Base
+// b. Grid
+// c. Global
+// d. Media Query Ranges
+// e. Typography
+// 01. Accordion
+// 02. Alert Boxes
+// 03. Block Grid
+// 04. Breadcrumbs
+// 05. Buttons
+// 06. Button Groups
+// 07. Clearing
+// 08. Dropdown
+// 09. Dropdown Buttons
+// 10. Flex Video
+// 11. Forms
+// 12. Icon Bar
+// 13. Inline Lists
+// 14. Joyride
+// 15. Keystrokes
+// 16. Labels
+// 17. Magellan
+// 18. Off-canvas
+// 19. Orbit
+// 20. Pagination
+// 21. Panels
+// 22. Pricing Tables
+// 23. Progress Bar
+// 24. Range Slider
+// 25. Reveal
+// 26. Side Nav
+// 27. Split Buttons
+// 28. Sub Nav
+// 29. Switch
+// 30. Tables
+// 31. Tabs
+// 32. Thumbnails
+// 33. Tooltips
+// 34. Top Bar
+// 36. Visibility Classes
+
+// a. Base
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// This is the default html and body font-size for the base rem value.
+$rem-base: 16px;
+
+// Allows the use of rem-calc() or lower-bound() in your settings
+@import "foundation/functions";
+
+// The default font-size is set to 100% of the browser style sheet (usually 16px)
+// for compatibility with browser-based text zoom or user-set defaults.
+
+// Since the typical default browser font-size is 16px, that makes the calculation for grid size.
+// If you want your base font-size to be different and not have it affect the grid breakpoints,
+// set $rem-base to $base-font-size and make sure $base-font-size is a px value.
+$base-font-size: 100%;
+
+// The $base-font-size is 100% while $base-line-height is 150%
+$base-line-height: 150%;
+
+// We use this to control whether or not CSS classes come through in the gem files.
+$include-html-classes: true;
+// $include-print-styles: true;
+$include-html-global-classes: $include-html-classes;
+
+// b. Grid
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-grid-classes: $include-html-classes;
+// $include-xl-html-grid-classes: false;
+
+$row-width: rem-calc(1000);
+$total-columns: 12;
+$column-gutter: rem-calc(30);
+
+//$last-child-float: $opposite-direction;
+
+// c. Global
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// We use these to define default font stacks
+$font-family-sans-serif: "Open Sans", sans-serif;
+$font-family-serif: Georgia, Cambria, "Times New Roman", Times, serif;
+$font-family-monospace: Consolas, "Liberation Mono", Courier, monospace;
+
+// We use these to define default font weights
+$font-weight-normal: normal;
+$font-weight-bold: bold;
+
+$white : #FFFFFF;
+$ghost : #FAFAFA;
+$snow : #F9F9F9;
+$vapor : #F6F6F6;
+$white-smoke : #F5F5F5;
+$silver : #EFEFEF;
+$smoke : #EEEEEE;
+$gainsboro : #DDDDDD;
+$iron : #CCCCCC;
+$base : #AAAAAA;
+$aluminum : #999999;
+$jumbo : #888888;
+$monsoon : #777777;
+$steel : #666666;
+$charcoal : #555555;
+$tuatara : #444444;
+$oil : #333333;
+$jet : #222222;
+$black : #000000;
+$green : #a6b567;
+$red : #d2222a;
+$red_orn : #e95236;
+$d-blue : #131c5f;
+$l-blue : #0093d1;
+$b-blue : #6abbe4;
+$navy : #005287;
+
+// We use these as default colors throughout
+$primary-color: #008CBA;
+$secondary-color: #e7e7e7;
+$alert-color: #f04124;
+$success-color: #43AC6A;
+$warning-color: #f08a24;
+$info-color: #a0d3e8;
+
+// We use these to control various global styles
+ $body-bg: url(../assets/repeating-bkgrd-pattern.jpg) repeat;
+$body-font-color: $black;
+$body-font-family: "Times New Roman";
+$body-font-weight: $font-weight-normal;
+$body-font-style: normal;
+
+// We use this to control font-smoothing
+// $font-smoothing: antialiased;
+
+// We use these to control text direction settings
+// $text-direction: ltr;
+// $opposite-direction: right;
+// $default-float: left;
+// $last-child-float: $opposite-direction;
+
+// We use these to make sure border radius matches unless we want it different.
+// $global-radius: 3px;
+// $global-rounded: 1000px;
+
+// We use these to control inset shadow shiny edges and depressions.
+// $shiny-edge-size: 0 1px 0;
+// $shiny-edge-color: rgba($white, .5);
+// $shiny-edge-active-color: rgba($black, .2);
+
+// d. Media Query Ranges
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+$small-range: (0em, 40em);
+$medium-range: (40.063em, 64em);
+$large-range: (64.063em, 90em);
+$xlarge-range: (90.063em, 120em);
+$xxlarge-range: (120.063em, 99999999em);
+
+$screen: "only screen";
+
+$landscape: "#{$screen} and (orientation: landscape)";
+$portrait: "#{$screen} and (orientation: portrait)";
+
+$small-up: $screen;
+$small-only: "#{$screen} and (max-width: #{upper-bound($small-range)})";
+
+$medium-up: "#{$screen} and (min-width:#{lower-bound($medium-range)})";
+$medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})";
+
+$medium-down: "#{$screen} and (min-width:#{lower-bound($small-range)}) and (max-width:#{upper-bound($medium-range)})";
+
+$large-up: "#{$screen} and (min-width:#{lower-bound($large-range)})";
+$large-only: "#{$screen} and (min-width:#{lower-bound($large-range)}) and (max-width:#{upper-bound($large-range)})";
+
+$large-down: "#{$screen} and (min-width:#{lower-bound($small-range)}) and (max-width:#{upper-bound($large-range)})";
+
+$xlarge-up: "#{$screen} and (min-width:#{lower-bound($xlarge-range)})";
+$xlarge-only: "#{$screen} and (min-width:#{lower-bound($xlarge-range)}) and (max-width:#{upper-bound($xlarge-range)})";
+
+$xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})";
+$xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})";
+
+// Legacy
+$small: $medium-up;
+$medium: $medium-up;
+$large: $large-up;
+
+// We use this as cursors values for enabling the option of having custom cursors in the whole site's stylesheet
+$cursor-crosshair-value: crosshair;
+$cursor-default-value: default;
+$cursor-disabled-value: not-allowed;
+$cursor-pointer-value: pointer;
+$cursor-help-value: help;
+$cursor-text-value: text;
+
+// e. Typography
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-type-classes: $include-html-classes;
+
+// We use these to control header font styles
+$header-font-family: $body-font-family;
+$header-font-weight: $font-weight-normal;
+$header-font-style: normal;
+$header-font-color: $jet;
+$header-line-height: 1.4;
+$header-top-margin: .2rem;
+$header-bottom-margin: .5rem;
+$header-text-rendering: optimizeLegibility;
+
+// We use these to control header font sizes
+$h1-font-size: rem-calc(32);
+$h2-font-size: rem-calc(18);
+$h3-font-size: rem-calc(17);
+$h4-font-size: rem-calc(16);
+$h5-font-size: rem-calc(16);
+// $h6-font-size: 1rem;
+
+// We use these to control header size reduction on small screens
+$h1-font-reduction: rem-calc(5);
+$h2-font-reduction: rem-calc(0);
+$h3-font-reduction: rem-calc(0);
+$h4-font-reduction: rem-calc(0);
+$h5-font-reduction: 0;
+$h6-font-reduction: 0;
+
+// These control how subheaders are styled.
+$subheader-line-height: 1.4;
+$subheader-font-color: scale-color($header-font-color, $lightness: 35%);
+$subheader-font-weight: $font-weight-normal;
+$subheader-top-margin: .2rem;
+$subheader-bottom-margin: .5rem;
+
+// A general <small> styling
+$small-font-size: 60%;
+$small-font-color: scale-color($header-font-color, $lightness: 35%);
+
+// We use these to style paragraphs
+// $paragraph-font-family: inherit;
+// $paragraph-font-weight: $font-weight-normal;
+ $paragraph-font-size: rem-calc(16);
+// $paragraph-line-height: 1.6;
+// $paragraph-margin-bottom: rem-calc(20);
+// $paragraph-aside-font-size: rem-calc(14);
+// $paragraph-aside-line-height: 1.35;
+// $paragraph-aside-font-style: italic;
+// $paragraph-text-rendering: optimizeLegibility;
+
+// We use these to style <code> tags
+// $code-color: $oil;
+// $code-font-family: $font-family-monospace;
+// $code-font-weight: $font-weight-normal;
+// $code-background-color: scale-color($secondary-color, $lightness: 70%);
+// $code-border-size: 1px;
+// $code-border-style: solid;
+// $code-border-color: scale-color($code-background-color, $lightness: -10%);
+// $code-padding: rem-calc(2) rem-calc(5) rem-calc(1);
+
+// We use these to style anchors
+// $anchor-text-decoration: none;
+// $anchor-text-decoration-hover: none;
+// $anchor-font-color: $primary-color;
+// $anchor-font-color-hover: scale-color($anchor-font-color, $lightness: -14%);
+
+// We use these to style the <hr> element
+// $hr-border-width: 1px;
+// $hr-border-style: solid;
+// $hr-border-color: $gainsboro;
+// $hr-margin: rem-calc(20);
+
+// We use these to style lists
+// $list-font-family: $paragraph-font-family;
+// $list-font-size: $paragraph-font-size;
+// $list-line-height: $paragraph-line-height;
+// $list-margin-bottom: $paragraph-margin-bottom;
+// $list-style-position: outside;
+// $list-side-margin: 1.1rem;
+// $list-ordered-side-margin: 1.4rem;
+// $list-side-margin-no-bullet: 0;
+// $list-nested-margin: rem-calc(20);
+// $definition-list-header-weight: $font-weight-bold;
+// $definition-list-header-margin-bottom: .3rem;
+// $definition-list-margin-bottom: rem-calc(12);
+
+// We use these to style blockquotes
+// $blockquote-font-color: scale-color($header-font-color, $lightness: 35%);
+// $blockquote-padding: rem-calc(9 20 0 19);
+// $blockquote-border: 1px solid $gainsboro;
+// $blockquote-cite-font-size: rem-calc(13);
+// $blockquote-cite-font-color: scale-color($header-font-color, $lightness: 23%);
+// $blockquote-cite-link-color: $blockquote-cite-font-color;
+
+// Acronym styles
+// $acronym-underline: 1px dotted $gainsboro;
+
+// We use these to control padding and margin
+// $microformat-padding: rem-calc(10 12);
+// $microformat-margin: rem-calc(0 0 20 0);
+
+// We use these to control the border styles
+// $microformat-border-width: 1px;
+// $microformat-border-style: solid;
+// $microformat-border-color: $gainsboro;
+
+// We use these to control full name font styles
+// $microformat-fullname-font-weight: $font-weight-bold;
+// $microformat-fullname-font-size: rem-calc(15);
+
+// We use this to control the summary font styles
+// $microformat-summary-font-weight: $font-weight-bold;
+
+// We use this to control abbr padding
+// $microformat-abbr-padding: rem-calc(0 1);
+
+// We use this to control abbr font styles
+// $microformat-abbr-font-weight: $font-weight-bold;
+// $microformat-abbr-font-decoration: none;
+
+// 01. Accordion
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-accordion-classes: $include-html-classes;
+
+// $accordion-navigation-padding: rem-calc(16);
+// $accordion-navigation-bg-color: $silver;
+// $accordion-navigation-hover-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -5%);
+// $accordion-navigation-active-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -3%);
+// $accordion-navigation-font-color: $jet;
+// $accordion-navigation-font-size: rem-calc(16);
+// $accordion-navigation-font-family: $body-font-family;
+
+// $accordion-content-padding: ($column-gutter/2);
+// $accordion-content-active-bg-color: $white;
+
+// 02. Alert Boxes
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-alert-classes: $include-html-classes;
+
+// We use this to control alert padding.
+// $alert-padding-top: rem-calc(14);
+// $alert-padding-default-float: $alert-padding-top;
+// $alert-padding-opposite-direction: $alert-padding-top + rem-calc(10);
+// $alert-padding-bottom: $alert-padding-top;
+
+// We use these to control text style.
+// $alert-font-weight: $font-weight-normal;
+// $alert-font-size: rem-calc(13);
+// $alert-font-color: $white;
+// $alert-font-color-alt: scale-color($secondary-color, $lightness: -66%);
+
+// We use this for close hover effect.
+// $alert-function-factor: -14%;
+
+// We use these to control border styles.
+// $alert-border-style: solid;
+// $alert-border-width: 1px;
+// $alert-border-color: scale-color($primary-color, $lightness: $alert-function-factor);
+// $alert-bottom-margin: rem-calc(20);
+
+// We use these to style the close buttons
+// $alert-close-color: $oil;
+// $alert-close-top: 50%;
+// $alert-close-position: rem-calc(4);
+// $alert-close-font-size: rem-calc(22);
+// $alert-close-opacity: 0.3;
+// $alert-close-opacity-hover: 0.5;
+// $alert-close-padding: 9px 6px 4px;
+// $alert-close-background: inherit;
+
+// We use this to control border radius
+// $alert-radius: $global-radius;
+
+// $alert-transition-speed: 300ms;
+// $alert-transition-ease: ease-out;
+
+// 03. Block Grid
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-block-grid-classes: $include-html-classes;
+// $include-xl-html-block-grid-classes: false;
+
+// We use this to control the maximum number of block grid elements per row
+// $block-grid-elements: 12;
+// $block-grid-default-spacing: rem-calc(20);
+
+// $align-block-grid-to-grid: false;
+// @if $align-block-grid-to-grid {$block-grid-default-spacing: $column-gutter;}
+
+// Enables media queries for block-grid classes. Set to false if writing semantic HTML.
+// $block-grid-media-queries: true;
+
+// 04. Breadcrumbs
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-nav-classes: $include-html-classes;
+
+// We use this to set the background color for the breadcrumb container.
+// $crumb-bg: scale-color($secondary-color, $lightness: 55%);
+
+// We use these to set the padding around the breadcrumbs.
+// $crumb-padding: rem-calc(9 14 9);
+// $crumb-side-padding: rem-calc(12);
+
+// We use these to control border styles.
+// $crumb-function-factor: -10%;
+// $crumb-border-size: 1px;
+// $crumb-border-style: solid;
+// $crumb-border-color: scale-color($crumb-bg, $lightness: $crumb-function-factor);
+// $crumb-radius: $global-radius;
+
+// We use these to set various text styles for breadcrumbs.
+// $crumb-font-size: rem-calc(11);
+// $crumb-font-color: $primary-color;
+// $crumb-font-color-current: $oil;
+// $crumb-font-color-unavailable: $aluminum;
+// $crumb-font-transform: uppercase;
+// $crumb-link-decor: underline;
+
+// We use these to control the slash between breadcrumbs
+// $crumb-slash-color: $base;
+// $crumb-slash: "/";
+
+// 05. Buttons
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-button-classes: $include-html-classes;
+
+// We use these to build padding for buttons.
+// $button-tny: rem-calc(10);
+// $button-sml: rem-calc(14);
+// $button-med: rem-calc(16);
+// $button-lrg: rem-calc(18);
+
+// We use this to control the display property.
+// $button-display: inline-block;
+// $button-margin-bottom: rem-calc(20);
+
+// We use these to control button text styles.
+// $button-font-family: $body-font-family;
+// $button-font-color: $white;
+// $button-font-color-alt: $oil;
+// $button-font-tny: rem-calc(11);
+// $button-font-sml: rem-calc(13);
+// $button-font-med: rem-calc(16);
+// $button-font-lrg: rem-calc(20);
+// $button-font-weight: $font-weight-normal;
+// $button-font-align: center;
+
+// We use these to control various hover effects.
+// $button-function-factor: -20%;
+
+// We use these to control button border styles.
+// $button-border-width: 0;
+// $button-border-style: solid;
+// $button-bg-color: $primary-color;
+// $button-bg-hover: scale-color($button-bg-color, $lightness: $button-function-factor);
+// $button-border-color: $button-bg-hover;
+// $secondary-button-bg-hover: scale-color($secondary-color, $lightness: $button-function-factor);
+// $secondary-button-border-color: $secondary-button-bg-hover;
+// $success-button-bg-hover: scale-color($success-color, $lightness: $button-function-factor);
+// $success-button-border-color: $success-button-bg-hover;
+// $alert-button-bg-hover: scale-color($alert-color, $lightness: $button-function-factor);
+// $alert-button-border-color: $alert-button-bg-hover;
+// $warning-button-bg-hover: scale-color($warning-color, $lightness: $button-function-factor);
+// $warning-button-border-color: $warning-button-bg-hover;
+// $info-button-bg-hover: scale-color($info-color, $lightness: $button-function-factor);
+// $info-button-border-color: $info-button-bg-hover;
+
+// We use this to set the default radius used throughout the core.
+// $button-radius: $global-radius;
+// $button-round: $global-rounded;
+
+// We use this to set default opacity and cursor for disabled buttons.
+// $button-disabled-opacity: 0.7;
+// $button-disabled-cursor: $cursor-default-value;
+
+// 06. Button Groups
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-button-classes: $include-html-classes;
+
+// Sets the margin for the right side by default, and the left margin if right-to-left direction is used
+// $button-bar-margin-opposite: rem-calc(10);
+// $button-group-border-width: 1px;
+
+// 07. Clearing
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-clearing-classes: $include-html-classes;
+
+// We use these to set the background colors for parts of Clearing.
+// $clearing-bg: $oil;
+// $clearing-caption-bg: $clearing-bg;
+// $clearing-carousel-bg: rgba(51,51,51,0.8);
+// $clearing-img-bg: $clearing-bg;
+
+// We use these to style the close button
+// $clearing-close-color: $iron;
+// $clearing-close-size: 30px;
+
+// We use these to style the arrows
+// $clearing-arrow-size: 12px;
+// $clearing-arrow-color: $clearing-close-color;
+
+// We use these to style captions
+// $clearing-caption-font-color: $iron;
+// $clearing-caption-font-size: 0.875em;
+// $clearing-caption-padding: 10px 30px 20px;
+
+// We use these to make the image and carousel height and style
+// $clearing-active-img-height: 85%;
+// $clearing-carousel-height: 120px;
+// $clearing-carousel-thumb-width: 120px;
+// $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255);
+
+// 08. Dropdown
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-dropdown-classes: $include-html-classes;
+
+// We use these to controls height and width styles.
+// $f-dropdown-max-width: 200px;
+// $f-dropdown-height: auto;
+// $f-dropdown-max-height: none;
+
+// Used for bottom position
+// $f-dropdown-margin-top: 2px;
+
+// Used for right position
+// $f-dropdown-margin-left: $f-dropdown-margin-top;
+
+// Used for left position
+// $f-dropdown-margin-right: $f-dropdown-margin-top;
+
+// Used for top position
+// $f-dropdown-margin-bottom: $f-dropdown-margin-top;
+
+// We use this to control the background color
+ $f-dropdown-bg: $white;
+
+// We use this to set the border styles for dropdowns.
+ $f-dropdown-border-style: solid;
+ $f-dropdown-border-width: 1px;
+ $f-dropdown-border-color: scale-color($white, $lightness: -20%);
+
+// We use these to style the triangle pip.
+// $f-dropdown-triangle-size: 6px;
+// $f-dropdown-triangle-color: $white;
+// $f-dropdown-triangle-side-offset: 10px;
+
+// We use these to control styles for the list elements.
+// $f-dropdown-list-style: none;
+ $f-dropdown-font-color: $black;
+ $f-dropdown-font-size: rem-calc(14);
+// $f-dropdown-list-padding: rem-calc(5, 10);
+// $f-dropdown-line-height: rem-calc(18);
+ $f-dropdown-list-hover-bg: $white;
+// $dropdown-mobile-default-float: 0;
+
+// We use this to control the styles for when the dropdown has custom content.
+ $f-dropdown-content-padding: rem-calc(16);
+
+// Default radius for dropdown.
+// $f-dropdown-radius: $global-radius;
+
+
+// 09. Dropdown Buttons
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-button-classes: $include-html-classes;
+
+// We use these to set the color of the pip in dropdown buttons
+// $dropdown-button-pip-color: $white;
+// $dropdown-button-pip-color-alt: $oil;
+
+// We use these to set the size of the pip in dropdown buttons
+// $button-pip-tny: rem-calc(6);
+// $button-pip-sml: rem-calc(7);
+// $button-pip-med: rem-calc(9);
+// $button-pip-lrg: rem-calc(11);
+
+// We use these to style tiny dropdown buttons
+// $dropdown-button-padding-tny: $button-pip-tny * 7;
+// $dropdown-button-pip-size-tny: $button-pip-tny;
+// $dropdown-button-pip-opposite-tny: $button-pip-tny * 3;
+// $dropdown-button-pip-top-tny: (-$button-pip-tny / 2) + rem-calc(1);
+
+// We use these to style small dropdown buttons
+// $dropdown-button-padding-sml: $button-pip-sml * 7;
+// $dropdown-button-pip-size-sml: $button-pip-sml;
+// $dropdown-button-pip-opposite-sml: $button-pip-sml * 3;
+// $dropdown-button-pip-top-sml: (-$button-pip-sml / 2) + rem-calc(1);
+
+// We use these to style medium dropdown buttons
+// $dropdown-button-padding-med: $button-pip-med * 6 + rem-calc(3);
+// $dropdown-button-pip-size-med: $button-pip-med - rem-calc(3);
+// $dropdown-button-pip-opposite-med: $button-pip-med * 2.5;
+// $dropdown-button-pip-top-med: (-$button-pip-med / 2) + rem-calc(2);
+
+// We use these to style large dropdown buttons
+// $dropdown-button-padding-lrg: $button-pip-lrg * 5 + rem-calc(3);
+// $dropdown-button-pip-size-lrg: $button-pip-lrg - rem-calc(6);
+// $dropdown-button-pip-opposite-lrg: $button-pip-lrg * 2.5;
+// $dropdown-button-pip-top-lrg: (-$button-pip-lrg / 2) + rem-calc(3);
+
+// 10. Flex Video
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-media-classes: $include-html-classes;
+
+// We use these to control video container padding and margins
+// $flex-video-padding-top: rem-calc(25);
+// $flex-video-padding-bottom: 67.5%;
+// $flex-video-margin-bottom: rem-calc(16);
+
+// We use this to control widescreen bottom padding
+// $flex-video-widescreen-padding-bottom: 56.34%;
+
+// 11. Forms
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-form-classes: $include-html-classes;
+
+// We use this to set the base for lots of form spacing and positioning styles
+// $form-spacing: rem-calc(16);
+
+// We use these to style the labels in different ways
+// $form-label-pointer: pointer;
+// $form-label-font-size: rem-calc(14);
+// $form-label-font-weight: $font-weight-normal;
+// $form-label-line-height: 1.5;
+// $form-label-font-color: scale-color($black, $lightness: 30%);
+// $form-label-small-transform: capitalize;
+// $form-label-bottom-margin: 0;
+// $input-font-family: inherit;
+// $input-font-color: rgba(0,0,0,0.75);
+// $input-font-size: rem-calc(14);
+// $input-bg-color: $white;
+// $input-focus-bg-color: scale-color($white, $lightness: -2%);
+// $input-border-color: scale-color($white, $lightness: -20%);
+// $input-focus-border-color: scale-color($white, $lightness: -40%);
+// $input-border-style: solid;
+// $input-border-width: 1px;
+// $input-border-radius: $global-radius;
+// $input-disabled-bg: $gainsboro;
+// $input-disabled-cursor: $cursor-default-value;
+// $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
+// $input-include-glowing-effect: true;
+
+// We use these to style the fieldset border and spacing.
+// $fieldset-border-style: solid;
+// $fieldset-border-width: 1px;
+// $fieldset-border-color: $gainsboro;
+// $fieldset-padding: rem-calc(20);
+// $fieldset-margin: rem-calc(18 0);
+
+// We use these to style the legends when you use them
+// $legend-bg: $white;
+// $legend-font-weight: $font-weight-bold;
+// $legend-padding: rem-calc(0 3);
+
+// We use these to style the prefix and postfix input elements
+// $input-prefix-bg: scale-color($white, $lightness: -5%);
+// $input-prefix-border-color: scale-color($white, $lightness: -20%);
+// $input-prefix-border-size: 1px;
+// $input-prefix-border-type: solid;
+// $input-prefix-overflow: hidden;
+// $input-prefix-font-color: $oil;
+// $input-prefix-font-color-alt: $white;
+
+// We use this setting to turn on/off HTML5 number spinners (the up/down arrows)
+// $input-number-spinners: true;
+
+// We use these to style the error states for inputs and labels
+// $input-error-message-padding: rem-calc(6 9 9);
+// $input-error-message-top: -1px;
+// $input-error-message-font-size: rem-calc(12);
+// $input-error-message-font-weight: $font-weight-normal;
+// $input-error-message-font-style: italic;
+// $input-error-message-font-color: $white;
+// $input-error-message-bg-color: $alert-color;
+// $input-error-message-font-color-alt: $oil;
+
+// We use this to style the glowing effect of inputs when focused
+// $glowing-effect-fade-time: 0.45s;
+// $glowing-effect-color: $input-focus-border-color;
+
+// Select variables
+// $select-bg-color: $ghost;
+// $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%);
+
+
+// 12. Icon Bar
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// We use these to style the icon-bar and items
+// $icon-bar-bg: $oil;
+// $icon-bar-font-color: $white;
+// $icon-bar-font-color-hover: $icon-bar-font-color;
+// $icon-bar-font-size: 1rem;
+// $icon-bar-hover-color: $primary-color;
+// $icon-bar-icon-color: $white;
+// $icon-bar-icon-color-hover: $icon-bar-icon-color;
+// $icon-bar-icon-size: 1.875rem;
+// $icon-bar-image-width: 1.875rem;
+// $icon-bar-image-height: 1.875rem;
+// $icon-bar-active-color: $primary-color;
+// $icon-bar-item-padding: 1.25rem;
+
+// We use this to set default opacity and cursor for disabled icons.
+// $icon-bar-disabled-opacity: 0.7;
+
+// 13. Inline Lists
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-inline-list-classes: $include-html-classes;
+
+// We use this to control the margins and padding of the inline list.
+// $inline-list-top-margin: 0;
+// $inline-list-opposite-margin: 0;
+// $inline-list-bottom-margin: rem-calc(17);
+// $inline-list-default-float-margin: rem-calc(-22);
+// $inline-list-default-float-list-margin: rem-calc(22);
+
+// $inline-list-padding: 0;
+
+// We use this to control the overflow of the inline list.
+// $inline-list-overflow: hidden;
+
+// We use this to control the list items
+// $inline-list-display: block;
+
+// We use this to control any elements within list items
+// $inline-list-children-display: block;
+
+// 14. Joyride
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-joyride-classes: $include-html-classes;
+
+// Controlling default Joyride styles
+// $joyride-tip-bg: $oil;
+// $joyride-tip-default-width: 300px;
+// $joyride-tip-padding: rem-calc(18 20 24);
+// $joyride-tip-border: solid 1px $charcoal;
+// $joyride-tip-radius: 4px;
+// $joyride-tip-position-offset: 22px;
+
+// Here, we're setting the tip font styles
+// $joyride-tip-font-color: $white;
+// $joyride-tip-font-size: rem-calc(14);
+// $joyride-tip-header-weight: $font-weight-bold;
+
+// This changes the nub size
+// $joyride-tip-nub-size: 10px;
+
+// This adjusts the styles for the timer when its enabled
+// $joyride-tip-timer-width: 50px;
+// $joyride-tip-timer-height: 3px;
+// $joyride-tip-timer-color: $steel;
+
+// This changes up the styles for the close button
+// $joyride-tip-close-color: $monsoon;
+// $joyride-tip-close-size: 24px;
+// $joyride-tip-close-weight: $font-weight-normal;
+
+// When Joyride is filling the screen, we use this style for the bg
+// $joyride-screenfill: rgba(0,0,0,0.5);
+
+// 15. Keystrokes
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-keystroke-classes: $include-html-classes;
+
+// We use these to control text styles.
+// $keystroke-font: "Consolas", "Menlo", "Courier", monospace;
+// $keystroke-font-size: inherit;
+// $keystroke-font-color: $jet;
+// $keystroke-font-color-alt: $white;
+// $keystroke-function-factor: -7%;
+
+// We use this to control keystroke padding.
+// $keystroke-padding: rem-calc(2 4 0);
+
+// We use these to control background and border styles.
+// $keystroke-bg: scale-color($white, $lightness: $keystroke-function-factor);
+// $keystroke-border-style: solid;
+// $keystroke-border-width: 1px;
+// $keystroke-border-color: scale-color($keystroke-bg, $lightness: $keystroke-function-factor);
+// $keystroke-radius: $global-radius;
+
+// 16. Labels
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-label-classes: $include-html-classes;
+
+// We use these to style the labels
+// $label-padding: rem-calc(4 8 4);
+// $label-radius: $global-radius;
+
+// We use these to style the label text
+// $label-font-sizing: rem-calc(11);
+// $label-font-weight: $font-weight-normal;
+// $label-font-color: $oil;
+// $label-font-color-alt: $white;
+// $label-font-family: $body-font-family;
+
+// 17. Magellan
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-magellan-classes: $include-html-classes;
+
+// $magellan-bg: $white;
+// $magellan-padding: 10px;
+
+// 18. Off-canvas
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// Off Canvas Tab Bar Variables
+// $include-html-off-canvas-classes: $include-html-classes;
+
+ $tabbar-bg: $navy;
+// $tabbar-height: rem-calc(45);
+// $tabbar-icon-width: $tabbar-height;
+// $tabbar-line-height: $tabbar-height;
+// $tabbar-color: $white;
+// $tabbar-middle-padding: 0 rem-calc(10);
+
+// Off Canvas Divider Styles
+// $tabbar-left-section-border: solid 1px scale-color($tabbar-bg, $lightness: -50%);
+// $tabbar-right-section-border: $tabbar-left-section-border;
+
+
+// Off Canvas Tab Bar Headers
+// $tabbar-header-color: $white;
+// $tabbar-header-weight: $font-weight-bold;
+// $tabbar-header-line-height: $tabbar-height;
+// $tabbar-header-margin: 0;
+
+// Off Canvas Menu Variables
+// $off-canvas-width: rem-calc(250);
+ $off-canvas-bg: $navy;
+
+// Off Canvas Menu List Variables
+// $off-canvas-label-padding: 0.3rem rem-calc(15);
+// $off-canvas-label-color: $aluminum;
+// $off-canvas-label-text-transform: uppercase;
+// $off-canvas-label-font-size: rem-calc(12);
+// $off-canvas-label-font-weight: $font-weight-bold;
+// $off-canvas-label-bg: $tuatara;
+// $off-canvas-label-border-top: 1px solid scale-color($off-canvas-label-bg, $lightness: 14%);
+// $off-canvas-label-border-bottom: none;
+// $off-canvas-label-margin:0;
+ $off-canvas-link-padding: rem-calc(10, 25);
+ $off-canvas-link-color: $white;
+// $off-canvas-link-border-bottom: 1px solid scale-color($off-canvas-bg, $lightness: -25%);
+// $off-canvas-back-bg: #444;
+// $off-canvas-back-border-top: $off-canvas-label-border-top;
+// $off-canvas-back-border-bottom: $off-canvas-label-border-bottom;
+// $off-canvas-back-hover-bg: scale-color($off-canvas-back-bg, $lightness: -30%);
+// $off-canvas-back-hover-border-top: 1px solid scale-color($off-canvas-label-bg, $lightness: 14%);
+// $off-canvas-back-hover-border-bottom: none;
+
+// Off Canvas Menu Icon Variables
+// $tabbar-menu-icon-color: $white;
+// $tabbar-menu-icon-hover: scale-color($tabbar-menu-icon-color, $lightness: -30%);
+
+// $tabbar-menu-icon-text-indent: rem-calc(35);
+// $tabbar-menu-icon-width: $tabbar-icon-width;
+// $tabbar-menu-icon-height: $tabbar-height;
+// $tabbar-menu-icon-padding: 0;
+
+// $tabbar-hamburger-icon-width: rem-calc(16);
+// $tabbar-hamburger-icon-left: false;
+// $tabbar-hamburger-icon-top: false;
+// $tabbar-hamburger-icon-thickness: 1px;
+// $tabbar-hamburger-icon-gap: 6px;
+
+// Off Canvas Back-Link Overlay
+// $off-canvas-overlay-transition: background 300ms ease;
+// $off-canvas-overlay-cursor: pointer;
+// $off-canvas-overlay-box-shadow: -4px 0 4px rgba($black, 0.5), 4px 0 4px rgba($black, 0.5);
+// $off-canvas-overlay-background: rgba($white, 0.2);
+// $off-canvas-overlay-background-hover: rgba($white, 0.05);
+
+// Transition Variables
+// $menu-slide: "transform 500ms ease";
+
+// 19. Orbit
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-orbit-classes: $include-html-classes;
+
+// We use these to control the caption styles
+// $orbit-container-bg: none;
+// $orbit-caption-bg: rgba(51,51,51, 0.8);
+// $orbit-caption-font-color: $white;
+// $orbit-caption-font-size: rem-calc(14);
+// $orbit-caption-position: "bottom"; // Supported values: "bottom", "under"
+// $orbit-caption-padding: rem-calc(10 14);
+// $orbit-caption-height: auto;
+
+// We use these to control the left/right nav styles
+// $orbit-nav-bg: transparent;
+// $orbit-nav-bg-hover: rgba(0,0,0,0.3);
+// $orbit-nav-arrow-color: $white;
+// $orbit-nav-arrow-color-hover: $white;
+
+// We use these to control the timer styles
+// $orbit-timer-bg: rgba(255,255,255,0.3);
+// $orbit-timer-show-progress-bar: true;
+
+// We use these to control the bullet nav styles
+// $orbit-bullet-nav-color: $iron;
+// $orbit-bullet-nav-color-active: $aluminum;
+// $orbit-bullet-radius: rem-calc(9);
+
+// We use these to controls the style of slide numbers
+// $orbit-slide-number-bg: rgba(0,0,0,0);
+// $orbit-slide-number-font-color: $white;
+// $orbit-slide-number-padding: rem-calc(5);
+
+// Graceful Loading Wrapper and preloader
+// $wrapper-class: "slideshow-wrapper";
+// $preloader-class: "preloader";
+
+// Hide controls on small
+// $orbit-nav-hide-for-small: true;
+// $orbit-bullet-hide-for-small: true;
+// $orbit-timer-hide-for-small: true;
+
+// 20. Pagination
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-pagination-classes: $include-html-classes;
+
+// We use these to control the pagination container
+// $pagination-height: rem-calc(24);
+// $pagination-margin: rem-calc(-5);
+
+// We use these to set the list-item properties
+// $pagination-li-float: $default-float;
+// $pagination-li-height: rem-calc(24);
+// $pagination-li-font-color: $jet;
+// $pagination-li-font-size: rem-calc(14);
+// $pagination-li-margin: rem-calc(5);
+
+// We use these for the pagination anchor links
+// $pagination-link-pad: rem-calc(1 10 1);
+// $pagination-link-font-color: $aluminum;
+// $pagination-link-active-bg: scale-color($white, $lightness: -10%);
+
+// We use these for disabled anchor links
+// $pagination-link-unavailable-cursor: default;
+// $pagination-link-unavailable-font-color: $aluminum;
+// $pagination-link-unavailable-bg-active: transparent;
+
+// We use these for currently selected anchor links
+// $pagination-link-current-background: $primary-color;
+// $pagination-link-current-font-color: $white;
+// $pagination-link-current-font-weight: $font-weight-bold;
+// $pagination-link-current-cursor: default;
+// $pagination-link-current-active-bg: $primary-color;
+
+// 21. Panels
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-panel-classes: $include-html-classes;
+
+// We use these to control the background and border styles
+// $panel-bg: scale-color($white, $lightness: -5%);
+// $panel-border-style: solid;
+// $panel-border-size: 1px;
+
+// We use this % to control how much we darken things on hover
+// $panel-function-factor: -11%;
+// $panel-border-color: scale-color($panel-bg, $lightness: $panel-function-factor);
+
+// We use these to set default inner padding and bottom margin
+// $panel-margin-bottom: rem-calc(20);
+// $panel-padding: rem-calc(20);
+
+// We use these to set default font colors
+// $panel-font-color: $oil;
+// $panel-font-color-alt: $white;
+
+// $panel-header-adjust: true;
+// $callout-panel-link-color: $primary-color;
+// $callout-panel-link-color-hover: scale-color($callout-panel-link-color, $lightness: -14%);
+
+// 22. Pricing Tables
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-pricing-classes: $include-html-classes;
+
+// We use this to control the border color
+// $price-table-border: solid 1px $gainsboro;
+
+// We use this to control the bottom margin of the pricing table
+// $price-table-margin-bottom: rem-calc(20);
+
+// We use these to control the title styles
+// $price-title-bg: $oil;
+// $price-title-padding: rem-calc(15 20);
+// $price-title-align: center;
+// $price-title-color: $smoke;
+// $price-title-weight: $font-weight-normal;
+// $price-title-size: rem-calc(16);
+// $price-title-font-family: $body-font-family;
+
+// We use these to control the price styles
+// $price-money-bg: $vapor;
+// $price-money-padding: rem-calc(15 20);
+// $price-money-align: center;
+// $price-money-color: $oil;
+// $price-money-weight: $font-weight-normal;
+// $price-money-size: rem-calc(32);
+// $price-money-font-family: $body-font-family;
+
+
+// We use these to control the description styles
+// $price-bg: $white;
+// $price-desc-color: $monsoon;
+// $price-desc-padding: rem-calc(15);
+// $price-desc-align: center;
+// $price-desc-font-size: rem-calc(12);
+// $price-desc-weight: $font-weight-normal;
+// $price-desc-line-height: 1.4;
+// $price-desc-bottom-border: dotted 1px $gainsboro;
+
+// We use these to control the list item styles
+// $price-item-color: $oil;
+// $price-item-padding: rem-calc(15);
+// $price-item-align: center;
+// $price-item-font-size: rem-calc(14);
+// $price-item-weight: $font-weight-normal;
+// $price-item-bottom-border: dotted 1px $gainsboro;
+
+// We use these to control the CTA area styles
+// $price-cta-bg: $white;
+// $price-cta-align: center;
+// $price-cta-padding: rem-calc(20 20 0);
+
+// 23. Progress Bar
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-media-classes: $include-html-classes;
+
+// We use this to set the progress bar height
+// $progress-bar-height: rem-calc(25);
+// $progress-bar-color: $vapor;
+
+// We use these to control the border styles
+// $progress-bar-border-color: scale-color($white, $lightness: 20%);
+// $progress-bar-border-size: 1px;
+// $progress-bar-border-style: solid;
+// $progress-bar-border-radius: $global-radius;
+
+// We use these to control the margin & padding
+// $progress-bar-margin-bottom: rem-calc(10);
+
+// We use these to set the meter colors
+// $progress-meter-color: $primary-color;
+// $progress-meter-secondary-color: $secondary-color;
+// $progress-meter-success-color: $success-color;
+// $progress-meter-alert-color: $alert-color;
+
+// 24. Range Slider
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-range-slider-classes: $include-html-classes;
+
+// These variabels define the slider bar styles
+// $range-slider-bar-width: 100%;
+// $range-slider-bar-height: rem-calc(16);
+
+// $range-slider-bar-border-width: 1px;
+// $range-slider-bar-border-style: solid;
+// $range-slider-bar-border-color: $gainsboro;
+// $range-slider-radius: $global-radius;
+// $range-slider-round: $global-rounded;
+// $range-slider-bar-bg-color: $ghost;
+// $range-slider-active-segment-bg-color: scale-color($secondary-color, $lightness: -1%);
+
+// Vertical bar styles
+// $range-slider-vertical-bar-width: rem-calc(16);
+// $range-slider-vertical-bar-height: rem-calc(200);
+
+// These variabels define the slider handle styles
+// $range-slider-handle-width: rem-calc(32);
+// $range-slider-handle-height: rem-calc(22);
+// $range-slider-handle-position-top: rem-calc(-5);
+// $range-slider-handle-bg-color: $primary-color;
+// $range-slider-handle-border-width: 1px;
+// $range-slider-handle-border-style: solid;
+// $range-slider-handle-border-color: none;
+// $range-slider-handle-radius: $global-radius;
+// $range-slider-handle-round: $global-rounded;
+// $range-slider-handle-bg-hover-color: scale-color($primary-color, $lightness: -12%);
+// $range-slider-handle-cursor: pointer;
+
+// $range-slider-disabled-opacity: 0.7;
+// $range-slider-disabled-cursor: $cursor-disabled-value;
+
+// 25. Reveal
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-reveal-classes: $include-html-classes;
+
+// We use these to control the style of the reveal overlay.
+// $reveal-overlay-bg: rgba($black, .45);
+// $reveal-overlay-bg-old: $black;
+
+// We use these to control the style of the modal itself.
+// $reveal-modal-bg: $white;
+// $reveal-position-top: rem-calc(100);
+// $reveal-default-width: 80%;
+// $reveal-max-width: $row-width;
+// $reveal-modal-padding: rem-calc(20);
+// $reveal-box-shadow: 0 0 10px rgba($black,.4);
+
+// We use these to style the reveal close button
+// $reveal-close-font-size: rem-calc(40);
+// $reveal-close-top: rem-calc(10);
+// $reveal-close-side: rem-calc(22);
+// $reveal-close-color: $base;
+// $reveal-close-weight: $font-weight-bold;
+
+// We use this to set the default radius used throughout the core.
+// $reveal-radius: $global-radius;
+// $reveal-round: $global-rounded;
+
+// We use these to control the modal border
+// $reveal-border-style: solid;
+// $reveal-border-width: 1px;
+// $reveal-border-color: $steel;
+
+// $reveal-modal-class: "reveal-modal";
+// $close-reveal-modal-class: "close-reveal-modal";
+
+// 26. Side Nav
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-nav-classes: $include-html-classes;
+
+// We use this to control padding.
+// $side-nav-padding: rem-calc(14 0);
+
+// We use these to control list styles.
+// $side-nav-list-type: none;
+// $side-nav-list-position: outside;
+// $side-nav-list-margin: rem-calc(0 0 7 0);
+
+// We use these to control link styles.
+// $side-nav-link-color: $primary-color;
+// $side-nav-link-color-active: scale-color($side-nav-link-color, $lightness: 30%);
+// $side-nav-link-color-hover: scale-color($side-nav-link-color, $lightness: 30%);
+// $side-nav-link-bg-hover: hsla(0, 0, 0, 0.025);
+// $side-nav-link-margin: 0;
+// $side-nav-link-padding: rem-calc(7 14);
+// $side-nav-font-size: rem-calc(14);
+// $side-nav-font-weight: $font-weight-normal;
+// $side-nav-font-weight-active: $side-nav-font-weight;
+// $side-nav-font-family: $body-font-family;
+// $side-nav-font-family-active: $side-nav-font-family;
+
+// We use these to control heading styles.
+// $side-nav-heading-color: $side-nav-link-color;
+// $side-nav-heading-font-size: $side-nav-font-size;
+// $side-nav-heading-font-weight: bold;
+// $side-nav-heading-text-transform: uppercase;
+
+// We use these to control border styles
+// $side-nav-divider-size: 1px;
+// $side-nav-divider-style: solid;
+// $side-nav-divider-color: scale-color($white, $lightness: 10%);
+
+// 27. Split Buttons
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-button-classes: $include-html-classes;
+
+// We use these to control different shared styles for Split Buttons
+// $split-button-function-factor: 10%;
+// $split-button-pip-color: $white;
+// $split-button-pip-color-alt: $oil;
+// $split-button-active-bg-tint: rgba(0,0,0,0.1);
+
+// We use these to control tiny split buttons
+// $split-button-padding-tny: $button-pip-tny * 10;
+// $split-button-span-width-tny: $button-pip-tny * 6;
+// $split-button-pip-size-tny: $button-pip-tny;
+// $split-button-pip-top-tny: $button-pip-tny * 2;
+// $split-button-pip-default-float-tny: rem-calc(-6);
+
+// We use these to control small split buttons
+// $split-button-padding-sml: $button-pip-sml * 10;
+// $split-button-span-width-sml: $button-pip-sml * 6;
+// $split-button-pip-size-sml: $button-pip-sml;
+// $split-button-pip-top-sml: $button-pip-sml * 1.5;
+// $split-button-pip-default-float-sml: rem-calc(-6);
+
+// We use these to control medium split buttons
+// $split-button-padding-med: $button-pip-med * 9;
+// $split-button-span-width-med: $button-pip-med * 5.5;
+// $split-button-pip-size-med: $button-pip-med - rem-calc(3);
+// $split-button-pip-top-med: $button-pip-med * 1.5;
+// $split-button-pip-default-float-med: rem-calc(-6);
+
+// We use these to control large split buttons
+// $split-button-padding-lrg: $button-pip-lrg * 8;
+// $split-button-span-width-lrg: $button-pip-lrg * 5;
+// $split-button-pip-size-lrg: $button-pip-lrg - rem-calc(6);
+// $split-button-pip-top-lrg: $button-pip-lrg + rem-calc(5);
+// $split-button-pip-default-float-lrg: rem-calc(-6);
+
+// 28. Sub Nav
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-nav-classes: $include-html-classes;
+
+// We use these to control margin and padding
+// $sub-nav-list-margin: rem-calc(-4 0 18);
+// $sub-nav-list-padding-top: rem-calc(4);
+
+// We use this to control the definition
+// $sub-nav-font-family: $body-font-family;
+// $sub-nav-font-size: rem-calc(14);
+// $sub-nav-font-color: $aluminum;
+// $sub-nav-font-weight: $font-weight-normal;
+// $sub-nav-text-decoration: none;
+// $sub-nav-padding: rem-calc(3 16);
+// $sub-nav-border-radius: 3px;
+// $sub-nav-font-color-hover: scale-color($sub-nav-font-color, $lightness: -25%);
+
+
+// We use these to control the active item styles
+
+// $sub-nav-active-font-weight: $font-weight-normal;
+// $sub-nav-active-bg: $primary-color;
+// $sub-nav-active-bg-hover: scale-color($sub-nav-active-bg, $lightness: -14%);
+// $sub-nav-active-color: $white;
+// $sub-nav-active-padding: $sub-nav-padding;
+// $sub-nav-active-cursor: default;
+
+// $sub-nav-item-divider: "";
+// $sub-nav-item-divider-margin: rem-calc(12);
+
+// 29. Switch
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-form-classes: $include-html-classes;
+
+// Controlling background color for the switch container
+// $switch-bg: $gainsboro;
+
+// We use these to control the switch heights for our default classes
+// $switch-height-tny: 1.5rem;
+// $switch-height-sml: 1.75rem;
+// $switch-height-med: 2rem;
+// $switch-height-lrg: 2.5rem;
+// $switch-bottom-margin: 1.5rem;
+
+// We use these to style the switch-paddle
+// $switch-paddle-bg: $white;
+// $switch-paddle-transition-speed: .15s;
+// $switch-paddle-transition-ease: ease-out;
+// $switch-active-color: $primary-color;
+
+// 30. Tables
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-table-classes: $include-html-classes;
+
+// These control the background color for the table and even rows
+// $table-bg: $white;
+// $table-even-row-bg: $snow;
+
+// These control the table cell border style
+// $table-border-style: solid;
+// $table-border-size: 1px;
+// $table-border-color: $gainsboro;
+
+// These control the table head styles
+// $table-head-bg: $white-smoke;
+// $table-head-font-size: rem-calc(14);
+// $table-head-font-color: $jet;
+// $table-head-font-weight: $font-weight-bold;
+// $table-head-padding: rem-calc(8 10 10);
+
+// These control the table foot styles
+// $table-foot-bg: $table-head-bg;
+// $table-foot-font-size: $table-head-font-size;
+// $table-foot-font-color: $table-head-font-color;
+// $table-foot-font-weight: $table-head-font-weight;
+// $table-foot-padding: $table-head-padding;
+
+// These control the caption
+// table-caption-bg: transparent;
+// $table-caption-font-color: $table-head-font-color;
+// $table-caption-font-size: rem-calc(16);
+// $table-caption-font-weight: bold;
+
+// These control the row padding and font styles
+// $table-row-padding: rem-calc(9 10);
+// $table-row-font-size: rem-calc(14);
+// $table-row-font-color: $jet;
+// $table-line-height: rem-calc(18);
+
+// These are for controlling the layout, display and margin of tables
+// $table-layout: auto;
+// $table-display: table-cell;
+// $table-margin-bottom: rem-calc(20);
+
+
+// 31. Tabs
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-tabs-classes: $include-html-classes;
+
+// $tabs-navigation-padding: rem-calc(16);
+// $tabs-navigation-bg-color: $silver;
+// $tabs-navigation-active-bg-color: $white;
+// $tabs-navigation-hover-bg-color: scale-color($tabs-navigation-bg-color, $lightness: -6%);
+// $tabs-navigation-font-color: $jet;
+// $tabs-navigation-active-font-color: $tabs-navigation-font-color;
+// $tabs-navigation-font-size: rem-calc(16);
+// $tabs-navigation-font-family: $body-font-family;
+
+// $tabs-content-margin-bottom: rem-calc(24);
+// $tabs-content-padding: ($column-gutter/2);
+
+// $tabs-vertical-navigation-margin-bottom: 1.25rem;
+
+// 32. Thumbnails
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-media-classes: $include-html-classes;
+
+// We use these to control border styles
+// $thumb-border-style: solid;
+// $thumb-border-width: 4px;
+// $thumb-border-color: $white;
+// $thumb-box-shadow: 0 0 0 1px rgba($black,.2);
+// $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5);
+
+// Radius and transition speed for thumbs
+// $thumb-radius: $global-radius;
+// $thumb-transition-speed: 200ms;
+
+// 33. Tooltips
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-tooltip-classes: $include-html-classes;
+
+// $has-tip-border-bottom: dotted 1px $iron;
+// $has-tip-font-weight: $font-weight-bold;
+// $has-tip-font-color: $oil;
+// $has-tip-border-bottom-hover: dotted 1px scale-color($primary-color, $lightness: -55%);
+// $has-tip-font-color-hover: $primary-color;
+// $has-tip-cursor-type: help;
+
+// $tooltip-padding: rem-calc(12);
+// $tooltip-bg: $oil;
+// $tooltip-font-size: rem-calc(14);
+// $tooltip-font-weight: $font-weight-normal;
+// $tooltip-font-color: $white;
+// $tooltip-line-height: 1.3;
+// $tooltip-close-font-size: rem-calc(10);
+// $tooltip-close-font-weight: $font-weight-normal;
+// $tooltip-close-font-color: $monsoon;
+// $tooltip-font-size-sml: rem-calc(14);
+// $tooltip-radius: $global-radius;
+// $tooltip-rounded: $global-rounded;
+// $tooltip-pip-size: 5px;
+// $tooltip-max-width: 300px;
+
+// 34. Top Bar
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-top-bar-classes: $include-html-classes;
+
+// Background color for the top bar
+ $topbar-bg-color: $white;
+// $topbar-bg: $topbar-bg-color;
+
+// Height and margin
+ $topbar-height: rem-calc(43);
+// $topbar-margin-bottom: 0;
+
+// Controlling the styles for the title in the top bar
+// $topbar-title-weight: $font-weight-normal;
+// $topbar-title-font-size: rem-calc(17);
+
+// Set the link colors and styles for top-level nav
+ $topbar-link-color: $navy;
+// $topbar-link-color-hover: $white;
+// $topbar-link-color-active: $white;
+// $topbar-link-color-active-hover: $white;
+// $topbar-link-weight: $font-weight-normal;
+ $topbar-link-font-size: rem-calc(20);
+// $topbar-link-hover-lightness: -10%; // Darken by 10%
+// $topbar-link-bg: $topbar-bg;
+ $topbar-link-bg-hover: $navy;
+ $topbar-link-bg-color-hover: $navy;
+ $topbar-link-bg-active: $navy;
+// $topbar-link-bg-active-hover: scale-color($primary-color, $lightness: -14%);
+// $topbar-link-font-family: $body-font-family;
+// $topbar-link-text-transform: none;
+// $topbar-link-padding: ($topbar-height / 3);
+// $topbar-back-link-size: rem-calc(18);
+ $topbar-link-dropdown-padding: rem-calc(16);
+// $topbar-button-font-size: 0.75rem;
+// $topbar-button-top: 7px;
+
+// Style the top bar dropdown elements
+ $topbar-dropdown-bg: $white;
+ $topbar-dropdown-link-color: $black;
+ $topbar-dropdown-link-color-hover: $navy;
+ $topbar-dropdown-link-bg: $white;
+ $topbar-dropdown-link-bg-hover: $white;
+// $topbar-dropdown-link-weight: $font-weight-normal;
+// $topbar-dropdown-toggle-size: 5px;
+// $topbar-dropdown-toggle-color: $white;
+// $topbar-dropdown-toggle-alpha: 0.4;
+
+// $topbar-dropdown-label-color: $monsoon;
+// $topbar-dropdown-label-text-transform: uppercase;
+// $topbar-dropdown-label-font-weight: $font-weight-bold;
+// $topbar-dropdown-label-font-size: rem-calc(10);
+// $topbar-dropdown-label-bg: $oil;
+
+// Top menu icon styles
+// $topbar-menu-link-transform: uppercase;
+// $topbar-menu-link-font-size: rem-calc(13);
+// $topbar-menu-link-weight: $font-weight-bold;
+// $topbar-menu-link-color: $white;
+// $topbar-menu-icon-color: $white;
+// $topbar-menu-link-color-toggled: $jumbo;
+// $topbar-menu-icon-color-toggled: $jumbo;
+// $topbar-menu-icon-position: $opposite-direction; // Change to $default-float for a left menu icon
+
+// Transitions and breakpoint styles
+// $topbar-transition-speed: 300ms;
+// Using rem-calc for the below breakpoint causes issues with top bar
+// $topbar-breakpoint: #{lower-bound($medium-range)}; // Change to 9999px for always mobile layout
+// $topbar-media-query: $medium-up;
+
+// Top-bar input styles
+// $topbar-input-height: rem-calc(28);
+
+// Divider Styles
+// $topbar-divider-border-bottom: solid 1px scale-color($topbar-bg-color, $lightness: 13%);
+// $topbar-divider-border-top: solid 1px scale-color($topbar-bg-color, $lightness: -50%);
+
+// Sticky Class
+// $topbar-sticky-class: ".sticky";
+ $topbar-arrows: false; //Set false to remove the triangle icon from the menu item
+// $topbar-dropdown-arrows: true; //Set false to remove the \00bb >> text from dropdown subnavigation li//
+
+// 36. Visibility Classes
+// - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// $include-html-visibility-classes: $include-html-classes;
+// $include-accessibility-classes: true;
+// $include-table-visibility-classes: true;
+// $include-legacy-visibility-classes: true;
--- /dev/null
+#sidebar {
+ padding-top: 25px;
+ background: #f2f9fc;
+ .row.collapse {
+ margin-left: 14px;
+ }
+ li {
+ list-style: none;
+ #calendar_wrap {
+ table#wp-calendar {
+ margin: 0 auto;
+ }
+ }
+ }
+ a {
+ font-size: 12px;
+ }
+ form {
+ margin: 0 12px 0 14px;
+ select {
+ padding: 0 rem-calc(8);
+ border-radius: 5px;
+ height: 25px;
+ margin: 0;
+ option {
+ font-size: 10px;
+ }
+ }
+ }
+ .small-block-grid-2 {
+ margin-top: 10px;
+ li {
+ padding: 0 rem-calc(10) rem-calc(10);
+ img {
+ border: 2px solid lightblue;
+ }
+ }
+ & > li:nth-of-type(2), & > li:nth-of-type(4) {
+ padding-left: 0;
+ }
+ & > li:nth-of-type(3), & > li:nth-of-type(4) {
+ padding-bottom: 20px;
+ }
+ }
+ h3 {
+ margin: 20px 0 0;
+ }
+ h1 {
+ margin: 0;
+ font-size: rem-calc(25);
+ text-transform: none;
+ }
+ input {
+ padding: 5px 0 5px 8px;
+ height: auto;
+ margin: 10px 0;
+ }
+ button {
+ border-radius: 2px;
+ padding: 0 10px;
+ }
+}
+#side-nav {
+ padding-top: 10px;
+ background: #f2f9fc;
+ h1 {
+ font-size: rem-calc(22);
+/* margin: 5px 0 25px;*/
+ }
+ h4 {
+ font-weight: bold;
+ margin-left: 10px;
+ }
+ li {
+ list-style: none;
+ }
+ ul {
+ list-style: none;
+ margin: 0 0 20px;
+ li {
+ margin: 0 -15px;
+ padding: 5px 10px 5px 25px;
+ &:hover {
+ background: #81adc1;
+ }
+ a {
+ color: darkblue;
+ &:hover {
+ color: $white;
+ }
+ }
+ }
+ }
+ h3 {
+ text-transform: none;
+ margin: 0;
+ }
+ input {
+ padding: 5px 0 5px 8px;
+ height: auto;
+ margin-bottom: 10px;
+ }
+ button {
+ border-radius: 2px;
+ padding: 0 10px;
+ }
+}
+#extra {
+ margin-top: 15px;
+ p {
+ line-height: 1.3;
+ &.title {
+ margin: 0;
+ &#last {
+ padding-top: 10px;
+ }
+ }
+ &#message {
+ text-transform: uppercase;
+ color: lightblue;
+ font-size: rem-calc(15);
+ margin: 40px 0;
+ }
+ }
+}
+.county-news {
+ font-weight: bold;
+}
+.current_page_item a {
+ font-weight: bold;
+}
\ No newline at end of file
--- /dev/null
+#slideshow {
+ border-bottom: 5px solid $d-blue;
+ margin-top: -10px;
+ #caption {
+ background: rgba(0, 0, 0, 0.75);
+ color: $white;
+ margin-top: -51px;
+ p {
+ padding: 10px 5px;
+ font-size: 12px;
+ margin: 0;
+ text-align: right;
+ }
+ }
+}
--- /dev/null
+//1. Body
+//2. Header
+//3. Fonts
+//4. Top Bar
+//5. Off-Canvas
+//6. Main
+//7. Slideshow
+//8. Blog
+//9. Sidebar
+//10. Links
+//11. Footer
+//12. Copyright
+
+#example.element {
+ background-color: transparent;
+}
\ No newline at end of file
--- /dev/null
+.contain-to-grid {
+ box-shadow: 0 5px 10px -1px $aluminum;
+ .top-bar {
+ height: 73px;
+ box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.5);
+ margin-bottom: 10px;
+ }
+}
+.tab-bar {
+ .tab-bar-section.middle {
+// left: 0;
+// right: 2.8125rem;
+ text-align: right;
+ }
+}
+.top-bar-section {
+ background: transparent;
+ float: none;
+ margin-left: auto;
+ margin-right: auto;
+ display: inline-block;
+ height: auto;
+ line-height: 1;
+ ul{
+ li {
+ background: none;
+ padding: 12px 0;
+ border-left: 2px solid $white;
+ max-width: 166.5px;
+ line-height: 1.25;
+ &:first-child {
+ border: none;
+ }
+ &:hover {
+ background: $white;
+ }
+ a {
+ text-align: center;
+ padding: 0 20px;
+ font-size: 20px;
+ font-weight: bold;
+ color: $white;
+ &:hover {
+ color: $d-blue;
+ text-shadow: 0 0 1px $d-blue;
+ text-shadow: 1 0 1px $d-blue;
+ text-shadow: 0 1 1px $d-blue;
+ text-shadow: -1 0 1px $d-blue;
+ text-shadow: 0 -1 1px $d-blue;
+ }
+ }
+ &:not(.has-form):not(.active) {
+ & > a:not(.button) {
+ background: transparent;
+ }
+ }
+ &.drop-left {
+ ul.dropdown {
+ padding-left: 21px;
+ padding-right: 250px;
+ top: 74px;
+ background: $white;
+ border-bottom-left-radius: 10px;
+ border-bottom-right-radius: 10px;
+ min-width: 500px;
+ box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -ms-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -webkit-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ li {
+ white-space: nowrap;
+ border-bottom: 1px solid #e7e7e8;
+ padding: 5px 0;
+ &.nav-img-container {
+ img {
+ position: absolute;
+ right: 20px;
+ top: 23px;
+ border: 6px solid #fdefd4;
+ }
+ border: none;
+ }
+ a {
+ padding-left: 0;
+ text-align: left;
+ font-size: 18px;
+ &:hover {
+ color: $d-blue;
+ text-shadow: 0 0 1px $green;
+ text-shadow: 1 0 1px $green;
+ text-shadow: 0 1 1px $green;
+ text-shadow: -1 0 1px $green;
+ text-shadow: 0 -1 1px $green;
+ }
+ }
+ }
+ }
+ }
+ &.drop-right {
+ ul.dropdown {
+ padding-left: 250px;
+ padding-right: 21px;
+ right: -1%;
+ left: auto;
+ top: 74px;
+ background: $white;
+ border-bottom-left-radius: 10px;
+ border-bottom-right-radius: 10px;
+ min-width: 500px;
+ box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -ms-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ -webkit-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.5);
+ li {
+ white-space: nowrap;
+ background: $white;
+ text-align: right;
+ border-bottom: 1px solid #e7e7e8;
+ padding: 5px 0;
+ &.nav-img-container {
+ img {
+ position: absolute;
+ left: 20px;
+ top: 23px;
+ border: 6px solid #fdefd4;
+ }
+ border: none;
+ }
+ a {
+ padding-left: 0;
+ text-align: left;
+ font-size: 18px;
+ &:hover {
+ color: $d-blue;
+ text-shadow: 0 0 1px $green;
+ text-shadow: 1 0 1px $green;
+ text-shadow: 0 1 1px $green;
+ text-shadow: -1 0 1px $green;
+ text-shadow: 0 -1 1px $green;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
--- /dev/null
+// Wordpress styles
+// Table of Contents
+// 01. Images
+
+
+// 01. Images
+// 02 Search and Post
+
+img.aligncenter {
+ display: block;
+ clear: both;
+ float:none;
+ padding:0;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+img.alignright {
+ padding: 0;
+ margin: 0 0 6px 11px;
+ display: inline;
+ }
+
+blockquote.alignleft,
+img.alignleft,
+.wp-caption.alignleft {
+ margin: rem-calc(7) rem-calc(35) rem-calc(7) 0;
+}
+
+blockquote.alignright,
+img.alignright,
+.wp-caption.alignright {
+ margin: rem-calc(7) 0 rem-calc(7) rem-calc(35);
+}
+img.alignleft {
+ padding: 0;
+ display: inline;
+ }
+img.alignleft, img.alignright, img.aligncenter, img.alignnone, div.wp-caption img {
+ border: 1px solid $charcoal;
+}
+
+.alignright {
+ float: right;
+}
+.alignnone {
+ float: none;
+}
+.alignleft {
+ float: left;
+}
+.wp-caption {
+ background: $charcoal;
+ width: auto;
+}
+.wp-caption-text {
+ font-family: Open Sans, sans-serif;
+ font-size: 9px;
+ color: $white;
+ font-style: italic;
+ margin: 0;
+ padding: 0 5px;
+}
+.gallery-one-title {
+ height: 45px;
+ font-size: 0.8em;
+ text-align: center;
+ font-family: sans-serif;
+ padding: 5px;
+}
+.gallery-holder {
+ margin: 10px 0 20px 0;
+}
+@media #{$small-range} {
+ img.alignright, img.alignleft, img.aligncenter {
+ width: 70% !important;
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center;
+ }
+ div.wp-caption.alignright, div.wp-caption.alignleft {
+ width: 44% !important;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center;
+ }
+ div.wp-caption.aligncenter {
+ width: 85% !important;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center;
+ }
+ div.wp-caption.alignnone {
+ width: 85% !important;
+ float: none;
+ }
+ div.wp-caption.alignright, div.wp-caption.alignleft, div.wp-caption.aligncenter {
+ width: 100%;
+ }
+}
+@media #{$medium-range} {
+ img.aligncenter, img.alignnone {
+ width: 70% !important;
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center;
+ }
+ div.wp-caption.aligncenter {
+ width: 74% !important;
+ margin-left: auto;
+ margin-right: auto;
+ float: none;
+ text-align: center;
+ }
+ div.wp-caption.aligncenter {
+ width: 100%;
+ }
+ div.wp-caption.alignnone {
+ width: 73% !important;
+ float: none;
+ }
+}
+
+.wp-caption {
+ max-width: 100%;
+ margin: 10px 20px;
+ padding: 5px;
+ background-color: #f3f3f3;
+ border: 1px solid #ddd;
+ text-align: center;
+ img {
+ width: 100%;
+ }
+ p.wp-caption-text {
+ padding: 5px;
+ width: 100%;
+ margin: 0;
+ color: black;
+ font-size: 12px;
+ }
+ &.aligncenter {
+ margin: 10px auto;
+ }
+}
+// end Images
+// 02 Search and Post
+@media #{$small-only} {
+ #blog-posts-over {
+ padding: 0 !important;
+ margin: 0 !important;
+ }
+}
+.blog-posts-container {
+ margin: 30px 0 30px;
+ embed, iframe, object, video {
+ max-width: 100%;
+ }
+ a {
+ text-decoration: none;
+ }
+ header.entry-header {
+ h2.entry-title {
+ a {
+ color: #222;
+ margin-left: 0;
+ }
+ }
+ }
+ .wp-caption .wp-caption-text, .gallery-caption, .entry-caption {
+ overflow: hidden;
+ color: #757575;
+ font-size: 0.857143rem;
+ font-style: italic;
+ line-height: 2;
+ }
+ .date {
+ font-size: 12px;
+ }
+ footer.entry-meta {
+ color: #757575;
+ font-size: 0.928571rem;
+ line-height: 1.84615;
+ margin-top: 1.71429rem;
+ clear: both;
+ float: none;
+ margin-right: auto;
+ }
+ footer {
+ background: none;
+ clear: both;
+ padding: 15px 0 0;
+ position: relative;
+ text-align: center;
+ }
+}
+#content-wrapper {
+ h1, h2, h3, h4, h5, h6 {
+ clear: both;
+ }
+}
+.content {
+ background: #fff;
+/* -webkit-box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.75);
+ -moz-box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.75);
+ box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.75);*/
+ box-shadow: 3px 3px 8px -1px darkgrey;
+}
+#searchform_container {
+ margin-top: 20px;
+}
+#searchform {
+ max-width: 100%;
+ text-align: center;
+ div {
+ input.blogbutton {
+ @include gradient(#1999ce, #107098);
+ }
+ }
+}
+#blog-side-info {
+ border-left: 1px solid grey;
+ margin-top: 30px;
+ padding-left: 20px;
+ @media #{$small-only} {
+ text-align: center;
+ }
+}
+
+// End Search and Posts
--- /dev/null
+/*
+GaslightMedia, all rights reserved.
+*/
+/*
+ Created on : May 22, 2015, 11:19:44 AM
+ Author : laury
+*/
+ /*
+ * To make the TINYMCE editor in wordpress reflect some of the default styles
+ * we have active on all our themes, thus leading to a more true WYSIWYG
+ * experience.
+ */
+#tinymce h1 {
+ clear: both;
+}
+
+#tinymce h2 {
+ clear: both;
+}
+
+#tinymce h3 {
+ clear: both;
+}
+
+#tinymce h4 {
+ clear: both;
+}
+
+#tinymce h5 {
+ clear: both;
+}
+
+#tinymce h6 {
+ clear: both;
+}
\ No newline at end of file
--- /dev/null
+@import "settings";
+@import "foundation";
+@import "mixins";
+@import "wordpress";
+@import "defaults";
+@import "body";
+@import "page.header";
+@import "topbar";
+@import "main";
+@import "slideshow";
+@import "plugins";
+@import "blog";
+@import "sidebar";
+@import "search";
+@import "page.footer";
+@import "copyright";
+@import "structure";
+@import "left-off-canvas";
+//@import "right-off-canvas";
+
--- /dev/null
+/*
+ Created on : Mar 5, 2015, 2:57:35 PM
+ Author : laury
+*/
+
+@mixin gradient($from, $to) {
+ background: -webkit-linear-gradient(left, $from 5%, $to 100%);
+ background: -moz-linear-gradient(center top, $from 5%, $to 100%);
+ background: -ms-linear-gradient(left, $from 5%, $to 100%);
+}
--- /dev/null
+@mixin off-canvas-arrow($direction: down, $color: white, $size: 20px) {
+ border-left: $size - 5 solid transparent;
+ border-right: $size - 5 solid transparent;
+ @if $direction == 'up' {
+ border-bottom: $size solid $color;
+ border-top: 0;
+ // if width is not passed, or empty do this
+ } @else {
+ border-top: $size solid $color;
+ border-bottom: 0;
+ }
+}
+@mixin off-canvas-point($direction: right, $color: red, $size: 1rem) {
+ @if $direction == 'down' {
+ content: '>';
+ transform: rotate(90deg);
+ color: $color;
+ height: $size;
+ width: $size;
+ font-size: $size;
+ font-weight: bold;
+ display: block;
+ } @if $direction == 'up' {
+ content: '>';
+ transform: rotate(-90deg);
+ color: $color;
+ height: $size;
+ width: $size;
+ font-size: $size;
+ font-weight: bold;
+ display: block;
+ } @else if $direction == 'right' {
+ content: '>';
+ transform: rotate(0deg);
+ color: $color;
+ height: $size;
+ width: $size;
+ font-size: $size;
+ font-weight: bold;
+ display: block;
+ }
+}
\ No newline at end of file
--- /dev/null
+/* NextGen Gallery */
+.ngg-gallery-thumbnail,
+.ngg-gallery-thumbnail-box {
+ float: none !important;
+}
+.gallery li a img { // without this images will overlap each other at certain widths
+ display: block;
+ width: 100%;
+}
+.ngg-gallery-thumbnail, .ngg-gallery-thumbnail-box {
+ float: none !important;
+}
+.ngg-album-compact h4 .ngg-album-desc {
+ height: auto !important;
+ font-family: $font-family-serif;
+ font-weight: 400;
+}
+.ngg-album-compact .album-meta-wrapper h4 a {
+ font-style: normal;
+}
+.album-meta-wrapper {
+ display: block;
+ height: 54px;
+ margin-bottom: 20px;
+}
+.ngg-glmalbums {
+ margin: 10px 0;
+}
+/* Ninja Forms */
+.ninja-forms-form-wrap {
+ max-width: 600px;
+ margin: 0 auto;
+ input[type=submit] {
+ @include button();
+ display: block;
+ margin: 0 auto;
+ }
+}
+
+/* End NextGen Gallery */
--- /dev/null
+<?php get_header(); ?>
+<main class="search-results">
+ <?php if (get_search_query() == "") { ?>
+ <br><h2 class="search-result-header small-12 columns">Please enter a query in the search box. </h2>
+ <?php } else { ?>
+ <br><h2 class="search-result-header small-12 columns">Search Results for "<?php echo get_search_query(); ?>"</h2>
+ <div class="row">
+ <div id="blog-posts-over" class="small-12 medium-9 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <?php if (is_search() && (isset($_GET['searchType']) && $_GET['searchType'] == 'blog') && ($post->post_type=='page')) continue; ?>
+ <div class="row content search-result-container">
+ <div class="small-11 small-centered columns">
+ <article id="<?php the_ID()?>" <?php post_class()?>>
+ <header class="entry-header">
+ <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
+ <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
+ </header>
+
+
+ <!-- Start of the Contextual/Highlight Search -->
+ <?php
+ // Configuration
+ $max_length = 400; // Max length in characters
+ $min_padding = 30; // Min length in characters of the context to place around found search terms
+
+ // Load content as plain text
+ global $wp_query, $post;
+ $content = (!post_password_required($post) ? strip_tags(preg_replace(array("/\r?\n/", '@<\s*(p|br\s*/?)\s*>@'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : '');
+
+ // Search content for terms
+ $terms = $wp_query->query_vars['search_terms'];
+ if ( preg_match_all('/'.str_replace('/', '\/', join('|', $terms)).'/i', $content, $matches, PREG_OFFSET_CAPTURE) ) {
+ $padding = max($min_padding, $max_length / (2*count($matches[0])));
+
+ // Construct extract containing context for each term
+ $output = '';
+ $last_offset = 0;
+ foreach ( $matches[0] as $match ) {
+ list($string, $offset) = $match;
+ $start = $offset-$padding;
+ $end = $offset+strlen($string)+$padding;
+ // Preserve whole words
+ while ( $start > 1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$start-1}) ) $start--;
+ while ( $end < strlen($content)-1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$end}) ) $end++;
+ $start = max($start, $last_offset);
+ $context = substr($content, $start, $end-$start);
+ if ( $start > $last_offset ) $context = '...'.$context;
+ $output .= $context;
+ $last_offset = $end;
+ }
+
+ if ( $last_offset != strlen($content)-1 ) $output .= '...';
+ } else {
+ $output = $content;
+ }
+
+ if ( strlen($output) > $max_length ) {
+ $end = $max_length-3;
+ while ( $end > 1 && preg_match('/[A-Za-z0-9\'"-]/', $output{$end-1}) ) $end--;
+ $output = substr($output, 0, $end) . '...';
+ }
+
+ // Highlight matches
+ $context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '<strong>$0</strong>', $output));
+ ?>
+
+ <p class="search_result_context">
+ <?php echo $context ?>
+ </p>
+ <p>
+ <a href="<?php the_permalink() ?>" rel="bookmark">Read this entry</a>
+ </p>
+ <!-- End of the Contextual/Highlight Search -->
+
+ <?php //echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
+ <footer class="entry-meta small-12 medium-6 medium-push-3 center">
+ <?php
+ if (has_category()) {
+ $post_categories = wp_get_post_categories( get_the_ID() );
+ $cats = array();
+ echo 'This entry was posted ';
+ echo 'in';
+ foreach($post_categories as $c){
+ $cat = get_category( $c );
+ $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
+ echo ', <a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>';
+ }
+ echo '.';
+ }
+ ?>
+ </footer>
+ </article>
+ </div>
+ </div>
+ <?php endwhile; ?>
+ <div class="navigation">
+ <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+ </div><!-- /.navigation -->
+ <?php else: ?>
+ <div id="post-404" class="noposts">
+ <p><?php _e('Sorry, no results were found.');?></p>
+ </div><!-- /#post-404 -->
+ <?php endif;?>
+ </div>
+ <div id="blog-side-info-wrapper" class="small-11 small-only-text-center medium-3 columns">
+ <div id="blog-side-info">
+ <form id="searchform" action="<?php bloginfo('url'); ?>" method="get">
+ <div><input id="s" class="text" type="text" name="s" value="" />
+ <input class="submit blogbutton" type="submit" name="submit" value="Search" />
+ <input type="hidden" name="searchType" value="blog" /> </div>
+ </form>
+ <p>Recent Posts</p>
+ <ul>
+ <?php
+ $args = array( 'numberposts' => '5' );
+ $recent_posts = wp_get_recent_posts( $args );
+ foreach( $recent_posts as $recent ){
+ echo '<li><a href="' . get_permalink($recent["ID"]) . '">' . $recent["post_title"].'</a> </li> ';
+ }
+ ?>
+ </ul>
+ <p>Archive</p>
+ <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul>
+ <p>Categories</p>
+ <ul>
+ <?php
+ $args = array(
+ 'orderby' => 'name',
+ 'order' => 'ASC'
+ );
+ $categories = get_categories($args);
+ foreach($categories as $category) {
+ echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> '; }
+ ?>
+ </ul>
+ </div>
+ <?php } ?> <!-- end empty query check -->
+ </div>
+ </div>
+ <?php get_footer(); ?>
--- /dev/null
+ <div id="side-nav" class="large-3 columns show-for-large-up" data-equalizer-watch>
+ <div class="row collapse">
+ <?php glm_side_menu(); ?>
+ </div>
+ </div>
\ No newline at end of file
--- /dev/null
+<?php get_header(); ?>
+ <main class="blog-single">
+ <div class="row">
+ <div id="blog-posts-over" class="small-12 medium-9 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <div class="row blog-post-container">
+ <div class="small-11 small-centered columns">
+ <div class="row">
+ <div class="small-12 columns">
+ <article id="<?php the_ID()?>" <?php post_class()?>>
+ <?php echo the_content(); ?>
+ <footer class="entry-meta small-12 medium-6 medium-push-3 center">
+ <?php $post_categories = wp_get_post_categories( get_the_ID() );
+ $cats = array();
+ echo 'This entry was posted ';
+ if (has_category()) {
+ echo 'in ';
+ foreach($post_categories as $c){
+ $cat = get_category( $c );
+ $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
+ echo '<a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>, ';
+ }
+ }
+ $post_tags = wp_get_post_tags( get_the_ID() );
+ $tags = array();
+ if (has_tag( )) {
+ echo ' and tagged ';
+ foreach($post_tags as $t){
+ $tag = get_tag( $t );
+ $tags[] = array( 'name' => $tag->name, 'slug' => $tag->slug );
+ echo '<a rel="category" title="View all posts in '. $tag->name . ' " href="'. $tag->slug .'">'. $tag->name .'</a>, ';
+ }
+ }
+ echo ' on ';
+ echo ' <span class="meta date"> ' . the_time('F jS, Y') . '</span>';
+ ?>
+ </footer>
+ </article>
+ </div>
+ </div>
+ </div>
+ </div>
+ <?php endwhile; ?>
+ <?php else: ?>
+ <div id="post-404" class="noposts">
+ <p><?php _e('Sorry, no results were found.');?></p>
+ </div><!-- /#post-404 -->
+ <?php endif;?>
+ </div>
+ <?php get_template_part('parts/blog-sidebar-r'); ?>
+ </div>
+ <?php get_footer(); ?>
--- /dev/null
+/*
+Theme Name: LittleFieldTownshipBoardOfTrustees
+Author: Gaslight Media
+Author URI: http://www.gaslightmedia.com
+Description: A theme for LittleFieldTownshipBoardOfTrustees
+Version: 1.234
+*/