alexlcdee 8 vuotta sitten
commit
abee9a8b62
100 muutettua tiedostoa jossa 38738 lisäystä ja 0 poistoa
  1. 29 0
      AppAssets.php
  2. 1 0
      app/.gitignore
  3. 2427 0
      app/assets/scripts/daterangepicker.js
  4. 652 0
      app/assets/scripts/dotdotdot.js
  5. 194 0
      app/assets/scripts/fancycheckboxes.js
  6. 1107 0
      app/assets/scripts/formstyler.js
  7. 10991 0
      app/assets/scripts/jquery.js
  8. 1364 0
      app/assets/scripts/lightgallery.js
  9. 1156 0
      app/assets/scripts/lightslider.js
  10. 191 0
      app/assets/scripts/main.js
  11. 13802 0
      app/assets/scripts/moment.js
  12. 76 0
      app/assets/scripts/regionfilter.js
  13. 119 0
      app/assets/scripts/specfilter.js
  14. 27 0
      app/assets/styles/_base.scss
  15. 0 0
      app/assets/styles/_color.scss
  16. 11 0
      app/assets/styles/_container.scss
  17. 50 0
      app/assets/styles/_fonts.scss
  18. 134 0
      app/assets/styles/_grid.scss
  19. 3 0
      app/assets/styles/_include.scss
  20. 0 0
      app/assets/styles/_mixin.scss
  21. 233 0
      app/assets/styles/_reset.scss
  22. 30 0
      app/assets/styles/_wrapper.scss
  23. 76 0
      app/assets/styles/all.scss
  24. 17 0
      app/assets/styles/blocks/logo.scss
  25. 37 0
      app/assets/styles/content/breadcrumbs.scss
  26. 3 0
      app/assets/styles/content/centerbar/calendcase.scss
  27. 32 0
      app/assets/styles/content/centerbar/category.scss
  28. 7 0
      app/assets/styles/content/centerbar/centerbar.scss
  29. 252 0
      app/assets/styles/content/centerbar/comments.scss
  30. 31 0
      app/assets/styles/content/centerbar/datefilter.scss
  31. 21 0
      app/assets/styles/content/centerbar/errorblock.scss
  32. 196 0
      app/assets/styles/content/centerbar/full-news.scss
  33. 69 0
      app/assets/styles/content/centerbar/mainslider.scss
  34. 33 0
      app/assets/styles/content/centerbar/maintitle.scss
  35. 263 0
      app/assets/styles/content/centerbar/newsfilter.scss
  36. 9 0
      app/assets/styles/content/centerbar/pagetitle.scss
  37. 82 0
      app/assets/styles/content/centerbar/pagination.scss
  38. 0 0
      app/assets/styles/content/centerbar/searchfilter.scss
  39. 13 0
      app/assets/styles/content/centerbar/selectedline.scss
  40. 115 0
      app/assets/styles/content/centerbar/shortnews.scss
  41. 122 0
      app/assets/styles/content/centerbar/trailernews.scss
  42. 36 0
      app/assets/styles/content/centerbar/usefulinfo.scss
  43. 30 0
      app/assets/styles/content/centerbar/videorow.scss
  44. 16 0
      app/assets/styles/content/content.scss
  45. 84 0
      app/assets/styles/content/leftbar/entitybanner.scss
  46. 98 0
      app/assets/styles/content/leftbar/filterservice.scss
  47. 85 0
      app/assets/styles/content/leftbar/leftbar.scss
  48. 50 0
      app/assets/styles/content/leftbar/organization.scss
  49. 118 0
      app/assets/styles/content/leftbar/personals.scss
  50. 42 0
      app/assets/styles/content/leftbar/popularservice.scss
  51. 146 0
      app/assets/styles/content/leftbar/search.scss
  52. 45 0
      app/assets/styles/content/leftbar/selectedfilter.scss
  53. 53 0
      app/assets/styles/content/leftbar/specialization.scss
  54. 27 0
      app/assets/styles/content/leftbar/viewallbtn.scss
  55. 28 0
      app/assets/styles/content/rightbar/calend.scss
  56. 6 0
      app/assets/styles/content/rightbar/rightbar.scss
  57. 17 0
      app/assets/styles/elements/banner.scss
  58. 15 0
      app/assets/styles/elements/btn.scss
  59. 19 0
      app/assets/styles/elements/calendinfo.scss
  60. 46 0
      app/assets/styles/elements/holidays.scss
  61. 13 0
      app/assets/styles/elements/input.scss
  62. 28 0
      app/assets/styles/elements/timeseparator.scss
  63. 2 0
      app/assets/styles/footer/aferta.scss
  64. 31 0
      app/assets/styles/footer/copyright.scss
  65. 23 0
      app/assets/styles/footer/footer.scss
  66. 27 0
      app/assets/styles/footer/mainlinks.scss
  67. 52 0
      app/assets/styles/footer/social.scss
  68. 57 0
      app/assets/styles/header/floatmenu.scss
  69. 41 0
      app/assets/styles/header/header.scss
  70. 7 0
      app/assets/styles/header/loading.scss
  71. 30 0
      app/assets/styles/header/region.scss
  72. 48 0
      app/assets/styles/header/scrolling.scss
  73. 16 0
      app/assets/styles/header/slogan.scss
  74. 7 0
      app/assets/styles/header/special.scss
  75. 426 0
      app/assets/styles/scripts/daterangepicker.scss
  76. 478 0
      app/assets/styles/scripts/formstyler.scss
  77. 978 0
      app/assets/styles/scripts/lightgallery.scss
  78. 468 0
      app/assets/styles/scripts/lightslider.scss
  79. 61 0
      app/assets/styles/scripts/radiobuttontoggle.scss
  80. 219 0
      app/assets/ts/fancycheckboxes.ts
  81. 92 0
      app/assets/ts/regionfilter.ts
  82. 130 0
      app/assets/ts/specfilter.ts
  83. 135 0
      app/assets/views/index.jade
  84. 3 0
      app/assets/views/layouts/_head.jade
  85. 4 0
      app/assets/views/layouts/banner_230x400.jade
  86. 4 0
      app/assets/views/layouts/banner_950x155.jade
  87. 6 0
      app/assets/views/layouts/breadcrumbs.jade
  88. 95 0
      app/assets/views/layouts/calendar.jade
  89. 31 0
      app/assets/views/layouts/calendinfo.jade
  90. 17 0
      app/assets/views/layouts/category.jade
  91. 22 0
      app/assets/views/layouts/entitybanner.jade
  92. 6 0
      app/assets/views/layouts/errorblock.jade
  93. 34 0
      app/assets/views/layouts/filterservice.jade
  94. 23 0
      app/assets/views/layouts/footer.jade
  95. 34 0
      app/assets/views/layouts/fullnews.jade
  96. 38 0
      app/assets/views/layouts/header.jade
  97. 38 0
      app/assets/views/layouts/header_inner.jade
  98. 13 0
      app/assets/views/layouts/mainslider.jade
  99. 35 0
      app/assets/views/layouts/maintitle.jade
  100. 30 0
      app/assets/views/layouts/organization.jade

+ 29 - 0
AppAssets.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace web\assets;
+
+
+use base\web\AssetBundle;
+use base\web\FancyboxAsset;
+
+class AppAssets extends AssetBundle
+{
+    public $css = [
+        'css/all.css',
+    ];
+
+    public $js = [
+        'js/all.min.js'
+    ];
+
+    public $depends = [
+        FancyboxAsset::class
+    ];
+
+    public function init()
+    {
+        $this->sourcePath = __DIR__ . '/app/www';
+
+        parent::init();
+    }
+}

+ 1 - 0
app/.gitignore

@@ -0,0 +1 @@
+/node_modules/

+ 2427 - 0
app/assets/scripts/daterangepicker.js

@@ -0,0 +1,2427 @@
+// jquery.daterangepicker.js
+// author : Chunlong Liu
+// license : MIT
+// www.jszen.com
+
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define(['jquery', 'moment'], factory);
+    } else if (typeof exports === 'object' && typeof module !== 'undefined') {
+        // CommonJS. Register as a module
+        module.exports = factory(require('jquery'), require('moment'));
+    } else {
+        // Browser globals
+        factory(jQuery, moment);
+    }
+}(function ($, moment) {
+    'use strict';
+    $.dateRangePickerLanguages = {
+        "default": //default language: English
+            {
+                "selected": "Selected:",
+                "day": "Day",
+                "days": "Days",
+                "apply": "Close",
+                "week-1": "mo",
+                "week-2": "tu",
+                "week-3": "we",
+                "week-4": "th",
+                "week-5": "fr",
+                "week-6": "sa",
+                "week-7": "su",
+                "week-number": "W",
+                "month-name": ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"],
+                "shortcuts": "Shortcuts",
+                "custom-values": "Custom Values",
+                "past": "Past",
+                "following": "Following",
+                "previous": "Previous",
+                "prev-week": "Week",
+                "prev-month": "Month",
+                "prev-year": "Year",
+                "next": "Next",
+                "next-week": "Week",
+                "next-month": "Month",
+                "next-year": "Year",
+                "less-than": "Date range should not be more than %d days",
+                "more-than": "Date range should not be less than %d days",
+                "default-more": "Please select a date range longer than %d days",
+                "default-single": "Please select a date",
+                "default-less": "Please select a date range less than %d days",
+                "default-range": "Please select a date range between %d and %d days",
+                "default-default": "Please select a date range",
+                "time": "Time",
+                "hour": "Hour",
+                "minute": "Minute"
+            },
+        "id": {
+            "selected": "Terpilih:",
+            "day": "Hari",
+            "days": "Hari",
+            "apply": "Tutup",
+            "week-1": "sen",
+            "week-2": "sel",
+            "week-3": "rab",
+            "week-4": "kam",
+            "week-5": "jum",
+            "week-6": "sab",
+            "week-7": "min",
+            "week-number": "W",
+            "month-name": ["januari", "februari", "maret", "april", "mei", "juni", "juli", "agustus", "september", "oktober", "november", "desember"],
+            "shortcuts": "Pintas",
+            "custom-values": "Nilai yang ditentukan",
+            "past": "Yang Lalu",
+            "following": "Mengikuti",
+            "previous": "Sebelumnya",
+            "prev-week": "Minggu",
+            "prev-month": "Bulan",
+            "prev-year": "Tahun",
+            "next": "Selanjutnya",
+            "next-week": "Minggu",
+            "next-month": "Bulan",
+            "next-year": "Tahun",
+            "less-than": "Tanggal harus lebih dari %d hari",
+            "more-than": "Tanggal harus kurang dari %d hari",
+            "default-more": "Jarak tanggal harus lebih lama dari %d hari",
+            "default-single": "Silakan pilih tanggal",
+            "default-less": "Jarak rentang tanggal tidak boleh lebih lama dari %d hari",
+            "default-range": "Rentang tanggal harus antara %d dan %d hari",
+            "default-default": "Silakan pilih rentang tanggal",
+            "time": "Waktu",
+            "hour": "Jam",
+            "minute": "Menit"
+        },
+        "az": {
+            "selected": "Seçildi:",
+            "day": " gün",
+            "days": " gün",
+            "apply": "tətbiq",
+            "week-1": "1",
+            "week-2": "2",
+            "week-3": "3",
+            "week-4": "4",
+            "week-5": "5",
+            "week-6": "6",
+            "week-7": "7",
+            "month-name": ["yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avqust", "sentyabr", "oktyabr", "noyabr", "dekabr"],
+            "shortcuts": "Qısayollar",
+            "past": "Keçmiş",
+            "following": "Növbəti",
+            "previous": "&nbsp;&nbsp;&nbsp;",
+            "prev-week": "Öncəki həftə",
+            "prev-month": "Öncəki ay",
+            "prev-year": "Öncəki il",
+            "next": "&nbsp;&nbsp;&nbsp;",
+            "next-week": "Növbəti həftə",
+            "next-month": "Növbəti ay",
+            "next-year": "Növbəti il",
+            "less-than": "Tarix aralığı %d gündən çox olmamalıdır",
+            "more-than": "Tarix aralığı %d gündən az olmamalıdır",
+            "default-more": "%d gündən çox bir tarix seçin",
+            "default-single": "Tarix seçin",
+            "default-less": "%d gündən az bir tarix seçin",
+            "default-range": "%d və %d gün aralığında tarixlər seçin",
+            "default-default": "Tarix aralığı seçin"
+        },
+        "bg": {
+            "selected": "Избрано:",
+            "day": "Ден",
+            "days": "Дни",
+            "apply": "Затвори",
+            "week-1": "пн",
+            "week-2": "вт",
+            "week-3": "ср",
+            "week-4": "чт",
+            "week-5": "пт",
+            "week-6": "сб",
+            "week-7": "нд",
+            "week-number": "С",
+            "month-name": ["януари", "февруари", "март", "април", "май", "юни", "юли", "август", "септември", "октомври", "ноември", "декември"],
+            "shortcuts": "Преки пътища",
+            "custom-values": "Персонализирани стойности",
+            "past": "Минал",
+            "following": "Следващ",
+            "previous": "Предишен",
+            "prev-week": "Седмица",
+            "prev-month": "Месец",
+            "prev-year": "Година",
+            "next": "Следващ",
+            "next-week": "Седмица",
+            "next-month": "Месец",
+            "next-year": "Година",
+            "less-than": "Периодът от време не трябва да е повече от %d дни",
+            "more-than": "Периодът от време не трябва да е по-малко от %d дни",
+            "default-more": "Моля изберете период по-дълъг от %d дни",
+            "default-single": "Моля изберете дата",
+            "default-less": "Моля изберете период по-къс от %d дни",
+            "default-range": "Моля изберете период между %d и %d дни",
+            "default-default": "Моля изберете период",
+            "time": "Време",
+            "hour": "Час",
+            "minute": "Минута"
+        },
+        "cn": //simplified chinese
+            {
+                "selected": "已选择:",
+                "day": "天",
+                "days": "天",
+                "apply": "确定",
+                "week-1": "一",
+                "week-2": "二",
+                "week-3": "三",
+                "week-4": "四",
+                "week-5": "五",
+                "week-6": "六",
+                "week-7": "日",
+                "week-number": "周",
+                "month-name": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
+                "shortcuts": "快捷选择",
+                "past": "过去",
+                "following": "将来",
+                "previous": "&nbsp;&nbsp;&nbsp;",
+                "prev-week": "上周",
+                "prev-month": "上个月",
+                "prev-year": "去年",
+                "next": "&nbsp;&nbsp;&nbsp;",
+                "next-week": "下周",
+                "next-month": "下个月",
+                "next-year": "明年",
+                "less-than": "所选日期范围不能大于%d天",
+                "more-than": "所选日期范围不能小于%d天",
+                "default-more": "请选择大于%d天的日期范围",
+                "default-less": "请选择小于%d天的日期范围",
+                "default-range": "请选择%d天到%d天的日期范围",
+                "default-single": "请选择一个日期",
+                "default-default": "请选择一个日期范围",
+                "time": "时间",
+                "hour": "小时",
+                "minute": "分钟"
+            },
+        "cz": {
+            "selected": "Vybráno:",
+            "day": "Den",
+            "days": "Dny",
+            "apply": "Zavřít",
+            "week-1": "po",
+            "week-2": "út",
+            "week-3": "st",
+            "week-4": "čt",
+            "week-5": "pá",
+            "week-6": "so",
+            "week-7": "ne",
+            "month-name": ["leden", "únor", "březen", "duben", "květen", "červen", "červenec", "srpen", "září", "říjen", "listopad", "prosinec"],
+            "shortcuts": "Zkratky",
+            "past": "po",
+            "following": "následující",
+            "previous": "předchozí",
+            "prev-week": "týden",
+            "prev-month": "měsíc",
+            "prev-year": "rok",
+            "next": "další",
+            "next-week": "týden",
+            "next-month": "měsíc",
+            "next-year": "rok",
+            "less-than": "Rozsah data by neměl být větší než %d dnů",
+            "more-than": "Rozsah data by neměl být menší než %d dnů",
+            "default-more": "Prosím zvolte rozsah data větší než %d dnů",
+            "default-single": "Prosím zvolte datum",
+            "default-less": "Prosím zvolte rozsah data menší než %d dnů",
+            "default-range": "Prosím zvolte rozsah data mezi %d a %d dny",
+            "default-default": "Prosím zvolte rozsah data"
+        },
+        "de": {
+            "selected": "Auswahl:",
+            "day": "Tag",
+            "days": "Tage",
+            "apply": "Schließen",
+            "week-1": "mo",
+            "week-2": "di",
+            "week-3": "mi",
+            "week-4": "do",
+            "week-5": "fr",
+            "week-6": "sa",
+            "week-7": "so",
+            "month-name": ["januar", "februar", "märz", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "dezember"],
+            "shortcuts": "Schnellwahl",
+            "past": "Vorherige",
+            "following": "Folgende",
+            "previous": "Vorherige",
+            "prev-week": "Woche",
+            "prev-month": "Monat",
+            "prev-year": "Jahr",
+            "next": "Nächste",
+            "next-week": "Woche",
+            "next-month": "Monat",
+            "next-year": "Jahr",
+            "less-than": "Datumsbereich darf nicht größer sein als %d Tage",
+            "more-than": "Datumsbereich darf nicht kleiner sein als %d Tage",
+            "default-more": "Bitte mindestens %d Tage auswählen",
+            "default-single": "Bitte ein Datum auswählen",
+            "default-less": "Bitte weniger als %d Tage auswählen",
+            "default-range": "Bitte einen Datumsbereich zwischen %d und %d Tagen auswählen",
+            "default-default": "Bitte ein Start- und Enddatum auswählen",
+            "Time": "Zeit",
+            "hour": "Stunde",
+            "minute": "Minute"
+        },
+        "es": {
+            "selected": "Seleccionado:",
+            "day": "Día",
+            "days": "Días",
+            "apply": "Cerrar",
+            "week-1": "lu",
+            "week-2": "ma",
+            "week-3": "mi",
+            "week-4": "ju",
+            "week-5": "vi",
+            "week-6": "sa",
+            "week-7": "do",
+            "month-name": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
+            "shortcuts": "Accesos directos",
+            "past": "Pasado",
+            "following": "Siguiente",
+            "previous": "Anterior",
+            "prev-week": "Semana",
+            "prev-month": "Mes",
+            "prev-year": "Año",
+            "next": "Siguiente",
+            "next-week": "Semana",
+            "next-month": "Mes",
+            "next-year": "Año",
+            "less-than": "El rango no debería ser mayor de %d días",
+            "more-than": "El rango no debería ser menor de %d días",
+            "default-more": "Por favor selecciona un rango mayor a %d días",
+            "default-single": "Por favor selecciona un día",
+            "default-less": "Por favor selecciona un rango menor a %d días",
+            "default-range": "Por favor selecciona un rango entre %d y %d días",
+            "default-default": "Por favor selecciona un rango de fechas."
+        },
+        "fr": {
+            "selected": "Sélection:",
+            "day": "Jour",
+            "days": "Jours",
+            "apply": "Fermer",
+            "week-1": "lu",
+            "week-2": "ma",
+            "week-3": "me",
+            "week-4": "je",
+            "week-5": "ve",
+            "week-6": "sa",
+            "week-7": "di",
+            "month-name": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
+            "shortcuts": "Raccourcis",
+            "past": "Passé",
+            "following": "Suivant",
+            "previous": "Précédent",
+            "prev-week": "Semaine",
+            "prev-month": "Mois",
+            "prev-year": "Année",
+            "next": "Suivant",
+            "next-week": "Semaine",
+            "next-month": "Mois",
+            "next-year": "Année",
+            "less-than": "L'intervalle ne doit pas être supérieure à %d jours",
+            "more-than": "L'intervalle ne doit pas être inférieure à %d jours",
+            "default-more": "Merci de choisir une intervalle supérieure à %d jours",
+            "default-single": "Merci de choisir une date",
+            "default-less": "Merci de choisir une intervalle inférieure %d jours",
+            "default-range": "Merci de choisir une intervalle comprise entre %d et %d jours",
+            "default-default": "Merci de choisir une date"
+        },
+        "hu": {
+            "selected": "Kiválasztva:",
+            "day": "Nap",
+            "days": "Nap",
+            "apply": "Ok",
+            "week-1": "h",
+            "week-2": "k",
+            "week-3": "sz",
+            "week-4": "cs",
+            "week-5": "p",
+            "week-6": "sz",
+            "week-7": "v",
+            "month-name": ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"],
+            "shortcuts": "Gyorsválasztó",
+            "past": "Múlt",
+            "following": "Következő",
+            "previous": "Előző",
+            "prev-week": "Hét",
+            "prev-month": "Hónap",
+            "prev-year": "Év",
+            "next": "Következő",
+            "next-week": "Hét",
+            "next-month": "Hónap",
+            "next-year": "Év",
+            "less-than": "A kiválasztás nem lehet több %d napnál",
+            "more-than": "A kiválasztás nem lehet több %d napnál",
+            "default-more": "Válassz ki egy időszakot ami hosszabb mint %d nap",
+            "default-single": "Válassz egy napot",
+            "default-less": "Válassz ki egy időszakot ami rövidebb mint %d nap",
+            "default-range": "Válassz ki egy %d - %d nap hosszú időszakot",
+            "default-default": "Válassz ki egy időszakot"
+        },
+        "it": {
+            "selected": "Selezionati:",
+            "day": "Giorno",
+            "days": "Giorni",
+            "apply": "Chiudi",
+            "week-1": "lu",
+            "week-2": "ma",
+            "week-3": "me",
+            "week-4": "gi",
+            "week-5": "ve",
+            "week-6": "sa",
+            "week-7": "do",
+            "month-name": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"],
+            "shortcuts": "Scorciatoie",
+            "past": "Scorso",
+            "following": "Successivo",
+            "previous": "Precedente",
+            "prev-week": "Settimana",
+            "prev-month": "Mese",
+            "prev-year": "Anno",
+            "next": "Prossimo",
+            "next-week": "Settimana",
+            "next-month": "Mese",
+            "next-year": "Anno",
+            "less-than": "L'intervallo non dev'essere maggiore di %d giorni",
+            "more-than": "L'intervallo non dev'essere minore di %d giorni",
+            "default-more": "Seleziona un intervallo maggiore di %d giorni",
+            "default-single": "Seleziona una data",
+            "default-less": "Seleziona un intervallo minore di %d giorni",
+            "default-range": "Seleziona un intervallo compreso tra i %d e i %d giorni",
+            "default-default": "Seleziona un intervallo di date"
+        },
+        "ko": {
+            "selected": "기간:",
+            "day": "일",
+            "days": "일간",
+            "apply": "닫기",
+            "week-1": "월",
+            "week-2": "화",
+            "week-3": "수",
+            "week-4": "목",
+            "week-5": "금",
+            "week-6": "토",
+            "week-7": "일",
+            "week-number": "주",
+            "month-name": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
+            "shortcuts": "단축키들",
+            "past": "지난(오늘기준)",
+            "following": "이후(오늘기준)",
+            "previous": "이전",
+            "prev-week": "1주",
+            "prev-month": "1달",
+            "prev-year": "1년",
+            "next": "다음",
+            "next-week": "1주",
+            "next-month": "1달",
+            "next-year": "1년",
+            "less-than": "날짜 범위는 %d 일보다 많을 수 없습니다",
+            "more-than": "날짜 범위는 %d 일보다 작을 수 없습니다",
+            "default-more": "날짜 범위를 %d 일보다 길게 선택해 주세요",
+            "default-single": "날짜를 선택해 주세요",
+            "default-less": "%d 일보다 작은 날짜를 선택해 주세요",
+            "default-range": "%d와 %d 일 사이의 날짜 범위를 선택해 주세요",
+            "default-default": "날짜 범위를 선택해 주세요",
+            "time": "시각",
+            "hour": "시",
+            "minute": "분"
+        },
+        "no": {
+            "selected": "Valgt:",
+            "day": "Dag",
+            "days": "Dager",
+            "apply": "Lukk",
+            "week-1": "ma",
+            "week-2": "ti",
+            "week-3": "on",
+            "week-4": "to",
+            "week-5": "fr",
+            "week-6": "lø",
+            "week-7": "sø",
+            "month-name": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"],
+            "shortcuts": "Snarveier",
+            "custom-values": "Egendefinerte Verdier",
+            "past": "Over", // Not quite sure about the context of this one
+            "following": "Følger",
+            "previous": "Forrige",
+            "prev-week": "Uke",
+            "prev-month": "Måned",
+            "prev-year": "År",
+            "next": "Neste",
+            "next-week": "Uke",
+            "next-month": "Måned",
+            "next-year": "År",
+            "less-than": "Datoperioden skal ikkje være lengre enn %d dager",
+            "more-than": "Datoperioden skal ikkje være kortere enn %d dager",
+            "default-more": "Vennligst velg ein datoperiode lengre enn %d dager",
+            "default-single": "Vennligst velg ein dato",
+            "default-less": "Vennligst velg ein datoperiode mindre enn %d dager",
+            "default-range": "Vennligst velg ein datoperiode mellom %d og %d dager",
+            "default-default": "Vennligst velg ein datoperiode",
+            "time": "Tid",
+            "hour": "Time",
+            "minute": "Minutter"
+        },
+        "nl": {
+            "selected": "Geselecteerd:",
+            "day": "Dag",
+            "days": "Dagen",
+            "apply": "Ok",
+            "week-1": "ma",
+            "week-2": "di",
+            "week-3": "wo",
+            "week-4": "do",
+            "week-5": "vr",
+            "week-6": "za",
+            "week-7": "zo",
+            "month-name": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
+            "shortcuts": "Snelkoppelingen",
+            "custom-values": "Aangepaste waarden",
+            "past": "Verleden",
+            "following": "Komend",
+            "previous": "Vorige",
+            "prev-week": "Week",
+            "prev-month": "Maand",
+            "prev-year": "Jaar",
+            "next": "Volgende",
+            "next-week": "Week",
+            "next-month": "Maand",
+            "next-year": "Jaar",
+            "less-than": "Interval moet langer dan %d dagen zijn",
+            "more-than": "Interval mag niet minder dan %d dagen zijn",
+            "default-more": "Selecteer een interval langer dan %dagen",
+            "default-single": "Selecteer een datum",
+            "default-less": "Selecteer een interval minder dan %d dagen",
+            "default-range": "Selecteer een interval tussen %d en %d dagen",
+            "default-default": "Selecteer een interval",
+            "time": "Tijd",
+            "hour": "Uur",
+            "minute": "Minuut"
+        },
+        "ru": {
+            "selected": "Выбрано:",
+            "day": "День",
+            "days": "Дней",
+            "apply": "Применить",
+            "week-1": "пн",
+            "week-2": "вт",
+            "week-3": "ср",
+            "week-4": "чт",
+            "week-5": "пт",
+            "week-6": "сб",
+            "week-7": "вс",
+            "month-name": ["январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь"],
+            "shortcuts": "Быстрый выбор",
+            "custom-values": "Пользовательские значения",
+            "past": "Прошедшие",
+            "following": "Следующие",
+            "previous": "&nbsp;&nbsp;&nbsp;",
+            "prev-week": "Неделя",
+            "prev-month": "Месяц",
+            "prev-year": "Год",
+            "next": "&nbsp;&nbsp;&nbsp;",
+            "next-week": "Неделя",
+            "next-month": "Месяц",
+            "next-year": "Год",
+            "less-than": "Диапазон не может быть больше %d дней",
+            "more-than": "Диапазон не может быть меньше %d дней",
+            "default-more": "Пожалуйста выберите диапазон больше %d дней",
+            "default-single": "Пожалуйста выберите дату",
+            "default-less": "Пожалуйста выберите диапазон меньше %d дней",
+            "default-range": "Пожалуйста выберите диапазон между %d и %d днями",
+            "default-default": "Пожалуйста выберите диапазон",
+            "time": "Время",
+            "hour": "Часы",
+            "minute": "Минуты"
+        },
+        "pl": {
+            "selected": "Wybrany:",
+            "day": "Dzień",
+            "days": "Dni",
+            "apply": "Zamknij",
+            "week-1": "pon",
+            "week-2": "wt",
+            "week-3": "śr",
+            "week-4": "czw",
+            "week-5": "pt",
+            "week-6": "so",
+            "week-7": "nd",
+            "month-name": ["styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"],
+            "shortcuts": "Skróty",
+            "custom-values": "Niestandardowe wartości",
+            "past": "Przeszłe",
+            "following": "Następne",
+            "previous": "Poprzednie",
+            "prev-week": "tydzień",
+            "prev-month": "miesiąc",
+            "prev-year": "rok",
+            "next": "Następny",
+            "next-week": "tydzień",
+            "next-month": "miesiąc",
+            "next-year": "rok",
+            "less-than": "Okres nie powinien być dłuższy niż %d dni",
+            "more-than": "Okres nie powinien być krótszy niż  %d ni",
+            "default-more": "Wybierz okres dłuższy niż %d dni",
+            "default-single": "Wybierz datę",
+            "default-less": "Wybierz okres krótszy niż %d dni",
+            "default-range": "Wybierz okres trwający od %d do %d dni",
+            "default-default": "Wybierz okres",
+            "time": "Czas",
+            "hour": "Godzina",
+            "minute": "Minuta"
+        },
+        "se": {
+            "selected": "Vald:",
+            "day": "dag",
+            "days": "dagar",
+            "apply": "godkänn",
+            "week-1": "ma",
+            "week-2": "ti",
+            "week-3": "on",
+            "week-4": "to",
+            "week-5": "fr",
+            "week-6": "lö",
+            "week-7": "sö",
+            "month-name": ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"],
+            "shortcuts": "genvägar",
+            "custom-values": "Anpassade värden",
+            "past": "över",
+            "following": "följande",
+            "previous": "förra",
+            "prev-week": "vecka",
+            "prev-month": "månad",
+            "prev-year": "år",
+            "next": "nästa",
+            "next-week": "vecka",
+            "next-month": "måned",
+            "next-year": "år",
+            "less-than": "Datumintervall bör inte vara mindre än %d dagar",
+            "more-than": "Datumintervall bör inte vara mer än %d dagar",
+            "default-more": "Välj ett datumintervall längre än %d dagar",
+            "default-single": "Välj ett datum",
+            "default-less": "Välj ett datumintervall mindre än %d dagar",
+            "default-range": "Välj ett datumintervall mellan %d och %d dagar",
+            "default-default": "Välj ett datumintervall",
+            "time": "tid",
+            "hour": "timme",
+            "minute": "minut"
+        },
+        "pt": //Portuguese (European)
+            {
+                "selected": "Selecionado:",
+                "day": "Dia",
+                "days": "Dias",
+                "apply": "Fechar",
+                "week-1": "seg",
+                "week-2": "ter",
+                "week-3": "qua",
+                "week-4": "qui",
+                "week-5": "sex",
+                "week-6": "sab",
+                "week-7": "dom",
+                "week-number": "N",
+                "month-name": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"],
+                "shortcuts": "Atalhos",
+                "custom-values": "Valores Personalizados",
+                "past": "Passado",
+                "following": "Seguinte",
+                "previous": "Anterior",
+                "prev-week": "Semana",
+                "prev-month": "Mês",
+                "prev-year": "Ano",
+                "next": "Próximo",
+                "next-week": "Próxima Semana",
+                "next-month": "Próximo Mês",
+                "next-year": "Próximo Ano",
+                "less-than": "O período selecionado não deve ser maior que %d dias",
+                "more-than": "O período selecionado não deve ser menor que %d dias",
+                "default-more": "Selecione um período superior a %d dias",
+                "default-single": "Selecione uma data",
+                "default-less": "Selecione um período inferior a %d dias",
+                "default-range": "Selecione um período de %d a %d dias",
+                "default-default": "Selecione um período",
+                "time": "Tempo",
+                "hour": "Hora",
+                "minute": "Minuto"
+            },
+        "tc": // traditional chinese
+            {
+                "selected": "已選擇:",
+                "day": "天",
+                "days": "天",
+                "apply": "確定",
+                "week-1": "一",
+                "week-2": "二",
+                "week-3": "三",
+                "week-4": "四",
+                "week-5": "五",
+                "week-6": "六",
+                "week-7": "日",
+                "week-number": "周",
+                "month-name": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
+                "shortcuts": "快速選擇",
+                "past": "過去",
+                "following": "將來",
+                "previous": "&nbsp;&nbsp;&nbsp;",
+                "prev-week": "上週",
+                "prev-month": "上個月",
+                "prev-year": "去年",
+                "next": "&nbsp;&nbsp;&nbsp;",
+                "next-week": "下周",
+                "next-month": "下個月",
+                "next-year": "明年",
+                "less-than": "所選日期範圍不能大於%d天",
+                "more-than": "所選日期範圍不能小於%d天",
+                "default-more": "請選擇大於%d天的日期範圍",
+                "default-less": "請選擇小於%d天的日期範圍",
+                "default-range": "請選擇%d天到%d天的日期範圍",
+                "default-single": "請選擇一個日期",
+                "default-default": "請選擇一個日期範圍",
+                "time": "日期",
+                "hour": "小時",
+                "minute": "分鐘"
+            },
+        "ja": {
+            "selected": "選択しました:",
+            "day": "日",
+            "days": "日々",
+            "apply": "閉じる",
+            "week-1": "月",
+            "week-2": "火",
+            "week-3": "水",
+            "week-4": "木",
+            "week-5": "金",
+            "week-6": "土",
+            "week-7": "日",
+            "month-name": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+            "shortcuts": "クイック選択",
+            "past": "過去",
+            "following": "将来",
+            "previous": "&nbsp;&nbsp;&nbsp;",
+            "prev-week": "先週、",
+            "prev-month": "先月",
+            "prev-year": "昨年",
+            "next": "&nbsp;&nbsp;&nbsp;",
+            "next-week": "来週",
+            "next-month": "来月",
+            "next-year": "来年",
+            "less-than": "日付の範囲は %d 日以上にすべきではありません",
+            "more-than": "日付の範囲は %d 日を下回ってはいけません",
+            "default-more": "%d 日よりも長い期間を選択してください",
+            "default-less": "%d 日未満の期間を選択してください",
+            "default-range": "%d と% d日の間の日付範囲を選択してください",
+            "default-single": "日付を選択してください",
+            "default-default": "日付範囲を選択してください",
+            "time": "時間",
+            "hour": "時間",
+            "minute": "分"
+        },
+        "da": {
+            "selected": "Valgt:",
+            "day": "Dag",
+            "days": "Dage",
+            "apply": "Luk",
+            "week-1": "ma",
+            "week-2": "ti",
+            "week-3": "on",
+            "week-4": "to",
+            "week-5": "fr",
+            "week-6": "lö",
+            "week-7": "sö",
+            "month-name": ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"],
+            "shortcuts": "genveje",
+            "custom-values": "Brugerdefinerede værdier",
+            "past": "Forbi",
+            "following": "Følgende",
+            "previous": "Forrige",
+            "prev-week": "uge",
+            "prev-month": "månad",
+            "prev-year": "år",
+            "next": "Næste",
+            "next-week": "Næste uge",
+            "next-month": "Næste måned",
+            "next-year": "Næste år",
+            "less-than": "Dato interval bør ikke være med end %d dage",
+            "more-than": "Dato interval bør ikke være mindre end %d dage",
+            "default-more": "Vælg datointerval længere end %d dage",
+            "default-single": "Vælg dato",
+            "default-less": "Vælg datointerval mindre end %d dage",
+            "default-range": "Vælg datointerval mellem %d og %d dage",
+            "default-default": "Vælg datointerval",
+            "time": "tid",
+            "hour": "time",
+            "minute": "minut"
+        },
+        "fi": // Finnish
+            {
+                "selected": "Valittu:",
+                "day": "Päivä",
+                "days": "Päivää",
+                "apply": "Sulje",
+                "week-1": "ma",
+                "week-2": "ti",
+                "week-3": "ke",
+                "week-4": "to",
+                "week-5": "pe",
+                "week-6": "la",
+                "week-7": "su",
+                "week-number": "V",
+                "month-name": ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"],
+                "shortcuts": "Pikavalinnat",
+                "custom-values": "Mukautetut Arvot",
+                "past": "Menneet",
+                "following": "Tulevat",
+                "previous": "Edellinen",
+                "prev-week": "Viikko",
+                "prev-month": "Kuukausi",
+                "prev-year": "Vuosi",
+                "next": "Seuraava",
+                "next-week": "Viikko",
+                "next-month": "Kuukausi",
+                "next-year": "Vuosi",
+                "less-than": "Aikajakson tulisi olla vähemmän kuin %d päivää",
+                "more-than": "Aikajakson ei tulisi olla vähempää kuin %d päivää",
+                "default-more": "Valitse pidempi aikajakso kuin %d päivää",
+                "default-single": "Valitse päivä",
+                "default-less": "Valitse lyhyempi aikajakso kuin %d päivää",
+                "default-range": "Valitse aikajakso %d ja %d päivän väliltä",
+                "default-default": "Valitse aikajakso",
+                "time": "Aika",
+                "hour": "Tunti",
+                "minute": "Minuutti"
+            },
+        "cat": // Catala
+            {
+                "selected": "Seleccionats:",
+                "day": "Dia",
+                "days": "Dies",
+                "apply": "Tanca",
+                "week-1": "Dl",
+                "week-2": "Dm",
+                "week-3": "Dc",
+                "week-4": "Dj",
+                "week-5": "Dv",
+                "week-6": "Ds",
+                "week-7": "Dg",
+                "week-number": "S",
+                "month-name": ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"],
+                "shortcuts": "Dreçeres",
+                "custom-values": "Valors personalitzats",
+                "past": "Passat",
+                "following": "Futur",
+                "previous": "Anterior",
+                "prev-week": "Setmana",
+                "prev-month": "Mes",
+                "prev-year": "Any",
+                "next": "Següent",
+                "next-week": "Setmana",
+                "next-month": "Mes",
+                "next-year": "Any",
+                "less-than": "El període no hauria de ser de més de %d dies",
+                "more-than": "El període no hauria de ser de menys de %d dies",
+                "default-more": "Perfavor selecciona un període més gran de %d dies",
+                "default-single": "Perfavor selecciona una data",
+                "default-less": "Perfavor selecciona un període de menys de %d dies",
+                "default-range": "Perfavor selecciona un període d'entre %d i %d dies",
+                "default-default": "Perfavor selecciona un període",
+                "time": "Temps",
+                "hour": "Hora",
+                "minute": "Minut"
+            }
+    };
+
+    $.fn.dateRangePicker = function (opt) {
+        if (!opt) opt = {};
+        opt = $.extend(true, {
+            autoClose: false,
+            format: 'YYYY-MM-DD',
+            separator: ' - ',
+            language: 'auto',
+            startOfWeek: 'sunday', // or monday
+            getValue: function () {
+                return $(this).val();
+            },
+            setValue: function (s) {
+                if (!$(this).attr('readonly') && !$(this).is(':disabled') && s != $(this).val()) {
+                    $(this).val(s);
+                }
+            },
+            startDate: false,
+            endDate: false,
+            time: {
+                enabled: false
+            },
+            minDays: 0,
+            maxDays: 0,
+            showShortcuts: false,
+            shortcuts: {
+                //'prev-days': [1,3,5,7],
+                // 'next-days': [3,5,7],
+                //'prev' : ['week','month','year'],
+                // 'next' : ['week','month','year']
+            },
+            customShortcuts: [],
+            inline: false,
+            container: 'body',
+            alwaysOpen: false,
+            singleDate: false,
+            lookBehind: false,
+            batchMode: false,
+            duration: 700,
+            stickyMonths: false,
+            dayDivAttrs: [],
+            dayTdAttrs: [],
+            selectForward: false,
+            selectBackward: false,
+            applyBtnClass: '',
+            singleMonth: 'auto',
+            hoveringTooltip: function (days, startTime, hoveringTime) {
+                return days > 1 ? days + ' ' + translate('days') : '';
+            },
+            showTopbar: true,
+            swapTime: false,
+            showWeekNumbers: false,
+            getWeekNumber: function (date) //date will be the first day of a week
+            {
+                return moment(date).format('w');
+            },
+            customOpenAnimation: null,
+            customCloseAnimation: null,
+            customArrowPrevSymbol: null,
+            customArrowNextSymbol: null
+        }, opt);
+
+        opt.start = false;
+        opt.end = false;
+
+        opt.startWeek = false;
+
+        //detect a touch device
+        opt.isTouchDevice = 'ontouchstart' in window || navigator.msMaxTouchPoints;
+
+        //if it is a touch device, hide hovering tooltip
+        if (opt.isTouchDevice) opt.hoveringTooltip = false;
+
+        //show one month on mobile devices
+        if (opt.singleMonth == 'auto') opt.singleMonth = $(window).width() < 480;
+        if (opt.singleMonth) opt.stickyMonths = false;
+
+        if (!opt.showTopbar) opt.autoClose = true;
+
+        if (opt.startDate && typeof opt.startDate == 'string') opt.startDate = moment(opt.startDate, opt.format).toDate();
+        if (opt.endDate && typeof opt.endDate == 'string') opt.endDate = moment(opt.endDate, opt.format).toDate();
+
+        var languages = getLanguages();
+        var box;
+        var initiated = false;
+        var self = this;
+        var selfDom = $(self).get(0);
+        var domChangeTimer;
+
+        $(this).unbind('.datepicker').bind('click.datepicker', function (evt) {
+            var isOpen = box.is(':visible');
+            if (!isOpen) open(opt.duration);
+        }).bind('change.datepicker', function (evt) {
+            checkAndSetDefaultValue();
+        }).bind('keyup.datepicker', function () {
+            try {
+                clearTimeout(domChangeTimer);
+            } catch (e) {
+            }
+            domChangeTimer = setTimeout(function () {
+                checkAndSetDefaultValue();
+            }, 2000);
+        });
+
+        init_datepicker.call(this);
+
+        if (opt.alwaysOpen) {
+            open(0);
+        }
+
+        // expose some api
+        $(this).data('dateRangePicker', {
+            setStart: function (d1) {
+                if (typeof d1 == 'string') {
+                    d1 = moment(d1, opt.format).toDate();
+                }
+
+                opt.end = false;
+                setSingleDate(d1);
+
+                return this;
+            },
+            setEnd: function (d2, silent) {
+                var start = new Date();
+                start.setTime(opt.start);
+                if (typeof d2 == 'string') {
+                    d2 = moment(d2, opt.format).toDate();
+                }
+                setDateRange(start, d2, silent);
+                return this;
+            },
+            setDateRange: function (d1, d2, silent) {
+                if (typeof d1 == 'string' && typeof d2 == 'string') {
+                    d1 = moment(d1, opt.format).toDate();
+                    d2 = moment(d2, opt.format).toDate();
+                }
+                setDateRange(d1, d2, silent);
+            },
+            clear: clearSelection,
+            close: closeDatePicker,
+            open: open,
+            redraw: redrawDatePicker,
+            getDatePicker: getDatePicker,
+            resetMonthsView: resetMonthsView,
+            destroy: function () {
+                $(self).unbind('.datepicker');
+                $(self).data('dateRangePicker', '');
+                $(self).data('date-picker-opened', null);
+                box.remove();
+                $(window).unbind('resize.datepicker', calcPosition);
+                $(document).unbind('click.datepicker', closeDatePicker);
+            }
+        });
+
+        $(window).bind('resize.datepicker', calcPosition);
+
+        return this;
+
+        function IsOwnDatePickerClicked(evt, selfObj) {
+            return (selfObj.contains(evt.target) || evt.target == selfObj || (selfObj.childNodes != undefined && $.inArray(evt.target, selfObj.childNodes) >= 0));
+        }
+
+        function init_datepicker() {
+            var self = this;
+
+            if ($(this).data('date-picker-opened')) {
+                closeDatePicker();
+                return;
+            }
+            $(this).data('date-picker-opened', true);
+
+
+            box = createDom().hide();
+            box.append('<div class="date-range-length-tip"></div>');
+
+            $(opt.container).append(box);
+
+            if (!opt.inline) {
+                calcPosition();
+            } else {
+                box.addClass('inline-wrapper');
+            }
+
+            if (opt.alwaysOpen) {
+                box.find('.apply-btn').hide();
+            }
+
+            var defaultTime = getDefaultTime();
+            resetMonthsView(defaultTime);
+
+            if (opt.time.enabled) {
+                if ((opt.startDate && opt.endDate) || (opt.start && opt.end)) {
+                    showTime(moment(opt.start || opt.startDate).toDate(), 'time1');
+                    showTime(moment(opt.end || opt.endDate).toDate(), 'time2');
+                } else {
+                    var defaultEndTime = opt.defaultEndTime ? opt.defaultEndTime : defaultTime;
+                    showTime(defaultTime, 'time1');
+                    showTime(defaultEndTime, 'time2');
+                }
+            }
+
+            //showSelectedInfo();
+
+
+            var defaultTopText = '';
+            if (opt.singleDate)
+                defaultTopText = translate('default-single');
+            else if (opt.minDays && opt.maxDays)
+                defaultTopText = translate('default-range');
+            else if (opt.minDays)
+                defaultTopText = translate('default-more');
+            else if (opt.maxDays)
+                defaultTopText = translate('default-less');
+            else
+                defaultTopText = translate('default-default');
+
+            box.find('.default-top').html(defaultTopText.replace(/\%d/, opt.minDays).replace(/\%d/, opt.maxDays));
+            if (opt.singleMonth) {
+                box.addClass('single-month');
+            } else {
+                box.addClass('two-months');
+            }
+
+
+            setTimeout(function () {
+                updateCalendarWidth();
+                initiated = true;
+            }, 0);
+
+            box.click(function (evt) {
+                evt.stopPropagation();
+            });
+
+            //if user click other place of the webpage, close date range picker window
+            $(document).bind('click.datepicker', function (evt) {
+                if (!IsOwnDatePickerClicked(evt, self[0])) {
+                    if (box.is(':visible')) closeDatePicker();
+                }
+            });
+
+            box.find('.next').click(function () {
+                if (!opt.stickyMonths)
+                    gotoNextMonth(this);
+                else
+                    gotoNextMonth_stickily(this);
+            });
+
+            function gotoNextMonth(self) {
+                var isMonth2 = $(self).parents('table').hasClass('month2');
+                var month = isMonth2 ? opt.month2 : opt.month1;
+                month = nextMonth(month);
+                if (!opt.singleMonth && !opt.singleDate && !isMonth2 && compare_month(month, opt.month2) >= 0 || isMonthOutOfBounds(month)) return;
+                showMonth(month, isMonth2 ? 'month2' : 'month1');
+                showGap();
+            }
+
+            function gotoNextMonth_stickily(self) {
+                var nextMonth1 = nextMonth(opt.month1);
+                var nextMonth2 = nextMonth(opt.month2);
+                if (isMonthOutOfBounds(nextMonth2)) return;
+                if (!opt.singleDate && compare_month(nextMonth1, nextMonth2) >= 0) return;
+                showMonth(nextMonth1, 'month1');
+                showMonth(nextMonth2, 'month2');
+                showSelectedDays();
+            }
+
+
+            box.find('.prev').click(function () {
+                if (!opt.stickyMonths)
+                    gotoPrevMonth(this);
+                else
+                    gotoPrevMonth_stickily(this);
+            });
+
+            function gotoPrevMonth(self) {
+                var isMonth2 = $(self).parents('table').hasClass('month2');
+                var month = isMonth2 ? opt.month2 : opt.month1;
+                month = prevMonth(month);
+                if (isMonth2 && compare_month(month, opt.month1) <= 0 || isMonthOutOfBounds(month)) return;
+                showMonth(month, isMonth2 ? 'month2' : 'month1');
+                showGap();
+            }
+
+            function gotoPrevMonth_stickily(self) {
+                var prevMonth1 = prevMonth(opt.month1);
+                var prevMonth2 = prevMonth(opt.month2);
+                if (isMonthOutOfBounds(prevMonth1)) return;
+                if (!opt.singleDate && compare_month(prevMonth2, prevMonth1) <= 0) return;
+                showMonth(prevMonth2, 'month2');
+                showMonth(prevMonth1, 'month1');
+                showSelectedDays();
+            }
+
+            box.attr('unselectable', 'on')
+                .css('user-select', 'none')
+                .bind('selectstart', function (e) {
+                    e.preventDefault();
+                    return false;
+                });
+
+            box.find('.apply-btn').click(function () {
+                closeDatePicker();
+                var dateRange = getDateString(new Date(opt.start)) + opt.separator + getDateString(new Date(opt.end));
+                $(self).trigger('datepicker-apply', {
+                    'value': dateRange,
+                    'date1': new Date(opt.start),
+                    'date2': new Date(opt.end)
+                });
+            });
+
+            box.find('[custom]').click(function () {
+                var valueName = $(this).attr('custom');
+                opt.start = false;
+                opt.end = false;
+                box.find('.day.checked').removeClass('checked');
+                opt.setValue.call(selfDom, valueName);
+                checkSelectionValid();
+                showSelectedInfo(true);
+                showSelectedDays();
+                if (opt.autoClose) closeDatePicker();
+            });
+
+            box.find('[shortcut]').click(function () {
+                var shortcut = $(this).attr('shortcut');
+                var end = new Date(),
+                    start = false;
+                var dir;
+                if (shortcut.indexOf('day') != -1) {
+                    var day = parseInt(shortcut.split(',', 2)[1], 10);
+                    start = new Date(new Date().getTime() + 86400000 * day);
+                    end = new Date(end.getTime() + 86400000 * (day > 0 ? 1 : -1));
+                } else if (shortcut.indexOf('week') != -1) {
+                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
+                    var stopDay;
+                    if (dir == 1)
+                        stopDay = opt.startOfWeek == 'monday' ? 1 : 0;
+                    else
+                        stopDay = opt.startOfWeek == 'monday' ? 0 : 6;
+
+                    end = new Date(end.getTime() - 86400000);
+                    while (end.getDay() != stopDay) end = new Date(end.getTime() + dir * 86400000);
+                    start = new Date(end.getTime() + dir * 86400000 * 6);
+                } else if (shortcut.indexOf('month') != -1) {
+                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
+                    if (dir == 1)
+                        start = nextMonth(end);
+                    else
+                        start = prevMonth(end);
+                    start.setDate(1);
+                    end = nextMonth(start);
+                    end.setDate(1);
+                    end = new Date(end.getTime() - 86400000);
+                } else if (shortcut.indexOf('year') != -1) {
+                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
+                    start = new Date();
+                    start.setFullYear(end.getFullYear() + dir);
+                    start.setMonth(0);
+                    start.setDate(1);
+                    end.setFullYear(end.getFullYear() + dir);
+                    end.setMonth(11);
+                    end.setDate(31);
+                } else if (shortcut == 'custom') {
+                    var name = $(this).html();
+                    if (opt.customShortcuts && opt.customShortcuts.length > 0) {
+                        for (var i = 0; i < opt.customShortcuts.length; i++) {
+                            var sh = opt.customShortcuts[i];
+                            if (sh.name == name) {
+                                var data = [];
+                                // try
+                                // {
+                                data = sh['dates'].call();
+                                //}catch(e){}
+                                if (data && data.length == 2) {
+                                    start = data[0];
+                                    end = data[1];
+                                }
+
+                                // if only one date is specified then just move calendars there
+                                // move calendars to show this date's month and next months
+                                if (data && data.length == 1) {
+                                    var movetodate = data[0];
+                                    showMonth(movetodate, 'month1');
+                                    showMonth(nextMonth(movetodate), 'month2');
+                                    showGap();
+                                }
+
+                                break;
+                            }
+                        }
+                    }
+                }
+                if (start && end) {
+                    setDateRange(start, end);
+                    checkSelectionValid();
+                }
+            });
+
+            box.find('.time1 input[type=range]').bind('change touchmove', function (e) {
+                var target = e.target,
+                    hour = target.name == 'hour' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined,
+                    min = target.name == 'minute' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined;
+                setTime('time1', hour, min);
+            });
+
+            box.find('.time2 input[type=range]').bind('change touchmove', function (e) {
+                var target = e.target,
+                    hour = target.name == 'hour' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined,
+                    min = target.name == 'minute' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined;
+                setTime('time2', hour, min);
+            });
+
+        }
+
+
+        function calcPosition() {
+            if (!opt.inline) {
+                var offset = $(self).offset();
+                if ($(opt.container).css('position') == 'relative') {
+                    var containerOffset = $(opt.container).offset();
+                    box.css({
+                        top: offset.top - containerOffset.top + $(self).outerHeight() + 4,
+                        left: offset.left - containerOffset.left
+                    });
+                } else {
+                    if (offset.left < 460) //left to right
+                    {
+                        box.css({
+                            top: offset.top + $(self).outerHeight() + parseInt($('body').css('border-top') || 0, 10),
+                            left: offset.left
+                        });
+                    } else {
+                        box.css({
+                            top: offset.top + $(self).outerHeight() + parseInt($('body').css('border-top') || 0, 10),
+                            left: offset.left + $(self).width() - box.width() - 16
+                        });
+                    }
+                }
+            }
+        }
+
+        // Return the date picker wrapper element
+        function getDatePicker() {
+            return box;
+        }
+
+        function open(animationTime) {
+            calcPosition();
+            redrawDatePicker();
+            checkAndSetDefaultValue();
+            if (opt.customOpenAnimation) {
+                opt.customOpenAnimation.call(box.get(0), function () {
+                    $(self).trigger('datepicker-opened', {
+                        relatedTarget: box
+                    });
+                });
+            } else {
+                box.slideDown(animationTime, function () {
+                    $(self).trigger('datepicker-opened', {
+                        relatedTarget: box
+                    });
+                });
+            }
+            $(self).trigger('datepicker-open', {
+                relatedTarget: box
+            });
+            showGap();
+            updateCalendarWidth();
+        }
+
+        function checkAndSetDefaultValue() {
+            var __default_string = opt.getValue.call(selfDom);
+            var defaults = __default_string ? __default_string.split(opt.separator) : '';
+
+            if (defaults && ((defaults.length == 1 && opt.singleDate) || defaults.length >= 2)) {
+                var ___format = opt.format;
+                if (___format.match(/Do/)) {
+
+                    ___format = ___format.replace(/Do/, 'D');
+                    defaults[0] = defaults[0].replace(/(\d+)(th|nd|st)/, '$1');
+                    if (defaults.length >= 2) {
+                        defaults[1] = defaults[1].replace(/(\d+)(th|nd|st)/, '$1');
+                    }
+                }
+                // set initiated  to avoid triggerring datepicker-change event
+                initiated = false;
+                if (defaults.length >= 2) {
+                    setDateRange(getValidValue(defaults[0], ___format, moment.locale(opt.language)), getValidValue(defaults[1], ___format, moment.locale(opt.language)));
+                } else if (defaults.length == 1 && opt.singleDate) {
+                    setSingleDate(getValidValue(defaults[0], ___format, moment.locale(opt.language)));
+                }
+
+                initiated = true;
+            }
+        }
+
+        function getValidValue(date, format, locale) {
+            if (moment(date, format, locale).isValid()) {
+                return moment(date, format, locale).toDate();
+            } else {
+                return moment().toDate();
+            }
+        }
+
+        function updateCalendarWidth() {
+            var gapMargin = box.find('.gap').css('margin-left');
+            if (gapMargin) gapMargin = parseInt(gapMargin);
+            var w1 = box.find('.month1').width();
+            var w2 = box.find('.gap').width() + (gapMargin ? gapMargin * 2 : 0);
+            var w3 = box.find('.month2').width();
+            box.find('.month-wrapper').width(w1 + w2 + w3);
+        }
+
+        function renderTime(name, date) {
+            box.find('.' + name + ' input[type=range].hour-range').val(moment(date).hours());
+            box.find('.' + name + ' input[type=range].minute-range').val(moment(date).minutes());
+            setTime(name, moment(date).format('HH'), moment(date).format('mm'));
+        }
+
+        function changeTime(name, date) {
+            opt[name] = parseInt(
+                moment(parseInt(date))
+                    .startOf('day')
+                    .add(moment(opt[name + 'Time']).format('HH'), 'h')
+                    .add(moment(opt[name + 'Time']).format('mm'), 'm').valueOf()
+            );
+        }
+
+        function swapTime() {
+            renderTime('time1', opt.start);
+            renderTime('time2', opt.end);
+        }
+
+        function setTime(name, hour, minute) {
+            hour && (box.find('.' + name + ' .hour-val').text(hour));
+            minute && (box.find('.' + name + ' .minute-val').text(minute));
+            switch (name) {
+                case 'time1':
+                    if (opt.start) {
+                        setRange('start', moment(opt.start));
+                    }
+                    setRange('startTime', moment(opt.startTime || moment().valueOf()));
+                    break;
+                case 'time2':
+                    if (opt.end) {
+                        setRange('end', moment(opt.end));
+                    }
+                    setRange('endTime', moment(opt.endTime || moment().valueOf()));
+                    break;
+            }
+
+            function setRange(name, timePoint) {
+                var h = timePoint.format('HH'),
+                    m = timePoint.format('mm');
+                opt[name] = timePoint
+                    .startOf('day')
+                    .add(hour || h, 'h')
+                    .add(minute || m, 'm')
+                    .valueOf();
+            }
+
+            checkSelectionValid();
+            showSelectedInfo();
+            showSelectedDays();
+        }
+
+        function clearSelection() {
+            opt.start = false;
+            opt.end = false;
+            box.find('.day.checked').removeClass('checked');
+            box.find('.day.last-date-selected').removeClass('last-date-selected');
+            box.find('.day.first-date-selected').removeClass('first-date-selected');
+            opt.setValue.call(selfDom, '');
+            checkSelectionValid();
+            showSelectedInfo();
+            showSelectedDays();
+        }
+
+        function handleStart(time) {
+            var r = time;
+            if (opt.batchMode === 'week-range') {
+                if (opt.startOfWeek === 'monday') {
+                    r = moment(parseInt(time)).startOf('isoweek').valueOf();
+                } else {
+                    r = moment(parseInt(time)).startOf('week').valueOf();
+                }
+            } else if (opt.batchMode === 'month-range') {
+                r = moment(parseInt(time)).startOf('month').valueOf();
+            }
+            return r;
+        }
+
+        function handleEnd(time) {
+            var r = time;
+            if (opt.batchMode === 'week-range') {
+                if (opt.startOfWeek === 'monday') {
+                    r = moment(parseInt(time)).endOf('isoweek').valueOf();
+                } else {
+                    r = moment(parseInt(time)).endOf('week').valueOf();
+                }
+            } else if (opt.batchMode === 'month-range') {
+                r = moment(parseInt(time)).endOf('month').valueOf();
+            }
+            return r;
+        }
+
+
+        function dayClicked(day) {
+            if (day.hasClass('invalid')) return;
+            var time = day.attr('time');
+            day.addClass('checked');
+            if (opt.singleDate) {
+                opt.start = time;
+                opt.end = false;
+            } else if (opt.batchMode === 'week') {
+                if (opt.startOfWeek === 'monday') {
+                    opt.start = moment(parseInt(time)).startOf('isoweek').valueOf();
+                    opt.end = moment(parseInt(time)).endOf('isoweek').valueOf();
+                } else {
+                    opt.end = moment(parseInt(time)).endOf('week').valueOf();
+                    opt.start = moment(parseInt(time)).startOf('week').valueOf();
+                }
+            } else if (opt.batchMode === 'workweek') {
+                opt.start = moment(parseInt(time)).day(1).valueOf();
+                opt.end = moment(parseInt(time)).day(5).valueOf();
+            } else if (opt.batchMode === 'weekend') {
+                opt.start = moment(parseInt(time)).day(6).valueOf();
+                opt.end = moment(parseInt(time)).day(7).valueOf();
+            } else if (opt.batchMode === 'month') {
+                opt.start = moment(parseInt(time)).startOf('month').valueOf();
+                opt.end = moment(parseInt(time)).endOf('month').valueOf();
+            } else if ((opt.start && opt.end) || (!opt.start && !opt.end)) {
+                opt.start = handleStart(time);
+                opt.end = false;
+            } else if (opt.start) {
+                opt.end = handleEnd(time);
+                if (opt.time.enabled) {
+                    changeTime('end', opt.end);
+                }
+            }
+
+            //Update time in case it is enabled and timestamps are available
+            if (opt.time.enabled) {
+                if (opt.start) {
+                    changeTime('start', opt.start);
+                }
+                if (opt.end) {
+                    changeTime('end', opt.end);
+                }
+            }
+
+            //In case the start is after the end, swap the timestamps
+            if (!opt.singleDate && opt.start && opt.end && opt.start > opt.end) {
+                var tmp = opt.end;
+                opt.end = handleEnd(opt.start);
+                opt.start = handleStart(tmp);
+                if (opt.time.enabled && opt.swapTime) {
+                    swapTime();
+                }
+            }
+
+            opt.start = parseInt(opt.start);
+            opt.end = parseInt(opt.end);
+
+            clearHovering();
+            if (opt.start && !opt.end) {
+                $(self).trigger('datepicker-first-date-selected', {
+                    'date1': new Date(opt.start)
+                });
+                dayHovering(day);
+            }
+            updateSelectableRange(time);
+
+            checkSelectionValid();
+            showSelectedInfo();
+            showSelectedDays();
+            autoclose();
+        }
+
+
+        function weekNumberClicked(weekNumberDom) {
+            var thisTime = parseInt(weekNumberDom.attr('data-start-time'), 10);
+            var date1, date2;
+            if (!opt.startWeek) {
+                opt.startWeek = thisTime;
+                weekNumberDom.addClass('week-number-selected');
+                date1 = new Date(thisTime);
+                opt.start = moment(date1).day(opt.startOfWeek == 'monday' ? 1 : 0).valueOf();
+                opt.end = moment(date1).day(opt.startOfWeek == 'monday' ? 7 : 6).valueOf();
+            } else {
+                box.find('.week-number-selected').removeClass('week-number-selected');
+                date1 = new Date(thisTime < opt.startWeek ? thisTime : opt.startWeek);
+                date2 = new Date(thisTime < opt.startWeek ? opt.startWeek : thisTime);
+                opt.startWeek = false;
+                opt.start = moment(date1).day(opt.startOfWeek == 'monday' ? 1 : 0).valueOf();
+                opt.end = moment(date2).day(opt.startOfWeek == 'monday' ? 7 : 6).valueOf();
+            }
+            updateSelectableRange();
+            checkSelectionValid();
+            showSelectedInfo();
+            showSelectedDays();
+            autoclose();
+        }
+
+        function isValidTime(time) {
+            time = parseInt(time, 10);
+            if (opt.startDate && compare_day(time, opt.startDate) < 0) return false;
+            if (opt.endDate && compare_day(time, opt.endDate) > 0) return false;
+
+            if (opt.start && !opt.end && !opt.singleDate) {
+                //check maxDays and minDays setting
+                if (opt.maxDays > 0 && countDays(time, opt.start) > opt.maxDays) return false;
+                if (opt.minDays > 0 && countDays(time, opt.start) < opt.minDays) return false;
+
+                //check selectForward and selectBackward
+                if (opt.selectForward && time < opt.start) return false;
+                if (opt.selectBackward && time > opt.start) return false;
+
+                //check disabled days
+                if (opt.beforeShowDay && typeof opt.beforeShowDay == 'function') {
+                    var valid = true;
+                    var timeTmp = time;
+                    while (countDays(timeTmp, opt.start) > 1) {
+                        var arr = opt.beforeShowDay(new Date(timeTmp));
+                        if (!arr[0]) {
+                            valid = false;
+                            break;
+                        }
+                        if (Math.abs(timeTmp - opt.start) < 86400000) break;
+                        if (timeTmp > opt.start) timeTmp -= 86400000;
+                        if (timeTmp < opt.start) timeTmp += 86400000;
+                    }
+                    if (!valid) return false;
+                }
+            }
+            return true;
+        }
+
+
+        function updateSelectableRange() {
+            box.find('.day.invalid.tmp').removeClass('tmp invalid').addClass('valid');
+            if (opt.start && !opt.end) {
+                box.find('.day.toMonth.valid').each(function () {
+                    var time = parseInt($(this).attr('time'), 10);
+                    if (!isValidTime(time))
+                        $(this).addClass('invalid tmp').removeClass('valid');
+                    else
+                        $(this).addClass('valid tmp').removeClass('invalid');
+                });
+            }
+
+            return true;
+        }
+
+
+        function dayHovering(day) {
+            var hoverTime = parseInt(day.attr('time'));
+            var tooltip = '';
+
+            if (day.hasClass('has-tooltip') && day.attr('data-tooltip')) {
+                tooltip = '<span style="white-space:nowrap">' + day.attr('data-tooltip') + '</span>';
+            } else if (!day.hasClass('invalid')) {
+                if (opt.singleDate) {
+                    box.find('.day.hovering').removeClass('hovering');
+                    day.addClass('hovering');
+                } else {
+                    box.find('.day').each(function () {
+                        var time = parseInt($(this).attr('time')),
+                            start = opt.start,
+                            end = opt.end;
+
+                        if (time == hoverTime) {
+                            $(this).addClass('hovering');
+                        } else {
+                            $(this).removeClass('hovering');
+                        }
+
+                        if (
+                            (opt.start && !opt.end) &&
+                            (
+                                (opt.start < time && hoverTime >= time) ||
+                                (opt.start > time && hoverTime <= time)
+                            )
+                        ) {
+                            $(this).addClass('hovering');
+                        } else {
+                            $(this).removeClass('hovering');
+                        }
+                    });
+
+                    if (opt.start && !opt.end) {
+                        var days = countDays(hoverTime, opt.start);
+                        if (opt.hoveringTooltip) {
+                            if (typeof opt.hoveringTooltip == 'function') {
+                                tooltip = opt.hoveringTooltip(days, opt.start, hoverTime);
+                            } else if (opt.hoveringTooltip === true && days > 1) {
+                                tooltip = days + ' ' + translate('days');
+                            }
+                        }
+                    }
+                }
+            }
+
+            if (tooltip) {
+                var posDay = day.offset();
+                var posBox = box.offset();
+
+                var _left = posDay.left - posBox.left;
+                var _top = posDay.top - posBox.top;
+                _left += day.width() / 2;
+
+
+                var $tip = box.find('.date-range-length-tip');
+                var w = $tip.css({
+                    'visibility': 'hidden',
+                    'display': 'none'
+                }).html(tooltip).width();
+                var h = $tip.height();
+                _left -= w / 2;
+                _top -= h;
+                setTimeout(function () {
+                    $tip.css({
+                        left: _left,
+                        top: _top,
+                        display: 'block',
+                        'visibility': 'visible'
+                    });
+                }, 10);
+            } else {
+                box.find('.date-range-length-tip').hide();
+            }
+        }
+
+        function clearHovering() {
+            box.find('.day.hovering').removeClass('hovering');
+            box.find('.date-range-length-tip').hide();
+        }
+
+        function autoclose() {
+            if (opt.singleDate === true) {
+                if (initiated && opt.start) {
+                    if (opt.autoClose) closeDatePicker();
+                }
+            } else {
+                if (initiated && opt.start && opt.end) {
+                    if (opt.autoClose) closeDatePicker();
+                }
+            }
+        }
+
+        function checkSelectionValid() {
+            var days = Math.ceil((opt.end - opt.start) / 86400000) + 1;
+            if (opt.singleDate) { // Validate if only start is there
+                if (opt.start && !opt.end)
+                    box.find('.drp_top-bar').removeClass('error').addClass('normal');
+                else
+                    box.find('.drp_top-bar').removeClass('error').removeClass('normal');
+            } else if (opt.maxDays && days > opt.maxDays) {
+                opt.start = false;
+                opt.end = false;
+                box.find('.day').removeClass('checked');
+                box.find('.drp_top-bar').removeClass('normal').addClass('error').find('.error-top').html(translate('less-than').replace('%d', opt.maxDays));
+            } else if (opt.minDays && days < opt.minDays) {
+                opt.start = false;
+                opt.end = false;
+                box.find('.day').removeClass('checked');
+                box.find('.drp_top-bar').removeClass('normal').addClass('error').find('.error-top').html(translate('more-than').replace('%d', opt.minDays));
+            } else {
+                if (opt.start || opt.end)
+                    box.find('.drp_top-bar').removeClass('error').addClass('normal');
+                else
+                    box.find('.drp_top-bar').removeClass('error').removeClass('normal');
+            }
+
+            if ((opt.singleDate && opt.start && !opt.end) || (!opt.singleDate && opt.start && opt.end)) {
+                box.find('.apply-btn').removeClass('disabled');
+            } else {
+                box.find('.apply-btn').addClass('disabled');
+            }
+
+            if (opt.batchMode) {
+                if (
+                    (opt.start && opt.startDate && compare_day(opt.start, opt.startDate) < 0) ||
+                    (opt.end && opt.endDate && compare_day(opt.end, opt.endDate) > 0)
+                ) {
+                    opt.start = false;
+                    opt.end = false;
+                    box.find('.day').removeClass('checked');
+                }
+            }
+        }
+
+        function showSelectedInfo(forceValid, silent) {
+            box.find('.start-day').html('...');
+            box.find('.end-day').html('...');
+            box.find('.selected-days').hide();
+            if (opt.start) {
+                box.find('.start-day').html(getDateString(new Date(parseInt(opt.start))));
+            }
+            if (opt.end) {
+                box.find('.end-day').html(getDateString(new Date(parseInt(opt.end))));
+            }
+            var dateRange;
+            if (opt.start && opt.singleDate) {
+                box.find('.apply-btn').removeClass('disabled');
+                dateRange = getDateString(new Date(opt.start));
+                opt.setValue.call(selfDom, dateRange, getDateString(new Date(opt.start)), getDateString(new Date(opt.end)));
+
+                if (initiated && !silent) {
+                    $(self).trigger('datepicker-change', {
+                        'value': dateRange,
+                        'date1': new Date(opt.start)
+                    });
+                }
+            } else if (opt.start && opt.end) {
+                box.find('.selected-days').show().find('.selected-days-num').html(countDays(opt.end, opt.start));
+                box.find('.apply-btn').removeClass('disabled');
+                dateRange = getDateString(new Date(opt.start)) + opt.separator + getDateString(new Date(opt.end));
+                opt.setValue.call(selfDom, dateRange, getDateString(new Date(opt.start)), getDateString(new Date(opt.end)));
+                if (initiated && !silent) {
+                    $(self).trigger('datepicker-change', {
+                        'value': dateRange,
+                        'date1': new Date(opt.start),
+                        'date2': new Date(opt.end)
+                    });
+                }
+            } else if (forceValid) {
+                box.find('.apply-btn').removeClass('disabled');
+            } else {
+                box.find('.apply-btn').addClass('disabled');
+            }
+        }
+
+        function countDays(start, end) {
+            return Math.abs(daysFrom1970(start) - daysFrom1970(end)) + 1;
+        }
+
+        function setDateRange(date1, date2, silent) {
+            if (date1.getTime() > date2.getTime()) {
+                var tmp = date2;
+                date2 = date1;
+                date1 = tmp;
+                tmp = null;
+            }
+            var valid = true;
+            if (opt.startDate && compare_day(date1, opt.startDate) < 0) valid = false;
+            if (opt.endDate && compare_day(date2, opt.endDate) > 0) valid = false;
+            if (!valid) {
+                showMonth(opt.startDate, 'month1');
+                showMonth(nextMonth(opt.startDate), 'month2');
+                showGap();
+                return;
+            }
+
+            opt.start = date1.getTime();
+            opt.end = date2.getTime();
+
+            if (opt.time.enabled) {
+                renderTime('time1', date1);
+                renderTime('time2', date2);
+            }
+
+            if (opt.stickyMonths || (compare_day(date1, date2) > 0 && compare_month(date1, date2) === 0)) {
+                if (opt.lookBehind) {
+                    date1 = prevMonth(date2);
+                } else {
+                    date2 = nextMonth(date1);
+                }
+            }
+
+            if (opt.stickyMonths && opt.endDate !== false && compare_month(date2, opt.endDate) > 0) {
+                date1 = prevMonth(date1);
+                date2 = prevMonth(date2);
+            }
+
+            if (!opt.stickyMonths) {
+                if (compare_month(date1, date2) === 0) {
+                    if (opt.lookBehind) {
+                        date1 = prevMonth(date2);
+                    } else {
+                        date2 = nextMonth(date1);
+                    }
+                }
+            }
+
+            showMonth(date1, 'month1');
+            showMonth(date2, 'month2');
+            showGap();
+            checkSelectionValid();
+            showSelectedInfo(false, silent);
+            autoclose();
+        }
+
+        function setSingleDate(date1) {
+
+            var valid = true;
+            if (opt.startDate && compare_day(date1, opt.startDate) < 0) valid = false;
+            if (opt.endDate && compare_day(date1, opt.endDate) > 0) valid = false;
+            if (!valid) {
+                showMonth(opt.startDate, 'month1');
+                return;
+            }
+
+            opt.start = date1.getTime();
+
+
+            if (opt.time.enabled) {
+                renderTime('time1', date1);
+
+            }
+            showMonth(date1, 'month1');
+            if (opt.singleMonth !== true) {
+                var date2 = nextMonth(date1);
+                showMonth(date2, 'month2');
+            }
+            showGap();
+            showSelectedInfo();
+            autoclose();
+        }
+
+        function showSelectedDays() {
+            if (!opt.start && !opt.end) return;
+            box.find('.day').each(function () {
+                var time = parseInt($(this).attr('time')),
+                    start = opt.start,
+                    end = opt.end;
+                if (opt.time.enabled) {
+                    time = moment(time).startOf('day').valueOf();
+                    start = moment(start || moment().valueOf()).startOf('day').valueOf();
+                    end = moment(end || moment().valueOf()).startOf('day').valueOf();
+                }
+                if (
+                    (opt.start && opt.end && end >= time && start <= time) ||
+                    (opt.start && !opt.end && moment(start).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD'))
+                ) {
+                    $(this).addClass('checked');
+                } else {
+                    $(this).removeClass('checked');
+                }
+
+                //add first-date-selected class name to the first date selected
+                if (opt.start && moment(start).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) {
+                    $(this).addClass('first-date-selected');
+                } else {
+                    $(this).removeClass('first-date-selected');
+                }
+                //add last-date-selected
+                if (opt.end && moment(end).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) {
+                    $(this).addClass('last-date-selected');
+                } else {
+                    $(this).removeClass('last-date-selected');
+                }
+            });
+
+            box.find('.week-number').each(function () {
+                if ($(this).attr('data-start-time') == opt.startWeek) {
+                    $(this).addClass('week-number-selected');
+                }
+            });
+        }
+
+        function showMonth(date, month) {
+            date = moment(date).toDate();
+            var monthName = nameMonth(date.getMonth());
+            box.find('.' + month + ' .month-name').html(monthName + ' ' + date.getFullYear());
+            box.find('.' + month + ' tbody').html(createMonthHTML(date));
+            opt[month] = date;
+            updateSelectableRange();
+            bindDayEvents();
+        }
+
+        function bindDayEvents() {
+            box.find('.day').unbind("click").click(function (evt) {
+                dayClicked($(this));
+            });
+
+            box.find('.day').unbind("mouseenter").mouseenter(function (evt) {
+                dayHovering($(this));
+            });
+
+            box.find('.day').unbind("mouseleave").mouseleave(function (evt) {
+                box.find('.date-range-length-tip').hide();
+                if (opt.singleDate) {
+                    clearHovering();
+                }
+            });
+
+            box.find('.week-number').unbind("click").click(function (evt) {
+                weekNumberClicked($(this));
+            });
+        }
+
+        function showTime(date, name) {
+            box.find('.' + name).append(getTimeHTML());
+            renderTime(name, date);
+        }
+
+        function nameMonth(m) {
+            return translate('month-name')[m];
+        }
+
+        function getDateString(d) {
+            return moment(d).format(opt.format);
+        }
+
+        function showGap() {
+            showSelectedDays();
+            var m1 = parseInt(moment(opt.month1).format('YYYYMM'));
+            var m2 = parseInt(moment(opt.month2).format('YYYYMM'));
+            var p = Math.abs(m1 - m2);
+            var shouldShow = (p > 1 && p != 89);
+            if (shouldShow) {
+                box.addClass('has-gap').removeClass('no-gap').find('.gap').css('visibility', 'visible');
+            } else {
+                box.removeClass('has-gap').addClass('no-gap').find('.gap').css('visibility', 'hidden');
+            }
+            var h1 = box.find('table.month1').height();
+            var h2 = box.find('table.month2').height();
+            box.find('.gap').height(Math.max(h1, h2) + 10);
+        }
+
+        function closeDatePicker() {
+            if (opt.alwaysOpen) return;
+
+            var afterAnim = function () {
+                $(self).data('date-picker-opened', false);
+                $(self).trigger('datepicker-closed', {
+                    relatedTarget: box
+                });
+            };
+            if (opt.customCloseAnimation) {
+                opt.customCloseAnimation.call(box.get(0), afterAnim);
+            } else {
+                $(box).slideUp(opt.duration, afterAnim);
+            }
+            $(self).trigger('datepicker-close', {
+                relatedTarget: box
+            });
+        }
+
+        function redrawDatePicker() {
+            showMonth(opt.month1, 'month1');
+            showMonth(opt.month2, 'month2');
+        }
+
+        function compare_month(m1, m2) {
+            var p = parseInt(moment(m1).format('YYYYMM')) - parseInt(moment(m2).format('YYYYMM'));
+            if (p > 0) return 1;
+            if (p === 0) return 0;
+            return -1;
+        }
+
+        function compare_day(m1, m2) {
+            var p = parseInt(moment(m1).format('YYYYMMDD')) - parseInt(moment(m2).format('YYYYMMDD'));
+            if (p > 0) return 1;
+            if (p === 0) return 0;
+            return -1;
+        }
+
+        function nextMonth(month) {
+            return moment(month).add(1, 'months').toDate();
+        }
+
+        function prevMonth(month) {
+            return moment(month).add(-1, 'months').toDate();
+        }
+
+        function getTimeHTML() {
+            return '<div>' +
+                '<span>' + translate('Time') + ': <span class="hour-val">00</span>:<span class="minute-val">00</span></span>' +
+                '</div>' +
+                '<div class="hour">' +
+                '<label>' + translate('Hour') + ': <input type="range" class="hour-range" name="hour" min="0" max="23"></label>' +
+                '</div>' +
+                '<div class="minute">' +
+                '<label>' + translate('Minute') + ': <input type="range" class="minute-range" name="minute" min="0" max="59"></label>' +
+                '</div>';
+        }
+
+        function createDom() {
+            var html = '<div class="date-picker-wrapper';
+            if (opt.extraClass) html += ' ' + opt.extraClass + ' ';
+            if (opt.singleDate) html += ' single-date ';
+            if (!opt.showShortcuts) html += ' no-shortcuts ';
+            if (!opt.showTopbar) html += ' no-topbar ';
+            if (opt.customTopBar) html += ' custom-topbar ';
+            html += '">';
+
+            if (opt.showTopbar) {
+                html += '<div class="drp_top-bar">';
+
+                if (opt.customTopBar) {
+                    if (typeof opt.customTopBar == 'function') opt.customTopBar = opt.customTopBar();
+                    html += '<div class="custom-top">' + opt.customTopBar + '</div>';
+                } else {
+                    html += '<div class="normal-top">' +
+                        '<span style="color:#333">' + translate('selected') + ' </span> <b class="start-day">...</b>';
+                    if (!opt.singleDate) {
+                        html += ' <span class="separator-day">' + opt.separator + '</span> <b class="end-day">...</b> <i class="selected-days">(<span class="selected-days-num">3</span> ' + translate('days') + ')</i>';
+                    }
+                    html += '</div>';
+                    html += '<div class="error-top">error</div>' +
+                        '<div class="default-top">default</div>';
+                }
+
+                html += '<input type="button" class="apply-btn disabled' + getApplyBtnClass() + '" value="' + translate('apply') + '" />';
+                html += '</div>';
+            }
+
+            var _colspan = opt.showWeekNumbers ? 6 : 5;
+
+            var arrowPrev = '&lt;';
+            if (opt.customArrowPrevSymbol) arrowPrev = opt.customArrowPrevSymbol;
+
+            var arrowNext = '&gt;';
+            if (opt.customArrowNextSymbol) arrowNext = opt.customArrowNextSymbol;
+
+            html += '<div class="month-wrapper">' +
+                '   <table class="month1" cellspacing="0" border="0" cellpadding="0">' +
+                '       <thead>' +
+                '           <tr class="caption">' +
+                '               <th style="width:27px;">' +
+                '                   <span class="prev">' +
+                arrowPrev +
+                '                   </span>' +
+                '               </th>' +
+                '               <th colspan="' + _colspan + '" class="month-name">' +
+                '               </th>' +
+                '               <th style="width:27px;">' +
+                (opt.singleDate || !opt.stickyMonths ? '<span class="next">' + arrowNext + '</span>' : '') +
+                '               </th>' +
+                '           </tr>' +
+                '           <tr class="week-name">' + getWeekHead() +
+                '       </thead>' +
+                '       <tbody></tbody>' +
+                '   </table>';
+
+            if (hasMonth2()) {
+                html += '<div class="gap">' + getGapHTML() + '</div>' +
+                    '<table class="month2" cellspacing="0" border="0" cellpadding="0">' +
+                    '   <thead>' +
+                    '   <tr class="caption">' +
+                    '       <th style="width:27px;">' +
+                    (!opt.stickyMonths ? '<span class="prev">' + arrowPrev + '</span>' : '') +
+                    '       </th>' +
+                    '       <th colspan="' + _colspan + '" class="month-name">' +
+                    '       </th>' +
+                    '       <th style="width:27px;">' +
+                    '           <span class="next">' + arrowNext + '</span>' +
+                    '       </th>' +
+                    '   </tr>' +
+                    '   <tr class="week-name">' + getWeekHead() +
+                    '   </thead>' +
+                    '   <tbody></tbody>' +
+                    '</table>';
+
+            }
+            //+'</div>'
+            html += '<div style="clear:both;height:0;font-size:0;"></div>' +
+                '<div class="time">' +
+                '<div class="time1"></div>';
+            if (!opt.singleDate) {
+                html += '<div class="time2"></div>';
+            }
+            html += '</div>' +
+                '<div style="clear:both;height:0;font-size:0;"></div>' +
+                '</div>';
+
+            html += '<div class="footer">';
+            if (opt.showShortcuts) {
+                html += '<div class="shortcuts"><b>' + translate('shortcuts') + '</b>';
+
+                var data = opt.shortcuts;
+                if (data) {
+                    var name;
+                    if (data['prev-days'] && data['prev-days'].length > 0) {
+                        html += '&nbsp;<span class="prev-days">' + translate('past');
+                        for (var i = 0; i < data['prev-days'].length; i++) {
+                            name = data['prev-days'][i];
+                            name += (data['prev-days'][i] > 1) ? translate('days') : translate('day');
+                            html += ' <a href="javascript:;" shortcut="day,-' + data['prev-days'][i] + '">' + name + '</a>';
+                        }
+                        html += '</span>';
+                    }
+
+                    if (data['next-days'] && data['next-days'].length > 0) {
+                        html += '&nbsp;<span class="next-days">' + translate('following');
+                        for (var i = 0; i < data['next-days'].length; i++) {
+                            name = data['next-days'][i];
+                            name += (data['next-days'][i] > 1) ? translate('days') : translate('day');
+                            html += ' <a href="javascript:;" shortcut="day,' + data['next-days'][i] + '">' + name + '</a>';
+                        }
+                        html += '</span>';
+                    }
+
+                    if (data.prev && data.prev.length > 0) {
+                        html += '&nbsp;<span class="prev-buttons">' + translate('previous');
+                        for (var i = 0; i < data.prev.length; i++) {
+                            name = translate('prev-' + data.prev[i]);
+                            html += ' <a href="javascript:;" shortcut="prev,' + data.prev[i] + '">' + name + '</a>';
+                        }
+                        html += '</span>';
+                    }
+
+                    if (data.next && data.next.length > 0) {
+                        html += '&nbsp;<span class="next-buttons">' + translate('next');
+                        for (var i = 0; i < data.next.length; i++) {
+                            name = translate('next-' + data.next[i]);
+                            html += ' <a href="javascript:;" shortcut="next,' + data.next[i] + '">' + name + '</a>';
+                        }
+                        html += '</span>';
+                    }
+                }
+
+                if (opt.customShortcuts) {
+                    for (var i = 0; i < opt.customShortcuts.length; i++) {
+                        var sh = opt.customShortcuts[i];
+                        html += '&nbsp;<span class="custom-shortcut"><a href="javascript:;" shortcut="custom">' + sh.name + '</a></span>';
+                    }
+                }
+                html += '</div>';
+            }
+
+            // Add Custom Values Dom
+            if (opt.showCustomValues) {
+                html += '<div class="customValues"><b>' + (opt.customValueLabel || translate('custom-values')) + '</b>';
+
+                if (opt.customValues) {
+                    for (var i = 0; i < opt.customValues.length; i++) {
+                        var val = opt.customValues[i];
+                        html += '&nbsp;<span class="custom-value"><a href="javascript:;" custom="' + val.value + '">' + val.name + '</a></span>';
+                    }
+                }
+            }
+
+            html += '</div></div>';
+
+
+            return $(html);
+        }
+
+        function getApplyBtnClass() {
+            var klass = '';
+            if (opt.autoClose === true) {
+                klass += ' hide';
+            }
+            if (opt.applyBtnClass !== '') {
+                klass += ' ' + opt.applyBtnClass;
+            }
+            return klass;
+        }
+
+        function getWeekHead() {
+            var prepend = opt.showWeekNumbers ? '<th>' + translate('week-number') + '</th>' : '';
+            if (opt.startOfWeek == 'monday') {
+                return prepend + '<th>' + translate('week-1') + '</th>' +
+                    '<th>' + translate('week-2') + '</th>' +
+                    '<th>' + translate('week-3') + '</th>' +
+                    '<th>' + translate('week-4') + '</th>' +
+                    '<th>' + translate('week-5') + '</th>' +
+                    '<th>' + translate('week-6') + '</th>' +
+                    '<th>' + translate('week-7') + '</th>';
+            } else {
+                return prepend + '<th>' + translate('week-7') + '</th>' +
+                    '<th>' + translate('week-1') + '</th>' +
+                    '<th>' + translate('week-2') + '</th>' +
+                    '<th>' + translate('week-3') + '</th>' +
+                    '<th>' + translate('week-4') + '</th>' +
+                    '<th>' + translate('week-5') + '</th>' +
+                    '<th>' + translate('week-6') + '</th>';
+            }
+        }
+
+        function isMonthOutOfBounds(month) {
+            month = moment(month);
+            if (opt.startDate && month.endOf('month').isBefore(opt.startDate)) {
+                return true;
+            }
+            if (opt.endDate && month.startOf('month').isAfter(opt.endDate)) {
+                return true;
+            }
+            return false;
+        }
+
+        function getGapHTML() {
+            var html = ['<div class="gap-top-mask"></div><div class="gap-bottom-mask"></div><div class="gap-lines">'];
+            for (var i = 0; i < 20; i++) {
+                html.push('<div class="gap-line">' +
+                    '<div class="gap-1"></div>' +
+                    '<div class="gap-2"></div>' +
+                    '<div class="gap-3"></div>' +
+                    '</div>');
+            }
+            html.push('</div>');
+            return html.join('');
+        }
+
+        function hasMonth2() {
+            return (!opt.singleMonth);
+        }
+
+        function attributesCallbacks(initialObject, callbacksArray, today) {
+            var resultObject = $.extend(true, {}, initialObject);
+
+            $.each(callbacksArray, function (cbAttrIndex, cbAttr) {
+                var addAttributes = cbAttr(today);
+                for (var attr in addAttributes) {
+                    if (resultObject.hasOwnProperty(attr)) {
+                        resultObject[attr] += addAttributes[attr];
+                    } else {
+                        resultObject[attr] = addAttributes[attr];
+                    }
+                }
+            });
+
+            var attrString = '';
+
+            for (var attr in resultObject) {
+                if (resultObject.hasOwnProperty(attr)) {
+                    attrString += attr + '="' + resultObject[attr] + '" ';
+                }
+            }
+
+            return attrString;
+        }
+
+        function daysFrom1970(t) {
+            return Math.floor(toLocalTimestamp(t) / 86400000);
+        }
+
+        function toLocalTimestamp(t) {
+            if (moment.isMoment(t)) t = t.toDate().getTime();
+            if (typeof t == 'object' && t.getTime) t = t.getTime();
+            if (typeof t == 'string' && !t.match(/\d{13}/)) t = moment(t, opt.format).toDate().getTime();
+            t = parseInt(t, 10) - new Date().getTimezoneOffset() * 60 * 1000;
+            return t;
+        }
+
+        function createMonthHTML(d) {
+            var days = [];
+            d.setDate(1);
+            var lastMonth = new Date(d.getTime() - 86400000);
+            var now = new Date();
+
+            var dayOfWeek = d.getDay();
+            if ((dayOfWeek === 0) && (opt.startOfWeek === 'monday')) {
+                // add one week
+                dayOfWeek = 7;
+            }
+            var today, valid;
+
+            if (dayOfWeek > 0) {
+                for (var i = dayOfWeek; i > 0; i--) {
+                    var day = new Date(d.getTime() - 86400000 * i);
+                    valid = isValidTime(day.getTime());
+                    if (opt.startDate && compare_day(day, opt.startDate) < 0) valid = false;
+                    if (opt.endDate && compare_day(day, opt.endDate) > 0) valid = false;
+                    days.push({
+                        date: day,
+                        type: 'lastMonth',
+                        day: day.getDate(),
+                        time: day.getTime(),
+                        valid: valid
+                    });
+                }
+            }
+            var toMonth = d.getMonth();
+            for (var i = 0; i < 40; i++) {
+                today = moment(d).add(i, 'days').toDate();
+                valid = isValidTime(today.getTime());
+                if (opt.startDate && compare_day(today, opt.startDate) < 0) valid = false;
+                if (opt.endDate && compare_day(today, opt.endDate) > 0) valid = false;
+                days.push({
+                    date: today,
+                    type: today.getMonth() == toMonth ? 'toMonth' : 'nextMonth',
+                    day: today.getDate(),
+                    time: today.getTime(),
+                    valid: valid
+                });
+            }
+            var html = [];
+            for (var week = 0; week < 6; week++) {
+                if (days[week * 7].type == 'nextMonth') break;
+                html.push('<tr>');
+
+                for (var day = 0; day < 7; day++) {
+                    var _day = (opt.startOfWeek == 'monday') ? day + 1 : day;
+                    today = days[week * 7 + _day];
+                    var highlightToday = moment(today.time).format('L') == moment(now).format('L');
+                    today.extraClass = '';
+                    today.tooltip = '';
+                    if (today.valid && opt.beforeShowDay && typeof opt.beforeShowDay == 'function') {
+                        var _r = opt.beforeShowDay(moment(today.time).toDate());
+                        today.valid = _r[0];
+                        today.extraClass = _r[1] || '';
+                        today.tooltip = _r[2] || '';
+                        if (today.tooltip !== '') today.extraClass += ' has-tooltip ';
+                    }
+
+                    var todayDivAttr = {
+                        time: today.time,
+                        'data-tooltip': today.tooltip,
+                        'class': 'day ' + today.type + ' ' + today.extraClass + ' ' + (today.valid ? 'valid' : 'invalid') + ' ' + (highlightToday ? 'real-today' : '')
+                    };
+
+                    if (day === 0 && opt.showWeekNumbers) {
+                        html.push('<td><div class="week-number" data-start-time="' + today.time + '">' + opt.getWeekNumber(today.date) + '</div></td>');
+                    }
+
+                    html.push('<td ' + attributesCallbacks({}, opt.dayTdAttrs, today) + '><div ' + attributesCallbacks(todayDivAttr, opt.dayDivAttrs, today) + '>' + showDayHTML(today.time, today.day) + '</div></td>');
+                }
+                html.push('</tr>');
+            }
+            return html.join('');
+        }
+
+        function showDayHTML(time, date) {
+            if (opt.showDateFilter && typeof opt.showDateFilter == 'function') return opt.showDateFilter(time, date);
+            return date;
+        }
+
+        function getLanguages() {
+            if (opt.language == 'auto') {
+                var language = navigator.language ? navigator.language : navigator.browserLanguage;
+                if (!language) {
+                    return $.dateRangePickerLanguages['default'];
+                }
+                language = language.toLowerCase();
+                if (language in $.dateRangePickerLanguages) {
+                    return $.dateRangePickerLanguages[language];
+                }
+
+                return $.dateRangePickerLanguages['default'];
+            } else if (opt.language && opt.language in $.dateRangePickerLanguages) {
+                return $.dateRangePickerLanguages[opt.language];
+            } else {
+                return $.dateRangePickerLanguages['default'];
+            }
+        }
+
+        /**
+         * Translate language string, try both the provided translation key, as the lower case version
+         */
+        function translate(translationKey) {
+            var translationKeyLowerCase = translationKey.toLowerCase();
+            var result = (translationKey in languages) ? languages[translationKey] : (translationKeyLowerCase in languages) ? languages[translationKeyLowerCase] : null;
+            var defaultLanguage = $.dateRangePickerLanguages['default'];
+            if (result == null) result = (translationKey in defaultLanguage) ? defaultLanguage[translationKey] : (translationKeyLowerCase in defaultLanguage) ? defaultLanguage[translationKeyLowerCase] : '';
+
+            return result;
+        }
+
+        function getDefaultTime() {
+            var defaultTime = opt.defaultTime ? opt.defaultTime : new Date();
+
+            if (opt.lookBehind) {
+                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = nextMonth(moment(opt.startDate).toDate());
+                if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate();
+            } else {
+                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate();
+                if (opt.endDate && compare_month(nextMonth(defaultTime), opt.endDate) > 0) defaultTime = prevMonth(moment(opt.endDate).toDate());
+            }
+
+            if (opt.singleDate) {
+                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate();
+                if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate();
+            }
+
+            return defaultTime;
+        }
+
+        function resetMonthsView(time) {
+            if (!time) {
+                time = getDefaultTime();
+            }
+
+            if (opt.lookBehind) {
+                showMonth(prevMonth(time), 'month1');
+                showMonth(time, 'month2');
+            } else {
+                showMonth(time, 'month1');
+                showMonth(nextMonth(time), 'month2');
+            }
+
+            if (opt.singleDate) {
+                showMonth(time, 'month1');
+            }
+
+            showSelectedDays();
+            showGap();
+        }
+
+    };
+}));

+ 652 - 0
app/assets/scripts/dotdotdot.js

@@ -0,0 +1,652 @@
+/*
+ *	jQuery dotdotdot 1.8.3
+ *
+ *	Copyright (c) Fred Heusschen
+ *	www.frebsite.nl
+ *
+ *	Plugin website:
+ *	dotdotdot.frebsite.nl
+ *
+ *	Licensed under the MIT license.
+ *	http://en.wikipedia.org/wiki/MIT_License
+ */
+
+(function($, undef) {
+    'use strict';
+    if ($.fn.dotdotdot) {
+        return;
+    }
+
+    $.fn.dotdotdot = function(o) {
+        if (this.length === 0) {
+            $.fn.dotdotdot.debug('No element found for "' + this.selector + '".');
+            return this;
+        }
+        if (this.length > 1) {
+            return this.each(
+                function() {
+                    $(this).dotdotdot(o);
+                }
+            );
+        }
+
+        var $dot = this;
+        var orgContent = $dot.contents();
+
+        if ($dot.data('dotdotdot')) {
+            $dot.trigger('destroy.dot');
+        }
+
+        $dot.data('dotdotdot-style', $dot.attr('style') || '');
+        $dot.css('word-wrap', 'break-word');
+        if ($dot.css('white-space') === 'nowrap') {
+            $dot.css('white-space', 'normal');
+        }
+
+        $dot.bind_events = function() {
+            $dot.bind(
+                'update.dot',
+                function(e, c) {
+                    $dot.removeClass("is-truncated");
+                    e.preventDefault();
+                    e.stopPropagation();
+
+                    switch (typeof opts.height) {
+                        case 'number':
+                            opts.maxHeight = opts.height;
+                            break;
+
+                        case 'function':
+                            opts.maxHeight = opts.height.call($dot[0]);
+                            break;
+
+                        default:
+                            opts.maxHeight = getTrueInnerHeight($dot);
+                            break;
+                    }
+
+                    opts.maxHeight += opts.tolerance;
+
+                    if (typeof c != 'undefined') {
+                        if (typeof c == 'string' || ('nodeType' in c && c.nodeType === 1)) {
+                            c = $('<div />').append(c).contents();
+                        }
+                        if (c instanceof $) {
+                            orgContent = c;
+                        }
+                    }
+
+                    $inr = $dot.wrapInner('<div class="dotdotdot" />').children();
+                    $inr.contents()
+                        .detach()
+                        .end()
+                        .append(orgContent.clone(true))
+                        .find('br')
+                        .replaceWith('  <br />  ')
+                        .end()
+                        .css({
+                            'height': 'auto',
+                            'width': 'auto',
+                            'border': 'none',
+                            'padding': 0,
+                            'margin': 0
+                        });
+
+                    var after = false,
+                        trunc = false;
+
+                    if (conf.afterElement) {
+                        after = conf.afterElement.clone(true);
+                        after.show();
+                        conf.afterElement.detach();
+                    }
+
+                    if (test($inr, opts)) {
+                        if (opts.wrap == 'children') {
+                            trunc = children($inr, opts, after);
+                        } else {
+                            trunc = ellipsis($inr, $dot, $inr, opts, after);
+                        }
+                    }
+                    $inr.replaceWith($inr.contents());
+                    $inr = null;
+
+                    if ($.isFunction(opts.callback)) {
+                        opts.callback.call($dot[0], trunc, orgContent);
+                    }
+
+                    conf.isTruncated = trunc;
+                    return trunc;
+                }
+
+            ).bind(
+                'isTruncated.dot',
+                function(e, fn) {
+                    e.preventDefault();
+                    e.stopPropagation();
+
+                    if (typeof fn == 'function') {
+                        fn.call($dot[0], conf.isTruncated);
+                    }
+                    return conf.isTruncated;
+                }
+
+            ).bind(
+                'originalContent.dot',
+                function(e, fn) {
+                    e.preventDefault();
+                    e.stopPropagation();
+
+                    if (typeof fn == 'function') {
+                        fn.call($dot[0], orgContent);
+                    }
+                    return orgContent;
+                }
+
+            ).bind(
+                'destroy.dot',
+                function(e) {
+                    e.preventDefault();
+                    e.stopPropagation();
+
+                    $dot.unwatch()
+                        .unbind_events()
+                        .contents()
+                        .detach()
+                        .end()
+                        .append(orgContent)
+                        .attr('style', $dot.data('dotdotdot-style') || '')
+                        .removeClass('is-truncated')
+                        .data('dotdotdot', false);
+                }
+            );
+            return $dot;
+        }; //	/bind_events
+
+        $dot.unbind_events = function() {
+            $dot.unbind('.dot');
+            return $dot;
+        }; //	/unbind_events
+
+        $dot.watch = function() {
+            $dot.unwatch();
+            if (opts.watch == 'window') {
+                var $window = $(window),
+                    _wWidth = $window.width(),
+                    _wHeight = $window.height();
+
+                $window.bind(
+                    'resize.dot' + conf.dotId,
+                    function() {
+                        if (_wWidth != $window.width() || _wHeight != $window.height() || !opts.windowResizeFix) {
+                            _wWidth = $window.width();
+                            _wHeight = $window.height();
+
+                            if (watchInt) {
+                                clearInterval(watchInt);
+                            }
+                            watchInt = setTimeout(
+                                function() {
+                                    $dot.trigger('update.dot');
+                                }, 100
+                            );
+                        }
+                    }
+                );
+            } else {
+                watchOrg = getSizes($dot);
+                watchInt = setInterval(
+                    function() {
+                        if ($dot.is(':visible')) {
+                            var watchNew = getSizes($dot);
+                            if (watchOrg.width != watchNew.width ||
+                                watchOrg.height != watchNew.height) {
+                                $dot.trigger('update.dot');
+                                watchOrg = watchNew;
+                            }
+                        }
+                    }, 500
+                );
+            }
+            return $dot;
+        };
+        $dot.unwatch = function() {
+            $(window).unbind('resize.dot' + conf.dotId);
+            if (watchInt) {
+                clearInterval(watchInt);
+            }
+            return $dot;
+        };
+
+        var opts = $.extend(true, {}, $.fn.dotdotdot.defaults, o),
+            conf = {},
+            watchOrg = {},
+            watchInt = null,
+            $inr = null;
+
+
+        if (!(opts.lastCharacter.remove instanceof Array)) {
+            opts.lastCharacter.remove = $.fn.dotdotdot.defaultArrays.lastCharacter.remove;
+        }
+        if (!(opts.lastCharacter.noEllipsis instanceof Array)) {
+            opts.lastCharacter.noEllipsis = $.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis;
+        }
+
+
+        conf.afterElement = getElement(opts.after, $dot);
+        conf.isTruncated = false;
+        conf.dotId = dotId++;
+
+
+        $dot.data('dotdotdot', true)
+            .bind_events()
+            .trigger('update.dot');
+
+        if (opts.watch) {
+            $dot.watch();
+        }
+
+        return $dot;
+    };
+
+
+    //	public
+    $.fn.dotdotdot.defaults = {
+        'ellipsis': '... ',
+        'wrap': 'word',
+        'fallbackToLetter': true,
+        'lastCharacter': {},
+        'tolerance': 0,
+        'callback': null,
+        'after': null,
+        'height': null,
+        'watch': false,
+        'windowResizeFix': true,
+        'maxLength': null
+    };
+    $.fn.dotdotdot.defaultArrays = {
+        'lastCharacter': {
+            'remove': [' ', '\u3000', ',', ';', '.', '!', '?'],
+            'noEllipsis': []
+        }
+    };
+    $.fn.dotdotdot.debug = function(msg) {};
+
+
+    //	private
+    var dotId = 1;
+
+    function children($elem, o, after) {
+        var $elements = $elem.children(),
+            isTruncated = false;
+
+        $elem.empty();
+
+        for (var a = 0, l = $elements.length; a < l; a++) {
+            var $e = $elements.eq(a);
+            $elem.append($e);
+            if (after) {
+                $elem.append(after);
+            }
+            if (test($elem, o)) {
+                $e.remove();
+                isTruncated = true;
+                break;
+            } else {
+                if (after) {
+                    after.detach();
+                }
+            }
+        }
+        return isTruncated;
+    }
+
+    function ellipsis($elem, $d, $i, o, after) {
+        var isTruncated = false;
+
+        //	Don't put the ellipsis directly inside these elements
+        var notx = 'a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style';
+
+        //	Don't remove these elements even if they are after the ellipsis
+        var noty = 'script, .dotdotdot-keep';
+
+        $elem
+            .contents()
+            .detach()
+            .each(
+                function() {
+
+                    var e = this,
+                        $e = $(e);
+
+                    if (typeof e == 'undefined') {
+                        return true;
+                    } else if ($e.is(noty)) {
+                        $elem.append($e);
+                    } else if (isTruncated) {
+                        return true;
+                    } else {
+                        $elem.append($e);
+                        if (after && !$e.is(o.after) && !$e.find(o.after).length) {
+                            $elem[$elem.is(notx) ? 'after' : 'append'](after);
+                        }
+                        if (test($i, o)) {
+                            if (e.nodeType == 3) // node is TEXT
+                            {
+                                isTruncated = ellipsisElement($e, $d, $i, o, after);
+                            } else {
+                                isTruncated = ellipsis($e, $d, $i, o, after);
+                            }
+                        }
+
+                        if (!isTruncated) {
+                            if (after) {
+                                after.detach();
+                            }
+                        }
+                    }
+                }
+            );
+        $d.addClass("is-truncated");
+        return isTruncated;
+    }
+
+    function ellipsisElement($e, $d, $i, o, after) {
+        var e = $e[0];
+
+        if (!e) {
+            return false;
+        }
+
+        var txt = getTextContent(e),
+            space = (txt.indexOf(' ') !== -1) ? ' ' : '\u3000',
+            separator = (o.wrap == 'letter') ? '' : space,
+            textArr = txt.split(separator),
+            position = -1,
+            midPos = -1,
+            startPos = 0,
+            endPos = textArr.length - 1;
+
+
+        //	Only one word
+        if (o.fallbackToLetter && startPos === 0 && endPos === 0) {
+            separator = '';
+            textArr = txt.split(separator);
+            endPos = textArr.length - 1;
+        }
+
+        if (o.maxLength) {
+            txt = addEllipsis(txt.trim().substr(0, o.maxLength), o);
+            setTextContent(e, txt);
+        } else {
+
+            while (startPos <= endPos && !(startPos === 0 && endPos === 0)) {
+                var m = Math.floor((startPos + endPos) / 2);
+                if (m == midPos) {
+                    break;
+                }
+                midPos = m;
+
+                setTextContent(e, textArr.slice(0, midPos + 1).join(separator) + o.ellipsis);
+
+                $i.children().each(function() {
+                    $(this).toggle().toggle();
+                });
+
+                if (!test($i, o)) {
+                    position = midPos;
+                    startPos = midPos;
+                } else {
+                    endPos = midPos;
+
+                    //	Fallback to letter
+                    if (o.fallbackToLetter && startPos === 0 && endPos === 0) {
+                        separator = '';
+                        textArr = textArr[0].split(separator);
+                        position = -1;
+                        midPos = -1;
+                        startPos = 0;
+                        endPos = textArr.length - 1;
+                    }
+                }
+            }
+
+            if (position != -1 && !(textArr.length === 1 && textArr[0].length === 0)) {
+                txt = addEllipsis(textArr.slice(0, position + 1).join(separator), o);
+                setTextContent(e, txt);
+            } else {
+                var $w = $e.parent();
+                $e.detach();
+
+                var afterLength = (after && after.closest($w).length) ? after.length : 0;
+
+                if ($w.contents().length > afterLength) {
+                    e = findLastTextNode($w.contents().eq(-1 - afterLength), $d);
+                } else {
+                    e = findLastTextNode($w, $d, true);
+                    if (!afterLength) {
+                        $w.detach();
+                    }
+                }
+                if (e) {
+                    txt = addEllipsis(getTextContent(e), o);
+                    setTextContent(e, txt);
+                    if (afterLength && after) {
+                        var $parent = after.parent();
+
+                        $(e).parent().append(after);
+
+                        if (!$.trim($parent.html())) {
+                            $parent.remove();
+                        }
+                    }
+                }
+            }
+        }
+
+        return true;
+    }
+
+    function test($i, o) {
+        return ($i.innerHeight() > o.maxHeight || (o.maxLength && $i.text().trim().length > o.maxLength));
+    }
+
+    function addEllipsis(txt, o) {
+        while ($.inArray(txt.slice(-1), o.lastCharacter.remove) > -1) {
+            txt = txt.slice(0, -1);
+        }
+        if ($.inArray(txt.slice(-1), o.lastCharacter.noEllipsis) < 0) {
+            txt += o.ellipsis;
+        }
+        return txt;
+    }
+
+    function getSizes($d) {
+        return {
+            'width': $d.innerWidth(),
+            'height': $d.innerHeight()
+        };
+    }
+
+    function setTextContent(e, content) {
+        if (e.innerText) {
+            e.innerText = content;
+        } else if (e.nodeValue) {
+            e.nodeValue = content;
+        } else if (e.textContent) {
+            e.textContent = content;
+        }
+
+    }
+
+    function getTextContent(e) {
+        if (e.innerText) {
+            return e.innerText;
+        } else if (e.nodeValue) {
+            return e.nodeValue;
+        } else if (e.textContent) {
+            return e.textContent;
+        } else {
+            return "";
+        }
+    }
+
+    function getPrevNode(n) {
+        do {
+            n = n.previousSibling;
+        }
+        while (n && n.nodeType !== 1 && n.nodeType !== 3);
+
+        return n;
+    }
+
+    function findLastTextNode($el, $top, excludeCurrent) {
+        var e = $el && $el[0],
+            p;
+        if (e) {
+            if (!excludeCurrent) {
+                if (e.nodeType === 3) {
+                    return e;
+                }
+                if ($.trim($el.text())) {
+                    return findLastTextNode($el.contents().last(), $top);
+                }
+            }
+            p = getPrevNode(e);
+            while (!p) {
+                $el = $el.parent();
+                if ($el.is($top) || !$el.length) {
+                    return false;
+                }
+                p = getPrevNode($el[0]);
+            }
+            if (p) {
+                return findLastTextNode($(p), $top);
+            }
+        }
+        return false;
+    }
+
+    function getElement(e, $i) {
+        if (!e) {
+            return false;
+        }
+        if (typeof e === 'string') {
+            e = $(e, $i);
+            return (e.length) ?
+                e :
+                false;
+        }
+        return !e.jquery ?
+            false :
+            e;
+    }
+
+    function getTrueInnerHeight($el) {
+        var h = $el.innerHeight(),
+            a = ['paddingTop', 'paddingBottom'];
+
+        for (var z = 0, l = a.length; z < l; z++) {
+            var m = parseInt($el.css(a[z]), 10);
+            if (isNaN(m)) {
+                m = 0;
+            }
+            h -= m;
+        }
+        return h;
+    }
+
+
+    //	override jQuery.html
+    var _orgHtml = $.fn.html;
+    $.fn.html = function(str) {
+        if (str != undef && !$.isFunction(str) && this.data('dotdotdot')) {
+            return this.trigger('update', [str]);
+        }
+        return _orgHtml.apply(this, arguments);
+    };
+
+
+    //	override jQuery.text
+    var _orgText = $.fn.text;
+    $.fn.text = function(str) {
+        if (str != undef && !$.isFunction(str) && this.data('dotdotdot')) {
+            str = $('<div />').text(str).html();
+            return this.trigger('update', [str]);
+        }
+        return _orgText.apply(this, arguments);
+    };
+
+
+})(jQuery);
+
+/*
+
+## Automatic parsing for CSS classes
+Contributed by [Ramil Valitov](https://github.com/rvalitov)
+
+### The idea
+You can add one or several CSS classes to HTML elements to automatically invoke "jQuery.dotdotdot functionality" and some extra features. It allows to use jQuery.dotdotdot only by adding appropriate CSS classes without JS programming.
+
+### Available classes and their description
+* dot-ellipsis - automatically invoke jQuery.dotdotdot to this element. This class must be included if you plan to use other classes below.
+* dot-resize-update - automatically update if window resize event occurs. It's equivalent to option `watch:'window'`.
+* dot-timer-update - automatically update at regular intervals using setInterval. It's equivalent to option `watch:true`.
+* dot-load-update - automatically update after the window has beem completely rendered. Can be useful if your content is generated dynamically using using JS and, hence, jQuery.dotdotdot can't correctly detect the height of the element before it's rendered completely.
+* dot-height-XXX - available height of content area in pixels, where XXX is a number, e.g. can be `dot-height-35` if you want to set maximum height for 35 pixels. It's equivalent to option `height:'XXX'`.
+
+### Usage examples
+*Adding jQuery.dotdotdot to element*
+
+	<div class="dot-ellipsis">
+	<p>Lorem Ipsum is simply dummy text.</p>
+	</div>
+
+*Adding jQuery.dotdotdot to element with update on window resize*
+
+	<div class="dot-ellipsis dot-resize-update">
+	<p>Lorem Ipsum is simply dummy text.</p>
+	</div>
+
+*Adding jQuery.dotdotdot to element with predefined height of 50px*
+
+	<div class="dot-ellipsis dot-height-50">
+	<p>Lorem Ipsum is simply dummy text.</p>
+	</div>
+
+*/
+
+jQuery(document).ready(function($) {
+    //We only invoke jQuery.dotdotdot on elements that have dot-ellipsis class
+    $(".dot-ellipsis").each(function() {
+        //Checking if update on window resize required
+        var watch_window = $(this).hasClass("dot-resize-update");
+
+        //Checking if update on timer required
+        var watch_timer = $(this).hasClass("dot-timer-update");
+
+        //Checking if height set
+        var height = 0;
+        var classList = $(this).attr('class').split(/\s+/);
+        $.each(classList, function(index, item) {
+            var matchResult = item.match(/^dot-height-(\d+)$/);
+            if (matchResult !== null)
+                height = Number(matchResult[1]);
+        });
+
+        //Invoking jQuery.dotdotdot
+        var x = {};
+        if (watch_timer)
+            x.watch = true;
+        if (watch_window)
+            x.watch = 'window';
+        if (height > 0)
+            x.height = height;
+        $(this).dotdotdot(x);
+    });
+});
+
+//Updating elements (if any) on window.load event
+jQuery(window).on('load', function() {
+    jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot");
+});

+ 194 - 0
app/assets/scripts/fancycheckboxes.js

@@ -0,0 +1,194 @@
+/// <reference path="../../node_modules/@types/jquery/index.d.ts"/>
+/// <reference path="../../node_modules/@types/fancybox/index.d.ts"/>
+var FancyCheckboxes;
+(function (FancyCheckboxes) {
+    var FancyCheckbox = (function () {
+        function FancyCheckbox($selector) {
+            this.events = {
+                'error': [],
+                'success': []
+            };
+            this.selected = {};
+            this.$selector = $selector;
+            this.checkboxData = [];
+            this.populateCheckboxData(JSON.parse($selector.data('items') ? $selector.data('items').replace(/'/g, '"') : "[]"));
+            this.$selector.click(this.onSelectorClick.bind(this));
+            this.$selector.prev().append('<div class="selected-items"></div>');
+            this.loadSelected();
+        }
+        FancyCheckbox.prototype.loadSelected = function () {
+            var context = this;
+            var first = true;
+            var $selected = context.$selector.prev().find('.selected-items');
+            this.selected = {};
+            $selected.html('');
+            console.dir($(this.$selector.data('field')).find(':selected'));
+            $(this.$selector.data('field')).find(':selected').each(function () {
+                context.selected[$(this).attr('value')] = $(this).html();
+                if (!first) {
+                    $selected.append(', ');
+                }
+                if (first) {
+                    first = false;
+                }
+                $selected.append('<span>' + $(this).html() + '</span>');
+            });
+            console.dir(this.selected);
+        };
+        FancyCheckbox.prototype.onSelectorClick = function (event) {
+            var context = this;
+            var content = $('<div></div>');
+            content.append('<div class="modal-header"><h3>' + this.$selector.html() + '</h3></div>');
+            content.append('<div class="fancycheckboxes-items-container container">' + this.render().html() + '</div>');
+            content.append('<div class="modal-footer"></div>');
+            content.find('.modal-footer').append('<button type="submit" class="btn btn-primary">Выбрать</button>');
+            var options = {
+                content: '<div class="fancycheckboxes">' + content.html() + '</div>',
+                type: 'html',
+                modal: true,
+                height: window.innerHeight,
+                width: $('.mainBlock').outerWidth(),
+                autoSize: false,
+                afterClose: function () {
+                    context.loadSelected();
+                },
+                afterShow: function () {
+                    context.bindEvents();
+                }
+            };
+            $.fancybox(options);
+        };
+        FancyCheckbox.prototype.bindEvents = function () {
+            var context = this;
+            var $fancy = $('.fancycheckboxes');
+            $fancy.find('.more').each(function () {
+                var $link = $(this);
+                $link.on('click', function () {
+                    $link.parent().animate({ height: $link.parent()[0].scrollHeight }, 200, function () {
+                        $link.parent().height('auto');
+                        $link.remove();
+                    });
+                });
+            });
+            $fancy.find('.btn-primary').click(function () {
+                $(context.$selector.data('field')).find('option').removeAttr('selected');
+                $fancy.find('input:checked').each(function () {
+                    console.dir($(context.$selector.data('field'))
+                        .find('[value=' + $(this).attr('value') + ']'));
+                    $(context.$selector.data('field'))
+                        .find('[value=' + $(this).attr('value') + ']')
+                        .prop('selected', 'selected');
+                });
+                $.fancybox.close();
+            });
+        };
+        FancyCheckbox.prototype.checkChecked = function (id) {
+            return this.selected.hasOwnProperty(id);
+        };
+        FancyCheckbox.prototype.on = function (eventName, callback) {
+            this.events[eventName].push(callback);
+            return this;
+        };
+        FancyCheckbox.prototype.trigger = function (eventName) {
+            var args = [];
+            for (var _i = 1; _i < arguments.length; _i++) {
+                args[_i - 1] = arguments[_i];
+            }
+            var context = this;
+            for (var i in this.events[eventName]) {
+                if (this.events[eventName].hasOwnProperty(i)) {
+                    setTimeout(this.events[eventName][i].apply(context, args), 1);
+                }
+            }
+        };
+        FancyCheckbox.prototype.populateCheckboxData = function (checkboxData) {
+            checkboxData.sort(function (item1, item2) {
+                return item1.value.localeCompare(item2.value);
+            });
+            for (var i in checkboxData) {
+                if (checkboxData.hasOwnProperty(i)) {
+                    if (checkboxData[i].items.length) {
+                        var group = new CheckboxGroup(checkboxData[i], this);
+                        this.checkboxData.push(group);
+                    }
+                    else {
+                        var item = new CheckboxItem(checkboxData[i], this);
+                        this.checkboxData.push(item);
+                    }
+                }
+            }
+        };
+        FancyCheckbox.prototype.render = function () {
+            var items = $('<div></div>');
+            this.checkboxData.forEach(function (item) {
+                if (item instanceof CheckboxItem) {
+                    var group = $('<div class="fancycheckboxes-group"></div>');
+                    group.append(item.render());
+                    items.append(group);
+                }
+                else {
+                    items.append(item.render());
+                }
+            });
+            items.find('.fancycheckboxes-group').each(function () {
+                if ($(this).find('.fancycheckboxes-item').length > 5) {
+                    $(this).append($('<a class="more">Все &raquo;</a>'));
+                    $(this).height(150);
+                }
+            });
+            return items;
+        };
+        return FancyCheckbox;
+    }());
+    FancyCheckboxes.FancyCheckbox = FancyCheckbox;
+    var CheckboxGroup = (function () {
+        function CheckboxGroup(item, widget) {
+            this.widget = widget;
+            this.name = item.value;
+            this.items = [];
+            this.populateCheckboxData(item.items);
+        }
+        CheckboxGroup.prototype.populateCheckboxData = function (checkboxData) {
+            checkboxData.sort(function (item1, item2) {
+                return item1.value.localeCompare(item2.value);
+            });
+            for (var i in checkboxData) {
+                if (checkboxData.hasOwnProperty(i)) {
+                    if (checkboxData[i].items.length) {
+                        var group = new CheckboxGroup(checkboxData[i], this.widget);
+                        this.items.push(group);
+                    }
+                    else {
+                        var item = new CheckboxItem(checkboxData[i], this.widget);
+                        this.items.push(item);
+                    }
+                }
+            }
+        };
+        CheckboxGroup.prototype.render = function () {
+            var group = $('<div class="fancycheckboxes-group"></div>');
+            group.append($('<h4>' + this.name + '</h4>'));
+            this.items.forEach(function (item) {
+                group.append(item.render());
+            });
+            return group;
+        };
+        return CheckboxGroup;
+    }());
+    var CheckboxItem = (function () {
+        function CheckboxItem(item, widget) {
+            this.id = item.id;
+            this.name = item.value;
+            this.widget = widget;
+        }
+        CheckboxItem.prototype.render = function () {
+            var item = $('<div class="fancycheckboxes-item"></div>');
+            item.append($('<input type="checkbox" value="' + this.id + '" id="fchb_' + this.id + '" > <label for="fchb_' + this.id + '">' + this.name + '</label>'));
+            if (this.widget.checkChecked(this.id)) {
+                item.find('input').attr('checked', 'checked');
+            }
+            return item;
+        };
+        return CheckboxItem;
+    }());
+})(FancyCheckboxes || (FancyCheckboxes = {}));

+ 1107 - 0
app/assets/scripts/formstyler.js

@@ -0,0 +1,1107 @@
+/*
+ * jQuery Form Styler v2.0.0
+ * https://github.com/Dimox/jQueryFormStyler
+ *
+ * Copyright 2012-2017 Dimox (http://dimox.name/)
+ * Released under the MIT license.
+ *
+ * Date: 2017.05.08
+ *
+ */
+
+;(function(factory) {
+	if (typeof define === 'function' && define.amd) {
+		// AMD
+		define(['jquery'], factory);
+	} else if (typeof exports === 'object') {
+		// CommonJS
+		module.exports = factory($ || require('jquery'));
+	} else {
+		factory(jQuery);
+	}
+}(function($) {
+
+	'use strict';
+
+	var pluginName = 'styler',
+			defaults = {
+				idSuffix: '-styler',
+				filePlaceholder: 'Файл не выбран',
+				fileBrowse: 'Обзор...',
+				fileNumber: 'Выбрано файлов: %s',
+				selectPlaceholder: 'Выберите...',
+				selectSearch: false,
+				selectSearchLimit: 10,
+				selectSearchNotFound: 'Совпадений не найдено',
+				selectSearchPlaceholder: 'Поиск...',
+				selectVisibleOptions: 0,
+				selectSmartPositioning: true,
+				locale: 'ru',
+				locales: {
+					'en': {
+						filePlaceholder: 'No file selected',
+						fileBrowse: 'Browse...',
+						fileNumber: 'Selected files: %s',
+						selectPlaceholder: 'Select...',
+						selectSearchNotFound: 'No matches found',
+						selectSearchPlaceholder: 'Search...'
+					}
+				},
+				onSelectOpened: function() {},
+				onSelectClosed: function() {},
+				onFormStyled: function() {}
+			};
+
+	function Plugin(element, options) {
+		this.element = element;
+		this.options = $.extend({}, defaults, options);
+		var locale = this.options.locale;
+		if (this.options.locales[locale] !== undefined) {
+			$.extend(this.options, this.options.locales[locale]);
+		}
+		this.init();
+	}
+
+	Plugin.prototype = {
+
+		// инициализация
+		init: function() {
+
+			var el = $(this.element);
+			var opt = this.options;
+
+			var iOS = (navigator.userAgent.match(/(iPad|iPhone|iPod)/i) && !navigator.userAgent.match(/(Windows\sPhone)/i)) ? true : false;
+			var Android = (navigator.userAgent.match(/Android/i) && !navigator.userAgent.match(/(Windows\sPhone)/i)) ? true : false;
+
+			function Attributes() {
+				if (el.attr('id') !== undefined && el.attr('id') !== '') {
+					this.id = el.attr('id') + opt.idSuffix;
+				}
+				this.title = el.attr('title');
+				this.classes = el.attr('class');
+				this.data = el.data();
+			}
+
+			// checkbox
+			if (el.is(':checkbox')) {
+
+				var checkboxOutput = function() {
+
+					var att = new Attributes();
+					var checkbox = $('<div class="jq-checkbox"><div class="jq-checkbox__div"></div></div>')
+						.attr({
+							id: att.id,
+							title: att.title
+						})
+						.addClass(att.classes)
+						.data(att.data)
+					;
+
+					el.after(checkbox).prependTo(checkbox);
+					if (el.is(':checked')) checkbox.addClass('checked');
+					if (el.is(':disabled')) checkbox.addClass('disabled');
+
+					// клик на псевдочекбокс
+					checkbox.click(function(e) {
+						e.preventDefault();
+						el.triggerHandler('click');
+						if (!checkbox.is('.disabled')) {
+							if (el.is(':checked')) {
+								el.prop('checked', false);
+								checkbox.removeClass('checked');
+							} else {
+								el.prop('checked', true);
+								checkbox.addClass('checked');
+							}
+							el.focus().change();
+						}
+					});
+					// клик на label
+					el.closest('label').add('label[for="' + el.attr('id') + '"]').on('click.styler', function(e) {
+						if (!$(e.target).is('a') && !$(e.target).closest(checkbox).length) {
+							checkbox.triggerHandler('click');
+							e.preventDefault();
+						}
+					});
+					// переключение по Space или Enter
+					el.on('change.styler', function() {
+						if (el.is(':checked')) checkbox.addClass('checked');
+						else checkbox.removeClass('checked');
+					})
+					// чтобы переключался чекбокс, который находится в теге label
+					.on('keydown.styler', function(e) {
+						if (e.which == 32) checkbox.click();
+					})
+					.on('focus.styler', function() {
+						if (!checkbox.is('.disabled')) checkbox.addClass('focused');
+					})
+					.on('blur.styler', function() {
+						checkbox.removeClass('focused');
+					});
+
+				}; // end checkboxOutput()
+
+				checkboxOutput();
+
+				// обновление при динамическом изменении
+				el.on('refresh', function() {
+					el.closest('label').add('label[for="' + el.attr('id') + '"]').off('.styler');
+					el.off('.styler').parent().before(el).remove();
+					checkboxOutput();
+				});
+
+			// end checkbox
+
+			// radio
+			} else if (el.is(':radio')) {
+
+				var radioOutput = function() {
+
+					var att = new Attributes();
+					var radio = $('<div class="jq-radio"><div class="jq-radio__div"></div></div>')
+						.attr({
+							id: att.id,
+							title: att.title
+						})
+						.addClass(att.classes)
+						.data(att.data)
+					;
+
+					el.after(radio).prependTo(radio);
+					if (el.is(':checked')) radio.addClass('checked');
+					if (el.is(':disabled')) radio.addClass('disabled');
+
+					// определяем общего родителя у радиокнопок с одинаковым name
+					// http://stackoverflow.com/a/27733847
+					$.fn.commonParents = function() {
+						var cachedThis = this;
+						return cachedThis.first().parents().filter(function() {
+							return $(this).find(cachedThis).length === cachedThis.length;
+						});
+					};
+					$.fn.commonParent = function() {
+						return $(this).commonParents().first();
+					};
+
+					// клик на псевдорадиокнопке
+					radio.click(function(e) {
+						e.preventDefault();
+						el.triggerHandler('click');
+						if (!radio.is('.disabled')) {
+							var inputName = $('input[name="' + el.attr('name') + '"]');
+							inputName.commonParent().find(inputName).prop('checked', false).parent().removeClass('checked');
+							el.prop('checked', true).parent().addClass('checked');
+							el.focus().change();
+						}
+					});
+					// клик на label
+					el.closest('label').add('label[for="' + el.attr('id') + '"]').on('click.styler', function(e) {
+						if (!$(e.target).is('a') && !$(e.target).closest(radio).length) {
+							radio.triggerHandler('click');
+							e.preventDefault();
+						}
+					});
+					// переключение стрелками
+					el.on('change.styler', function() {
+						el.parent().addClass('checked');
+					})
+					.on('focus.styler', function() {
+						if (!radio.is('.disabled')) radio.addClass('focused');
+					})
+					.on('blur.styler', function() {
+						radio.removeClass('focused');
+					});
+
+				}; // end radioOutput()
+
+				radioOutput();
+
+				// обновление при динамическом изменении
+				el.on('refresh', function() {
+					el.closest('label').add('label[for="' + el.attr('id') + '"]').off('.styler');
+					el.off('.styler').parent().before(el).remove();
+					radioOutput();
+				});
+
+			// end radio
+
+			// file
+			} else if (el.is(':file')) {
+
+				var fileOutput = function() {
+
+					var att = new Attributes();
+					var placeholder = el.data('placeholder');
+					if (placeholder === undefined) placeholder = opt.filePlaceholder;
+					var browse = el.data('browse');
+					if (browse === undefined || browse === '') browse = opt.fileBrowse;
+
+					var file =
+						$('<div class="jq-file">' +
+								'<div class="jq-file__name">' + placeholder + '</div>' +
+								'<div class="jq-file__browse">' + browse + '</div>' +
+							'</div>')
+						.attr({
+							id: att.id,
+							title: att.title
+						})
+						.addClass(att.classes)
+						.data(att.data)
+					;
+
+					el.after(file).appendTo(file);
+					if (el.is(':disabled')) file.addClass('disabled');
+
+					var value = el.val();
+					var name = $('div.jq-file__name', file);
+
+					// чтобы при динамическом изменении имя файла не сбрасывалось
+					if (value) name.text(value.replace(/.+[\\\/]/, ''));
+
+					el.on('change.styler', function() {
+						var value = el.val();
+						if (el.is('[multiple]')) {
+							value = '';
+							var files = el[0].files.length;
+							if (files > 0) {
+								var number = el.data('number');
+								if (number === undefined) number = opt.fileNumber;
+								number = number.replace('%s', files);
+								value = number;
+							}
+						}
+						name.text(value.replace(/.+[\\\/]/, ''));
+						if (value === '') {
+							name.text(placeholder);
+							file.removeClass('changed');
+						} else {
+							file.addClass('changed');
+						}
+					})
+					.on('focus.styler', function() {
+						file.addClass('focused');
+					})
+					.on('blur.styler', function() {
+						file.removeClass('focused');
+					})
+					.on('click.styler', function() {
+						file.removeClass('focused');
+					});
+
+				}; // end fileOutput()
+
+				fileOutput();
+
+				// обновление при динамическом изменении
+				el.on('refresh', function() {
+					el.off('.styler').parent().before(el).remove();
+					fileOutput();
+				});
+
+			// end file
+
+			} else if (el.is('input[type="number"]')) {
+
+				var numberOutput = function() {
+
+					var att = new Attributes();
+					var number =
+						$('<div class="jq-number">' +
+								'<div class="jq-number__spin minus"></div>' +
+								'<div class="jq-number__spin plus"></div>' +
+							'</div>')
+						.attr({
+							id: att.id,
+							title: att.title
+						})
+						.addClass(att.classes)
+						.data(att.data)
+					;
+
+					el.after(number).prependTo(number).wrap('<div class="jq-number__field"></div>');
+					if (el.is(':disabled')) number.addClass('disabled');
+
+					var min,
+							max,
+							step,
+							timeout = null,
+							interval = null;
+					if (el.attr('min') !== undefined) min = el.attr('min');
+					if (el.attr('max') !== undefined) max = el.attr('max');
+					if (el.attr('step') !== undefined && $.isNumeric(el.attr('step')))
+						step = Number(el.attr('step'));
+					else
+						step = Number(1);
+
+					var changeValue = function(spin) {
+						var value = el.val(),
+								newValue;
+
+						if (!$.isNumeric(value)) {
+							value = 0;
+							el.val('0');
+						}
+
+						if (spin.is('.minus')) {
+							newValue = Number(value) - step;
+						} else if (spin.is('.plus')) {
+							newValue = Number(value) + step;
+						}
+
+						// определяем количество десятичных знаков после запятой в step
+						var decimals = (step.toString().split('.')[1] || []).length;
+						if (decimals > 0) {
+							var multiplier = '1';
+							while (multiplier.length <= decimals) multiplier = multiplier + '0';
+							// избегаем появления лишних знаков после запятой
+							newValue = Math.round(newValue * multiplier) / multiplier;
+						}
+
+						if ($.isNumeric(min) && $.isNumeric(max)) {
+							if (newValue >= min && newValue <= max) el.val(newValue);
+						} else if ($.isNumeric(min) && !$.isNumeric(max)) {
+							if (newValue >= min) el.val(newValue);
+						} else if (!$.isNumeric(min) && $.isNumeric(max)) {
+							if (newValue <= max) el.val(newValue);
+						} else {
+							el.val(newValue);
+						}
+					};
+
+					if (!number.is('.disabled')) {
+						number.on('mousedown', 'div.jq-number__spin', function() {
+							var spin = $(this);
+							changeValue(spin);
+							timeout = setTimeout(function(){
+								interval = setInterval(function(){ changeValue(spin); }, 40);
+							}, 350);
+						}).on('mouseup mouseout', 'div.jq-number__spin', function() {
+							clearTimeout(timeout);
+							clearInterval(interval);
+						}).on('mouseup', 'div.jq-number__spin', function() {
+							el.change();
+						});
+						el.on('focus.styler', function() {
+							number.addClass('focused');
+						})
+						.on('blur.styler', function() {
+							number.removeClass('focused');
+						});
+					}
+
+				}; // end numberOutput()
+
+				numberOutput();
+
+				// обновление при динамическом изменении
+				el.on('refresh', function() {
+					el.off('.styler').closest('.jq-number').before(el).remove();
+					numberOutput();
+				});
+
+			// end number
+
+			// select
+			} else if (el.is('select')) {
+
+				var selectboxOutput = function() {
+
+					// запрещаем прокрутку страницы при прокрутке селекта
+					function preventScrolling(selector) {
+
+						var scrollDiff = selector.prop('scrollHeight') - selector.outerHeight(),
+								wheelDelta = null,
+								scrollTop = null;
+
+						selector.off('mousewheel DOMMouseScroll').on('mousewheel DOMMouseScroll', function(e) {
+
+							/**
+							 * нормализация направления прокрутки
+							 * (firefox < 0 || chrome etc... > 0)
+							 * (e.originalEvent.detail < 0 || e.originalEvent.wheelDelta > 0)
+							 */
+							wheelDelta = (e.originalEvent.detail < 0 || e.originalEvent.wheelDelta > 0) ? 1 : -1; // направление прокрутки (-1 вниз, 1 вверх)
+							scrollTop = selector.scrollTop(); // позиция скролла
+
+							if ((scrollTop >= scrollDiff && wheelDelta < 0) || (scrollTop <= 0 && wheelDelta > 0)) {
+								e.stopPropagation();
+								e.preventDefault();
+							}
+
+						});
+					}
+
+					var option = $('option', el);
+					var list = '';
+					// формируем список селекта
+					function makeList() {
+						for (var i = 0; i < option.length; i++) {
+							var op = option.eq(i);
+							var li = '',
+									liClass = '',
+									liClasses = '',
+									id = '',
+									title = '',
+									dataList = '',
+									optionClass = '',
+									optgroupClass = '',
+									dataJqfsClass = '';
+							var disabled = 'disabled';
+							var selDis = 'selected sel disabled';
+							if (op.prop('selected')) liClass = 'selected sel';
+							if (op.is(':disabled')) liClass = disabled;
+							if (op.is(':selected:disabled')) liClass = selDis;
+							if (op.attr('id') !== undefined && op.attr('id') !== '') id = ' id="' + op.attr('id') + opt.idSuffix + '"';
+							if (op.attr('title') !== undefined && option.attr('title') !== '') title = ' title="' + op.attr('title') + '"';
+							if (op.attr('class') !== undefined) {
+								optionClass = ' ' + op.attr('class');
+								dataJqfsClass = ' data-jqfs-class="' + op.attr('class') + '"';
+							}
+
+							var data = op.data();
+							for (var k in data) {
+								if (data[k] !== '') dataList += ' data-' + k + '="' + data[k] + '"';
+							}
+
+							if ( (liClass + optionClass) !== '' )   liClasses = ' class="' + liClass + optionClass + '"';
+							li = '<li' + dataJqfsClass + dataList + liClasses + title + id + '>'+ op.html() +'</li>';
+
+							// если есть optgroup
+							if (op.parent().is('optgroup')) {
+								if (op.parent().attr('class') !== undefined) optgroupClass = ' ' + op.parent().attr('class');
+								li = '<li' + dataJqfsClass + dataList + ' class="' + liClass + optionClass + ' option' + optgroupClass + '"' + title + id + '>'+ op.html() +'</li>';
+								if (op.is(':first-child')) {
+									li = '<li class="optgroup' + optgroupClass + '">' + op.parent().attr('label') + '</li>' + li;
+								}
+							}
+
+							list += li;
+						}
+					} // end makeList()
+
+					// одиночный селект
+					function doSelect() {
+
+						var att = new Attributes();
+						var searchHTML = '';
+						var selectPlaceholder = el.data('placeholder');
+						var selectSearch = el.data('search');
+						var selectSearchLimit = el.data('search-limit');
+						var selectSearchNotFound = el.data('search-not-found');
+						var selectSearchPlaceholder = el.data('search-placeholder');
+						var selectSmartPositioning = el.data('smart-positioning');
+
+						if (selectPlaceholder === undefined) selectPlaceholder = opt.selectPlaceholder;
+						if (selectSearch === undefined || selectSearch === '') selectSearch = opt.selectSearch;
+						if (selectSearchLimit === undefined || selectSearchLimit === '') selectSearchLimit = opt.selectSearchLimit;
+						if (selectSearchNotFound === undefined || selectSearchNotFound === '') selectSearchNotFound = opt.selectSearchNotFound;
+						if (selectSearchPlaceholder === undefined) selectSearchPlaceholder = opt.selectSearchPlaceholder;
+						if (selectSmartPositioning === undefined || selectSmartPositioning === '') selectSmartPositioning = opt.selectSmartPositioning;
+
+						var selectbox =
+							$('<div class="jq-selectbox jqselect">' +
+									'<div class="jq-selectbox__select">' +
+										'<div class="jq-selectbox__select-text"></div>' +
+										'<div class="jq-selectbox__trigger">' +
+											'<div class="jq-selectbox__trigger-arrow"></div></div>' +
+									'</div>' +
+								'</div>')
+							.attr({
+								id: att.id,
+								title: att.title
+							})
+							.addClass(att.classes)
+							.data(att.data)
+						;
+
+						el.after(selectbox).prependTo(selectbox);
+
+						var selectzIndex = selectbox.css('z-index');
+						selectzIndex = (selectzIndex > 0 ) ? selectzIndex : 1;
+						var divSelect = $('div.jq-selectbox__select', selectbox);
+						var divText = $('div.jq-selectbox__select-text', selectbox);
+						var optionSelected = option.filter(':selected');
+
+						makeList();
+
+						if (selectSearch) searchHTML =
+							'<div class="jq-selectbox__search"><input type="search" autocomplete="off" placeholder="' + selectSearchPlaceholder + '"></div>' +
+							'<div class="jq-selectbox__not-found">' + selectSearchNotFound + '</div>';
+						var dropdown =
+							$('<div class="jq-selectbox__dropdown">' +
+									searchHTML + '<ul>' + list + '</ul>' +
+								'</div>');
+						selectbox.append(dropdown);
+						var ul = $('ul', dropdown);
+						var li = $('li', dropdown);
+						var search = $('input', dropdown);
+						var notFound = $('div.jq-selectbox__not-found', dropdown).hide();
+						if (li.length < selectSearchLimit) search.parent().hide();
+
+						// показываем опцию по умолчанию
+						// если у 1-й опции нет текста, она выбрана по умолчанию и параметр selectPlaceholder не false, то показываем плейсхолдер
+						if (option.first().text() === '' && option.first().is(':selected') && selectPlaceholder !== false) {
+							divText.text(selectPlaceholder).addClass('placeholder');
+						} else {
+							divText.text(optionSelected.text());
+						}
+
+						// определяем самый широкий пункт селекта
+						var liWidthInner = 0,
+								liWidth = 0;
+						li.css({'display': 'inline-block'});
+						li.each(function() {
+							var l = $(this);
+							if (l.innerWidth() > liWidthInner) {
+								liWidthInner = l.innerWidth();
+								liWidth = l.width();
+							}
+						});
+						li.css({'display': ''});
+
+						// подстраиваем ширину свернутого селекта в зависимости
+						// от ширины плейсхолдера или самого широкого пункта
+						if (divText.is('.placeholder') && (divText.width() > liWidthInner)) {
+							divText.width(divText.width());
+						} else {
+							var selClone = selectbox.clone().appendTo('body').width('auto');
+							var selCloneWidth = selClone.outerWidth();
+							selClone.remove();
+							if (selCloneWidth == selectbox.outerWidth()) {
+								divText.width(liWidth);
+							}
+						}
+
+						// подстраиваем ширину выпадающего списка в зависимости от самого широкого пункта
+						if (liWidthInner > selectbox.width()) dropdown.width(liWidthInner);
+
+						// прячем 1-ю пустую опцию, если она есть и если атрибут data-placeholder не пустой
+						// если все же нужно, чтобы первая пустая опция отображалась, то указываем у селекта: data-placeholder=""
+						if (option.first().text() === '' && el.data('placeholder') !== '') {
+							li.first().hide();
+						}
+
+						var selectHeight = selectbox.outerHeight(true);
+						var searchHeight = search.parent().outerHeight(true) || 0;
+						var isMaxHeight = ul.css('max-height');
+						var liSelected = li.filter('.selected');
+						if (liSelected.length < 1) li.first().addClass('selected sel');
+						if (li.data('li-height') === undefined) {
+							var liOuterHeight = li.outerHeight();
+							if (selectPlaceholder !== false) liOuterHeight = li.eq(1).outerHeight();
+							li.data('li-height', liOuterHeight);
+						}
+						var position = dropdown.css('top');
+						if (dropdown.css('left') == 'auto') dropdown.css({left: 0});
+						if (dropdown.css('top') == 'auto') {
+							dropdown.css({top: selectHeight});
+							position = selectHeight;
+						}
+						dropdown.hide();
+
+						// если выбран не дефолтный пункт
+						if (liSelected.length) {
+							// добавляем класс, показывающий изменение селекта
+							if (option.first().text() != optionSelected.text()) {
+								selectbox.addClass('changed');
+							}
+							// передаем селекту класс выбранного пункта
+							selectbox.data('jqfs-class', liSelected.data('jqfs-class'));
+							selectbox.addClass(liSelected.data('jqfs-class'));
+						}
+
+						// если селект неактивный
+						if (el.is(':disabled')) {
+							selectbox.addClass('disabled');
+							return false;
+						}
+
+						// при клике на псевдоселекте
+						divSelect.click(function() {
+
+							// колбек при закрытии селекта
+							if ($('div.jq-selectbox').filter('.opened').length) {
+								opt.onSelectClosed.call($('div.jq-selectbox').filter('.opened'));
+							}
+
+							el.focus();
+
+							// если iOS, то не показываем выпадающий список,
+							// т.к. отображается нативный и неизвестно, как его спрятать
+							if (iOS) return;
+
+							// умное позиционирование
+							var win = $(window);
+							var liHeight = li.data('li-height');
+							var topOffset = selectbox.offset().top;
+							var bottomOffset = win.height() - selectHeight - (topOffset - win.scrollTop());
+							var visible = el.data('visible-options');
+							if (visible === undefined || visible === '') visible = opt.selectVisibleOptions;
+							var minHeight = liHeight * 5;
+							var newHeight = liHeight * visible;
+							if (visible > 0 && visible < 6) minHeight = newHeight;
+							if (visible === 0) newHeight = 'auto';
+
+							var dropDown = function() {
+								dropdown.height('auto').css({bottom: 'auto', top: position});
+								var maxHeightBottom = function() {
+									ul.css('max-height', Math.floor((bottomOffset - 20 - searchHeight) / liHeight) * liHeight);
+								};
+								maxHeightBottom();
+								ul.css('max-height', newHeight);
+								if (isMaxHeight != 'none') {
+									ul.css('max-height', isMaxHeight);
+								}
+								if (bottomOffset < (dropdown.outerHeight() + 20)) {
+									maxHeightBottom();
+								}
+							};
+
+							var dropUp = function() {
+								dropdown.height('auto').css({top: 'auto', bottom: position});
+								var maxHeightTop = function() {
+									ul.css('max-height', Math.floor((topOffset - win.scrollTop() - 20 - searchHeight) / liHeight) * liHeight);
+								};
+								maxHeightTop();
+								ul.css('max-height', newHeight);
+								if (isMaxHeight != 'none') {
+									ul.css('max-height', isMaxHeight);
+								}
+								if ((topOffset - win.scrollTop() - 20) < (dropdown.outerHeight() + 20)) {
+									maxHeightTop();
+								}
+							};
+
+							if (selectSmartPositioning === true || selectSmartPositioning === 1) {
+								// раскрытие вниз
+								if (bottomOffset > (minHeight + searchHeight + 20)) {
+									dropDown();
+									selectbox.removeClass('dropup').addClass('dropdown');
+								// раскрытие вверх
+								} else {
+									dropUp();
+									selectbox.removeClass('dropdown').addClass('dropup');
+								}
+							} else if (selectSmartPositioning === false || selectSmartPositioning === 0) {
+								// раскрытие вниз
+								if (bottomOffset > (minHeight + searchHeight + 20)) {
+									dropDown();
+									selectbox.removeClass('dropup').addClass('dropdown');
+								}
+							} else {
+								// если умное позиционирование отключено
+								dropdown.height('auto').css({bottom: 'auto', top: position});
+								ul.css('max-height', newHeight);
+								if (isMaxHeight != 'none') {
+									ul.css('max-height', isMaxHeight);
+								}
+							}
+
+							// если выпадающий список выходит за правый край окна браузера,
+							// то меняем позиционирование с левого на правое
+							if (selectbox.offset().left + dropdown.outerWidth() > win.width()) {
+								dropdown.css({left: 'auto', right: 0});
+							}
+							// конец умного позиционирования
+
+							$('div.jqselect').css({zIndex: (selectzIndex - 1)}).removeClass('opened');
+							selectbox.css({zIndex: selectzIndex});
+							if (dropdown.is(':hidden')) {
+								$('div.jq-selectbox__dropdown:visible').hide();
+								dropdown.show();
+								selectbox.addClass('opened focused');
+								// колбек при открытии селекта
+								opt.onSelectOpened.call(selectbox);
+							} else {
+								dropdown.hide();
+								selectbox.removeClass('opened dropup dropdown');
+								// колбек при закрытии селекта
+								if ($('div.jq-selectbox').filter('.opened').length) {
+									opt.onSelectClosed.call(selectbox);
+								}
+							}
+
+							// поисковое поле
+							if (search.length) {
+								search.val('').keyup();
+								notFound.hide();
+								search.keyup(function() {
+									var query = $(this).val();
+									li.each(function() {
+										if (!$(this).html().match(new RegExp('.*?' + query + '.*?', 'i'))) {
+											$(this).hide();
+										} else {
+											$(this).show();
+										}
+									});
+									// прячем 1-ю пустую опцию
+									if (option.first().text() === '' && el.data('placeholder') !== '') {
+										li.first().hide();
+									}
+									if (li.filter(':visible').length < 1) {
+										notFound.show();
+									} else {
+										notFound.hide();
+									}
+								});
+							}
+
+							// прокручиваем до выбранного пункта при открытии списка
+							if (li.filter('.selected').length) {
+								if (el.val() === '') {
+									ul.scrollTop(0);
+								} else {
+									// если нечетное количество видимых пунктов,
+									// то высоту пункта делим пополам для последующего расчета
+									if ( (ul.innerHeight() / liHeight) % 2 !== 0 ) liHeight = liHeight / 2;
+									ul.scrollTop(ul.scrollTop() + li.filter('.selected').position().top - ul.innerHeight() / 2 + liHeight);
+								}
+							}
+
+							preventScrolling(ul);
+
+						}); // end divSelect.click()
+
+						// при наведении курсора на пункт списка
+						li.hover(function() {
+							$(this).siblings().removeClass('selected');
+						});
+						var selectedText = li.filter('.selected').text();
+
+						// при клике на пункт списка
+						li.filter(':not(.disabled):not(.optgroup)').click(function() {
+							el.focus();
+							var t = $(this);
+							var liText = t.text();
+							if (!t.is('.selected')) {
+								var index = t.index();
+								index -= t.prevAll('.optgroup').length;
+								t.addClass('selected sel').siblings().removeClass('selected sel');
+								option.prop('selected', false).eq(index).prop('selected', true);
+								selectedText = liText;
+								divText.text(liText);
+
+								// передаем селекту класс выбранного пункта
+								if (selectbox.data('jqfs-class')) selectbox.removeClass(selectbox.data('jqfs-class'));
+								selectbox.data('jqfs-class', t.data('jqfs-class'));
+								selectbox.addClass(t.data('jqfs-class'));
+
+								el.change();
+							}
+							dropdown.hide();
+							selectbox.removeClass('opened dropup dropdown');
+							// колбек при закрытии селекта
+							opt.onSelectClosed.call(selectbox);
+
+						});
+						dropdown.mouseout(function() {
+							$('li.sel', dropdown).addClass('selected');
+						});
+
+						// изменение селекта
+						el.on('change.styler', function() {
+							divText.text(option.filter(':selected').text()).removeClass('placeholder');
+							li.removeClass('selected sel').not('.optgroup').eq(el[0].selectedIndex).addClass('selected sel');
+							// добавляем класс, показывающий изменение селекта
+							if (option.first().text() != li.filter('.selected').text()) {
+								selectbox.addClass('changed');
+							} else {
+								selectbox.removeClass('changed');
+							}
+						})
+						.on('focus.styler', function() {
+							selectbox.addClass('focused');
+							$('div.jqselect').not('.focused').removeClass('opened dropup dropdown').find('div.jq-selectbox__dropdown').hide();
+						})
+						.on('blur.styler', function() {
+							selectbox.removeClass('focused');
+						})
+						// изменение селекта с клавиатуры
+						.on('keydown.styler keyup.styler', function(e) {
+							var liHeight = li.data('li-height');
+							if (el.val() === '') {
+								divText.text(selectPlaceholder).addClass('placeholder');
+							} else {
+								divText.text(option.filter(':selected').text());
+							}
+							li.removeClass('selected sel').not('.optgroup').eq(el[0].selectedIndex).addClass('selected sel');
+							// вверх, влево, Page Up, Home
+							if (e.which == 38 || e.which == 37 || e.which == 33 || e.which == 36) {
+								if (el.val() === '') {
+									ul.scrollTop(0);
+								} else {
+									ul.scrollTop(ul.scrollTop() + li.filter('.selected').position().top);
+								}
+							}
+							// вниз, вправо, Page Down, End
+							if (e.which == 40 || e.which == 39 || e.which == 34 || e.which == 35) {
+								ul.scrollTop(ul.scrollTop() + li.filter('.selected').position().top - ul.innerHeight() + liHeight);
+							}
+							// закрываем выпадающий список при нажатии Enter
+							if (e.which == 13) {
+								e.preventDefault();
+								dropdown.hide();
+								selectbox.removeClass('opened dropup dropdown');
+								// колбек при закрытии селекта
+								opt.onSelectClosed.call(selectbox);
+							}
+						}).on('keydown.styler', function(e) {
+							// открываем выпадающий список при нажатии Space
+							if (e.which == 32) {
+								e.preventDefault();
+								divSelect.click();
+							}
+						});
+
+						// прячем выпадающий список при клике за пределами селекта
+						if (!onDocumentClick.registered) {
+							$(document).on('click', onDocumentClick);
+							onDocumentClick.registered = true;
+						}
+
+					} // end doSelect()
+
+					// мультиселект
+					function doMultipleSelect() {
+
+						var att = new Attributes();
+						var selectbox =
+							$('<div class="jq-select-multiple jqselect"></div>')
+							.attr({
+								id: att.id,
+								title: att.title
+							})
+							.addClass(att.classes)
+							.data(att.data)
+						;
+
+						el.after(selectbox);
+
+						makeList();
+						selectbox.append('<ul>' + list + '</ul>');
+						var ul = $('ul', selectbox);
+						var li = $('li', selectbox);
+						var size = el.attr('size');
+						var ulHeight = ul.outerHeight();
+						var liHeight = li.outerHeight();
+						if (size !== undefined && size > 0) {
+							ul.css({'height': liHeight * size});
+						} else {
+							ul.css({'height': liHeight * 4});
+						}
+						if (ulHeight > selectbox.height()) {
+							ul.css('overflowY', 'scroll');
+							preventScrolling(ul);
+							// прокручиваем до выбранного пункта
+							if (li.filter('.selected').length) {
+								ul.scrollTop(ul.scrollTop() + li.filter('.selected').position().top);
+							}
+						}
+
+						// прячем оригинальный селект
+						el.prependTo(selectbox);
+
+						// если селект неактивный
+						if (el.is(':disabled')) {
+							selectbox.addClass('disabled');
+							option.each(function() {
+								if ($(this).is(':selected')) li.eq($(this).index()).addClass('selected');
+							});
+
+						// если селект активный
+						} else {
+
+							// при клике на пункт списка
+							li.filter(':not(.disabled):not(.optgroup)').click(function(e) {
+								el.focus();
+								var clkd = $(this);
+								if(!e.ctrlKey && !e.metaKey) clkd.addClass('selected');
+								if(!e.shiftKey) clkd.addClass('first');
+								if(!e.ctrlKey && !e.metaKey && !e.shiftKey) clkd.siblings().removeClass('selected first');
+
+								// выделение пунктов при зажатом Ctrl
+								if(e.ctrlKey || e.metaKey) {
+									if (clkd.is('.selected')) clkd.removeClass('selected first');
+										else clkd.addClass('selected first');
+									clkd.siblings().removeClass('first');
+								}
+
+								// выделение пунктов при зажатом Shift
+								if(e.shiftKey) {
+									var prev = false,
+											next = false;
+									clkd.siblings().removeClass('selected').siblings('.first').addClass('selected');
+									clkd.prevAll().each(function() {
+										if ($(this).is('.first')) prev = true;
+									});
+									clkd.nextAll().each(function() {
+										if ($(this).is('.first')) next = true;
+									});
+									if (prev) {
+										clkd.prevAll().each(function() {
+											if ($(this).is('.selected')) return false;
+												else $(this).not('.disabled, .optgroup').addClass('selected');
+										});
+									}
+									if (next) {
+										clkd.nextAll().each(function() {
+											if ($(this).is('.selected')) return false;
+												else $(this).not('.disabled, .optgroup').addClass('selected');
+										});
+									}
+									if (li.filter('.selected').length == 1) clkd.addClass('first');
+								}
+
+								// отмечаем выбранные мышью
+								option.prop('selected', false);
+								li.filter('.selected').each(function() {
+									var t = $(this);
+									var index = t.index();
+									if (t.is('.option')) index -= t.prevAll('.optgroup').length;
+									option.eq(index).prop('selected', true);
+								});
+								el.change();
+
+							});
+
+							// отмечаем выбранные с клавиатуры
+							option.each(function(i) {
+								$(this).data('optionIndex', i);
+							});
+							el.on('change.styler', function() {
+								li.removeClass('selected');
+								var arrIndexes = [];
+								option.filter(':selected').each(function() {
+									arrIndexes.push($(this).data('optionIndex'));
+								});
+								li.not('.optgroup').filter(function(i) {
+									return $.inArray(i, arrIndexes) > -1;
+								}).addClass('selected');
+							})
+							.on('focus.styler', function() {
+								selectbox.addClass('focused');
+							})
+							.on('blur.styler', function() {
+								selectbox.removeClass('focused');
+							});
+
+							// прокручиваем с клавиатуры
+							if (ulHeight > selectbox.height()) {
+								el.on('keydown.styler', function(e) {
+									// вверх, влево, PageUp
+									if (e.which == 38 || e.which == 37 || e.which == 33) {
+										ul.scrollTop(ul.scrollTop() + li.filter('.selected').position().top - liHeight);
+									}
+									// вниз, вправо, PageDown
+									if (e.which == 40 || e.which == 39 || e.which == 34) {
+										ul.scrollTop(ul.scrollTop() + li.filter('.selected:last').position().top - ul.innerHeight() + liHeight * 2);
+									}
+								});
+							}
+
+						}
+					} // end doMultipleSelect()
+
+					if (el.is('[multiple]')) {
+
+						// если Android или iOS, то мультиселект не стилизуем
+						// причина для Android - в стилизованном селекте нет возможности выбрать несколько пунктов
+						// причина для iOS - в стилизованном селекте неправильно отображаются выбранные пункты
+						if (Android || iOS) return;
+
+						doMultipleSelect();
+					} else {
+						doSelect();
+					}
+
+				}; // end selectboxOutput()
+
+				selectboxOutput();
+
+				// обновление при динамическом изменении
+				el.on('refresh', function() {
+					el.off('.styler').parent().before(el).remove();
+					selectboxOutput();
+				});
+
+			// end select
+
+			// reset
+			} else if (el.is(':reset')) {
+				el.on('click', function() {
+					setTimeout(function() {
+						el.closest('form').find('input, select').trigger('refresh');
+					}, 1);
+				});
+			} // end reset
+
+		}, // init: function()
+
+		// деструктор
+		destroy: function() {
+
+			var el = $(this.element);
+
+			if (el.is(':checkbox') || el.is(':radio')) {
+				el.removeData('_' + pluginName).off('.styler refresh').removeAttr('style').parent().before(el).remove();
+				el.closest('label').add('label[for="' + el.attr('id') + '"]').off('.styler');
+			} else if (el.is('input[type="number"]')) {
+				el.removeData('_' + pluginName).off('.styler refresh').closest('.jq-number').before(el).remove();
+			} else if (el.is(':file') || el.is('select')) {
+				el.removeData('_' + pluginName).off('.styler refresh').removeAttr('style').parent().before(el).remove();
+			}
+
+		} // destroy: function()
+
+	}; // Plugin.prototype
+
+	$.fn[pluginName] = function(options) {
+		var args = arguments;
+		if (options === undefined || typeof options === 'object') {
+			this.each(function() {
+				if (!$.data(this, '_' + pluginName)) {
+					$.data(this, '_' + pluginName, new Plugin(this, options));
+				}
+			})
+			// колбек после выполнения плагина
+			.promise()
+			.done(function() {
+				var opt = $(this[0]).data('_' + pluginName);
+				if (opt) opt.options.onFormStyled.call();
+			});
+			return this;
+		} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
+			var returns;
+			this.each(function() {
+				var instance = $.data(this, '_' + pluginName);
+				if (instance instanceof Plugin && typeof instance[options] === 'function') {
+					returns = instance[options].apply(instance, Array.prototype.slice.call(args, 1));
+				}
+			});
+			return returns !== undefined ? returns : this;
+		}
+	};
+
+	// прячем выпадающий список при клике за пределами селекта
+	function onDocumentClick(e) {
+		// e.target.nodeName != 'OPTION' - добавлено для обхода бага в Opera на движке Presto
+		// (при изменении селекта с клавиатуры срабатывает событие onclick)
+		if (!$(e.target).parents().hasClass('jq-selectbox') && e.target.nodeName != 'OPTION') {
+			if ($('div.jq-selectbox.opened').length) {
+				var selectbox = $('div.jq-selectbox.opened'),
+						search = $('div.jq-selectbox__search input', selectbox),
+						dropdown = $('div.jq-selectbox__dropdown', selectbox),
+						opt = selectbox.find('select').data('_' + pluginName).options;
+
+				// колбек при закрытии селекта
+				opt.onSelectClosed.call(selectbox);
+
+				if (search.length) search.val('').keyup();
+				dropdown.hide().find('li.sel').addClass('selected');
+				selectbox.removeClass('focused opened dropup dropdown');
+			}
+		}
+	}
+	onDocumentClick.registered = false;
+
+}));

+ 10991 - 0
app/assets/scripts/jquery.js

@@ -0,0 +1,10991 @@
+/*!
+ * jQuery JavaScript Library v1.12.4
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2016-05-20T17:17Z
+ */
+
+(function (global, factory) {
+
+    if (typeof module === "object" && typeof module.exports === "object") {
+        // For CommonJS and CommonJS-like environments where a proper `window`
+        // is present, execute the factory and get jQuery.
+        // For environments that do not have a `window` with a `document`
+        // (such as Node.js), expose a factory as module.exports.
+        // This accentuates the need for the creation of a real `window`.
+        // e.g. var jQuery = require("jquery")(window);
+        // See ticket #14549 for more info.
+        module.exports = global.document ?
+            factory(global, true) :
+            function (w) {
+                if (!w.document) {
+                    throw new Error("jQuery requires a window with a document");
+                }
+                return factory(w);
+            };
+    } else {
+        factory(global);
+    }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function (window, noGlobal) {
+
+// Support: Firefox 18+
+// Can't be in strict mode, several libs including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+//"use strict";
+    var deletedIds = [];
+
+    var document = window.document;
+
+    var slice = deletedIds.slice;
+
+    var concat = deletedIds.concat;
+
+    var push = deletedIds.push;
+
+    var indexOf = deletedIds.indexOf;
+
+    var class2type = {};
+
+    var toString = class2type.toString;
+
+    var hasOwn = class2type.hasOwnProperty;
+
+    var support = {};
+
+
+    var
+        version = "1.12.4",
+
+        // Define a local copy of jQuery
+        jQuery = function (selector, context) {
+
+            // The jQuery object is actually just the init constructor 'enhanced'
+            // Need init if jQuery is called (just allow error to be thrown if not included)
+            return new jQuery.fn.init(selector, context);
+        },
+
+        // Support: Android<4.1, IE<9
+        // Make sure we trim BOM and NBSP
+        rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+        // Matches dashed string for camelizing
+        rmsPrefix = /^-ms-/,
+        rdashAlpha = /-([\da-z])/gi,
+
+        // Used by jQuery.camelCase as callback to replace()
+        fcamelCase = function (all, letter) {
+            return letter.toUpperCase();
+        };
+
+    jQuery.fn = jQuery.prototype = {
+
+        // The current version of jQuery being used
+        jquery: version,
+
+        constructor: jQuery,
+
+        // Start with an empty selector
+        selector: "",
+
+        // The default length of a jQuery object is 0
+        length: 0,
+
+        toArray: function () {
+            return slice.call(this);
+        },
+
+        // Get the Nth element in the matched element set OR
+        // Get the whole matched element set as a clean array
+        get: function (num) {
+            return num != null ?
+
+                // Return just the one element from the set
+                ( num < 0 ? this[num + this.length] : this[num] ) :
+
+                // Return all the elements in a clean array
+                slice.call(this);
+        },
+
+        // Take an array of elements and push it onto the stack
+        // (returning the new matched element set)
+        pushStack: function (elems) {
+
+            // Build a new jQuery matched element set
+            var ret = jQuery.merge(this.constructor(), elems);
+
+            // Add the old object onto the stack (as a reference)
+            ret.prevObject = this;
+            ret.context = this.context;
+
+            // Return the newly-formed element set
+            return ret;
+        },
+
+        // Execute a callback for every element in the matched set.
+        each: function (callback) {
+            return jQuery.each(this, callback);
+        },
+
+        map: function (callback) {
+            return this.pushStack(jQuery.map(this, function (elem, i) {
+                return callback.call(elem, i, elem);
+            }));
+        },
+
+        slice: function () {
+            return this.pushStack(slice.apply(this, arguments));
+        },
+
+        first: function () {
+            return this.eq(0);
+        },
+
+        last: function () {
+            return this.eq(-1);
+        },
+
+        eq: function (i) {
+            var len = this.length,
+                j = +i + ( i < 0 ? len : 0 );
+            return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
+        },
+
+        end: function () {
+            return this.prevObject || this.constructor();
+        },
+
+        // For internal use only.
+        // Behaves like an Array's method, not like a jQuery method.
+        push: push,
+        sort: deletedIds.sort,
+        splice: deletedIds.splice
+    };
+
+    jQuery.extend = jQuery.fn.extend = function () {
+        var src, copyIsArray, copy, name, options, clone,
+            target = arguments[0] || {},
+            i = 1,
+            length = arguments.length,
+            deep = false;
+
+        // Handle a deep copy situation
+        if (typeof target === "boolean") {
+            deep = target;
+
+            // skip the boolean and the target
+            target = arguments[i] || {};
+            i++;
+        }
+
+        // Handle case when target is a string or something (possible in deep copy)
+        if (typeof target !== "object" && !jQuery.isFunction(target)) {
+            target = {};
+        }
+
+        // extend jQuery itself if only one argument is passed
+        if (i === length) {
+            target = this;
+            i--;
+        }
+
+        for (; i < length; i++) {
+
+            // Only deal with non-null/undefined values
+            if (( options = arguments[i] ) != null) {
+
+                // Extend the base object
+                for (name in options) {
+                    src = target[name];
+                    copy = options[name];
+
+                    // Prevent never-ending loop
+                    if (target === copy) {
+                        continue;
+                    }
+
+                    // Recurse if we're merging plain objects or arrays
+                    if (deep && copy && ( jQuery.isPlainObject(copy) ||
+                        ( copyIsArray = jQuery.isArray(copy) ) )) {
+
+                        if (copyIsArray) {
+                            copyIsArray = false;
+                            clone = src && jQuery.isArray(src) ? src : [];
+
+                        } else {
+                            clone = src && jQuery.isPlainObject(src) ? src : {};
+                        }
+
+                        // Never move original objects, clone them
+                        target[name] = jQuery.extend(deep, clone, copy);
+
+                        // Don't bring in undefined values
+                    } else if (copy !== undefined) {
+                        target[name] = copy;
+                    }
+                }
+            }
+        }
+
+        // Return the modified object
+        return target;
+    };
+
+    jQuery.extend({
+
+        // Unique for each copy of jQuery on the page
+        expando: "jQuery" + ( version + Math.random() ).replace(/\D/g, ""),
+
+        // Assume jQuery is ready without the ready module
+        isReady: true,
+
+        error: function (msg) {
+            throw new Error(msg);
+        },
+
+        noop: function () {
+        },
+
+        // See test/unit/core.js for details concerning isFunction.
+        // Since version 1.3, DOM methods and functions like alert
+        // aren't supported. They return false on IE (#2968).
+        isFunction: function (obj) {
+            return jQuery.type(obj) === "function";
+        },
+
+        isArray: Array.isArray || function (obj) {
+            return jQuery.type(obj) === "array";
+        },
+
+        isWindow: function (obj) {
+            /* jshint eqeqeq: false */
+            return obj != null && obj == obj.window;
+        },
+
+        isNumeric: function (obj) {
+
+            // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+            // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+            // subtraction forces infinities to NaN
+            // adding 1 corrects loss of precision from parseFloat (#15100)
+            var realStringObj = obj && obj.toString();
+            return !jQuery.isArray(obj) && ( realStringObj - parseFloat(realStringObj) + 1 ) >= 0;
+        },
+
+        isEmptyObject: function (obj) {
+            var name;
+            for (name in obj) {
+                return false;
+            }
+            return true;
+        },
+
+        isPlainObject: function (obj) {
+            var key;
+
+            // Must be an Object.
+            // Because of IE, we also have to check the presence of the constructor property.
+            // Make sure that DOM nodes and window objects don't pass through, as well
+            if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
+                return false;
+            }
+
+            try {
+
+                // Not own constructor property must be Object
+                if (obj.constructor &&
+                    !hasOwn.call(obj, "constructor") &&
+                    !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
+                    return false;
+                }
+            } catch (e) {
+
+                // IE8,9 Will throw exceptions on certain host objects #9897
+                return false;
+            }
+
+            // Support: IE<9
+            // Handle iteration over inherited properties before own properties.
+            if (!support.ownFirst) {
+                for (key in obj) {
+                    return hasOwn.call(obj, key);
+                }
+            }
+
+            // Own properties are enumerated firstly, so to speed up,
+            // if last one is own, then all properties are own.
+            for (key in obj) {
+            }
+
+            return key === undefined || hasOwn.call(obj, key);
+        },
+
+        type: function (obj) {
+            if (obj == null) {
+                return obj + "";
+            }
+            return typeof obj === "object" || typeof obj === "function" ?
+                class2type[toString.call(obj)] || "object" :
+                typeof obj;
+        },
+
+        // Workarounds based on findings by Jim Driscoll
+        // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+        globalEval: function (data) {
+            if (data && jQuery.trim(data)) {
+
+                // We use execScript on Internet Explorer
+                // We use an anonymous function so that context is window
+                // rather than jQuery in Firefox
+                ( window.execScript || function (data) {
+                    window["eval"].call(window, data); // jscs:ignore requireDotNotation
+                } )(data);
+            }
+        },
+
+        // Convert dashed to camelCase; used by the css and data modules
+        // Microsoft forgot to hump their vendor prefix (#9572)
+        camelCase: function (string) {
+            return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
+        },
+
+        nodeName: function (elem, name) {
+            return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+        },
+
+        each: function (obj, callback) {
+            var length, i = 0;
+
+            if (isArrayLike(obj)) {
+                length = obj.length;
+                for (; i < length; i++) {
+                    if (callback.call(obj[i], i, obj[i]) === false) {
+                        break;
+                    }
+                }
+            } else {
+                for (i in obj) {
+                    if (callback.call(obj[i], i, obj[i]) === false) {
+                        break;
+                    }
+                }
+            }
+
+            return obj;
+        },
+
+        // Support: Android<4.1, IE<9
+        trim: function (text) {
+            return text == null ?
+                "" :
+                ( text + "" ).replace(rtrim, "");
+        },
+
+        // results is for internal usage only
+        makeArray: function (arr, results) {
+            var ret = results || [];
+
+            if (arr != null) {
+                if (isArrayLike(Object(arr))) {
+                    jQuery.merge(ret,
+                        typeof arr === "string" ?
+                            [arr] : arr
+                    );
+                } else {
+                    push.call(ret, arr);
+                }
+            }
+
+            return ret;
+        },
+
+        inArray: function (elem, arr, i) {
+            var len;
+
+            if (arr) {
+                if (indexOf) {
+                    return indexOf.call(arr, elem, i);
+                }
+
+                len = arr.length;
+                i = i ? i < 0 ? Math.max(0, len + i) : i : 0;
+
+                for (; i < len; i++) {
+
+                    // Skip accessing in sparse arrays
+                    if (i in arr && arr[i] === elem) {
+                        return i;
+                    }
+                }
+            }
+
+            return -1;
+        },
+
+        merge: function (first, second) {
+            var len = +second.length,
+                j = 0,
+                i = first.length;
+
+            while (j < len) {
+                first[i++] = second[j++];
+            }
+
+            // Support: IE<9
+            // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
+            if (len !== len) {
+                while (second[j] !== undefined) {
+                    first[i++] = second[j++];
+                }
+            }
+
+            first.length = i;
+
+            return first;
+        },
+
+        grep: function (elems, callback, invert) {
+            var callbackInverse,
+                matches = [],
+                i = 0,
+                length = elems.length,
+                callbackExpect = !invert;
+
+            // Go through the array, only saving the items
+            // that pass the validator function
+            for (; i < length; i++) {
+                callbackInverse = !callback(elems[i], i);
+                if (callbackInverse !== callbackExpect) {
+                    matches.push(elems[i]);
+                }
+            }
+
+            return matches;
+        },
+
+        // arg is for internal usage only
+        map: function (elems, callback, arg) {
+            var length, value,
+                i = 0,
+                ret = [];
+
+            // Go through the array, translating each of the items to their new values
+            if (isArrayLike(elems)) {
+                length = elems.length;
+                for (; i < length; i++) {
+                    value = callback(elems[i], i, arg);
+
+                    if (value != null) {
+                        ret.push(value);
+                    }
+                }
+
+                // Go through every key on the object,
+            } else {
+                for (i in elems) {
+                    value = callback(elems[i], i, arg);
+
+                    if (value != null) {
+                        ret.push(value);
+                    }
+                }
+            }
+
+            // Flatten any nested arrays
+            return concat.apply([], ret);
+        },
+
+        // A global GUID counter for objects
+        guid: 1,
+
+        // Bind a function to a context, optionally partially applying any
+        // arguments.
+        proxy: function (fn, context) {
+            var args, proxy, tmp;
+
+            if (typeof context === "string") {
+                tmp = fn[context];
+                context = fn;
+                fn = tmp;
+            }
+
+            // Quick check to determine if target is callable, in the spec
+            // this throws a TypeError, but we will just return undefined.
+            if (!jQuery.isFunction(fn)) {
+                return undefined;
+            }
+
+            // Simulated bind
+            args = slice.call(arguments, 2);
+            proxy = function () {
+                return fn.apply(context || this, args.concat(slice.call(arguments)));
+            };
+
+            // Set the guid of unique handler to the same of original handler, so it can be removed
+            proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+            return proxy;
+        },
+
+        now: function () {
+            return +( new Date() );
+        },
+
+        // jQuery.support is not used in Core but other projects attach their
+        // properties to it so it needs to exist.
+        support: support
+    });
+
+// JSHint would error on this code due to the Symbol not being defined in ES5.
+// Defining this global in .jshintrc would create a danger of using the global
+// unguarded in another place, it seems safer to just disable JSHint for these
+// three lines.
+    /* jshint ignore: start */
+    if (typeof Symbol === "function") {
+        jQuery.fn[Symbol.iterator] = deletedIds[Symbol.iterator];
+    }
+    /* jshint ignore: end */
+
+// Populate the class2type map
+    jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
+        function (i, name) {
+            class2type["[object " + name + "]"] = name.toLowerCase();
+        });
+
+    function isArrayLike(obj) {
+
+        // Support: iOS 8.2 (not reproducible in simulator)
+        // `in` check used to prevent JIT error (gh-2145)
+        // hasOwn isn't used here due to false negatives
+        // regarding Nodelist length in IE
+        var length = !!obj && "length" in obj && obj.length,
+            type = jQuery.type(obj);
+
+        if (type === "function" || jQuery.isWindow(obj)) {
+            return false;
+        }
+
+        return type === "array" || length === 0 ||
+            typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+    }
+
+    var Sizzle =
+        /*!
+         * Sizzle CSS Selector Engine v2.2.1
+         * http://sizzlejs.com/
+         *
+         * Copyright jQuery Foundation and other contributors
+         * Released under the MIT license
+         * http://jquery.org/license
+         *
+         * Date: 2015-10-17
+         */
+        (function (window) {
+
+            var i,
+                support,
+                Expr,
+                getText,
+                isXML,
+                tokenize,
+                compile,
+                select,
+                outermostContext,
+                sortInput,
+                hasDuplicate,
+
+                // Local document vars
+                setDocument,
+                document,
+                docElem,
+                documentIsHTML,
+                rbuggyQSA,
+                rbuggyMatches,
+                matches,
+                contains,
+
+                // Instance-specific data
+                expando = "sizzle" + 1 * new Date(),
+                preferredDoc = window.document,
+                dirruns = 0,
+                done = 0,
+                classCache = createCache(),
+                tokenCache = createCache(),
+                compilerCache = createCache(),
+                sortOrder = function (a, b) {
+                    if (a === b) {
+                        hasDuplicate = true;
+                    }
+                    return 0;
+                },
+
+                // General-purpose constants
+                MAX_NEGATIVE = 1 << 31,
+
+                // Instance methods
+                hasOwn = ({}).hasOwnProperty,
+                arr = [],
+                pop = arr.pop,
+                push_native = arr.push,
+                push = arr.push,
+                slice = arr.slice,
+                // Use a stripped-down indexOf as it's faster than native
+                // http://jsperf.com/thor-indexof-vs-for/5
+                indexOf = function (list, elem) {
+                    var i = 0,
+                        len = list.length;
+                    for (; i < len; i++) {
+                        if (list[i] === elem) {
+                            return i;
+                        }
+                    }
+                    return -1;
+                },
+
+                booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+                // Regular expressions
+
+                // http://www.w3.org/TR/css3-selectors/#whitespace
+                whitespace = "[\\x20\\t\\r\\n\\f]",
+
+                // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+                identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+                // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+                attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
+                    // Operator (capture 2)
+                    "*([*^$|!~]?=)" + whitespace +
+                    // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+                    "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+                    "*\\]",
+
+                pseudos = ":(" + identifier + ")(?:\\((" +
+                    // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+                    // 1. quoted (capture 3; capture 4 or capture 5)
+                    "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+                    // 2. simple (capture 6)
+                    "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+                    // 3. anything else (capture 2)
+                    ".*" +
+                    ")\\)|)",
+
+                // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+                rwhitespace = new RegExp(whitespace + "+", "g"),
+                rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
+
+                rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
+                rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
+
+                rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"),
+
+                rpseudo = new RegExp(pseudos),
+                ridentifier = new RegExp("^" + identifier + "$"),
+
+                matchExpr = {
+                    "ID": new RegExp("^#(" + identifier + ")"),
+                    "CLASS": new RegExp("^\\.(" + identifier + ")"),
+                    "TAG": new RegExp("^(" + identifier + "|[*])"),
+                    "ATTR": new RegExp("^" + attributes),
+                    "PSEUDO": new RegExp("^" + pseudos),
+                    "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+                        "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+                        "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
+                    "bool": new RegExp("^(?:" + booleans + ")$", "i"),
+                    // For use in libraries implementing .is()
+                    // We use this for POS matching in `select`
+                    "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+                        whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
+                },
+
+                rinputs = /^(?:input|select|textarea|button)$/i,
+                rheader = /^h\d$/i,
+
+                rnative = /^[^{]+\{\s*\[native \w/,
+
+                // Easily-parseable/retrievable ID or TAG or CLASS selectors
+                rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+                rsibling = /[+~]/,
+                rescape = /'|\\/g,
+
+                // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+                runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"),
+                funescape = function (_, escaped, escapedWhitespace) {
+                    var high = "0x" + escaped - 0x10000;
+                    // NaN means non-codepoint
+                    // Support: Firefox<24
+                    // Workaround erroneous numeric interpretation of +"0x"
+                    return high !== high || escapedWhitespace ?
+                        escaped :
+                        high < 0 ?
+                            // BMP codepoint
+                            String.fromCharCode(high + 0x10000) :
+                            // Supplemental Plane codepoint (surrogate pair)
+                            String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
+                },
+
+                // Used for iframes
+                // See setDocument()
+                // Removing the function wrapper causes a "Permission Denied"
+                // error in IE
+                unloadHandler = function () {
+                    setDocument();
+                };
+
+// Optimize for push.apply( _, NodeList )
+            try {
+                push.apply(
+                    (arr = slice.call(preferredDoc.childNodes)),
+                    preferredDoc.childNodes
+                );
+                // Support: Android<4.0
+                // Detect silently failing push.apply
+                arr[preferredDoc.childNodes.length].nodeType;
+            } catch (e) {
+                push = {
+                    apply: arr.length ?
+
+                        // Leverage slice if possible
+                        function (target, els) {
+                            push_native.apply(target, slice.call(els));
+                        } :
+
+                        // Support: IE<9
+                        // Otherwise append directly
+                        function (target, els) {
+                            var j = target.length,
+                                i = 0;
+                            // Can't trust NodeList.length
+                            while ((target[j++] = els[i++])) {
+                            }
+                            target.length = j - 1;
+                        }
+                };
+            }
+
+            function Sizzle(selector, context, results, seed) {
+                var m, i, elem, nid, nidselect, match, groups, newSelector,
+                    newContext = context && context.ownerDocument,
+
+                    // nodeType defaults to 9, since context defaults to document
+                    nodeType = context ? context.nodeType : 9;
+
+                results = results || [];
+
+                // Return early from calls with invalid selector or context
+                if (typeof selector !== "string" || !selector ||
+                    nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
+
+                    return results;
+                }
+
+                // Try to shortcut find operations (as opposed to filters) in HTML documents
+                if (!seed) {
+
+                    if (( context ? context.ownerDocument || context : preferredDoc ) !== document) {
+                        setDocument(context);
+                    }
+                    context = context || document;
+
+                    if (documentIsHTML) {
+
+                        // If the selector is sufficiently simple, try using a "get*By*" DOM method
+                        // (excepting DocumentFragment context, where the methods don't exist)
+                        if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
+
+                            // ID selector
+                            if ((m = match[1])) {
+
+                                // Document context
+                                if (nodeType === 9) {
+                                    if ((elem = context.getElementById(m))) {
+
+                                        // Support: IE, Opera, Webkit
+                                        // TODO: identify versions
+                                        // getElementById can match elements by name instead of ID
+                                        if (elem.id === m) {
+                                            results.push(elem);
+                                            return results;
+                                        }
+                                    } else {
+                                        return results;
+                                    }
+
+                                    // Element context
+                                } else {
+
+                                    // Support: IE, Opera, Webkit
+                                    // TODO: identify versions
+                                    // getElementById can match elements by name instead of ID
+                                    if (newContext && (elem = newContext.getElementById(m)) &&
+                                        contains(context, elem) &&
+                                        elem.id === m) {
+
+                                        results.push(elem);
+                                        return results;
+                                    }
+                                }
+
+                                // Type selector
+                            } else if (match[2]) {
+                                push.apply(results, context.getElementsByTagName(selector));
+                                return results;
+
+                                // Class selector
+                            } else if ((m = match[3]) && support.getElementsByClassName &&
+                                context.getElementsByClassName) {
+
+                                push.apply(results, context.getElementsByClassName(m));
+                                return results;
+                            }
+                        }
+
+                        // Take advantage of querySelectorAll
+                        if (support.qsa &&
+                            !compilerCache[selector + " "] &&
+                            (!rbuggyQSA || !rbuggyQSA.test(selector))) {
+
+                            if (nodeType !== 1) {
+                                newContext = context;
+                                newSelector = selector;
+
+                                // qSA looks outside Element context, which is not what we want
+                                // Thanks to Andrew Dupont for this workaround technique
+                                // Support: IE <=8
+                                // Exclude object elements
+                            } else if (context.nodeName.toLowerCase() !== "object") {
+
+                                // Capture the context ID, setting it first if necessary
+                                if ((nid = context.getAttribute("id"))) {
+                                    nid = nid.replace(rescape, "\\$&");
+                                } else {
+                                    context.setAttribute("id", (nid = expando));
+                                }
+
+                                // Prefix every selector in the list
+                                groups = tokenize(selector);
+                                i = groups.length;
+                                nidselect = ridentifier.test(nid) ? "#" + nid : "[id='" + nid + "']";
+                                while (i--) {
+                                    groups[i] = nidselect + " " + toSelector(groups[i]);
+                                }
+                                newSelector = groups.join(",");
+
+                                // Expand context for sibling selectors
+                                newContext = rsibling.test(selector) && testContext(context.parentNode) ||
+                                    context;
+                            }
+
+                            if (newSelector) {
+                                try {
+                                    push.apply(results,
+                                        newContext.querySelectorAll(newSelector)
+                                    );
+                                    return results;
+                                } catch (qsaError) {
+                                } finally {
+                                    if (nid === expando) {
+                                        context.removeAttribute("id");
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+
+                // All others
+                return select(selector.replace(rtrim, "$1"), context, results, seed);
+            }
+
+            /**
+             * Create key-value caches of limited size
+             * @returns {function(string, object)} Returns the Object data after storing it on itself with
+             *    property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+             *    deleting the oldest entry
+             */
+            function createCache() {
+                var keys = [];
+
+                function cache(key, value) {
+                    // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+                    if (keys.push(key + " ") > Expr.cacheLength) {
+                        // Only keep the most recent entries
+                        delete cache[keys.shift()];
+                    }
+                    return (cache[key + " "] = value);
+                }
+
+                return cache;
+            }
+
+            /**
+             * Mark a function for special use by Sizzle
+             * @param {Function} fn The function to mark
+             */
+            function markFunction(fn) {
+                fn[expando] = true;
+                return fn;
+            }
+
+            /**
+             * Support testing using an element
+             * @param {Function} fn Passed the created div and expects a boolean result
+             */
+            function assert(fn) {
+                var div = document.createElement("div");
+
+                try {
+                    return !!fn(div);
+                } catch (e) {
+                    return false;
+                } finally {
+                    // Remove from its parent by default
+                    if (div.parentNode) {
+                        div.parentNode.removeChild(div);
+                    }
+                    // release memory in IE
+                    div = null;
+                }
+            }
+
+            /**
+             * Adds the same handler for all of the specified attrs
+             * @param {String} attrs Pipe-separated list of attributes
+             * @param {Function} handler The method that will be applied
+             */
+            function addHandle(attrs, handler) {
+                var arr = attrs.split("|"),
+                    i = arr.length;
+
+                while (i--) {
+                    Expr.attrHandle[arr[i]] = handler;
+                }
+            }
+
+            /**
+             * Checks document order of two siblings
+             * @param {Element} a
+             * @param {Element} b
+             * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+             */
+            function siblingCheck(a, b) {
+                var cur = b && a,
+                    diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+                        ( ~b.sourceIndex || MAX_NEGATIVE ) -
+                        ( ~a.sourceIndex || MAX_NEGATIVE );
+
+                // Use IE sourceIndex if available on both nodes
+                if (diff) {
+                    return diff;
+                }
+
+                // Check if b follows a
+                if (cur) {
+                    while ((cur = cur.nextSibling)) {
+                        if (cur === b) {
+                            return -1;
+                        }
+                    }
+                }
+
+                return a ? 1 : -1;
+            }
+
+            /**
+             * Returns a function to use in pseudos for input types
+             * @param {String} type
+             */
+            function createInputPseudo(type) {
+                return function (elem) {
+                    var name = elem.nodeName.toLowerCase();
+                    return name === "input" && elem.type === type;
+                };
+            }
+
+            /**
+             * Returns a function to use in pseudos for buttons
+             * @param {String} type
+             */
+            function createButtonPseudo(type) {
+                return function (elem) {
+                    var name = elem.nodeName.toLowerCase();
+                    return (name === "input" || name === "button") && elem.type === type;
+                };
+            }
+
+            /**
+             * Returns a function to use in pseudos for positionals
+             * @param {Function} fn
+             */
+            function createPositionalPseudo(fn) {
+                return markFunction(function (argument) {
+                    argument = +argument;
+                    return markFunction(function (seed, matches) {
+                        var j,
+                            matchIndexes = fn([], seed.length, argument),
+                            i = matchIndexes.length;
+
+                        // Match elements found at the specified indexes
+                        while (i--) {
+                            if (seed[(j = matchIndexes[i])]) {
+                                seed[j] = !(matches[j] = seed[j]);
+                            }
+                        }
+                    });
+                });
+            }
+
+            /**
+             * Checks a node for validity as a Sizzle context
+             * @param {Element|Object=} context
+             * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+             */
+            function testContext(context) {
+                return context && typeof context.getElementsByTagName !== "undefined" && context;
+            }
+
+// Expose support vars for convenience
+            support = Sizzle.support = {};
+
+            /**
+             * Detects XML nodes
+             * @param {Element|Object} elem An element or a document
+             * @returns {Boolean} True iff elem is a non-HTML XML node
+             */
+            isXML = Sizzle.isXML = function (elem) {
+                // documentElement is verified for cases where it doesn't yet exist
+                // (such as loading iframes in IE - #4833)
+                var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+                return documentElement ? documentElement.nodeName !== "HTML" : false;
+            };
+
+            /**
+             * Sets document-related variables once based on the current document
+             * @param {Element|Object} [doc] An element or document object to use to set the document
+             * @returns {Object} Returns the current document
+             */
+            setDocument = Sizzle.setDocument = function (node) {
+                var hasCompare, parent,
+                    doc = node ? node.ownerDocument || node : preferredDoc;
+
+                // Return early if doc is invalid or already selected
+                if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
+                    return document;
+                }
+
+                // Update global variables
+                document = doc;
+                docElem = document.documentElement;
+                documentIsHTML = !isXML(document);
+
+                // Support: IE 9-11, Edge
+                // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
+                if ((parent = document.defaultView) && parent.top !== parent) {
+                    // Support: IE 11
+                    if (parent.addEventListener) {
+                        parent.addEventListener("unload", unloadHandler, false);
+
+                        // Support: IE 9 - 10 only
+                    } else if (parent.attachEvent) {
+                        parent.attachEvent("onunload", unloadHandler);
+                    }
+                }
+
+                /* Attributes
+                 ---------------------------------------------------------------------- */
+
+                // Support: IE<8
+                // Verify that getAttribute really returns attributes and not properties
+                // (excepting IE8 booleans)
+                support.attributes = assert(function (div) {
+                    div.className = "i";
+                    return !div.getAttribute("className");
+                });
+
+                /* getElement(s)By*
+                 ---------------------------------------------------------------------- */
+
+                // Check if getElementsByTagName("*") returns only elements
+                support.getElementsByTagName = assert(function (div) {
+                    div.appendChild(document.createComment(""));
+                    return !div.getElementsByTagName("*").length;
+                });
+
+                // Support: IE<9
+                support.getElementsByClassName = rnative.test(document.getElementsByClassName);
+
+                // Support: IE<10
+                // Check if getElementById returns elements by name
+                // The broken getElementById methods don't pick up programatically-set names,
+                // so use a roundabout getElementsByName test
+                support.getById = assert(function (div) {
+                    docElem.appendChild(div).id = expando;
+                    return !document.getElementsByName || !document.getElementsByName(expando).length;
+                });
+
+                // ID find and filter
+                if (support.getById) {
+                    Expr.find["ID"] = function (id, context) {
+                        if (typeof context.getElementById !== "undefined" && documentIsHTML) {
+                            var m = context.getElementById(id);
+                            return m ? [m] : [];
+                        }
+                    };
+                    Expr.filter["ID"] = function (id) {
+                        var attrId = id.replace(runescape, funescape);
+                        return function (elem) {
+                            return elem.getAttribute("id") === attrId;
+                        };
+                    };
+                } else {
+                    // Support: IE6/7
+                    // getElementById is not reliable as a find shortcut
+                    delete Expr.find["ID"];
+
+                    Expr.filter["ID"] = function (id) {
+                        var attrId = id.replace(runescape, funescape);
+                        return function (elem) {
+                            var node = typeof elem.getAttributeNode !== "undefined" &&
+                                elem.getAttributeNode("id");
+                            return node && node.value === attrId;
+                        };
+                    };
+                }
+
+                // Tag
+                Expr.find["TAG"] = support.getElementsByTagName ?
+                    function (tag, context) {
+                        if (typeof context.getElementsByTagName !== "undefined") {
+                            return context.getElementsByTagName(tag);
+
+                            // DocumentFragment nodes don't have gEBTN
+                        } else if (support.qsa) {
+                            return context.querySelectorAll(tag);
+                        }
+                    } :
+
+                    function (tag, context) {
+                        var elem,
+                            tmp = [],
+                            i = 0,
+                            // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+                            results = context.getElementsByTagName(tag);
+
+                        // Filter out possible comments
+                        if (tag === "*") {
+                            while ((elem = results[i++])) {
+                                if (elem.nodeType === 1) {
+                                    tmp.push(elem);
+                                }
+                            }
+
+                            return tmp;
+                        }
+                        return results;
+                    };
+
+                // Class
+                Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) {
+                        if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
+                            return context.getElementsByClassName(className);
+                        }
+                    };
+
+                /* QSA/matchesSelector
+                 ---------------------------------------------------------------------- */
+
+                // QSA and matchesSelector support
+
+                // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+                rbuggyMatches = [];
+
+                // qSa(:focus) reports false when true (Chrome 21)
+                // We allow this because of a bug in IE8/9 that throws an error
+                // whenever `document.activeElement` is accessed on an iframe
+                // So, we allow :focus to pass through QSA all the time to avoid the IE error
+                // See http://bugs.jquery.com/ticket/13378
+                rbuggyQSA = [];
+
+                if ((support.qsa = rnative.test(document.querySelectorAll))) {
+                    // Build QSA regex
+                    // Regex strategy adopted from Diego Perini
+                    assert(function (div) {
+                        // Select is set to empty string on purpose
+                        // This is to test IE's treatment of not explicitly
+                        // setting a boolean content attribute,
+                        // since its presence should be enough
+                        // http://bugs.jquery.com/ticket/12359
+                        docElem.appendChild(div).innerHTML = "<a id='" + expando + "'></a>" +
+                            "<select id='" + expando + "-\r\\' msallowcapture=''>" +
+                            "<option selected=''></option></select>";
+
+                        // Support: IE8, Opera 11-12.16
+                        // Nothing should be selected when empty strings follow ^= or $= or *=
+                        // The test attribute must be unknown in Opera but "safe" for WinRT
+                        // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+                        if (div.querySelectorAll("[msallowcapture^='']").length) {
+                            rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
+                        }
+
+                        // Support: IE8
+                        // Boolean attributes and "value" are not treated correctly
+                        if (!div.querySelectorAll("[selected]").length) {
+                            rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
+                        }
+
+                        // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
+                        if (!div.querySelectorAll("[id~=" + expando + "-]").length) {
+                            rbuggyQSA.push("~=");
+                        }
+
+                        // Webkit/Opera - :checked should return selected option elements
+                        // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+                        // IE8 throws error here and will not see later tests
+                        if (!div.querySelectorAll(":checked").length) {
+                            rbuggyQSA.push(":checked");
+                        }
+
+                        // Support: Safari 8+, iOS 8+
+                        // https://bugs.webkit.org/show_bug.cgi?id=136851
+                        // In-page `selector#id sibing-combinator selector` fails
+                        if (!div.querySelectorAll("a#" + expando + "+*").length) {
+                            rbuggyQSA.push(".#.+[+~]");
+                        }
+                    });
+
+                    assert(function (div) {
+                        // Support: Windows 8 Native Apps
+                        // The type and name attributes are restricted during .innerHTML assignment
+                        var input = document.createElement("input");
+                        input.setAttribute("type", "hidden");
+                        div.appendChild(input).setAttribute("name", "D");
+
+                        // Support: IE8
+                        // Enforce case-sensitivity of name attribute
+                        if (div.querySelectorAll("[name=d]").length) {
+                            rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
+                        }
+
+                        // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+                        // IE8 throws error here and will not see later tests
+                        if (!div.querySelectorAll(":enabled").length) {
+                            rbuggyQSA.push(":enabled", ":disabled");
+                        }
+
+                        // Opera 10-11 does not throw on post-comma invalid pseudos
+                        div.querySelectorAll("*,:x");
+                        rbuggyQSA.push(",.*:");
+                    });
+                }
+
+                if ((support.matchesSelector = rnative.test((matches = docElem.matches ||
+                        docElem.webkitMatchesSelector ||
+                        docElem.mozMatchesSelector ||
+                        docElem.oMatchesSelector ||
+                        docElem.msMatchesSelector)))) {
+
+                    assert(function (div) {
+                        // Check to see if it's possible to do matchesSelector
+                        // on a disconnected node (IE 9)
+                        support.disconnectedMatch = matches.call(div, "div");
+
+                        // This should fail with an exception
+                        // Gecko does not error, returns false instead
+                        matches.call(div, "[s!='']:x");
+                        rbuggyMatches.push("!=", pseudos);
+                    });
+                }
+
+                rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
+                rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
+
+                /* Contains
+                 ---------------------------------------------------------------------- */
+                hasCompare = rnative.test(docElem.compareDocumentPosition);
+
+                // Element contains another
+                // Purposefully self-exclusive
+                // As in, an element does not contain itself
+                contains = hasCompare || rnative.test(docElem.contains) ?
+                    function (a, b) {
+                        var adown = a.nodeType === 9 ? a.documentElement : a,
+                            bup = b && b.parentNode;
+                        return a === bup || !!( bup && bup.nodeType === 1 && (
+                                adown.contains ?
+                                    adown.contains(bup) :
+                                    a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16
+                            ));
+                    } :
+                    function (a, b) {
+                        if (b) {
+                            while ((b = b.parentNode)) {
+                                if (b === a) {
+                                    return true;
+                                }
+                            }
+                        }
+                        return false;
+                    };
+
+                /* Sorting
+                 ---------------------------------------------------------------------- */
+
+                // Document order sorting
+                sortOrder = hasCompare ?
+                    function (a, b) {
+
+                        // Flag for duplicate removal
+                        if (a === b) {
+                            hasDuplicate = true;
+                            return 0;
+                        }
+
+                        // Sort on method existence if only one input has compareDocumentPosition
+                        var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+                        if (compare) {
+                            return compare;
+                        }
+
+                        // Calculate position if both inputs belong to the same document
+                        compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+                            a.compareDocumentPosition(b) :
+
+                            // Otherwise we know they are disconnected
+                            1;
+
+                        // Disconnected nodes
+                        if (compare & 1 ||
+                            (!support.sortDetached && b.compareDocumentPosition(a) === compare)) {
+
+                            // Choose the first element that is related to our preferred document
+                            if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {
+                                return -1;
+                            }
+                            if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {
+                                return 1;
+                            }
+
+                            // Maintain original order
+                            return sortInput ?
+                                ( indexOf(sortInput, a) - indexOf(sortInput, b) ) :
+                                0;
+                        }
+
+                        return compare & 4 ? -1 : 1;
+                    } :
+                    function (a, b) {
+                        // Exit early if the nodes are identical
+                        if (a === b) {
+                            hasDuplicate = true;
+                            return 0;
+                        }
+
+                        var cur,
+                            i = 0,
+                            aup = a.parentNode,
+                            bup = b.parentNode,
+                            ap = [a],
+                            bp = [b];
+
+                        // Parentless nodes are either documents or disconnected
+                        if (!aup || !bup) {
+                            return a === document ? -1 :
+                                b === document ? 1 :
+                                    aup ? -1 :
+                                        bup ? 1 :
+                                            sortInput ?
+                                                ( indexOf(sortInput, a) - indexOf(sortInput, b) ) :
+                                                0;
+
+                            // If the nodes are siblings, we can do a quick check
+                        } else if (aup === bup) {
+                            return siblingCheck(a, b);
+                        }
+
+                        // Otherwise we need full lists of their ancestors for comparison
+                        cur = a;
+                        while ((cur = cur.parentNode)) {
+                            ap.unshift(cur);
+                        }
+                        cur = b;
+                        while ((cur = cur.parentNode)) {
+                            bp.unshift(cur);
+                        }
+
+                        // Walk down the tree looking for a discrepancy
+                        while (ap[i] === bp[i]) {
+                            i++;
+                        }
+
+                        return i ?
+                            // Do a sibling check if the nodes have a common ancestor
+                            siblingCheck(ap[i], bp[i]) :
+
+                            // Otherwise nodes in our document sort first
+                            ap[i] === preferredDoc ? -1 :
+                                bp[i] === preferredDoc ? 1 :
+                                    0;
+                    };
+
+                return document;
+            };
+
+            Sizzle.matches = function (expr, elements) {
+                return Sizzle(expr, null, null, elements);
+            };
+
+            Sizzle.matchesSelector = function (elem, expr) {
+                // Set document vars if needed
+                if (( elem.ownerDocument || elem ) !== document) {
+                    setDocument(elem);
+                }
+
+                // Make sure that attribute selectors are quoted
+                expr = expr.replace(rattributeQuotes, "='$1']");
+
+                if (support.matchesSelector && documentIsHTML &&
+                    !compilerCache[expr + " "] &&
+                    ( !rbuggyMatches || !rbuggyMatches.test(expr) ) &&
+                    ( !rbuggyQSA || !rbuggyQSA.test(expr) )) {
+
+                    try {
+                        var ret = matches.call(elem, expr);
+
+                        // IE 9's matchesSelector returns false on disconnected nodes
+                        if (ret || support.disconnectedMatch ||
+                            // As well, disconnected nodes are said to be in a document
+                            // fragment in IE 9
+                            elem.document && elem.document.nodeType !== 11) {
+                            return ret;
+                        }
+                    } catch (e) {
+                    }
+                }
+
+                return Sizzle(expr, document, null, [elem]).length > 0;
+            };
+
+            Sizzle.contains = function (context, elem) {
+                // Set document vars if needed
+                if (( context.ownerDocument || context ) !== document) {
+                    setDocument(context);
+                }
+                return contains(context, elem);
+            };
+
+            Sizzle.attr = function (elem, name) {
+                // Set document vars if needed
+                if (( elem.ownerDocument || elem ) !== document) {
+                    setDocument(elem);
+                }
+
+                var fn = Expr.attrHandle[name.toLowerCase()],
+                    // Don't get fooled by Object.prototype properties (jQuery #13807)
+                    val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ?
+                        fn(elem, name, !documentIsHTML) :
+                        undefined;
+
+                return val !== undefined ?
+                    val :
+                    support.attributes || !documentIsHTML ?
+                        elem.getAttribute(name) :
+                        (val = elem.getAttributeNode(name)) && val.specified ?
+                            val.value :
+                            null;
+            };
+
+            Sizzle.error = function (msg) {
+                throw new Error("Syntax error, unrecognized expression: " + msg);
+            };
+
+            /**
+             * Document sorting and removing duplicates
+             * @param {ArrayLike} results
+             */
+            Sizzle.uniqueSort = function (results) {
+                var elem,
+                    duplicates = [],
+                    j = 0,
+                    i = 0;
+
+                // Unless we *know* we can detect duplicates, assume their presence
+                hasDuplicate = !support.detectDuplicates;
+                sortInput = !support.sortStable && results.slice(0);
+                results.sort(sortOrder);
+
+                if (hasDuplicate) {
+                    while ((elem = results[i++])) {
+                        if (elem === results[i]) {
+                            j = duplicates.push(i);
+                        }
+                    }
+                    while (j--) {
+                        results.splice(duplicates[j], 1);
+                    }
+                }
+
+                // Clear input after sorting to release objects
+                // See https://github.com/jquery/sizzle/pull/225
+                sortInput = null;
+
+                return results;
+            };
+
+            /**
+             * Utility function for retrieving the text value of an array of DOM nodes
+             * @param {Array|Element} elem
+             */
+            getText = Sizzle.getText = function (elem) {
+                var node,
+                    ret = "",
+                    i = 0,
+                    nodeType = elem.nodeType;
+
+                if (!nodeType) {
+                    // If no nodeType, this is expected to be an array
+                    while ((node = elem[i++])) {
+                        // Do not traverse comment nodes
+                        ret += getText(node);
+                    }
+                } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
+                    // Use textContent for elements
+                    // innerText usage removed for consistency of new lines (jQuery #11153)
+                    if (typeof elem.textContent === "string") {
+                        return elem.textContent;
+                    } else {
+                        // Traverse its children
+                        for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
+                            ret += getText(elem);
+                        }
+                    }
+                } else if (nodeType === 3 || nodeType === 4) {
+                    return elem.nodeValue;
+                }
+                // Do not include comment or processing instruction nodes
+
+                return ret;
+            };
+
+            Expr = Sizzle.selectors = {
+
+                // Can be adjusted by the user
+                cacheLength: 50,
+
+                createPseudo: markFunction,
+
+                match: matchExpr,
+
+                attrHandle: {},
+
+                find: {},
+
+                relative: {
+                    ">": {dir: "parentNode", first: true},
+                    " ": {dir: "parentNode"},
+                    "+": {dir: "previousSibling", first: true},
+                    "~": {dir: "previousSibling"}
+                },
+
+                preFilter: {
+                    "ATTR": function (match) {
+                        match[1] = match[1].replace(runescape, funescape);
+
+                        // Move the given value to match[3] whether quoted or unquoted
+                        match[3] = ( match[3] || match[4] || match[5] || "" ).replace(runescape, funescape);
+
+                        if (match[2] === "~=") {
+                            match[3] = " " + match[3] + " ";
+                        }
+
+                        return match.slice(0, 4);
+                    },
+
+                    "CHILD": function (match) {
+                        /* matches from matchExpr["CHILD"]
+                         1 type (only|nth|...)
+                         2 what (child|of-type)
+                         3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+                         4 xn-component of xn+y argument ([+-]?\d*n|)
+                         5 sign of xn-component
+                         6 x of xn-component
+                         7 sign of y-component
+                         8 y of y-component
+                         */
+                        match[1] = match[1].toLowerCase();
+
+                        if (match[1].slice(0, 3) === "nth") {
+                            // nth-* requires argument
+                            if (!match[3]) {
+                                Sizzle.error(match[0]);
+                            }
+
+                            // numeric x and y parameters for Expr.filter.CHILD
+                            // remember that false/true cast respectively to 0/1
+                            match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+                            match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+                            // other types prohibit arguments
+                        } else if (match[3]) {
+                            Sizzle.error(match[0]);
+                        }
+
+                        return match;
+                    },
+
+                    "PSEUDO": function (match) {
+                        var excess,
+                            unquoted = !match[6] && match[2];
+
+                        if (matchExpr["CHILD"].test(match[0])) {
+                            return null;
+                        }
+
+                        // Accept quoted arguments as-is
+                        if (match[3]) {
+                            match[2] = match[4] || match[5] || "";
+
+                            // Strip excess characters from unquoted arguments
+                        } else if (unquoted && rpseudo.test(unquoted) &&
+                            // Get excess from tokenize (recursively)
+                            (excess = tokenize(unquoted, true)) &&
+                            // advance to the next closing parenthesis
+                            (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
+
+                            // excess is a negative index
+                            match[0] = match[0].slice(0, excess);
+                            match[2] = unquoted.slice(0, excess);
+                        }
+
+                        // Return only captures needed by the pseudo filter method (type and argument)
+                        return match.slice(0, 3);
+                    }
+                },
+
+                filter: {
+
+                    "TAG": function (nodeNameSelector) {
+                        var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
+                        return nodeNameSelector === "*" ?
+                            function () {
+                                return true;
+                            } :
+                            function (elem) {
+                                return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+                            };
+                    },
+
+                    "CLASS": function (className) {
+                        var pattern = classCache[className + " "];
+
+                        return pattern ||
+                            (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) &&
+                            classCache(className, function (elem) {
+                                return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "");
+                            });
+                    },
+
+                    "ATTR": function (name, operator, check) {
+                        return function (elem) {
+                            var result = Sizzle.attr(elem, name);
+
+                            if (result == null) {
+                                return operator === "!=";
+                            }
+                            if (!operator) {
+                                return true;
+                            }
+
+                            result += "";
+
+                            return operator === "=" ? result === check :
+                                operator === "!=" ? result !== check :
+                                    operator === "^=" ? check && result.indexOf(check) === 0 :
+                                        operator === "*=" ? check && result.indexOf(check) > -1 :
+                                            operator === "$=" ? check && result.slice(-check.length) === check :
+                                                operator === "~=" ? ( " " + result.replace(rwhitespace, " ") + " " ).indexOf(check) > -1 :
+                                                    operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" :
+                                                        false;
+                        };
+                    },
+
+                    "CHILD": function (type, what, argument, first, last) {
+                        var simple = type.slice(0, 3) !== "nth",
+                            forward = type.slice(-4) !== "last",
+                            ofType = what === "of-type";
+
+                        return first === 1 && last === 0 ?
+
+                            // Shortcut for :nth-*(n)
+                            function (elem) {
+                                return !!elem.parentNode;
+                            } :
+
+                            function (elem, context, xml) {
+                                var cache, uniqueCache, outerCache, node, nodeIndex, start,
+                                    dir = simple !== forward ? "nextSibling" : "previousSibling",
+                                    parent = elem.parentNode,
+                                    name = ofType && elem.nodeName.toLowerCase(),
+                                    useCache = !xml && !ofType,
+                                    diff = false;
+
+                                if (parent) {
+
+                                    // :(first|last|only)-(child|of-type)
+                                    if (simple) {
+                                        while (dir) {
+                                            node = elem;
+                                            while ((node = node[dir])) {
+                                                if (ofType ?
+                                                        node.nodeName.toLowerCase() === name :
+                                                        node.nodeType === 1) {
+
+                                                    return false;
+                                                }
+                                            }
+                                            // Reverse direction for :only-* (if we haven't yet done so)
+                                            start = dir = type === "only" && !start && "nextSibling";
+                                        }
+                                        return true;
+                                    }
+
+                                    start = [forward ? parent.firstChild : parent.lastChild];
+
+                                    // non-xml :nth-child(...) stores cache data on `parent`
+                                    if (forward && useCache) {
+
+                                        // Seek `elem` from a previously-cached index
+
+                                        // ...in a gzip-friendly way
+                                        node = parent;
+                                        outerCache = node[expando] || (node[expando] = {});
+
+                                        // Support: IE <9 only
+                                        // Defend against cloned attroperties (jQuery gh-1709)
+                                        uniqueCache = outerCache[node.uniqueID] ||
+                                            (outerCache[node.uniqueID] = {});
+
+                                        cache = uniqueCache[type] || [];
+                                        nodeIndex = cache[0] === dirruns && cache[1];
+                                        diff = nodeIndex && cache[2];
+                                        node = nodeIndex && parent.childNodes[nodeIndex];
+
+                                        while ((node = ++nodeIndex && node && node[dir] ||
+
+                                            // Fallback to seeking `elem` from the start
+                                            (diff = nodeIndex = 0) || start.pop())) {
+
+                                            // When found, cache indexes on `parent` and break
+                                            if (node.nodeType === 1 && ++diff && node === elem) {
+                                                uniqueCache[type] = [dirruns, nodeIndex, diff];
+                                                break;
+                                            }
+                                        }
+
+                                    } else {
+                                        // Use previously-cached element index if available
+                                        if (useCache) {
+                                            // ...in a gzip-friendly way
+                                            node = elem;
+                                            outerCache = node[expando] || (node[expando] = {});
+
+                                            // Support: IE <9 only
+                                            // Defend against cloned attroperties (jQuery gh-1709)
+                                            uniqueCache = outerCache[node.uniqueID] ||
+                                                (outerCache[node.uniqueID] = {});
+
+                                            cache = uniqueCache[type] || [];
+                                            nodeIndex = cache[0] === dirruns && cache[1];
+                                            diff = nodeIndex;
+                                        }
+
+                                        // xml :nth-child(...)
+                                        // or :nth-last-child(...) or :nth(-last)?-of-type(...)
+                                        if (diff === false) {
+                                            // Use the same loop as above to seek `elem` from the start
+                                            while ((node = ++nodeIndex && node && node[dir] ||
+                                                (diff = nodeIndex = 0) || start.pop())) {
+
+                                                if (( ofType ?
+                                                        node.nodeName.toLowerCase() === name :
+                                                        node.nodeType === 1 ) &&
+                                                    ++diff) {
+
+                                                    // Cache the index of each encountered element
+                                                    if (useCache) {
+                                                        outerCache = node[expando] || (node[expando] = {});
+
+                                                        // Support: IE <9 only
+                                                        // Defend against cloned attroperties (jQuery gh-1709)
+                                                        uniqueCache = outerCache[node.uniqueID] ||
+                                                            (outerCache[node.uniqueID] = {});
+
+                                                        uniqueCache[type] = [dirruns, diff];
+                                                    }
+
+                                                    if (node === elem) {
+                                                        break;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+
+                                    // Incorporate the offset, then check against cycle size
+                                    diff -= last;
+                                    return diff === first || ( diff % first === 0 && diff / first >= 0 );
+                                }
+                            };
+                    },
+
+                    "PSEUDO": function (pseudo, argument) {
+                        // pseudo-class names are case-insensitive
+                        // http://www.w3.org/TR/selectors/#pseudo-classes
+                        // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+                        // Remember that setFilters inherits from pseudos
+                        var args,
+                            fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] ||
+                                Sizzle.error("unsupported pseudo: " + pseudo);
+
+                        // The user may use createPseudo to indicate that
+                        // arguments are needed to create the filter function
+                        // just as Sizzle does
+                        if (fn[expando]) {
+                            return fn(argument);
+                        }
+
+                        // But maintain support for old signatures
+                        if (fn.length > 1) {
+                            args = [pseudo, pseudo, "", argument];
+                            return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ?
+                                markFunction(function (seed, matches) {
+                                    var idx,
+                                        matched = fn(seed, argument),
+                                        i = matched.length;
+                                    while (i--) {
+                                        idx = indexOf(seed, matched[i]);
+                                        seed[idx] = !( matches[idx] = matched[i] );
+                                    }
+                                }) :
+                                function (elem) {
+                                    return fn(elem, 0, args);
+                                };
+                        }
+
+                        return fn;
+                    }
+                },
+
+                pseudos: {
+                    // Potentially complex pseudos
+                    "not": markFunction(function (selector) {
+                        // Trim the selector passed to compile
+                        // to avoid treating leading and trailing
+                        // spaces as combinators
+                        var input = [],
+                            results = [],
+                            matcher = compile(selector.replace(rtrim, "$1"));
+
+                        return matcher[expando] ?
+                            markFunction(function (seed, matches, context, xml) {
+                                var elem,
+                                    unmatched = matcher(seed, null, xml, []),
+                                    i = seed.length;
+
+                                // Match elements unmatched by `matcher`
+                                while (i--) {
+                                    if ((elem = unmatched[i])) {
+                                        seed[i] = !(matches[i] = elem);
+                                    }
+                                }
+                            }) :
+                            function (elem, context, xml) {
+                                input[0] = elem;
+                                matcher(input, null, xml, results);
+                                // Don't keep the element (issue #299)
+                                input[0] = null;
+                                return !results.pop();
+                            };
+                    }),
+
+                    "has": markFunction(function (selector) {
+                        return function (elem) {
+                            return Sizzle(selector, elem).length > 0;
+                        };
+                    }),
+
+                    "contains": markFunction(function (text) {
+                        text = text.replace(runescape, funescape);
+                        return function (elem) {
+                            return ( elem.textContent || elem.innerText || getText(elem) ).indexOf(text) > -1;
+                        };
+                    }),
+
+                    // "Whether an element is represented by a :lang() selector
+                    // is based solely on the element's language value
+                    // being equal to the identifier C,
+                    // or beginning with the identifier C immediately followed by "-".
+                    // The matching of C against the element's language value is performed case-insensitively.
+                    // The identifier C does not have to be a valid language name."
+                    // http://www.w3.org/TR/selectors/#lang-pseudo
+                    "lang": markFunction(function (lang) {
+                        // lang value must be a valid identifier
+                        if (!ridentifier.test(lang || "")) {
+                            Sizzle.error("unsupported lang: " + lang);
+                        }
+                        lang = lang.replace(runescape, funescape).toLowerCase();
+                        return function (elem) {
+                            var elemLang;
+                            do {
+                                if ((elemLang = documentIsHTML ?
+                                        elem.lang :
+                                        elem.getAttribute("xml:lang") || elem.getAttribute("lang"))) {
+
+                                    elemLang = elemLang.toLowerCase();
+                                    return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
+                                }
+                            } while ((elem = elem.parentNode) && elem.nodeType === 1);
+                            return false;
+                        };
+                    }),
+
+                    // Miscellaneous
+                    "target": function (elem) {
+                        var hash = window.location && window.location.hash;
+                        return hash && hash.slice(1) === elem.id;
+                    },
+
+                    "root": function (elem) {
+                        return elem === docElem;
+                    },
+
+                    "focus": function (elem) {
+                        return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+                    },
+
+                    // Boolean properties
+                    "enabled": function (elem) {
+                        return elem.disabled === false;
+                    },
+
+                    "disabled": function (elem) {
+                        return elem.disabled === true;
+                    },
+
+                    "checked": function (elem) {
+                        // In CSS3, :checked should return both checked and selected elements
+                        // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+                        var nodeName = elem.nodeName.toLowerCase();
+                        return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+                    },
+
+                    "selected": function (elem) {
+                        // Accessing this property makes selected-by-default
+                        // options in Safari work properly
+                        if (elem.parentNode) {
+                            elem.parentNode.selectedIndex;
+                        }
+
+                        return elem.selected === true;
+                    },
+
+                    // Contents
+                    "empty": function (elem) {
+                        // http://www.w3.org/TR/selectors/#empty-pseudo
+                        // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+                        //   but not by others (comment: 8; processing instruction: 7; etc.)
+                        // nodeType < 6 works because attributes (2) do not appear as children
+                        for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
+                            if (elem.nodeType < 6) {
+                                return false;
+                            }
+                        }
+                        return true;
+                    },
+
+                    "parent": function (elem) {
+                        return !Expr.pseudos["empty"](elem);
+                    },
+
+                    // Element/input types
+                    "header": function (elem) {
+                        return rheader.test(elem.nodeName);
+                    },
+
+                    "input": function (elem) {
+                        return rinputs.test(elem.nodeName);
+                    },
+
+                    "button": function (elem) {
+                        var name = elem.nodeName.toLowerCase();
+                        return name === "input" && elem.type === "button" || name === "button";
+                    },
+
+                    "text": function (elem) {
+                        var attr;
+                        return elem.nodeName.toLowerCase() === "input" &&
+                            elem.type === "text" &&
+
+                            // Support: IE<8
+                            // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+                            ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+                    },
+
+                    // Position-in-collection
+                    "first": createPositionalPseudo(function () {
+                        return [0];
+                    }),
+
+                    "last": createPositionalPseudo(function (matchIndexes, length) {
+                        return [length - 1];
+                    }),
+
+                    "eq": createPositionalPseudo(function (matchIndexes, length, argument) {
+                        return [argument < 0 ? argument + length : argument];
+                    }),
+
+                    "even": createPositionalPseudo(function (matchIndexes, length) {
+                        var i = 0;
+                        for (; i < length; i += 2) {
+                            matchIndexes.push(i);
+                        }
+                        return matchIndexes;
+                    }),
+
+                    "odd": createPositionalPseudo(function (matchIndexes, length) {
+                        var i = 1;
+                        for (; i < length; i += 2) {
+                            matchIndexes.push(i);
+                        }
+                        return matchIndexes;
+                    }),
+
+                    "lt": createPositionalPseudo(function (matchIndexes, length, argument) {
+                        var i = argument < 0 ? argument + length : argument;
+                        for (; --i >= 0;) {
+                            matchIndexes.push(i);
+                        }
+                        return matchIndexes;
+                    }),
+
+                    "gt": createPositionalPseudo(function (matchIndexes, length, argument) {
+                        var i = argument < 0 ? argument + length : argument;
+                        for (; ++i < length;) {
+                            matchIndexes.push(i);
+                        }
+                        return matchIndexes;
+                    })
+                }
+            };
+
+            Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+            for (i in {radio: true, checkbox: true, file: true, password: true, image: true}) {
+                Expr.pseudos[i] = createInputPseudo(i);
+            }
+            for (i in {submit: true, reset: true}) {
+                Expr.pseudos[i] = createButtonPseudo(i);
+            }
+
+// Easy API for creating new setFilters
+            function setFilters() {
+            }
+
+            setFilters.prototype = Expr.filters = Expr.pseudos;
+            Expr.setFilters = new setFilters();
+
+            tokenize = Sizzle.tokenize = function (selector, parseOnly) {
+                var matched, match, tokens, type,
+                    soFar, groups, preFilters,
+                    cached = tokenCache[selector + " "];
+
+                if (cached) {
+                    return parseOnly ? 0 : cached.slice(0);
+                }
+
+                soFar = selector;
+                groups = [];
+                preFilters = Expr.preFilter;
+
+                while (soFar) {
+
+                    // Comma and first run
+                    if (!matched || (match = rcomma.exec(soFar))) {
+                        if (match) {
+                            // Don't consume trailing commas as valid
+                            soFar = soFar.slice(match[0].length) || soFar;
+                        }
+                        groups.push((tokens = []));
+                    }
+
+                    matched = false;
+
+                    // Combinators
+                    if ((match = rcombinators.exec(soFar))) {
+                        matched = match.shift();
+                        tokens.push({
+                            value: matched,
+                            // Cast descendant combinators to space
+                            type: match[0].replace(rtrim, " ")
+                        });
+                        soFar = soFar.slice(matched.length);
+                    }
+
+                    // Filters
+                    for (type in Expr.filter) {
+                        if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] ||
+                            (match = preFilters[type](match)))) {
+                            matched = match.shift();
+                            tokens.push({
+                                value: matched,
+                                type: type,
+                                matches: match
+                            });
+                            soFar = soFar.slice(matched.length);
+                        }
+                    }
+
+                    if (!matched) {
+                        break;
+                    }
+                }
+
+                // Return the length of the invalid excess
+                // if we're just parsing
+                // Otherwise, throw an error or return tokens
+                return parseOnly ?
+                    soFar.length :
+                    soFar ?
+                        Sizzle.error(selector) :
+                        // Cache the tokens
+                        tokenCache(selector, groups).slice(0);
+            };
+
+            function toSelector(tokens) {
+                var i = 0,
+                    len = tokens.length,
+                    selector = "";
+                for (; i < len; i++) {
+                    selector += tokens[i].value;
+                }
+                return selector;
+            }
+
+            function addCombinator(matcher, combinator, base) {
+                var dir = combinator.dir,
+                    checkNonElements = base && dir === "parentNode",
+                    doneName = done++;
+
+                return combinator.first ?
+                    // Check against closest ancestor/preceding element
+                    function (elem, context, xml) {
+                        while ((elem = elem[dir])) {
+                            if (elem.nodeType === 1 || checkNonElements) {
+                                return matcher(elem, context, xml);
+                            }
+                        }
+                    } :
+
+                    // Check against all ancestor/preceding elements
+                    function (elem, context, xml) {
+                        var oldCache, uniqueCache, outerCache,
+                            newCache = [dirruns, doneName];
+
+                        // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
+                        if (xml) {
+                            while ((elem = elem[dir])) {
+                                if (elem.nodeType === 1 || checkNonElements) {
+                                    if (matcher(elem, context, xml)) {
+                                        return true;
+                                    }
+                                }
+                            }
+                        } else {
+                            while ((elem = elem[dir])) {
+                                if (elem.nodeType === 1 || checkNonElements) {
+                                    outerCache = elem[expando] || (elem[expando] = {});
+
+                                    // Support: IE <9 only
+                                    // Defend against cloned attroperties (jQuery gh-1709)
+                                    uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});
+
+                                    if ((oldCache = uniqueCache[dir]) &&
+                                        oldCache[0] === dirruns && oldCache[1] === doneName) {
+
+                                        // Assign to newCache so results back-propagate to previous elements
+                                        return (newCache[2] = oldCache[2]);
+                                    } else {
+                                        // Reuse newcache so results back-propagate to previous elements
+                                        uniqueCache[dir] = newCache;
+
+                                        // A match means we're done; a fail means we have to keep checking
+                                        if ((newCache[2] = matcher(elem, context, xml))) {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    };
+            }
+
+            function elementMatcher(matchers) {
+                return matchers.length > 1 ?
+                    function (elem, context, xml) {
+                        var i = matchers.length;
+                        while (i--) {
+                            if (!matchers[i](elem, context, xml)) {
+                                return false;
+                            }
+                        }
+                        return true;
+                    } :
+                    matchers[0];
+            }
+
+            function multipleContexts(selector, contexts, results) {
+                var i = 0,
+                    len = contexts.length;
+                for (; i < len; i++) {
+                    Sizzle(selector, contexts[i], results);
+                }
+                return results;
+            }
+
+            function condense(unmatched, map, filter, context, xml) {
+                var elem,
+                    newUnmatched = [],
+                    i = 0,
+                    len = unmatched.length,
+                    mapped = map != null;
+
+                for (; i < len; i++) {
+                    if ((elem = unmatched[i])) {
+                        if (!filter || filter(elem, context, xml)) {
+                            newUnmatched.push(elem);
+                            if (mapped) {
+                                map.push(i);
+                            }
+                        }
+                    }
+                }
+
+                return newUnmatched;
+            }
+
+            function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
+                if (postFilter && !postFilter[expando]) {
+                    postFilter = setMatcher(postFilter);
+                }
+                if (postFinder && !postFinder[expando]) {
+                    postFinder = setMatcher(postFinder, postSelector);
+                }
+                return markFunction(function (seed, results, context, xml) {
+                    var temp, i, elem,
+                        preMap = [],
+                        postMap = [],
+                        preexisting = results.length,
+
+                        // Get initial elements from seed or context
+                        elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
+
+                        // Prefilter to get matcher input, preserving a map for seed-results synchronization
+                        matcherIn = preFilter && ( seed || !selector ) ?
+                            condense(elems, preMap, preFilter, context, xml) :
+                            elems,
+
+                        matcherOut = matcher ?
+                            // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+                            postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+                                // ...intermediate processing is necessary
+                                [] :
+
+                                // ...otherwise use results directly
+                                results :
+                            matcherIn;
+
+                    // Find primary matches
+                    if (matcher) {
+                        matcher(matcherIn, matcherOut, context, xml);
+                    }
+
+                    // Apply postFilter
+                    if (postFilter) {
+                        temp = condense(matcherOut, postMap);
+                        postFilter(temp, [], context, xml);
+
+                        // Un-match failing elements by moving them back to matcherIn
+                        i = temp.length;
+                        while (i--) {
+                            if ((elem = temp[i])) {
+                                matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
+                            }
+                        }
+                    }
+
+                    if (seed) {
+                        if (postFinder || preFilter) {
+                            if (postFinder) {
+                                // Get the final matcherOut by condensing this intermediate into postFinder contexts
+                                temp = [];
+                                i = matcherOut.length;
+                                while (i--) {
+                                    if ((elem = matcherOut[i])) {
+                                        // Restore matcherIn since elem is not yet a final match
+                                        temp.push((matcherIn[i] = elem));
+                                    }
+                                }
+                                postFinder(null, (matcherOut = []), temp, xml);
+                            }
+
+                            // Move matched elements from seed to results to keep them synchronized
+                            i = matcherOut.length;
+                            while (i--) {
+                                if ((elem = matcherOut[i]) &&
+                                    (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {
+
+                                    seed[temp] = !(results[temp] = elem);
+                                }
+                            }
+                        }
+
+                        // Add elements to results, through postFinder if defined
+                    } else {
+                        matcherOut = condense(
+                            matcherOut === results ?
+                                matcherOut.splice(preexisting, matcherOut.length) :
+                                matcherOut
+                        );
+                        if (postFinder) {
+                            postFinder(null, results, matcherOut, xml);
+                        } else {
+                            push.apply(results, matcherOut);
+                        }
+                    }
+                });
+            }
+
+            function matcherFromTokens(tokens) {
+                var checkContext, matcher, j,
+                    len = tokens.length,
+                    leadingRelative = Expr.relative[tokens[0].type],
+                    implicitRelative = leadingRelative || Expr.relative[" "],
+                    i = leadingRelative ? 1 : 0,
+
+                    // The foundational matcher ensures that elements are reachable from top-level context(s)
+                    matchContext = addCombinator(function (elem) {
+                        return elem === checkContext;
+                    }, implicitRelative, true),
+                    matchAnyContext = addCombinator(function (elem) {
+                        return indexOf(checkContext, elem) > -1;
+                    }, implicitRelative, true),
+                    matchers = [function (elem, context, xml) {
+                        var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+                                (checkContext = context).nodeType ?
+                                    matchContext(elem, context, xml) :
+                                    matchAnyContext(elem, context, xml) );
+                        // Avoid hanging onto element (issue #299)
+                        checkContext = null;
+                        return ret;
+                    }];
+
+                for (; i < len; i++) {
+                    if ((matcher = Expr.relative[tokens[i].type])) {
+                        matchers = [addCombinator(elementMatcher(matchers), matcher)];
+                    } else {
+                        matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
+
+                        // Return special upon seeing a positional matcher
+                        if (matcher[expando]) {
+                            // Find the next relative operator (if any) for proper handling
+                            j = ++i;
+                            for (; j < len; j++) {
+                                if (Expr.relative[tokens[j].type]) {
+                                    break;
+                                }
+                            }
+                            return setMatcher(
+                                i > 1 && elementMatcher(matchers),
+                                i > 1 && toSelector(
+                                    // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+                                    tokens.slice(0, i - 1).concat({value: tokens[i - 2].type === " " ? "*" : ""})
+                                ).replace(rtrim, "$1"),
+                                matcher,
+                                i < j && matcherFromTokens(tokens.slice(i, j)),
+                                j < len && matcherFromTokens((tokens = tokens.slice(j))),
+                                j < len && toSelector(tokens)
+                            );
+                        }
+                        matchers.push(matcher);
+                    }
+                }
+
+                return elementMatcher(matchers);
+            }
+
+            function matcherFromGroupMatchers(elementMatchers, setMatchers) {
+                var bySet = setMatchers.length > 0,
+                    byElement = elementMatchers.length > 0,
+                    superMatcher = function (seed, context, xml, results, outermost) {
+                        var elem, j, matcher,
+                            matchedCount = 0,
+                            i = "0",
+                            unmatched = seed && [],
+                            setMatched = [],
+                            contextBackup = outermostContext,
+                            // We must always have either seed elements or outermost context
+                            elems = seed || byElement && Expr.find["TAG"]("*", outermost),
+                            // Use integer dirruns iff this is the outermost matcher
+                            dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+                            len = elems.length;
+
+                        if (outermost) {
+                            outermostContext = context === document || context || outermost;
+                        }
+
+                        // Add elements passing elementMatchers directly to results
+                        // Support: IE<9, Safari
+                        // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+                        for (; i !== len && (elem = elems[i]) != null; i++) {
+                            if (byElement && elem) {
+                                j = 0;
+                                if (!context && elem.ownerDocument !== document) {
+                                    setDocument(elem);
+                                    xml = !documentIsHTML;
+                                }
+                                while ((matcher = elementMatchers[j++])) {
+                                    if (matcher(elem, context || document, xml)) {
+                                        results.push(elem);
+                                        break;
+                                    }
+                                }
+                                if (outermost) {
+                                    dirruns = dirrunsUnique;
+                                }
+                            }
+
+                            // Track unmatched elements for set filters
+                            if (bySet) {
+                                // They will have gone through all possible matchers
+                                if ((elem = !matcher && elem)) {
+                                    matchedCount--;
+                                }
+
+                                // Lengthen the array for every element, matched or not
+                                if (seed) {
+                                    unmatched.push(elem);
+                                }
+                            }
+                        }
+
+                        // `i` is now the count of elements visited above, and adding it to `matchedCount`
+                        // makes the latter nonnegative.
+                        matchedCount += i;
+
+                        // Apply set filters to unmatched elements
+                        // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
+                        // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
+                        // no element matchers and no seed.
+                        // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
+                        // case, which will result in a "00" `matchedCount` that differs from `i` but is also
+                        // numerically zero.
+                        if (bySet && i !== matchedCount) {
+                            j = 0;
+                            while ((matcher = setMatchers[j++])) {
+                                matcher(unmatched, setMatched, context, xml);
+                            }
+
+                            if (seed) {
+                                // Reintegrate element matches to eliminate the need for sorting
+                                if (matchedCount > 0) {
+                                    while (i--) {
+                                        if (!(unmatched[i] || setMatched[i])) {
+                                            setMatched[i] = pop.call(results);
+                                        }
+                                    }
+                                }
+
+                                // Discard index placeholder values to get only actual matches
+                                setMatched = condense(setMatched);
+                            }
+
+                            // Add matches to results
+                            push.apply(results, setMatched);
+
+                            // Seedless set matches succeeding multiple successful matchers stipulate sorting
+                            if (outermost && !seed && setMatched.length > 0 &&
+                                ( matchedCount + setMatchers.length ) > 1) {
+
+                                Sizzle.uniqueSort(results);
+                            }
+                        }
+
+                        // Override manipulation of globals by nested matchers
+                        if (outermost) {
+                            dirruns = dirrunsUnique;
+                            outermostContext = contextBackup;
+                        }
+
+                        return unmatched;
+                    };
+
+                return bySet ?
+                    markFunction(superMatcher) :
+                    superMatcher;
+            }
+
+            compile = Sizzle.compile = function (selector, match /* Internal Use Only */) {
+                var i,
+                    setMatchers = [],
+                    elementMatchers = [],
+                    cached = compilerCache[selector + " "];
+
+                if (!cached) {
+                    // Generate a function of recursive functions that can be used to check each element
+                    if (!match) {
+                        match = tokenize(selector);
+                    }
+                    i = match.length;
+                    while (i--) {
+                        cached = matcherFromTokens(match[i]);
+                        if (cached[expando]) {
+                            setMatchers.push(cached);
+                        } else {
+                            elementMatchers.push(cached);
+                        }
+                    }
+
+                    // Cache the compiled function
+                    cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
+
+                    // Save selector and tokenization
+                    cached.selector = selector;
+                }
+                return cached;
+            };
+
+            /**
+             * A low-level selection function that works with Sizzle's compiled
+             *  selector functions
+             * @param {String|Function} selector A selector or a pre-compiled
+             *  selector function built with Sizzle.compile
+             * @param {Element} context
+             * @param {Array} [results]
+             * @param {Array} [seed] A set of elements to match against
+             */
+            select = Sizzle.select = function (selector, context, results, seed) {
+                var i, tokens, token, type, find,
+                    compiled = typeof selector === "function" && selector,
+                    match = !seed && tokenize((selector = compiled.selector || selector));
+
+                results = results || [];
+
+                // Try to minimize operations if there is only one selector in the list and no seed
+                // (the latter of which guarantees us context)
+                if (match.length === 1) {
+
+                    // Reduce context if the leading compound selector is an ID
+                    tokens = match[0] = match[0].slice(0);
+                    if (tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+                        support.getById && context.nodeType === 9 && documentIsHTML &&
+                        Expr.relative[tokens[1].type]) {
+
+                        context = ( Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [] )[0];
+                        if (!context) {
+                            return results;
+
+                            // Precompiled matchers will still verify ancestry, so step up a level
+                        } else if (compiled) {
+                            context = context.parentNode;
+                        }
+
+                        selector = selector.slice(tokens.shift().value.length);
+                    }
+
+                    // Fetch a seed set for right-to-left matching
+                    i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
+                    while (i--) {
+                        token = tokens[i];
+
+                        // Abort if we hit a combinator
+                        if (Expr.relative[(type = token.type)]) {
+                            break;
+                        }
+                        if ((find = Expr.find[type])) {
+                            // Search, expanding context for leading sibling combinators
+                            if ((seed = find(
+                                    token.matches[0].replace(runescape, funescape),
+                                    rsibling.test(tokens[0].type) && testContext(context.parentNode) || context
+                                ))) {
+
+                                // If seed is empty or no tokens remain, we can return early
+                                tokens.splice(i, 1);
+                                selector = seed.length && toSelector(tokens);
+                                if (!selector) {
+                                    push.apply(results, seed);
+                                    return results;
+                                }
+
+                                break;
+                            }
+                        }
+                    }
+                }
+
+                // Compile and execute a filtering function if one is not provided
+                // Provide `match` to avoid retokenization if we modified the selector above
+                ( compiled || compile(selector, match) )(
+                    seed,
+                    context,
+                    !documentIsHTML,
+                    results,
+                    !context || rsibling.test(selector) && testContext(context.parentNode) || context
+                );
+                return results;
+            };
+
+// One-time assignments
+
+// Sort stability
+            support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+            support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+            setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+            support.sortDetached = assert(function (div1) {
+                // Should return 1, but returns 4 (following)
+                return div1.compareDocumentPosition(document.createElement("div")) & 1;
+            });
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+            if (!assert(function (div) {
+                    div.innerHTML = "<a href='#'></a>";
+                    return div.firstChild.getAttribute("href") === "#";
+                })) {
+                addHandle("type|href|height|width", function (elem, name, isXML) {
+                    if (!isXML) {
+                        return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
+                    }
+                });
+            }
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+            if (!support.attributes || !assert(function (div) {
+                    div.innerHTML = "<input/>";
+                    div.firstChild.setAttribute("value", "");
+                    return div.firstChild.getAttribute("value") === "";
+                })) {
+                addHandle("value", function (elem, name, isXML) {
+                    if (!isXML && elem.nodeName.toLowerCase() === "input") {
+                        return elem.defaultValue;
+                    }
+                });
+            }
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+            if (!assert(function (div) {
+                    return div.getAttribute("disabled") == null;
+                })) {
+                addHandle(booleans, function (elem, name, isXML) {
+                    var val;
+                    if (!isXML) {
+                        return elem[name] === true ? name.toLowerCase() :
+                            (val = elem.getAttributeNode(name)) && val.specified ?
+                                val.value :
+                                null;
+                    }
+                });
+            }
+
+            return Sizzle;
+
+        })(window);
+
+
+    jQuery.find = Sizzle;
+    jQuery.expr = Sizzle.selectors;
+    jQuery.expr[":"] = jQuery.expr.pseudos;
+    jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
+    jQuery.text = Sizzle.getText;
+    jQuery.isXMLDoc = Sizzle.isXML;
+    jQuery.contains = Sizzle.contains;
+
+
+    var dir = function (elem, dir, until) {
+        var matched = [],
+            truncate = until !== undefined;
+
+        while (( elem = elem[dir] ) && elem.nodeType !== 9) {
+            if (elem.nodeType === 1) {
+                if (truncate && jQuery(elem).is(until)) {
+                    break;
+                }
+                matched.push(elem);
+            }
+        }
+        return matched;
+    };
+
+
+    var siblings = function (n, elem) {
+        var matched = [];
+
+        for (; n; n = n.nextSibling) {
+            if (n.nodeType === 1 && n !== elem) {
+                matched.push(n);
+            }
+        }
+
+        return matched;
+    };
+
+
+    var rneedsContext = jQuery.expr.match.needsContext;
+
+    var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
+
+
+    var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+    function winnow(elements, qualifier, not) {
+        if (jQuery.isFunction(qualifier)) {
+            return jQuery.grep(elements, function (elem, i) {
+                /* jshint -W018 */
+                return !!qualifier.call(elem, i, elem) !== not;
+            });
+
+        }
+
+        if (qualifier.nodeType) {
+            return jQuery.grep(elements, function (elem) {
+                return ( elem === qualifier ) !== not;
+            });
+
+        }
+
+        if (typeof qualifier === "string") {
+            if (risSimple.test(qualifier)) {
+                return jQuery.filter(qualifier, elements, not);
+            }
+
+            qualifier = jQuery.filter(qualifier, elements);
+        }
+
+        return jQuery.grep(elements, function (elem) {
+            return ( jQuery.inArray(elem, qualifier) > -1 ) !== not;
+        });
+    }
+
+    jQuery.filter = function (expr, elems, not) {
+        var elem = elems[0];
+
+        if (not) {
+            expr = ":not(" + expr + ")";
+        }
+
+        return elems.length === 1 && elem.nodeType === 1 ?
+            jQuery.find.matchesSelector(elem, expr) ? [elem] : [] :
+            jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {
+                return elem.nodeType === 1;
+            }));
+    };
+
+    jQuery.fn.extend({
+        find: function (selector) {
+            var i,
+                ret = [],
+                self = this,
+                len = self.length;
+
+            if (typeof selector !== "string") {
+                return this.pushStack(jQuery(selector).filter(function () {
+                    for (i = 0; i < len; i++) {
+                        if (jQuery.contains(self[i], this)) {
+                            return true;
+                        }
+                    }
+                }));
+            }
+
+            for (i = 0; i < len; i++) {
+                jQuery.find(selector, self[i], ret);
+            }
+
+            // Needed because $( selector, context ) becomes $( context ).find( selector )
+            ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret);
+            ret.selector = this.selector ? this.selector + " " + selector : selector;
+            return ret;
+        },
+        filter: function (selector) {
+            return this.pushStack(winnow(this, selector || [], false));
+        },
+        not: function (selector) {
+            return this.pushStack(winnow(this, selector || [], true));
+        },
+        is: function (selector) {
+            return !!winnow(
+                this,
+
+                // If this is a positional/relative selector, check membership in the returned set
+                // so $("p:first").is("p:last") won't return true for a doc with two "p".
+                typeof selector === "string" && rneedsContext.test(selector) ?
+                    jQuery(selector) :
+                    selector || [],
+                false
+            ).length;
+        }
+    });
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+    var rootjQuery,
+
+        // A simple way to check for HTML strings
+        // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+        // Strict HTML recognition (#11290: must start with <)
+        rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+        init = jQuery.fn.init = function (selector, context, root) {
+            var match, elem;
+
+            // HANDLE: $(""), $(null), $(undefined), $(false)
+            if (!selector) {
+                return this;
+            }
+
+            // init accepts an alternate rootjQuery
+            // so migrate can support jQuery.sub (gh-2101)
+            root = root || rootjQuery;
+
+            // Handle HTML strings
+            if (typeof selector === "string") {
+                if (selector.charAt(0) === "<" &&
+                    selector.charAt(selector.length - 1) === ">" &&
+                    selector.length >= 3) {
+
+                    // Assume that strings that start and end with <> are HTML and skip the regex check
+                    match = [null, selector, null];
+
+                } else {
+                    match = rquickExpr.exec(selector);
+                }
+
+                // Match html or make sure no context is specified for #id
+                if (match && ( match[1] || !context )) {
+
+                    // HANDLE: $(html) -> $(array)
+                    if (match[1]) {
+                        context = context instanceof jQuery ? context[0] : context;
+
+                        // scripts is true for back-compat
+                        // Intentionally let the error be thrown if parseHTML is not present
+                        jQuery.merge(this, jQuery.parseHTML(
+                            match[1],
+                            context && context.nodeType ? context.ownerDocument || context : document,
+                            true
+                        ));
+
+                        // HANDLE: $(html, props)
+                        if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
+                            for (match in context) {
+
+                                // Properties of context are called as methods if possible
+                                if (jQuery.isFunction(this[match])) {
+                                    this[match](context[match]);
+
+                                    // ...and otherwise set as attributes
+                                } else {
+                                    this.attr(match, context[match]);
+                                }
+                            }
+                        }
+
+                        return this;
+
+                        // HANDLE: $(#id)
+                    } else {
+                        elem = document.getElementById(match[2]);
+
+                        // Check parentNode to catch when Blackberry 4.6 returns
+                        // nodes that are no longer in the document #6963
+                        if (elem && elem.parentNode) {
+
+                            // Handle the case where IE and Opera return items
+                            // by name instead of ID
+                            if (elem.id !== match[2]) {
+                                return rootjQuery.find(selector);
+                            }
+
+                            // Otherwise, we inject the element directly into the jQuery object
+                            this.length = 1;
+                            this[0] = elem;
+                        }
+
+                        this.context = document;
+                        this.selector = selector;
+                        return this;
+                    }
+
+                    // HANDLE: $(expr, $(...))
+                } else if (!context || context.jquery) {
+                    return ( context || root ).find(selector);
+
+                    // HANDLE: $(expr, context)
+                    // (which is just equivalent to: $(context).find(expr)
+                } else {
+                    return this.constructor(context).find(selector);
+                }
+
+                // HANDLE: $(DOMElement)
+            } else if (selector.nodeType) {
+                this.context = this[0] = selector;
+                this.length = 1;
+                return this;
+
+                // HANDLE: $(function)
+                // Shortcut for document ready
+            } else if (jQuery.isFunction(selector)) {
+                return typeof root.ready !== "undefined" ?
+                    root.ready(selector) :
+
+                    // Execute immediately if ready is not present
+                    selector(jQuery);
+            }
+
+            if (selector.selector !== undefined) {
+                this.selector = selector.selector;
+                this.context = selector.context;
+            }
+
+            return jQuery.makeArray(selector, this);
+        };
+
+// Give the init function the jQuery prototype for later instantiation
+    init.prototype = jQuery.fn;
+
+// Initialize central reference
+    rootjQuery = jQuery(document);
+
+
+    var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+
+        // methods guaranteed to produce a unique set when starting from a unique set
+        guaranteedUnique = {
+            children: true,
+            contents: true,
+            next: true,
+            prev: true
+        };
+
+    jQuery.fn.extend({
+        has: function (target) {
+            var i,
+                targets = jQuery(target, this),
+                len = targets.length;
+
+            return this.filter(function () {
+                for (i = 0; i < len; i++) {
+                    if (jQuery.contains(this, targets[i])) {
+                        return true;
+                    }
+                }
+            });
+        },
+
+        closest: function (selectors, context) {
+            var cur,
+                i = 0,
+                l = this.length,
+                matched = [],
+                pos = rneedsContext.test(selectors) || typeof selectors !== "string" ?
+                    jQuery(selectors, context || this.context) :
+                    0;
+
+            for (; i < l; i++) {
+                for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
+
+                    // Always skip document fragments
+                    if (cur.nodeType < 11 && ( pos ?
+                            pos.index(cur) > -1 :
+
+                            // Don't pass non-elements to Sizzle
+                            cur.nodeType === 1 &&
+                            jQuery.find.matchesSelector(cur, selectors) )) {
+
+                        matched.push(cur);
+                        break;
+                    }
+                }
+            }
+
+            return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
+        },
+
+        // Determine the position of an element within
+        // the matched set of elements
+        index: function (elem) {
+
+            // No argument, return index in parent
+            if (!elem) {
+                return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+            }
+
+            // index in selector
+            if (typeof elem === "string") {
+                return jQuery.inArray(this[0], jQuery(elem));
+            }
+
+            // Locate the position of the desired element
+            return jQuery.inArray(
+                // If it receives a jQuery object, the first element is used
+                elem.jquery ? elem[0] : elem, this);
+        },
+
+        add: function (selector, context) {
+            return this.pushStack(
+                jQuery.uniqueSort(
+                    jQuery.merge(this.get(), jQuery(selector, context))
+                )
+            );
+        },
+
+        addBack: function (selector) {
+            return this.add(selector == null ?
+                this.prevObject : this.prevObject.filter(selector)
+            );
+        }
+    });
+
+    function sibling(cur, dir) {
+        do {
+            cur = cur[dir];
+        } while (cur && cur.nodeType !== 1);
+
+        return cur;
+    }
+
+    jQuery.each({
+        parent: function (elem) {
+            var parent = elem.parentNode;
+            return parent && parent.nodeType !== 11 ? parent : null;
+        },
+        parents: function (elem) {
+            return dir(elem, "parentNode");
+        },
+        parentsUntil: function (elem, i, until) {
+            return dir(elem, "parentNode", until);
+        },
+        next: function (elem) {
+            return sibling(elem, "nextSibling");
+        },
+        prev: function (elem) {
+            return sibling(elem, "previousSibling");
+        },
+        nextAll: function (elem) {
+            return dir(elem, "nextSibling");
+        },
+        prevAll: function (elem) {
+            return dir(elem, "previousSibling");
+        },
+        nextUntil: function (elem, i, until) {
+            return dir(elem, "nextSibling", until);
+        },
+        prevUntil: function (elem, i, until) {
+            return dir(elem, "previousSibling", until);
+        },
+        siblings: function (elem) {
+            return siblings(( elem.parentNode || {} ).firstChild, elem);
+        },
+        children: function (elem) {
+            return siblings(elem.firstChild);
+        },
+        contents: function (elem) {
+            return jQuery.nodeName(elem, "iframe") ?
+                elem.contentDocument || elem.contentWindow.document :
+                jQuery.merge([], elem.childNodes);
+        }
+    }, function (name, fn) {
+        jQuery.fn[name] = function (until, selector) {
+            var ret = jQuery.map(this, fn, until);
+
+            if (name.slice(-5) !== "Until") {
+                selector = until;
+            }
+
+            if (selector && typeof selector === "string") {
+                ret = jQuery.filter(selector, ret);
+            }
+
+            if (this.length > 1) {
+
+                // Remove duplicates
+                if (!guaranteedUnique[name]) {
+                    ret = jQuery.uniqueSort(ret);
+                }
+
+                // Reverse order for parents* and prev-derivatives
+                if (rparentsprev.test(name)) {
+                    ret = ret.reverse();
+                }
+            }
+
+            return this.pushStack(ret);
+        };
+    });
+    var rnotwhite = ( /\S+/g );
+
+
+// Convert String-formatted options into Object-formatted ones
+    function createOptions(options) {
+        var object = {};
+        jQuery.each(options.match(rnotwhite) || [], function (_, flag) {
+            object[flag] = true;
+        });
+        return object;
+    }
+
+    /*
+     * Create a callback list using the following parameters:
+     *
+     *	options: an optional list of space-separated options that will change how
+     *			the callback list behaves or a more traditional option object
+     *
+     * By default a callback list will act like an event callback list and can be
+     * "fired" multiple times.
+     *
+     * Possible options:
+     *
+     *	once:			will ensure the callback list can only be fired once (like a Deferred)
+     *
+     *	memory:			will keep track of previous values and will call any callback added
+     *					after the list has been fired right away with the latest "memorized"
+     *					values (like a Deferred)
+     *
+     *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+     *
+     *	stopOnFalse:	interrupt callings when a callback returns false
+     *
+     */
+    jQuery.Callbacks = function (options) {
+
+        // Convert options from String-formatted to Object-formatted if needed
+        // (we check in cache first)
+        options = typeof options === "string" ?
+            createOptions(options) :
+            jQuery.extend({}, options);
+
+        var // Flag to know if list is currently firing
+            firing,
+
+            // Last fire value for non-forgettable lists
+            memory,
+
+            // Flag to know if list was already fired
+            fired,
+
+            // Flag to prevent firing
+            locked,
+
+            // Actual callback list
+            list = [],
+
+            // Queue of execution data for repeatable lists
+            queue = [],
+
+            // Index of currently firing callback (modified by add/remove as needed)
+            firingIndex = -1,
+
+            // Fire callbacks
+            fire = function () {
+
+                // Enforce single-firing
+                locked = options.once;
+
+                // Execute callbacks for all pending executions,
+                // respecting firingIndex overrides and runtime changes
+                fired = firing = true;
+                for (; queue.length; firingIndex = -1) {
+                    memory = queue.shift();
+                    while (++firingIndex < list.length) {
+
+                        // Run callback and check for early termination
+                        if (list[firingIndex].apply(memory[0], memory[1]) === false &&
+                            options.stopOnFalse) {
+
+                            // Jump to end and forget the data so .add doesn't re-fire
+                            firingIndex = list.length;
+                            memory = false;
+                        }
+                    }
+                }
+
+                // Forget the data if we're done with it
+                if (!options.memory) {
+                    memory = false;
+                }
+
+                firing = false;
+
+                // Clean up if we're done firing for good
+                if (locked) {
+
+                    // Keep an empty list if we have data for future add calls
+                    if (memory) {
+                        list = [];
+
+                        // Otherwise, this object is spent
+                    } else {
+                        list = "";
+                    }
+                }
+            },
+
+            // Actual Callbacks object
+            self = {
+
+                // Add a callback or a collection of callbacks to the list
+                add: function () {
+                    if (list) {
+
+                        // If we have memory from a past run, we should fire after adding
+                        if (memory && !firing) {
+                            firingIndex = list.length - 1;
+                            queue.push(memory);
+                        }
+
+                        (function add(args) {
+                            jQuery.each(args, function (_, arg) {
+                                if (jQuery.isFunction(arg)) {
+                                    if (!options.unique || !self.has(arg)) {
+                                        list.push(arg);
+                                    }
+                                } else if (arg && arg.length && jQuery.type(arg) !== "string") {
+
+                                    // Inspect recursively
+                                    add(arg);
+                                }
+                            });
+                        })(arguments);
+
+                        if (memory && !firing) {
+                            fire();
+                        }
+                    }
+                    return this;
+                },
+
+                // Remove a callback from the list
+                remove: function () {
+                    jQuery.each(arguments, function (_, arg) {
+                        var index;
+                        while (( index = jQuery.inArray(arg, list, index) ) > -1) {
+                            list.splice(index, 1);
+
+                            // Handle firing indexes
+                            if (index <= firingIndex) {
+                                firingIndex--;
+                            }
+                        }
+                    });
+                    return this;
+                },
+
+                // Check if a given callback is in the list.
+                // If no argument is given, return whether or not list has callbacks attached.
+                has: function (fn) {
+                    return fn ?
+                        jQuery.inArray(fn, list) > -1 :
+                        list.length > 0;
+                },
+
+                // Remove all callbacks from the list
+                empty: function () {
+                    if (list) {
+                        list = [];
+                    }
+                    return this;
+                },
+
+                // Disable .fire and .add
+                // Abort any current/pending executions
+                // Clear all callbacks and values
+                disable: function () {
+                    locked = queue = [];
+                    list = memory = "";
+                    return this;
+                },
+                disabled: function () {
+                    return !list;
+                },
+
+                // Disable .fire
+                // Also disable .add unless we have memory (since it would have no effect)
+                // Abort any pending executions
+                lock: function () {
+                    locked = true;
+                    if (!memory) {
+                        self.disable();
+                    }
+                    return this;
+                },
+                locked: function () {
+                    return !!locked;
+                },
+
+                // Call all callbacks with the given context and arguments
+                fireWith: function (context, args) {
+                    if (!locked) {
+                        args = args || [];
+                        args = [context, args.slice ? args.slice() : args];
+                        queue.push(args);
+                        if (!firing) {
+                            fire();
+                        }
+                    }
+                    return this;
+                },
+
+                // Call all the callbacks with the given arguments
+                fire: function () {
+                    self.fireWith(this, arguments);
+                    return this;
+                },
+
+                // To know if the callbacks have already been called at least once
+                fired: function () {
+                    return !!fired;
+                }
+            };
+
+        return self;
+    };
+
+
+    jQuery.extend({
+
+        Deferred: function (func) {
+            var tuples = [
+
+                    // action, add listener, listener list, final state
+                    ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
+                    ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
+                    ["notify", "progress", jQuery.Callbacks("memory")]
+                ],
+                state = "pending",
+                promise = {
+                    state: function () {
+                        return state;
+                    },
+                    always: function () {
+                        deferred.done(arguments).fail(arguments);
+                        return this;
+                    },
+                    then: function (/* fnDone, fnFail, fnProgress */) {
+                        var fns = arguments;
+                        return jQuery.Deferred(function (newDefer) {
+                            jQuery.each(tuples, function (i, tuple) {
+                                var fn = jQuery.isFunction(fns[i]) && fns[i];
+
+                                // deferred[ done | fail | progress ] for forwarding actions to newDefer
+                                deferred[tuple[1]](function () {
+                                    var returned = fn && fn.apply(this, arguments);
+                                    if (returned && jQuery.isFunction(returned.promise)) {
+                                        returned.promise()
+                                            .progress(newDefer.notify)
+                                            .done(newDefer.resolve)
+                                            .fail(newDefer.reject);
+                                    } else {
+                                        newDefer[tuple[0] + "With"](
+                                            this === promise ? newDefer.promise() : this,
+                                            fn ? [returned] : arguments
+                                        );
+                                    }
+                                });
+                            });
+                            fns = null;
+                        }).promise();
+                    },
+
+                    // Get a promise for this deferred
+                    // If obj is provided, the promise aspect is added to the object
+                    promise: function (obj) {
+                        return obj != null ? jQuery.extend(obj, promise) : promise;
+                    }
+                },
+                deferred = {};
+
+            // Keep pipe for back-compat
+            promise.pipe = promise.then;
+
+            // Add list-specific methods
+            jQuery.each(tuples, function (i, tuple) {
+                var list = tuple[2],
+                    stateString = tuple[3];
+
+                // promise[ done | fail | progress ] = list.add
+                promise[tuple[1]] = list.add;
+
+                // Handle state
+                if (stateString) {
+                    list.add(function () {
+
+                        // state = [ resolved | rejected ]
+                        state = stateString;
+
+                        // [ reject_list | resolve_list ].disable; progress_list.lock
+                    }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
+                }
+
+                // deferred[ resolve | reject | notify ]
+                deferred[tuple[0]] = function () {
+                    deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments);
+                    return this;
+                };
+                deferred[tuple[0] + "With"] = list.fireWith;
+            });
+
+            // Make the deferred a promise
+            promise.promise(deferred);
+
+            // Call given func if any
+            if (func) {
+                func.call(deferred, deferred);
+            }
+
+            // All done!
+            return deferred;
+        },
+
+        // Deferred helper
+        when: function (subordinate /* , ..., subordinateN */) {
+            var i = 0,
+                resolveValues = slice.call(arguments),
+                length = resolveValues.length,
+
+                // the count of uncompleted subordinates
+                remaining = length !== 1 ||
+                ( subordinate && jQuery.isFunction(subordinate.promise) ) ? length : 0,
+
+                // the master Deferred.
+                // If resolveValues consist of only a single Deferred, just use that.
+                deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+                // Update function for both resolve and progress values
+                updateFunc = function (i, contexts, values) {
+                    return function (value) {
+                        contexts[i] = this;
+                        values[i] = arguments.length > 1 ? slice.call(arguments) : value;
+                        if (values === progressValues) {
+                            deferred.notifyWith(contexts, values);
+
+                        } else if (!( --remaining )) {
+                            deferred.resolveWith(contexts, values);
+                        }
+                    };
+                },
+
+                progressValues, progressContexts, resolveContexts;
+
+            // add listeners to Deferred subordinates; treat others as resolved
+            if (length > 1) {
+                progressValues = new Array(length);
+                progressContexts = new Array(length);
+                resolveContexts = new Array(length);
+                for (; i < length; i++) {
+                    if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
+                        resolveValues[i].promise()
+                            .progress(updateFunc(i, progressContexts, progressValues))
+                            .done(updateFunc(i, resolveContexts, resolveValues))
+                            .fail(deferred.reject);
+                    } else {
+                        --remaining;
+                    }
+                }
+            }
+
+            // if we're not waiting on anything, resolve the master
+            if (!remaining) {
+                deferred.resolveWith(resolveContexts, resolveValues);
+            }
+
+            return deferred.promise();
+        }
+    });
+
+
+// The deferred used on DOM ready
+    var readyList;
+
+    jQuery.fn.ready = function (fn) {
+
+        // Add the callback
+        jQuery.ready.promise().done(fn);
+
+        return this;
+    };
+
+    jQuery.extend({
+
+        // Is the DOM ready to be used? Set to true once it occurs.
+        isReady: false,
+
+        // A counter to track how many items to wait for before
+        // the ready event fires. See #6781
+        readyWait: 1,
+
+        // Hold (or release) the ready event
+        holdReady: function (hold) {
+            if (hold) {
+                jQuery.readyWait++;
+            } else {
+                jQuery.ready(true);
+            }
+        },
+
+        // Handle when the DOM is ready
+        ready: function (wait) {
+
+            // Abort if there are pending holds or we're already ready
+            if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
+                return;
+            }
+
+            // Remember that the DOM is ready
+            jQuery.isReady = true;
+
+            // If a normal DOM Ready event fired, decrement, and wait if need be
+            if (wait !== true && --jQuery.readyWait > 0) {
+                return;
+            }
+
+            // If there are functions bound, to execute
+            readyList.resolveWith(document, [jQuery]);
+
+            // Trigger any bound ready events
+            if (jQuery.fn.triggerHandler) {
+                jQuery(document).triggerHandler("ready");
+                jQuery(document).off("ready");
+            }
+        }
+    });
+
+    /**
+     * Clean-up method for dom ready events
+     */
+    function detach() {
+        if (document.addEventListener) {
+            document.removeEventListener("DOMContentLoaded", completed);
+            window.removeEventListener("load", completed);
+
+        } else {
+            document.detachEvent("onreadystatechange", completed);
+            window.detachEvent("onload", completed);
+        }
+    }
+
+    /**
+     * The ready event handler and self cleanup method
+     */
+    function completed() {
+
+        // readyState === "complete" is good enough for us to call the dom ready in oldIE
+        if (document.addEventListener ||
+            window.event.type === "load" ||
+            document.readyState === "complete") {
+
+            detach();
+            jQuery.ready();
+        }
+    }
+
+    jQuery.ready.promise = function (obj) {
+        if (!readyList) {
+
+            readyList = jQuery.Deferred();
+
+            // Catch cases where $(document).ready() is called
+            // after the browser event has already occurred.
+            // Support: IE6-10
+            // Older IE sometimes signals "interactive" too soon
+            if (document.readyState === "complete" ||
+                ( document.readyState !== "loading" && !document.documentElement.doScroll )) {
+
+                // Handle it asynchronously to allow scripts the opportunity to delay ready
+                window.setTimeout(jQuery.ready);
+
+                // Standards-based browsers support DOMContentLoaded
+            } else if (document.addEventListener) {
+
+                // Use the handy event callback
+                document.addEventListener("DOMContentLoaded", completed);
+
+                // A fallback to window.onload, that will always work
+                window.addEventListener("load", completed);
+
+                // If IE event model is used
+            } else {
+
+                // Ensure firing before onload, maybe late but safe also for iframes
+                document.attachEvent("onreadystatechange", completed);
+
+                // A fallback to window.onload, that will always work
+                window.attachEvent("onload", completed);
+
+                // If IE and not a frame
+                // continually check to see if the document is ready
+                var top = false;
+
+                try {
+                    top = window.frameElement == null && document.documentElement;
+                } catch (e) {
+                }
+
+                if (top && top.doScroll) {
+                    (function doScrollCheck() {
+                        if (!jQuery.isReady) {
+
+                            try {
+
+                                // Use the trick by Diego Perini
+                                // http://javascript.nwbox.com/IEContentLoaded/
+                                top.doScroll("left");
+                            } catch (e) {
+                                return window.setTimeout(doScrollCheck, 50);
+                            }
+
+                            // detach all dom ready events
+                            detach();
+
+                            // and execute any waiting functions
+                            jQuery.ready();
+                        }
+                    })();
+                }
+            }
+        }
+        return readyList.promise(obj);
+    };
+
+// Kick off the DOM ready check even if the user does not
+    jQuery.ready.promise();
+
+
+// Support: IE<9
+// Iteration over object's inherited properties before its own
+    var i;
+    for (i in jQuery(support)) {
+        break;
+    }
+    support.ownFirst = i === "0";
+
+// Note: most support tests are defined in their respective modules.
+// false until the test is run
+    support.inlineBlockNeedsLayout = false;
+
+// Execute ASAP in case we need to set body.style.zoom
+    jQuery(function () {
+
+        // Minified: var a,b,c,d
+        var val, div, body, container;
+
+        body = document.getElementsByTagName("body")[0];
+        if (!body || !body.style) {
+
+            // Return for frameset docs that don't have a body
+            return;
+        }
+
+        // Setup
+        div = document.createElement("div");
+        container = document.createElement("div");
+        container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+        body.appendChild(container).appendChild(div);
+
+        if (typeof div.style.zoom !== "undefined") {
+
+            // Support: IE<8
+            // Check if natively block-level elements act like inline-block
+            // elements when setting their display to 'inline' and giving
+            // them layout
+            div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
+
+            support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
+            if (val) {
+
+                // Prevent IE 6 from affecting layout for positioned elements #11048
+                // Prevent IE from shrinking the body in IE 7 mode #12869
+                // Support: IE<8
+                body.style.zoom = 1;
+            }
+        }
+
+        body.removeChild(container);
+    });
+
+
+    (function () {
+        var div = document.createElement("div");
+
+        // Support: IE<9
+        support.deleteExpando = true;
+        try {
+            delete div.test;
+        } catch (e) {
+            support.deleteExpando = false;
+        }
+
+        // Null elements to avoid leaks in IE.
+        div = null;
+    })();
+    var acceptData = function (elem) {
+        var noData = jQuery.noData[( elem.nodeName + " " ).toLowerCase()],
+            nodeType = +elem.nodeType || 1;
+
+        // Do not set data on non-element DOM nodes because it will not be cleared (#8335).
+        return nodeType !== 1 && nodeType !== 9 ?
+            false :
+
+            // Nodes accept data unless otherwise specified; rejection can be conditional
+            !noData || noData !== true && elem.getAttribute("classid") === noData;
+    };
+
+
+    var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+        rmultiDash = /([A-Z])/g;
+
+    function dataAttr(elem, key, data) {
+
+        // If nothing was found internally, try to fetch any
+        // data from the HTML5 data-* attribute
+        if (data === undefined && elem.nodeType === 1) {
+
+            var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
+
+            data = elem.getAttribute(name);
+
+            if (typeof data === "string") {
+                try {
+                    data = data === "true" ? true :
+                        data === "false" ? false :
+                            data === "null" ? null :
+
+                                // Only convert to a number if it doesn't change the string
+                                +data + "" === data ? +data :
+                                    rbrace.test(data) ? jQuery.parseJSON(data) :
+                                        data;
+                } catch (e) {
+                }
+
+                // Make sure we set the data so it isn't changed later
+                jQuery.data(elem, key, data);
+
+            } else {
+                data = undefined;
+            }
+        }
+
+        return data;
+    }
+
+// checks a cache object for emptiness
+    function isEmptyDataObject(obj) {
+        var name;
+        for (name in obj) {
+
+            // if the public data object is empty, the private is still empty
+            if (name === "data" && jQuery.isEmptyObject(obj[name])) {
+                continue;
+            }
+            if (name !== "toJSON") {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    function internalData(elem, name, data, pvt /* Internal Use Only */) {
+        if (!acceptData(elem)) {
+            return;
+        }
+
+        var ret, thisCache,
+            internalKey = jQuery.expando,
+
+            // We have to handle DOM nodes and JS objects differently because IE6-7
+            // can't GC object references properly across the DOM-JS boundary
+            isNode = elem.nodeType,
+
+            // Only DOM nodes need the global jQuery cache; JS object data is
+            // attached directly to the object so GC can occur automatically
+            cache = isNode ? jQuery.cache : elem,
+
+            // Only defining an ID for JS objects if its cache already exists allows
+            // the code to shortcut on the same path as a DOM node with no cache
+            id = isNode ? elem[internalKey] : elem[internalKey] && internalKey;
+
+        // Avoid doing any more work than we need to when trying to get data on an
+        // object that has no data at all
+        if (( !id || !cache[id] || ( !pvt && !cache[id].data ) ) &&
+            data === undefined && typeof name === "string") {
+            return;
+        }
+
+        if (!id) {
+
+            // Only DOM nodes need a new unique ID for each element since their data
+            // ends up in the global cache
+            if (isNode) {
+                id = elem[internalKey] = deletedIds.pop() || jQuery.guid++;
+            } else {
+                id = internalKey;
+            }
+        }
+
+        if (!cache[id]) {
+
+            // Avoid exposing jQuery metadata on plain JS objects when the object
+            // is serialized using JSON.stringify
+            cache[id] = isNode ? {} : {toJSON: jQuery.noop};
+        }
+
+        // An object can be passed to jQuery.data instead of a key/value pair; this gets
+        // shallow copied over onto the existing cache
+        if (typeof name === "object" || typeof name === "function") {
+            if (pvt) {
+                cache[id] = jQuery.extend(cache[id], name);
+            } else {
+                cache[id].data = jQuery.extend(cache[id].data, name);
+            }
+        }
+
+        thisCache = cache[id];
+
+        // jQuery data() is stored in a separate object inside the object's internal data
+        // cache in order to avoid key collisions between internal data and user-defined
+        // data.
+        if (!pvt) {
+            if (!thisCache.data) {
+                thisCache.data = {};
+            }
+
+            thisCache = thisCache.data;
+        }
+
+        if (data !== undefined) {
+            thisCache[jQuery.camelCase(name)] = data;
+        }
+
+        // Check for both converted-to-camel and non-converted data property names
+        // If a data property was specified
+        if (typeof name === "string") {
+
+            // First Try to find as-is property data
+            ret = thisCache[name];
+
+            // Test for null|undefined property data
+            if (ret == null) {
+
+                // Try to find the camelCased property
+                ret = thisCache[jQuery.camelCase(name)];
+            }
+        } else {
+            ret = thisCache;
+        }
+
+        return ret;
+    }
+
+    function internalRemoveData(elem, name, pvt) {
+        if (!acceptData(elem)) {
+            return;
+        }
+
+        var thisCache, i,
+            isNode = elem.nodeType,
+
+            // See jQuery.data for more information
+            cache = isNode ? jQuery.cache : elem,
+            id = isNode ? elem[jQuery.expando] : jQuery.expando;
+
+        // If there is already no cache entry for this object, there is no
+        // purpose in continuing
+        if (!cache[id]) {
+            return;
+        }
+
+        if (name) {
+
+            thisCache = pvt ? cache[id] : cache[id].data;
+
+            if (thisCache) {
+
+                // Support array or space separated string names for data keys
+                if (!jQuery.isArray(name)) {
+
+                    // try the string as a key before any manipulation
+                    if (name in thisCache) {
+                        name = [name];
+                    } else {
+
+                        // split the camel cased version by spaces unless a key with the spaces exists
+                        name = jQuery.camelCase(name);
+                        if (name in thisCache) {
+                            name = [name];
+                        } else {
+                            name = name.split(" ");
+                        }
+                    }
+                } else {
+
+                    // If "name" is an array of keys...
+                    // When data is initially created, via ("key", "val") signature,
+                    // keys will be converted to camelCase.
+                    // Since there is no way to tell _how_ a key was added, remove
+                    // both plain key and camelCase key. #12786
+                    // This will only penalize the array argument path.
+                    name = name.concat(jQuery.map(name, jQuery.camelCase));
+                }
+
+                i = name.length;
+                while (i--) {
+                    delete thisCache[name[i]];
+                }
+
+                // If there is no data left in the cache, we want to continue
+                // and let the cache object itself get destroyed
+                if (pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache)) {
+                    return;
+                }
+            }
+        }
+
+        // See jQuery.data for more information
+        if (!pvt) {
+            delete cache[id].data;
+
+            // Don't destroy the parent cache unless the internal data object
+            // had been the only thing left in it
+            if (!isEmptyDataObject(cache[id])) {
+                return;
+            }
+        }
+
+        // Destroy the cache
+        if (isNode) {
+            jQuery.cleanData([elem], true);
+
+            // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+            /* jshint eqeqeq: false */
+        } else if (support.deleteExpando || cache != cache.window) {
+            /* jshint eqeqeq: true */
+            delete cache[id];
+
+            // When all else fails, undefined
+        } else {
+            cache[id] = undefined;
+        }
+    }
+
+    jQuery.extend({
+        cache: {},
+
+        // The following elements (space-suffixed to avoid Object.prototype collisions)
+        // throw uncatchable exceptions if you attempt to set expando properties
+        noData: {
+            "applet ": true,
+            "embed ": true,
+
+            // ...but Flash objects (which have this classid) *can* handle expandos
+            "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+        },
+
+        hasData: function (elem) {
+            elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];
+            return !!elem && !isEmptyDataObject(elem);
+        },
+
+        data: function (elem, name, data) {
+            return internalData(elem, name, data);
+        },
+
+        removeData: function (elem, name) {
+            return internalRemoveData(elem, name);
+        },
+
+        // For internal use only.
+        _data: function (elem, name, data) {
+            return internalData(elem, name, data, true);
+        },
+
+        _removeData: function (elem, name) {
+            return internalRemoveData(elem, name, true);
+        }
+    });
+
+    jQuery.fn.extend({
+        data: function (key, value) {
+            var i, name, data,
+                elem = this[0],
+                attrs = elem && elem.attributes;
+
+            // Special expections of .data basically thwart jQuery.access,
+            // so implement the relevant behavior ourselves
+
+            // Gets all values
+            if (key === undefined) {
+                if (this.length) {
+                    data = jQuery.data(elem);
+
+                    if (elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) {
+                        i = attrs.length;
+                        while (i--) {
+
+                            // Support: IE11+
+                            // The attrs elements can be null (#14894)
+                            if (attrs[i]) {
+                                name = attrs[i].name;
+                                if (name.indexOf("data-") === 0) {
+                                    name = jQuery.camelCase(name.slice(5));
+                                    dataAttr(elem, name, data[name]);
+                                }
+                            }
+                        }
+                        jQuery._data(elem, "parsedAttrs", true);
+                    }
+                }
+
+                return data;
+            }
+
+            // Sets multiple values
+            if (typeof key === "object") {
+                return this.each(function () {
+                    jQuery.data(this, key);
+                });
+            }
+
+            return arguments.length > 1 ?
+
+                // Sets one value
+                this.each(function () {
+                    jQuery.data(this, key, value);
+                }) :
+
+                // Gets one value
+                // Try to fetch any internally stored data first
+                elem ? dataAttr(elem, key, jQuery.data(elem, key)) : undefined;
+        },
+
+        removeData: function (key) {
+            return this.each(function () {
+                jQuery.removeData(this, key);
+            });
+        }
+    });
+
+
+    jQuery.extend({
+        queue: function (elem, type, data) {
+            var queue;
+
+            if (elem) {
+                type = ( type || "fx" ) + "queue";
+                queue = jQuery._data(elem, type);
+
+                // Speed up dequeue by getting out quickly if this is just a lookup
+                if (data) {
+                    if (!queue || jQuery.isArray(data)) {
+                        queue = jQuery._data(elem, type, jQuery.makeArray(data));
+                    } else {
+                        queue.push(data);
+                    }
+                }
+                return queue || [];
+            }
+        },
+
+        dequeue: function (elem, type) {
+            type = type || "fx";
+
+            var queue = jQuery.queue(elem, type),
+                startLength = queue.length,
+                fn = queue.shift(),
+                hooks = jQuery._queueHooks(elem, type),
+                next = function () {
+                    jQuery.dequeue(elem, type);
+                };
+
+            // If the fx queue is dequeued, always remove the progress sentinel
+            if (fn === "inprogress") {
+                fn = queue.shift();
+                startLength--;
+            }
+
+            if (fn) {
+
+                // Add a progress sentinel to prevent the fx queue from being
+                // automatically dequeued
+                if (type === "fx") {
+                    queue.unshift("inprogress");
+                }
+
+                // clear up the last queue stop function
+                delete hooks.stop;
+                fn.call(elem, next, hooks);
+            }
+
+            if (!startLength && hooks) {
+                hooks.empty.fire();
+            }
+        },
+
+        // not intended for public consumption - generates a queueHooks object,
+        // or returns the current one
+        _queueHooks: function (elem, type) {
+            var key = type + "queueHooks";
+            return jQuery._data(elem, key) || jQuery._data(elem, key, {
+                    empty: jQuery.Callbacks("once memory").add(function () {
+                        jQuery._removeData(elem, type + "queue");
+                        jQuery._removeData(elem, key);
+                    })
+                });
+        }
+    });
+
+    jQuery.fn.extend({
+        queue: function (type, data) {
+            var setter = 2;
+
+            if (typeof type !== "string") {
+                data = type;
+                type = "fx";
+                setter--;
+            }
+
+            if (arguments.length < setter) {
+                return jQuery.queue(this[0], type);
+            }
+
+            return data === undefined ?
+                this :
+                this.each(function () {
+                    var queue = jQuery.queue(this, type, data);
+
+                    // ensure a hooks for this queue
+                    jQuery._queueHooks(this, type);
+
+                    if (type === "fx" && queue[0] !== "inprogress") {
+                        jQuery.dequeue(this, type);
+                    }
+                });
+        },
+        dequeue: function (type) {
+            return this.each(function () {
+                jQuery.dequeue(this, type);
+            });
+        },
+        clearQueue: function (type) {
+            return this.queue(type || "fx", []);
+        },
+
+        // Get a promise resolved when queues of a certain type
+        // are emptied (fx is the type by default)
+        promise: function (type, obj) {
+            var tmp,
+                count = 1,
+                defer = jQuery.Deferred(),
+                elements = this,
+                i = this.length,
+                resolve = function () {
+                    if (!( --count )) {
+                        defer.resolveWith(elements, [elements]);
+                    }
+                };
+
+            if (typeof type !== "string") {
+                obj = type;
+                type = undefined;
+            }
+            type = type || "fx";
+
+            while (i--) {
+                tmp = jQuery._data(elements[i], type + "queueHooks");
+                if (tmp && tmp.empty) {
+                    count++;
+                    tmp.empty.add(resolve);
+                }
+            }
+            resolve();
+            return defer.promise(obj);
+        }
+    });
+
+
+    (function () {
+        var shrinkWrapBlocksVal;
+
+        support.shrinkWrapBlocks = function () {
+            if (shrinkWrapBlocksVal != null) {
+                return shrinkWrapBlocksVal;
+            }
+
+            // Will be changed later if needed.
+            shrinkWrapBlocksVal = false;
+
+            // Minified: var b,c,d
+            var div, body, container;
+
+            body = document.getElementsByTagName("body")[0];
+            if (!body || !body.style) {
+
+                // Test fired too early or in an unsupported environment, exit.
+                return;
+            }
+
+            // Setup
+            div = document.createElement("div");
+            container = document.createElement("div");
+            container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+            body.appendChild(container).appendChild(div);
+
+            // Support: IE6
+            // Check if elements with layout shrink-wrap their children
+            if (typeof div.style.zoom !== "undefined") {
+
+                // Reset CSS: box-sizing; display; margin; border
+                div.style.cssText =
+
+                    // Support: Firefox<29, Android 2.3
+                    // Vendor-prefix box-sizing
+                    "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+                    "box-sizing:content-box;display:block;margin:0;border:0;" +
+                    "padding:1px;width:1px;zoom:1";
+                div.appendChild(document.createElement("div")).style.width = "5px";
+                shrinkWrapBlocksVal = div.offsetWidth !== 3;
+            }
+
+            body.removeChild(container);
+
+            return shrinkWrapBlocksVal;
+        };
+
+    })();
+    var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
+
+    var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i");
+
+
+    var cssExpand = ["Top", "Right", "Bottom", "Left"];
+
+    var isHidden = function (elem, el) {
+
+        // isHidden might be called from jQuery#filter function;
+        // in that case, element will be second argument
+        elem = el || elem;
+        return jQuery.css(elem, "display") === "none" ||
+            !jQuery.contains(elem.ownerDocument, elem);
+    };
+
+
+    function adjustCSS(elem, prop, valueParts, tween) {
+        var adjusted,
+            scale = 1,
+            maxIterations = 20,
+            currentValue = tween ?
+                function () {
+                    return tween.cur();
+                } :
+                function () {
+                    return jQuery.css(elem, prop, "");
+                },
+            initial = currentValue(),
+            unit = valueParts && valueParts[3] || ( jQuery.cssNumber[prop] ? "" : "px" ),
+
+            // Starting value computation is required for potential unit mismatches
+            initialInUnit = ( jQuery.cssNumber[prop] || unit !== "px" && +initial ) &&
+                rcssNum.exec(jQuery.css(elem, prop));
+
+        if (initialInUnit && initialInUnit[3] !== unit) {
+
+            // Trust units reported by jQuery.css
+            unit = unit || initialInUnit[3];
+
+            // Make sure we update the tween properties later on
+            valueParts = valueParts || [];
+
+            // Iteratively approximate from a nonzero starting point
+            initialInUnit = +initial || 1;
+
+            do {
+
+                // If previous iteration zeroed out, double until we get *something*.
+                // Use string for doubling so we don't accidentally see scale as unchanged below
+                scale = scale || ".5";
+
+                // Adjust and apply
+                initialInUnit = initialInUnit / scale;
+                jQuery.style(elem, prop, initialInUnit + unit);
+
+                // Update scale, tolerating zero or NaN from tween.cur()
+                // Break the loop if scale is unchanged or perfect, or if we've just had enough.
+            } while (
+            scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
+                );
+        }
+
+        if (valueParts) {
+            initialInUnit = +initialInUnit || +initial || 0;
+
+            // Apply relative offset (+=/-=) if specified
+            adjusted = valueParts[1] ?
+                initialInUnit + ( valueParts[1] + 1 ) * valueParts[2] :
+                +valueParts[2];
+            if (tween) {
+                tween.unit = unit;
+                tween.start = initialInUnit;
+                tween.end = adjusted;
+            }
+        }
+        return adjusted;
+    }
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+    var access = function (elems, fn, key, value, chainable, emptyGet, raw) {
+        var i = 0,
+            length = elems.length,
+            bulk = key == null;
+
+        // Sets many values
+        if (jQuery.type(key) === "object") {
+            chainable = true;
+            for (i in key) {
+                access(elems, fn, i, key[i], true, emptyGet, raw);
+            }
+
+            // Sets one value
+        } else if (value !== undefined) {
+            chainable = true;
+
+            if (!jQuery.isFunction(value)) {
+                raw = true;
+            }
+
+            if (bulk) {
+
+                // Bulk operations run against the entire set
+                if (raw) {
+                    fn.call(elems, value);
+                    fn = null;
+
+                    // ...except when executing function values
+                } else {
+                    bulk = fn;
+                    fn = function (elem, key, value) {
+                        return bulk.call(jQuery(elem), value);
+                    };
+                }
+            }
+
+            if (fn) {
+                for (; i < length; i++) {
+                    fn(
+                        elems[i],
+                        key,
+                        raw ? value : value.call(elems[i], i, fn(elems[i], key))
+                    );
+                }
+            }
+        }
+
+        return chainable ?
+            elems :
+
+            // Gets
+            bulk ?
+                fn.call(elems) :
+                length ? fn(elems[0], key) : emptyGet;
+    };
+    var rcheckableType = ( /^(?:checkbox|radio)$/i );
+
+    var rtagName = ( /<([\w:-]+)/ );
+
+    var rscriptType = ( /^$|\/(?:java|ecma)script/i );
+
+    var rleadingWhitespace = ( /^\s+/ );
+
+    var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" +
+        "details|dialog|figcaption|figure|footer|header|hgroup|main|" +
+        "mark|meter|nav|output|picture|progress|section|summary|template|time|video";
+
+
+    function createSafeFragment(document) {
+        var list = nodeNames.split("|"),
+            safeFrag = document.createDocumentFragment();
+
+        if (safeFrag.createElement) {
+            while (list.length) {
+                safeFrag.createElement(
+                    list.pop()
+                );
+            }
+        }
+        return safeFrag;
+    }
+
+
+    (function () {
+        var div = document.createElement("div"),
+            fragment = document.createDocumentFragment(),
+            input = document.createElement("input");
+
+        // Setup
+        div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+        // IE strips leading whitespace when .innerHTML is used
+        support.leadingWhitespace = div.firstChild.nodeType === 3;
+
+        // Make sure that tbody elements aren't automatically inserted
+        // IE will insert them into empty tables
+        support.tbody = !div.getElementsByTagName("tbody").length;
+
+        // Make sure that link elements get serialized correctly by innerHTML
+        // This requires a wrapper element in IE
+        support.htmlSerialize = !!div.getElementsByTagName("link").length;
+
+        // Makes sure cloning an html5 element does not cause problems
+        // Where outerHTML is undefined, this still works
+        support.html5Clone =
+            document.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>";
+
+        // Check if a disconnected checkbox will retain its checked
+        // value of true after appended to the DOM (IE6/7)
+        input.type = "checkbox";
+        input.checked = true;
+        fragment.appendChild(input);
+        support.appendChecked = input.checked;
+
+        // Make sure textarea (and checkbox) defaultValue is properly cloned
+        // Support: IE6-IE11+
+        div.innerHTML = "<textarea>x</textarea>";
+        support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
+
+        // #11217 - WebKit loses check when the name is after the checked attribute
+        fragment.appendChild(div);
+
+        // Support: Windows Web Apps (WWA)
+        // `name` and `type` must use .setAttribute for WWA (#14901)
+        input = document.createElement("input");
+        input.setAttribute("type", "radio");
+        input.setAttribute("checked", "checked");
+        input.setAttribute("name", "t");
+
+        div.appendChild(input);
+
+        // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
+        // old WebKit doesn't clone checked state correctly in fragments
+        support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
+
+        // Support: IE<9
+        // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+
+        support.noCloneEvent = !!div.addEventListener;
+
+        // Support: IE<9
+        // Since attributes and properties are the same in IE,
+        // cleanData must set properties to undefined rather than use removeAttribute
+        div[jQuery.expando] = 1;
+        support.attributes = !div.getAttribute(jQuery.expando);
+    })();
+
+
+// We have to close these tags to support XHTML (#13200)
+    var wrapMap = {
+        option: [1, "<select multiple='multiple'>", "</select>"],
+        legend: [1, "<fieldset>", "</fieldset>"],
+        area: [1, "<map>", "</map>"],
+
+        // Support: IE8
+        param: [1, "<object>", "</object>"],
+        thead: [1, "<table>", "</table>"],
+        tr: [2, "<table><tbody>", "</tbody></table>"],
+        col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
+        td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
+
+        // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+        // unless wrapped in a div with non-breaking characters in front of it.
+        _default: support.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
+    };
+
+// Support: IE8-IE9
+    wrapMap.optgroup = wrapMap.option;
+
+    wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+    wrapMap.th = wrapMap.td;
+
+
+    function getAll(context, tag) {
+        var elems, elem,
+            i = 0,
+            found = typeof context.getElementsByTagName !== "undefined" ?
+                context.getElementsByTagName(tag || "*") :
+                typeof context.querySelectorAll !== "undefined" ?
+                    context.querySelectorAll(tag || "*") :
+                    undefined;
+
+        if (!found) {
+            for (found = [], elems = context.childNodes || context;
+                 ( elem = elems[i] ) != null;
+                 i++
+            ) {
+                if (!tag || jQuery.nodeName(elem, tag)) {
+                    found.push(elem);
+                } else {
+                    jQuery.merge(found, getAll(elem, tag));
+                }
+            }
+        }
+
+        return tag === undefined || tag && jQuery.nodeName(context, tag) ?
+            jQuery.merge([context], found) :
+            found;
+    }
+
+
+// Mark scripts as having already been evaluated
+    function setGlobalEval(elems, refElements) {
+        var elem,
+            i = 0;
+        for (; ( elem = elems[i] ) != null; i++) {
+            jQuery._data(
+                elem,
+                "globalEval",
+                !refElements || jQuery._data(refElements[i], "globalEval")
+            );
+        }
+    }
+
+
+    var rhtml = /<|&#?\w+;/,
+        rtbody = /<tbody/i;
+
+    function fixDefaultChecked(elem) {
+        if (rcheckableType.test(elem.type)) {
+            elem.defaultChecked = elem.checked;
+        }
+    }
+
+    function buildFragment(elems, context, scripts, selection, ignored) {
+        var j, elem, contains,
+            tmp, tag, tbody, wrap,
+            l = elems.length,
+
+            // Ensure a safe fragment
+            safe = createSafeFragment(context),
+
+            nodes = [],
+            i = 0;
+
+        for (; i < l; i++) {
+            elem = elems[i];
+
+            if (elem || elem === 0) {
+
+                // Add nodes directly
+                if (jQuery.type(elem) === "object") {
+                    jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
+
+                    // Convert non-html into a text node
+                } else if (!rhtml.test(elem)) {
+                    nodes.push(context.createTextNode(elem));
+
+                    // Convert html into DOM nodes
+                } else {
+                    tmp = tmp || safe.appendChild(context.createElement("div"));
+
+                    // Deserialize a standard representation
+                    tag = ( rtagName.exec(elem) || ["", ""] )[1].toLowerCase();
+                    wrap = wrapMap[tag] || wrapMap._default;
+
+                    tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
+
+                    // Descend through wrappers to the right content
+                    j = wrap[0];
+                    while (j--) {
+                        tmp = tmp.lastChild;
+                    }
+
+                    // Manually add leading whitespace removed by IE
+                    if (!support.leadingWhitespace && rleadingWhitespace.test(elem)) {
+                        nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0]));
+                    }
+
+                    // Remove IE's autoinserted <tbody> from table fragments
+                    if (!support.tbody) {
+
+                        // String was a <table>, *may* have spurious <tbody>
+                        elem = tag === "table" && !rtbody.test(elem) ?
+                            tmp.firstChild :
+
+                            // String was a bare <thead> or <tfoot>
+                            wrap[1] === "<table>" && !rtbody.test(elem) ?
+                                tmp :
+                                0;
+
+                        j = elem && elem.childNodes.length;
+                        while (j--) {
+                            if (jQuery.nodeName(( tbody = elem.childNodes[j] ), "tbody") &&
+                                !tbody.childNodes.length) {
+
+                                elem.removeChild(tbody);
+                            }
+                        }
+                    }
+
+                    jQuery.merge(nodes, tmp.childNodes);
+
+                    // Fix #12392 for WebKit and IE > 9
+                    tmp.textContent = "";
+
+                    // Fix #12392 for oldIE
+                    while (tmp.firstChild) {
+                        tmp.removeChild(tmp.firstChild);
+                    }
+
+                    // Remember the top-level container for proper cleanup
+                    tmp = safe.lastChild;
+                }
+            }
+        }
+
+        // Fix #11356: Clear elements from fragment
+        if (tmp) {
+            safe.removeChild(tmp);
+        }
+
+        // Reset defaultChecked for any radios and checkboxes
+        // about to be appended to the DOM in IE 6/7 (#8060)
+        if (!support.appendChecked) {
+            jQuery.grep(getAll(nodes, "input"), fixDefaultChecked);
+        }
+
+        i = 0;
+        while (( elem = nodes[i++] )) {
+
+            // Skip elements already in the context collection (trac-4087)
+            if (selection && jQuery.inArray(elem, selection) > -1) {
+                if (ignored) {
+                    ignored.push(elem);
+                }
+
+                continue;
+            }
+
+            contains = jQuery.contains(elem.ownerDocument, elem);
+
+            // Append to fragment
+            tmp = getAll(safe.appendChild(elem), "script");
+
+            // Preserve script evaluation history
+            if (contains) {
+                setGlobalEval(tmp);
+            }
+
+            // Capture executables
+            if (scripts) {
+                j = 0;
+                while (( elem = tmp[j++] )) {
+                    if (rscriptType.test(elem.type || "")) {
+                        scripts.push(elem);
+                    }
+                }
+            }
+        }
+
+        tmp = null;
+
+        return safe;
+    }
+
+
+    (function () {
+        var i, eventName,
+            div = document.createElement("div");
+
+        // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)
+        for (i in {submit: true, change: true, focusin: true}) {
+            eventName = "on" + i;
+
+            if (!( support[i] = eventName in window )) {
+
+                // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
+                div.setAttribute(eventName, "t");
+                support[i] = div.attributes[eventName].expando === false;
+            }
+        }
+
+        // Null elements to avoid leaks in IE.
+        div = null;
+    })();
+
+
+    var rformElems = /^(?:input|select|textarea)$/i,
+        rkeyEvent = /^key/,
+        rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
+        rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+        rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
+
+    function returnTrue() {
+        return true;
+    }
+
+    function returnFalse() {
+        return false;
+    }
+
+// Support: IE9
+// See #13393 for more info
+    function safeActiveElement() {
+        try {
+            return document.activeElement;
+        } catch (err) {
+        }
+    }
+
+    function on(elem, types, selector, data, fn, one) {
+        var origFn, type;
+
+        // Types can be a map of types/handlers
+        if (typeof types === "object") {
+
+            // ( types-Object, selector, data )
+            if (typeof selector !== "string") {
+
+                // ( types-Object, data )
+                data = data || selector;
+                selector = undefined;
+            }
+            for (type in types) {
+                on(elem, type, selector, data, types[type], one);
+            }
+            return elem;
+        }
+
+        if (data == null && fn == null) {
+
+            // ( types, fn )
+            fn = selector;
+            data = selector = undefined;
+        } else if (fn == null) {
+            if (typeof selector === "string") {
+
+                // ( types, selector, fn )
+                fn = data;
+                data = undefined;
+            } else {
+
+                // ( types, data, fn )
+                fn = data;
+                data = selector;
+                selector = undefined;
+            }
+        }
+        if (fn === false) {
+            fn = returnFalse;
+        } else if (!fn) {
+            return elem;
+        }
+
+        if (one === 1) {
+            origFn = fn;
+            fn = function (event) {
+
+                // Can use an empty set, since event contains the info
+                jQuery().off(event);
+                return origFn.apply(this, arguments);
+            };
+
+            // Use same guid so caller can remove using origFn
+            fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+        }
+        return elem.each(function () {
+            jQuery.event.add(this, types, fn, data, selector);
+        });
+    }
+
+    /*
+     * Helper functions for managing events -- not part of the public interface.
+     * Props to Dean Edwards' addEvent library for many of the ideas.
+     */
+    jQuery.event = {
+
+        global: {},
+
+        add: function (elem, types, handler, data, selector) {
+            var tmp, events, t, handleObjIn,
+                special, eventHandle, handleObj,
+                handlers, type, namespaces, origType,
+                elemData = jQuery._data(elem);
+
+            // Don't attach events to noData or text/comment nodes (but allow plain objects)
+            if (!elemData) {
+                return;
+            }
+
+            // Caller can pass in an object of custom data in lieu of the handler
+            if (handler.handler) {
+                handleObjIn = handler;
+                handler = handleObjIn.handler;
+                selector = handleObjIn.selector;
+            }
+
+            // Make sure that the handler has a unique ID, used to find/remove it later
+            if (!handler.guid) {
+                handler.guid = jQuery.guid++;
+            }
+
+            // Init the element's event structure and main handler, if this is the first
+            if (!( events = elemData.events )) {
+                events = elemData.events = {};
+            }
+            if (!( eventHandle = elemData.handle )) {
+                eventHandle = elemData.handle = function (e) {
+
+                    // Discard the second event of a jQuery.event.trigger() and
+                    // when an event is called after a page has unloaded
+                    return typeof jQuery !== "undefined" &&
+                    ( !e || jQuery.event.triggered !== e.type ) ?
+                        jQuery.event.dispatch.apply(eventHandle.elem, arguments) :
+                        undefined;
+                };
+
+                // Add elem as a property of the handle fn to prevent a memory leak
+                // with IE non-native events
+                eventHandle.elem = elem;
+            }
+
+            // Handle multiple events separated by a space
+            types = ( types || "" ).match(rnotwhite) || [""];
+            t = types.length;
+            while (t--) {
+                tmp = rtypenamespace.exec(types[t]) || [];
+                type = origType = tmp[1];
+                namespaces = ( tmp[2] || "" ).split(".").sort();
+
+                // There *must* be a type, no attaching namespace-only handlers
+                if (!type) {
+                    continue;
+                }
+
+                // If event changes its type, use the special event handlers for the changed type
+                special = jQuery.event.special[type] || {};
+
+                // If selector defined, determine special event api type, otherwise given type
+                type = ( selector ? special.delegateType : special.bindType ) || type;
+
+                // Update special based on newly reset type
+                special = jQuery.event.special[type] || {};
+
+                // handleObj is passed to all event handlers
+                handleObj = jQuery.extend({
+                    type: type,
+                    origType: origType,
+                    data: data,
+                    handler: handler,
+                    guid: handler.guid,
+                    selector: selector,
+                    needsContext: selector && jQuery.expr.match.needsContext.test(selector),
+                    namespace: namespaces.join(".")
+                }, handleObjIn);
+
+                // Init the event handler queue if we're the first
+                if (!( handlers = events[type] )) {
+                    handlers = events[type] = [];
+                    handlers.delegateCount = 0;
+
+                    // Only use addEventListener/attachEvent if the special events handler returns false
+                    if (!special.setup ||
+                        special.setup.call(elem, data, namespaces, eventHandle) === false) {
+
+                        // Bind the global event handler to the element
+                        if (elem.addEventListener) {
+                            elem.addEventListener(type, eventHandle, false);
+
+                        } else if (elem.attachEvent) {
+                            elem.attachEvent("on" + type, eventHandle);
+                        }
+                    }
+                }
+
+                if (special.add) {
+                    special.add.call(elem, handleObj);
+
+                    if (!handleObj.handler.guid) {
+                        handleObj.handler.guid = handler.guid;
+                    }
+                }
+
+                // Add to the element's handler list, delegates in front
+                if (selector) {
+                    handlers.splice(handlers.delegateCount++, 0, handleObj);
+                } else {
+                    handlers.push(handleObj);
+                }
+
+                // Keep track of which events have ever been used, for event optimization
+                jQuery.event.global[type] = true;
+            }
+
+            // Nullify elem to prevent memory leaks in IE
+            elem = null;
+        },
+
+        // Detach an event or set of events from an element
+        remove: function (elem, types, handler, selector, mappedTypes) {
+            var j, handleObj, tmp,
+                origCount, t, events,
+                special, handlers, type,
+                namespaces, origType,
+                elemData = jQuery.hasData(elem) && jQuery._data(elem);
+
+            if (!elemData || !( events = elemData.events )) {
+                return;
+            }
+
+            // Once for each type.namespace in types; type may be omitted
+            types = ( types || "" ).match(rnotwhite) || [""];
+            t = types.length;
+            while (t--) {
+                tmp = rtypenamespace.exec(types[t]) || [];
+                type = origType = tmp[1];
+                namespaces = ( tmp[2] || "" ).split(".").sort();
+
+                // Unbind all events (on this namespace, if provided) for the element
+                if (!type) {
+                    for (type in events) {
+                        jQuery.event.remove(elem, type + types[t], handler, selector, true);
+                    }
+                    continue;
+                }
+
+                special = jQuery.event.special[type] || {};
+                type = ( selector ? special.delegateType : special.bindType ) || type;
+                handlers = events[type] || [];
+                tmp = tmp[2] &&
+                    new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
+
+                // Remove matching events
+                origCount = j = handlers.length;
+                while (j--) {
+                    handleObj = handlers[j];
+
+                    if (( mappedTypes || origType === handleObj.origType ) &&
+                        ( !handler || handler.guid === handleObj.guid ) &&
+                        ( !tmp || tmp.test(handleObj.namespace) ) &&
+                        ( !selector || selector === handleObj.selector ||
+                        selector === "**" && handleObj.selector )) {
+                        handlers.splice(j, 1);
+
+                        if (handleObj.selector) {
+                            handlers.delegateCount--;
+                        }
+                        if (special.remove) {
+                            special.remove.call(elem, handleObj);
+                        }
+                    }
+                }
+
+                // Remove generic event handler if we removed something and no more handlers exist
+                // (avoids potential for endless recursion during removal of special event handlers)
+                if (origCount && !handlers.length) {
+                    if (!special.teardown ||
+                        special.teardown.call(elem, namespaces, elemData.handle) === false) {
+
+                        jQuery.removeEvent(elem, type, elemData.handle);
+                    }
+
+                    delete events[type];
+                }
+            }
+
+            // Remove the expando if it's no longer used
+            if (jQuery.isEmptyObject(events)) {
+                delete elemData.handle;
+
+                // removeData also checks for emptiness and clears the expando if empty
+                // so use it instead of delete
+                jQuery._removeData(elem, "events");
+            }
+        },
+
+        trigger: function (event, data, elem, onlyHandlers) {
+            var handle, ontype, cur,
+                bubbleType, special, tmp, i,
+                eventPath = [elem || document],
+                type = hasOwn.call(event, "type") ? event.type : event,
+                namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
+
+            cur = tmp = elem = elem || document;
+
+            // Don't do events on text and comment nodes
+            if (elem.nodeType === 3 || elem.nodeType === 8) {
+                return;
+            }
+
+            // focus/blur morphs to focusin/out; ensure we're not firing them right now
+            if (rfocusMorph.test(type + jQuery.event.triggered)) {
+                return;
+            }
+
+            if (type.indexOf(".") > -1) {
+
+                // Namespaced trigger; create a regexp to match event type in handle()
+                namespaces = type.split(".");
+                type = namespaces.shift();
+                namespaces.sort();
+            }
+            ontype = type.indexOf(":") < 0 && "on" + type;
+
+            // Caller can pass in a jQuery.Event object, Object, or just an event type string
+            event = event[jQuery.expando] ?
+                event :
+                new jQuery.Event(type, typeof event === "object" && event);
+
+            // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+            event.isTrigger = onlyHandlers ? 2 : 3;
+            event.namespace = namespaces.join(".");
+            event.rnamespace = event.namespace ?
+                new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") :
+                null;
+
+            // Clean up the event in case it is being reused
+            event.result = undefined;
+            if (!event.target) {
+                event.target = elem;
+            }
+
+            // Clone any incoming data and prepend the event, creating the handler arg list
+            data = data == null ?
+                [event] :
+                jQuery.makeArray(data, [event]);
+
+            // Allow special events to draw outside the lines
+            special = jQuery.event.special[type] || {};
+            if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
+                return;
+            }
+
+            // Determine event propagation path in advance, per W3C events spec (#9951)
+            // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+            if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) {
+
+                bubbleType = special.delegateType || type;
+                if (!rfocusMorph.test(bubbleType + type)) {
+                    cur = cur.parentNode;
+                }
+                for (; cur; cur = cur.parentNode) {
+                    eventPath.push(cur);
+                    tmp = cur;
+                }
+
+                // Only add window if we got to document (e.g., not plain obj or detached DOM)
+                if (tmp === ( elem.ownerDocument || document )) {
+                    eventPath.push(tmp.defaultView || tmp.parentWindow || window);
+                }
+            }
+
+            // Fire handlers on the event path
+            i = 0;
+            while (( cur = eventPath[i++] ) && !event.isPropagationStopped()) {
+
+                event.type = i > 1 ?
+                    bubbleType :
+                    special.bindType || type;
+
+                // jQuery handler
+                handle = ( jQuery._data(cur, "events") || {} )[event.type] &&
+                    jQuery._data(cur, "handle");
+
+                if (handle) {
+                    handle.apply(cur, data);
+                }
+
+                // Native handler
+                handle = ontype && cur[ontype];
+                if (handle && handle.apply && acceptData(cur)) {
+                    event.result = handle.apply(cur, data);
+                    if (event.result === false) {
+                        event.preventDefault();
+                    }
+                }
+            }
+            event.type = type;
+
+            // If nobody prevented the default action, do it now
+            if (!onlyHandlers && !event.isDefaultPrevented()) {
+
+                if (
+                    ( !special._default ||
+                        special._default.apply(eventPath.pop(), data) === false
+                    ) && acceptData(elem)
+                ) {
+
+                    // Call a native DOM method on the target with the same name name as the event.
+                    // Can't use an .isFunction() check here because IE6/7 fails that test.
+                    // Don't do default actions on window, that's where global variables be (#6170)
+                    if (ontype && elem[type] && !jQuery.isWindow(elem)) {
+
+                        // Don't re-trigger an onFOO event when we call its FOO() method
+                        tmp = elem[ontype];
+
+                        if (tmp) {
+                            elem[ontype] = null;
+                        }
+
+                        // Prevent re-triggering of the same event, since we already bubbled it above
+                        jQuery.event.triggered = type;
+                        try {
+                            elem[type]();
+                        } catch (e) {
+
+                            // IE<9 dies on focus/blur to hidden element (#1486,#12518)
+                            // only reproducible on winXP IE8 native, not IE9 in IE8 mode
+                        }
+                        jQuery.event.triggered = undefined;
+
+                        if (tmp) {
+                            elem[ontype] = tmp;
+                        }
+                    }
+                }
+            }
+
+            return event.result;
+        },
+
+        dispatch: function (event) {
+
+            // Make a writable jQuery.Event from the native event object
+            event = jQuery.event.fix(event);
+
+            var i, j, ret, matched, handleObj,
+                handlerQueue = [],
+                args = slice.call(arguments),
+                handlers = ( jQuery._data(this, "events") || {} )[event.type] || [],
+                special = jQuery.event.special[event.type] || {};
+
+            // Use the fix-ed jQuery.Event rather than the (read-only) native event
+            args[0] = event;
+            event.delegateTarget = this;
+
+            // Call the preDispatch hook for the mapped type, and let it bail if desired
+            if (special.preDispatch && special.preDispatch.call(this, event) === false) {
+                return;
+            }
+
+            // Determine handlers
+            handlerQueue = jQuery.event.handlers.call(this, event, handlers);
+
+            // Run delegates first; they may want to stop propagation beneath us
+            i = 0;
+            while (( matched = handlerQueue[i++] ) && !event.isPropagationStopped()) {
+                event.currentTarget = matched.elem;
+
+                j = 0;
+                while (( handleObj = matched.handlers[j++] ) &&
+                !event.isImmediatePropagationStopped()) {
+
+                    // Triggered event must either 1) have no namespace, or 2) have namespace(s)
+                    // a subset or equal to those in the bound event (both can have no namespace).
+                    if (!event.rnamespace || event.rnamespace.test(handleObj.namespace)) {
+
+                        event.handleObj = handleObj;
+                        event.data = handleObj.data;
+
+                        ret = ( ( jQuery.event.special[handleObj.origType] || {} ).handle ||
+                        handleObj.handler ).apply(matched.elem, args);
+
+                        if (ret !== undefined) {
+                            if (( event.result = ret ) === false) {
+                                event.preventDefault();
+                                event.stopPropagation();
+                            }
+                        }
+                    }
+                }
+            }
+
+            // Call the postDispatch hook for the mapped type
+            if (special.postDispatch) {
+                special.postDispatch.call(this, event);
+            }
+
+            return event.result;
+        },
+
+        handlers: function (event, handlers) {
+            var i, matches, sel, handleObj,
+                handlerQueue = [],
+                delegateCount = handlers.delegateCount,
+                cur = event.target;
+
+            // Support (at least): Chrome, IE9
+            // Find delegate handlers
+            // Black-hole SVG <use> instance trees (#13180)
+            //
+            // Support: Firefox<=42+
+            // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
+            if (delegateCount && cur.nodeType &&
+                ( event.type !== "click" || isNaN(event.button) || event.button < 1 )) {
+
+                /* jshint eqeqeq: false */
+                for (; cur != this; cur = cur.parentNode || this) {
+                    /* jshint eqeqeq: true */
+
+                    // Don't check non-elements (#13208)
+                    // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+                    if (cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" )) {
+                        matches = [];
+                        for (i = 0; i < delegateCount; i++) {
+                            handleObj = handlers[i];
+
+                            // Don't conflict with Object.prototype properties (#13203)
+                            sel = handleObj.selector + " ";
+
+                            if (matches[sel] === undefined) {
+                                matches[sel] = handleObj.needsContext ?
+                                    jQuery(sel, this).index(cur) > -1 :
+                                    jQuery.find(sel, this, null, [cur]).length;
+                            }
+                            if (matches[sel]) {
+                                matches.push(handleObj);
+                            }
+                        }
+                        if (matches.length) {
+                            handlerQueue.push({elem: cur, handlers: matches});
+                        }
+                    }
+                }
+            }
+
+            // Add the remaining (directly-bound) handlers
+            if (delegateCount < handlers.length) {
+                handlerQueue.push({elem: this, handlers: handlers.slice(delegateCount)});
+            }
+
+            return handlerQueue;
+        },
+
+        fix: function (event) {
+            if (event[jQuery.expando]) {
+                return event;
+            }
+
+            // Create a writable copy of the event object and normalize some properties
+            var i, prop, copy,
+                type = event.type,
+                originalEvent = event,
+                fixHook = this.fixHooks[type];
+
+            if (!fixHook) {
+                this.fixHooks[type] = fixHook =
+                    rmouseEvent.test(type) ? this.mouseHooks :
+                        rkeyEvent.test(type) ? this.keyHooks :
+                            {};
+            }
+            copy = fixHook.props ? this.props.concat(fixHook.props) : this.props;
+
+            event = new jQuery.Event(originalEvent);
+
+            i = copy.length;
+            while (i--) {
+                prop = copy[i];
+                event[prop] = originalEvent[prop];
+            }
+
+            // Support: IE<9
+            // Fix target property (#1925)
+            if (!event.target) {
+                event.target = originalEvent.srcElement || document;
+            }
+
+            // Support: Safari 6-8+
+            // Target should not be a text node (#504, #13143)
+            if (event.target.nodeType === 3) {
+                event.target = event.target.parentNode;
+            }
+
+            // Support: IE<9
+            // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+            event.metaKey = !!event.metaKey;
+
+            return fixHook.filter ? fixHook.filter(event, originalEvent) : event;
+        },
+
+        // Includes some event props shared by KeyEvent and MouseEvent
+        props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
+        "metaKey relatedTarget shiftKey target timeStamp view which" ).split(" "),
+
+        fixHooks: {},
+
+        keyHooks: {
+            props: "char charCode key keyCode".split(" "),
+            filter: function (event, original) {
+
+                // Add which for key events
+                if (event.which == null) {
+                    event.which = original.charCode != null ? original.charCode : original.keyCode;
+                }
+
+                return event;
+            }
+        },
+
+        mouseHooks: {
+            props: ( "button buttons clientX clientY fromElement offsetX offsetY " +
+            "pageX pageY screenX screenY toElement" ).split(" "),
+            filter: function (event, original) {
+                var body, eventDoc, doc,
+                    button = original.button,
+                    fromElement = original.fromElement;
+
+                // Calculate pageX/Y if missing and clientX/Y available
+                if (event.pageX == null && original.clientX != null) {
+                    eventDoc = event.target.ownerDocument || document;
+                    doc = eventDoc.documentElement;
+                    body = eventDoc.body;
+
+                    event.pageX = original.clientX +
+                        ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
+                        ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+                    event.pageY = original.clientY +
+                        ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
+                        ( doc && doc.clientTop || body && body.clientTop || 0 );
+                }
+
+                // Add relatedTarget, if necessary
+                if (!event.relatedTarget && fromElement) {
+                    event.relatedTarget = fromElement === event.target ?
+                        original.toElement :
+                        fromElement;
+                }
+
+                // Add which for click: 1 === left; 2 === middle; 3 === right
+                // Note: button is not normalized, so don't use it
+                if (!event.which && button !== undefined) {
+                    event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+                }
+
+                return event;
+            }
+        },
+
+        special: {
+            load: {
+
+                // Prevent triggered image.load events from bubbling to window.load
+                noBubble: true
+            },
+            focus: {
+
+                // Fire native event if possible so blur/focus sequence is correct
+                trigger: function () {
+                    if (this !== safeActiveElement() && this.focus) {
+                        try {
+                            this.focus();
+                            return false;
+                        } catch (e) {
+
+                            // Support: IE<9
+                            // If we error on focus to hidden element (#1486, #12518),
+                            // let .trigger() run the handlers
+                        }
+                    }
+                },
+                delegateType: "focusin"
+            },
+            blur: {
+                trigger: function () {
+                    if (this === safeActiveElement() && this.blur) {
+                        this.blur();
+                        return false;
+                    }
+                },
+                delegateType: "focusout"
+            },
+            click: {
+
+                // For checkbox, fire native event so checked state will be right
+                trigger: function () {
+                    if (jQuery.nodeName(this, "input") && this.type === "checkbox" && this.click) {
+                        this.click();
+                        return false;
+                    }
+                },
+
+                // For cross-browser consistency, don't fire native .click() on links
+                _default: function (event) {
+                    return jQuery.nodeName(event.target, "a");
+                }
+            },
+
+            beforeunload: {
+                postDispatch: function (event) {
+
+                    // Support: Firefox 20+
+                    // Firefox doesn't alert if the returnValue field is not set.
+                    if (event.result !== undefined && event.originalEvent) {
+                        event.originalEvent.returnValue = event.result;
+                    }
+                }
+            }
+        },
+
+        // Piggyback on a donor event to simulate a different one
+        simulate: function (type, elem, event) {
+            var e = jQuery.extend(
+                new jQuery.Event(),
+                event,
+                {
+                    type: type,
+                    isSimulated: true
+
+                    // Previously, `originalEvent: {}` was set here, so stopPropagation call
+                    // would not be triggered on donor event, since in our own
+                    // jQuery.event.stopPropagation function we had a check for existence of
+                    // originalEvent.stopPropagation method, so, consequently it would be a noop.
+                    //
+                    // Guard for simulated events was moved to jQuery.event.stopPropagation function
+                    // since `originalEvent` should point to the original event for the
+                    // constancy with other events and for more focused logic
+                }
+            );
+
+            jQuery.event.trigger(e, null, elem);
+
+            if (e.isDefaultPrevented()) {
+                event.preventDefault();
+            }
+        }
+    };
+
+    jQuery.removeEvent = document.removeEventListener ?
+        function (elem, type, handle) {
+
+            // This "if" is needed for plain objects
+            if (elem.removeEventListener) {
+                elem.removeEventListener(type, handle);
+            }
+        } :
+        function (elem, type, handle) {
+            var name = "on" + type;
+
+            if (elem.detachEvent) {
+
+                // #8545, #7054, preventing memory leaks for custom events in IE6-8
+                // detachEvent needed property on element, by name of that event,
+                // to properly expose it to GC
+                if (typeof elem[name] === "undefined") {
+                    elem[name] = null;
+                }
+
+                elem.detachEvent(name, handle);
+            }
+        };
+
+    jQuery.Event = function (src, props) {
+
+        // Allow instantiation without the 'new' keyword
+        if (!( this instanceof jQuery.Event )) {
+            return new jQuery.Event(src, props);
+        }
+
+        // Event object
+        if (src && src.type) {
+            this.originalEvent = src;
+            this.type = src.type;
+
+            // Events bubbling up the document may have been marked as prevented
+            // by a handler lower down the tree; reflect the correct value.
+            this.isDefaultPrevented = src.defaultPrevented ||
+            src.defaultPrevented === undefined &&
+
+            // Support: IE < 9, Android < 4.0
+            src.returnValue === false ?
+                returnTrue :
+                returnFalse;
+
+            // Event type
+        } else {
+            this.type = src;
+        }
+
+        // Put explicitly provided properties onto the event object
+        if (props) {
+            jQuery.extend(this, props);
+        }
+
+        // Create a timestamp if incoming event doesn't have one
+        this.timeStamp = src && src.timeStamp || jQuery.now();
+
+        // Mark it as fixed
+        this[jQuery.expando] = true;
+    };
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+    jQuery.Event.prototype = {
+        constructor: jQuery.Event,
+        isDefaultPrevented: returnFalse,
+        isPropagationStopped: returnFalse,
+        isImmediatePropagationStopped: returnFalse,
+
+        preventDefault: function () {
+            var e = this.originalEvent;
+
+            this.isDefaultPrevented = returnTrue;
+            if (!e) {
+                return;
+            }
+
+            // If preventDefault exists, run it on the original event
+            if (e.preventDefault) {
+                e.preventDefault();
+
+                // Support: IE
+                // Otherwise set the returnValue property of the original event to false
+            } else {
+                e.returnValue = false;
+            }
+        },
+        stopPropagation: function () {
+            var e = this.originalEvent;
+
+            this.isPropagationStopped = returnTrue;
+
+            if (!e || this.isSimulated) {
+                return;
+            }
+
+            // If stopPropagation exists, run it on the original event
+            if (e.stopPropagation) {
+                e.stopPropagation();
+            }
+
+            // Support: IE
+            // Set the cancelBubble property of the original event to true
+            e.cancelBubble = true;
+        },
+        stopImmediatePropagation: function () {
+            var e = this.originalEvent;
+
+            this.isImmediatePropagationStopped = returnTrue;
+
+            if (e && e.stopImmediatePropagation) {
+                e.stopImmediatePropagation();
+            }
+
+            this.stopPropagation();
+        }
+    };
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// so that event delegation works in jQuery.
+// Do the same for pointerenter/pointerleave and pointerover/pointerout
+//
+// Support: Safari 7 only
+// Safari sends mouseenter too often; see:
+// https://code.google.com/p/chromium/issues/detail?id=470258
+// for the description of the bug (it existed in older Chrome versions as well).
+    jQuery.each({
+        mouseenter: "mouseover",
+        mouseleave: "mouseout",
+        pointerenter: "pointerover",
+        pointerleave: "pointerout"
+    }, function (orig, fix) {
+        jQuery.event.special[orig] = {
+            delegateType: fix,
+            bindType: fix,
+
+            handle: function (event) {
+                var ret,
+                    target = this,
+                    related = event.relatedTarget,
+                    handleObj = event.handleObj;
+
+                // For mouseenter/leave call the handler if related is outside the target.
+                // NB: No relatedTarget if the mouse left/entered the browser window
+                if (!related || ( related !== target && !jQuery.contains(target, related) )) {
+                    event.type = handleObj.origType;
+                    ret = handleObj.handler.apply(this, arguments);
+                    event.type = fix;
+                }
+                return ret;
+            }
+        };
+    });
+
+// IE submit delegation
+    if (!support.submit) {
+
+        jQuery.event.special.submit = {
+            setup: function () {
+
+                // Only need this for delegated form submit events
+                if (jQuery.nodeName(this, "form")) {
+                    return false;
+                }
+
+                // Lazy-add a submit handler when a descendant form may potentially be submitted
+                jQuery.event.add(this, "click._submit keypress._submit", function (e) {
+
+                    // Node name check avoids a VML-related crash in IE (#9807)
+                    var elem = e.target,
+                        form = jQuery.nodeName(elem, "input") || jQuery.nodeName(elem, "button") ?
+
+                            // Support: IE <=8
+                            // We use jQuery.prop instead of elem.form
+                            // to allow fixing the IE8 delegated submit issue (gh-2332)
+                            // by 3rd party polyfills/workarounds.
+                            jQuery.prop(elem, "form") :
+                            undefined;
+
+                    if (form && !jQuery._data(form, "submit")) {
+                        jQuery.event.add(form, "submit._submit", function (event) {
+                            event._submitBubble = true;
+                        });
+                        jQuery._data(form, "submit", true);
+                    }
+                });
+
+                // return undefined since we don't need an event listener
+            },
+
+            postDispatch: function (event) {
+
+                // If form was submitted by the user, bubble the event up the tree
+                if (event._submitBubble) {
+                    delete event._submitBubble;
+                    if (this.parentNode && !event.isTrigger) {
+                        jQuery.event.simulate("submit", this.parentNode, event);
+                    }
+                }
+            },
+
+            teardown: function () {
+
+                // Only need this for delegated form submit events
+                if (jQuery.nodeName(this, "form")) {
+                    return false;
+                }
+
+                // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+                jQuery.event.remove(this, "._submit");
+            }
+        };
+    }
+
+// IE change delegation and checkbox/radio fix
+    if (!support.change) {
+
+        jQuery.event.special.change = {
+
+            setup: function () {
+
+                if (rformElems.test(this.nodeName)) {
+
+                    // IE doesn't fire change on a check/radio until blur; trigger it on click
+                    // after a propertychange. Eat the blur-change in special.change.handle.
+                    // This still fires onchange a second time for check/radio after blur.
+                    if (this.type === "checkbox" || this.type === "radio") {
+                        jQuery.event.add(this, "propertychange._change", function (event) {
+                            if (event.originalEvent.propertyName === "checked") {
+                                this._justChanged = true;
+                            }
+                        });
+                        jQuery.event.add(this, "click._change", function (event) {
+                            if (this._justChanged && !event.isTrigger) {
+                                this._justChanged = false;
+                            }
+
+                            // Allow triggered, simulated change events (#11500)
+                            jQuery.event.simulate("change", this, event);
+                        });
+                    }
+                    return false;
+                }
+
+                // Delegated event; lazy-add a change handler on descendant inputs
+                jQuery.event.add(this, "beforeactivate._change", function (e) {
+                    var elem = e.target;
+
+                    if (rformElems.test(elem.nodeName) && !jQuery._data(elem, "change")) {
+                        jQuery.event.add(elem, "change._change", function (event) {
+                            if (this.parentNode && !event.isSimulated && !event.isTrigger) {
+                                jQuery.event.simulate("change", this.parentNode, event);
+                            }
+                        });
+                        jQuery._data(elem, "change", true);
+                    }
+                });
+            },
+
+            handle: function (event) {
+                var elem = event.target;
+
+                // Swallow native change events from checkbox/radio, we already triggered them above
+                if (this !== elem || event.isSimulated || event.isTrigger ||
+                    ( elem.type !== "radio" && elem.type !== "checkbox" )) {
+
+                    return event.handleObj.handler.apply(this, arguments);
+                }
+            },
+
+            teardown: function () {
+                jQuery.event.remove(this, "._change");
+
+                return !rformElems.test(this.nodeName);
+            }
+        };
+    }
+
+// Support: Firefox
+// Firefox doesn't have focus(in | out) events
+// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
+//
+// Support: Chrome, Safari
+// focus(in | out) events fire after focus & blur events,
+// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
+// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
+    if (!support.focusin) {
+        jQuery.each({focus: "focusin", blur: "focusout"}, function (orig, fix) {
+
+            // Attach a single capturing handler on the document while someone wants focusin/focusout
+            var handler = function (event) {
+                jQuery.event.simulate(fix, event.target, jQuery.event.fix(event));
+            };
+
+            jQuery.event.special[fix] = {
+                setup: function () {
+                    var doc = this.ownerDocument || this,
+                        attaches = jQuery._data(doc, fix);
+
+                    if (!attaches) {
+                        doc.addEventListener(orig, handler, true);
+                    }
+                    jQuery._data(doc, fix, ( attaches || 0 ) + 1);
+                },
+                teardown: function () {
+                    var doc = this.ownerDocument || this,
+                        attaches = jQuery._data(doc, fix) - 1;
+
+                    if (!attaches) {
+                        doc.removeEventListener(orig, handler, true);
+                        jQuery._removeData(doc, fix);
+                    } else {
+                        jQuery._data(doc, fix, attaches);
+                    }
+                }
+            };
+        });
+    }
+
+    jQuery.fn.extend({
+
+        on: function (types, selector, data, fn) {
+            return on(this, types, selector, data, fn);
+        },
+        one: function (types, selector, data, fn) {
+            return on(this, types, selector, data, fn, 1);
+        },
+        off: function (types, selector, fn) {
+            var handleObj, type;
+            if (types && types.preventDefault && types.handleObj) {
+
+                // ( event )  dispatched jQuery.Event
+                handleObj = types.handleObj;
+                jQuery(types.delegateTarget).off(
+                    handleObj.namespace ?
+                        handleObj.origType + "." + handleObj.namespace :
+                        handleObj.origType,
+                    handleObj.selector,
+                    handleObj.handler
+                );
+                return this;
+            }
+            if (typeof types === "object") {
+
+                // ( types-object [, selector] )
+                for (type in types) {
+                    this.off(type, selector, types[type]);
+                }
+                return this;
+            }
+            if (selector === false || typeof selector === "function") {
+
+                // ( types [, fn] )
+                fn = selector;
+                selector = undefined;
+            }
+            if (fn === false) {
+                fn = returnFalse;
+            }
+            return this.each(function () {
+                jQuery.event.remove(this, types, fn, selector);
+            });
+        },
+
+        trigger: function (type, data) {
+            return this.each(function () {
+                jQuery.event.trigger(type, data, this);
+            });
+        },
+        triggerHandler: function (type, data) {
+            var elem = this[0];
+            if (elem) {
+                return jQuery.event.trigger(type, data, elem, true);
+            }
+        }
+    });
+
+
+    var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+        rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+        rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
+
+        // Support: IE 10-11, Edge 10240+
+        // In IE/Edge using regex groups here causes severe slowdowns.
+        // See https://connect.microsoft.com/IE/feedback/details/1736512/
+        rnoInnerhtml = /<script|<style|<link/i,
+
+        // checked="checked" or checked
+        rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+        rscriptTypeMasked = /^true\/(.*)/,
+        rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+        safeFragment = createSafeFragment(document),
+        fragmentDiv = safeFragment.appendChild(document.createElement("div"));
+
+// Support: IE<8
+// Manipulating tables requires a tbody
+    function manipulationTarget(elem, content) {
+        return jQuery.nodeName(elem, "table") &&
+        jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr") ?
+
+            elem.getElementsByTagName("tbody")[0] ||
+            elem.appendChild(elem.ownerDocument.createElement("tbody")) :
+            elem;
+    }
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+    function disableScript(elem) {
+        elem.type = ( jQuery.find.attr(elem, "type") !== null ) + "/" + elem.type;
+        return elem;
+    }
+
+    function restoreScript(elem) {
+        var match = rscriptTypeMasked.exec(elem.type);
+        if (match) {
+            elem.type = match[1];
+        } else {
+            elem.removeAttribute("type");
+        }
+        return elem;
+    }
+
+    function cloneCopyEvent(src, dest) {
+        if (dest.nodeType !== 1 || !jQuery.hasData(src)) {
+            return;
+        }
+
+        var type, i, l,
+            oldData = jQuery._data(src),
+            curData = jQuery._data(dest, oldData),
+            events = oldData.events;
+
+        if (events) {
+            delete curData.handle;
+            curData.events = {};
+
+            for (type in events) {
+                for (i = 0, l = events[type].length; i < l; i++) {
+                    jQuery.event.add(dest, type, events[type][i]);
+                }
+            }
+        }
+
+        // make the cloned public data object a copy from the original
+        if (curData.data) {
+            curData.data = jQuery.extend({}, curData.data);
+        }
+    }
+
+    function fixCloneNodeIssues(src, dest) {
+        var nodeName, e, data;
+
+        // We do not need to do anything for non-Elements
+        if (dest.nodeType !== 1) {
+            return;
+        }
+
+        nodeName = dest.nodeName.toLowerCase();
+
+        // IE6-8 copies events bound via attachEvent when using cloneNode.
+        if (!support.noCloneEvent && dest[jQuery.expando]) {
+            data = jQuery._data(dest);
+
+            for (e in data.events) {
+                jQuery.removeEvent(dest, e, data.handle);
+            }
+
+            // Event data gets referenced instead of copied if the expando gets copied too
+            dest.removeAttribute(jQuery.expando);
+        }
+
+        // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
+        if (nodeName === "script" && dest.text !== src.text) {
+            disableScript(dest).text = src.text;
+            restoreScript(dest);
+
+            // IE6-10 improperly clones children of object elements using classid.
+            // IE10 throws NoModificationAllowedError if parent is null, #12132.
+        } else if (nodeName === "object") {
+            if (dest.parentNode) {
+                dest.outerHTML = src.outerHTML;
+            }
+
+            // This path appears unavoidable for IE9. When cloning an object
+            // element in IE9, the outerHTML strategy above is not sufficient.
+            // If the src has innerHTML and the destination does not,
+            // copy the src.innerHTML into the dest.innerHTML. #10324
+            if (support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) )) {
+                dest.innerHTML = src.innerHTML;
+            }
+
+        } else if (nodeName === "input" && rcheckableType.test(src.type)) {
+
+            // IE6-8 fails to persist the checked state of a cloned checkbox
+            // or radio button. Worse, IE6-7 fail to give the cloned element
+            // a checked appearance if the defaultChecked value isn't also set
+
+            dest.defaultChecked = dest.checked = src.checked;
+
+            // IE6-7 get confused and end up setting the value of a cloned
+            // checkbox/radio button to an empty string instead of "on"
+            if (dest.value !== src.value) {
+                dest.value = src.value;
+            }
+
+            // IE6-8 fails to return the selected option to the default selected
+            // state when cloning options
+        } else if (nodeName === "option") {
+            dest.defaultSelected = dest.selected = src.defaultSelected;
+
+            // IE6-8 fails to set the defaultValue to the correct value when
+            // cloning other types of input fields
+        } else if (nodeName === "input" || nodeName === "textarea") {
+            dest.defaultValue = src.defaultValue;
+        }
+    }
+
+    function domManip(collection, args, callback, ignored) {
+
+        // Flatten any nested arrays
+        args = concat.apply([], args);
+
+        var first, node, hasScripts,
+            scripts, doc, fragment,
+            i = 0,
+            l = collection.length,
+            iNoClone = l - 1,
+            value = args[0],
+            isFunction = jQuery.isFunction(value);
+
+        // We can't cloneNode fragments that contain checked, in WebKit
+        if (isFunction ||
+            ( l > 1 && typeof value === "string" &&
+            !support.checkClone && rchecked.test(value) )) {
+            return collection.each(function (index) {
+                var self = collection.eq(index);
+                if (isFunction) {
+                    args[0] = value.call(this, index, self.html());
+                }
+                domManip(self, args, callback, ignored);
+            });
+        }
+
+        if (l) {
+            fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);
+            first = fragment.firstChild;
+
+            if (fragment.childNodes.length === 1) {
+                fragment = first;
+            }
+
+            // Require either new content or an interest in ignored elements to invoke the callback
+            if (first || ignored) {
+                scripts = jQuery.map(getAll(fragment, "script"), disableScript);
+                hasScripts = scripts.length;
+
+                // Use the original fragment for the last item
+                // instead of the first because it can end up
+                // being emptied incorrectly in certain situations (#8070).
+                for (; i < l; i++) {
+                    node = fragment;
+
+                    if (i !== iNoClone) {
+                        node = jQuery.clone(node, true, true);
+
+                        // Keep references to cloned scripts for later restoration
+                        if (hasScripts) {
+
+                            // Support: Android<4.1, PhantomJS<2
+                            // push.apply(_, arraylike) throws on ancient WebKit
+                            jQuery.merge(scripts, getAll(node, "script"));
+                        }
+                    }
+
+                    callback.call(collection[i], node, i);
+                }
+
+                if (hasScripts) {
+                    doc = scripts[scripts.length - 1].ownerDocument;
+
+                    // Reenable scripts
+                    jQuery.map(scripts, restoreScript);
+
+                    // Evaluate executable scripts on first document insertion
+                    for (i = 0; i < hasScripts; i++) {
+                        node = scripts[i];
+                        if (rscriptType.test(node.type || "") &&
+                            !jQuery._data(node, "globalEval") &&
+                            jQuery.contains(doc, node)) {
+
+                            if (node.src) {
+
+                                // Optional AJAX dependency, but won't run scripts if not present
+                                if (jQuery._evalUrl) {
+                                    jQuery._evalUrl(node.src);
+                                }
+                            } else {
+                                jQuery.globalEval(
+                                    ( node.text || node.textContent || node.innerHTML || "" )
+                                        .replace(rcleanScript, "")
+                                );
+                            }
+                        }
+                    }
+                }
+
+                // Fix #11809: Avoid leaking memory
+                fragment = first = null;
+            }
+        }
+
+        return collection;
+    }
+
+    function remove(elem, selector, keepData) {
+        var node,
+            elems = selector ? jQuery.filter(selector, elem) : elem,
+            i = 0;
+
+        for (; ( node = elems[i] ) != null; i++) {
+
+            if (!keepData && node.nodeType === 1) {
+                jQuery.cleanData(getAll(node));
+            }
+
+            if (node.parentNode) {
+                if (keepData && jQuery.contains(node.ownerDocument, node)) {
+                    setGlobalEval(getAll(node, "script"));
+                }
+                node.parentNode.removeChild(node);
+            }
+        }
+
+        return elem;
+    }
+
+    jQuery.extend({
+        htmlPrefilter: function (html) {
+            return html.replace(rxhtmlTag, "<$1></$2>");
+        },
+
+        clone: function (elem, dataAndEvents, deepDataAndEvents) {
+            var destElements, node, clone, i, srcElements,
+                inPage = jQuery.contains(elem.ownerDocument, elem);
+
+            if (support.html5Clone || jQuery.isXMLDoc(elem) ||
+                !rnoshimcache.test("<" + elem.nodeName + ">")) {
+
+                clone = elem.cloneNode(true);
+
+                // IE<=8 does not properly clone detached, unknown element nodes
+            } else {
+                fragmentDiv.innerHTML = elem.outerHTML;
+                fragmentDiv.removeChild(clone = fragmentDiv.firstChild);
+            }
+
+            if (( !support.noCloneEvent || !support.noCloneChecked ) &&
+                ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc(elem)) {
+
+                // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+                destElements = getAll(clone);
+                srcElements = getAll(elem);
+
+                // Fix all IE cloning issues
+                for (i = 0; ( node = srcElements[i] ) != null; ++i) {
+
+                    // Ensure that the destination node is not null; Fixes #9587
+                    if (destElements[i]) {
+                        fixCloneNodeIssues(node, destElements[i]);
+                    }
+                }
+            }
+
+            // Copy the events from the original to the clone
+            if (dataAndEvents) {
+                if (deepDataAndEvents) {
+                    srcElements = srcElements || getAll(elem);
+                    destElements = destElements || getAll(clone);
+
+                    for (i = 0; ( node = srcElements[i] ) != null; i++) {
+                        cloneCopyEvent(node, destElements[i]);
+                    }
+                } else {
+                    cloneCopyEvent(elem, clone);
+                }
+            }
+
+            // Preserve script evaluation history
+            destElements = getAll(clone, "script");
+            if (destElements.length > 0) {
+                setGlobalEval(destElements, !inPage && getAll(elem, "script"));
+            }
+
+            destElements = srcElements = node = null;
+
+            // Return the cloned set
+            return clone;
+        },
+
+        cleanData: function (elems, /* internal */ forceAcceptData) {
+            var elem, type, id, data,
+                i = 0,
+                internalKey = jQuery.expando,
+                cache = jQuery.cache,
+                attributes = support.attributes,
+                special = jQuery.event.special;
+
+            for (; ( elem = elems[i] ) != null; i++) {
+                if (forceAcceptData || acceptData(elem)) {
+
+                    id = elem[internalKey];
+                    data = id && cache[id];
+
+                    if (data) {
+                        if (data.events) {
+                            for (type in data.events) {
+                                if (special[type]) {
+                                    jQuery.event.remove(elem, type);
+
+                                    // This is a shortcut to avoid jQuery.event.remove's overhead
+                                } else {
+                                    jQuery.removeEvent(elem, type, data.handle);
+                                }
+                            }
+                        }
+
+                        // Remove cache only if it was not already removed by jQuery.event.remove
+                        if (cache[id]) {
+
+                            delete cache[id];
+
+                            // Support: IE<9
+                            // IE does not allow us to delete expando properties from nodes
+                            // IE creates expando attributes along with the property
+                            // IE does not have a removeAttribute function on Document nodes
+                            if (!attributes && typeof elem.removeAttribute !== "undefined") {
+                                elem.removeAttribute(internalKey);
+
+                                // Webkit & Blink performance suffers when deleting properties
+                                // from DOM nodes, so set to undefined instead
+                                // https://code.google.com/p/chromium/issues/detail?id=378607
+                            } else {
+                                elem[internalKey] = undefined;
+                            }
+
+                            deletedIds.push(id);
+                        }
+                    }
+                }
+            }
+        }
+    });
+
+    jQuery.fn.extend({
+
+        // Keep domManip exposed until 3.0 (gh-2225)
+        domManip: domManip,
+
+        detach: function (selector) {
+            return remove(this, selector, true);
+        },
+
+        remove: function (selector) {
+            return remove(this, selector);
+        },
+
+        text: function (value) {
+            return access(this, function (value) {
+                return value === undefined ?
+                    jQuery.text(this) :
+                    this.empty().append(
+                        ( this[0] && this[0].ownerDocument || document ).createTextNode(value)
+                    );
+            }, null, value, arguments.length);
+        },
+
+        append: function () {
+            return domManip(this, arguments, function (elem) {
+                if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
+                    var target = manipulationTarget(this, elem);
+                    target.appendChild(elem);
+                }
+            });
+        },
+
+        prepend: function () {
+            return domManip(this, arguments, function (elem) {
+                if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
+                    var target = manipulationTarget(this, elem);
+                    target.insertBefore(elem, target.firstChild);
+                }
+            });
+        },
+
+        before: function () {
+            return domManip(this, arguments, function (elem) {
+                if (this.parentNode) {
+                    this.parentNode.insertBefore(elem, this);
+                }
+            });
+        },
+
+        after: function () {
+            return domManip(this, arguments, function (elem) {
+                if (this.parentNode) {
+                    this.parentNode.insertBefore(elem, this.nextSibling);
+                }
+            });
+        },
+
+        empty: function () {
+            var elem,
+                i = 0;
+
+            for (; ( elem = this[i] ) != null; i++) {
+
+                // Remove element nodes and prevent memory leaks
+                if (elem.nodeType === 1) {
+                    jQuery.cleanData(getAll(elem, false));
+                }
+
+                // Remove any remaining nodes
+                while (elem.firstChild) {
+                    elem.removeChild(elem.firstChild);
+                }
+
+                // If this is a select, ensure that it displays empty (#12336)
+                // Support: IE<9
+                if (elem.options && jQuery.nodeName(elem, "select")) {
+                    elem.options.length = 0;
+                }
+            }
+
+            return this;
+        },
+
+        clone: function (dataAndEvents, deepDataAndEvents) {
+            dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+            deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+            return this.map(function () {
+                return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
+            });
+        },
+
+        html: function (value) {
+            return access(this, function (value) {
+                var elem = this[0] || {},
+                    i = 0,
+                    l = this.length;
+
+                if (value === undefined) {
+                    return elem.nodeType === 1 ?
+                        elem.innerHTML.replace(rinlinejQuery, "") :
+                        undefined;
+                }
+
+                // See if we can take a shortcut and just use innerHTML
+                if (typeof value === "string" && !rnoInnerhtml.test(value) &&
+                    ( support.htmlSerialize || !rnoshimcache.test(value)  ) &&
+                    ( support.leadingWhitespace || !rleadingWhitespace.test(value) ) &&
+                    !wrapMap[( rtagName.exec(value) || ["", ""] )[1].toLowerCase()]) {
+
+                    value = jQuery.htmlPrefilter(value);
+
+                    try {
+                        for (; i < l; i++) {
+
+                            // Remove element nodes and prevent memory leaks
+                            elem = this[i] || {};
+                            if (elem.nodeType === 1) {
+                                jQuery.cleanData(getAll(elem, false));
+                                elem.innerHTML = value;
+                            }
+                        }
+
+                        elem = 0;
+
+                        // If using innerHTML throws an exception, use the fallback method
+                    } catch (e) {
+                    }
+                }
+
+                if (elem) {
+                    this.empty().append(value);
+                }
+            }, null, value, arguments.length);
+        },
+
+        replaceWith: function () {
+            var ignored = [];
+
+            // Make the changes, replacing each non-ignored context element with the new content
+            return domManip(this, arguments, function (elem) {
+                var parent = this.parentNode;
+
+                if (jQuery.inArray(this, ignored) < 0) {
+                    jQuery.cleanData(getAll(this));
+                    if (parent) {
+                        parent.replaceChild(elem, this);
+                    }
+                }
+
+                // Force callback invocation
+            }, ignored);
+        }
+    });
+
+    jQuery.each({
+        appendTo: "append",
+        prependTo: "prepend",
+        insertBefore: "before",
+        insertAfter: "after",
+        replaceAll: "replaceWith"
+    }, function (name, original) {
+        jQuery.fn[name] = function (selector) {
+            var elems,
+                i = 0,
+                ret = [],
+                insert = jQuery(selector),
+                last = insert.length - 1;
+
+            for (; i <= last; i++) {
+                elems = i === last ? this : this.clone(true);
+                jQuery(insert[i])[original](elems);
+
+                // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
+                push.apply(ret, elems.get());
+            }
+
+            return this.pushStack(ret);
+        };
+    });
+
+
+    var iframe,
+        elemdisplay = {
+
+            // Support: Firefox
+            // We have to pre-define these values for FF (#10227)
+            HTML: "block",
+            BODY: "block"
+        };
+
+    /**
+     * Retrieve the actual display of a element
+     * @param {String} name nodeName of the element
+     * @param {Object} doc Document object
+     */
+
+// Called only from within defaultDisplay
+    function actualDisplay(name, doc) {
+        var elem = jQuery(doc.createElement(name)).appendTo(doc.body),
+
+            display = jQuery.css(elem[0], "display");
+
+        // We don't have any data stored on the element,
+        // so use "detach" method as fast way to get rid of the element
+        elem.detach();
+
+        return display;
+    }
+
+    /**
+     * Try to determine the default display value of an element
+     * @param {String} nodeName
+     */
+    function defaultDisplay(nodeName) {
+        var doc = document,
+            display = elemdisplay[nodeName];
+
+        if (!display) {
+            display = actualDisplay(nodeName, doc);
+
+            // If the simple way fails, read from inside an iframe
+            if (display === "none" || !display) {
+
+                // Use the already-created iframe if possible
+                iframe = ( iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>") )
+                    .appendTo(doc.documentElement);
+
+                // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+                doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
+
+                // Support: IE
+                doc.write();
+                doc.close();
+
+                display = actualDisplay(nodeName, doc);
+                iframe.detach();
+            }
+
+            // Store the correct default display
+            elemdisplay[nodeName] = display;
+        }
+
+        return display;
+    }
+
+    var rmargin = ( /^margin/ );
+
+    var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
+
+    var swap = function (elem, options, callback, args) {
+        var ret, name,
+            old = {};
+
+        // Remember the old values, and insert the new ones
+        for (name in options) {
+            old[name] = elem.style[name];
+            elem.style[name] = options[name];
+        }
+
+        ret = callback.apply(elem, args || []);
+
+        // Revert the old values
+        for (name in options) {
+            elem.style[name] = old[name];
+        }
+
+        return ret;
+    };
+
+
+    var documentElement = document.documentElement;
+
+
+    (function () {
+        var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,
+            reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,
+            container = document.createElement("div"),
+            div = document.createElement("div");
+
+        // Finish early in limited (non-browser) environments
+        if (!div.style) {
+            return;
+        }
+
+        div.style.cssText = "float:left;opacity:.5";
+
+        // Support: IE<9
+        // Make sure that element opacity exists (as opposed to filter)
+        support.opacity = div.style.opacity === "0.5";
+
+        // Verify style float existence
+        // (IE uses styleFloat instead of cssFloat)
+        support.cssFloat = !!div.style.cssFloat;
+
+        div.style.backgroundClip = "content-box";
+        div.cloneNode(true).style.backgroundClip = "";
+        support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+        container = document.createElement("div");
+        container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
+            "padding:0;margin-top:1px;position:absolute";
+        div.innerHTML = "";
+        container.appendChild(div);
+
+        // Support: Firefox<29, Android 2.3
+        // Vendor-prefix box-sizing
+        support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" ||
+            div.style.WebkitBoxSizing === "";
+
+        jQuery.extend(support, {
+            reliableHiddenOffsets: function () {
+                if (pixelPositionVal == null) {
+                    computeStyleTests();
+                }
+                return reliableHiddenOffsetsVal;
+            },
+
+            boxSizingReliable: function () {
+
+                // We're checking for pixelPositionVal here instead of boxSizingReliableVal
+                // since that compresses better and they're computed together anyway.
+                if (pixelPositionVal == null) {
+                    computeStyleTests();
+                }
+                return boxSizingReliableVal;
+            },
+
+            pixelMarginRight: function () {
+
+                // Support: Android 4.0-4.3
+                if (pixelPositionVal == null) {
+                    computeStyleTests();
+                }
+                return pixelMarginRightVal;
+            },
+
+            pixelPosition: function () {
+                if (pixelPositionVal == null) {
+                    computeStyleTests();
+                }
+                return pixelPositionVal;
+            },
+
+            reliableMarginRight: function () {
+
+                // Support: Android 2.3
+                if (pixelPositionVal == null) {
+                    computeStyleTests();
+                }
+                return reliableMarginRightVal;
+            },
+
+            reliableMarginLeft: function () {
+
+                // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
+                if (pixelPositionVal == null) {
+                    computeStyleTests();
+                }
+                return reliableMarginLeftVal;
+            }
+        });
+
+        function computeStyleTests() {
+            var contents, divStyle,
+                documentElement = document.documentElement;
+
+            // Setup
+            documentElement.appendChild(container);
+
+            div.style.cssText =
+
+                // Support: Android 2.3
+                // Vendor-prefix box-sizing
+                "-webkit-box-sizing:border-box;box-sizing:border-box;" +
+                "position:relative;display:block;" +
+                "margin:auto;border:1px;padding:1px;" +
+                "top:1%;width:50%";
+
+            // Support: IE<9
+            // Assume reasonable values in the absence of getComputedStyle
+            pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;
+            pixelMarginRightVal = reliableMarginRightVal = true;
+
+            // Check for getComputedStyle so that this code is not run in IE<9.
+            if (window.getComputedStyle) {
+                divStyle = window.getComputedStyle(div);
+                pixelPositionVal = ( divStyle || {} ).top !== "1%";
+                reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px";
+                boxSizingReliableVal = ( divStyle || {width: "4px"} ).width === "4px";
+
+                // Support: Android 4.0 - 4.3 only
+                // Some styles come back with percentage values, even though they shouldn't
+                div.style.marginRight = "50%";
+                pixelMarginRightVal = ( divStyle || {marginRight: "4px"} ).marginRight === "4px";
+
+                // Support: Android 2.3 only
+                // Div with explicit width and no margin-right incorrectly
+                // gets computed margin-right based on width of container (#3333)
+                // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                contents = div.appendChild(document.createElement("div"));
+
+                // Reset CSS: box-sizing; display; margin; border; padding
+                contents.style.cssText = div.style.cssText =
+
+                    // Support: Android 2.3
+                    // Vendor-prefix box-sizing
+                    "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+                    "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
+                contents.style.marginRight = contents.style.width = "0";
+                div.style.width = "1px";
+
+                reliableMarginRightVal =
+                    !parseFloat(( window.getComputedStyle(contents) || {} ).marginRight);
+
+                div.removeChild(contents);
+            }
+
+            // Support: IE6-8
+            // First check that getClientRects works as expected
+            // Check if table cells still have offsetWidth/Height when they are set
+            // to display:none and there are still other visible table cells in a
+            // table row; if so, offsetWidth/Height are not reliable for use when
+            // determining if an element has been hidden directly using
+            // display:none (it is still safe to use offsets if a parent element is
+            // hidden; don safety goggles and see bug #4512 for more information).
+            div.style.display = "none";
+            reliableHiddenOffsetsVal = div.getClientRects().length === 0;
+            if (reliableHiddenOffsetsVal) {
+                div.style.display = "";
+                div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+                div.childNodes[0].style.borderCollapse = "separate";
+                contents = div.getElementsByTagName("td");
+                contents[0].style.cssText = "margin:0;border:0;padding:0;display:none";
+                reliableHiddenOffsetsVal = contents[0].offsetHeight === 0;
+                if (reliableHiddenOffsetsVal) {
+                    contents[0].style.display = "";
+                    contents[1].style.display = "none";
+                    reliableHiddenOffsetsVal = contents[0].offsetHeight === 0;
+                }
+            }
+
+            // Teardown
+            documentElement.removeChild(container);
+        }
+
+    })();
+
+
+    var getStyles, curCSS,
+        rposition = /^(top|right|bottom|left)$/;
+
+    if (window.getComputedStyle) {
+        getStyles = function (elem) {
+
+            // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
+            // IE throws on elements created in popups
+            // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
+            var view = elem.ownerDocument.defaultView;
+
+            if (!view || !view.opener) {
+                view = window;
+            }
+
+            return view.getComputedStyle(elem);
+        };
+
+        curCSS = function (elem, name, computed) {
+            var width, minWidth, maxWidth, ret,
+                style = elem.style;
+
+            computed = computed || getStyles(elem);
+
+            // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+            ret = computed ? computed.getPropertyValue(name) || computed[name] : undefined;
+
+            // Support: Opera 12.1x only
+            // Fall back to style even without computed
+            // computed is undefined for elems on document fragments
+            if (( ret === "" || ret === undefined ) && !jQuery.contains(elem.ownerDocument, elem)) {
+                ret = jQuery.style(elem, name);
+            }
+
+            if (computed) {
+
+                // A tribute to the "awesome hack by Dean Edwards"
+                // Chrome < 17 and Safari 5.0 uses "computed value"
+                // instead of "used value" for margin-right
+                // Safari 5.1.7 (at least) returns percentage for a larger set of values,
+                // but width seems to be reliably pixels
+                // this is against the CSSOM draft spec:
+                // http://dev.w3.org/csswg/cssom/#resolved-values
+                if (!support.pixelMarginRight() && rnumnonpx.test(ret) && rmargin.test(name)) {
+
+                    // Remember the original values
+                    width = style.width;
+                    minWidth = style.minWidth;
+                    maxWidth = style.maxWidth;
+
+                    // Put in the new values to get a computed value out
+                    style.minWidth = style.maxWidth = style.width = ret;
+                    ret = computed.width;
+
+                    // Revert the changed values
+                    style.width = width;
+                    style.minWidth = minWidth;
+                    style.maxWidth = maxWidth;
+                }
+            }
+
+            // Support: IE
+            // IE returns zIndex value as an integer.
+            return ret === undefined ?
+                ret :
+                ret + "";
+        };
+    } else if (documentElement.currentStyle) {
+        getStyles = function (elem) {
+            return elem.currentStyle;
+        };
+
+        curCSS = function (elem, name, computed) {
+            var left, rs, rsLeft, ret,
+                style = elem.style;
+
+            computed = computed || getStyles(elem);
+            ret = computed ? computed[name] : undefined;
+
+            // Avoid setting ret to empty string here
+            // so we don't default to auto
+            if (ret == null && style && style[name]) {
+                ret = style[name];
+            }
+
+            // From the awesome hack by Dean Edwards
+            // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+            // If we're not dealing with a regular pixel number
+            // but a number that has a weird ending, we need to convert it to pixels
+            // but not position css attributes, as those are
+            // proportional to the parent element instead
+            // and we can't measure the parent instead because it
+            // might trigger a "stacking dolls" problem
+            if (rnumnonpx.test(ret) && !rposition.test(name)) {
+
+                // Remember the original values
+                left = style.left;
+                rs = elem.runtimeStyle;
+                rsLeft = rs && rs.left;
+
+                // Put in the new values to get a computed value out
+                if (rsLeft) {
+                    rs.left = elem.currentStyle.left;
+                }
+                style.left = name === "fontSize" ? "1em" : ret;
+                ret = style.pixelLeft + "px";
+
+                // Revert the changed values
+                style.left = left;
+                if (rsLeft) {
+                    rs.left = rsLeft;
+                }
+            }
+
+            // Support: IE
+            // IE returns zIndex value as an integer.
+            return ret === undefined ?
+                ret :
+                ret + "" || "auto";
+        };
+    }
+
+
+    function addGetHookIf(conditionFn, hookFn) {
+
+        // Define the hook, we'll check on the first run if it's really needed.
+        return {
+            get: function () {
+                if (conditionFn()) {
+
+                    // Hook not needed (or it's not possible to use it due
+                    // to missing dependency), remove it.
+                    delete this.get;
+                    return;
+                }
+
+                // Hook needed; redefine it so that the support test is not executed again.
+                return ( this.get = hookFn ).apply(this, arguments);
+            }
+        };
+    }
+
+
+    var
+
+        ralpha = /alpha\([^)]*\)/i,
+        ropacity = /opacity\s*=\s*([^)]*)/i,
+
+        // swappable if display is none or starts with table except
+        // "table", "table-cell", or "table-caption"
+        // see here for display values:
+        // https://developer.mozilla.org/en-US/docs/CSS/display
+        rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+        rnumsplit = new RegExp("^(" + pnum + ")(.*)$", "i"),
+
+        cssShow = {position: "absolute", visibility: "hidden", display: "block"},
+        cssNormalTransform = {
+            letterSpacing: "0",
+            fontWeight: "400"
+        },
+
+        cssPrefixes = ["Webkit", "O", "Moz", "ms"],
+        emptyStyle = document.createElement("div").style;
+
+
+// return a css property mapped to a potentially vendor prefixed property
+    function vendorPropName(name) {
+
+        // shortcut for names that are not vendor prefixed
+        if (name in emptyStyle) {
+            return name;
+        }
+
+        // check for vendor prefixed names
+        var capName = name.charAt(0).toUpperCase() + name.slice(1),
+            i = cssPrefixes.length;
+
+        while (i--) {
+            name = cssPrefixes[i] + capName;
+            if (name in emptyStyle) {
+                return name;
+            }
+        }
+    }
+
+    function showHide(elements, show) {
+        var display, elem, hidden,
+            values = [],
+            index = 0,
+            length = elements.length;
+
+        for (; index < length; index++) {
+            elem = elements[index];
+            if (!elem.style) {
+                continue;
+            }
+
+            values[index] = jQuery._data(elem, "olddisplay");
+            display = elem.style.display;
+            if (show) {
+
+                // Reset the inline display of this element to learn if it is
+                // being hidden by cascaded rules or not
+                if (!values[index] && display === "none") {
+                    elem.style.display = "";
+                }
+
+                // Set elements which have been overridden with display: none
+                // in a stylesheet to whatever the default browser style is
+                // for such an element
+                if (elem.style.display === "" && isHidden(elem)) {
+                    values[index] =
+                        jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
+                }
+            } else {
+                hidden = isHidden(elem);
+
+                if (display && display !== "none" || !hidden) {
+                    jQuery._data(
+                        elem,
+                        "olddisplay",
+                        hidden ? display : jQuery.css(elem, "display")
+                    );
+                }
+            }
+        }
+
+        // Set the display of most of the elements in a second loop
+        // to avoid the constant reflow
+        for (index = 0; index < length; index++) {
+            elem = elements[index];
+            if (!elem.style) {
+                continue;
+            }
+            if (!show || elem.style.display === "none" || elem.style.display === "") {
+                elem.style.display = show ? values[index] || "" : "none";
+            }
+        }
+
+        return elements;
+    }
+
+    function setPositiveNumber(elem, value, subtract) {
+        var matches = rnumsplit.exec(value);
+        return matches ?
+
+            // Guard against undefined "subtract", e.g., when used as in cssHooks
+            Math.max(0, matches[1] - ( subtract || 0 )) + ( matches[2] || "px" ) :
+            value;
+    }
+
+    function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) {
+        var i = extra === ( isBorderBox ? "border" : "content" ) ?
+
+                // If we already have the right measurement, avoid augmentation
+                4 :
+
+                // Otherwise initialize for horizontal or vertical properties
+                name === "width" ? 1 : 0,
+
+            val = 0;
+
+        for (; i < 4; i += 2) {
+
+            // both box models exclude margin, so add it if we want it
+            if (extra === "margin") {
+                val += jQuery.css(elem, extra + cssExpand[i], true, styles);
+            }
+
+            if (isBorderBox) {
+
+                // border-box includes padding, so remove it if we want content
+                if (extra === "content") {
+                    val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
+                }
+
+                // at this point, extra isn't border nor margin, so remove border
+                if (extra !== "margin") {
+                    val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
+                }
+            } else {
+
+                // at this point, extra isn't content, so add padding
+                val += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
+
+                // at this point, extra isn't content nor padding, so add border
+                if (extra !== "padding") {
+                    val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
+                }
+            }
+        }
+
+        return val;
+    }
+
+    function getWidthOrHeight(elem, name, extra) {
+
+        // Start with offset property, which is equivalent to the border-box value
+        var valueIsBorderBox = true,
+            val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+            styles = getStyles(elem),
+            isBorderBox = support.boxSizing &&
+                jQuery.css(elem, "boxSizing", false, styles) === "border-box";
+
+        // some non-html elements return undefined for offsetWidth, so check for null/undefined
+        // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+        // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+        if (val <= 0 || val == null) {
+
+            // Fall back to computed then uncomputed css if necessary
+            val = curCSS(elem, name, styles);
+            if (val < 0 || val == null) {
+                val = elem.style[name];
+            }
+
+            // Computed unit is not pixels. Stop here and return.
+            if (rnumnonpx.test(val)) {
+                return val;
+            }
+
+            // we need the check for style in case a browser which returns unreliable values
+            // for getComputedStyle silently falls back to the reliable elem.style
+            valueIsBorderBox = isBorderBox &&
+                ( support.boxSizingReliable() || val === elem.style[name] );
+
+            // Normalize "", auto, and prepare for extra
+            val = parseFloat(val) || 0;
+        }
+
+        // use the active box-sizing model to add/subtract irrelevant styles
+        return ( val +
+                augmentWidthOrHeight(
+                    elem,
+                    name,
+                    extra || ( isBorderBox ? "border" : "content" ),
+                    valueIsBorderBox,
+                    styles
+                )
+            ) + "px";
+    }
+
+    jQuery.extend({
+
+        // Add in style property hooks for overriding the default
+        // behavior of getting and setting a style property
+        cssHooks: {
+            opacity: {
+                get: function (elem, computed) {
+                    if (computed) {
+
+                        // We should always get a number back from opacity
+                        var ret = curCSS(elem, "opacity");
+                        return ret === "" ? "1" : ret;
+                    }
+                }
+            }
+        },
+
+        // Don't automatically add "px" to these possibly-unitless properties
+        cssNumber: {
+            "animationIterationCount": true,
+            "columnCount": true,
+            "fillOpacity": true,
+            "flexGrow": true,
+            "flexShrink": true,
+            "fontWeight": true,
+            "lineHeight": true,
+            "opacity": true,
+            "order": true,
+            "orphans": true,
+            "widows": true,
+            "zIndex": true,
+            "zoom": true
+        },
+
+        // Add in properties whose names you wish to fix before
+        // setting or getting the value
+        cssProps: {
+
+            // normalize float css property
+            "float": support.cssFloat ? "cssFloat" : "styleFloat"
+        },
+
+        // Get and set the style property on a DOM Node
+        style: function (elem, name, value, extra) {
+
+            // Don't set styles on text and comment nodes
+            if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
+                return;
+            }
+
+            // Make sure that we're working with the right name
+            var ret, type, hooks,
+                origName = jQuery.camelCase(name),
+                style = elem.style;
+
+            name = jQuery.cssProps[origName] ||
+                ( jQuery.cssProps[origName] = vendorPropName(origName) || origName );
+
+            // gets hook for the prefixed version
+            // followed by the unprefixed version
+            hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
+
+            // Check if we're setting a value
+            if (value !== undefined) {
+                type = typeof value;
+
+                // Convert "+=" or "-=" to relative numbers (#7345)
+                if (type === "string" && ( ret = rcssNum.exec(value) ) && ret[1]) {
+                    value = adjustCSS(elem, name, ret);
+
+                    // Fixes bug #9237
+                    type = "number";
+                }
+
+                // Make sure that null and NaN values aren't set. See: #7116
+                if (value == null || value !== value) {
+                    return;
+                }
+
+                // If a number was passed in, add the unit (except for certain CSS properties)
+                if (type === "number") {
+                    value += ret && ret[3] || ( jQuery.cssNumber[origName] ? "" : "px" );
+                }
+
+                // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
+                // but it would mean to define eight
+                // (for every problematic property) identical functions
+                if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
+                    style[name] = "inherit";
+                }
+
+                // If a hook was provided, use that value, otherwise just set the specified value
+                if (!hooks || !( "set" in hooks ) ||
+                    ( value = hooks.set(elem, value, extra) ) !== undefined) {
+
+                    // Support: IE
+                    // Swallow errors from 'invalid' CSS values (#5509)
+                    try {
+                        style[name] = value;
+                    } catch (e) {
+                    }
+                }
+
+            } else {
+
+                // If a hook was provided get the non-computed value from there
+                if (hooks && "get" in hooks &&
+                    ( ret = hooks.get(elem, false, extra) ) !== undefined) {
+
+                    return ret;
+                }
+
+                // Otherwise just get the value from the style object
+                return style[name];
+            }
+        },
+
+        css: function (elem, name, extra, styles) {
+            var num, val, hooks,
+                origName = jQuery.camelCase(name);
+
+            // Make sure that we're working with the right name
+            name = jQuery.cssProps[origName] ||
+                ( jQuery.cssProps[origName] = vendorPropName(origName) || origName );
+
+            // gets hook for the prefixed version
+            // followed by the unprefixed version
+            hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
+
+            // If a hook was provided get the computed value from there
+            if (hooks && "get" in hooks) {
+                val = hooks.get(elem, true, extra);
+            }
+
+            // Otherwise, if a way to get the computed value exists, use that
+            if (val === undefined) {
+                val = curCSS(elem, name, styles);
+            }
+
+            //convert "normal" to computed value
+            if (val === "normal" && name in cssNormalTransform) {
+                val = cssNormalTransform[name];
+            }
+
+            // Return, converting to number if forced or a qualifier was provided and val looks numeric
+            if (extra === "" || extra) {
+                num = parseFloat(val);
+                return extra === true || isFinite(num) ? num || 0 : val;
+            }
+            return val;
+        }
+    });
+
+    jQuery.each(["height", "width"], function (i, name) {
+        jQuery.cssHooks[name] = {
+            get: function (elem, computed, extra) {
+                if (computed) {
+
+                    // certain elements can have dimension info if we invisibly show them
+                    // however, it must have a current display style that would benefit from this
+                    return rdisplayswap.test(jQuery.css(elem, "display")) &&
+                    elem.offsetWidth === 0 ?
+                        swap(elem, cssShow, function () {
+                            return getWidthOrHeight(elem, name, extra);
+                        }) :
+                        getWidthOrHeight(elem, name, extra);
+                }
+            },
+
+            set: function (elem, value, extra) {
+                var styles = extra && getStyles(elem);
+                return setPositiveNumber(elem, value, extra ?
+                    augmentWidthOrHeight(
+                        elem,
+                        name,
+                        extra,
+                        support.boxSizing &&
+                        jQuery.css(elem, "boxSizing", false, styles) === "border-box",
+                        styles
+                    ) : 0
+                );
+            }
+        };
+    });
+
+    if (!support.opacity) {
+        jQuery.cssHooks.opacity = {
+            get: function (elem, computed) {
+
+                // IE uses filters for opacity
+                return ropacity.test(( computed && elem.currentStyle ?
+                        elem.currentStyle.filter :
+                        elem.style.filter ) || "") ?
+                    ( 0.01 * parseFloat(RegExp.$1) ) + "" :
+                    computed ? "1" : "";
+            },
+
+            set: function (elem, value) {
+                var style = elem.style,
+                    currentStyle = elem.currentStyle,
+                    opacity = jQuery.isNumeric(value) ? "alpha(opacity=" + value * 100 + ")" : "",
+                    filter = currentStyle && currentStyle.filter || style.filter || "";
+
+                // IE has trouble with opacity if it does not have layout
+                // Force it by setting the zoom level
+                style.zoom = 1;
+
+                // if setting opacity to 1, and no other filters exist -
+                // attempt to remove filter attribute #6652
+                // if value === "", then remove inline opacity #12685
+                if (( value >= 1 || value === "" ) &&
+                    jQuery.trim(filter.replace(ralpha, "")) === "" &&
+                    style.removeAttribute) {
+
+                    // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+                    // if "filter:" is present at all, clearType is disabled, we want to avoid this
+                    // style.removeAttribute is IE Only, but so apparently is this code path...
+                    style.removeAttribute("filter");
+
+                    // if there is no filter style applied in a css rule
+                    // or unset inline opacity, we are done
+                    if (value === "" || currentStyle && !currentStyle.filter) {
+                        return;
+                    }
+                }
+
+                // otherwise, set new filter values
+                style.filter = ralpha.test(filter) ?
+                    filter.replace(ralpha, opacity) :
+                    filter + " " + opacity;
+            }
+        };
+    }
+
+    jQuery.cssHooks.marginRight = addGetHookIf(support.reliableMarginRight,
+        function (elem, computed) {
+            if (computed) {
+                return swap(elem, {"display": "inline-block"},
+                    curCSS, [elem, "marginRight"]);
+            }
+        }
+    );
+
+    jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft,
+        function (elem, computed) {
+            if (computed) {
+                return (
+                        parseFloat(curCSS(elem, "marginLeft")) ||
+
+                        // Support: IE<=11+
+                        // Running getBoundingClientRect on a disconnected node in IE throws an error
+                        // Support: IE8 only
+                        // getClientRects() errors on disconnected elems
+                        ( jQuery.contains(elem.ownerDocument, elem) ?
+                                elem.getBoundingClientRect().left -
+                                swap(elem, {marginLeft: 0}, function () {
+                                    return elem.getBoundingClientRect().left;
+                                }) :
+                                0
+                        )
+                    ) + "px";
+            }
+        }
+    );
+
+// These hooks are used by animate to expand properties
+    jQuery.each({
+        margin: "",
+        padding: "",
+        border: "Width"
+    }, function (prefix, suffix) {
+        jQuery.cssHooks[prefix + suffix] = {
+            expand: function (value) {
+                var i = 0,
+                    expanded = {},
+
+                    // assumes a single number if not a string
+                    parts = typeof value === "string" ? value.split(" ") : [value];
+
+                for (; i < 4; i++) {
+                    expanded[prefix + cssExpand[i] + suffix] =
+                        parts[i] || parts[i - 2] || parts[0];
+                }
+
+                return expanded;
+            }
+        };
+
+        if (!rmargin.test(prefix)) {
+            jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
+        }
+    });
+
+    jQuery.fn.extend({
+        css: function (name, value) {
+            return access(this, function (elem, name, value) {
+                var styles, len,
+                    map = {},
+                    i = 0;
+
+                if (jQuery.isArray(name)) {
+                    styles = getStyles(elem);
+                    len = name.length;
+
+                    for (; i < len; i++) {
+                        map[name[i]] = jQuery.css(elem, name[i], false, styles);
+                    }
+
+                    return map;
+                }
+
+                return value !== undefined ?
+                    jQuery.style(elem, name, value) :
+                    jQuery.css(elem, name);
+            }, name, value, arguments.length > 1);
+        },
+        show: function () {
+            return showHide(this, true);
+        },
+        hide: function () {
+            return showHide(this);
+        },
+        toggle: function (state) {
+            if (typeof state === "boolean") {
+                return state ? this.show() : this.hide();
+            }
+
+            return this.each(function () {
+                if (isHidden(this)) {
+                    jQuery(this).show();
+                } else {
+                    jQuery(this).hide();
+                }
+            });
+        }
+    });
+
+
+    function Tween(elem, options, prop, end, easing) {
+        return new Tween.prototype.init(elem, options, prop, end, easing);
+    }
+
+    jQuery.Tween = Tween;
+
+    Tween.prototype = {
+        constructor: Tween,
+        init: function (elem, options, prop, end, easing, unit) {
+            this.elem = elem;
+            this.prop = prop;
+            this.easing = easing || jQuery.easing._default;
+            this.options = options;
+            this.start = this.now = this.cur();
+            this.end = end;
+            this.unit = unit || ( jQuery.cssNumber[prop] ? "" : "px" );
+        },
+        cur: function () {
+            var hooks = Tween.propHooks[this.prop];
+
+            return hooks && hooks.get ?
+                hooks.get(this) :
+                Tween.propHooks._default.get(this);
+        },
+        run: function (percent) {
+            var eased,
+                hooks = Tween.propHooks[this.prop];
+
+            if (this.options.duration) {
+                this.pos = eased = jQuery.easing[this.easing](
+                    percent, this.options.duration * percent, 0, 1, this.options.duration
+                );
+            } else {
+                this.pos = eased = percent;
+            }
+            this.now = ( this.end - this.start ) * eased + this.start;
+
+            if (this.options.step) {
+                this.options.step.call(this.elem, this.now, this);
+            }
+
+            if (hooks && hooks.set) {
+                hooks.set(this);
+            } else {
+                Tween.propHooks._default.set(this);
+            }
+            return this;
+        }
+    };
+
+    Tween.prototype.init.prototype = Tween.prototype;
+
+    Tween.propHooks = {
+        _default: {
+            get: function (tween) {
+                var result;
+
+                // Use a property on the element directly when it is not a DOM element,
+                // or when there is no matching style property that exists.
+                if (tween.elem.nodeType !== 1 ||
+                    tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {
+                    return tween.elem[tween.prop];
+                }
+
+                // passing an empty string as a 3rd parameter to .css will automatically
+                // attempt a parseFloat and fallback to a string if the parse fails
+                // so, simple values such as "10px" are parsed to Float.
+                // complex values such as "rotate(1rad)" are returned as is.
+                result = jQuery.css(tween.elem, tween.prop, "");
+
+                // Empty strings, null, undefined and "auto" are converted to 0.
+                return !result || result === "auto" ? 0 : result;
+            },
+            set: function (tween) {
+
+                // use step hook for back compat - use cssHook if its there - use .style if its
+                // available and use plain properties where available
+                if (jQuery.fx.step[tween.prop]) {
+                    jQuery.fx.step[tween.prop](tween);
+                } else if (tween.elem.nodeType === 1 &&
+                    ( tween.elem.style[jQuery.cssProps[tween.prop]] != null ||
+                    jQuery.cssHooks[tween.prop] )) {
+                    jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
+                } else {
+                    tween.elem[tween.prop] = tween.now;
+                }
+            }
+        }
+    };
+
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
+
+    Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+        set: function (tween) {
+            if (tween.elem.nodeType && tween.elem.parentNode) {
+                tween.elem[tween.prop] = tween.now;
+            }
+        }
+    };
+
+    jQuery.easing = {
+        linear: function (p) {
+            return p;
+        },
+        swing: function (p) {
+            return 0.5 - Math.cos(p * Math.PI) / 2;
+        },
+        _default: "swing"
+    };
+
+    jQuery.fx = Tween.prototype.init;
+
+// Back Compat <1.8 extension point
+    jQuery.fx.step = {};
+
+
+    var
+        fxNow, timerId,
+        rfxtypes = /^(?:toggle|show|hide)$/,
+        rrun = /queueHooks$/;
+
+// Animations created synchronously will run synchronously
+    function createFxNow() {
+        window.setTimeout(function () {
+            fxNow = undefined;
+        });
+        return ( fxNow = jQuery.now() );
+    }
+
+// Generate parameters to create a standard animation
+    function genFx(type, includeWidth) {
+        var which,
+            attrs = {height: type},
+            i = 0;
+
+        // if we include width, step value is 1 to do all cssExpand values,
+        // if we don't include width, step value is 2 to skip over Left and Right
+        includeWidth = includeWidth ? 1 : 0;
+        for (; i < 4; i += 2 - includeWidth) {
+            which = cssExpand[i];
+            attrs["margin" + which] = attrs["padding" + which] = type;
+        }
+
+        if (includeWidth) {
+            attrs.opacity = attrs.width = type;
+        }
+
+        return attrs;
+    }
+
+    function createTween(value, prop, animation) {
+        var tween,
+            collection = ( Animation.tweeners[prop] || [] ).concat(Animation.tweeners["*"]),
+            index = 0,
+            length = collection.length;
+        for (; index < length; index++) {
+            if (( tween = collection[index].call(animation, prop, value) )) {
+
+                // we're done with this property
+                return tween;
+            }
+        }
+    }
+
+    function defaultPrefilter(elem, props, opts) {
+        /* jshint validthis: true */
+        var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
+            anim = this,
+            orig = {},
+            style = elem.style,
+            hidden = elem.nodeType && isHidden(elem),
+            dataShow = jQuery._data(elem, "fxshow");
+
+        // handle queue: false promises
+        if (!opts.queue) {
+            hooks = jQuery._queueHooks(elem, "fx");
+            if (hooks.unqueued == null) {
+                hooks.unqueued = 0;
+                oldfire = hooks.empty.fire;
+                hooks.empty.fire = function () {
+                    if (!hooks.unqueued) {
+                        oldfire();
+                    }
+                };
+            }
+            hooks.unqueued++;
+
+            anim.always(function () {
+
+                // doing this makes sure that the complete handler will be called
+                // before this completes
+                anim.always(function () {
+                    hooks.unqueued--;
+                    if (!jQuery.queue(elem, "fx").length) {
+                        hooks.empty.fire();
+                    }
+                });
+            });
+        }
+
+        // height/width overflow pass
+        if (elem.nodeType === 1 && ( "height" in props || "width" in props )) {
+
+            // Make sure that nothing sneaks out
+            // Record all 3 overflow attributes because IE does not
+            // change the overflow attribute when overflowX and
+            // overflowY are set to the same value
+            opts.overflow = [style.overflow, style.overflowX, style.overflowY];
+
+            // Set display property to inline-block for height/width
+            // animations on inline elements that are having width/height animated
+            display = jQuery.css(elem, "display");
+
+            // Test default display if display is currently "none"
+            checkDisplay = display === "none" ?
+                jQuery._data(elem, "olddisplay") || defaultDisplay(elem.nodeName) : display;
+
+            if (checkDisplay === "inline" && jQuery.css(elem, "float") === "none") {
+
+                // inline-level elements accept inline-block;
+                // block-level elements need to be inline with layout
+                if (!support.inlineBlockNeedsLayout || defaultDisplay(elem.nodeName) === "inline") {
+                    style.display = "inline-block";
+                } else {
+                    style.zoom = 1;
+                }
+            }
+        }
+
+        if (opts.overflow) {
+            style.overflow = "hidden";
+            if (!support.shrinkWrapBlocks()) {
+                anim.always(function () {
+                    style.overflow = opts.overflow[0];
+                    style.overflowX = opts.overflow[1];
+                    style.overflowY = opts.overflow[2];
+                });
+            }
+        }
+
+        // show/hide pass
+        for (prop in props) {
+            value = props[prop];
+            if (rfxtypes.exec(value)) {
+                delete props[prop];
+                toggle = toggle || value === "toggle";
+                if (value === ( hidden ? "hide" : "show" )) {
+
+                    // If there is dataShow left over from a stopped hide or show
+                    // and we are going to proceed with show, we should pretend to be hidden
+                    if (value === "show" && dataShow && dataShow[prop] !== undefined) {
+                        hidden = true;
+                    } else {
+                        continue;
+                    }
+                }
+                orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
+
+                // Any non-fx value stops us from restoring the original display value
+            } else {
+                display = undefined;
+            }
+        }
+
+        if (!jQuery.isEmptyObject(orig)) {
+            if (dataShow) {
+                if ("hidden" in dataShow) {
+                    hidden = dataShow.hidden;
+                }
+            } else {
+                dataShow = jQuery._data(elem, "fxshow", {});
+            }
+
+            // store state if its toggle - enables .stop().toggle() to "reverse"
+            if (toggle) {
+                dataShow.hidden = !hidden;
+            }
+            if (hidden) {
+                jQuery(elem).show();
+            } else {
+                anim.done(function () {
+                    jQuery(elem).hide();
+                });
+            }
+            anim.done(function () {
+                var prop;
+                jQuery._removeData(elem, "fxshow");
+                for (prop in orig) {
+                    jQuery.style(elem, prop, orig[prop]);
+                }
+            });
+            for (prop in orig) {
+                tween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
+
+                if (!( prop in dataShow )) {
+                    dataShow[prop] = tween.start;
+                    if (hidden) {
+                        tween.end = tween.start;
+                        tween.start = prop === "width" || prop === "height" ? 1 : 0;
+                    }
+                }
+            }
+
+            // If this is a noop like .hide().hide(), restore an overwritten display value
+        } else if (( display === "none" ? defaultDisplay(elem.nodeName) : display ) === "inline") {
+            style.display = display;
+        }
+    }
+
+    function propFilter(props, specialEasing) {
+        var index, name, easing, value, hooks;
+
+        // camelCase, specialEasing and expand cssHook pass
+        for (index in props) {
+            name = jQuery.camelCase(index);
+            easing = specialEasing[name];
+            value = props[index];
+            if (jQuery.isArray(value)) {
+                easing = value[1];
+                value = props[index] = value[0];
+            }
+
+            if (index !== name) {
+                props[name] = value;
+                delete props[index];
+            }
+
+            hooks = jQuery.cssHooks[name];
+            if (hooks && "expand" in hooks) {
+                value = hooks.expand(value);
+                delete props[name];
+
+                // not quite $.extend, this wont overwrite keys already present.
+                // also - reusing 'index' from above because we have the correct "name"
+                for (index in value) {
+                    if (!( index in props )) {
+                        props[index] = value[index];
+                        specialEasing[index] = easing;
+                    }
+                }
+            } else {
+                specialEasing[name] = easing;
+            }
+        }
+    }
+
+    function Animation(elem, properties, options) {
+        var result,
+            stopped,
+            index = 0,
+            length = Animation.prefilters.length,
+            deferred = jQuery.Deferred().always(function () {
+
+                // don't match elem in the :animated selector
+                delete tick.elem;
+            }),
+            tick = function () {
+                if (stopped) {
+                    return false;
+                }
+                var currentTime = fxNow || createFxNow(),
+                    remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
+
+                    // Support: Android 2.3
+                    // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
+                    temp = remaining / animation.duration || 0,
+                    percent = 1 - temp,
+                    index = 0,
+                    length = animation.tweens.length;
+
+                for (; index < length; index++) {
+                    animation.tweens[index].run(percent);
+                }
+
+                deferred.notifyWith(elem, [animation, percent, remaining]);
+
+                if (percent < 1 && length) {
+                    return remaining;
+                } else {
+                    deferred.resolveWith(elem, [animation]);
+                    return false;
+                }
+            },
+            animation = deferred.promise({
+                elem: elem,
+                props: jQuery.extend({}, properties),
+                opts: jQuery.extend(true, {
+                    specialEasing: {},
+                    easing: jQuery.easing._default
+                }, options),
+                originalProperties: properties,
+                originalOptions: options,
+                startTime: fxNow || createFxNow(),
+                duration: options.duration,
+                tweens: [],
+                createTween: function (prop, end) {
+                    var tween = jQuery.Tween(elem, animation.opts, prop, end,
+                        animation.opts.specialEasing[prop] || animation.opts.easing);
+                    animation.tweens.push(tween);
+                    return tween;
+                },
+                stop: function (gotoEnd) {
+                    var index = 0,
+
+                        // if we are going to the end, we want to run all the tweens
+                        // otherwise we skip this part
+                        length = gotoEnd ? animation.tweens.length : 0;
+                    if (stopped) {
+                        return this;
+                    }
+                    stopped = true;
+                    for (; index < length; index++) {
+                        animation.tweens[index].run(1);
+                    }
+
+                    // resolve when we played the last frame
+                    // otherwise, reject
+                    if (gotoEnd) {
+                        deferred.notifyWith(elem, [animation, 1, 0]);
+                        deferred.resolveWith(elem, [animation, gotoEnd]);
+                    } else {
+                        deferred.rejectWith(elem, [animation, gotoEnd]);
+                    }
+                    return this;
+                }
+            }),
+            props = animation.props;
+
+        propFilter(props, animation.opts.specialEasing);
+
+        for (; index < length; index++) {
+            result = Animation.prefilters[index].call(animation, elem, props, animation.opts);
+            if (result) {
+                if (jQuery.isFunction(result.stop)) {
+                    jQuery._queueHooks(animation.elem, animation.opts.queue).stop =
+                        jQuery.proxy(result.stop, result);
+                }
+                return result;
+            }
+        }
+
+        jQuery.map(props, createTween, animation);
+
+        if (jQuery.isFunction(animation.opts.start)) {
+            animation.opts.start.call(elem, animation);
+        }
+
+        jQuery.fx.timer(
+            jQuery.extend(tick, {
+                elem: elem,
+                anim: animation,
+                queue: animation.opts.queue
+            })
+        );
+
+        // attach callbacks from options
+        return animation.progress(animation.opts.progress)
+            .done(animation.opts.done, animation.opts.complete)
+            .fail(animation.opts.fail)
+            .always(animation.opts.always);
+    }
+
+    jQuery.Animation = jQuery.extend(Animation, {
+
+        tweeners: {
+            "*": [function (prop, value) {
+                var tween = this.createTween(prop, value);
+                adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);
+                return tween;
+            }]
+        },
+
+        tweener: function (props, callback) {
+            if (jQuery.isFunction(props)) {
+                callback = props;
+                props = ["*"];
+            } else {
+                props = props.match(rnotwhite);
+            }
+
+            var prop,
+                index = 0,
+                length = props.length;
+
+            for (; index < length; index++) {
+                prop = props[index];
+                Animation.tweeners[prop] = Animation.tweeners[prop] || [];
+                Animation.tweeners[prop].unshift(callback);
+            }
+        },
+
+        prefilters: [defaultPrefilter],
+
+        prefilter: function (callback, prepend) {
+            if (prepend) {
+                Animation.prefilters.unshift(callback);
+            } else {
+                Animation.prefilters.push(callback);
+            }
+        }
+    });
+
+    jQuery.speed = function (speed, easing, fn) {
+        var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
+            complete: fn || !fn && easing ||
+            jQuery.isFunction(speed) && speed,
+            duration: speed,
+            easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
+        };
+
+        opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+            opt.duration in jQuery.fx.speeds ?
+                jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
+
+        // normalize opt.queue - true/undefined/null -> "fx"
+        if (opt.queue == null || opt.queue === true) {
+            opt.queue = "fx";
+        }
+
+        // Queueing
+        opt.old = opt.complete;
+
+        opt.complete = function () {
+            if (jQuery.isFunction(opt.old)) {
+                opt.old.call(this);
+            }
+
+            if (opt.queue) {
+                jQuery.dequeue(this, opt.queue);
+            }
+        };
+
+        return opt;
+    };
+
+    jQuery.fn.extend({
+        fadeTo: function (speed, to, easing, callback) {
+
+            // show any hidden elements after setting opacity to 0
+            return this.filter(isHidden).css("opacity", 0).show()
+
+            // animate to the value specified
+                .end().animate({opacity: to}, speed, easing, callback);
+        },
+        animate: function (prop, speed, easing, callback) {
+            var empty = jQuery.isEmptyObject(prop),
+                optall = jQuery.speed(speed, easing, callback),
+                doAnimation = function () {
+
+                    // Operate on a copy of prop so per-property easing won't be lost
+                    var anim = Animation(this, jQuery.extend({}, prop), optall);
+
+                    // Empty animations, or finishing resolves immediately
+                    if (empty || jQuery._data(this, "finish")) {
+                        anim.stop(true);
+                    }
+                };
+            doAnimation.finish = doAnimation;
+
+            return empty || optall.queue === false ?
+                this.each(doAnimation) :
+                this.queue(optall.queue, doAnimation);
+        },
+        stop: function (type, clearQueue, gotoEnd) {
+            var stopQueue = function (hooks) {
+                var stop = hooks.stop;
+                delete hooks.stop;
+                stop(gotoEnd);
+            };
+
+            if (typeof type !== "string") {
+                gotoEnd = clearQueue;
+                clearQueue = type;
+                type = undefined;
+            }
+            if (clearQueue && type !== false) {
+                this.queue(type || "fx", []);
+            }
+
+            return this.each(function () {
+                var dequeue = true,
+                    index = type != null && type + "queueHooks",
+                    timers = jQuery.timers,
+                    data = jQuery._data(this);
+
+                if (index) {
+                    if (data[index] && data[index].stop) {
+                        stopQueue(data[index]);
+                    }
+                } else {
+                    for (index in data) {
+                        if (data[index] && data[index].stop && rrun.test(index)) {
+                            stopQueue(data[index]);
+                        }
+                    }
+                }
+
+                for (index = timers.length; index--;) {
+                    if (timers[index].elem === this &&
+                        ( type == null || timers[index].queue === type )) {
+
+                        timers[index].anim.stop(gotoEnd);
+                        dequeue = false;
+                        timers.splice(index, 1);
+                    }
+                }
+
+                // start the next in the queue if the last step wasn't forced
+                // timers currently will call their complete callbacks, which will dequeue
+                // but only if they were gotoEnd
+                if (dequeue || !gotoEnd) {
+                    jQuery.dequeue(this, type);
+                }
+            });
+        },
+        finish: function (type) {
+            if (type !== false) {
+                type = type || "fx";
+            }
+            return this.each(function () {
+                var index,
+                    data = jQuery._data(this),
+                    queue = data[type + "queue"],
+                    hooks = data[type + "queueHooks"],
+                    timers = jQuery.timers,
+                    length = queue ? queue.length : 0;
+
+                // enable finishing flag on private data
+                data.finish = true;
+
+                // empty the queue first
+                jQuery.queue(this, type, []);
+
+                if (hooks && hooks.stop) {
+                    hooks.stop.call(this, true);
+                }
+
+                // look for any active animations, and finish them
+                for (index = timers.length; index--;) {
+                    if (timers[index].elem === this && timers[index].queue === type) {
+                        timers[index].anim.stop(true);
+                        timers.splice(index, 1);
+                    }
+                }
+
+                // look for any animations in the old queue and finish them
+                for (index = 0; index < length; index++) {
+                    if (queue[index] && queue[index].finish) {
+                        queue[index].finish.call(this);
+                    }
+                }
+
+                // turn off finishing flag
+                delete data.finish;
+            });
+        }
+    });
+
+    jQuery.each(["toggle", "show", "hide"], function (i, name) {
+        var cssFn = jQuery.fn[name];
+        jQuery.fn[name] = function (speed, easing, callback) {
+            return speed == null || typeof speed === "boolean" ?
+                cssFn.apply(this, arguments) :
+                this.animate(genFx(name, true), speed, easing, callback);
+        };
+    });
+
+// Generate shortcuts for custom animations
+    jQuery.each({
+        slideDown: genFx("show"),
+        slideUp: genFx("hide"),
+        slideToggle: genFx("toggle"),
+        fadeIn: {opacity: "show"},
+        fadeOut: {opacity: "hide"},
+        fadeToggle: {opacity: "toggle"}
+    }, function (name, props) {
+        jQuery.fn[name] = function (speed, easing, callback) {
+            return this.animate(props, speed, easing, callback);
+        };
+    });
+
+    jQuery.timers = [];
+    jQuery.fx.tick = function () {
+        var timer,
+            timers = jQuery.timers,
+            i = 0;
+
+        fxNow = jQuery.now();
+
+        for (; i < timers.length; i++) {
+            timer = timers[i];
+
+            // Checks the timer has not already been removed
+            if (!timer() && timers[i] === timer) {
+                timers.splice(i--, 1);
+            }
+        }
+
+        if (!timers.length) {
+            jQuery.fx.stop();
+        }
+        fxNow = undefined;
+    };
+
+    jQuery.fx.timer = function (timer) {
+        jQuery.timers.push(timer);
+        if (timer()) {
+            jQuery.fx.start();
+        } else {
+            jQuery.timers.pop();
+        }
+    };
+
+    jQuery.fx.interval = 13;
+
+    jQuery.fx.start = function () {
+        if (!timerId) {
+            timerId = window.setInterval(jQuery.fx.tick, jQuery.fx.interval);
+        }
+    };
+
+    jQuery.fx.stop = function () {
+        window.clearInterval(timerId);
+        timerId = null;
+    };
+
+    jQuery.fx.speeds = {
+        slow: 600,
+        fast: 200,
+
+        // Default speed
+        _default: 400
+    };
+
+
+// Based off of the plugin by Clint Helfers, with permission.
+// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
+    jQuery.fn.delay = function (time, type) {
+        time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+        type = type || "fx";
+
+        return this.queue(type, function (next, hooks) {
+            var timeout = window.setTimeout(next, time);
+            hooks.stop = function () {
+                window.clearTimeout(timeout);
+            };
+        });
+    };
+
+
+    (function () {
+        var a,
+            input = document.createElement("input"),
+            div = document.createElement("div"),
+            select = document.createElement("select"),
+            opt = select.appendChild(document.createElement("option"));
+
+        // Setup
+        div = document.createElement("div");
+        div.setAttribute("className", "t");
+        div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+        a = div.getElementsByTagName("a")[0];
+
+        // Support: Windows Web Apps (WWA)
+        // `type` must use .setAttribute for WWA (#14901)
+        input.setAttribute("type", "checkbox");
+        div.appendChild(input);
+
+        a = div.getElementsByTagName("a")[0];
+
+        // First batch of tests.
+        a.style.cssText = "top:1px";
+
+        // Test setAttribute on camelCase class.
+        // If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+        support.getSetAttribute = div.className !== "t";
+
+        // Get the style information from getAttribute
+        // (IE uses .cssText instead)
+        support.style = /top/.test(a.getAttribute("style"));
+
+        // Make sure that URLs aren't manipulated
+        // (IE normalizes it by default)
+        support.hrefNormalized = a.getAttribute("href") === "/a";
+
+        // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+        support.checkOn = !!input.value;
+
+        // Make sure that a selected-by-default option has a working selected property.
+        // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+        support.optSelected = opt.selected;
+
+        // Tests for enctype support on a form (#6743)
+        support.enctype = !!document.createElement("form").enctype;
+
+        // Make sure that the options inside disabled selects aren't marked as disabled
+        // (WebKit marks them as disabled)
+        select.disabled = true;
+        support.optDisabled = !opt.disabled;
+
+        // Support: IE8 only
+        // Check if we can trust getAttribute("value")
+        input = document.createElement("input");
+        input.setAttribute("value", "");
+        support.input = input.getAttribute("value") === "";
+
+        // Check if an input maintains its value after becoming a radio
+        input.value = "t";
+        input.setAttribute("type", "radio");
+        support.radioValue = input.value === "t";
+    })();
+
+
+    var rreturn = /\r/g,
+        rspaces = /[\x20\t\r\n\f]+/g;
+
+    jQuery.fn.extend({
+        val: function (value) {
+            var hooks, ret, isFunction,
+                elem = this[0];
+
+            if (!arguments.length) {
+                if (elem) {
+                    hooks = jQuery.valHooks[elem.type] ||
+                        jQuery.valHooks[elem.nodeName.toLowerCase()];
+
+                    if (
+                        hooks &&
+                        "get" in hooks &&
+                        ( ret = hooks.get(elem, "value") ) !== undefined
+                    ) {
+                        return ret;
+                    }
+
+                    ret = elem.value;
+
+                    return typeof ret === "string" ?
+
+                        // handle most common string cases
+                        ret.replace(rreturn, "") :
+
+                        // handle cases where value is null/undef or number
+                        ret == null ? "" : ret;
+                }
+
+                return;
+            }
+
+            isFunction = jQuery.isFunction(value);
+
+            return this.each(function (i) {
+                var val;
+
+                if (this.nodeType !== 1) {
+                    return;
+                }
+
+                if (isFunction) {
+                    val = value.call(this, i, jQuery(this).val());
+                } else {
+                    val = value;
+                }
+
+                // Treat null/undefined as ""; convert numbers to string
+                if (val == null) {
+                    val = "";
+                } else if (typeof val === "number") {
+                    val += "";
+                } else if (jQuery.isArray(val)) {
+                    val = jQuery.map(val, function (value) {
+                        return value == null ? "" : value + "";
+                    });
+                }
+
+                hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
+
+                // If set returns undefined, fall back to normal setting
+                if (!hooks || !( "set" in hooks ) || hooks.set(this, val, "value") === undefined) {
+                    this.value = val;
+                }
+            });
+        }
+    });
+
+    jQuery.extend({
+        valHooks: {
+            option: {
+                get: function (elem) {
+                    var val = jQuery.find.attr(elem, "value");
+                    return val != null ?
+                        val :
+
+                        // Support: IE10-11+
+                        // option.text throws exceptions (#14686, #14858)
+                        // Strip and collapse whitespace
+                        // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
+                        jQuery.trim(jQuery.text(elem)).replace(rspaces, " ");
+                }
+            },
+            select: {
+                get: function (elem) {
+                    var value, option,
+                        options = elem.options,
+                        index = elem.selectedIndex,
+                        one = elem.type === "select-one" || index < 0,
+                        values = one ? null : [],
+                        max = one ? index + 1 : options.length,
+                        i = index < 0 ?
+                            max :
+                            one ? index : 0;
+
+                    // Loop through all the selected options
+                    for (; i < max; i++) {
+                        option = options[i];
+
+                        // oldIE doesn't update selected after form reset (#2551)
+                        if (( option.selected || i === index ) &&
+
+                            // Don't return options that are disabled or in a disabled optgroup
+                            ( support.optDisabled ?
+                                !option.disabled :
+                                option.getAttribute("disabled") === null ) &&
+                            ( !option.parentNode.disabled ||
+                            !jQuery.nodeName(option.parentNode, "optgroup") )) {
+
+                            // Get the specific value for the option
+                            value = jQuery(option).val();
+
+                            // We don't need an array for one selects
+                            if (one) {
+                                return value;
+                            }
+
+                            // Multi-Selects return an array
+                            values.push(value);
+                        }
+                    }
+
+                    return values;
+                },
+
+                set: function (elem, value) {
+                    var optionSet, option,
+                        options = elem.options,
+                        values = jQuery.makeArray(value),
+                        i = options.length;
+
+                    while (i--) {
+                        option = options[i];
+
+                        if (jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) {
+
+                            // Support: IE6
+                            // When new option element is added to select box we need to
+                            // force reflow of newly added node in order to workaround delay
+                            // of initialization properties
+                            try {
+                                option.selected = optionSet = true;
+
+                            } catch (_) {
+
+                                // Will be executed only in IE6
+                                option.scrollHeight;
+                            }
+
+                        } else {
+                            option.selected = false;
+                        }
+                    }
+
+                    // Force browsers to behave consistently when non-matching value is set
+                    if (!optionSet) {
+                        elem.selectedIndex = -1;
+                    }
+
+                    return options;
+                }
+            }
+        }
+    });
+
+// Radios and checkboxes getter/setter
+    jQuery.each(["radio", "checkbox"], function () {
+        jQuery.valHooks[this] = {
+            set: function (elem, value) {
+                if (jQuery.isArray(value)) {
+                    return ( elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1 );
+                }
+            }
+        };
+        if (!support.checkOn) {
+            jQuery.valHooks[this].get = function (elem) {
+                return elem.getAttribute("value") === null ? "on" : elem.value;
+            };
+        }
+    });
+
+
+    var nodeHook, boolHook,
+        attrHandle = jQuery.expr.attrHandle,
+        ruseDefault = /^(?:checked|selected)$/i,
+        getSetAttribute = support.getSetAttribute,
+        getSetInput = support.input;
+
+    jQuery.fn.extend({
+        attr: function (name, value) {
+            return access(this, jQuery.attr, name, value, arguments.length > 1);
+        },
+
+        removeAttr: function (name) {
+            return this.each(function () {
+                jQuery.removeAttr(this, name);
+            });
+        }
+    });
+
+    jQuery.extend({
+        attr: function (elem, name, value) {
+            var ret, hooks,
+                nType = elem.nodeType;
+
+            // Don't get/set attributes on text, comment and attribute nodes
+            if (nType === 3 || nType === 8 || nType === 2) {
+                return;
+            }
+
+            // Fallback to prop when attributes are not supported
+            if (typeof elem.getAttribute === "undefined") {
+                return jQuery.prop(elem, name, value);
+            }
+
+            // All attributes are lowercase
+            // Grab necessary hook if one is defined
+            if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
+                name = name.toLowerCase();
+                hooks = jQuery.attrHooks[name] ||
+                    ( jQuery.expr.match.bool.test(name) ? boolHook : nodeHook );
+            }
+
+            if (value !== undefined) {
+                if (value === null) {
+                    jQuery.removeAttr(elem, name);
+                    return;
+                }
+
+                if (hooks && "set" in hooks &&
+                    ( ret = hooks.set(elem, value, name) ) !== undefined) {
+                    return ret;
+                }
+
+                elem.setAttribute(name, value + "");
+                return value;
+            }
+
+            if (hooks && "get" in hooks && ( ret = hooks.get(elem, name) ) !== null) {
+                return ret;
+            }
+
+            ret = jQuery.find.attr(elem, name);
+
+            // Non-existent attributes return null, we normalize to undefined
+            return ret == null ? undefined : ret;
+        },
+
+        attrHooks: {
+            type: {
+                set: function (elem, value) {
+                    if (!support.radioValue && value === "radio" &&
+                        jQuery.nodeName(elem, "input")) {
+
+                        // Setting the type on a radio button after the value resets the value in IE8-9
+                        // Reset value to default in case type is set after value during creation
+                        var val = elem.value;
+                        elem.setAttribute("type", value);
+                        if (val) {
+                            elem.value = val;
+                        }
+                        return value;
+                    }
+                }
+            }
+        },
+
+        removeAttr: function (elem, value) {
+            var name, propName,
+                i = 0,
+                attrNames = value && value.match(rnotwhite);
+
+            if (attrNames && elem.nodeType === 1) {
+                while (( name = attrNames[i++] )) {
+                    propName = jQuery.propFix[name] || name;
+
+                    // Boolean attributes get special treatment (#10870)
+                    if (jQuery.expr.match.bool.test(name)) {
+
+                        // Set corresponding property to false
+                        if (getSetInput && getSetAttribute || !ruseDefault.test(name)) {
+                            elem[propName] = false;
+
+                            // Support: IE<9
+                            // Also clear defaultChecked/defaultSelected (if appropriate)
+                        } else {
+                            elem[jQuery.camelCase("default-" + name)] =
+                                elem[propName] = false;
+                        }
+
+                        // See #9699 for explanation of this approach (setting first, then removal)
+                    } else {
+                        jQuery.attr(elem, name, "");
+                    }
+
+                    elem.removeAttribute(getSetAttribute ? name : propName);
+                }
+            }
+        }
+    });
+
+// Hooks for boolean attributes
+    boolHook = {
+        set: function (elem, value, name) {
+            if (value === false) {
+
+                // Remove boolean attributes when set to false
+                jQuery.removeAttr(elem, name);
+            } else if (getSetInput && getSetAttribute || !ruseDefault.test(name)) {
+
+                // IE<8 needs the *property* name
+                elem.setAttribute(!getSetAttribute && jQuery.propFix[name] || name, name);
+
+            } else {
+
+                // Support: IE<9
+                // Use defaultChecked and defaultSelected for oldIE
+                elem[jQuery.camelCase("default-" + name)] = elem[name] = true;
+            }
+            return name;
+        }
+    };
+
+    jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (i, name) {
+        var getter = attrHandle[name] || jQuery.find.attr;
+
+        if (getSetInput && getSetAttribute || !ruseDefault.test(name)) {
+            attrHandle[name] = function (elem, name, isXML) {
+                var ret, handle;
+                if (!isXML) {
+
+                    // Avoid an infinite loop by temporarily removing this function from the getter
+                    handle = attrHandle[name];
+                    attrHandle[name] = ret;
+                    ret = getter(elem, name, isXML) != null ?
+                        name.toLowerCase() :
+                        null;
+                    attrHandle[name] = handle;
+                }
+                return ret;
+            };
+        } else {
+            attrHandle[name] = function (elem, name, isXML) {
+                if (!isXML) {
+                    return elem[jQuery.camelCase("default-" + name)] ?
+                        name.toLowerCase() :
+                        null;
+                }
+            };
+        }
+    });
+
+// fix oldIE attroperties
+    if (!getSetInput || !getSetAttribute) {
+        jQuery.attrHooks.value = {
+            set: function (elem, value, name) {
+                if (jQuery.nodeName(elem, "input")) {
+
+                    // Does not return so that setAttribute is also used
+                    elem.defaultValue = value;
+                } else {
+
+                    // Use nodeHook if defined (#1954); otherwise setAttribute is fine
+                    return nodeHook && nodeHook.set(elem, value, name);
+                }
+            }
+        };
+    }
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+    if (!getSetAttribute) {
+
+        // Use this for any attribute in IE6/7
+        // This fixes almost every IE6/7 issue
+        nodeHook = {
+            set: function (elem, value, name) {
+
+                // Set the existing or create a new attribute node
+                var ret = elem.getAttributeNode(name);
+                if (!ret) {
+                    elem.setAttributeNode(
+                        ( ret = elem.ownerDocument.createAttribute(name) )
+                    );
+                }
+
+                ret.value = value += "";
+
+                // Break association with cloned elements by also using setAttribute (#9646)
+                if (name === "value" || value === elem.getAttribute(name)) {
+                    return value;
+                }
+            }
+        };
+
+        // Some attributes are constructed with empty-string values when not defined
+        attrHandle.id = attrHandle.name = attrHandle.coords =
+            function (elem, name, isXML) {
+                var ret;
+                if (!isXML) {
+                    return ( ret = elem.getAttributeNode(name) ) && ret.value !== "" ?
+                        ret.value :
+                        null;
+                }
+            };
+
+        // Fixing value retrieval on a button requires this module
+        jQuery.valHooks.button = {
+            get: function (elem, name) {
+                var ret = elem.getAttributeNode(name);
+                if (ret && ret.specified) {
+                    return ret.value;
+                }
+            },
+            set: nodeHook.set
+        };
+
+        // Set contenteditable to false on removals(#10429)
+        // Setting to empty string throws an error as an invalid value
+        jQuery.attrHooks.contenteditable = {
+            set: function (elem, value, name) {
+                nodeHook.set(elem, value === "" ? false : value, name);
+            }
+        };
+
+        // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+        // This is for removals
+        jQuery.each(["width", "height"], function (i, name) {
+            jQuery.attrHooks[name] = {
+                set: function (elem, value) {
+                    if (value === "") {
+                        elem.setAttribute(name, "auto");
+                        return value;
+                    }
+                }
+            };
+        });
+    }
+
+    if (!support.style) {
+        jQuery.attrHooks.style = {
+            get: function (elem) {
+
+                // Return undefined in the case of empty string
+                // Note: IE uppercases css property names, but if we were to .toLowerCase()
+                // .cssText, that would destroy case sensitivity in URL's, like in "background"
+                return elem.style.cssText || undefined;
+            },
+            set: function (elem, value) {
+                return ( elem.style.cssText = value + "" );
+            }
+        };
+    }
+
+
+    var rfocusable = /^(?:input|select|textarea|button|object)$/i,
+        rclickable = /^(?:a|area)$/i;
+
+    jQuery.fn.extend({
+        prop: function (name, value) {
+            return access(this, jQuery.prop, name, value, arguments.length > 1);
+        },
+
+        removeProp: function (name) {
+            name = jQuery.propFix[name] || name;
+            return this.each(function () {
+
+                // try/catch handles cases where IE balks (such as removing a property on window)
+                try {
+                    this[name] = undefined;
+                    delete this[name];
+                } catch (e) {
+                }
+            });
+        }
+    });
+
+    jQuery.extend({
+        prop: function (elem, name, value) {
+            var ret, hooks,
+                nType = elem.nodeType;
+
+            // Don't get/set properties on text, comment and attribute nodes
+            if (nType === 3 || nType === 8 || nType === 2) {
+                return;
+            }
+
+            if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
+
+                // Fix name and attach hooks
+                name = jQuery.propFix[name] || name;
+                hooks = jQuery.propHooks[name];
+            }
+
+            if (value !== undefined) {
+                if (hooks && "set" in hooks &&
+                    ( ret = hooks.set(elem, value, name) ) !== undefined) {
+                    return ret;
+                }
+
+                return ( elem[name] = value );
+            }
+
+            if (hooks && "get" in hooks && ( ret = hooks.get(elem, name) ) !== null) {
+                return ret;
+            }
+
+            return elem[name];
+        },
+
+        propHooks: {
+            tabIndex: {
+                get: function (elem) {
+
+                    // elem.tabIndex doesn't always return the
+                    // correct value when it hasn't been explicitly set
+                    // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+                    // Use proper attribute retrieval(#12072)
+                    var tabindex = jQuery.find.attr(elem, "tabindex");
+
+                    return tabindex ?
+                        parseInt(tabindex, 10) :
+                        rfocusable.test(elem.nodeName) ||
+                        rclickable.test(elem.nodeName) && elem.href ?
+                            0 :
+                            -1;
+                }
+            }
+        },
+
+        propFix: {
+            "for": "htmlFor",
+            "class": "className"
+        }
+    });
+
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+    if (!support.hrefNormalized) {
+
+        // href/src property should get the full normalized URL (#10299/#12915)
+        jQuery.each(["href", "src"], function (i, name) {
+            jQuery.propHooks[name] = {
+                get: function (elem) {
+                    return elem.getAttribute(name, 4);
+                }
+            };
+        });
+    }
+
+// Support: Safari, IE9+
+// Accessing the selectedIndex property
+// forces the browser to respect setting selected
+// on the option
+// The getter ensures a default option is selected
+// when in an optgroup
+    if (!support.optSelected) {
+        jQuery.propHooks.selected = {
+            get: function (elem) {
+                var parent = elem.parentNode;
+
+                if (parent) {
+                    parent.selectedIndex;
+
+                    // Make sure that it also works with optgroups, see #5701
+                    if (parent.parentNode) {
+                        parent.parentNode.selectedIndex;
+                    }
+                }
+                return null;
+            },
+            set: function (elem) {
+                var parent = elem.parentNode;
+                if (parent) {
+                    parent.selectedIndex;
+
+                    if (parent.parentNode) {
+                        parent.parentNode.selectedIndex;
+                    }
+                }
+            }
+        };
+    }
+
+    jQuery.each([
+        "tabIndex",
+        "readOnly",
+        "maxLength",
+        "cellSpacing",
+        "cellPadding",
+        "rowSpan",
+        "colSpan",
+        "useMap",
+        "frameBorder",
+        "contentEditable"
+    ], function () {
+        jQuery.propFix[this.toLowerCase()] = this;
+    });
+
+// IE6/7 call enctype encoding
+    if (!support.enctype) {
+        jQuery.propFix.enctype = "encoding";
+    }
+
+
+    var rclass = /[\t\r\n\f]/g;
+
+    function getClass(elem) {
+        return jQuery.attr(elem, "class") || "";
+    }
+
+    jQuery.fn.extend({
+        addClass: function (value) {
+            var classes, elem, cur, curValue, clazz, j, finalValue,
+                i = 0;
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (j) {
+                    jQuery(this).addClass(value.call(this, j, getClass(this)));
+                });
+            }
+
+            if (typeof value === "string" && value) {
+                classes = value.match(rnotwhite) || [];
+
+                while (( elem = this[i++] )) {
+                    curValue = getClass(elem);
+                    cur = elem.nodeType === 1 &&
+                        ( " " + curValue + " " ).replace(rclass, " ");
+
+                    if (cur) {
+                        j = 0;
+                        while (( clazz = classes[j++] )) {
+                            if (cur.indexOf(" " + clazz + " ") < 0) {
+                                cur += clazz + " ";
+                            }
+                        }
+
+                        // only assign if different to avoid unneeded rendering.
+                        finalValue = jQuery.trim(cur);
+                        if (curValue !== finalValue) {
+                            jQuery.attr(elem, "class", finalValue);
+                        }
+                    }
+                }
+            }
+
+            return this;
+        },
+
+        removeClass: function (value) {
+            var classes, elem, cur, curValue, clazz, j, finalValue,
+                i = 0;
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (j) {
+                    jQuery(this).removeClass(value.call(this, j, getClass(this)));
+                });
+            }
+
+            if (!arguments.length) {
+                return this.attr("class", "");
+            }
+
+            if (typeof value === "string" && value) {
+                classes = value.match(rnotwhite) || [];
+
+                while (( elem = this[i++] )) {
+                    curValue = getClass(elem);
+
+                    // This expression is here for better compressibility (see addClass)
+                    cur = elem.nodeType === 1 &&
+                        ( " " + curValue + " " ).replace(rclass, " ");
+
+                    if (cur) {
+                        j = 0;
+                        while (( clazz = classes[j++] )) {
+
+                            // Remove *all* instances
+                            while (cur.indexOf(" " + clazz + " ") > -1) {
+                                cur = cur.replace(" " + clazz + " ", " ");
+                            }
+                        }
+
+                        // Only assign if different to avoid unneeded rendering.
+                        finalValue = jQuery.trim(cur);
+                        if (curValue !== finalValue) {
+                            jQuery.attr(elem, "class", finalValue);
+                        }
+                    }
+                }
+            }
+
+            return this;
+        },
+
+        toggleClass: function (value, stateVal) {
+            var type = typeof value;
+
+            if (typeof stateVal === "boolean" && type === "string") {
+                return stateVal ? this.addClass(value) : this.removeClass(value);
+            }
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (i) {
+                    jQuery(this).toggleClass(
+                        value.call(this, i, getClass(this), stateVal),
+                        stateVal
+                    );
+                });
+            }
+
+            return this.each(function () {
+                var className, i, self, classNames;
+
+                if (type === "string") {
+
+                    // Toggle individual class names
+                    i = 0;
+                    self = jQuery(this);
+                    classNames = value.match(rnotwhite) || [];
+
+                    while (( className = classNames[i++] )) {
+
+                        // Check each className given, space separated list
+                        if (self.hasClass(className)) {
+                            self.removeClass(className);
+                        } else {
+                            self.addClass(className);
+                        }
+                    }
+
+                    // Toggle whole class name
+                } else if (value === undefined || type === "boolean") {
+                    className = getClass(this);
+                    if (className) {
+
+                        // store className if set
+                        jQuery._data(this, "__className__", className);
+                    }
+
+                    // If the element has a class name or if we're passed "false",
+                    // then remove the whole classname (if there was one, the above saved it).
+                    // Otherwise bring back whatever was previously saved (if anything),
+                    // falling back to the empty string if nothing was stored.
+                    jQuery.attr(this, "class",
+                        className || value === false ?
+                            "" :
+                            jQuery._data(this, "__className__") || ""
+                    );
+                }
+            });
+        },
+
+        hasClass: function (selector) {
+            var className, elem,
+                i = 0;
+
+            className = " " + selector + " ";
+            while (( elem = this[i++] )) {
+                if (elem.nodeType === 1 &&
+                    ( " " + getClass(elem) + " " ).replace(rclass, " ")
+                        .indexOf(className) > -1
+                ) {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+    });
+
+
+// Return jQuery for attributes-only inclusion
+
+
+    jQuery.each(( "blur focus focusin focusout load resize scroll unload click dblclick " +
+        "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+        "change select submit keydown keypress keyup error contextmenu" ).split(" "),
+        function (i, name) {
+
+            // Handle event binding
+            jQuery.fn[name] = function (data, fn) {
+                return arguments.length > 0 ?
+                    this.on(name, null, data, fn) :
+                    this.trigger(name);
+            };
+        });
+
+    jQuery.fn.extend({
+        hover: function (fnOver, fnOut) {
+            return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
+        }
+    });
+
+
+    var location = window.location;
+
+    var nonce = jQuery.now();
+
+    var rquery = ( /\?/ );
+
+
+    var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
+
+    jQuery.parseJSON = function (data) {
+
+        // Attempt to parse using the native JSON parser first
+        if (window.JSON && window.JSON.parse) {
+
+            // Support: Android 2.3
+            // Workaround failure to string-cast null input
+            return window.JSON.parse(data + "");
+        }
+
+        var requireNonComma,
+            depth = null,
+            str = jQuery.trim(data + "");
+
+        // Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
+        // after removing valid tokens
+        return str && !jQuery.trim(str.replace(rvalidtokens, function (token, comma, open, close) {
+
+            // Force termination if we see a misplaced comma
+            if (requireNonComma && comma) {
+                depth = 0;
+            }
+
+            // Perform no more replacements after returning to outermost depth
+            if (depth === 0) {
+                return token;
+            }
+
+            // Commas must not follow "[", "{", or ","
+            requireNonComma = open || comma;
+
+            // Determine new depth
+            // array/object open ("[" or "{"): depth += true - false (increment)
+            // array/object close ("]" or "}"): depth += false - true (decrement)
+            // other cases ("," or primitive): depth += true - true (numeric cast)
+            depth += !close - !open;
+
+            // Remove this token
+            return "";
+        })) ?
+            ( Function("return " + str) )() :
+            jQuery.error("Invalid JSON: " + data);
+    };
+
+
+// Cross-browser xml parsing
+    jQuery.parseXML = function (data) {
+        var xml, tmp;
+        if (!data || typeof data !== "string") {
+            return null;
+        }
+        try {
+            if (window.DOMParser) { // Standard
+                tmp = new window.DOMParser();
+                xml = tmp.parseFromString(data, "text/xml");
+            } else { // IE
+                xml = new window.ActiveXObject("Microsoft.XMLDOM");
+                xml.async = "false";
+                xml.loadXML(data);
+            }
+        } catch (e) {
+            xml = undefined;
+        }
+        if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
+            jQuery.error("Invalid XML: " + data);
+        }
+        return xml;
+    };
+
+
+    var
+        rhash = /#.*$/,
+        rts = /([?&])_=[^&]*/,
+
+        // IE leaves an \r character at EOL
+        rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
+
+        // #7653, #8125, #8152: local protocol detection
+        rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+        rnoContent = /^(?:GET|HEAD)$/,
+        rprotocol = /^\/\//,
+        rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
+
+        /* Prefilters
+         * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+         * 2) These are called:
+         *    - BEFORE asking for a transport
+         *    - AFTER param serialization (s.data is a string if s.processData is true)
+         * 3) key is the dataType
+         * 4) the catchall symbol "*" can be used
+         * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+         */
+        prefilters = {},
+
+        /* Transports bindings
+         * 1) key is the dataType
+         * 2) the catchall symbol "*" can be used
+         * 3) selection will start with transport dataType and THEN go to "*" if needed
+         */
+        transports = {},
+
+        // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+        allTypes = "*/".concat("*"),
+
+        // Document location
+        ajaxLocation = location.href,
+
+        // Segment location into parts
+        ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+    function addToPrefiltersOrTransports(structure) {
+
+        // dataTypeExpression is optional and defaults to "*"
+        return function (dataTypeExpression, func) {
+
+            if (typeof dataTypeExpression !== "string") {
+                func = dataTypeExpression;
+                dataTypeExpression = "*";
+            }
+
+            var dataType,
+                i = 0,
+                dataTypes = dataTypeExpression.toLowerCase().match(rnotwhite) || [];
+
+            if (jQuery.isFunction(func)) {
+
+                // For each dataType in the dataTypeExpression
+                while (( dataType = dataTypes[i++] )) {
+
+                    // Prepend if requested
+                    if (dataType.charAt(0) === "+") {
+                        dataType = dataType.slice(1) || "*";
+                        ( structure[dataType] = structure[dataType] || [] ).unshift(func);
+
+                        // Otherwise append
+                    } else {
+                        ( structure[dataType] = structure[dataType] || [] ).push(func);
+                    }
+                }
+            }
+        };
+    }
+
+// Base inspection function for prefilters and transports
+    function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
+
+        var inspected = {},
+            seekingTransport = ( structure === transports );
+
+        function inspect(dataType) {
+            var selected;
+            inspected[dataType] = true;
+            jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) {
+                var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
+                if (typeof dataTypeOrTransport === "string" &&
+                    !seekingTransport && !inspected[dataTypeOrTransport]) {
+
+                    options.dataTypes.unshift(dataTypeOrTransport);
+                    inspect(dataTypeOrTransport);
+                    return false;
+                } else if (seekingTransport) {
+                    return !( selected = dataTypeOrTransport );
+                }
+            });
+            return selected;
+        }
+
+        return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
+    }
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+    function ajaxExtend(target, src) {
+        var deep, key,
+            flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+        for (key in src) {
+            if (src[key] !== undefined) {
+                ( flatOptions[key] ? target : ( deep || ( deep = {} ) ) )[key] = src[key];
+            }
+        }
+        if (deep) {
+            jQuery.extend(true, target, deep);
+        }
+
+        return target;
+    }
+
+    /* Handles responses to an ajax request:
+     * - finds the right dataType (mediates between content-type and expected dataType)
+     * - returns the corresponding response
+     */
+    function ajaxHandleResponses(s, jqXHR, responses) {
+        var firstDataType, ct, finalDataType, type,
+            contents = s.contents,
+            dataTypes = s.dataTypes;
+
+        // Remove auto dataType and get content-type in the process
+        while (dataTypes[0] === "*") {
+            dataTypes.shift();
+            if (ct === undefined) {
+                ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+            }
+        }
+
+        // Check if we're dealing with a known content-type
+        if (ct) {
+            for (type in contents) {
+                if (contents[type] && contents[type].test(ct)) {
+                    dataTypes.unshift(type);
+                    break;
+                }
+            }
+        }
+
+        // Check to see if we have a response for the expected dataType
+        if (dataTypes[0] in responses) {
+            finalDataType = dataTypes[0];
+        } else {
+
+            // Try convertible dataTypes
+            for (type in responses) {
+                if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
+                    finalDataType = type;
+                    break;
+                }
+                if (!firstDataType) {
+                    firstDataType = type;
+                }
+            }
+
+            // Or just use first one
+            finalDataType = finalDataType || firstDataType;
+        }
+
+        // If we found a dataType
+        // We add the dataType to the list if needed
+        // and return the corresponding response
+        if (finalDataType) {
+            if (finalDataType !== dataTypes[0]) {
+                dataTypes.unshift(finalDataType);
+            }
+            return responses[finalDataType];
+        }
+    }
+
+    /* Chain conversions given the request and the original response
+     * Also sets the responseXXX fields on the jqXHR instance
+     */
+    function ajaxConvert(s, response, jqXHR, isSuccess) {
+        var conv2, current, conv, tmp, prev,
+            converters = {},
+
+            // Work with a copy of dataTypes in case we need to modify it for conversion
+            dataTypes = s.dataTypes.slice();
+
+        // Create converters map with lowercased keys
+        if (dataTypes[1]) {
+            for (conv in s.converters) {
+                converters[conv.toLowerCase()] = s.converters[conv];
+            }
+        }
+
+        current = dataTypes.shift();
+
+        // Convert to each sequential dataType
+        while (current) {
+
+            if (s.responseFields[current]) {
+                jqXHR[s.responseFields[current]] = response;
+            }
+
+            // Apply the dataFilter if provided
+            if (!prev && isSuccess && s.dataFilter) {
+                response = s.dataFilter(response, s.dataType);
+            }
+
+            prev = current;
+            current = dataTypes.shift();
+
+            if (current) {
+
+                // There's only work to do if current dataType is non-auto
+                if (current === "*") {
+
+                    current = prev;
+
+                    // Convert response if prev dataType is non-auto and differs from current
+                } else if (prev !== "*" && prev !== current) {
+
+                    // Seek a direct converter
+                    conv = converters[prev + " " + current] || converters["* " + current];
+
+                    // If none found, seek a pair
+                    if (!conv) {
+                        for (conv2 in converters) {
+
+                            // If conv2 outputs current
+                            tmp = conv2.split(" ");
+                            if (tmp[1] === current) {
+
+                                // If prev can be converted to accepted input
+                                conv = converters[prev + " " + tmp[0]] ||
+                                    converters["* " + tmp[0]];
+                                if (conv) {
+
+                                    // Condense equivalence converters
+                                    if (conv === true) {
+                                        conv = converters[conv2];
+
+                                        // Otherwise, insert the intermediate dataType
+                                    } else if (converters[conv2] !== true) {
+                                        current = tmp[0];
+                                        dataTypes.unshift(tmp[1]);
+                                    }
+                                    break;
+                                }
+                            }
+                        }
+                    }
+
+                    // Apply converter (if not an equivalence)
+                    if (conv !== true) {
+
+                        // Unless errors are allowed to bubble, catch and return them
+                        if (conv && s["throws"]) { // jscs:ignore requireDotNotation
+                            response = conv(response);
+                        } else {
+                            try {
+                                response = conv(response);
+                            } catch (e) {
+                                return {
+                                    state: "parsererror",
+                                    error: conv ? e : "No conversion from " + prev + " to " + current
+                                };
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        return {state: "success", data: response};
+    }
+
+    jQuery.extend({
+
+        // Counter for holding the number of active queries
+        active: 0,
+
+        // Last-Modified header cache for next request
+        lastModified: {},
+        etag: {},
+
+        ajaxSettings: {
+            url: ajaxLocation,
+            type: "GET",
+            isLocal: rlocalProtocol.test(ajaxLocParts[1]),
+            global: true,
+            processData: true,
+            async: true,
+            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+            /*
+             timeout: 0,
+             data: null,
+             dataType: null,
+             username: null,
+             password: null,
+             cache: null,
+             throws: false,
+             traditional: false,
+             headers: {},
+             */
+
+            accepts: {
+                "*": allTypes,
+                text: "text/plain",
+                html: "text/html",
+                xml: "application/xml, text/xml",
+                json: "application/json, text/javascript"
+            },
+
+            contents: {
+                xml: /\bxml\b/,
+                html: /\bhtml/,
+                json: /\bjson\b/
+            },
+
+            responseFields: {
+                xml: "responseXML",
+                text: "responseText",
+                json: "responseJSON"
+            },
+
+            // Data converters
+            // Keys separate source (or catchall "*") and destination types with a single space
+            converters: {
+
+                // Convert anything to text
+                "* text": String,
+
+                // Text to html (true = no transformation)
+                "text html": true,
+
+                // Evaluate text as a json expression
+                "text json": jQuery.parseJSON,
+
+                // Parse text as xml
+                "text xml": jQuery.parseXML
+            },
+
+            // For options that shouldn't be deep extended:
+            // you can add your own custom options here if
+            // and when you create one that shouldn't be
+            // deep extended (see ajaxExtend)
+            flatOptions: {
+                url: true,
+                context: true
+            }
+        },
+
+        // Creates a full fledged settings object into target
+        // with both ajaxSettings and settings fields.
+        // If target is omitted, writes into ajaxSettings.
+        ajaxSetup: function (target, settings) {
+            return settings ?
+
+                // Building a settings object
+                ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) :
+
+                // Extending ajaxSettings
+                ajaxExtend(jQuery.ajaxSettings, target);
+        },
+
+        ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
+        ajaxTransport: addToPrefiltersOrTransports(transports),
+
+        // Main method
+        ajax: function (url, options) {
+
+            // If url is an object, simulate pre-1.5 signature
+            if (typeof url === "object") {
+                options = url;
+                url = undefined;
+            }
+
+            // Force options to be an object
+            options = options || {};
+
+            var
+
+                // Cross-domain detection vars
+                parts,
+
+                // Loop variable
+                i,
+
+                // URL without anti-cache param
+                cacheURL,
+
+                // Response headers as string
+                responseHeadersString,
+
+                // timeout handle
+                timeoutTimer,
+
+                // To know if global events are to be dispatched
+                fireGlobals,
+
+                transport,
+
+                // Response headers
+                responseHeaders,
+
+                // Create the final options object
+                s = jQuery.ajaxSetup({}, options),
+
+                // Callbacks context
+                callbackContext = s.context || s,
+
+                // Context for global events is callbackContext if it is a DOM node or jQuery collection
+                globalEventContext = s.context &&
+                ( callbackContext.nodeType || callbackContext.jquery ) ?
+                    jQuery(callbackContext) :
+                    jQuery.event,
+
+                // Deferreds
+                deferred = jQuery.Deferred(),
+                completeDeferred = jQuery.Callbacks("once memory"),
+
+                // Status-dependent callbacks
+                statusCode = s.statusCode || {},
+
+                // Headers (they are sent all at once)
+                requestHeaders = {},
+                requestHeadersNames = {},
+
+                // The jqXHR state
+                state = 0,
+
+                // Default abort message
+                strAbort = "canceled",
+
+                // Fake xhr
+                jqXHR = {
+                    readyState: 0,
+
+                    // Builds headers hashtable if needed
+                    getResponseHeader: function (key) {
+                        var match;
+                        if (state === 2) {
+                            if (!responseHeaders) {
+                                responseHeaders = {};
+                                while (( match = rheaders.exec(responseHeadersString) )) {
+                                    responseHeaders[match[1].toLowerCase()] = match[2];
+                                }
+                            }
+                            match = responseHeaders[key.toLowerCase()];
+                        }
+                        return match == null ? null : match;
+                    },
+
+                    // Raw string
+                    getAllResponseHeaders: function () {
+                        return state === 2 ? responseHeadersString : null;
+                    },
+
+                    // Caches the header
+                    setRequestHeader: function (name, value) {
+                        var lname = name.toLowerCase();
+                        if (!state) {
+                            name = requestHeadersNames[lname] = requestHeadersNames[lname] || name;
+                            requestHeaders[name] = value;
+                        }
+                        return this;
+                    },
+
+                    // Overrides response content-type header
+                    overrideMimeType: function (type) {
+                        if (!state) {
+                            s.mimeType = type;
+                        }
+                        return this;
+                    },
+
+                    // Status-dependent callbacks
+                    statusCode: function (map) {
+                        var code;
+                        if (map) {
+                            if (state < 2) {
+                                for (code in map) {
+
+                                    // Lazy-add the new callback in a way that preserves old ones
+                                    statusCode[code] = [statusCode[code], map[code]];
+                                }
+                            } else {
+
+                                // Execute the appropriate callbacks
+                                jqXHR.always(map[jqXHR.status]);
+                            }
+                        }
+                        return this;
+                    },
+
+                    // Cancel the request
+                    abort: function (statusText) {
+                        var finalText = statusText || strAbort;
+                        if (transport) {
+                            transport.abort(finalText);
+                        }
+                        done(0, finalText);
+                        return this;
+                    }
+                };
+
+            // Attach deferreds
+            deferred.promise(jqXHR).complete = completeDeferred.add;
+            jqXHR.success = jqXHR.done;
+            jqXHR.error = jqXHR.fail;
+
+            // Remove hash character (#7531: and string promotion)
+            // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+            // Handle falsy url in the settings object (#10093: consistency with old signature)
+            // We also use the url parameter if available
+            s.url = ( ( url || s.url || ajaxLocation ) + "" )
+                .replace(rhash, "")
+                .replace(rprotocol, ajaxLocParts[1] + "//");
+
+            // Alias method option to type as per ticket #12004
+            s.type = options.method || options.type || s.method || s.type;
+
+            // Extract dataTypes list
+            s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(rnotwhite) || [""];
+
+            // A cross-domain request is in order when we have a protocol:host:port mismatch
+            if (s.crossDomain == null) {
+                parts = rurl.exec(s.url.toLowerCase());
+                s.crossDomain = !!( parts &&
+                    ( parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] ||
+                    ( parts[3] || ( parts[1] === "http:" ? "80" : "443" ) ) !==
+                    ( ajaxLocParts[3] || ( ajaxLocParts[1] === "http:" ? "80" : "443" ) ) )
+                );
+            }
+
+            // Convert data if not already a string
+            if (s.data && s.processData && typeof s.data !== "string") {
+                s.data = jQuery.param(s.data, s.traditional);
+            }
+
+            // Apply prefilters
+            inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
+
+            // If request was aborted inside a prefilter, stop there
+            if (state === 2) {
+                return jqXHR;
+            }
+
+            // We can fire global events as of now if asked to
+            // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+            fireGlobals = jQuery.event && s.global;
+
+            // Watch for a new set of requests
+            if (fireGlobals && jQuery.active++ === 0) {
+                jQuery.event.trigger("ajaxStart");
+            }
+
+            // Uppercase the type
+            s.type = s.type.toUpperCase();
+
+            // Determine if request has content
+            s.hasContent = !rnoContent.test(s.type);
+
+            // Save the URL in case we're toying with the If-Modified-Since
+            // and/or If-None-Match header later on
+            cacheURL = s.url;
+
+            // More options handling for requests with no content
+            if (!s.hasContent) {
+
+                // If data is available, append data to url
+                if (s.data) {
+                    cacheURL = ( s.url += ( rquery.test(cacheURL) ? "&" : "?" ) + s.data );
+
+                    // #9682: remove data so that it's not used in an eventual retry
+                    delete s.data;
+                }
+
+                // Add anti-cache in url if needed
+                if (s.cache === false) {
+                    s.url = rts.test(cacheURL) ?
+
+                        // If there is already a '_' parameter, set its value
+                        cacheURL.replace(rts, "$1_=" + nonce++) :
+
+                        // Otherwise add one to the end
+                        cacheURL + ( rquery.test(cacheURL) ? "&" : "?" ) + "_=" + nonce++;
+                }
+            }
+
+            // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+            if (s.ifModified) {
+                if (jQuery.lastModified[cacheURL]) {
+                    jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
+                }
+                if (jQuery.etag[cacheURL]) {
+                    jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
+                }
+            }
+
+            // Set the correct header, if data is being sent
+            if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
+                jqXHR.setRequestHeader("Content-Type", s.contentType);
+            }
+
+            // Set the Accepts header for the server, depending on the dataType
+            jqXHR.setRequestHeader(
+                "Accept",
+                s.dataTypes[0] && s.accepts[s.dataTypes[0]] ?
+                    s.accepts[s.dataTypes[0]] +
+                    ( s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+                    s.accepts["*"]
+            );
+
+            // Check for headers option
+            for (i in s.headers) {
+                jqXHR.setRequestHeader(i, s.headers[i]);
+            }
+
+            // Allow custom headers/mimetypes and early abort
+            if (s.beforeSend &&
+                ( s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2 )) {
+
+                // Abort if not done already and return
+                return jqXHR.abort();
+            }
+
+            // aborting is no longer a cancellation
+            strAbort = "abort";
+
+            // Install callbacks on deferreds
+            for (i in {success: 1, error: 1, complete: 1}) {
+                jqXHR[i](s[i]);
+            }
+
+            // Get transport
+            transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
+
+            // If no transport, we auto-abort
+            if (!transport) {
+                done(-1, "No Transport");
+            } else {
+                jqXHR.readyState = 1;
+
+                // Send global event
+                if (fireGlobals) {
+                    globalEventContext.trigger("ajaxSend", [jqXHR, s]);
+                }
+
+                // If request was aborted inside ajaxSend, stop there
+                if (state === 2) {
+                    return jqXHR;
+                }
+
+                // Timeout
+                if (s.async && s.timeout > 0) {
+                    timeoutTimer = window.setTimeout(function () {
+                        jqXHR.abort("timeout");
+                    }, s.timeout);
+                }
+
+                try {
+                    state = 1;
+                    transport.send(requestHeaders, done);
+                } catch (e) {
+
+                    // Propagate exception as error if not done
+                    if (state < 2) {
+                        done(-1, e);
+
+                        // Simply rethrow otherwise
+                    } else {
+                        throw e;
+                    }
+                }
+            }
+
+            // Callback for when everything is done
+            function done(status, nativeStatusText, responses, headers) {
+                var isSuccess, success, error, response, modified,
+                    statusText = nativeStatusText;
+
+                // Called once
+                if (state === 2) {
+                    return;
+                }
+
+                // State is "done" now
+                state = 2;
+
+                // Clear timeout if it exists
+                if (timeoutTimer) {
+                    window.clearTimeout(timeoutTimer);
+                }
+
+                // Dereference transport for early garbage collection
+                // (no matter how long the jqXHR object will be used)
+                transport = undefined;
+
+                // Cache response headers
+                responseHeadersString = headers || "";
+
+                // Set readyState
+                jqXHR.readyState = status > 0 ? 4 : 0;
+
+                // Determine if successful
+                isSuccess = status >= 200 && status < 300 || status === 304;
+
+                // Get response data
+                if (responses) {
+                    response = ajaxHandleResponses(s, jqXHR, responses);
+                }
+
+                // Convert no matter what (that way responseXXX fields are always set)
+                response = ajaxConvert(s, response, jqXHR, isSuccess);
+
+                // If successful, handle type chaining
+                if (isSuccess) {
+
+                    // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+                    if (s.ifModified) {
+                        modified = jqXHR.getResponseHeader("Last-Modified");
+                        if (modified) {
+                            jQuery.lastModified[cacheURL] = modified;
+                        }
+                        modified = jqXHR.getResponseHeader("etag");
+                        if (modified) {
+                            jQuery.etag[cacheURL] = modified;
+                        }
+                    }
+
+                    // if no content
+                    if (status === 204 || s.type === "HEAD") {
+                        statusText = "nocontent";
+
+                        // if not modified
+                    } else if (status === 304) {
+                        statusText = "notmodified";
+
+                        // If we have data, let's convert it
+                    } else {
+                        statusText = response.state;
+                        success = response.data;
+                        error = response.error;
+                        isSuccess = !error;
+                    }
+                } else {
+
+                    // We extract error from statusText
+                    // then normalize statusText and status for non-aborts
+                    error = statusText;
+                    if (status || !statusText) {
+                        statusText = "error";
+                        if (status < 0) {
+                            status = 0;
+                        }
+                    }
+                }
+
+                // Set data for the fake xhr object
+                jqXHR.status = status;
+                jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+                // Success/Error
+                if (isSuccess) {
+                    deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
+                } else {
+                    deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
+                }
+
+                // Status-dependent callbacks
+                jqXHR.statusCode(statusCode);
+                statusCode = undefined;
+
+                if (fireGlobals) {
+                    globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError",
+                        [jqXHR, s, isSuccess ? success : error]);
+                }
+
+                // Complete
+                completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
+
+                if (fireGlobals) {
+                    globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
+
+                    // Handle the global AJAX counter
+                    if (!( --jQuery.active )) {
+                        jQuery.event.trigger("ajaxStop");
+                    }
+                }
+            }
+
+            return jqXHR;
+        },
+
+        getJSON: function (url, data, callback) {
+            return jQuery.get(url, data, callback, "json");
+        },
+
+        getScript: function (url, callback) {
+            return jQuery.get(url, undefined, callback, "script");
+        }
+    });
+
+    jQuery.each(["get", "post"], function (i, method) {
+        jQuery[method] = function (url, data, callback, type) {
+
+            // shift arguments if data argument was omitted
+            if (jQuery.isFunction(data)) {
+                type = type || callback;
+                callback = data;
+                data = undefined;
+            }
+
+            // The url can be an options object (which then must have .url)
+            return jQuery.ajax(jQuery.extend({
+                url: url,
+                type: method,
+                dataType: type,
+                data: data,
+                success: callback
+            }, jQuery.isPlainObject(url) && url));
+        };
+    });
+
+
+    jQuery._evalUrl = function (url) {
+        return jQuery.ajax({
+            url: url,
+
+            // Make this explicit, since user can override this through ajaxSetup (#11264)
+            type: "GET",
+            dataType: "script",
+            cache: true,
+            async: false,
+            global: false,
+            "throws": true
+        });
+    };
+
+
+    jQuery.fn.extend({
+        wrapAll: function (html) {
+            if (jQuery.isFunction(html)) {
+                return this.each(function (i) {
+                    jQuery(this).wrapAll(html.call(this, i));
+                });
+            }
+
+            if (this[0]) {
+
+                // The elements to wrap the target around
+                var wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
+
+                if (this[0].parentNode) {
+                    wrap.insertBefore(this[0]);
+                }
+
+                wrap.map(function () {
+                    var elem = this;
+
+                    while (elem.firstChild && elem.firstChild.nodeType === 1) {
+                        elem = elem.firstChild;
+                    }
+
+                    return elem;
+                }).append(this);
+            }
+
+            return this;
+        },
+
+        wrapInner: function (html) {
+            if (jQuery.isFunction(html)) {
+                return this.each(function (i) {
+                    jQuery(this).wrapInner(html.call(this, i));
+                });
+            }
+
+            return this.each(function () {
+                var self = jQuery(this),
+                    contents = self.contents();
+
+                if (contents.length) {
+                    contents.wrapAll(html);
+
+                } else {
+                    self.append(html);
+                }
+            });
+        },
+
+        wrap: function (html) {
+            var isFunction = jQuery.isFunction(html);
+
+            return this.each(function (i) {
+                jQuery(this).wrapAll(isFunction ? html.call(this, i) : html);
+            });
+        },
+
+        unwrap: function () {
+            return this.parent().each(function () {
+                if (!jQuery.nodeName(this, "body")) {
+                    jQuery(this).replaceWith(this.childNodes);
+                }
+            }).end();
+        }
+    });
+
+
+    function getDisplay(elem) {
+        return elem.style && elem.style.display || jQuery.css(elem, "display");
+    }
+
+    function filterHidden(elem) {
+
+        // Disconnected elements are considered hidden
+        if (!jQuery.contains(elem.ownerDocument || document, elem)) {
+            return true;
+        }
+        while (elem && elem.nodeType === 1) {
+            if (getDisplay(elem) === "none" || elem.type === "hidden") {
+                return true;
+            }
+            elem = elem.parentNode;
+        }
+        return false;
+    }
+
+    jQuery.expr.filters.hidden = function (elem) {
+
+        // Support: Opera <= 12.12
+        // Opera reports offsetWidths and offsetHeights less than zero on some elements
+        return support.reliableHiddenOffsets() ?
+            ( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&
+            !elem.getClientRects().length ) :
+            filterHidden(elem);
+    };
+
+    jQuery.expr.filters.visible = function (elem) {
+        return !jQuery.expr.filters.hidden(elem);
+    };
+
+
+    var r20 = /%20/g,
+        rbracket = /\[\]$/,
+        rCRLF = /\r?\n/g,
+        rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+        rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+    function buildParams(prefix, obj, traditional, add) {
+        var name;
+
+        if (jQuery.isArray(obj)) {
+
+            // Serialize array item.
+            jQuery.each(obj, function (i, v) {
+                if (traditional || rbracket.test(prefix)) {
+
+                    // Treat each array item as a scalar.
+                    add(prefix, v);
+
+                } else {
+
+                    // Item is non-scalar (array or object), encode its numeric index.
+                    buildParams(
+                        prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
+                        v,
+                        traditional,
+                        add
+                    );
+                }
+            });
+
+        } else if (!traditional && jQuery.type(obj) === "object") {
+
+            // Serialize object item.
+            for (name in obj) {
+                buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
+            }
+
+        } else {
+
+            // Serialize scalar item.
+            add(prefix, obj);
+        }
+    }
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+    jQuery.param = function (a, traditional) {
+        var prefix,
+            s = [],
+            add = function (key, value) {
+
+                // If value is a function, invoke it and return its value
+                value = jQuery.isFunction(value) ? value() : ( value == null ? "" : value );
+                s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
+            };
+
+        // Set traditional to true for jQuery <= 1.3.2 behavior.
+        if (traditional === undefined) {
+            traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+        }
+
+        // If an array was passed in, assume that it is an array of form elements.
+        if (jQuery.isArray(a) || ( a.jquery && !jQuery.isPlainObject(a) )) {
+
+            // Serialize the form elements
+            jQuery.each(a, function () {
+                add(this.name, this.value);
+            });
+
+        } else {
+
+            // If traditional, encode the "old" way (the way 1.3.2 or older
+            // did it), otherwise encode params recursively.
+            for (prefix in a) {
+                buildParams(prefix, a[prefix], traditional, add);
+            }
+        }
+
+        // Return the resulting serialization
+        return s.join("&").replace(r20, "+");
+    };
+
+    jQuery.fn.extend({
+        serialize: function () {
+            return jQuery.param(this.serializeArray());
+        },
+        serializeArray: function () {
+            return this.map(function () {
+
+                // Can add propHook for "elements" to filter or add form elements
+                var elements = jQuery.prop(this, "elements");
+                return elements ? jQuery.makeArray(elements) : this;
+            })
+                .filter(function () {
+                    var type = this.type;
+
+                    // Use .is(":disabled") so that fieldset[disabled] works
+                    return this.name && !jQuery(this).is(":disabled") &&
+                        rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) &&
+                        ( this.checked || !rcheckableType.test(type) );
+                })
+                .map(function (i, elem) {
+                    var val = jQuery(this).val();
+
+                    return val == null ?
+                        null :
+                        jQuery.isArray(val) ?
+                            jQuery.map(val, function (val) {
+                                return {name: elem.name, value: val.replace(rCRLF, "\r\n")};
+                            }) :
+                            {name: elem.name, value: val.replace(rCRLF, "\r\n")};
+                }).get();
+        }
+    });
+
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+    jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
+
+        // Support: IE6-IE8
+        function () {
+
+            // XHR cannot access local files, always use ActiveX for that case
+            if (this.isLocal) {
+                return createActiveXHR();
+            }
+
+            // Support: IE 9-11
+            // IE seems to error on cross-domain PATCH requests when ActiveX XHR
+            // is used. In IE 9+ always use the native XHR.
+            // Note: this condition won't catch Edge as it doesn't define
+            // document.documentMode but it also doesn't support ActiveX so it won't
+            // reach this code.
+            if (document.documentMode > 8) {
+                return createStandardXHR();
+            }
+
+            // Support: IE<9
+            // oldIE XHR does not support non-RFC2616 methods (#13240)
+            // See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
+            // and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
+            // Although this check for six methods instead of eight
+            // since IE also does not support "trace" and "connect"
+            return /^(get|post|head|put|delete|options)$/i.test(this.type) &&
+                createStandardXHR() || createActiveXHR();
+        } :
+
+        // For all other browsers, use the standard XMLHttpRequest object
+        createStandardXHR;
+
+    var xhrId = 0,
+        xhrCallbacks = {},
+        xhrSupported = jQuery.ajaxSettings.xhr();
+
+// Support: IE<10
+// Open requests must be manually aborted on unload (#5280)
+// See https://support.microsoft.com/kb/2856746 for more info
+    if (window.attachEvent) {
+        window.attachEvent("onunload", function () {
+            for (var key in xhrCallbacks) {
+                xhrCallbacks[key](undefined, true);
+            }
+        });
+    }
+
+// Determine support properties
+    support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+    xhrSupported = support.ajax = !!xhrSupported;
+
+// Create transport if the browser can provide an xhr
+    if (xhrSupported) {
+
+        jQuery.ajaxTransport(function (options) {
+
+            // Cross domain only allowed if supported through XMLHttpRequest
+            if (!options.crossDomain || support.cors) {
+
+                var callback;
+
+                return {
+                    send: function (headers, complete) {
+                        var i,
+                            xhr = options.xhr(),
+                            id = ++xhrId;
+
+                        // Open the socket
+                        xhr.open(
+                            options.type,
+                            options.url,
+                            options.async,
+                            options.username,
+                            options.password
+                        );
+
+                        // Apply custom fields if provided
+                        if (options.xhrFields) {
+                            for (i in options.xhrFields) {
+                                xhr[i] = options.xhrFields[i];
+                            }
+                        }
+
+                        // Override mime type if needed
+                        if (options.mimeType && xhr.overrideMimeType) {
+                            xhr.overrideMimeType(options.mimeType);
+                        }
+
+                        // X-Requested-With header
+                        // For cross-domain requests, seeing as conditions for a preflight are
+                        // akin to a jigsaw puzzle, we simply never set it to be sure.
+                        // (it can always be set on a per-request basis or even using ajaxSetup)
+                        // For same-domain requests, won't change header if already provided.
+                        if (!options.crossDomain && !headers["X-Requested-With"]) {
+                            headers["X-Requested-With"] = "XMLHttpRequest";
+                        }
+
+                        // Set headers
+                        for (i in headers) {
+
+                            // Support: IE<9
+                            // IE's ActiveXObject throws a 'Type Mismatch' exception when setting
+                            // request header to a null-value.
+                            //
+                            // To keep consistent with other XHR implementations, cast the value
+                            // to string and ignore `undefined`.
+                            if (headers[i] !== undefined) {
+                                xhr.setRequestHeader(i, headers[i] + "");
+                            }
+                        }
+
+                        // Do send the request
+                        // This may raise an exception which is actually
+                        // handled in jQuery.ajax (so no try/catch here)
+                        xhr.send(( options.hasContent && options.data ) || null);
+
+                        // Listener
+                        callback = function (_, isAbort) {
+                            var status, statusText, responses;
+
+                            // Was never called and is aborted or complete
+                            if (callback && ( isAbort || xhr.readyState === 4 )) {
+
+                                // Clean up
+                                delete xhrCallbacks[id];
+                                callback = undefined;
+                                xhr.onreadystatechange = jQuery.noop;
+
+                                // Abort manually if needed
+                                if (isAbort) {
+                                    if (xhr.readyState !== 4) {
+                                        xhr.abort();
+                                    }
+                                } else {
+                                    responses = {};
+                                    status = xhr.status;
+
+                                    // Support: IE<10
+                                    // Accessing binary-data responseText throws an exception
+                                    // (#11426)
+                                    if (typeof xhr.responseText === "string") {
+                                        responses.text = xhr.responseText;
+                                    }
+
+                                    // Firefox throws an exception when accessing
+                                    // statusText for faulty cross-domain requests
+                                    try {
+                                        statusText = xhr.statusText;
+                                    } catch (e) {
+
+                                        // We normalize with Webkit giving an empty statusText
+                                        statusText = "";
+                                    }
+
+                                    // Filter status for non standard behaviors
+
+                                    // If the request is local and we have data: assume a success
+                                    // (success with no data won't get notified, that's the best we
+                                    // can do given current implementations)
+                                    if (!status && options.isLocal && !options.crossDomain) {
+                                        status = responses.text ? 200 : 404;
+
+                                        // IE - #1450: sometimes returns 1223 when it should be 204
+                                    } else if (status === 1223) {
+                                        status = 204;
+                                    }
+                                }
+                            }
+
+                            // Call complete if needed
+                            if (responses) {
+                                complete(status, statusText, responses, xhr.getAllResponseHeaders());
+                            }
+                        };
+
+                        // Do send the request
+                        // `xhr.send` may raise an exception, but it will be
+                        // handled in jQuery.ajax (so no try/catch here)
+                        if (!options.async) {
+
+                            // If we're in sync mode we fire the callback
+                            callback();
+                        } else if (xhr.readyState === 4) {
+
+                            // (IE6 & IE7) if it's in cache and has been
+                            // retrieved directly we need to fire the callback
+                            window.setTimeout(callback);
+                        } else {
+
+                            // Register the callback, but delay it in case `xhr.send` throws
+                            // Add to the list of active xhr callbacks
+                            xhr.onreadystatechange = xhrCallbacks[id] = callback;
+                        }
+                    },
+
+                    abort: function () {
+                        if (callback) {
+                            callback(undefined, true);
+                        }
+                    }
+                };
+            }
+        });
+    }
+
+// Functions to create xhrs
+    function createStandardXHR() {
+        try {
+            return new window.XMLHttpRequest();
+        } catch (e) {
+        }
+    }
+
+    function createActiveXHR() {
+        try {
+            return new window.ActiveXObject("Microsoft.XMLHTTP");
+        } catch (e) {
+        }
+    }
+
+
+// Install script dataType
+    jQuery.ajaxSetup({
+        accepts: {
+            script: "text/javascript, application/javascript, " +
+            "application/ecmascript, application/x-ecmascript"
+        },
+        contents: {
+            script: /\b(?:java|ecma)script\b/
+        },
+        converters: {
+            "text script": function (text) {
+                jQuery.globalEval(text);
+                return text;
+            }
+        }
+    });
+
+// Handle cache's special case and global
+    jQuery.ajaxPrefilter("script", function (s) {
+        if (s.cache === undefined) {
+            s.cache = false;
+        }
+        if (s.crossDomain) {
+            s.type = "GET";
+            s.global = false;
+        }
+    });
+
+// Bind script tag hack transport
+    jQuery.ajaxTransport("script", function (s) {
+
+        // This transport only deals with cross domain requests
+        if (s.crossDomain) {
+
+            var script,
+                head = document.head || jQuery("head")[0] || document.documentElement;
+
+            return {
+
+                send: function (_, callback) {
+
+                    script = document.createElement("script");
+
+                    script.async = true;
+
+                    if (s.scriptCharset) {
+                        script.charset = s.scriptCharset;
+                    }
+
+                    script.src = s.url;
+
+                    // Attach handlers for all browsers
+                    script.onload = script.onreadystatechange = function (_, isAbort) {
+
+                        if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {
+
+                            // Handle memory leak in IE
+                            script.onload = script.onreadystatechange = null;
+
+                            // Remove the script
+                            if (script.parentNode) {
+                                script.parentNode.removeChild(script);
+                            }
+
+                            // Dereference the script
+                            script = null;
+
+                            // Callback if not abort
+                            if (!isAbort) {
+                                callback(200, "success");
+                            }
+                        }
+                    };
+
+                    // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
+                    // Use native DOM manipulation to avoid our domManip AJAX trickery
+                    head.insertBefore(script, head.firstChild);
+                },
+
+                abort: function () {
+                    if (script) {
+                        script.onload(undefined, true);
+                    }
+                }
+            };
+        }
+    });
+
+
+    var oldCallbacks = [],
+        rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+    jQuery.ajaxSetup({
+        jsonp: "callback",
+        jsonpCallback: function () {
+            var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+            this[callback] = true;
+            return callback;
+        }
+    });
+
+// Detect, normalize options and install callbacks for jsonp requests
+    jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) {
+
+        var callbackName, overwritten, responseContainer,
+            jsonProp = s.jsonp !== false && ( rjsonp.test(s.url) ?
+                        "url" :
+                        typeof s.data === "string" &&
+                        ( s.contentType || "" )
+                            .indexOf("application/x-www-form-urlencoded") === 0 &&
+                        rjsonp.test(s.data) && "data"
+                );
+
+        // Handle iff the expected data type is "jsonp" or we have a parameter to set
+        if (jsonProp || s.dataTypes[0] === "jsonp") {
+
+            // Get callback name, remembering preexisting value associated with it
+            callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ?
+                s.jsonpCallback() :
+                s.jsonpCallback;
+
+            // Insert callback into url or form data
+            if (jsonProp) {
+                s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
+            } else if (s.jsonp !== false) {
+                s.url += ( rquery.test(s.url) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+            }
+
+            // Use data converter to retrieve json after script execution
+            s.converters["script json"] = function () {
+                if (!responseContainer) {
+                    jQuery.error(callbackName + " was not called");
+                }
+                return responseContainer[0];
+            };
+
+            // force json dataType
+            s.dataTypes[0] = "json";
+
+            // Install callback
+            overwritten = window[callbackName];
+            window[callbackName] = function () {
+                responseContainer = arguments;
+            };
+
+            // Clean-up function (fires after converters)
+            jqXHR.always(function () {
+
+                // If previous value didn't exist - remove it
+                if (overwritten === undefined) {
+                    jQuery(window).removeProp(callbackName);
+
+                    // Otherwise restore preexisting value
+                } else {
+                    window[callbackName] = overwritten;
+                }
+
+                // Save back as free
+                if (s[callbackName]) {
+
+                    // make sure that re-using the options doesn't screw things around
+                    s.jsonpCallback = originalSettings.jsonpCallback;
+
+                    // save the callback name for future use
+                    oldCallbacks.push(callbackName);
+                }
+
+                // Call if it was a function and we have a response
+                if (responseContainer && jQuery.isFunction(overwritten)) {
+                    overwritten(responseContainer[0]);
+                }
+
+                responseContainer = overwritten = undefined;
+            });
+
+            // Delegate to script
+            return "script";
+        }
+    });
+
+
+// data: string of html
+// context (optional): If specified, the fragment will be created in this context,
+// defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+    jQuery.parseHTML = function (data, context, keepScripts) {
+        if (!data || typeof data !== "string") {
+            return null;
+        }
+        if (typeof context === "boolean") {
+            keepScripts = context;
+            context = false;
+        }
+        context = context || document;
+
+        var parsed = rsingleTag.exec(data),
+            scripts = !keepScripts && [];
+
+        // Single tag
+        if (parsed) {
+            return [context.createElement(parsed[1])];
+        }
+
+        parsed = buildFragment([data], context, scripts);
+
+        if (scripts && scripts.length) {
+            jQuery(scripts).remove();
+        }
+
+        return jQuery.merge([], parsed.childNodes);
+    };
+
+
+// Keep a copy of the old load method
+    var _load = jQuery.fn.load;
+
+    /**
+     * Load a url into a page
+     */
+    jQuery.fn.load = function (url, params, callback) {
+        if (typeof url !== "string" && _load) {
+            return _load.apply(this, arguments);
+        }
+
+        var selector, type, response,
+            self = this,
+            off = url.indexOf(" ");
+
+        if (off > -1) {
+            selector = jQuery.trim(url.slice(off, url.length));
+            url = url.slice(0, off);
+        }
+
+        // If it's a function
+        if (jQuery.isFunction(params)) {
+
+            // We assume that it's the callback
+            callback = params;
+            params = undefined;
+
+            // Otherwise, build a param string
+        } else if (params && typeof params === "object") {
+            type = "POST";
+        }
+
+        // If we have elements to modify, make the request
+        if (self.length > 0) {
+            jQuery.ajax({
+                url: url,
+
+                // If "type" variable is undefined, then "GET" method will be used.
+                // Make value of this field explicit since
+                // user can override it through ajaxSetup method
+                type: type || "GET",
+                dataType: "html",
+                data: params
+            }).done(function (responseText) {
+
+                // Save response for use in complete callback
+                response = arguments;
+
+                self.html(selector ?
+
+                    // If a selector was specified, locate the right elements in a dummy div
+                    // Exclude scripts to avoid IE 'Permission Denied' errors
+                    jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) :
+
+                    // Otherwise use the full result
+                    responseText);
+
+                // If the request succeeds, this function gets "data", "status", "jqXHR"
+                // but they are ignored because response was set above.
+                // If it fails, this function gets "jqXHR", "status", "error"
+            }).always(callback && function (jqXHR, status) {
+                    self.each(function () {
+                        callback.apply(this, response || [jqXHR.responseText, status, jqXHR]);
+                    });
+                });
+        }
+
+        return this;
+    };
+
+
+// Attach a bunch of functions for handling common AJAX events
+    jQuery.each([
+        "ajaxStart",
+        "ajaxStop",
+        "ajaxComplete",
+        "ajaxError",
+        "ajaxSuccess",
+        "ajaxSend"
+    ], function (i, type) {
+        jQuery.fn[type] = function (fn) {
+            return this.on(type, fn);
+        };
+    });
+
+
+    jQuery.expr.filters.animated = function (elem) {
+        return jQuery.grep(jQuery.timers, function (fn) {
+            return elem === fn.elem;
+        }).length;
+    };
+
+
+    /**
+     * Gets a window from an element
+     */
+    function getWindow(elem) {
+        return jQuery.isWindow(elem) ?
+            elem :
+            elem.nodeType === 9 ?
+                elem.defaultView || elem.parentWindow :
+                false;
+    }
+
+    jQuery.offset = {
+        setOffset: function (elem, options, i) {
+            var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+                position = jQuery.css(elem, "position"),
+                curElem = jQuery(elem),
+                props = {};
+
+            // set position first, in-case top/left are set even on static elem
+            if (position === "static") {
+                elem.style.position = "relative";
+            }
+
+            curOffset = curElem.offset();
+            curCSSTop = jQuery.css(elem, "top");
+            curCSSLeft = jQuery.css(elem, "left");
+            calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+                jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1;
+
+            // need to be able to calculate position if either top or left
+            // is auto and position is either absolute or fixed
+            if (calculatePosition) {
+                curPosition = curElem.position();
+                curTop = curPosition.top;
+                curLeft = curPosition.left;
+            } else {
+                curTop = parseFloat(curCSSTop) || 0;
+                curLeft = parseFloat(curCSSLeft) || 0;
+            }
+
+            if (jQuery.isFunction(options)) {
+
+                // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
+                options = options.call(elem, i, jQuery.extend({}, curOffset));
+            }
+
+            if (options.top != null) {
+                props.top = ( options.top - curOffset.top ) + curTop;
+            }
+            if (options.left != null) {
+                props.left = ( options.left - curOffset.left ) + curLeft;
+            }
+
+            if ("using" in options) {
+                options.using.call(elem, props);
+            } else {
+                curElem.css(props);
+            }
+        }
+    };
+
+    jQuery.fn.extend({
+        offset: function (options) {
+            if (arguments.length) {
+                return options === undefined ?
+                    this :
+                    this.each(function (i) {
+                        jQuery.offset.setOffset(this, options, i);
+                    });
+            }
+
+            var docElem, win,
+                box = {top: 0, left: 0},
+                elem = this[0],
+                doc = elem && elem.ownerDocument;
+
+            if (!doc) {
+                return;
+            }
+
+            docElem = doc.documentElement;
+
+            // Make sure it's not a disconnected DOM node
+            if (!jQuery.contains(docElem, elem)) {
+                return box;
+            }
+
+            // If we don't have gBCR, just use 0,0 rather than error
+            // BlackBerry 5, iOS 3 (original iPhone)
+            if (typeof elem.getBoundingClientRect !== "undefined") {
+                box = elem.getBoundingClientRect();
+            }
+            win = getWindow(doc);
+            return {
+                top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
+                left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
+            };
+        },
+
+        position: function () {
+            if (!this[0]) {
+                return;
+            }
+
+            var offsetParent, offset,
+                parentOffset = {top: 0, left: 0},
+                elem = this[0];
+
+            // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
+            // because it is its only offset parent
+            if (jQuery.css(elem, "position") === "fixed") {
+
+                // we assume that getBoundingClientRect is available when computed position is fixed
+                offset = elem.getBoundingClientRect();
+            } else {
+
+                // Get *real* offsetParent
+                offsetParent = this.offsetParent();
+
+                // Get correct offsets
+                offset = this.offset();
+                if (!jQuery.nodeName(offsetParent[0], "html")) {
+                    parentOffset = offsetParent.offset();
+                }
+
+                // Add offsetParent borders
+                parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true);
+                parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true);
+            }
+
+            // Subtract parent offsets and element margins
+            // note: when an element has margin: auto the offsetLeft and marginLeft
+            // are the same in Safari causing offset.left to incorrectly be 0
+            return {
+                top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
+                left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
+            };
+        },
+
+        offsetParent: function () {
+            return this.map(function () {
+                var offsetParent = this.offsetParent;
+
+                while (offsetParent && ( !jQuery.nodeName(offsetParent, "html") &&
+                jQuery.css(offsetParent, "position") === "static" )) {
+                    offsetParent = offsetParent.offsetParent;
+                }
+                return offsetParent || documentElement;
+            });
+        }
+    });
+
+// Create scrollLeft and scrollTop methods
+    jQuery.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (method, prop) {
+        var top = /Y/.test(prop);
+
+        jQuery.fn[method] = function (val) {
+            return access(this, function (elem, method, val) {
+                var win = getWindow(elem);
+
+                if (val === undefined) {
+                    return win ? ( prop in win ) ? win[prop] :
+                        win.document.documentElement[method] :
+                        elem[method];
+                }
+
+                if (win) {
+                    win.scrollTo(
+                        !top ? val : jQuery(win).scrollLeft(),
+                        top ? val : jQuery(win).scrollTop()
+                    );
+
+                } else {
+                    elem[method] = val;
+                }
+            }, method, val, arguments.length, null);
+        };
+    });
+
+// Support: Safari<7-8+, Chrome<37-44+
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// getComputedStyle returns percent when specified for top/left/bottom/right
+// rather than make the css module depend on the offset module, we just check for it here
+    jQuery.each(["top", "left"], function (i, prop) {
+        jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition,
+            function (elem, computed) {
+                if (computed) {
+                    computed = curCSS(elem, prop);
+
+                    // if curCSS returns percentage, fallback to offset
+                    return rnumnonpx.test(computed) ?
+                        jQuery(elem).position()[prop] + "px" :
+                        computed;
+                }
+            }
+        );
+    });
+
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+    jQuery.each({Height: "height", Width: "width"}, function (name, type) {
+        jQuery.each({padding: "inner" + name, content: type, "": "outer" + name},
+            function (defaultExtra, funcName) {
+
+                // margin is only for outerHeight, outerWidth
+                jQuery.fn[funcName] = function (margin, value) {
+                    var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+                        extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+                    return access(this, function (elem, type, value) {
+                        var doc;
+
+                        if (jQuery.isWindow(elem)) {
+
+                            // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+                            // isn't a whole lot we can do. See pull request at this URL for discussion:
+                            // https://github.com/jquery/jquery/pull/764
+                            return elem.document.documentElement["client" + name];
+                        }
+
+                        // Get document width or height
+                        if (elem.nodeType === 9) {
+                            doc = elem.documentElement;
+
+                            // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+                            // whichever is greatest
+                            // unfortunately, this causes bug #3838 in IE6/8 only,
+                            // but there is currently no good, small way to fix it.
+                            return Math.max(
+                                elem.body["scroll" + name], doc["scroll" + name],
+                                elem.body["offset" + name], doc["offset" + name],
+                                doc["client" + name]
+                            );
+                        }
+
+                        return value === undefined ?
+
+                            // Get width or height on the element, requesting but not forcing parseFloat
+                            jQuery.css(elem, type, extra) :
+
+                            // Set width or height on the element
+                            jQuery.style(elem, type, value, extra);
+                    }, type, chainable ? margin : undefined, chainable, null);
+                };
+            });
+    });
+
+
+    jQuery.fn.extend({
+
+        bind: function (types, data, fn) {
+            return this.on(types, null, data, fn);
+        },
+        unbind: function (types, fn) {
+            return this.off(types, null, fn);
+        },
+
+        delegate: function (selector, types, data, fn) {
+            return this.on(types, selector, data, fn);
+        },
+        undelegate: function (selector, types, fn) {
+
+            // ( namespace ) or ( selector, types [, fn] )
+            return arguments.length === 1 ?
+                this.off(selector, "**") :
+                this.off(types, selector || "**", fn);
+        }
+    });
+
+// The number of elements contained in the matched element set
+    jQuery.fn.size = function () {
+        return this.length;
+    };
+
+    jQuery.fn.andSelf = jQuery.fn.addBack;
+
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+    if (typeof define === "function" && define.amd) {
+        define("jquery", [], function () {
+            return jQuery;
+        });
+    }
+
+
+    var
+
+        // Map over jQuery in case of overwrite
+        _jQuery = window.jQuery,
+
+        // Map over the $ in case of overwrite
+        _$ = window.$;
+
+    jQuery.noConflict = function (deep) {
+        if (window.$ === jQuery) {
+            window.$ = _$;
+        }
+
+        if (deep && window.jQuery === jQuery) {
+            window.jQuery = _jQuery;
+        }
+
+        return jQuery;
+    };
+
+// Expose jQuery and $ identifiers, even in
+// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+    if (!noGlobal) {
+        window.jQuery = window.$ = jQuery;
+    }
+
+    return jQuery;
+}));
+

+ 1364 - 0
app/assets/scripts/lightgallery.js

@@ -0,0 +1,1364 @@
+/*! lightgallery - v1.4.0 - 2017-06-04
+* http://sachinchoolur.github.io/lightGallery/
+* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module unless amdModuleId is set
+    define(['jquery'], function (a0) {
+      return (factory(a0));
+    });
+  } else if (typeof exports === 'object') {
+    // Node. Does not work with strict CommonJS, but
+    // only CommonJS-like environments that support module.exports,
+    // like Node.
+    module.exports = factory(require('jquery'));
+  } else {
+    factory(root["jQuery"]);
+  }
+}(this, function ($) {
+
+(function() {
+    'use strict';
+
+    var defaults = {
+
+        mode: 'lg-slide',
+
+        // Ex : 'ease'
+        cssEasing: 'ease',
+
+        //'for jquery animation'
+        easing: 'linear',
+        speed: 600,
+        height: '100%',
+        width: '100%',
+        addClass: '',
+        startClass: 'lg-start-zoom',
+        backdropDuration: 150,
+        hideBarsDelay: 6000,
+
+        useLeft: false,
+
+        closable: true,
+        loop: true,
+        escKey: true,
+        keyPress: true,
+        controls: true,
+        slideEndAnimatoin: true,
+        hideControlOnEnd: false,
+        mousewheel: true,
+
+        getCaptionFromTitleOrAlt: true,
+
+        // .lg-item || '.lg-sub-html'
+        appendSubHtmlTo: '.lg-sub-html',
+
+        subHtmlSelectorRelative: false,
+
+        /**
+         * @desc number of preload slides
+         * will exicute only after the current slide is fully loaded.
+         *
+         * @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th
+         * slide will be loaded in the background after the 4th slide is fully loaded..
+         * if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ...
+         *
+         */
+        preload: 1,
+        showAfterLoad: true,
+        selector: '',
+        selectWithin: '',
+        nextHtml: '',
+        prevHtml: '',
+
+        // 0, 1
+        index: false,
+
+        iframeMaxWidth: '100%',
+
+        download: true,
+        counter: true,
+        appendCounterTo: '.lg-toolbar',
+
+        swipeThreshold: 50,
+        enableSwipe: true,
+        enableDrag: true,
+
+        dynamic: false,
+        dynamicEl: [],
+        galleryId: 1
+    };
+
+    function Plugin(element, options) {
+
+        // Current lightGallery element
+        this.el = element;
+
+        // Current jquery element
+        this.$el = $(element);
+
+        // lightGallery settings
+        this.s = $.extend({}, defaults, options);
+
+        // When using dynamic mode, ensure dynamicEl is an array
+        if (this.s.dynamic && this.s.dynamicEl !== 'undefined' && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) {
+            throw ('When using dynamic mode, you must also define dynamicEl as an Array.');
+        }
+
+        // lightGallery modules
+        this.modules = {};
+
+        // false when lightgallery complete first slide;
+        this.lGalleryOn = false;
+
+        this.lgBusy = false;
+
+        // Timeout function for hiding controls;
+        this.hideBartimeout = false;
+
+        // To determine browser supports for touch events;
+        this.isTouch = ('ontouchstart' in document.documentElement);
+
+        // Disable hideControlOnEnd if sildeEndAnimation is true
+        if (this.s.slideEndAnimatoin) {
+            this.s.hideControlOnEnd = false;
+        }
+
+        // Gallery items
+        if (this.s.dynamic) {
+            this.$items = this.s.dynamicEl;
+        } else {
+            if (this.s.selector === 'this') {
+                this.$items = this.$el;
+            } else if (this.s.selector !== '') {
+                if (this.s.selectWithin) {
+                    this.$items = $(this.s.selectWithin).find(this.s.selector);
+                } else {
+                    this.$items = this.$el.find($(this.s.selector));
+                }
+            } else {
+                this.$items = this.$el.children();
+            }
+        }
+
+        // .lg-item
+        this.$slide = '';
+
+        // .lg-outer
+        this.$outer = '';
+
+        this.init();
+
+        return this;
+    }
+
+    Plugin.prototype.init = function() {
+
+        var _this = this;
+
+        // s.preload should not be more than $item.length
+        if (_this.s.preload > _this.$items.length) {
+            _this.s.preload = _this.$items.length;
+        }
+
+        // if dynamic option is enabled execute immediately
+        var _hash = window.location.hash;
+        if (_hash.indexOf('lg=' + this.s.galleryId) > 0) {
+
+            _this.index = parseInt(_hash.split('&slide=')[1], 10);
+
+            $('body').addClass('lg-from-hash');
+            if (!$('body').hasClass('lg-on')) {
+                setTimeout(function() {
+                    _this.build(_this.index);
+                });
+
+                $('body').addClass('lg-on');
+            }
+        }
+
+        if (_this.s.dynamic) {
+
+            _this.$el.trigger('onBeforeOpen.lg');
+
+            _this.index = _this.s.index || 0;
+
+            // prevent accidental double execution
+            if (!$('body').hasClass('lg-on')) {
+                setTimeout(function() {
+                    _this.build(_this.index);
+                    $('body').addClass('lg-on');
+                });
+            }
+        } else {
+
+            // Using different namespace for click because click event should not unbind if selector is same object('this')
+            _this.$items.on('click.lgcustom', function(event) {
+
+                // For IE8
+                try {
+                    event.preventDefault();
+                    event.preventDefault();
+                } catch (er) {
+                    event.returnValue = false;
+                }
+
+                _this.$el.trigger('onBeforeOpen.lg');
+
+                _this.index = _this.s.index || _this.$items.index(this);
+
+                // prevent accidental double execution
+                if (!$('body').hasClass('lg-on')) {
+                    _this.build(_this.index);
+                    $('body').addClass('lg-on');
+                }
+            });
+        }
+
+    };
+
+    Plugin.prototype.build = function(index) {
+
+        var _this = this;
+
+        _this.structure();
+
+        // module constructor
+        $.each($.fn.lightGallery.modules, function(key) {
+            _this.modules[key] = new $.fn.lightGallery.modules[key](_this.el);
+        });
+
+        // initiate slide function
+        _this.slide(index, false, false, false);
+
+        if (_this.s.keyPress) {
+            _this.keyPress();
+        }
+
+        if (_this.$items.length > 1) {
+
+            _this.arrow();
+
+            setTimeout(function() {
+                _this.enableDrag();
+                _this.enableSwipe();
+            }, 50);
+
+            if (_this.s.mousewheel) {
+                _this.mousewheel();
+            }
+        } else {
+            _this.$slide.on('click.lg', function() {
+                _this.$el.trigger('onSlideClick.lg');
+            });
+        }
+
+        _this.counter();
+
+        _this.closeGallery();
+
+        _this.$el.trigger('onAfterOpen.lg');
+
+        // Hide controllers if mouse doesn't move for some period
+        _this.$outer.on('mousemove.lg click.lg touchstart.lg', function() {
+
+            _this.$outer.removeClass('lg-hide-items');
+
+            clearTimeout(_this.hideBartimeout);
+
+            // Timeout will be cleared on each slide movement also
+            _this.hideBartimeout = setTimeout(function() {
+                _this.$outer.addClass('lg-hide-items');
+            }, _this.s.hideBarsDelay);
+
+        });
+
+        _this.$outer.trigger('mousemove.lg');
+
+    };
+
+    Plugin.prototype.structure = function() {
+        var list = '';
+        var controls = '';
+        var i = 0;
+        var subHtmlCont = '';
+        var template;
+        var _this = this;
+
+        $('body').append('<div class="lg-backdrop"></div>');
+        $('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms');
+
+        // Create gallery items
+        for (i = 0; i < this.$items.length; i++) {
+            list += '<div class="lg-item"></div>';
+        }
+
+        // Create controlls
+        if (this.s.controls && this.$items.length > 1) {
+            controls = '<div class="lg-actions">' +
+                '<button class="lg-prev lg-icon">' + this.s.prevHtml + '</button>' +
+                '<button class="lg-next lg-icon">' + this.s.nextHtml + '</button>' +
+                '</div>';
+        }
+
+        if (this.s.appendSubHtmlTo === '.lg-sub-html') {
+            subHtmlCont = '<div class="lg-sub-html"></div>';
+        }
+
+        template = '<div class="lg-outer ' + this.s.addClass + ' ' + this.s.startClass + '">' +
+            '<div class="lg" style="width:' + this.s.width + '; height:' + this.s.height + '">' +
+            '<div class="lg-inner">' + list + '</div>' +
+            '<div class="lg-toolbar lg-group">' +
+            '<span class="lg-close lg-icon"></span>' +
+            '</div>' +
+            controls +
+            subHtmlCont +
+            '</div>' +
+            '</div>';
+
+        $('body').append(template);
+        this.$outer = $('.lg-outer');
+        this.$slide = this.$outer.find('.lg-item');
+
+        if (this.s.useLeft) {
+            this.$outer.addClass('lg-use-left');
+
+            // Set mode lg-slide if use left is true;
+            this.s.mode = 'lg-slide';
+        } else {
+            this.$outer.addClass('lg-use-css3');
+        }
+
+        // For fixed height gallery
+        _this.setTop();
+        $(window).on('resize.lg orientationchange.lg', function() {
+            setTimeout(function() {
+                _this.setTop();
+            }, 100);
+        });
+
+        // add class lg-current to remove initial transition
+        this.$slide.eq(this.index).addClass('lg-current');
+
+        // add Class for css support and transition mode
+        if (this.doCss()) {
+            this.$outer.addClass('lg-css3');
+        } else {
+            this.$outer.addClass('lg-css');
+
+            // Set speed 0 because no animation will happen if browser doesn't support css3
+            this.s.speed = 0;
+        }
+
+        this.$outer.addClass(this.s.mode);
+
+        if (this.s.enableDrag && this.$items.length > 1) {
+            this.$outer.addClass('lg-grab');
+        }
+
+        if (this.s.showAfterLoad) {
+            this.$outer.addClass('lg-show-after-load');
+        }
+
+        if (this.doCss()) {
+            var $inner = this.$outer.find('.lg-inner');
+            $inner.css('transition-timing-function', this.s.cssEasing);
+            $inner.css('transition-duration', this.s.speed + 'ms');
+        }
+
+        setTimeout(function() {
+            $('.lg-backdrop').addClass('in');
+        });
+
+        setTimeout(function() {
+            _this.$outer.addClass('lg-visible');
+        }, this.s.backdropDuration);
+
+        if (this.s.download) {
+            this.$outer.find('.lg-toolbar').append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>');
+        }
+
+        // Store the current scroll top value to scroll back after closing the gallery..
+        this.prevScrollTop = $(window).scrollTop();
+
+    };
+
+    // For fixed height gallery
+    Plugin.prototype.setTop = function() {
+        if (this.s.height !== '100%') {
+            var wH = $(window).height();
+            var top = (wH - parseInt(this.s.height, 10)) / 2;
+            var $lGallery = this.$outer.find('.lg');
+            if (wH >= parseInt(this.s.height, 10)) {
+                $lGallery.css('top', top + 'px');
+            } else {
+                $lGallery.css('top', '0px');
+            }
+        }
+    };
+
+    // Find css3 support
+    Plugin.prototype.doCss = function() {
+        // check for css animation support
+        var support = function() {
+            var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
+            var root = document.documentElement;
+            var i = 0;
+            for (i = 0; i < transition.length; i++) {
+                if (transition[i] in root.style) {
+                    return true;
+                }
+            }
+        };
+
+        if (support()) {
+            return true;
+        }
+
+        return false;
+    };
+
+    /**
+     *  @desc Check the given src is video
+     *  @param {String} src
+     *  @return {Object} video type
+     *  Ex:{ youtube  :  ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] }
+     */
+    Plugin.prototype.isVideo = function(src, index) {
+
+        var html;
+        if (this.s.dynamic) {
+            html = this.s.dynamicEl[index].html;
+        } else {
+            html = this.$items.eq(index).attr('data-html');
+        }
+
+        if (!src) {
+            if(html) {
+                return {
+                    html5: true
+                };
+            } else {
+                console.error('lightGallery :- data-src is not pvovided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');
+                return false;
+            }
+        }
+
+        var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);
+        var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);
+        var dailymotion = src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);
+        var vk = src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);
+
+        if (youtube) {
+            return {
+                youtube: youtube
+            };
+        } else if (vimeo) {
+            return {
+                vimeo: vimeo
+            };
+        } else if (dailymotion) {
+            return {
+                dailymotion: dailymotion
+            };
+        } else if (vk) {
+            return {
+                vk: vk
+            };
+        }
+    };
+
+    /**
+     *  @desc Create image counter
+     *  Ex: 1/10
+     */
+    Plugin.prototype.counter = function() {
+        if (this.s.counter) {
+            $(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">' + (parseInt(this.index, 10) + 1) + '</span> / <span id="lg-counter-all">' + this.$items.length + '</span></div>');
+        }
+    };
+
+    /**
+     *  @desc add sub-html into the slide
+     *  @param {Number} index - index of the slide
+     */
+    Plugin.prototype.addHtml = function(index) {
+        var subHtml = null;
+        var subHtmlUrl;
+        var $currentEle;
+        if (this.s.dynamic) {
+            if (this.s.dynamicEl[index].subHtmlUrl) {
+                subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl;
+            } else {
+                subHtml = this.s.dynamicEl[index].subHtml;
+            }
+        } else {
+            $currentEle = this.$items.eq(index);
+            if ($currentEle.attr('data-sub-html-url')) {
+                subHtmlUrl = $currentEle.attr('data-sub-html-url');
+            } else {
+                subHtml = $currentEle.attr('data-sub-html');
+                if (this.s.getCaptionFromTitleOrAlt && !subHtml) {
+                    subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');
+                }
+            }
+        }
+
+        if (!subHtmlUrl) {
+            if (typeof subHtml !== 'undefined' && subHtml !== null) {
+
+                // get first letter of subhtml
+                // if first letter starts with . or # get the html form the jQuery object
+                var fL = subHtml.substring(0, 1);
+                if (fL === '.' || fL === '#') {
+                    if (this.s.subHtmlSelectorRelative && !this.s.dynamic) {
+                        subHtml = $currentEle.find(subHtml).html();
+                    } else {
+                        subHtml = $(subHtml).html();
+                    }
+                }
+            } else {
+                subHtml = '';
+            }
+        }
+
+        if (this.s.appendSubHtmlTo === '.lg-sub-html') {
+
+            if (subHtmlUrl) {
+                this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl);
+            } else {
+                this.$outer.find(this.s.appendSubHtmlTo).html(subHtml);
+            }
+
+        } else {
+
+            if (subHtmlUrl) {
+                this.$slide.eq(index).load(subHtmlUrl);
+            } else {
+                this.$slide.eq(index).append(subHtml);
+            }
+        }
+
+        // Add lg-empty-html class if title doesn't exist
+        if (typeof subHtml !== 'undefined' && subHtml !== null) {
+            if (subHtml === '') {
+                this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html');
+            } else {
+                this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html');
+            }
+        }
+
+        this.$el.trigger('onAfterAppendSubHtml.lg', [index]);
+    };
+
+    /**
+     *  @desc Preload slides
+     *  @param {Number} index - index of the slide
+     */
+    Plugin.prototype.preload = function(index) {
+        var i = 1;
+        var j = 1;
+        for (i = 1; i <= this.s.preload; i++) {
+            if (i >= this.$items.length - index) {
+                break;
+            }
+
+            this.loadContent(index + i, false, 0);
+        }
+
+        for (j = 1; j <= this.s.preload; j++) {
+            if (index - j < 0) {
+                break;
+            }
+
+            this.loadContent(index - j, false, 0);
+        }
+    };
+
+    /**
+     *  @desc Load slide content into slide.
+     *  @param {Number} index - index of the slide.
+     *  @param {Boolean} rec - if true call loadcontent() function again.
+     *  @param {Boolean} delay - delay for adding complete class. it is 0 except first time.
+     */
+    Plugin.prototype.loadContent = function(index, rec, delay) {
+
+        var _this = this;
+        var _hasPoster = false;
+        var _$img;
+        var _src;
+        var _poster;
+        var _srcset;
+        var _sizes;
+        var _html;
+        var getResponsiveSrc = function(srcItms) {
+            var rsWidth = [];
+            var rsSrc = [];
+            for (var i = 0; i < srcItms.length; i++) {
+                var __src = srcItms[i].split(' ');
+
+                // Manage empty space
+                if (__src[0] === '') {
+                    __src.splice(0, 1);
+                }
+
+                rsSrc.push(__src[0]);
+                rsWidth.push(__src[1]);
+            }
+
+            var wWidth = $(window).width();
+            for (var j = 0; j < rsWidth.length; j++) {
+                if (parseInt(rsWidth[j], 10) > wWidth) {
+                    _src = rsSrc[j];
+                    break;
+                }
+            }
+        };
+
+        if (_this.s.dynamic) {
+
+            if (_this.s.dynamicEl[index].poster) {
+                _hasPoster = true;
+                _poster = _this.s.dynamicEl[index].poster;
+            }
+
+            _html = _this.s.dynamicEl[index].html;
+            _src = _this.s.dynamicEl[index].src;
+
+            if (_this.s.dynamicEl[index].responsive) {
+                var srcDyItms = _this.s.dynamicEl[index].responsive.split(',');
+                getResponsiveSrc(srcDyItms);
+            }
+
+            _srcset = _this.s.dynamicEl[index].srcset;
+            _sizes = _this.s.dynamicEl[index].sizes;
+
+        } else {
+
+            if (_this.$items.eq(index).attr('data-poster')) {
+                _hasPoster = true;
+                _poster = _this.$items.eq(index).attr('data-poster');
+            }
+
+            _html = _this.$items.eq(index).attr('data-html');
+            _src = _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src');
+
+            if (_this.$items.eq(index).attr('data-responsive')) {
+                var srcItms = _this.$items.eq(index).attr('data-responsive').split(',');
+                getResponsiveSrc(srcItms);
+            }
+
+            _srcset = _this.$items.eq(index).attr('data-srcset');
+            _sizes = _this.$items.eq(index).attr('data-sizes');
+
+        }
+
+        //if (_src || _srcset || _sizes || _poster) {
+
+        var iframe = false;
+        if (_this.s.dynamic) {
+            if (_this.s.dynamicEl[index].iframe) {
+                iframe = true;
+            }
+        } else {
+            if (_this.$items.eq(index).attr('data-iframe') === 'true') {
+                iframe = true;
+            }
+        }
+
+        var _isVideo = _this.isVideo(_src, index);
+        if (!_this.$slide.eq(index).hasClass('lg-loaded')) {
+            if (iframe) {
+                _this.$slide.eq(index).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:' + _this.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + _src + '"  allowfullscreen="true"></iframe></div></div>');
+            } else if (_hasPoster) {
+                var videoClass = '';
+                if (_isVideo && _isVideo.youtube) {
+                    videoClass = 'lg-has-youtube';
+                } else if (_isVideo && _isVideo.vimeo) {
+                    videoClass = 'lg-has-vimeo';
+                } else {
+                    videoClass = 'lg-has-html5';
+                }
+
+                _this.$slide.eq(index).prepend('<div class="lg-video-cont ' + videoClass + ' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="' + _poster + '" /></div></div>');
+
+            } else if (_isVideo) {
+                _this.$slide.eq(index).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>');
+                _this.$el.trigger('hasVideo.lg', [index, _src, _html]);
+            } else {
+                _this.$slide.eq(index).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="' + _src + '" /></div>');
+            }
+
+            _this.$el.trigger('onAferAppendSlide.lg', [index]);
+
+            _$img = _this.$slide.eq(index).find('.lg-object');
+            if (_sizes) {
+                _$img.attr('sizes', _sizes);
+            }
+
+            if (_srcset) {
+                _$img.attr('srcset', _srcset);
+                try {
+                    picturefill({
+                        elements: [_$img[0]]
+                    });
+                } catch (e) {
+                    console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');
+                }
+            }
+
+            if (this.s.appendSubHtmlTo !== '.lg-sub-html') {
+                _this.addHtml(index);
+            }
+
+            _this.$slide.eq(index).addClass('lg-loaded');
+        }
+
+        _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
+
+            // For first time add some delay for displaying the start animation.
+            var _speed = 0;
+
+            // Do not change the delay value because it is required for zoom plugin.
+            // If gallery opened from direct url (hash) speed value should be 0
+            if (delay && !$('body').hasClass('lg-from-hash')) {
+                _speed = delay;
+            }
+
+            setTimeout(function() {
+                _this.$slide.eq(index).addClass('lg-complete');
+                _this.$el.trigger('onSlideItemLoad.lg', [index, delay || 0]);
+            }, _speed);
+
+        });
+
+        // @todo check load state for html5 videos
+        if (_isVideo && _isVideo.html5 && !_hasPoster) {
+            _this.$slide.eq(index).addClass('lg-complete');
+        }
+
+        if (rec === true) {
+            if (!_this.$slide.eq(index).hasClass('lg-complete')) {
+                _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
+                    _this.preload(index);
+                });
+            } else {
+                _this.preload(index);
+            }
+        }
+
+        //}
+    };
+
+    /**
+    *   @desc slide function for lightgallery
+        ** Slide() gets call on start
+        ** ** Set lg.on true once slide() function gets called.
+        ** Call loadContent() on slide() function inside setTimeout
+        ** ** On first slide we do not want any animation like slide of fade
+        ** ** So on first slide( if lg.on if false that is first slide) loadContent() should start loading immediately
+        ** ** Else loadContent() should wait for the transition to complete.
+        ** ** So set timeout s.speed + 50
+    <=> ** loadContent() will load slide content in to the particular slide
+        ** ** It has recursion (rec) parameter. if rec === true loadContent() will call preload() function.
+        ** ** preload will execute only when the previous slide is fully loaded (images iframe)
+        ** ** avoid simultaneous image load
+    <=> ** Preload() will check for s.preload value and call loadContent() again accoring to preload value
+        ** loadContent()  <====> Preload();
+
+    *   @param {Number} index - index of the slide
+    *   @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag
+    *   @param {Boolean} fromThumb - true if slide function called via thumbnail click
+    *   @param {String} direction - Direction of the slide(next/prev)
+    */
+    Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) {
+
+        var _prevIndex = this.$outer.find('.lg-current').index();
+        var _this = this;
+
+        // Prevent if multiple call
+        // Required for hsh plugin
+        if (_this.lGalleryOn && (_prevIndex === index)) {
+            return;
+        }
+
+        var _length = this.$slide.length;
+        var _time = _this.lGalleryOn ? this.s.speed : 0;
+
+        if (!_this.lgBusy) {
+
+            if (this.s.download) {
+                var _src;
+                if (_this.s.dynamic) {
+                    _src = _this.s.dynamicEl[index].downloadUrl !== false && (_this.s.dynamicEl[index].downloadUrl || _this.s.dynamicEl[index].src);
+                } else {
+                    _src = _this.$items.eq(index).attr('data-download-url') !== 'false' && (_this.$items.eq(index).attr('data-download-url') || _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src'));
+
+                }
+
+                if (_src) {
+                    $('#lg-download').attr('href', _src);
+                    _this.$outer.removeClass('lg-hide-download');
+                } else {
+                    _this.$outer.addClass('lg-hide-download');
+                }
+            }
+
+            this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
+
+            _this.lgBusy = true;
+
+            clearTimeout(_this.hideBartimeout);
+
+            // Add title if this.s.appendSubHtmlTo === lg-sub-html
+            if (this.s.appendSubHtmlTo === '.lg-sub-html') {
+
+                // wait for slide animation to complete
+                setTimeout(function() {
+                    _this.addHtml(index);
+                }, _time);
+            }
+
+            this.arrowDisable(index);
+
+            if (!direction) {
+                if (index < _prevIndex) {
+                    direction = 'prev';
+                } else if (index > _prevIndex) {
+                    direction = 'next';
+                }
+            }
+
+            if (!fromTouch) {
+
+                // remove all transitions
+                _this.$outer.addClass('lg-no-trans');
+
+                this.$slide.removeClass('lg-prev-slide lg-next-slide');
+
+                if (direction === 'prev') {
+
+                    //prevslide
+                    this.$slide.eq(index).addClass('lg-prev-slide');
+                    this.$slide.eq(_prevIndex).addClass('lg-next-slide');
+                } else {
+
+                    // next slide
+                    this.$slide.eq(index).addClass('lg-next-slide');
+                    this.$slide.eq(_prevIndex).addClass('lg-prev-slide');
+                }
+
+                // give 50 ms for browser to add/remove class
+                setTimeout(function() {
+                    _this.$slide.removeClass('lg-current');
+
+                    //_this.$slide.eq(_prevIndex).removeClass('lg-current');
+                    _this.$slide.eq(index).addClass('lg-current');
+
+                    // reset all transitions
+                    _this.$outer.removeClass('lg-no-trans');
+                }, 50);
+            } else {
+
+                this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');
+                var touchPrev;
+                var touchNext;
+                if (_length > 2) {
+                    touchPrev = index - 1;
+                    touchNext = index + 1;
+
+                    if ((index === 0) && (_prevIndex === _length - 1)) {
+
+                        // next slide
+                        touchNext = 0;
+                        touchPrev = _length - 1;
+                    } else if ((index === _length - 1) && (_prevIndex === 0)) {
+
+                        // prev slide
+                        touchNext = 0;
+                        touchPrev = _length - 1;
+                    }
+
+                } else {
+                    touchPrev = 0;
+                    touchNext = 1;
+                }
+
+                if (direction === 'prev') {
+                    _this.$slide.eq(touchNext).addClass('lg-next-slide');
+                } else {
+                    _this.$slide.eq(touchPrev).addClass('lg-prev-slide');
+                }
+
+                _this.$slide.eq(index).addClass('lg-current');
+            }
+
+            if (_this.lGalleryOn) {
+                setTimeout(function() {
+                    _this.loadContent(index, true, 0);
+                }, this.s.speed + 50);
+
+                setTimeout(function() {
+                    _this.lgBusy = false;
+                    _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
+                }, this.s.speed);
+
+            } else {
+                _this.loadContent(index, true, _this.s.backdropDuration);
+
+                _this.lgBusy = false;
+                _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
+            }
+
+            _this.lGalleryOn = true;
+
+            if (this.s.counter) {
+                $('#lg-counter-current').text(index + 1);
+            }
+
+        }
+
+    };
+
+    /**
+     *  @desc Go to next slide
+     *  @param {Boolean} fromTouch - true if slide function called via touch event
+     */
+    Plugin.prototype.goToNextSlide = function(fromTouch) {
+        var _this = this;
+        var _loop = _this.s.loop;
+        if (fromTouch && _this.$slide.length < 3) {
+            _loop = false;
+        }
+
+        if (!_this.lgBusy) {
+            if ((_this.index + 1) < _this.$slide.length) {
+                _this.index++;
+                _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
+                _this.slide(_this.index, fromTouch, false, 'next');
+            } else {
+                if (_loop) {
+                    _this.index = 0;
+                    _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
+                    _this.slide(_this.index, fromTouch, false, 'next');
+                } else if (_this.s.slideEndAnimatoin && !fromTouch) {
+                    _this.$outer.addClass('lg-right-end');
+                    setTimeout(function() {
+                        _this.$outer.removeClass('lg-right-end');
+                    }, 400);
+                }
+            }
+        }
+    };
+
+    /**
+     *  @desc Go to previous slide
+     *  @param {Boolean} fromTouch - true if slide function called via touch event
+     */
+    Plugin.prototype.goToPrevSlide = function(fromTouch) {
+        var _this = this;
+        var _loop = _this.s.loop;
+        if (fromTouch && _this.$slide.length < 3) {
+            _loop = false;
+        }
+
+        if (!_this.lgBusy) {
+            if (_this.index > 0) {
+                _this.index--;
+                _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
+                _this.slide(_this.index, fromTouch, false, 'prev');
+            } else {
+                if (_loop) {
+                    _this.index = _this.$items.length - 1;
+                    _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
+                    _this.slide(_this.index, fromTouch, false, 'prev');
+                } else if (_this.s.slideEndAnimatoin && !fromTouch) {
+                    _this.$outer.addClass('lg-left-end');
+                    setTimeout(function() {
+                        _this.$outer.removeClass('lg-left-end');
+                    }, 400);
+                }
+            }
+        }
+    };
+
+    Plugin.prototype.keyPress = function() {
+        var _this = this;
+        if (this.$items.length > 1) {
+            $(window).on('keyup.lg', function(e) {
+                if (_this.$items.length > 1) {
+                    if (e.keyCode === 37) {
+                        e.preventDefault();
+                        _this.goToPrevSlide();
+                    }
+
+                    if (e.keyCode === 39) {
+                        e.preventDefault();
+                        _this.goToNextSlide();
+                    }
+                }
+            });
+        }
+
+        $(window).on('keydown.lg', function(e) {
+            if (_this.s.escKey === true && e.keyCode === 27) {
+                e.preventDefault();
+                if (!_this.$outer.hasClass('lg-thumb-open')) {
+                    _this.destroy();
+                } else {
+                    _this.$outer.removeClass('lg-thumb-open');
+                }
+            }
+        });
+    };
+
+    Plugin.prototype.arrow = function() {
+        var _this = this;
+        this.$outer.find('.lg-prev').on('click.lg', function() {
+            _this.goToPrevSlide();
+        });
+
+        this.$outer.find('.lg-next').on('click.lg', function() {
+            _this.goToNextSlide();
+        });
+    };
+
+    Plugin.prototype.arrowDisable = function(index) {
+
+        // Disable arrows if s.hideControlOnEnd is true
+        if (!this.s.loop && this.s.hideControlOnEnd) {
+            if ((index + 1) < this.$slide.length) {
+                this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled');
+            } else {
+                this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled');
+            }
+
+            if (index > 0) {
+                this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled');
+            } else {
+                this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled');
+            }
+        }
+    };
+
+    Plugin.prototype.setTranslate = function($el, xValue, yValue) {
+        // jQuery supports Automatic CSS prefixing since jQuery 1.8.0
+        if (this.s.useLeft) {
+            $el.css('left', xValue);
+        } else {
+            $el.css({
+                transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)'
+            });
+        }
+    };
+
+    Plugin.prototype.touchMove = function(startCoords, endCoords) {
+
+        var distance = endCoords - startCoords;
+
+        if (Math.abs(distance) > 15) {
+            // reset opacity and transition duration
+            this.$outer.addClass('lg-dragging');
+
+            // move current slide
+            this.setTranslate(this.$slide.eq(this.index), distance, 0);
+
+            // move next and prev slide with current slide
+            this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0);
+            this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0);
+        }
+    };
+
+    Plugin.prototype.touchEnd = function(distance) {
+        var _this = this;
+
+        // keep slide animation for any mode while dragg/swipe
+        if (_this.s.mode !== 'lg-slide') {
+            _this.$outer.addClass('lg-slide');
+        }
+
+        this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0');
+
+        // set transition duration
+        setTimeout(function() {
+            _this.$outer.removeClass('lg-dragging');
+            if ((distance < 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
+                _this.goToNextSlide(true);
+            } else if ((distance > 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
+                _this.goToPrevSlide(true);
+            } else if (Math.abs(distance) < 5) {
+
+                // Trigger click if distance is less than 5 pix
+                _this.$el.trigger('onSlideClick.lg');
+            }
+
+            _this.$slide.removeAttr('style');
+        });
+
+        // remove slide class once drag/swipe is completed if mode is not slide
+        setTimeout(function() {
+            if (!_this.$outer.hasClass('lg-dragging') && _this.s.mode !== 'lg-slide') {
+                _this.$outer.removeClass('lg-slide');
+            }
+        }, _this.s.speed + 100);
+
+    };
+
+    Plugin.prototype.enableSwipe = function() {
+        var _this = this;
+        var startCoords = 0;
+        var endCoords = 0;
+        var isMoved = false;
+
+        if (_this.s.enableSwipe && _this.isTouch && _this.doCss()) {
+
+            _this.$slide.on('touchstart.lg', function(e) {
+                if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) {
+                    e.preventDefault();
+                    _this.manageSwipeClass();
+                    startCoords = e.originalEvent.targetTouches[0].pageX;
+                }
+            });
+
+            _this.$slide.on('touchmove.lg', function(e) {
+                if (!_this.$outer.hasClass('lg-zoomed')) {
+                    e.preventDefault();
+                    endCoords = e.originalEvent.targetTouches[0].pageX;
+                    _this.touchMove(startCoords, endCoords);
+                    isMoved = true;
+                }
+            });
+
+            _this.$slide.on('touchend.lg', function() {
+                if (!_this.$outer.hasClass('lg-zoomed')) {
+                    if (isMoved) {
+                        isMoved = false;
+                        _this.touchEnd(endCoords - startCoords);
+                    } else {
+                        _this.$el.trigger('onSlideClick.lg');
+                    }
+                }
+            });
+        }
+
+    };
+
+    Plugin.prototype.enableDrag = function() {
+        var _this = this;
+        var startCoords = 0;
+        var endCoords = 0;
+        var isDraging = false;
+        var isMoved = false;
+        if (_this.s.enableDrag && !_this.isTouch && _this.doCss()) {
+            _this.$slide.on('mousedown.lg', function(e) {
+                // execute only on .lg-object
+                if (!_this.$outer.hasClass('lg-zoomed')) {
+                    if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {
+                        e.preventDefault();
+
+                        if (!_this.lgBusy) {
+                            _this.manageSwipeClass();
+                            startCoords = e.pageX;
+                            isDraging = true;
+
+                            // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
+                            _this.$outer.scrollLeft += 1;
+                            _this.$outer.scrollLeft -= 1;
+
+                            // *
+
+                            _this.$outer.removeClass('lg-grab').addClass('lg-grabbing');
+
+                            _this.$el.trigger('onDragstart.lg');
+                        }
+
+                    }
+                }
+            });
+
+            $(window).on('mousemove.lg', function(e) {
+                if (isDraging) {
+                    isMoved = true;
+                    endCoords = e.pageX;
+                    _this.touchMove(startCoords, endCoords);
+                    _this.$el.trigger('onDragmove.lg');
+                }
+            });
+
+            $(window).on('mouseup.lg', function(e) {
+                if (isMoved) {
+                    isMoved = false;
+                    _this.touchEnd(endCoords - startCoords);
+                    _this.$el.trigger('onDragend.lg');
+                } else if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {
+                    _this.$el.trigger('onSlideClick.lg');
+                }
+
+                // Prevent execution on click
+                if (isDraging) {
+                    isDraging = false;
+                    _this.$outer.removeClass('lg-grabbing').addClass('lg-grab');
+                }
+            });
+
+        }
+    };
+
+    Plugin.prototype.manageSwipeClass = function() {
+        var _touchNext = this.index + 1;
+        var _touchPrev = this.index - 1;
+        if (this.s.loop && this.$slide.length > 2) {
+            if (this.index === 0) {
+                _touchPrev = this.$slide.length - 1;
+            } else if (this.index === this.$slide.length - 1) {
+                _touchNext = 0;
+            }
+        }
+
+        this.$slide.removeClass('lg-next-slide lg-prev-slide');
+        if (_touchPrev > -1) {
+            this.$slide.eq(_touchPrev).addClass('lg-prev-slide');
+        }
+
+        this.$slide.eq(_touchNext).addClass('lg-next-slide');
+    };
+
+    Plugin.prototype.mousewheel = function() {
+        var _this = this;
+        _this.$outer.on('mousewheel.lg', function(e) {
+
+            if (!e.deltaY) {
+                return;
+            }
+
+            if (e.deltaY > 0) {
+                _this.goToPrevSlide();
+            } else {
+                _this.goToNextSlide();
+            }
+
+            e.preventDefault();
+        });
+
+    };
+
+    Plugin.prototype.closeGallery = function() {
+
+        var _this = this;
+        var mousedown = false;
+        this.$outer.find('.lg-close').on('click.lg', function() {
+            _this.destroy();
+        });
+
+        if (_this.s.closable) {
+
+            // If you drag the slide and release outside gallery gets close on chrome
+            // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer
+            _this.$outer.on('mousedown.lg', function(e) {
+
+                if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap')) {
+                    mousedown = true;
+                } else {
+                    mousedown = false;
+                }
+
+            });
+
+            _this.$outer.on('mouseup.lg', function(e) {
+
+                if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) {
+                    if (!_this.$outer.hasClass('lg-dragging')) {
+                        _this.destroy();
+                    }
+                }
+
+            });
+
+        }
+
+    };
+
+    Plugin.prototype.destroy = function(d) {
+
+        var _this = this;
+
+        if (!d) {
+            _this.$el.trigger('onBeforeClose.lg');
+            $(window).scrollTop(_this.prevScrollTop);
+        }
+
+
+        /**
+         * if d is false or undefined destroy will only close the gallery
+         * plugins instance remains with the element
+         *
+         * if d is true destroy will completely remove the plugin
+         */
+
+        if (d) {
+            if (!_this.s.dynamic) {
+                // only when not using dynamic mode is $items a jquery collection
+                this.$items.off('click.lg click.lgcustom');
+            }
+
+            $.removeData(_this.el, 'lightGallery');
+        }
+
+        // Unbind all events added by lightGallery
+        this.$el.off('.lg.tm');
+
+        // Distroy all lightGallery modules
+        $.each($.fn.lightGallery.modules, function(key) {
+            if (_this.modules[key]) {
+                _this.modules[key].destroy();
+            }
+        });
+
+        this.lGalleryOn = false;
+
+        clearTimeout(_this.hideBartimeout);
+        this.hideBartimeout = false;
+        $(window).off('.lg');
+        $('body').removeClass('lg-on lg-from-hash');
+
+        if (_this.$outer) {
+            _this.$outer.removeClass('lg-visible');
+        }
+
+        $('.lg-backdrop').removeClass('in');
+
+        setTimeout(function() {
+            if (_this.$outer) {
+                _this.$outer.remove();
+            }
+
+            $('.lg-backdrop').remove();
+
+            if (!d) {
+                _this.$el.trigger('onCloseAfter.lg');
+            }
+
+        }, _this.s.backdropDuration + 50);
+    };
+
+    $.fn.lightGallery = function(options) {
+        return this.each(function() {
+            if (!$.data(this, 'lightGallery')) {
+                $.data(this, 'lightGallery', new Plugin(this, options));
+            } else {
+                try {
+                    $(this).data('lightGallery').init();
+                } catch (err) {
+                    console.error('lightGallery has not initiated properly');
+                }
+            }
+        });
+    };
+
+    $.fn.lightGallery.modules = {};
+
+})();
+
+
+}));

+ 1156 - 0
app/assets/scripts/lightslider.js

@@ -0,0 +1,1156 @@
+/*! lightslider - v1.1.6 - 2016-10-25
+ * https://github.com/sachinchoolur/lightslider
+ * Copyright (c) 2016 Sachin N; Licensed MIT */
+(function ($, undefined) {
+    'use strict';
+    var defaults = {
+        item: 3,
+        autoWidth: false,
+        slideMove: 1,
+        slideMargin: 10,
+        addClass: '',
+        mode: 'slide',
+        useCSS: true,
+        cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',
+        easing: 'linear', //'for jquery animation',//
+        speed: 400, //ms'
+        auto: false,
+        pauseOnHover: false,
+        loop: false,
+        slideEndAnimation: true,
+        pause: 2000,
+        keyPress: false,
+        controls: true,
+        prevHtml: '',
+        nextHtml: '',
+        rtl: false,
+        adaptiveHeight: false,
+        vertical: false,
+        verticalHeight: 500,
+        vThumbWidth: 100,
+        thumbItem: 10,
+        pager: true,
+        gallery: false,
+        galleryMargin: 5,
+        thumbMargin: 5,
+        currentPagerPosition: 'middle',
+        enableTouch: true,
+        enableDrag: true,
+        freeMove: true,
+        swipeThreshold: 40,
+        responsive: [],
+        /* jshint ignore:start */
+        onBeforeStart: function ($el) {
+        },
+        onSliderLoad: function ($el) {
+        },
+        onBeforeSlide: function ($el, scene) {
+        },
+        onAfterSlide: function ($el, scene) {
+        },
+        onBeforeNextSlide: function ($el, scene) {
+        },
+        onBeforePrevSlide: function ($el, scene) {
+        }
+        /* jshint ignore:end */
+    };
+    $.fn.lightSlider = function (options) {
+        if (this.length === 0) {
+            return this;
+        }
+
+        if (this.length > 1) {
+            this.each(function () {
+                $(this).lightSlider(options);
+            });
+            return this;
+        }
+
+        var plugin = {},
+            settings = $.extend(true, {}, defaults, options),
+            settingsTemp = {},
+            $el = this;
+        plugin.$el = this;
+
+        if (settings.mode === 'fade') {
+            settings.vertical = false;
+        }
+        var $children = $el.children(),
+            windowW = $(window).width(),
+            breakpoint = null,
+            resposiveObj = null,
+            length = 0,
+            w = 0,
+            on = false,
+            elSize = 0,
+            $slide = '',
+            scene = 0,
+            property = (settings.vertical === true) ? 'height' : 'width',
+            gutter = (settings.vertical === true) ? 'margin-bottom' : 'margin-right',
+            slideValue = 0,
+            pagerWidth = 0,
+            slideWidth = 0,
+            thumbWidth = 0,
+            interval = null,
+            isTouch = ('ontouchstart' in document.documentElement);
+        var refresh = {};
+
+        refresh.chbreakpoint = function () {
+            windowW = $(window).width();
+            if (settings.responsive.length) {
+                var item;
+                if (settings.autoWidth === false) {
+                    item = settings.item;
+                }
+                if (windowW < settings.responsive[0].breakpoint) {
+                    for (var i = 0; i < settings.responsive.length; i++) {
+                        if (windowW < settings.responsive[i].breakpoint) {
+                            breakpoint = settings.responsive[i].breakpoint;
+                            resposiveObj = settings.responsive[i];
+                        }
+                    }
+                }
+                if (typeof resposiveObj !== 'undefined' && resposiveObj !== null) {
+                    for (var j in resposiveObj.settings) {
+                        if (resposiveObj.settings.hasOwnProperty(j)) {
+                            if (typeof settingsTemp[j] === 'undefined' || settingsTemp[j] === null) {
+                                settingsTemp[j] = settings[j];
+                            }
+                            settings[j] = resposiveObj.settings[j];
+                        }
+                    }
+                }
+                if (!$.isEmptyObject(settingsTemp) && windowW > settings.responsive[0].breakpoint) {
+                    for (var k in settingsTemp) {
+                        if (settingsTemp.hasOwnProperty(k)) {
+                            settings[k] = settingsTemp[k];
+                        }
+                    }
+                }
+                if (settings.autoWidth === false) {
+                    if (slideValue > 0 && slideWidth > 0) {
+                        if (item !== settings.item) {
+                            scene = Math.round(slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove));
+                        }
+                    }
+                }
+            }
+        };
+
+        refresh.calSW = function () {
+            if (settings.autoWidth === false) {
+                slideWidth = (elSize - ((settings.item * (settings.slideMargin)) - settings.slideMargin)) / settings.item;
+            }
+        };
+
+        refresh.calWidth = function (cln) {
+            var ln = cln === true ? $slide.find('.lslide').length : $children.length;
+            if (settings.autoWidth === false) {
+                w = ln * (slideWidth + settings.slideMargin);
+            } else {
+                w = 0;
+                for (var i = 0; i < ln; i++) {
+                    w += (parseInt($children.eq(i).width()) + settings.slideMargin);
+                }
+            }
+            return w;
+        };
+        plugin = {
+            doCss: function () {
+                var support = function () {
+                    var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
+                    var root = document.documentElement;
+                    for (var i = 0; i < transition.length; i++) {
+                        if (transition[i] in root.style) {
+                            return true;
+                        }
+                    }
+                };
+                if (settings.useCSS && support()) {
+                    return true;
+                }
+                return false;
+            },
+            keyPress: function () {
+                if (settings.keyPress) {
+                    $(document).on('keyup.lightslider', function (e) {
+                        if (!$(':focus').is('input, textarea')) {
+                            if (e.preventDefault) {
+                                e.preventDefault();
+                            } else {
+                                e.returnValue = false;
+                            }
+                            if (e.keyCode === 37) {
+                                $el.goToPrevSlide();
+                            } else if (e.keyCode === 39) {
+                                $el.goToNextSlide();
+                            }
+                        }
+                    });
+                }
+            },
+            controls: function () {
+                if (settings.controls) {
+                    $el.after('<div class="lSAction"><a class="lSPrev">' + settings.prevHtml + '</a><a class="lSNext">' + settings.nextHtml + '</a></div>');
+                    if (!settings.autoWidth) {
+                        if (length <= settings.item) {
+                            $slide.find('.lSAction').hide();
+                        }
+                    } else {
+                        if (refresh.calWidth(false) < elSize) {
+                            $slide.find('.lSAction').hide();
+                        }
+                    }
+                    $slide.find('.lSAction a').on('click', function (e) {
+                        if (e.preventDefault) {
+                            e.preventDefault();
+                        } else {
+                            e.returnValue = false;
+                        }
+                        if ($(this).attr('class') === 'lSPrev') {
+                            $el.goToPrevSlide();
+                        } else {
+                            $el.goToNextSlide();
+                        }
+                        return false;
+                    });
+                }
+            },
+            initialStyle: function () {
+                var $this = this;
+                if (settings.mode === 'fade') {
+                    settings.autoWidth = false;
+                    settings.slideEndAnimation = false;
+                }
+                if (settings.auto) {
+                    settings.slideEndAnimation = false;
+                }
+                if (settings.autoWidth) {
+                    settings.slideMove = 1;
+                    settings.item = 1;
+                }
+                if (settings.loop) {
+                    settings.slideMove = 1;
+                    settings.freeMove = false;
+                }
+                settings.onBeforeStart.call(this, $el);
+                refresh.chbreakpoint();
+                $el.addClass('lightSlider').wrap('<div class="lSSlideOuter ' + settings.addClass + '"><div class="lSSlideWrapper"></div></div>');
+                $slide = $el.parent('.lSSlideWrapper');
+                if (settings.rtl === true) {
+                    $slide.parent().addClass('lSrtl');
+                }
+                if (settings.vertical) {
+                    $slide.parent().addClass('vertical');
+                    elSize = settings.verticalHeight;
+                    $slide.css('height', elSize + 'px');
+                } else {
+                    elSize = $el.outerWidth();
+                }
+                $children.addClass('lslide');
+                if (settings.loop === true && settings.mode === 'slide') {
+                    refresh.calSW();
+                    refresh.clone = function () {
+                        if (refresh.calWidth(true) > elSize) {
+                            /**/
+                            var tWr = 0,
+                                tI = 0;
+                            for (var k = 0; k < $children.length; k++) {
+                                tWr += (parseInt($el.find('.lslide').eq(k).width()) + settings.slideMargin);
+                                tI++;
+                                if (tWr >= (elSize + settings.slideMargin)) {
+                                    break;
+                                }
+                            }
+                            var tItem = settings.autoWidth === true ? tI : settings.item;
+
+                            /**/
+                            if (tItem < $el.find('.clone.left').length) {
+                                for (var i = 0; i < $el.find('.clone.left').length - tItem; i++) {
+                                    $children.eq(i).remove();
+                                }
+                            }
+                            if (tItem < $el.find('.clone.right').length) {
+                                for (var j = $children.length - 1; j > ($children.length - 1 - $el.find('.clone.right').length); j--) {
+                                    scene--;
+                                    $children.eq(j).remove();
+                                }
+                            }
+                            /**/
+                            for (var n = $el.find('.clone.right').length; n < tItem; n++) {
+                                $el.find('.lslide').eq(n).clone().removeClass('lslide').addClass('clone right').appendTo($el);
+                                scene++;
+                            }
+                            for (var m = $el.find('.lslide').length - $el.find('.clone.left').length; m > ($el.find('.lslide').length - tItem); m--) {
+                                $el.find('.lslide').eq(m - 1).clone().removeClass('lslide').addClass('clone left').prependTo($el);
+                            }
+                            $children = $el.children();
+                        } else {
+                            if ($children.hasClass('clone')) {
+                                $el.find('.clone').remove();
+                                $this.move($el, 0);
+                            }
+                        }
+                    };
+                    refresh.clone();
+                }
+                refresh.sSW = function () {
+                    length = $children.length;
+                    if (settings.rtl === true && settings.vertical === false) {
+                        gutter = 'margin-left';
+                    }
+                    if (settings.autoWidth === false) {
+                        $children.css(property, slideWidth + 'px');
+                    }
+                    $children.css(gutter, settings.slideMargin + 'px');
+                    w = refresh.calWidth(false);
+                    $el.css(property, w + 'px');
+                    if (settings.loop === true && settings.mode === 'slide') {
+                        if (on === false) {
+                            scene = $el.find('.clone.left').length;
+                        }
+                    }
+                };
+                refresh.calL = function () {
+                    $children = $el.children();
+                    length = $children.length;
+                };
+                if (this.doCss()) {
+                    $slide.addClass('usingCss');
+                }
+                refresh.calL();
+                if (settings.mode === 'slide') {
+                    refresh.calSW();
+                    refresh.sSW();
+                    if (settings.loop === true) {
+                        slideValue = $this.slideValue();
+                        this.move($el, slideValue);
+                    }
+                    if (settings.vertical === false) {
+                        this.setHeight($el, false);
+                    }
+
+                } else {
+                    this.setHeight($el, true);
+                    $el.addClass('lSFade');
+                    if (!this.doCss()) {
+                        $children.fadeOut(0);
+                        $children.eq(scene).fadeIn(0);
+                    }
+                }
+                if (settings.loop === true && settings.mode === 'slide') {
+                    $children.eq(scene).addClass('active');
+                } else {
+                    $children.first().addClass('active');
+                }
+            },
+            pager: function () {
+                var $this = this;
+                refresh.createPager = function () {
+                    thumbWidth = (elSize - ((settings.thumbItem * (settings.thumbMargin)) - settings.thumbMargin)) / settings.thumbItem;
+                    var $children = $slide.find('.lslide');
+                    var length = $slide.find('.lslide').length;
+                    var i = 0,
+                        pagers = '',
+                        v = 0;
+                    for (i = 0; i < length; i++) {
+                        if (settings.mode === 'slide') {
+                            // calculate scene * slide value
+                            if (!settings.autoWidth) {
+                                v = i * ((slideWidth + settings.slideMargin) * settings.slideMove);
+                            } else {
+                                v += ((parseInt($children.eq(i).width()) + settings.slideMargin) * settings.slideMove);
+                            }
+                        }
+                        var thumb = $children.eq(i * settings.slideMove).attr('data-thumb');
+                        if (settings.gallery === true) {
+                            pagers += '<li style="width:100%;' + property + ':' + thumbWidth + 'px;' + gutter + ':' + settings.thumbMargin + 'px"><a href="#"><img src="' + thumb + '" /></a></li>';
+                        } else {
+                            pagers += '<li><a href="#">' + (i + 1) + '</a></li>';
+                        }
+                        if (settings.mode === 'slide') {
+                            if ((v) >= w - elSize - settings.slideMargin) {
+                                i = i + 1;
+                                var minPgr = 2;
+                                if (settings.autoWidth) {
+                                    pagers += '<li><a href="#">' + (i + 1) + '</a></li>';
+                                    minPgr = 1;
+                                }
+                                if (i < minPgr) {
+                                    pagers = null;
+                                    $slide.parent().addClass('noPager');
+                                } else {
+                                    $slide.parent().removeClass('noPager');
+                                }
+                                break;
+                            }
+                        }
+                    }
+                    var $cSouter = $slide.parent();
+                    $cSouter.find('.lSPager').html(pagers);
+                    if (settings.gallery === true) {
+                        if (settings.vertical === true) {
+                            // set Gallery thumbnail width
+                            $cSouter.find('.lSPager').css('width', settings.vThumbWidth + 'px');
+                        }
+                        pagerWidth = (i * (settings.thumbMargin + thumbWidth)) + 0.5;
+                        $cSouter.find('.lSPager').css({
+                            property: pagerWidth + 'px',
+                            'transition-duration': settings.speed + 'ms'
+                        });
+                        if (settings.vertical === true) {
+                            $slide.parent().css('padding-right', (settings.vThumbWidth + settings.galleryMargin) + 'px');
+                        }
+                        $cSouter.find('.lSPager').css(property, pagerWidth + 'px');
+                    }
+                    var $pager = $cSouter.find('.lSPager').find('li');
+                    $pager.first().addClass('active');
+                    $pager.on('click', function () {
+                        if (settings.loop === true && settings.mode === 'slide') {
+                            scene = scene + ($pager.index(this) - $cSouter.find('.lSPager').find('li.active').index());
+                        } else {
+                            scene = $pager.index(this);
+                        }
+                        $el.mode(false);
+                        if (settings.gallery === true) {
+                            $this.slideThumb();
+                        }
+                        return false;
+                    });
+                };
+                if (settings.pager) {
+                    var cl = 'lSpg';
+                    if (settings.gallery) {
+                        cl = 'lSGallery';
+                    }
+                    $slide.after('<ul class="lSPager ' + cl + '"></ul>');
+                    var gMargin = (settings.vertical) ? 'margin-left' : 'margin-top';
+                    $slide.parent().find('.lSPager').css(gMargin, settings.galleryMargin + 'px');
+                    refresh.createPager();
+                }
+
+                setTimeout(function () {
+                    refresh.init();
+                }, 0);
+            },
+            setHeight: function (ob, fade) {
+                var obj = null,
+                    $this = this;
+                if (settings.loop) {
+                    obj = ob.children('.lslide ').first();
+                } else {
+                    obj = ob.children().first();
+                }
+                var setCss = function () {
+                    var tH = obj.outerHeight(),
+                        tP = 0,
+                        tHT = tH;
+                    if (fade) {
+                        tH = 0;
+                        tP = ((tHT) * 100) / elSize;
+                    }
+                    ob.css({
+                        'height': tH + 'px',
+                        'padding-bottom': tP + '%'
+                    });
+                };
+                setCss();
+                if (obj.find('img').length) {
+                    if (obj.find('img')[0].complete) {
+                        setCss();
+                        if (!interval) {
+                            $this.auto();
+                        }
+                    } else {
+                        obj.find('img').on('load', function () {
+                            setTimeout(function () {
+                                setCss();
+                                if (!interval) {
+                                    $this.auto();
+                                }
+                            }, 100);
+                        });
+                    }
+                } else {
+                    if (!interval) {
+                        $this.auto();
+                    }
+                }
+            },
+            active: function (ob, t) {
+                if (this.doCss() && settings.mode === 'fade') {
+                    $slide.addClass('on');
+                }
+                var sc = 0;
+                if (scene * settings.slideMove < length) {
+                    ob.removeClass('active');
+                    if (!this.doCss() && settings.mode === 'fade' && t === false) {
+                        ob.fadeOut(settings.speed);
+                    }
+                    if (t === true) {
+                        sc = scene;
+                    } else {
+                        sc = scene * settings.slideMove;
+                    }
+                    //t === true ? sc = scene : sc = scene * settings.slideMove;
+                    var l, nl;
+                    if (t === true) {
+                        l = ob.length;
+                        nl = l - 1;
+                        if (sc + 1 >= l) {
+                            sc = nl;
+                        }
+                    }
+                    if (settings.loop === true && settings.mode === 'slide') {
+                        //t === true ? sc = scene - $el.find('.clone.left').length : sc = scene * settings.slideMove;
+                        if (t === true) {
+                            sc = scene - $el.find('.clone.left').length;
+                        } else {
+                            sc = scene * settings.slideMove;
+                        }
+                        if (t === true) {
+                            l = ob.length;
+                            nl = l - 1;
+                            if (sc + 1 === l) {
+                                sc = nl;
+                            } else if (sc + 1 > l) {
+                                sc = 0;
+                            }
+                        }
+                    }
+
+                    if (!this.doCss() && settings.mode === 'fade' && t === false) {
+                        ob.eq(sc).fadeIn(settings.speed);
+                    }
+                    ob.eq(sc).addClass('active');
+                } else {
+                    ob.removeClass('active');
+                    ob.eq(ob.length - 1).addClass('active');
+                    if (!this.doCss() && settings.mode === 'fade' && t === false) {
+                        ob.fadeOut(settings.speed);
+                        ob.eq(sc).fadeIn(settings.speed);
+                    }
+                }
+            },
+            move: function (ob, v) {
+                if (settings.rtl === true) {
+                    v = -v;
+                }
+                if (this.doCss()) {
+                    if (settings.vertical === true) {
+                        ob.css({
+                            'transform': 'translate3d(0px, ' + (-v) + 'px, 0px)',
+                            '-webkit-transform': 'translate3d(0px, ' + (-v) + 'px, 0px)'
+                        });
+                    } else {
+                        ob.css({
+                            'transform': 'translate3d(' + (-v) + 'px, 0px, 0px)',
+                            '-webkit-transform': 'translate3d(' + (-v) + 'px, 0px, 0px)',
+                        });
+                    }
+                } else {
+                    if (settings.vertical === true) {
+                        ob.css('position', 'relative').animate({
+                            top: -v + 'px'
+                        }, settings.speed, settings.easing);
+                    } else {
+                        ob.css('position', 'relative').animate({
+                            left: -v + 'px'
+                        }, settings.speed, settings.easing);
+                    }
+                }
+                var $thumb = $slide.parent().find('.lSPager').find('li');
+                this.active($thumb, true);
+            },
+            fade: function () {
+                this.active($children, false);
+                var $thumb = $slide.parent().find('.lSPager').find('li');
+                this.active($thumb, true);
+            },
+            slide: function () {
+                var $this = this;
+                refresh.calSlide = function () {
+                    if (w > elSize) {
+                        slideValue = $this.slideValue();
+                        $this.active($children, false);
+                        if ((slideValue) > w - elSize - settings.slideMargin) {
+                            slideValue = w - elSize - settings.slideMargin;
+                        } else if (slideValue < 0) {
+                            slideValue = 0;
+                        }
+                        $this.move($el, slideValue);
+                        if (settings.loop === true && settings.mode === 'slide') {
+                            if (scene >= (length - ($el.find('.clone.left').length / settings.slideMove))) {
+                                $this.resetSlide($el.find('.clone.left').length);
+                            }
+                            if (scene === 0) {
+                                $this.resetSlide($slide.find('.lslide').length);
+                            }
+                        }
+                    }
+                };
+                refresh.calSlide();
+            },
+            resetSlide: function (s) {
+                var $this = this;
+                $slide.find('.lSAction a').addClass('disabled');
+                setTimeout(function () {
+                    scene = s;
+                    $slide.css('transition-duration', '0ms');
+                    slideValue = $this.slideValue();
+                    $this.active($children, false);
+                    plugin.move($el, slideValue);
+                    setTimeout(function () {
+                        $slide.css('transition-duration', settings.speed + 'ms');
+                        $slide.find('.lSAction a').removeClass('disabled');
+                    }, 50);
+                }, settings.speed + 100);
+            },
+            slideValue: function () {
+                var _sV = 0;
+                if (settings.autoWidth === false) {
+                    _sV = scene * ((slideWidth + settings.slideMargin) * settings.slideMove);
+                } else {
+                    _sV = 0;
+                    for (var i = 0; i < scene; i++) {
+                        _sV += (parseInt($children.eq(i).width()) + settings.slideMargin);
+                    }
+                }
+                return _sV;
+            },
+            slideThumb: function () {
+                var position;
+                switch (settings.currentPagerPosition) {
+                    case 'left':
+                        position = 0;
+                        break;
+                    case 'middle':
+                        position = (elSize / 2) - (thumbWidth / 2);
+                        break;
+                    case 'right':
+                        position = elSize - thumbWidth;
+                }
+                var sc = scene - $el.find('.clone.left').length;
+                var $pager = $slide.parent().find('.lSPager');
+                if (settings.mode === 'slide' && settings.loop === true) {
+                    if (sc >= $pager.children().length) {
+                        sc = 0;
+                    } else if (sc < 0) {
+                        sc = $pager.children().length;
+                    }
+                }
+                var thumbSlide = sc * ((thumbWidth + settings.thumbMargin)) - (position);
+                if ((thumbSlide + elSize) > pagerWidth) {
+                    thumbSlide = pagerWidth - elSize - settings.thumbMargin;
+                }
+                if (thumbSlide < 0) {
+                    thumbSlide = 0;
+                }
+                this.move($pager, thumbSlide);
+            },
+            auto: function () {
+                if (settings.auto) {
+                    clearInterval(interval);
+                    interval = setInterval(function () {
+                        $el.goToNextSlide();
+                    }, settings.pause);
+                }
+            },
+            pauseOnHover: function () {
+                var $this = this;
+                if (settings.auto && settings.pauseOnHover) {
+                    $slide.on('mouseenter', function () {
+                        $(this).addClass('ls-hover');
+                        $el.pause();
+                        settings.auto = true;
+                    });
+                    $slide.on('mouseleave', function () {
+                        $(this).removeClass('ls-hover');
+                        if (!$slide.find('.lightSlider').hasClass('lsGrabbing')) {
+                            $this.auto();
+                        }
+                    });
+                }
+            },
+            touchMove: function (endCoords, startCoords) {
+                $slide.css('transition-duration', '0ms');
+                if (settings.mode === 'slide') {
+                    var distance = endCoords - startCoords;
+                    var swipeVal = slideValue - distance;
+                    if ((swipeVal) >= w - elSize - settings.slideMargin) {
+                        if (settings.freeMove === false) {
+                            swipeVal = w - elSize - settings.slideMargin;
+                        } else {
+                            var swipeValT = w - elSize - settings.slideMargin;
+                            swipeVal = swipeValT + ((swipeVal - swipeValT) / 5);
+
+                        }
+                    } else if (swipeVal < 0) {
+                        if (settings.freeMove === false) {
+                            swipeVal = 0;
+                        } else {
+                            swipeVal = swipeVal / 5;
+                        }
+                    }
+                    this.move($el, swipeVal);
+                }
+            },
+
+            touchEnd: function (distance) {
+                $slide.css('transition-duration', settings.speed + 'ms');
+                if (settings.mode === 'slide') {
+                    var mxVal = false;
+                    var _next = true;
+                    slideValue = slideValue - distance;
+                    if ((slideValue) > w - elSize - settings.slideMargin) {
+                        slideValue = w - elSize - settings.slideMargin;
+                        if (settings.autoWidth === false) {
+                            mxVal = true;
+                        }
+                    } else if (slideValue < 0) {
+                        slideValue = 0;
+                    }
+                    var gC = function (next) {
+                        var ad = 0;
+                        if (!mxVal) {
+                            if (next) {
+                                ad = 1;
+                            }
+                        }
+                        if (!settings.autoWidth) {
+                            var num = slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove);
+                            scene = parseInt(num) + ad;
+                            if (slideValue >= (w - elSize - settings.slideMargin)) {
+                                if (num % 1 !== 0) {
+                                    scene++;
+                                }
+                            }
+                        } else {
+                            var tW = 0;
+                            for (var i = 0; i < $children.length; i++) {
+                                tW += (parseInt($children.eq(i).width()) + settings.slideMargin);
+                                scene = i + ad;
+                                if (tW >= slideValue) {
+                                    break;
+                                }
+                            }
+                        }
+                    };
+                    if (distance >= settings.swipeThreshold) {
+                        gC(false);
+                        _next = false;
+                    } else if (distance <= -settings.swipeThreshold) {
+                        gC(true);
+                        _next = false;
+                    }
+                    $el.mode(_next);
+                    this.slideThumb();
+                } else {
+                    if (distance >= settings.swipeThreshold) {
+                        $el.goToPrevSlide();
+                    } else if (distance <= -settings.swipeThreshold) {
+                        $el.goToNextSlide();
+                    }
+                }
+            },
+
+
+            enableDrag: function () {
+                var $this = this;
+                if (!isTouch) {
+                    var startCoords = 0,
+                        endCoords = 0,
+                        isDraging = false;
+                    $slide.find('.lightSlider').addClass('lsGrab');
+                    $slide.on('mousedown', function (e) {
+                        if (w < elSize) {
+                            if (w !== 0) {
+                                return false;
+                            }
+                        }
+                        if ($(e.target).attr('class') !== ('lSPrev') && $(e.target).attr('class') !== ('lSNext')) {
+                            startCoords = (settings.vertical === true) ? e.pageY : e.pageX;
+                            isDraging = true;
+                            if (e.preventDefault) {
+                                e.preventDefault();
+                            } else {
+                                e.returnValue = false;
+                            }
+                            // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
+                            $slide.scrollLeft += 1;
+                            $slide.scrollLeft -= 1;
+                            // *
+                            $slide.find('.lightSlider').removeClass('lsGrab').addClass('lsGrabbing');
+                            clearInterval(interval);
+                        }
+                    });
+                    $(window).on('mousemove', function (e) {
+                        if (isDraging) {
+                            endCoords = (settings.vertical === true) ? e.pageY : e.pageX;
+                            $this.touchMove(endCoords, startCoords);
+                        }
+                    });
+                    $(window).on('mouseup', function (e) {
+                        if (isDraging) {
+                            $slide.find('.lightSlider').removeClass('lsGrabbing').addClass('lsGrab');
+                            isDraging = false;
+                            endCoords = (settings.vertical === true) ? e.pageY : e.pageX;
+                            var distance = endCoords - startCoords;
+                            if (Math.abs(distance) >= settings.swipeThreshold) {
+                                $(window).on('click.ls', function (e) {
+                                    if (e.preventDefault) {
+                                        e.preventDefault();
+                                    } else {
+                                        e.returnValue = false;
+                                    }
+                                    e.stopImmediatePropagation();
+                                    e.stopPropagation();
+                                    $(window).off('click.ls');
+                                });
+                            }
+
+                            $this.touchEnd(distance);
+
+                        }
+                    });
+                }
+            },
+
+
+            enableTouch: function () {
+                var $this = this;
+                if (isTouch) {
+                    var startCoords = {},
+                        endCoords = {};
+                    $slide.on('touchstart', function (e) {
+                        endCoords = e.originalEvent.targetTouches[0];
+                        startCoords.pageX = e.originalEvent.targetTouches[0].pageX;
+                        startCoords.pageY = e.originalEvent.targetTouches[0].pageY;
+                        clearInterval(interval);
+                    });
+                    $slide.on('touchmove', function (e) {
+                        if (w < elSize) {
+                            if (w !== 0) {
+                                return false;
+                            }
+                        }
+                        var orig = e.originalEvent;
+                        endCoords = orig.targetTouches[0];
+                        var xMovement = Math.abs(endCoords.pageX - startCoords.pageX);
+                        var yMovement = Math.abs(endCoords.pageY - startCoords.pageY);
+                        if (settings.vertical === true) {
+                            if ((yMovement * 3) > xMovement) {
+                                e.preventDefault();
+                            }
+                            $this.touchMove(endCoords.pageY, startCoords.pageY);
+                        } else {
+                            if ((xMovement * 3) > yMovement) {
+                                e.preventDefault();
+                            }
+                            $this.touchMove(endCoords.pageX, startCoords.pageX);
+                        }
+
+                    });
+                    $slide.on('touchend', function () {
+                        if (w < elSize) {
+                            if (w !== 0) {
+                                return false;
+                            }
+                        }
+                        var distance;
+                        if (settings.vertical === true) {
+                            distance = endCoords.pageY - startCoords.pageY;
+                        } else {
+                            distance = endCoords.pageX - startCoords.pageX;
+                        }
+                        $this.touchEnd(distance);
+                    });
+                }
+            },
+            build: function () {
+                var $this = this;
+                $this.initialStyle();
+                if (this.doCss()) {
+
+                    if (settings.enableTouch === true) {
+                        $this.enableTouch();
+                    }
+                    if (settings.enableDrag === true) {
+                        $this.enableDrag();
+                    }
+                }
+
+                $(window).on('focus', function () {
+                    $this.auto();
+                });
+
+                $(window).on('blur', function () {
+                    clearInterval(interval);
+                });
+
+                $this.pager();
+                $this.pauseOnHover();
+                $this.controls();
+                $this.keyPress();
+            }
+        };
+        plugin.build();
+        refresh.init = function () {
+            refresh.chbreakpoint();
+            if (settings.vertical === true) {
+                if (settings.item > 1) {
+                    elSize = settings.verticalHeight;
+                } else {
+                    elSize = $children.outerHeight();
+                }
+                $slide.css('height', elSize + 'px');
+            } else {
+                elSize = $slide.outerWidth();
+            }
+            if (settings.loop === true && settings.mode === 'slide') {
+                refresh.clone();
+            }
+            refresh.calL();
+            if (settings.mode === 'slide') {
+                $el.removeClass('lSSlide');
+            }
+            if (settings.mode === 'slide') {
+                refresh.calSW();
+                refresh.sSW();
+            }
+            setTimeout(function () {
+                if (settings.mode === 'slide') {
+                    $el.addClass('lSSlide');
+                }
+            }, 1000);
+            if (settings.pager) {
+                refresh.createPager();
+            }
+            if (settings.adaptiveHeight === true && settings.vertical === false) {
+                $el.css('height', $children.eq(scene).outerHeight(true));
+            }
+            if (settings.adaptiveHeight === false) {
+                if (settings.mode === 'slide') {
+                    if (settings.vertical === false) {
+                        plugin.setHeight($el, false);
+                    } else {
+                        plugin.auto();
+                    }
+                } else {
+                    plugin.setHeight($el, true);
+                }
+            }
+            if (settings.gallery === true) {
+                plugin.slideThumb();
+            }
+            if (settings.mode === 'slide') {
+                plugin.slide();
+            }
+            if (settings.autoWidth === false) {
+                if ($children.length <= settings.item) {
+                    $slide.find('.lSAction').hide();
+                } else {
+                    $slide.find('.lSAction').show();
+                }
+            } else {
+                if ((refresh.calWidth(false) < elSize) && (w !== 0)) {
+                    $slide.find('.lSAction').hide();
+                } else {
+                    $slide.find('.lSAction').show();
+                }
+            }
+        };
+        $el.goToPrevSlide = function () {
+            if (scene > 0) {
+                settings.onBeforePrevSlide.call(this, $el, scene);
+                scene--;
+                $el.mode(false);
+                if (settings.gallery === true) {
+                    plugin.slideThumb();
+                }
+            } else {
+                if (settings.loop === true) {
+                    settings.onBeforePrevSlide.call(this, $el, scene);
+                    if (settings.mode === 'fade') {
+                        var l = (length - 1);
+                        scene = parseInt(l / settings.slideMove);
+                    }
+                    $el.mode(false);
+                    if (settings.gallery === true) {
+                        plugin.slideThumb();
+                    }
+                } else if (settings.slideEndAnimation === true) {
+                    $el.addClass('leftEnd');
+                    setTimeout(function () {
+                        $el.removeClass('leftEnd');
+                    }, 400);
+                }
+            }
+        };
+        $el.goToNextSlide = function () {
+            var nextI = true;
+            if (settings.mode === 'slide') {
+                var _slideValue = plugin.slideValue();
+                nextI = _slideValue < w - elSize - settings.slideMargin;
+            }
+            if (((scene * settings.slideMove) < length - settings.slideMove) && nextI) {
+                settings.onBeforeNextSlide.call(this, $el, scene);
+                scene++;
+                $el.mode(false);
+                if (settings.gallery === true) {
+                    plugin.slideThumb();
+                }
+            } else {
+                if (settings.loop === true) {
+                    settings.onBeforeNextSlide.call(this, $el, scene);
+                    scene = 0;
+                    $el.mode(false);
+                    if (settings.gallery === true) {
+                        plugin.slideThumb();
+                    }
+                } else if (settings.slideEndAnimation === true) {
+                    $el.addClass('rightEnd');
+                    setTimeout(function () {
+                        $el.removeClass('rightEnd');
+                    }, 400);
+                }
+            }
+        };
+        $el.mode = function (_touch) {
+            if (settings.adaptiveHeight === true && settings.vertical === false) {
+                $el.css('height', $children.eq(scene).outerHeight(true));
+            }
+            if (on === false) {
+                if (settings.mode === 'slide') {
+                    if (plugin.doCss()) {
+                        $el.addClass('lSSlide');
+                        if (settings.speed !== '') {
+                            $slide.css('transition-duration', settings.speed + 'ms');
+                        }
+                        if (settings.cssEasing !== '') {
+                            $slide.css('transition-timing-function', settings.cssEasing);
+                        }
+                    }
+                } else {
+                    if (plugin.doCss()) {
+                        if (settings.speed !== '') {
+                            $el.css('transition-duration', settings.speed + 'ms');
+                        }
+                        if (settings.cssEasing !== '') {
+                            $el.css('transition-timing-function', settings.cssEasing);
+                        }
+                    }
+                }
+            }
+            if (!_touch) {
+                settings.onBeforeSlide.call(this, $el, scene);
+            }
+            if (settings.mode === 'slide') {
+                plugin.slide();
+            } else {
+                plugin.fade();
+            }
+            if (!$slide.hasClass('ls-hover')) {
+                plugin.auto();
+            }
+            setTimeout(function () {
+                if (!_touch) {
+                    settings.onAfterSlide.call(this, $el, scene);
+                }
+            }, settings.speed);
+            on = true;
+        };
+        $el.play = function () {
+            $el.goToNextSlide();
+            settings.auto = true;
+            plugin.auto();
+        };
+        $el.pause = function () {
+            settings.auto = false;
+            clearInterval(interval);
+        };
+        $el.refresh = function () {
+            refresh.init();
+        };
+        $el.getCurrentSlideCount = function () {
+            var sc = scene;
+            if (settings.loop) {
+                var ln = $slide.find('.lslide').length,
+                    cl = $el.find('.clone.left').length;
+                if (scene <= cl - 1) {
+                    sc = ln + (scene - cl);
+                } else if (scene >= (ln + cl)) {
+                    sc = scene - ln - cl;
+                } else {
+                    sc = scene - cl;
+                }
+            }
+            return sc + 1;
+        };
+        $el.getTotalSlideCount = function () {
+            return $slide.find('.lslide').length;
+        };
+        $el.goToSlide = function (s) {
+            if (settings.loop) {
+                scene = (s + $el.find('.clone.left').length - 1);
+            } else {
+                scene = s;
+            }
+            $el.mode(false);
+            if (settings.gallery === true) {
+                plugin.slideThumb();
+            }
+        };
+        $el.destroy = function () {
+            if ($el.lightSlider) {
+                $el.goToPrevSlide = function () {
+                };
+                $el.goToNextSlide = function () {
+                };
+                $el.mode = function () {
+                };
+                $el.play = function () {
+                };
+                $el.pause = function () {
+                };
+                $el.refresh = function () {
+                };
+                $el.getCurrentSlideCount = function () {
+                };
+                $el.getTotalSlideCount = function () {
+                };
+                $el.goToSlide = function () {
+                };
+                $el.lightSlider = null;
+                refresh = {
+                    init: function () {
+                    }
+                };
+                $el.parent().parent().find('.lSAction, .lSPager').remove();
+                $el.removeClass('lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right').removeAttr('style').unwrap().unwrap();
+                $el.children().removeAttr('style');
+                $children.removeClass('lslide active');
+                $el.find('.clone').remove();
+                $children = null;
+                interval = null;
+                on = false;
+                scene = 0;
+            }
+
+        };
+        setTimeout(function () {
+            settings.onSliderLoad.call(this, $el);
+        }, 10);
+        $(window).on('resize orientationchange', function (e) {
+            setTimeout(function () {
+                if (e.preventDefault) {
+                    e.preventDefault();
+                } else {
+                    e.returnValue = false;
+                }
+                refresh.init();
+            }, 200);
+        });
+        return this;
+    };
+}(jQuery));

+ 191 - 0
app/assets/scripts/main.js

@@ -0,0 +1,191 @@
+(function () {
+    if ($("*").is('#dayitime')) {
+        function addZero(i) {
+            if (i < 10) {
+                i = "0" + i;
+            }
+            return i;
+        };
+        function getCurrentTime1() {
+            var today_time, h, m;
+            today_time = new Date(Date.now());
+            h = today_time.getUTCHours();
+            m = addZero(today_time.getUTCMinutes());
+            return (h + 3) + '<span class=timeseparator>:</span>' + m;
+        }
+
+        function setTimer1() {
+            today_time.innerHTML = getCurrentTime1();
+        }
+
+        setInterval(setTimer1, 1000);
+    }
+
+    function clock() {
+        var d = new Date();
+        var month_num = d.getMonth()
+        var day = d.getDate();
+        var hours = d.getHours();
+        var minutes = d.getMinutes();
+        var seconds = d.getSeconds();
+        var weekday_num = d.getDay();
+
+        var month = new Array("января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря");
+        var weekday = new Array("воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота");
+
+        if (day <= 9) day = "0" + day;
+        if (hours <= 9) hours = "0" + hours;
+        if (minutes <= 9) minutes = "0" + minutes;
+        if (seconds <= 9) seconds = "0" + seconds;
+
+        var date_time = day + " " + month[month_num] + ", " + weekday[weekday_num] + ", ";
+        if (document.layers) {
+            document.layers.today_day.document.write(date_time);
+            document.layers.today_day.document.close();
+        }
+        else document.getElementById("today_day").innerHTML = date_time;
+        setTimeout(clock, 1000);
+    }
+
+    if ($("*").is('#filterservice')) {
+        function checktoggle() {
+            if ($("#switch_old").is(':checked')) {
+                $('#switch_old2').addClass("filterservice__labelbig--active");
+                $('#switch_old1').removeClass("filterservice__labelbig--active");
+            } else {
+                $('#switch_old1').addClass("filterservice__labelbig--active");
+                $('#switch_old2').removeClass("filterservice__labelbig--active");
+            }
+
+            if ($("#switch_male").is(':checked')) {
+                $('#switch_male2').addClass("filterservice__labelbig--active");
+                $('#switch_male1').removeClass("filterservice__labelbig--active");
+            } else {
+                $('#switch_male1').addClass("filterservice__labelbig--active");
+                $('#switch_male2').removeClass("filterservice__labelbig--active");
+            }
+        }
+    }
+
+    $(document).ready(function () {
+
+        $(".region__link").click(function (e) {
+            e.preventDefault();
+        });
+
+        setTimeout(function () {
+            $(".shortnews__description").dotdotdot();
+        }, 10);
+
+        if ($("*").is('#filterservice')) {
+            checktoggle();
+        }
+
+
+        $(".filterservice__toggle").click(function () {
+            checktoggle();
+        });
+
+        if ($("*").is('#datefilter')) {
+            $('#datefilter').dateRangePicker({
+                autoClose: true,
+                language: 'ru',
+                duration: 500,
+                startOfWeek: "monday",
+                getValue: function () {
+                    return document.getElementById('datefiltertext').innerHTML;
+                }, setValue: function (s) {
+                    document.getElementById('datefiltertext').innerHTML = s;
+                }
+            });
+        }
+        if ($("*").is('.calendinfo__calendcase')) {
+            $('.calendinfo__calendcase').dateRangePicker({
+                inline: true,
+                language: 'ru',
+                container: '#calendinfo_range',
+                alwaysOpen: true,
+                singleMonth: true,
+                showTopbar: false,
+                singleDate: true,
+                startOfWeek: "monday",
+            });
+        }
+
+        if ($("*").is('#calendinfo')) {
+            clock();
+        }
+
+        $('input, textarea').focus(function () {
+            $(this).data('placeholder', $(this).attr('placeholder'))
+            $(this).attr('placeholder', '');
+        });
+        $('input, textarea').blur(function () {
+            $(this).attr('placeholder', $(this).data('placeholder'));
+        });
+
+        $('#organization__title, #specialization__title').click(function (e) {
+            $(this).next().toggleClass('active');
+            $(this).find('.leftbar__arrow').toggleClass('active');
+            e.preventDefault();
+        });
+
+        if ($("*").is('#full_news__sliderlist')) {
+            $('#full_news__sliderlist').lightSlider({
+                selector: '.full-news__slirderitem',
+                item: 1,
+                loop: true,
+                auto: true,
+                pause: 8000,
+                speed: 1000,
+                gallery: true,
+                thumbItem: 4
+                // controls: false,
+                // onSliderLoad: function(el) {
+                //     el.lightGallery({
+                //         selector: '#fullnews__gallerylist .lslide'
+                //     });
+                // },
+            });
+        }
+
+        if ($("*").is('#mainsliderId')) {
+            $('#mainsliderId').lightSlider({
+                selector: '.mainslider__item',
+                item: 1,
+                loop: true,
+                auto: true,
+                pause: 8000,
+                speed: 1000,
+                // mode: 'fade',
+                controls: false
+            });
+        }
+
+        /*$('.centerbar input, .centerbar select').styler();*/
+
+        if ($("*").is('#newsfilter')) {
+            $("#newsfiltericon").click(function () {
+                $(".newsfilter__open").toggleClass('newsfilter__open--show');
+            });
+        }
+
+    });
+
+    $(window).scroll(function () {
+        if ($(this).scrollTop() > 750 && $('.header, .content').hasClass('loading')) {
+            $('.header, .content').removeClass('loading').addClass('scrolling');
+        } else if ($(this).scrollTop() <= 750 && $('.header, .content').hasClass('scrolling')) {
+            $('.header, .content').removeClass('scrolling').addClass('loading');
+        }
+    });
+
+    new SpecFilter.SpecFilter($('.newsfilter__specializations .newsfilter__text'));
+    new RegionFilter.RegionFilter($('.newsfilter__regions .newsfilter__text'), {
+        itemsContainerClass: 'regionsfilter__container',
+        itemContainerClass: 'regionsfilter__region',
+        itemCheckboxClass: 'regionsfilter__checkbox',
+        itemLabelClass: 'regionsfilter__label'
+    });
+
+})();

+ 13802 - 0
app/assets/scripts/moment.js

@@ -0,0 +1,13802 @@
+;(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+        typeof define === 'function' && define.amd ? define(factory) :
+            global.moment = factory()
+}(this, (function () {
+    'use strict';
+
+    var hookCallback;
+
+    function hooks() {
+        return hookCallback.apply(null, arguments);
+    }
+
+// This is done to register the method called with moment()
+// without creating circular dependencies.
+    function setHookCallback(callback) {
+        hookCallback = callback;
+    }
+
+    function isArray(input) {
+        return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
+    }
+
+    function isObject(input) {
+        // IE8 will treat undefined and null as object if it wasn't for
+        // input != null
+        return input != null && Object.prototype.toString.call(input) === '[object Object]';
+    }
+
+    function isObjectEmpty(obj) {
+        var k;
+        for (k in obj) {
+            // even if its not own property I'd still call it non-empty
+            return false;
+        }
+        return true;
+    }
+
+    function isUndefined(input) {
+        return input === void 0;
+    }
+
+    function isNumber(input) {
+        return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
+    }
+
+    function isDate(input) {
+        return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
+    }
+
+    function map(arr, fn) {
+        var res = [], i;
+        for (i = 0; i < arr.length; ++i) {
+            res.push(fn(arr[i], i));
+        }
+        return res;
+    }
+
+    function hasOwnProp(a, b) {
+        return Object.prototype.hasOwnProperty.call(a, b);
+    }
+
+    function extend(a, b) {
+        for (var i in b) {
+            if (hasOwnProp(b, i)) {
+                a[i] = b[i];
+            }
+        }
+
+        if (hasOwnProp(b, 'toString')) {
+            a.toString = b.toString;
+        }
+
+        if (hasOwnProp(b, 'valueOf')) {
+            a.valueOf = b.valueOf;
+        }
+
+        return a;
+    }
+
+    function createUTC(input, format, locale, strict) {
+        return createLocalOrUTC(input, format, locale, strict, true).utc();
+    }
+
+    function defaultParsingFlags() {
+        // We need to deep clone this object.
+        return {
+            empty: false,
+            unusedTokens: [],
+            unusedInput: [],
+            overflow: -2,
+            charsLeftOver: 0,
+            nullInput: false,
+            invalidMonth: null,
+            invalidFormat: false,
+            userInvalidated: false,
+            iso: false,
+            parsedDateParts: [],
+            meridiem: null,
+            rfc2822: false,
+            weekdayMismatch: false
+        };
+    }
+
+    function getParsingFlags(m) {
+        if (m._pf == null) {
+            m._pf = defaultParsingFlags();
+        }
+        return m._pf;
+    }
+
+    var some;
+    if (Array.prototype.some) {
+        some = Array.prototype.some;
+    } else {
+        some = function (fun) {
+            var t = Object(this);
+            var len = t.length >>> 0;
+
+            for (var i = 0; i < len; i++) {
+                if (i in t && fun.call(this, t[i], i, t)) {
+                    return true;
+                }
+            }
+
+            return false;
+        };
+    }
+
+    var some$1 = some;
+
+    function isValid(m) {
+        if (m._isValid == null) {
+            var flags = getParsingFlags(m);
+            var parsedParts = some$1.call(flags.parsedDateParts, function (i) {
+                return i != null;
+            });
+            var isNowValid = !isNaN(m._d.getTime()) &&
+                flags.overflow < 0 &&
+                !flags.empty &&
+                !flags.invalidMonth &&
+                !flags.invalidWeekday &&
+                !flags.nullInput &&
+                !flags.invalidFormat &&
+                !flags.userInvalidated &&
+                (!flags.meridiem || (flags.meridiem && parsedParts));
+
+            if (m._strict) {
+                isNowValid = isNowValid &&
+                    flags.charsLeftOver === 0 &&
+                    flags.unusedTokens.length === 0 &&
+                    flags.bigHour === undefined;
+            }
+
+            if (Object.isFrozen == null || !Object.isFrozen(m)) {
+                m._isValid = isNowValid;
+            }
+            else {
+                return isNowValid;
+            }
+        }
+        return m._isValid;
+    }
+
+    function createInvalid(flags) {
+        var m = createUTC(NaN);
+        if (flags != null) {
+            extend(getParsingFlags(m), flags);
+        }
+        else {
+            getParsingFlags(m).userInvalidated = true;
+        }
+
+        return m;
+    }
+
+// Plugins that add properties should also add the key here (null value),
+// so we can properly clone ourselves.
+    var momentProperties = hooks.momentProperties = [];
+
+    function copyConfig(to, from) {
+        var i, prop, val;
+
+        if (!isUndefined(from._isAMomentObject)) {
+            to._isAMomentObject = from._isAMomentObject;
+        }
+        if (!isUndefined(from._i)) {
+            to._i = from._i;
+        }
+        if (!isUndefined(from._f)) {
+            to._f = from._f;
+        }
+        if (!isUndefined(from._l)) {
+            to._l = from._l;
+        }
+        if (!isUndefined(from._strict)) {
+            to._strict = from._strict;
+        }
+        if (!isUndefined(from._tzm)) {
+            to._tzm = from._tzm;
+        }
+        if (!isUndefined(from._isUTC)) {
+            to._isUTC = from._isUTC;
+        }
+        if (!isUndefined(from._offset)) {
+            to._offset = from._offset;
+        }
+        if (!isUndefined(from._pf)) {
+            to._pf = getParsingFlags(from);
+        }
+        if (!isUndefined(from._locale)) {
+            to._locale = from._locale;
+        }
+
+        if (momentProperties.length > 0) {
+            for (i = 0; i < momentProperties.length; i++) {
+                prop = momentProperties[i];
+                val = from[prop];
+                if (!isUndefined(val)) {
+                    to[prop] = val;
+                }
+            }
+        }
+
+        return to;
+    }
+
+    var updateInProgress = false;
+
+// Moment prototype object
+    function Moment(config) {
+        copyConfig(this, config);
+        this._d = new Date(config._d != null ? config._d.getTime() : NaN);
+        if (!this.isValid()) {
+            this._d = new Date(NaN);
+        }
+        // Prevent infinite loop in case updateOffset creates new moment
+        // objects.
+        if (updateInProgress === false) {
+            updateInProgress = true;
+            hooks.updateOffset(this);
+            updateInProgress = false;
+        }
+    }
+
+    function isMoment(obj) {
+        return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
+    }
+
+    function absFloor(number) {
+        if (number < 0) {
+            // -0 -> 0
+            return Math.ceil(number) || 0;
+        } else {
+            return Math.floor(number);
+        }
+    }
+
+    function toInt(argumentForCoercion) {
+        var coercedNumber = +argumentForCoercion,
+            value = 0;
+
+        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+            value = absFloor(coercedNumber);
+        }
+
+        return value;
+    }
+
+// compare two arrays, return the number of differences
+    function compareArrays(array1, array2, dontConvert) {
+        var len = Math.min(array1.length, array2.length),
+            lengthDiff = Math.abs(array1.length - array2.length),
+            diffs = 0,
+            i;
+        for (i = 0; i < len; i++) {
+            if ((dontConvert && array1[i] !== array2[i]) ||
+                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
+                diffs++;
+            }
+        }
+        return diffs + lengthDiff;
+    }
+
+    function warn(msg) {
+        if (hooks.suppressDeprecationWarnings === false &&
+            (typeof console !== 'undefined') && console.warn) {
+            console.warn('Deprecation warning: ' + msg);
+        }
+    }
+
+    function deprecate(msg, fn) {
+        var firstTime = true;
+
+        return extend(function () {
+            if (hooks.deprecationHandler != null) {
+                hooks.deprecationHandler(null, msg);
+            }
+            if (firstTime) {
+                var args = [];
+                var arg;
+                for (var i = 0; i < arguments.length; i++) {
+                    arg = '';
+                    if (typeof arguments[i] === 'object') {
+                        arg += '\n[' + i + '] ';
+                        for (var key in arguments[0]) {
+                            arg += key + ': ' + arguments[0][key] + ', ';
+                        }
+                        arg = arg.slice(0, -2); // Remove trailing comma and space
+                    } else {
+                        arg = arguments[i];
+                    }
+                    args.push(arg);
+                }
+                warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
+                firstTime = false;
+            }
+            return fn.apply(this, arguments);
+        }, fn);
+    }
+
+    var deprecations = {};
+
+    function deprecateSimple(name, msg) {
+        if (hooks.deprecationHandler != null) {
+            hooks.deprecationHandler(name, msg);
+        }
+        if (!deprecations[name]) {
+            warn(msg);
+            deprecations[name] = true;
+        }
+    }
+
+    hooks.suppressDeprecationWarnings = false;
+    hooks.deprecationHandler = null;
+
+    function isFunction(input) {
+        return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
+    }
+
+    function set(config) {
+        var prop, i;
+        for (i in config) {
+            prop = config[i];
+            if (isFunction(prop)) {
+                this[i] = prop;
+            } else {
+                this['_' + i] = prop;
+            }
+        }
+        this._config = config;
+        // Lenient ordinal parsing accepts just a number in addition to
+        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
+        // TODO: Remove "ordinalParse" fallback in next major release.
+        this._dayOfMonthOrdinalParseLenient = new RegExp(
+            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
+            '|' + (/\d{1,2}/).source);
+    }
+
+    function mergeConfigs(parentConfig, childConfig) {
+        var res = extend({}, parentConfig), prop;
+        for (prop in childConfig) {
+            if (hasOwnProp(childConfig, prop)) {
+                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
+                    res[prop] = {};
+                    extend(res[prop], parentConfig[prop]);
+                    extend(res[prop], childConfig[prop]);
+                } else if (childConfig[prop] != null) {
+                    res[prop] = childConfig[prop];
+                } else {
+                    delete res[prop];
+                }
+            }
+        }
+        for (prop in parentConfig) {
+            if (hasOwnProp(parentConfig, prop) &&
+                !hasOwnProp(childConfig, prop) &&
+                isObject(parentConfig[prop])) {
+                // make sure changes to properties don't modify parent config
+                res[prop] = extend({}, res[prop]);
+            }
+        }
+        return res;
+    }
+
+    function Locale(config) {
+        if (config != null) {
+            this.set(config);
+        }
+    }
+
+    var keys;
+
+    if (Object.keys) {
+        keys = Object.keys;
+    } else {
+        keys = function (obj) {
+            var i, res = [];
+            for (i in obj) {
+                if (hasOwnProp(obj, i)) {
+                    res.push(i);
+                }
+            }
+            return res;
+        };
+    }
+
+    var keys$1 = keys;
+
+    var defaultCalendar = {
+        sameDay: '[Today at] LT',
+        nextDay: '[Tomorrow at] LT',
+        nextWeek: 'dddd [at] LT',
+        lastDay: '[Yesterday at] LT',
+        lastWeek: '[Last] dddd [at] LT',
+        sameElse: 'L'
+    };
+
+    function calendar(key, mom, now) {
+        var output = this._calendar[key] || this._calendar['sameElse'];
+        return isFunction(output) ? output.call(mom, now) : output;
+    }
+
+    var defaultLongDateFormat = {
+        LTS: 'h:mm:ss A',
+        LT: 'h:mm A',
+        L: 'MM/DD/YYYY',
+        LL: 'MMMM D, YYYY',
+        LLL: 'MMMM D, YYYY h:mm A',
+        LLLL: 'dddd, MMMM D, YYYY h:mm A'
+    };
+
+    function longDateFormat(key) {
+        var format = this._longDateFormat[key],
+            formatUpper = this._longDateFormat[key.toUpperCase()];
+
+        if (format || !formatUpper) {
+            return format;
+        }
+
+        this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
+            return val.slice(1);
+        });
+
+        return this._longDateFormat[key];
+    }
+
+    var defaultInvalidDate = 'Invalid date';
+
+    function invalidDate() {
+        return this._invalidDate;
+    }
+
+    var defaultOrdinal = '%d';
+    var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
+
+    function ordinal(number) {
+        return this._ordinal.replace('%d', number);
+    }
+
+    var defaultRelativeTime = {
+        future: 'in %s',
+        past: '%s ago',
+        s: 'a few seconds',
+        ss: '%d seconds',
+        m: 'a minute',
+        mm: '%d minutes',
+        h: 'an hour',
+        hh: '%d hours',
+        d: 'a day',
+        dd: '%d days',
+        M: 'a month',
+        MM: '%d months',
+        y: 'a year',
+        yy: '%d years'
+    };
+
+    function relativeTime(number, withoutSuffix, string, isFuture) {
+        var output = this._relativeTime[string];
+        return (isFunction(output)) ?
+            output(number, withoutSuffix, string, isFuture) :
+            output.replace(/%d/i, number);
+    }
+
+    function pastFuture(diff, output) {
+        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+        return isFunction(format) ? format(output) : format.replace(/%s/i, output);
+    }
+
+    var aliases = {};
+
+    function addUnitAlias(unit, shorthand) {
+        var lowerCase = unit.toLowerCase();
+        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
+    }
+
+    function normalizeUnits(units) {
+        return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
+    }
+
+    function normalizeObjectUnits(inputObject) {
+        var normalizedInput = {},
+            normalizedProp,
+            prop;
+
+        for (prop in inputObject) {
+            if (hasOwnProp(inputObject, prop)) {
+                normalizedProp = normalizeUnits(prop);
+                if (normalizedProp) {
+                    normalizedInput[normalizedProp] = inputObject[prop];
+                }
+            }
+        }
+
+        return normalizedInput;
+    }
+
+    var priorities = {};
+
+    function addUnitPriority(unit, priority) {
+        priorities[unit] = priority;
+    }
+
+    function getPrioritizedUnits(unitsObj) {
+        var units = [];
+        for (var u in unitsObj) {
+            units.push({unit: u, priority: priorities[u]});
+        }
+        units.sort(function (a, b) {
+            return a.priority - b.priority;
+        });
+        return units;
+    }
+
+    function makeGetSet(unit, keepTime) {
+        return function (value) {
+            if (value != null) {
+                set$1(this, unit, value);
+                hooks.updateOffset(this, keepTime);
+                return this;
+            } else {
+                return get(this, unit);
+            }
+        };
+    }
+
+    function get(mom, unit) {
+        return mom.isValid() ?
+            mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
+    }
+
+    function set$1(mom, unit, value) {
+        if (mom.isValid()) {
+            mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+        }
+    }
+
+// MOMENTS
+
+    function stringGet(units) {
+        units = normalizeUnits(units);
+        if (isFunction(this[units])) {
+            return this[units]();
+        }
+        return this;
+    }
+
+
+    function stringSet(units, value) {
+        if (typeof units === 'object') {
+            units = normalizeObjectUnits(units);
+            var prioritized = getPrioritizedUnits(units);
+            for (var i = 0; i < prioritized.length; i++) {
+                this[prioritized[i].unit](units[prioritized[i].unit]);
+            }
+        } else {
+            units = normalizeUnits(units);
+            if (isFunction(this[units])) {
+                return this[units](value);
+            }
+        }
+        return this;
+    }
+
+    function zeroFill(number, targetLength, forceSign) {
+        var absNumber = '' + Math.abs(number),
+            zerosToFill = targetLength - absNumber.length,
+            sign = number >= 0;
+        return (sign ? (forceSign ? '+' : '') : '-') +
+            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
+    }
+
+    var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
+
+    var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
+
+    var formatFunctions = {};
+
+    var formatTokenFunctions = {};
+
+// token:    'M'
+// padded:   ['MM', 2]
+// ordinal:  'Mo'
+// callback: function () { this.month() + 1 }
+    function addFormatToken(token, padded, ordinal, callback) {
+        var func = callback;
+        if (typeof callback === 'string') {
+            func = function () {
+                return this[callback]();
+            };
+        }
+        if (token) {
+            formatTokenFunctions[token] = func;
+        }
+        if (padded) {
+            formatTokenFunctions[padded[0]] = function () {
+                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
+            };
+        }
+        if (ordinal) {
+            formatTokenFunctions[ordinal] = function () {
+                return this.localeData().ordinal(func.apply(this, arguments), token);
+            };
+        }
+    }
+
+    function removeFormattingTokens(input) {
+        if (input.match(/\[[\s\S]/)) {
+            return input.replace(/^\[|\]$/g, '');
+        }
+        return input.replace(/\\/g, '');
+    }
+
+    function makeFormatFunction(format) {
+        var array = format.match(formattingTokens), i, length;
+
+        for (i = 0, length = array.length; i < length; i++) {
+            if (formatTokenFunctions[array[i]]) {
+                array[i] = formatTokenFunctions[array[i]];
+            } else {
+                array[i] = removeFormattingTokens(array[i]);
+            }
+        }
+
+        return function (mom) {
+            var output = '', i;
+            for (i = 0; i < length; i++) {
+                output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
+            }
+            return output;
+        };
+    }
+
+// format date using native date object
+    function formatMoment(m, format) {
+        if (!m.isValid()) {
+            return m.localeData().invalidDate();
+        }
+
+        format = expandFormat(format, m.localeData());
+        formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
+
+        return formatFunctions[format](m);
+    }
+
+    function expandFormat(format, locale) {
+        var i = 5;
+
+        function replaceLongDateFormatTokens(input) {
+            return locale.longDateFormat(input) || input;
+        }
+
+        localFormattingTokens.lastIndex = 0;
+        while (i >= 0 && localFormattingTokens.test(format)) {
+            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
+            localFormattingTokens.lastIndex = 0;
+            i -= 1;
+        }
+
+        return format;
+    }
+
+    var match1 = /\d/;            //       0 - 9
+    var match2 = /\d\d/;          //      00 - 99
+    var match3 = /\d{3}/;         //     000 - 999
+    var match4 = /\d{4}/;         //    0000 - 9999
+    var match6 = /[+-]?\d{6}/;    // -999999 - 999999
+    var match1to2 = /\d\d?/;         //       0 - 99
+    var match3to4 = /\d\d\d\d?/;     //     999 - 9999
+    var match5to6 = /\d\d\d\d\d\d?/; //   99999 - 999999
+    var match1to3 = /\d{1,3}/;       //       0 - 999
+    var match1to4 = /\d{1,4}/;       //       0 - 9999
+    var match1to6 = /[+-]?\d{1,6}/;  // -999999 - 999999
+
+    var matchUnsigned = /\d+/;           //       0 - inf
+    var matchSigned = /[+-]?\d+/;      //    -inf - inf
+
+    var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
+    var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
+
+    var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
+
+// any word (or two) characters or numbers including two/three word month in arabic.
+// includes scottish gaelic two word and hyphenated months
+    var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
+
+
+    var regexes = {};
+
+    function addRegexToken(token, regex, strictRegex) {
+        regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
+            return (isStrict && strictRegex) ? strictRegex : regex;
+        };
+    }
+
+    function getParseRegexForToken(token, config) {
+        if (!hasOwnProp(regexes, token)) {
+            return new RegExp(unescapeFormat(token));
+        }
+
+        return regexes[token](config._strict, config._locale);
+    }
+
+// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+    function unescapeFormat(s) {
+        return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
+            return p1 || p2 || p3 || p4;
+        }));
+    }
+
+    function regexEscape(s) {
+        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+    }
+
+    var tokens = {};
+
+    function addParseToken(token, callback) {
+        var i, func = callback;
+        if (typeof token === 'string') {
+            token = [token];
+        }
+        if (isNumber(callback)) {
+            func = function (input, array) {
+                array[callback] = toInt(input);
+            };
+        }
+        for (i = 0; i < token.length; i++) {
+            tokens[token[i]] = func;
+        }
+    }
+
+    function addWeekParseToken(token, callback) {
+        addParseToken(token, function (input, array, config, token) {
+            config._w = config._w || {};
+            callback(input, config._w, config, token);
+        });
+    }
+
+    function addTimeToArrayFromToken(token, input, config) {
+        if (input != null && hasOwnProp(tokens, token)) {
+            tokens[token](input, config._a, config, token);
+        }
+    }
+
+    var YEAR = 0;
+    var MONTH = 1;
+    var DATE = 2;
+    var HOUR = 3;
+    var MINUTE = 4;
+    var SECOND = 5;
+    var MILLISECOND = 6;
+    var WEEK = 7;
+    var WEEKDAY = 8;
+
+    var indexOf;
+
+    if (Array.prototype.indexOf) {
+        indexOf = Array.prototype.indexOf;
+    } else {
+        indexOf = function (o) {
+            // I know
+            var i;
+            for (i = 0; i < this.length; ++i) {
+                if (this[i] === o) {
+                    return i;
+                }
+            }
+            return -1;
+        };
+    }
+
+    var indexOf$1 = indexOf;
+
+    function daysInMonth(year, month) {
+        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
+    }
+
+// FORMATTING
+
+    addFormatToken('M', ['MM', 2], 'Mo', function () {
+        return this.month() + 1;
+    });
+
+    addFormatToken('MMM', 0, 0, function (format) {
+        return this.localeData().monthsShort(this, format);
+    });
+
+    addFormatToken('MMMM', 0, 0, function (format) {
+        return this.localeData().months(this, format);
+    });
+
+// ALIASES
+
+    addUnitAlias('month', 'M');
+
+// PRIORITY
+
+    addUnitPriority('month', 8);
+
+// PARSING
+
+    addRegexToken('M', match1to2);
+    addRegexToken('MM', match1to2, match2);
+    addRegexToken('MMM', function (isStrict, locale) {
+        return locale.monthsShortRegex(isStrict);
+    });
+    addRegexToken('MMMM', function (isStrict, locale) {
+        return locale.monthsRegex(isStrict);
+    });
+
+    addParseToken(['M', 'MM'], function (input, array) {
+        array[MONTH] = toInt(input) - 1;
+    });
+
+    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
+        var month = config._locale.monthsParse(input, token, config._strict);
+        // if we didn't find a month name, mark the date as invalid.
+        if (month != null) {
+            array[MONTH] = month;
+        } else {
+            getParsingFlags(config).invalidMonth = input;
+        }
+    });
+
+// LOCALES
+
+    var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
+    var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
+
+    function localeMonths(m, format) {
+        if (!m) {
+            return isArray(this._months) ? this._months :
+                this._months['standalone'];
+        }
+        return isArray(this._months) ? this._months[m.month()] :
+            this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
+    }
+
+    var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
+
+    function localeMonthsShort(m, format) {
+        if (!m) {
+            return isArray(this._monthsShort) ? this._monthsShort :
+                this._monthsShort['standalone'];
+        }
+        return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
+            this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
+    }
+
+    function handleStrictParse(monthName, format, strict) {
+        var i, ii, mom, llc = monthName.toLocaleLowerCase();
+        if (!this._monthsParse) {
+            // this is not used
+            this._monthsParse = [];
+            this._longMonthsParse = [];
+            this._shortMonthsParse = [];
+            for (i = 0; i < 12; ++i) {
+                mom = createUTC([2000, i]);
+                this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
+                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
+            }
+        }
+
+        if (strict) {
+            if (format === 'MMM') {
+                ii = indexOf$1.call(this._shortMonthsParse, llc);
+                return ii !== -1 ? ii : null;
+            } else {
+                ii = indexOf$1.call(this._longMonthsParse, llc);
+                return ii !== -1 ? ii : null;
+            }
+        } else {
+            if (format === 'MMM') {
+                ii = indexOf$1.call(this._shortMonthsParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf$1.call(this._longMonthsParse, llc);
+                return ii !== -1 ? ii : null;
+            } else {
+                ii = indexOf$1.call(this._longMonthsParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf$1.call(this._shortMonthsParse, llc);
+                return ii !== -1 ? ii : null;
+            }
+        }
+    }
+
+    function localeMonthsParse(monthName, format, strict) {
+        var i, mom, regex;
+
+        if (this._monthsParseExact) {
+            return handleStrictParse.call(this, monthName, format, strict);
+        }
+
+        if (!this._monthsParse) {
+            this._monthsParse = [];
+            this._longMonthsParse = [];
+            this._shortMonthsParse = [];
+        }
+
+        // TODO: add sorting
+        // Sorting makes sure if one month (or abbr) is a prefix of another
+        // see sorting in computeMonthsParse
+        for (i = 0; i < 12; i++) {
+            // make the regex if we don't have it already
+            mom = createUTC([2000, i]);
+            if (strict && !this._longMonthsParse[i]) {
+                this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
+                this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
+            }
+            if (!strict && !this._monthsParse[i]) {
+                regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+            }
+            // test the regex
+            if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
+                return i;
+            } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
+                return i;
+            } else if (!strict && this._monthsParse[i].test(monthName)) {
+                return i;
+            }
+        }
+    }
+
+// MOMENTS
+
+    function setMonth(mom, value) {
+        var dayOfMonth;
+
+        if (!mom.isValid()) {
+            // No op
+            return mom;
+        }
+
+        if (typeof value === 'string') {
+            if (/^\d+$/.test(value)) {
+                value = toInt(value);
+            } else {
+                value = mom.localeData().monthsParse(value);
+                // TODO: Another silent failure?
+                if (!isNumber(value)) {
+                    return mom;
+                }
+            }
+        }
+
+        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
+        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+        return mom;
+    }
+
+    function getSetMonth(value) {
+        if (value != null) {
+            setMonth(this, value);
+            hooks.updateOffset(this, true);
+            return this;
+        } else {
+            return get(this, 'Month');
+        }
+    }
+
+    function getDaysInMonth() {
+        return daysInMonth(this.year(), this.month());
+    }
+
+    var defaultMonthsShortRegex = matchWord;
+
+    function monthsShortRegex(isStrict) {
+        if (this._monthsParseExact) {
+            if (!hasOwnProp(this, '_monthsRegex')) {
+                computeMonthsParse.call(this);
+            }
+            if (isStrict) {
+                return this._monthsShortStrictRegex;
+            } else {
+                return this._monthsShortRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_monthsShortRegex')) {
+                this._monthsShortRegex = defaultMonthsShortRegex;
+            }
+            return this._monthsShortStrictRegex && isStrict ?
+                this._monthsShortStrictRegex : this._monthsShortRegex;
+        }
+    }
+
+    var defaultMonthsRegex = matchWord;
+
+    function monthsRegex(isStrict) {
+        if (this._monthsParseExact) {
+            if (!hasOwnProp(this, '_monthsRegex')) {
+                computeMonthsParse.call(this);
+            }
+            if (isStrict) {
+                return this._monthsStrictRegex;
+            } else {
+                return this._monthsRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_monthsRegex')) {
+                this._monthsRegex = defaultMonthsRegex;
+            }
+            return this._monthsStrictRegex && isStrict ?
+                this._monthsStrictRegex : this._monthsRegex;
+        }
+    }
+
+    function computeMonthsParse() {
+        function cmpLenRev(a, b) {
+            return b.length - a.length;
+        }
+
+        var shortPieces = [], longPieces = [], mixedPieces = [],
+            i, mom;
+        for (i = 0; i < 12; i++) {
+            // make the regex if we don't have it already
+            mom = createUTC([2000, i]);
+            shortPieces.push(this.monthsShort(mom, ''));
+            longPieces.push(this.months(mom, ''));
+            mixedPieces.push(this.months(mom, ''));
+            mixedPieces.push(this.monthsShort(mom, ''));
+        }
+        // Sorting makes sure if one month (or abbr) is a prefix of another it
+        // will match the longer piece.
+        shortPieces.sort(cmpLenRev);
+        longPieces.sort(cmpLenRev);
+        mixedPieces.sort(cmpLenRev);
+        for (i = 0; i < 12; i++) {
+            shortPieces[i] = regexEscape(shortPieces[i]);
+            longPieces[i] = regexEscape(longPieces[i]);
+        }
+        for (i = 0; i < 24; i++) {
+            mixedPieces[i] = regexEscape(mixedPieces[i]);
+        }
+
+        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+        this._monthsShortRegex = this._monthsRegex;
+        this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
+        this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
+    }
+
+// FORMATTING
+
+    addFormatToken('Y', 0, 0, function () {
+        var y = this.year();
+        return y <= 9999 ? '' + y : '+' + y;
+    });
+
+    addFormatToken(0, ['YY', 2], 0, function () {
+        return this.year() % 100;
+    });
+
+    addFormatToken(0, ['YYYY', 4], 0, 'year');
+    addFormatToken(0, ['YYYYY', 5], 0, 'year');
+    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
+
+// ALIASES
+
+    addUnitAlias('year', 'y');
+
+// PRIORITIES
+
+    addUnitPriority('year', 1);
+
+// PARSING
+
+    addRegexToken('Y', matchSigned);
+    addRegexToken('YY', match1to2, match2);
+    addRegexToken('YYYY', match1to4, match4);
+    addRegexToken('YYYYY', match1to6, match6);
+    addRegexToken('YYYYYY', match1to6, match6);
+
+    addParseToken(['YYYYY', 'YYYYYY'], YEAR);
+    addParseToken('YYYY', function (input, array) {
+        array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
+    });
+    addParseToken('YY', function (input, array) {
+        array[YEAR] = hooks.parseTwoDigitYear(input);
+    });
+    addParseToken('Y', function (input, array) {
+        array[YEAR] = parseInt(input, 10);
+    });
+
+// HELPERS
+
+    function daysInYear(year) {
+        return isLeapYear(year) ? 366 : 365;
+    }
+
+    function isLeapYear(year) {
+        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+    }
+
+// HOOKS
+
+    hooks.parseTwoDigitYear = function (input) {
+        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+    };
+
+// MOMENTS
+
+    var getSetYear = makeGetSet('FullYear', true);
+
+    function getIsLeapYear() {
+        return isLeapYear(this.year());
+    }
+
+    function createDate(y, m, d, h, M, s, ms) {
+        // can't just apply() to create a date:
+        // https://stackoverflow.com/q/181348
+        var date = new Date(y, m, d, h, M, s, ms);
+
+        // the date constructor remaps years 0-99 to 1900-1999
+        if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
+            date.setFullYear(y);
+        }
+        return date;
+    }
+
+    function createUTCDate(y) {
+        var date = new Date(Date.UTC.apply(null, arguments));
+
+        // the Date.UTC function remaps years 0-99 to 1900-1999
+        if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
+            date.setUTCFullYear(y);
+        }
+        return date;
+    }
+
+// start-of-first-week - start-of-year
+    function firstWeekOffset(year, dow, doy) {
+        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
+            fwd = 7 + dow - doy,
+            // first-week day local weekday -- which local weekday is fwd
+            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
+
+        return -fwdlw + fwd - 1;
+    }
+
+// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
+        var localWeekday = (7 + weekday - dow) % 7,
+            weekOffset = firstWeekOffset(year, dow, doy),
+            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
+            resYear, resDayOfYear;
+
+        if (dayOfYear <= 0) {
+            resYear = year - 1;
+            resDayOfYear = daysInYear(resYear) + dayOfYear;
+        } else if (dayOfYear > daysInYear(year)) {
+            resYear = year + 1;
+            resDayOfYear = dayOfYear - daysInYear(year);
+        } else {
+            resYear = year;
+            resDayOfYear = dayOfYear;
+        }
+
+        return {
+            year: resYear,
+            dayOfYear: resDayOfYear
+        };
+    }
+
+    function weekOfYear(mom, dow, doy) {
+        var weekOffset = firstWeekOffset(mom.year(), dow, doy),
+            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
+            resWeek, resYear;
+
+        if (week < 1) {
+            resYear = mom.year() - 1;
+            resWeek = week + weeksInYear(resYear, dow, doy);
+        } else if (week > weeksInYear(mom.year(), dow, doy)) {
+            resWeek = week - weeksInYear(mom.year(), dow, doy);
+            resYear = mom.year() + 1;
+        } else {
+            resYear = mom.year();
+            resWeek = week;
+        }
+
+        return {
+            week: resWeek,
+            year: resYear
+        };
+    }
+
+    function weeksInYear(year, dow, doy) {
+        var weekOffset = firstWeekOffset(year, dow, doy),
+            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
+        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
+    }
+
+// FORMATTING
+
+    addFormatToken('w', ['ww', 2], 'wo', 'week');
+    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
+
+// ALIASES
+
+    addUnitAlias('week', 'w');
+    addUnitAlias('isoWeek', 'W');
+
+// PRIORITIES
+
+    addUnitPriority('week', 5);
+    addUnitPriority('isoWeek', 5);
+
+// PARSING
+
+    addRegexToken('w', match1to2);
+    addRegexToken('ww', match1to2, match2);
+    addRegexToken('W', match1to2);
+    addRegexToken('WW', match1to2, match2);
+
+    addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
+        week[token.substr(0, 1)] = toInt(input);
+    });
+
+// HELPERS
+
+// LOCALES
+
+    function localeWeek(mom) {
+        return weekOfYear(mom, this._week.dow, this._week.doy).week;
+    }
+
+    var defaultLocaleWeek = {
+        dow: 0, // Sunday is the first day of the week.
+        doy: 6  // The week that contains Jan 1st is the first week of the year.
+    };
+
+    function localeFirstDayOfWeek() {
+        return this._week.dow;
+    }
+
+    function localeFirstDayOfYear() {
+        return this._week.doy;
+    }
+
+// MOMENTS
+
+    function getSetWeek(input) {
+        var week = this.localeData().week(this);
+        return input == null ? week : this.add((input - week) * 7, 'd');
+    }
+
+    function getSetISOWeek(input) {
+        var week = weekOfYear(this, 1, 4).week;
+        return input == null ? week : this.add((input - week) * 7, 'd');
+    }
+
+// FORMATTING
+
+    addFormatToken('d', 0, 'do', 'day');
+
+    addFormatToken('dd', 0, 0, function (format) {
+        return this.localeData().weekdaysMin(this, format);
+    });
+
+    addFormatToken('ddd', 0, 0, function (format) {
+        return this.localeData().weekdaysShort(this, format);
+    });
+
+    addFormatToken('dddd', 0, 0, function (format) {
+        return this.localeData().weekdays(this, format);
+    });
+
+    addFormatToken('e', 0, 0, 'weekday');
+    addFormatToken('E', 0, 0, 'isoWeekday');
+
+// ALIASES
+
+    addUnitAlias('day', 'd');
+    addUnitAlias('weekday', 'e');
+    addUnitAlias('isoWeekday', 'E');
+
+// PRIORITY
+    addUnitPriority('day', 11);
+    addUnitPriority('weekday', 11);
+    addUnitPriority('isoWeekday', 11);
+
+// PARSING
+
+    addRegexToken('d', match1to2);
+    addRegexToken('e', match1to2);
+    addRegexToken('E', match1to2);
+    addRegexToken('dd', function (isStrict, locale) {
+        return locale.weekdaysMinRegex(isStrict);
+    });
+    addRegexToken('ddd', function (isStrict, locale) {
+        return locale.weekdaysShortRegex(isStrict);
+    });
+    addRegexToken('dddd', function (isStrict, locale) {
+        return locale.weekdaysRegex(isStrict);
+    });
+
+    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
+        var weekday = config._locale.weekdaysParse(input, token, config._strict);
+        // if we didn't get a weekday name, mark the date as invalid
+        if (weekday != null) {
+            week.d = weekday;
+        } else {
+            getParsingFlags(config).invalidWeekday = input;
+        }
+    });
+
+    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
+        week[token] = toInt(input);
+    });
+
+// HELPERS
+
+    function parseWeekday(input, locale) {
+        if (typeof input !== 'string') {
+            return input;
+        }
+
+        if (!isNaN(input)) {
+            return parseInt(input, 10);
+        }
+
+        input = locale.weekdaysParse(input);
+        if (typeof input === 'number') {
+            return input;
+        }
+
+        return null;
+    }
+
+    function parseIsoWeekday(input, locale) {
+        if (typeof input === 'string') {
+            return locale.weekdaysParse(input) % 7 || 7;
+        }
+        return isNaN(input) ? null : input;
+    }
+
+// LOCALES
+
+    var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
+
+    function localeWeekdays(m, format) {
+        if (!m) {
+            return isArray(this._weekdays) ? this._weekdays :
+                this._weekdays['standalone'];
+        }
+        return isArray(this._weekdays) ? this._weekdays[m.day()] :
+            this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
+    }
+
+    var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
+
+    function localeWeekdaysShort(m) {
+        return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
+    }
+
+    var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
+
+    function localeWeekdaysMin(m) {
+        return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
+    }
+
+    function handleStrictParse$1(weekdayName, format, strict) {
+        var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
+        if (!this._weekdaysParse) {
+            this._weekdaysParse = [];
+            this._shortWeekdaysParse = [];
+            this._minWeekdaysParse = [];
+
+            for (i = 0; i < 7; ++i) {
+                mom = createUTC([2000, 1]).day(i);
+                this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
+                this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
+                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
+            }
+        }
+
+        if (strict) {
+            if (format === 'dddd') {
+                ii = indexOf$1.call(this._weekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            } else if (format === 'ddd') {
+                ii = indexOf$1.call(this._shortWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            } else {
+                ii = indexOf$1.call(this._minWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            }
+        } else {
+            if (format === 'dddd') {
+                ii = indexOf$1.call(this._weekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf$1.call(this._shortWeekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf$1.call(this._minWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            } else if (format === 'ddd') {
+                ii = indexOf$1.call(this._shortWeekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf$1.call(this._weekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf$1.call(this._minWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            } else {
+                ii = indexOf$1.call(this._minWeekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf$1.call(this._weekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf$1.call(this._shortWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            }
+        }
+    }
+
+    function localeWeekdaysParse(weekdayName, format, strict) {
+        var i, mom, regex;
+
+        if (this._weekdaysParseExact) {
+            return handleStrictParse$1.call(this, weekdayName, format, strict);
+        }
+
+        if (!this._weekdaysParse) {
+            this._weekdaysParse = [];
+            this._minWeekdaysParse = [];
+            this._shortWeekdaysParse = [];
+            this._fullWeekdaysParse = [];
+        }
+
+        for (i = 0; i < 7; i++) {
+            // make the regex if we don't have it already
+
+            mom = createUTC([2000, 1]).day(i);
+            if (strict && !this._fullWeekdaysParse[i]) {
+                this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
+                this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
+                this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
+            }
+            if (!this._weekdaysParse[i]) {
+                regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
+                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+            }
+            // test the regex
+            if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
+                return i;
+            } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
+                return i;
+            } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
+                return i;
+            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
+                return i;
+            }
+        }
+    }
+
+// MOMENTS
+
+    function getSetDayOfWeek(input) {
+        if (!this.isValid()) {
+            return input != null ? this : NaN;
+        }
+        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+        if (input != null) {
+            input = parseWeekday(input, this.localeData());
+            return this.add(input - day, 'd');
+        } else {
+            return day;
+        }
+    }
+
+    function getSetLocaleDayOfWeek(input) {
+        if (!this.isValid()) {
+            return input != null ? this : NaN;
+        }
+        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
+        return input == null ? weekday : this.add(input - weekday, 'd');
+    }
+
+    function getSetISODayOfWeek(input) {
+        if (!this.isValid()) {
+            return input != null ? this : NaN;
+        }
+
+        // behaves the same as moment#day except
+        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+        // as a setter, sunday should belong to the previous week.
+
+        if (input != null) {
+            var weekday = parseIsoWeekday(input, this.localeData());
+            return this.day(this.day() % 7 ? weekday : weekday - 7);
+        } else {
+            return this.day() || 7;
+        }
+    }
+
+    var defaultWeekdaysRegex = matchWord;
+
+    function weekdaysRegex(isStrict) {
+        if (this._weekdaysParseExact) {
+            if (!hasOwnProp(this, '_weekdaysRegex')) {
+                computeWeekdaysParse.call(this);
+            }
+            if (isStrict) {
+                return this._weekdaysStrictRegex;
+            } else {
+                return this._weekdaysRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_weekdaysRegex')) {
+                this._weekdaysRegex = defaultWeekdaysRegex;
+            }
+            return this._weekdaysStrictRegex && isStrict ?
+                this._weekdaysStrictRegex : this._weekdaysRegex;
+        }
+    }
+
+    var defaultWeekdaysShortRegex = matchWord;
+
+    function weekdaysShortRegex(isStrict) {
+        if (this._weekdaysParseExact) {
+            if (!hasOwnProp(this, '_weekdaysRegex')) {
+                computeWeekdaysParse.call(this);
+            }
+            if (isStrict) {
+                return this._weekdaysShortStrictRegex;
+            } else {
+                return this._weekdaysShortRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_weekdaysShortRegex')) {
+                this._weekdaysShortRegex = defaultWeekdaysShortRegex;
+            }
+            return this._weekdaysShortStrictRegex && isStrict ?
+                this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
+        }
+    }
+
+    var defaultWeekdaysMinRegex = matchWord;
+
+    function weekdaysMinRegex(isStrict) {
+        if (this._weekdaysParseExact) {
+            if (!hasOwnProp(this, '_weekdaysRegex')) {
+                computeWeekdaysParse.call(this);
+            }
+            if (isStrict) {
+                return this._weekdaysMinStrictRegex;
+            } else {
+                return this._weekdaysMinRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_weekdaysMinRegex')) {
+                this._weekdaysMinRegex = defaultWeekdaysMinRegex;
+            }
+            return this._weekdaysMinStrictRegex && isStrict ?
+                this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
+        }
+    }
+
+
+    function computeWeekdaysParse() {
+        function cmpLenRev(a, b) {
+            return b.length - a.length;
+        }
+
+        var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
+            i, mom, minp, shortp, longp;
+        for (i = 0; i < 7; i++) {
+            // make the regex if we don't have it already
+            mom = createUTC([2000, 1]).day(i);
+            minp = this.weekdaysMin(mom, '');
+            shortp = this.weekdaysShort(mom, '');
+            longp = this.weekdays(mom, '');
+            minPieces.push(minp);
+            shortPieces.push(shortp);
+            longPieces.push(longp);
+            mixedPieces.push(minp);
+            mixedPieces.push(shortp);
+            mixedPieces.push(longp);
+        }
+        // Sorting makes sure if one weekday (or abbr) is a prefix of another it
+        // will match the longer piece.
+        minPieces.sort(cmpLenRev);
+        shortPieces.sort(cmpLenRev);
+        longPieces.sort(cmpLenRev);
+        mixedPieces.sort(cmpLenRev);
+        for (i = 0; i < 7; i++) {
+            shortPieces[i] = regexEscape(shortPieces[i]);
+            longPieces[i] = regexEscape(longPieces[i]);
+            mixedPieces[i] = regexEscape(mixedPieces[i]);
+        }
+
+        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+        this._weekdaysShortRegex = this._weekdaysRegex;
+        this._weekdaysMinRegex = this._weekdaysRegex;
+
+        this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
+        this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
+        this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
+    }
+
+// FORMATTING
+
+    function hFormat() {
+        return this.hours() % 12 || 12;
+    }
+
+    function kFormat() {
+        return this.hours() || 24;
+    }
+
+    addFormatToken('H', ['HH', 2], 0, 'hour');
+    addFormatToken('h', ['hh', 2], 0, hFormat);
+    addFormatToken('k', ['kk', 2], 0, kFormat);
+
+    addFormatToken('hmm', 0, 0, function () {
+        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
+    });
+
+    addFormatToken('hmmss', 0, 0, function () {
+        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
+            zeroFill(this.seconds(), 2);
+    });
+
+    addFormatToken('Hmm', 0, 0, function () {
+        return '' + this.hours() + zeroFill(this.minutes(), 2);
+    });
+
+    addFormatToken('Hmmss', 0, 0, function () {
+        return '' + this.hours() + zeroFill(this.minutes(), 2) +
+            zeroFill(this.seconds(), 2);
+    });
+
+    function meridiem(token, lowercase) {
+        addFormatToken(token, 0, 0, function () {
+            return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
+        });
+    }
+
+    meridiem('a', true);
+    meridiem('A', false);
+
+// ALIASES
+
+    addUnitAlias('hour', 'h');
+
+// PRIORITY
+    addUnitPriority('hour', 13);
+
+// PARSING
+
+    function matchMeridiem(isStrict, locale) {
+        return locale._meridiemParse;
+    }
+
+    addRegexToken('a', matchMeridiem);
+    addRegexToken('A', matchMeridiem);
+    addRegexToken('H', match1to2);
+    addRegexToken('h', match1to2);
+    addRegexToken('k', match1to2);
+    addRegexToken('HH', match1to2, match2);
+    addRegexToken('hh', match1to2, match2);
+    addRegexToken('kk', match1to2, match2);
+
+    addRegexToken('hmm', match3to4);
+    addRegexToken('hmmss', match5to6);
+    addRegexToken('Hmm', match3to4);
+    addRegexToken('Hmmss', match5to6);
+
+    addParseToken(['H', 'HH'], HOUR);
+    addParseToken(['k', 'kk'], function (input, array, config) {
+        var kInput = toInt(input);
+        array[HOUR] = kInput === 24 ? 0 : kInput;
+    });
+    addParseToken(['a', 'A'], function (input, array, config) {
+        config._isPm = config._locale.isPM(input);
+        config._meridiem = input;
+    });
+    addParseToken(['h', 'hh'], function (input, array, config) {
+        array[HOUR] = toInt(input);
+        getParsingFlags(config).bigHour = true;
+    });
+    addParseToken('hmm', function (input, array, config) {
+        var pos = input.length - 2;
+        array[HOUR] = toInt(input.substr(0, pos));
+        array[MINUTE] = toInt(input.substr(pos));
+        getParsingFlags(config).bigHour = true;
+    });
+    addParseToken('hmmss', function (input, array, config) {
+        var pos1 = input.length - 4;
+        var pos2 = input.length - 2;
+        array[HOUR] = toInt(input.substr(0, pos1));
+        array[MINUTE] = toInt(input.substr(pos1, 2));
+        array[SECOND] = toInt(input.substr(pos2));
+        getParsingFlags(config).bigHour = true;
+    });
+    addParseToken('Hmm', function (input, array, config) {
+        var pos = input.length - 2;
+        array[HOUR] = toInt(input.substr(0, pos));
+        array[MINUTE] = toInt(input.substr(pos));
+    });
+    addParseToken('Hmmss', function (input, array, config) {
+        var pos1 = input.length - 4;
+        var pos2 = input.length - 2;
+        array[HOUR] = toInt(input.substr(0, pos1));
+        array[MINUTE] = toInt(input.substr(pos1, 2));
+        array[SECOND] = toInt(input.substr(pos2));
+    });
+
+// LOCALES
+
+    function localeIsPM(input) {
+        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+        // Using charAt should be more compatible.
+        return ((input + '').toLowerCase().charAt(0) === 'p');
+    }
+
+    var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
+
+    function localeMeridiem(hours, minutes, isLower) {
+        if (hours > 11) {
+            return isLower ? 'pm' : 'PM';
+        } else {
+            return isLower ? 'am' : 'AM';
+        }
+    }
+
+
+// MOMENTS
+
+// Setting the hour should keep the time, because the user explicitly
+// specified which hour he wants. So trying to maintain the same hour (in
+// a new timezone) makes sense. Adding/subtracting hours does not follow
+// this rule.
+    var getSetHour = makeGetSet('Hours', true);
+
+// months
+// week
+// weekdays
+// meridiem
+    var baseConfig = {
+        calendar: defaultCalendar,
+        longDateFormat: defaultLongDateFormat,
+        invalidDate: defaultInvalidDate,
+        ordinal: defaultOrdinal,
+        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
+        relativeTime: defaultRelativeTime,
+
+        months: defaultLocaleMonths,
+        monthsShort: defaultLocaleMonthsShort,
+
+        week: defaultLocaleWeek,
+
+        weekdays: defaultLocaleWeekdays,
+        weekdaysMin: defaultLocaleWeekdaysMin,
+        weekdaysShort: defaultLocaleWeekdaysShort,
+
+        meridiemParse: defaultLocaleMeridiemParse
+    };
+
+// internal storage for locale config files
+    var locales = {};
+    var localeFamilies = {};
+    var globalLocale;
+
+    function normalizeLocale(key) {
+        return key ? key.toLowerCase().replace('_', '-') : key;
+    }
+
+// pick the locale from the array
+// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+    function chooseLocale(names) {
+        var i = 0, j, next, locale, split;
+
+        while (i < names.length) {
+            split = normalizeLocale(names[i]).split('-');
+            j = split.length;
+            next = normalizeLocale(names[i + 1]);
+            next = next ? next.split('-') : null;
+            while (j > 0) {
+                locale = loadLocale(split.slice(0, j).join('-'));
+                if (locale) {
+                    return locale;
+                }
+                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
+                    //the next array item is better than a shallower substring of this one
+                    break;
+                }
+                j--;
+            }
+            i++;
+        }
+        return null;
+    }
+
+    function loadLocale(name) {
+        var oldLocale = null;
+        // TODO: Find a better way to register and load all the locales in Node
+        if (!locales[name] && (typeof module !== 'undefined') &&
+            module && module.exports) {
+            try {
+                oldLocale = globalLocale._abbr;
+                require('./locale/' + name);
+                // because defineLocale currently also sets the global locale, we
+                // want to undo that for lazy loaded locales
+                getSetGlobalLocale(oldLocale);
+            } catch (e) {
+            }
+        }
+        return locales[name];
+    }
+
+// This function will load locale and then set the global locale.  If
+// no arguments are passed in, it will simply return the current global
+// locale key.
+    function getSetGlobalLocale(key, values) {
+        var data;
+        if (key) {
+            if (isUndefined(values)) {
+                data = getLocale(key);
+            }
+            else {
+                data = defineLocale(key, values);
+            }
+
+            if (data) {
+                // moment.duration._locale = moment._locale = data;
+                globalLocale = data;
+            }
+        }
+
+        return globalLocale._abbr;
+    }
+
+    function defineLocale(name, config) {
+        if (config !== null) {
+            var parentConfig = baseConfig;
+            config.abbr = name;
+            if (locales[name] != null) {
+                deprecateSimple('defineLocaleOverride',
+                    'use moment.updateLocale(localeName, config) to change ' +
+                    'an existing locale. moment.defineLocale(localeName, ' +
+                    'config) should only be used for creating a new locale ' +
+                    'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
+                parentConfig = locales[name]._config;
+            } else if (config.parentLocale != null) {
+                if (locales[config.parentLocale] != null) {
+                    parentConfig = locales[config.parentLocale]._config;
+                } else {
+                    if (!localeFamilies[config.parentLocale]) {
+                        localeFamilies[config.parentLocale] = [];
+                    }
+                    localeFamilies[config.parentLocale].push({
+                        name: name,
+                        config: config
+                    });
+                    return null;
+                }
+            }
+            locales[name] = new Locale(mergeConfigs(parentConfig, config));
+
+            if (localeFamilies[name]) {
+                localeFamilies[name].forEach(function (x) {
+                    defineLocale(x.name, x.config);
+                });
+            }
+
+            // backwards compat for now: also set the locale
+            // make sure we set the locale AFTER all child locales have been
+            // created, so we won't end up with the child locale set.
+            getSetGlobalLocale(name);
+
+
+            return locales[name];
+        } else {
+            // useful for testing
+            delete locales[name];
+            return null;
+        }
+    }
+
+    function updateLocale(name, config) {
+        if (config != null) {
+            var locale, parentConfig = baseConfig;
+            // MERGE
+            if (locales[name] != null) {
+                parentConfig = locales[name]._config;
+            }
+            config = mergeConfigs(parentConfig, config);
+            locale = new Locale(config);
+            locale.parentLocale = locales[name];
+            locales[name] = locale;
+
+            // backwards compat for now: also set the locale
+            getSetGlobalLocale(name);
+        } else {
+            // pass null for config to unupdate, useful for tests
+            if (locales[name] != null) {
+                if (locales[name].parentLocale != null) {
+                    locales[name] = locales[name].parentLocale;
+                } else if (locales[name] != null) {
+                    delete locales[name];
+                }
+            }
+        }
+        return locales[name];
+    }
+
+// returns locale data
+    function getLocale(key) {
+        var locale;
+
+        if (key && key._locale && key._locale._abbr) {
+            key = key._locale._abbr;
+        }
+
+        if (!key) {
+            return globalLocale;
+        }
+
+        if (!isArray(key)) {
+            //short-circuit everything else
+            locale = loadLocale(key);
+            if (locale) {
+                return locale;
+            }
+            key = [key];
+        }
+
+        return chooseLocale(key);
+    }
+
+    function listLocales() {
+        return keys$1(locales);
+    }
+
+    function checkOverflow(m) {
+        var overflow;
+        var a = m._a;
+
+        if (a && getParsingFlags(m).overflow === -2) {
+            overflow =
+                a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
+                    a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
+                        a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
+                            a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
+                                a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
+                                    a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
+                                        -1;
+
+            if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
+                overflow = DATE;
+            }
+            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
+                overflow = WEEK;
+            }
+            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
+                overflow = WEEKDAY;
+            }
+
+            getParsingFlags(m).overflow = overflow;
+        }
+
+        return m;
+    }
+
+// iso 8601 regex
+// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+    var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
+    var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
+
+    var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
+
+    var isoDates = [
+        ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
+        ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
+        ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
+        ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
+        ['YYYY-DDD', /\d{4}-\d{3}/],
+        ['YYYY-MM', /\d{4}-\d\d/, false],
+        ['YYYYYYMMDD', /[+-]\d{10}/],
+        ['YYYYMMDD', /\d{8}/],
+        // YYYYMM is NOT allowed by the standard
+        ['GGGG[W]WWE', /\d{4}W\d{3}/],
+        ['GGGG[W]WW', /\d{4}W\d{2}/, false],
+        ['YYYYDDD', /\d{7}/]
+    ];
+
+// iso time formats and regexes
+    var isoTimes = [
+        ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
+        ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
+        ['HH:mm:ss', /\d\d:\d\d:\d\d/],
+        ['HH:mm', /\d\d:\d\d/],
+        ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
+        ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
+        ['HHmmss', /\d\d\d\d\d\d/],
+        ['HHmm', /\d\d\d\d/],
+        ['HH', /\d\d/]
+    ];
+
+    var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
+
+// date from iso format
+    function configFromISO(config) {
+        var i, l,
+            string = config._i,
+            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
+            allowTime, dateFormat, timeFormat, tzFormat;
+
+        if (match) {
+            getParsingFlags(config).iso = true;
+
+            for (i = 0, l = isoDates.length; i < l; i++) {
+                if (isoDates[i][1].exec(match[1])) {
+                    dateFormat = isoDates[i][0];
+                    allowTime = isoDates[i][2] !== false;
+                    break;
+                }
+            }
+            if (dateFormat == null) {
+                config._isValid = false;
+                return;
+            }
+            if (match[3]) {
+                for (i = 0, l = isoTimes.length; i < l; i++) {
+                    if (isoTimes[i][1].exec(match[3])) {
+                        // match[2] should be 'T' or space
+                        timeFormat = (match[2] || ' ') + isoTimes[i][0];
+                        break;
+                    }
+                }
+                if (timeFormat == null) {
+                    config._isValid = false;
+                    return;
+                }
+            }
+            if (!allowTime && timeFormat != null) {
+                config._isValid = false;
+                return;
+            }
+            if (match[4]) {
+                if (tzRegex.exec(match[4])) {
+                    tzFormat = 'Z';
+                } else {
+                    config._isValid = false;
+                    return;
+                }
+            }
+            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
+            configFromStringAndFormat(config);
+        } else {
+            config._isValid = false;
+        }
+    }
+
+// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
+    var basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;
+
+// date and time from ref 2822 format
+    function configFromRFC2822(config) {
+        var string, match, dayFormat,
+            dateFormat, timeFormat, tzFormat;
+        var timezones = {
+            ' GMT': ' +0000',
+            ' EDT': ' -0400',
+            ' EST': ' -0500',
+            ' CDT': ' -0500',
+            ' CST': ' -0600',
+            ' MDT': ' -0600',
+            ' MST': ' -0700',
+            ' PDT': ' -0700',
+            ' PST': ' -0800'
+        };
+        var military = 'YXWVUTSRQPONZABCDEFGHIKLM';
+        var timezone, timezoneIndex;
+
+        string = config._i
+            .replace(/\([^\)]*\)|[\n\t]/g, ' ') // Remove comments and folding whitespace
+            .replace(/(\s\s+)/g, ' ') // Replace multiple-spaces with a single space
+            .replace(/^\s|\s$/g, ''); // Remove leading and trailing spaces
+        match = basicRfcRegex.exec(string);
+
+        if (match) {
+            dayFormat = match[1] ? 'ddd' + ((match[1].length === 5) ? ', ' : ' ') : '';
+            dateFormat = 'D MMM ' + ((match[2].length > 10) ? 'YYYY ' : 'YY ');
+            timeFormat = 'HH:mm' + (match[4] ? ':ss' : '');
+
+            // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
+            if (match[1]) { // day of week given
+                var momentDate = new Date(match[2]);
+                var momentDay = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][momentDate.getDay()];
+
+                if (match[1].substr(0, 3) !== momentDay) {
+                    getParsingFlags(config).weekdayMismatch = true;
+                    config._isValid = false;
+                    return;
+                }
+            }
+
+            switch (match[5].length) {
+                case 2: // military
+                    if (timezoneIndex === 0) {
+                        timezone = ' +0000';
+                    } else {
+                        timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;
+                        timezone = ((timezoneIndex < 0) ? ' -' : ' +') +
+                            (('' + timezoneIndex).replace(/^-?/, '0')).match(/..$/)[0] + '00';
+                    }
+                    break;
+                case 4: // Zone
+                    timezone = timezones[match[5]];
+                    break;
+                default: // UT or +/-9999
+                    timezone = timezones[' GMT'];
+            }
+            match[5] = timezone;
+            config._i = match.splice(1).join('');
+            tzFormat = ' ZZ';
+            config._f = dayFormat + dateFormat + timeFormat + tzFormat;
+            configFromStringAndFormat(config);
+            getParsingFlags(config).rfc2822 = true;
+        } else {
+            config._isValid = false;
+        }
+    }
+
+// date from iso format or fallback
+    function configFromString(config) {
+        var matched = aspNetJsonRegex.exec(config._i);
+
+        if (matched !== null) {
+            config._d = new Date(+matched[1]);
+            return;
+        }
+
+        configFromISO(config);
+        if (config._isValid === false) {
+            delete config._isValid;
+        } else {
+            return;
+        }
+
+        configFromRFC2822(config);
+        if (config._isValid === false) {
+            delete config._isValid;
+        } else {
+            return;
+        }
+
+        // Final attempt, use Input Fallback
+        hooks.createFromInputFallback(config);
+    }
+
+    hooks.createFromInputFallback = deprecate(
+        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
+        'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
+        'discouraged and will be removed in an upcoming major release. Please refer to ' +
+        'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
+        function (config) {
+            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
+        }
+    );
+
+// Pick the first defined of two or three arguments.
+    function defaults(a, b, c) {
+        if (a != null) {
+            return a;
+        }
+        if (b != null) {
+            return b;
+        }
+        return c;
+    }
+
+    function currentDateArray(config) {
+        // hooks is actually the exported moment object
+        var nowValue = new Date(hooks.now());
+        if (config._useUTC) {
+            return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
+        }
+        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
+    }
+
+// convert an array to a date.
+// the array should mirror the parameters below
+// note: all values past the year are optional and will default to the lowest possible value.
+// [year, month, day , hour, minute, second, millisecond]
+    function configFromArray(config) {
+        var i, date, input = [], currentDate, yearToUse;
+
+        if (config._d) {
+            return;
+        }
+
+        currentDate = currentDateArray(config);
+
+        //compute day of the year from weeks and weekdays
+        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+            dayOfYearFromWeekInfo(config);
+        }
+
+        //if the day of the year is set, figure out what it is
+        if (config._dayOfYear != null) {
+            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
+
+            if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
+                getParsingFlags(config)._overflowDayOfYear = true;
+            }
+
+            date = createUTCDate(yearToUse, 0, config._dayOfYear);
+            config._a[MONTH] = date.getUTCMonth();
+            config._a[DATE] = date.getUTCDate();
+        }
+
+        // Default to current date.
+        // * if no year, month, day of month are given, default to today
+        // * if day of month is given, default month and year
+        // * if month is given, default only year
+        // * if year is given, don't default anything
+        for (i = 0; i < 3 && config._a[i] == null; ++i) {
+            config._a[i] = input[i] = currentDate[i];
+        }
+
+        // Zero out whatever was not defaulted, including time
+        for (; i < 7; i++) {
+            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
+        }
+
+        // Check for 24:00:00.000
+        if (config._a[HOUR] === 24 &&
+            config._a[MINUTE] === 0 &&
+            config._a[SECOND] === 0 &&
+            config._a[MILLISECOND] === 0) {
+            config._nextDay = true;
+            config._a[HOUR] = 0;
+        }
+
+        config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
+        // Apply timezone offset from input. The actual utcOffset can be changed
+        // with parseZone.
+        if (config._tzm != null) {
+            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+        }
+
+        if (config._nextDay) {
+            config._a[HOUR] = 24;
+        }
+    }
+
+    function dayOfYearFromWeekInfo(config) {
+        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
+
+        w = config._w;
+        if (w.GG != null || w.W != null || w.E != null) {
+            dow = 1;
+            doy = 4;
+
+            // TODO: We need to take the current isoWeekYear, but that depends on
+            // how we interpret now (local, utc, fixed offset). So create
+            // a now version of current config (take local/utc/offset flags, and
+            // create now).
+            weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
+            week = defaults(w.W, 1);
+            weekday = defaults(w.E, 1);
+            if (weekday < 1 || weekday > 7) {
+                weekdayOverflow = true;
+            }
+        } else {
+            dow = config._locale._week.dow;
+            doy = config._locale._week.doy;
+
+            var curWeek = weekOfYear(createLocal(), dow, doy);
+
+            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
+
+            // Default to current week.
+            week = defaults(w.w, curWeek.week);
+
+            if (w.d != null) {
+                // weekday -- low day numbers are considered next week
+                weekday = w.d;
+                if (weekday < 0 || weekday > 6) {
+                    weekdayOverflow = true;
+                }
+            } else if (w.e != null) {
+                // local weekday -- counting starts from begining of week
+                weekday = w.e + dow;
+                if (w.e < 0 || w.e > 6) {
+                    weekdayOverflow = true;
+                }
+            } else {
+                // default to begining of week
+                weekday = dow;
+            }
+        }
+        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
+            getParsingFlags(config)._overflowWeeks = true;
+        } else if (weekdayOverflow != null) {
+            getParsingFlags(config)._overflowWeekday = true;
+        } else {
+            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
+            config._a[YEAR] = temp.year;
+            config._dayOfYear = temp.dayOfYear;
+        }
+    }
+
+// constant that refers to the ISO standard
+    hooks.ISO_8601 = function () {
+    };
+
+// constant that refers to the RFC 2822 form
+    hooks.RFC_2822 = function () {
+    };
+
+// date from string and format string
+    function configFromStringAndFormat(config) {
+        // TODO: Move this to another part of the creation flow to prevent circular deps
+        if (config._f === hooks.ISO_8601) {
+            configFromISO(config);
+            return;
+        }
+        if (config._f === hooks.RFC_2822) {
+            configFromRFC2822(config);
+            return;
+        }
+        config._a = [];
+        getParsingFlags(config).empty = true;
+
+        // This array is used to make a Date, either with `new Date` or `Date.UTC`
+        var string = '' + config._i,
+            i, parsedInput, tokens, token, skipped,
+            stringLength = string.length,
+            totalParsedInputLength = 0;
+
+        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
+
+        for (i = 0; i < tokens.length; i++) {
+            token = tokens[i];
+            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
+            // console.log('token', token, 'parsedInput', parsedInput,
+            //         'regex', getParseRegexForToken(token, config));
+            if (parsedInput) {
+                skipped = string.substr(0, string.indexOf(parsedInput));
+                if (skipped.length > 0) {
+                    getParsingFlags(config).unusedInput.push(skipped);
+                }
+                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
+                totalParsedInputLength += parsedInput.length;
+            }
+            // don't parse if it's not a known token
+            if (formatTokenFunctions[token]) {
+                if (parsedInput) {
+                    getParsingFlags(config).empty = false;
+                }
+                else {
+                    getParsingFlags(config).unusedTokens.push(token);
+                }
+                addTimeToArrayFromToken(token, parsedInput, config);
+            }
+            else if (config._strict && !parsedInput) {
+                getParsingFlags(config).unusedTokens.push(token);
+            }
+        }
+
+        // add remaining unparsed input length to the string
+        getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
+        if (string.length > 0) {
+            getParsingFlags(config).unusedInput.push(string);
+        }
+
+        // clear _12h flag if hour is <= 12
+        if (config._a[HOUR] <= 12 &&
+            getParsingFlags(config).bigHour === true &&
+            config._a[HOUR] > 0) {
+            getParsingFlags(config).bigHour = undefined;
+        }
+
+        getParsingFlags(config).parsedDateParts = config._a.slice(0);
+        getParsingFlags(config).meridiem = config._meridiem;
+        // handle meridiem
+        config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
+
+        configFromArray(config);
+        checkOverflow(config);
+    }
+
+
+    function meridiemFixWrap(locale, hour, meridiem) {
+        var isPm;
+
+        if (meridiem == null) {
+            // nothing to do
+            return hour;
+        }
+        if (locale.meridiemHour != null) {
+            return locale.meridiemHour(hour, meridiem);
+        } else if (locale.isPM != null) {
+            // Fallback
+            isPm = locale.isPM(meridiem);
+            if (isPm && hour < 12) {
+                hour += 12;
+            }
+            if (!isPm && hour === 12) {
+                hour = 0;
+            }
+            return hour;
+        } else {
+            // this is not supposed to happen
+            return hour;
+        }
+    }
+
+// date from string and array of format strings
+    function configFromStringAndArray(config) {
+        var tempConfig,
+            bestMoment,
+
+            scoreToBeat,
+            i,
+            currentScore;
+
+        if (config._f.length === 0) {
+            getParsingFlags(config).invalidFormat = true;
+            config._d = new Date(NaN);
+            return;
+        }
+
+        for (i = 0; i < config._f.length; i++) {
+            currentScore = 0;
+            tempConfig = copyConfig({}, config);
+            if (config._useUTC != null) {
+                tempConfig._useUTC = config._useUTC;
+            }
+            tempConfig._f = config._f[i];
+            configFromStringAndFormat(tempConfig);
+
+            if (!isValid(tempConfig)) {
+                continue;
+            }
+
+            // if there is any input that was not parsed add a penalty for that format
+            currentScore += getParsingFlags(tempConfig).charsLeftOver;
+
+            //or tokens
+            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
+
+            getParsingFlags(tempConfig).score = currentScore;
+
+            if (scoreToBeat == null || currentScore < scoreToBeat) {
+                scoreToBeat = currentScore;
+                bestMoment = tempConfig;
+            }
+        }
+
+        extend(config, bestMoment || tempConfig);
+    }
+
+    function configFromObject(config) {
+        if (config._d) {
+            return;
+        }
+
+        var i = normalizeObjectUnits(config._i);
+        config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
+            return obj && parseInt(obj, 10);
+        });
+
+        configFromArray(config);
+    }
+
+    function createFromConfig(config) {
+        var res = new Moment(checkOverflow(prepareConfig(config)));
+        if (res._nextDay) {
+            // Adding is smart enough around DST
+            res.add(1, 'd');
+            res._nextDay = undefined;
+        }
+
+        return res;
+    }
+
+    function prepareConfig(config) {
+        var input = config._i,
+            format = config._f;
+
+        config._locale = config._locale || getLocale(config._l);
+
+        if (input === null || (format === undefined && input === '')) {
+            return createInvalid({nullInput: true});
+        }
+
+        if (typeof input === 'string') {
+            config._i = input = config._locale.preparse(input);
+        }
+
+        if (isMoment(input)) {
+            return new Moment(checkOverflow(input));
+        } else if (isDate(input)) {
+            config._d = input;
+        } else if (isArray(format)) {
+            configFromStringAndArray(config);
+        } else if (format) {
+            configFromStringAndFormat(config);
+        } else {
+            configFromInput(config);
+        }
+
+        if (!isValid(config)) {
+            config._d = null;
+        }
+
+        return config;
+    }
+
+    function configFromInput(config) {
+        var input = config._i;
+        if (isUndefined(input)) {
+            config._d = new Date(hooks.now());
+        } else if (isDate(input)) {
+            config._d = new Date(input.valueOf());
+        } else if (typeof input === 'string') {
+            configFromString(config);
+        } else if (isArray(input)) {
+            config._a = map(input.slice(0), function (obj) {
+                return parseInt(obj, 10);
+            });
+            configFromArray(config);
+        } else if (isObject(input)) {
+            configFromObject(config);
+        } else if (isNumber(input)) {
+            // from milliseconds
+            config._d = new Date(input);
+        } else {
+            hooks.createFromInputFallback(config);
+        }
+    }
+
+    function createLocalOrUTC(input, format, locale, strict, isUTC) {
+        var c = {};
+
+        if (locale === true || locale === false) {
+            strict = locale;
+            locale = undefined;
+        }
+
+        if ((isObject(input) && isObjectEmpty(input)) ||
+            (isArray(input) && input.length === 0)) {
+            input = undefined;
+        }
+        // object construction must be done this way.
+        // https://github.com/moment/moment/issues/1423
+        c._isAMomentObject = true;
+        c._useUTC = c._isUTC = isUTC;
+        c._l = locale;
+        c._i = input;
+        c._f = format;
+        c._strict = strict;
+
+        return createFromConfig(c);
+    }
+
+    function createLocal(input, format, locale, strict) {
+        return createLocalOrUTC(input, format, locale, strict, false);
+    }
+
+    var prototypeMin = deprecate(
+        'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
+        function () {
+            var other = createLocal.apply(null, arguments);
+            if (this.isValid() && other.isValid()) {
+                return other < this ? this : other;
+            } else {
+                return createInvalid();
+            }
+        }
+    );
+
+    var prototypeMax = deprecate(
+        'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
+        function () {
+            var other = createLocal.apply(null, arguments);
+            if (this.isValid() && other.isValid()) {
+                return other > this ? this : other;
+            } else {
+                return createInvalid();
+            }
+        }
+    );
+
+// Pick a moment m from moments so that m[fn](other) is true for all
+// other. This relies on the function fn to be transitive.
+//
+// moments should either be an array of moment objects or an array, whose
+// first element is an array of moment objects.
+    function pickBy(fn, moments) {
+        var res, i;
+        if (moments.length === 1 && isArray(moments[0])) {
+            moments = moments[0];
+        }
+        if (!moments.length) {
+            return createLocal();
+        }
+        res = moments[0];
+        for (i = 1; i < moments.length; ++i) {
+            if (!moments[i].isValid() || moments[i][fn](res)) {
+                res = moments[i];
+            }
+        }
+        return res;
+    }
+
+// TODO: Use [].sort instead?
+    function min() {
+        var args = [].slice.call(arguments, 0);
+
+        return pickBy('isBefore', args);
+    }
+
+    function max() {
+        var args = [].slice.call(arguments, 0);
+
+        return pickBy('isAfter', args);
+    }
+
+    var now = function () {
+        return Date.now ? Date.now() : +(new Date());
+    };
+
+    var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
+
+    function isDurationValid(m) {
+        for (var key in m) {
+            if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
+                return false;
+            }
+        }
+
+        var unitHasDecimal = false;
+        for (var i = 0; i < ordering.length; ++i) {
+            if (m[ordering[i]]) {
+                if (unitHasDecimal) {
+                    return false; // only allow non-integers for smallest unit
+                }
+                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
+                    unitHasDecimal = true;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    function isValid$1() {
+        return this._isValid;
+    }
+
+    function createInvalid$1() {
+        return createDuration(NaN);
+    }
+
+    function Duration(duration) {
+        var normalizedInput = normalizeObjectUnits(duration),
+            years = normalizedInput.year || 0,
+            quarters = normalizedInput.quarter || 0,
+            months = normalizedInput.month || 0,
+            weeks = normalizedInput.week || 0,
+            days = normalizedInput.day || 0,
+            hours = normalizedInput.hour || 0,
+            minutes = normalizedInput.minute || 0,
+            seconds = normalizedInput.second || 0,
+            milliseconds = normalizedInput.millisecond || 0;
+
+        this._isValid = isDurationValid(normalizedInput);
+
+        // representation for dateAddRemove
+        this._milliseconds = +milliseconds +
+            seconds * 1e3 + // 1000
+            minutes * 6e4 + // 1000 * 60
+            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
+        // Because of dateAddRemove treats 24 hours as different from a
+        // day when working around DST, we need to store them separately
+        this._days = +days +
+            weeks * 7;
+        // It is impossible translate months into days without knowing
+        // which months you are are talking about, so we have to store
+        // it separately.
+        this._months = +months +
+            quarters * 3 +
+            years * 12;
+
+        this._data = {};
+
+        this._locale = getLocale();
+
+        this._bubble();
+    }
+
+    function isDuration(obj) {
+        return obj instanceof Duration;
+    }
+
+    function absRound(number) {
+        if (number < 0) {
+            return Math.round(-1 * number) * -1;
+        } else {
+            return Math.round(number);
+        }
+    }
+
+// FORMATTING
+
+    function offset(token, separator) {
+        addFormatToken(token, 0, 0, function () {
+            var offset = this.utcOffset();
+            var sign = '+';
+            if (offset < 0) {
+                offset = -offset;
+                sign = '-';
+            }
+            return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
+        });
+    }
+
+    offset('Z', ':');
+    offset('ZZ', '');
+
+// PARSING
+
+    addRegexToken('Z', matchShortOffset);
+    addRegexToken('ZZ', matchShortOffset);
+    addParseToken(['Z', 'ZZ'], function (input, array, config) {
+        config._useUTC = true;
+        config._tzm = offsetFromString(matchShortOffset, input);
+    });
+
+// HELPERS
+
+// timezone chunker
+// '+10:00' > ['10',  '00']
+// '-1530'  > ['-15', '30']
+    var chunkOffset = /([\+\-]|\d\d)/gi;
+
+    function offsetFromString(matcher, string) {
+        var matches = (string || '').match(matcher);
+
+        if (matches === null) {
+            return null;
+        }
+
+        var chunk = matches[matches.length - 1] || [];
+        var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
+        var minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+        return minutes === 0 ?
+            0 :
+            parts[0] === '+' ? minutes : -minutes;
+    }
+
+// Return a moment from input, that is local/utc/zone equivalent to model.
+    function cloneWithOffset(input, model) {
+        var res, diff;
+        if (model._isUTC) {
+            res = model.clone();
+            diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
+            // Use low-level api, because this fn is low-level api.
+            res._d.setTime(res._d.valueOf() + diff);
+            hooks.updateOffset(res, false);
+            return res;
+        } else {
+            return createLocal(input).local();
+        }
+    }
+
+    function getDateOffset(m) {
+        // On Firefox.24 Date#getTimezoneOffset returns a floating point.
+        // https://github.com/moment/moment/pull/1871
+        return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
+    }
+
+// HOOKS
+
+// This function will be called whenever a moment is mutated.
+// It is intended to keep the offset in sync with the timezone.
+    hooks.updateOffset = function () {
+    };
+
+// MOMENTS
+
+// keepLocalTime = true means only change the timezone, without
+// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
+// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
+// +0200, so we adjust the time as needed, to be valid.
+//
+// Keeping the time actually adds/subtracts (one hour)
+// from the actual represented time. That is why we call updateOffset
+// a second time. In case it wants us to change the offset again
+// _changeInProgress == true case, then we have to adjust, because
+// there is no such time in the given timezone.
+    function getSetOffset(input, keepLocalTime, keepMinutes) {
+        var offset = this._offset || 0,
+            localAdjust;
+        if (!this.isValid()) {
+            return input != null ? this : NaN;
+        }
+        if (input != null) {
+            if (typeof input === 'string') {
+                input = offsetFromString(matchShortOffset, input);
+                if (input === null) {
+                    return this;
+                }
+            } else if (Math.abs(input) < 16 && !keepMinutes) {
+                input = input * 60;
+            }
+            if (!this._isUTC && keepLocalTime) {
+                localAdjust = getDateOffset(this);
+            }
+            this._offset = input;
+            this._isUTC = true;
+            if (localAdjust != null) {
+                this.add(localAdjust, 'm');
+            }
+            if (offset !== input) {
+                if (!keepLocalTime || this._changeInProgress) {
+                    addSubtract(this, createDuration(input - offset, 'm'), 1, false);
+                } else if (!this._changeInProgress) {
+                    this._changeInProgress = true;
+                    hooks.updateOffset(this, true);
+                    this._changeInProgress = null;
+                }
+            }
+            return this;
+        } else {
+            return this._isUTC ? offset : getDateOffset(this);
+        }
+    }
+
+    function getSetZone(input, keepLocalTime) {
+        if (input != null) {
+            if (typeof input !== 'string') {
+                input = -input;
+            }
+
+            this.utcOffset(input, keepLocalTime);
+
+            return this;
+        } else {
+            return -this.utcOffset();
+        }
+    }
+
+    function setOffsetToUTC(keepLocalTime) {
+        return this.utcOffset(0, keepLocalTime);
+    }
+
+    function setOffsetToLocal(keepLocalTime) {
+        if (this._isUTC) {
+            this.utcOffset(0, keepLocalTime);
+            this._isUTC = false;
+
+            if (keepLocalTime) {
+                this.subtract(getDateOffset(this), 'm');
+            }
+        }
+        return this;
+    }
+
+    function setOffsetToParsedOffset() {
+        if (this._tzm != null) {
+            this.utcOffset(this._tzm, false, true);
+        } else if (typeof this._i === 'string') {
+            var tZone = offsetFromString(matchOffset, this._i);
+            if (tZone != null) {
+                this.utcOffset(tZone);
+            }
+            else {
+                this.utcOffset(0, true);
+            }
+        }
+        return this;
+    }
+
+    function hasAlignedHourOffset(input) {
+        if (!this.isValid()) {
+            return false;
+        }
+        input = input ? createLocal(input).utcOffset() : 0;
+
+        return (this.utcOffset() - input) % 60 === 0;
+    }
+
+    function isDaylightSavingTime() {
+        return (
+            this.utcOffset() > this.clone().month(0).utcOffset() ||
+            this.utcOffset() > this.clone().month(5).utcOffset()
+        );
+    }
+
+    function isDaylightSavingTimeShifted() {
+        if (!isUndefined(this._isDSTShifted)) {
+            return this._isDSTShifted;
+        }
+
+        var c = {};
+
+        copyConfig(c, this);
+        c = prepareConfig(c);
+
+        if (c._a) {
+            var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
+            this._isDSTShifted = this.isValid() &&
+                compareArrays(c._a, other.toArray()) > 0;
+        } else {
+            this._isDSTShifted = false;
+        }
+
+        return this._isDSTShifted;
+    }
+
+    function isLocal() {
+        return this.isValid() ? !this._isUTC : false;
+    }
+
+    function isUtcOffset() {
+        return this.isValid() ? this._isUTC : false;
+    }
+
+    function isUtc() {
+        return this.isValid() ? this._isUTC && this._offset === 0 : false;
+    }
+
+// ASP.NET json date format regex
+    var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
+
+// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+// and further modified to allow for strings containing both week and day
+    var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;
+
+    function createDuration(input, key) {
+        var duration = input,
+            // matching against regexp is expensive, do it on demand
+            match = null,
+            sign,
+            ret,
+            diffRes;
+
+        if (isDuration(input)) {
+            duration = {
+                ms: input._milliseconds,
+                d: input._days,
+                M: input._months
+            };
+        } else if (isNumber(input)) {
+            duration = {};
+            if (key) {
+                duration[key] = input;
+            } else {
+                duration.milliseconds = input;
+            }
+        } else if (!!(match = aspNetRegex.exec(input))) {
+            sign = (match[1] === '-') ? -1 : 1;
+            duration = {
+                y: 0,
+                d: toInt(match[DATE]) * sign,
+                h: toInt(match[HOUR]) * sign,
+                m: toInt(match[MINUTE]) * sign,
+                s: toInt(match[SECOND]) * sign,
+                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
+            };
+        } else if (!!(match = isoRegex.exec(input))) {
+            sign = (match[1] === '-') ? -1 : 1;
+            duration = {
+                y: parseIso(match[2], sign),
+                M: parseIso(match[3], sign),
+                w: parseIso(match[4], sign),
+                d: parseIso(match[5], sign),
+                h: parseIso(match[6], sign),
+                m: parseIso(match[7], sign),
+                s: parseIso(match[8], sign)
+            };
+        } else if (duration == null) {// checks for null or undefined
+            duration = {};
+        } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
+            diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
+
+            duration = {};
+            duration.ms = diffRes.milliseconds;
+            duration.M = diffRes.months;
+        }
+
+        ret = new Duration(duration);
+
+        if (isDuration(input) && hasOwnProp(input, '_locale')) {
+            ret._locale = input._locale;
+        }
+
+        return ret;
+    }
+
+    createDuration.fn = Duration.prototype;
+    createDuration.invalid = createInvalid$1;
+
+    function parseIso(inp, sign) {
+        // We'd normally use ~~inp for this, but unfortunately it also
+        // converts floats to ints.
+        // inp may be undefined, so careful calling replace on it.
+        var res = inp && parseFloat(inp.replace(',', '.'));
+        // apply sign while we're at it
+        return (isNaN(res) ? 0 : res) * sign;
+    }
+
+    function positiveMomentsDifference(base, other) {
+        var res = {milliseconds: 0, months: 0};
+
+        res.months = other.month() - base.month() +
+            (other.year() - base.year()) * 12;
+        if (base.clone().add(res.months, 'M').isAfter(other)) {
+            --res.months;
+        }
+
+        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
+
+        return res;
+    }
+
+    function momentsDifference(base, other) {
+        var res;
+        if (!(base.isValid() && other.isValid())) {
+            return {milliseconds: 0, months: 0};
+        }
+
+        other = cloneWithOffset(other, base);
+        if (base.isBefore(other)) {
+            res = positiveMomentsDifference(base, other);
+        } else {
+            res = positiveMomentsDifference(other, base);
+            res.milliseconds = -res.milliseconds;
+            res.months = -res.months;
+        }
+
+        return res;
+    }
+
+// TODO: remove 'name' arg after deprecation is removed
+    function createAdder(direction, name) {
+        return function (val, period) {
+            var dur, tmp;
+            //invert the arguments, but complain about it
+            if (period !== null && !isNaN(+period)) {
+                deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
+                    'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
+                tmp = val;
+                val = period;
+                period = tmp;
+            }
+
+            val = typeof val === 'string' ? +val : val;
+            dur = createDuration(val, period);
+            addSubtract(this, dur, direction);
+            return this;
+        };
+    }
+
+    function addSubtract(mom, duration, isAdding, updateOffset) {
+        var milliseconds = duration._milliseconds,
+            days = absRound(duration._days),
+            months = absRound(duration._months);
+
+        if (!mom.isValid()) {
+            // No op
+            return;
+        }
+
+        updateOffset = updateOffset == null ? true : updateOffset;
+
+        if (milliseconds) {
+            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
+        }
+        if (days) {
+            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
+        }
+        if (months) {
+            setMonth(mom, get(mom, 'Month') + months * isAdding);
+        }
+        if (updateOffset) {
+            hooks.updateOffset(mom, days || months);
+        }
+    }
+
+    var add = createAdder(1, 'add');
+    var subtract = createAdder(-1, 'subtract');
+
+    function getCalendarFormat(myMoment, now) {
+        var diff = myMoment.diff(now, 'days', true);
+        return diff < -6 ? 'sameElse' :
+            diff < -1 ? 'lastWeek' :
+                diff < 0 ? 'lastDay' :
+                    diff < 1 ? 'sameDay' :
+                        diff < 2 ? 'nextDay' :
+                            diff < 7 ? 'nextWeek' : 'sameElse';
+    }
+
+    function calendar$1(time, formats) {
+        // We want to compare the start of today, vs this.
+        // Getting start-of-today depends on whether we're local/utc/offset or not.
+        var now = time || createLocal(),
+            sod = cloneWithOffset(now, this).startOf('day'),
+            format = hooks.calendarFormat(this, sod) || 'sameElse';
+
+        var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
+
+        return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
+    }
+
+    function clone() {
+        return new Moment(this);
+    }
+
+    function isAfter(input, units) {
+        var localInput = isMoment(input) ? input : createLocal(input);
+        if (!(this.isValid() && localInput.isValid())) {
+            return false;
+        }
+        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
+        if (units === 'millisecond') {
+            return this.valueOf() > localInput.valueOf();
+        } else {
+            return localInput.valueOf() < this.clone().startOf(units).valueOf();
+        }
+    }
+
+    function isBefore(input, units) {
+        var localInput = isMoment(input) ? input : createLocal(input);
+        if (!(this.isValid() && localInput.isValid())) {
+            return false;
+        }
+        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
+        if (units === 'millisecond') {
+            return this.valueOf() < localInput.valueOf();
+        } else {
+            return this.clone().endOf(units).valueOf() < localInput.valueOf();
+        }
+    }
+
+    function isBetween(from, to, units, inclusivity) {
+        inclusivity = inclusivity || '()';
+        return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
+            (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
+    }
+
+    function isSame(input, units) {
+        var localInput = isMoment(input) ? input : createLocal(input),
+            inputMs;
+        if (!(this.isValid() && localInput.isValid())) {
+            return false;
+        }
+        units = normalizeUnits(units || 'millisecond');
+        if (units === 'millisecond') {
+            return this.valueOf() === localInput.valueOf();
+        } else {
+            inputMs = localInput.valueOf();
+            return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
+        }
+    }
+
+    function isSameOrAfter(input, units) {
+        return this.isSame(input, units) || this.isAfter(input, units);
+    }
+
+    function isSameOrBefore(input, units) {
+        return this.isSame(input, units) || this.isBefore(input, units);
+    }
+
+    function diff(input, units, asFloat) {
+        var that,
+            zoneDelta,
+            delta, output;
+
+        if (!this.isValid()) {
+            return NaN;
+        }
+
+        that = cloneWithOffset(input, this);
+
+        if (!that.isValid()) {
+            return NaN;
+        }
+
+        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
+
+        units = normalizeUnits(units);
+
+        if (units === 'year' || units === 'month' || units === 'quarter') {
+            output = monthDiff(this, that);
+            if (units === 'quarter') {
+                output = output / 3;
+            } else if (units === 'year') {
+                output = output / 12;
+            }
+        } else {
+            delta = this - that;
+            output = units === 'second' ? delta / 1e3 : // 1000
+                units === 'minute' ? delta / 6e4 : // 1000 * 60
+                    units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60
+                        units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
+                            units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
+                                delta;
+        }
+        return asFloat ? output : absFloor(output);
+    }
+
+    function monthDiff(a, b) {
+        // difference in months
+        var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
+            // b is in (anchor - 1 month, anchor + 1 month)
+            anchor = a.clone().add(wholeMonthDiff, 'months'),
+            anchor2, adjust;
+
+        if (b - anchor < 0) {
+            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
+            // linear across the month
+            adjust = (b - anchor) / (anchor - anchor2);
+        } else {
+            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
+            // linear across the month
+            adjust = (b - anchor) / (anchor2 - anchor);
+        }
+
+        //check for negative zero, return zero if negative zero
+        return -(wholeMonthDiff + adjust) || 0;
+    }
+
+    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
+    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
+
+    function toString() {
+        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
+    }
+
+    function toISOString() {
+        if (!this.isValid()) {
+            return null;
+        }
+        var m = this.clone().utc();
+        if (m.year() < 0 || m.year() > 9999) {
+            return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+        }
+        if (isFunction(Date.prototype.toISOString)) {
+            // native implementation is ~50x faster, use it when we can
+            return this.toDate().toISOString();
+        }
+        return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+    }
+
+    /**
+     * Return a human readable representation of a moment that can
+     * also be evaluated to get a new moment which is the same
+     *
+     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
+     */
+    function inspect() {
+        if (!this.isValid()) {
+            return 'moment.invalid(/* ' + this._i + ' */)';
+        }
+        var func = 'moment';
+        var zone = '';
+        if (!this.isLocal()) {
+            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
+            zone = 'Z';
+        }
+        var prefix = '[' + func + '("]';
+        var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
+        var datetime = '-MM-DD[T]HH:mm:ss.SSS';
+        var suffix = zone + '[")]';
+
+        return this.format(prefix + year + datetime + suffix);
+    }
+
+    function format(inputString) {
+        if (!inputString) {
+            inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
+        }
+        var output = formatMoment(this, inputString);
+        return this.localeData().postformat(output);
+    }
+
+    function from(time, withoutSuffix) {
+        if (this.isValid() &&
+            ((isMoment(time) && time.isValid()) ||
+            createLocal(time).isValid())) {
+            return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
+        } else {
+            return this.localeData().invalidDate();
+        }
+    }
+
+    function fromNow(withoutSuffix) {
+        return this.from(createLocal(), withoutSuffix);
+    }
+
+    function to(time, withoutSuffix) {
+        if (this.isValid() &&
+            ((isMoment(time) && time.isValid()) ||
+            createLocal(time).isValid())) {
+            return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
+        } else {
+            return this.localeData().invalidDate();
+        }
+    }
+
+    function toNow(withoutSuffix) {
+        return this.to(createLocal(), withoutSuffix);
+    }
+
+// If passed a locale key, it will set the locale for this
+// instance.  Otherwise, it will return the locale configuration
+// variables for this instance.
+    function locale(key) {
+        var newLocaleData;
+
+        if (key === undefined) {
+            return this._locale._abbr;
+        } else {
+            newLocaleData = getLocale(key);
+            if (newLocaleData != null) {
+                this._locale = newLocaleData;
+            }
+            return this;
+        }
+    }
+
+    var lang = deprecate(
+        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
+        function (key) {
+            if (key === undefined) {
+                return this.localeData();
+            } else {
+                return this.locale(key);
+            }
+        }
+    );
+
+    function localeData() {
+        return this._locale;
+    }
+
+    function startOf(units) {
+        units = normalizeUnits(units);
+        // the following switch intentionally omits break keywords
+        // to utilize falling through the cases.
+        switch (units) {
+            case 'year':
+                this.month(0);
+            /* falls through */
+            case 'quarter':
+            case 'month':
+                this.date(1);
+            /* falls through */
+            case 'week':
+            case 'isoWeek':
+            case 'day':
+            case 'date':
+                this.hours(0);
+            /* falls through */
+            case 'hour':
+                this.minutes(0);
+            /* falls through */
+            case 'minute':
+                this.seconds(0);
+            /* falls through */
+            case 'second':
+                this.milliseconds(0);
+        }
+
+        // weeks are a special case
+        if (units === 'week') {
+            this.weekday(0);
+        }
+        if (units === 'isoWeek') {
+            this.isoWeekday(1);
+        }
+
+        // quarters are also special
+        if (units === 'quarter') {
+            this.month(Math.floor(this.month() / 3) * 3);
+        }
+
+        return this;
+    }
+
+    function endOf(units) {
+        units = normalizeUnits(units);
+        if (units === undefined || units === 'millisecond') {
+            return this;
+        }
+
+        // 'date' is an alias for 'day', so it should be considered as such.
+        if (units === 'date') {
+            units = 'day';
+        }
+
+        return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
+    }
+
+    function valueOf() {
+        return this._d.valueOf() - ((this._offset || 0) * 60000);
+    }
+
+    function unix() {
+        return Math.floor(this.valueOf() / 1000);
+    }
+
+    function toDate() {
+        return new Date(this.valueOf());
+    }
+
+    function toArray() {
+        var m = this;
+        return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
+    }
+
+    function toObject() {
+        var m = this;
+        return {
+            years: m.year(),
+            months: m.month(),
+            date: m.date(),
+            hours: m.hours(),
+            minutes: m.minutes(),
+            seconds: m.seconds(),
+            milliseconds: m.milliseconds()
+        };
+    }
+
+    function toJSON() {
+        // new Date(NaN).toJSON() === null
+        return this.isValid() ? this.toISOString() : null;
+    }
+
+    function isValid$2() {
+        return isValid(this);
+    }
+
+    function parsingFlags() {
+        return extend({}, getParsingFlags(this));
+    }
+
+    function invalidAt() {
+        return getParsingFlags(this).overflow;
+    }
+
+    function creationData() {
+        return {
+            input: this._i,
+            format: this._f,
+            locale: this._locale,
+            isUTC: this._isUTC,
+            strict: this._strict
+        };
+    }
+
+// FORMATTING
+
+    addFormatToken(0, ['gg', 2], 0, function () {
+        return this.weekYear() % 100;
+    });
+
+    addFormatToken(0, ['GG', 2], 0, function () {
+        return this.isoWeekYear() % 100;
+    });
+
+    function addWeekYearFormatToken(token, getter) {
+        addFormatToken(0, [token, token.length], 0, getter);
+    }
+
+    addWeekYearFormatToken('gggg', 'weekYear');
+    addWeekYearFormatToken('ggggg', 'weekYear');
+    addWeekYearFormatToken('GGGG', 'isoWeekYear');
+    addWeekYearFormatToken('GGGGG', 'isoWeekYear');
+
+// ALIASES
+
+    addUnitAlias('weekYear', 'gg');
+    addUnitAlias('isoWeekYear', 'GG');
+
+// PRIORITY
+
+    addUnitPriority('weekYear', 1);
+    addUnitPriority('isoWeekYear', 1);
+
+
+// PARSING
+
+    addRegexToken('G', matchSigned);
+    addRegexToken('g', matchSigned);
+    addRegexToken('GG', match1to2, match2);
+    addRegexToken('gg', match1to2, match2);
+    addRegexToken('GGGG', match1to4, match4);
+    addRegexToken('gggg', match1to4, match4);
+    addRegexToken('GGGGG', match1to6, match6);
+    addRegexToken('ggggg', match1to6, match6);
+
+    addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
+        week[token.substr(0, 2)] = toInt(input);
+    });
+
+    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
+        week[token] = hooks.parseTwoDigitYear(input);
+    });
+
+// MOMENTS
+
+    function getSetWeekYear(input) {
+        return getSetWeekYearHelper.call(this,
+            input,
+            this.week(),
+            this.weekday(),
+            this.localeData()._week.dow,
+            this.localeData()._week.doy);
+    }
+
+    function getSetISOWeekYear(input) {
+        return getSetWeekYearHelper.call(this,
+            input, this.isoWeek(), this.isoWeekday(), 1, 4);
+    }
+
+    function getISOWeeksInYear() {
+        return weeksInYear(this.year(), 1, 4);
+    }
+
+    function getWeeksInYear() {
+        var weekInfo = this.localeData()._week;
+        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+    }
+
+    function getSetWeekYearHelper(input, week, weekday, dow, doy) {
+        var weeksTarget;
+        if (input == null) {
+            return weekOfYear(this, dow, doy).year;
+        } else {
+            weeksTarget = weeksInYear(input, dow, doy);
+            if (week > weeksTarget) {
+                week = weeksTarget;
+            }
+            return setWeekAll.call(this, input, week, weekday, dow, doy);
+        }
+    }
+
+    function setWeekAll(weekYear, week, weekday, dow, doy) {
+        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
+            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
+
+        this.year(date.getUTCFullYear());
+        this.month(date.getUTCMonth());
+        this.date(date.getUTCDate());
+        return this;
+    }
+
+// FORMATTING
+
+    addFormatToken('Q', 0, 'Qo', 'quarter');
+
+// ALIASES
+
+    addUnitAlias('quarter', 'Q');
+
+// PRIORITY
+
+    addUnitPriority('quarter', 7);
+
+// PARSING
+
+    addRegexToken('Q', match1);
+    addParseToken('Q', function (input, array) {
+        array[MONTH] = (toInt(input) - 1) * 3;
+    });
+
+// MOMENTS
+
+    function getSetQuarter(input) {
+        return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
+    }
+
+// FORMATTING
+
+    addFormatToken('D', ['DD', 2], 'Do', 'date');
+
+// ALIASES
+
+    addUnitAlias('date', 'D');
+
+// PRIOROITY
+    addUnitPriority('date', 9);
+
+// PARSING
+
+    addRegexToken('D', match1to2);
+    addRegexToken('DD', match1to2, match2);
+    addRegexToken('Do', function (isStrict, locale) {
+        // TODO: Remove "ordinalParse" fallback in next major release.
+        return isStrict ?
+            (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
+            locale._dayOfMonthOrdinalParseLenient;
+    });
+
+    addParseToken(['D', 'DD'], DATE);
+    addParseToken('Do', function (input, array) {
+        array[DATE] = toInt(input.match(match1to2)[0], 10);
+    });
+
+// MOMENTS
+
+    var getSetDayOfMonth = makeGetSet('Date', true);
+
+// FORMATTING
+
+    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
+
+// ALIASES
+
+    addUnitAlias('dayOfYear', 'DDD');
+
+// PRIORITY
+    addUnitPriority('dayOfYear', 4);
+
+// PARSING
+
+    addRegexToken('DDD', match1to3);
+    addRegexToken('DDDD', match3);
+    addParseToken(['DDD', 'DDDD'], function (input, array, config) {
+        config._dayOfYear = toInt(input);
+    });
+
+// HELPERS
+
+// MOMENTS
+
+    function getSetDayOfYear(input) {
+        var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
+        return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
+    }
+
+// FORMATTING
+
+    addFormatToken('m', ['mm', 2], 0, 'minute');
+
+// ALIASES
+
+    addUnitAlias('minute', 'm');
+
+// PRIORITY
+
+    addUnitPriority('minute', 14);
+
+// PARSING
+
+    addRegexToken('m', match1to2);
+    addRegexToken('mm', match1to2, match2);
+    addParseToken(['m', 'mm'], MINUTE);
+
+// MOMENTS
+
+    var getSetMinute = makeGetSet('Minutes', false);
+
+// FORMATTING
+
+    addFormatToken('s', ['ss', 2], 0, 'second');
+
+// ALIASES
+
+    addUnitAlias('second', 's');
+
+// PRIORITY
+
+    addUnitPriority('second', 15);
+
+// PARSING
+
+    addRegexToken('s', match1to2);
+    addRegexToken('ss', match1to2, match2);
+    addParseToken(['s', 'ss'], SECOND);
+
+// MOMENTS
+
+    var getSetSecond = makeGetSet('Seconds', false);
+
+// FORMATTING
+
+    addFormatToken('S', 0, 0, function () {
+        return ~~(this.millisecond() / 100);
+    });
+
+    addFormatToken(0, ['SS', 2], 0, function () {
+        return ~~(this.millisecond() / 10);
+    });
+
+    addFormatToken(0, ['SSS', 3], 0, 'millisecond');
+    addFormatToken(0, ['SSSS', 4], 0, function () {
+        return this.millisecond() * 10;
+    });
+    addFormatToken(0, ['SSSSS', 5], 0, function () {
+        return this.millisecond() * 100;
+    });
+    addFormatToken(0, ['SSSSSS', 6], 0, function () {
+        return this.millisecond() * 1000;
+    });
+    addFormatToken(0, ['SSSSSSS', 7], 0, function () {
+        return this.millisecond() * 10000;
+    });
+    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
+        return this.millisecond() * 100000;
+    });
+    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
+        return this.millisecond() * 1000000;
+    });
+
+
+// ALIASES
+
+    addUnitAlias('millisecond', 'ms');
+
+// PRIORITY
+
+    addUnitPriority('millisecond', 16);
+
+// PARSING
+
+    addRegexToken('S', match1to3, match1);
+    addRegexToken('SS', match1to3, match2);
+    addRegexToken('SSS', match1to3, match3);
+
+    var token;
+    for (token = 'SSSS'; token.length <= 9; token += 'S') {
+        addRegexToken(token, matchUnsigned);
+    }
+
+    function parseMs(input, array) {
+        array[MILLISECOND] = toInt(('0.' + input) * 1000);
+    }
+
+    for (token = 'S'; token.length <= 9; token += 'S') {
+        addParseToken(token, parseMs);
+    }
+// MOMENTS
+
+    var getSetMillisecond = makeGetSet('Milliseconds', false);
+
+// FORMATTING
+
+    addFormatToken('z', 0, 0, 'zoneAbbr');
+    addFormatToken('zz', 0, 0, 'zoneName');
+
+// MOMENTS
+
+    function getZoneAbbr() {
+        return this._isUTC ? 'UTC' : '';
+    }
+
+    function getZoneName() {
+        return this._isUTC ? 'Coordinated Universal Time' : '';
+    }
+
+    var proto = Moment.prototype;
+
+    proto.add = add;
+    proto.calendar = calendar$1;
+    proto.clone = clone;
+    proto.diff = diff;
+    proto.endOf = endOf;
+    proto.format = format;
+    proto.from = from;
+    proto.fromNow = fromNow;
+    proto.to = to;
+    proto.toNow = toNow;
+    proto.get = stringGet;
+    proto.invalidAt = invalidAt;
+    proto.isAfter = isAfter;
+    proto.isBefore = isBefore;
+    proto.isBetween = isBetween;
+    proto.isSame = isSame;
+    proto.isSameOrAfter = isSameOrAfter;
+    proto.isSameOrBefore = isSameOrBefore;
+    proto.isValid = isValid$2;
+    proto.lang = lang;
+    proto.locale = locale;
+    proto.localeData = localeData;
+    proto.max = prototypeMax;
+    proto.min = prototypeMin;
+    proto.parsingFlags = parsingFlags;
+    proto.set = stringSet;
+    proto.startOf = startOf;
+    proto.subtract = subtract;
+    proto.toArray = toArray;
+    proto.toObject = toObject;
+    proto.toDate = toDate;
+    proto.toISOString = toISOString;
+    proto.inspect = inspect;
+    proto.toJSON = toJSON;
+    proto.toString = toString;
+    proto.unix = unix;
+    proto.valueOf = valueOf;
+    proto.creationData = creationData;
+
+// Year
+    proto.year = getSetYear;
+    proto.isLeapYear = getIsLeapYear;
+
+// Week Year
+    proto.weekYear = getSetWeekYear;
+    proto.isoWeekYear = getSetISOWeekYear;
+
+// Quarter
+    proto.quarter = proto.quarters = getSetQuarter;
+
+// Month
+    proto.month = getSetMonth;
+    proto.daysInMonth = getDaysInMonth;
+
+// Week
+    proto.week = proto.weeks = getSetWeek;
+    proto.isoWeek = proto.isoWeeks = getSetISOWeek;
+    proto.weeksInYear = getWeeksInYear;
+    proto.isoWeeksInYear = getISOWeeksInYear;
+
+// Day
+    proto.date = getSetDayOfMonth;
+    proto.day = proto.days = getSetDayOfWeek;
+    proto.weekday = getSetLocaleDayOfWeek;
+    proto.isoWeekday = getSetISODayOfWeek;
+    proto.dayOfYear = getSetDayOfYear;
+
+// Hour
+    proto.hour = proto.hours = getSetHour;
+
+// Minute
+    proto.minute = proto.minutes = getSetMinute;
+
+// Second
+    proto.second = proto.seconds = getSetSecond;
+
+// Millisecond
+    proto.millisecond = proto.milliseconds = getSetMillisecond;
+
+// Offset
+    proto.utcOffset = getSetOffset;
+    proto.utc = setOffsetToUTC;
+    proto.local = setOffsetToLocal;
+    proto.parseZone = setOffsetToParsedOffset;
+    proto.hasAlignedHourOffset = hasAlignedHourOffset;
+    proto.isDST = isDaylightSavingTime;
+    proto.isLocal = isLocal;
+    proto.isUtcOffset = isUtcOffset;
+    proto.isUtc = isUtc;
+    proto.isUTC = isUtc;
+
+// Timezone
+    proto.zoneAbbr = getZoneAbbr;
+    proto.zoneName = getZoneName;
+
+// Deprecations
+    proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
+    proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
+    proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
+    proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
+    proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
+
+    function createUnix(input) {
+        return createLocal(input * 1000);
+    }
+
+    function createInZone() {
+        return createLocal.apply(null, arguments).parseZone();
+    }
+
+    function preParsePostFormat(string) {
+        return string;
+    }
+
+    var proto$1 = Locale.prototype;
+
+    proto$1.calendar = calendar;
+    proto$1.longDateFormat = longDateFormat;
+    proto$1.invalidDate = invalidDate;
+    proto$1.ordinal = ordinal;
+    proto$1.preparse = preParsePostFormat;
+    proto$1.postformat = preParsePostFormat;
+    proto$1.relativeTime = relativeTime;
+    proto$1.pastFuture = pastFuture;
+    proto$1.set = set;
+
+// Month
+    proto$1.months = localeMonths;
+    proto$1.monthsShort = localeMonthsShort;
+    proto$1.monthsParse = localeMonthsParse;
+    proto$1.monthsRegex = monthsRegex;
+    proto$1.monthsShortRegex = monthsShortRegex;
+
+// Week
+    proto$1.week = localeWeek;
+    proto$1.firstDayOfYear = localeFirstDayOfYear;
+    proto$1.firstDayOfWeek = localeFirstDayOfWeek;
+
+// Day of Week
+    proto$1.weekdays = localeWeekdays;
+    proto$1.weekdaysMin = localeWeekdaysMin;
+    proto$1.weekdaysShort = localeWeekdaysShort;
+    proto$1.weekdaysParse = localeWeekdaysParse;
+
+    proto$1.weekdaysRegex = weekdaysRegex;
+    proto$1.weekdaysShortRegex = weekdaysShortRegex;
+    proto$1.weekdaysMinRegex = weekdaysMinRegex;
+
+// Hours
+    proto$1.isPM = localeIsPM;
+    proto$1.meridiem = localeMeridiem;
+
+    function get$1(format, index, field, setter) {
+        var locale = getLocale();
+        var utc = createUTC().set(setter, index);
+        return locale[field](utc, format);
+    }
+
+    function listMonthsImpl(format, index, field) {
+        if (isNumber(format)) {
+            index = format;
+            format = undefined;
+        }
+
+        format = format || '';
+
+        if (index != null) {
+            return get$1(format, index, field, 'month');
+        }
+
+        var i;
+        var out = [];
+        for (i = 0; i < 12; i++) {
+            out[i] = get$1(format, i, field, 'month');
+        }
+        return out;
+    }
+
+// ()
+// (5)
+// (fmt, 5)
+// (fmt)
+// (true)
+// (true, 5)
+// (true, fmt, 5)
+// (true, fmt)
+    function listWeekdaysImpl(localeSorted, format, index, field) {
+        if (typeof localeSorted === 'boolean') {
+            if (isNumber(format)) {
+                index = format;
+                format = undefined;
+            }
+
+            format = format || '';
+        } else {
+            format = localeSorted;
+            index = format;
+            localeSorted = false;
+
+            if (isNumber(format)) {
+                index = format;
+                format = undefined;
+            }
+
+            format = format || '';
+        }
+
+        var locale = getLocale(),
+            shift = localeSorted ? locale._week.dow : 0;
+
+        if (index != null) {
+            return get$1(format, (index + shift) % 7, field, 'day');
+        }
+
+        var i;
+        var out = [];
+        for (i = 0; i < 7; i++) {
+            out[i] = get$1(format, (i + shift) % 7, field, 'day');
+        }
+        return out;
+    }
+
+    function listMonths(format, index) {
+        return listMonthsImpl(format, index, 'months');
+    }
+
+    function listMonthsShort(format, index) {
+        return listMonthsImpl(format, index, 'monthsShort');
+    }
+
+    function listWeekdays(localeSorted, format, index) {
+        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
+    }
+
+    function listWeekdaysShort(localeSorted, format, index) {
+        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
+    }
+
+    function listWeekdaysMin(localeSorted, format, index) {
+        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
+    }
+
+    getSetGlobalLocale('en', {
+        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (toInt(number % 100 / 10) === 1) ? 'th' :
+                    (b === 1) ? 'st' :
+                        (b === 2) ? 'nd' :
+                            (b === 3) ? 'rd' : 'th';
+            return number + output;
+        }
+    });
+
+// Side effect imports
+    hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
+    hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
+
+    var mathAbs = Math.abs;
+
+    function abs() {
+        var data = this._data;
+
+        this._milliseconds = mathAbs(this._milliseconds);
+        this._days = mathAbs(this._days);
+        this._months = mathAbs(this._months);
+
+        data.milliseconds = mathAbs(data.milliseconds);
+        data.seconds = mathAbs(data.seconds);
+        data.minutes = mathAbs(data.minutes);
+        data.hours = mathAbs(data.hours);
+        data.months = mathAbs(data.months);
+        data.years = mathAbs(data.years);
+
+        return this;
+    }
+
+    function addSubtract$1(duration, input, value, direction) {
+        var other = createDuration(input, value);
+
+        duration._milliseconds += direction * other._milliseconds;
+        duration._days += direction * other._days;
+        duration._months += direction * other._months;
+
+        return duration._bubble();
+    }
+
+// supports only 2.0-style add(1, 's') or add(duration)
+    function add$1(input, value) {
+        return addSubtract$1(this, input, value, 1);
+    }
+
+// supports only 2.0-style subtract(1, 's') or subtract(duration)
+    function subtract$1(input, value) {
+        return addSubtract$1(this, input, value, -1);
+    }
+
+    function absCeil(number) {
+        if (number < 0) {
+            return Math.floor(number);
+        } else {
+            return Math.ceil(number);
+        }
+    }
+
+    function bubble() {
+        var milliseconds = this._milliseconds;
+        var days = this._days;
+        var months = this._months;
+        var data = this._data;
+        var seconds, minutes, hours, years, monthsFromDays;
+
+        // if we have a mix of positive and negative values, bubble down first
+        // check: https://github.com/moment/moment/issues/2166
+        if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
+            (milliseconds <= 0 && days <= 0 && months <= 0))) {
+            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
+            days = 0;
+            months = 0;
+        }
+
+        // The following code bubbles up values, see the tests for
+        // examples of what that means.
+        data.milliseconds = milliseconds % 1000;
+
+        seconds = absFloor(milliseconds / 1000);
+        data.seconds = seconds % 60;
+
+        minutes = absFloor(seconds / 60);
+        data.minutes = minutes % 60;
+
+        hours = absFloor(minutes / 60);
+        data.hours = hours % 24;
+
+        days += absFloor(hours / 24);
+
+        // convert days to months
+        monthsFromDays = absFloor(daysToMonths(days));
+        months += monthsFromDays;
+        days -= absCeil(monthsToDays(monthsFromDays));
+
+        // 12 months -> 1 year
+        years = absFloor(months / 12);
+        months %= 12;
+
+        data.days = days;
+        data.months = months;
+        data.years = years;
+
+        return this;
+    }
+
+    function daysToMonths(days) {
+        // 400 years have 146097 days (taking into account leap year rules)
+        // 400 years have 12 months === 4800
+        return days * 4800 / 146097;
+    }
+
+    function monthsToDays(months) {
+        // the reverse of daysToMonths
+        return months * 146097 / 4800;
+    }
+
+    function as(units) {
+        if (!this.isValid()) {
+            return NaN;
+        }
+        var days;
+        var months;
+        var milliseconds = this._milliseconds;
+
+        units = normalizeUnits(units);
+
+        if (units === 'month' || units === 'year') {
+            days = this._days + milliseconds / 864e5;
+            months = this._months + daysToMonths(days);
+            return units === 'month' ? months : months / 12;
+        } else {
+            // handle milliseconds separately because of floating point math errors (issue #1867)
+            days = this._days + Math.round(monthsToDays(this._months));
+            switch (units) {
+                case 'week'   :
+                    return days / 7 + milliseconds / 6048e5;
+                case 'day'    :
+                    return days + milliseconds / 864e5;
+                case 'hour'   :
+                    return days * 24 + milliseconds / 36e5;
+                case 'minute' :
+                    return days * 1440 + milliseconds / 6e4;
+                case 'second' :
+                    return days * 86400 + milliseconds / 1000;
+                // Math.floor prevents floating point math errors here
+                case 'millisecond':
+                    return Math.floor(days * 864e5) + milliseconds;
+                default:
+                    throw new Error('Unknown unit ' + units);
+            }
+        }
+    }
+
+// TODO: Use this.as('ms')?
+    function valueOf$1() {
+        if (!this.isValid()) {
+            return NaN;
+        }
+        return (
+            this._milliseconds +
+            this._days * 864e5 +
+            (this._months % 12) * 2592e6 +
+            toInt(this._months / 12) * 31536e6
+        );
+    }
+
+    function makeAs(alias) {
+        return function () {
+            return this.as(alias);
+        };
+    }
+
+    var asMilliseconds = makeAs('ms');
+    var asSeconds = makeAs('s');
+    var asMinutes = makeAs('m');
+    var asHours = makeAs('h');
+    var asDays = makeAs('d');
+    var asWeeks = makeAs('w');
+    var asMonths = makeAs('M');
+    var asYears = makeAs('y');
+
+    function get$2(units) {
+        units = normalizeUnits(units);
+        return this.isValid() ? this[units + 's']() : NaN;
+    }
+
+    function makeGetter(name) {
+        return function () {
+            return this.isValid() ? this._data[name] : NaN;
+        };
+    }
+
+    var milliseconds = makeGetter('milliseconds');
+    var seconds = makeGetter('seconds');
+    var minutes = makeGetter('minutes');
+    var hours = makeGetter('hours');
+    var days = makeGetter('days');
+    var months = makeGetter('months');
+    var years = makeGetter('years');
+
+    function weeks() {
+        return absFloor(this.days() / 7);
+    }
+
+    var round = Math.round;
+    var thresholds = {
+        ss: 44,         // a few seconds to seconds
+        s: 45,         // seconds to minute
+        m: 45,         // minutes to hour
+        h: 22,         // hours to day
+        d: 26,         // days to month
+        M: 11          // months to year
+    };
+
+// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+    }
+
+    function relativeTime$1(posNegDuration, withoutSuffix, locale) {
+        var duration = createDuration(posNegDuration).abs();
+        var seconds = round(duration.as('s'));
+        var minutes = round(duration.as('m'));
+        var hours = round(duration.as('h'));
+        var days = round(duration.as('d'));
+        var months = round(duration.as('M'));
+        var years = round(duration.as('y'));
+
+        var a = seconds <= thresholds.ss && ['s', seconds] ||
+            seconds < thresholds.s && ['ss', seconds] ||
+            minutes <= 1 && ['m'] ||
+            minutes < thresholds.m && ['mm', minutes] ||
+            hours <= 1 && ['h'] ||
+            hours < thresholds.h && ['hh', hours] ||
+            days <= 1 && ['d'] ||
+            days < thresholds.d && ['dd', days] ||
+            months <= 1 && ['M'] ||
+            months < thresholds.M && ['MM', months] ||
+            years <= 1 && ['y'] || ['yy', years];
+
+        a[2] = withoutSuffix;
+        a[3] = +posNegDuration > 0;
+        a[4] = locale;
+        return substituteTimeAgo.apply(null, a);
+    }
+
+// This function allows you to set the rounding function for relative time strings
+    function getSetRelativeTimeRounding(roundingFunction) {
+        if (roundingFunction === undefined) {
+            return round;
+        }
+        if (typeof(roundingFunction) === 'function') {
+            round = roundingFunction;
+            return true;
+        }
+        return false;
+    }
+
+// This function allows you to set a threshold for relative time strings
+    function getSetRelativeTimeThreshold(threshold, limit) {
+        if (thresholds[threshold] === undefined) {
+            return false;
+        }
+        if (limit === undefined) {
+            return thresholds[threshold];
+        }
+        thresholds[threshold] = limit;
+        if (threshold === 's') {
+            thresholds.ss = limit - 1;
+        }
+        return true;
+    }
+
+    function humanize(withSuffix) {
+        if (!this.isValid()) {
+            return this.localeData().invalidDate();
+        }
+
+        var locale = this.localeData();
+        var output = relativeTime$1(this, !withSuffix, locale);
+
+        if (withSuffix) {
+            output = locale.pastFuture(+this, output);
+        }
+
+        return locale.postformat(output);
+    }
+
+    var abs$1 = Math.abs;
+
+    function toISOString$1() {
+        // for ISO strings we do not use the normal bubbling rules:
+        //  * milliseconds bubble up until they become hours
+        //  * days do not bubble at all
+        //  * months bubble up until they become years
+        // This is because there is no context-free conversion between hours and days
+        // (think of clock changes)
+        // and also not between days and months (28-31 days per month)
+        if (!this.isValid()) {
+            return this.localeData().invalidDate();
+        }
+
+        var seconds = abs$1(this._milliseconds) / 1000;
+        var days = abs$1(this._days);
+        var months = abs$1(this._months);
+        var minutes, hours, years;
+
+        // 3600 seconds -> 60 minutes -> 1 hour
+        minutes = absFloor(seconds / 60);
+        hours = absFloor(minutes / 60);
+        seconds %= 60;
+        minutes %= 60;
+
+        // 12 months -> 1 year
+        years = absFloor(months / 12);
+        months %= 12;
+
+
+        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
+        var Y = years;
+        var M = months;
+        var D = days;
+        var h = hours;
+        var m = minutes;
+        var s = seconds;
+        var total = this.asSeconds();
+
+        if (!total) {
+            // this is the same as C#'s (Noda) and python (isodate)...
+            // but not other JS (goog.date)
+            return 'P0D';
+        }
+
+        return (total < 0 ? '-' : '') +
+            'P' +
+            (Y ? Y + 'Y' : '') +
+            (M ? M + 'M' : '') +
+            (D ? D + 'D' : '') +
+            ((h || m || s) ? 'T' : '') +
+            (h ? h + 'H' : '') +
+            (m ? m + 'M' : '') +
+            (s ? s + 'S' : '');
+    }
+
+    var proto$2 = Duration.prototype;
+
+    proto$2.isValid = isValid$1;
+    proto$2.abs = abs;
+    proto$2.add = add$1;
+    proto$2.subtract = subtract$1;
+    proto$2.as = as;
+    proto$2.asMilliseconds = asMilliseconds;
+    proto$2.asSeconds = asSeconds;
+    proto$2.asMinutes = asMinutes;
+    proto$2.asHours = asHours;
+    proto$2.asDays = asDays;
+    proto$2.asWeeks = asWeeks;
+    proto$2.asMonths = asMonths;
+    proto$2.asYears = asYears;
+    proto$2.valueOf = valueOf$1;
+    proto$2._bubble = bubble;
+    proto$2.get = get$2;
+    proto$2.milliseconds = milliseconds;
+    proto$2.seconds = seconds;
+    proto$2.minutes = minutes;
+    proto$2.hours = hours;
+    proto$2.days = days;
+    proto$2.weeks = weeks;
+    proto$2.months = months;
+    proto$2.years = years;
+    proto$2.humanize = humanize;
+    proto$2.toISOString = toISOString$1;
+    proto$2.toString = toISOString$1;
+    proto$2.toJSON = toISOString$1;
+    proto$2.locale = locale;
+    proto$2.localeData = localeData;
+
+// Deprecations
+    proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
+    proto$2.lang = lang;
+
+// Side effect imports
+
+// FORMATTING
+
+    addFormatToken('X', 0, 0, 'unix');
+    addFormatToken('x', 0, 0, 'valueOf');
+
+// PARSING
+
+    addRegexToken('x', matchSigned);
+    addRegexToken('X', matchTimestamp);
+    addParseToken('X', function (input, array, config) {
+        config._d = new Date(parseFloat(input, 10) * 1000);
+    });
+    addParseToken('x', function (input, array, config) {
+        config._d = new Date(toInt(input));
+    });
+
+// Side effect imports
+
+//! moment.js
+//! version : 2.18.1
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+    hooks.version = '2.18.1';
+
+    setHookCallback(createLocal);
+
+    hooks.fn = proto;
+    hooks.min = min;
+    hooks.max = max;
+    hooks.now = now;
+    hooks.utc = createUTC;
+    hooks.unix = createUnix;
+    hooks.months = listMonths;
+    hooks.isDate = isDate;
+    hooks.locale = getSetGlobalLocale;
+    hooks.invalid = createInvalid;
+    hooks.duration = createDuration;
+    hooks.isMoment = isMoment;
+    hooks.weekdays = listWeekdays;
+    hooks.parseZone = createInZone;
+    hooks.localeData = getLocale;
+    hooks.isDuration = isDuration;
+    hooks.monthsShort = listMonthsShort;
+    hooks.weekdaysMin = listWeekdaysMin;
+    hooks.defineLocale = defineLocale;
+    hooks.updateLocale = updateLocale;
+    hooks.locales = listLocales;
+    hooks.weekdaysShort = listWeekdaysShort;
+    hooks.normalizeUnits = normalizeUnits;
+    hooks.relativeTimeRounding = getSetRelativeTimeRounding;
+    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
+    hooks.calendarFormat = getCalendarFormat;
+    hooks.prototype = proto;
+
+//! moment.js locale configuration
+//! locale : Afrikaans [af]
+//! author : Werner Mollentze : https://github.com/wernerm
+
+    hooks.defineLocale('af', {
+        months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),
+        monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
+        weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),
+        weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
+        weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
+        meridiemParse: /vm|nm/i,
+        isPM: function (input) {
+            return /^nm$/i.test(input);
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours < 12) {
+                return isLower ? 'vm' : 'VM';
+            } else {
+                return isLower ? 'nm' : 'NM';
+            }
+        },
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Vandag om] LT',
+            nextDay: '[Môre om] LT',
+            nextWeek: 'dddd [om] LT',
+            lastDay: '[Gister om] LT',
+            lastWeek: '[Laas] dddd [om] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'oor %s',
+            past: '%s gelede',
+            s: '\'n paar sekondes',
+            m: '\'n minuut',
+            mm: '%d minute',
+            h: '\'n uur',
+            hh: '%d ure',
+            d: '\'n dag',
+            dd: '%d dae',
+            M: '\'n maand',
+            MM: '%d maande',
+            y: '\'n jaar',
+            yy: '%d jaar'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+        ordinal: function (number) {
+            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
+        },
+        week: {
+            dow: 1, // Maandag is die eerste dag van die week.
+            doy: 4  // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Arabic (Algeria) [ar-dz]
+//! author : Noureddine LOUAHEDJ : https://github.com/noureddineme
+
+    hooks.defineLocale('ar-dz', {
+        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
+        monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
+        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+        weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+        weekdaysMin: 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[اليوم على الساعة] LT',
+            nextDay: '[غدا على الساعة] LT',
+            nextWeek: 'dddd [على الساعة] LT',
+            lastDay: '[أمس على الساعة] LT',
+            lastWeek: 'dddd [على الساعة] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'في %s',
+            past: 'منذ %s',
+            s: 'ثوان',
+            m: 'دقيقة',
+            mm: '%d دقائق',
+            h: 'ساعة',
+            hh: '%d ساعات',
+            d: 'يوم',
+            dd: '%d أيام',
+            M: 'شهر',
+            MM: '%d أشهر',
+            y: 'سنة',
+            yy: '%d سنوات'
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 4  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Arabic (Kuwait) [ar-kw]
+//! author : Nusret Parlak: https://github.com/nusretparlak
+
+    hooks.defineLocale('ar-kw', {
+        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
+        monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
+        weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+        weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[اليوم على الساعة] LT',
+            nextDay: '[غدا على الساعة] LT',
+            nextWeek: 'dddd [على الساعة] LT',
+            lastDay: '[أمس على الساعة] LT',
+            lastWeek: 'dddd [على الساعة] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'في %s',
+            past: 'منذ %s',
+            s: 'ثوان',
+            m: 'دقيقة',
+            mm: '%d دقائق',
+            h: 'ساعة',
+            hh: '%d ساعات',
+            d: 'يوم',
+            dd: '%d أيام',
+            M: 'شهر',
+            MM: '%d أشهر',
+            y: 'سنة',
+            yy: '%d سنوات'
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 12  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Arabic (Lybia) [ar-ly]
+//! author : Ali Hmer: https://github.com/kikoanis
+
+    var symbolMap = {
+        '1': '1',
+        '2': '2',
+        '3': '3',
+        '4': '4',
+        '5': '5',
+        '6': '6',
+        '7': '7',
+        '8': '8',
+        '9': '9',
+        '0': '0'
+    };
+    var pluralForm = function (n) {
+        return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
+    };
+    var plurals = {
+        s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
+        m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
+        h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
+        d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
+        M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
+        y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
+    };
+    var pluralize = function (u) {
+        return function (number, withoutSuffix, string, isFuture) {
+            var f = pluralForm(number),
+                str = plurals[u][pluralForm(number)];
+            if (f === 2) {
+                str = str[withoutSuffix ? 0 : 1];
+            }
+            return str.replace(/%d/i, number);
+        };
+    };
+    var months$1 = [
+        'يناير',
+        'فبراير',
+        'مارس',
+        'أبريل',
+        'مايو',
+        'يونيو',
+        'يوليو',
+        'أغسطس',
+        'سبتمبر',
+        'أكتوبر',
+        'نوفمبر',
+        'ديسمبر'
+    ];
+
+    hooks.defineLocale('ar-ly', {
+        months: months$1,
+        monthsShort: months$1,
+        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'D/\u200FM/\u200FYYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        meridiemParse: /ص|م/,
+        isPM: function (input) {
+            return 'م' === input;
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'ص';
+            } else {
+                return 'م';
+            }
+        },
+        calendar: {
+            sameDay: '[اليوم عند الساعة] LT',
+            nextDay: '[غدًا عند الساعة] LT',
+            nextWeek: 'dddd [عند الساعة] LT',
+            lastDay: '[أمس عند الساعة] LT',
+            lastWeek: 'dddd [عند الساعة] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'بعد %s',
+            past: 'منذ %s',
+            s: pluralize('s'),
+            m: pluralize('m'),
+            mm: pluralize('m'),
+            h: pluralize('h'),
+            hh: pluralize('h'),
+            d: pluralize('d'),
+            dd: pluralize('d'),
+            M: pluralize('M'),
+            MM: pluralize('M'),
+            y: pluralize('y'),
+            yy: pluralize('y')
+        },
+        preparse: function (string) {
+            return string.replace(/\u200f/g, '').replace(/،/g, ',');
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap[match];
+            }).replace(/,/g, '،');
+        },
+        week: {
+            dow: 6, // Saturday is the first day of the week.
+            doy: 12  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Arabic (Morocco) [ar-ma]
+//! author : ElFadili Yassine : https://github.com/ElFadiliY
+//! author : Abdel Said : https://github.com/abdelsaid
+
+    hooks.defineLocale('ar-ma', {
+        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
+        monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
+        weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+        weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
+        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[اليوم على الساعة] LT',
+            nextDay: '[غدا على الساعة] LT',
+            nextWeek: 'dddd [على الساعة] LT',
+            lastDay: '[أمس على الساعة] LT',
+            lastWeek: 'dddd [على الساعة] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'في %s',
+            past: 'منذ %s',
+            s: 'ثوان',
+            m: 'دقيقة',
+            mm: '%d دقائق',
+            h: 'ساعة',
+            hh: '%d ساعات',
+            d: 'يوم',
+            dd: '%d أيام',
+            M: 'شهر',
+            MM: '%d أشهر',
+            y: 'سنة',
+            yy: '%d سنوات'
+        },
+        week: {
+            dow: 6, // Saturday is the first day of the week.
+            doy: 12  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Arabic (Saudi Arabia) [ar-sa]
+//! author : Suhail Alkowaileet : https://github.com/xsoh
+
+    var symbolMap$1 = {
+        '1': '١',
+        '2': '٢',
+        '3': '٣',
+        '4': '٤',
+        '5': '٥',
+        '6': '٦',
+        '7': '٧',
+        '8': '٨',
+        '9': '٩',
+        '0': '٠'
+    };
+    var numberMap = {
+        '١': '1',
+        '٢': '2',
+        '٣': '3',
+        '٤': '4',
+        '٥': '5',
+        '٦': '6',
+        '٧': '7',
+        '٨': '8',
+        '٩': '9',
+        '٠': '0'
+    };
+
+    hooks.defineLocale('ar-sa', {
+        months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
+        monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
+        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        meridiemParse: /ص|م/,
+        isPM: function (input) {
+            return 'م' === input;
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'ص';
+            } else {
+                return 'م';
+            }
+        },
+        calendar: {
+            sameDay: '[اليوم على الساعة] LT',
+            nextDay: '[غدا على الساعة] LT',
+            nextWeek: 'dddd [على الساعة] LT',
+            lastDay: '[أمس على الساعة] LT',
+            lastWeek: 'dddd [على الساعة] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'في %s',
+            past: 'منذ %s',
+            s: 'ثوان',
+            m: 'دقيقة',
+            mm: '%d دقائق',
+            h: 'ساعة',
+            hh: '%d ساعات',
+            d: 'يوم',
+            dd: '%d أيام',
+            M: 'شهر',
+            MM: '%d أشهر',
+            y: 'سنة',
+            yy: '%d سنوات'
+        },
+        preparse: function (string) {
+            return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+                return numberMap[match];
+            }).replace(/،/g, ',');
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$1[match];
+            }).replace(/,/g, '،');
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale  :  Arabic (Tunisia) [ar-tn]
+//! author : Nader Toukabri : https://github.com/naderio
+
+    hooks.defineLocale('ar-tn', {
+        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
+        monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
+        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[اليوم على الساعة] LT',
+            nextDay: '[غدا على الساعة] LT',
+            nextWeek: 'dddd [على الساعة] LT',
+            lastDay: '[أمس على الساعة] LT',
+            lastWeek: 'dddd [على الساعة] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'في %s',
+            past: 'منذ %s',
+            s: 'ثوان',
+            m: 'دقيقة',
+            mm: '%d دقائق',
+            h: 'ساعة',
+            hh: '%d ساعات',
+            d: 'يوم',
+            dd: '%d أيام',
+            M: 'شهر',
+            MM: '%d أشهر',
+            y: 'سنة',
+            yy: '%d سنوات'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4 // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Arabic [ar]
+//! author : Abdel Said: https://github.com/abdelsaid
+//! author : Ahmed Elkhatib
+//! author : forabi https://github.com/forabi
+
+    var symbolMap$2 = {
+        '1': '١',
+        '2': '٢',
+        '3': '٣',
+        '4': '٤',
+        '5': '٥',
+        '6': '٦',
+        '7': '٧',
+        '8': '٨',
+        '9': '٩',
+        '0': '٠'
+    };
+    var numberMap$1 = {
+        '١': '1',
+        '٢': '2',
+        '٣': '3',
+        '٤': '4',
+        '٥': '5',
+        '٦': '6',
+        '٧': '7',
+        '٨': '8',
+        '٩': '9',
+        '٠': '0'
+    };
+    var pluralForm$1 = function (n) {
+        return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
+    };
+    var plurals$1 = {
+        s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
+        m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
+        h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
+        d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
+        M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
+        y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
+    };
+    var pluralize$1 = function (u) {
+        return function (number, withoutSuffix, string, isFuture) {
+            var f = pluralForm$1(number),
+                str = plurals$1[u][pluralForm$1(number)];
+            if (f === 2) {
+                str = str[withoutSuffix ? 0 : 1];
+            }
+            return str.replace(/%d/i, number);
+        };
+    };
+    var months$2 = [
+        'كانون الثاني يناير',
+        'شباط فبراير',
+        'آذار مارس',
+        'نيسان أبريل',
+        'أيار مايو',
+        'حزيران يونيو',
+        'تموز يوليو',
+        'آب أغسطس',
+        'أيلول سبتمبر',
+        'تشرين الأول أكتوبر',
+        'تشرين الثاني نوفمبر',
+        'كانون الأول ديسمبر'
+    ];
+
+    hooks.defineLocale('ar', {
+        months: months$2,
+        monthsShort: months$2,
+        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
+        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
+        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'D/\u200FM/\u200FYYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        meridiemParse: /ص|م/,
+        isPM: function (input) {
+            return 'م' === input;
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'ص';
+            } else {
+                return 'م';
+            }
+        },
+        calendar: {
+            sameDay: '[اليوم عند الساعة] LT',
+            nextDay: '[غدًا عند الساعة] LT',
+            nextWeek: 'dddd [عند الساعة] LT',
+            lastDay: '[أمس عند الساعة] LT',
+            lastWeek: 'dddd [عند الساعة] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'بعد %s',
+            past: 'منذ %s',
+            s: pluralize$1('s'),
+            m: pluralize$1('m'),
+            mm: pluralize$1('m'),
+            h: pluralize$1('h'),
+            hh: pluralize$1('h'),
+            d: pluralize$1('d'),
+            dd: pluralize$1('d'),
+            M: pluralize$1('M'),
+            MM: pluralize$1('M'),
+            y: pluralize$1('y'),
+            yy: pluralize$1('y')
+        },
+        preparse: function (string) {
+            return string.replace(/\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
+                return numberMap$1[match];
+            }).replace(/،/g, ',');
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$2[match];
+            }).replace(/,/g, '،');
+        },
+        week: {
+            dow: 6, // Saturday is the first day of the week.
+            doy: 12  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Azerbaijani [az]
+//! author : topchiyev : https://github.com/topchiyev
+
+    var suffixes = {
+        1: '-inci',
+        5: '-inci',
+        8: '-inci',
+        70: '-inci',
+        80: '-inci',
+        2: '-nci',
+        7: '-nci',
+        20: '-nci',
+        50: '-nci',
+        3: '-üncü',
+        4: '-üncü',
+        100: '-üncü',
+        6: '-ncı',
+        9: '-uncu',
+        10: '-uncu',
+        30: '-uncu',
+        60: '-ıncı',
+        90: '-ıncı'
+    };
+
+    hooks.defineLocale('az', {
+        months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),
+        monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
+        weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),
+        weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
+        weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[bugün saat] LT',
+            nextDay: '[sabah saat] LT',
+            nextWeek: '[gələn həftə] dddd [saat] LT',
+            lastDay: '[dünən] LT',
+            lastWeek: '[keçən həftə] dddd [saat] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s sonra',
+            past: '%s əvvəl',
+            s: 'birneçə saniyyə',
+            m: 'bir dəqiqə',
+            mm: '%d dəqiqə',
+            h: 'bir saat',
+            hh: '%d saat',
+            d: 'bir gün',
+            dd: '%d gün',
+            M: 'bir ay',
+            MM: '%d ay',
+            y: 'bir il',
+            yy: '%d il'
+        },
+        meridiemParse: /gecə|səhər|gündüz|axşam/,
+        isPM: function (input) {
+            return /^(gündüz|axşam)$/.test(input);
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'gecə';
+            } else if (hour < 12) {
+                return 'səhər';
+            } else if (hour < 17) {
+                return 'gündüz';
+            } else {
+                return 'axşam';
+            }
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
+        ordinal: function (number) {
+            if (number === 0) {  // special case for zero
+                return number + '-ıncı';
+            }
+            var a = number % 10,
+                b = number % 100 - a,
+                c = number >= 100 ? 100 : null;
+            return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Belarusian [be]
+//! author : Dmitry Demidov : https://github.com/demidov91
+//! author: Praleska: http://praleska.pro/
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+    function plural(word, num) {
+        var forms = word.split('_');
+        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
+    }
+
+    function relativeTimeWithPlural(number, withoutSuffix, key) {
+        var format = {
+            'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
+            'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
+            'dd': 'дзень_дні_дзён',
+            'MM': 'месяц_месяцы_месяцаў',
+            'yy': 'год_гады_гадоў'
+        };
+        if (key === 'm') {
+            return withoutSuffix ? 'хвіліна' : 'хвіліну';
+        }
+        else if (key === 'h') {
+            return withoutSuffix ? 'гадзіна' : 'гадзіну';
+        }
+        else {
+            return number + ' ' + plural(format[key], +number);
+        }
+    }
+
+    hooks.defineLocale('be', {
+        months: {
+            format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),
+            standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')
+        },
+        monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
+        weekdays: {
+            format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),
+            standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),
+            isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/
+        },
+        weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+        weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY г.',
+            LLL: 'D MMMM YYYY г., HH:mm',
+            LLLL: 'dddd, D MMMM YYYY г., HH:mm'
+        },
+        calendar: {
+            sameDay: '[Сёння ў] LT',
+            nextDay: '[Заўтра ў] LT',
+            lastDay: '[Учора ў] LT',
+            nextWeek: function () {
+                return '[У] dddd [ў] LT';
+            },
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                    case 3:
+                    case 5:
+                    case 6:
+                        return '[У мінулую] dddd [ў] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                        return '[У мінулы] dddd [ў] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'праз %s',
+            past: '%s таму',
+            s: 'некалькі секунд',
+            m: relativeTimeWithPlural,
+            mm: relativeTimeWithPlural,
+            h: relativeTimeWithPlural,
+            hh: relativeTimeWithPlural,
+            d: 'дзень',
+            dd: relativeTimeWithPlural,
+            M: 'месяц',
+            MM: relativeTimeWithPlural,
+            y: 'год',
+            yy: relativeTimeWithPlural
+        },
+        meridiemParse: /ночы|раніцы|дня|вечара/,
+        isPM: function (input) {
+            return /^(дня|вечара)$/.test(input);
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'ночы';
+            } else if (hour < 12) {
+                return 'раніцы';
+            } else if (hour < 17) {
+                return 'дня';
+            } else {
+                return 'вечара';
+            }
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                case 'M':
+                case 'd':
+                case 'DDD':
+                case 'w':
+                case 'W':
+                    return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы';
+                case 'D':
+                    return number + '-га';
+                default:
+                    return number;
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Bulgarian [bg]
+//! author : Krasen Borisov : https://github.com/kraz
+
+    hooks.defineLocale('bg', {
+        months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
+        monthsShort: 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
+        weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
+        weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
+        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'D.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY H:mm',
+            LLLL: 'dddd, D MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[Днес в] LT',
+            nextDay: '[Утре в] LT',
+            nextWeek: 'dddd [в] LT',
+            lastDay: '[Вчера в] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                    case 3:
+                    case 6:
+                        return '[В изминалата] dddd [в] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[В изминалия] dddd [в] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'след %s',
+            past: 'преди %s',
+            s: 'няколко секунди',
+            m: 'минута',
+            mm: '%d минути',
+            h: 'час',
+            hh: '%d часа',
+            d: 'ден',
+            dd: '%d дни',
+            M: 'месец',
+            MM: '%d месеца',
+            y: 'година',
+            yy: '%d години'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+        ordinal: function (number) {
+            var lastDigit = number % 10,
+                last2Digits = number % 100;
+            if (number === 0) {
+                return number + '-ев';
+            } else if (last2Digits === 0) {
+                return number + '-ен';
+            } else if (last2Digits > 10 && last2Digits < 20) {
+                return number + '-ти';
+            } else if (lastDigit === 1) {
+                return number + '-ви';
+            } else if (lastDigit === 2) {
+                return number + '-ри';
+            } else if (lastDigit === 7 || lastDigit === 8) {
+                return number + '-ми';
+            } else {
+                return number + '-ти';
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Bengali [bn]
+//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
+
+    var symbolMap$3 = {
+        '1': '১',
+        '2': '২',
+        '3': '৩',
+        '4': '৪',
+        '5': '৫',
+        '6': '৬',
+        '7': '৭',
+        '8': '৮',
+        '9': '৯',
+        '0': '০'
+    };
+    var numberMap$2 = {
+        '১': '1',
+        '২': '2',
+        '৩': '3',
+        '৪': '4',
+        '৫': '5',
+        '৬': '6',
+        '৭': '7',
+        '৮': '8',
+        '৯': '9',
+        '০': '0'
+    };
+
+    hooks.defineLocale('bn', {
+        months: 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),
+        monthsShort: 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),
+        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),
+        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
+        weekdaysMin: 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm সময়',
+            LTS: 'A h:mm:ss সময়',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, A h:mm সময়',
+            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়'
+        },
+        calendar: {
+            sameDay: '[আজ] LT',
+            nextDay: '[আগামীকাল] LT',
+            nextWeek: 'dddd, LT',
+            lastDay: '[গতকাল] LT',
+            lastWeek: '[গত] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s পরে',
+            past: '%s আগে',
+            s: 'কয়েক সেকেন্ড',
+            m: 'এক মিনিট',
+            mm: '%d মিনিট',
+            h: 'এক ঘন্টা',
+            hh: '%d ঘন্টা',
+            d: 'এক দিন',
+            dd: '%d দিন',
+            M: 'এক মাস',
+            MM: '%d মাস',
+            y: 'এক বছর',
+            yy: '%d বছর'
+        },
+        preparse: function (string) {
+            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
+                return numberMap$2[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$3[match];
+            });
+        },
+        meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if ((meridiem === 'রাত' && hour >= 4) ||
+                (meridiem === 'দুপুর' && hour < 5) ||
+                meridiem === 'বিকাল') {
+                return hour + 12;
+            } else {
+                return hour;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'রাত';
+            } else if (hour < 10) {
+                return 'সকাল';
+            } else if (hour < 17) {
+                return 'দুপুর';
+            } else if (hour < 20) {
+                return 'বিকাল';
+            } else {
+                return 'রাত';
+            }
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Tibetan [bo]
+//! author : Thupten N. Chakrishar : https://github.com/vajradog
+
+    var symbolMap$4 = {
+        '1': '༡',
+        '2': '༢',
+        '3': '༣',
+        '4': '༤',
+        '5': '༥',
+        '6': '༦',
+        '7': '༧',
+        '8': '༨',
+        '9': '༩',
+        '0': '༠'
+    };
+    var numberMap$3 = {
+        '༡': '1',
+        '༢': '2',
+        '༣': '3',
+        '༤': '4',
+        '༥': '5',
+        '༦': '6',
+        '༧': '7',
+        '༨': '8',
+        '༩': '9',
+        '༠': '0'
+    };
+
+    hooks.defineLocale('bo', {
+        months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
+        monthsShort: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
+        weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),
+        weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
+        weekdaysMin: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm',
+            LTS: 'A h:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, A h:mm',
+            LLLL: 'dddd, D MMMM YYYY, A h:mm'
+        },
+        calendar: {
+            sameDay: '[དི་རིང] LT',
+            nextDay: '[སང་ཉིན] LT',
+            nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
+            lastDay: '[ཁ་སང] LT',
+            lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s ལ་',
+            past: '%s སྔན་ལ',
+            s: 'ལམ་སང',
+            m: 'སྐར་མ་གཅིག',
+            mm: '%d སྐར་མ',
+            h: 'ཆུ་ཚོད་གཅིག',
+            hh: '%d ཆུ་ཚོད',
+            d: 'ཉིན་གཅིག',
+            dd: '%d ཉིན་',
+            M: 'ཟླ་བ་གཅིག',
+            MM: '%d ཟླ་བ',
+            y: 'ལོ་གཅིག',
+            yy: '%d ལོ'
+        },
+        preparse: function (string) {
+            return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
+                return numberMap$3[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$4[match];
+            });
+        },
+        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if ((meridiem === 'མཚན་མོ' && hour >= 4) ||
+                (meridiem === 'ཉིན་གུང' && hour < 5) ||
+                meridiem === 'དགོང་དག') {
+                return hour + 12;
+            } else {
+                return hour;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'མཚན་མོ';
+            } else if (hour < 10) {
+                return 'ཞོགས་ཀས';
+            } else if (hour < 17) {
+                return 'ཉིན་གུང';
+            } else if (hour < 20) {
+                return 'དགོང་དག';
+            } else {
+                return 'མཚན་མོ';
+            }
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Breton [br]
+//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
+
+    function relativeTimeWithMutation(number, withoutSuffix, key) {
+        var format = {
+            'mm': 'munutenn',
+            'MM': 'miz',
+            'dd': 'devezh'
+        };
+        return number + ' ' + mutation(format[key], number);
+    }
+
+    function specialMutationForYears(number) {
+        switch (lastNumber(number)) {
+            case 1:
+            case 3:
+            case 4:
+            case 5:
+            case 9:
+                return number + ' bloaz';
+            default:
+                return number + ' vloaz';
+        }
+    }
+
+    function lastNumber(number) {
+        if (number > 9) {
+            return lastNumber(number % 10);
+        }
+        return number;
+    }
+
+    function mutation(text, number) {
+        if (number === 2) {
+            return softMutation(text);
+        }
+        return text;
+    }
+
+    function softMutation(text) {
+        var mutationTable = {
+            'm': 'v',
+            'b': 'v',
+            'd': 'z'
+        };
+        if (mutationTable[text.charAt(0)] === undefined) {
+            return text;
+        }
+        return mutationTable[text.charAt(0)] + text.substring(1);
+    }
+
+    hooks.defineLocale('br', {
+        months: 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),
+        monthsShort: 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
+        weekdays: 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'),
+        weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
+        weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'h[e]mm A',
+            LTS: 'h[e]mm:ss A',
+            L: 'DD/MM/YYYY',
+            LL: 'D [a viz] MMMM YYYY',
+            LLL: 'D [a viz] MMMM YYYY h[e]mm A',
+            LLLL: 'dddd, D [a viz] MMMM YYYY h[e]mm A'
+        },
+        calendar: {
+            sameDay: '[Hiziv da] LT',
+            nextDay: '[Warc\'hoazh da] LT',
+            nextWeek: 'dddd [da] LT',
+            lastDay: '[Dec\'h da] LT',
+            lastWeek: 'dddd [paset da] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'a-benn %s',
+            past: '%s \'zo',
+            s: 'un nebeud segondennoù',
+            m: 'ur vunutenn',
+            mm: relativeTimeWithMutation,
+            h: 'un eur',
+            hh: '%d eur',
+            d: 'un devezh',
+            dd: relativeTimeWithMutation,
+            M: 'ur miz',
+            MM: relativeTimeWithMutation,
+            y: 'ur bloaz',
+            yy: specialMutationForYears
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
+        ordinal: function (number) {
+            var output = (number === 1) ? 'añ' : 'vet';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Bosnian [bs]
+//! author : Nedim Cholich : https://github.com/frontyard
+//! based on (hr) translation by Bojan Marković
+
+    function translate(number, withoutSuffix, key) {
+        var result = number + ' ';
+        switch (key) {
+            case 'm':
+                return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+            case 'mm':
+                if (number === 1) {
+                    result += 'minuta';
+                } else if (number === 2 || number === 3 || number === 4) {
+                    result += 'minute';
+                } else {
+                    result += 'minuta';
+                }
+                return result;
+            case 'h':
+                return withoutSuffix ? 'jedan sat' : 'jednog sata';
+            case 'hh':
+                if (number === 1) {
+                    result += 'sat';
+                } else if (number === 2 || number === 3 || number === 4) {
+                    result += 'sata';
+                } else {
+                    result += 'sati';
+                }
+                return result;
+            case 'dd':
+                if (number === 1) {
+                    result += 'dan';
+                } else {
+                    result += 'dana';
+                }
+                return result;
+            case 'MM':
+                if (number === 1) {
+                    result += 'mjesec';
+                } else if (number === 2 || number === 3 || number === 4) {
+                    result += 'mjeseca';
+                } else {
+                    result += 'mjeseci';
+                }
+                return result;
+            case 'yy':
+                if (number === 1) {
+                    result += 'godina';
+                } else if (number === 2 || number === 3 || number === 4) {
+                    result += 'godine';
+                } else {
+                    result += 'godina';
+                }
+                return result;
+        }
+    }
+
+    hooks.defineLocale('bs', {
+        months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),
+        monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
+        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd, D. MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[danas u] LT',
+            nextDay: '[sutra u] LT',
+            nextWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[u] [nedjelju] [u] LT';
+                    case 3:
+                        return '[u] [srijedu] [u] LT';
+                    case 6:
+                        return '[u] [subotu] [u] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[u] dddd [u] LT';
+                }
+            },
+            lastDay: '[jučer u] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                    case 3:
+                        return '[prošlu] dddd [u] LT';
+                    case 6:
+                        return '[prošle] [subote] [u] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[prošli] dddd [u] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'za %s',
+            past: 'prije %s',
+            s: 'par sekundi',
+            m: translate,
+            mm: translate,
+            h: translate,
+            hh: translate,
+            d: 'dan',
+            dd: translate,
+            M: 'mjesec',
+            MM: translate,
+            y: 'godinu',
+            yy: translate
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Catalan [ca]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
+
+    hooks.defineLocale('ca', {
+        months: {
+            standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
+            format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
+            isFormat: /D[oD]?(\s)+MMMM/
+        },
+        monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
+        weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
+        weekdaysMin: 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: '[el] D MMMM [de] YYYY',
+            ll: 'D MMM YYYY',
+            LLL: '[el] D MMMM [de] YYYY [a les] H:mm',
+            lll: 'D MMM YYYY, H:mm',
+            LLLL: '[el] dddd D MMMM [de] YYYY [a les] H:mm',
+            llll: 'ddd D MMM YYYY, H:mm'
+        },
+        calendar: {
+            sameDay: function () {
+                return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
+            },
+            nextDay: function () {
+                return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
+            },
+            nextWeek: function () {
+                return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
+            },
+            lastDay: function () {
+                return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
+            },
+            lastWeek: function () {
+                return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'd\'aquí %s',
+            past: 'fa %s',
+            s: 'uns segons',
+            m: 'un minut',
+            mm: '%d minuts',
+            h: 'una hora',
+            hh: '%d hores',
+            d: 'un dia',
+            dd: '%d dies',
+            M: 'un mes',
+            MM: '%d mesos',
+            y: 'un any',
+            yy: '%d anys'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
+        ordinal: function (number, period) {
+            var output = (number === 1) ? 'r' :
+                (number === 2) ? 'n' :
+                    (number === 3) ? 'r' :
+                        (number === 4) ? 't' : 'è';
+            if (period === 'w' || period === 'W') {
+                output = 'a';
+            }
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Czech [cs]
+//! author : petrbela : https://github.com/petrbela
+
+    var months$3 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');
+    var monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
+
+    function plural$1(n) {
+        return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
+    }
+
+    function translate$1(number, withoutSuffix, key, isFuture) {
+        var result = number + ' ';
+        switch (key) {
+            case 's':  // a few seconds / in a few seconds / a few seconds ago
+                return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
+            case 'm':  // a minute / in a minute / a minute ago
+                return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
+            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$1(number) ? 'minuty' : 'minut');
+                } else {
+                    return result + 'minutami';
+                }
+                break;
+            case 'h':  // an hour / in an hour / an hour ago
+                return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
+            case 'hh': // 9 hours / in 9 hours / 9 hours ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$1(number) ? 'hodiny' : 'hodin');
+                } else {
+                    return result + 'hodinami';
+                }
+                break;
+            case 'd':  // a day / in a day / a day ago
+                return (withoutSuffix || isFuture) ? 'den' : 'dnem';
+            case 'dd': // 9 days / in 9 days / 9 days ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$1(number) ? 'dny' : 'dní');
+                } else {
+                    return result + 'dny';
+                }
+                break;
+            case 'M':  // a month / in a month / a month ago
+                return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
+            case 'MM': // 9 months / in 9 months / 9 months ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$1(number) ? 'měsíce' : 'měsíců');
+                } else {
+                    return result + 'měsíci';
+                }
+                break;
+            case 'y':  // a year / in a year / a year ago
+                return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
+            case 'yy': // 9 years / in 9 years / 9 years ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$1(number) ? 'roky' : 'let');
+                } else {
+                    return result + 'lety';
+                }
+                break;
+        }
+    }
+
+    hooks.defineLocale('cs', {
+        months: months$3,
+        monthsShort: monthsShort,
+        monthsParse: (function (months, monthsShort) {
+            var i, _monthsParse = [];
+            for (i = 0; i < 12; i++) {
+                // use custom parser to solve problem with July (červenec)
+                _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
+            }
+            return _monthsParse;
+        }(months$3, monthsShort)),
+        shortMonthsParse: (function (monthsShort) {
+            var i, _shortMonthsParse = [];
+            for (i = 0; i < 12; i++) {
+                _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
+            }
+            return _shortMonthsParse;
+        }(monthsShort)),
+        longMonthsParse: (function (months) {
+            var i, _longMonthsParse = [];
+            for (i = 0; i < 12; i++) {
+                _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
+            }
+            return _longMonthsParse;
+        }(months$3)),
+        weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
+        weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
+        weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd D. MMMM YYYY H:mm',
+            l: 'D. M. YYYY'
+        },
+        calendar: {
+            sameDay: '[dnes v] LT',
+            nextDay: '[zítra v] LT',
+            nextWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[v neděli v] LT';
+                    case 1:
+                    case 2:
+                        return '[v] dddd [v] LT';
+                    case 3:
+                        return '[ve středu v] LT';
+                    case 4:
+                        return '[ve čtvrtek v] LT';
+                    case 5:
+                        return '[v pátek v] LT';
+                    case 6:
+                        return '[v sobotu v] LT';
+                }
+            },
+            lastDay: '[včera v] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[minulou neděli v] LT';
+                    case 1:
+                    case 2:
+                        return '[minulé] dddd [v] LT';
+                    case 3:
+                        return '[minulou středu v] LT';
+                    case 4:
+                    case 5:
+                        return '[minulý] dddd [v] LT';
+                    case 6:
+                        return '[minulou sobotu v] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'za %s',
+            past: 'před %s',
+            s: translate$1,
+            m: translate$1,
+            mm: translate$1,
+            h: translate$1,
+            hh: translate$1,
+            d: translate$1,
+            dd: translate$1,
+            M: translate$1,
+            MM: translate$1,
+            y: translate$1,
+            yy: translate$1
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Chuvash [cv]
+//! author : Anatoly Mironov : https://github.com/mirontoli
+
+    hooks.defineLocale('cv', {
+        months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),
+        monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
+        weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),
+        weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
+        weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD-MM-YYYY',
+            LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
+            LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
+            LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'
+        },
+        calendar: {
+            sameDay: '[Паян] LT [сехетре]',
+            nextDay: '[Ыран] LT [сехетре]',
+            lastDay: '[Ӗнер] LT [сехетре]',
+            nextWeek: '[Ҫитес] dddd LT [сехетре]',
+            lastWeek: '[Иртнӗ] dddd LT [сехетре]',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: function (output) {
+                var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';
+                return output + affix;
+            },
+            past: '%s каялла',
+            s: 'пӗр-ик ҫеккунт',
+            m: 'пӗр минут',
+            mm: '%d минут',
+            h: 'пӗр сехет',
+            hh: '%d сехет',
+            d: 'пӗр кун',
+            dd: '%d кун',
+            M: 'пӗр уйӑх',
+            MM: '%d уйӑх',
+            y: 'пӗр ҫул',
+            yy: '%d ҫул'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
+        ordinal: '%d-мӗш',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Welsh [cy]
+//! author : Robert Allen : https://github.com/robgallen
+//! author : https://github.com/ryangreaves
+
+    hooks.defineLocale('cy', {
+        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),
+        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),
+        weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),
+        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
+        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
+        weekdaysParseExact: true,
+        // time formats are the same as en-gb
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Heddiw am] LT',
+            nextDay: '[Yfory am] LT',
+            nextWeek: 'dddd [am] LT',
+            lastDay: '[Ddoe am] LT',
+            lastWeek: 'dddd [diwethaf am] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'mewn %s',
+            past: '%s yn ôl',
+            s: 'ychydig eiliadau',
+            m: 'munud',
+            mm: '%d munud',
+            h: 'awr',
+            hh: '%d awr',
+            d: 'diwrnod',
+            dd: '%d diwrnod',
+            M: 'mis',
+            MM: '%d mis',
+            y: 'blwyddyn',
+            yy: '%d flynedd'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
+        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
+        ordinal: function (number) {
+            var b = number,
+                output = '',
+                lookup = [
+                    '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
+                    'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
+                ];
+            if (b > 20) {
+                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
+                    output = 'fed'; // not 30ain, 70ain or 90ain
+                } else {
+                    output = 'ain';
+                }
+            } else if (b > 0) {
+                output = lookup[b];
+            }
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Danish [da]
+//! author : Ulrik Nielsen : https://github.com/mrbase
+
+    hooks.defineLocale('da', {
+        months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
+        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+        weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
+        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY HH:mm',
+            LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
+        },
+        calendar: {
+            sameDay: '[i dag kl.] LT',
+            nextDay: '[i morgen kl.] LT',
+            nextWeek: 'på dddd [kl.] LT',
+            lastDay: '[i går kl.] LT',
+            lastWeek: '[i] dddd[s kl.] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'om %s',
+            past: '%s siden',
+            s: 'få sekunder',
+            m: 'et minut',
+            mm: '%d minutter',
+            h: 'en time',
+            hh: '%d timer',
+            d: 'en dag',
+            dd: '%d dage',
+            M: 'en måned',
+            MM: '%d måneder',
+            y: 'et år',
+            yy: '%d år'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : German (Austria) [de-at]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Martin Groller : https://github.com/MadMG
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+    function processRelativeTime(number, withoutSuffix, key, isFuture) {
+        var format = {
+            'm': ['eine Minute', 'einer Minute'],
+            'h': ['eine Stunde', 'einer Stunde'],
+            'd': ['ein Tag', 'einem Tag'],
+            'dd': [number + ' Tage', number + ' Tagen'],
+            'M': ['ein Monat', 'einem Monat'],
+            'MM': [number + ' Monate', number + ' Monaten'],
+            'y': ['ein Jahr', 'einem Jahr'],
+            'yy': [number + ' Jahre', number + ' Jahren']
+        };
+        return withoutSuffix ? format[key][0] : format[key][1];
+    }
+
+    hooks.defineLocale('de-at', {
+        months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
+        monthsShort: 'Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
+        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY HH:mm',
+            LLLL: 'dddd, D. MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[heute um] LT [Uhr]',
+            sameElse: 'L',
+            nextDay: '[morgen um] LT [Uhr]',
+            nextWeek: 'dddd [um] LT [Uhr]',
+            lastDay: '[gestern um] LT [Uhr]',
+            lastWeek: '[letzten] dddd [um] LT [Uhr]'
+        },
+        relativeTime: {
+            future: 'in %s',
+            past: 'vor %s',
+            s: 'ein paar Sekunden',
+            m: processRelativeTime,
+            mm: '%d Minuten',
+            h: processRelativeTime,
+            hh: '%d Stunden',
+            d: processRelativeTime,
+            dd: processRelativeTime,
+            M: processRelativeTime,
+            MM: processRelativeTime,
+            y: processRelativeTime,
+            yy: processRelativeTime
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : German (Switzerland) [de-ch]
+//! author : sschueller : https://github.com/sschueller
+
+// based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
+
+    function processRelativeTime$1(number, withoutSuffix, key, isFuture) {
+        var format = {
+            'm': ['eine Minute', 'einer Minute'],
+            'h': ['eine Stunde', 'einer Stunde'],
+            'd': ['ein Tag', 'einem Tag'],
+            'dd': [number + ' Tage', number + ' Tagen'],
+            'M': ['ein Monat', 'einem Monat'],
+            'MM': [number + ' Monate', number + ' Monaten'],
+            'y': ['ein Jahr', 'einem Jahr'],
+            'yy': [number + ' Jahre', number + ' Jahren']
+        };
+        return withoutSuffix ? format[key][0] : format[key][1];
+    }
+
+    hooks.defineLocale('de-ch', {
+        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
+        monthsShort: 'Jan._Febr._März_April_Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
+        weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH.mm',
+            LTS: 'HH.mm.ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY HH.mm',
+            LLLL: 'dddd, D. MMMM YYYY HH.mm'
+        },
+        calendar: {
+            sameDay: '[heute um] LT [Uhr]',
+            sameElse: 'L',
+            nextDay: '[morgen um] LT [Uhr]',
+            nextWeek: 'dddd [um] LT [Uhr]',
+            lastDay: '[gestern um] LT [Uhr]',
+            lastWeek: '[letzten] dddd [um] LT [Uhr]'
+        },
+        relativeTime: {
+            future: 'in %s',
+            past: 'vor %s',
+            s: 'ein paar Sekunden',
+            m: processRelativeTime$1,
+            mm: '%d Minuten',
+            h: processRelativeTime$1,
+            hh: '%d Stunden',
+            d: processRelativeTime$1,
+            dd: processRelativeTime$1,
+            M: processRelativeTime$1,
+            MM: processRelativeTime$1,
+            y: processRelativeTime$1,
+            yy: processRelativeTime$1
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : German [de]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+
+    function processRelativeTime$2(number, withoutSuffix, key, isFuture) {
+        var format = {
+            'm': ['eine Minute', 'einer Minute'],
+            'h': ['eine Stunde', 'einer Stunde'],
+            'd': ['ein Tag', 'einem Tag'],
+            'dd': [number + ' Tage', number + ' Tagen'],
+            'M': ['ein Monat', 'einem Monat'],
+            'MM': [number + ' Monate', number + ' Monaten'],
+            'y': ['ein Jahr', 'einem Jahr'],
+            'yy': [number + ' Jahre', number + ' Jahren']
+        };
+        return withoutSuffix ? format[key][0] : format[key][1];
+    }
+
+    hooks.defineLocale('de', {
+        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
+        monthsShort: 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
+        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
+        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY HH:mm',
+            LLLL: 'dddd, D. MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[heute um] LT [Uhr]',
+            sameElse: 'L',
+            nextDay: '[morgen um] LT [Uhr]',
+            nextWeek: 'dddd [um] LT [Uhr]',
+            lastDay: '[gestern um] LT [Uhr]',
+            lastWeek: '[letzten] dddd [um] LT [Uhr]'
+        },
+        relativeTime: {
+            future: 'in %s',
+            past: 'vor %s',
+            s: 'ein paar Sekunden',
+            m: processRelativeTime$2,
+            mm: '%d Minuten',
+            h: processRelativeTime$2,
+            hh: '%d Stunden',
+            d: processRelativeTime$2,
+            dd: processRelativeTime$2,
+            M: processRelativeTime$2,
+            MM: processRelativeTime$2,
+            y: processRelativeTime$2,
+            yy: processRelativeTime$2
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Maldivian [dv]
+//! author : Jawish Hameed : https://github.com/jawish
+
+    var months$4 = [
+        'ޖެނުއަރީ',
+        'ފެބްރުއަރީ',
+        'މާރިޗު',
+        'އޭޕްރީލު',
+        'މޭ',
+        'ޖޫން',
+        'ޖުލައި',
+        'އޯގަސްޓު',
+        'ސެޕްޓެމްބަރު',
+        'އޮކްޓޯބަރު',
+        'ނޮވެމްބަރު',
+        'ޑިސެމްބަރު'
+    ];
+    var weekdays = [
+        'އާދިއްތަ',
+        'ހޯމަ',
+        'އަންގާރަ',
+        'ބުދަ',
+        'ބުރާސްފަތި',
+        'ހުކުރު',
+        'ހޮނިހިރު'
+    ];
+
+    hooks.defineLocale('dv', {
+        months: months$4,
+        monthsShort: months$4,
+        weekdays: weekdays,
+        weekdaysShort: weekdays,
+        weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
+        longDateFormat: {
+
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'D/M/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        meridiemParse: /މކ|މފ/,
+        isPM: function (input) {
+            return 'މފ' === input;
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'މކ';
+            } else {
+                return 'މފ';
+            }
+        },
+        calendar: {
+            sameDay: '[މިއަދު] LT',
+            nextDay: '[މާދަމާ] LT',
+            nextWeek: 'dddd LT',
+            lastDay: '[އިއްޔެ] LT',
+            lastWeek: '[ފާއިތުވި] dddd LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'ތެރޭގައި %s',
+            past: 'ކުރިން %s',
+            s: 'ސިކުންތުކޮޅެއް',
+            m: 'މިނިޓެއް',
+            mm: 'މިނިޓު %d',
+            h: 'ގަޑިއިރެއް',
+            hh: 'ގަޑިއިރު %d',
+            d: 'ދުވަހެއް',
+            dd: 'ދުވަސް %d',
+            M: 'މަހެއް',
+            MM: 'މަސް %d',
+            y: 'އަހަރެއް',
+            yy: 'އަހަރު %d'
+        },
+        preparse: function (string) {
+            return string.replace(/،/g, ',');
+        },
+        postformat: function (string) {
+            return string.replace(/,/g, '،');
+        },
+        week: {
+            dow: 7,  // Sunday is the first day of the week.
+            doy: 12  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Greek [el]
+//! author : Aggelos Karalias : https://github.com/mehiel
+
+    hooks.defineLocale('el', {
+        monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
+        monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
+        months: function (momentToFormat, format) {
+            if (!momentToFormat) {
+                return this._monthsNominativeEl;
+            } else if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
+                return this._monthsGenitiveEl[momentToFormat.month()];
+            } else {
+                return this._monthsNominativeEl[momentToFormat.month()];
+            }
+        },
+        monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
+        weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),
+        weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
+        weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
+        meridiem: function (hours, minutes, isLower) {
+            if (hours > 11) {
+                return isLower ? 'μμ' : 'ΜΜ';
+            } else {
+                return isLower ? 'πμ' : 'ΠΜ';
+            }
+        },
+        isPM: function (input) {
+            return ((input + '').toLowerCase()[0] === 'μ');
+        },
+        meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
+        longDateFormat: {
+            LT: 'h:mm A',
+            LTS: 'h:mm:ss A',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY h:mm A',
+            LLLL: 'dddd, D MMMM YYYY h:mm A'
+        },
+        calendarEl: {
+            sameDay: '[Σήμερα {}] LT',
+            nextDay: '[Αύριο {}] LT',
+            nextWeek: 'dddd [{}] LT',
+            lastDay: '[Χθες {}] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 6:
+                        return '[το προηγούμενο] dddd [{}] LT';
+                    default:
+                        return '[την προηγούμενη] dddd [{}] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        calendar: function (key, mom) {
+            var output = this._calendarEl[key],
+                hours = mom && mom.hours();
+            if (isFunction(output)) {
+                output = output.apply(mom);
+            }
+            return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις'));
+        },
+        relativeTime: {
+            future: 'σε %s',
+            past: '%s πριν',
+            s: 'λίγα δευτερόλεπτα',
+            m: 'ένα λεπτό',
+            mm: '%d λεπτά',
+            h: 'μία ώρα',
+            hh: '%d ώρες',
+            d: 'μία μέρα',
+            dd: '%d μέρες',
+            M: 'ένας μήνας',
+            MM: '%d μήνες',
+            y: 'ένας χρόνος',
+            yy: '%d χρόνια'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}η/,
+        ordinal: '%dη',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : English (Australia) [en-au]
+//! author : Jared Morse : https://github.com/jarcoal
+
+    hooks.defineLocale('en-au', {
+        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+        longDateFormat: {
+            LT: 'h:mm A',
+            LTS: 'h:mm:ss A',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY h:mm A',
+            LLLL: 'dddd, D MMMM YYYY h:mm A'
+        },
+        calendar: {
+            sameDay: '[Today at] LT',
+            nextDay: '[Tomorrow at] LT',
+            nextWeek: 'dddd [at] LT',
+            lastDay: '[Yesterday at] LT',
+            lastWeek: '[Last] dddd [at] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'in %s',
+            past: '%s ago',
+            s: 'a few seconds',
+            m: 'a minute',
+            mm: '%d minutes',
+            h: 'an hour',
+            hh: '%d hours',
+            d: 'a day',
+            dd: '%d days',
+            M: 'a month',
+            MM: '%d months',
+            y: 'a year',
+            yy: '%d years'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (~~(number % 100 / 10) === 1) ? 'th' :
+                    (b === 1) ? 'st' :
+                        (b === 2) ? 'nd' :
+                            (b === 3) ? 'rd' : 'th';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : English (Canada) [en-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
+
+    hooks.defineLocale('en-ca', {
+        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+        longDateFormat: {
+            LT: 'h:mm A',
+            LTS: 'h:mm:ss A',
+            L: 'YYYY-MM-DD',
+            LL: 'MMMM D, YYYY',
+            LLL: 'MMMM D, YYYY h:mm A',
+            LLLL: 'dddd, MMMM D, YYYY h:mm A'
+        },
+        calendar: {
+            sameDay: '[Today at] LT',
+            nextDay: '[Tomorrow at] LT',
+            nextWeek: 'dddd [at] LT',
+            lastDay: '[Yesterday at] LT',
+            lastWeek: '[Last] dddd [at] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'in %s',
+            past: '%s ago',
+            s: 'a few seconds',
+            m: 'a minute',
+            mm: '%d minutes',
+            h: 'an hour',
+            hh: '%d hours',
+            d: 'a day',
+            dd: '%d days',
+            M: 'a month',
+            MM: '%d months',
+            y: 'a year',
+            yy: '%d years'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (~~(number % 100 / 10) === 1) ? 'th' :
+                    (b === 1) ? 'st' :
+                        (b === 2) ? 'nd' :
+                            (b === 3) ? 'rd' : 'th';
+            return number + output;
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : English (United Kingdom) [en-gb]
+//! author : Chris Gedrim : https://github.com/chrisgedrim
+
+    hooks.defineLocale('en-gb', {
+        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Today at] LT',
+            nextDay: '[Tomorrow at] LT',
+            nextWeek: 'dddd [at] LT',
+            lastDay: '[Yesterday at] LT',
+            lastWeek: '[Last] dddd [at] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'in %s',
+            past: '%s ago',
+            s: 'a few seconds',
+            m: 'a minute',
+            mm: '%d minutes',
+            h: 'an hour',
+            hh: '%d hours',
+            d: 'a day',
+            dd: '%d days',
+            M: 'a month',
+            MM: '%d months',
+            y: 'a year',
+            yy: '%d years'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (~~(number % 100 / 10) === 1) ? 'th' :
+                    (b === 1) ? 'st' :
+                        (b === 2) ? 'nd' :
+                            (b === 3) ? 'rd' : 'th';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : English (Ireland) [en-ie]
+//! author : Chris Cartlidge : https://github.com/chriscartlidge
+
+    hooks.defineLocale('en-ie', {
+        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD-MM-YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Today at] LT',
+            nextDay: '[Tomorrow at] LT',
+            nextWeek: 'dddd [at] LT',
+            lastDay: '[Yesterday at] LT',
+            lastWeek: '[Last] dddd [at] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'in %s',
+            past: '%s ago',
+            s: 'a few seconds',
+            m: 'a minute',
+            mm: '%d minutes',
+            h: 'an hour',
+            hh: '%d hours',
+            d: 'a day',
+            dd: '%d days',
+            M: 'a month',
+            MM: '%d months',
+            y: 'a year',
+            yy: '%d years'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (~~(number % 100 / 10) === 1) ? 'th' :
+                    (b === 1) ? 'st' :
+                        (b === 2) ? 'nd' :
+                            (b === 3) ? 'rd' : 'th';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : English (New Zealand) [en-nz]
+//! author : Luke McGregor : https://github.com/lukemcgregor
+
+    hooks.defineLocale('en-nz', {
+        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+        longDateFormat: {
+            LT: 'h:mm A',
+            LTS: 'h:mm:ss A',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY h:mm A',
+            LLLL: 'dddd, D MMMM YYYY h:mm A'
+        },
+        calendar: {
+            sameDay: '[Today at] LT',
+            nextDay: '[Tomorrow at] LT',
+            nextWeek: 'dddd [at] LT',
+            lastDay: '[Yesterday at] LT',
+            lastWeek: '[Last] dddd [at] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'in %s',
+            past: '%s ago',
+            s: 'a few seconds',
+            m: 'a minute',
+            mm: '%d minutes',
+            h: 'an hour',
+            hh: '%d hours',
+            d: 'a day',
+            dd: '%d days',
+            M: 'a month',
+            MM: '%d months',
+            y: 'a year',
+            yy: '%d years'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (~~(number % 100 / 10) === 1) ? 'th' :
+                    (b === 1) ? 'st' :
+                        (b === 2) ? 'nd' :
+                            (b === 3) ? 'rd' : 'th';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Esperanto [eo]
+//! author : Colin Dean : https://github.com/colindean
+//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
+//! comment : miestasmia corrected the translation by colindean
+
+    hooks.defineLocale('eo', {
+        months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),
+        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),
+        weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
+        weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
+        weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY-MM-DD',
+            LL: 'D[-a de] MMMM, YYYY',
+            LLL: 'D[-a de] MMMM, YYYY HH:mm',
+            LLLL: 'dddd, [la] D[-a de] MMMM, YYYY HH:mm'
+        },
+        meridiemParse: /[ap]\.t\.m/i,
+        isPM: function (input) {
+            return input.charAt(0).toLowerCase() === 'p';
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours > 11) {
+                return isLower ? 'p.t.m.' : 'P.T.M.';
+            } else {
+                return isLower ? 'a.t.m.' : 'A.T.M.';
+            }
+        },
+        calendar: {
+            sameDay: '[Hodiaŭ je] LT',
+            nextDay: '[Morgaŭ je] LT',
+            nextWeek: 'dddd [je] LT',
+            lastDay: '[Hieraŭ je] LT',
+            lastWeek: '[pasinta] dddd [je] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'post %s',
+            past: 'antaŭ %s',
+            s: 'sekundoj',
+            m: 'minuto',
+            mm: '%d minutoj',
+            h: 'horo',
+            hh: '%d horoj',
+            d: 'tago',//ne 'diurno', ĉar estas uzita por proksimumo
+            dd: '%d tagoj',
+            M: 'monato',
+            MM: '%d monatoj',
+            y: 'jaro',
+            yy: '%d jaroj'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}a/,
+        ordinal: '%da',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Spanish (Dominican Republic) [es-do]
+
+    var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
+    var monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
+
+    hooks.defineLocale('es-do', {
+        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
+        monthsShort: function (m, format) {
+            if (!m) {
+                return monthsShortDot;
+            } else if (/-MMM-/.test(format)) {
+                return monthsShort$1[m.month()];
+            } else {
+                return monthsShortDot[m.month()];
+            }
+        },
+        monthsParseExact: true,
+        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'h:mm A',
+            LTS: 'h:mm:ss A',
+            L: 'DD/MM/YYYY',
+            LL: 'D [de] MMMM [de] YYYY',
+            LLL: 'D [de] MMMM [de] YYYY h:mm A',
+            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'
+        },
+        calendar: {
+            sameDay: function () {
+                return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            nextDay: function () {
+                return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            nextWeek: function () {
+                return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            lastDay: function () {
+                return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            lastWeek: function () {
+                return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'en %s',
+            past: 'hace %s',
+            s: 'unos segundos',
+            m: 'un minuto',
+            mm: '%d minutos',
+            h: 'una hora',
+            hh: '%d horas',
+            d: 'un día',
+            dd: '%d días',
+            M: 'un mes',
+            MM: '%d meses',
+            y: 'un año',
+            yy: '%d años'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}º/,
+        ordinal: '%dº',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Spanish [es]
+//! author : Julio Napurí : https://github.com/julionc
+
+    var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
+    var monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
+
+    hooks.defineLocale('es', {
+        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
+        monthsShort: function (m, format) {
+            if (!m) {
+                return monthsShortDot$1;
+            } else if (/-MMM-/.test(format)) {
+                return monthsShort$2[m.month()];
+            } else {
+                return monthsShortDot$1[m.month()];
+            }
+        },
+        monthsParseExact: true,
+        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
+        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
+        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D [de] MMMM [de] YYYY',
+            LLL: 'D [de] MMMM [de] YYYY H:mm',
+            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
+        },
+        calendar: {
+            sameDay: function () {
+                return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            nextDay: function () {
+                return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            nextWeek: function () {
+                return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            lastDay: function () {
+                return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            lastWeek: function () {
+                return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'en %s',
+            past: 'hace %s',
+            s: 'unos segundos',
+            m: 'un minuto',
+            mm: '%d minutos',
+            h: 'una hora',
+            hh: '%d horas',
+            d: 'un día',
+            dd: '%d días',
+            M: 'un mes',
+            MM: '%d meses',
+            y: 'un año',
+            yy: '%d años'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}º/,
+        ordinal: '%dº',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Estonian [et]
+//! author : Henry Kehlmann : https://github.com/madhenry
+//! improvements : Illimar Tambek : https://github.com/ragulka
+
+    function processRelativeTime$3(number, withoutSuffix, key, isFuture) {
+        var format = {
+            's': ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
+            'm': ['ühe minuti', 'üks minut'],
+            'mm': [number + ' minuti', number + ' minutit'],
+            'h': ['ühe tunni', 'tund aega', 'üks tund'],
+            'hh': [number + ' tunni', number + ' tundi'],
+            'd': ['ühe päeva', 'üks päev'],
+            'M': ['kuu aja', 'kuu aega', 'üks kuu'],
+            'MM': [number + ' kuu', number + ' kuud'],
+            'y': ['ühe aasta', 'aasta', 'üks aasta'],
+            'yy': [number + ' aasta', number + ' aastat']
+        };
+        if (withoutSuffix) {
+            return format[key][2] ? format[key][2] : format[key][1];
+        }
+        return isFuture ? format[key][0] : format[key][1];
+    }
+
+    hooks.defineLocale('et', {
+        months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
+        monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
+        weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
+        weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
+        weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd, D. MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[Täna,] LT',
+            nextDay: '[Homme,] LT',
+            nextWeek: '[Järgmine] dddd LT',
+            lastDay: '[Eile,] LT',
+            lastWeek: '[Eelmine] dddd LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s pärast',
+            past: '%s tagasi',
+            s: processRelativeTime$3,
+            m: processRelativeTime$3,
+            mm: processRelativeTime$3,
+            h: processRelativeTime$3,
+            hh: processRelativeTime$3,
+            d: processRelativeTime$3,
+            dd: '%d päeva',
+            M: processRelativeTime$3,
+            MM: processRelativeTime$3,
+            y: processRelativeTime$3,
+            yy: processRelativeTime$3
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Basque [eu]
+//! author : Eneko Illarramendi : https://github.com/eillarra
+
+    hooks.defineLocale('eu', {
+        months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),
+        monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),
+        weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
+        weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY-MM-DD',
+            LL: 'YYYY[ko] MMMM[ren] D[a]',
+            LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
+            LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
+            l: 'YYYY-M-D',
+            ll: 'YYYY[ko] MMM D[a]',
+            lll: 'YYYY[ko] MMM D[a] HH:mm',
+            llll: 'ddd, YYYY[ko] MMM D[a] HH:mm'
+        },
+        calendar: {
+            sameDay: '[gaur] LT[etan]',
+            nextDay: '[bihar] LT[etan]',
+            nextWeek: 'dddd LT[etan]',
+            lastDay: '[atzo] LT[etan]',
+            lastWeek: '[aurreko] dddd LT[etan]',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s barru',
+            past: 'duela %s',
+            s: 'segundo batzuk',
+            m: 'minutu bat',
+            mm: '%d minutu',
+            h: 'ordu bat',
+            hh: '%d ordu',
+            d: 'egun bat',
+            dd: '%d egun',
+            M: 'hilabete bat',
+            MM: '%d hilabete',
+            y: 'urte bat',
+            yy: '%d urte'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Persian [fa]
+//! author : Ebrahim Byagowi : https://github.com/ebraminio
+
+    var symbolMap$5 = {
+        '1': '۱',
+        '2': '۲',
+        '3': '۳',
+        '4': '۴',
+        '5': '۵',
+        '6': '۶',
+        '7': '۷',
+        '8': '۸',
+        '9': '۹',
+        '0': '۰'
+    };
+    var numberMap$4 = {
+        '۱': '1',
+        '۲': '2',
+        '۳': '3',
+        '۴': '4',
+        '۵': '5',
+        '۶': '6',
+        '۷': '7',
+        '۸': '8',
+        '۹': '9',
+        '۰': '0'
+    };
+
+    hooks.defineLocale('fa', {
+        months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
+        monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
+        weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
+        weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
+        weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        meridiemParse: /قبل از ظهر|بعد از ظهر/,
+        isPM: function (input) {
+            return /بعد از ظهر/.test(input);
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'قبل از ظهر';
+            } else {
+                return 'بعد از ظهر';
+            }
+        },
+        calendar: {
+            sameDay: '[امروز ساعت] LT',
+            nextDay: '[فردا ساعت] LT',
+            nextWeek: 'dddd [ساعت] LT',
+            lastDay: '[دیروز ساعت] LT',
+            lastWeek: 'dddd [پیش] [ساعت] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'در %s',
+            past: '%s پیش',
+            s: 'چند ثانیه',
+            m: 'یک دقیقه',
+            mm: '%d دقیقه',
+            h: 'یک ساعت',
+            hh: '%d ساعت',
+            d: 'یک روز',
+            dd: '%d روز',
+            M: 'یک ماه',
+            MM: '%d ماه',
+            y: 'یک سال',
+            yy: '%d سال'
+        },
+        preparse: function (string) {
+            return string.replace(/[۰-۹]/g, function (match) {
+                return numberMap$4[match];
+            }).replace(/،/g, ',');
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$5[match];
+            }).replace(/,/g, '،');
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}م/,
+        ordinal: '%dم',
+        week: {
+            dow: 6, // Saturday is the first day of the week.
+            doy: 12 // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Finnish [fi]
+//! author : Tarmo Aidantausta : https://github.com/bleadof
+
+    var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');
+    var numbersFuture = [
+        'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
+        numbersPast[7], numbersPast[8], numbersPast[9]
+    ];
+
+    function translate$2(number, withoutSuffix, key, isFuture) {
+        var result = '';
+        switch (key) {
+            case 's':
+                return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
+            case 'm':
+                return isFuture ? 'minuutin' : 'minuutti';
+            case 'mm':
+                result = isFuture ? 'minuutin' : 'minuuttia';
+                break;
+            case 'h':
+                return isFuture ? 'tunnin' : 'tunti';
+            case 'hh':
+                result = isFuture ? 'tunnin' : 'tuntia';
+                break;
+            case 'd':
+                return isFuture ? 'päivän' : 'päivä';
+            case 'dd':
+                result = isFuture ? 'päivän' : 'päivää';
+                break;
+            case 'M':
+                return isFuture ? 'kuukauden' : 'kuukausi';
+            case 'MM':
+                result = isFuture ? 'kuukauden' : 'kuukautta';
+                break;
+            case 'y':
+                return isFuture ? 'vuoden' : 'vuosi';
+            case 'yy':
+                result = isFuture ? 'vuoden' : 'vuotta';
+                break;
+        }
+        result = verbalNumber(number, isFuture) + ' ' + result;
+        return result;
+    }
+
+    function verbalNumber(number, isFuture) {
+        return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;
+    }
+
+    hooks.defineLocale('fi', {
+        months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
+        monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
+        weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
+        weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
+        weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
+        longDateFormat: {
+            LT: 'HH.mm',
+            LTS: 'HH.mm.ss',
+            L: 'DD.MM.YYYY',
+            LL: 'Do MMMM[ta] YYYY',
+            LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
+            LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
+            l: 'D.M.YYYY',
+            ll: 'Do MMM YYYY',
+            lll: 'Do MMM YYYY, [klo] HH.mm',
+            llll: 'ddd, Do MMM YYYY, [klo] HH.mm'
+        },
+        calendar: {
+            sameDay: '[tänään] [klo] LT',
+            nextDay: '[huomenna] [klo] LT',
+            nextWeek: 'dddd [klo] LT',
+            lastDay: '[eilen] [klo] LT',
+            lastWeek: '[viime] dddd[na] [klo] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s päästä',
+            past: '%s sitten',
+            s: translate$2,
+            m: translate$2,
+            mm: translate$2,
+            h: translate$2,
+            hh: translate$2,
+            d: translate$2,
+            dd: translate$2,
+            M: translate$2,
+            MM: translate$2,
+            y: translate$2,
+            yy: translate$2
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Faroese [fo]
+//! author : Ragnar Johannesen : https://github.com/ragnar123
+
+    hooks.defineLocale('fo', {
+        months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
+        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+        weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),
+        weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
+        weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D. MMMM, YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Í dag kl.] LT',
+            nextDay: '[Í morgin kl.] LT',
+            nextWeek: 'dddd [kl.] LT',
+            lastDay: '[Í gjár kl.] LT',
+            lastWeek: '[síðstu] dddd [kl] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'um %s',
+            past: '%s síðani',
+            s: 'fá sekund',
+            m: 'ein minutt',
+            mm: '%d minuttir',
+            h: 'ein tími',
+            hh: '%d tímar',
+            d: 'ein dagur',
+            dd: '%d dagar',
+            M: 'ein mánaði',
+            MM: '%d mánaðir',
+            y: 'eitt ár',
+            yy: '%d ár'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : French (Canada) [fr-ca]
+//! author : Jonathan Abourbih : https://github.com/jonbca
+
+    hooks.defineLocale('fr-ca', {
+        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
+        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+        weekdaysMin: 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY-MM-DD',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Aujourd’hui à] LT',
+            nextDay: '[Demain à] LT',
+            nextWeek: 'dddd [à] LT',
+            lastDay: '[Hier à] LT',
+            lastWeek: 'dddd [dernier à] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'dans %s',
+            past: 'il y a %s',
+            s: 'quelques secondes',
+            m: 'une minute',
+            mm: '%d minutes',
+            h: 'une heure',
+            hh: '%d heures',
+            d: 'un jour',
+            dd: '%d jours',
+            M: 'un mois',
+            MM: '%d mois',
+            y: 'un an',
+            yy: '%d ans'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                // Words with masculine grammatical gender: mois, trimestre, jour
+                default:
+                case 'M':
+                case 'Q':
+                case 'D':
+                case 'DDD':
+                case 'd':
+                    return number + (number === 1 ? 'er' : 'e');
+
+                // Words with feminine grammatical gender: semaine
+                case 'w':
+                case 'W':
+                    return number + (number === 1 ? 're' : 'e');
+            }
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : French (Switzerland) [fr-ch]
+//! author : Gaspard Bucher : https://github.com/gaspard
+
+    hooks.defineLocale('fr-ch', {
+        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
+        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+        weekdaysMin: 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Aujourd’hui à] LT',
+            nextDay: '[Demain à] LT',
+            nextWeek: 'dddd [à] LT',
+            lastDay: '[Hier à] LT',
+            lastWeek: 'dddd [dernier à] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'dans %s',
+            past: 'il y a %s',
+            s: 'quelques secondes',
+            m: 'une minute',
+            mm: '%d minutes',
+            h: 'une heure',
+            hh: '%d heures',
+            d: 'un jour',
+            dd: '%d jours',
+            M: 'un mois',
+            MM: '%d mois',
+            y: 'un an',
+            yy: '%d ans'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                // Words with masculine grammatical gender: mois, trimestre, jour
+                default:
+                case 'M':
+                case 'Q':
+                case 'D':
+                case 'DDD':
+                case 'd':
+                    return number + (number === 1 ? 'er' : 'e');
+
+                // Words with feminine grammatical gender: semaine
+                case 'w':
+                case 'W':
+                    return number + (number === 1 ? 're' : 'e');
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : French [fr]
+//! author : John Fischer : https://github.com/jfroffice
+
+    hooks.defineLocale('fr', {
+        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
+        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
+        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
+        weekdaysMin: 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Aujourd’hui à] LT',
+            nextDay: '[Demain à] LT',
+            nextWeek: 'dddd [à] LT',
+            lastDay: '[Hier à] LT',
+            lastWeek: 'dddd [dernier à] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'dans %s',
+            past: 'il y a %s',
+            s: 'quelques secondes',
+            m: 'une minute',
+            mm: '%d minutes',
+            h: 'une heure',
+            hh: '%d heures',
+            d: 'un jour',
+            dd: '%d jours',
+            M: 'un mois',
+            MM: '%d mois',
+            y: 'un an',
+            yy: '%d ans'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                // TODO: Return 'e' when day of month > 1. Move this case inside
+                // block for masculine words below.
+                // See https://github.com/moment/moment/issues/3375
+                case 'D':
+                    return number + (number === 1 ? 'er' : '');
+
+                // Words with masculine grammatical gender: mois, trimestre, jour
+                default:
+                case 'M':
+                case 'Q':
+                case 'DDD':
+                case 'd':
+                    return number + (number === 1 ? 'er' : 'e');
+
+                // Words with feminine grammatical gender: semaine
+                case 'w':
+                case 'W':
+                    return number + (number === 1 ? 're' : 'e');
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Frisian [fy]
+//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+
+    var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_');
+    var monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
+
+    hooks.defineLocale('fy', {
+        months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
+        monthsShort: function (m, format) {
+            if (!m) {
+                return monthsShortWithDots;
+            } else if (/-MMM-/.test(format)) {
+                return monthsShortWithoutDots[m.month()];
+            } else {
+                return monthsShortWithDots[m.month()];
+            }
+        },
+        monthsParseExact: true,
+        weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),
+        weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
+        weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD-MM-YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[hjoed om] LT',
+            nextDay: '[moarn om] LT',
+            nextWeek: 'dddd [om] LT',
+            lastDay: '[juster om] LT',
+            lastWeek: '[ôfrûne] dddd [om] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'oer %s',
+            past: '%s lyn',
+            s: 'in pear sekonden',
+            m: 'ien minút',
+            mm: '%d minuten',
+            h: 'ien oere',
+            hh: '%d oeren',
+            d: 'ien dei',
+            dd: '%d dagen',
+            M: 'ien moanne',
+            MM: '%d moannen',
+            y: 'ien jier',
+            yy: '%d jierren'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+        ordinal: function (number) {
+            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Scottish Gaelic [gd]
+//! author : Jon Ashdown : https://github.com/jonashdown
+
+    var months$5 = [
+        'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'
+    ];
+
+    var monthsShort$3 = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'];
+
+    var weekdays$1 = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'];
+
+    var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'];
+
+    var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
+
+    hooks.defineLocale('gd', {
+        months: months$5,
+        monthsShort: monthsShort$3,
+        monthsParseExact: true,
+        weekdays: weekdays$1,
+        weekdaysShort: weekdaysShort,
+        weekdaysMin: weekdaysMin,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[An-diugh aig] LT',
+            nextDay: '[A-màireach aig] LT',
+            nextWeek: 'dddd [aig] LT',
+            lastDay: '[An-dè aig] LT',
+            lastWeek: 'dddd [seo chaidh] [aig] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'ann an %s',
+            past: 'bho chionn %s',
+            s: 'beagan diogan',
+            m: 'mionaid',
+            mm: '%d mionaidean',
+            h: 'uair',
+            hh: '%d uairean',
+            d: 'latha',
+            dd: '%d latha',
+            M: 'mìos',
+            MM: '%d mìosan',
+            y: 'bliadhna',
+            yy: '%d bliadhna'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
+        ordinal: function (number) {
+            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Galician [gl]
+//! author : Juan G. Hurtado : https://github.com/juanghurtado
+
+    hooks.defineLocale('gl', {
+        months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),
+        monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
+        weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
+        weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D [de] MMMM [de] YYYY',
+            LLL: 'D [de] MMMM [de] YYYY H:mm',
+            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
+        },
+        calendar: {
+            sameDay: function () {
+                return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
+            },
+            nextDay: function () {
+                return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
+            },
+            nextWeek: function () {
+                return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
+            },
+            lastDay: function () {
+                return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';
+            },
+            lastWeek: function () {
+                return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: function (str) {
+                if (str.indexOf('un') === 0) {
+                    return 'n' + str;
+                }
+                return 'en ' + str;
+            },
+            past: 'hai %s',
+            s: 'uns segundos',
+            m: 'un minuto',
+            mm: '%d minutos',
+            h: 'unha hora',
+            hh: '%d horas',
+            d: 'un día',
+            dd: '%d días',
+            M: 'un mes',
+            MM: '%d meses',
+            y: 'un ano',
+            yy: '%d anos'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}º/,
+        ordinal: '%dº',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Konkani Latin script [gom-latn]
+//! author : The Discoverer : https://github.com/WikiDiscoverer
+
+    function processRelativeTime$4(number, withoutSuffix, key, isFuture) {
+        var format = {
+            's': ['thodde secondanim', 'thodde second'],
+            'm': ['eka mintan', 'ek minute'],
+            'mm': [number + ' mintanim', number + ' mintam'],
+            'h': ['eka horan', 'ek hor'],
+            'hh': [number + ' horanim', number + ' hor'],
+            'd': ['eka disan', 'ek dis'],
+            'dd': [number + ' disanim', number + ' dis'],
+            'M': ['eka mhoinean', 'ek mhoino'],
+            'MM': [number + ' mhoineanim', number + ' mhoine'],
+            'y': ['eka vorsan', 'ek voros'],
+            'yy': [number + ' vorsanim', number + ' vorsam']
+        };
+        return withoutSuffix ? format[key][0] : format[key][1];
+    }
+
+    hooks.defineLocale('gom-latn', {
+        months: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
+        monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'),
+        weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
+        weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'A h:mm [vazta]',
+            LTS: 'A h:mm:ss [vazta]',
+            L: 'DD-MM-YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY A h:mm [vazta]',
+            LLLL: 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
+            llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
+        },
+        calendar: {
+            sameDay: '[Aiz] LT',
+            nextDay: '[Faleam] LT',
+            nextWeek: '[Ieta to] dddd[,] LT',
+            lastDay: '[Kal] LT',
+            lastWeek: '[Fatlo] dddd[,] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s',
+            past: '%s adim',
+            s: processRelativeTime$4,
+            m: processRelativeTime$4,
+            mm: processRelativeTime$4,
+            h: processRelativeTime$4,
+            hh: processRelativeTime$4,
+            d: processRelativeTime$4,
+            dd: processRelativeTime$4,
+            M: processRelativeTime$4,
+            MM: processRelativeTime$4,
+            y: processRelativeTime$4,
+            yy: processRelativeTime$4
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(er)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                // the ordinal 'er' only applies to day of the month
+                case 'D':
+                    return number + 'er';
+                default:
+                case 'M':
+                case 'Q':
+                case 'DDD':
+                case 'd':
+                case 'w':
+                case 'W':
+                    return number;
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        },
+        meridiemParse: /rati|sokalli|donparam|sanje/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'rati') {
+                return hour < 4 ? hour : hour + 12;
+            } else if (meridiem === 'sokalli') {
+                return hour;
+            } else if (meridiem === 'donparam') {
+                return hour > 12 ? hour : hour + 12;
+            } else if (meridiem === 'sanje') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'rati';
+            } else if (hour < 12) {
+                return 'sokalli';
+            } else if (hour < 16) {
+                return 'donparam';
+            } else if (hour < 20) {
+                return 'sanje';
+            } else {
+                return 'rati';
+            }
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Hebrew [he]
+//! author : Tomer Cohen : https://github.com/tomer
+//! author : Moshe Simantov : https://github.com/DevelopmentIL
+//! author : Tal Ater : https://github.com/TalAter
+
+    hooks.defineLocale('he', {
+        months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
+        monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
+        weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
+        weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
+        weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D [ב]MMMM YYYY',
+            LLL: 'D [ב]MMMM YYYY HH:mm',
+            LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
+            l: 'D/M/YYYY',
+            ll: 'D MMM YYYY',
+            lll: 'D MMM YYYY HH:mm',
+            llll: 'ddd, D MMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[היום ב־]LT',
+            nextDay: '[מחר ב־]LT',
+            nextWeek: 'dddd [בשעה] LT',
+            lastDay: '[אתמול ב־]LT',
+            lastWeek: '[ביום] dddd [האחרון בשעה] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'בעוד %s',
+            past: 'לפני %s',
+            s: 'מספר שניות',
+            m: 'דקה',
+            mm: '%d דקות',
+            h: 'שעה',
+            hh: function (number) {
+                if (number === 2) {
+                    return 'שעתיים';
+                }
+                return number + ' שעות';
+            },
+            d: 'יום',
+            dd: function (number) {
+                if (number === 2) {
+                    return 'יומיים';
+                }
+                return number + ' ימים';
+            },
+            M: 'חודש',
+            MM: function (number) {
+                if (number === 2) {
+                    return 'חודשיים';
+                }
+                return number + ' חודשים';
+            },
+            y: 'שנה',
+            yy: function (number) {
+                if (number === 2) {
+                    return 'שנתיים';
+                } else if (number % 10 === 0 && number !== 10) {
+                    return number + ' שנה';
+                }
+                return number + ' שנים';
+            }
+        },
+        meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
+        isPM: function (input) {
+            return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 5) {
+                return 'לפנות בוקר';
+            } else if (hour < 10) {
+                return 'בבוקר';
+            } else if (hour < 12) {
+                return isLower ? 'לפנה"צ' : 'לפני הצהריים';
+            } else if (hour < 18) {
+                return isLower ? 'אחה"צ' : 'אחרי הצהריים';
+            } else {
+                return 'בערב';
+            }
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Hindi [hi]
+//! author : Mayank Singhal : https://github.com/mayanksinghal
+
+    var symbolMap$6 = {
+        '1': '१',
+        '2': '२',
+        '3': '३',
+        '4': '४',
+        '5': '५',
+        '6': '६',
+        '7': '७',
+        '8': '८',
+        '9': '९',
+        '0': '०'
+    };
+    var numberMap$5 = {
+        '१': '1',
+        '२': '2',
+        '३': '3',
+        '४': '4',
+        '५': '5',
+        '६': '6',
+        '७': '7',
+        '८': '8',
+        '९': '9',
+        '०': '0'
+    };
+
+    hooks.defineLocale('hi', {
+        months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
+        monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+        weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
+        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm बजे',
+            LTS: 'A h:mm:ss बजे',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, A h:mm बजे',
+            LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'
+        },
+        calendar: {
+            sameDay: '[आज] LT',
+            nextDay: '[कल] LT',
+            nextWeek: 'dddd, LT',
+            lastDay: '[कल] LT',
+            lastWeek: '[पिछले] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s में',
+            past: '%s पहले',
+            s: 'कुछ ही क्षण',
+            m: 'एक मिनट',
+            mm: '%d मिनट',
+            h: 'एक घंटा',
+            hh: '%d घंटे',
+            d: 'एक दिन',
+            dd: '%d दिन',
+            M: 'एक महीने',
+            MM: '%d महीने',
+            y: 'एक वर्ष',
+            yy: '%d वर्ष'
+        },
+        preparse: function (string) {
+            return string.replace(/[१२३४५६७८९०]/g, function (match) {
+                return numberMap$5[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$6[match];
+            });
+        },
+        // Hindi notation for meridiems are quite fuzzy in practice. While there exists
+        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
+        meridiemParse: /रात|सुबह|दोपहर|शाम/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'रात') {
+                return hour < 4 ? hour : hour + 12;
+            } else if (meridiem === 'सुबह') {
+                return hour;
+            } else if (meridiem === 'दोपहर') {
+                return hour >= 10 ? hour : hour + 12;
+            } else if (meridiem === 'शाम') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'रात';
+            } else if (hour < 10) {
+                return 'सुबह';
+            } else if (hour < 17) {
+                return 'दोपहर';
+            } else if (hour < 20) {
+                return 'शाम';
+            } else {
+                return 'रात';
+            }
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Croatian [hr]
+//! author : Bojan Marković : https://github.com/bmarkovic
+
+    function translate$3(number, withoutSuffix, key) {
+        var result = number + ' ';
+        switch (key) {
+            case 'm':
+                return withoutSuffix ? 'jedna minuta' : 'jedne minute';
+            case 'mm':
+                if (number === 1) {
+                    result += 'minuta';
+                } else if (number === 2 || number === 3 || number === 4) {
+                    result += 'minute';
+                } else {
+                    result += 'minuta';
+                }
+                return result;
+            case 'h':
+                return withoutSuffix ? 'jedan sat' : 'jednog sata';
+            case 'hh':
+                if (number === 1) {
+                    result += 'sat';
+                } else if (number === 2 || number === 3 || number === 4) {
+                    result += 'sata';
+                } else {
+                    result += 'sati';
+                }
+                return result;
+            case 'dd':
+                if (number === 1) {
+                    result += 'dan';
+                } else {
+                    result += 'dana';
+                }
+                return result;
+            case 'MM':
+                if (number === 1) {
+                    result += 'mjesec';
+                } else if (number === 2 || number === 3 || number === 4) {
+                    result += 'mjeseca';
+                } else {
+                    result += 'mjeseci';
+                }
+                return result;
+            case 'yy':
+                if (number === 1) {
+                    result += 'godina';
+                } else if (number === 2 || number === 3 || number === 4) {
+                    result += 'godine';
+                } else {
+                    result += 'godina';
+                }
+                return result;
+        }
+    }
+
+    hooks.defineLocale('hr', {
+        months: {
+            format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),
+            standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')
+        },
+        monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
+        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd, D. MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[danas u] LT',
+            nextDay: '[sutra u] LT',
+            nextWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[u] [nedjelju] [u] LT';
+                    case 3:
+                        return '[u] [srijedu] [u] LT';
+                    case 6:
+                        return '[u] [subotu] [u] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[u] dddd [u] LT';
+                }
+            },
+            lastDay: '[jučer u] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                    case 3:
+                        return '[prošlu] dddd [u] LT';
+                    case 6:
+                        return '[prošle] [subote] [u] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[prošli] dddd [u] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'za %s',
+            past: 'prije %s',
+            s: 'par sekundi',
+            m: translate$3,
+            mm: translate$3,
+            h: translate$3,
+            hh: translate$3,
+            d: 'dan',
+            dd: translate$3,
+            M: 'mjesec',
+            MM: translate$3,
+            y: 'godinu',
+            yy: translate$3
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Hungarian [hu]
+//! author : Adam Brunner : https://github.com/adambrunner
+
+    var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
+
+    function translate$4(number, withoutSuffix, key, isFuture) {
+        var num = number,
+            suffix;
+        switch (key) {
+            case 's':
+                return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
+            case 'm':
+                return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
+            case 'mm':
+                return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
+            case 'h':
+                return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
+            case 'hh':
+                return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
+            case 'd':
+                return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
+            case 'dd':
+                return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
+            case 'M':
+                return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+            case 'MM':
+                return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
+            case 'y':
+                return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
+            case 'yy':
+                return num + (isFuture || withoutSuffix ? ' év' : ' éve');
+        }
+        return '';
+    }
+
+    function week(isFuture) {
+        return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
+    }
+
+    hooks.defineLocale('hu', {
+        months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
+        monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
+        weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
+        weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
+        weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'YYYY.MM.DD.',
+            LL: 'YYYY. MMMM D.',
+            LLL: 'YYYY. MMMM D. H:mm',
+            LLLL: 'YYYY. MMMM D., dddd H:mm'
+        },
+        meridiemParse: /de|du/i,
+        isPM: function (input) {
+            return input.charAt(1).toLowerCase() === 'u';
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours < 12) {
+                return isLower === true ? 'de' : 'DE';
+            } else {
+                return isLower === true ? 'du' : 'DU';
+            }
+        },
+        calendar: {
+            sameDay: '[ma] LT[-kor]',
+            nextDay: '[holnap] LT[-kor]',
+            nextWeek: function () {
+                return week.call(this, true);
+            },
+            lastDay: '[tegnap] LT[-kor]',
+            lastWeek: function () {
+                return week.call(this, false);
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s múlva',
+            past: '%s',
+            s: translate$4,
+            m: translate$4,
+            mm: translate$4,
+            h: translate$4,
+            hh: translate$4,
+            d: translate$4,
+            dd: translate$4,
+            M: translate$4,
+            MM: translate$4,
+            y: translate$4,
+            yy: translate$4
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Armenian [hy-am]
+//! author : Armendarabyan : https://github.com/armendarabyan
+
+    hooks.defineLocale('hy-am', {
+        months: {
+            format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),
+            standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')
+        },
+        monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
+        weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),
+        weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+        weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY թ.',
+            LLL: 'D MMMM YYYY թ., HH:mm',
+            LLLL: 'dddd, D MMMM YYYY թ., HH:mm'
+        },
+        calendar: {
+            sameDay: '[այսօր] LT',
+            nextDay: '[վաղը] LT',
+            lastDay: '[երեկ] LT',
+            nextWeek: function () {
+                return 'dddd [օրը ժամը] LT';
+            },
+            lastWeek: function () {
+                return '[անցած] dddd [օրը ժամը] LT';
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s հետո',
+            past: '%s առաջ',
+            s: 'մի քանի վայրկյան',
+            m: 'րոպե',
+            mm: '%d րոպե',
+            h: 'ժամ',
+            hh: '%d ժամ',
+            d: 'օր',
+            dd: '%d օր',
+            M: 'ամիս',
+            MM: '%d ամիս',
+            y: 'տարի',
+            yy: '%d տարի'
+        },
+        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
+        isPM: function (input) {
+            return /^(ցերեկվա|երեկոյան)$/.test(input);
+        },
+        meridiem: function (hour) {
+            if (hour < 4) {
+                return 'գիշերվա';
+            } else if (hour < 12) {
+                return 'առավոտվա';
+            } else if (hour < 17) {
+                return 'ցերեկվա';
+            } else {
+                return 'երեկոյան';
+            }
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                case 'DDD':
+                case 'w':
+                case 'W':
+                case 'DDDo':
+                    if (number === 1) {
+                        return number + '-ին';
+                    }
+                    return number + '-րդ';
+                default:
+                    return number;
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Indonesian [id]
+//! author : Mohammad Satrio Utomo : https://github.com/tyok
+//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
+
+    hooks.defineLocale('id', {
+        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
+        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
+        weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
+        weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
+        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
+        longDateFormat: {
+            LT: 'HH.mm',
+            LTS: 'HH.mm.ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY [pukul] HH.mm',
+            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
+        },
+        meridiemParse: /pagi|siang|sore|malam/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'pagi') {
+                return hour;
+            } else if (meridiem === 'siang') {
+                return hour >= 11 ? hour : hour + 12;
+            } else if (meridiem === 'sore' || meridiem === 'malam') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours < 11) {
+                return 'pagi';
+            } else if (hours < 15) {
+                return 'siang';
+            } else if (hours < 19) {
+                return 'sore';
+            } else {
+                return 'malam';
+            }
+        },
+        calendar: {
+            sameDay: '[Hari ini pukul] LT',
+            nextDay: '[Besok pukul] LT',
+            nextWeek: 'dddd [pukul] LT',
+            lastDay: '[Kemarin pukul] LT',
+            lastWeek: 'dddd [lalu pukul] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'dalam %s',
+            past: '%s yang lalu',
+            s: 'beberapa detik',
+            m: 'semenit',
+            mm: '%d menit',
+            h: 'sejam',
+            hh: '%d jam',
+            d: 'sehari',
+            dd: '%d hari',
+            M: 'sebulan',
+            MM: '%d bulan',
+            y: 'setahun',
+            yy: '%d tahun'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Icelandic [is]
+//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
+
+    function plural$2(n) {
+        if (n % 100 === 11) {
+            return true;
+        } else if (n % 10 === 1) {
+            return false;
+        }
+        return true;
+    }
+
+    function translate$5(number, withoutSuffix, key, isFuture) {
+        var result = number + ' ';
+        switch (key) {
+            case 's':
+                return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
+            case 'm':
+                return withoutSuffix ? 'mínúta' : 'mínútu';
+            case 'mm':
+                if (plural$2(number)) {
+                    return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
+                } else if (withoutSuffix) {
+                    return result + 'mínúta';
+                }
+                return result + 'mínútu';
+            case 'hh':
+                if (plural$2(number)) {
+                    return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
+                }
+                return result + 'klukkustund';
+            case 'd':
+                if (withoutSuffix) {
+                    return 'dagur';
+                }
+                return isFuture ? 'dag' : 'degi';
+            case 'dd':
+                if (plural$2(number)) {
+                    if (withoutSuffix) {
+                        return result + 'dagar';
+                    }
+                    return result + (isFuture ? 'daga' : 'dögum');
+                } else if (withoutSuffix) {
+                    return result + 'dagur';
+                }
+                return result + (isFuture ? 'dag' : 'degi');
+            case 'M':
+                if (withoutSuffix) {
+                    return 'mánuður';
+                }
+                return isFuture ? 'mánuð' : 'mánuði';
+            case 'MM':
+                if (plural$2(number)) {
+                    if (withoutSuffix) {
+                        return result + 'mánuðir';
+                    }
+                    return result + (isFuture ? 'mánuði' : 'mánuðum');
+                } else if (withoutSuffix) {
+                    return result + 'mánuður';
+                }
+                return result + (isFuture ? 'mánuð' : 'mánuði');
+            case 'y':
+                return withoutSuffix || isFuture ? 'ár' : 'ári';
+            case 'yy':
+                if (plural$2(number)) {
+                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
+                }
+                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
+        }
+    }
+
+    hooks.defineLocale('is', {
+        months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),
+        monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
+        weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),
+        weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
+        weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY [kl.] H:mm',
+            LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm'
+        },
+        calendar: {
+            sameDay: '[í dag kl.] LT',
+            nextDay: '[á morgun kl.] LT',
+            nextWeek: 'dddd [kl.] LT',
+            lastDay: '[í gær kl.] LT',
+            lastWeek: '[síðasta] dddd [kl.] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'eftir %s',
+            past: 'fyrir %s síðan',
+            s: translate$5,
+            m: translate$5,
+            mm: translate$5,
+            h: 'klukkustund',
+            hh: translate$5,
+            d: translate$5,
+            dd: translate$5,
+            M: translate$5,
+            MM: translate$5,
+            y: translate$5,
+            yy: translate$5
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Italian [it]
+//! author : Lorenzo : https://github.com/aliem
+//! author: Mattia Larentis: https://github.com/nostalgiaz
+
+    hooks.defineLocale('it', {
+        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
+        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
+        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
+        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
+        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Oggi alle] LT',
+            nextDay: '[Domani alle] LT',
+            nextWeek: 'dddd [alle] LT',
+            lastDay: '[Ieri alle] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[la scorsa] dddd [alle] LT';
+                    default:
+                        return '[lo scorso] dddd [alle] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: function (s) {
+                return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
+            },
+            past: '%s fa',
+            s: 'alcuni secondi',
+            m: 'un minuto',
+            mm: '%d minuti',
+            h: 'un\'ora',
+            hh: '%d ore',
+            d: 'un giorno',
+            dd: '%d giorni',
+            M: 'un mese',
+            MM: '%d mesi',
+            y: 'un anno',
+            yy: '%d anni'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}º/,
+        ordinal: '%dº',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Japanese [ja]
+//! author : LI Long : https://github.com/baryon
+
+    hooks.defineLocale('ja', {
+        months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+        weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
+        weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
+        weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY/MM/DD',
+            LL: 'YYYY年M月D日',
+            LLL: 'YYYY年M月D日 HH:mm',
+            LLLL: 'YYYY年M月D日 HH:mm dddd',
+            l: 'YYYY/MM/DD',
+            ll: 'YYYY年M月D日',
+            lll: 'YYYY年M月D日 HH:mm',
+            llll: 'YYYY年M月D日 HH:mm dddd'
+        },
+        meridiemParse: /午前|午後/i,
+        isPM: function (input) {
+            return input === '午後';
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return '午前';
+            } else {
+                return '午後';
+            }
+        },
+        calendar: {
+            sameDay: '[今日] LT',
+            nextDay: '[明日] LT',
+            nextWeek: '[来週]dddd LT',
+            lastDay: '[昨日] LT',
+            lastWeek: '[前週]dddd LT',
+            sameElse: 'L'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}日/,
+        ordinal: function (number, period) {
+            switch (period) {
+                case 'd':
+                case 'D':
+                case 'DDD':
+                    return number + '日';
+                default:
+                    return number;
+            }
+        },
+        relativeTime: {
+            future: '%s後',
+            past: '%s前',
+            s: '数秒',
+            m: '1分',
+            mm: '%d分',
+            h: '1時間',
+            hh: '%d時間',
+            d: '1日',
+            dd: '%d日',
+            M: '1ヶ月',
+            MM: '%dヶ月',
+            y: '1年',
+            yy: '%d年'
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Javanese [jv]
+//! author : Rony Lantip : https://github.com/lantip
+//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
+
+    hooks.defineLocale('jv', {
+        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),
+        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
+        weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
+        weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
+        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
+        longDateFormat: {
+            LT: 'HH.mm',
+            LTS: 'HH.mm.ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY [pukul] HH.mm',
+            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
+        },
+        meridiemParse: /enjing|siyang|sonten|ndalu/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'enjing') {
+                return hour;
+            } else if (meridiem === 'siyang') {
+                return hour >= 11 ? hour : hour + 12;
+            } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours < 11) {
+                return 'enjing';
+            } else if (hours < 15) {
+                return 'siyang';
+            } else if (hours < 19) {
+                return 'sonten';
+            } else {
+                return 'ndalu';
+            }
+        },
+        calendar: {
+            sameDay: '[Dinten puniko pukul] LT',
+            nextDay: '[Mbenjang pukul] LT',
+            nextWeek: 'dddd [pukul] LT',
+            lastDay: '[Kala wingi pukul] LT',
+            lastWeek: 'dddd [kepengker pukul] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'wonten ing %s',
+            past: '%s ingkang kepengker',
+            s: 'sawetawis detik',
+            m: 'setunggal menit',
+            mm: '%d menit',
+            h: 'setunggal jam',
+            hh: '%d jam',
+            d: 'sedinten',
+            dd: '%d dinten',
+            M: 'sewulan',
+            MM: '%d wulan',
+            y: 'setaun',
+            yy: '%d taun'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Georgian [ka]
+//! author : Irakli Janiashvili : https://github.com/irakli-janiashvili
+
+    hooks.defineLocale('ka', {
+        months: {
+            standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
+            format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
+        },
+        monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
+        weekdays: {
+            standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),
+            format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),
+            isFormat: /(წინა|შემდეგ)/
+        },
+        weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
+        weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
+        longDateFormat: {
+            LT: 'h:mm A',
+            LTS: 'h:mm:ss A',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY h:mm A',
+            LLLL: 'dddd, D MMMM YYYY h:mm A'
+        },
+        calendar: {
+            sameDay: '[დღეს] LT[-ზე]',
+            nextDay: '[ხვალ] LT[-ზე]',
+            lastDay: '[გუშინ] LT[-ზე]',
+            nextWeek: '[შემდეგ] dddd LT[-ზე]',
+            lastWeek: '[წინა] dddd LT-ზე',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: function (s) {
+                return (/(წამი|წუთი|საათი|წელი)/).test(s) ?
+                    s.replace(/ი$/, 'ში') :
+                    s + 'ში';
+            },
+            past: function (s) {
+                if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
+                    return s.replace(/(ი|ე)$/, 'ის უკან');
+                }
+                if ((/წელი/).test(s)) {
+                    return s.replace(/წელი$/, 'წლის უკან');
+                }
+            },
+            s: 'რამდენიმე წამი',
+            m: 'წუთი',
+            mm: '%d წუთი',
+            h: 'საათი',
+            hh: '%d საათი',
+            d: 'დღე',
+            dd: '%d დღე',
+            M: 'თვე',
+            MM: '%d თვე',
+            y: 'წელი',
+            yy: '%d წელი'
+        },
+        dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
+        ordinal: function (number) {
+            if (number === 0) {
+                return number;
+            }
+            if (number === 1) {
+                return number + '-ლი';
+            }
+            if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
+                return 'მე-' + number;
+            }
+            return number + '-ე';
+        },
+        week: {
+            dow: 1,
+            doy: 7
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Kazakh [kk]
+//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
+
+    var suffixes$1 = {
+        0: '-ші',
+        1: '-ші',
+        2: '-ші',
+        3: '-ші',
+        4: '-ші',
+        5: '-ші',
+        6: '-шы',
+        7: '-ші',
+        8: '-ші',
+        9: '-шы',
+        10: '-шы',
+        20: '-шы',
+        30: '-шы',
+        40: '-шы',
+        50: '-ші',
+        60: '-шы',
+        70: '-ші',
+        80: '-ші',
+        90: '-шы',
+        100: '-ші'
+    };
+
+    hooks.defineLocale('kk', {
+        months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),
+        monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
+        weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),
+        weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
+        weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Бүгін сағат] LT',
+            nextDay: '[Ертең сағат] LT',
+            nextWeek: 'dddd [сағат] LT',
+            lastDay: '[Кеше сағат] LT',
+            lastWeek: '[Өткен аптаның] dddd [сағат] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s ішінде',
+            past: '%s бұрын',
+            s: 'бірнеше секунд',
+            m: 'бір минут',
+            mm: '%d минут',
+            h: 'бір сағат',
+            hh: '%d сағат',
+            d: 'бір күн',
+            dd: '%d күн',
+            M: 'бір ай',
+            MM: '%d ай',
+            y: 'бір жыл',
+            yy: '%d жыл'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
+        ordinal: function (number) {
+            var a = number % 10,
+                b = number >= 100 ? 100 : null;
+            return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]);
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Cambodian [km]
+//! author : Kruy Vanna : https://github.com/kruyvanna
+
+    hooks.defineLocale('km', {
+        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
+        monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
+        weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+        weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+        weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
+            nextDay: '[ស្អែក ម៉ោង] LT',
+            nextWeek: 'dddd [ម៉ោង] LT',
+            lastDay: '[ម្សិលមិញ ម៉ោង] LT',
+            lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%sទៀត',
+            past: '%sមុន',
+            s: 'ប៉ុន្មានវិនាទី',
+            m: 'មួយនាទី',
+            mm: '%d នាទី',
+            h: 'មួយម៉ោង',
+            hh: '%d ម៉ោង',
+            d: 'មួយថ្ងៃ',
+            dd: '%d ថ្ងៃ',
+            M: 'មួយខែ',
+            MM: '%d ខែ',
+            y: 'មួយឆ្នាំ',
+            yy: '%d ឆ្នាំ'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4 // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Kannada [kn]
+//! author : Rajeev Naik : https://github.com/rajeevnaikte
+
+    var symbolMap$7 = {
+        '1': '೧',
+        '2': '೨',
+        '3': '೩',
+        '4': '೪',
+        '5': '೫',
+        '6': '೬',
+        '7': '೭',
+        '8': '೮',
+        '9': '೯',
+        '0': '೦'
+    };
+    var numberMap$6 = {
+        '೧': '1',
+        '೨': '2',
+        '೩': '3',
+        '೪': '4',
+        '೫': '5',
+        '೬': '6',
+        '೭': '7',
+        '೮': '8',
+        '೯': '9',
+        '೦': '0'
+    };
+
+    hooks.defineLocale('kn', {
+        months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),
+        monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),
+        weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
+        weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm',
+            LTS: 'A h:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, A h:mm',
+            LLLL: 'dddd, D MMMM YYYY, A h:mm'
+        },
+        calendar: {
+            sameDay: '[ಇಂದು] LT',
+            nextDay: '[ನಾಳೆ] LT',
+            nextWeek: 'dddd, LT',
+            lastDay: '[ನಿನ್ನೆ] LT',
+            lastWeek: '[ಕೊನೆಯ] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s ನಂತರ',
+            past: '%s ಹಿಂದೆ',
+            s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
+            m: 'ಒಂದು ನಿಮಿಷ',
+            mm: '%d ನಿಮಿಷ',
+            h: 'ಒಂದು ಗಂಟೆ',
+            hh: '%d ಗಂಟೆ',
+            d: 'ಒಂದು ದಿನ',
+            dd: '%d ದಿನ',
+            M: 'ಒಂದು ತಿಂಗಳು',
+            MM: '%d ತಿಂಗಳು',
+            y: 'ಒಂದು ವರ್ಷ',
+            yy: '%d ವರ್ಷ'
+        },
+        preparse: function (string) {
+            return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
+                return numberMap$6[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$7[match];
+            });
+        },
+        meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'ರಾತ್ರಿ') {
+                return hour < 4 ? hour : hour + 12;
+            } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
+                return hour;
+            } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
+                return hour >= 10 ? hour : hour + 12;
+            } else if (meridiem === 'ಸಂಜೆ') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'ರಾತ್ರಿ';
+            } else if (hour < 10) {
+                return 'ಬೆಳಿಗ್ಗೆ';
+            } else if (hour < 17) {
+                return 'ಮಧ್ಯಾಹ್ನ';
+            } else if (hour < 20) {
+                return 'ಸಂಜೆ';
+            } else {
+                return 'ರಾತ್ರಿ';
+            }
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
+        ordinal: function (number) {
+            return number + 'ನೇ';
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Korean [ko]
+//! author : Kyungwook, Park : https://github.com/kyungw00k
+//! author : Jeeeyul Lee <jeeeyul@gmail.com>
+
+    hooks.defineLocale('ko', {
+        months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+        monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+        weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
+        weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
+        weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm',
+            LTS: 'A h:mm:ss',
+            L: 'YYYY.MM.DD',
+            LL: 'YYYY년 MMMM D일',
+            LLL: 'YYYY년 MMMM D일 A h:mm',
+            LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
+            l: 'YYYY.MM.DD',
+            ll: 'YYYY년 MMMM D일',
+            lll: 'YYYY년 MMMM D일 A h:mm',
+            llll: 'YYYY년 MMMM D일 dddd A h:mm'
+        },
+        calendar: {
+            sameDay: '오늘 LT',
+            nextDay: '내일 LT',
+            nextWeek: 'dddd LT',
+            lastDay: '어제 LT',
+            lastWeek: '지난주 dddd LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s 후',
+            past: '%s 전',
+            s: '몇 초',
+            ss: '%d초',
+            m: '1분',
+            mm: '%d분',
+            h: '한 시간',
+            hh: '%d시간',
+            d: '하루',
+            dd: '%d일',
+            M: '한 달',
+            MM: '%d달',
+            y: '일 년',
+            yy: '%d년'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}일/,
+        ordinal: '%d일',
+        meridiemParse: /오전|오후/,
+        isPM: function (token) {
+            return token === '오후';
+        },
+        meridiem: function (hour, minute, isUpper) {
+            return hour < 12 ? '오전' : '오후';
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Kyrgyz [ky]
+//! author : Chyngyz Arystan uulu : https://github.com/chyngyz
+
+
+    var suffixes$2 = {
+        0: '-чү',
+        1: '-чи',
+        2: '-чи',
+        3: '-чү',
+        4: '-чү',
+        5: '-чи',
+        6: '-чы',
+        7: '-чи',
+        8: '-чи',
+        9: '-чу',
+        10: '-чу',
+        20: '-чы',
+        30: '-чу',
+        40: '-чы',
+        50: '-чү',
+        60: '-чы',
+        70: '-чи',
+        80: '-чи',
+        90: '-чу',
+        100: '-чү'
+    };
+
+    hooks.defineLocale('ky', {
+        months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
+        monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
+        weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),
+        weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
+        weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Бүгүн саат] LT',
+            nextDay: '[Эртең саат] LT',
+            nextWeek: 'dddd [саат] LT',
+            lastDay: '[Кече саат] LT',
+            lastWeek: '[Өткен аптанын] dddd [күнү] [саат] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s ичинде',
+            past: '%s мурун',
+            s: 'бирнече секунд',
+            m: 'бир мүнөт',
+            mm: '%d мүнөт',
+            h: 'бир саат',
+            hh: '%d саат',
+            d: 'бир күн',
+            dd: '%d күн',
+            M: 'бир ай',
+            MM: '%d ай',
+            y: 'бир жыл',
+            yy: '%d жыл'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
+        ordinal: function (number) {
+            var a = number % 10,
+                b = number >= 100 ? 100 : null;
+            return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]);
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Luxembourgish [lb]
+//! author : mweimerskirch : https://github.com/mweimerskirch
+//! author : David Raison : https://github.com/kwisatz
+
+    function processRelativeTime$5(number, withoutSuffix, key, isFuture) {
+        var format = {
+            'm': ['eng Minutt', 'enger Minutt'],
+            'h': ['eng Stonn', 'enger Stonn'],
+            'd': ['een Dag', 'engem Dag'],
+            'M': ['ee Mount', 'engem Mount'],
+            'y': ['ee Joer', 'engem Joer']
+        };
+        return withoutSuffix ? format[key][0] : format[key][1];
+    }
+
+    function processFutureTime(string) {
+        var number = string.substr(0, string.indexOf(' '));
+        if (eifelerRegelAppliesToNumber(number)) {
+            return 'a ' + string;
+        }
+        return 'an ' + string;
+    }
+
+    function processPastTime(string) {
+        var number = string.substr(0, string.indexOf(' '));
+        if (eifelerRegelAppliesToNumber(number)) {
+            return 'viru ' + string;
+        }
+        return 'virun ' + string;
+    }
+
+    /**
+     * Returns true if the word before the given number loses the '-n' ending.
+     * e.g. 'an 10 Deeg' but 'a 5 Deeg'
+     *
+     * @param number {integer}
+     * @returns {boolean}
+     */
+    function eifelerRegelAppliesToNumber(number) {
+        number = parseInt(number, 10);
+        if (isNaN(number)) {
+            return false;
+        }
+        if (number < 0) {
+            // Negative Number --> always true
+            return true;
+        } else if (number < 10) {
+            // Only 1 digit
+            if (4 <= number && number <= 7) {
+                return true;
+            }
+            return false;
+        } else if (number < 100) {
+            // 2 digits
+            var lastDigit = number % 10, firstDigit = number / 10;
+            if (lastDigit === 0) {
+                return eifelerRegelAppliesToNumber(firstDigit);
+            }
+            return eifelerRegelAppliesToNumber(lastDigit);
+        } else if (number < 10000) {
+            // 3 or 4 digits --> recursively check first digit
+            while (number >= 10) {
+                number = number / 10;
+            }
+            return eifelerRegelAppliesToNumber(number);
+        } else {
+            // Anything larger than 4 digits: recursively check first n-3 digits
+            number = number / 1000;
+            return eifelerRegelAppliesToNumber(number);
+        }
+    }
+
+    hooks.defineLocale('lb', {
+        months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
+        monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),
+        weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
+        weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm [Auer]',
+            LTS: 'H:mm:ss [Auer]',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm [Auer]',
+            LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'
+        },
+        calendar: {
+            sameDay: '[Haut um] LT',
+            sameElse: 'L',
+            nextDay: '[Muer um] LT',
+            nextWeek: 'dddd [um] LT',
+            lastDay: '[Gëschter um] LT',
+            lastWeek: function () {
+                // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
+                switch (this.day()) {
+                    case 2:
+                    case 4:
+                        return '[Leschten] dddd [um] LT';
+                    default:
+                        return '[Leschte] dddd [um] LT';
+                }
+            }
+        },
+        relativeTime: {
+            future: processFutureTime,
+            past: processPastTime,
+            s: 'e puer Sekonnen',
+            m: processRelativeTime$5,
+            mm: '%d Minutten',
+            h: processRelativeTime$5,
+            hh: '%d Stonnen',
+            d: processRelativeTime$5,
+            dd: '%d Deeg',
+            M: processRelativeTime$5,
+            MM: '%d Méint',
+            y: processRelativeTime$5,
+            yy: '%d Joer'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Lao [lo]
+//! author : Ryan Hart : https://github.com/ryanhart2
+
+    hooks.defineLocale('lo', {
+        months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
+        monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
+        weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+        weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
+        weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'ວັນdddd D MMMM YYYY HH:mm'
+        },
+        meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
+        isPM: function (input) {
+            return input === 'ຕອນແລງ';
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'ຕອນເຊົ້າ';
+            } else {
+                return 'ຕອນແລງ';
+            }
+        },
+        calendar: {
+            sameDay: '[ມື້ນີ້ເວລາ] LT',
+            nextDay: '[ມື້ອື່ນເວລາ] LT',
+            nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
+            lastDay: '[ມື້ວານນີ້ເວລາ] LT',
+            lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'ອີກ %s',
+            past: '%sຜ່ານມາ',
+            s: 'ບໍ່ເທົ່າໃດວິນາທີ',
+            m: '1 ນາທີ',
+            mm: '%d ນາທີ',
+            h: '1 ຊົ່ວໂມງ',
+            hh: '%d ຊົ່ວໂມງ',
+            d: '1 ມື້',
+            dd: '%d ມື້',
+            M: '1 ເດືອນ',
+            MM: '%d ເດືອນ',
+            y: '1 ປີ',
+            yy: '%d ປີ'
+        },
+        dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
+        ordinal: function (number) {
+            return 'ທີ່' + number;
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Lithuanian [lt]
+//! author : Mindaugas Mozūras : https://github.com/mmozuras
+
+    var units = {
+        'm': 'minutė_minutės_minutę',
+        'mm': 'minutės_minučių_minutes',
+        'h': 'valanda_valandos_valandą',
+        'hh': 'valandos_valandų_valandas',
+        'd': 'diena_dienos_dieną',
+        'dd': 'dienos_dienų_dienas',
+        'M': 'mėnuo_mėnesio_mėnesį',
+        'MM': 'mėnesiai_mėnesių_mėnesius',
+        'y': 'metai_metų_metus',
+        'yy': 'metai_metų_metus'
+    };
+
+    function translateSeconds(number, withoutSuffix, key, isFuture) {
+        if (withoutSuffix) {
+            return 'kelios sekundės';
+        } else {
+            return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
+        }
+    }
+
+    function translateSingular(number, withoutSuffix, key, isFuture) {
+        return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
+    }
+
+    function special(number) {
+        return number % 10 === 0 || (number > 10 && number < 20);
+    }
+
+    function forms(key) {
+        return units[key].split('_');
+    }
+
+    function translate$6(number, withoutSuffix, key, isFuture) {
+        var result = number + ' ';
+        if (number === 1) {
+            return result + translateSingular(number, withoutSuffix, key[0], isFuture);
+        } else if (withoutSuffix) {
+            return result + (special(number) ? forms(key)[1] : forms(key)[0]);
+        } else {
+            if (isFuture) {
+                return result + forms(key)[1];
+            } else {
+                return result + (special(number) ? forms(key)[1] : forms(key)[2]);
+            }
+        }
+    }
+
+    hooks.defineLocale('lt', {
+        months: {
+            format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
+            standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
+            isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
+        },
+        monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
+        weekdays: {
+            format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
+            standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
+            isFormat: /dddd HH:mm/
+        },
+        weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
+        weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY-MM-DD',
+            LL: 'YYYY [m.] MMMM D [d.]',
+            LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+            LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
+            l: 'YYYY-MM-DD',
+            ll: 'YYYY [m.] MMMM D [d.]',
+            lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
+            llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
+        },
+        calendar: {
+            sameDay: '[Šiandien] LT',
+            nextDay: '[Rytoj] LT',
+            nextWeek: 'dddd LT',
+            lastDay: '[Vakar] LT',
+            lastWeek: '[Praėjusį] dddd LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'po %s',
+            past: 'prieš %s',
+            s: translateSeconds,
+            m: translateSingular,
+            mm: translate$6,
+            h: translateSingular,
+            hh: translate$6,
+            d: translateSingular,
+            dd: translate$6,
+            M: translateSingular,
+            MM: translate$6,
+            y: translateSingular,
+            yy: translate$6
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-oji/,
+        ordinal: function (number) {
+            return number + '-oji';
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Latvian [lv]
+//! author : Kristaps Karlsons : https://github.com/skakri
+//! author : Jānis Elmeris : https://github.com/JanisE
+
+    var units$1 = {
+        'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+        'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
+        'h': 'stundas_stundām_stunda_stundas'.split('_'),
+        'hh': 'stundas_stundām_stunda_stundas'.split('_'),
+        'd': 'dienas_dienām_diena_dienas'.split('_'),
+        'dd': 'dienas_dienām_diena_dienas'.split('_'),
+        'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+        'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
+        'y': 'gada_gadiem_gads_gadi'.split('_'),
+        'yy': 'gada_gadiem_gads_gadi'.split('_')
+    };
+
+    /**
+     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+     */
+    function format$1(forms, number, withoutSuffix) {
+        if (withoutSuffix) {
+            // E.g. "21 minūte", "3 minūtes".
+            return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
+        } else {
+            // E.g. "21 minūtes" as in "pēc 21 minūtes".
+            // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
+            return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
+        }
+    }
+
+    function relativeTimeWithPlural$1(number, withoutSuffix, key) {
+        return number + ' ' + format$1(units$1[key], number, withoutSuffix);
+    }
+
+    function relativeTimeWithSingular(number, withoutSuffix, key) {
+        return format$1(units$1[key], number, withoutSuffix);
+    }
+
+    function relativeSeconds(number, withoutSuffix) {
+        return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
+    }
+
+    hooks.defineLocale('lv', {
+        months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
+        monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
+        weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
+        weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
+        weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY.',
+            LL: 'YYYY. [gada] D. MMMM',
+            LLL: 'YYYY. [gada] D. MMMM, HH:mm',
+            LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm'
+        },
+        calendar: {
+            sameDay: '[Šodien pulksten] LT',
+            nextDay: '[Rīt pulksten] LT',
+            nextWeek: 'dddd [pulksten] LT',
+            lastDay: '[Vakar pulksten] LT',
+            lastWeek: '[Pagājušā] dddd [pulksten] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'pēc %s',
+            past: 'pirms %s',
+            s: relativeSeconds,
+            m: relativeTimeWithSingular,
+            mm: relativeTimeWithPlural$1,
+            h: relativeTimeWithSingular,
+            hh: relativeTimeWithPlural$1,
+            d: relativeTimeWithSingular,
+            dd: relativeTimeWithPlural$1,
+            M: relativeTimeWithSingular,
+            MM: relativeTimeWithPlural$1,
+            y: relativeTimeWithSingular,
+            yy: relativeTimeWithPlural$1
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Montenegrin [me]
+//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
+
+    var translator = {
+        words: { //Different grammatical cases
+            m: ['jedan minut', 'jednog minuta'],
+            mm: ['minut', 'minuta', 'minuta'],
+            h: ['jedan sat', 'jednog sata'],
+            hh: ['sat', 'sata', 'sati'],
+            dd: ['dan', 'dana', 'dana'],
+            MM: ['mjesec', 'mjeseca', 'mjeseci'],
+            yy: ['godina', 'godine', 'godina']
+        },
+        correctGrammaticalCase: function (number, wordKey) {
+            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
+        },
+        translate: function (number, withoutSuffix, key) {
+            var wordKey = translator.words[key];
+            if (key.length === 1) {
+                return withoutSuffix ? wordKey[0] : wordKey[1];
+            } else {
+                return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
+            }
+        }
+    };
+
+    hooks.defineLocale('me', {
+        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
+        monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
+        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
+        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd, D. MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[danas u] LT',
+            nextDay: '[sjutra u] LT',
+
+            nextWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[u] [nedjelju] [u] LT';
+                    case 3:
+                        return '[u] [srijedu] [u] LT';
+                    case 6:
+                        return '[u] [subotu] [u] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[u] dddd [u] LT';
+                }
+            },
+            lastDay: '[juče u] LT',
+            lastWeek: function () {
+                var lastWeekDays = [
+                    '[prošle] [nedjelje] [u] LT',
+                    '[prošlog] [ponedjeljka] [u] LT',
+                    '[prošlog] [utorka] [u] LT',
+                    '[prošle] [srijede] [u] LT',
+                    '[prošlog] [četvrtka] [u] LT',
+                    '[prošlog] [petka] [u] LT',
+                    '[prošle] [subote] [u] LT'
+                ];
+                return lastWeekDays[this.day()];
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'za %s',
+            past: 'prije %s',
+            s: 'nekoliko sekundi',
+            m: translator.translate,
+            mm: translator.translate,
+            h: translator.translate,
+            hh: translator.translate,
+            d: 'dan',
+            dd: translator.translate,
+            M: 'mjesec',
+            MM: translator.translate,
+            y: 'godinu',
+            yy: translator.translate
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Maori [mi]
+//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal
+
+    hooks.defineLocale('mi', {
+        months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),
+        monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),
+        monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+        monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+        monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
+        monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
+        weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
+        weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+        weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY [i] HH:mm',
+            LLLL: 'dddd, D MMMM YYYY [i] HH:mm'
+        },
+        calendar: {
+            sameDay: '[i teie mahana, i] LT',
+            nextDay: '[apopo i] LT',
+            nextWeek: 'dddd [i] LT',
+            lastDay: '[inanahi i] LT',
+            lastWeek: 'dddd [whakamutunga i] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'i roto i %s',
+            past: '%s i mua',
+            s: 'te hēkona ruarua',
+            m: 'he meneti',
+            mm: '%d meneti',
+            h: 'te haora',
+            hh: '%d haora',
+            d: 'he ra',
+            dd: '%d ra',
+            M: 'he marama',
+            MM: '%d marama',
+            y: 'he tau',
+            yy: '%d tau'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}º/,
+        ordinal: '%dº',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Macedonian [mk]
+//! author : Borislav Mickov : https://github.com/B0k0
+
+    hooks.defineLocale('mk', {
+        months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),
+        monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
+        weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),
+        weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
+        weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'D.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY H:mm',
+            LLLL: 'dddd, D MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[Денес во] LT',
+            nextDay: '[Утре во] LT',
+            nextWeek: '[Во] dddd [во] LT',
+            lastDay: '[Вчера во] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                    case 3:
+                    case 6:
+                        return '[Изминатата] dddd [во] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[Изминатиот] dddd [во] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'после %s',
+            past: 'пред %s',
+            s: 'неколку секунди',
+            m: 'минута',
+            mm: '%d минути',
+            h: 'час',
+            hh: '%d часа',
+            d: 'ден',
+            dd: '%d дена',
+            M: 'месец',
+            MM: '%d месеци',
+            y: 'година',
+            yy: '%d години'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
+        ordinal: function (number) {
+            var lastDigit = number % 10,
+                last2Digits = number % 100;
+            if (number === 0) {
+                return number + '-ев';
+            } else if (last2Digits === 0) {
+                return number + '-ен';
+            } else if (last2Digits > 10 && last2Digits < 20) {
+                return number + '-ти';
+            } else if (lastDigit === 1) {
+                return number + '-ви';
+            } else if (lastDigit === 2) {
+                return number + '-ри';
+            } else if (lastDigit === 7 || lastDigit === 8) {
+                return number + '-ми';
+            } else {
+                return number + '-ти';
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Malayalam [ml]
+//! author : Floyd Pink : https://github.com/floydpink
+
+    hooks.defineLocale('ml', {
+        months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),
+        monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),
+        weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
+        weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm -നു',
+            LTS: 'A h:mm:ss -നു',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, A h:mm -നു',
+            LLLL: 'dddd, D MMMM YYYY, A h:mm -നു'
+        },
+        calendar: {
+            sameDay: '[ഇന്ന്] LT',
+            nextDay: '[നാളെ] LT',
+            nextWeek: 'dddd, LT',
+            lastDay: '[ഇന്നലെ] LT',
+            lastWeek: '[കഴിഞ്ഞ] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s കഴിഞ്ഞ്',
+            past: '%s മുൻപ്',
+            s: 'അൽപ നിമിഷങ്ങൾ',
+            m: 'ഒരു മിനിറ്റ്',
+            mm: '%d മിനിറ്റ്',
+            h: 'ഒരു മണിക്കൂർ',
+            hh: '%d മണിക്കൂർ',
+            d: 'ഒരു ദിവസം',
+            dd: '%d ദിവസം',
+            M: 'ഒരു മാസം',
+            MM: '%d മാസം',
+            y: 'ഒരു വർഷം',
+            yy: '%d വർഷം'
+        },
+        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if ((meridiem === 'രാത്രി' && hour >= 4) ||
+                meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
+                meridiem === 'വൈകുന്നേരം') {
+                return hour + 12;
+            } else {
+                return hour;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'രാത്രി';
+            } else if (hour < 12) {
+                return 'രാവിലെ';
+            } else if (hour < 17) {
+                return 'ഉച്ച കഴിഞ്ഞ്';
+            } else if (hour < 20) {
+                return 'വൈകുന്നേരം';
+            } else {
+                return 'രാത്രി';
+            }
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Marathi [mr]
+//! author : Harshad Kale : https://github.com/kalehv
+//! author : Vivek Athalye : https://github.com/vnathalye
+
+    var symbolMap$8 = {
+        '1': '१',
+        '2': '२',
+        '3': '३',
+        '4': '४',
+        '5': '५',
+        '6': '६',
+        '7': '७',
+        '8': '८',
+        '9': '९',
+        '0': '०'
+    };
+    var numberMap$7 = {
+        '१': '1',
+        '२': '2',
+        '३': '3',
+        '४': '4',
+        '५': '5',
+        '६': '6',
+        '७': '7',
+        '८': '8',
+        '९': '9',
+        '०': '0'
+    };
+
+    function relativeTimeMr(number, withoutSuffix, string, isFuture) {
+        var output = '';
+        if (withoutSuffix) {
+            switch (string) {
+                case 's':
+                    output = 'काही सेकंद';
+                    break;
+                case 'm':
+                    output = 'एक मिनिट';
+                    break;
+                case 'mm':
+                    output = '%d मिनिटे';
+                    break;
+                case 'h':
+                    output = 'एक तास';
+                    break;
+                case 'hh':
+                    output = '%d तास';
+                    break;
+                case 'd':
+                    output = 'एक दिवस';
+                    break;
+                case 'dd':
+                    output = '%d दिवस';
+                    break;
+                case 'M':
+                    output = 'एक महिना';
+                    break;
+                case 'MM':
+                    output = '%d महिने';
+                    break;
+                case 'y':
+                    output = 'एक वर्ष';
+                    break;
+                case 'yy':
+                    output = '%d वर्षे';
+                    break;
+            }
+        }
+        else {
+            switch (string) {
+                case 's':
+                    output = 'काही सेकंदां';
+                    break;
+                case 'm':
+                    output = 'एका मिनिटा';
+                    break;
+                case 'mm':
+                    output = '%d मिनिटां';
+                    break;
+                case 'h':
+                    output = 'एका तासा';
+                    break;
+                case 'hh':
+                    output = '%d तासां';
+                    break;
+                case 'd':
+                    output = 'एका दिवसा';
+                    break;
+                case 'dd':
+                    output = '%d दिवसां';
+                    break;
+                case 'M':
+                    output = 'एका महिन्या';
+                    break;
+                case 'MM':
+                    output = '%d महिन्यां';
+                    break;
+                case 'y':
+                    output = 'एका वर्षा';
+                    break;
+                case 'yy':
+                    output = '%d वर्षां';
+                    break;
+            }
+        }
+        return output.replace(/%d/i, number);
+    }
+
+    hooks.defineLocale('mr', {
+        months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),
+        monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
+        weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
+        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm वाजता',
+            LTS: 'A h:mm:ss वाजता',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, A h:mm वाजता',
+            LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता'
+        },
+        calendar: {
+            sameDay: '[आज] LT',
+            nextDay: '[उद्या] LT',
+            nextWeek: 'dddd, LT',
+            lastDay: '[काल] LT',
+            lastWeek: '[मागील] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%sमध्ये',
+            past: '%sपूर्वी',
+            s: relativeTimeMr,
+            m: relativeTimeMr,
+            mm: relativeTimeMr,
+            h: relativeTimeMr,
+            hh: relativeTimeMr,
+            d: relativeTimeMr,
+            dd: relativeTimeMr,
+            M: relativeTimeMr,
+            MM: relativeTimeMr,
+            y: relativeTimeMr,
+            yy: relativeTimeMr
+        },
+        preparse: function (string) {
+            return string.replace(/[१२३४५६७८९०]/g, function (match) {
+                return numberMap$7[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$8[match];
+            });
+        },
+        meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'रात्री') {
+                return hour < 4 ? hour : hour + 12;
+            } else if (meridiem === 'सकाळी') {
+                return hour;
+            } else if (meridiem === 'दुपारी') {
+                return hour >= 10 ? hour : hour + 12;
+            } else if (meridiem === 'सायंकाळी') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'रात्री';
+            } else if (hour < 10) {
+                return 'सकाळी';
+            } else if (hour < 17) {
+                return 'दुपारी';
+            } else if (hour < 20) {
+                return 'सायंकाळी';
+            } else {
+                return 'रात्री';
+            }
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Malay [ms-my]
+//! note : DEPRECATED, the correct one is [ms]
+//! author : Weldan Jamili : https://github.com/weldan
+
+    hooks.defineLocale('ms-my', {
+        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
+        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+        longDateFormat: {
+            LT: 'HH.mm',
+            LTS: 'HH.mm.ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY [pukul] HH.mm',
+            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
+        },
+        meridiemParse: /pagi|tengahari|petang|malam/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'pagi') {
+                return hour;
+            } else if (meridiem === 'tengahari') {
+                return hour >= 11 ? hour : hour + 12;
+            } else if (meridiem === 'petang' || meridiem === 'malam') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours < 11) {
+                return 'pagi';
+            } else if (hours < 15) {
+                return 'tengahari';
+            } else if (hours < 19) {
+                return 'petang';
+            } else {
+                return 'malam';
+            }
+        },
+        calendar: {
+            sameDay: '[Hari ini pukul] LT',
+            nextDay: '[Esok pukul] LT',
+            nextWeek: 'dddd [pukul] LT',
+            lastDay: '[Kelmarin pukul] LT',
+            lastWeek: 'dddd [lepas pukul] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'dalam %s',
+            past: '%s yang lepas',
+            s: 'beberapa saat',
+            m: 'seminit',
+            mm: '%d minit',
+            h: 'sejam',
+            hh: '%d jam',
+            d: 'sehari',
+            dd: '%d hari',
+            M: 'sebulan',
+            MM: '%d bulan',
+            y: 'setahun',
+            yy: '%d tahun'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Malay [ms]
+//! author : Weldan Jamili : https://github.com/weldan
+
+    hooks.defineLocale('ms', {
+        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
+        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
+        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
+        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
+        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
+        longDateFormat: {
+            LT: 'HH.mm',
+            LTS: 'HH.mm.ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY [pukul] HH.mm',
+            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
+        },
+        meridiemParse: /pagi|tengahari|petang|malam/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'pagi') {
+                return hour;
+            } else if (meridiem === 'tengahari') {
+                return hour >= 11 ? hour : hour + 12;
+            } else if (meridiem === 'petang' || meridiem === 'malam') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours < 11) {
+                return 'pagi';
+            } else if (hours < 15) {
+                return 'tengahari';
+            } else if (hours < 19) {
+                return 'petang';
+            } else {
+                return 'malam';
+            }
+        },
+        calendar: {
+            sameDay: '[Hari ini pukul] LT',
+            nextDay: '[Esok pukul] LT',
+            nextWeek: 'dddd [pukul] LT',
+            lastDay: '[Kelmarin pukul] LT',
+            lastWeek: 'dddd [lepas pukul] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'dalam %s',
+            past: '%s yang lepas',
+            s: 'beberapa saat',
+            m: 'seminit',
+            mm: '%d minit',
+            h: 'sejam',
+            hh: '%d jam',
+            d: 'sehari',
+            dd: '%d hari',
+            M: 'sebulan',
+            MM: '%d bulan',
+            y: 'setahun',
+            yy: '%d tahun'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Burmese [my]
+//! author : Squar team, mysquar.com
+//! author : David Rossellat : https://github.com/gholadr
+//! author : Tin Aung Lin : https://github.com/thanyawzinmin
+
+    var symbolMap$9 = {
+        '1': '၁',
+        '2': '၂',
+        '3': '၃',
+        '4': '၄',
+        '5': '၅',
+        '6': '၆',
+        '7': '၇',
+        '8': '၈',
+        '9': '၉',
+        '0': '၀'
+    };
+    var numberMap$8 = {
+        '၁': '1',
+        '၂': '2',
+        '၃': '3',
+        '၄': '4',
+        '၅': '5',
+        '၆': '6',
+        '၇': '7',
+        '၈': '8',
+        '၉': '9',
+        '၀': '0'
+    };
+
+    hooks.defineLocale('my', {
+        months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),
+        monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
+        weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),
+        weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+        weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[ယနေ.] LT [မှာ]',
+            nextDay: '[မနက်ဖြန်] LT [မှာ]',
+            nextWeek: 'dddd LT [မှာ]',
+            lastDay: '[မနေ.က] LT [မှာ]',
+            lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'လာမည့် %s မှာ',
+            past: 'လွန်ခဲ့သော %s က',
+            s: 'စက္ကန်.အနည်းငယ်',
+            m: 'တစ်မိနစ်',
+            mm: '%d မိနစ်',
+            h: 'တစ်နာရီ',
+            hh: '%d နာရီ',
+            d: 'တစ်ရက်',
+            dd: '%d ရက်',
+            M: 'တစ်လ',
+            MM: '%d လ',
+            y: 'တစ်နှစ်',
+            yy: '%d နှစ်'
+        },
+        preparse: function (string) {
+            return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
+                return numberMap$8[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$9[match];
+            });
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4 // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Norwegian Bokmål [nb]
+//! authors : Espen Hovlandsdal : https://github.com/rexxars
+//!           Sigurd Gartmann : https://github.com/sigurdga
+
+    hooks.defineLocale('nb', {
+        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
+        monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
+        weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
+        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY [kl.] HH:mm',
+            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
+        },
+        calendar: {
+            sameDay: '[i dag kl.] LT',
+            nextDay: '[i morgen kl.] LT',
+            nextWeek: 'dddd [kl.] LT',
+            lastDay: '[i går kl.] LT',
+            lastWeek: '[forrige] dddd [kl.] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'om %s',
+            past: '%s siden',
+            s: 'noen sekunder',
+            m: 'ett minutt',
+            mm: '%d minutter',
+            h: 'en time',
+            hh: '%d timer',
+            d: 'en dag',
+            dd: '%d dager',
+            M: 'en måned',
+            MM: '%d måneder',
+            y: 'ett år',
+            yy: '%d år'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Nepalese [ne]
+//! author : suvash : https://github.com/suvash
+
+    var symbolMap$10 = {
+        '1': '१',
+        '2': '२',
+        '3': '३',
+        '4': '४',
+        '5': '५',
+        '6': '६',
+        '7': '७',
+        '8': '८',
+        '9': '९',
+        '0': '०'
+    };
+    var numberMap$9 = {
+        '१': '1',
+        '२': '2',
+        '३': '3',
+        '४': '4',
+        '५': '5',
+        '६': '6',
+        '७': '7',
+        '८': '8',
+        '९': '9',
+        '०': '0'
+    };
+
+    hooks.defineLocale('ne', {
+        months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),
+        monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),
+        weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
+        weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'Aको h:mm बजे',
+            LTS: 'Aको h:mm:ss बजे',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, Aको h:mm बजे',
+            LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे'
+        },
+        preparse: function (string) {
+            return string.replace(/[१२३४५६७८९०]/g, function (match) {
+                return numberMap$9[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$10[match];
+            });
+        },
+        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'राति') {
+                return hour < 4 ? hour : hour + 12;
+            } else if (meridiem === 'बिहान') {
+                return hour;
+            } else if (meridiem === 'दिउँसो') {
+                return hour >= 10 ? hour : hour + 12;
+            } else if (meridiem === 'साँझ') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 3) {
+                return 'राति';
+            } else if (hour < 12) {
+                return 'बिहान';
+            } else if (hour < 16) {
+                return 'दिउँसो';
+            } else if (hour < 20) {
+                return 'साँझ';
+            } else {
+                return 'राति';
+            }
+        },
+        calendar: {
+            sameDay: '[आज] LT',
+            nextDay: '[भोलि] LT',
+            nextWeek: '[आउँदो] dddd[,] LT',
+            lastDay: '[हिजो] LT',
+            lastWeek: '[गएको] dddd[,] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%sमा',
+            past: '%s अगाडि',
+            s: 'केही क्षण',
+            m: 'एक मिनेट',
+            mm: '%d मिनेट',
+            h: 'एक घण्टा',
+            hh: '%d घण्टा',
+            d: 'एक दिन',
+            dd: '%d दिन',
+            M: 'एक महिना',
+            MM: '%d महिना',
+            y: 'एक बर्ष',
+            yy: '%d बर्ष'
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Dutch (Belgium) [nl-be]
+//! author : Joris Röling : https://github.com/jorisroling
+//! author : Jacob Middag : https://github.com/middagj
+
+    var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
+    var monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
+
+    var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
+    var monthsRegex$1 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+    hooks.defineLocale('nl-be', {
+        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
+        monthsShort: function (m, format) {
+            if (!m) {
+                return monthsShortWithDots$1;
+            } else if (/-MMM-/.test(format)) {
+                return monthsShortWithoutDots$1[m.month()];
+            } else {
+                return monthsShortWithDots$1[m.month()];
+            }
+        },
+
+        monthsRegex: monthsRegex$1,
+        monthsShortRegex: monthsRegex$1,
+        monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
+        monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+        monthsParse: monthsParse,
+        longMonthsParse: monthsParse,
+        shortMonthsParse: monthsParse,
+
+        weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+        weekdaysMin: 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[vandaag om] LT',
+            nextDay: '[morgen om] LT',
+            nextWeek: 'dddd [om] LT',
+            lastDay: '[gisteren om] LT',
+            lastWeek: '[afgelopen] dddd [om] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'over %s',
+            past: '%s geleden',
+            s: 'een paar seconden',
+            m: 'één minuut',
+            mm: '%d minuten',
+            h: 'één uur',
+            hh: '%d uur',
+            d: 'één dag',
+            dd: '%d dagen',
+            M: 'één maand',
+            MM: '%d maanden',
+            y: 'één jaar',
+            yy: '%d jaar'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+        ordinal: function (number) {
+            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Dutch [nl]
+//! author : Joris Röling : https://github.com/jorisroling
+//! author : Jacob Middag : https://github.com/middagj
+
+    var monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
+    var monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
+
+    var monthsParse$1 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
+    var monthsRegex$2 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+
+    hooks.defineLocale('nl', {
+        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
+        monthsShort: function (m, format) {
+            if (!m) {
+                return monthsShortWithDots$2;
+            } else if (/-MMM-/.test(format)) {
+                return monthsShortWithoutDots$2[m.month()];
+            } else {
+                return monthsShortWithDots$2[m.month()];
+            }
+        },
+
+        monthsRegex: monthsRegex$2,
+        monthsShortRegex: monthsRegex$2,
+        monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
+        monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
+
+        monthsParse: monthsParse$1,
+        longMonthsParse: monthsParse$1,
+        shortMonthsParse: monthsParse$1,
+
+        weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
+        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
+        weekdaysMin: 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD-MM-YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[vandaag om] LT',
+            nextDay: '[morgen om] LT',
+            nextWeek: 'dddd [om] LT',
+            lastDay: '[gisteren om] LT',
+            lastWeek: '[afgelopen] dddd [om] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'over %s',
+            past: '%s geleden',
+            s: 'een paar seconden',
+            m: 'één minuut',
+            mm: '%d minuten',
+            h: 'één uur',
+            hh: '%d uur',
+            d: 'één dag',
+            dd: '%d dagen',
+            M: 'één maand',
+            MM: '%d maanden',
+            y: 'één jaar',
+            yy: '%d jaar'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
+        ordinal: function (number) {
+            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Nynorsk [nn]
+//! author : https://github.com/mechuwind
+
+    hooks.defineLocale('nn', {
+        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
+        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
+        weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
+        weekdaysShort: 'sun_mån_tys_ons_tor_fre_lau'.split('_'),
+        weekdaysMin: 'su_må_ty_on_to_fr_lø'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY [kl.] H:mm',
+            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
+        },
+        calendar: {
+            sameDay: '[I dag klokka] LT',
+            nextDay: '[I morgon klokka] LT',
+            nextWeek: 'dddd [klokka] LT',
+            lastDay: '[I går klokka] LT',
+            lastWeek: '[Føregåande] dddd [klokka] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'om %s',
+            past: '%s sidan',
+            s: 'nokre sekund',
+            m: 'eit minutt',
+            mm: '%d minutt',
+            h: 'ein time',
+            hh: '%d timar',
+            d: 'ein dag',
+            dd: '%d dagar',
+            M: 'ein månad',
+            MM: '%d månader',
+            y: 'eit år',
+            yy: '%d år'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Punjabi (India) [pa-in]
+//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
+
+    var symbolMap$11 = {
+        '1': '੧',
+        '2': '੨',
+        '3': '੩',
+        '4': '੪',
+        '5': '੫',
+        '6': '੬',
+        '7': '੭',
+        '8': '੮',
+        '9': '੯',
+        '0': '੦'
+    };
+    var numberMap$10 = {
+        '੧': '1',
+        '੨': '2',
+        '੩': '3',
+        '੪': '4',
+        '੫': '5',
+        '੬': '6',
+        '੭': '7',
+        '੮': '8',
+        '੯': '9',
+        '੦': '0'
+    };
+
+    hooks.defineLocale('pa-in', {
+        // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.
+        months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
+        monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
+        weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),
+        weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+        weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm ਵਜੇ',
+            LTS: 'A h:mm:ss ਵਜੇ',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
+            LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'
+        },
+        calendar: {
+            sameDay: '[ਅਜ] LT',
+            nextDay: '[ਕਲ] LT',
+            nextWeek: 'dddd, LT',
+            lastDay: '[ਕਲ] LT',
+            lastWeek: '[ਪਿਛਲੇ] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s ਵਿੱਚ',
+            past: '%s ਪਿਛਲੇ',
+            s: 'ਕੁਝ ਸਕਿੰਟ',
+            m: 'ਇਕ ਮਿੰਟ',
+            mm: '%d ਮਿੰਟ',
+            h: 'ਇੱਕ ਘੰਟਾ',
+            hh: '%d ਘੰਟੇ',
+            d: 'ਇੱਕ ਦਿਨ',
+            dd: '%d ਦਿਨ',
+            M: 'ਇੱਕ ਮਹੀਨਾ',
+            MM: '%d ਮਹੀਨੇ',
+            y: 'ਇੱਕ ਸਾਲ',
+            yy: '%d ਸਾਲ'
+        },
+        preparse: function (string) {
+            return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
+                return numberMap$10[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$11[match];
+            });
+        },
+        // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
+        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
+        meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'ਰਾਤ') {
+                return hour < 4 ? hour : hour + 12;
+            } else if (meridiem === 'ਸਵੇਰ') {
+                return hour;
+            } else if (meridiem === 'ਦੁਪਹਿਰ') {
+                return hour >= 10 ? hour : hour + 12;
+            } else if (meridiem === 'ਸ਼ਾਮ') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'ਰਾਤ';
+            } else if (hour < 10) {
+                return 'ਸਵੇਰ';
+            } else if (hour < 17) {
+                return 'ਦੁਪਹਿਰ';
+            } else if (hour < 20) {
+                return 'ਸ਼ਾਮ';
+            } else {
+                return 'ਰਾਤ';
+            }
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Polish [pl]
+//! author : Rafal Hirsz : https://github.com/evoL
+
+    var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
+    var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
+
+    function plural$3(n) {
+        return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
+    }
+
+    function translate$7(number, withoutSuffix, key) {
+        var result = number + ' ';
+        switch (key) {
+            case 'm':
+                return withoutSuffix ? 'minuta' : 'minutę';
+            case 'mm':
+                return result + (plural$3(number) ? 'minuty' : 'minut');
+            case 'h':
+                return withoutSuffix ? 'godzina' : 'godzinę';
+            case 'hh':
+                return result + (plural$3(number) ? 'godziny' : 'godzin');
+            case 'MM':
+                return result + (plural$3(number) ? 'miesiące' : 'miesięcy');
+            case 'yy':
+                return result + (plural$3(number) ? 'lata' : 'lat');
+        }
+    }
+
+    hooks.defineLocale('pl', {
+        months: function (momentToFormat, format) {
+            if (!momentToFormat) {
+                return monthsNominative;
+            } else if (format === '') {
+                // Hack: if format empty we know this is used to generate
+                // RegExp by moment. Give then back both valid forms of months
+                // in RegExp ready format.
+                return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
+            } else if (/D MMMM/.test(format)) {
+                return monthsSubjective[momentToFormat.month()];
+            } else {
+                return monthsNominative[momentToFormat.month()];
+            }
+        },
+        monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
+        weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
+        weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
+        weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Dziś o] LT',
+            nextDay: '[Jutro o] LT',
+            nextWeek: '[W] dddd [o] LT',
+            lastDay: '[Wczoraj o] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[W zeszłą niedzielę o] LT';
+                    case 3:
+                        return '[W zeszłą środę o] LT';
+                    case 6:
+                        return '[W zeszłą sobotę o] LT';
+                    default:
+                        return '[W zeszły] dddd [o] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'za %s',
+            past: '%s temu',
+            s: 'kilka sekund',
+            m: translate$7,
+            mm: translate$7,
+            h: translate$7,
+            hh: translate$7,
+            d: '1 dzień',
+            dd: '%d dni',
+            M: 'miesiąc',
+            MM: translate$7,
+            y: 'rok',
+            yy: translate$7
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Portuguese (Brazil) [pt-br]
+//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
+
+    hooks.defineLocale('pt-br', {
+        months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
+        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+        weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
+        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D [de] MMMM [de] YYYY',
+            LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
+            LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
+        },
+        calendar: {
+            sameDay: '[Hoje às] LT',
+            nextDay: '[Amanhã às] LT',
+            nextWeek: 'dddd [às] LT',
+            lastDay: '[Ontem às] LT',
+            lastWeek: function () {
+                return (this.day() === 0 || this.day() === 6) ?
+                    '[Último] dddd [às] LT' : // Saturday + Sunday
+                    '[Última] dddd [às] LT'; // Monday - Friday
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'em %s',
+            past: '%s atrás',
+            s: 'poucos segundos',
+            m: 'um minuto',
+            mm: '%d minutos',
+            h: 'uma hora',
+            hh: '%d horas',
+            d: 'um dia',
+            dd: '%d dias',
+            M: 'um mês',
+            MM: '%d meses',
+            y: 'um ano',
+            yy: '%d anos'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}º/,
+        ordinal: '%dº'
+    });
+
+//! moment.js locale configuration
+//! locale : Portuguese [pt]
+//! author : Jefferson : https://github.com/jalex79
+
+    hooks.defineLocale('pt', {
+        months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
+        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
+        weekdays: 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),
+        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
+        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D [de] MMMM [de] YYYY',
+            LLL: 'D [de] MMMM [de] YYYY HH:mm',
+            LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Hoje às] LT',
+            nextDay: '[Amanhã às] LT',
+            nextWeek: 'dddd [às] LT',
+            lastDay: '[Ontem às] LT',
+            lastWeek: function () {
+                return (this.day() === 0 || this.day() === 6) ?
+                    '[Último] dddd [às] LT' : // Saturday + Sunday
+                    '[Última] dddd [às] LT'; // Monday - Friday
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'em %s',
+            past: 'há %s',
+            s: 'segundos',
+            m: 'um minuto',
+            mm: '%d minutos',
+            h: 'uma hora',
+            hh: '%d horas',
+            d: 'um dia',
+            dd: '%d dias',
+            M: 'um mês',
+            MM: '%d meses',
+            y: 'um ano',
+            yy: '%d anos'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}º/,
+        ordinal: '%dº',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Romanian [ro]
+//! author : Vlad Gurdiga : https://github.com/gurdiga
+//! author : Valentin Agachi : https://github.com/avaly
+
+    function relativeTimeWithPlural$2(number, withoutSuffix, key) {
+        var format = {
+                'mm': 'minute',
+                'hh': 'ore',
+                'dd': 'zile',
+                'MM': 'luni',
+                'yy': 'ani'
+            },
+            separator = ' ';
+        if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
+            separator = ' de ';
+        }
+        return number + separator + format[key];
+    }
+
+    hooks.defineLocale('ro', {
+        months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
+        monthsShort: 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
+        weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
+        weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY H:mm',
+            LLLL: 'dddd, D MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[azi la] LT',
+            nextDay: '[mâine la] LT',
+            nextWeek: 'dddd [la] LT',
+            lastDay: '[ieri la] LT',
+            lastWeek: '[fosta] dddd [la] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'peste %s',
+            past: '%s în urmă',
+            s: 'câteva secunde',
+            m: 'un minut',
+            mm: relativeTimeWithPlural$2,
+            h: 'o oră',
+            hh: relativeTimeWithPlural$2,
+            d: 'o zi',
+            dd: relativeTimeWithPlural$2,
+            M: 'o lună',
+            MM: relativeTimeWithPlural$2,
+            y: 'un an',
+            yy: relativeTimeWithPlural$2
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Russian [ru]
+//! author : Viktorminator : https://github.com/Viktorminator
+//! Author : Menelion Elensúle : https://github.com/Oire
+//! author : Коренберг Марк : https://github.com/socketpair
+
+    function plural$4(word, num) {
+        var forms = word.split('_');
+        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
+    }
+
+    function relativeTimeWithPlural$3(number, withoutSuffix, key) {
+        var format = {
+            'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
+            'hh': 'час_часа_часов',
+            'dd': 'день_дня_дней',
+            'MM': 'месяц_месяца_месяцев',
+            'yy': 'год_года_лет'
+        };
+        if (key === 'm') {
+            return withoutSuffix ? 'минута' : 'минуту';
+        }
+        else {
+            return number + ' ' + plural$4(format[key], +number);
+        }
+    }
+
+    var monthsParse$2 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
+
+// http://new.gramota.ru/spravka/rules/139-prop : § 103
+// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
+// CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
+    hooks.defineLocale('ru', {
+        months: {
+            format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
+            standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
+        },
+        monthsShort: {
+            // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
+            format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
+            standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
+        },
+        weekdays: {
+            standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
+            format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
+            isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
+        },
+        weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+        weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+        monthsParse: monthsParse$2,
+        longMonthsParse: monthsParse$2,
+        shortMonthsParse: monthsParse$2,
+
+        // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
+        monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+        // копия предыдущего
+        monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+
+        // полные названия с падежами
+        monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+
+        // Выражение, которое соотвествует только сокращённым формам
+        monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY г.',
+            LLL: 'D MMMM YYYY г., HH:mm',
+            LLLL: 'dddd, D MMMM YYYY г., HH:mm'
+        },
+        calendar: {
+            sameDay: '[Сегодня в] LT',
+            nextDay: '[Завтра в] LT',
+            lastDay: '[Вчера в] LT',
+            nextWeek: function (now) {
+                if (now.week() !== this.week()) {
+                    switch (this.day()) {
+                        case 0:
+                            return '[В следующее] dddd [в] LT';
+                        case 1:
+                        case 2:
+                        case 4:
+                            return '[В следующий] dddd [в] LT';
+                        case 3:
+                        case 5:
+                        case 6:
+                            return '[В следующую] dddd [в] LT';
+                    }
+                } else {
+                    if (this.day() === 2) {
+                        return '[Во] dddd [в] LT';
+                    } else {
+                        return '[В] dddd [в] LT';
+                    }
+                }
+            },
+            lastWeek: function (now) {
+                if (now.week() !== this.week()) {
+                    switch (this.day()) {
+                        case 0:
+                            return '[В прошлое] dddd [в] LT';
+                        case 1:
+                        case 2:
+                        case 4:
+                            return '[В прошлый] dddd [в] LT';
+                        case 3:
+                        case 5:
+                        case 6:
+                            return '[В прошлую] dddd [в] LT';
+                    }
+                } else {
+                    if (this.day() === 2) {
+                        return '[Во] dddd [в] LT';
+                    } else {
+                        return '[В] dddd [в] LT';
+                    }
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'через %s',
+            past: '%s назад',
+            s: 'несколько секунд',
+            m: relativeTimeWithPlural$3,
+            mm: relativeTimeWithPlural$3,
+            h: 'час',
+            hh: relativeTimeWithPlural$3,
+            d: 'день',
+            dd: relativeTimeWithPlural$3,
+            M: 'месяц',
+            MM: relativeTimeWithPlural$3,
+            y: 'год',
+            yy: relativeTimeWithPlural$3
+        },
+        meridiemParse: /ночи|утра|дня|вечера/i,
+        isPM: function (input) {
+            return /^(дня|вечера)$/.test(input);
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'ночи';
+            } else if (hour < 12) {
+                return 'утра';
+            } else if (hour < 17) {
+                return 'дня';
+            } else {
+                return 'вечера';
+            }
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                case 'M':
+                case 'd':
+                case 'DDD':
+                    return number + '-й';
+                case 'D':
+                    return number + '-го';
+                case 'w':
+                case 'W':
+                    return number + '-я';
+                default:
+                    return number;
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Sindhi [sd]
+//! author : Narain Sagar : https://github.com/narainsagar
+
+    var months$6 = [
+        'جنوري',
+        'فيبروري',
+        'مارچ',
+        'اپريل',
+        'مئي',
+        'جون',
+        'جولاءِ',
+        'آگسٽ',
+        'سيپٽمبر',
+        'آڪٽوبر',
+        'نومبر',
+        'ڊسمبر'
+    ];
+    var days$1 = [
+        'آچر',
+        'سومر',
+        'اڱارو',
+        'اربع',
+        'خميس',
+        'جمع',
+        'ڇنڇر'
+    ];
+
+    hooks.defineLocale('sd', {
+        months: months$6,
+        monthsShort: months$6,
+        weekdays: days$1,
+        weekdaysShort: days$1,
+        weekdaysMin: days$1,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd، D MMMM YYYY HH:mm'
+        },
+        meridiemParse: /صبح|شام/,
+        isPM: function (input) {
+            return 'شام' === input;
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'صبح';
+            }
+            return 'شام';
+        },
+        calendar: {
+            sameDay: '[اڄ] LT',
+            nextDay: '[سڀاڻي] LT',
+            nextWeek: 'dddd [اڳين هفتي تي] LT',
+            lastDay: '[ڪالهه] LT',
+            lastWeek: '[گزريل هفتي] dddd [تي] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s پوء',
+            past: '%s اڳ',
+            s: 'چند سيڪنڊ',
+            m: 'هڪ منٽ',
+            mm: '%d منٽ',
+            h: 'هڪ ڪلاڪ',
+            hh: '%d ڪلاڪ',
+            d: 'هڪ ڏينهن',
+            dd: '%d ڏينهن',
+            M: 'هڪ مهينو',
+            MM: '%d مهينا',
+            y: 'هڪ سال',
+            yy: '%d سال'
+        },
+        preparse: function (string) {
+            return string.replace(/،/g, ',');
+        },
+        postformat: function (string) {
+            return string.replace(/,/g, '،');
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Northern Sami [se]
+//! authors : Bård Rolstad Henriksen : https://github.com/karamell
+
+
+    hooks.defineLocale('se', {
+        months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),
+        monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
+        weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),
+        weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
+        weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'MMMM D. [b.] YYYY',
+            LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
+            LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'
+        },
+        calendar: {
+            sameDay: '[otne ti] LT',
+            nextDay: '[ihttin ti] LT',
+            nextWeek: 'dddd [ti] LT',
+            lastDay: '[ikte ti] LT',
+            lastWeek: '[ovddit] dddd [ti] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s geažes',
+            past: 'maŋit %s',
+            s: 'moadde sekunddat',
+            m: 'okta minuhta',
+            mm: '%d minuhtat',
+            h: 'okta diimmu',
+            hh: '%d diimmut',
+            d: 'okta beaivi',
+            dd: '%d beaivvit',
+            M: 'okta mánnu',
+            MM: '%d mánut',
+            y: 'okta jahki',
+            yy: '%d jagit'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Sinhalese [si]
+//! author : Sampath Sitinamaluwa : https://github.com/sampathsris
+
+    /*jshint -W100*/
+    hooks.defineLocale('si', {
+        months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),
+        monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),
+        weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),
+        weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
+        weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'a h:mm',
+            LTS: 'a h:mm:ss',
+            L: 'YYYY/MM/DD',
+            LL: 'YYYY MMMM D',
+            LLL: 'YYYY MMMM D, a h:mm',
+            LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'
+        },
+        calendar: {
+            sameDay: '[අද] LT[ට]',
+            nextDay: '[හෙට] LT[ට]',
+            nextWeek: 'dddd LT[ට]',
+            lastDay: '[ඊයේ] LT[ට]',
+            lastWeek: '[පසුගිය] dddd LT[ට]',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%sකින්',
+            past: '%sකට පෙර',
+            s: 'තත්පර කිහිපය',
+            m: 'මිනිත්තුව',
+            mm: 'මිනිත්තු %d',
+            h: 'පැය',
+            hh: 'පැය %d',
+            d: 'දිනය',
+            dd: 'දින %d',
+            M: 'මාසය',
+            MM: 'මාස %d',
+            y: 'වසර',
+            yy: 'වසර %d'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
+        ordinal: function (number) {
+            return number + ' වැනි';
+        },
+        meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
+        isPM: function (input) {
+            return input === 'ප.ව.' || input === 'පස් වරු';
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours > 11) {
+                return isLower ? 'ප.ව.' : 'පස් වරු';
+            } else {
+                return isLower ? 'පෙ.ව.' : 'පෙර වරු';
+            }
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Slovak [sk]
+//! author : Martin Minka : https://github.com/k2s
+//! based on work of petrbela : https://github.com/petrbela
+
+    var months$7 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');
+    var monthsShort$4 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
+
+    function plural$5(n) {
+        return (n > 1) && (n < 5);
+    }
+
+    function translate$8(number, withoutSuffix, key, isFuture) {
+        var result = number + ' ';
+        switch (key) {
+            case 's':  // a few seconds / in a few seconds / a few seconds ago
+                return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
+            case 'm':  // a minute / in a minute / a minute ago
+                return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
+            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$5(number) ? 'minúty' : 'minút');
+                } else {
+                    return result + 'minútami';
+                }
+                break;
+            case 'h':  // an hour / in an hour / an hour ago
+                return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
+            case 'hh': // 9 hours / in 9 hours / 9 hours ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$5(number) ? 'hodiny' : 'hodín');
+                } else {
+                    return result + 'hodinami';
+                }
+                break;
+            case 'd':  // a day / in a day / a day ago
+                return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
+            case 'dd': // 9 days / in 9 days / 9 days ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$5(number) ? 'dni' : 'dní');
+                } else {
+                    return result + 'dňami';
+                }
+                break;
+            case 'M':  // a month / in a month / a month ago
+                return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
+            case 'MM': // 9 months / in 9 months / 9 months ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$5(number) ? 'mesiace' : 'mesiacov');
+                } else {
+                    return result + 'mesiacmi';
+                }
+                break;
+            case 'y':  // a year / in a year / a year ago
+                return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
+            case 'yy': // 9 years / in 9 years / 9 years ago
+                if (withoutSuffix || isFuture) {
+                    return result + (plural$5(number) ? 'roky' : 'rokov');
+                } else {
+                    return result + 'rokmi';
+                }
+                break;
+        }
+    }
+
+    hooks.defineLocale('sk', {
+        months: months$7,
+        monthsShort: monthsShort$4,
+        weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
+        weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
+        weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd D. MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[dnes o] LT',
+            nextDay: '[zajtra o] LT',
+            nextWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[v nedeľu o] LT';
+                    case 1:
+                    case 2:
+                        return '[v] dddd [o] LT';
+                    case 3:
+                        return '[v stredu o] LT';
+                    case 4:
+                        return '[vo štvrtok o] LT';
+                    case 5:
+                        return '[v piatok o] LT';
+                    case 6:
+                        return '[v sobotu o] LT';
+                }
+            },
+            lastDay: '[včera o] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[minulú nedeľu o] LT';
+                    case 1:
+                    case 2:
+                        return '[minulý] dddd [o] LT';
+                    case 3:
+                        return '[minulú stredu o] LT';
+                    case 4:
+                    case 5:
+                        return '[minulý] dddd [o] LT';
+                    case 6:
+                        return '[minulú sobotu o] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'za %s',
+            past: 'pred %s',
+            s: translate$8,
+            m: translate$8,
+            mm: translate$8,
+            h: translate$8,
+            hh: translate$8,
+            d: translate$8,
+            dd: translate$8,
+            M: translate$8,
+            MM: translate$8,
+            y: translate$8,
+            yy: translate$8
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Slovenian [sl]
+//! author : Robert Sedovšek : https://github.com/sedovsek
+
+    function processRelativeTime$6(number, withoutSuffix, key, isFuture) {
+        var result = number + ' ';
+        switch (key) {
+            case 's':
+                return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
+            case 'm':
+                return withoutSuffix ? 'ena minuta' : 'eno minuto';
+            case 'mm':
+                if (number === 1) {
+                    result += withoutSuffix ? 'minuta' : 'minuto';
+                } else if (number === 2) {
+                    result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
+                } else if (number < 5) {
+                    result += withoutSuffix || isFuture ? 'minute' : 'minutami';
+                } else {
+                    result += withoutSuffix || isFuture ? 'minut' : 'minutami';
+                }
+                return result;
+            case 'h':
+                return withoutSuffix ? 'ena ura' : 'eno uro';
+            case 'hh':
+                if (number === 1) {
+                    result += withoutSuffix ? 'ura' : 'uro';
+                } else if (number === 2) {
+                    result += withoutSuffix || isFuture ? 'uri' : 'urama';
+                } else if (number < 5) {
+                    result += withoutSuffix || isFuture ? 'ure' : 'urami';
+                } else {
+                    result += withoutSuffix || isFuture ? 'ur' : 'urami';
+                }
+                return result;
+            case 'd':
+                return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
+            case 'dd':
+                if (number === 1) {
+                    result += withoutSuffix || isFuture ? 'dan' : 'dnem';
+                } else if (number === 2) {
+                    result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
+                } else {
+                    result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
+                }
+                return result;
+            case 'M':
+                return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
+            case 'MM':
+                if (number === 1) {
+                    result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
+                } else if (number === 2) {
+                    result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
+                } else if (number < 5) {
+                    result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
+                } else {
+                    result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
+                }
+                return result;
+            case 'y':
+                return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
+            case 'yy':
+                if (number === 1) {
+                    result += withoutSuffix || isFuture ? 'leto' : 'letom';
+                } else if (number === 2) {
+                    result += withoutSuffix || isFuture ? 'leti' : 'letoma';
+                } else if (number < 5) {
+                    result += withoutSuffix || isFuture ? 'leta' : 'leti';
+                } else {
+                    result += withoutSuffix || isFuture ? 'let' : 'leti';
+                }
+                return result;
+        }
+    }
+
+    hooks.defineLocale('sl', {
+        months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
+        monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
+        weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
+        weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd, D. MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[danes ob] LT',
+            nextDay: '[jutri ob] LT',
+
+            nextWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[v] [nedeljo] [ob] LT';
+                    case 3:
+                        return '[v] [sredo] [ob] LT';
+                    case 6:
+                        return '[v] [soboto] [ob] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[v] dddd [ob] LT';
+                }
+            },
+            lastDay: '[včeraj ob] LT',
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[prejšnjo] [nedeljo] [ob] LT';
+                    case 3:
+                        return '[prejšnjo] [sredo] [ob] LT';
+                    case 6:
+                        return '[prejšnjo] [soboto] [ob] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[prejšnji] dddd [ob] LT';
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'čez %s',
+            past: 'pred %s',
+            s: processRelativeTime$6,
+            m: processRelativeTime$6,
+            mm: processRelativeTime$6,
+            h: processRelativeTime$6,
+            hh: processRelativeTime$6,
+            d: processRelativeTime$6,
+            dd: processRelativeTime$6,
+            M: processRelativeTime$6,
+            MM: processRelativeTime$6,
+            y: processRelativeTime$6,
+            yy: processRelativeTime$6
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Albanian [sq]
+//! author : Flakërim Ismani : https://github.com/flakerimi
+//! author : Menelion Elensúle : https://github.com/Oire
+//! author : Oerd Cukalla : https://github.com/oerd
+
+    hooks.defineLocale('sq', {
+        months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),
+        monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
+        weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),
+        weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
+        weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
+        weekdaysParseExact: true,
+        meridiemParse: /PD|MD/,
+        isPM: function (input) {
+            return input.charAt(0) === 'M';
+        },
+        meridiem: function (hours, minutes, isLower) {
+            return hours < 12 ? 'PD' : 'MD';
+        },
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Sot në] LT',
+            nextDay: '[Nesër në] LT',
+            nextWeek: 'dddd [në] LT',
+            lastDay: '[Dje në] LT',
+            lastWeek: 'dddd [e kaluar në] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'në %s',
+            past: '%s më parë',
+            s: 'disa sekonda',
+            m: 'një minutë',
+            mm: '%d minuta',
+            h: 'një orë',
+            hh: '%d orë',
+            d: 'një ditë',
+            dd: '%d ditë',
+            M: 'një muaj',
+            MM: '%d muaj',
+            y: 'një vit',
+            yy: '%d vite'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Serbian Cyrillic [sr-cyrl]
+//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
+
+    var translator$1 = {
+        words: { //Different grammatical cases
+            m: ['један минут', 'једне минуте'],
+            mm: ['минут', 'минуте', 'минута'],
+            h: ['један сат', 'једног сата'],
+            hh: ['сат', 'сата', 'сати'],
+            dd: ['дан', 'дана', 'дана'],
+            MM: ['месец', 'месеца', 'месеци'],
+            yy: ['година', 'године', 'година']
+        },
+        correctGrammaticalCase: function (number, wordKey) {
+            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
+        },
+        translate: function (number, withoutSuffix, key) {
+            var wordKey = translator$1.words[key];
+            if (key.length === 1) {
+                return withoutSuffix ? wordKey[0] : wordKey[1];
+            } else {
+                return number + ' ' + translator$1.correctGrammaticalCase(number, wordKey);
+            }
+        }
+    };
+
+    hooks.defineLocale('sr-cyrl', {
+        months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),
+        monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
+        weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
+        weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd, D. MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[данас у] LT',
+            nextDay: '[сутра у] LT',
+            nextWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[у] [недељу] [у] LT';
+                    case 3:
+                        return '[у] [среду] [у] LT';
+                    case 6:
+                        return '[у] [суботу] [у] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[у] dddd [у] LT';
+                }
+            },
+            lastDay: '[јуче у] LT',
+            lastWeek: function () {
+                var lastWeekDays = [
+                    '[прошле] [недеље] [у] LT',
+                    '[прошлог] [понедељка] [у] LT',
+                    '[прошлог] [уторка] [у] LT',
+                    '[прошле] [среде] [у] LT',
+                    '[прошлог] [четвртка] [у] LT',
+                    '[прошлог] [петка] [у] LT',
+                    '[прошле] [суботе] [у] LT'
+                ];
+                return lastWeekDays[this.day()];
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'за %s',
+            past: 'пре %s',
+            s: 'неколико секунди',
+            m: translator$1.translate,
+            mm: translator$1.translate,
+            h: translator$1.translate,
+            hh: translator$1.translate,
+            d: 'дан',
+            dd: translator$1.translate,
+            M: 'месец',
+            MM: translator$1.translate,
+            y: 'годину',
+            yy: translator$1.translate
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Serbian [sr]
+//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
+
+    var translator$2 = {
+        words: { //Different grammatical cases
+            m: ['jedan minut', 'jedne minute'],
+            mm: ['minut', 'minute', 'minuta'],
+            h: ['jedan sat', 'jednog sata'],
+            hh: ['sat', 'sata', 'sati'],
+            dd: ['dan', 'dana', 'dana'],
+            MM: ['mesec', 'meseca', 'meseci'],
+            yy: ['godina', 'godine', 'godina']
+        },
+        correctGrammaticalCase: function (number, wordKey) {
+            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
+        },
+        translate: function (number, withoutSuffix, key) {
+            var wordKey = translator$2.words[key];
+            if (key.length === 1) {
+                return withoutSuffix ? wordKey[0] : wordKey[1];
+            } else {
+                return number + ' ' + translator$2.correctGrammaticalCase(number, wordKey);
+            }
+        }
+    };
+
+    hooks.defineLocale('sr', {
+        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
+        monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),
+        weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
+        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM YYYY',
+            LLL: 'D. MMMM YYYY H:mm',
+            LLLL: 'dddd, D. MMMM YYYY H:mm'
+        },
+        calendar: {
+            sameDay: '[danas u] LT',
+            nextDay: '[sutra u] LT',
+            nextWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                        return '[u] [nedelju] [u] LT';
+                    case 3:
+                        return '[u] [sredu] [u] LT';
+                    case 6:
+                        return '[u] [subotu] [u] LT';
+                    case 1:
+                    case 2:
+                    case 4:
+                    case 5:
+                        return '[u] dddd [u] LT';
+                }
+            },
+            lastDay: '[juče u] LT',
+            lastWeek: function () {
+                var lastWeekDays = [
+                    '[prošle] [nedelje] [u] LT',
+                    '[prošlog] [ponedeljka] [u] LT',
+                    '[prošlog] [utorka] [u] LT',
+                    '[prošle] [srede] [u] LT',
+                    '[prošlog] [četvrtka] [u] LT',
+                    '[prošlog] [petka] [u] LT',
+                    '[prošle] [subote] [u] LT'
+                ];
+                return lastWeekDays[this.day()];
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'za %s',
+            past: 'pre %s',
+            s: 'nekoliko sekundi',
+            m: translator$2.translate,
+            mm: translator$2.translate,
+            h: translator$2.translate,
+            hh: translator$2.translate,
+            d: 'dan',
+            dd: translator$2.translate,
+            M: 'mesec',
+            MM: translator$2.translate,
+            y: 'godinu',
+            yy: translator$2.translate
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : siSwati [ss]
+//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
+
+
+    hooks.defineLocale('ss', {
+        months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'),
+        monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
+        weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),
+        weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
+        weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'h:mm A',
+            LTS: 'h:mm:ss A',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY h:mm A',
+            LLLL: 'dddd, D MMMM YYYY h:mm A'
+        },
+        calendar: {
+            sameDay: '[Namuhla nga] LT',
+            nextDay: '[Kusasa nga] LT',
+            nextWeek: 'dddd [nga] LT',
+            lastDay: '[Itolo nga] LT',
+            lastWeek: 'dddd [leliphelile] [nga] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'nga %s',
+            past: 'wenteka nga %s',
+            s: 'emizuzwana lomcane',
+            m: 'umzuzu',
+            mm: '%d emizuzu',
+            h: 'lihora',
+            hh: '%d emahora',
+            d: 'lilanga',
+            dd: '%d emalanga',
+            M: 'inyanga',
+            MM: '%d tinyanga',
+            y: 'umnyaka',
+            yy: '%d iminyaka'
+        },
+        meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
+        meridiem: function (hours, minutes, isLower) {
+            if (hours < 11) {
+                return 'ekuseni';
+            } else if (hours < 15) {
+                return 'emini';
+            } else if (hours < 19) {
+                return 'entsambama';
+            } else {
+                return 'ebusuku';
+            }
+        },
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'ekuseni') {
+                return hour;
+            } else if (meridiem === 'emini') {
+                return hour >= 11 ? hour : hour + 12;
+            } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
+                if (hour === 0) {
+                    return 0;
+                }
+                return hour + 12;
+            }
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}/,
+        ordinal: '%d',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Swedish [sv]
+//! author : Jens Alm : https://github.com/ulmus
+
+    hooks.defineLocale('sv', {
+        months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
+        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
+        weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
+        weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
+        weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY-MM-DD',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY [kl.] HH:mm',
+            LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
+            lll: 'D MMM YYYY HH:mm',
+            llll: 'ddd D MMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Idag] LT',
+            nextDay: '[Imorgon] LT',
+            lastDay: '[Igår] LT',
+            nextWeek: '[På] dddd LT',
+            lastWeek: '[I] dddd[s] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'om %s',
+            past: 'för %s sedan',
+            s: 'några sekunder',
+            m: 'en minut',
+            mm: '%d minuter',
+            h: 'en timme',
+            hh: '%d timmar',
+            d: 'en dag',
+            dd: '%d dagar',
+            M: 'en månad',
+            MM: '%d månader',
+            y: 'ett år',
+            yy: '%d år'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (~~(number % 100 / 10) === 1) ? 'e' :
+                    (b === 1) ? 'a' :
+                        (b === 2) ? 'a' :
+                            (b === 3) ? 'e' : 'e';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Swahili [sw]
+//! author : Fahad Kassim : https://github.com/fadsel
+
+    hooks.defineLocale('sw', {
+        months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),
+        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
+        weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),
+        weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
+        weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[leo saa] LT',
+            nextDay: '[kesho saa] LT',
+            nextWeek: '[wiki ijayo] dddd [saat] LT',
+            lastDay: '[jana] LT',
+            lastWeek: '[wiki iliyopita] dddd [saat] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s baadaye',
+            past: 'tokea %s',
+            s: 'hivi punde',
+            m: 'dakika moja',
+            mm: 'dakika %d',
+            h: 'saa limoja',
+            hh: 'masaa %d',
+            d: 'siku moja',
+            dd: 'masiku %d',
+            M: 'mwezi mmoja',
+            MM: 'miezi %d',
+            y: 'mwaka mmoja',
+            yy: 'miaka %d'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Tamil [ta]
+//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
+
+    var symbolMap$12 = {
+        '1': '௧',
+        '2': '௨',
+        '3': '௩',
+        '4': '௪',
+        '5': '௫',
+        '6': '௬',
+        '7': '௭',
+        '8': '௮',
+        '9': '௯',
+        '0': '௦'
+    };
+    var numberMap$11 = {
+        '௧': '1',
+        '௨': '2',
+        '௩': '3',
+        '௪': '4',
+        '௫': '5',
+        '௬': '6',
+        '௭': '7',
+        '௮': '8',
+        '௯': '9',
+        '௦': '0'
+    };
+
+    hooks.defineLocale('ta', {
+        months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
+        monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
+        weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),
+        weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),
+        weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, HH:mm',
+            LLLL: 'dddd, D MMMM YYYY, HH:mm'
+        },
+        calendar: {
+            sameDay: '[இன்று] LT',
+            nextDay: '[நாளை] LT',
+            nextWeek: 'dddd, LT',
+            lastDay: '[நேற்று] LT',
+            lastWeek: '[கடந்த வாரம்] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s இல்',
+            past: '%s முன்',
+            s: 'ஒரு சில விநாடிகள்',
+            m: 'ஒரு நிமிடம்',
+            mm: '%d நிமிடங்கள்',
+            h: 'ஒரு மணி நேரம்',
+            hh: '%d மணி நேரம்',
+            d: 'ஒரு நாள்',
+            dd: '%d நாட்கள்',
+            M: 'ஒரு மாதம்',
+            MM: '%d மாதங்கள்',
+            y: 'ஒரு வருடம்',
+            yy: '%d ஆண்டுகள்'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}வது/,
+        ordinal: function (number) {
+            return number + 'வது';
+        },
+        preparse: function (string) {
+            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
+                return numberMap$11[match];
+            });
+        },
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap$12[match];
+            });
+        },
+        // refer http://ta.wikipedia.org/s/1er1
+        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 2) {
+                return ' யாமம்';
+            } else if (hour < 6) {
+                return ' வைகறை';  // வைகறை
+            } else if (hour < 10) {
+                return ' காலை'; // காலை
+            } else if (hour < 14) {
+                return ' நண்பகல்'; // நண்பகல்
+            } else if (hour < 18) {
+                return ' எற்பாடு'; // எற்பாடு
+            } else if (hour < 22) {
+                return ' மாலை'; // மாலை
+            } else {
+                return ' யாமம்';
+            }
+        },
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'யாமம்') {
+                return hour < 2 ? hour : hour + 12;
+            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
+                return hour;
+            } else if (meridiem === 'நண்பகல்') {
+                return hour >= 10 ? hour : hour + 12;
+            } else {
+                return hour + 12;
+            }
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Telugu [te]
+//! author : Krishna Chaitanya Thota : https://github.com/kcthota
+
+    hooks.defineLocale('te', {
+        months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),
+        monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),
+        weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
+        weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
+        longDateFormat: {
+            LT: 'A h:mm',
+            LTS: 'A h:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY, A h:mm',
+            LLLL: 'dddd, D MMMM YYYY, A h:mm'
+        },
+        calendar: {
+            sameDay: '[నేడు] LT',
+            nextDay: '[రేపు] LT',
+            nextWeek: 'dddd, LT',
+            lastDay: '[నిన్న] LT',
+            lastWeek: '[గత] dddd, LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s లో',
+            past: '%s క్రితం',
+            s: 'కొన్ని క్షణాలు',
+            m: 'ఒక నిమిషం',
+            mm: '%d నిమిషాలు',
+            h: 'ఒక గంట',
+            hh: '%d గంటలు',
+            d: 'ఒక రోజు',
+            dd: '%d రోజులు',
+            M: 'ఒక నెల',
+            MM: '%d నెలలు',
+            y: 'ఒక సంవత్సరం',
+            yy: '%d సంవత్సరాలు'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}వ/,
+        ordinal: '%dవ',
+        meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === 'రాత్రి') {
+                return hour < 4 ? hour : hour + 12;
+            } else if (meridiem === 'ఉదయం') {
+                return hour;
+            } else if (meridiem === 'మధ్యాహ్నం') {
+                return hour >= 10 ? hour : hour + 12;
+            } else if (meridiem === 'సాయంత్రం') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'రాత్రి';
+            } else if (hour < 10) {
+                return 'ఉదయం';
+            } else if (hour < 17) {
+                return 'మధ్యాహ్నం';
+            } else if (hour < 20) {
+                return 'సాయంత్రం';
+            } else {
+                return 'రాత్రి';
+            }
+        },
+        week: {
+            dow: 0, // Sunday is the first day of the week.
+            doy: 6  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Tetun Dili (East Timor) [tet]
+//! author : Joshua Brooks : https://github.com/joshbrooks
+//! author : Onorio De J. Afonso : https://github.com/marobo
+
+    hooks.defineLocale('tet', {
+        months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),
+        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez'.split('_'),
+        weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu'.split('_'),
+        weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sext_Sab'.split('_'),
+        weekdaysMin: 'Do_Seg_Te_Ku_Ki_Sex_Sa'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Ohin iha] LT',
+            nextDay: '[Aban iha] LT',
+            nextWeek: 'dddd [iha] LT',
+            lastDay: '[Horiseik iha] LT',
+            lastWeek: 'dddd [semana kotuk] [iha] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'iha %s',
+            past: '%s liuba',
+            s: 'minutu balun',
+            m: 'minutu ida',
+            mm: 'minutus %d',
+            h: 'horas ida',
+            hh: 'horas %d',
+            d: 'loron ida',
+            dd: 'loron %d',
+            M: 'fulan ida',
+            MM: 'fulan %d',
+            y: 'tinan ida',
+            yy: 'tinan %d'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (~~(number % 100 / 10) === 1) ? 'th' :
+                    (b === 1) ? 'st' :
+                        (b === 2) ? 'nd' :
+                            (b === 3) ? 'rd' : 'th';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Thai [th]
+//! author : Kridsada Thanabulpong : https://github.com/sirn
+
+    hooks.defineLocale('th', {
+        months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
+        monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
+        weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
+        weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'H:mm',
+            LTS: 'H:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY เวลา H:mm',
+            LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'
+        },
+        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
+        isPM: function (input) {
+            return input === 'หลังเที่ยง';
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'ก่อนเที่ยง';
+            } else {
+                return 'หลังเที่ยง';
+            }
+        },
+        calendar: {
+            sameDay: '[วันนี้ เวลา] LT',
+            nextDay: '[พรุ่งนี้ เวลา] LT',
+            nextWeek: 'dddd[หน้า เวลา] LT',
+            lastDay: '[เมื่อวานนี้ เวลา] LT',
+            lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'อีก %s',
+            past: '%sที่แล้ว',
+            s: 'ไม่กี่วินาที',
+            m: '1 นาที',
+            mm: '%d นาที',
+            h: '1 ชั่วโมง',
+            hh: '%d ชั่วโมง',
+            d: '1 วัน',
+            dd: '%d วัน',
+            M: '1 เดือน',
+            MM: '%d เดือน',
+            y: '1 ปี',
+            yy: '%d ปี'
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Tagalog (Philippines) [tl-ph]
+//! author : Dan Hagman : https://github.com/hagmandan
+
+    hooks.defineLocale('tl-ph', {
+        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),
+        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
+        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),
+        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
+        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'MM/D/YYYY',
+            LL: 'MMMM D, YYYY',
+            LLL: 'MMMM D, YYYY HH:mm',
+            LLLL: 'dddd, MMMM DD, YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: 'LT [ngayong araw]',
+            nextDay: '[Bukas ng] LT',
+            nextWeek: 'LT [sa susunod na] dddd',
+            lastDay: 'LT [kahapon]',
+            lastWeek: 'LT [noong nakaraang] dddd',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'sa loob ng %s',
+            past: '%s ang nakalipas',
+            s: 'ilang segundo',
+            m: 'isang minuto',
+            mm: '%d minuto',
+            h: 'isang oras',
+            hh: '%d oras',
+            d: 'isang araw',
+            dd: '%d araw',
+            M: 'isang buwan',
+            MM: '%d buwan',
+            y: 'isang taon',
+            yy: '%d taon'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}/,
+        ordinal: function (number) {
+            return number;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Klingon [tlh]
+//! author : Dominika Kruk : https://github.com/amaranthrose
+
+    var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
+
+    function translateFuture(output) {
+        var time = output;
+        time = (output.indexOf('jaj') !== -1) ?
+            time.slice(0, -3) + 'leS' :
+            (output.indexOf('jar') !== -1) ?
+                time.slice(0, -3) + 'waQ' :
+                (output.indexOf('DIS') !== -1) ?
+                    time.slice(0, -3) + 'nem' :
+                    time + ' pIq';
+        return time;
+    }
+
+    function translatePast(output) {
+        var time = output;
+        time = (output.indexOf('jaj') !== -1) ?
+            time.slice(0, -3) + 'Hu’' :
+            (output.indexOf('jar') !== -1) ?
+                time.slice(0, -3) + 'wen' :
+                (output.indexOf('DIS') !== -1) ?
+                    time.slice(0, -3) + 'ben' :
+                    time + ' ret';
+        return time;
+    }
+
+    function translate$9(number, withoutSuffix, string, isFuture) {
+        var numberNoun = numberAsNoun(number);
+        switch (string) {
+            case 'mm':
+                return numberNoun + ' tup';
+            case 'hh':
+                return numberNoun + ' rep';
+            case 'dd':
+                return numberNoun + ' jaj';
+            case 'MM':
+                return numberNoun + ' jar';
+            case 'yy':
+                return numberNoun + ' DIS';
+        }
+    }
+
+    function numberAsNoun(number) {
+        var hundred = Math.floor((number % 1000) / 100),
+            ten = Math.floor((number % 100) / 10),
+            one = number % 10,
+            word = '';
+        if (hundred > 0) {
+            word += numbersNouns[hundred] + 'vatlh';
+        }
+        if (ten > 0) {
+            word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';
+        }
+        if (one > 0) {
+            word += ((word !== '') ? ' ' : '') + numbersNouns[one];
+        }
+        return (word === '') ? 'pagh' : word;
+    }
+
+    hooks.defineLocale('tlh', {
+        months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),
+        monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+        weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+        weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[DaHjaj] LT',
+            nextDay: '[wa’leS] LT',
+            nextWeek: 'LLL',
+            lastDay: '[wa’Hu’] LT',
+            lastWeek: 'LLL',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: translateFuture,
+            past: translatePast,
+            s: 'puS lup',
+            m: 'wa’ tup',
+            mm: translate$9,
+            h: 'wa’ rep',
+            hh: translate$9,
+            d: 'wa’ jaj',
+            dd: translate$9,
+            M: 'wa’ jar',
+            MM: translate$9,
+            y: 'wa’ DIS',
+            yy: translate$9
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Turkish [tr]
+//! authors : Erhan Gundogan : https://github.com/erhangundogan,
+//!           Burak Yiğit Kaya: https://github.com/BYK
+
+    var suffixes$3 = {
+        1: '\'inci',
+        5: '\'inci',
+        8: '\'inci',
+        70: '\'inci',
+        80: '\'inci',
+        2: '\'nci',
+        7: '\'nci',
+        20: '\'nci',
+        50: '\'nci',
+        3: '\'üncü',
+        4: '\'üncü',
+        100: '\'üncü',
+        6: '\'ncı',
+        9: '\'uncu',
+        10: '\'uncu',
+        30: '\'uncu',
+        60: '\'ıncı',
+        90: '\'ıncı'
+    };
+
+    hooks.defineLocale('tr', {
+        months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
+        monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
+        weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
+        weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
+        weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[bugün saat] LT',
+            nextDay: '[yarın saat] LT',
+            nextWeek: '[haftaya] dddd [saat] LT',
+            lastDay: '[dün] LT',
+            lastWeek: '[geçen hafta] dddd [saat] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s sonra',
+            past: '%s önce',
+            s: 'birkaç saniye',
+            m: 'bir dakika',
+            mm: '%d dakika',
+            h: 'bir saat',
+            hh: '%d saat',
+            d: 'bir gün',
+            dd: '%d gün',
+            M: 'bir ay',
+            MM: '%d ay',
+            y: 'bir yıl',
+            yy: '%d yıl'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
+        ordinal: function (number) {
+            if (number === 0) {  // special case for zero
+                return number + '\'ıncı';
+            }
+            var a = number % 10,
+                b = number % 100 - a,
+                c = number >= 100 ? 100 : null;
+            return number + (suffixes$3[a] || suffixes$3[b] || suffixes$3[c]);
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Talossan [tzl]
+//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+//! author : Iustì Canun
+
+// After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
+// This is currently too difficult (maybe even impossible) to add.
+    hooks.defineLocale('tzl', {
+        months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),
+        monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
+        weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
+        weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
+        weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
+        longDateFormat: {
+            LT: 'HH.mm',
+            LTS: 'HH.mm.ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D. MMMM [dallas] YYYY',
+            LLL: 'D. MMMM [dallas] YYYY HH.mm',
+            LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'
+        },
+        meridiemParse: /d\'o|d\'a/i,
+        isPM: function (input) {
+            return 'd\'o' === input.toLowerCase();
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours > 11) {
+                return isLower ? 'd\'o' : 'D\'O';
+            } else {
+                return isLower ? 'd\'a' : 'D\'A';
+            }
+        },
+        calendar: {
+            sameDay: '[oxhi à] LT',
+            nextDay: '[demà à] LT',
+            nextWeek: 'dddd [à] LT',
+            lastDay: '[ieiri à] LT',
+            lastWeek: '[sür el] dddd [lasteu à] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'osprei %s',
+            past: 'ja%s',
+            s: processRelativeTime$7,
+            m: processRelativeTime$7,
+            mm: processRelativeTime$7,
+            h: processRelativeTime$7,
+            hh: processRelativeTime$7,
+            d: processRelativeTime$7,
+            dd: processRelativeTime$7,
+            M: processRelativeTime$7,
+            MM: processRelativeTime$7,
+            y: processRelativeTime$7,
+            yy: processRelativeTime$7
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}\./,
+        ordinal: '%d.',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+    function processRelativeTime$7(number, withoutSuffix, key, isFuture) {
+        var format = {
+            's': ['viensas secunds', '\'iensas secunds'],
+            'm': ['\'n míut', '\'iens míut'],
+            'mm': [number + ' míuts', '' + number + ' míuts'],
+            'h': ['\'n þora', '\'iensa þora'],
+            'hh': [number + ' þoras', '' + number + ' þoras'],
+            'd': ['\'n ziua', '\'iensa ziua'],
+            'dd': [number + ' ziuas', '' + number + ' ziuas'],
+            'M': ['\'n mes', '\'iens mes'],
+            'MM': [number + ' mesen', '' + number + ' mesen'],
+            'y': ['\'n ar', '\'iens ar'],
+            'yy': [number + ' ars', '' + number + ' ars']
+        };
+        return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);
+    }
+
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight Latin [tzm-latn]
+//! author : Abdel Said : https://github.com/abdelsaid
+
+    hooks.defineLocale('tzm-latn', {
+        months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
+        monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
+        weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+        weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+        weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[asdkh g] LT',
+            nextDay: '[aska g] LT',
+            nextWeek: 'dddd [g] LT',
+            lastDay: '[assant g] LT',
+            lastWeek: 'dddd [g] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'dadkh s yan %s',
+            past: 'yan %s',
+            s: 'imik',
+            m: 'minuḍ',
+            mm: '%d minuḍ',
+            h: 'saɛa',
+            hh: '%d tassaɛin',
+            d: 'ass',
+            dd: '%d ossan',
+            M: 'ayowr',
+            MM: '%d iyyirn',
+            y: 'asgas',
+            yy: '%d isgasn'
+        },
+        week: {
+            dow: 6, // Saturday is the first day of the week.
+            doy: 12  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Central Atlas Tamazight [tzm]
+//! author : Abdel Said : https://github.com/abdelsaid
+
+    hooks.defineLocale('tzm', {
+        months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
+        monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
+        weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+        weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+        weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
+            nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
+            nextWeek: 'dddd [ⴴ] LT',
+            lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
+            lastWeek: 'dddd [ⴴ] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
+            past: 'ⵢⴰⵏ %s',
+            s: 'ⵉⵎⵉⴽ',
+            m: 'ⵎⵉⵏⵓⴺ',
+            mm: '%d ⵎⵉⵏⵓⴺ',
+            h: 'ⵙⴰⵄⴰ',
+            hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
+            d: 'ⴰⵙⵙ',
+            dd: '%d oⵙⵙⴰⵏ',
+            M: 'ⴰⵢoⵓⵔ',
+            MM: '%d ⵉⵢⵢⵉⵔⵏ',
+            y: 'ⴰⵙⴳⴰⵙ',
+            yy: '%d ⵉⵙⴳⴰⵙⵏ'
+        },
+        week: {
+            dow: 6, // Saturday is the first day of the week.
+            doy: 12  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Ukrainian [uk]
+//! author : zemlanin : https://github.com/zemlanin
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+    function plural$6(word, num) {
+        var forms = word.split('_');
+        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
+    }
+
+    function relativeTimeWithPlural$4(number, withoutSuffix, key) {
+        var format = {
+            'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
+            'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
+            'dd': 'день_дні_днів',
+            'MM': 'місяць_місяці_місяців',
+            'yy': 'рік_роки_років'
+        };
+        if (key === 'm') {
+            return withoutSuffix ? 'хвилина' : 'хвилину';
+        }
+        else if (key === 'h') {
+            return withoutSuffix ? 'година' : 'годину';
+        }
+        else {
+            return number + ' ' + plural$6(format[key], +number);
+        }
+    }
+
+    function weekdaysCaseReplace(m, format) {
+        var weekdays = {
+            'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
+            'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
+            'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
+        };
+
+        if (!m) {
+            return weekdays['nominative'];
+        }
+
+        var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
+            'accusative' :
+            ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
+                'genitive' :
+                'nominative');
+        return weekdays[nounCase][m.day()];
+    }
+
+    function processHoursFunction(str) {
+        return function () {
+            return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
+        };
+    }
+
+    hooks.defineLocale('uk', {
+        months: {
+            'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
+            'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
+        },
+        monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
+        weekdays: weekdaysCaseReplace,
+        weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD.MM.YYYY',
+            LL: 'D MMMM YYYY р.',
+            LLL: 'D MMMM YYYY р., HH:mm',
+            LLLL: 'dddd, D MMMM YYYY р., HH:mm'
+        },
+        calendar: {
+            sameDay: processHoursFunction('[Сьогодні '),
+            nextDay: processHoursFunction('[Завтра '),
+            lastDay: processHoursFunction('[Вчора '),
+            nextWeek: processHoursFunction('[У] dddd ['),
+            lastWeek: function () {
+                switch (this.day()) {
+                    case 0:
+                    case 3:
+                    case 5:
+                    case 6:
+                        return processHoursFunction('[Минулої] dddd [').call(this);
+                    case 1:
+                    case 2:
+                    case 4:
+                        return processHoursFunction('[Минулого] dddd [').call(this);
+                }
+            },
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'за %s',
+            past: '%s тому',
+            s: 'декілька секунд',
+            m: relativeTimeWithPlural$4,
+            mm: relativeTimeWithPlural$4,
+            h: 'годину',
+            hh: relativeTimeWithPlural$4,
+            d: 'день',
+            dd: relativeTimeWithPlural$4,
+            M: 'місяць',
+            MM: relativeTimeWithPlural$4,
+            y: 'рік',
+            yy: relativeTimeWithPlural$4
+        },
+        // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
+        meridiemParse: /ночі|ранку|дня|вечора/,
+        isPM: function (input) {
+            return /^(дня|вечора)$/.test(input);
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 4) {
+                return 'ночі';
+            } else if (hour < 12) {
+                return 'ранку';
+            } else if (hour < 17) {
+                return 'дня';
+            } else {
+                return 'вечора';
+            }
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                case 'M':
+                case 'd':
+                case 'DDD':
+                case 'w':
+                case 'W':
+                    return number + '-й';
+                case 'D':
+                    return number + '-го';
+                default:
+                    return number;
+            }
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Urdu [ur]
+//! author : Sawood Alam : https://github.com/ibnesayeed
+//! author : Zack : https://github.com/ZackVision
+
+    var months$8 = [
+        'جنوری',
+        'فروری',
+        'مارچ',
+        'اپریل',
+        'مئی',
+        'جون',
+        'جولائی',
+        'اگست',
+        'ستمبر',
+        'اکتوبر',
+        'نومبر',
+        'دسمبر'
+    ];
+    var days$2 = [
+        'اتوار',
+        'پیر',
+        'منگل',
+        'بدھ',
+        'جمعرات',
+        'جمعہ',
+        'ہفتہ'
+    ];
+
+    hooks.defineLocale('ur', {
+        months: months$8,
+        monthsShort: months$8,
+        weekdays: days$2,
+        weekdaysShort: days$2,
+        weekdaysMin: days$2,
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd، D MMMM YYYY HH:mm'
+        },
+        meridiemParse: /صبح|شام/,
+        isPM: function (input) {
+            return 'شام' === input;
+        },
+        meridiem: function (hour, minute, isLower) {
+            if (hour < 12) {
+                return 'صبح';
+            }
+            return 'شام';
+        },
+        calendar: {
+            sameDay: '[آج بوقت] LT',
+            nextDay: '[کل بوقت] LT',
+            nextWeek: 'dddd [بوقت] LT',
+            lastDay: '[گذشتہ روز بوقت] LT',
+            lastWeek: '[گذشتہ] dddd [بوقت] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s بعد',
+            past: '%s قبل',
+            s: 'چند سیکنڈ',
+            m: 'ایک منٹ',
+            mm: '%d منٹ',
+            h: 'ایک گھنٹہ',
+            hh: '%d گھنٹے',
+            d: 'ایک دن',
+            dd: '%d دن',
+            M: 'ایک ماہ',
+            MM: '%d ماہ',
+            y: 'ایک سال',
+            yy: '%d سال'
+        },
+        preparse: function (string) {
+            return string.replace(/،/g, ',');
+        },
+        postformat: function (string) {
+            return string.replace(/,/g, '،');
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Uzbek Latin [uz-latn]
+//! author : Rasulbek Mirzayev : github.com/Rasulbeeek
+
+    hooks.defineLocale('uz-latn', {
+        months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),
+        monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
+        weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),
+        weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
+        weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'D MMMM YYYY, dddd HH:mm'
+        },
+        calendar: {
+            sameDay: '[Bugun soat] LT [da]',
+            nextDay: '[Ertaga] LT [da]',
+            nextWeek: 'dddd [kuni soat] LT [da]',
+            lastDay: '[Kecha soat] LT [da]',
+            lastWeek: '[O\'tgan] dddd [kuni soat] LT [da]',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'Yaqin %s ichida',
+            past: 'Bir necha %s oldin',
+            s: 'soniya',
+            m: 'bir daqiqa',
+            mm: '%d daqiqa',
+            h: 'bir soat',
+            hh: '%d soat',
+            d: 'bir kun',
+            dd: '%d kun',
+            M: 'bir oy',
+            MM: '%d oy',
+            y: 'bir yil',
+            yy: '%d yil'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 1st is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Uzbek [uz]
+//! author : Sardor Muminov : https://github.com/muminoff
+
+    hooks.defineLocale('uz', {
+        months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),
+        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
+        weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
+        weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
+        weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'D MMMM YYYY, dddd HH:mm'
+        },
+        calendar: {
+            sameDay: '[Бугун соат] LT [да]',
+            nextDay: '[Эртага] LT [да]',
+            nextWeek: 'dddd [куни соат] LT [да]',
+            lastDay: '[Кеча соат] LT [да]',
+            lastWeek: '[Утган] dddd [куни соат] LT [да]',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'Якин %s ичида',
+            past: 'Бир неча %s олдин',
+            s: 'фурсат',
+            m: 'бир дакика',
+            mm: '%d дакика',
+            h: 'бир соат',
+            hh: '%d соат',
+            d: 'бир кун',
+            dd: '%d кун',
+            M: 'бир ой',
+            MM: '%d ой',
+            y: 'бир йил',
+            yy: '%d йил'
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 7  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Vietnamese [vi]
+//! author : Bang Nguyen : https://github.com/bangnk
+
+    hooks.defineLocale('vi', {
+        months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
+        monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
+        weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+        weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
+        weekdaysParseExact: true,
+        meridiemParse: /sa|ch/i,
+        isPM: function (input) {
+            return /^ch$/i.test(input);
+        },
+        meridiem: function (hours, minutes, isLower) {
+            if (hours < 12) {
+                return isLower ? 'sa' : 'SA';
+            } else {
+                return isLower ? 'ch' : 'CH';
+            }
+        },
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM [năm] YYYY',
+            LLL: 'D MMMM [năm] YYYY HH:mm',
+            LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
+            l: 'DD/M/YYYY',
+            ll: 'D MMM YYYY',
+            lll: 'D MMM YYYY HH:mm',
+            llll: 'ddd, D MMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[Hôm nay lúc] LT',
+            nextDay: '[Ngày mai lúc] LT',
+            nextWeek: 'dddd [tuần tới lúc] LT',
+            lastDay: '[Hôm qua lúc] LT',
+            lastWeek: 'dddd [tuần rồi lúc] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: '%s tới',
+            past: '%s trước',
+            s: 'vài giây',
+            m: 'một phút',
+            mm: '%d phút',
+            h: 'một giờ',
+            hh: '%d giờ',
+            d: 'một ngày',
+            dd: '%d ngày',
+            M: 'một tháng',
+            MM: '%d tháng',
+            y: 'một năm',
+            yy: '%d năm'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}/,
+        ordinal: function (number) {
+            return number;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Pseudo [x-pseudo]
+//! author : Andrew Hood : https://github.com/andrewhood125
+
+    hooks.defineLocale('x-pseudo', {
+        months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),
+        monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),
+        monthsParseExact: true,
+        weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),
+        weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
+        weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
+        weekdaysParseExact: true,
+        longDateFormat: {
+            LT: 'HH:mm',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY HH:mm',
+            LLLL: 'dddd, D MMMM YYYY HH:mm'
+        },
+        calendar: {
+            sameDay: '[T~ódá~ý át] LT',
+            nextDay: '[T~ómó~rró~w át] LT',
+            nextWeek: 'dddd [át] LT',
+            lastDay: '[Ý~ést~érdá~ý át] LT',
+            lastWeek: '[L~ást] dddd [át] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'í~ñ %s',
+            past: '%s á~gó',
+            s: 'á ~féw ~sécó~ñds',
+            m: 'á ~míñ~úté',
+            mm: '%d m~íñú~tés',
+            h: 'á~ñ hó~úr',
+            hh: '%d h~óúrs',
+            d: 'á ~dáý',
+            dd: '%d d~áýs',
+            M: 'á ~móñ~th',
+            MM: '%d m~óñt~hs',
+            y: 'á ~ýéár',
+            yy: '%d ý~éárs'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+        ordinal: function (number) {
+            var b = number % 10,
+                output = (~~(number % 100 / 10) === 1) ? 'th' :
+                    (b === 1) ? 'st' :
+                        (b === 2) ? 'nd' :
+                            (b === 3) ? 'rd' : 'th';
+            return number + output;
+        },
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Yoruba Nigeria [yo]
+//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
+
+    hooks.defineLocale('yo', {
+        months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),
+        monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
+        weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
+        weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
+        weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
+        longDateFormat: {
+            LT: 'h:mm A',
+            LTS: 'h:mm:ss A',
+            L: 'DD/MM/YYYY',
+            LL: 'D MMMM YYYY',
+            LLL: 'D MMMM YYYY h:mm A',
+            LLLL: 'dddd, D MMMM YYYY h:mm A'
+        },
+        calendar: {
+            sameDay: '[Ònì ni] LT',
+            nextDay: '[Ọ̀la ni] LT',
+            nextWeek: 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT',
+            lastDay: '[Àna ni] LT',
+            lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
+            sameElse: 'L'
+        },
+        relativeTime: {
+            future: 'ní %s',
+            past: '%s kọjá',
+            s: 'ìsẹjú aayá die',
+            m: 'ìsẹjú kan',
+            mm: 'ìsẹjú %d',
+            h: 'wákati kan',
+            hh: 'wákati %d',
+            d: 'ọjọ́ kan',
+            dd: 'ọjọ́ %d',
+            M: 'osù kan',
+            MM: 'osù %d',
+            y: 'ọdún kan',
+            yy: 'ọdún %d'
+        },
+        dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
+        ordinal: 'ọjọ́ %d',
+        week: {
+            dow: 1, // Monday is the first day of the week.
+            doy: 4 // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Chinese (China) [zh-cn]
+//! author : suupic : https://github.com/suupic
+//! author : Zeno Zeng : https://github.com/zenozeng
+
+    hooks.defineLocale('zh-cn', {
+        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
+        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+        weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY年MMMD日',
+            LL: 'YYYY年MMMD日',
+            LLL: 'YYYY年MMMD日Ah点mm分',
+            LLLL: 'YYYY年MMMD日ddddAh点mm分',
+            l: 'YYYY年MMMD日',
+            ll: 'YYYY年MMMD日',
+            lll: 'YYYY年MMMD日 HH:mm',
+            llll: 'YYYY年MMMD日dddd HH:mm'
+        },
+        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === '凌晨' || meridiem === '早上' ||
+                meridiem === '上午') {
+                return hour;
+            } else if (meridiem === '下午' || meridiem === '晚上') {
+                return hour + 12;
+            } else {
+                // '中午'
+                return hour >= 11 ? hour : hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            var hm = hour * 100 + minute;
+            if (hm < 600) {
+                return '凌晨';
+            } else if (hm < 900) {
+                return '早上';
+            } else if (hm < 1130) {
+                return '上午';
+            } else if (hm < 1230) {
+                return '中午';
+            } else if (hm < 1800) {
+                return '下午';
+            } else {
+                return '晚上';
+            }
+        },
+        calendar: {
+            sameDay: '[今天]LT',
+            nextDay: '[明天]LT',
+            nextWeek: '[下]ddddLT',
+            lastDay: '[昨天]LT',
+            lastWeek: '[上]ddddLT',
+            sameElse: 'L'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                case 'd':
+                case 'D':
+                case 'DDD':
+                    return number + '日';
+                case 'M':
+                    return number + '月';
+                case 'w':
+                case 'W':
+                    return number + '周';
+                default:
+                    return number;
+            }
+        },
+        relativeTime: {
+            future: '%s内',
+            past: '%s前',
+            s: '几秒',
+            m: '1 分钟',
+            mm: '%d 分钟',
+            h: '1 小时',
+            hh: '%d 小时',
+            d: '1 天',
+            dd: '%d 天',
+            M: '1 个月',
+            MM: '%d 个月',
+            y: '1 年',
+            yy: '%d 年'
+        },
+        week: {
+            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+            dow: 1, // Monday is the first day of the week.
+            doy: 4  // The week that contains Jan 4th is the first week of the year.
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Chinese (Hong Kong) [zh-hk]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+//! author : Konstantin : https://github.com/skfd
+
+    hooks.defineLocale('zh-hk', {
+        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
+        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY年MMMD日',
+            LL: 'YYYY年MMMD日',
+            LLL: 'YYYY年MMMD日 HH:mm',
+            LLLL: 'YYYY年MMMD日dddd HH:mm',
+            l: 'YYYY年MMMD日',
+            ll: 'YYYY年MMMD日',
+            lll: 'YYYY年MMMD日 HH:mm',
+            llll: 'YYYY年MMMD日dddd HH:mm'
+        },
+        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+                return hour;
+            } else if (meridiem === '中午') {
+                return hour >= 11 ? hour : hour + 12;
+            } else if (meridiem === '下午' || meridiem === '晚上') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            var hm = hour * 100 + minute;
+            if (hm < 600) {
+                return '凌晨';
+            } else if (hm < 900) {
+                return '早上';
+            } else if (hm < 1130) {
+                return '上午';
+            } else if (hm < 1230) {
+                return '中午';
+            } else if (hm < 1800) {
+                return '下午';
+            } else {
+                return '晚上';
+            }
+        },
+        calendar: {
+            sameDay: '[今天]LT',
+            nextDay: '[明天]LT',
+            nextWeek: '[下]ddddLT',
+            lastDay: '[昨天]LT',
+            lastWeek: '[上]ddddLT',
+            sameElse: 'L'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                case 'd' :
+                case 'D' :
+                case 'DDD' :
+                    return number + '日';
+                case 'M' :
+                    return number + '月';
+                case 'w' :
+                case 'W' :
+                    return number + '週';
+                default :
+                    return number;
+            }
+        },
+        relativeTime: {
+            future: '%s內',
+            past: '%s前',
+            s: '幾秒',
+            m: '1 分鐘',
+            mm: '%d 分鐘',
+            h: '1 小時',
+            hh: '%d 小時',
+            d: '1 天',
+            dd: '%d 天',
+            M: '1 個月',
+            MM: '%d 個月',
+            y: '1 年',
+            yy: '%d 年'
+        }
+    });
+
+//! moment.js locale configuration
+//! locale : Chinese (Taiwan) [zh-tw]
+//! author : Ben : https://github.com/ben-lin
+//! author : Chris Lam : https://github.com/hehachris
+
+    hooks.defineLocale('zh-tw', {
+        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
+        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+        longDateFormat: {
+            LT: 'HH:mm',
+            LTS: 'HH:mm:ss',
+            L: 'YYYY年MMMD日',
+            LL: 'YYYY年MMMD日',
+            LLL: 'YYYY年MMMD日 HH:mm',
+            LLLL: 'YYYY年MMMD日dddd HH:mm',
+            l: 'YYYY年MMMD日',
+            ll: 'YYYY年MMMD日',
+            lll: 'YYYY年MMMD日 HH:mm',
+            llll: 'YYYY年MMMD日dddd HH:mm'
+        },
+        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+        meridiemHour: function (hour, meridiem) {
+            if (hour === 12) {
+                hour = 0;
+            }
+            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
+                return hour;
+            } else if (meridiem === '中午') {
+                return hour >= 11 ? hour : hour + 12;
+            } else if (meridiem === '下午' || meridiem === '晚上') {
+                return hour + 12;
+            }
+        },
+        meridiem: function (hour, minute, isLower) {
+            var hm = hour * 100 + minute;
+            if (hm < 600) {
+                return '凌晨';
+            } else if (hm < 900) {
+                return '早上';
+            } else if (hm < 1130) {
+                return '上午';
+            } else if (hm < 1230) {
+                return '中午';
+            } else if (hm < 1800) {
+                return '下午';
+            } else {
+                return '晚上';
+            }
+        },
+        calendar: {
+            sameDay: '[今天]LT',
+            nextDay: '[明天]LT',
+            nextWeek: '[下]ddddLT',
+            lastDay: '[昨天]LT',
+            lastWeek: '[上]ddddLT',
+            sameElse: 'L'
+        },
+        dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
+        ordinal: function (number, period) {
+            switch (period) {
+                case 'd' :
+                case 'D' :
+                case 'DDD' :
+                    return number + '日';
+                case 'M' :
+                    return number + '月';
+                case 'w' :
+                case 'W' :
+                    return number + '週';
+                default :
+                    return number;
+            }
+        },
+        relativeTime: {
+            future: '%s內',
+            past: '%s前',
+            s: '幾秒',
+            m: '1 分鐘',
+            mm: '%d 分鐘',
+            h: '1 小時',
+            hh: '%d 小時',
+            d: '1 天',
+            dd: '%d 天',
+            M: '1 個月',
+            MM: '%d 個月',
+            y: '1 年',
+            yy: '%d 年'
+        }
+    });
+
+    hooks.locale('en');
+
+    return hooks;
+
+})));

+ 76 - 0
app/assets/scripts/regionfilter.js

@@ -0,0 +1,76 @@
+/// <reference path="../../node_modules/@types/jquery/index.d.ts"/>
+var RegionFilter;
+(function (RegionFilter_1) {
+    var RegionFilter = (function () {
+        function RegionFilter($selector, config) {
+            this.selected = {};
+            this.strings = ['район', 'района', 'районов'];
+            this.typeName = 'районы';
+            this.$selector = $selector;
+            var strings = $selector.data('strings');
+            var typeName = $selector.data('type-name');
+            if (strings !== undefined) {
+                this.strings = eval(strings);
+            }
+            if (typeName !== undefined) {
+                this.typeName = typeName;
+            }
+            this.config = config;
+            this.$selector.click(this.onSelectorClick.bind(this));
+            this.loadSelected();
+        }
+
+        RegionFilter.prototype.onSelectorClick = function (event) {
+            event.preventDefault();
+            var context = this;
+            var itemsContainer = this.$selector.parent().find('.' + this.config.itemsContainerClass);
+            if (itemsContainer.length) {
+                itemsContainer.fadeOut(200, function () {
+                    $(this).remove();
+                });
+            }
+            else {
+                this.$selector.parent().append(this.createContainer());
+            }
+        };
+        RegionFilter.prototype.createContainer = function () {
+            var itemsContainer = $("<div class=\"" + this.config.itemsContainerClass + "\"></div>");
+            var context = this;
+            var field = $(this.$selector.data('field'));
+            field.find('option').each(function () {
+                var id = $(this).attr('value');
+                itemsContainer.append(
+                    // create container
+                    $("<div class=\"" + context.config.itemContainerClass + "\"></div>")
+                        .append($("<input type=\"checkbox\" class=\"" + context.config.itemCheckboxClass + "\" id=\"rfchb" + id + "\" value=\"" + id + "\">")
+                            .attr('checked', $(this).prop('selected'))
+                            .on('change', function () {
+                                field.find("option[value=" + id + "]").prop('selected', $(this).prop('checked'));
+                                context.setCount(field.find('option:selected').length);
+                            }))
+                        .append($("<label class=\"" + context.config.itemLabelClass + "\" for=\"rfchb" + id + "\">" + $(this).html() + "</label>")));
+            });
+            return itemsContainer;
+        };
+        RegionFilter.prototype.loadSelected = function () {
+        };
+        RegionFilter.declOfNum = function (number, titles) {
+            var cases = [2, 0, 1, 1, 1, 2];
+            return titles[(number % 100 > 4 && number % 100 < 20) ? 2 : cases[(number % 10 < 5) ? number % 10 : 5]];
+        };
+        RegionFilter.prototype.checkChecked = function (id) {
+            return this.selected.hasOwnProperty(id);
+        };
+        RegionFilter.prototype.setCount = function (count) {
+            if (count === void 0) {
+                count = 0;
+            }
+            this.$selector.html('Все ' + this.typeName);
+            if (count > 0) {
+                this.$selector.html(count + ' ' + RegionFilter.declOfNum(count, this.strings));
+            }
+        };
+        return RegionFilter;
+    }());
+    RegionFilter_1.RegionFilter = RegionFilter;
+})(RegionFilter || (RegionFilter = {}));

+ 119 - 0
app/assets/scripts/specfilter.js

@@ -0,0 +1,119 @@
+/// <reference path="../../node_modules/@types/jquery/index.d.ts"/>
+/// <reference path="../../node_modules/@types/fancybox/index.d.ts"/>
+var SpecFilter;
+(function (SpecFilter_1) {
+    var SpecFilter = (function () {
+        function SpecFilter($selector) {
+            this.selected = {};
+            this.strings = ['специализация', 'специализации', 'специализаций'];
+            this.typeName = 'специализации';
+            this.$selector = $selector;
+            this.endpointUrl = $selector.data('enpoint-url');
+            var strings = $selector.data('strings');
+            var typeName = $selector.data('type-name');
+            if (strings !== undefined) {
+                this.strings = eval(strings);
+            }
+            if (typeName !== undefined) {
+                this.typeName = typeName;
+            }
+            $.ajax({
+                url: this.endpointUrl
+            }).done((function (data) {
+                this.content = data;
+            }).bind(this));
+            this.$selector.click(this.onSelectorClick.bind(this));
+            this.loadSelected();
+        }
+        SpecFilter.prototype.onSelectorClick = function (event) {
+            event.preventDefault();
+            var context = this;
+            var options = {
+                content: this.content,
+                type: 'html',
+                height: 799,
+                width: $('.centerbar').outerWidth(),
+                padding: 0,
+                autoSize: false,
+                afterClose: function () {
+                },
+                afterShow: function () {
+                    context.bindEvents();
+                    context.loadSelected();
+                }
+            };
+            $.fancybox(options);
+        };
+        SpecFilter.prototype.loadSelected = function () {
+            var $fancy = $('.specializations__listBlock--check').parent();
+            var count = 0;
+            $(this.$selector.data('field')).find(':selected').each(function () {
+                count++;
+                $fancy.find('input[value=' + $(this).val() + ']').prop('checked', 'checked');
+            });
+            this.setCount(count);
+        };
+        SpecFilter.declOfNum = function (number, titles) {
+            var cases = [2, 0, 1, 1, 1, 2];
+            return titles[(number % 100 > 4 && number % 100 < 20) ? 2 : cases[(number % 10 < 5) ? number % 10 : 5]];
+        };
+        SpecFilter.prototype.bindEvents = function () {
+            var context = this;
+            var $fancy = $('.specializations__listBlock--check').parent();
+            $fancy.find('.btn-primary').click(function () {
+                $(context.$selector.data('field')).find('option').removeAttr('selected');
+                var count = 0;
+                var all = $fancy.find('input[value=all]').is(':checked');
+                $fancy.find('.fancycheckbox__checkbox:checked').each(function () {
+                    if (all)
+                        return null;
+                    console.dir($(context.$selector.data('field'))
+                        .find('[value=' + $(this).attr('value') + ']'));
+                    $(context.$selector.data('field'))
+                        .find('[value=' + $(this).attr('value') + ']')
+                        .prop('selected', 'selected');
+                    if ($(this).attr('value') !== 'all')
+                        count++;
+                });
+                context.setCount(count);
+                $(context.$selector.data('field')).trigger('change');
+                $.fancybox.close();
+            });
+            $fancy.find('.fancycheckbox__selectGroup').click(function () {
+                var checked = $(this).prop('checked');
+                $(this).parents('.specializations__listLetter').next().find('.fancycheckbox__checkbox').each(function () {
+                    $(this).prop('checked', checked);
+                });
+            });
+            $fancy.find('.fancycheckbox__checkbox').click(function () {
+                if ($(this).parents('ul').find('.fancycheckbox__checkbox').length == $(this).parents('ul').find('.fancycheckbox__checkbox:checked').length) {
+                    $(this).parents('.specializations__listRow').find('.fancycheckbox__selectGroup').prop('checked', true);
+                }
+                if (!$(this).is(':checked')) {
+                    $(this).parents('.specializations__listRow').find('.fancycheckbox__selectGroup').prop('checked', false);
+                }
+            });
+            $fancy.find('.specializations__listRegionMore').click(function () {
+                var $link = $(this);
+                var $list = $link.prev();
+                $list.animate({'max-height': $list[0].scrollHeight}, 200, function () {
+                    $link.remove();
+                });
+            });
+        };
+        SpecFilter.prototype.checkChecked = function (id) {
+            return this.selected.hasOwnProperty(id);
+        };
+        SpecFilter.prototype.setCount = function (count) {
+            if (count === void 0) {
+                count = 0;
+            }
+            this.$selector.html('Все ' + this.typeName);
+            if (count > 0) {
+                this.$selector.html(count + ' ' + SpecFilter.declOfNum(count, this.strings));
+            }
+        };
+        return SpecFilter;
+    }());
+    SpecFilter_1.SpecFilter = SpecFilter;
+})(SpecFilter || (SpecFilter = {}));

+ 27 - 0
app/assets/styles/_base.scss

@@ -0,0 +1,27 @@
+html {
+    width: 100%;
+    height: 100%;
+}
+
+body {
+    width: 100%;
+    height: 100%;
+    font-family: $fontopensans;
+
+    // pixelperfect
+    // min-height: 3574px;
+    // position: relative;
+    // &:after {
+    //     content: '';
+    //     position: absolute;
+    //     width: 100%;
+    //     height: 100%;
+    //     top: 0;
+    //     left: 0;
+    //     background: url('/pp_index.jpg') 50% 0 no-repeat;
+    //     opacity: .5;
+    // }
+    // .wrapper {
+    //     z-index: 100 !important;
+    // }
+}

+ 0 - 0
app/assets/styles/_color.scss


+ 11 - 0
app/assets/styles/_container.scss

@@ -0,0 +1,11 @@
+.container {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+
+    &--active {
+        filter: blur(3px);
+    }
+}

+ 50 - 0
app/assets/styles/_fonts.scss

@@ -0,0 +1,50 @@
+@font-face {
+    font-family: 'opensans';
+    src: url('../fonts/opensans_regular.eot');
+    src: url('../fonts/opensans_regular.eot?#iefix') format('embedded-opentype'),
+    url('../fonts/opensans_regular.woff2') format('woff2'),
+    url('../fonts/opensans_regular.woff') format('woff'),
+    url('../fonts/opensans_regular.ttf') format('truetype'),
+    url('../fonts/opensans_regular.svg#opensans') format('svg');
+    font-weight: 700;
+    font-style: normal;
+}
+
+$fontopensans: 'opensans', Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
+
+@font-face {
+    font-family: 'cuprum';
+    src: url('../fonts/cuprum_regular.eot');
+    src: url('../fonts/cuprum_regular.eot?#iefix') format('embedded-opentype'),
+    url('../fonts/cuprum_regular.woff2') format('woff2'),
+    url('../fonts/cuprum_regular.woff') format('woff'),
+    url('../fonts/cuprum_regular.ttf') format('truetype'),
+    url('../fonts/cuprum_regular.svg#cuprum') format('svg');
+    font-weight: 400;
+    font-style: normal;
+}
+
+@font-face {
+    font-family: 'cuprum';
+    src: url('../fonts/cuprum_bold.eot');
+    src: url('../fonts/cuprum_bold.eot?#iefix') format('embedded-opentype'),
+    url('../fonts/cuprum_bold.woff2') format('woff2'),
+    url('../fonts/cuprum_bold.woff') format('woff'),
+    url('../fonts/cuprum_bold.ttf') format('truetype'),
+    url('../fonts/cuprum_bold.svg#cuprum') format('svg');
+    font-weight: 700;
+    font-style: normal;
+}
+
+$fontcuprum: 'cuprum', Impact, "Charcoal CY", sans-serif;
+
+// Common weight name mapping
+// 100 - Thin (Hairline)
+// 200 - Extra Light (Ultra Light)
+// 300 - Light
+// 400 - Normal
+// 500 - Medium
+// 600 - Semi Bold (Demi Bold)
+// 700 - Bold
+// 800 - Extra Bold (Ultra Bold)
+// 900 - Black (Heavy)

+ 134 - 0
app/assets/styles/_grid.scss

@@ -0,0 +1,134 @@
+.grid {
+    &-dis {
+        &-row {
+            display: -webkit-flex;
+            display: -ms-flex;
+            display: flex;
+            flex-direction: row;
+            flex-wrap: wrap;
+            margin-bottom: 40px;
+
+            @media screen and (max-width: 1220px) {
+                justify-content: space-around;
+            }
+            @media screen and (max-width: 1000px) {
+                max-width: 470px;
+                margin: auto;
+            }
+
+            & img {
+                display: block;
+            }
+            &:last-child,
+            & div:last-child {
+                margin: 0;
+            }
+        }
+        &-col {
+            &-1 {
+                width: 25%;
+                max-width: 230px;
+                margin: 0 10px 0 0;
+
+                @media screen and (max-width: 1000px) {
+                    width: 50%;
+                    max-width: 230px;
+
+                    &:last-child {
+                        margin-right: 0;
+                    }
+                }
+            }
+            &-2 {
+                width: 50%;
+                max-width: 470px;
+                margin: 0 10px 0 0;
+
+                @media screen and (max-width: 1000px) {
+                    width: 100%;
+                    margin-right: 0;
+                    max-width: none;
+                }
+            }
+            &-3 {
+                width: 75%;
+                max-width: 710px;
+                margin: 0 10px 0 0;
+
+                @media screen and (max-width: 1220px) {
+                    width: 80%;
+                    max-width: calc(100% - 240px);
+                }
+                @media screen and (max-width: 1000px) {
+                    width: 100%;
+                    max-width: none;
+                    margin: 0;
+                }
+            }
+            &-4 {
+                width: 100%;
+                // max-width: 710px;
+                margin: 0 10px 0 0;
+
+                @media screen and (max-width: 1000px) {
+                    width: 100%;
+                    max-width: none;
+
+                    &:last-child {
+                        margin-right: 0;
+                    }
+                }
+            }
+        }
+    }
+    &-disrb {
+        &-row {
+            display: -webkit-flex;
+            display: -ms-flex;
+            display: flex;
+            flex-direction: row;
+            flex-wrap: wrap;
+            margin-bottom: 20px;
+
+            @media screen and (max-width: 1220px) {
+                margin-right: 10px;
+                display: -webkit-flex;
+                display: -ms-flex;
+                display: flex;
+                flex-direction: row;
+                justify-content: space-around;
+            }
+
+            & img {
+                display: block;
+            }
+            &:last-child,
+            & div:last-child {
+                margin: 0;
+            }
+        }
+        &-col {
+            &-1 {
+                width: 33.333333%;
+                max-width: 230px;
+                margin: 0 10px 0 0;
+            }
+            &-2 {
+                width: 66.66666%;
+                max-width: 470px;
+                margin: 0 10px 0 0;
+            }
+            &-3 {
+                width: 100%;
+                max-width: 710px;
+                margin: 0 10px 0 0;
+
+                @media screen and (max-width: 1220px) {
+                    width: 100%;
+                    max-width: 100%;
+                    margin: 0;
+                }
+            }
+        }
+    }
+}

+ 3 - 0
app/assets/styles/_include.scss

@@ -0,0 +1,3 @@
+.left_border_radius {
+    border-radius: 10px 0 0 0;
+}

+ 0 - 0
app/assets/styles/_mixin.scss


+ 233 - 0
app/assets/styles/_reset.scss

@@ -0,0 +1,233 @@
+body,
+div,
+dl,
+dt,
+dd,
+ul,
+ol,
+li,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+pre,
+form,
+fieldset,
+input,
+textarea,
+p,
+blockquote,
+th,
+td,
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section {
+    margin: 0;
+    padding: 0;
+}
+
+html,
+body {
+    width: 100%;
+    height: 100%;
+    -webkit-text-size-adjust: none;
+    -ms-text-size-adjust: none;
+    text-size-adjust: none;
+}
+
+a {
+    outline: 0;
+    border: 0;
+}
+
+table {
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+fieldset,
+img {
+    border: 0;
+}
+
+address,
+caption,
+cite,
+code,
+dfn,
+th,
+var {
+    font-style: normal;
+    font-weight: normal;
+}
+
+ol,
+ul,
+nav,
+menu {
+    list-style: none;
+}
+
+caption,
+th {
+    text-align: left;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+    font-size: 100%;
+    font-weight: normal;
+}
+
+q:before,
+q:after {
+    content: ''
+}
+
+abbr,
+acronym {
+    border: 0;
+}
+
+header,
+footer,
+nav,
+aside {
+    display: block;
+}
+
+input,
+textarea,
+button {
+    outline: 0;
+    border: 0;
+    -webkit-appearance: none;
+    appearance: none;
+}
+
+input:active,
+textarea:active {
+    outline: 0;
+    border: 0;
+}
+
+.clearfix:before,
+.clearfix:after {
+    content: "";
+    display: table;
+}
+
+.clearfix:after {
+    clear: both;
+}
+
+.clearfix {
+    zoom: 1;
+}
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section {
+    display: block;
+}
+
+input,
+label,
+select,
+button,
+textarea {
+    margin: 0;
+    border: 0;
+    padding: 0;
+    display: inline-block;
+    vertical-align: middle;
+    white-space: normal;
+    background: 0;
+    line-height: 1;
+    font-size: 13px;
+    font-family: Arial;
+}
+
+input:focus {
+    outline: 0;
+}
+
+input,
+textarea {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+}
+
+button,
+input[type=reset],
+input[type=button],
+input[type=submit],
+input[type=checkbox],
+input[type=radio],
+select {
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+input[type=checkbox],
+input[type=radio] {
+    width: 13px;
+    height: 13px;
+}
+
+input[type=search] {
+    -webkit-appearance: textfield;
+    -webkit-box-sizing: content-box;
+}
+
+::-webkit-search-decoration {
+    display: none;
+}
+
+button,
+input[type="reset"],
+input[type="button"],
+input[type="submit"] {
+    overflow: visible;
+    width: auto;
+}
+
+::-webkit-file-upload-button {
+    padding: 0;
+    border: 0;
+    background: 0;
+}
+
+textarea {
+    vertical-align: top;
+    overflow: auto;
+}
+
+select[multiple] {
+    vertical-align: top;
+}
+

+ 30 - 0
app/assets/styles/_wrapper.scss

@@ -0,0 +1,30 @@
+.wrapper {
+    width: 100%;
+    max-width: 1220px;
+    margin: auto;
+    position: relative;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: column;
+
+    &--header {
+        flex-direction: row;
+        justify-content: space-between;
+        align-items: center;
+        align-content: center;
+    }
+    &--content {
+        flex-direction: row;
+
+        @media screen and (max-width: 1220px) {
+            padding: 0 15px;
+            box-sizing: border-box;
+            flex-direction: column;
+        }
+    }
+    &--footer {
+        flex-direction: row;
+        justify-content: space-between;
+    }
+}

+ 76 - 0
app/assets/styles/all.scss

@@ -0,0 +1,76 @@
+//
+@import "_reset";
+@import "_fonts";
+@import "_base";
+@import "_wrapper";
+@import "_color";
+@import "_include";
+@import "_mixin";
+@import "_grid";
+//
+@import "elements/input";
+@import "elements/btn";
+@import "elements/banner";
+@import "elements/calendinfo";
+@import "elements/timeseparator";
+@import "elements/holidays";
+//
+@import "blocks/logo";
+//
+@import "header/header";
+@import "header/slogan";
+@import "header/region";
+@import "header/floatmenu";
+@import "header/special";
+//
+@import "content/content";
+@import "content/breadcrumbs";
+//
+@import "content/leftbar/leftbar";
+@import "content/leftbar/search";
+@import "content/leftbar/organization";
+@import "content/leftbar/specialization";
+@import "content/leftbar/filterservice";
+@import "content/leftbar/popularservice";
+@import "content/leftbar/entitybanner";
+@import "content/leftbar/personals";
+@import "content/leftbar/selectedfilter";
+@import "content/leftbar/viewallbtn";
+//
+@import "content/centerbar/centerbar";
+@import "content/centerbar/mainslider";
+@import "content/centerbar/category";
+@import "content/centerbar/shortnews";
+@import "content/centerbar/full-news";
+@import "content/centerbar/maintitle";
+@import "content/centerbar/pagetitle";
+@import "content/centerbar/datefilter";
+@import "content/centerbar/newsfilter";
+@import "content/centerbar/searchfilter";
+@import "content/centerbar/trailernews";
+@import "content/centerbar/videorow";
+@import "content/centerbar/pagination";
+@import "content/centerbar/usefulinfo";
+@import "content/centerbar/selectedline";
+@import "content/centerbar/comments";
+//
+@import "content/centerbar/errorblock";
+//
+@import "content/rightbar/rightbar";
+//
+@import "footer/footer";
+@import "footer/copyright";
+@import "footer/social";
+@import "footer/aferta";
+@import "footer/mainlinks";
+//
+@import "scripts/lightslider.scss";
+@import "scripts/lightgallery.scss";
+@import "scripts/daterangepicker.scss";
+@import "scripts/formstyler.scss";
+@import "scripts/radiobuttontoggle.scss";
+//
+@import "content/rightbar/calend";
+//
+@import "header/loading";
+@import "header/scrolling";

+ 17 - 0
app/assets/styles/blocks/logo.scss

@@ -0,0 +1,17 @@
+.logo {
+
+    &__link, &__img {
+        display: block;
+        width: 191px;
+    }
+    &--header {
+        width: 230px;
+        margin: 16px 0; 
+    }
+    &--vertical &__img {
+        max-width: 103px;
+        max-height: 67px;
+        display: block;
+        margin-right: 20px;
+    }
+}

+ 37 - 0
app/assets/styles/content/breadcrumbs.scss

@@ -0,0 +1,37 @@
+.breadcrumbs {
+    margin-bottom: 20px;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    align-items: center;
+    align-content: center;
+    font-size: 11px;
+    line-height: 15px;
+
+    &__link {
+        color: #929292;
+        text-decoration: underline;
+        margin-right: 20px;
+        position: relative;
+
+        &:hover {
+            text-decoration: none;
+        }
+
+        &:after {
+            content: '';
+            position: absolute;
+            right: -20px;
+            top: 2px;
+            width: 20px;
+            height: 15px;
+            display: block;
+            background: url("data:image/gif;base64,R0lGODlhCAAMANUwAOfn5/7+/paWlaOjoqampdfX1tjY2MzMy+zs7LOzs/39/c/PzuDg4M3Nzbi4uOLi4dzc3NbW1tTU1LKysefn5pubmpeXlsnJyKqqqfLy8q2trPz8/MfHxtnZ2aWlpNDQ0PHx8e3t7cPDw/v7+7u7uqKiocfHx6qqqqysq/j4+Lq6ubKysp6enZiYl5ycm8LCwf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMwNjcgNzkuMTU3NzQ3LCAyMDE1LzAzLzMwLTIzOjQwOjQyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Qjk0ODQ2RkI0NkIyMTFFNzhCMzFBODZCRjVEOUU3QkIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Qjk0ODQ2RkM0NkIyMTFFNzhCMzFBODZCRjVEOUU3QkIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCOTQ4NDZGOTQ2QjIxMUU3OEIzMUE4NkJGNUQ5RTdCQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCOTQ4NDZGQTQ2QjIxMUU3OEIzMUE4NkJGNUQ5RTdCQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAADAALAAAAAAIAAwAAAZEQI7gACsWWxHCywh7VDoolcIIcElWq5ExxFqoUCljZmB6YYyg0uV1KiJYH4cmTHEVJokNjOGCnEgBRwYeIkwmFg1MMEEAOw==") center center / 4px 6px no-repeat;
+        }
+    }
+    &__page {
+        color: #929292;
+    }
+}

+ 3 - 0
app/assets/styles/content/centerbar/calendcase.scss

@@ -0,0 +1,3 @@
+.calendcase {
+    
+}

+ 32 - 0
app/assets/styles/content/centerbar/category.scss

@@ -0,0 +1,32 @@
+.category {
+
+    &__list {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        align-content: flex-start;
+    }
+    li,
+    &__item {
+        padding-right: 5px;
+    }
+    a,
+    &__link {
+        line-height: 45px;
+        display: block;
+        font-family: $fontcuprum;
+        font-weight: normal;
+        // padding: 0 10px;
+        margin-right: 15px;
+        font-size: 17px;
+        color: #3b434d;
+        text-decoration: none;
+
+        &:hover {
+            color: #e65e26;
+        }
+    }
+}

+ 7 - 0
app/assets/styles/content/centerbar/centerbar.scss

@@ -0,0 +1,7 @@
+.centerbar {
+    width: 78.2%;
+
+    @media screen and (max-width: 1220px) {
+        width: 100%;
+    }
+}

+ 252 - 0
app/assets/styles/content/centerbar/comments.scss

@@ -0,0 +1,252 @@
+.comments {
+    &__block {
+        margin-top: 40px;
+    }
+
+    &__header {
+        background: #d7d7d7;
+        border-radius: 20px 0 0 0;
+        padding: 4px 12px 3px 12px;
+        position: relative;
+        margin-bottom: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        align-content: center;
+    }
+
+    &__title {
+        display: inline-block;
+        width: calc(80% - 0.25em);
+        margin: 0;
+    }
+
+    &__add-link {
+        display: block;
+        font-size: 15px;
+        font-family: $fontopensans;
+        vertical-align: middle;
+        text-decoration: none;
+
+        &-text {
+            display: inline-block;
+            color: #929292;
+            text-decoration: none;
+            border-bottom: 1px dotted #929292;
+        }
+        &:hover {
+            .comments__add-link-text {
+                color: #5597d1;
+                border-bottom: 1px dotted #5597d1;
+            }
+
+            .comments__ico {
+                background: url("../img/comments/commentsIco-hover.png");
+            }
+        }
+    }
+
+    &__ico {
+        display: inline-block;
+        background: url("../img/comments/commentsIco.png");
+        width: 40px;
+        height: 40px;
+        vertical-align: middle;
+    }
+
+    &__comment {
+        border-radius: 20px 0 0 0;
+        border: 1px solid #f3f3f3;
+        box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
+        margin-bottom: 20px;
+        margin-right: 3px;
+    }
+
+    &__comment--level2 {
+        width: calc(100% - 90px);
+        margin-left: 87px;
+        position: relative;
+        margin-right: 3px;
+
+        &:before {
+            position: absolute;
+            content: '';
+            display: block;
+            top: -10px;
+            left: 50px;
+            width: 20px;
+            height: 10px;
+            background: url("../img/comments/commentsBefore.png");
+        }
+    }
+
+    &__comment-text {
+        padding: 10px;
+        font-size: 15px;
+        font-family: $fontopensans;
+        color: #404040;
+    }
+
+    &__comment-info {
+        background: #f3f3f3;
+        padding: 10px;
+    }
+
+    &__comment-name {
+        font-size: 17px;
+        font-family: $fontcuprum;
+        color: #929292;
+        display: inline-block;
+        padding-right: 20px;
+    }
+
+    &__comment-date {
+        display: inline-block;
+        font-size: 13px;
+        font-family: $fontopensans;
+        color: #929292;
+    }
+
+    &__comment-reply {
+        font-size: 13px;
+        font-family: $fontopensans;
+        color: #a2a1a1;
+        text-decoration: none;
+        border-bottom: 1px dotted #a2a1a1;
+        display: inline-block;
+        position: relative;
+        float: right;
+        margin-right: 31px !important;
+        cursor: pointer;
+
+        &:after {
+            position: absolute;
+            content: '';
+            display: block;
+            width: 20px;
+            height: 20px;
+            right: -30px;
+            background: url("../img/comments/commentsReply.png");
+            top: 50%;
+            transform: translate(0, -50%);
+        }
+
+        &:hover {
+            color: #004d7b;
+            border-bottom: 1px dotted #004d7b;
+
+            &:after {
+                background: url("../img/comments/commentsReply-hover.png");
+            }
+        }
+    }
+
+    &__show-all {
+        font-size: 14px;
+        font-family: $fontopensans;
+        color: #004d7b;
+        text-align: center;
+        background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 47%, #fff 100%);
+        padding: 15px 0;
+        top: -66px;
+        position: relative;
+        cursor: pointer;
+    }
+
+    &__add-back-log {
+        display: none;
+        position: fixed;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        background: rgba(0, 0, 0, 0.7);
+        z-index: 20;
+    }
+
+    &__add-popup {
+        display: none;
+        z-index: 21;
+        position: fixed;
+        top: 50%;
+        background: #d7d7d7;
+        width: 960px;
+        padding: 15px;
+        box-sizing: border-box;
+    }
+
+    &__add-popup-form-group--small {
+        display: inline-block;
+        vertical-align: top;
+        width: calc(25% - 0.25em - 11px);
+        margin-right: 15px;
+    }
+
+    &__add-popup-form-group--big {
+        display: inline-block;
+        vertical-align: top;
+        width: calc(75% - 0.25em);
+    }
+
+    &__add-popup-form-input {
+        width: 100%;
+        padding: 10px;
+        border-radius: 20px;
+        border: none;
+        box-sizing: border-box;
+        margin-bottom: 15px;
+        font-size: 11px;
+        font-family: $fontopensans;
+        color: #929292;
+    }
+
+    &__add-popup-form-textarea {
+        resize: none;
+        width: 100%;
+        height: 140px;
+        border: none;
+        border-radius: 20px;
+        padding: 15px;
+        box-sizing: border-box;
+        font-size: 11px;
+        font-family: $fontopensans;
+        color: #929292;
+    }
+
+    &__add-popup-form-submit-block {
+        position: relative;
+        margin-top: 10px;
+    }
+
+    &__add-popup-form-submit {
+        font-size: 11px;
+        font-family: $fontopensans;
+        color: #929292;
+        text-decoration: none;
+        border: none;
+        border-bottom: 1px dotted #004d7b;
+        background: none;
+        cursor: pointer;
+    }
+
+    &__add-popup-ico {
+        position: absolute;
+        display: block;
+        right: 0;
+        top: 10px;
+        transform: translate(0, -50%);
+        background: url("../img/commentsIcoPopup.png");
+        width: 40px;
+        height: 40px;
+    }
+
+    &__add-popup-close {
+        position: absolute;
+        top: -40px;
+        right: 0;
+        width: 28px;
+        background: url("../img/popupclose.png");
+        cursor: pointer;
+        height: 28px;
+    }
+}

+ 31 - 0
app/assets/styles/content/centerbar/datefilter.scss

@@ -0,0 +1,31 @@
+.datefilter {
+    white-space: nowrap;
+    word-wrap: normal;
+    line-height: 30px;
+    font-size: 12px;
+    color: #929292;
+    display: block;
+    width: auto;
+    padding-right: 5px;
+    height: 30px;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    cursor: pointer;
+
+    &__icon {
+        width: 30px;
+        height: 30px;
+        background: url('../img/icon_news_titl@2x.png') 0 0 / 30px 90px no-repeat #e65e26;
+        border-radius: 15px;
+        cursor: pointer;
+
+        &:hover {
+            background-color: #eb914e;
+        }
+    }
+    &__text {
+        padding-left: 5px;
+    }
+}

+ 21 - 0
app/assets/styles/content/centerbar/errorblock.scss

@@ -0,0 +1,21 @@
+.errorblock {
+    background: #ebebeb;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    padding: 25px;
+    margin-bottom: 10px;
+
+    &__img {
+        margin-right: 20px;
+    }
+    &__text {
+        font-size: 32px;
+        color: #929292;
+        font-family: $fontcuprum;
+        font-weight: bold;
+        line-height: 35px;
+    }
+}

+ 196 - 0
app/assets/styles/content/centerbar/full-news.scss

@@ -0,0 +1,196 @@
+.full-news {
+
+    &__details {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        font-size: 13px;
+        width: 100%;
+        justify-content: space-between;
+        height: 14px;
+        line-height: 14px;
+        margin-bottom: 20px;
+    }
+    &__left {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        height: 14px;
+        line-height: 14px;
+    }
+    &__date {
+        margin-right: 20px;
+        color: #929292;
+    }
+    &__category {
+        color: #e65e26;
+        text-decoration: none;
+        margin-right: 20px;
+        height: 14px;
+        line-height: 14px;
+        background: url("../img/icon_category@2x.png") 0 -7px / 30px 60px no-repeat;
+        padding-left: 23px;
+
+        &:hover {
+            color: #eb914e;
+            background: url("../img/icon_category@2x.png") 0 -37px / 30px 60px no-repeat;
+        }
+    }
+    &__region {
+        color: #e65e26;
+        text-decoration: none;
+        margin-right: 20px;
+        background: url("../img/icon_regionmark.png") 0 0 / 10px 28px no-repeat;
+        padding-left: 15px;
+        height: 14px;
+        line-height: 14px;
+        position: relative;
+        z-index: 1;
+
+        &:hover {
+            color: #eb914e;
+            background-position: 0 -14px;
+        }
+    }
+    &__right {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        color: #929292;
+        height: 14px;
+        line-height: 14px;
+    }
+    &__views {
+        margin-right: 20px;
+        background: url("../img/icon_views@2x.png") left center / auto 12px no-repeat;
+        padding-left: 23px;
+        height: 14px;
+        line-height: 14px;
+    }
+    &__comments {
+        background: url("../img/icon_comments@2x.png") left center / auto 15px no-repeat;
+        padding-left: 18px;
+        height: 14px;
+        line-height: 14px;
+    }
+    &__slideritem {
+        text-align: center;
+    }
+    &__sliderimg {
+        display: block;
+        width: 100%;
+        max-width: 710px;
+        height: 100%;
+        max-height: 360px;
+        border-radius: 10px 0 0 0 / 10px 0 0 0;
+        margin: auto;
+    }
+    .lSPager.lSGallery {
+
+        li {
+            margin: 5px 0;
+
+            img {
+                margin: auto;
+                filter: grayscale(0.75) saturate(75%) contrast(75%) brightness(0.75);
+
+                &:hover {
+                    filter: none;
+                }
+            }
+            &.active img {
+                filter: none;
+            }
+        }
+    }
+
+    &__block-title {
+        font-family: "cuprum", Impact, "Charcoal CY", sans-serif;
+        font-size: 20px;
+        color: #004d7b;
+        font-weight: 600;
+        padding: 10px 0;
+        display: block;
+    }
+
+    &__announce {
+        font-size: 18px;
+        font-family: $fontcuprum;
+        margin: 20px 0;
+    }
+
+    &__text {
+        margin-bottom: 40px;
+        padding-bottom: 10px;
+        border-bottom: 1px solid #ebebeb;
+
+        h2 {
+            font-family: $fontcuprum;
+            font-size: 25px;
+            margin: 20px 0;
+            font-weight: 600;
+        }
+
+        h3 {
+            font-family: $fontcuprum;
+            font-size: 20px;
+            margin: 20px 0;
+            font-weight: 600;
+        }
+
+        p {
+            font-family: $fontopensans;
+            font-size: 15px;
+            margin: 20px 0;
+        }
+
+    }
+
+    &__other-materials {
+
+        margin: 20px 0;
+
+        &-read-all {
+            color: #fff;
+            background-color: #eb914e;
+            display: block;
+            text-align: center;
+            padding: 10px 0;
+            text-decoration: none;
+            font-size: 13px;
+
+            &:hover {
+                background-color: #d46818;
+            }
+        }
+    }
+
+    &__source {
+        display: block;
+
+        &-item {
+            margin: 10px 0;
+            display: block;
+            font-size: 15px;
+            font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
+            line-height: 1.4;
+
+            a {
+                font-size: inherit;
+                color: #004d7b;
+                font-family: inherit;
+            }
+        }
+
+        &-title {
+            font-size: 13px;
+            font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
+            display: inline-block;
+            color: #a2a1a1;
+        }
+    }
+
+}

+ 69 - 0
app/assets/styles/content/centerbar/mainslider.scss

@@ -0,0 +1,69 @@
+.mainslider {
+    background-color: #ebebeb;
+    font-family: $fontcuprum;
+    border-radius: 10px 0 0 0 / 10px 0 0 0;
+    position: relative;
+    z-index: 90;
+
+    &:hover &__textpos {
+        background: none;
+    }
+    &:hover &__title {
+        background: rgba(255, 255, 255, .5);
+        color: #3b434d;
+    }
+    &__item {
+        position: relative;
+        min-height: 320px;
+    }
+    &__img {
+        border-radius: 10px 0 0 0 / 10px 0 0 0;
+    }
+    &__textpos {
+        min-height: 100px;
+        background: -moz-linear-gradient(top, rgba(59, 67, 77, 0) 0%, rgba(59, 67, 77, 0) 10%, rgba(59, 67, 77, 1) 100%);
+        background: -webkit-linear-gradient(top, rgba(59, 67, 77, 0) 0%, rgba(59, 67, 77, 0) 10%, rgba(59, 67, 77, 1) 100%);
+        background: linear-gradient(to bottom, rgba(59, 67, 77, 0) 0%, rgba(59, 67, 77, 0) 10%, rgba(59, 67, 77, 1) 100%);
+        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b434d', endColorstr='#3b434d', GradientType=0);
+        position: absolute;
+        bottom: 30px;
+        left: 0;
+        right: 0;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: column;
+        justify-content: flex-end;
+        align-items: flex-end;
+        align-content: flex-end;
+    }
+    &__title {
+        font-size: 25px;
+        color: #ffffff;
+        padding: 6px 10px;
+    }
+    &__category {
+        position: absolute;
+        z-index: 100;
+        bottom: 0;
+        line-height: 30px;
+        text-align: left;
+        padding: 0 10px;
+        color: #eb914e;
+        text-decoration: none;
+        font-size: 13px;
+        font-family: $fontopensans;
+
+        &:hover {
+            color: #e65e26;
+        }
+        &::before {
+            content: "⚫";
+            color: #eb914e;
+            padding-right: 3px;
+        }
+        &:hover::before {
+            color: #e65e26;
+        }
+    }
+}

+ 33 - 0
app/assets/styles/content/centerbar/maintitle.scss

@@ -0,0 +1,33 @@
+.maintitle {
+    background: #ebebeb;
+    border-radius: 10px 0 0 0 / 10px 0 0 0;
+    height: 50px;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 20px;
+    position: relative;
+
+    &__title {
+        padding: 0 10px;
+        font-family: $fontcuprum;
+        font-size: 20px;
+        color: #3b434d;
+        font-weight: bold;
+    }
+
+    &__details {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        width: auto;
+        padding: 0 5px;
+        justify-content: center;
+        align-items: center;
+        align-content: center;
+    }
+}

+ 263 - 0
app/assets/styles/content/centerbar/newsfilter.scss

@@ -0,0 +1,263 @@
+.newsfilter {
+    @extend .datefilter;
+
+    &__icon {
+        @extend .datefilter__icon;
+        background: url('../img/icon_news_titl@2x.png') 0 -30px / 30px 90px no-repeat #e65e26;
+    }
+
+    &__open {
+        position: absolute;
+        width: 100%;
+        top: 50px;
+        left: 0;
+        background: #ebebeb;
+        cursor: default;
+        box-sizing: border-box;
+        padding: 0 10px;
+        height: 0;
+        opacity: 0;
+        overflow: hidden;
+        transition: all .5s ease;
+
+        &--show {
+            opacity: 1;
+            height: auto;
+            transition: all .5s ease;
+            padding: 10px;
+            overflow: visible;
+            border: 1px solid #c8c8c8;
+        }
+    }
+    &__form {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-around;
+    }
+    &__text {
+    }
+    &__selectcase {
+        position: relative;
+        text-overflow: ellipsis;
+
+        select,
+        option {
+            display: none;
+        }
+    }
+    &__selectwrap {
+        position: relative;
+    }
+    &__select {
+        /*width: 150px;
+        background: #FFFFFF;
+        border-radius: 15px;
+        line-height: 30px;
+        height: 30px;*/
+        display: none;
+    }
+    &__submitcase {
+    }
+    &__submit {
+        color: #eb914e;
+        text-decoration: underline;
+        cursor: pointer;
+
+        &:hover {
+            text-decoration: none;
+            color: #e7632d;
+        }
+    }
+
+    &__specializations,
+    &__regions {
+        cursor: pointer;
+        padding-right: 20px;
+    }
+
+    &__specializations {
+        background: url(../img/filter_ico_spec.png) right center no-repeat;
+    }
+
+    &__regions {
+        background: url(../img/filter_ico_region.png) right center no-repeat;
+        position: relative;
+    }
+}
+
+.specializations {
+    &__listBlock {
+        background: #fff;
+        box-shadow: 0 0 10px 0 #a8a8a8;
+        top: 35px;
+        box-sizing: border-box;
+        padding: 0 10px 14px;
+    }
+
+    &__listRow {
+        display: inline-block;
+        vertical-align: top;
+        width: calc(21% - 0.25em - 49px);
+        margin-right: 12px;
+
+        &:last-child {
+            margin-right: 0;
+        }
+    }
+    &__listRegionLink {
+        font-size: 11px;
+        font-family: "open_sansregular";
+        color: #646464;
+        text-transform: uppercase;
+        line-height: 1.818;
+        text-decoration: none;
+        display: block;
+    }
+    &__listLetter {
+        font-size: 16px;
+        font-family: "open_sansregular";
+        color: #646464;
+        text-transform: uppercase;
+        line-height: 1.2;
+        margin-top: 10px;
+        min-height: 19px;
+
+        label {
+            display: block;
+        }
+    }
+    &__listLetter--spec {
+        font-size: 15px;
+        background: #ebebeb;
+        color: #646464;
+        padding: 3px 0;
+    }
+
+    &__listHeader {
+        line-height: 46px;
+        background-color: #ebebeb;
+        margin: 0 -10px;
+        padding-left: 10px;
+        font-family: "open_sansregular";
+        color: #646464;
+        position: relative;
+
+        label {
+            font-size: 16px;
+        }
+
+        input[type=checkbox] {
+            -webkit-appearance: checkbox;
+            appearance: checkbox;
+            margin: 3px 3px 3px 4px;
+        }
+
+        &:before,
+        &:after {
+            clear: both;
+            content: '';
+            display: block;
+        }
+
+        &Button {
+            background: #e65e26;
+            font-size: 11px;
+            line-height: 1;
+            padding: 9px;
+            position: absolute;
+            right: 10px;
+            top: 9px;
+            color: #fff;
+            border-radius: 15px;
+            text-transform: uppercase;
+            cursor: pointer;
+        }
+    }
+    &__listLine {
+        margin-top: 10px;
+    }
+    &__listList {
+        padding: 0;
+        margin: 0;
+        list-style-type: none;
+    }
+    &__listRow--spec {
+        width: calc(37% - 0.25em - 49px);
+        &:nth-child(3n) {
+            margin-right: 0;
+        }
+        .specializations__listList {
+            max-height: 125px;
+            overflow: hidden;
+        }
+    }
+
+    &__listRegionMore {
+        text-decoration: none;
+        color: #00adee;
+        text-transform: uppercase;
+        margin-left: 10px;
+        cursor: pointer;
+        &:after {
+            content: ' >';
+        }
+    }
+}
+
+.regionsfilter {
+    &__container {
+        position: absolute;
+        top: 100%;
+        left: -20px;
+        padding: 5px;
+        background: #ebebeb;
+        z-index: 2;
+        cursor: default;
+    }
+    &__label {
+        white-space: nowrap;
+    }
+    &__checkbox {
+        -webkit-appearance: checkbox;
+        appearance: checkbox;
+        margin-right: 4px;
+    }
+}
+
+.fancycheckbox {
+    &__clearfix {
+        &:before,
+        &:after {
+            display: block;
+            content: '';
+            clear: both;
+        }
+    }
+    &__checkbox,
+    &__selectGroup {
+        -webkit-appearance: checkbox;
+        appearance: checkbox;
+        display: block;
+        float: left;
+        margin: 3px 3px 3px 4px;
+    }
+    &__label {
+        @extend .fancycheckbox__clearfix;
+    }
+    &__labelText {
+        display: block;
+        float: left;
+        width: 84%;
+        margin-left: 3px;
+        margin-top: 2px;
+        font-size: 11px;
+    }
+    &__labelHeaderText {
+        font-size: 15px;
+    }
+    &__selectGroupHeader {
+        @extend .fancycheckbox__clearfix;
+    }
+}

+ 9 - 0
app/assets/styles/content/centerbar/pagetitle.scss

@@ -0,0 +1,9 @@
+.pagetitle {
+    padding: 5px 0;
+    line-height: 35px;
+    font-family: $fontcuprum;
+    font-weight: bold;
+    font-size: 32px;
+    color: #3b434d;
+    margin-bottom: 10px;
+}

+ 82 - 0
app/assets/styles/content/centerbar/pagination.scss

@@ -0,0 +1,82 @@
+.pagination {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    padding-top: 20px;
+
+    &__item {
+        background: #ebebeb;
+        width: calc(100% - 150px);
+        line-height: 40px;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+    }
+    &__list {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+    }
+    &__link {
+        width: 40px;
+        height: 40px;
+        line-height: 40px;
+        display: block;
+        text-align: center;
+        text-decoration: none;
+        font-size: 13px;
+        color: #3b434d;
+
+        &--left {
+            background: url('../img/icon_arrows_pagination@2x.png') 0 0 / 80px 80px no-repeat;
+
+            &:hover {
+                background-position: 0 -40px;
+            }
+        }
+        &--right {
+            background: url('../img/icon_arrows_pagination@2x.png') -40px 0 / 80px 80px no-repeat;
+
+            &:hover {
+                background-position: -40px -40px;
+            }
+        }
+        &:hover {
+            color: #e65e26;
+        }
+        &--separator {
+            &:hover {
+                color: #3b434d;
+            }
+        }
+        &--active {
+            color: #e65e26;
+            border-bottom: 2px solid #e65e26;
+        }
+    }
+    &__filter {
+        width: 150px;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-items: center;
+        align-content: center;
+        cursor: pointer;
+        background: #e65e26;
+        color: #ffffff;
+        text-decoration: none;
+        font-size: 13px;
+        line-height: 40px;
+
+        &:hover {
+            background: #eb914e;
+        }
+    }
+}

+ 0 - 0
app/assets/styles/content/centerbar/searchfilter.scss


+ 13 - 0
app/assets/styles/content/centerbar/selectedline.scss

@@ -0,0 +1,13 @@
+.selectedline {
+    font-family: $fontcuprum;
+    font-weight: bold;
+    font-size: 20px;
+    color: #929292;
+    margin-bottom: 30px;
+    display: block;
+
+    &__item {
+        background: url('../img/icon_filter_26x26@2x.png') 4px 50% / 13px 13px no-repeat;
+        padding-left: 23px;
+    }
+}

+ 115 - 0
app/assets/styles/content/centerbar/shortnews.scss

@@ -0,0 +1,115 @@
+.shortnews {
+    background-color: #ebebeb;
+    min-height: 320px;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: column;
+    border-radius: 10px 0 0 0 / 10px 0 0 0;
+    margin-bottom: 10px;
+
+    &:hover {
+        background-color: #ececec;
+    }
+    &__link {
+        text-decoration: none;
+    }
+    &__imgcase {
+        position: relative;
+    }
+    &__textpos {
+        min-height: 100px;
+        background: -moz-linear-gradient(top, rgba(59, 67, 77, 0) 0%, rgba(59, 67, 77, 0) 10%, rgba(59, 67, 77, 1) 100%);
+        background: -webkit-linear-gradient(top, rgba(59, 67, 77, 0) 0%, rgba(59, 67, 77, 0) 10%, rgba(59, 67, 77, 1) 100%);
+        background: linear-gradient(to bottom, rgba(59, 67, 77, 0) 0%, rgba(59, 67, 77, 0) 10%, rgba(59, 67, 77, 1) 100%);
+        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b434d', endColorstr='#3b434d', GradientType=0);
+        position: absolute;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: column;
+        justify-content: flex-end;
+        align-items: flex-end;
+        align-content: flex-end;
+    }
+    &:hover &__textpos {
+        background: none;
+    }
+    &__title {
+        font-family: $fontcuprum;
+        color: #ffffff;
+        font-size: 17px;
+        padding: 8px 10px;
+        width: 100%;
+        box-sizing: border-box;
+    }
+    &:hover &__title {
+        background: rgba(255, 255, 255, .5);
+        color: #3b434d;
+    }
+    &__img {
+        border-radius: 10px 0 0 0 / 10px 0 0 0;
+        display: block;
+        max-width: 100%;
+    }
+    &__description {
+        border-bottom: 1px solid #d4d4d4;
+        height: 137px;
+        line-height: 19px;
+        box-sizing: border-box;
+        padding: 6px 10px 10px;
+        color: #1a1916;
+        font-size: 15px;
+        line-height: 17px;
+        display: block;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    &__details {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        line-height: 30px;
+    }
+    &__category {
+        line-height: 30px;
+        text-align: left;
+        padding: 0 10px;
+        color: #eb914e;
+        text-decoration: none;
+        font-size: 13px;
+        font-family: $fontopensans;
+        text-overflow: ellipsis;
+        overflow: hidden;
+        display: block;
+        height: 30px;
+        white-space: nowrap;
+        word-wrap: normal;
+        background: url("../img/icon_category@2x.png") 0 0 / 30px 60px no-repeat;
+        padding-left: 23px;
+
+        &:hover {
+            color: #e65e26;
+            background: url("../img/icon_category@2x.png") 0 -30px / 30px 60px no-repeat;
+        }
+    }
+    &__date {
+        padding-right: 10px;
+        color: #929292;
+        font-size: 13px;
+    }
+
+    &--big {
+        @media screen and (max-width: 1000px) {
+            max-width: 470px;
+        }
+    }
+    &--big &__title {
+        font-size: 25px;
+    }
+}

+ 122 - 0
app/assets/styles/content/centerbar/trailernews.scss

@@ -0,0 +1,122 @@
+.trailernews {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    margin-bottom: 20px;
+
+    @media screen and (max-width: 1220px) {
+        width: 100%;
+    }
+
+    &__imgcase {
+        margin-right: 15px;
+    }
+    &__imgc {
+        width: 110px;
+        max-width: 110px;
+        height: 72px;
+        max-height: 72px;
+    }
+
+    &__imgcase:hover + &__textcase &__title {
+        color: #5597d1;
+    }
+    &__textcase {
+        border-top: 1px solid #ececec;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: column;
+        width: calc(100% - 110px - 15px);
+        justify-content: space-between;
+    }
+    &__title {
+        font-family: $fontcuprum;
+        font-size: 17px;
+        display: block;
+        text-decoration: none;
+        color: #3b434d;
+        margin-top: 5px;
+        margin-bottom: 10px;
+
+        &:hover {
+            color: #5597d1;
+        }
+    }
+    &__details {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        font-size: 13px;
+        width: 100%;
+        justify-content: space-between;
+        height: 14px;
+        line-height: 14px;
+    }
+    &__left {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        height: 14px;
+        line-height: 14px;
+    }
+    &__date {
+        margin-right: 20px;
+        color: #929292;
+    }
+    &__category {
+        color: #e65e26;
+        text-decoration: none;
+        margin-right: 20px;
+        height: 14px;
+        line-height: 14px;
+        background: url("../img/icon_category@2x.png") 0 -7px / 30px 60px no-repeat;
+        padding-left: 23px;
+
+        &:hover {
+            color: #eb914e;
+            background: url("../img/icon_category@2x.png") 0 -37px / 30px 60px no-repeat;
+        }
+    }
+    &__region {
+        color: #e65e26;
+        text-decoration: none;
+        margin-right: 20px;
+        background: url("../img/icon_regionmark.png") 0 0 / 10px 28px no-repeat;
+        padding-left: 15px;
+        height: 14px;
+        line-height: 14px;
+        position: relative;
+        z-index: 1;
+
+        &:hover {
+            color: #eb914e;
+            background-position: 0 -14px;
+        }
+    }
+    &__right {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        color: #929292;
+        height: 14px;
+        line-height: 14px;
+    }
+    &__views {
+        margin-right: 20px;
+        background: url("../img/icon_views@2x.png") left center / auto 12px no-repeat;
+        padding-left: 23px;
+        height: 14px;
+        line-height: 14px;
+    }
+    &__comments {
+        background: url("../img/icon_comments@2x.png") left center / auto 15px no-repeat;
+        padding-left: 18px;
+        height: 14px;
+        line-height: 14px;
+    }
+}

+ 36 - 0
app/assets/styles/content/centerbar/usefulinfo.scss

@@ -0,0 +1,36 @@
+.usefulinfo {
+
+    &__title {
+        color: #3b434d;
+        font-family: $fontcuprum;
+        font-size: 20px;
+        font-weight: 700;
+        text-align: center;
+        margin-bottom: 25px;
+    }
+    &__list {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+    }
+    &__item {
+        width: calc(33.33333% - 15px);
+        padding-left: 15px;
+        margin-bottom: 20px;
+        background: url("data:image/gif;base64,R0lGODlhBQAJAMQaAFhfaJufpFFYYePk5v39/a2wtGZsdIGGjcLFyIyQlunq6z1FT5qepO/w8IKIjrG1uNze4LK1uWhudkdPWE1UXaOnq1deZ0dOVzxETjtDTf///wAAAAAAAAAAAAAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMwNjcgNzkuMTU3NzQ3LCAyMDE1LzAzLzMwLTIzOjQwOjQyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6REJDQTMxNkY0NTQyMTFFN0FENjBBQTczMDkwM0VDREYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6REJDQTMxNzA0NTQyMTFFN0FENjBBQTczMDkwM0VDREYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEQkNBMzE2RDQ1NDIxMUU3QUQ2MEFBNzMwOTAzRUNERiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEQkNBMzE2RTQ1NDIxMUU3QUQ2MEFBNzMwOTAzRUNERiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAABoALAAAAAAFAAkAAAUhoHQQmmZkSdkAGVMqQlaUTzZp0LUgA4VFGkumUnIESpoQADs=") 2px 5px no-repeat;
+    }
+    &__link {
+        font-family: $fontopensans;
+        color: #3b434d;
+        font-size: 13px;
+        text-decoration: underline;
+        line-height: 16px;
+        display: block;
+
+        &:hover {
+            text-decoration: none;
+        }
+    }
+}

+ 30 - 0
app/assets/styles/content/centerbar/videorow.scss

@@ -0,0 +1,30 @@
+.videorow {
+    min-height: 155px;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    margin-bottom: 16px;
+
+    &__item {
+        margin-right: 10px;
+
+        &:last-child {
+            margin: 0;
+        }
+        @media screen and (max-width: 1000px) {
+            width: 33.33333%;
+        }
+    }
+    &--smi {
+        flex-direction: column;
+    }
+    &--smi &__item {
+        margin: 0px;
+
+        &:first-child {
+            margin-bottom: 15px;
+        }
+    }
+}

+ 16 - 0
app/assets/styles/content/content.scss

@@ -0,0 +1,16 @@
+.content {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex: 1 0 auto;
+    flex-direction: column;
+    padding-top: 30px;
+    padding-bottom: 40px;
+
+    &.scrolling {
+        margin-top: 81px;
+    }
+    &.inner {
+        margin-top: 45px;
+    }
+}

+ 84 - 0
app/assets/styles/content/leftbar/entitybanner.scss

@@ -0,0 +1,84 @@
+.entitybanner {
+    margin-bottom: 20px;
+
+    &__item {
+        margin-bottom: 20px;
+        border: 1px solid #ebebeb;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: column;
+        text-decoration: none;
+        border-radius: 10px 0 0 0 / 10px 0 0 0;
+
+        &:hover {
+            border-color: #d2dee9;
+        }
+        &:hover .entitybanner__address {
+            background: #d2dee9;
+        }
+    }
+    &__title {
+        padding: 5px;
+        font-size: 16px;
+        color: #004d7b;
+        font-family: $fontcuprum;
+        text-align: center;
+        padding-bottom: 0;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        align-content: center;
+        min-height: 60px;
+    }
+    &__description {
+        padding: 5px;
+        text-align: center;
+        font-family: $fontcuprum;
+        font-size: 14px;
+        color: #929292;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        align-content: center;
+        min-height: 60px;
+    }
+    &__imgcase {
+        display: block;
+        margin: auto;
+        margin-bottom: 5px;
+    }
+    &__img {
+        width: 100%;
+        max-width: 200px;
+        height: 100%;
+        max-height: 130px;
+    }
+    &__address {
+        background: #ebebeb;
+        padding: 5px;
+        min-height: 50px;
+        color: #929292;
+        font-size: 13px;
+        text-align: center;
+        line-height: 15px;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        align-content: center;
+        font-family: $fontcuprum;
+    }
+
+    &__item:hover {
+        border-color: #d2dee9;
+    }
+    &__item:hover &__address {
+        background: #d2dee9;
+    }
+}

+ 98 - 0
app/assets/styles/content/leftbar/filterservice.scss

@@ -0,0 +1,98 @@
+.filterservice {
+
+    &__title {
+        line-height: 18px;
+        color: #5597d1;
+        height: 53px;
+
+        &::before {
+            content: '';
+            position: absolute;
+            width: 51px;
+            height: 51px;
+            border-radius: 50%;
+            left: -10px;
+            top: -5px;
+            border: 5px solid #ffffff;
+            background: url("../img/icon_leftbar_innermenu_03@2x.png") 50% 50% / 25px 25px no-repeat #5597d1;
+        }
+    }
+    &__block {
+        background: #ebebeb;
+        padding-top: 15px;
+    }
+    &__inputtext {
+        width: 100%;
+        font-size: 13px;
+        color: #929292;
+        font-family: $fontopensans;
+        margin-bottom: 10px;
+    }
+    &__inputcase {
+        padding: 0 10px;
+        margin-bottom: 20px;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        align-items: center;
+        align-content: center;
+        flex-wrap: wrap;
+
+        &inner {
+            width: 33.33333%;
+            float: left;
+            // padding-bottom: 10px;
+        }
+    }
+    &__labelcase {
+        width: 35%;
+    }
+    &__toggle {
+        width: 30%;
+    }
+    &__labelbig {
+        cursor: pointer;
+        padding: 0 5px;
+        padding-top: 26px;
+        line-height: 25px;
+        background: url('../img/icon_filterservice_01@2x.png') 50% 0 / 26px 26px no-repeat;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        width: 35%;
+        font-family: $fontcuprum;
+        text-align: center;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-items: center;
+        align-content: center;
+        color: #5597d1;
+        filter: grayscale(1);
+
+        &--active {
+            filter: grayscale(0);
+        }
+
+        &--old1 {
+            background-image: url('../img/icon_filterservice_01@2x.png');
+            order: 1;
+        }
+        &--old2 {
+            background-image: url('../img/icon_filterservice_02@2x.png');
+            order: 3;
+        }
+        &--male1 {
+            background-image: url('../img/icon_filterservice_03@2x.png');
+            order: 1;
+        }
+        &--male2 {
+            background-image: url('../img/icon_filterservice_04@2x.png');
+            order: 3;
+        }
+    }
+}

+ 85 - 0
app/assets/styles/content/leftbar/leftbar.scss

@@ -0,0 +1,85 @@
+.leftbar {
+    width: 18.7%;
+    margin-right: 3.1%;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: column;
+
+    &__title {
+        padding-left: 58px;
+        height: 45px;
+        background: #ebebeb;
+        border-radius: 25px 0 0 25px;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        align-content: center;
+        align-items: center;
+        font-family: $fontcuprum;
+        font-size: 20px;
+        color: #004d7b;
+        font-weight: bold;
+        flex-wrap: wrap;
+
+        &--popularservice {
+            padding-left: 10px;
+            border-radius: 0;
+        }
+    }
+
+    &__subtitle {
+        background: #d7d7d7;
+        border-radius: 10px 0 0 0 / 10px 0 0 0;
+        padding: 10px;
+        line-height: 20px;
+        color: #3b434d;
+        font-size: 17px;
+        font-family: $fontcuprum;
+        font-weight: bold;
+        margin-bottom: 20px;
+    }
+
+    &__item {
+        position: relative;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: column;
+        margin-bottom: 40px;
+
+        &::before {
+            content: '';
+            position: absolute;
+            width: 51px;
+            height: 51px;
+            border-radius: 50%;
+            left: -10px;
+            top: -8px;
+            border: 5px solid #ffffff;
+        }
+        &--search::before {
+            background: url("../img/icon_leftbar_search@2x.png") 50% 50% / 26px 26px no-repeat #004d7b;
+        }
+        &--innermenu_01::before {
+            background: url("../img/icon_leftbar_innermenu_01@2x.png") 50% 50% / 23px 33px no-repeat #004d7b;
+        }
+        &--popularservice::before {
+            visibility: hidden;
+        }
+    }
+    &__arrow {
+        padding: 5px 8px;
+        transform: rotate(0deg);
+
+        &.active {
+            transform: rotate(90deg);
+        }
+    }
+
+    @media screen and (max-width: 1220px) {
+        width: 100%;
+    }
+}

+ 50 - 0
app/assets/styles/content/leftbar/organization.scss

@@ -0,0 +1,50 @@
+.organization {
+    display: block;
+
+    &__title {
+        text-decoration: none;
+        position: relative;
+
+        &::before {
+            content: '';
+            position: absolute;
+            width: 51px;
+            height: 51px;
+            border-radius: 50%;
+            left: -10px;
+            top: -8px;
+            border: 5px solid #ffffff;
+            background: url("../img/icon_leftbar_innermenu_01@2x.png") 50% 50% / 23px 33px no-repeat #004d7b;
+        }
+    }
+    &__list {
+        width: 100%;
+        margin-top: 5px;
+        position: relative;
+        z-index: 5;
+        height: 0;
+        overflow: hidden;
+
+        &.active {
+            height: auto;
+            overflow: inherit;
+        }
+    }
+    &__item {
+        border-bottom: 1px solid #ebebeb;
+    }
+    &__link {
+        color: #004d7b;
+        text-decoration: none;
+        font-size: 15px;
+        padding: 8px;
+        line-height: 19px;
+        display: block;
+        font-family: $fontcuprum;
+        font-weight: normal;
+
+        &:hover {
+            background: #d2dee9;
+        }
+    }
+}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 118 - 0
app/assets/styles/content/leftbar/personals.scss


+ 42 - 0
app/assets/styles/content/leftbar/popularservice.scss

@@ -0,0 +1,42 @@
+.popularservice {
+    display: block;
+
+    &__title {
+        text-decoration: none;
+        color: #3b434d;
+    }
+    &__list {
+        width: 100%;
+        position: relative;
+        z-index: 5;
+        height: 0;
+        overflow: hidden;
+        transition: all .5s ease;
+
+        &.active {
+            height: auto;
+            overflow: auto;
+            transition: all .5s ease;
+        }
+    }
+    &__item {
+        border-bottom: 1px solid #ebebeb;
+        border-left: 1px solid #ebebeb;
+        border-right: 1px solid #ebebeb;
+    }
+    &__link {
+        color: #3b434d;
+        text-decoration: none;
+        font-size: 15px;
+        padding: 8px;
+        line-height: 19px;
+        display: block;
+        font-family: $fontcuprum;
+        font-weight: normal;
+
+        &:hover {
+            color: #004d7b;
+            background: #d2dee9;
+        }
+    }
+}

+ 146 - 0
app/assets/styles/content/leftbar/search.scss

@@ -0,0 +1,146 @@
+.search {
+
+    &--static {
+        height: 45px;
+        background: #ebebeb;
+        border-radius: 25px 0 0 25px;
+        padding-left: 50px;
+        padding-right: 0;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-content: center;
+        align-items: center;
+        margin-bottom: 40px;
+        position: relative;
+    }
+    &--filter {
+        padding: 0 5px;
+        width: 180px;
+    }
+    &--float {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-content: center;
+        align-items: center;
+        height: 30px;
+        padding: 0 10px;
+    }
+
+    &__inputcase {
+        position: relative;
+
+        &--float {
+            display: -webkit-flex;
+            display: -ms-flex;
+            display: flex;
+            flex-direction: row;
+            justify-content: center;
+            align-content: center;
+            align-items: center;
+
+            form {
+                height: auto;;
+            }
+        }
+    }
+
+    &--static &__iconzoom {
+        position: absolute;
+        right: 0;
+        top: 0;
+        width: 30px;
+        height: 30px;
+        background: url('../img/icon_zoom_search@2x.png') 0 0 / cover no-repeat;
+        border-radius: 0 25px 25px 0 / 0 25px 25px 0;
+        cursor: pointer;
+        overflow: hidden;
+        display: none;
+    }
+    &--filter &__iconzoom {
+        position: absolute;
+        right: 0;
+        top: 0;
+        width: 30px;
+        height: 30px;
+        background: url('../img/icon_news_titl@2x.png') 0 -60px / 30px 90px no-repeat #e65e26;
+        border-radius: 15px;
+        cursor: pointer;
+        overflow: hidden;
+
+        &:hover {
+            background-color: #eb914e;
+        }
+    }
+    &--float &__iconzoom {
+        position: absolute;
+        right: 0;
+        top: 0;
+        width: 30px;
+        height: 30px;
+        background: url('../img/icon_news_titl@2x.png') 0 -60px / 30px 90px no-repeat #e65e26;
+        border-radius: 15px;
+        cursor: pointer;
+        overflow: hidden;
+
+        &:hover {
+            background-color: #eb914e;
+        }
+    }
+
+    input,
+    &__input {
+        background: #ffffff;
+        height: 30px;
+        line-height: 25px;
+        border-radius: 15px;
+        padding: 0 12px;
+        width: calc(100% - 24px);
+        color: #929292;
+        opacity: 1;
+        font-size: 11px;
+
+        &::-webkit-input-placeholder {
+            color: #929292;
+            opacity: 1;
+        }
+        &::-moz-placeholder {
+            color: #929292;
+            opacity: 1;
+        }
+        &:-moz-placeholder {
+            color: #929292;
+            opacity: 1;
+        }
+        &:-ms-input-placeholder {
+            color: #929292;
+            opacity: 1;
+        }
+        &:focus::-webkit-input-placeholder {
+            color: transparent;
+            opacity: 1;
+        }
+        &:focus::-moz-placeholder {
+            color: transparent;
+            opacity: 1;
+        }
+        &:focus:-moz-placeholder {
+            color: transparent;
+            opacity: 1;
+        }
+        &:focus:-ms-input-placeholder {
+            color: transparent;
+            opacity: 1;
+        }
+    }
+
+    &--static input:focus + &__iconzoom,
+    &--static &__input:focus + &__iconzoom {
+        display: block;
+    }
+}

+ 45 - 0
app/assets/styles/content/leftbar/selectedfilter.scss

@@ -0,0 +1,45 @@
+.selectedfilter {
+    margin-bottom: 30px;
+
+    &__wrap {
+        margin-bottom: 10px;
+    }
+    &__title {
+        background: #d7d7d7;
+        border-radius: 10px 0 0 0 / 10px 0 0 0;
+        padding: 10px;
+        line-height: 20px;
+        color: #3b434d;
+        font-size: 17px;
+        font-family: $fontcuprum;
+        font-weight: bold;
+    }
+    &__listcase {
+        background: #ebebeb;
+        padding: 13px 10px;
+        font-family: $fontcuprum;
+        font-size: 15px;
+    }
+    &__link {
+        padding-left: 18px;
+        display: block;
+        margin-bottom: 8px;
+        color: #3b434d;
+        text-decoration: none;
+        background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjkzMzc4RjU1NDc2NDExRTdBRjREQ0I2QUMwNzRBQjlGIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjkzMzc4RjU2NDc2NDExRTdBRjREQ0I2QUMwNzRBQjlGIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTMzNzhGNTM0NzY0MTFFN0FGNERDQjZBQzA3NEFCOUYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6OTMzNzhGNTQ0NzY0MTFFN0FGNERDQjZBQzA3NEFCOUYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz66Cy//AAAAxElEQVR42kzQvw7BUBTH8ZJOGHgGryC18gD6EAaJjU3QjRiINB1MBpvNn8ZksSMS7yKCRPie5NekJ/mk9zTn3nPuzURR5Cga6MJTfkGIvSVZ/RwjRh15qWGHSVJoJ/VxxFQbP2jhjh58V+0s1ljhjRu2KGCOjhVWVLjEC4HyJmZae8mMFl+1TKKcuoNjJ151CZtpo5OeGCBnbXF2NYMVtlFU/kNJN7cIrfCAEYaoplov9LXniZMZAj3TCQ+xta+nc/4CDAD+8yk54NNhWwAAAABJRU5ErkJggg==") 2px 50% / 10px 10px no-repeat;
+
+        &:hover {
+            color: #e65e26;
+        }
+    }
+    &__reset {
+        padding-left: 18px;
+        display: block;
+        color: #3b434d;
+        text-decoration: underline;
+
+        &:hover {
+            text-decoration: none;
+        }
+    }
+}

+ 53 - 0
app/assets/styles/content/leftbar/specialization.scss

@@ -0,0 +1,53 @@
+.specialization {
+    display: block;
+
+    &__title {
+        text-decoration: none;
+        color: #3b434d;
+
+        &::before {
+            content: '';
+            position: absolute;
+            width: 51px;
+            height: 51px;
+            border-radius: 50%;
+            left: -10px;
+            top: -8px;
+            border: 5px solid #ffffff;
+            background: url("../img/icon_leftbar_innermenu_02@2x.png") 50% 50% / 20px 24px no-repeat #3b434d;
+        }
+    }
+    &__list {
+        width: 100%;
+        margin-top: 5px;
+        position: relative;
+        z-index: 5;
+        height: 0;
+        overflow: hidden;
+        transition: all .5s ease;
+
+        &.active {
+            height: auto;
+            overflow: auto;
+            transition: all .5s ease;
+        }
+    }
+    &__item {
+        border-bottom: 1px solid #ebebeb;
+    }
+    &__link {
+        color: #3b434d;
+        text-decoration: none;
+        font-size: 15px;
+        padding: 8px;
+        line-height: 19px;
+        display: block;
+        font-family: $fontcuprum;
+        font-weight: normal;
+
+        &:hover {
+            color: #004d7b;
+            background: #d2dee9;
+        }
+    }
+}

+ 27 - 0
app/assets/styles/content/leftbar/viewallbtn.scss

@@ -0,0 +1,27 @@
+.viewallbtn {
+    margin-bottom: 40px;
+
+    &__link {
+        color: #ffffff;
+        font-weight: bold;
+        font-family: $fontcuprum;
+        font-size: 17px;
+        text-decoration: none;
+        text-align: center;
+        flex-direction: row;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        justify-content: center;
+        align-content: center;
+        align-items: center;
+        min-height: 44px;
+        padding: 8px 10px;
+        text-align: center;
+        background: #004d7b;
+
+        &:hover {
+            background: #5597d1;
+        }
+    }
+}

+ 28 - 0
app/assets/styles/content/rightbar/calend.scss

@@ -0,0 +1,28 @@
+.calend {
+    width: 230px;
+    text-decoration: none !important;
+    text-align: center;
+
+    table {
+        width: 210px !important;
+        padding-bottom: 10px;
+    }
+
+    a {
+        text-decoration: none !important;
+    }
+    &__link {
+        text-decoration: none;
+        width: 22px !important;
+        height: 22px !important;
+        line-height: 22px !important;
+        display: block;
+        margin: auto;
+
+        &:hover {
+            background: #eb914e;
+            border-radius: 50%;
+            color: #ffffff !important;
+        }
+    }
+}

+ 6 - 0
app/assets/styles/content/rightbar/rightbar.scss

@@ -0,0 +1,6 @@
+.rightbar {
+
+    @media screen and (max-width: 1000px) {
+        display: none;
+    }
+}

+ 17 - 0
app/assets/styles/elements/banner.scss

@@ -0,0 +1,17 @@
+.banner {
+    border-radius: 10px 0 0 0 / 10px 0 0 0;
+
+    img {
+        border-radius: 10px 0 0 0 / 10px 0 0 0;
+    }
+
+    &--950x155 {
+
+        @media screen and (max-width: 1220px) {
+            display: none;
+        }
+    }
+    &--230x400 {
+        padding-bottom: 20px;
+    }
+}

+ 15 - 0
app/assets/styles/elements/btn.scss

@@ -0,0 +1,15 @@
+.btn {
+    background: #5597d1;
+    width: 100%;
+    display: block;
+    cursor: pointer;
+    font-family: $fontcuprum;
+    font-size: 20px;
+    color: #ffffff;
+    height: 40px;
+    line-height: 40px;
+
+    &:hover {
+        background: #004d7b;
+    }
+}

+ 19 - 0
app/assets/styles/elements/calendinfo.scss

@@ -0,0 +1,19 @@
+.calendinfo {
+    color: #929292;
+    font-size: 13px;
+    text-align: right;
+    line-height: 20px;
+    margin: 15px 0 0 0;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: column;
+    margin-bottom: 35px;
+
+    &__item:first-child {
+        padding-bottom: 15px;
+    }
+
+    &__calendcase {
+    }
+}

+ 46 - 0
app/assets/styles/elements/holidays.scss

@@ -0,0 +1,46 @@
+.holidays {
+    padding-bottom: 20px;
+
+    &__item {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        padding-bottom: 10px;
+        border-bottom: 1px solid #ebebeb;
+        margin-bottom: 10px;
+        flex-wrap: nowrap;
+        text-decoration: none;
+        color: #3b434d;
+        align-items: center;
+
+        &:last-child {
+            padding: 0;
+            border: 0;
+            margin: 0;
+        }
+    }
+    &__imgcase {
+        border: 3px solid #3b434d;
+        border-radius: 50%;
+    }
+    &__item:hover &__imgcase {
+        border-color: #e65e26;
+    }
+    &__img {
+        border-radius: 50%;
+        width: 54px;
+        height: 54px;
+    }
+    &__textcase {
+        padding-left: 10px;
+        font-size: 13px;
+        color: #3b434d;
+        text-decoration: none;
+        line-height: 15px;
+        text-align: left;
+    }
+    &__item:hover &__textcase {
+        color: #e65e26;
+    }
+}

+ 13 - 0
app/assets/styles/elements/input.scss

@@ -0,0 +1,13 @@
+.input {
+    width: 100%;
+    padding: 0 5px;
+    box-sizing: border-box;
+    background: #fff;
+    text-align: center;
+    border-radius: 15px;
+    height: 30px;
+    line-height: 30px;
+    border: 1px solid #d7d7d7;
+    font-family: $fontopensans;
+    font-size: 11px;
+}

+ 28 - 0
app/assets/styles/elements/timeseparator.scss

@@ -0,0 +1,28 @@
+.timeseparator {
+    -webkit-animation: timeseparator 1s ease;
+    animation: timeseparator 1s ease;
+}
+
+@-webkit-keyframes timeseparator {
+    from {
+        opacity: 1;
+    }
+    50% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
+}
+
+@keyframes timeseparator {
+    from {
+        opacity: 1;
+    }
+    50% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
+}

+ 2 - 0
app/assets/styles/footer/aferta.scss

@@ -0,0 +1,2 @@
+.aferta {
+}

+ 31 - 0
app/assets/styles/footer/copyright.scss

@@ -0,0 +1,31 @@
+.copyright {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
+    align-items: flex-start;
+    align-content: flex-start;
+
+    &__link {
+        position: relative;
+        line-height: 25px;
+        color: #9e9e9e;
+        text-decoration: underline;
+
+        &:hover {
+            text-decoration: none;
+        }
+        &::after {
+            content: '';
+            position: absolute;
+            display: block;
+            right: -30px;
+            top: 0;
+            width: 25px;
+            height: 25px;
+            line-height: 25px;
+            background: url("../img/16.png") center center / cover no-repeat;
+        }
+    }
+}

+ 23 - 0
app/assets/styles/footer/footer.scss

@@ -0,0 +1,23 @@
+.footer {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex: 0 0 auto;
+    padding-top: 20px;
+    background: #3b434d;
+    color: #9e9e9e;
+    font-size: 14px;
+
+    &__item {
+        padding-bottom: 20px;
+    }
+    &__right {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: column;
+        justify-content: flex-end;
+        align-items: flex-end;
+        align-content: flex-end;
+    }
+}

+ 27 - 0
app/assets/styles/footer/mainlinks.scss

@@ -0,0 +1,27 @@
+.mainlinks {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+
+    &__item {
+        white-space: nowrap;
+        word-wrap: normal;
+        border-right: 1px solid #9e9e9e;
+        padding: 0 8px;
+
+        &:last-child {
+            border: 0;
+            padding-right: 0;
+        }
+    }
+    &__link {
+        color: #9e9e9e;
+        text-decoration: underline;
+
+        &:hover {
+            text-decoration: none;
+        }
+    }
+}

+ 52 - 0
app/assets/styles/footer/social.scss

@@ -0,0 +1,52 @@
+.social {
+
+    &--fixed {
+        position: fixed;
+        right: 10px;
+        top: 25%;
+        transform: translateY(-50%);
+
+        @media screen and (max-width: 1300px) {
+            display: none;
+        }
+    }
+    &--static {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        margin-bottom: 10px;
+    }
+    &__item {
+        width: 25px;
+        height: 25px;
+        margin: 0 2px;
+        border-radius: 50%;
+        overflow: hidden;
+        margin-bottom: 5px;
+    }
+    &__link {
+        display: block;
+        width: 25px;
+        height: 25px;
+        background-repeat: no-repeat;
+        background-size: 27px 27px;
+        background-position: center center;
+
+        &--fb {
+            background-image: url("../img/icon_facebook.svg");
+        }
+        &--vk {
+            background-image: url("../img/icon_vkontakte.svg");
+        }
+        &--ok {
+            background-image: url("../img/icon_odnoklassniki.svg");
+        }
+        &--tw {
+            background-image: url("../img/icon_twitter.svg");
+        }
+        &:hover {
+            opacity: .75;
+        }
+    }
+}

+ 57 - 0
app/assets/styles/header/floatmenu.scss

@@ -0,0 +1,57 @@
+.floatmenu {
+    display: none;
+    flex-direction: row;
+    justify-content: flex-start;
+
+    &__list {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+    }
+    &__item {
+        margin-right: 25px;
+        filter: grayscale(100) brightness(100) contrast(100);
+
+        &:last-child {
+            margin-right: 5px;
+        }
+        &:nth-child(1) {
+            background: url('../img/floatmenu_01@2x.png') 0 50% / 30px auto no-repeat;
+        }
+        &:nth-child(2) {
+            background: url('../img/floatmenu_02@2x.png') 0 50% / 30px auto no-repeat;
+        }
+        &:nth-child(3) {
+            background: url('../img/floatmenu_03@2x.png') 0 50% / 30px auto no-repeat;
+        }
+        &:nth-child(4) {
+            background: url('../img/floatmenu_04@2x.png') 0 50% / 30px auto no-repeat;
+        }
+        &:nth-child(5) {
+            background: url('../img/floatmenu_05@2x.png') 0 50% / 30px auto no-repeat;
+        }
+
+        &:hover {
+            filter: none;
+        }
+
+        &--active {
+            filter: none;
+        }
+    }
+    &__link {
+        color: #eb914e;
+        font-size: 15px;
+        font-family: $fontcuprum;
+        padding-left: 30px;
+        padding-right: 5px;
+        display: block;
+        text-decoration: none;
+        line-height: 50px;
+    }
+
+    @media screen and (max-width: 1220px) {
+        display: none !important;
+    }
+}

+ 41 - 0
app/assets/styles/header/header.scss

@@ -0,0 +1,41 @@
+.header {
+    background: #3b434d;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex: 0 0 auto;
+    position: relative;
+    z-index: 1000;
+
+    &--index {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-items: center;
+        align-content: center;
+    }
+    &__item {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-content: center;
+        align-items: center;
+
+        &--logo {
+            flex: 0 0 auto;
+        }
+        &--slogan {
+            flex: 1 0 auto;
+        }
+        &--special {
+            flex: 0 0 auto;
+        }
+        &--floatmenu {
+            flex: 2 0 auto;
+        }
+    }
+}

+ 7 - 0
app/assets/styles/header/loading.scss

@@ -0,0 +1,7 @@
+.header.loading {
+    min-height: 81px;
+
+    .search--float {
+        display: none;
+    }
+}

+ 30 - 0
app/assets/styles/header/region.scss

@@ -0,0 +1,30 @@
+.region {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    align-content: center;
+
+    &__img {
+        margin: 0 10px;
+        width: 33px;
+        height: 33px;
+        border-radius: 50%;
+    }
+    &__link {
+        color: #ffffff;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        flex-direction: row;
+
+        &:hover {
+            text-decoration: none;
+        }
+    }
+    &__name {
+        @extend .region;
+    }
+}

+ 48 - 0
app/assets/styles/header/scrolling.scss

@@ -0,0 +1,48 @@
+.header.scrolling {
+    position: fixed;
+    width: 100%;
+    top: 0;
+    min-height: 60px;
+    height: 60px;
+
+    .logo--header {
+        margin: 5px 0;
+    }
+    .slogan__text {
+        display: none;
+    }
+    .region__img {
+        margin-left: 35px;
+    }
+    .region__name {
+        font-size: 0;
+        color: transparent;
+        width: 1px;
+        position: relative;
+
+        &:before {
+            content: '';
+            position: absolute;
+            font-size: 20px;
+            top: 50%;
+            transform: translateY(-50%);
+            width: 8px;
+            height: 5px;
+            background: url('../img/region_arrow_bottom@2x.png') 50% 50% / cover no-repeat;
+        }
+    }
+    .floatmenu {
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+    }
+    .search--float {
+        display: block;
+    }
+    .special {
+        display: none;
+    }
+}
+.header.inner {
+    @extend .header.scrolling;
+}

+ 16 - 0
app/assets/styles/header/slogan.scss

@@ -0,0 +1,16 @@
+.slogan {
+    font-family: $fontcuprum;
+    font-weight: 700;
+    color: #ffffff;
+    font-size: 25px;
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    align-items: center;
+
+    &__text {
+        padding-left: 35px;
+    }
+}

+ 7 - 0
app/assets/styles/header/special.scss

@@ -0,0 +1,7 @@
+.special {
+    &__img {
+        width: 32px;
+        height: 32px;
+        display: block;
+    }
+}

+ 426 - 0
app/assets/styles/scripts/daterangepicker.scss

@@ -0,0 +1,426 @@
+.date-picker {
+    width: 170px;
+    height: 25px;
+    padding: 0;
+    border: 0;
+    line-height: 25px;
+    padding-left: 10px;
+    font-size: 12px;
+    font-family: Arial, sans-serif;
+    font-weight: bold;
+    cursor: pointer;
+    color: #303030;
+    position: relative;
+    z-index: 2;
+}
+
+.date-picker-wrapper {
+    position: absolute;
+    margin-top: 10px;
+    z-index: 1;
+    border: 1px solid #c8c8c8;
+    background-color: #ebebeb;
+    padding: 5px 12px 0 12px;
+    font-size: 12px;
+    line-height: 20px;
+    color: #aaa;
+    font-family: Arial, sans-serif;
+    box-sizing: initial;
+    max-height: 280px;
+    overflow: hidden;
+    margin-left: 170px;
+    box-sizing: border-box;
+}
+
+.date-picker-wrapper.inline-wrapper {
+    position: relative;
+    box-shadow: none;
+    display: inline-block;
+    max-width: 230px;
+}
+
+.date-picker-wrapper.single-date {
+    padding: 0 10px;
+}
+
+.date-picker-wrapper.no-shortcuts {
+    padding-bottom: 5px;
+    padding-bottom: 0;
+}
+
+.date-picker-wrapper.no-topbar {
+    padding-top: 12px;
+    padding-top: 0;
+    padding-bottom: 8px;
+}
+
+.date-picker-wrapper .footer {
+    font-size: 11px;
+    padding-top: 3px;
+    background: none !important;
+}
+
+.date-picker-wrapper b {
+    color: #666;
+    font-weight: 700;
+}
+
+.date-picker-wrapper a {
+    color: rgb(107, 180, 214);
+    text-decoration: underline;
+}
+
+.date-picker-wrapper .month-name {
+    text-transform: uppercase;
+}
+
+.date-picker-wrapper .month-wrapper {
+    border-radius: 3px;
+    background-color: #ebebeb;
+    // padding: 5px;
+    cursor: default;
+    position: relative;
+    _overflow: hidden;
+}
+
+.date-picker-wrapper .month-wrapper table {
+    width: 190px;
+    float: left;
+}
+
+.date-picker-wrapper .month-wrapper table.month2 {
+    width: 190px;
+    float: left;
+}
+
+.date-picker-wrapper .month-wrapper table th,
+.date-picker-wrapper .month-wrapper table td {
+    vertical-align: middle;
+    text-align: center;
+    line-height: 30px;
+    margin: 0px;
+    padding: 2px 0px;
+}
+
+.date-picker-wrapper .month-wrapper table .day {
+    padding: 0;
+    line-height: 1;
+    font-size: 12px;
+    margin-bottom: 1px;
+    color: #929292;
+    cursor: default;
+    height: 22px;
+    line-height: 22px;
+    width: 30px;
+    display: block;
+}
+
+.date-picker-wrapper .month-wrapper table div.day.lastMonth,
+.date-picker-wrapper .month-wrapper table div.day.nextMonth {
+    color: #929292;
+    cursor: default;
+}
+
+.date-picker-wrapper .month-wrapper table .day.checked {
+    background-color: #c8c8c8;
+    border-radius: 0;
+}
+
+.date-picker-wrapper .month-wrapper table .week-name {
+    height: 18px;
+    line-height: 18px;
+    font-weight: 100;
+    text-transform: uppercase;
+    border-top: 1px solid #c8c8c8;
+    border-bottom: 1px solid #c8c8c8;
+}
+
+.date-picker-wrapper .month-wrapper table .day.has-tooltip {
+    cursor: help !important;
+}
+
+.date-picker-wrapper .time label {
+    white-space: nowrap;
+}
+
+.date-picker-wrapper .month-wrapper table .day.toMonth.valid {
+    color: #929292;
+    cursor: pointer;
+}
+
+.date-picker-wrapper .month-wrapper table .day.toMonth.hovering {
+    background-color: #cdecfa;
+}
+
+.date-picker-wrapper .month-wrapper table .day.nextMonth,
+.date-picker-wrapper .month-wrapper table .day.lastMonth {
+    display: none;
+}
+
+.date-picker-wrapper .month-wrapper table .day.real-today {
+    background-color: rgb(255, 230, 132);
+}
+
+.date-picker-wrapper .month-wrapper table .day.real-today.checked,
+.date-picker-wrapper .month-wrapper table .day.real-today.hovering {
+    background-color: rgb(112, 204, 213);
+}
+
+.date-picker-wrapper table .caption {
+    height: 30px;
+}
+
+.date-picker-wrapper table .caption .next,
+.date-picker-wrapper table .caption .prev {
+    padding: 0 5px;
+    cursor: pointer;
+}
+
+.date-picker-wrapper table .caption .next:hover,
+.date-picker-wrapper table .caption .prev:hover {
+    background-color: #ccc;
+    color: white;
+}
+
+.date-picker-wrapper .gap {
+    position: relative;
+    z-index: 1;
+    width: 15px;
+    height: 100%;
+    background-color: red;
+    font-size: 0;
+    line-height: 0;
+    float: left;
+    top: -5px;
+    margin: 0 10px -10px;
+    visibility: hidden;
+    height: 0;
+    opacity: .5;
+}
+
+.date-picker-wrapper .gap .gap-lines {
+    height: 100%;
+    overflow: hidden;
+}
+
+.date-picker-wrapper .gap .gap-line {
+    height: 15px;
+    width: 15px;
+    position: relative;
+}
+
+.date-picker-wrapper .gap .gap-line .gap-1 {
+    z-index: 1;
+    height: 0;
+    border-left: 8px solid #ececec;
+    border-top: 8px solid #ffffff;
+    border-bottom: 8px solid #ffffff;
+}
+
+.date-picker-wrapper .gap .gap-line .gap-2 {
+    position: absolute;
+    right: 0;
+    top: 0px;
+    z-index: 2;
+    height: 0;
+    border-left: 8px solid transparent;
+    border-top: 8px solid #ececec;
+}
+
+.date-picker-wrapper .gap .gap-line .gap-3 {
+    position: absolute;
+    right: 0;
+    top: 8px;
+    z-index: 2;
+    height: 0;
+    border-left: 8px solid transparent;
+    border-bottom: 8px solid #ececec;
+}
+
+.date-picker-wrapper .gap .gap-top-mask {
+    width: 6px;
+    height: 1px;
+    position: absolute;
+    top: -1px;
+    left: 1px;
+    background-color: #eee;
+    z-index: 3;
+}
+
+.date-picker-wrapper .gap .gap-bottom-mask {
+    width: 6px;
+    height: 1px;
+    position: absolute;
+    bottom: -1px;
+    left: 7px;
+    background-color: #eee;
+    z-index: 3;
+}
+
+.date-picker-wrapper .selected-days {
+    display: none;
+}
+
+.date-picker-wrapper .drp_top-bar {
+    line-height: 1.4;
+    position: relative;
+    padding: 10px 40px 10px 0;
+}
+
+.date-picker-wrapper .drp_top-bar .error-top {
+    display: none;
+}
+
+.date-picker-wrapper .drp_top-bar .normal-top {
+    display: none;
+}
+
+.date-picker-wrapper .drp_top-bar .default-top {
+    display: block;
+}
+
+.date-picker-wrapper .drp_top-bar.error .default-top {
+    display: none;
+}
+
+.date-picker-wrapper .drp_top-bar.error .error-top {
+    display: block;
+    color: red;
+}
+
+.date-picker-wrapper .drp_top-bar.normal .default-top {
+    display: none;
+}
+
+.date-picker-wrapper .drp_top-bar.normal .normal-top {
+    display: block;
+}
+
+.date-picker-wrapper .drp_top-bar .apply-btn {
+    position: absolute;
+    right: 0px;
+    top: 6px;
+    padding: 3px 5px;
+    margin: 0;
+    font-size: 12px;
+    border-radius: 4px;
+    cursor: pointer;
+    color: #d9eef7;
+    border: solid 1px #0076a3;
+    background: #0095cd;
+    background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5));
+    background: -moz-linear-gradient(top, #00adee, #0078a5);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5');
+    color: white;
+    line-height: initial;
+}
+
+.date-picker-wrapper .drp_top-bar .apply-btn.disabled {
+    cursor: pointer;
+    color: #606060;
+    border: solid 1px #b7b7b7;
+    background: #fff;
+    background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed));
+    background: -moz-linear-gradient(top, #fff, #ededed);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed');
+}
+
+/*time styling*/
+
+.date-picker-wrapper .time {
+    position: relative;
+}
+
+.date-picker-wrapper.single-month .time {
+    display: block;
+}
+
+.date-picker-wrapper .time input[type=range] {
+    vertical-align: middle;
+    width: 129px;
+    padding: 0;
+    margin: 0;
+    height: 20px;
+}
+
+.date-picker-wrapper .time1,
+.time2 {
+    width: 180px;
+    padding: 0 5px;
+    text-align: center;
+}
+
+.date-picker-wrapper .time1 {
+    float: left;
+}
+
+.date-picker-wrapper .time2 {
+    float: right;
+}
+
+.date-picker-wrapper .hour,
+.minute {
+    text-align: right;
+}
+
+.date-picker-wrapper .hide {
+    display: none;
+}
+
+.date-picker-wrapper .first-date-selected {
+    background-color: #ec9454 !important;
+    color: white !important;
+}
+
+.date-picker-wrapper .last-date-selected {
+    background-color: #ec9454 !important;
+    color: white !important;
+}
+
+.date-picker-wrapper .date-range-length-tip {
+    position: absolute;
+    margin-top: -4px;
+    margin-left: -8px;
+    box-shadow: 0 0 3px rgba(0, 0, 0, .3);
+    display: none;
+    background-color: yellow;
+    padding: 0 6px;
+    border-radius: 2px;
+    font-size: 12px;
+    line-height: 16px;
+    -webkit-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
+    -moz-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
+    -ms-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
+    -o-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
+    filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
+}
+
+.date-picker-wrapper .date-range-length-tip:after {
+    content: '';
+    position: absolute;
+    border-left: 4px solid transparent;
+    border-right: 4px solid transparent;
+    border-top: 4px solid yellow;
+    left: 50%;
+    margin-left: -4px;
+    bottom: -4px;
+}
+
+.date-picker-wrapper.two-months.no-gap .month1 .next,
+.date-picker-wrapper.two-months.no-gap .month2 .prev {
+    display: none;
+}
+
+.date-picker-wrapper .week-number {
+    padding: 5px 0;
+    line-height: 1;
+    font-size: 12px;
+    margin-bottom: 1px;
+    color: #999;
+    cursor: pointer;
+}
+
+.date-picker-wrapper .week-number.week-number-selected {
+    color: #4499EE;
+    font-weight: bold;
+}

+ 478 - 0
app/assets/styles/scripts/formstyler.scss

@@ -0,0 +1,478 @@
+.jq-checkbox,
+.jq-radio {
+	vertical-align: -4px;
+	width: 16px;
+	height: 16px;
+	margin: 0 4px 0 0;
+	border: 1px solid #C3C3C3;
+	box-shadow: 0 1px 1px rgba(0,0,0,.05), inset -1px -1px #FFF, inset 1px -1px #FFF;
+	cursor: pointer;
+}
+.jq-checkbox.focused,
+.jq-radio.focused {
+	border: 1px solid #08C;
+}
+.jq-checkbox.disabled,
+.jq-radio.disabled {
+	opacity: .55;
+}
+.jq-checkbox {
+	border-radius: 3px;
+}
+.jq-checkbox.checked .jq-checkbox__div {
+	width: 12px;
+	height: 12px;
+	margin: 2px 0 0 2px;
+	border-radius: 2px;
+	background: #666;
+	box-shadow: inset 0 -3px 6px #AAA;
+}
+.jq-radio {
+	border-radius: 50%;
+}
+.jq-radio.checked .jq-radio__div {
+	width: 10px;
+	height: 10px;
+	margin: 3px 0 0 3px;
+	border-radius: 50%;
+	background: #777;
+	box-shadow: inset 1px 1px 1px rgba(0,0,0,.7);
+}
+.jq-file {
+	width: 270px;
+	border-radius: 4px;
+	box-shadow: 0 1px 2px rgba(0,0,0,.1);
+}
+.jq-file input {
+	cursor: pointer;
+}
+.jq-file__name {
+	box-sizing: border-box;
+	width: 100%;
+	height: 34px;
+	padding: 0 80px 0 10px;
+	border: 1px solid #CCC;
+	border-bottom-color: #B3B3B3;
+	border-radius: 4px;
+	background: #FFF;
+	font: 14px/32px Arial, sans-serif;
+	font-family: $fontopensans;
+	color: #333;
+}
+.jq-file__browse {
+	position: absolute;
+	top: 1px;
+	right: 1px;
+	padding: 0 10px;
+	border-left: 1px solid #CCC;
+	border-radius: 0 4px 4px 0;
+	box-shadow: inset 1px -1px #F1F1F1, inset -1px 0 #F1F1F1, 0 1px 2px rgba(0,0,0,.1);
+	font: 14px/32px Arial, sans-serif;
+	font-family: $fontopensans;
+	color: #333;
+	text-shadow: 1px 1px #FFF;
+}
+.jq-file:hover .jq-file__browse {
+	background: linear-gradient(#F6F6F6, #E6E6E6);
+}
+.jq-file:active .jq-file__browse {
+	background: #F5F5F5;
+	box-shadow: inset 1px 1px 3px #DDD;
+}
+.jq-file.focused .jq-file__name {
+	border: 1px solid #5794BF;
+}
+.jq-file.disabled,
+.jq-file.disabled .jq-file__name,
+.jq-file.disabled .jq-file__browse {
+	border-color: #CCC;
+	background: #F5F5F5;
+	box-shadow: none;
+	color: #888;
+}
+.jq-number {
+	position: relative;
+	vertical-align: middle;
+	padding: 0 36px 0 0;
+}
+.jq-number__field {
+	width: 100px;
+	border: 1px solid #CCC;
+	border-bottom-color: #B3B3B3;
+	border-radius: 4px;
+	box-shadow: inset 1px 1px #F1F1F1, 0 1px 2px rgba(0,0,0,.1);
+}
+.jq-number__field:hover {
+	border-color: #B3B3B3;
+}
+.jq-number__field input {
+	box-sizing: border-box;
+	width: 100%;
+	padding: 8px 9px;
+	border: none;
+	outline: none;
+	background: none;
+	font: 14px Arial, sans-serif;
+	font-family: $fontopensans;
+	color: #333;
+}
+.jq-number__spin {
+	position: absolute;
+	top: 0;
+	right: 0;
+	width: 32px;
+	height: 14px;
+	border: 1px solid #CCC;
+	border-bottom-color: #B3B3B3;
+	border-radius: 4px;
+	background: linear-gradient(#FFF, #E6E6E6);
+	box-shadow: 0 1px 2px rgba(0,0,0,.1);
+	box-shadow: inset 1px -1px #F1F1F1, inset -1px 0 #F1F1F1, 0 1px 2px rgba(0,0,0,.1);
+	-webkit-user-select: none;
+	-moz-user-select: none;
+	-ms-user-select: none;
+	user-select: none;
+	text-shadow: 1px 1px #FFF;
+	cursor: pointer;
+}
+.jq-number__spin.minus {
+	top: auto;
+	bottom: 0;
+}
+.jq-number__spin:hover {
+	background: linear-gradient(#F6F6F6, #E6E6E6);
+}
+.jq-number__spin:active {
+	background: #F5F5F5;
+	box-shadow: inset 1px 1px 3px #DDD;
+}
+.jq-number__spin:after {
+	content: '';
+	position: absolute;
+	top: 4px;
+	left: 11px;
+	width: 0;
+	height: 0;
+	border-right: 5px solid transparent;
+	border-bottom: 5px solid #999;
+	border-left: 5px solid transparent;
+}
+.jq-number__spin.minus:after {
+	top: 5px;
+	border-top: 5px solid #999;
+	border-right: 5px solid transparent;
+	border-bottom: none;
+	border-left: 5px solid transparent;
+}
+.jq-number__spin.minus:hover:after {
+	border-top-color: #000;
+}
+.jq-number__spin.plus:hover:after {
+	border-bottom-color: #000;
+}
+.jq-number.focused .jq-number__field {
+	border: 1px solid #5794BF;
+}
+.jq-number.disabled .jq-number__field,
+.jq-number.disabled .jq-number__spin {
+	border-color: #CCC;
+	background: #F5F5F5;
+	box-shadow: none;
+	color: #888;
+}
+.jq-number.disabled .jq-number__spin:after {
+	border-bottom-color: #AAA;
+}
+.jq-number.disabled .jq-number__spin.minus:after {
+	border-top-color: #AAA;
+}
+.jq-selectbox {
+	vertical-align: middle;
+	cursor: pointer;
+	text-overflow: ellipsis;
+}
+.jq-selectbox__select {
+	height: 32px;
+	padding: 0 45px 0 10px;
+	border-bottom-color: #B3B3B3;
+	border-radius: 4px;
+	font: 14px/32px Arial, sans-serif;
+	font-family: $fontopensans;
+	color: #333;
+	text-shadow: 1px 1px #FFF;
+	background: #fff;
+	border-radius: 15px;
+}
+.jq-selectbox__select:hover {
+	// background: #f1f1f1;
+}
+.jq-selectbox__select:active {
+	// background: #f1f1f1;
+}
+.jq-selectbox.focused .jq-selectbox__select {
+}
+.jq-selectbox.disabled .jq-selectbox__select {
+	border-color: #CCC;
+	background: #F5F5F5;
+	box-shadow: none;
+	color: #888;
+}
+.jq-selectbox__select-text {
+	display: block;
+	width: 100%;
+	margin-top: -32px;
+    font-size: 12px;
+    color: #929292;
+	overflow: hidden;
+	max-width: 105px;
+	text-overflow: ellipsis;
+}
+.jq-selectbox .placeholder {
+	color: #888;
+}
+.jq-selectbox__trigger {
+	position: absolute;
+	top: 0;
+	right: 0;
+	width: 34px;
+	height: 100%;
+	background: #FFFFFF;
+	border-radius: 0 15px 15px 0;
+	overflow: hidden;
+	// border-left: 1px solid #CCC;
+}
+.jq-selectbox__trigger-arrow {
+	position: absolute;
+	top: 14px;
+	right: 12px;
+	width: 0;
+	height: 0;
+	border-top: 5px solid #999;
+	border-right: 5px solid transparent;
+	border-left: 5px solid transparent;
+}
+.jq-selectbox:hover .jq-selectbox__trigger-arrow {
+	border-top-color: #000;
+}
+.jq-selectbox.disabled .jq-selectbox__trigger-arrow {
+	border-top-color: #AAA;
+}
+.jq-selectbox__dropdown {
+	box-sizing: border-box;
+	width: 100%;
+	margin: 2px 0 0;
+	padding: 0;
+	border: 1px solid #CCC;
+	border-radius: 4px;
+	background: #FFF;
+	// box-shadow: 0 2px 10px rgba(0,0,0,.2);
+	font: 14px/18px Arial, sans-serif;
+	font-family: $fontopensans;
+	background: #FFFFFF;
+	width: auto;
+}
+.jq-selectbox__search {
+	margin: 5px;
+}
+.jq-selectbox__search input {
+	box-sizing: border-box;
+	width: 100%;
+	margin: 0;
+	padding: 5px 27px 6px 8px;
+	border: 1px solid #CCC;
+	border-radius: 3px;
+	outline: none;
+	background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAO1JREFUeNqU078LAXEYx/FzYfNzk5TJaFNKYjFYSQZ/hvwBsvg1UCY2xT9gM8hukQGThWRjkcFw3pdnujhfT736Xn2fPvfc3fd07V0OFDDFAnM0ENYsZRiGLSc9OpqIYIA9fMhhjCrW2h9VlMlcH/aymMGtOqEugX08PwQucUZKdTozMIqdTc9WepQD7wjY9ARx+ydwhfyXfS+S0qMcOEQJGcueB3VccFINdMgal6NzkmPjRwJXxDBB7/2RDdtAp6wb+dpphHDASG5QQ0V6u2aoSqBZD/lDrNWRJynLK2qpBn4rc6K2XB9/Nb8EGABtf1thzY6X2AAAAABJRU5ErkJggg==') no-repeat 100% 50%;
+	// box-shadow: inset 1px 1px #F1F1F1;
+	color: #333;
+}
+.jq-selectbox__not-found {
+	margin: 5px;
+	padding: 5px 8px 6px;
+	background: #F0F0F0;
+	font-size: 13px;
+}
+.jq-selectbox ul {
+	margin: 0;
+	padding: 0;
+	position: relative;
+	z-index: 10;
+}
+.jq-selectbox li {
+	min-height: 18px;
+	padding: 5px 10px 6px;
+    font-size: 12px;
+    color: #929292;
+	background: #FFFFFF;
+}
+.jq-selectbox li.selected {
+	background-color: #A3ABB1;
+	color: #FFF;
+}
+.jq-selectbox li:hover {
+	background-color: #e7632d;
+	color: #FFF;
+}
+.jq-selectbox li.disabled {
+	color: #AAA;
+}
+.jq-selectbox li.disabled:hover {
+	background: none;
+}
+.jq-selectbox li.optgroup {
+	font-weight: bold;
+}
+.jq-selectbox li.optgroup:hover {
+	background: none;
+	color: #231F20;
+	cursor: default;
+}
+.jq-selectbox li.option {
+	padding-left: 25px;
+}
+.jq-select-multiple {
+	box-sizing: border-box;
+	padding: 1px;
+	border: 1px solid #CCC;
+	border-bottom-color: #B3B3B3;
+	border-radius: 4px;
+	background: #FFF;
+	box-shadow: inset 1px 1px #F1F1F1, 0 1px 2px rgba(0,0,0,.1);
+	font: 14px/18px Arial, sans-serif;
+	font-family: $fontopensans;
+	color: #333;
+	cursor: default;
+}
+.jq-select-multiple.focused {
+	border: 1px solid #5794BF;
+}
+.jq-select-multiple.disabled {
+	border-color: #CCC;
+	background: #F5F5F5;
+	box-shadow: none;
+	color: #888;
+}
+.jq-select-multiple ul {
+	margin: 0;
+	padding: 0;
+}
+.jq-select-multiple li {
+	padding: 3px 9px 4px;
+	list-style: none;
+}
+.jq-select-multiple li:first-child {
+	border-radius: 3px 3px 0 0;
+}
+.jq-select-multiple li:last-child {
+	border-radius: 0 0 3px 3px;
+}
+.jq-select-multiple li.selected {
+	background: #08C;
+	color: #FFF;
+}
+.jq-select-multiple li.disabled {
+	color: #AAA;
+}
+.jq-select-multiple li.optgroup {
+	font-weight: bold;
+}
+.jq-select-multiple li.option {
+	padding-left: 25px;
+}
+.jq-select-multiple.disabled li.selected,
+.jq-select-multiple li.selected.disabled {
+	background: #CCC;
+	color: #FFF;
+}
+input[type='email'].styler,
+input[type='password'].styler,
+input[type='search'].styler,
+input[type='tel'].styler,
+input[type='text'].styler,
+input[type='url'].styler,
+textarea.styler {
+	padding: 8px 9px;
+	border: 1px solid #CCC;
+	border-bottom-color: #B3B3B3;
+	border-radius: 4px;
+	box-shadow: inset 1px 1px #F1F1F1, 0 1px 2px rgba(0,0,0,.1);
+	font: 14px Arial, sans-serif;
+	font-family: $fontopensans;
+	color: #333;
+}
+input[type='search'].styler {
+	-webkit-appearance: none;
+	-moz-appearance: none;
+	appearance: none;
+}
+textarea.styler {
+	overflow: auto;
+}
+input[type='email'].styler:hover,
+input[type='password'].styler:hover,
+input[type='search'].styler:hover,
+input[type='tel'].styler:hover,
+input[type='text'].styler:hover,
+input[type='url'].styler:hover,
+textarea.styler:hover {
+	border-color: #B3B3B3;
+}
+input[type='email'].styler:hover:focus,
+input[type='password'].styler:hover:focus,
+input[type='search'].styler:hover:focus,
+input[type='tel'].styler:hover:focus,
+input[type='text'].styler:hover:focus,
+input[type='url'].styler:hover:focus,
+textarea.styler:hover:focus {
+	border-color: #CCC;
+	border-top-color: #B3B3B3;
+	outline: none;
+	box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
+}
+button.styler,
+input[type='button'].styler,
+input[type='submit'].styler,
+input[type='reset'].styler {
+	overflow: visible;
+	padding: 8px 11px;
+	border: 1px solid #CCC;
+	border-bottom-color: #B3B3B3;
+	border-radius: 4px;
+	outline: none;
+	background: linear-gradient(#FFF, #E6E6E6);
+	box-shadow: inset 1px -1px #F1F1F1, inset -1px 0 #F1F1F1, 0 1px 2px rgba(0,0,0,.1);
+	font: 14px Arial, sans-serif;
+	font-family: $fontopensans;
+	color: #333;
+	text-shadow: 1px 1px #FFF;
+	cursor: pointer;
+}
+button.styler.styler::-moz-focus-inner,
+input[type='button'].styler.styler::-moz-focus-inner,
+input[type='submit'].styler.styler::-moz-focus-inner,
+input[type='reset'].styler.styler::-moz-focus-inner {
+	padding: 0;
+	border: 0;
+}
+button.styler:not([disabled]):hover,
+input[type='button'].styler:not([disabled]):hover,
+input[type='submit'].styler:not([disabled]):hover,
+input[type='reset'].styler:not([disabled]):hover,
+input[type='reset'].styler:hover {
+	background: linear-gradient(#F6F6F6, #E6E6E6);
+}
+button.styler:active,
+input[type='button'].styler:active,
+input[type='submit'].styler:active,
+input[type='reset'].styler:active {
+	background: #F5F5F5;
+	box-shadow: inset 1px 1px 3px #DDD;
+}
+button.styler[disabled],
+input[type='button'].styler[disabled],
+input[type='submit'].styler[disabled] {
+	border-color: #CCC;
+	background: #F5F5F5;
+	box-shadow: none;
+	color: #888;
+}

+ 978 - 0
app/assets/styles/scripts/lightgallery.scss

@@ -0,0 +1,978 @@
+/*! lightgallery - v1.4.0 - 2017-06-04
+* http://sachinchoolur.github.io/lightGallery/
+* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
+@font-face {
+  font-family: 'lg';
+  src: url("../fonts/lg.eot?n1z373");
+  src: url("../fonts/lg.eot?#iefixn1z373") format("embedded-opentype"), url("../fonts/lg.woff?n1z373") format("woff"), url("../fonts/lg.ttf?n1z373") format("truetype"), url("../fonts/lg.svg?n1z373#lg") format("svg");
+  font-weight: normal;
+  font-style: normal;
+}
+.lg-icon {
+  font-family: 'lg';
+  speak: none;
+  font-style: normal;
+  font-weight: normal;
+  font-variant: normal;
+  text-transform: none;
+  line-height: 1;
+  /* Better Font Rendering =========== */
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.lg-actions .lg-next, .lg-actions .lg-prev {
+  background-color: rgba(0, 0, 0, 0.45);
+  border-radius: 2px;
+  color: #999;
+  cursor: pointer;
+  display: block;
+  font-size: 22px;
+  margin-top: -10px;
+  padding: 8px 10px 9px;
+  position: absolute;
+  top: 50%;
+  z-index: 1080;
+  border: none;
+  outline: none;
+}
+.lg-actions .lg-next.disabled, .lg-actions .lg-prev.disabled {
+  pointer-events: none;
+  opacity: 0.5;
+}
+.lg-actions .lg-next:hover, .lg-actions .lg-prev:hover {
+  color: #FFF;
+}
+.lg-actions .lg-next {
+  right: 20px;
+}
+.lg-actions .lg-next:before {
+  content: "\e095";
+}
+.lg-actions .lg-prev {
+  left: 20px;
+}
+.lg-actions .lg-prev:after {
+  content: "\e094";
+}
+
+@-webkit-keyframes lg-right-end {
+  0% {
+    left: 0;
+  }
+  50% {
+    left: -30px;
+  }
+  100% {
+    left: 0;
+  }
+}
+@-moz-keyframes lg-right-end {
+  0% {
+    left: 0;
+  }
+  50% {
+    left: -30px;
+  }
+  100% {
+    left: 0;
+  }
+}
+@-ms-keyframes lg-right-end {
+  0% {
+    left: 0;
+  }
+  50% {
+    left: -30px;
+  }
+  100% {
+    left: 0;
+  }
+}
+@keyframes lg-right-end {
+  0% {
+    left: 0;
+  }
+  50% {
+    left: -30px;
+  }
+  100% {
+    left: 0;
+  }
+}
+@-webkit-keyframes lg-left-end {
+  0% {
+    left: 0;
+  }
+  50% {
+    left: 30px;
+  }
+  100% {
+    left: 0;
+  }
+}
+@-moz-keyframes lg-left-end {
+  0% {
+    left: 0;
+  }
+  50% {
+    left: 30px;
+  }
+  100% {
+    left: 0;
+  }
+}
+@-ms-keyframes lg-left-end {
+  0% {
+    left: 0;
+  }
+  50% {
+    left: 30px;
+  }
+  100% {
+    left: 0;
+  }
+}
+@keyframes lg-left-end {
+  0% {
+    left: 0;
+  }
+  50% {
+    left: 30px;
+  }
+  100% {
+    left: 0;
+  }
+}
+.lg-outer.lg-right-end .lg-object {
+  -webkit-animation: lg-right-end 0.3s;
+  -o-animation: lg-right-end 0.3s;
+  animation: lg-right-end 0.3s;
+  position: relative;
+}
+.lg-outer.lg-left-end .lg-object {
+  -webkit-animation: lg-left-end 0.3s;
+  -o-animation: lg-left-end 0.3s;
+  animation: lg-left-end 0.3s;
+  position: relative;
+}
+
+.lg-toolbar {
+  z-index: 1082;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+  background-color: rgba(0, 0, 0, 0.45);
+}
+.lg-toolbar .lg-icon {
+  color: #999;
+  cursor: pointer;
+  float: right;
+  font-size: 24px;
+  height: 47px;
+  line-height: 27px;
+  padding: 10px 0;
+  text-align: center;
+  width: 50px;
+  text-decoration: none !important;
+  outline: medium none;
+  -webkit-transition: color 0.2s linear;
+  -o-transition: color 0.2s linear;
+  transition: color 0.2s linear;
+}
+.lg-toolbar .lg-icon:hover {
+  color: #FFF;
+}
+.lg-toolbar .lg-close:after {
+  content: "\e070";
+}
+.lg-toolbar .lg-download:after {
+  content: "\e0f2";
+}
+
+.lg-sub-html {
+  background-color: rgba(0, 0, 0, 0.45);
+  bottom: 0;
+  color: #EEE;
+  font-size: 16px;
+  left: 0;
+  padding: 10px 40px;
+  position: fixed;
+  right: 0;
+  text-align: center;
+  z-index: 1080;
+}
+.lg-sub-html h4 {
+  margin: 0;
+  font-size: 13px;
+  font-weight: bold;
+}
+.lg-sub-html p {
+  font-size: 12px;
+  margin: 5px 0 0;
+}
+
+#lg-counter {
+  color: #999;
+  display: inline-block;
+  font-size: 16px;
+  padding-left: 20px;
+  padding-top: 12px;
+  vertical-align: middle;
+}
+
+.lg-toolbar, .lg-prev, .lg-next {
+  opacity: 1;
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
+  -moz-transition: -moz-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
+  -o-transition: -o-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
+  transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
+}
+
+.lg-hide-items .lg-prev {
+  opacity: 0;
+  -webkit-transform: translate3d(-10px, 0, 0);
+  transform: translate3d(-10px, 0, 0);
+}
+.lg-hide-items .lg-next {
+  opacity: 0;
+  -webkit-transform: translate3d(10px, 0, 0);
+  transform: translate3d(10px, 0, 0);
+}
+.lg-hide-items .lg-toolbar {
+  opacity: 0;
+  -webkit-transform: translate3d(0, -10px, 0);
+  transform: translate3d(0, -10px, 0);
+}
+
+body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object {
+  -webkit-transform: scale3d(0.5, 0.5, 0.5);
+  transform: scale3d(0.5, 0.5, 0.5);
+  opacity: 0;
+  -webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
+  -moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
+  -o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
+  transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
+  -webkit-transform-origin: 50% 50%;
+  -moz-transform-origin: 50% 50%;
+  -ms-transform-origin: 50% 50%;
+  transform-origin: 50% 50%;
+}
+body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object {
+  -webkit-transform: scale3d(1, 1, 1);
+  transform: scale3d(1, 1, 1);
+  opacity: 1;
+}
+
+.lg-outer .lg-thumb-outer {
+  background-color: #0D0A0A;
+  bottom: 0;
+  position: absolute;
+  width: 100%;
+  z-index: 1080;
+  max-height: 350px;
+  -webkit-transform: translate3d(0, 100%, 0);
+  transform: translate3d(0, 100%, 0);
+  -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
+  -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
+  -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
+  transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
+}
+.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item {
+  cursor: -webkit-grab;
+  cursor: -moz-grab;
+  cursor: -o-grab;
+  cursor: -ms-grab;
+  cursor: grab;
+}
+.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item {
+  cursor: move;
+  cursor: -webkit-grabbing;
+  cursor: -moz-grabbing;
+  cursor: -o-grabbing;
+  cursor: -ms-grabbing;
+  cursor: grabbing;
+}
+.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb {
+  -webkit-transition-duration: 0s !important;
+  transition-duration: 0s !important;
+}
+.lg-outer.lg-thumb-open .lg-thumb-outer {
+  -webkit-transform: translate3d(0, 0%, 0);
+  transform: translate3d(0, 0%, 0);
+}
+.lg-outer .lg-thumb {
+  padding: 10px 0;
+  height: 100%;
+  margin-bottom: -5px;
+}
+.lg-outer .lg-thumb-item {
+  border-radius: 5px;
+  cursor: pointer;
+  float: left;
+  overflow: hidden;
+  height: 100%;
+  border: 2px solid #FFF;
+  border-radius: 4px;
+  margin-bottom: 5px;
+}
+@media (min-width: 1025px) {
+  .lg-outer .lg-thumb-item {
+    -webkit-transition: border-color 0.25s ease;
+    -o-transition: border-color 0.25s ease;
+    transition: border-color 0.25s ease;
+  }
+}
+.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover {
+  border-color: #a90707;
+}
+.lg-outer .lg-thumb-item img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+.lg-outer.lg-has-thumb .lg-item {
+  padding-bottom: 120px;
+}
+.lg-outer.lg-can-toggle .lg-item {
+  padding-bottom: 0;
+}
+.lg-outer.lg-pull-caption-up .lg-sub-html {
+  -webkit-transition: bottom 0.25s ease;
+  -o-transition: bottom 0.25s ease;
+  transition: bottom 0.25s ease;
+}
+.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html {
+  bottom: 100px;
+}
+.lg-outer .lg-toogle-thumb {
+  background-color: #0D0A0A;
+  border-radius: 2px 2px 0 0;
+  color: #999;
+  cursor: pointer;
+  font-size: 24px;
+  height: 39px;
+  line-height: 27px;
+  padding: 5px 0;
+  position: absolute;
+  right: 20px;
+  text-align: center;
+  top: -39px;
+  width: 50px;
+}
+.lg-outer .lg-toogle-thumb:after {
+  content: "\e1ff";
+}
+.lg-outer .lg-toogle-thumb:hover {
+  color: #FFF;
+}
+
+.lg-outer .lg-video-cont {
+  display: inline-block;
+  vertical-align: middle;
+  max-width: 1140px;
+  max-height: 100%;
+  width: 100%;
+  padding: 0 5px;
+}
+.lg-outer .lg-video {
+  width: 100%;
+  height: 0;
+  padding-bottom: 56.25%;
+  overflow: hidden;
+  position: relative;
+}
+.lg-outer .lg-video .lg-object {
+  display: inline-block;
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100% !important;
+  height: 100% !important;
+}
+.lg-outer .lg-video .lg-video-play {
+  width: 84px;
+  height: 59px;
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  margin-left: -42px;
+  margin-top: -30px;
+  z-index: 1080;
+  cursor: pointer;
+}
+.lg-outer .lg-has-vimeo .lg-video-play {
+  background: url("../img/vimeo-play.png") no-repeat scroll 0 0 transparent;
+}
+.lg-outer .lg-has-vimeo:hover .lg-video-play {
+  background: url("../img/vimeo-play.png") no-repeat scroll 0 -58px transparent;
+}
+.lg-outer .lg-has-html5 .lg-video-play {
+  background: transparent url("../img/video-play.png") no-repeat scroll 0 0;
+  height: 64px;
+  margin-left: -32px;
+  margin-top: -32px;
+  width: 64px;
+  opacity: 0.8;
+}
+.lg-outer .lg-has-html5:hover .lg-video-play {
+  opacity: 1;
+}
+.lg-outer .lg-has-youtube .lg-video-play {
+  background: url("../img/youtube-play.png") no-repeat scroll 0 0 transparent;
+}
+.lg-outer .lg-has-youtube:hover .lg-video-play {
+  background: url("../img/youtube-play.png") no-repeat scroll 0 -60px transparent;
+}
+.lg-outer .lg-video-object {
+  width: 100% !important;
+  height: 100% !important;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+.lg-outer .lg-has-video .lg-video-object {
+  visibility: hidden;
+}
+.lg-outer .lg-has-video.lg-video-playing .lg-object, .lg-outer .lg-has-video.lg-video-playing .lg-video-play {
+  display: none;
+}
+.lg-outer .lg-has-video.lg-video-playing .lg-video-object {
+  visibility: visible;
+}
+
+.lg-progress-bar {
+  background-color: #333;
+  height: 5px;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 100%;
+  z-index: 1083;
+  opacity: 0;
+  -webkit-transition: opacity 0.08s ease 0s;
+  -moz-transition: opacity 0.08s ease 0s;
+  -o-transition: opacity 0.08s ease 0s;
+  transition: opacity 0.08s ease 0s;
+}
+.lg-progress-bar .lg-progress {
+  background-color: #a90707;
+  height: 5px;
+  width: 0;
+}
+.lg-progress-bar.lg-start .lg-progress {
+  width: 100%;
+}
+.lg-show-autoplay .lg-progress-bar {
+  opacity: 1;
+}
+
+.lg-autoplay-button:after {
+  content: "\e01d";
+}
+.lg-show-autoplay .lg-autoplay-button:after {
+  content: "\e01a";
+}
+
+.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, .lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image {
+  -webkit-transition-duration: 0s;
+  transition-duration: 0s;
+}
+.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
+  -webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
+  -moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
+  -o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
+  transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
+}
+.lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
+  -webkit-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
+  -moz-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
+  -o-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
+  transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
+}
+.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
+  -webkit-transform: translate3d(0, 0, 0);
+  transform: translate3d(0, 0, 0);
+  -webkit-backface-visibility: hidden;
+  -moz-backface-visibility: hidden;
+  backface-visibility: hidden;
+}
+.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image {
+  -webkit-transform: scale3d(1, 1, 1);
+  transform: scale3d(1, 1, 1);
+  -webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
+  -moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
+  -o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
+  transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
+  -webkit-transform-origin: 0 0;
+  -moz-transform-origin: 0 0;
+  -ms-transform-origin: 0 0;
+  transform-origin: 0 0;
+  -webkit-backface-visibility: hidden;
+  -moz-backface-visibility: hidden;
+  backface-visibility: hidden;
+}
+
+#lg-zoom-in:after {
+  content: "\e311";
+}
+
+#lg-actual-size {
+  font-size: 20px;
+}
+#lg-actual-size:after {
+  content: "\e033";
+}
+
+#lg-zoom-out {
+  opacity: 0.5;
+  pointer-events: none;
+}
+#lg-zoom-out:after {
+  content: "\e312";
+}
+.lg-zoomed #lg-zoom-out {
+  opacity: 1;
+  pointer-events: auto;
+}
+
+.lg-outer .lg-pager-outer {
+  bottom: 60px;
+  left: 0;
+  position: absolute;
+  right: 0;
+  text-align: center;
+  z-index: 1080;
+  height: 10px;
+}
+.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont {
+  overflow: visible;
+}
+.lg-outer .lg-pager-cont {
+  cursor: pointer;
+  display: inline-block;
+  overflow: hidden;
+  position: relative;
+  vertical-align: top;
+  margin: 0 5px;
+}
+.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont {
+  opacity: 1;
+  -webkit-transform: translate3d(0, 0, 0);
+  transform: translate3d(0, 0, 0);
+}
+.lg-outer .lg-pager-cont.lg-pager-active .lg-pager {
+  box-shadow: 0 0 0 2px white inset;
+}
+.lg-outer .lg-pager-thumb-cont {
+  background-color: #fff;
+  color: #FFF;
+  bottom: 100%;
+  height: 83px;
+  left: 0;
+  margin-bottom: 20px;
+  margin-left: -60px;
+  opacity: 0;
+  padding: 5px;
+  position: absolute;
+  width: 120px;
+  border-radius: 3px;
+  -webkit-transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s;
+  -moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s;
+  -o-transition: opacity 0.15s ease 0s, -o-transform 0.15s ease 0s;
+  transition: opacity 0.15s ease 0s, transform 0.15s ease 0s;
+  -webkit-transform: translate3d(0, 5px, 0);
+  transform: translate3d(0, 5px, 0);
+}
+.lg-outer .lg-pager-thumb-cont img {
+  width: 100%;
+  height: 100%;
+}
+.lg-outer .lg-pager {
+  background-color: rgba(255, 255, 255, 0.5);
+  border-radius: 50%;
+  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset;
+  display: block;
+  height: 12px;
+  -webkit-transition: box-shadow 0.3s ease 0s;
+  -o-transition: box-shadow 0.3s ease 0s;
+  transition: box-shadow 0.3s ease 0s;
+  width: 12px;
+}
+.lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus {
+  box-shadow: 0 0 0 8px white inset;
+}
+.lg-outer .lg-caret {
+  border-left: 10px solid transparent;
+  border-right: 10px solid transparent;
+  border-top: 10px dashed;
+  bottom: -10px;
+  display: inline-block;
+  height: 0;
+  left: 50%;
+  margin-left: -5px;
+  position: absolute;
+  vertical-align: middle;
+  width: 0;
+}
+
+.lg-fullscreen:after {
+  content: "\e20c";
+}
+.lg-fullscreen-on .lg-fullscreen:after {
+  content: "\e20d";
+}
+
+.lg-outer #lg-dropdown-overlay {
+  background-color: rgba(0, 0, 0, 0.25);
+  bottom: 0;
+  cursor: default;
+  left: 0;
+  position: fixed;
+  right: 0;
+  top: 0;
+  z-index: 1081;
+  opacity: 0;
+  visibility: hidden;
+  -webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
+  -o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
+  transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
+}
+.lg-outer.lg-dropdown-active .lg-dropdown, .lg-outer.lg-dropdown-active #lg-dropdown-overlay {
+  -webkit-transition-delay: 0s;
+  transition-delay: 0s;
+  -moz-transform: translate3d(0, 0px, 0);
+  -o-transform: translate3d(0, 0px, 0);
+  -ms-transform: translate3d(0, 0px, 0);
+  -webkit-transform: translate3d(0, 0px, 0);
+  transform: translate3d(0, 0px, 0);
+  opacity: 1;
+  visibility: visible;
+}
+.lg-outer.lg-dropdown-active #lg-share {
+  color: #FFF;
+}
+.lg-outer .lg-dropdown {
+  background-color: #fff;
+  border-radius: 2px;
+  font-size: 14px;
+  list-style-type: none;
+  margin: 0;
+  padding: 10px 0;
+  position: absolute;
+  right: 0;
+  text-align: left;
+  top: 50px;
+  opacity: 0;
+  visibility: hidden;
+  -moz-transform: translate3d(0, 5px, 0);
+  -o-transform: translate3d(0, 5px, 0);
+  -ms-transform: translate3d(0, 5px, 0);
+  -webkit-transform: translate3d(0, 5px, 0);
+  transform: translate3d(0, 5px, 0);
+  -webkit-transition: -webkit-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
+  -moz-transition: -moz-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
+  -o-transition: -o-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
+  transition: transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
+}
+.lg-outer .lg-dropdown:after {
+  content: "";
+  display: block;
+  height: 0;
+  width: 0;
+  position: absolute;
+  border: 8px solid transparent;
+  border-bottom-color: #FFF;
+  right: 16px;
+  top: -16px;
+}
+.lg-outer .lg-dropdown > li:last-child {
+  margin-bottom: 0px;
+}
+.lg-outer .lg-dropdown > li:hover a, .lg-outer .lg-dropdown > li:hover .lg-icon {
+  color: #333;
+}
+.lg-outer .lg-dropdown a {
+  color: #333;
+  display: block;
+  white-space: pre;
+  padding: 4px 12px;
+  font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
+  font-size: 12px;
+}
+.lg-outer .lg-dropdown a:hover {
+  background-color: rgba(0, 0, 0, 0.07);
+}
+.lg-outer .lg-dropdown .lg-dropdown-text {
+  display: inline-block;
+  line-height: 1;
+  margin-top: -3px;
+  vertical-align: middle;
+}
+.lg-outer .lg-dropdown .lg-icon {
+  color: #333;
+  display: inline-block;
+  float: none;
+  font-size: 20px;
+  height: auto;
+  line-height: 1;
+  margin-right: 8px;
+  padding: 0;
+  vertical-align: middle;
+  width: auto;
+}
+.lg-outer #lg-share {
+  position: relative;
+}
+.lg-outer #lg-share:after {
+  content: "\e80d";
+}
+.lg-outer #lg-share-facebook .lg-icon {
+  color: #3b5998;
+}
+.lg-outer #lg-share-facebook .lg-icon:after {
+  content: "\e901";
+}
+.lg-outer #lg-share-twitter .lg-icon {
+  color: #00aced;
+}
+.lg-outer #lg-share-twitter .lg-icon:after {
+  content: "\e904";
+}
+.lg-outer #lg-share-googleplus .lg-icon {
+  color: #dd4b39;
+}
+.lg-outer #lg-share-googleplus .lg-icon:after {
+  content: "\e902";
+}
+.lg-outer #lg-share-pinterest .lg-icon {
+  color: #cb2027;
+}
+.lg-outer #lg-share-pinterest .lg-icon:after {
+  content: "\e903";
+}
+
+.lg-group:after {
+  content: "";
+  display: table;
+  clear: both;
+}
+
+.lg-outer {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0;
+  left: 0;
+  z-index: 1050;
+  text-align: left;
+  opacity: 0;
+  -webkit-transition: opacity 0.15s ease 0s;
+  -o-transition: opacity 0.15s ease 0s;
+  transition: opacity 0.15s ease 0s;
+}
+.lg-outer * {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+.lg-outer.lg-visible {
+  opacity: 1;
+}
+.lg-outer.lg-css3 .lg-item.lg-prev-slide, .lg-outer.lg-css3 .lg-item.lg-next-slide, .lg-outer.lg-css3 .lg-item.lg-current {
+  -webkit-transition-duration: inherit !important;
+  transition-duration: inherit !important;
+  -webkit-transition-timing-function: inherit !important;
+  transition-timing-function: inherit !important;
+}
+.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current {
+  -webkit-transition-duration: 0s !important;
+  transition-duration: 0s !important;
+  opacity: 1;
+}
+.lg-outer.lg-grab img.lg-object {
+  cursor: -webkit-grab;
+  cursor: -moz-grab;
+  cursor: -o-grab;
+  cursor: -ms-grab;
+  cursor: grab;
+}
+.lg-outer.lg-grabbing img.lg-object {
+  cursor: move;
+  cursor: -webkit-grabbing;
+  cursor: -moz-grabbing;
+  cursor: -o-grabbing;
+  cursor: -ms-grabbing;
+  cursor: grabbing;
+}
+.lg-outer .lg {
+  height: 100%;
+  width: 100%;
+  position: relative;
+  overflow: hidden;
+  margin-left: auto;
+  margin-right: auto;
+  max-width: 100%;
+  max-height: 100%;
+}
+.lg-outer .lg-inner {
+  width: 100%;
+  height: 100%;
+  position: absolute;
+  left: 0;
+  top: 0;
+  white-space: nowrap;
+}
+.lg-outer .lg-item {
+  background: url("../img/loading.gif") no-repeat scroll center center transparent;
+  display: none !important;
+}
+.lg-outer.lg-css3 .lg-prev-slide, .lg-outer.lg-css3 .lg-current, .lg-outer.lg-css3 .lg-next-slide {
+  display: inline-block !important;
+}
+.lg-outer.lg-css .lg-current {
+  display: inline-block !important;
+}
+.lg-outer .lg-item, .lg-outer .lg-img-wrap {
+  display: inline-block;
+  text-align: center;
+  position: absolute;
+  width: 100%;
+  height: 100%;
+}
+.lg-outer .lg-item:before, .lg-outer .lg-img-wrap:before {
+  content: "";
+  display: inline-block;
+  height: 50%;
+  width: 1px;
+  margin-right: -1px;
+}
+.lg-outer .lg-img-wrap {
+  position: absolute;
+  padding: 0 5px;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+}
+.lg-outer .lg-item.lg-complete {
+  background-image: none;
+}
+.lg-outer .lg-item.lg-current {
+  z-index: 1060;
+}
+.lg-outer .lg-image {
+  display: inline-block;
+  vertical-align: middle;
+  max-width: 100%;
+  max-height: 100%;
+  width: auto !important;
+  height: auto !important;
+}
+.lg-outer.lg-show-after-load .lg-item .lg-object, .lg-outer.lg-show-after-load .lg-item .lg-video-play {
+  opacity: 0;
+  -webkit-transition: opacity 0.15s ease 0s;
+  -o-transition: opacity 0.15s ease 0s;
+  transition: opacity 0.15s ease 0s;
+}
+.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object, .lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play {
+  opacity: 1;
+}
+.lg-outer .lg-empty-html {
+  display: none;
+}
+.lg-outer.lg-hide-download #lg-download {
+  display: none;
+}
+
+.lg-backdrop {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 1040;
+  background-color: #000;
+  opacity: 0;
+  -webkit-transition: opacity 0.15s ease 0s;
+  -o-transition: opacity 0.15s ease 0s;
+  transition: opacity 0.15s ease 0s;
+}
+.lg-backdrop.in {
+  opacity: 1;
+}
+
+.lg-css3.lg-no-trans .lg-prev-slide, .lg-css3.lg-no-trans .lg-next-slide, .lg-css3.lg-no-trans .lg-current {
+  -webkit-transition: none 0s ease 0s !important;
+  -moz-transition: none 0s ease 0s !important;
+  -o-transition: none 0s ease 0s !important;
+  transition: none 0s ease 0s !important;
+}
+.lg-css3.lg-use-css3 .lg-item {
+  -webkit-backface-visibility: hidden;
+  -moz-backface-visibility: hidden;
+  backface-visibility: hidden;
+}
+.lg-css3.lg-use-left .lg-item {
+  -webkit-backface-visibility: hidden;
+  -moz-backface-visibility: hidden;
+  backface-visibility: hidden;
+}
+.lg-css3.lg-fade .lg-item {
+  opacity: 0;
+}
+.lg-css3.lg-fade .lg-item.lg-current {
+  opacity: 1;
+}
+.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current {
+  -webkit-transition: opacity 0.1s ease 0s;
+  -moz-transition: opacity 0.1s ease 0s;
+  -o-transition: opacity 0.1s ease 0s;
+  transition: opacity 0.1s ease 0s;
+}
+.lg-css3.lg-slide.lg-use-css3 .lg-item {
+  opacity: 0;
+}
+.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide {
+  -webkit-transform: translate3d(-100%, 0, 0);
+  transform: translate3d(-100%, 0, 0);
+}
+.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide {
+  -webkit-transform: translate3d(100%, 0, 0);
+  transform: translate3d(100%, 0, 0);
+}
+.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current {
+  -webkit-transform: translate3d(0, 0, 0);
+  transform: translate3d(0, 0, 0);
+  opacity: 1;
+}
+.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current {
+  -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
+  -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
+  -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
+  transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
+}
+.lg-css3.lg-slide.lg-use-left .lg-item {
+  opacity: 0;
+  position: absolute;
+  left: 0;
+}
+.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide {
+  left: -100%;
+}
+.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide {
+  left: 100%;
+}
+.lg-css3.lg-slide.lg-use-left .lg-item.lg-current {
+  left: 0;
+  opacity: 1;
+}
+.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-current {
+  -webkit-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
+  -moz-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
+  -o-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
+  transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
+}
+
+/*# sourceMappingURL=lightgallery.css.map */

+ 468 - 0
app/assets/styles/scripts/lightslider.scss

@@ -0,0 +1,468 @@
+/*! lightslider - v1.1.6 - 2016-10-25
+* https://github.com/sachinchoolur/lightslider
+* Copyright (c) 2016 Sachin N; Licensed MIT */
+/*! lightslider - v1.1.3 - 2015-04-14
+* https://github.com/sachinchoolur/lightslider
+* Copyright (c) 2015 Sachin N; Licensed MIT */
+/** /!!! core css Should not edit !!!/**/
+
+.lSSlideOuter {
+    overflow: hidden;
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none
+}
+
+.lightSlider:before, .lightSlider:after {
+    content: " ";
+    display: table;
+}
+
+.lightSlider {
+    overflow: hidden;
+    margin: 0;
+}
+
+.lSSlideWrapper {
+    max-width: 100%;
+    overflow: hidden;
+    position: relative;
+}
+
+.lSSlideWrapper > .lightSlider:after {
+    clear: both;
+}
+
+.lSSlideWrapper .lSSlide {
+    -webkit-transform: translate(0px, 0px);
+    -ms-transform: translate(0px, 0px);
+    transform: translate(0px, 0px);
+    -webkit-transition: all 1s;
+    -webkit-transition-property: -webkit-transform, height;
+    -moz-transition-property: -moz-transform, height;
+    transition-property: transform, height;
+    -webkit-transition-duration: inherit !important;
+    transition-duration: inherit !important;
+    -webkit-transition-timing-function: inherit !important;
+    transition-timing-function: inherit !important;
+}
+
+.lSSlideWrapper .lSFade {
+    position: relative;
+}
+
+.lSSlideWrapper .lSFade > * {
+    position: absolute !important;
+    top: 0;
+    left: 0;
+    z-index: 9;
+    margin-right: 0;
+    width: 100%;
+}
+
+.lSSlideWrapper.usingCss .lSFade > * {
+    opacity: 0;
+    -webkit-transition-delay: 0s;
+    transition-delay: 0s;
+    -webkit-transition-duration: inherit !important;
+    transition-duration: inherit !important;
+    -webkit-transition-property: opacity;
+    transition-property: opacity;
+    -webkit-transition-timing-function: inherit !important;
+    transition-timing-function: inherit !important;
+}
+
+.lSSlideWrapper .lSFade > *.active {
+    z-index: 10;
+}
+
+.lSSlideWrapper.usingCss .lSFade > *.active {
+    opacity: 1;
+}
+
+/** /!!! End of core css Should not edit !!!/**/
+
+/* Pager */
+.lSSlideOuter .lSPager.lSpg {
+    margin: 10px 0 0;
+    padding: 0;
+    text-align: center;
+    position: absolute;
+    padding: 0 10px;
+    right: 0;
+    bottom: 8px;
+    background: #ebebeb;
+}
+
+.lSSlideOuter .lSPager.lSpg:before {
+    content: '';
+    display: block;
+    position: absolute;
+    width: 30px;
+    left: -30px;
+    top: 0;
+    bottom: 0;
+    background: -moz-linear-gradient(left, rgba(235, 235, 235, 0) 0%, rgba(235, 235, 235, 1) 100%);
+    background: -webkit-linear-gradient(left, rgba(235, 235, 235, 0) 0%, rgba(235, 235, 235, 1) 100%);
+    background: linear-gradient(to right, rgba(235, 235, 235, 0) 0%, rgba(235, 235, 235, 1) 100%);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ebebeb', endColorstr='#ebebeb', GradientType=1);
+}
+
+.lSSlideOuter .lSPager.lSpg > li {
+    cursor: pointer;
+    display: inline-block;
+    padding: 0 3px;
+}
+
+.lSSlideOuter .lSPager.lSpg > li a {
+    background-color: #d4d4d4;
+    // border-radius: 30px;
+    display: inline-block;
+    height: 6px;
+    overflow: hidden;
+    text-indent: -999em;
+    width: 6px;
+    position: relative;
+    z-index: 99;
+}
+
+.lSSlideOuter .lSPager.lSpg > li.active a {
+    background-color: #3b434d;
+}
+
+.lSSlideOuter .lSPager.lSpg > li:hover a {
+    background-color: #eb914e;
+}
+
+.lSSlideOuter .media {
+    opacity: 0.8;
+}
+
+.lSSlideOuter .media.active {
+    opacity: 1;
+}
+
+/* End of pager */
+
+/** Gallery */
+.lSSlideOuter .lSPager.lSGallery {
+    list-style: none outside none;
+    padding-left: 0;
+    margin: 0;
+    overflow: hidden;
+    transform: translate3d(0px, 0px, 0px);
+    -moz-transform: translate3d(0px, 0px, 0px);
+    -ms-transform: translate3d(0px, 0px, 0px);
+    -webkit-transform: translate3d(0px, 0px, 0px);
+    -o-transform: translate3d(0px, 0px, 0px);
+    -webkit-transition-property: -webkit-transform;
+    -moz-transition-property: -moz-transform;
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+}
+
+.lSSlideOuter .lSPager.lSGallery li {
+    overflow: hidden;
+    -webkit-transition: border-radius 0.12s linear 0s 0.35s linear 0s;
+    transition: border-radius 0.12s linear 0s 0.35s linear 0s;
+}
+
+.lSSlideOuter .lSPager.lSGallery li.active, .lSSlideOuter .lSPager.lSGallery li:hover {
+    border-radius: 5px;
+}
+
+.lSSlideOuter .lSPager.lSGallery img {
+    display: block;
+    height: auto;
+    max-width: 100%;
+}
+
+.lSSlideOuter .lSPager.lSGallery:before, .lSSlideOuter .lSPager.lSGallery:after {
+    content: " ";
+    display: table;
+}
+
+.lSSlideOuter .lSPager.lSGallery:after {
+    clear: both;
+}
+
+/* End of Gallery*/
+
+/* slider actions */
+.lSAction > a {
+    width: 32px;
+    display: block;
+    top: 50%;
+    height: 32px;
+    background-image: url('../img/controls.png');
+    cursor: pointer;
+    position: absolute;
+    z-index: 99;
+    margin-top: -16px;
+    opacity: 0.5;
+    -webkit-transition: opacity 0.35s linear 0s;
+    transition: opacity 0.35s linear 0s;
+}
+
+.lSAction > a:hover {
+    opacity: 1;
+}
+
+.lSAction > .lSPrev {
+    background-position: 0 0;
+    left: 10px;
+}
+
+.lSAction > .lSNext {
+    background-position: -32px 0;
+    right: 10px;
+}
+
+.lSAction > a.disabled {
+    pointer-events: none;
+}
+
+.cS-hidden {
+    height: 1px;
+    opacity: 0;
+    filter: alpha(opacity=0);
+    overflow: hidden;
+}
+
+/* vertical */
+.lSSlideOuter.vertical {
+    position: relative;
+}
+
+.lSSlideOuter.vertical.noPager {
+    padding-right: 0px !important;
+}
+
+.lSSlideOuter.vertical .lSGallery {
+    position: absolute !important;
+    right: 0;
+    top: 0;
+}
+
+.lSSlideOuter.vertical .lightSlider > * {
+    width: 100% !important;
+    max-width: none !important;
+}
+
+/* vertical controlls */
+.lSSlideOuter.vertical .lSAction > a {
+    left: 50%;
+    margin-left: -14px;
+    margin-top: 0;
+}
+
+.lSSlideOuter.vertical .lSAction > .lSNext {
+    background-position: 31px -31px;
+    bottom: 10px;
+    top: auto;
+}
+
+.lSSlideOuter.vertical .lSAction > .lSPrev {
+    background-position: 0 -31px;
+    bottom: auto;
+    top: 10px;
+}
+
+/* vertical */
+
+/* Rtl */
+.lSSlideOuter.lSrtl {
+    direction: rtl;
+}
+
+.lSSlideOuter .lightSlider, .lSSlideOuter .lSPager {
+    padding-left: 0;
+    list-style: none outside none;
+}
+
+.lSSlideOuter.lSrtl .lightSlider, .lSSlideOuter.lSrtl .lSPager {
+    padding-right: 0;
+}
+
+.lSSlideOuter .lightSlider > *, .lSSlideOuter .lSGallery li {
+    float: left;
+}
+
+.lSSlideOuter.lSrtl .lightSlider > *, .lSSlideOuter.lSrtl .lSGallery li {
+    float: right !important;
+}
+
+/* Rtl */
+
+@-webkit-keyframes rightEnd {
+    0% {
+        left: 0;
+    }
+
+    50% {
+        left: -15px;
+    }
+
+    100% {
+        left: 0;
+    }
+}
+
+@keyframes rightEnd {
+    0% {
+        left: 0;
+    }
+
+    50% {
+        left: -15px;
+    }
+
+    100% {
+        left: 0;
+    }
+}
+
+@-webkit-keyframes topEnd {
+    0% {
+        top: 0;
+    }
+
+    50% {
+        top: -15px;
+    }
+
+    100% {
+        top: 0;
+    }
+}
+
+@keyframes topEnd {
+    0% {
+        top: 0;
+    }
+
+    50% {
+        top: -15px;
+    }
+
+    100% {
+        top: 0;
+    }
+}
+
+@-webkit-keyframes leftEnd {
+    0% {
+        left: 0;
+    }
+
+    50% {
+        left: 15px;
+    }
+
+    100% {
+        left: 0;
+    }
+}
+
+@keyframes leftEnd {
+    0% {
+        left: 0;
+    }
+
+    50% {
+        left: 15px;
+    }
+
+    100% {
+        left: 0;
+    }
+}
+
+@-webkit-keyframes bottomEnd {
+    0% {
+        bottom: 0;
+    }
+
+    50% {
+        bottom: -15px;
+    }
+
+    100% {
+        bottom: 0;
+    }
+}
+
+@keyframes bottomEnd {
+    0% {
+        bottom: 0;
+    }
+
+    50% {
+        bottom: -15px;
+    }
+
+    100% {
+        bottom: 0;
+    }
+}
+
+.lSSlideOuter .rightEnd {
+    -webkit-animation: rightEnd 0.3s;
+    animation: rightEnd 0.3s;
+    position: relative;
+}
+
+.lSSlideOuter .leftEnd {
+    -webkit-animation: leftEnd 0.3s;
+    animation: leftEnd 0.3s;
+    position: relative;
+}
+
+.lSSlideOuter.vertical .rightEnd {
+    -webkit-animation: topEnd 0.3s;
+    animation: topEnd 0.3s;
+    position: relative;
+}
+
+.lSSlideOuter.vertical .leftEnd {
+    -webkit-animation: bottomEnd 0.3s;
+    animation: bottomEnd 0.3s;
+    position: relative;
+}
+
+.lSSlideOuter.lSrtl .rightEnd {
+    -webkit-animation: leftEnd 0.3s;
+    animation: leftEnd 0.3s;
+    position: relative;
+}
+
+.lSSlideOuter.lSrtl .leftEnd {
+    -webkit-animation: rightEnd 0.3s;
+    animation: rightEnd 0.3s;
+    position: relative;
+}
+
+/*/  GRab cursor */
+.lightSlider.lsGrab > * {
+    cursor: -webkit-grab;
+    cursor: -moz-grab;
+    cursor: -o-grab;
+    cursor: -ms-grab;
+    cursor: grab;
+}
+
+.lightSlider.lsGrabbing > * {
+    cursor: move;
+    cursor: -webkit-grabbing;
+    cursor: -moz-grabbing;
+    cursor: -o-grabbing;
+    cursor: -ms-grabbing;
+    cursor: grabbing;
+}

+ 61 - 0
app/assets/styles/scripts/radiobuttontoggle.scss

@@ -0,0 +1,61 @@
+.filterservice__toggle {
+    display: -webkit-flex;
+    display: -ms-flex;
+    display: flex;
+    flex-direction: row;
+    width: 100%;
+    justify-content: space-between;
+    align-items: center;
+    align-content: center;
+    
+    .toggle {
+        height: 24px;
+    }
+    input[type=checkbox]{
+    	height: 0;
+    	width: 0;
+    	visibility: hidden;
+        position: absolute;
+        left: 0;
+        z-index: -1000;
+    }
+    label.filterservice__labeltoggle {
+    	cursor: pointer;
+    	text-indent: -9999px;
+    	width: 30%;
+        margin: 0 2%;
+    	height: 22px;
+    	background: #ffffff;
+    	display: block;
+    	border-radius: 100px;
+    	position: relative;
+        border: 1px solid #d7d7d7;
+        overflow: hidden;
+        display: -webkit-flex;
+        display: -ms-flex;
+        display: flex;
+        order: 2;
+        margin-bottom: 10px;
+    }
+    label.filterservice__labeltoggle:after {
+    	content: '';
+    	position: absolute;
+    	top: 2px;
+    	left: 3px;
+    	width: 18px;
+    	height: 18px;
+    	background: #5597d1;
+    	border-radius: 90px;
+    	transition: .25s;
+    }
+    input:checked + label.filterservice__labeltoggle {
+        background: #ffffff;
+    }
+    input:checked + label.filterservice__labeltoggle:after {
+    	background: #5597d1;
+    }
+    input:checked + label.filterservice__labeltoggle:after {
+    	left: calc(100% - 3px);
+    	transform: translateX(-100%);
+    }
+}

+ 219 - 0
app/assets/ts/fancycheckboxes.ts

@@ -0,0 +1,219 @@
+/// <reference path="../../node_modules/@types/jquery/index.d.ts"/>
+/// <reference path="../../node_modules/@types/fancybox/index.d.ts"/>
+
+namespace FancyCheckboxes {
+
+    export class FancyCheckbox {
+        public events: { [name: string]: { (responseText: string): void } [] } = {
+            'error': [],
+            'success': []
+        };
+
+        private $selector: JQuery;
+        private checkboxData: any[];
+        private selected: {} = {};
+
+        public constructor($selector: JQuery) {
+            this.$selector = $selector;
+            this.checkboxData = [];
+            this.populateCheckboxData(JSON.parse($selector.data('items') ? $selector.data('items').replace(/'/g, '"') : "[]"));
+            this.$selector.click(this.onSelectorClick.bind(this));
+            this.$selector.prev().append('<div class="selected-items"></div>');
+            this.loadSelected();
+        }
+
+        private loadSelected() {
+            let context = this;
+            let first = true;
+            let $selected = context.$selector.prev().find('.selected-items');
+            this.selected = {};
+            $selected.html('');
+            console.dir($(this.$selector.data('field')).find(':selected'));
+            $(this.$selector.data('field')).find(':selected').each(function () {
+                context.selected[$(this).attr('value')] = $(this).html();
+                if (!first) {
+                    $selected.append(', ')
+                }
+                if (first) {
+                    first = false;
+                }
+                $selected.append('<span>' + $(this).html() + '</span>');
+            });
+            console.dir(this.selected);
+        }
+
+        private onSelectorClick(event) {
+            let context = this;
+            let content = $('<div></div>');
+            content.append('<div class="modal-header"><h3>' + this.$selector.html() + '</h3></div>');
+            content.append('<div class="fancycheckboxes-items-container container">' + this.render().html() + '</div>');
+            content.append('<div class="modal-footer"></div>');
+            content.find('.modal-footer').append('<button type="submit" class="btn btn-primary">Выбрать</button>');
+            let options = <FancyboxOptions> {
+                content: '<div class="fancycheckboxes">' + content.html() + '</div>',
+                type: 'html',
+                modal: true,
+                height: window.innerHeight,
+                width: $('.mainBlock').outerWidth(),
+                autoSize: false,
+                afterClose: function () {
+                    context.loadSelected();
+                },
+                afterShow: function () {
+                    context.bindEvents();
+                }
+            };
+            $.fancybox(options);
+        }
+
+        private bindEvents() {
+            let context = this;
+            let $fancy = $('.fancycheckboxes');
+            $fancy.find('.more').each(function () {
+                let $link = $(this);
+                $link.on('click', function () {
+                    $link.parent().animate({height: $link.parent()[0].scrollHeight}, 200, function () {
+                        $link.parent().height('auto');
+                        $link.remove();
+                    });
+                });
+            });
+            $fancy.find('.btn-primary').click(function () {
+                $(context.$selector.data('field')).find('option').removeAttr('selected');
+                $fancy.find('input:checked').each(function () {
+                    console.dir($(context.$selector.data('field'))
+                        .find('[value=' + $(this).attr('value') + ']'));
+                    $(context.$selector.data('field'))
+                        .find('[value=' + $(this).attr('value') + ']')
+                        .prop('selected', 'selected');
+                });
+
+                $.fancybox.close();
+            });
+        }
+
+        public checkChecked(id) {
+            return this.selected.hasOwnProperty(id);
+        }
+
+        public on(eventName: string, callback: (responseText: string) => void) {
+            this.events[eventName].push(callback);
+            return this;
+        }
+
+        public trigger(eventName: string, ...args: any[]) {
+            let context = this;
+            for (let i in this.events[eventName]) {
+                if (this.events[eventName].hasOwnProperty(i)) {
+                    setTimeout(this.events[eventName][i].apply(context, args), 1);
+                }
+            }
+        }
+
+        private populateCheckboxData(checkboxData: ItemInterface[]) {
+            checkboxData.sort(function (item1: ItemInterface, item2: ItemInterface) {
+                return item1.value.localeCompare(item2.value);
+            });
+            for (let i in checkboxData) {
+                if (checkboxData.hasOwnProperty(i)) {
+                    if (checkboxData[i].items.length) {
+                        let group = new CheckboxGroup(checkboxData[i], this);
+                        this.checkboxData.push(group);
+                    } else {
+                        let item = new CheckboxItem(checkboxData[i], this);
+                        this.checkboxData.push(item);
+                    }
+                }
+            }
+        }
+
+        public render() {
+            let items = $('<div></div>');
+            this.checkboxData.forEach(function (item) {
+                if (item instanceof CheckboxItem) {
+                    let group = $('<div class="fancycheckboxes-group"></div>');
+                    group.append(item.render());
+                    items.append(group);
+                } else {
+                    items.append(item.render());
+                }
+            });
+            items.find('.fancycheckboxes-group').each(function () {
+                if ($(this).find('.fancycheckboxes-item').length > 5) {
+                    $(this).append($('<a class="more">Все &raquo;</a>'));
+                    $(this).height(150);
+                }
+            });
+            return items;
+        }
+    }
+
+    interface ItemInterface {
+        id: number;
+        value: string;
+        items: ItemInterface[];
+    }
+
+    class CheckboxGroup {
+        public items: any[];
+
+        public name: string;
+        private widget: FancyCheckbox;
+
+        public constructor(item: ItemInterface, widget: FancyCheckbox) {
+            this.widget = widget;
+            this.name = item.value;
+            this.items = [];
+            this.populateCheckboxData(item.items);
+        }
+
+        private populateCheckboxData(checkboxData: ItemInterface[]) {
+            checkboxData.sort(function (item1: ItemInterface, item2: ItemInterface) {
+                return item1.value.localeCompare(item2.value);
+            });
+            for (let i in checkboxData) {
+                if (checkboxData.hasOwnProperty(i)) {
+                    if (checkboxData[i].items.length) {
+                        let group = new CheckboxGroup(checkboxData[i], this.widget);
+                        this.items.push(group);
+                    } else {
+                        let item = new CheckboxItem(checkboxData[i], this.widget);
+                        this.items.push(item);
+                    }
+                }
+            }
+        }
+
+        public render() {
+            let group = $('<div class="fancycheckboxes-group"></div>');
+            group.append($('<h4>' + this.name + '</h4>'));
+            this.items.forEach(function (item) {
+                group.append(item.render());
+            });
+            return group;
+        }
+    }
+
+    class CheckboxItem {
+        public id: number;
+        public name: string;
+        private widget: FancyCheckbox;
+
+        public  constructor(item: ItemInterface, widget: FancyCheckbox) {
+            this.id = item.id;
+            this.name = item.value;
+            this.widget = widget;
+        }
+
+        public render() {
+            let item = $('<div class="fancycheckboxes-item"></div>');
+            item.append($('<input type="checkbox" value="' + this.id + '" id="fchb_' + this.id + '" > <label for="fchb_' + this.id + '">' + this.name + '</label>'));
+            if (this.widget.checkChecked(this.id)) {
+                item.find('input').attr('checked', 'checked');
+            }
+            return item;
+        }
+    }
+
+
+}

+ 92 - 0
app/assets/ts/regionfilter.ts

@@ -0,0 +1,92 @@
+/// <reference path="../../node_modules/@types/jquery/index.d.ts"/>
+
+namespace RegionFilter {
+    export class RegionFilter {
+        private $selector: JQuery;
+        private selected: {} = {};
+        private strings = ['район', 'района', 'районов'];
+        private typeName = 'районы';
+        private config: FilterConfigInterface;
+
+        public constructor($selector: JQuery, config: FilterConfigInterface) {
+            this.$selector = $selector;
+
+            let strings = $selector.data('strings');
+            let typeName = $selector.data('type-name');
+            if (strings !== undefined) {
+                this.strings = eval(strings);
+            }
+            if (typeName !== undefined) {
+                this.typeName = typeName;
+            }
+            this.config = config;
+            this.$selector.click(this.onSelectorClick.bind(this));
+            this.loadSelected();
+        }
+
+        private onSelectorClick(event) {
+            event.preventDefault();
+            let context = this;
+            let itemsContainer = this.$selector.parent().find('.' + this.config.itemsContainerClass);
+            if (itemsContainer.length) {
+                itemsContainer.fadeOut(200, function () {
+                    $(this).remove();
+                });
+            } else {
+                this.$selector.parent().append(this.createContainer());
+            }
+        }
+
+        private createContainer(): JQuery {
+            let itemsContainer = $(`<div class="${this.config.itemsContainerClass}"></div>`);
+            let context = this;
+            let field = $(this.$selector.data('field'));
+            field.find('option').each(function () {
+                let id = $(this).attr('value');
+                itemsContainer.append(
+                    // create container
+                    $(`<div class="${context.config.itemContainerClass}"></div>`)
+                    // create item
+                        .append($(`<input type="checkbox" class="${context.config.itemCheckboxClass}" id="rfchb${id}" value="${id}">`)
+                        // select items
+                            .attr('checked', $(this).prop('selected'))
+                            // bind change event
+                            .on('change', function () {
+                                field.find(`option[value=${id}]`).prop('selected', $(this).prop('checked'));
+                                context.setCount(field.find('option:selected').length);
+                            }))
+                        // create label
+                        .append($(`<label class="${context.config.itemLabelClass}" for="rfchb${id}">${$(this).html()}</label>`)));
+            });
+
+            return itemsContainer;
+        }
+
+        private loadSelected() {
+
+        }
+
+        private static declOfNum(number, titles) {
+            let cases = [2, 0, 1, 1, 1, 2];
+            return titles[(number % 100 > 4 && number % 100 < 20) ? 2 : cases[(number % 10 < 5) ? number % 10 : 5]];
+        }
+
+        public checkChecked(id) {
+            return this.selected.hasOwnProperty(id);
+        }
+
+        public setCount(count: number = 0) {
+            this.$selector.html('Все ' + this.typeName);
+            if (count > 0) {
+                this.$selector.html(count + ' ' + RegionFilter.declOfNum(count, this.strings));
+            }
+        }
+    }
+
+    interface FilterConfigInterface {
+        itemsContainerClass: string;
+        itemCheckboxClass: string;
+        itemContainerClass: string;
+        itemLabelClass: string;
+    }
+}

+ 130 - 0
app/assets/ts/specfilter.ts

@@ -0,0 +1,130 @@
+/// <reference path="../../node_modules/@types/jquery/index.d.ts"/>
+/// <reference path="../../node_modules/@types/fancybox/index.d.ts"/>
+
+namespace SpecFilter {
+
+    export class SpecFilter {
+
+        private $selector: JQuery;
+        private selected: {} = {};
+        private content;
+        private endpointUrl;
+        private strings = ['специализация', 'специализации', 'специализаций'];
+        private typeName = 'специализации';
+
+        public constructor($selector: JQuery) {
+            this.$selector = $selector;
+            this.endpointUrl = $selector.data('enpoint-url');
+            let strings = $selector.data('strings');
+            let typeName = $selector.data('type-name');
+            if (strings !== undefined) {
+                this.strings = eval(strings);
+            }
+            if (typeName !== undefined) {
+                this.typeName = typeName;
+            }
+
+            $.ajax({
+                url: this.endpointUrl
+            }).done((function (data) {
+                this.content = data;
+            }).bind(this));
+            this.$selector.click(this.onSelectorClick.bind(this));
+            this.loadSelected();
+        }
+
+        private onSelectorClick(event) {
+            event.preventDefault();
+            let context = this;
+            let options = <FancyboxOptions> {
+                content: this.content,
+                type: 'html',
+                height: 799,
+                width: $('.centerbar').outerWidth(),
+                padding: 0,
+                autoSize: false,
+                afterClose: function () {
+
+                },
+                afterShow: function () {
+                    context.bindEvents();
+                    context.loadSelected();
+                }
+            };
+            $.fancybox(options);
+        }
+
+        private loadSelected() {
+            let $fancy = $('.specializations__listBlock--check').parent();
+            let count = 0;
+            $(this.$selector.data('field')).find(':selected').each(function () {
+                count++;
+                $fancy.find('input[value=' + $(this).val() + ']').prop('checked', 'checked');
+            });
+            this.setCount(count);
+        }
+
+        private static declOfNum(number, titles) {
+            let cases = [2, 0, 1, 1, 1, 2];
+            return titles[(number % 100 > 4 && number % 100 < 20) ? 2 : cases[(number % 10 < 5) ? number % 10 : 5]];
+        }
+
+        private bindEvents() {
+            let context = this;
+            let $fancy = $('.specializations__listBlock--check').parent();
+            $fancy.find('.btn-primary').click(function () {
+                $(context.$selector.data('field')).find('option').removeAttr('selected');
+                let count = 0;
+                let all = $fancy.find('input[value=all]').is(':checked');
+                $fancy.find('.fancycheckbox__checkbox:checked').each(function () {
+                    if (all) return null;
+                    console.dir($(context.$selector.data('field'))
+                        .find('[value=' + $(this).attr('value') + ']'));
+                    $(context.$selector.data('field'))
+                        .find('[value=' + $(this).attr('value') + ']')
+                        .prop('selected', 'selected');
+                    if ($(this).attr('value') !== 'all')
+                        count++;
+                });
+                context.setCount(count);
+                $(context.$selector.data('field')).trigger('change');
+
+                $.fancybox.close();
+            });
+            $fancy.find('.fancycheckbox__selectGroup').click(function () {
+                let checked = $(this).prop('checked');
+                $(this).parents('.specializations__listLetter').next().find('.fancycheckbox__checkbox').each(function () {
+                    $(this).prop('checked', checked);
+                });
+            });
+            $fancy.find('.fancycheckbox__checkbox').click(function () {
+                if ($(this).parents('ul').find('.fancycheckbox__checkbox').length == $(this).parents('ul').find('.fancycheckbox__checkbox:checked').length) {
+                    $(this).parents('.specializations__listRow').find('.fancycheckbox__selectGroup').prop('checked', true);
+                }
+                if (!$(this).is(':checked')) {
+                    $(this).parents('.specializations__listRow').find('.fancycheckbox__selectGroup').prop('checked', false);
+                }
+            });
+            $fancy.find('.specializations__listRegionMore').click(function () {
+                let $link = $(this);
+                let $list = $link.prev();
+                $list.animate({'max-height': $list[0].scrollHeight}, 200, function () {
+                    $link.remove();
+                });
+            });
+        }
+
+        public checkChecked(id) {
+            return this.selected.hasOwnProperty(id);
+        }
+
+        public setCount(count: number = 0) {
+            this.$selector.html('Все ' + this.typeName);
+            if (count > 0) {
+                this.$selector.html(count + ' ' + SpecFilter.declOfNum(count, this.strings));
+            }
+        }
+
+    }
+
+}

+ 135 - 0
app/assets/views/index.jade

@@ -0,0 +1,135 @@
+doctype html
+html
+	head
+		title Главная страница
+		link(href="css/all.css",rel="stylesheet")
+        script(src="https://code.jquery.com/jquery-2.2.4.js")
+		script(src="js/all.min.js")
+	body
+		//START container
+		.container
+			
+			include layouts/header
+			
+			//START content
+			section.content.loading
+				.wrapper.wrapper--content
+					//START leftbar
+					aside.leftbar
+
+						include layouts/searchStatic
+										
+						include layouts/organization
+						
+						include layouts/specialization
+						
+						include layouts/filterservice
+						
+						include layouts/popularservice
+						
+						include layouts/entitybanner
+						
+						include layouts/personals
+
+					//leftbar END
+					//START centerbar
+					main.centerbar
+					
+						include layouts/category
+
+						.grid-dis-row
+							.grid-dis-col-2
+							
+								include layouts/mainslider
+											
+							.grid-dis-col-1
+								
+								include layouts/shortnewsNoDate
+								
+							.grid-dis-col-1
+								
+								include layouts/shortnewsNoDate
+								
+						.grid-dis-row
+							.grid-dis-col-4
+								
+								include layouts/banner_950x155
+
+						.grid-dis-row
+							.grid-dis-col-3
+								
+								include layouts/maintitle
+
+								//maincontent
+								.maincontent
+									
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									
+									include layouts/videorow
+											
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									include layouts/trailernews
+									
+								include layouts/pagination
+									
+							.grid-dis-col-1.rightbar
+							
+								include layouts/calendinfo
+						
+								include layouts/shortnews
+								include layouts/shortnews
+								
+						.grid-dis-row
+							.grid-dis-col-2
+								
+								include layouts/shortnewsBig
+								
+							.grid-dis-col-1
+								
+								include layouts/shortnews
+								
+							.grid-dis-col-1
+								
+								include layouts/shortnews
+								
+						.grid-dis-row
+							.grid-dis-col-1
+								
+								include layouts/shortnews
+								
+							.grid-dis-col-1
+								
+								include layouts/shortnews
+								
+							.grid-dis-col-1
+								
+								include layouts/shortnews
+								
+							.grid-dis-col-1
+								
+								include layouts/shortnews
+								
+						.grid-dis-row
+							.grid-dis-col-4
+								
+								include layouts/usefulinfo
+
+					//centerbar END
+			//content END
+			
+			include layouts/footer
+			include layouts/socialfixed
+
+		//container END

+ 3 - 0
app/assets/views/layouts/_head.jade

@@ -0,0 +1,3 @@
+link(href="css/all.css",rel="stylesheet")
+script(src="https://code.jquery.com/jquery-2.2.4.js")
+script(src="js/all.min.js")

+ 4 - 0
app/assets/views/layouts/banner_230x400.jade

@@ -0,0 +1,4 @@
+//banner
+.banner.banner--230x400
+    a.banner__link(href="#")
+        img(src="http://placehold.it/230x400")

+ 4 - 0
app/assets/views/layouts/banner_950x155.jade

@@ -0,0 +1,4 @@
+//banner
+.banner.banner--950x155
+    a.banner__link(href="#")
+        img(src="http://placehold.it/950x155")

+ 6 - 0
app/assets/views/layouts/breadcrumbs.jade

@@ -0,0 +1,6 @@
+//breadcrumbs
+.wrapper.wrapper--breadcrumbs.breadcrumbs
+    a.breadcrumbs__link(href="#") Главная
+    a.breadcrumbs__link(href="#") Рубрика
+    a.breadcrumbs__link(href="#") Подрубрика
+    span.breadcrumbs__page Страница

+ 95 - 0
app/assets/views/layouts/calendar.jade

@@ -0,0 +1,95 @@
+//calendar
+.date-picker-wrapper.single-date.no-shortcuts.no-topbar.inline-wrapper.no-gap.single-month.calend
+    .month-wrapper
+        table.month1(cellspacing='0', cellpadding='0', border='0')
+            thead
+                tr.caption
+                    th
+                        span.prev <
+                    th.month-name(colspan='5') сентябрь 2017
+                    th
+                        span.next >
+                tr.week-name
+                    th пн
+                    th вт
+                    th ср
+                    th чт
+                    th пт
+                    th сб
+                    th вс
+            tbody
+                tr
+                    td
+                        a(href="#").calend__link.day.lastMonth.valid 28
+                    td
+                        a(href="#").calend__link.day.lastMonth.valid 29
+                    td
+                        a(href="#").calend__link.day.lastMonth.valid 30
+                    td
+                        a(href="#").calend__link.day.lastMonth.valid 31
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 1
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 2
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 3
+                tr
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 4
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 5
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 6
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 7
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 8
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 9
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 10
+                tr
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 11
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 12
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 13
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 14
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 15
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 16
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 17
+                tr
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 18
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 19
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 20
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 21
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 22
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 23
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 24
+                tr
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 25
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 26
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 27
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 28
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 29
+                    td
+                        a(href="#").calend__link.day.toMonth.valid 30
+                    td
+                        a(href="#").calend__link.day.nextMonth.valid 1

+ 31 - 0
app/assets/views/layouts/calendinfo.jade

@@ -0,0 +1,31 @@
+//calendinfo
+.calendinfo#calendinfo
+    .calendinfo__item
+        //daytime
+        .dayitime#dayitime
+            span.daytime__date#today_day
+            span.daytime__time#today_time
+    .calendinfo__item
+        //holidays
+        .holidays
+            //holidays__item
+            a.holidays__item(href="#")
+                p.holidays__imgcase
+                    img.holidays__img(src="http://placehold.it/54x54/ebebeb/")
+                p.holidays__textcase
+                    span.holidays__link(href="#") Всемирный день больного бронхиальной астмой
+            //holidays__item
+            a.holidays__item(href="#")
+                .holidays__imgcase
+                    img.holidays__img(src="http://placehold.it/54x54/ebebeb/")
+                p.holidays__textcase
+                    span.holidays__link(href="#") Всемирный день больного бронхиальной астмой
+            //holidays__item
+            a.holidays__item(href="#")
+                .holidays__imgcase
+                    img.holidays__img(src="http://placehold.it/54x54/ebebeb/")
+                p.holidays__textcase
+                    span.holidays__link(href="#") Всемирный день больного бронхиальной астмой
+        //calendcase
+        .calendinfo__calendcase
+            include calendar

+ 17 - 0
app/assets/views/layouts/category.jade

@@ -0,0 +1,17 @@
+//category
+.centerbar__item.category
+    ul.category__list
+        li.category__item
+            a.category__link(href="#") Здравоохранение
+        li.category__item
+            a.category__link(href="#") Инновации
+        li.category__item
+            a.category__link(href="#") Здоровая среда
+        li.category__item
+            a.category__link(href="#") Закон и контроль
+        li.category__item
+            a.category__link(href="#") Благое дело
+        li.category__item
+            a.category__link(href="#") Акции
+        li.category__item
+            a.category__link(href="#") Медиагалерея

+ 22 - 0
app/assets/views/layouts/entitybanner.jade

@@ -0,0 +1,22 @@
+//entitybanner
+.entitybanner
+    //entitybanner__item
+    a.entitybanner__item(href="#")
+        p.entitybanner__title
+            span.entitybanner__titletext ГБУ РО «Центр медицинской профилактики
+        p.entitybanner__description
+            span.entitybanner__descrtext Министерство
+        p.entitybanner__imgcase
+            img.entitybanner__img(src="http://placehold.it/200x130")
+        p.entitybanner__address
+            span.entitybanner__addresstrext ул. Краснослободская, д.10
+    //entitybanner__item
+    a.entitybanner__item(href="#")
+        p.entitybanner__title
+            span.entitybanner__titletext ГБУ РО «Центр медицинской профилактики
+        p.entitybanner__description
+            span.entitybanner__descrtext Министерство
+        p.entitybanner__imgcase
+            img.entitybanner__img(src="http://placehold.it/200x130")
+        p.entitybanner__address
+            span.entitybanner__addresstrext ул. Краснослободская, д.10

+ 6 - 0
app/assets/views/layouts/errorblock.jade

@@ -0,0 +1,6 @@
+//errorblock
+.errorblock
+    .errorblock__item.errorblock__imagecase
+        img.errorblock__img.errorblock__img--zoom(src="img/icon_errorblock_zoom.png")
+    .errorblock__item.errorblock__textcase
+        p.errorblock__text По вашему запросу ничего не найдено.<br>Попробуйте изменить запрос.

+ 34 - 0
app/assets/views/layouts/filterservice.jade

@@ -0,0 +1,34 @@
+//filterservice
+.leftbar__item.leftbar__item--filterservice.filterservice#filterservice
+    .leftbar__title.filterservice__title Услуги и<br>процедуры
+    .filterservice__block
+        form(id="", method="", action="")
+            .filterservice__form
+                .filterservice__inputcase
+                    //- .filterservice__labelcase
+                    .filterservice__toggle
+                        input#switch_old(type="checkbox",checked="checked")
+                        label.filterservice__labeltoggle(for="switch_old") Toggle
+                        label.filterservice__labelbig.filterservice__labelbig--old1#switch_old1(for="switch_old") Ребенок
+                        label.filterservice__labelbig.filterservice__labelbig--old2#switch_old2(for="switch_old") Взрослый
+                    //- .filterservice__labelcase
+                .filterservice__inputcase
+                    //- .filterservice__labelcase 
+                    .filterservice__toggle
+                        input#switch_male(type="checkbox")
+                        label.filterservice__labeltoggle(for="switch_male") Toggle
+                        label.filterservice__labelbig.filterservice__labelbig--male1#switch_male1(for="switch_male") Женщина
+                        label.filterservice__labelbig.filterservice__labelbig--male2#switch_male2(for="switch_male") Мужчина
+                    //- .filterservice__labelcase
+                .filterservice__inputcase
+                    .filterservice__inputtext Укажите возраст:
+                    .filterservice__inputcaseinner
+                        input.input.input--filterservice.filterservice__input(type="text",placeholder="лет")
+                    .filterservice__inputcaseinner
+                        input.input.input--filterservice.filterservice__input(type="text",placeholder="месяцев")
+                    .filterservice__inputcaseinner
+                        input.input.input--filterservice.filterservice__input(type="text",placeholder="недель")
+                        
+                .filterservice__inputcase
+                    input.input.input--filterservice.filterservice__input(type="text",placeholder="например, УЗИ щитовидки")
+                button.btn.btn-primary(type="submit") Найти

+ 23 - 0
app/assets/views/layouts/footer.jade

@@ -0,0 +1,23 @@
+//START footer
+footer.footer#footer(role="contentinfo")
+    .wrapper.wrapper--footer
+        //logo
+        .footer__item.logo.logo--vertical
+            img.logo__img(src="img/medgis_logo_footer_@2x.png")
+        .footer__item.copyright
+            a.copyright__link(href="#") Проект UZRF
+            span © 2016 Информационный медицинский портал MEDGIS.ru
+        .footer__item.aferta Разрешается копирование материалов сайта при условии наличия активной ссылки, а так же указания названия сайта
+        .footer__item.footer__right
+            include social
+            //mainlinks
+            ul.mainlinks
+                li.mainlinks__item
+                    a.mainlinks__link(href="#",target="_blank") RSS
+                li.mainlinks__item
+                    a.mainlinks__link(href="#",target="_blank") Помощь
+                li.mainlinks__item
+                    a.mainlinks__link(href="#",target="_blank") Авторам
+                li.mainlinks__item
+                    a.mainlinks__link(href="#",target="_blank") О портале
+//footer END

+ 34 - 0
app/assets/views/layouts/fullnews.jade

@@ -0,0 +1,34 @@
+//fullnews
+.fullnews
+    .full-news__details
+        .full-news__left
+            .full-news__date 06.02.2017
+            a.full-news__category(href="#") Категория
+            a.full-news__region(href="#") Регион
+        .full-news__right
+            .full-news__views 2 346 789
+            .full-news__comments 786
+    //slider
+    ul.full-news__sliderlist#full_news__sliderlist
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/1")
+            img.full-news__sliderimg(src="http://lorempixel.com/710/360/cats/1")
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/2")
+            img.full-news__sliderimg(src="http://lorempixel.com/710/360/cats/2")
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/3")
+            img.full-news__sliderimg(src="http://lorempixel.com/710/360/cats/3")
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/4")
+            img.full-news__sliderimg(src="http://lorempixel.com/710/360/cats/4")
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/5")
+            img.fullnews__sliderimg(src="http://lorempixel.com/710/360/cats/5")
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/6")
+            img.full-news__sliderimg(src="http://lorempixel.com/710/360/cats/6")
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/7")
+            img.full-news__sliderimg(src="http://lorempixel.com/710/360/cats/7")
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/8")
+            img.full-news__sliderimg(src="http://lorempixel.com/710/360/cats/8")
+        li.full-news__slideritem(data-thumb="http://lorempixel.com/150/130/cats/9")
+            img.full-news__sliderimg(src="http://lorempixel.com/710/360/cats/9")
+    //image
+    //ul.fullnews__sliderlist
+        li.fullnews__slideritem(data-thumb="http://placehold.it/150x130")
+            img.fullnews__sliderimg(src="http://placehold.it/710x360")

+ 38 - 0
app/assets/views/layouts/header.jade

@@ -0,0 +1,38 @@
+//START header
+header.header.header--index.loading
+    .wrapper.wrapper--header
+        //logo1
+        .header__item.header__item--logo.logo.logo--header
+            a.logo__link(href="#")
+                img.logo__img.logo__img--header(src="img/logo_medgis_header@2x.png")
+        //slogan
+        .header__item.header__item--slogan.slogan
+            .slogan__text Ваш навигатор в мире медицины
+            .slogan__region.region
+                a.region__link(href="#")
+                    img.region__img(src="http://placehold.it/33x33/dddddd/")
+                    span.region__name Рязанская область
+        //floatmenu
+        .header__item.header__item--floatmenu.floatmenu
+            ul.floatmenu__list
+                li.floatmenu__item
+                    a.floatmenu__link(href="#") Организации
+                li.floatmenu__item.floatmenu__item--active
+                    a.floatmenu__link(href="#") Специализации
+                li.floatmenu__item
+                    a.floatmenu__link(href="#") Услуги
+                li.floatmenu__item
+                    a.floatmenu__link(href="#") Акции
+                li.floatmenu__item
+                    a.floatmenu__link(href="#") Новости и публикации
+        //search-float
+        .header__item.search.search--float
+                .search__inputcase.search__inputcase--float
+                    form(action="")
+                        input.search__input(type="text",placeholder="Поиск по новостям")
+                        button.search__iconzoom(type="submit")
+        //special
+        .header__item.header__item--special.special
+            a.special__link(href="#")
+                img.special__img(src="img/icon_special@2x.png")
+//header END

+ 38 - 0
app/assets/views/layouts/header_inner.jade

@@ -0,0 +1,38 @@
+//START header
+header.header.header--index.inner
+    .wrapper.wrapper--header
+        //logo1
+        .header__item.header__item--logo.logo.logo--header
+            a.logo__link(href="#")
+                img.logo__img.logo__img--header(src="img/logo_medgis_header@2x.png")
+        //slogan
+        .header__item.header__item--slogan.slogan
+            .slogan__text Ваш навигатор в мире медицины
+            .slogan__region.region
+                a.region__link(href="#")
+                    img.region__img(src="http://placehold.it/33x33/dddddd/")
+                    span.region__name Рязанская область
+        //floatmenu
+        .header__item.header__item--floatmenu.floatmenu
+            ul.floatmenu__list
+                li.floatmenu__item
+                    a.floatmenu__link(href="#") Организации
+                li.floatmenu__item.floatmenu__item--active
+                    a.floatmenu__link(href="#") Специализации
+                li.floatmenu__item
+                    a.floatmenu__link(href="#") Услуги
+                li.floatmenu__item
+                    a.floatmenu__link(href="#") Акции
+                li.floatmenu__item
+                    a.floatmenu__link(href="#") Новости и публикации
+        //search-float
+        .header__item.search.search--float
+                .search__inputcase.search__inputcase--float
+                    form(action="")
+                        input.search__input(type="text",placeholder="Поиск по новостям")
+                        button.search__iconzoom(type="submit")
+        //special
+        .header__item.header__item--special.special
+            a.special__link(href="#")
+                img.special__img(src="img/icon_special@2x.png")
+//header END

+ 13 - 0
app/assets/views/layouts/mainslider.jade

@@ -0,0 +1,13 @@
+//maislider
+.mainslider
+    ul.mainslider__list#mainsliderId
+        li.mainslider__item
+            include shortnewsBigNoDate
+        li.mainslider__item
+            include shortnewsBigNoDate
+        li.mainslider__item
+            include shortnewsBigNoDate
+        li.mainslider__item
+            include shortnewsBigNoDate
+        li.mainslider__item
+            include shortnewsBigNoDate

+ 35 - 0
app/assets/views/layouts/maintitle.jade

@@ -0,0 +1,35 @@
+//maintitle
+.maintitle
+    .maintitle__item.maintitle__title Новости
+    .maintitle__item.maintitle__details
+        .maintitle__item.maintitle__datefilter.datefilter#datefilter
+            .datefilter__icon
+            .datefilter__text#datefiltertext
+        .maintitle__item.maintitle__newsfilter.newsfilter#newsfilter
+            .newsfilter__icon#newsfiltericon
+            .newsfilter__open#newsfilteropen
+                form(action="")
+                    .newsfilter__form
+                        .newsfilter__text Специализации:
+                        .newsfilter__selectcase
+                            .newsfilter__selectcase
+                                select.styler.newsfilter__select
+                                    option(value="1") Кратко
+                                    option(value="2") Большой пункт меню
+                                    option(value="3") Огромный пункт выпадайки, который не влезает в строку
+                        .newsfilter__text Районы:
+                        .newsfilter__selectcase
+                            .newsfilter__selectcase
+                                select.styler.newsfilter__select
+                                    option(value="1") 1
+                                    option(value="2") 2
+                                    option(value="3") 3
+                        .newsfilter__submitcase
+                            input.newsfilter__submit(type="submit",value="Показать результаты")
+        .maintitle__item.maintitle__searchfilter
+            //search--filter
+            .search.search--filter
+                .search__inputcase.search__inputcase--filter
+                    form(action="")
+                        input.search__input(type="text",placeholder="Поиск по новостям")
+                        button.search__iconzoom(type="submit")

+ 30 - 0
app/assets/views/layouts/organization.jade

@@ -0,0 +1,30 @@
+//organization
+.leftbar__item.leftbar__item--organization.organization
+    a.leftbar__title.organization__title#organization__title(href="#")
+        span Организации
+        img.leftbar__arrow.active(src="img/icon_leftbar_title_arrow1.png")
+    ul.organization__list.active
+        li.organization__item
+            a.organization__link(href="#") Экстренные службы
+        li.organization__item
+            a.organization__link(href="#") Больницы и госпитали
+        li.organization__item
+            a.organization__link(href="#") Поликлиники
+        li.organization__item
+            a.organization__link(href="#") Детские поликлиники
+        li.organization__item
+            a.organization__link(href="#") Роддома и женские консультации
+        li.organization__item
+            a.organization__link(href="#") Стоматологические клиники
+        li.organization__item
+            a.organization__link(href="#") Детские больницы и клиники
+        li.organization__item
+            a.organization__link(href="#") Специализированные центры
+        li.organization__item
+            a.organization__link(href="#") Медицинские центры
+        li.organization__item
+            a.organization__link(href="#") Экспертиза
+        li.organization__item
+            a.organization__link(href="#") Организации социальной сферы
+        li.organization__item
+            a.organization__link(href="#") Санатории

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä