├── gulp-3 ├── .bowerrc ├── app │ ├── sass │ │ ├── main.sass │ │ └── libs.sass │ ├── js │ │ └── common.js │ ├── img │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ └── 3.jpg │ └── index.html ├── npm-shrinkwrap.zip ├── npm-shrinkwrap.json ├── package.json └── gulpfile.js ├── gulp-4 ├── .bowerrc ├── app │ ├── sass │ │ ├── main.sass │ │ └── libs.sass │ ├── js │ │ └── common.js │ ├── img │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ └── 3.jpg │ ├── index.html │ └── libs │ │ ├── magnific-popup │ │ └── dist │ │ │ ├── magnific-popup.css │ │ │ ├── jquery.magnific-popup.min.js │ │ │ └── jquery.magnific-popup.js │ │ └── jquery │ │ └── dist │ │ ├── core.js │ │ └── jquery.slim.min.js ├── dist │ ├── css │ │ ├── main.css │ │ └── libs.min.css │ ├── js │ │ └── common.js │ ├── img │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ └── 3.jpg │ └── index.html ├── package.json └── gulpfile.js └── .gitignore /gulp-3/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory" : "app/libs/" 3 | } -------------------------------------------------------------------------------- /gulp-4/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory" : "app/libs/" 3 | } -------------------------------------------------------------------------------- /gulp-3/app/sass/main.sass: -------------------------------------------------------------------------------- 1 | body 2 | background-color: pink 3 | -------------------------------------------------------------------------------- /gulp-4/app/sass/main.sass: -------------------------------------------------------------------------------- 1 | body 2 | background-color: pink 3 | -------------------------------------------------------------------------------- /gulp-4/dist/css/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: pink; 3 | } -------------------------------------------------------------------------------- /gulp-3/app/js/common.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // Пользовательские функции 4 | 5 | }); -------------------------------------------------------------------------------- /gulp-4/dist/css/libs.min.css: -------------------------------------------------------------------------------- 1 | @import "app/libs/magnific-popup/dist/magnific-popup.css"; -------------------------------------------------------------------------------- /gulp-4/app/js/common.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // Пользовательские функции 4 | 5 | }); -------------------------------------------------------------------------------- /gulp-4/dist/js/common.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // Пользовательские функции 4 | 5 | }); -------------------------------------------------------------------------------- /gulp-3/app/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-3/app/img/1.jpg -------------------------------------------------------------------------------- /gulp-3/app/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-3/app/img/2.jpg -------------------------------------------------------------------------------- /gulp-3/app/img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-3/app/img/3.jpg -------------------------------------------------------------------------------- /gulp-4/app/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-4/app/img/1.jpg -------------------------------------------------------------------------------- /gulp-4/app/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-4/app/img/2.jpg -------------------------------------------------------------------------------- /gulp-4/app/img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-4/app/img/3.jpg -------------------------------------------------------------------------------- /gulp-4/dist/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-4/dist/img/1.jpg -------------------------------------------------------------------------------- /gulp-4/dist/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-4/dist/img/2.jpg -------------------------------------------------------------------------------- /gulp-4/dist/img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-4/dist/img/3.jpg -------------------------------------------------------------------------------- /gulp-3/npm-shrinkwrap.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agragregra/gulp-beginners/HEAD/gulp-3/npm-shrinkwrap.zip -------------------------------------------------------------------------------- /gulp-3/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "graceful-fs": { 4 | "version": "4.2.2" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /gulp-4/app/sass/libs.sass: -------------------------------------------------------------------------------- 1 | @import "app/libs/magnific-popup/dist/magnific-popup.css" // Импортируем библиотеку Magnific Popup. 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /**/node_modules/ 2 | /.git/ 3 | **/app/css/ 4 | /**/*.psd 5 | /**/package-lock.json 6 | /**/Thumbs.db 7 | /**/.DS_Store 8 | /**/debug.log 9 | -------------------------------------------------------------------------------- /gulp-3/app/sass/libs.sass: -------------------------------------------------------------------------------- 1 | @import "app/libs/magnific-popup/dist/magnific-popup.css" // Импортируем библиотеку Magnific Popup. Теперь обязательно указывается расширение .css 2 | -------------------------------------------------------------------------------- /gulp-3/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | Далеко-далеко за словесными горами в стране, гласных и согласных живут рыбные тексты. Которой над взобравшись дорогу рыбными свой деревни, парадигматическая она сбить даль щеке! Прямо мир агенство о предложения буквенных реторический это. 12 | 13 |

Alt

14 |

Alt

15 |

Alt

16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gulp-4/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | Далеко-далеко за словесными горами в стране, гласных и согласных живут рыбные тексты. Которой над взобравшись дорогу рыбными свой деревни, парадигматическая она сбить даль щеке! Прямо мир агенство о предложения буквенных реторический это. 12 | 13 |

Alt

14 |

Alt

15 |

Alt

16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gulp-4/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | Далеко-далеко за словесными горами в стране, гласных и согласных живут рыбные тексты. Которой над взобравшись дорогу рыбными свой деревни, парадигматическая она сбить даль щеке! Прямо мир агенство о предложения буквенных реторический это. 12 | 13 |

Alt

14 |

Alt

15 |

Alt

16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gulp-3/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myproject", 3 | "version": "1.0.0", 4 | "description": "My First Gulp Project", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "WebDesign Master", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "browser-sync": "^3.0.2", 13 | "gulp": "^3.9.1", 14 | "gulp-autoprefixer": "^6.1.0", 15 | "gulp-cache": "^1.1.3", 16 | "gulp-clean": "^0.4.0", 17 | "gulp-concat": "^2.6.1", 18 | "gulp-cssnano": "^2.1.3", 19 | "gulp-imagemin": "^3.0.0", 20 | "gulp-rename": "^2.0.0", 21 | "gulp-sass": "^5.1.0", 22 | "gulp-uglifyjs": "^0.6.2", 23 | "imagemin-pngquant": "^9.0.2", 24 | "sass": "^1.70.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /gulp-4/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myproject", 3 | "version": "1.0.0", 4 | "description": "My First Gulp Project", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "WebDesign Master", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "browser-sync": "^3.0.3", 13 | "gulp": "^4.0.2", 14 | "gulp-autoprefixer": "^8.0.0", 15 | "gulp-cache": "^1.1.3", 16 | "gulp-clean": "^0.4.0", 17 | "gulp-concat": "^2.6.1", 18 | "gulp-cssnano": "^2.1.3", 19 | "gulp-imagemin": "^7.1.0", 20 | "gulp-rename": "^2.0.0", 21 | "gulp-sass": "^5.1.0", 22 | "gulp-uglifyjs": "^0.6.2", 23 | "imagemin-pngquant": "^9.0.2", 24 | "sass": "^1.85.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /gulp-3/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), // Подключаем Gulp 2 | sass = require('gulp-sass')(require('sass')), //Подключаем Sass пакет, 3 | browserSync = require('browser-sync'), // Подключаем Browser Sync 4 | concat = require('gulp-concat'), // Подключаем gulp-concat (для конкатенации файлов) 5 | uglify = require('gulp-uglifyjs'), // Подключаем gulp-uglifyjs (для сжатия JS) 6 | cssnano = require('gulp-cssnano'), // Подключаем пакет для минификации CSS 7 | rename = require('gulp-rename'), // Подключаем библиотеку для переименования файлов 8 | clean = require('gulp-clean'), // Подключаем модуль gulp-clean (вместо del) 9 | imagemin = require('gulp-imagemin'), // Подключаем библиотеку для работы с изображениями 10 | pngquant = require('imagemin-pngquant'), // Подключаем библиотеку для работы с png 11 | cache = require('gulp-cache'), // Подключаем библиотеку кеширования 12 | autoprefixer = require('gulp-autoprefixer');// Подключаем библиотеку для автоматического добавления префиксов 13 | 14 | gulp.task('sass', function(){ // Создаем таск Sass 15 | return gulp.src('app/sass/**/*.sass') // Берем источник 16 | .pipe(sass()) // Преобразуем Sass в CSS посредством gulp-sass 17 | .pipe(autoprefixer(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true })) // Создаем префиксы 18 | .pipe(gulp.dest('app/css')) // Выгружаем результата в папку app/css 19 | .pipe(browserSync.reload({stream: true})) // Обновляем CSS на странице при изменении 20 | }); 21 | 22 | gulp.task('browser-sync', function() { // Создаем таск browser-sync 23 | browserSync({ // Выполняем browserSync 24 | server: { // Определяем параметры сервера 25 | baseDir: 'app' // Директория для сервера - app 26 | }, 27 | notify: false // Отключаем уведомления 28 | }); 29 | }); 30 | 31 | gulp.task('scripts', function() { 32 | return gulp.src([ // Берем все необходимые библиотеки 33 | 'app/libs/jquery/dist/jquery.min.js', // Берем jQuery 34 | 'app/libs/magnific-popup/dist/jquery.magnific-popup.min.js' // Берем Magnific Popup 35 | ]) 36 | .pipe(concat('libs.min.js')) // Собираем их в кучу в новом файле libs.min.js 37 | .pipe(uglify()) // Сжимаем JS файл 38 | .pipe(gulp.dest('app/js')); // Выгружаем в папку app/js 39 | }); 40 | 41 | gulp.task('css-libs', ['sass'], function() { 42 | return gulp.src('app/css/libs.sass') // Выбираем файл для минификации 43 | .pipe(sass()) // Преобразуем Sass в CSS посредством gulp-sass 44 | .pipe(cssnano()) // Сжимаем 45 | .pipe(rename({suffix: '.min'})) // Добавляем суффикс .min 46 | .pipe(gulp.dest('app/css')); // Выгружаем в папку app/css 47 | }); 48 | 49 | gulp.task('clean', function() { 50 | return src('dist', {allowEmpty: true}).pipe(clean()) // Удаляем папку dist перед сборкой 51 | }); 52 | 53 | gulp.task('img', function() { 54 | return gulp.src('app/img/**/*') // Берем все изображения из app 55 | .pipe(cache(imagemin({ // С кешированием 56 | // .pipe(imagemin({ // Сжимаем изображения без кеширования 57 | interlaced: true, 58 | progressive: true, 59 | svgoPlugins: [{removeViewBox: false}], 60 | use: [pngquant()] 61 | }))/**/) 62 | .pipe(gulp.dest('dist/img')); // Выгружаем на продакшен 63 | }); 64 | 65 | gulp.task('build', ['clean', 'img', 'sass', 'scripts'], function() { 66 | 67 | var buildCss = gulp.src([ // Переносим библиотеки в продакшен 68 | 'app/css/main.css', 69 | 'app/css/libs.min.css' 70 | ]) 71 | .pipe(gulp.dest('dist/css')) 72 | 73 | var buildFonts = gulp.src('app/fonts/**/*') // Переносим шрифты в продакшен 74 | .pipe(gulp.dest('dist/fonts')) 75 | 76 | var buildJs = gulp.src('app/js/**/*') // Переносим скрипты в продакшен 77 | .pipe(gulp.dest('dist/js')) 78 | 79 | var buildHtml = gulp.src('app/*.html') // Переносим HTML в продакшен 80 | .pipe(gulp.dest('dist')); 81 | 82 | }); 83 | 84 | gulp.task('clear', function (callback) { 85 | return cache.clearAll(); 86 | }); 87 | 88 | gulp.task('watch', ['browser-sync', 'css-libs', 'scripts'], function() { 89 | gulp.watch('app/sass/**/*.sass', ['sass']); // Наблюдение за sass файлами в папке sass 90 | gulp.watch('app/*.html', browserSync.reload); // Наблюдение за HTML файлами в корне проекта 91 | gulp.watch(['app/js/common.js', 'app/libs/**/*.js'], browserSync.reload); // Наблюдение за JS файлами в папке js 92 | }); 93 | 94 | gulp.task('default', ['watch']); -------------------------------------------------------------------------------- /gulp-4/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), // Подключаем Gulp 2 | sass = require('gulp-sass')(require('sass')), //Подключаем Sass пакет, 3 | browserSync = require('browser-sync'), // Подключаем Browser Sync 4 | concat = require('gulp-concat'), // Подключаем gulp-concat (для конкатенации файлов) 5 | uglify = require('gulp-uglifyjs'), // Подключаем gulp-uglifyjs (для сжатия JS) 6 | cssnano = require('gulp-cssnano'), // Подключаем пакет для минификации CSS 7 | rename = require('gulp-rename'), // Подключаем библиотеку для переименования файлов 8 | clean = require('gulp-clean'), // Подключаем модуль gulp-clean (вместо del) 9 | imagemin = require('gulp-imagemin'), // Подключаем библиотеку для работы с изображениями 10 | pngquant = require('imagemin-pngquant'), // Подключаем библиотеку для работы с png 11 | cache = require('gulp-cache'), // Подключаем библиотеку кеширования 12 | autoprefixer = require('gulp-autoprefixer');// Подключаем библиотеку для автоматического добавления префиксов 13 | 14 | gulp.task('sass', function() { // Создаем таск Sass 15 | return gulp.src('app/sass/**/*.sass') // Берем источник 16 | .pipe(sass()) // Преобразуем Sass в CSS посредством gulp-sass 17 | .pipe(autoprefixer(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true })) // Создаем префиксы 18 | .pipe(gulp.dest('app/css')) // Выгружаем результата в папку app/css 19 | .pipe(browserSync.reload({stream: true})) // Обновляем CSS на странице при изменении 20 | }); 21 | 22 | gulp.task('browser-sync', function() { // Создаем таск browser-sync 23 | browserSync({ // Выполняем browserSync 24 | server: { // Определяем параметры сервера 25 | baseDir: 'app' // Директория для сервера - app 26 | }, 27 | notify: false // Отключаем уведомления 28 | }); 29 | }); 30 | 31 | gulp.task('scripts', function() { 32 | return gulp.src([ // Берем все необходимые библиотеки 33 | 'app/libs/jquery/dist/jquery.min.js', // Берем jQuery 34 | 'app/libs/magnific-popup/dist/jquery.magnific-popup.min.js' // Берем Magnific Popup 35 | ]) 36 | .pipe(concat('libs.min.js')) // Собираем их в кучу в новом файле libs.min.js 37 | .pipe(uglify()) // Сжимаем JS файл 38 | .pipe(gulp.dest('app/js')); // Выгружаем в папку app/js 39 | }); 40 | 41 | gulp.task('code', function() { 42 | return gulp.src('app/*.html') 43 | .pipe(browserSync.reload({ stream: true })) 44 | }); 45 | 46 | gulp.task('css-libs', function() { 47 | return gulp.src('app/sass/libs.sass') // Выбираем файл для минификации 48 | .pipe(sass()) // Преобразуем Sass в CSS посредством gulp-sass 49 | .pipe(cssnano()) // Сжимаем 50 | .pipe(rename({suffix: '.min'})) // Добавляем суффикс .min 51 | .pipe(gulp.dest('app/css')); // Выгружаем в папку app/css 52 | }); 53 | 54 | gulp.task('clean', function() { 55 | return gulp.src('dist', {allowEmpty: true}).pipe(clean()); // Удаляем папку dist перед сборкой 56 | }); 57 | 58 | gulp.task('img', function() { 59 | return gulp.src('app/img/**/*') // Берем все изображения из app 60 | .pipe(cache(imagemin({ // С кешированием 61 | // .pipe(imagemin({ // Сжимаем изображения без кеширования 62 | interlaced: true, 63 | progressive: true, 64 | svgoPlugins: [{removeViewBox: false}], 65 | use: [pngquant()] 66 | }))/**/) 67 | .pipe(gulp.dest('dist/img')); // Выгружаем на продакшен 68 | }); 69 | 70 | gulp.task('prebuild', async function() { 71 | 72 | var buildCss = gulp.src([ // Переносим библиотеки в продакшен 73 | 'app/css/main.css', 74 | 'app/css/libs.min.css' 75 | ]) 76 | .pipe(gulp.dest('dist/css')) 77 | 78 | var buildFonts = gulp.src('app/fonts/**/*') // Переносим шрифты в продакшен 79 | .pipe(gulp.dest('dist/fonts')) 80 | 81 | var buildJs = gulp.src('app/js/**/*') // Переносим скрипты в продакшен 82 | .pipe(gulp.dest('dist/js')) 83 | 84 | var buildHtml = gulp.src('app/*.html') // Переносим HTML в продакшен 85 | .pipe(gulp.dest('dist')); 86 | 87 | }); 88 | 89 | gulp.task('clear', function (callback) { 90 | return cache.clearAll(); 91 | }) 92 | 93 | gulp.task('watch', function() { 94 | gulp.watch('app/sass/**/*.sass', gulp.parallel('sass')); // Наблюдение за sass файлами 95 | gulp.watch('app/*.html', gulp.parallel('code')); // Наблюдение за HTML файлами в корне проекта 96 | gulp.watch(['app/js/common.js', 'app/libs/**/*.js'], gulp.parallel('scripts')); // Наблюдение за главным JS файлом и за библиотеками 97 | }); 98 | gulp.task('default', gulp.parallel('css-libs', 'sass', 'scripts', 'browser-sync', 'watch')); 99 | gulp.task('build', gulp.series('clean', 'prebuild', 'img', 'sass', 'scripts')); -------------------------------------------------------------------------------- /gulp-4/app/libs/magnific-popup/dist/magnific-popup.css: -------------------------------------------------------------------------------- 1 | /* Magnific Popup CSS */ 2 | .mfp-bg { 3 | top: 0; 4 | left: 0; 5 | width: 100%; 6 | height: 100%; 7 | z-index: 1042; 8 | overflow: hidden; 9 | position: fixed; 10 | background: #0b0b0b; 11 | opacity: 0.8; } 12 | 13 | .mfp-wrap { 14 | top: 0; 15 | left: 0; 16 | width: 100%; 17 | height: 100%; 18 | z-index: 1043; 19 | position: fixed; 20 | outline: none !important; 21 | -webkit-backface-visibility: hidden; } 22 | 23 | .mfp-container { 24 | text-align: center; 25 | position: absolute; 26 | width: 100%; 27 | height: 100%; 28 | left: 0; 29 | top: 0; 30 | padding: 0 8px; 31 | box-sizing: border-box; } 32 | 33 | .mfp-container:before { 34 | content: ''; 35 | display: inline-block; 36 | height: 100%; 37 | vertical-align: middle; } 38 | 39 | .mfp-align-top .mfp-container:before { 40 | display: none; } 41 | 42 | .mfp-content { 43 | position: relative; 44 | display: inline-block; 45 | vertical-align: middle; 46 | margin: 0 auto; 47 | text-align: left; 48 | z-index: 1045; } 49 | 50 | .mfp-inline-holder .mfp-content, 51 | .mfp-ajax-holder .mfp-content { 52 | width: 100%; 53 | cursor: auto; } 54 | 55 | .mfp-ajax-cur { 56 | cursor: progress; } 57 | 58 | .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { 59 | cursor: -moz-zoom-out; 60 | cursor: -webkit-zoom-out; 61 | cursor: zoom-out; } 62 | 63 | .mfp-zoom { 64 | cursor: pointer; 65 | cursor: -webkit-zoom-in; 66 | cursor: -moz-zoom-in; 67 | cursor: zoom-in; } 68 | 69 | .mfp-auto-cursor .mfp-content { 70 | cursor: auto; } 71 | 72 | .mfp-close, 73 | .mfp-arrow, 74 | .mfp-preloader, 75 | .mfp-counter { 76 | -webkit-user-select: none; 77 | -moz-user-select: none; 78 | user-select: none; } 79 | 80 | .mfp-loading.mfp-figure { 81 | display: none; } 82 | 83 | .mfp-hide { 84 | display: none !important; } 85 | 86 | .mfp-preloader { 87 | color: #CCC; 88 | position: absolute; 89 | top: 50%; 90 | width: auto; 91 | text-align: center; 92 | margin-top: -0.8em; 93 | left: 8px; 94 | right: 8px; 95 | z-index: 1044; } 96 | .mfp-preloader a { 97 | color: #CCC; } 98 | .mfp-preloader a:hover { 99 | color: #FFF; } 100 | 101 | .mfp-s-ready .mfp-preloader { 102 | display: none; } 103 | 104 | .mfp-s-error .mfp-content { 105 | display: none; } 106 | 107 | button.mfp-close, 108 | button.mfp-arrow { 109 | overflow: visible; 110 | cursor: pointer; 111 | background: transparent; 112 | border: 0; 113 | -webkit-appearance: none; 114 | display: block; 115 | outline: none; 116 | padding: 0; 117 | z-index: 1046; 118 | box-shadow: none; 119 | touch-action: manipulation; } 120 | 121 | button::-moz-focus-inner { 122 | padding: 0; 123 | border: 0; } 124 | 125 | .mfp-close { 126 | width: 44px; 127 | height: 44px; 128 | line-height: 44px; 129 | position: absolute; 130 | right: 0; 131 | top: 0; 132 | text-decoration: none; 133 | text-align: center; 134 | opacity: 0.65; 135 | padding: 0 0 18px 10px; 136 | color: #FFF; 137 | font-style: normal; 138 | font-size: 28px; 139 | font-family: Arial, Baskerville, monospace; } 140 | .mfp-close:hover, 141 | .mfp-close:focus { 142 | opacity: 1; } 143 | .mfp-close:active { 144 | top: 1px; } 145 | 146 | .mfp-close-btn-in .mfp-close { 147 | color: #333; } 148 | 149 | .mfp-image-holder .mfp-close, 150 | .mfp-iframe-holder .mfp-close { 151 | color: #FFF; 152 | right: -6px; 153 | text-align: right; 154 | padding-right: 6px; 155 | width: 100%; } 156 | 157 | .mfp-counter { 158 | position: absolute; 159 | top: 0; 160 | right: 0; 161 | color: #CCC; 162 | font-size: 12px; 163 | line-height: 18px; 164 | white-space: nowrap; } 165 | 166 | .mfp-arrow { 167 | position: absolute; 168 | opacity: 0.65; 169 | margin: 0; 170 | top: 50%; 171 | margin-top: -55px; 172 | padding: 0; 173 | width: 90px; 174 | height: 110px; 175 | -webkit-tap-highlight-color: transparent; } 176 | .mfp-arrow:active { 177 | margin-top: -54px; } 178 | .mfp-arrow:hover, 179 | .mfp-arrow:focus { 180 | opacity: 1; } 181 | .mfp-arrow:before, 182 | .mfp-arrow:after { 183 | content: ''; 184 | display: block; 185 | width: 0; 186 | height: 0; 187 | position: absolute; 188 | left: 0; 189 | top: 0; 190 | margin-top: 35px; 191 | margin-left: 35px; 192 | border: medium inset transparent; } 193 | .mfp-arrow:after { 194 | border-top-width: 13px; 195 | border-bottom-width: 13px; 196 | top: 8px; } 197 | .mfp-arrow:before { 198 | border-top-width: 21px; 199 | border-bottom-width: 21px; 200 | opacity: 0.7; } 201 | 202 | .mfp-arrow-left { 203 | left: 0; } 204 | .mfp-arrow-left:after { 205 | border-right: 17px solid #FFF; 206 | margin-left: 31px; } 207 | .mfp-arrow-left:before { 208 | margin-left: 25px; 209 | border-right: 27px solid #3F3F3F; } 210 | 211 | .mfp-arrow-right { 212 | right: 0; } 213 | .mfp-arrow-right:after { 214 | border-left: 17px solid #FFF; 215 | margin-left: 39px; } 216 | .mfp-arrow-right:before { 217 | border-left: 27px solid #3F3F3F; } 218 | 219 | .mfp-iframe-holder { 220 | padding-top: 40px; 221 | padding-bottom: 40px; } 222 | .mfp-iframe-holder .mfp-content { 223 | line-height: 0; 224 | width: 100%; 225 | max-width: 900px; } 226 | .mfp-iframe-holder .mfp-close { 227 | top: -40px; } 228 | 229 | .mfp-iframe-scaler { 230 | width: 100%; 231 | height: 0; 232 | overflow: hidden; 233 | padding-top: 56.25%; } 234 | .mfp-iframe-scaler iframe { 235 | position: absolute; 236 | display: block; 237 | top: 0; 238 | left: 0; 239 | width: 100%; 240 | height: 100%; 241 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 242 | background: #000; } 243 | 244 | /* Main image in popup */ 245 | img.mfp-img { 246 | width: auto; 247 | max-width: 100%; 248 | height: auto; 249 | display: block; 250 | line-height: 0; 251 | box-sizing: border-box; 252 | padding: 40px 0 40px; 253 | margin: 0 auto; } 254 | 255 | /* The shadow behind the image */ 256 | .mfp-figure { 257 | line-height: 0; } 258 | .mfp-figure:after { 259 | content: ''; 260 | position: absolute; 261 | left: 0; 262 | top: 40px; 263 | bottom: 40px; 264 | display: block; 265 | right: 0; 266 | width: auto; 267 | height: auto; 268 | z-index: -1; 269 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 270 | background: #444; } 271 | .mfp-figure small { 272 | color: #BDBDBD; 273 | display: block; 274 | font-size: 12px; 275 | line-height: 14px; } 276 | .mfp-figure figure { 277 | margin: 0; } 278 | 279 | .mfp-bottom-bar { 280 | margin-top: -36px; 281 | position: absolute; 282 | top: 100%; 283 | left: 0; 284 | width: 100%; 285 | cursor: auto; } 286 | 287 | .mfp-title { 288 | text-align: left; 289 | line-height: 18px; 290 | color: #F3F3F3; 291 | word-wrap: break-word; 292 | padding-right: 36px; } 293 | 294 | .mfp-image-holder .mfp-content { 295 | max-width: 100%; } 296 | 297 | .mfp-gallery .mfp-image-holder .mfp-figure { 298 | cursor: pointer; } 299 | 300 | @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { 301 | /** 302 | * Remove all paddings around the image on small screen 303 | */ 304 | .mfp-img-mobile .mfp-image-holder { 305 | padding-left: 0; 306 | padding-right: 0; } 307 | .mfp-img-mobile img.mfp-img { 308 | padding: 0; } 309 | .mfp-img-mobile .mfp-figure:after { 310 | top: 0; 311 | bottom: 0; } 312 | .mfp-img-mobile .mfp-figure small { 313 | display: inline; 314 | margin-left: 5px; } 315 | .mfp-img-mobile .mfp-bottom-bar { 316 | background: rgba(0, 0, 0, 0.6); 317 | bottom: 0; 318 | margin: 0; 319 | top: auto; 320 | padding: 3px 5px; 321 | position: fixed; 322 | box-sizing: border-box; } 323 | .mfp-img-mobile .mfp-bottom-bar:empty { 324 | padding: 0; } 325 | .mfp-img-mobile .mfp-counter { 326 | right: 5px; 327 | top: 3px; } 328 | .mfp-img-mobile .mfp-close { 329 | top: 0; 330 | right: 0; 331 | width: 35px; 332 | height: 35px; 333 | line-height: 35px; 334 | background: rgba(0, 0, 0, 0.6); 335 | position: fixed; 336 | text-align: center; 337 | padding: 0; } } 338 | 339 | @media all and (max-width: 900px) { 340 | .mfp-arrow { 341 | -webkit-transform: scale(0.75); 342 | transform: scale(0.75); } 343 | .mfp-arrow-left { 344 | -webkit-transform-origin: 0; 345 | transform-origin: 0; } 346 | .mfp-arrow-right { 347 | -webkit-transform-origin: 100%; 348 | transform-origin: 100%; } 349 | .mfp-container { 350 | padding-left: 6px; 351 | padding-right: 6px; } } 352 | -------------------------------------------------------------------------------- /gulp-4/app/libs/jquery/dist/core.js: -------------------------------------------------------------------------------- 1 | /* global Symbol */ 2 | // Defining this global in .eslintrc.json would create a danger of using the global 3 | // unguarded in another place, it seems safer to define global only for this module 4 | 5 | define( [ 6 | "./var/arr", 7 | "./var/document", 8 | "./var/getProto", 9 | "./var/slice", 10 | "./var/concat", 11 | "./var/push", 12 | "./var/indexOf", 13 | "./var/class2type", 14 | "./var/toString", 15 | "./var/hasOwn", 16 | "./var/fnToString", 17 | "./var/ObjectFunctionString", 18 | "./var/support", 19 | "./var/isFunction", 20 | "./var/isWindow", 21 | "./core/DOMEval", 22 | "./core/toType" 23 | ], function( arr, document, getProto, slice, concat, push, indexOf, 24 | class2type, toString, hasOwn, fnToString, ObjectFunctionString, 25 | support, isFunction, isWindow, DOMEval, toType ) { 26 | 27 | "use strict"; 28 | 29 | var 30 | version = "3.4.1", 31 | 32 | // Define a local copy of jQuery 33 | jQuery = function( selector, context ) { 34 | 35 | // The jQuery object is actually just the init constructor 'enhanced' 36 | // Need init if jQuery is called (just allow error to be thrown if not included) 37 | return new jQuery.fn.init( selector, context ); 38 | }, 39 | 40 | // Support: Android <=4.0 only 41 | // Make sure we trim BOM and NBSP 42 | rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 43 | 44 | jQuery.fn = jQuery.prototype = { 45 | 46 | // The current version of jQuery being used 47 | jquery: version, 48 | 49 | constructor: jQuery, 50 | 51 | // The default length of a jQuery object is 0 52 | length: 0, 53 | 54 | toArray: function() { 55 | return slice.call( this ); 56 | }, 57 | 58 | // Get the Nth element in the matched element set OR 59 | // Get the whole matched element set as a clean array 60 | get: function( num ) { 61 | 62 | // Return all the elements in a clean array 63 | if ( num == null ) { 64 | return slice.call( this ); 65 | } 66 | 67 | // Return just the one element from the set 68 | return num < 0 ? this[ num + this.length ] : this[ num ]; 69 | }, 70 | 71 | // Take an array of elements and push it onto the stack 72 | // (returning the new matched element set) 73 | pushStack: function( elems ) { 74 | 75 | // Build a new jQuery matched element set 76 | var ret = jQuery.merge( this.constructor(), elems ); 77 | 78 | // Add the old object onto the stack (as a reference) 79 | ret.prevObject = this; 80 | 81 | // Return the newly-formed element set 82 | return ret; 83 | }, 84 | 85 | // Execute a callback for every element in the matched set. 86 | each: function( callback ) { 87 | return jQuery.each( this, callback ); 88 | }, 89 | 90 | map: function( callback ) { 91 | return this.pushStack( jQuery.map( this, function( elem, i ) { 92 | return callback.call( elem, i, elem ); 93 | } ) ); 94 | }, 95 | 96 | slice: function() { 97 | return this.pushStack( slice.apply( this, arguments ) ); 98 | }, 99 | 100 | first: function() { 101 | return this.eq( 0 ); 102 | }, 103 | 104 | last: function() { 105 | return this.eq( -1 ); 106 | }, 107 | 108 | eq: function( i ) { 109 | var len = this.length, 110 | j = +i + ( i < 0 ? len : 0 ); 111 | return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 112 | }, 113 | 114 | end: function() { 115 | return this.prevObject || this.constructor(); 116 | }, 117 | 118 | // For internal use only. 119 | // Behaves like an Array's method, not like a jQuery method. 120 | push: push, 121 | sort: arr.sort, 122 | splice: arr.splice 123 | }; 124 | 125 | jQuery.extend = jQuery.fn.extend = function() { 126 | var options, name, src, copy, copyIsArray, clone, 127 | target = arguments[ 0 ] || {}, 128 | i = 1, 129 | length = arguments.length, 130 | deep = false; 131 | 132 | // Handle a deep copy situation 133 | if ( typeof target === "boolean" ) { 134 | deep = target; 135 | 136 | // Skip the boolean and the target 137 | target = arguments[ i ] || {}; 138 | i++; 139 | } 140 | 141 | // Handle case when target is a string or something (possible in deep copy) 142 | if ( typeof target !== "object" && !isFunction( target ) ) { 143 | target = {}; 144 | } 145 | 146 | // Extend jQuery itself if only one argument is passed 147 | if ( i === length ) { 148 | target = this; 149 | i--; 150 | } 151 | 152 | for ( ; i < length; i++ ) { 153 | 154 | // Only deal with non-null/undefined values 155 | if ( ( options = arguments[ i ] ) != null ) { 156 | 157 | // Extend the base object 158 | for ( name in options ) { 159 | copy = options[ name ]; 160 | 161 | // Prevent Object.prototype pollution 162 | // Prevent never-ending loop 163 | if ( name === "__proto__" || target === copy ) { 164 | continue; 165 | } 166 | 167 | // Recurse if we're merging plain objects or arrays 168 | if ( deep && copy && ( jQuery.isPlainObject( copy ) || 169 | ( copyIsArray = Array.isArray( copy ) ) ) ) { 170 | src = target[ name ]; 171 | 172 | // Ensure proper type for the source value 173 | if ( copyIsArray && !Array.isArray( src ) ) { 174 | clone = []; 175 | } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { 176 | clone = {}; 177 | } else { 178 | clone = src; 179 | } 180 | copyIsArray = false; 181 | 182 | // Never move original objects, clone them 183 | target[ name ] = jQuery.extend( deep, clone, copy ); 184 | 185 | // Don't bring in undefined values 186 | } else if ( copy !== undefined ) { 187 | target[ name ] = copy; 188 | } 189 | } 190 | } 191 | } 192 | 193 | // Return the modified object 194 | return target; 195 | }; 196 | 197 | jQuery.extend( { 198 | 199 | // Unique for each copy of jQuery on the page 200 | expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 201 | 202 | // Assume jQuery is ready without the ready module 203 | isReady: true, 204 | 205 | error: function( msg ) { 206 | throw new Error( msg ); 207 | }, 208 | 209 | noop: function() {}, 210 | 211 | isPlainObject: function( obj ) { 212 | var proto, Ctor; 213 | 214 | // Detect obvious negatives 215 | // Use toString instead of jQuery.type to catch host objects 216 | if ( !obj || toString.call( obj ) !== "[object Object]" ) { 217 | return false; 218 | } 219 | 220 | proto = getProto( obj ); 221 | 222 | // Objects with no prototype (e.g., `Object.create( null )`) are plain 223 | if ( !proto ) { 224 | return true; 225 | } 226 | 227 | // Objects with prototype are plain iff they were constructed by a global Object function 228 | Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; 229 | return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; 230 | }, 231 | 232 | isEmptyObject: function( obj ) { 233 | var name; 234 | 235 | for ( name in obj ) { 236 | return false; 237 | } 238 | return true; 239 | }, 240 | 241 | // Evaluates a script in a global context 242 | globalEval: function( code, options ) { 243 | DOMEval( code, { nonce: options && options.nonce } ); 244 | }, 245 | 246 | each: function( obj, callback ) { 247 | var length, i = 0; 248 | 249 | if ( isArrayLike( obj ) ) { 250 | length = obj.length; 251 | for ( ; i < length; i++ ) { 252 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 253 | break; 254 | } 255 | } 256 | } else { 257 | for ( i in obj ) { 258 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 259 | break; 260 | } 261 | } 262 | } 263 | 264 | return obj; 265 | }, 266 | 267 | // Support: Android <=4.0 only 268 | trim: function( text ) { 269 | return text == null ? 270 | "" : 271 | ( text + "" ).replace( rtrim, "" ); 272 | }, 273 | 274 | // results is for internal usage only 275 | makeArray: function( arr, results ) { 276 | var ret = results || []; 277 | 278 | if ( arr != null ) { 279 | if ( isArrayLike( Object( arr ) ) ) { 280 | jQuery.merge( ret, 281 | typeof arr === "string" ? 282 | [ arr ] : arr 283 | ); 284 | } else { 285 | push.call( ret, arr ); 286 | } 287 | } 288 | 289 | return ret; 290 | }, 291 | 292 | inArray: function( elem, arr, i ) { 293 | return arr == null ? -1 : indexOf.call( arr, elem, i ); 294 | }, 295 | 296 | // Support: Android <=4.0 only, PhantomJS 1 only 297 | // push.apply(_, arraylike) throws on ancient WebKit 298 | merge: function( first, second ) { 299 | var len = +second.length, 300 | j = 0, 301 | i = first.length; 302 | 303 | for ( ; j < len; j++ ) { 304 | first[ i++ ] = second[ j ]; 305 | } 306 | 307 | first.length = i; 308 | 309 | return first; 310 | }, 311 | 312 | grep: function( elems, callback, invert ) { 313 | var callbackInverse, 314 | matches = [], 315 | i = 0, 316 | length = elems.length, 317 | callbackExpect = !invert; 318 | 319 | // Go through the array, only saving the items 320 | // that pass the validator function 321 | for ( ; i < length; i++ ) { 322 | callbackInverse = !callback( elems[ i ], i ); 323 | if ( callbackInverse !== callbackExpect ) { 324 | matches.push( elems[ i ] ); 325 | } 326 | } 327 | 328 | return matches; 329 | }, 330 | 331 | // arg is for internal usage only 332 | map: function( elems, callback, arg ) { 333 | var length, value, 334 | i = 0, 335 | ret = []; 336 | 337 | // Go through the array, translating each of the items to their new values 338 | if ( isArrayLike( elems ) ) { 339 | length = elems.length; 340 | for ( ; i < length; i++ ) { 341 | value = callback( elems[ i ], i, arg ); 342 | 343 | if ( value != null ) { 344 | ret.push( value ); 345 | } 346 | } 347 | 348 | // Go through every key on the object, 349 | } else { 350 | for ( i in elems ) { 351 | value = callback( elems[ i ], i, arg ); 352 | 353 | if ( value != null ) { 354 | ret.push( value ); 355 | } 356 | } 357 | } 358 | 359 | // Flatten any nested arrays 360 | return concat.apply( [], ret ); 361 | }, 362 | 363 | // A global GUID counter for objects 364 | guid: 1, 365 | 366 | // jQuery.support is not used in Core but other projects attach their 367 | // properties to it so it needs to exist. 368 | support: support 369 | } ); 370 | 371 | if ( typeof Symbol === "function" ) { 372 | jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; 373 | } 374 | 375 | // Populate the class2type map 376 | jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 377 | function( i, name ) { 378 | class2type[ "[object " + name + "]" ] = name.toLowerCase(); 379 | } ); 380 | 381 | function isArrayLike( obj ) { 382 | 383 | // Support: real iOS 8.2 only (not reproducible in simulator) 384 | // `in` check used to prevent JIT error (gh-2145) 385 | // hasOwn isn't used here due to false negatives 386 | // regarding Nodelist length in IE 387 | var length = !!obj && "length" in obj && obj.length, 388 | type = toType( obj ); 389 | 390 | if ( isFunction( obj ) || isWindow( obj ) ) { 391 | return false; 392 | } 393 | 394 | return type === "array" || length === 0 || 395 | typeof length === "number" && length > 0 && ( length - 1 ) in obj; 396 | } 397 | 398 | return jQuery; 399 | } ); 400 | -------------------------------------------------------------------------------- /gulp-4/app/libs/magnific-popup/dist/jquery.magnific-popup.min.js: -------------------------------------------------------------------------------- 1 | /*! Magnific Popup - v1.1.0 - 2016-02-20 2 | * http://dimsemenov.com/plugins/magnific-popup/ 3 | * Copyright (c) 2016 Dmitry Semenov; */ 4 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("
");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()}); -------------------------------------------------------------------------------- /gulp-4/app/libs/magnific-popup/dist/jquery.magnific-popup.js: -------------------------------------------------------------------------------- 1 | /*! Magnific Popup - v1.1.0 - 2016-02-20 2 | * http://dimsemenov.com/plugins/magnific-popup/ 3 | * Copyright (c) 2016 Dmitry Semenov; */ 4 | ;(function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define(['jquery'], factory); 8 | } else if (typeof exports === 'object') { 9 | // Node/CommonJS 10 | factory(require('jquery')); 11 | } else { 12 | // Browser globals 13 | factory(window.jQuery || window.Zepto); 14 | } 15 | }(function($) { 16 | 17 | /*>>core*/ 18 | /** 19 | * 20 | * Magnific Popup Core JS file 21 | * 22 | */ 23 | 24 | 25 | /** 26 | * Private static constants 27 | */ 28 | var CLOSE_EVENT = 'Close', 29 | BEFORE_CLOSE_EVENT = 'BeforeClose', 30 | AFTER_CLOSE_EVENT = 'AfterClose', 31 | BEFORE_APPEND_EVENT = 'BeforeAppend', 32 | MARKUP_PARSE_EVENT = 'MarkupParse', 33 | OPEN_EVENT = 'Open', 34 | CHANGE_EVENT = 'Change', 35 | NS = 'mfp', 36 | EVENT_NS = '.' + NS, 37 | READY_CLASS = 'mfp-ready', 38 | REMOVING_CLASS = 'mfp-removing', 39 | PREVENT_CLOSE_CLASS = 'mfp-prevent-close'; 40 | 41 | 42 | /** 43 | * Private vars 44 | */ 45 | /*jshint -W079 */ 46 | var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this' 47 | MagnificPopup = function(){}, 48 | _isJQ = !!(window.jQuery), 49 | _prevStatus, 50 | _window = $(window), 51 | _document, 52 | _prevContentType, 53 | _wrapClasses, 54 | _currPopupType; 55 | 56 | 57 | /** 58 | * Private functions 59 | */ 60 | var _mfpOn = function(name, f) { 61 | mfp.ev.on(NS + name + EVENT_NS, f); 62 | }, 63 | _getEl = function(className, appendTo, html, raw) { 64 | var el = document.createElement('div'); 65 | el.className = 'mfp-'+className; 66 | if(html) { 67 | el.innerHTML = html; 68 | } 69 | if(!raw) { 70 | el = $(el); 71 | if(appendTo) { 72 | el.appendTo(appendTo); 73 | } 74 | } else if(appendTo) { 75 | appendTo.appendChild(el); 76 | } 77 | return el; 78 | }, 79 | _mfpTrigger = function(e, data) { 80 | mfp.ev.triggerHandler(NS + e, data); 81 | 82 | if(mfp.st.callbacks) { 83 | // converts "mfpEventName" to "eventName" callback and triggers it if it's present 84 | e = e.charAt(0).toLowerCase() + e.slice(1); 85 | if(mfp.st.callbacks[e]) { 86 | mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]); 87 | } 88 | } 89 | }, 90 | _getCloseBtn = function(type) { 91 | if(type !== _currPopupType || !mfp.currTemplate.closeBtn) { 92 | mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) ); 93 | _currPopupType = type; 94 | } 95 | return mfp.currTemplate.closeBtn; 96 | }, 97 | // Initialize Magnific Popup only when called at least once 98 | _checkInstance = function() { 99 | if(!$.magnificPopup.instance) { 100 | /*jshint -W020 */ 101 | mfp = new MagnificPopup(); 102 | mfp.init(); 103 | $.magnificPopup.instance = mfp; 104 | } 105 | }, 106 | // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr 107 | supportsTransitions = function() { 108 | var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist 109 | v = ['ms','O','Moz','Webkit']; // 'v' for vendor 110 | 111 | if( s['transition'] !== undefined ) { 112 | return true; 113 | } 114 | 115 | while( v.length ) { 116 | if( v.pop() + 'Transition' in s ) { 117 | return true; 118 | } 119 | } 120 | 121 | return false; 122 | }; 123 | 124 | 125 | 126 | /** 127 | * Public functions 128 | */ 129 | MagnificPopup.prototype = { 130 | 131 | constructor: MagnificPopup, 132 | 133 | /** 134 | * Initializes Magnific Popup plugin. 135 | * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed 136 | */ 137 | init: function() { 138 | var appVersion = navigator.appVersion; 139 | mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener; 140 | mfp.isAndroid = (/android/gi).test(appVersion); 141 | mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion); 142 | mfp.supportsTransition = supportsTransitions(); 143 | 144 | // We disable fixed positioned lightbox on devices that don't handle it nicely. 145 | // If you know a better way of detecting this - let me know. 146 | mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) ); 147 | _document = $(document); 148 | 149 | mfp.popupsCache = {}; 150 | }, 151 | 152 | /** 153 | * Opens popup 154 | * @param data [description] 155 | */ 156 | open: function(data) { 157 | 158 | var i; 159 | 160 | if(data.isObj === false) { 161 | // convert jQuery collection to array to avoid conflicts later 162 | mfp.items = data.items.toArray(); 163 | 164 | mfp.index = 0; 165 | var items = data.items, 166 | item; 167 | for(i = 0; i < items.length; i++) { 168 | item = items[i]; 169 | if(item.parsed) { 170 | item = item.el[0]; 171 | } 172 | if(item === data.el[0]) { 173 | mfp.index = i; 174 | break; 175 | } 176 | } 177 | } else { 178 | mfp.items = $.isArray(data.items) ? data.items : [data.items]; 179 | mfp.index = data.index || 0; 180 | } 181 | 182 | // if popup is already opened - we just update the content 183 | if(mfp.isOpen) { 184 | mfp.updateItemHTML(); 185 | return; 186 | } 187 | 188 | mfp.types = []; 189 | _wrapClasses = ''; 190 | if(data.mainEl && data.mainEl.length) { 191 | mfp.ev = data.mainEl.eq(0); 192 | } else { 193 | mfp.ev = _document; 194 | } 195 | 196 | if(data.key) { 197 | if(!mfp.popupsCache[data.key]) { 198 | mfp.popupsCache[data.key] = {}; 199 | } 200 | mfp.currTemplate = mfp.popupsCache[data.key]; 201 | } else { 202 | mfp.currTemplate = {}; 203 | } 204 | 205 | 206 | 207 | mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); 208 | mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos; 209 | 210 | if(mfp.st.modal) { 211 | mfp.st.closeOnContentClick = false; 212 | mfp.st.closeOnBgClick = false; 213 | mfp.st.showCloseBtn = false; 214 | mfp.st.enableEscapeKey = false; 215 | } 216 | 217 | 218 | // Building markup 219 | // main containers are created only once 220 | if(!mfp.bgOverlay) { 221 | 222 | // Dark overlay 223 | mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() { 224 | mfp.close(); 225 | }); 226 | 227 | mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) { 228 | if(mfp._checkIfClose(e.target)) { 229 | mfp.close(); 230 | } 231 | }); 232 | 233 | mfp.container = _getEl('container', mfp.wrap); 234 | } 235 | 236 | mfp.contentContainer = _getEl('content'); 237 | if(mfp.st.preloader) { 238 | mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading); 239 | } 240 | 241 | 242 | // Initializing modules 243 | var modules = $.magnificPopup.modules; 244 | for(i = 0; i < modules.length; i++) { 245 | var n = modules[i]; 246 | n = n.charAt(0).toUpperCase() + n.slice(1); 247 | mfp['init'+n].call(mfp); 248 | } 249 | _mfpTrigger('BeforeOpen'); 250 | 251 | 252 | if(mfp.st.showCloseBtn) { 253 | // Close button 254 | if(!mfp.st.closeBtnInside) { 255 | mfp.wrap.append( _getCloseBtn() ); 256 | } else { 257 | _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) { 258 | values.close_replaceWith = _getCloseBtn(item.type); 259 | }); 260 | _wrapClasses += ' mfp-close-btn-in'; 261 | } 262 | } 263 | 264 | if(mfp.st.alignTop) { 265 | _wrapClasses += ' mfp-align-top'; 266 | } 267 | 268 | 269 | 270 | if(mfp.fixedContentPos) { 271 | mfp.wrap.css({ 272 | overflow: mfp.st.overflowY, 273 | overflowX: 'hidden', 274 | overflowY: mfp.st.overflowY 275 | }); 276 | } else { 277 | mfp.wrap.css({ 278 | top: _window.scrollTop(), 279 | position: 'absolute' 280 | }); 281 | } 282 | if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) { 283 | mfp.bgOverlay.css({ 284 | height: _document.height(), 285 | position: 'absolute' 286 | }); 287 | } 288 | 289 | 290 | 291 | if(mfp.st.enableEscapeKey) { 292 | // Close on ESC key 293 | _document.on('keyup' + EVENT_NS, function(e) { 294 | if(e.keyCode === 27) { 295 | mfp.close(); 296 | } 297 | }); 298 | } 299 | 300 | _window.on('resize' + EVENT_NS, function() { 301 | mfp.updateSize(); 302 | }); 303 | 304 | 305 | if(!mfp.st.closeOnContentClick) { 306 | _wrapClasses += ' mfp-auto-cursor'; 307 | } 308 | 309 | if(_wrapClasses) 310 | mfp.wrap.addClass(_wrapClasses); 311 | 312 | 313 | // this triggers recalculation of layout, so we get it once to not to trigger twice 314 | var windowHeight = mfp.wH = _window.height(); 315 | 316 | 317 | var windowStyles = {}; 318 | 319 | if( mfp.fixedContentPos ) { 320 | if(mfp._hasScrollBar(windowHeight)){ 321 | var s = mfp._getScrollbarSize(); 322 | if(s) { 323 | windowStyles.marginRight = s; 324 | } 325 | } 326 | } 327 | 328 | if(mfp.fixedContentPos) { 329 | if(!mfp.isIE7) { 330 | windowStyles.overflow = 'hidden'; 331 | } else { 332 | // ie7 double-scroll bug 333 | $('body, html').css('overflow', 'hidden'); 334 | } 335 | } 336 | 337 | 338 | 339 | var classesToadd = mfp.st.mainClass; 340 | if(mfp.isIE7) { 341 | classesToadd += ' mfp-ie7'; 342 | } 343 | if(classesToadd) { 344 | mfp._addClassToMFP( classesToadd ); 345 | } 346 | 347 | // add content 348 | mfp.updateItemHTML(); 349 | 350 | _mfpTrigger('BuildControls'); 351 | 352 | // remove scrollbar, add margin e.t.c 353 | $('html').css(windowStyles); 354 | 355 | // add everything to DOM 356 | mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) ); 357 | 358 | // Save last focused element 359 | mfp._lastFocusedEl = document.activeElement; 360 | 361 | // Wait for next cycle to allow CSS transition 362 | setTimeout(function() { 363 | 364 | if(mfp.content) { 365 | mfp._addClassToMFP(READY_CLASS); 366 | mfp._setFocus(); 367 | } else { 368 | // if content is not defined (not loaded e.t.c) we add class only for BG 369 | mfp.bgOverlay.addClass(READY_CLASS); 370 | } 371 | 372 | // Trap the focus in popup 373 | _document.on('focusin' + EVENT_NS, mfp._onFocusIn); 374 | 375 | }, 16); 376 | 377 | mfp.isOpen = true; 378 | mfp.updateSize(windowHeight); 379 | _mfpTrigger(OPEN_EVENT); 380 | 381 | return data; 382 | }, 383 | 384 | /** 385 | * Closes the popup 386 | */ 387 | close: function() { 388 | if(!mfp.isOpen) return; 389 | _mfpTrigger(BEFORE_CLOSE_EVENT); 390 | 391 | mfp.isOpen = false; 392 | // for CSS3 animation 393 | if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) { 394 | mfp._addClassToMFP(REMOVING_CLASS); 395 | setTimeout(function() { 396 | mfp._close(); 397 | }, mfp.st.removalDelay); 398 | } else { 399 | mfp._close(); 400 | } 401 | }, 402 | 403 | /** 404 | * Helper for close() function 405 | */ 406 | _close: function() { 407 | _mfpTrigger(CLOSE_EVENT); 408 | 409 | var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' '; 410 | 411 | mfp.bgOverlay.detach(); 412 | mfp.wrap.detach(); 413 | mfp.container.empty(); 414 | 415 | if(mfp.st.mainClass) { 416 | classesToRemove += mfp.st.mainClass + ' '; 417 | } 418 | 419 | mfp._removeClassFromMFP(classesToRemove); 420 | 421 | if(mfp.fixedContentPos) { 422 | var windowStyles = {marginRight: ''}; 423 | if(mfp.isIE7) { 424 | $('body, html').css('overflow', ''); 425 | } else { 426 | windowStyles.overflow = ''; 427 | } 428 | $('html').css(windowStyles); 429 | } 430 | 431 | _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS); 432 | mfp.ev.off(EVENT_NS); 433 | 434 | // clean up DOM elements that aren't removed 435 | mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style'); 436 | mfp.bgOverlay.attr('class', 'mfp-bg'); 437 | mfp.container.attr('class', 'mfp-container'); 438 | 439 | // remove close button from target element 440 | if(mfp.st.showCloseBtn && 441 | (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) { 442 | if(mfp.currTemplate.closeBtn) 443 | mfp.currTemplate.closeBtn.detach(); 444 | } 445 | 446 | 447 | if(mfp.st.autoFocusLast && mfp._lastFocusedEl) { 448 | $(mfp._lastFocusedEl).focus(); // put tab focus back 449 | } 450 | mfp.currItem = null; 451 | mfp.content = null; 452 | mfp.currTemplate = null; 453 | mfp.prevHeight = 0; 454 | 455 | _mfpTrigger(AFTER_CLOSE_EVENT); 456 | }, 457 | 458 | updateSize: function(winHeight) { 459 | 460 | if(mfp.isIOS) { 461 | // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2 462 | var zoomLevel = document.documentElement.clientWidth / window.innerWidth; 463 | var height = window.innerHeight * zoomLevel; 464 | mfp.wrap.css('height', height); 465 | mfp.wH = height; 466 | } else { 467 | mfp.wH = winHeight || _window.height(); 468 | } 469 | // Fixes #84: popup incorrectly positioned with position:relative on body 470 | if(!mfp.fixedContentPos) { 471 | mfp.wrap.css('height', mfp.wH); 472 | } 473 | 474 | _mfpTrigger('Resize'); 475 | 476 | }, 477 | 478 | /** 479 | * Set content of popup based on current index 480 | */ 481 | updateItemHTML: function() { 482 | var item = mfp.items[mfp.index]; 483 | 484 | // Detach and perform modifications 485 | mfp.contentContainer.detach(); 486 | 487 | if(mfp.content) 488 | mfp.content.detach(); 489 | 490 | if(!item.parsed) { 491 | item = mfp.parseEl( mfp.index ); 492 | } 493 | 494 | var type = item.type; 495 | 496 | _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]); 497 | // BeforeChange event works like so: 498 | // _mfpOn('BeforeChange', function(e, prevType, newType) { }); 499 | 500 | mfp.currItem = item; 501 | 502 | if(!mfp.currTemplate[type]) { 503 | var markup = mfp.st[type] ? mfp.st[type].markup : false; 504 | 505 | // allows to modify markup 506 | _mfpTrigger('FirstMarkupParse', markup); 507 | 508 | if(markup) { 509 | mfp.currTemplate[type] = $(markup); 510 | } else { 511 | // if there is no markup found we just define that template is parsed 512 | mfp.currTemplate[type] = true; 513 | } 514 | } 515 | 516 | if(_prevContentType && _prevContentType !== item.type) { 517 | mfp.container.removeClass('mfp-'+_prevContentType+'-holder'); 518 | } 519 | 520 | var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]); 521 | mfp.appendContent(newContent, type); 522 | 523 | item.preloaded = true; 524 | 525 | _mfpTrigger(CHANGE_EVENT, item); 526 | _prevContentType = item.type; 527 | 528 | // Append container back after its content changed 529 | mfp.container.prepend(mfp.contentContainer); 530 | 531 | _mfpTrigger('AfterChange'); 532 | }, 533 | 534 | 535 | /** 536 | * Set HTML content of popup 537 | */ 538 | appendContent: function(newContent, type) { 539 | mfp.content = newContent; 540 | 541 | if(newContent) { 542 | if(mfp.st.showCloseBtn && mfp.st.closeBtnInside && 543 | mfp.currTemplate[type] === true) { 544 | // if there is no markup, we just append close button element inside 545 | if(!mfp.content.find('.mfp-close').length) { 546 | mfp.content.append(_getCloseBtn()); 547 | } 548 | } else { 549 | mfp.content = newContent; 550 | } 551 | } else { 552 | mfp.content = ''; 553 | } 554 | 555 | _mfpTrigger(BEFORE_APPEND_EVENT); 556 | mfp.container.addClass('mfp-'+type+'-holder'); 557 | 558 | mfp.contentContainer.append(mfp.content); 559 | }, 560 | 561 | 562 | /** 563 | * Creates Magnific Popup data object based on given data 564 | * @param {int} index Index of item to parse 565 | */ 566 | parseEl: function(index) { 567 | var item = mfp.items[index], 568 | type; 569 | 570 | if(item.tagName) { 571 | item = { el: $(item) }; 572 | } else { 573 | type = item.type; 574 | item = { data: item, src: item.src }; 575 | } 576 | 577 | if(item.el) { 578 | var types = mfp.types; 579 | 580 | // check for 'mfp-TYPE' class 581 | for(var i = 0; i < types.length; i++) { 582 | if( item.el.hasClass('mfp-'+types[i]) ) { 583 | type = types[i]; 584 | break; 585 | } 586 | } 587 | 588 | item.src = item.el.attr('data-mfp-src'); 589 | if(!item.src) { 590 | item.src = item.el.attr('href'); 591 | } 592 | } 593 | 594 | item.type = type || mfp.st.type || 'inline'; 595 | item.index = index; 596 | item.parsed = true; 597 | mfp.items[index] = item; 598 | _mfpTrigger('ElementParse', item); 599 | 600 | return mfp.items[index]; 601 | }, 602 | 603 | 604 | /** 605 | * Initializes single popup or a group of popups 606 | */ 607 | addGroup: function(el, options) { 608 | var eHandler = function(e) { 609 | e.mfpEl = this; 610 | mfp._openClick(e, el, options); 611 | }; 612 | 613 | if(!options) { 614 | options = {}; 615 | } 616 | 617 | var eName = 'click.magnificPopup'; 618 | options.mainEl = el; 619 | 620 | if(options.items) { 621 | options.isObj = true; 622 | el.off(eName).on(eName, eHandler); 623 | } else { 624 | options.isObj = false; 625 | if(options.delegate) { 626 | el.off(eName).on(eName, options.delegate , eHandler); 627 | } else { 628 | options.items = el; 629 | el.off(eName).on(eName, eHandler); 630 | } 631 | } 632 | }, 633 | _openClick: function(e, el, options) { 634 | var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick; 635 | 636 | 637 | if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) { 638 | return; 639 | } 640 | 641 | var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn; 642 | 643 | if(disableOn) { 644 | if($.isFunction(disableOn)) { 645 | if( !disableOn.call(mfp) ) { 646 | return true; 647 | } 648 | } else { // else it's number 649 | if( _window.width() < disableOn ) { 650 | return true; 651 | } 652 | } 653 | } 654 | 655 | if(e.type) { 656 | e.preventDefault(); 657 | 658 | // This will prevent popup from closing if element is inside and popup is already opened 659 | if(mfp.isOpen) { 660 | e.stopPropagation(); 661 | } 662 | } 663 | 664 | options.el = $(e.mfpEl); 665 | if(options.delegate) { 666 | options.items = el.find(options.delegate); 667 | } 668 | mfp.open(options); 669 | }, 670 | 671 | 672 | /** 673 | * Updates text on preloader 674 | */ 675 | updateStatus: function(status, text) { 676 | 677 | if(mfp.preloader) { 678 | if(_prevStatus !== status) { 679 | mfp.container.removeClass('mfp-s-'+_prevStatus); 680 | } 681 | 682 | if(!text && status === 'loading') { 683 | text = mfp.st.tLoading; 684 | } 685 | 686 | var data = { 687 | status: status, 688 | text: text 689 | }; 690 | // allows to modify status 691 | _mfpTrigger('UpdateStatus', data); 692 | 693 | status = data.status; 694 | text = data.text; 695 | 696 | mfp.preloader.html(text); 697 | 698 | mfp.preloader.find('a').on('click', function(e) { 699 | e.stopImmediatePropagation(); 700 | }); 701 | 702 | mfp.container.addClass('mfp-s-'+status); 703 | _prevStatus = status; 704 | } 705 | }, 706 | 707 | 708 | /* 709 | "Private" helpers that aren't private at all 710 | */ 711 | // Check to close popup or not 712 | // "target" is an element that was clicked 713 | _checkIfClose: function(target) { 714 | 715 | if($(target).hasClass(PREVENT_CLOSE_CLASS)) { 716 | return; 717 | } 718 | 719 | var closeOnContent = mfp.st.closeOnContentClick; 720 | var closeOnBg = mfp.st.closeOnBgClick; 721 | 722 | if(closeOnContent && closeOnBg) { 723 | return true; 724 | } else { 725 | 726 | // We close the popup if click is on close button or on preloader. Or if there is no content. 727 | if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) { 728 | return true; 729 | } 730 | 731 | // if click is outside the content 732 | if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) { 733 | if(closeOnBg) { 734 | // last check, if the clicked element is in DOM, (in case it's removed onclick) 735 | if( $.contains(document, target) ) { 736 | return true; 737 | } 738 | } 739 | } else if(closeOnContent) { 740 | return true; 741 | } 742 | 743 | } 744 | return false; 745 | }, 746 | _addClassToMFP: function(cName) { 747 | mfp.bgOverlay.addClass(cName); 748 | mfp.wrap.addClass(cName); 749 | }, 750 | _removeClassFromMFP: function(cName) { 751 | this.bgOverlay.removeClass(cName); 752 | mfp.wrap.removeClass(cName); 753 | }, 754 | _hasScrollBar: function(winHeight) { 755 | return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) ); 756 | }, 757 | _setFocus: function() { 758 | (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus(); 759 | }, 760 | _onFocusIn: function(e) { 761 | if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) { 762 | mfp._setFocus(); 763 | return false; 764 | } 765 | }, 766 | _parseMarkup: function(template, values, item) { 767 | var arr; 768 | if(item.data) { 769 | values = $.extend(item.data, values); 770 | } 771 | _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] ); 772 | 773 | $.each(values, function(key, value) { 774 | if(value === undefined || value === false) { 775 | return true; 776 | } 777 | arr = key.split('_'); 778 | if(arr.length > 1) { 779 | var el = template.find(EVENT_NS + '-'+arr[0]); 780 | 781 | if(el.length > 0) { 782 | var attr = arr[1]; 783 | if(attr === 'replaceWith') { 784 | if(el[0] !== value[0]) { 785 | el.replaceWith(value); 786 | } 787 | } else if(attr === 'img') { 788 | if(el.is('img')) { 789 | el.attr('src', value); 790 | } else { 791 | el.replaceWith( $('').attr('src', value).attr('class', el.attr('class')) ); 792 | } 793 | } else { 794 | el.attr(arr[1], value); 795 | } 796 | } 797 | 798 | } else { 799 | template.find(EVENT_NS + '-'+key).html(value); 800 | } 801 | }); 802 | }, 803 | 804 | _getScrollbarSize: function() { 805 | // thx David 806 | if(mfp.scrollbarSize === undefined) { 807 | var scrollDiv = document.createElement("div"); 808 | scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; 809 | document.body.appendChild(scrollDiv); 810 | mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth; 811 | document.body.removeChild(scrollDiv); 812 | } 813 | return mfp.scrollbarSize; 814 | } 815 | 816 | }; /* MagnificPopup core prototype end */ 817 | 818 | 819 | 820 | 821 | /** 822 | * Public static functions 823 | */ 824 | $.magnificPopup = { 825 | instance: null, 826 | proto: MagnificPopup.prototype, 827 | modules: [], 828 | 829 | open: function(options, index) { 830 | _checkInstance(); 831 | 832 | if(!options) { 833 | options = {}; 834 | } else { 835 | options = $.extend(true, {}, options); 836 | } 837 | 838 | options.isObj = true; 839 | options.index = index || 0; 840 | return this.instance.open(options); 841 | }, 842 | 843 | close: function() { 844 | return $.magnificPopup.instance && $.magnificPopup.instance.close(); 845 | }, 846 | 847 | registerModule: function(name, module) { 848 | if(module.options) { 849 | $.magnificPopup.defaults[name] = module.options; 850 | } 851 | $.extend(this.proto, module.proto); 852 | this.modules.push(name); 853 | }, 854 | 855 | defaults: { 856 | 857 | // Info about options is in docs: 858 | // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options 859 | 860 | disableOn: 0, 861 | 862 | key: null, 863 | 864 | midClick: false, 865 | 866 | mainClass: '', 867 | 868 | preloader: true, 869 | 870 | focus: '', // CSS selector of input to focus after popup is opened 871 | 872 | closeOnContentClick: false, 873 | 874 | closeOnBgClick: true, 875 | 876 | closeBtnInside: true, 877 | 878 | showCloseBtn: true, 879 | 880 | enableEscapeKey: true, 881 | 882 | modal: false, 883 | 884 | alignTop: false, 885 | 886 | removalDelay: 0, 887 | 888 | prependTo: null, 889 | 890 | fixedContentPos: 'auto', 891 | 892 | fixedBgPos: 'auto', 893 | 894 | overflowY: 'auto', 895 | 896 | closeMarkup: '', 897 | 898 | tClose: 'Close (Esc)', 899 | 900 | tLoading: 'Loading...', 901 | 902 | autoFocusLast: true 903 | 904 | } 905 | }; 906 | 907 | 908 | 909 | $.fn.magnificPopup = function(options) { 910 | _checkInstance(); 911 | 912 | var jqEl = $(this); 913 | 914 | // We call some API method of first param is a string 915 | if (typeof options === "string" ) { 916 | 917 | if(options === 'open') { 918 | var items, 919 | itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup, 920 | index = parseInt(arguments[1], 10) || 0; 921 | 922 | if(itemOpts.items) { 923 | items = itemOpts.items[index]; 924 | } else { 925 | items = jqEl; 926 | if(itemOpts.delegate) { 927 | items = items.find(itemOpts.delegate); 928 | } 929 | items = items.eq( index ); 930 | } 931 | mfp._openClick({mfpEl:items}, jqEl, itemOpts); 932 | } else { 933 | if(mfp.isOpen) 934 | mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); 935 | } 936 | 937 | } else { 938 | // clone options obj 939 | options = $.extend(true, {}, options); 940 | 941 | /* 942 | * As Zepto doesn't support .data() method for objects 943 | * and it works only in normal browsers 944 | * we assign "options" object directly to the DOM element. FTW! 945 | */ 946 | if(_isJQ) { 947 | jqEl.data('magnificPopup', options); 948 | } else { 949 | jqEl[0].magnificPopup = options; 950 | } 951 | 952 | mfp.addGroup(jqEl, options); 953 | 954 | } 955 | return jqEl; 956 | }; 957 | 958 | /*>>core*/ 959 | 960 | /*>>inline*/ 961 | 962 | var INLINE_NS = 'inline', 963 | _hiddenClass, 964 | _inlinePlaceholder, 965 | _lastInlineElement, 966 | _putInlineElementsBack = function() { 967 | if(_lastInlineElement) { 968 | _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach(); 969 | _lastInlineElement = null; 970 | } 971 | }; 972 | 973 | $.magnificPopup.registerModule(INLINE_NS, { 974 | options: { 975 | hiddenClass: 'hide', // will be appended with `mfp-` prefix 976 | markup: '', 977 | tNotFound: 'Content not found' 978 | }, 979 | proto: { 980 | 981 | initInline: function() { 982 | mfp.types.push(INLINE_NS); 983 | 984 | _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() { 985 | _putInlineElementsBack(); 986 | }); 987 | }, 988 | 989 | getInline: function(item, template) { 990 | 991 | _putInlineElementsBack(); 992 | 993 | if(item.src) { 994 | var inlineSt = mfp.st.inline, 995 | el = $(item.src); 996 | 997 | if(el.length) { 998 | 999 | // If target element has parent - we replace it with placeholder and put it back after popup is closed 1000 | var parent = el[0].parentNode; 1001 | if(parent && parent.tagName) { 1002 | if(!_inlinePlaceholder) { 1003 | _hiddenClass = inlineSt.hiddenClass; 1004 | _inlinePlaceholder = _getEl(_hiddenClass); 1005 | _hiddenClass = 'mfp-'+_hiddenClass; 1006 | } 1007 | // replace target inline element with placeholder 1008 | _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); 1009 | } 1010 | 1011 | mfp.updateStatus('ready'); 1012 | } else { 1013 | mfp.updateStatus('error', inlineSt.tNotFound); 1014 | el = $('
'); 1015 | } 1016 | 1017 | item.inlineElement = el; 1018 | return el; 1019 | } 1020 | 1021 | mfp.updateStatus('ready'); 1022 | mfp._parseMarkup(template, {}, item); 1023 | return template; 1024 | } 1025 | } 1026 | }); 1027 | 1028 | /*>>inline*/ 1029 | 1030 | /*>>ajax*/ 1031 | var AJAX_NS = 'ajax', 1032 | _ajaxCur, 1033 | _removeAjaxCursor = function() { 1034 | if(_ajaxCur) { 1035 | $(document.body).removeClass(_ajaxCur); 1036 | } 1037 | }, 1038 | _destroyAjaxRequest = function() { 1039 | _removeAjaxCursor(); 1040 | if(mfp.req) { 1041 | mfp.req.abort(); 1042 | } 1043 | }; 1044 | 1045 | $.magnificPopup.registerModule(AJAX_NS, { 1046 | 1047 | options: { 1048 | settings: null, 1049 | cursor: 'mfp-ajax-cur', 1050 | tError: 'The content could not be loaded.' 1051 | }, 1052 | 1053 | proto: { 1054 | initAjax: function() { 1055 | mfp.types.push(AJAX_NS); 1056 | _ajaxCur = mfp.st.ajax.cursor; 1057 | 1058 | _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); 1059 | _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); 1060 | }, 1061 | getAjax: function(item) { 1062 | 1063 | if(_ajaxCur) { 1064 | $(document.body).addClass(_ajaxCur); 1065 | } 1066 | 1067 | mfp.updateStatus('loading'); 1068 | 1069 | var opts = $.extend({ 1070 | url: item.src, 1071 | success: function(data, textStatus, jqXHR) { 1072 | var temp = { 1073 | data:data, 1074 | xhr:jqXHR 1075 | }; 1076 | 1077 | _mfpTrigger('ParseAjax', temp); 1078 | 1079 | mfp.appendContent( $(temp.data), AJAX_NS ); 1080 | 1081 | item.finished = true; 1082 | 1083 | _removeAjaxCursor(); 1084 | 1085 | mfp._setFocus(); 1086 | 1087 | setTimeout(function() { 1088 | mfp.wrap.addClass(READY_CLASS); 1089 | }, 16); 1090 | 1091 | mfp.updateStatus('ready'); 1092 | 1093 | _mfpTrigger('AjaxContentAdded'); 1094 | }, 1095 | error: function() { 1096 | _removeAjaxCursor(); 1097 | item.finished = item.loadError = true; 1098 | mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); 1099 | } 1100 | }, mfp.st.ajax.settings); 1101 | 1102 | mfp.req = $.ajax(opts); 1103 | 1104 | return ''; 1105 | } 1106 | } 1107 | }); 1108 | 1109 | /*>>ajax*/ 1110 | 1111 | /*>>image*/ 1112 | var _imgInterval, 1113 | _getTitle = function(item) { 1114 | if(item.data && item.data.title !== undefined) 1115 | return item.data.title; 1116 | 1117 | var src = mfp.st.image.titleSrc; 1118 | 1119 | if(src) { 1120 | if($.isFunction(src)) { 1121 | return src.call(mfp, item); 1122 | } else if(item.el) { 1123 | return item.el.attr(src) || ''; 1124 | } 1125 | } 1126 | return ''; 1127 | }; 1128 | 1129 | $.magnificPopup.registerModule('image', { 1130 | 1131 | options: { 1132 | markup: '
'+ 1133 | '
'+ 1134 | '
'+ 1135 | '
'+ 1136 | '
'+ 1137 | '
'+ 1138 | '
'+ 1139 | '
'+ 1140 | '
'+ 1141 | '
'+ 1142 | '
'+ 1143 | '
', 1144 | cursor: 'mfp-zoom-out-cur', 1145 | titleSrc: 'title', 1146 | verticalFit: true, 1147 | tError: 'The image could not be loaded.' 1148 | }, 1149 | 1150 | proto: { 1151 | initImage: function() { 1152 | var imgSt = mfp.st.image, 1153 | ns = '.image'; 1154 | 1155 | mfp.types.push('image'); 1156 | 1157 | _mfpOn(OPEN_EVENT+ns, function() { 1158 | if(mfp.currItem.type === 'image' && imgSt.cursor) { 1159 | $(document.body).addClass(imgSt.cursor); 1160 | } 1161 | }); 1162 | 1163 | _mfpOn(CLOSE_EVENT+ns, function() { 1164 | if(imgSt.cursor) { 1165 | $(document.body).removeClass(imgSt.cursor); 1166 | } 1167 | _window.off('resize' + EVENT_NS); 1168 | }); 1169 | 1170 | _mfpOn('Resize'+ns, mfp.resizeImage); 1171 | if(mfp.isLowIE) { 1172 | _mfpOn('AfterChange', mfp.resizeImage); 1173 | } 1174 | }, 1175 | resizeImage: function() { 1176 | var item = mfp.currItem; 1177 | if(!item || !item.img) return; 1178 | 1179 | if(mfp.st.image.verticalFit) { 1180 | var decr = 0; 1181 | // fix box-sizing in ie7/8 1182 | if(mfp.isLowIE) { 1183 | decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); 1184 | } 1185 | item.img.css('max-height', mfp.wH-decr); 1186 | } 1187 | }, 1188 | _onImageHasSize: function(item) { 1189 | if(item.img) { 1190 | 1191 | item.hasSize = true; 1192 | 1193 | if(_imgInterval) { 1194 | clearInterval(_imgInterval); 1195 | } 1196 | 1197 | item.isCheckingImgSize = false; 1198 | 1199 | _mfpTrigger('ImageHasSize', item); 1200 | 1201 | if(item.imgHidden) { 1202 | if(mfp.content) 1203 | mfp.content.removeClass('mfp-loading'); 1204 | 1205 | item.imgHidden = false; 1206 | } 1207 | 1208 | } 1209 | }, 1210 | 1211 | /** 1212 | * Function that loops until the image has size to display elements that rely on it asap 1213 | */ 1214 | findImageSize: function(item) { 1215 | 1216 | var counter = 0, 1217 | img = item.img[0], 1218 | mfpSetInterval = function(delay) { 1219 | 1220 | if(_imgInterval) { 1221 | clearInterval(_imgInterval); 1222 | } 1223 | // decelerating interval that checks for size of an image 1224 | _imgInterval = setInterval(function() { 1225 | if(img.naturalWidth > 0) { 1226 | mfp._onImageHasSize(item); 1227 | return; 1228 | } 1229 | 1230 | if(counter > 200) { 1231 | clearInterval(_imgInterval); 1232 | } 1233 | 1234 | counter++; 1235 | if(counter === 3) { 1236 | mfpSetInterval(10); 1237 | } else if(counter === 40) { 1238 | mfpSetInterval(50); 1239 | } else if(counter === 100) { 1240 | mfpSetInterval(500); 1241 | } 1242 | }, delay); 1243 | }; 1244 | 1245 | mfpSetInterval(1); 1246 | }, 1247 | 1248 | getImage: function(item, template) { 1249 | 1250 | var guard = 0, 1251 | 1252 | // image load complete handler 1253 | onLoadComplete = function() { 1254 | if(item) { 1255 | if (item.img[0].complete) { 1256 | item.img.off('.mfploader'); 1257 | 1258 | if(item === mfp.currItem){ 1259 | mfp._onImageHasSize(item); 1260 | 1261 | mfp.updateStatus('ready'); 1262 | } 1263 | 1264 | item.hasSize = true; 1265 | item.loaded = true; 1266 | 1267 | _mfpTrigger('ImageLoadComplete'); 1268 | 1269 | } 1270 | else { 1271 | // if image complete check fails 200 times (20 sec), we assume that there was an error. 1272 | guard++; 1273 | if(guard < 200) { 1274 | setTimeout(onLoadComplete,100); 1275 | } else { 1276 | onLoadError(); 1277 | } 1278 | } 1279 | } 1280 | }, 1281 | 1282 | // image error handler 1283 | onLoadError = function() { 1284 | if(item) { 1285 | item.img.off('.mfploader'); 1286 | if(item === mfp.currItem){ 1287 | mfp._onImageHasSize(item); 1288 | mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) ); 1289 | } 1290 | 1291 | item.hasSize = true; 1292 | item.loaded = true; 1293 | item.loadError = true; 1294 | } 1295 | }, 1296 | imgSt = mfp.st.image; 1297 | 1298 | 1299 | var el = template.find('.mfp-img'); 1300 | if(el.length) { 1301 | var img = document.createElement('img'); 1302 | img.className = 'mfp-img'; 1303 | if(item.el && item.el.find('img').length) { 1304 | img.alt = item.el.find('img').attr('alt'); 1305 | } 1306 | item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); 1307 | img.src = item.src; 1308 | 1309 | // without clone() "error" event is not firing when IMG is replaced by new IMG 1310 | // TODO: find a way to avoid such cloning 1311 | if(el.is('img')) { 1312 | item.img = item.img.clone(); 1313 | } 1314 | 1315 | img = item.img[0]; 1316 | if(img.naturalWidth > 0) { 1317 | item.hasSize = true; 1318 | } else if(!img.width) { 1319 | item.hasSize = false; 1320 | } 1321 | } 1322 | 1323 | mfp._parseMarkup(template, { 1324 | title: _getTitle(item), 1325 | img_replaceWith: item.img 1326 | }, item); 1327 | 1328 | mfp.resizeImage(); 1329 | 1330 | if(item.hasSize) { 1331 | if(_imgInterval) clearInterval(_imgInterval); 1332 | 1333 | if(item.loadError) { 1334 | template.addClass('mfp-loading'); 1335 | mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) ); 1336 | } else { 1337 | template.removeClass('mfp-loading'); 1338 | mfp.updateStatus('ready'); 1339 | } 1340 | return template; 1341 | } 1342 | 1343 | mfp.updateStatus('loading'); 1344 | item.loading = true; 1345 | 1346 | if(!item.hasSize) { 1347 | item.imgHidden = true; 1348 | template.addClass('mfp-loading'); 1349 | mfp.findImageSize(item); 1350 | } 1351 | 1352 | return template; 1353 | } 1354 | } 1355 | }); 1356 | 1357 | /*>>image*/ 1358 | 1359 | /*>>zoom*/ 1360 | var hasMozTransform, 1361 | getHasMozTransform = function() { 1362 | if(hasMozTransform === undefined) { 1363 | hasMozTransform = document.createElement('p').style.MozTransform !== undefined; 1364 | } 1365 | return hasMozTransform; 1366 | }; 1367 | 1368 | $.magnificPopup.registerModule('zoom', { 1369 | 1370 | options: { 1371 | enabled: false, 1372 | easing: 'ease-in-out', 1373 | duration: 300, 1374 | opener: function(element) { 1375 | return element.is('img') ? element : element.find('img'); 1376 | } 1377 | }, 1378 | 1379 | proto: { 1380 | 1381 | initZoom: function() { 1382 | var zoomSt = mfp.st.zoom, 1383 | ns = '.zoom', 1384 | image; 1385 | 1386 | if(!zoomSt.enabled || !mfp.supportsTransition) { 1387 | return; 1388 | } 1389 | 1390 | var duration = zoomSt.duration, 1391 | getElToAnimate = function(image) { 1392 | var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), 1393 | transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, 1394 | cssObj = { 1395 | position: 'fixed', 1396 | zIndex: 9999, 1397 | left: 0, 1398 | top: 0, 1399 | '-webkit-backface-visibility': 'hidden' 1400 | }, 1401 | t = 'transition'; 1402 | 1403 | cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition; 1404 | 1405 | newImg.css(cssObj); 1406 | return newImg; 1407 | }, 1408 | showMainContent = function() { 1409 | mfp.content.css('visibility', 'visible'); 1410 | }, 1411 | openTimeout, 1412 | animatedImg; 1413 | 1414 | _mfpOn('BuildControls'+ns, function() { 1415 | if(mfp._allowZoom()) { 1416 | 1417 | clearTimeout(openTimeout); 1418 | mfp.content.css('visibility', 'hidden'); 1419 | 1420 | // Basically, all code below does is clones existing image, puts in on top of the current one and animated it 1421 | 1422 | image = mfp._getItemToZoom(); 1423 | 1424 | if(!image) { 1425 | showMainContent(); 1426 | return; 1427 | } 1428 | 1429 | animatedImg = getElToAnimate(image); 1430 | 1431 | animatedImg.css( mfp._getOffset() ); 1432 | 1433 | mfp.wrap.append(animatedImg); 1434 | 1435 | openTimeout = setTimeout(function() { 1436 | animatedImg.css( mfp._getOffset( true ) ); 1437 | openTimeout = setTimeout(function() { 1438 | 1439 | showMainContent(); 1440 | 1441 | setTimeout(function() { 1442 | animatedImg.remove(); 1443 | image = animatedImg = null; 1444 | _mfpTrigger('ZoomAnimationEnded'); 1445 | }, 16); // avoid blink when switching images 1446 | 1447 | }, duration); // this timeout equals animation duration 1448 | 1449 | }, 16); // by adding this timeout we avoid short glitch at the beginning of animation 1450 | 1451 | 1452 | // Lots of timeouts... 1453 | } 1454 | }); 1455 | _mfpOn(BEFORE_CLOSE_EVENT+ns, function() { 1456 | if(mfp._allowZoom()) { 1457 | 1458 | clearTimeout(openTimeout); 1459 | 1460 | mfp.st.removalDelay = duration; 1461 | 1462 | if(!image) { 1463 | image = mfp._getItemToZoom(); 1464 | if(!image) { 1465 | return; 1466 | } 1467 | animatedImg = getElToAnimate(image); 1468 | } 1469 | 1470 | animatedImg.css( mfp._getOffset(true) ); 1471 | mfp.wrap.append(animatedImg); 1472 | mfp.content.css('visibility', 'hidden'); 1473 | 1474 | setTimeout(function() { 1475 | animatedImg.css( mfp._getOffset() ); 1476 | }, 16); 1477 | } 1478 | 1479 | }); 1480 | 1481 | _mfpOn(CLOSE_EVENT+ns, function() { 1482 | if(mfp._allowZoom()) { 1483 | showMainContent(); 1484 | if(animatedImg) { 1485 | animatedImg.remove(); 1486 | } 1487 | image = null; 1488 | } 1489 | }); 1490 | }, 1491 | 1492 | _allowZoom: function() { 1493 | return mfp.currItem.type === 'image'; 1494 | }, 1495 | 1496 | _getItemToZoom: function() { 1497 | if(mfp.currItem.hasSize) { 1498 | return mfp.currItem.img; 1499 | } else { 1500 | return false; 1501 | } 1502 | }, 1503 | 1504 | // Get element postion relative to viewport 1505 | _getOffset: function(isLarge) { 1506 | var el; 1507 | if(isLarge) { 1508 | el = mfp.currItem.img; 1509 | } else { 1510 | el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem); 1511 | } 1512 | 1513 | var offset = el.offset(); 1514 | var paddingTop = parseInt(el.css('padding-top'),10); 1515 | var paddingBottom = parseInt(el.css('padding-bottom'),10); 1516 | offset.top -= ( $(window).scrollTop() - paddingTop ); 1517 | 1518 | 1519 | /* 1520 | 1521 | Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa. 1522 | 1523 | */ 1524 | var obj = { 1525 | width: el.width(), 1526 | // fix Zepto height+padding issue 1527 | height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop 1528 | }; 1529 | 1530 | // I hate to do this, but there is no another option 1531 | if( getHasMozTransform() ) { 1532 | obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)'; 1533 | } else { 1534 | obj.left = offset.left; 1535 | obj.top = offset.top; 1536 | } 1537 | return obj; 1538 | } 1539 | 1540 | } 1541 | }); 1542 | 1543 | 1544 | 1545 | /*>>zoom*/ 1546 | 1547 | /*>>iframe*/ 1548 | 1549 | var IFRAME_NS = 'iframe', 1550 | _emptyPage = '//about:blank', 1551 | 1552 | _fixIframeBugs = function(isShowing) { 1553 | if(mfp.currTemplate[IFRAME_NS]) { 1554 | var el = mfp.currTemplate[IFRAME_NS].find('iframe'); 1555 | if(el.length) { 1556 | // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug 1557 | if(!isShowing) { 1558 | el[0].src = _emptyPage; 1559 | } 1560 | 1561 | // IE8 black screen bug fix 1562 | if(mfp.isIE8) { 1563 | el.css('display', isShowing ? 'block' : 'none'); 1564 | } 1565 | } 1566 | } 1567 | }; 1568 | 1569 | $.magnificPopup.registerModule(IFRAME_NS, { 1570 | 1571 | options: { 1572 | markup: '
'+ 1573 | '
'+ 1574 | ''+ 1575 | '
', 1576 | 1577 | srcAction: 'iframe_src', 1578 | 1579 | // we don't care and support only one default type of URL by default 1580 | patterns: { 1581 | youtube: { 1582 | index: 'youtube.com', 1583 | id: 'v=', 1584 | src: '//www.youtube.com/embed/%id%?autoplay=1' 1585 | }, 1586 | vimeo: { 1587 | index: 'vimeo.com/', 1588 | id: '/', 1589 | src: '//player.vimeo.com/video/%id%?autoplay=1' 1590 | }, 1591 | gmaps: { 1592 | index: '//maps.google.', 1593 | src: '%id%&output=embed' 1594 | } 1595 | } 1596 | }, 1597 | 1598 | proto: { 1599 | initIframe: function() { 1600 | mfp.types.push(IFRAME_NS); 1601 | 1602 | _mfpOn('BeforeChange', function(e, prevType, newType) { 1603 | if(prevType !== newType) { 1604 | if(prevType === IFRAME_NS) { 1605 | _fixIframeBugs(); // iframe if removed 1606 | } else if(newType === IFRAME_NS) { 1607 | _fixIframeBugs(true); // iframe is showing 1608 | } 1609 | }// else { 1610 | // iframe source is switched, don't do anything 1611 | //} 1612 | }); 1613 | 1614 | _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() { 1615 | _fixIframeBugs(); 1616 | }); 1617 | }, 1618 | 1619 | getIframe: function(item, template) { 1620 | var embedSrc = item.src; 1621 | var iframeSt = mfp.st.iframe; 1622 | 1623 | $.each(iframeSt.patterns, function() { 1624 | if(embedSrc.indexOf( this.index ) > -1) { 1625 | if(this.id) { 1626 | if(typeof this.id === 'string') { 1627 | embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); 1628 | } else { 1629 | embedSrc = this.id.call( this, embedSrc ); 1630 | } 1631 | } 1632 | embedSrc = this.src.replace('%id%', embedSrc ); 1633 | return false; // break; 1634 | } 1635 | }); 1636 | 1637 | var dataObj = {}; 1638 | if(iframeSt.srcAction) { 1639 | dataObj[iframeSt.srcAction] = embedSrc; 1640 | } 1641 | mfp._parseMarkup(template, dataObj, item); 1642 | 1643 | mfp.updateStatus('ready'); 1644 | 1645 | return template; 1646 | } 1647 | } 1648 | }); 1649 | 1650 | 1651 | 1652 | /*>>iframe*/ 1653 | 1654 | /*>>gallery*/ 1655 | /** 1656 | * Get looped index depending on number of slides 1657 | */ 1658 | var _getLoopedId = function(index) { 1659 | var numSlides = mfp.items.length; 1660 | if(index > numSlides - 1) { 1661 | return index - numSlides; 1662 | } else if(index < 0) { 1663 | return numSlides + index; 1664 | } 1665 | return index; 1666 | }, 1667 | _replaceCurrTotal = function(text, curr, total) { 1668 | return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); 1669 | }; 1670 | 1671 | $.magnificPopup.registerModule('gallery', { 1672 | 1673 | options: { 1674 | enabled: false, 1675 | arrowMarkup: '', 1676 | preload: [0,2], 1677 | navigateByImgClick: true, 1678 | arrows: true, 1679 | 1680 | tPrev: 'Previous (Left arrow key)', 1681 | tNext: 'Next (Right arrow key)', 1682 | tCounter: '%curr% of %total%' 1683 | }, 1684 | 1685 | proto: { 1686 | initGallery: function() { 1687 | 1688 | var gSt = mfp.st.gallery, 1689 | ns = '.mfp-gallery'; 1690 | 1691 | mfp.direction = true; // true - next, false - prev 1692 | 1693 | if(!gSt || !gSt.enabled ) return false; 1694 | 1695 | _wrapClasses += ' mfp-gallery'; 1696 | 1697 | _mfpOn(OPEN_EVENT+ns, function() { 1698 | 1699 | if(gSt.navigateByImgClick) { 1700 | mfp.wrap.on('click'+ns, '.mfp-img', function() { 1701 | if(mfp.items.length > 1) { 1702 | mfp.next(); 1703 | return false; 1704 | } 1705 | }); 1706 | } 1707 | 1708 | _document.on('keydown'+ns, function(e) { 1709 | if (e.keyCode === 37) { 1710 | mfp.prev(); 1711 | } else if (e.keyCode === 39) { 1712 | mfp.next(); 1713 | } 1714 | }); 1715 | }); 1716 | 1717 | _mfpOn('UpdateStatus'+ns, function(e, data) { 1718 | if(data.text) { 1719 | data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); 1720 | } 1721 | }); 1722 | 1723 | _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) { 1724 | var l = mfp.items.length; 1725 | values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : ''; 1726 | }); 1727 | 1728 | _mfpOn('BuildControls' + ns, function() { 1729 | if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) { 1730 | var markup = gSt.arrowMarkup, 1731 | arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS), 1732 | arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS); 1733 | 1734 | arrowLeft.click(function() { 1735 | mfp.prev(); 1736 | }); 1737 | arrowRight.click(function() { 1738 | mfp.next(); 1739 | }); 1740 | 1741 | mfp.container.append(arrowLeft.add(arrowRight)); 1742 | } 1743 | }); 1744 | 1745 | _mfpOn(CHANGE_EVENT+ns, function() { 1746 | if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); 1747 | 1748 | mfp._preloadTimeout = setTimeout(function() { 1749 | mfp.preloadNearbyImages(); 1750 | mfp._preloadTimeout = null; 1751 | }, 16); 1752 | }); 1753 | 1754 | 1755 | _mfpOn(CLOSE_EVENT+ns, function() { 1756 | _document.off(ns); 1757 | mfp.wrap.off('click'+ns); 1758 | mfp.arrowRight = mfp.arrowLeft = null; 1759 | }); 1760 | 1761 | }, 1762 | next: function() { 1763 | mfp.direction = true; 1764 | mfp.index = _getLoopedId(mfp.index + 1); 1765 | mfp.updateItemHTML(); 1766 | }, 1767 | prev: function() { 1768 | mfp.direction = false; 1769 | mfp.index = _getLoopedId(mfp.index - 1); 1770 | mfp.updateItemHTML(); 1771 | }, 1772 | goTo: function(newIndex) { 1773 | mfp.direction = (newIndex >= mfp.index); 1774 | mfp.index = newIndex; 1775 | mfp.updateItemHTML(); 1776 | }, 1777 | preloadNearbyImages: function() { 1778 | var p = mfp.st.gallery.preload, 1779 | preloadBefore = Math.min(p[0], mfp.items.length), 1780 | preloadAfter = Math.min(p[1], mfp.items.length), 1781 | i; 1782 | 1783 | for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) { 1784 | mfp._preloadItem(mfp.index+i); 1785 | } 1786 | for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) { 1787 | mfp._preloadItem(mfp.index-i); 1788 | } 1789 | }, 1790 | _preloadItem: function(index) { 1791 | index = _getLoopedId(index); 1792 | 1793 | if(mfp.items[index].preloaded) { 1794 | return; 1795 | } 1796 | 1797 | var item = mfp.items[index]; 1798 | if(!item.parsed) { 1799 | item = mfp.parseEl( index ); 1800 | } 1801 | 1802 | _mfpTrigger('LazyLoad', item); 1803 | 1804 | if(item.type === 'image') { 1805 | item.img = $('').on('load.mfploader', function() { 1806 | item.hasSize = true; 1807 | }).on('error.mfploader', function() { 1808 | item.hasSize = true; 1809 | item.loadError = true; 1810 | _mfpTrigger('LazyLoadError', item); 1811 | }).attr('src', item.src); 1812 | } 1813 | 1814 | 1815 | item.preloaded = true; 1816 | } 1817 | } 1818 | }); 1819 | 1820 | /*>>gallery*/ 1821 | 1822 | /*>>retina*/ 1823 | 1824 | var RETINA_NS = 'retina'; 1825 | 1826 | $.magnificPopup.registerModule(RETINA_NS, { 1827 | options: { 1828 | replaceSrc: function(item) { 1829 | return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; }); 1830 | }, 1831 | ratio: 1 // Function or number. Set to 1 to disable. 1832 | }, 1833 | proto: { 1834 | initRetina: function() { 1835 | if(window.devicePixelRatio > 1) { 1836 | 1837 | var st = mfp.st.retina, 1838 | ratio = st.ratio; 1839 | 1840 | ratio = !isNaN(ratio) ? ratio : ratio(); 1841 | 1842 | if(ratio > 1) { 1843 | _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) { 1844 | item.img.css({ 1845 | 'max-width': item.img[0].naturalWidth / ratio, 1846 | 'width': '100%' 1847 | }); 1848 | }); 1849 | _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) { 1850 | item.src = st.replaceSrc(item, ratio); 1851 | }); 1852 | } 1853 | } 1854 | 1855 | } 1856 | } 1857 | }); 1858 | 1859 | /*>>retina*/ 1860 | _checkInstance(); })); -------------------------------------------------------------------------------- /gulp-4/app/libs/jquery/dist/jquery.slim.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v3.4.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */ 2 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(g,e){"use strict";var t=[],v=g.document,r=Object.getPrototypeOf,s=t.slice,y=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,m=n.hasOwnProperty,a=m.toString,l=a.call(Object),b={},x=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},w=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function C(e,t,n){var r,i,o=(n=n||v).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector",E=function(e,t){return new E.fn.init(e,t)},d=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function p(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!x(e)&&!w(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+R+")"+R+"*"),U=new RegExp(R+"|>"),V=new RegExp(W),X=new RegExp("^"+B+"$"),Q={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){C()},ae=xe(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{O.apply(t=P.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){O={apply:t.length?function(e,t){q.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,d=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return n;if(!r&&((e?e.ownerDocument||e:m)!==T&&C(e),e=e||T,E)){if(11!==d&&(u=Z.exec(t)))if(i=u[1]){if(9===d){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return O.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&p.getElementsByClassName&&e.getElementsByClassName)return O.apply(n,e.getElementsByClassName(i)),n}if(p.qsa&&!S[t+" "]&&(!v||!v.test(t))&&(1!==d||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===d&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=N),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+be(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return O.apply(n,f.querySelectorAll(c)),n}catch(e){S(t,!0)}finally{s===N&&e.removeAttribute("id")}}}return g(t.replace(F,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>x.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[N]=!0,e}function ce(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)x.attrHandle[n[r]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pe(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in p=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},C=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==T&&9===r.nodeType&&r.documentElement&&(a=(T=r).documentElement,E=!i(T),m!==T&&(n=T.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),p.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=ce(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=J.test(T.getElementsByClassName),p.getById=ce(function(e){return a.appendChild(e).id=N,!T.getElementsByName||!T.getElementsByName(N).length}),p.getById?(x.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(x.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),x.find.TAG=p.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},x.find.CLASS=p.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(p.qsa=J.test(T.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+R+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+N+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+N+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+R+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(p.matchesSelector=J.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",W)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=J.test(a.compareDocumentPosition),y=t||J.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument===m&&y(m,e)?-1:t===T||t.ownerDocument===m&&y(m,t)?1:u?H(u,e)-H(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===T?-1:t===T?1:i?-1:o?1:u?H(u,e)-H(u,t):0;if(i===o)return de(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?de(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),T},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==T&&C(e),p.matchesSelector&&E&&!S[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){S(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=d[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&d(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,n,r){return x(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:v,!0)),D.test(r[1])&&E.isPlainObject(t))for(r in t)x(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=v.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):x(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,j=E(v);var O=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i,he={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ge(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;nx",b.noCloneChecked=!!ye.cloneNode(!0).lastChild.defaultValue;var we=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Ne(){return!1}function Ae(e,t){return e===function(){try{return v.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each(function(){E.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(G.set(e,i,!1),E.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=G.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(E.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),G.set(this,i,r),t=o(this,i),this[i](),r!==(n=G.get(this,i))||t?G.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(G.set(this,i,{value:E.event.trigger(E.extend(r[0],E.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===G.get(e,i)&&E.event.add(e,i,Ee)}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=G.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(ie,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(I)||[""]).length;while(l--)p=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=E.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=E.event.special[p]||{},c=E.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||((d=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(p,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),E.event.global[p]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=G.hasData(e)&&G.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(I)||[""]).length;while(l--)if(p=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){f=E.event.special[p]||{},d=u[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;while(o--)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)E.event.remove(e,p+t[l],n,r,!0);E.isEmptyObject(u)&&G.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=E.event.fix(e),u=new Array(arguments.length),l=(G.get(this,"events")||{})[s.type]||[],c=E.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/\s*$/g;function Oe(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ie(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(G.hasData(e)&&(o=G.access(e),a=G.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(b.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(a=ge(c),r=0,i=(o=ge(e)).length;r
",2===pt.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(b.createHTMLDocument?((r=(t=v.implementation.createHTMLDocument("")).createElement("base")).href=v.location.href,t.head.appendChild(r)):t=v),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),x(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||ie})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return z(this,function(e,t,n){var r;if(w(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=ze(b.pixelPosition,function(e,t){if(t)return t=Fe(e,n),Me.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return z(this,function(e,t,n){var r;return w(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){E.fn[n]=function(e,t){return 0